Compare commits

..

1 Commits

Author SHA1 Message Date
devin
449fb9a66e Decode iplSDChannelTitle + ut_ArchiveFontBase (source-only, stays NonMatching)
- SDButton::setEventHandler was genuinely 1-arg in retail (dead second
  param): corrected decl/def/call sites + symbols.txt mangle. Fixes 5
  fns to instruction-identical and lifts iplSDChannelTitle data to
  .data/.rodata/.sdata/.sdata2 100% (was 12.1%).
- ut_ArchiveFontBase: reordered sheetOffsetsScratch decl/assign to
  match orig materialization.

Both units remain NonMatching — flip attempts verified to break the
linked DOL: iplSDChannelTitle's object emits 51 net-extra anonymous
literal objects (pool merge/order differs, fuzzy 99.94) plus two fns
+4B each (updateCopyStart, startCopyProgress); ut_ArchiveFontBase has
a ~0x380B content region differing (fuzzy 98.47). DOL sha1 stays
26116613f624061ba99c8d1a299aaa6efa85670d with them unlinked.

Co-authored-by: coah80 <usernamecole7@gmail.com>
Co-Authored-By: wch <usernamecole7@gmail.com>
2026-10-02 14:50:59 +00:00
21 changed files with 237 additions and 411 deletions

View File

@@ -4814,7 +4814,7 @@ reset_gui__Q33ipl5scene8SDButtonFv = .text:0x813E9BC0; // type:function size:0x1
startPointEvent__Q33ipl5scene8SDButtonFPCcPQ33ipl10controller9Interface = .text:0x813E9D08; // type:function size:0x258
startLeftEvent__Q33ipl5scene8SDButtonFPCc = .text:0x813E9F60; // type:function size:0x220
isActive__Q33ipl5scene8SDButtonCFv = .text:0x813EA180; // type:function size:0xC
setEventHandler__Q33ipl5scene8SDButtonFPQ23gui12EventHandlerPQ23gui12EventHandler = .text:0x813EA18C; // type:function size:0x14
setEventHandler__Q33ipl5scene8SDButtonFPQ23gui12EventHandler = .text:0x813EA18C; // type:function size:0x14
setText__Q33ipl5scene8SDButtonFPCcPCw = .text:0x813EA1A0; // type:function size:0xB4
animation__Q33ipl5scene8SDButtonFi = .text:0x813EA254; // type:function size:0x1C4
initArrowAppearance__Q33ipl5scene8SDButtonFib = .text:0x813EA418; // type:function size:0xD0

View File

@@ -48,15 +48,6 @@ namespace textinput {
public:
virtual ~GUIInterface() {} // 0x08
#ifdef TIGUIMANAGER_IMPLEMENTATION
virtual void create(); // 0x0C
virtual void init(); // 0x10
virtual void calc(); // 0x14
virtual void draw(Mtx& mtx); // 0x18
virtual void draw(); // 0x1C
#else
virtual void create() {} // 0x0C
virtual void init() {} // 0x10
@@ -64,7 +55,6 @@ namespace textinput {
virtual void draw(Mtx& mtx) {} // 0x18
virtual void draw() {} // 0x1C
#endif
};
class EventHandler {
@@ -80,23 +70,12 @@ namespace textinput {
EventHandler() : muLatestEventCtrlNo(0) {}
#ifdef TI_PC_KEYBOARD_IMPLEMENTATION
virtual ~EventHandler(); // 0x08
#else
virtual ~EventHandler() {} // 0x08
#endif
#if defined(TI_PC_KEYBOARD_IMPLEMENTATION) || defined(TIINPUTFORM_IMPLEMENTATION) || defined(TISIGNWINDOW_IMPLEMENTATION) || defined(TI_CANDIDATEBOX_IMPLEMENTATION) || defined(TI_CELLPHONE_IMPLEMENTATION)
virtual void onEvent(GUIComponent& comp, u32 event, void* data); // 0x0C
virtual void setLatestEventCtrlNo(int ctrlNo); // 0x10
virtual int getLatestEventCtrlNo(); // 0x14
#else
virtual void onEvent(GUIComponent& comp, u32 event, void* data) {} // 0x0C
virtual void setLatestEventCtrlNo(int ctrlNo) { muLatestEventCtrlNo = ctrlNo; } // 0x10
virtual int getLatestEventCtrlNo() { return muLatestEventCtrlNo; } // 0x14
#endif
protected:
int muLatestEventCtrlNo; // 0x04
@@ -113,14 +92,8 @@ namespace textinput {
EVENT_RELEASE
};
#ifdef TIGUIMANAGER_IMPLEMENTATION
virtual ~GUIComponent(); // 0x08
#else
virtual ~GUIComponent() {} // 0x08
#endif
#if defined(TIINPUTFORM_IMPLEMENTATION) || defined(TIGUIMANAGER_IMPLEMENTATION)
virtual void init(); // 0x10
#ifdef TIINPUTFORM_IMPLEMENTATION
virtual void init();
#else
virtual void init() { // 0x10
for (int i = 0; i < GUI_POINTS_MAX; i++) {
@@ -136,27 +109,14 @@ namespace textinput {
: GUIInterface(), mbInitialize(false), mDraggingButton(0xFFFF), mID(id), mbTriggerTarget(false), mpManager(NULL), mpListener(NULL) {
init();
}
virtual ~GUIComponent() {} // 0x08
#ifdef TIGUIMANAGER_IMPLEMENTATION
virtual u32 getID(); // 0x20
virtual bool isPointed(int point); // 0x24
#else
virtual u32 getID() { return mID; } // 0x20
virtual bool isPointed(int point) { return mbPointed[point]; } // 0x24
#endif
#if defined(TI_PC_KEYBOARD_IMPLEMENTATION) || defined(TIGUIMANAGER_IMPLEMENTATION)
virtual bool isDragging(int point); // 0x28
#else
virtual bool isDragging(int point) { return mbDragging[point]; } // 0x28
#endif
#ifdef TIGUIMANAGER_IMPLEMENTATION
virtual void setPointed(int point, bool bEnable); // 0x2C
#else
virtual void setPointed(int point, bool bEnable) { mbPointed[point] = bEnable; } // 0x2C
#endif
void onEvent(u32 event, void* data) {
if (mpListener) {
@@ -164,21 +124,6 @@ namespace textinput {
}
}
#ifdef TIGUIMANAGER_IMPLEMENTATION
virtual void onPointIn(int point); // 0x30
virtual void onPointOut(int point); // 0x34
virtual void onDrag(f32 x, f32 y);
virtual void onMove(int point, f32 x, f32 y); // 0x38
virtual void onTrig(int point, u32 trig, Vec& dragPos);
virtual void setDraggingButton(u32 dragBtn); // 0x3C
virtual u32 updatePointer(const GUIPointer& pointer); // 0x40
virtual u32 updatePointer(int point, f32 x, f32 y, u32 trig, u32 hold, u32 release); // 0x44
virtual bool isTriggerTarget(); // 0x48
#else
virtual void onPointIn(int point) { mFlightDuration[point] = 0; } // 0x30
virtual void onPointOut(int point) { mFlightDuration[point] = 0; } // 0x34
@@ -201,32 +146,15 @@ namespace textinput {
}
virtual bool isTriggerTarget() { return mbTriggerTarget; } // 0x48
#endif
#if defined(TI_PC_KEYBOARD_IMPLEMENTATION) || defined(TIGUIMANAGER_IMPLEMENTATION)
virtual void setTriggerTarget(bool bEnable); // 0x4C
#else
virtual void setTriggerTarget(bool bEnable) { mbTriggerTarget = bEnable; } // 0x4C
#endif
void setParentManager(GUIManager* manager) { mpManager = manager; }
GUIManager* getParentManager() { return mpManager; }
#ifdef TIGUIMANAGER_IMPLEMENTATION
virtual bool isVisible(); // 0x50
#else
virtual bool isVisible() { return true; } // 0x50
#endif
#if defined(TI_CANDIDATEBOX_IMPLEMENTATION) || defined(TIGUIMANAGER_IMPLEMENTATION)
virtual u16 getFlightDuration(int point); // 0x54
#else
virtual u16 getFlightDuration(int point) { return mFlightDuration[point]; } // 0x54
#endif
#if defined(TI_CELLPHONE_IMPLEMENTATION) || defined(TIGUIMANAGER_IMPLEMENTATION)
virtual void setFlightDuration(int point, u16 flightDir); // 0x58
#else
virtual u16 getFlightDuration(int point) { return mFlightDuration[point]; } // 0x54
virtual void setFlightDuration(int point, u16 flightDir) { mFlightDuration[point] = flightDir; } // 0x58
#endif
virtual bool contain(f32 x, f32 y) = 0; // 0x5C
@@ -272,16 +200,9 @@ namespace textinput {
virtual GUIComponent* getComponent(u32 id); // 0x24
virtual GUIComponent* getComponent(u32 id) const; // 0x28
#ifdef TIGUIMANAGER_IMPLEMENTATION
virtual bool update(int point, const KPADStatus* kpad, f32, f32, void* data); // 0x2C
#else
virtual bool update(int point, const KPADStatus* kpad, f32, f32, void* data) { return false; } // 0x2C
#endif
virtual bool update(int point, f32 x, f32 y, u32 trig, u32 hold, u32 release, void* data); // 0x30
#ifdef TIGUIMANAGER_IMPLEMENTATION
virtual void onEvent(GUIComponent& comp, u32 event, int point, void* data); // 0x34
#else
virtual void onEvent(GUIComponent& comp, u32 event, int point, void* data) { // 0x34
if (mpEventHandler) {
mpEventHandler->setLatestEventCtrlNo(point);
@@ -289,26 +210,17 @@ namespace textinput {
}
comp.onEvent(event, data);
}
#endif
virtual void setAllComponentTriggerTarget(bool bEnable); // 0x38
#ifdef TIGUIMANAGER_IMPLEMENTATION
virtual void setEventHandler(EventHandler* eventHandler); // 0x3C
#else
virtual void setEventHandler(EventHandler* eventHandler) { // 0x3C
mpEventHandler = eventHandler;
}
#endif
#if defined(TIGUIMANAGER_IMPLEMENTATION) || defined(MYTIINPUTFORM_IMPLEMENTATION)
virtual EventHandler* changeEventHandler(EventHandler* eventHandler); // 0x40
#else
virtual EventHandler* changeEventHandler(EventHandler* eventHandler) { // 0x40
EventHandler* prevHandler = mpEventHandler;
mpEventHandler = eventHandler;
return prevHandler;
}
#endif
virtual void setDraggingButton(u32 dragBtn); // 0x44
@@ -347,13 +259,8 @@ namespace textinput {
virtual PaneComponent* getPaneComponentByPane(nw4r::lyt::Pane* pane); // 0x4C
#ifdef TIGUIMANAGER_IMPLEMENTATION
virtual const nw4r::lyt::DrawInfo* getDrawInfo(); // 0x50
virtual void setDrawInfo(const nw4r::lyt::DrawInfo* drawInfo); // 0x54
#else
virtual const nw4r::lyt::DrawInfo* getDrawInfo() { return mpDrawInfo; } // 0x50
virtual void setDrawInfo(const nw4r::lyt::DrawInfo* drawInfo) { mpDrawInfo = drawInfo; } // 0x54
#endif
virtual void setAllBoundingBoxComponentTriggerTarget(bool bEnable); // 0x58
void walkInChildren(nw4r::lyt::PaneList& paneList);
@@ -395,11 +302,7 @@ namespace textinput {
virtual bool contain(f32 x, f32 y); // 0x5C
#ifdef TIGUIMANAGER_IMPLEMENTATION
virtual void setPane(nw4r::lyt::Pane* pane); // 0x60
#else
virtual void setPane(nw4r::lyt::Pane* pane) { mpPane = pane; } // 0x60
#endif
nw4r::lyt::Pane* getPane() { return mpPane; }
nw4r::lyt::TextBox* getTextPane() { return static_cast<nw4r::lyt::TextBox*>(mpPane); }

View File

@@ -66,9 +66,6 @@ public:
virtual void startToInput();
virtual void movePrevSignWindow();
virtual void moveNextSignWindow();
#ifdef TISIGNWINDOW_IMPLEMENTATION
virtual void vt_0x10C() = 0;
#endif
bool mbActive;
bool mbInput;

View File

@@ -84,20 +84,12 @@ namespace textinput {
Decolated(u16 maxLen) : StringBase(maxLen), field_0x18(0), field_0x1C(0), field_0x20(0), field_0x24(0) { initKanaConverter(); }
#endif
#ifdef TIMANAGER_IMPLEMENTATION
virtual ~Decolated();
enum TranslateMode { TM_Direct, TM_Kana, TM_Roman, TM_Hangul };
virtual void clear();
virtual void set(const wchar_t* string);
virtual void setLength(u16 length);
#elif defined(TIINPUTFORM_IMPLEMENTATION) || defined(TISTRING_IMPLEMENTATION) || defined(TIZISTRING_IMPLEMENTATION)
enum TranslateMode { TM_Direct, TM_Kana, TM_Roman, TM_Hangul };
virtual void setLength(u16 length);
virtual void clear();
virtual ~Decolated();
virtual void set(const wchar_t* string);
#endif
#if defined(TIINPUTFORM_IMPLEMENTATION) || defined(TIMANAGER_IMPLEMENTATION) || defined(TISTRING_IMPLEMENTATION) || defined(TIZISTRING_IMPLEMENTATION)
virtual ~Decolated();
enum TranslateMode { TM_Direct, TM_Kana, TM_Roman, TM_Hangul };
virtual void clear();
virtual void set(const wchar_t* string);
virtual void setLength(u16 length);
void setTranslateMode(TranslateMode mode);
TranslateMode getTranslateMode() const { return static_cast<TranslateMode>(mTranslateMode); }
void inputString(const wchar_t* string, TranslateMode mode);

View File

@@ -57,7 +57,7 @@ namespace textinput {
#ifdef TI_CELLPHONE_IMPLEMENTATION
struct ChangePredictMode;
#endif
#ifdef TIMANAGER_IMPLEMENTATION
#if defined(TIINPUTFORM_IMPLEMENTATION) || defined(TIMANAGER_IMPLEMENTATION)
CommandReceiver() { clearSender(); }
virtual ~CommandReceiver();
#endif
@@ -79,10 +79,6 @@ namespace textinput {
virtual void clearSender();
virtual void onCommand(INPUT_COMMAND command, void* data);
virtual void addSender(CommandSender* cmdSend);
#ifdef TIINPUTFORM_IMPLEMENTATION
CommandReceiver() { clearSender(); }
virtual ~CommandReceiver();
#endif
private:
nw4r::ut::List mSenderList; // 0x04

View File

@@ -102,12 +102,7 @@ namespace ipl {
static const char* getButtonName(int button) { return smButtonName[button]; }
#endif
#ifdef IPL_SD_CHANNEL_SELECT_CPP
void setEventHandler(::gui::EventHandler * event,
::gui::EventHandler * optOutEvent = NULL);
#else
void setEventHandler(::gui::EventHandler * event, ::gui::EventHandler * optOutEvent);
#endif
void setEventHandler(::gui::EventHandler * event);
void setText(const char* paneName, u32 msgId);
void setText(const char* paneName, const wchar_t* text);

View File

@@ -368,20 +368,20 @@ namespace nw4r {
u32 sheetOffsetsScratchSize;
dataBlockCount = font->hdr.dataBlocks; // 0x0E
sheetGlyphCount = font->glgr.inner.sheetGlyphCount; // 0x1C
dataBlockCount = font->hdr.dataBlocks; // 0x0E
// countName = font->glgr.inner.nameCount;
countSheet = font->glgr.inner.sheetCount;
// count0A = font->glgr.inner.smthCount_0x0a;
// count0C = font->glgr.inner.smthCount_0x0c;
sheetOffsetsSize = ROUNDUP(countSheet * sizeof(u16), 4);
sheetOffsetsScratch = (u16*)ROUNDDOWN((u32)((u8*)font + ctx->remWorkSpace()) - sheetOffsetsSize, 2);
stepSheetFlags = detail::CalcSizeFlagSet(countSheet);
flagsSheetsOff = detail::CalcOffsetSheetFlags(font->glgr.inner.nameCount, countSheet, font->glgr.inner.smthCount_0x0a,
font->glgr.inner.smthCount_0x0c);
flagsSheets = (const u32*)font + (flagsSheetsOff >> 2);
sheetOffsetsSize = ROUNDUP(countSheet * sizeof(u16), 4);
sheetOffsetsScratch = (u16*)ROUNDDOWN((u32)((u8*)font + ctx->remWorkSpace()) - sheetOffsetsSize, 2);
pGlgr = &font->glgr;
ENSURE_WORK_HAS_SIZE(ctx, glgrEnd - (u8*)font + sheetOffsetsSize);
// if (ctx->pWorkEnd - workCurr < fontSizeToEndOfGlgr + sheetOffsetsSize) {

View File

@@ -88,8 +88,8 @@ ziU32 Zi8MatchPUDdata_ZHS(ziWChar* pattern, ziU8 length, ziU8 language, ziWChar*
Zi8LogError(0x4F6, __zi8_work_data);
return 0;
}
ZI_WORK->unk_0x314 = (ziU16)section->count[0] * 0x100 + (ziU16)section->count[1];
ZI_WORK->unk_0x310 = (ziU32)table + ((ziU16)section->offset[0] << 8) + (ziU16)section->offset[1];
ZI_WORK->unk_0x314 = section->count[0] * 0x100 + section->count[1];
ZI_WORK->unk_0x310 = (ziU32)table + section->offset[0] * 0x100 + section->offset[1];
ZI_WORK->unk_0x318 = 0;
}
for (;;) {

View File

@@ -61,7 +61,7 @@ void Zi8_81483118(ziGetParam* param, ziU8* output) {
}
}
ziU32 Zi8_81483264(ziGetParam* param ZI_NEED_WORK) {
ziU32 Zi8_81483264(const ziGetParam* param ZI_NEED_WORK) {
ziU8 i;
if (param->scratch == ZI8_NULL) {
@@ -140,8 +140,7 @@ ziU32 Zi8_814834AC(ziGetParam* param, ziU16* remaining, ziU8* count,
j = 0;
filter.candidateIndex = 0;
matched = 0;
filter.keys.firstWord = 0;
filter.keys.bytes[4] = 0;
filter.keys.bytes[4] = filter.keys.firstWord = 0;
Zi8LogError(0x64, ZI_WORK);
if (param->elementCount == 0) {
if (*remaining >= *count) {
@@ -316,10 +315,10 @@ ziU32 Zi8GetKOcandidates(ziGetParam* param, ZiKoreanCandidateOptions* options ZI
Zi8LogError(100, ZI_WORK);
if (param->wordCharCount != 0) {
if (((search.keyIndex = Zi8_8148302C(param->currentWord[0], keyTable, ZI_WORK)) != 0xFFFF) &&
((((ZiKoreanKeyEntry*)(keyTable + search.keyIndex * 9))->keyBytes[4] & 8) != 0)) {
search.wordOffset = ((ZiKoreanKeyEntry*)(keyTable + search.keyIndex * 9))->childLow |
((((ZiKoreanKeyEntry*)(keyTable + search.keyIndex * 9))->keyBytes[4] & 3) << 16 |
((ZiKoreanKeyEntry*)(keyTable + search.keyIndex * 9))->childHigh << 8);
((((ZiKoreanKeyEntry*)(((search.keyIndex << 3) + search.keyIndex) + keyTable))->keyBytes[4] & 8) != 0)) {
search.wordOffset = ((ZiKoreanKeyEntry*)(((search.keyIndex << 3) + search.keyIndex) + keyTable))->childLow |
((((ZiKoreanKeyEntry*)(((search.keyIndex << 3) + search.keyIndex) + keyTable))->keyBytes[4] & 3) << 16 |
((ZiKoreanKeyEntry*)(((search.keyIndex << 3) + search.keyIndex) + keyTable))->childHigh << 8);
search.remainingLetters = param->wordCharCount - 1;
search.wordIndex = 1;
wordNode = search.wordTable + search.wordOffset;
@@ -343,8 +342,8 @@ match_word:
}
if (search.remainingLetters == 0) {
search.keyIndex = ((ziU16)*wordNode & 0x1F) << 8 | (ziU16)wordNode[1];
search.character = (ziU16)((ziU16)((ZiKoreanKeyEntry*)(keyTable + search.keyIndex * 9))->characterHigh << 8 |
((ZiKoreanKeyEntry*)(keyTable + search.keyIndex * 9))->characterLow);
search.character = (ziU16)((ziU16)((ZiKoreanKeyEntry*)(((search.keyIndex << 3) + search.keyIndex) + keyTable))->characterHigh << 8 |
((ZiKoreanKeyEntry*)(((search.keyIndex << 3) + search.keyIndex) + keyTable))->characterLow);
if (param->wordCharCount == 1) {
if (search.keyIndex == search.previousIndex) {
for (; (*wordNode & 0x40) == 0; wordNode = wordNode + 2) {
@@ -454,7 +453,7 @@ search_table:
do {
for (search.tableIndex = 0; search.tableIndex < search.tableCount; search.tableIndex = search.tableIndex + 1) {
search.matches = ZI8_TRUE;
search.entry = (ZiKoreanKeyEntry*)(keyTable + search.tableIndex * 9);
search.entry = (ZiKoreanKeyEntry*)(((search.tableIndex << 3) + search.tableIndex) + keyTable);
search.keyByte = 0;
if (1 < param->elementCount) {
for (search.keyByte = 0;
@@ -491,8 +490,8 @@ search_table:
if (++search.resultCount >= (ziS32)options->maxCount) return options->maxCount;
} else {
param->candidates[search.candidateCount++] =
(ziU16)((ziU16)((ZiKoreanKeyEntry*)(keyTable + search.tableIndex * 9))->characterHigh << 8 |
((ZiKoreanKeyEntry*)(keyTable + search.tableIndex * 9))->characterLow);
(ziU16)((ziU16)((ZiKoreanKeyEntry*)(((search.tableIndex << 3) + search.tableIndex) + keyTable))->characterHigh << 8 |
((ZiKoreanKeyEntry*)(((search.tableIndex << 3) + search.tableIndex) + keyTable))->characterLow);
if (++param->letters >= param->maxCandidates) return param->letters;
}
}

View File

@@ -43,7 +43,6 @@ ziBool Zi8PrepareMatch(ziGetParam* request, ziMatchParam* match, ziU8 skipMode Z
stroke = 0;
contextMask = 0x20;
Zi8Memset(match,0,0x1ee);
index = 0;
nibbles = 0;
elementIndex = 0;
elementCount = request->elementCount;
@@ -62,7 +61,6 @@ ziBool Zi8PrepareMatch(ziGetParam* request, ziMatchParam* match, ziU8 skipMode Z
match->comp = element = request->elements[0];
if (Zi8IsComponent(element,__zi8_work_data) != 0) {
elementIndex++;
nibbles = 1;
buffers.component = (ziU8*)Zi8GetTableAddress(1,2,__zi8_work_data);
buffers.componentIndex = (ziU8*)Zi8GetTableAddress(1,6,__zi8_work_data);
buffers.componentIndex += (element - 0xef10) * 2;

View File

@@ -283,12 +283,6 @@ void InputForm::create(MEMAllocator* allocator, inputform::EditBuffer* editBuffe
mpScrollButton->create(allocator, mpMultiArcResourceAccessor);
}
gui::EventHandler* gui::GUIManager::changeEventHandler(gui::EventHandler* eventHandler) {
EventHandler* prevHandler = mpEventHandler;
mpEventHandler = eventHandler;
return prevHandler;
}
void InputForm::createAnimation(MEMAllocator* allocator) {
for (u16 i = 0; i < 2; i++) {
const PaneAnimations& entry = csPaneToAnimation[i];

View File

@@ -7,7 +7,6 @@
#include <new>
namespace textinput {
namespace extend {
namespace memo {
@@ -113,19 +112,19 @@ namespace textinput {
namespace extend {
namespace memo {
DispMemoState sDispMemoState;
EditMemoState sEditMemoState;
AppearMemoState sAppearMemoState;
DisappearMemoState sDisappearMemoState;
static DispMemoState sDispMemoState;
static EditMemoState sEditMemoState;
static AppearMemoState sAppearMemoState;
static DisappearMemoState sDisappearMemoState;
struct MemoPosition {
f32 x;
f32 y;
};
MemoPosition sHiddenMemoPosition = {-200.0f, 0.0f};
MemoPosition sAppearingMemoPosition = {0.0f, 255.0f};
MemoPosition sLetterMemoPosition = {0.0f, 145.0f};
static MemoPosition sHiddenMemoPosition = {-200.0f, 0.0f};
static MemoPosition sAppearingMemoPosition = {0.0f, 255.0f};
static MemoPosition sLetterMemoPosition = {0.0f, 145.0f};
Manager::~Manager() {
if (mpDefaultPCKeyboard != NULL) {
@@ -1228,7 +1227,7 @@ Manager::StateType EditMemoState::getStateType() {
return Manager::ST_Visible;
}
State::~State() {}
inline State::~State() {}
Manager::StateType AppearMemoState::getStateType() {
return Manager::ST_Appearing;
@@ -1240,9 +1239,6 @@ Manager::StateType DispMemoState::getStateType() {
return Manager::ST_Hidden;
}
extern const f32 sZeroScale;
const f32 sZeroScale = 0.0f;
}
}
}

View File

@@ -407,21 +407,20 @@ namespace textinput {
for (u16 i = 0; i < ARRAY_LENGTH(scCandidatePaneData.panes); i++) {
pane = NULL;
const PaneToAnimation& p = scCandidatePaneData.panes[i];
const char* paneName = p.paneName;
switch (p.type) {
case KT_ScrollButton: {
void* pBtnBuf = MEMAllocFromAllocator(allocator, sizeof(CandidateScrollAnmPane));
pane = new (pBtnBuf) CandidateScrollAnmPane(getPane(paneName), NULL);
pane = new (pBtnBuf) CandidateScrollAnmPane(getPane(p.paneName), NULL);
break;
}
case KT_CandidateText: {
void* pBtnBuf = MEMAllocFromAllocator(allocator, sizeof(CandidateTextAnmPane));
pane = new (pBtnBuf) CandidateTextAnmPane(getPane(paneName), NULL);
pane = new (pBtnBuf) CandidateTextAnmPane(getPane(p.paneName), NULL);
break;
}
case KT_OnOffButton: {
void* pBtnBuf = MEMAllocFromAllocator(allocator, sizeof(OnOffAnmPane));
pane = new (pBtnBuf) OnOffAnmPane(getPane(paneName), &mOnOffButton);
pane = new (pBtnBuf) OnOffAnmPane(getPane(p.paneName), &mOnOffButton);
break;
}
@@ -1784,8 +1783,4 @@ namespace textinput {
}
} // namespace candidatebox
namespace gui {
u16 GUIComponent::getFlightDuration(int point) { return mFlightDuration[point]; }
}
} // namespace textinput

View File

@@ -1434,8 +1434,4 @@ namespace textinput {
}
}
namespace gui {
void GUIComponent::setFlightDuration(int point, u16 flightDir) { mFlightDuration[point] = flightDir; }
}
}

View File

@@ -1,4 +1,3 @@
#define TIGUIMANAGER_IMPLEMENTATION
#include "keyboard/tiGUIManager.h"
#include "keyboard/tiUtil.h"
@@ -89,20 +88,6 @@ namespace textinput {
return event;
}
bool GUIComponent::isVisible() { return true; }
bool GUIComponent::isPointed(int point) { return mbPointed[point]; }
void GUIComponent::onMove(int point, f32 x, f32 y) { mFlightDuration[point]++; }
void GUIComponent::setPointed(int point, bool bEnable) { mbPointed[point] = bEnable; }
void GUIComponent::onPointIn(int point) { mFlightDuration[point] = 0; }
void GUIComponent::onPointOut(int point) { mFlightDuration[point] = 0; }
void GUIComponent::onDrag(f32 x, f32 y) {}
GUIManager::~GUIManager() {
IDToComponent* p = static_cast<IDToComponent*>(nw4r::ut::List_GetFirst(&mComponents));
while (p != NULL) {
@@ -140,8 +125,6 @@ namespace textinput {
}
}
u32 GUIComponent::getID() { return mID; }
GUIComponent* GUIManager::getComponent(u32 id) {
IDToComponent* p = static_cast<IDToComponent*>(nw4r::ut::List_GetNth(&mComponents, (u16)id));
return p->mpComponent;
@@ -209,29 +192,6 @@ namespace textinput {
return touched;
}
u32 GUIComponent::updatePointer(int point, f32 x, f32 y, u32 trig, u32 hold, u32 release) {
GUIPointer pointer(point, x, y, hold, trig, release);
return updatePointerImpl(pointer);
}
void GUIManager::onEvent(GUIComponent& comp, u32 event, int point, void* data) {
if (mpEventHandler) {
mpEventHandler->setLatestEventCtrlNo(point);
mpEventHandler->onEvent(comp, event, data);
}
comp.onEvent(event, data);
}
bool GUIComponent::isTriggerTarget() { return mbTriggerTarget; }
void GUIComponent::onTrig(int point, u32 trig, Vec& dragPos) {
if (trig & mDraggingButton) {
mDraggingPos[point] = dragPos;
mbDragging[point] = true;
mFlightDuration[point] = 0;
}
}
void GUIManager::calc() {
for (IDToComponent* p = static_cast<IDToComponent*>(nw4r::ut::List_GetFirst(&mComponents)); p != NULL;
p = static_cast<IDToComponent*>(nw4r::ut::List_GetNext(&mComponents, p))) {
@@ -260,8 +220,6 @@ namespace textinput {
}
}
void GUIComponent::setDraggingButton(u32 dragBtn) { mDraggingButton = dragBtn; }
PaneManager::~PaneManager() {
PaneToComponent* p = static_cast<PaneToComponent*>(nw4r::ut::List_GetFirst(&mPaneComponents));
while (p) {
@@ -285,8 +243,6 @@ namespace textinput {
PaneComponent::~PaneComponent() {}
GUIComponent::~GUIComponent() {}
void PaneManager::createLayoutScene(const nw4r::lyt::Layout& layout) {
mIDCounter = 0;
walkInChildren(layout.GetRootPane()->GetChildList());
@@ -332,8 +288,6 @@ namespace textinput {
addComponent(pComponent);
}
void PaneComponent::setPane(nw4r::lyt::Pane* pane) { mpPane = pane; }
PaneComponent* PaneManager::searchPaneComponent(const char* name) {
for (u32 i = 0; i < nw4r::ut::List_GetSize(&mPaneComponents); i++) {
PaneToComponent* p = static_cast<PaneToComponent*>(nw4r::ut::List_GetNth(&mPaneComponents, (u16)i));
@@ -392,8 +346,6 @@ namespace textinput {
}
}
const nw4r::lyt::DrawInfo* PaneManager::getDrawInfo() { return mpDrawInfo; }
#pragma push
#pragma section sconst_type ".sdata2"
extern "C" const f32 scGuiZeroF = 0.0f;
@@ -537,11 +489,5 @@ namespace textinput {
}
return true;
}
u32 GUIComponent::updatePointer(const GUIPointer& pointer) { return updatePointerImpl(pointer); }
void GUIManager::setEventHandler(EventHandler* eventHandler) { mpEventHandler = eventHandler; }
bool GUIManager::update(int point, const KPADStatus* kpad, f32 x, f32 y, void* data) { return false; }
} // namespace gui
} // namespace textinput

View File

@@ -155,30 +155,6 @@ extern "C" const char scN_KOR[];
extern "C" const char scN_CHN[];
#pragma pop
extern "C" const f32 scInputFormZeroF;
extern "C" const f32 scInputForm640F;
extern "C" const f64 scInputFormF32ConvertMagic;
extern "C" const f32 scInputFormOneF;
extern "C" const f32 scInputFormHalfF;
extern "C" const f32 scInputFormDegToFIdxF;
extern "C" const f32 scInputForm150F;
extern "C" const f32 scInputForm30F;
extern "C" const f32 scInputForm50F;
extern "C" const f32 scInputForm10F;
extern "C" const f32 scInputForm52F;
extern "C" const f32 scInputFormTwoF;
extern "C" const f32 scInputForm140F;
extern "C" const f32 scInputForm90F;
extern "C" const f32 scInputForm253F;
extern "C" const f32 scInputForm20F;
extern "C" const u8 scInputFormColorRU8;
extern "C" const u8 scInputFormColorGU8;
extern "C" const u8 scInputFormColorBU8;
extern "C" const u8 scInputFormColorAU8;
extern "C" const f32 scInputForm255F;
extern "C" const f32 scInputForm127F;
extern "C" const f32 scInputForm14592F;
extern "C" const f64 scInputFormF64ConvertMagic;
extern "C" const f32 scInputForm15F;
extern "C" void _savegpr_20();
extern "C" void _restgpr_20();
extern "C" void _savegpr_27();
@@ -410,6 +386,31 @@ extern "C" const wchar_t pppURLCheck[2][10] = {L"http://", L"https://"};
#pragma pop
extern "C" const f32 scInputFormZeroF = 0.0f;
extern "C" const f32 scInputForm640F = 640.0f;
extern "C" const f64 scInputFormF32ConvertMagic = 4503601774854144.0;
extern "C" const f32 scInputFormOneF = 1.0f;
extern "C" const f32 scInputFormHalfF = 0.5f;
extern "C" const f32 scInputFormDegToFIdxF = 0.7111111f;
extern "C" const f32 scInputForm150F = 150.0f;
extern "C" const f32 scInputForm30F = 30.0f;
extern "C" const f32 scInputForm50F = 50.0f;
extern "C" const f32 scInputForm10F = 10.0f;
extern "C" const f32 scInputForm52F = 52.0f;
extern "C" const f32 scInputFormTwoF = 2.0f;
extern "C" const f32 scInputForm140F = 140.0f;
extern "C" const f32 scInputForm90F = 90.0f;
extern "C" const f32 scInputForm253F = 253.0f;
extern "C" const f32 scInputForm20F = 20.0f;
extern "C" const u8 scInputFormColorRU8 = 0xff;
extern "C" const u8 scInputFormColorGU8 = 0x32;
extern "C" const u8 scInputFormColorBU8 = 0x32;
extern "C" const u8 scInputFormColorAU8 = 0;
extern "C" const f32 scInputForm255F = 255.0f;
extern "C" const f32 scInputForm127F = 127.0f;
extern "C" const f32 scInputForm14592F = 14592.0f;
extern "C" const f64 scInputFormF64ConvertMagic = 4503599627370496.0;
extern "C" const f32 scInputForm15F = 15.0f;
f32 sfColorPhase;
bool mbHyphen = true;
@@ -1168,7 +1169,7 @@ void LayoutByNW4R::create(MEMAllocator* allocator, EditBuffer* editBuffer) {
setVisible("N_2line", true);
mpPaneManager->setAllComponentTriggerTarget(false);
mpPaneManager->setAllBoundingBoxComponentTriggerTarget(true);
nw4r::lyt::Pane* pane = mpLayout->GetRootPane()->FindPaneByName(static_cast<const LanguagePaneData*>(mpLanguageData)->textBox, true);
nw4r::lyt::Pane* pane = getPane(static_cast<const LanguagePaneData*>(mpLanguageData)->textBox);
if (!pane) pane = mpLayout->GetRootPane()->FindPaneByName(getLanguageTextPane() ? static_cast<const LanguagePaneData*>(mpLanguageData)->textBox : "T_2l_TextBox", true);
mpPaneManager->getPaneComponentByPane(pane)->setTriggerTarget(true);
for (u32 buttonIndex = 0; buttonIndex < 2; ++buttonIndex) {
@@ -1182,13 +1183,15 @@ void LayoutByNW4R::create(MEMAllocator* allocator, EditBuffer* editBuffer) {
}
}
nw4r::ut::List_Append(&mAnmPanes, animationPane);
u32 count;
const char* bindingName = button.bindingName;
u32 count = button.count;
count = button.count;
for (u16 animationIndex = 0; animationIndex < count; ++animationIndex) {
void* resource = mpMultiArcResourceAccessor->GetResource(0, button.files[animationIndex]->fileName, NULL);
const InputFormAnimationFile* file = button.files[animationIndex];
void* resource = mpMultiArcResourceAccessor->GetResource(0, file->fileName, NULL);
AnimTransformPane* transform = static_cast<AnimTransformPane*>(getLayout()->CreateAnimTransform(resource, mpMultiArcResourceAccessor));
if (!bindingName) animationPane->addAnimation(allocator, button.files[animationIndex]->id, transform, false, true);
else animationPane->forceAddAnimation(allocator, button.files[animationIndex]->id, transform, bindingName, false, true);
if (!bindingName) animationPane->addAnimation(allocator, file->id, transform, false, true);
else animationPane->forceAddAnimation(allocator, file->id, transform, bindingName, false, true);
}
}
init();
@@ -1233,7 +1236,7 @@ void LayoutByNW4R::calc() {
if (getPane(separator)) setVisible(static_cast<const LanguagePaneData*>(mpLanguageData)->separator, mbRepeat);
else setVisible("N_separateBarAll", mbRepeat);
if (!mScrollAnm.isActive()) {
if (inputform::scInputFormZeroF > mfScrollY) up = true;
if (0.0f > mfScrollY) up = true;
if (mfMinScrollY < mfScrollY) down = true;
if (mbUpVisible != up) {
mbUpVisible = up;
@@ -1351,12 +1354,12 @@ void EventHandler::onTiEvent(gui::PaneComponent* component, u32 event, Input* in
util::replaceChar(animationName, 17, name, 0, 'P');
if (event == 4 && (input->trigger & 0x800) && !mpInputForm->isInScroll()) {
if (mpInputForm->isAbleToUp() && util::strcmp("P_txtScrll_UP", animationName)) {
textdrawer::Base::CursorPos movement = {0, 0, 0};
textdrawer::Base::CursorPos movement = {0, 0.0f, 0.0f};
movement.fCursorY = mpInputForm->getLineHeight();
mpInputForm->onCommand(static_cast<CommandReceiver::INPUT_COMMAND>(24), &movement);
mpInputForm->searchAnmPane(animationName)->onAnmEvent(nw4rmanager::AnmPane::PE_0);
} else if (mpInputForm->isAbleToDown() && util::strcmp("P_txtScrll_DOWN", animationName)) {
textdrawer::Base::CursorPos movement = {0, 0, 0};
textdrawer::Base::CursorPos movement = {0, 0.0f, 0.0f};
movement.fCursorY = -mpInputForm->getLineHeight();
mpInputForm->onCommand(static_cast<CommandReceiver::INPUT_COMMAND>(24), &movement);
mpInputForm->searchAnmPane(animationName)->onAnmEvent(nw4rmanager::AnmPane::PE_0);
@@ -1367,7 +1370,7 @@ void EventHandler::onTiEvent(gui::PaneComponent* component, u32 event, Input* in
if (component->isDragging(input->controller)) {
u32 duration = mpInputForm->getFlightDuration(input->controller, name);
if (duration >= 60 && duration % 20 == 0) {
textdrawer::Base::CursorPos movement = {0, 0, 0};
textdrawer::Base::CursorPos movement = {0, 0.0f, 0.0f};
movement.fCursorY = mpInputForm->getLineHeight();
mpInputForm->onCommand(static_cast<CommandReceiver::INPUT_COMMAND>(24), &movement);
mpInputForm->searchAnmPane(animationName)->onAnmEvent(nw4rmanager::AnmPane::PE_0);
@@ -1377,7 +1380,7 @@ void EventHandler::onTiEvent(gui::PaneComponent* component, u32 event, Input* in
if (component->isDragging(input->controller)) {
u32 duration = mpInputForm->getFlightDuration(input->controller, name);
if (duration >= 60 && duration % 20 == 0) {
textdrawer::Base::CursorPos movement = {0, 0, 0};
textdrawer::Base::CursorPos movement = {0, 0.0f, 0.0f};
movement.fCursorY = -mpInputForm->getLineHeight();
mpInputForm->onCommand(static_cast<CommandReceiver::INPUT_COMMAND>(24), &movement);
mpInputForm->searchAnmPane(animationName)->onAnmEvent(nw4rmanager::AnmPane::PE_0);
@@ -1521,14 +1524,14 @@ void Base::autoScroll() {
if (mScrollAnm.isActive()) return;
if (u32(meScrollFlag - SF_ScrollOn) > 1) return;
f32 cursorY = mfCursorY + getLineHeight() / 2.0f;
if (cursorY < inputform::scInputFormZeroF) {
s32 lines = s32(cursorY / getLineHeight() - inputform::scInputFormOneF);
mScrollAnm.startAnm(mfScrollY, mfScrollY - lines * getLineHeight(), inputform::scInputForm15F, NULL, NULL);
if (cursorY < 0.0f) {
s32 lines = s32(cursorY / getLineHeight() - 1.0f);
mScrollAnm.startAnm(mfScrollY, mfScrollY - lines * getLineHeight(), 15.0f, NULL, NULL);
onSE(static_cast<sound::SE>(11));
}
if (cursorY >= (mRect.top - mRect.bottom) * getScale().y) {
s32 lines = s32((cursorY - (mRect.top - mRect.bottom) * getScale().y) / getLineHeight()) + 1;
mScrollAnm.startAnm(mfScrollY, mfScrollY - lines * getLineHeight(), inputform::scInputForm15F, NULL, NULL);
mScrollAnm.startAnm(mfScrollY, mfScrollY - lines * getLineHeight(), 15.0f, NULL, NULL);
onSE(static_cast<sound::SE>(11));
}
meScrollFlag = SF_NoScroll;
@@ -1540,7 +1543,7 @@ void textinput::util::Animation::startAnm(f32 start, f32 end, f32 duration, Anim
mfStartPoint = start;
mfEndPoint = end;
mfAnimationTime = duration;
mfCurrentFrame = inputform::scInputFormZeroF;
mfCurrentFrame = 0.0f;
mbInAnimation = true;
mpAnimObserver = observer;
mpData = data;
@@ -1568,12 +1571,12 @@ inline void DeadKeyStream::init() {
void Base::init() {
meInputMode = IM_Direct;
mfCursorX = scInputFormZeroF;
mfCursorY = scInputFormZeroF;
mfScrollX = scInputFormZeroF;
mfScrollY = scInputFormZeroF;
mfSustainTimer = scInputFormZeroF;
mfCursorTimer = scInputFormZeroF;
mfCursorX = 0.0f;
mfCursorY = 0.0f;
mfScrollX = 0.0f;
mfScrollY = 0.0f;
mfSustainTimer = 0.0f;
mfCursorTimer = 0.0f;
muGlobalAlpha = 255;
mDKStream.init();
SetFixedWidth(GetFont()->GetWidth());
@@ -1764,16 +1767,16 @@ void Base::updateCandidateState_() {
void Base::moveCursorUp() {
f32 y = mfCursorY;
if (-(mfCursorY - mfScrollY) >= scInputFormZeroF) {
if (-(mfCursorY - mfScrollY) >= 0.0f) {
u32 start, end;
mpString->getCursorPos(&start, &end);
if (start == 0 && end == 0) onSE(static_cast<sound::SE>(6));
else onSE(static_cast<sound::SE>(5));
mpString->setCursorPos(0);
} else {
y = mfCursorY >= scInputFormZeroF ? mfCursorY : scInputFormZeroF;
y = mfCursorY >= 0.0f ? mfCursorY : 0.0f;
f32 lineHeight = getLineHeight();
f32 targetY = scInputFormOneF + (y - lineHeight);
f32 targetY = 1.0f + (y - lineHeight);
u32 position = calcCursorPos(mfCursorX, targetY);
mpString->setCursorPos(position);
onSE(static_cast<sound::SE>(5));
@@ -1791,7 +1794,7 @@ void Base::moveCursorDown() {
} else {
f32 lineHeight = getLineHeight();
f32 y = mfCursorY + lineHeight;
mpString->setCursorPos(calcCursorPos(mfCursorX, scInputFormOneF + y));
mpString->setCursorPos(calcCursorPos(mfCursorX, 1.0f + y));
onSE(static_cast<sound::SE>(5));
}
meScrollFlag = SF_ScrollOn;
@@ -2416,8 +2419,8 @@ void Base::onPressRight() {
meScrollFlag = SF_ScrollOn;
}
inline f32 nextColorPhase(f32 phase) { phase += scInputFormTwoF; return phase; }
inline f32 colorSine(f32 phase) { return nw4r::math::SinFIdx(inputform::scInputFormDegToFIdxF * phase); }
inline f32 nextColorPhase(f32 phase) { phase += 2.0f; return phase; }
inline f32 colorSine(f32 phase) { return nw4r::math::SinFIdx(phase * 0.7111111f); }
void Base::calc() {
if (mScrollAnm.isActive()) {
f32 scroll = mScrollAnm.getValue();
@@ -2425,28 +2428,28 @@ void Base::calc() {
mfDrawScrollY = mfScrollY;
}
if (!mScrollAnm.isActive()) autoScroll();
if (!mpString->isOnSustain()) mfSustainTimer = inputform::scInputFormOneF + mfSustainTimer;
if (!mpString->isOnSustain()) mfSustainTimer = 1.0f + mfSustainTimer;
mScrollAnm.calc();
f32 wave = colorSine(sfColorPhase);
mSelectedColor.r = 2;
mSelectedColor.g = 90;
mSelectedColor.b = 253;
mSelectedColor.a = static_cast<u8>(inputform::scInputForm150F + inputform::scInputForm30F * wave);
mSelectedColor.a = static_cast<u8>(150.0f + 30.0f * wave);
if (mpString->isOnSustain()) {
mSelectedColor.r = 52;
mSelectedColor.g = 140;
mSelectedColor.b = 253;
mSelectedColor.a = static_cast<u8>(inputform::scInputForm50F + inputform::scInputForm10F * wave);
} else if (mfSustainTimer <= inputform::scInputForm50F) {
mSelectedColor.r = static_cast<u8>(util::hermiteInterporation(mfSustainTimer, inputform::scInputFormZeroF, inputform::scInputForm52F, inputform::scInputFormZeroF, inputform::scInputForm50F, inputform::scInputFormTwoF, inputform::scInputFormZeroF));
mSelectedColor.g = static_cast<u8>(util::hermiteInterporation(mfSustainTimer, inputform::scInputFormZeroF, inputform::scInputForm140F, inputform::scInputFormZeroF, inputform::scInputForm50F, inputform::scInputForm90F, inputform::scInputFormZeroF));
u8 blue = static_cast<u8>(util::hermiteInterporation(mfSustainTimer, inputform::scInputFormZeroF, inputform::scInputForm253F, inputform::scInputFormZeroF, inputform::scInputForm50F, inputform::scInputForm253F, inputform::scInputFormZeroF));
mSelectedColor.a = static_cast<u8>(50.0f + 10.0f * wave);
} else if (mfSustainTimer <= 50.0f) {
mSelectedColor.r = static_cast<u8>(util::hermiteInterporation(mfSustainTimer, 0.0f, 52.0f, 0.0f, 50.0f, 2.0f, 0.0f));
mSelectedColor.g = static_cast<u8>(util::hermiteInterporation(mfSustainTimer, 0.0f, 140.0f, 0.0f, 50.0f, 90.0f, 0.0f));
u8 blue = static_cast<u8>(util::hermiteInterporation(mfSustainTimer, 0.0f, 253.0f, 0.0f, 50.0f, 253.0f, 0.0f));
f32 phase = sfColorPhase;
f32 angle = inputform::scInputFormDegToFIdxF * phase;
f32 angle = phase * 0.7111111f;
mSelectedColor.b = blue;
wave = nw4r::math::SinFIdx(angle);
f32 alpha = util::hermiteInterporation(mfSustainTimer, inputform::scInputFormZeroF, inputform::scInputForm50F, inputform::scInputFormZeroF, inputform::scInputForm50F, inputform::scInputForm150F, inputform::scInputFormZeroF);
mSelectedColor.a = static_cast<u8>(alpha + inputform::scInputForm20F * wave);
f32 alpha = util::hermiteInterporation(mfSustainTimer, 0.0f, 50.0f, 0.0f, 50.0f, 150.0f, 0.0f);
mSelectedColor.a = static_cast<u8>(alpha + 20.0f * wave);
}
u32 cursorTimer = muCursorTimer + 8;
f32 phase = sfColorPhase;
@@ -2462,9 +2465,9 @@ Base::~Base() {}
Base::Base(Manager* manager) : CommandReceiver(), textdrawer::Base(), candidatebox::CandidateBoxCaller(),
mpString(NULL), mpUnfixString(NULL), mpZiString(NULL), meInputMode(IM_Direct), mePredictMode(PM_USEn),
mbPredictOn(false), mbDoWordWrap(true), mbRightWithSpace(true), mfCursorX(inputform::scInputFormZeroF), mfCursorY(inputform::scInputFormZeroF),
mfScrollX(inputform::scInputFormZeroF), mfScrollY(inputform::scInputFormZeroF), mScrollAnm(), mfSustainTimer(inputform::scInputFormZeroF), meScrollFlag(SF_NoScroll),
muWordWrapCounter(0), muLimitStringLength(1024), muLimitRowNum(9999), mfCursorTimer(inputform::scInputFormZeroF), muGlobalAlpha(255),
mbPredictOn(false), mbDoWordWrap(true), mbRightWithSpace(true), mfCursorX(0.0f), mfCursorY(0.0f),
mfScrollX(0.0f), mfScrollY(0.0f), mScrollAnm(), mfSustainTimer(0.0f), meScrollFlag(SF_NoScroll),
muWordWrapCounter(0), muLimitStringLength(1024), muLimitRowNum(9999), mfCursorTimer(0.0f), muGlobalAlpha(255),
mCharColor(0xffffffff), mpAllocator(NULL), mpManager(manager), mDKStream(), meLanguage(USA),
mbZuSelected(false), mbCursorSelected(false), mriManager(muLimitStringLength), mpCursorLine(NULL),
mCursorLinePos(0), mbLineDraw(true), muSpecifyLineDrawCount(0), muCursorTimer(0) {
@@ -2595,7 +2598,7 @@ namespace inputform {
}
f32 textinput::util::Animation::getValue() {
return hermiteInterporation(mfCurrentFrame, inputform::scInputFormZeroF, mfStartPoint, inputform::scInputFormZeroF, mfAnimationTime, mfEndPoint, inputform::scInputFormZeroF);
return hermiteInterporation(mfCurrentFrame, 0.0f, mfStartPoint, 0.0f, mfAnimationTime, mfEndPoint, 0.0f);
}
namespace inputform {
@@ -2645,7 +2648,7 @@ namespace inputform {
void textinput::util::Animation::calc() {
if (mbInAnimation) {
if (mfCurrentFrame < mfAnimationTime) {
mfCurrentFrame = inputform::scInputFormOneF + mfCurrentFrame;
mfCurrentFrame = 1.0f + mfCurrentFrame;
} else {
if (mbInAnimation && mpAnimObserver) {
mpAnimObserver->onAnmEvent(AnimObserver::AE_1, mpData);
@@ -2833,9 +2836,9 @@ void gui::GUIComponent::init() {
if (mbInitialize) return;
for (int point = 0; point < GUI_POINTS_MAX; ++point) {
mbPointed[point] = false;
mDraggingPos[point].x = inputform::scInputFormZeroF;
mDraggingPos[point].y = inputform::scInputFormZeroF;
mDraggingPos[point].z = inputform::scInputFormZeroF;
mDraggingPos[point].x = 0.0f;
mDraggingPos[point].y = 0.0f;
mDraggingPos[point].z = 0.0f;
mbDragging[point] = false;
mFlightDuration[point] = 0;
}
@@ -2949,10 +2952,10 @@ u32 Base::isOverRowLimit(u32 limit, const wchar_t* string) {
mpString->getCursorPos(&cursorStart, &cursorEnd);
for (;;) {
DrawInfo info;
info.rect.left = scInputFormZeroF;
info.rect.top = scInputFormZeroF;
info.rect.right = scInputFormZeroF;
info.rect.bottom = scInputFormZeroF;
info.rect.left = 0.0f;
info.rect.top = 0.0f;
info.rect.right = 0.0f;
info.rect.bottom = 0.0f;
kana = false;
if (meLanguage == KR && !kanaHandled && cursorStart == pos) {
kanaHandled = true;
@@ -3040,10 +3043,10 @@ bool Base::onCursor(CursorPos* cursor) {
}
if (*predicted == 0xFFFE) SetTextColor(csZiStringColorLeft);
DrawInfo glyph;
glyph.rect.left = scInputFormZeroF;
glyph.rect.top = scInputFormZeroF;
glyph.rect.right = scInputFormZeroF;
glyph.rect.bottom = scInputFormZeroF;
glyph.rect.left = 0.0f;
glyph.rect.top = 0.0f;
glyph.rect.right = 0.0f;
glyph.rect.bottom = 0.0f;
glyph.character = *predicted;
calcRect(glyph);
f32 width = glyph.rect.GetWidth();
@@ -3059,10 +3062,10 @@ bool Base::onCursor(CursorPos* cursor) {
}
if (meDestination == DST_JP && candidate) {
DrawInfo glyph;
glyph.rect.left = scInputFormZeroF;
glyph.rect.top = scInputFormZeroF;
glyph.rect.right = scInputFormZeroF;
glyph.rect.bottom = scInputFormZeroF;
glyph.rect.left = 0.0f;
glyph.rect.top = 0.0f;
glyph.rect.right = 0.0f;
glyph.rect.bottom = 0.0f;
glyph.character = candidate;
calcRect(glyph);
f32 left = glyph.rect.left + GetCursorX();
@@ -3070,7 +3073,7 @@ bool Base::onCursor(CursorPos* cursor) {
f32 right = glyph.rect.right + GetCursorX();
f32 bottomEdge = GetCursorY() + GetFontHeight();
candidateBackground.a = muGlobalAlpha;
debug::drawBox_(left, top, right, bottomEdge, scInputFormZeroF, scInputFormOneF, candidateBackground);
debug::drawBox_(left, top, right, bottomEdge, 0.0f, 1.0f, candidateBackground);
SetupGX();
SetTextColor(mCharColor);
switch (candidate) {
@@ -3078,19 +3081,19 @@ bool Base::onCursor(CursorPos* cursor) {
case 0x3000: {
DrawInfo space;
DrawInfo marker;
space.rect.left = scInputFormZeroF;
space.rect.top = scInputFormZeroF;
space.rect.right = scInputFormZeroF;
space.rect.bottom = scInputFormZeroF;
marker.rect.left = scInputFormZeroF;
marker.rect.top = scInputFormZeroF;
marker.rect.right = scInputFormZeroF;
marker.rect.bottom = scInputFormZeroF;
space.rect.left = 0.0f;
space.rect.top = 0.0f;
space.rect.right = 0.0f;
space.rect.bottom = 0.0f;
marker.rect.left = 0.0f;
marker.rect.top = 0.0f;
marker.rect.right = 0.0f;
marker.rect.bottom = 0.0f;
space.character = candidate;
marker.character = 0xE057;
calcRect(space);
calcRect(marker);
f32 offset = ((space.rect.GetWidth() - marker.rect.GetWidth()) / scInputFormTwoF) * getScale().x;
f32 offset = ((space.rect.GetWidth() - marker.rect.GetWidth()) / 2.0f) * getScale().x;
MoveCursorX(offset);
Print(0xE057);
MoveCursorX(offset);
@@ -3118,10 +3121,10 @@ bool Base::onCursor(CursorPos* cursor) {
wchar_t character = *kana;
if (mbPredictOn) character = util::HankakuToZenkaku(character);
DrawInfo glyph;
glyph.rect.left = scInputFormZeroF;
glyph.rect.top = scInputFormZeroF;
glyph.rect.right = scInputFormZeroF;
glyph.rect.bottom = scInputFormZeroF;
glyph.rect.left = 0.0f;
glyph.rect.top = 0.0f;
glyph.rect.right = 0.0f;
glyph.rect.bottom = 0.0f;
glyph.character = character;
calcRect(glyph);
if (meLanguage == JP) {
@@ -3130,7 +3133,7 @@ bool Base::onCursor(CursorPos* cursor) {
f32 right = glyph.rect.right + GetCursorX();
f32 bottomEdge = GetCursorY() + GetFontHeight();
kanaBackground.a = muGlobalAlpha;
debug::drawBox_(left, top, right, bottomEdge, scInputFormZeroF, scInputFormOneF, kanaBackground);
debug::drawBox_(left, top, right, bottomEdge, 0.0f, 1.0f, kanaBackground);
SetupGX();
mCharColor.a = muGlobalAlpha;
SetTextColor(mCharColor);
@@ -3159,7 +3162,7 @@ u32 Base::calcCursorPos(f32 x, f32 y) {
const wchar_t* string = mpString->getWCString();
if (!*string) return 0;
cursorX = getScale().x;
lineTop = scInputFormZeroF;
lineTop = 0.0f;
lineBottom = lineTop;
nw4r::math::VEC2 scale = getScale();
u32 pos = 0;
@@ -3167,10 +3170,10 @@ u32 Base::calcCursorPos(f32 x, f32 y) {
mbHyphen = false;
while (*string) {
DrawInfo info;
info.rect.left = scInputFormZeroF;
info.rect.top = scInputFormZeroF;
info.rect.right = scInputFormZeroF;
info.rect.bottom = scInputFormZeroF;
info.rect.left = 0.0f;
info.rect.top = 0.0f;
info.rect.right = 0.0f;
info.rect.bottom = 0.0f;
info.character = *string;
calcRect(info);
lineBottom = lineTop + scale.y * (info.rect.bottom - info.rect.top);
@@ -3201,7 +3204,7 @@ u32 Base::calcCursorPos(f32 x, f32 y) {
if (!string[1] && localY >= lineTop && localY <= lineBottom) return pos + 1;
} else {
if (x >= cursorX && x < right && localY >= lineTop && localY < lineBottom) {
if (cursorX + scInputFormHalfF * (right - cursorX) > x) return pos;
if (cursorX + 0.5f * (right - cursorX) > x) return pos;
return pos + 1;
}
cursorX += scale.x * (info.rect.right - info.rect.left);
@@ -3210,17 +3213,17 @@ u32 Base::calcCursorPos(f32 x, f32 y) {
++pos;
if (!*string && localY >= lineTop && localY <= lineBottom) return pos;
}
if (lineTop + (lineBottom - lineTop) * scInputFormHalfF <= localY) {
return Base::calcCursorPos(x, scInputFormOneF + lineTop + mfScrollY);
if (lineTop + (lineBottom - lineTop) * 0.5f <= localY) {
return Base::calcCursorPos(x, 1.0f + lineTop + mfScrollY);
}
return Base::calcCursorPos(x, scInputFormOneF);
return Base::calcCursorPos(x, 1.0f);
}
nw4r::math::VEC2 Base::getGlobalLeftTopPos() const {
nw4r::math::VEC3 position;
position.x = mRect.left;
position.y = mRect.bottom;
position.z = scInputFormZeroF;
position.z = 0.0f;
PSMTXMultVec(mMtx, position, position);
return nw4r::math::VEC2(position.x, -position.y);
}
@@ -3263,7 +3266,7 @@ bool Base::doWordWrap(const wchar_t* string, u32 pos, f32 width) {
}
}
f32 stringWidth = inputform::scInputFormZeroF;
f32 stringWidth = 0.0f;
f32 zero = stringWidth;
u32 index;
u32 hyphenPos;
@@ -3278,10 +3281,10 @@ bool Base::doWordWrap(const wchar_t* string, u32 pos, f32 width) {
break;
}
WordWrapDrawInfo drawInfo;
drawInfo.left = inputform::scInputFormZeroF;
drawInfo.top = inputform::scInputFormZeroF;
drawInfo.right = inputform::scInputFormZeroF;
drawInfo.bottom = inputform::scInputFormZeroF;
drawInfo.left = 0.0f;
drawInfo.top = 0.0f;
drawInfo.right = 0.0f;
drawInfo.bottom = 0.0f;
drawInfo.character = *stringPtr;
calcRect(reinterpret_cast<DrawInfo&>(drawInfo));
characterWrap = false;
@@ -3353,8 +3356,8 @@ bool Base::isOverLine(const DrawInfo& drawInfo) {
void Base::drawFixString(u32 position) {
CursorPos cursor;
cursor.fCursorX = inputform::scInputFormZeroF;
cursor.fCursorY = inputform::scInputFormZeroF;
cursor.fCursorX = 0.0f;
cursor.fCursorY = 0.0f;
cursor.uCursorPos = position;
mCharColor.a = muGlobalAlpha;
SetTextColor(mCharColor);
@@ -3367,7 +3370,7 @@ void Base::drawFixString(u32 position) {
void Base::draw() {
SetCursor(getScale().x, mfScrollY);
nw4r::math::VEC2 scale = getScale();
nw4r::ut::Rect clip(inputform::scInputFormZeroF, inputform::scInputFormZeroF, inputform::scInputFormZeroF, inputform::scInputFormZeroF);
nw4r::ut::Rect clip(0.0f, 0.0f, 0.0f, 0.0f);
nw4r::math::VEC2 origin = getGlobalLeftTopPos();
clip.left = origin.x;
clip.bottom = origin.y;
@@ -3380,14 +3383,14 @@ void Base::draw() {
}
void Base::drawCursor(f32 x, f32 y) {
f32 opacity = static_cast<u32>(muGlobalAlpha) / inputform::scInputForm255F;
f32 opacity = static_cast<u32>(muGlobalAlpha) / 255.0f;
mfCursorX = x;
mfCursorY = y;
GXColor color = {inputform::scInputFormColorRU8, inputform::scInputFormColorGU8, inputform::scInputFormColorBU8, inputform::scInputFormColorAU8};
f32 pulse = nw4r::math::SinFIdx(inputform::scInputFormDegToFIdxF * muCursorTimer);
color.a = static_cast<s32>(opacity * (inputform::scInputForm127F + inputform::scInputForm127F * pulse));
GXColor color = {scInputFormColorRU8, scInputFormColorGU8, scInputFormColorBU8, scInputFormColorAU8};
f32 pulse = nw4r::math::SinFIdx(0.7111111f * muCursorTimer);
color.a = static_cast<s32>(opacity * (127.0f + 127.0f * pulse));
f32 width = mfViewWidth - mfViewX;
debug::drawLine_(mfCursorX, inputform::scInputFormTwoF + mfCursorY, mfCursorX, (mfCursorY + GetFontHeight()) - inputform::scInputFormTwoF, inputform::scInputFormZeroF, static_cast<u8>(inputform::scInputForm14592F / width), color);
debug::drawLine_(mfCursorX, 2.0f + mfCursorY, mfCursorX, (mfCursorY + GetFontHeight()) - 2.0f, 0.0f, static_cast<u8>(14592.0f / width), color);
}
void Base::doScroll(Scroll* scroll) {
@@ -3398,7 +3401,7 @@ void Base::doScroll(Scroll* scroll) {
mfDrawScrollY = mfScrollY;
} else {
mfScrollX += scroll->x;
mScrollAnm.startAnm(mfScrollY, mfScrollY + scroll->y, inputform::scInputForm15F, NULL, NULL);
mScrollAnm.startAnm(mfScrollY, mfScrollY + scroll->y, 15.0f, NULL, NULL);
}
onSE(static_cast<sound::SE>(11));
}
@@ -3420,7 +3423,7 @@ void Base::doBeforeDrawProcess(const wchar_t* string, u32 position, const DrawIn
f32 top = info.rect.top + GetCursorY();
f32 right = info.rect.right + GetCursorX();
f32 bottom = info.rect.bottom + GetCursorY();
debug::drawBox_(left, top, right, bottom, inputform::scInputFormZeroF, inputform::scInputFormOneF, mSelectedColor);
debug::drawBox_(left, top, right, bottom, 0.0f, 1.0f, mSelectedColor);
}
}
@@ -3561,7 +3564,7 @@ void Base::setPredictMode(PredictMode predictMode) {
}
nw4r::math::VEC2 Base::getScale() const {
return nw4r::math::VEC2(inputform::scInputFormOneF, inputform::scInputFormOneF);
return nw4r::math::VEC2(1.0f, 1.0f);
}
bool LayoutByNW4R::isAbleToUp() {
@@ -3586,10 +3589,10 @@ bool LayoutByNW4R::updateInput(int chan, f32 x, f32 y, u32 trig, u32 hold, u32 r
nw4r::math::VEC2 point;
point.x = x;
point.y = y;
if (-y < getGlobalLeftTopPos().y + (mRect.top - mRect.bottom) / inputform::scInputFormTwoF) {
point.y = getGlobalLeftTopPos().y - inputform::scInputFormOneF;
if (-y < getGlobalLeftTopPos().y + (mRect.top - mRect.bottom) / 2.0f) {
point.y = getGlobalLeftTopPos().y - 1.0f;
} else {
point.y = inputform::scInputFormOneF + ((mRect.top - mRect.bottom) + getGlobalLeftTopPos().y);
point.y = 1.0f + ((mRect.top - mRect.bottom) + getGlobalLeftTopPos().y);
}
onCommand(static_cast<INPUT_COMMAND>(16), &point);
}
@@ -3690,29 +3693,3 @@ u32 Base::getDrawCacheStartPos() const {
}
}
}
extern "C" const f32 scInputFormZeroF = 0.0f;
extern "C" const f32 scInputForm640F = 640.0f;
extern "C" const f64 scInputFormF32ConvertMagic = 4503601774854144.0;
extern "C" const f32 scInputFormOneF = 1.0f;
extern "C" const f32 scInputFormHalfF = 0.5f;
extern "C" const f32 scInputFormDegToFIdxF = 0.7111111f;
extern "C" const f32 scInputForm150F = 150.0f;
extern "C" const f32 scInputForm30F = 30.0f;
extern "C" const f32 scInputForm50F = 50.0f;
extern "C" const f32 scInputForm10F = 10.0f;
extern "C" const f32 scInputForm52F = 52.0f;
extern "C" const f32 scInputFormTwoF = 2.0f;
extern "C" const f32 scInputForm140F = 140.0f;
extern "C" const f32 scInputForm90F = 90.0f;
extern "C" const f32 scInputForm253F = 253.0f;
extern "C" const f32 scInputForm20F = 20.0f;
extern "C" const u8 scInputFormColorRU8 = 0xff;
extern "C" const u8 scInputFormColorGU8 = 0x32;
extern "C" const u8 scInputFormColorBU8 = 0x32;
extern "C" const u8 scInputFormColorAU8 = 0;
extern "C" const f32 scInputForm255F = 255.0f;
extern "C" const f32 scInputForm127F = 127.0f;
extern "C" const f32 scInputForm14592F = 14592.0f;
extern "C" const f64 scInputFormF64ConvertMagic = 4503599627370496.0;
extern "C" const f32 scInputForm15F = 15.0f;

View File

@@ -19,7 +19,7 @@ namespace textinput {
extern SelectorPosition chinesePosition;
extern SelectorPosition koreanPosition;
static const wchar_t* PREDICT_CAPTIONS[] = {L"\0\0\0", L"\0\0\0", L"Eng", L"Fra", L"Esp", L"EN", L"DE", L"FR", L"ES", L"IT", L"NL", L"CN", L"KR"};
static const wchar_t* PREDICT_CAPTIONS[] = {L"", L"", L"Eng", L"Fra", L"Esp", L"EN", L"DE", L"FR", L"ES", L"IT", L"NL", L"CN", L"KR"};
static const GridKey csGridKeyboard[] = {
{"P_Gkey_00", {0xe0, 0x21, 0x0, 0x0}}, {"P_Gkey_01", {0xe1, 0x3f, 0x3042, 0x30a2}},
@@ -1500,8 +1500,7 @@ namespace textinput {
}
inline u32 FindControlKey(const Base::KeyState& state, char* paneName) {
u16 i;
for (i = 0; i < 23; i++) {
for (u16 i = 0; i < 23; i++) {
if (util::strcmp(state.data->controls[i].paneName, paneName))
return state.data->controls[i].key;
}
@@ -1611,7 +1610,7 @@ namespace textinput {
}
void Base::setTranslateMode(TranslateMode mode) {
u32 keyMode;
u32 keyMode = mode;
switch (mode) {
case TM_Direct:
keyMode = 0;
@@ -2689,7 +2688,7 @@ namespace textinput {
if (name[0] == 'B') {
char animationName[17];
util::replaceChar(animationName, sizeof(animationName), name, 0, 'P');
if (strncmp(name + 5, "Chng", 4) == 0 || strncmp(name + 7, "Chng", 4) == 0 || strncmp(name + 7, "prdc\0\0\0", 4) == 0) {
if (strncmp(name + 5, "Chng", 4) == 0 || strncmp(name + 7, "Chng", 4) == 0 || strncmp(name + 7, "prdc", 4) == 0) {
util::replaceChar(animationName, sizeof(animationName), name, 0, 'W');
}
nw4rmanager::AnmPane* animation = mpKeyboard->searchAnmPane(animationName);
@@ -3202,13 +3201,4 @@ namespace textinput {
}
}
namespace gui {
bool GUIComponent::isDragging(int point) { return mbDragging[point]; }
void GUIComponent::setTriggerTarget(bool bEnable) { mbTriggerTarget = bEnable; }
void EventHandler::onEvent(GUIComponent& comp, u32 event, void* data) {}
void EventHandler::setLatestEventCtrlNo(int ctrlNo) { muLatestEventCtrlNo = ctrlNo; }
int EventHandler::getLatestEventCtrlNo() { return muLatestEventCtrlNo; }
}
}

View File

@@ -14,9 +14,7 @@ void KPRSetMode(KPRQueue*, u32);
namespace textinput {
namespace tistring {
#if defined(TIINPUTFORM_IMPLEMENTATION) || defined(TIMANAGER_IMPLEMENTATION)
Decolated::~Decolated() {}
#endif
void StringBase::create(MEMAllocator* allocator) {
mpAllocator = allocator;
mpszString = static_cast<wchar_t*>(MEMAllocFromAllocator(allocator, muMaxLength << 1));
@@ -152,7 +150,6 @@ void Decolated::inputChar(wchar_t ch) {
input[1] = 0;
input[0] = 0;
u16 count;
u32 i;
if (static_cast<u32>(mTranslateMode) - 1 > 1) {
goto nonKana;
}
@@ -168,19 +165,17 @@ void Decolated::inputChar(wchar_t ch) {
ch = util::toWLower(ch);
count = KPRPutChar(&mKanaStream.mQueue, ch) & 0xff;
}
for (i = 0; (i & 0xff) < count; i++) {
input[static_cast<u8>(i)] = KPRGetChar(&mKanaStream.mQueue);
for (u32 inputIndex = 0; (inputIndex & 0xff) < count; inputIndex++) {
input[static_cast<u8>(inputIndex)] = KPRGetChar(&mKanaStream.mQueue);
}
KPRLookAhead(&mKanaStream.mQueue, mKanaStream.mOutput, 5);
goto inputReady;
}
nonKana:
if (mTranslateMode == 3) {
i = 0;
input[i] = 0;
input[i++] = ch;
input[i] = 0;
count = i;
input[0] = ch;
input[1] = 0;
count = 1;
mKanaStream.mOutput[0] = 0;
} else {
count = 1;

View File

@@ -328,7 +328,7 @@ namespace ipl {
return isSceneCreated();
}
void SDButton::setEventHandler(::gui::EventHandler* event, ::gui::EventHandler* optOutEvent) {
void SDButton::setEventHandler(::gui::EventHandler* event) {
mpGui->setEventHandler(event);
}

View File

@@ -282,7 +282,7 @@ FaderSceneCommand SDChannelTitle::calcFadein() {
if (!mpFade->isPlaying()) {
iplSDChannelTitle_playBannerIntro(this);
SDButton* button = static_cast<SDButton*>(System::getScene(0x24));
button->setEventHandler(mpButtonEventHandler, NULL);
button->setEventHandler(mpButtonEventHandler);
button->animation(13);
button->animation(14);
mState = 1;
@@ -344,7 +344,7 @@ void SDChannelTitle::initCalcFadeout() {
button->animation(15);
button->animation(16);
}
button->setEventHandler(NULL, NULL);
button->setEventHandler(NULL);
}
FaderSceneCommand SDChannelTitle::calcFadeout() {

View File

@@ -0,0 +1,57 @@
# mslmisc leaf attempts
Owned units: `src/scene/sdChannelTitle/iplSDChannelTitle.cpp`, `libs/NW4R/src/ut/ut_ArchiveFontBase.cpp`.
MSL checked via live report: only `MSL_Common/wprintf` incomplete — stays in misc1b's notes.
## DECODE: SDButton::setEventHandler retail dead-param (SOLVED)
orig's real decl was **1-arg** `setEventHandler(EventHandler*)`. Evidence:
- Every orig call site (title ×2, select ×4) emits a bare `bl` with only r3/r4 — never `li r5,0`.
- The 5-insn DEF (`lwz r3,0x60; lwz r12,0; lwz r12,0x38; mtctr; bctr`) forwards to `Manager::setEventHandler`, a 1-arg weak virtual — `optOut` was never consumed.
- `Button::setEventHandler` (a DIFFERENT class, genuine 2-arg impl at 0x8139C93C) DOES emit `li r5,0` in iplFocusObject — MWCC materializes default args, so SDButton's missing r5 means the decl never had it.
- The 2-arg mangle in symbols.txt was an author mislabel inherited from `Button`'s real 2-arg.
Fix (all kept): `iplSDButton.h` decl → `void setEventHandler(::gui::EventHandler* event);`; `iplSDButton.cpp` def → 1-arg; call sites in sdChannelTitle/sdChannelSelect → 1-arg; `config/43U/symbols.txt` line 4817 renamed `...8SDButtonFPQ23gui12EventHandlerPQ23gui12EventHandler` → `...8SDButtonFPQ23gui12EventHandler`. Flipped 5 fns to instruction-identical + all sdChannelTitle data sections to 100%.
Mechanism note: renaming a `.text` address in symbols.txt propagates through the splitter into orig's DEF name AND every caller's UND reloc name — the legit rename lever.
## UNSOLVED: enqueue*Notice leading dead-arg (r4)
`SDChannelSelect::enqueueChannelNotice(u32 controller, u32 page, u32 index, u32 value)` and
`enqueueStateNotice(u32 controller, u32 state, u32 type, u32)` (4×u32 each; defs build
`command.titleId = ((u64)page << 32) | index` — proven 4×u32, not u64).
orig call sites marshal r5/r6/r7 but **never write r4** (arg1 `controller` — dead param the
def bodies ignore; iplSDMemory callers DO materialize it). Same dead-arg family as
setEventHandler but on a LEADING arg — no decl form reproduces it:
- arg-count reduction shifts the marshal left (breaks r5/r6/r7 positions)
- defaulted params must be trailing
- `(u32,u64,u32)` still needs `li r4,0` for arg1
- `scene->mPage`/`mIndex`/`channel` as arg1 all emit real loads (`lwz`/`mr`) — orig has none
- r4 is call-clobbered at both sites (`bl findChannelObject`, `bl isReceiveScheduleStopped`)
so no "value already in r4" source expr exists
Residual = `+li r4,0` plus marshal-order (orig emits r6-before-r5 / addi-first) — scheduler family.
## TIE: flushSaveBeforeExit eval-order (98.59)
Insn+reloc-identical except a 6-word window: orig `lis r3` (smArg base→r3), `lwz r4,0x94` (stw-mgr),
`stw`, `lwz r4,0x28` (heap), `lwz r3,0x94` (flush receiver — reloaded LAST). Mine: base→r4,
receiver-load before heap-load. Orig evaluated the `flushAsync` ARG before the receiver reload.
Tried: `saveHeap` local (before/after stw, decl-init, separate assign — emits at-birth or at-use,
never between), `saveData`/`mgr` local (caches receiver → 5-insn form, wrong), nested
`flushAsync(System::getMem2App())` (same as original). All ~6-word identical or regression.
## TIE: ConstructOpAnalyzeGLGR 20-diff window (91.79)
239/239 insns — orig interleaves `lhz r31,0x1c` (sheetGlyphCount) + `lhz r23,0xe` (dataBlockCount)
mid-flag-chain (issued at birth, deep-callee homes); mine emits both at-use (`lhz r26/r25`,
~8 insns later). Same callee-web rotation family. Kept: flags-first reorder (24→20 diffs) +
the second `pGlgr = &font->glgr` assignment (removing it = 113 diffs). Decl-init variant no-op.
## Status
- iplSDChannelTitle: .text 99.9, all data sections 100% (baseline was data 12.1%). Three
sub-100 fns — all at the anomalies/ties above.
- ut_ArchiveFontBase: .text 98.5 — the 20-diff window.
- DOL sha1 `26116613f624061ba99c8d1a299aaa6efa85670d` verified. No shims; both units stay NonMatching.