Compare commits

..

2 Commits

Author SHA1 Message Date
coah
2aca3011ab Fix keyboard prediction and animation jump tables 2026-10-01 18:18:58 -05:00
coah
efda1f0093 Restore SD state-machine switch case mappings (#623) 2026-10-01 18:14:28 -05:00
4 changed files with 70 additions and 70 deletions

View File

@@ -7270,9 +7270,9 @@ ZiDAWGgetEOWattribute = .text:0x81481098; // type:function size:0x30
ZiDAWGgetCHARattribute = .text:0x814810C8; // type:function size:0xF0
ZiDAWGGetGraph = .text:0x814811B8; // type:function size:0x2C
ZiDAWGGetGraphInfo = .text:0x814811E4; // type:function size:0x218
Zi8LookupKoreanChar = .text:0x814813FC; // type:function size:0xC4
Zi8_814813FC = .text:0x814813FC; // type:function size:0xC4
Zi8GetKoreanCandidates = .text:0x814814C0; // type:function size:0x9AC
Zi8MatchKoreanSequence = .text:0x81481E6C; // type:function size:0x9D4
Zi8_81481E6C = .text:0x81481E6C; // type:function size:0x9D4
Zi8IsWordW = .text:0x81482840; // type:function size:0x680
Zi8ConvertUC2UserKey = .text:0x81482EC0; // type:function size:0x16C
Zi8_8148302C = .text:0x8148302C; // type:function size:0xEC

View File

@@ -4,7 +4,7 @@
ziU32 Zi8GetTableAddress(ziU8 lang, ziU8 tableIdx, ziPtr workData);
ziU16 Zi8GetTableCount(ziU8 lang, ziU8 tableIdx, ziPtr workData);
ziU8 Zi8LookupKoreanChar(ziWChar character, ziU8* result, ziU16* index, ziPtr workData) {
ziU8 Zi8_814813FC(ziWChar character, ziU8* result, ziU16* index, ziPtr workData) {
ziU16 i;
ziU8* table;
@@ -23,7 +23,7 @@ ziU8 Zi8LookupKoreanChar(ziWChar character, ziU8* result, ziU16* index, ziPtr wo
return 0;
}
ziU8 Zi8MatchKoreanSequence(ziU16* resultIndex, ziU16* input, ziU8 type, ziU16 count, ziPtr workData);
ziU8 Zi8_81481E6C(ziU16* resultIndex, ziU16* input, ziU8 type, ziU16 count, ziPtr workData);
ziU32 Zi8GetKoreanCandidates(ziGetParam* params, ziU8* argument,
ziPtr workData) {
@@ -97,9 +97,9 @@ ziU32 Zi8GetKoreanCandidates(ziGetParam* params, ziU8* argument,
result = 0;
for (currentCharacter = 0; currentCharacter < state.elementIndex; currentCharacter++) {
if (Zi8LookupKoreanChar(buffer[currentCharacter], &state.characterIndex,
if (Zi8_814813FC(buffer[currentCharacter], &state.characterIndex,
&state.inputIndex, workData) != 0) {
state.matched = Zi8MatchKoreanSequence(&state.nextIndex,
state.matched = Zi8_81481E6C(&state.nextIndex,
buffer + currentCharacter + 1,
state.characterIndex,
(state.elementIndex - currentCharacter) - 1,
@@ -235,7 +235,7 @@ ziU32 Zi8GetKoreanCandidates(ziGetParam* params, ziU8* argument,
return result;
}
ziU8 Zi8MatchKoreanSequence(ziU16* resultIndex, ziU16* input, ziU8 type, ziU16 count, ziPtr workData) {
ziU8 Zi8_81481E6C(ziU16* resultIndex, ziU16* input, ziU8 type, ziU16 count, ziPtr workData) {
ziU16 nestedScratch;
ziU16 nestedIndexStorage;
ziU16 index1;
@@ -375,8 +375,8 @@ ziU8 Zi8MatchKoreanSequence(ziU16* resultIndex, ziU16* input, ziU8 type, ziU16 c
}
if ((index3 >= tableCount) || (firstCharacter != (table + index3 * 4)[2]) ||
(input[1] != (table + index3 * 4)[1]) || (input[0] != table[index3 * 4])) {
if ((Zi8LookupKoreanChar(input[1], &mappedCharacter, &nestedScratch, workData) != 0) &&
(Zi8MatchKoreanSequence(&nestedIndexStorage, input + 2, mappedCharacter, 1, workData) != 0)) {
if ((Zi8_814813FC(input[1], &mappedCharacter, &nestedScratch, workData) != 0) &&
(Zi8_81481E6C(&nestedIndexStorage, input + 2, mappedCharacter, 1, workData) != 0)) {
*resultIndex = index1;
return 1;
}
@@ -397,8 +397,8 @@ ziU8 Zi8MatchKoreanSequence(ziU16* resultIndex, ziU16* input, ziU8 type, ziU16 c
if ((index4 >= tableCount) || (firstCharacter != (table + index4 * 4)[3]) ||
(input[2] != (table + index4 * 4)[2]) || (input[1] != (table + index4 * 4)[1]) ||
(input[0] != table[index4 * 4])) {
if ((Zi8LookupKoreanChar(input[2], &mappedCharacter, &nestedScratch, workData) != 0) &&
(Zi8MatchKoreanSequence(&nestedIndexStorage, input + 3, mappedCharacter, 1, workData) != 0)) {
if ((Zi8_814813FC(input[2], &mappedCharacter, &nestedScratch, workData) != 0) &&
(Zi8_81481E6C(&nestedIndexStorage, input + 3, mappedCharacter, 1, workData) != 0)) {
*resultIndex = index2;
return 2;
}
@@ -409,8 +409,8 @@ ziU8 Zi8MatchKoreanSequence(ziU16* resultIndex, ziU16* input, ziU8 type, ziU16 c
*resultIndex = index4;
return 4;
}
if ((Zi8LookupKoreanChar(input[3], &mappedCharacter, &nestedScratch, workData) != 0) &&
(Zi8MatchKoreanSequence(&nestedIndexStorage, input + 4, mappedCharacter, 1, workData) != 0)) {
if ((Zi8_814813FC(input[3], &mappedCharacter, &nestedScratch, workData) != 0) &&
(Zi8_81481E6C(&nestedIndexStorage, input + 4, mappedCharacter, 1, workData) != 0)) {
*resultIndex = index3;
return 3;
}

View File

@@ -509,13 +509,13 @@ void Base::setLanguage(Language language) {
case UK:
setPredictMode(PM_En);
break;
case FR:
case DE:
setPredictMode(PM_De);
break;
case DE:
case IT:
setPredictMode(PM_It);
break;
case IT:
case NL:
setPredictMode(PM_Nl);
break;
case SP:
@@ -525,7 +525,7 @@ void Base::setLanguage(Language language) {
setPredictMode(PM_USSp);
}
break;
case NL:
case FR:
if (meDestination == DST_EU) {
setPredictMode(PM_Fr);
} else {
@@ -3470,7 +3470,7 @@ void NormalButtonAnmPane::onAnmEvent(AnmPaneEvent event) {
changeAnimation(ANM_Pushed);
}
switch (meState) {
case ANM_FocusOut:
case ANM_FadeIn:
if (event == PE_4) changeAnimation(ANM_Normal);
if (event == PE_1) changeAnimation(ANM_FocusIn);
break;
@@ -3484,7 +3484,7 @@ void NormalButtonAnmPane::onAnmEvent(AnmPaneEvent event) {
case ANM_RollOver:
if (event == PE_2) changeAnimation(ANM_FocusOut);
break;
case ANM_FadeIn:
case ANM_FocusOut:
if (event == PE_4) changeAnimation(ANM_Normal);
if (event == PE_1) changeAnimation(ANM_FocusIn);
break;

View File

@@ -1037,52 +1037,52 @@ namespace ipl {
}
switch (mWorkerCommand) {
case 0:
case 1:
processWorkerCommands();
break;
case 1:
case 0:
handleNandTitleUsageComplete();
break;
case 2:
handleSDTitleList();
break;
case 3:
case 4:
handleSDMountComplete();
break;
case 4:
case 5:
handleSDTitleListResult();
break;
case 5:
case 3:
handleSDChannelUpdateComplete();
break;
case 6:
case 7:
handleCopyComplete();
break;
case 7:
case 8:
handleSDLocationUpdateComplete();
break;
case 8:
case 9:
handleSDLocationReadComplete();
break;
case 9:
case 10:
handleMoveComplete();
break;
case 10:
case 11:
handleBackupFitComplete();
break;
case 11:
case 12:
handleNandSDCleanupComplete();
break;
case 12:
case 13:
handleSDDeleteComplete();
break;
case 13:
case 6:
handleSDCardReady();
break;
case 14:
case 15:
handleCardCommand();
break;
case 15:
case 14:
break;
}
@@ -1749,79 +1749,79 @@ namespace ipl {
}
switch (state) {
case 0:
case 1:
processNormalInput();
break;
case 1:
case 8:
case 9:
setPageActionFrame();
break;
case 2:
case 10:
case 11:
finishPageScroll();
break;
case 3:
case 5:
createChildScene(0x23, this, NULL, this);
mState = 6;
break;
case 4:
case 7:
advancePageAnimation();
break;
case 5:
case 12:
mState = 13;
break;
case 6:
case 14:
initializeNormalPage();
break;
case 7:
case 15:
updateDragState();
break;
case 8:
case 16:
updateDragPageTransition();
break;
case 9:
case 17:
finishDragWait();
break;
case 10:
case 18:
finishDragPageTransition();
break;
case 11:
case 19:
applyChannelMove();
break;
case 12:
case 20:
finishChannelMove();
break;
case 13:
case 21:
resetDragPreview();
break;
case 14:
finishDragPageChange();
break;
case 15:
handleFourPageDialog();
break;
case 16:
flushSaveDataAndMountSD();
break;
case 17:
handleThreePageDialog();
break;
case 18:
finishCardDialog();
break;
case 19:
finishDialogOperation();
break;
case 20:
finishDialogTransition();
break;
case 21:
case 22:
case 23:
finishDragPageChange();
break;
case 24:
handleFourPageDialog();
break;
case 25:
flushSaveDataAndMountSD();
break;
case 26:
handleThreePageDialog();
break;
case 27:
finishCardDialog();
break;
case 28:
finishDialogOperation();
break;
case 29:
finishDialogTransition();
break;
case 0:
case 2:
case 3:
case 4:
case 6:
case 13:
default:
break;
}