Compare commits
1 Commits
cleanup/ip
...
agent/w092
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8699cf1dc7 |
@@ -53,9 +53,9 @@ Progress
|
||||
<!-- progress:start -->
|
||||
| Decompiled | Matched | Linked | Data |
|
||||
|:---:|:---:|:---:|:---:|
|
||||
| 87.60% | 77.28% | 56.92% | 88.22% |
|
||||
| 87.88% | 77.62% | 56.92% | 88.23% |
|
||||
|
||||
units 752/1027 complete, functions 11313/12563 matched.
|
||||
units 752/1027 complete, functions 11324/12563 matched.
|
||||
|
||||
decompiled = code with a C/C++ implementation (objdiff fuzzy), matched = byte-exact code, linked = code actually linked into the DOL, data = byte-exact data
|
||||
<!-- progress:end -->
|
||||
|
||||
@@ -18,7 +18,9 @@ namespace textinput {
|
||||
LayoutByNW4R(nw4r::lyt::MultiArcResourceAccessor* multiArc, const char* layoutName, EventObserver* event)
|
||||
: nw4rmanager::Layout(multiArc, layoutName, event) {}
|
||||
#endif
|
||||
#ifdef MYTIMANAGER_IMPLEMENTATION
|
||||
#if defined(MYTIMANAGER_MATCHING)
|
||||
virtual ~LayoutByNW4R() {}
|
||||
#elif defined(MYTIMANAGER_IMPLEMENTATION)
|
||||
virtual ~LayoutByNW4R();
|
||||
#else
|
||||
virtual ~LayoutByNW4R() {}
|
||||
|
||||
@@ -167,6 +167,25 @@ namespace textinput {
|
||||
void setManager(Manager* manager) { mpManager = manager; }
|
||||
#endif
|
||||
virtual ~State();
|
||||
#ifdef MYTIMANAGER_MATCHING
|
||||
virtual Manager::StateType getStateType() = 0;
|
||||
|
||||
virtual void create() = 0;
|
||||
|
||||
virtual void init() = 0;
|
||||
|
||||
virtual void draw() = 0;
|
||||
virtual void memoDraw() = 0;
|
||||
|
||||
virtual void calc() = 0;
|
||||
|
||||
virtual bool updateInput(int chan, f32 x, f32 y, u32 trig, u32 hold, u32 release) = 0;
|
||||
virtual bool updateInput(input::HKBManager& hkbManager) = 0;
|
||||
|
||||
virtual void start() = 0;
|
||||
virtual void end() = 0;
|
||||
|
||||
#else
|
||||
virtual Manager::StateType getStateType();
|
||||
|
||||
virtual void create();
|
||||
@@ -184,6 +203,7 @@ namespace textinput {
|
||||
virtual void start();
|
||||
virtual void end();
|
||||
|
||||
#endif
|
||||
#ifdef MYTIMANAGER_IMPLEMENTATION
|
||||
virtual InputForm* InputForm();
|
||||
virtual keyboard::hwkey::HWKeyboard* HWKeyboard();
|
||||
|
||||
@@ -2,20 +2,20 @@
|
||||
#define TEXTINPUT_CELL_PHONE_H
|
||||
|
||||
#include "tiNw4rManager.h"
|
||||
#if defined(MYTIMANAGER_IMPLEMENTATION) || defined(TIINPUTFORM_IMPLEMENTATION) || defined(TIMANAGER_IMPLEMENTATION)
|
||||
#if defined(MYTIMANAGER_IMPLEMENTATION) || defined(TIINPUTFORM_IMPLEMENTATION) || defined(TIHWKEYBOARD_IMPLEMENTATION) || defined(TIMANAGER_IMPLEMENTATION)
|
||||
#include "tiKeyboard.h"
|
||||
#endif
|
||||
|
||||
namespace textinput {
|
||||
namespace keyboard {
|
||||
namespace cellphonetype {
|
||||
#if defined(MYTIMANAGER_IMPLEMENTATION) || defined(TIINPUTFORM_IMPLEMENTATION) || defined(TIMANAGER_IMPLEMENTATION)
|
||||
#if defined(MYTIMANAGER_IMPLEMENTATION) || defined(TIINPUTFORM_IMPLEMENTATION) || defined(TIHWKEYBOARD_IMPLEMENTATION) || defined(TIMANAGER_IMPLEMENTATION)
|
||||
class Base : public textinput::keyboard::KeyboardBase {
|
||||
#else
|
||||
class Base {
|
||||
#endif
|
||||
public:
|
||||
#if defined(MYTIMANAGER_IMPLEMENTATION) || defined(TIINPUTFORM_IMPLEMENTATION) || defined(TIMANAGER_IMPLEMENTATION)
|
||||
#if defined(MYTIMANAGER_IMPLEMENTATION) || defined(TIINPUTFORM_IMPLEMENTATION) || defined(TIHWKEYBOARD_IMPLEMENTATION) || defined(TIMANAGER_IMPLEMENTATION)
|
||||
enum InputMode {
|
||||
IM_00,
|
||||
IM_01,
|
||||
@@ -32,6 +32,8 @@ namespace textinput {
|
||||
#ifdef TIMANAGER_IMPLEMENTATION
|
||||
Base(Manager* manager) : mpManager(manager) {}
|
||||
virtual int getType() override;
|
||||
#elif defined(TIHWKEYBOARD_IMPLEMENTATION)
|
||||
virtual int getType() override;
|
||||
#else
|
||||
virtual void getType() override;
|
||||
#endif
|
||||
@@ -79,7 +81,7 @@ namespace textinput {
|
||||
|
||||
virtual void vt_0x4C();
|
||||
virtual void vt_0x50();
|
||||
#if defined(MYTIMANAGER_IMPLEMENTATION) || defined(TIINPUTFORM_IMPLEMENTATION) || defined(TIMANAGER_IMPLEMENTATION)
|
||||
#if defined(MYTIMANAGER_IMPLEMENTATION) || defined(TIINPUTFORM_IMPLEMENTATION) || defined(TIHWKEYBOARD_IMPLEMENTATION) || defined(TIMANAGER_IMPLEMENTATION)
|
||||
virtual void doNumericMode(bool);
|
||||
#else
|
||||
virtual void vt_0x54();
|
||||
@@ -95,11 +97,11 @@ namespace textinput {
|
||||
|
||||
// TODO enum?
|
||||
int getInputType() const;
|
||||
#if defined(TIINPUTFORM_IMPLEMENTATION) || defined(TIMANAGER_IMPLEMENTATION)
|
||||
#if defined(TIINPUTFORM_IMPLEMENTATION) || defined(TIHWKEYBOARD_IMPLEMENTATION) || defined(TIMANAGER_IMPLEMENTATION)
|
||||
void resetHoldingButton();
|
||||
#endif
|
||||
|
||||
#if defined(MYTIMANAGER_IMPLEMENTATION) || defined(TIINPUTFORM_IMPLEMENTATION) || defined(TIMANAGER_IMPLEMENTATION)
|
||||
#if defined(MYTIMANAGER_IMPLEMENTATION) || defined(TIINPUTFORM_IMPLEMENTATION) || defined(TIHWKEYBOARD_IMPLEMENTATION) || defined(TIMANAGER_IMPLEMENTATION)
|
||||
private:
|
||||
u32 mPreviousInputMode;
|
||||
u32 mCurrentInputMode;
|
||||
@@ -123,7 +125,7 @@ namespace textinput {
|
||||
|
||||
class LayoutByNW4R : public Base, public nw4rmanager::Layout {
|
||||
public:
|
||||
#if defined(MYTIMANAGER_IMPLEMENTATION) || defined(TIINPUTFORM_IMPLEMENTATION) || defined(TIMANAGER_IMPLEMENTATION)
|
||||
#if defined(MYTIMANAGER_IMPLEMENTATION) || defined(TIINPUTFORM_IMPLEMENTATION) || defined(TIHWKEYBOARD_IMPLEMENTATION) || defined(TIMANAGER_IMPLEMENTATION)
|
||||
#ifdef TIMANAGER_IMPLEMENTATION
|
||||
LayoutByNW4R(Manager* manager, nw4r::lyt::MultiArcResourceAccessor* accessor, EventObserver* observer, const char* layoutName)
|
||||
: Base(manager), nw4rmanager::Layout(accessor, layoutName, observer), mpEventHandler(NULL) {}
|
||||
@@ -162,7 +164,7 @@ namespace textinput {
|
||||
|
||||
void onPressedShift(bool shift);
|
||||
void onReleasedShift();
|
||||
#if defined(TIINPUTFORM_IMPLEMENTATION) || defined(TIMANAGER_IMPLEMENTATION)
|
||||
#if defined(TIINPUTFORM_IMPLEMENTATION) || defined(TIHWKEYBOARD_IMPLEMENTATION) || defined(TIMANAGER_IMPLEMENTATION)
|
||||
bool hasLineFeedButton() const { return mbLineFeedButton; }
|
||||
private:
|
||||
bool mbLineFeedButton;
|
||||
@@ -176,7 +178,7 @@ namespace textinput {
|
||||
#endif
|
||||
public:
|
||||
#endif
|
||||
#if defined(MYTIMANAGER_IMPLEMENTATION) || defined(TIINPUTFORM_IMPLEMENTATION) || defined(TIMANAGER_IMPLEMENTATION)
|
||||
#if defined(MYTIMANAGER_IMPLEMENTATION) || defined(TIINPUTFORM_IMPLEMENTATION) || defined(TIHWKEYBOARD_IMPLEMENTATION) || defined(TIMANAGER_IMPLEMENTATION)
|
||||
virtual bool updateInput(int chan, f32 x, f32 y, u32 trig, u32 hold, u32 release, void* data) override;
|
||||
virtual bool updateInput(input::HKBManager& hkbManager) override;
|
||||
#endif
|
||||
|
||||
@@ -119,6 +119,9 @@ namespace textinput {
|
||||
KeySet GetTriggeredKeySet() const;
|
||||
KeySet GetReleasedKeySet() const;
|
||||
KeySet GetRepeatedKeySet() const;
|
||||
#ifdef TIHWKEYBOARD_IMPLEMENTATION
|
||||
KeySet GetReleasedKeySet() const;
|
||||
#endif
|
||||
static void SetLedCB(_KBDEc result, void* userData);
|
||||
static void AttachCB(KBDDevEvent* event);
|
||||
static void DetachCB(KBDDevEvent* event);
|
||||
@@ -148,15 +151,22 @@ namespace textinput {
|
||||
u32 GetModifierState() const;
|
||||
void SetModifierState(u32, u32);
|
||||
|
||||
#if defined(TI_PC_KEYBOARD_IMPLEMENTATION) || defined(TISIGNWINDOW_IMPLEMENTATION)
|
||||
#if defined(TI_PC_KEYBOARD_IMPLEMENTATION) || defined(TISIGNWINDOW_IMPLEMENTATION) || defined(TIHWKEYBOARD_IMPLEMENTATION)
|
||||
class KeySet {
|
||||
public:
|
||||
u8 GetKey() const;
|
||||
#ifdef TIHWKEYBOARD_IMPLEMENTATION
|
||||
u32 GetWChar() const;
|
||||
#else
|
||||
wchar_t GetWChar() const;
|
||||
#endif
|
||||
bool IsValid() const;
|
||||
KeySet GetNext() const;
|
||||
KeySet(const KeySet& other)
|
||||
: mpManager(other.mpManager), mKind(other.mKind), mIndex(other.mIndex), mDevice(other.mDevice), mCharacter(other.mCharacter) {}
|
||||
#ifdef TIHWKEYBOARD_IMPLEMENTATION
|
||||
KeySet() : mpManager(NULL), mKind(0), mIndex(-1), mDevice(0), mCharacter(0) {}
|
||||
#endif
|
||||
private:
|
||||
const HKBManager* mpManager;
|
||||
u8 mKind;
|
||||
@@ -166,6 +176,9 @@ namespace textinput {
|
||||
};
|
||||
KeySet GetTriggeredKeySet() const;
|
||||
KeySet GetRepeatedKeySet() const;
|
||||
#ifdef TIHWKEYBOARD_IMPLEMENTATION
|
||||
KeySet GetReleasedKeySet() const;
|
||||
#endif
|
||||
void SetForceModifierState(u32 mask, u32 state);
|
||||
#else
|
||||
class KeySet {
|
||||
|
||||
@@ -25,7 +25,7 @@ namespace textinput {
|
||||
#endif
|
||||
|
||||
virtual void init();
|
||||
#ifdef TI_PC_KEYBOARD_IMPLEMENTATION
|
||||
#if defined(TI_PC_KEYBOARD_IMPLEMENTATION) || defined(TIHWKEYBOARD_IMPLEMENTATION)
|
||||
wchar_t convertWCCode(wchar_t code) const;
|
||||
#endif
|
||||
|
||||
@@ -40,6 +40,11 @@ namespace textinput {
|
||||
void resetQuoteState() { mbSingleQuoteClosing = 0; mbDoubleQuoteClosing = 0; }
|
||||
#endif
|
||||
private:
|
||||
#ifdef TIHWKEYBOARD_IMPLEMENTATION
|
||||
bool updateRepeatKey_(input::HKBManager&);
|
||||
bool updateTriggerKey_(input::HKBManager&);
|
||||
bool updateTappingShift_(input::HKBManager&);
|
||||
#endif
|
||||
void updateShift(input::HKBManager& hkbManager);
|
||||
void controlKeyTriggeredHandler(input::HKBManager);
|
||||
|
||||
@@ -50,9 +55,14 @@ namespace textinput {
|
||||
#ifdef TIINPUTFORM_IMPLEMENTATION
|
||||
u8 mbSingleQuoteClosing;
|
||||
u8 mbDoubleQuoteClosing;
|
||||
#else
|
||||
#ifdef TIHWKEYBOARD_IMPLEMENTATION
|
||||
bool field_0x15;
|
||||
bool field_0x16;
|
||||
#else
|
||||
u8 field_0x15; // 0x15
|
||||
u8 field_0x16; // 0x16
|
||||
#endif
|
||||
#endif
|
||||
};
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ namespace textinput {
|
||||
KeyboardBase() : meLanguage(JP) {}
|
||||
#endif
|
||||
virtual ~KeyboardBase() {}
|
||||
#if !defined(TI_PC_KEYBOARD_IMPLEMENTATION) && !defined(TIMANAGER_IMPLEMENTATION) && !defined(TISIGNWINDOW_IMPLEMENTATION)
|
||||
#if !(defined(TI_PC_KEYBOARD_IMPLEMENTATION) || defined(TIHWKEYBOARD_IMPLEMENTATION)) && !defined(TIMANAGER_IMPLEMENTATION) && !defined(TISIGNWINDOW_IMPLEMENTATION)
|
||||
virtual void create(MEMAllocator* alloc) override;
|
||||
virtual void init() override;
|
||||
virtual void setCommandReceiver(CommandReceiver* receiver) override;
|
||||
@@ -21,18 +21,18 @@ namespace textinput {
|
||||
#if !defined(TIMANAGER_IMPLEMENTATION) && !defined(TISIGNWINDOW_IMPLEMENTATION)
|
||||
virtual void updateFromReceiver(u32, void*) override;
|
||||
#endif
|
||||
#if defined(MYTIMANAGER_IMPLEMENTATION) || defined(TIINPUTFORM_IMPLEMENTATION) || defined(TI_PC_KEYBOARD_IMPLEMENTATION) || defined(TIMANAGER_IMPLEMENTATION) || defined(TISIGNWINDOW_IMPLEMENTATION)
|
||||
#if defined(MYTIMANAGER_IMPLEMENTATION) || defined(TIINPUTFORM_IMPLEMENTATION) || (defined(TI_PC_KEYBOARD_IMPLEMENTATION) || defined(TIHWKEYBOARD_IMPLEMENTATION)) || defined(TIMANAGER_IMPLEMENTATION) || defined(TISIGNWINDOW_IMPLEMENTATION)
|
||||
virtual void onKey(u32, void*);
|
||||
#else
|
||||
virtual void onKey(u32);
|
||||
#endif
|
||||
#if defined(TI_PC_KEYBOARD_IMPLEMENTATION) || defined(TIMANAGER_IMPLEMENTATION) || defined(TISIGNWINDOW_IMPLEMENTATION)
|
||||
#if (defined(TI_PC_KEYBOARD_IMPLEMENTATION) || defined(TIHWKEYBOARD_IMPLEMENTATION)) || defined(TIMANAGER_IMPLEMENTATION) || defined(TISIGNWINDOW_IMPLEMENTATION)
|
||||
virtual int getType();
|
||||
#else
|
||||
virtual void getType();
|
||||
#endif
|
||||
virtual void setLanguage(Language language);
|
||||
#if defined(TI_PC_KEYBOARD_IMPLEMENTATION) || defined(TIMANAGER_IMPLEMENTATION) || defined(TISIGNWINDOW_IMPLEMENTATION)
|
||||
#if (defined(TI_PC_KEYBOARD_IMPLEMENTATION) || defined(TIHWKEYBOARD_IMPLEMENTATION)) || defined(TIMANAGER_IMPLEMENTATION) || defined(TISIGNWINDOW_IMPLEMENTATION)
|
||||
#ifdef TISIGNWINDOW_IMPLEMENTATION
|
||||
virtual Language getLanguage() const;
|
||||
#else
|
||||
|
||||
@@ -120,6 +120,9 @@ namespace textinput {
|
||||
virtual void start() {}
|
||||
virtual void end() {}
|
||||
|
||||
#ifdef TIHWKEYBOARD_IMPLEMENTATION
|
||||
EventObserver* getEventObserverForHardware() const { return mpEventObserver; }
|
||||
#endif
|
||||
virtual InputForm* getInputForm() { return mpInputForm; }
|
||||
virtual const InputForm* getInputForm() const { return mpInputForm; }
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#ifndef TEXTINPUT_PC_KEYBOARD_H
|
||||
#define TEXTINPUT_PC_KEYBOARD_H
|
||||
|
||||
#if defined(TI_PC_KEYBOARD_IMPLEMENTATION) || defined(TIMANAGER_IMPLEMENTATION) || defined(TISIGNWINDOW_IMPLEMENTATION)
|
||||
#if (defined(TI_PC_KEYBOARD_IMPLEMENTATION) || defined(TIHWKEYBOARD_IMPLEMENTATION)) || defined(TIMANAGER_IMPLEMENTATION) || defined(TISIGNWINDOW_IMPLEMENTATION)
|
||||
#include "tiPcKeyboardImpl.h"
|
||||
#else
|
||||
|
||||
|
||||
@@ -226,6 +226,12 @@ namespace textinput {
|
||||
State mState;
|
||||
const LanguageData* mpInitialLanguageData;
|
||||
KeyState mKeyState;
|
||||
#ifdef TIHWKEYBOARD_IMPLEMENTATION
|
||||
public:
|
||||
KeyState& hardwareKeyState() { return mKeyState; }
|
||||
bool hardwareLanguageKeyActive() const { return mbLanguageKeyActive; }
|
||||
protected:
|
||||
#endif
|
||||
MEMAllocator* mpAllocator;
|
||||
bool mbOnlyQwerty;
|
||||
bool mbLanguageKeyActive;
|
||||
|
||||
@@ -70,7 +70,7 @@ namespace textinput {
|
||||
INPUT_COMMAND_37 = 37,
|
||||
} INPUT_COMMAND;
|
||||
|
||||
#if defined(TI_PC_KEYBOARD_IMPLEMENTATION) || defined(TIMANAGER_IMPLEMENTATION) || defined(TISIGNWINDOW_IMPLEMENTATION)
|
||||
#if (defined(TI_PC_KEYBOARD_IMPLEMENTATION) || defined(TIHWKEYBOARD_IMPLEMENTATION)) || defined(TIMANAGER_IMPLEMENTATION) || defined(TISIGNWINDOW_IMPLEMENTATION)
|
||||
struct ChangePredictMode { u32 mode; bool enabled; };
|
||||
#endif
|
||||
virtual void clearSender();
|
||||
@@ -86,7 +86,7 @@ namespace textinput {
|
||||
CommandSender() : mpCommandReceiver(NULL) {}
|
||||
|
||||
virtual void setCommandReceiver(CommandReceiver* cmdRecv);
|
||||
#if defined(TI_PC_KEYBOARD_IMPLEMENTATION) || defined(TIMANAGER_IMPLEMENTATION)
|
||||
#if (defined(TI_PC_KEYBOARD_IMPLEMENTATION) || defined(TIHWKEYBOARD_IMPLEMENTATION)) || defined(TIMANAGER_IMPLEMENTATION)
|
||||
virtual void sendCommand(u32 command, void* data) {
|
||||
if (mpCommandReceiver != NULL) mpCommandReceiver->onCommand(static_cast<CommandReceiver::INPUT_COMMAND>(command), data);
|
||||
}
|
||||
|
||||
@@ -58,8 +58,13 @@ namespace textinput {
|
||||
virtual void setQwertyWithSE(bool qwerty);
|
||||
virtual bool isEnableKeytopChange() const;
|
||||
virtual void enableKeytopChange(bool enable);
|
||||
#ifdef MYTIMANAGER_MATCHING
|
||||
virtual nw4r::lyt::Pane* getDownArea();
|
||||
virtual nw4r::lyt::Pane* getUpArea();
|
||||
#else
|
||||
virtual nw4r::lyt::Pane* getUpArea();
|
||||
virtual nw4r::lyt::Pane* getDownArea();
|
||||
#endif
|
||||
virtual void setOKButtonVisible(bool visible);
|
||||
virtual void setCancelButtonVisible(bool visible);
|
||||
virtual void setOKButtonCaption(const wchar_t* caption);
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -44,6 +44,8 @@ namespace textinput {
|
||||
};
|
||||
|
||||
// name made up, no dwarf (?)
|
||||
inline const char* commonScrollAnimationName() { return COMMON_SCROLL_ANIM; }
|
||||
inline const char* commonTextAnimationName() { return COMMON_TEXT_ANIM; }
|
||||
struct PaneToAnimation {
|
||||
s32 type;
|
||||
char paneName[20];
|
||||
@@ -85,7 +87,7 @@ namespace textinput {
|
||||
{KT_ScrollButton,
|
||||
"P_prdc_scrl_Rght",
|
||||
7,
|
||||
COMMON_SCROLL_ANIM,
|
||||
commonScrollAnimationName(),
|
||||
{&csAninationFile[0], &csAninationFile[1], &csAninationFile[2], &csAninationFile[3], &csAninationFile[4], &csAninationFile[5],
|
||||
&csAninationFile[6]}},
|
||||
{KT_CandidateText,
|
||||
@@ -96,97 +98,97 @@ namespace textinput {
|
||||
{KT_CandidateText,
|
||||
"T_prdc_Text_01",
|
||||
5,
|
||||
COMMON_TEXT_ANIM,
|
||||
commonTextAnimationName(),
|
||||
{&csAninationFile[0], &csAninationFile[1], &csAninationFile[2], &csAninationFile[3], &csAninationFile[6]}},
|
||||
{KT_CandidateText,
|
||||
"T_prdc_Text_02",
|
||||
5,
|
||||
COMMON_TEXT_ANIM,
|
||||
commonTextAnimationName(),
|
||||
{&csAninationFile[0], &csAninationFile[1], &csAninationFile[2], &csAninationFile[3], &csAninationFile[6]}},
|
||||
{KT_CandidateText,
|
||||
"T_prdc_Text_03",
|
||||
5,
|
||||
COMMON_TEXT_ANIM,
|
||||
commonTextAnimationName(),
|
||||
{&csAninationFile[0], &csAninationFile[1], &csAninationFile[2], &csAninationFile[3], &csAninationFile[6]}},
|
||||
{KT_CandidateText,
|
||||
"T_prdc_Text_04",
|
||||
5,
|
||||
COMMON_TEXT_ANIM,
|
||||
commonTextAnimationName(),
|
||||
{&csAninationFile[0], &csAninationFile[1], &csAninationFile[2], &csAninationFile[3], &csAninationFile[6]}},
|
||||
{KT_CandidateText,
|
||||
"T_prdc_Text_05",
|
||||
5,
|
||||
COMMON_TEXT_ANIM,
|
||||
commonTextAnimationName(),
|
||||
{&csAninationFile[0], &csAninationFile[1], &csAninationFile[2], &csAninationFile[3], &csAninationFile[6]}},
|
||||
{KT_CandidateText,
|
||||
"T_prdc_Text_06",
|
||||
5,
|
||||
COMMON_TEXT_ANIM,
|
||||
commonTextAnimationName(),
|
||||
{&csAninationFile[0], &csAninationFile[1], &csAninationFile[2], &csAninationFile[3], &csAninationFile[6]}},
|
||||
{KT_CandidateText,
|
||||
"T_prdc_Text_07",
|
||||
5,
|
||||
COMMON_TEXT_ANIM,
|
||||
commonTextAnimationName(),
|
||||
{&csAninationFile[0], &csAninationFile[1], &csAninationFile[2], &csAninationFile[3], &csAninationFile[6]}},
|
||||
{KT_CandidateText,
|
||||
"T_prdc_Text_08",
|
||||
5,
|
||||
COMMON_TEXT_ANIM,
|
||||
commonTextAnimationName(),
|
||||
{&csAninationFile[0], &csAninationFile[1], &csAninationFile[2], &csAninationFile[3], &csAninationFile[6]}},
|
||||
{KT_CandidateText,
|
||||
"T_prdc_Text_09",
|
||||
5,
|
||||
COMMON_TEXT_ANIM,
|
||||
commonTextAnimationName(),
|
||||
{&csAninationFile[0], &csAninationFile[1], &csAninationFile[2], &csAninationFile[3], &csAninationFile[6]}},
|
||||
{KT_CandidateText,
|
||||
"T_prdc_Text_10",
|
||||
5,
|
||||
COMMON_TEXT_ANIM,
|
||||
commonTextAnimationName(),
|
||||
{&csAninationFile[0], &csAninationFile[1], &csAninationFile[2], &csAninationFile[3], &csAninationFile[6]}},
|
||||
{KT_CandidateText,
|
||||
"T_prdc_Text_11",
|
||||
5,
|
||||
COMMON_TEXT_ANIM,
|
||||
commonTextAnimationName(),
|
||||
{&csAninationFile[0], &csAninationFile[1], &csAninationFile[2], &csAninationFile[3], &csAninationFile[6]}},
|
||||
{KT_CandidateText,
|
||||
"T_prdc_Text_12",
|
||||
5,
|
||||
COMMON_TEXT_ANIM,
|
||||
commonTextAnimationName(),
|
||||
{&csAninationFile[0], &csAninationFile[1], &csAninationFile[2], &csAninationFile[3], &csAninationFile[6]}},
|
||||
{KT_CandidateText,
|
||||
"T_prdc_Text_13",
|
||||
5,
|
||||
COMMON_TEXT_ANIM,
|
||||
commonTextAnimationName(),
|
||||
{&csAninationFile[0], &csAninationFile[1], &csAninationFile[2], &csAninationFile[3], &csAninationFile[6]}},
|
||||
{KT_CandidateText,
|
||||
"T_prdc_Text_14",
|
||||
5,
|
||||
COMMON_TEXT_ANIM,
|
||||
commonTextAnimationName(),
|
||||
{&csAninationFile[0], &csAninationFile[1], &csAninationFile[2], &csAninationFile[3], &csAninationFile[6]}},
|
||||
{KT_CandidateText,
|
||||
"T_prdc_Text_15",
|
||||
5,
|
||||
COMMON_TEXT_ANIM,
|
||||
commonTextAnimationName(),
|
||||
{&csAninationFile[0], &csAninationFile[1], &csAninationFile[2], &csAninationFile[3], &csAninationFile[6]}},
|
||||
{KT_CandidateText,
|
||||
"T_prdc_Text_16",
|
||||
5,
|
||||
COMMON_TEXT_ANIM,
|
||||
commonTextAnimationName(),
|
||||
{&csAninationFile[0], &csAninationFile[1], &csAninationFile[2], &csAninationFile[3], &csAninationFile[6]}},
|
||||
{KT_CandidateText,
|
||||
"T_prdc_Text_17",
|
||||
5,
|
||||
COMMON_TEXT_ANIM,
|
||||
commonTextAnimationName(),
|
||||
{&csAninationFile[0], &csAninationFile[1], &csAninationFile[2], &csAninationFile[3], &csAninationFile[6]}},
|
||||
{KT_CandidateText,
|
||||
"T_prdc_Text_18",
|
||||
5,
|
||||
COMMON_TEXT_ANIM,
|
||||
commonTextAnimationName(),
|
||||
{&csAninationFile[0], &csAninationFile[1], &csAninationFile[2], &csAninationFile[3], &csAninationFile[6]}},
|
||||
{KT_CandidateText,
|
||||
"T_prdc_Text_19",
|
||||
5,
|
||||
COMMON_TEXT_ANIM,
|
||||
commonTextAnimationName(),
|
||||
{&csAninationFile[0], &csAninationFile[1], &csAninationFile[2], &csAninationFile[3], &csAninationFile[6]}},
|
||||
{KT_OnOffButton,
|
||||
"P_OnBtn",
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
#define TIHWKEYBOARD_IMPLEMENTATION
|
||||
#include "keyboard/tiHwKeyboard.h"
|
||||
|
||||
#include "keyboard/tiManager.h"
|
||||
@@ -247,6 +248,349 @@ namespace textinput {
|
||||
blr
|
||||
}
|
||||
|
||||
struct NavigationCommand { u32 command; u32 modifiers; };
|
||||
struct KeyInputData {
|
||||
wchar_t character;
|
||||
u16 flags;
|
||||
u32 modifier;
|
||||
u8 direct;
|
||||
u8 repeated;
|
||||
u16 reserved;
|
||||
u32 data;
|
||||
};
|
||||
extern const u8 controlKeys[];
|
||||
bool HWKeyboard::updateRepeatKey_(input::HKBManager& hkbManager) {
|
||||
u32 modifierState = hkbManager.GetModifierState();
|
||||
input::HKBManager::KeySet currentKeySet;
|
||||
currentKeySet = hkbManager.GetRepeatedKeySet();
|
||||
|
||||
if (!currentKeySet.IsValid()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!mgr()->getToolBar()->isQwerty()) {
|
||||
if (mgr()->getToolBar()->isEnableKeytopChange()) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
u32 modifierFlag = modifierState & 0x8;
|
||||
|
||||
while (currentKeySet.IsValid()) {
|
||||
int key = currentKeySet.GetKey();
|
||||
u32 command;
|
||||
|
||||
if (key == 0x4c) {
|
||||
goto sendCommand2;
|
||||
}
|
||||
|
||||
if (key < 0x4c) {
|
||||
if (key != 0x2b) {
|
||||
if (key < 0x2b) {
|
||||
if (key >= 0x2a) {
|
||||
goto sendCommand1;
|
||||
}
|
||||
} else {
|
||||
if (key >= 0x2d) {
|
||||
goto nextRepeatedKey;
|
||||
}
|
||||
goto checkSpecialCommand;
|
||||
}
|
||||
}
|
||||
goto nextRepeatedKey;
|
||||
}
|
||||
|
||||
if (key == 0x51) {
|
||||
goto setNavigationCommand1e;
|
||||
}
|
||||
|
||||
if (key < 0x51) {
|
||||
if (key == 0x4f) {
|
||||
goto setNavigationCommand20;
|
||||
} else if (key >= 0x4f) {
|
||||
goto setNavigationCommand1f;
|
||||
}
|
||||
} else {
|
||||
if (key >= 0x53) {
|
||||
goto nextRepeatedKey;
|
||||
}
|
||||
goto setNavigationCommand1d;
|
||||
}
|
||||
|
||||
goto nextRepeatedKey;
|
||||
|
||||
sendCommand2:
|
||||
sendCommand(2, NULL);
|
||||
goto nextRepeatedKey;
|
||||
|
||||
sendCommand1:
|
||||
sendCommand(1, NULL);
|
||||
goto nextRepeatedKey;
|
||||
|
||||
setNavigationCommand20:
|
||||
command = 0x20;
|
||||
goto sendNavigationCommand;
|
||||
|
||||
setNavigationCommand1f:
|
||||
command = 0x1f;
|
||||
goto sendNavigationCommand;
|
||||
|
||||
setNavigationCommand1e:
|
||||
command = 0x1e;
|
||||
goto sendNavigationCommand;
|
||||
|
||||
setNavigationCommand1d:
|
||||
command = 0x1d;
|
||||
|
||||
sendNavigationCommand:
|
||||
{
|
||||
u32 commandData[2];
|
||||
commandData[0] = command;
|
||||
commandData[1] = modifierState;
|
||||
sendCommand(0x26, commandData);
|
||||
}
|
||||
goto nextRepeatedKey;
|
||||
|
||||
checkSpecialCommand:
|
||||
if (mgr()->getToolBar()->isQwerty() ||
|
||||
!mgr()->getCellPhoneKeyboard()->isNumeric()) {
|
||||
if (modifierFlag == 0) {
|
||||
goto sendSpecialCommand;
|
||||
}
|
||||
}
|
||||
goto nextRepeatedKey;
|
||||
|
||||
sendSpecialCommand:
|
||||
{
|
||||
NavigationCommand commandData = {8, modifierState};
|
||||
sendCommand(0x26, &commandData);
|
||||
}
|
||||
|
||||
nextRepeatedKey:
|
||||
|
||||
currentKeySet = currentKeySet.GetNext();
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
bool HWKeyboard::updateTriggerKey_(input::HKBManager& hkbManager) {
|
||||
u32 modifierState = hkbManager.GetModifierState();
|
||||
input::HKBManager::KeySet currentKeySet;
|
||||
currentKeySet = hkbManager.GetTriggeredKeySet();
|
||||
|
||||
if (!currentKeySet.IsValid()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!mgr()->getToolBar()->isQwerty() &&
|
||||
mgr()->getToolBar()->isEnableKeytopChange()) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (!mgr()->getPCKeyboard()->isABC()) {
|
||||
if (mgr()->getToolBar()->isQwerty()) {
|
||||
EventObserver* eventObserver = mgr()->getEventObserverForHardware();
|
||||
if (eventObserver != NULL) {
|
||||
eventObserver->onSE(sound::SE_KETAI_MODE_SWITCHING);
|
||||
}
|
||||
}
|
||||
mgr()->getPCKeyboard()->setABC(true);
|
||||
}
|
||||
|
||||
while (currentKeySet.IsValid()) {
|
||||
u32 character = currentKeySet.GetWChar();
|
||||
u8 key = currentKeySet.GetKey();
|
||||
|
||||
if (static_cast<wchar_t>(character) == 0x20) {
|
||||
if ((modifierState & 0x8) != 0) {
|
||||
NavigationCommand commandData = {8, modifierState};
|
||||
sendCommand(0x26, &commandData);
|
||||
}
|
||||
} else if (static_cast<wchar_t>(character) != 0) {
|
||||
bool sendCharacter = true;
|
||||
if (!mgr()->getToolBar()->isQwerty() &&
|
||||
mgr()->getCellPhoneKeyboard()->isNumeric()) {
|
||||
if (static_cast<wchar_t>(character) == '/') {
|
||||
goto suppressCharacter;
|
||||
}
|
||||
if (static_cast<wchar_t>(character) < '/') {
|
||||
if (static_cast<wchar_t>(character) >= '.') {
|
||||
goto checkNumericDot;
|
||||
}
|
||||
goto suppressCharacter;
|
||||
}
|
||||
if (static_cast<wchar_t>(character) >= ':') {
|
||||
goto suppressCharacter;
|
||||
}
|
||||
goto sendCharacterCheck;
|
||||
checkNumericDot:
|
||||
if (mgr()->getCellPhoneKeyboard()->isNumericWithDot()) {
|
||||
goto sendCharacterCheck;
|
||||
}
|
||||
suppressCharacter:
|
||||
sendCharacter = false;
|
||||
}
|
||||
|
||||
goto sendCharacterCheck;
|
||||
sendCharacterCheck:
|
||||
if (sendCharacter) {
|
||||
modifierState = 0;
|
||||
if ((hkbManager.GetModifierState() & 0x2) != 0) {
|
||||
modifierState |= 1;
|
||||
}
|
||||
if ((hkbManager.GetModifierState() & 0x200) != 0) {
|
||||
modifierState |= 2;
|
||||
}
|
||||
if ((modifierState & 1) == 0) {
|
||||
keyboard::pctype::Base::KeyState& keyState = mgr()->getPCKeyboard()->hardwareKeyState();
|
||||
keyState.setABCFlag(keyState.abcFlags & 0xffffff70);
|
||||
}
|
||||
|
||||
character = convertWCCode(character);
|
||||
KeyInputData keyInputData = {0, 0, 0, 1, 0, 0, 0};
|
||||
keyInputData.character = character;
|
||||
keyInputData.modifier = modifierState;
|
||||
sendCommand(0, &keyInputData);
|
||||
|
||||
if (mgr()->getLanguage() == CN) {
|
||||
if (static_cast<wchar_t>(character + (0x10000 - 0x201c)) <= 1) {
|
||||
field_0x16 = !field_0x16;
|
||||
} else if (static_cast<wchar_t>(character + (0x10000 - 0x2018)) <= 1) {
|
||||
field_0x15 = !field_0x15;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
} else {
|
||||
bool sendKey = true;
|
||||
int translatedKey;
|
||||
if (key < 0x20) {
|
||||
translatedKey = 0;
|
||||
} else if (key < 0x98) {
|
||||
translatedKey = controlKeys[key - 0x20];
|
||||
} else if (key < 0xe0) {
|
||||
translatedKey = 0;
|
||||
} else if (key < 0xf0) {
|
||||
translatedKey = controlKeys[key - 0x68];
|
||||
} else {
|
||||
translatedKey = 0;
|
||||
}
|
||||
|
||||
if (translatedKey == 0x1c) {
|
||||
bool capsLock = !(hkbManager.GetModifierState() & 0x100);
|
||||
if (!mgr()->getToolBar()->isQwerty() &&
|
||||
mgr()->getCellPhoneKeyboard()->isNumeric()) {
|
||||
capsLock = true;
|
||||
}
|
||||
hkbManager.SetModifierState(capsLock ? 0x100 : 0, 0x100);
|
||||
}
|
||||
|
||||
if (mgr()->getToolBar()->isQwerty() ||
|
||||
!mgr()->getCellPhoneKeyboard()->isNumeric()) {
|
||||
goto sendKeyCheck;
|
||||
}
|
||||
|
||||
switch (translatedKey) {
|
||||
case 0x15:
|
||||
case 0x16:
|
||||
case 0x1d:
|
||||
case 0x1e:
|
||||
case 0x1f:
|
||||
case 0x20:
|
||||
break;
|
||||
default:
|
||||
sendKey = false;
|
||||
break;
|
||||
}
|
||||
sendKeyCheck:
|
||||
if (sendKey) {
|
||||
u32 commandData[2] = {translatedKey, modifierState};
|
||||
sendCommand(0x26, commandData);
|
||||
}
|
||||
}
|
||||
|
||||
int capsKey = currentKeySet.GetKey();
|
||||
switch (capsKey) {
|
||||
case 0x39:
|
||||
if (mgr()->getToolBar()->isQwerty() ||
|
||||
mgr()->getToolBar()->isEnableKeytopChange()) {
|
||||
mgr()->getPCKeyboard()->onPressedCaps();
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
currentKeySet = currentKeySet.GetNext();
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
const u8 controlKeys[] = {
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x09, 0x01, 0x0a, 0x03,
|
||||
0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00,
|
||||
0x00, 0x04, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, 0x28, 0x29, 0x2a,
|
||||
0x2b, 0x2c, 0x19, 0x1a, 0x1b, 0x13, 0x15, 0x17, 0x14, 0x16, 0x18, 0x00,
|
||||
0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x0f, 0x0e,
|
||||
0x00, 0x00, 0x00, 0x00,
|
||||
0x11, 0x12, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x05, 0x07, 0x0b,
|
||||
0x06, 0x05, 0x07, 0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
};
|
||||
bool HWKeyboard::updateTappingShift_(input::HKBManager& hkbManager) {
|
||||
hkbManager.GetModifierState();
|
||||
input::HKBManager::KeySet currentKeySet;
|
||||
input::HKBManager::KeySet triggeredKeySet;
|
||||
input::HKBManager::KeySet releasedKeySet;
|
||||
input::HKBManager::KeySet releasedNextKeySet;
|
||||
triggeredKeySet = hkbManager.GetTriggeredKeySet();
|
||||
currentKeySet = triggeredKeySet;
|
||||
|
||||
while (currentKeySet.IsValid()) {
|
||||
int key = currentKeySet.GetKey();
|
||||
switch (key) {
|
||||
case 0xe5:
|
||||
case 0xe1:
|
||||
field_0x14 = 1;
|
||||
return false;
|
||||
default:
|
||||
field_0x14 = 0;
|
||||
currentKeySet = currentKeySet.GetNext();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (field_0x14 == 0) {
|
||||
return false;
|
||||
}
|
||||
|
||||
releasedKeySet = hkbManager.GetReleasedKeySet();
|
||||
currentKeySet = releasedKeySet;
|
||||
while (currentKeySet.IsValid()) {
|
||||
int key = currentKeySet.GetKey();
|
||||
switch (key) {
|
||||
case 0xe5:
|
||||
case 0xe1:
|
||||
field_0x14 = 0;
|
||||
if (mgr()->getToolBar()->isQwerty() &&
|
||||
mgr()->getPCKeyboard()->hardwareLanguageKeyActive()) {
|
||||
sendCommand(0x2e, NULL);
|
||||
}
|
||||
return false;
|
||||
default:
|
||||
currentKeySet = currentKeySet.GetNext();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
HWKeyboard::HWKeyboard(Manager* manager) : mpManager(manager), field_0x14(0), field_0x15(0), field_0x16(0) {
|
||||
}
|
||||
|
||||
@@ -474,3 +818,4 @@ namespace textinput {
|
||||
} // namespace keyboard
|
||||
|
||||
} // namespace textinput
|
||||
|
||||
|
||||
89
tools/decomp-assist/MyTiManager.attempts.md
Normal file
89
tools/decomp-assist/MyTiManager.attempts.md
Normal file
@@ -0,0 +1,89 @@
|
||||
# MyTiManager matching attempts
|
||||
|
||||
Baseline: 84/91 instruction-exact functions, 12748/20196 code bytes,
|
||||
20/1132 reported data bytes. Existing pool was identical.
|
||||
|
||||
## reflectSaveData
|
||||
|
||||
1. Branch directly on revision one: six instructions versus eight.
|
||||
2. Switch with revision one and a default call: seven versus eight.
|
||||
3. Separate revision-zero/default calls: eleven versus eight.
|
||||
4. Revision-zero break followed by the shared default call: eight/eight,
|
||||
zero instruction differences.
|
||||
|
||||
## DispMemoState::start
|
||||
|
||||
1. Reconstructed pane translations and alpha assignments using VEC3 and
|
||||
byte conversion: 321/326 instructions.
|
||||
2. VEC2 translations and an integer alpha helper: 325/326.
|
||||
3. Corrected toolbar pane accessor order under the private header guard,
|
||||
and used the configuration switch: 326/326, zero differences.
|
||||
|
||||
## EditMemoState::start
|
||||
|
||||
1. Full initialization with VEC3 and direct byte conversion: 381/385.
|
||||
2. VEC2 and integer alpha helper: 385/385, four accessor-slot differences.
|
||||
3. Corrected the toolbar accessor declarations in the private guard:
|
||||
385/385, zero differences.
|
||||
|
||||
## AppearMemoState::calc
|
||||
|
||||
1. Reconstructed interpolation, pane movement, alpha and scrolling:
|
||||
437/428. Background movement, toolbar alpha and configuration branches
|
||||
differed from the target.
|
||||
2. Kept the background stationary, used the configuration switch and removed
|
||||
the extra toolbar alpha assignment: 428/428, one accessor-slot difference.
|
||||
3. Applied alpha to the upper toolbar pane: 428/428, zero differences.
|
||||
|
||||
## EditMemoState::updateInput
|
||||
|
||||
1. Restored common input processing and candidate-dependent pointer handling.
|
||||
Infinity is computed with ordinary floating arithmetic. 306/309;
|
||||
caching the prediction dialog removed the repeated virtual getter.
|
||||
2. Repeated the prediction getter as the target does: 309/309, two register
|
||||
differences in the combined return value.
|
||||
3. Reused the keyboard-handled local for the combined result:
|
||||
309/309, zero differences.
|
||||
|
||||
## DisappearMemoState::calc
|
||||
|
||||
1. Restored animation interpolation and pane assignments: 370/342.
|
||||
2. Kept the background stationary, used the configuration switch and removed
|
||||
the scrolling operation absent from the target: 342/342, zero differences.
|
||||
|
||||
## Static initialization and data
|
||||
|
||||
1. Corrected DisappearMemoState to inherit AppearMemoState and its timer,
|
||||
and made State's abstract operations pure under the private guard:
|
||||
63/64 initializer instructions; the derived table now inherits the correct
|
||||
appearance operations.
|
||||
2. Explicit background base construction and moving base function definitions
|
||||
earlier did not change the initializer differences. Discarded.
|
||||
3. Inline definitions for the base destructor and background operations:
|
||||
64/64, four remaining state-table offsets. Retained the inline State
|
||||
destructor; discarded the ineffective background edits.
|
||||
4. Background constructor moved out of the class with an inline definition:
|
||||
same four offsets; createBG stayed exact. Discarded.
|
||||
5. Restored function definitions to target object order and fixed the real
|
||||
letter/photo-letter translation values to 145 and 151. This made the
|
||||
floating constant pool identical, rather than relying on relocation-only
|
||||
function scoring. Restored the background destructor omitted by the
|
||||
ordering experiment before accepting the result.
|
||||
6. External state globals: no code change, worse .bss score (40% versus 60%).
|
||||
Reverted to the existing static definitions.
|
||||
7. Included the background class declarations after the memo state classes:
|
||||
moved its tables ahead of the state tables, but the strong background
|
||||
destructor also emitted its derived table there.
|
||||
8. Made the background destructor inline only for this unit, preserving the
|
||||
existing header branches: its deduplicated derived table remains external,
|
||||
background Base is first, and all four state offsets match. Initializer:
|
||||
64/64, zero differences. All 91 functions are instruction-exact.
|
||||
|
||||
Pool remains identical. .sdata, .sdata2, .sbss and .ctors report 100%.
|
||||
Reported .data remains 61.94834% and .bss 60.000004%. The original splits the
|
||||
Manager vtable at 0x33c into a separately named 156-byte symbol; the compiler
|
||||
emits one ordinary 320-byte vtable. Its entries and relocations through 0x3ac
|
||||
agree. The extracted original additionally ends in 40 zero bytes after the
|
||||
vtable; no source padding was added. The .bss registry buffers and state
|
||||
objects have identical offsets and 72 zero bytes, but different buffer symbol
|
||||
boundaries. No symbol configuration or hand-placed data was introduced.
|
||||
41
tools/decomp-assist/tiCandidateBox.attempts.md
Normal file
41
tools/decomp-assist/tiCandidateBox.attempts.md
Normal file
@@ -0,0 +1,41 @@
|
||||
# tiCandidateBox continuation
|
||||
|
||||
Baseline: 104/112 objdiff, 102/112 instruction exact; code 17112/24000, data 1132/4652.
|
||||
|
||||
Closest functions first: CalcPaneLocate_, StartScrollToIdx, StartScroll, GetPrevPageIdx_. Attempts 1 reorder margin/scale evaluation, 2 reverse multiplication and use an unsigned fixed pane-loop index, 3 reorder evaluation and addition. None improved the baseline.
|
||||
|
||||
Draw: attempt 1 sequential vector initialization, 2 full scissor rectangle (12 differences), 3 direct corner initialization. Discarded attempt 2 because two unused fields add no readability; original retained.
|
||||
|
||||
createAnmPane_: attempt 1 widened counters, 2 animation reference, 3 direct ID retrieval. All discarded.
|
||||
|
||||
create: attempt 1 combined string allocation/construction, 2 combined candidate allocation/construction, 3 passed the saved allocator. All discarded.
|
||||
|
||||
Static initializer: attempt 1 inline name access by value (exact), 2 const record member (22 differences), 3 inline name access by reference (exact). Retained meaningful shared-name accessors; 25/25 instructions, zero differences.
|
||||
|
||||
Data: pool identical; .rodata and .sdata2 100%. Changing the existing empty-text array's final 1 to the target zero moved its storage and reduced .sdata to 75%; reverted. Existing pinned data and assembly not expanded. No shared-header changes.
|
||||
|
||||
Measured trials:
|
||||
- CalcPaneLocate_ attempt 1: src 0x6d0 base 0x6cc insns 436/435; --- insert mine 29:29 base 29:31
|
||||
- StartScrollToIdx attempt 1: src 0x2e4 base 0x2e0 insns 185/184; --- insert mine 21:21 base 21:23
|
||||
- StartScroll attempt 1: src 0x2e8 base 0x2e4 insns 186/185; --- insert mine 21:21 base 21:23
|
||||
- GetPrevPageIdx_ attempt 1: src 0x208 base 0x204 insns 130/129; --- replace mine 23:24 base 23:24
|
||||
- CalcPaneLocate_ attempt 2: src 0x6cc base 0x6cc insns 435/435; diffs 50: [34, 39, 41, 69, 168, 170, 247, 248, 249, 250, 254, 255, 258, 259, 260, 264, 266, 267, 269, 271]
|
||||
- StartScrollToIdx attempt 2: src 0x2e0 base 0x2e0 insns 184/184; diffs 21: [27, 33, 35, 47, 54, 58, 60, 65, 70, 73, 74, 85, 88, 97, 102, 103, 121, 126, 141, 142]
|
||||
- StartScroll attempt 2: src 0x2e4 base 0x2e4 insns 185/185; diffs 27: [27, 33, 35, 41, 50, 54, 56, 57, 58, 61, 63, 68, 73, 76, 77, 88, 90, 98, 106, 110]
|
||||
- GetPrevPageIdx_ attempt 2: src 0x204 base 0x204 insns 129/129; diffs 23: [28, 36, 38, 39, 42, 51, 52, 58, 59, 61, 63, 64, 65, 71, 75, 76, 79, 80, 89, 90]
|
||||
- CalcPaneLocate_ attempt 3: src 0x6d0 base 0x6cc insns 436/435; --- insert mine 29:29 base 29:31
|
||||
- StartScrollToIdx attempt 3: src 0x2e4 base 0x2e0 insns 185/184; --- insert mine 21:21 base 21:23
|
||||
- StartScroll attempt 3: src 0x2e8 base 0x2e4 insns 186/185; --- insert mine 21:21 base 21:23
|
||||
- GetPrevPageIdx_ attempt 3: src 0x208 base 0x204 insns 130/129; --- replace mine 23:24 base 23:24
|
||||
- Draw attempt 1: src 0x310 base 0x310 insns 196/196; diffs 33: [0, 2, 3, 68, 72, 73, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 93]
|
||||
- createAnmPane_ attempt 1: src 0x36c base 0x360 insns 219/216; --- replace mine 0:1 base 0:1
|
||||
- create attempt 1: src 0x57c base 0x580 insns 351/352; --- replace mine 5:6 base 5:6
|
||||
- Draw attempt 2: src 0x310 base 0x310 insns 196/196; diffs 12: [0, 2, 3, 83, 84, 85, 143, 145, 148, 190, 192, 194]
|
||||
- createAnmPane_ attempt 2: src 0x358 base 0x360 insns 214/216; --- insert mine 5:5 base 5:8
|
||||
- create attempt 2: src 0x57c base 0x580 insns 351/352; --- replace mine 5:6 base 5:6
|
||||
- Draw attempt 3: src 0x310 base 0x310 insns 196/196; diffs 33: [0, 2, 3, 68, 72, 73, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 93]
|
||||
- createAnmPane_ attempt 3: src 0x370 base 0x360 insns 220/216; --- delete mine 5:6 base 5:5
|
||||
- create attempt 3: src 0x57c base 0x580 insns 351/352; --- replace mine 5:6 base 5:6
|
||||
- static initializer attempt 1: src 0x64 base 0x64 insns 25/25; diffs 0: []
|
||||
- static initializer attempt 2: src 0x64 base 0x64 insns 25/25; diffs 22: [1, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21]
|
||||
- static initializer attempt 3: src 0x64 base 0x64 insns 25/25; diffs 0: []
|
||||
19
tools/decomp-assist/tiHwKeyboard.attempts.md
Normal file
19
tools/decomp-assist/tiHwKeyboard.attempts.md
Normal file
@@ -0,0 +1,19 @@
|
||||
# tiHwKeyboard
|
||||
|
||||
Baseline: 7/10 exact, 1676/4596 code bytes, 296/568 data bytes. Three functions were absent. Existing assembly bodies and pinned data were not expanded.
|
||||
|
||||
- updateTappingShift_: typed KeySet iteration and inherited keyboard fields reproduce 145/145 instructions exactly on the first implementation.
|
||||
- updateRepeatKey_ attempt 1: scalar space command produced 182/180 instructions and an extra saved register.
|
||||
- attempt 2: copying a static NavigationCommand aggregate produced 184/180 and a larger frame.
|
||||
- attempt 3: initialize the local NavigationCommand with {8, modifierState}; 180/180, one mask difference when using a boolean modifier.
|
||||
- attempt 4: preserve the masked u32 modifier; 180/180, zero differences.
|
||||
- updateTriggerKey_ attempt 1: copying the static character-input template was hoisted; 407/405, extra frame space.
|
||||
- attempt 2: separate aggregate assignment and wider character temporary: 403/405, register and stack differences.
|
||||
- attempt 3: local navigation aggregate and numeric range simplification: 405/405, 284 differences, mostly allocation/frame offsets.
|
||||
- attempt 4: initialize the character aggregate locally; 400/405, template copy now occurs inside the loop.
|
||||
- attempt 5: accurate u32 GetWChar declaration and explicit wchar_t narrowing; restored numeric filter switch. 404/405, quote handling remained.
|
||||
- attempt 6: quote switch: 405/405, 14 branch differences.
|
||||
- attempt 7: wchar_t quote-pair ranges: 404/405, missing high-half addition.
|
||||
- attempt 8: express modular quote distances as character + (0x10000 - quote); 405/405, zero differences.
|
||||
|
||||
Data: the first 64 extracted .rodata bytes belong to the preceding letter animation table (documented in MyTiLetterForm.attempts.md). They were not recreated as hardware dummy data. The real hardware key map and character-input template use ordinary typed C++ objects. Moving the key map after its consumer preserves all exact functions; moving country definitions after their assembly consumer failed compilation and was reverted. Target .bss is unreferenced extracted space; .sdata2 includes trailing zeros. No padding or force-active objects were added. Pools remain identical. Shared changes are isolated behind TIHWKEYBOARD_IMPLEMENTATION.
|
||||
Reference in New Issue
Block a user