Compare commits

..

1 Commits

Author SHA1 Message Date
coah
d455dc0997 cleanup(eZiText): rename work unk_0x09 to formatFlags
Bitmask selecting which candidate formats to populate.
2026-10-02 14:12:03 -05:00
58 changed files with 708 additions and 839 deletions

View File

@@ -53,9 +53,9 @@ Progress
<!-- progress:start -->
| Decompiled | Matched | Linked | Data |
|:---:|:---:|:---:|:---:|
| 99.59% | 90.92% | 73.37% | 99.37% |
| 99.59% | 90.81% | 71.43% | 99.37% |
units 960/1027 complete, functions 12368/12563 matched.
units 956/1027 complete, functions 12365/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 -->

View File

@@ -13904,15 +13904,10 @@ lbl_81610608 = .rodata:0x81610608; // type:object size:0x300
lbl_81610908 = .rodata:0x81610908; // type:object size:0x10
sCaptureSizes__Q23ipl5scene = .rodata:0x81610918; // type:object size:0x10
lbl_81610928 = .rodata:0x81610928; // type:object size:0x20 data:4byte
scAnmTable__Q23ipl5scene = .rodata:0x81610948; // type:object size:0xE8 scope:local
@17203 = .rodata:0x81610A30; // type:object size:0x1C scope:local
@17212 = .rodata:0x81610A4C; // type:object size:0x30 scope:local
@17223 = .rodata:0x81610A7C; // type:object size:0x28 scope:local
@17227 = .rodata:0x81610AA4; // type:object size:0x30 scope:local
@17254 = .rodata:0x81610AD4; // type:object size:0x1C scope:local
@18816 = .rodata:0x81610AF0; // type:object size:0x30 scope:local data:4byte
@18818 = .rodata:0x81610B20; // type:object size:0x60 scope:local data:4byte
@19272 = .rodata:0x81610B80; // type:object size:0x20 scope:local data:wstring
scAnmTable__Q23ipl5scene = .rodata:0x81610948; // type:object size:0x1A8 scope:local
lbl_81610AF0 = .rodata:0x81610AF0; // type:object size:0x30 data:4byte
lbl_81610B20 = .rodata:0x81610B20; // type:object size:0x60 data:4byte
lbl_81610B80 = .rodata:0x81610B80; // type:object size:0x20 data:wstring
scNumber__Q23ipl5scene = .rodata:0x81610BA0; // type:object size:0x14 scope:local data:2byte
scNumber2__Q23ipl5scene = .rodata:0x81610BB4; // type:object size:0x14 scope:local data:2byte
lbl_81610BC8 = .rodata:0x81610BC8; // type:object size:0x1000
@@ -17170,23 +17165,7 @@ sSettingAPPaneNames__Q23ipl5scene = .data:0x81656978; // type:object size:0x68 d
sSettingAPAnimations__Q23ipl5scene = .data:0x81656B6C; // type:object size:0x4C data:4byte
@25442 = .data:0x81656BB8; // type:object size:0xF scope:local data:string
@25443 = .data:0x81656BC7; // type:object size:0x1C scope:local data:string
@25501 = .data:0x81656BE3; // type:object size:0xF scope:local data:string
@25502 = .data:0x81656BF2; // type:object size:0x14 scope:local data:string
@25503 = .data:0x81656C06; // type:object size:0x18 scope:local data:string
@25505 = .data:0x81656C1E; // type:object size:0x1A scope:local data:string
@25506 = .data:0x81656C38; // type:object size:0x13 scope:local data:string
@25508 = .data:0x81656C4B; // type:object size:0x9 scope:local data:string
@25509 = .data:0x81656C54; // type:object size:0x12 scope:local data:string
@25510 = .data:0x81656C66; // type:object size:0xC scope:local data:string
@25616 = .data:0x81656C72; // type:object size:0xD scope:local data:string
@25618 = .data:0x81656C7F; // type:object size:0xF scope:local data:string
@25620 = .data:0x81656C8E; // type:object size:0x14 scope:local data:string
@25621 = .data:0x81656CA2; // type:object size:0x1A scope:local data:string
@25622 = .data:0x81656CBC; // type:object size:0x19 scope:local data:string
@25623 = .data:0x81656CD5; // type:object size:0xE scope:local data:string
@25624 = .data:0x81656CE3; // type:object size:0x13 scope:local data:string
@25625 = .data:0x81656CF6; // type:object size:0x18 scope:local data:string
@25628 = .data:0x81656D0E; // type:object size:0x19 scope:local data:string
@17193 = .data:0x81656D27; // type:object size:0xC scope:local data:string
@17194 = .data:0x81656D33; // type:object size:0x20 scope:local data:string
@17197 = .data:0x81656D53; // type:object size:0xD scope:local data:string
@@ -17200,32 +17179,10 @@ sSettingAPAnimations__Q23ipl5scene = .data:0x81656B6C; // type:object size:0x4C
@17250 = .data:0x81656DFA; // type:object size:0x11 scope:local data:string
@17251 = .data:0x81656E0B; // type:object size:0x9 scope:local data:string
@17252 = .data:0x81656E14; // type:object size:0xD scope:local data:string
@25720 = .data:0x81656E21; // type:object size:0x23 scope:local data:string
@25721 = .data:0x81656E44; // type:object size:0xD scope:local data:string
@25722 = .data:0x81656E51; // type:object size:0xD scope:local data:string
@25723 = .data:0x81656E5E; // type:object size:0xD scope:local data:string
@25724 = .data:0x81656E6B; // type:object size:0x25 scope:local data:string
@25726 = .data:0x81656E90; // type:object size:0x15 scope:local data:string
@25747 = .data:0x81656EA5; // type:object size:0x1B scope:local data:string
@25766 = .data:0x81656EC0; // type:object size:0x1D scope:local data:string
@25767 = .data:0x81656EDD; // type:object size:0x11 scope:local data:string
@25768 = .data:0x81656EEE; // type:object size:0x1D scope:local data:string
@26292 = .data:0x81656F0B; // type:object size:0xF scope:local data:string
@26293 = .data:0x81656F1A; // type:object size:0xD scope:local data:string
@26294 = .data:0x81656F27; // type:object size:0x11 scope:local data:string
@26295 = .data:0x81656F38; // type:object size:0x11 scope:local data:string
@26296 = .data:0x81656F49; // type:object size:0xA scope:local data:string
@26297 = .data:0x81656F53; // type:object size:0xD scope:local data:string
@26300 = .data:0x81656F60; // type:object size:0x1A0 scope:local
@26299 = .data:0x81657100; // type:object size:0x48 scope:local
@26346 = .data:0x81657148; // type:object size:0x26 scope:local data:string
@26347 = .data:0x8165716E; // type:object size:0xF scope:local data:string
@26348 = .data:0x8165717D; // type:object size:0xE scope:local data:string
@26349 = .data:0x8165718B; // type:object size:0xA scope:local data:string
@26350 = .data:0x81657195; // type:object size:0xB scope:local data:string
@26351 = .data:0x816571A0; // type:object size:0x16 scope:local data:string
@26353 = .data:0x816571B6; // type:object size:0x11 scope:local data:string
@26354 = .data:0x816571C7; // type:object size:0x16 scope:local data:string
@26502 = .data:0x816571DD; // type:object size:0xF scope:local data:string
@26534 = .data:0x816571EC; // type:object size:0x18 scope:local data:string
@26536 = .data:0x81657204; // type:object size:0x44 scope:local
@@ -17259,11 +17216,6 @@ sSettingAPAnimations__Q23ipl5scene = .data:0x81656B6C; // type:object size:0x4C
@28326 = .data:0x81657642; // type:object size:0x2A scope:local data:string
@28370 = .data:0x8165766C; // type:object size:0x10 scope:local data:string
@28383 = .data:0x8165767C; // type:object size:0x14 scope:local data:string
@28436 = .data:0x81657690; // type:object size:0x16 scope:local data:string
@28437 = .data:0x816576A6; // type:object size:0xF scope:local data:string
@28438 = .data:0x816576B5; // type:object size:0x13 scope:local data:string
@28439 = .data:0x816576C8; // type:object size:0x1A scope:local data:string
@28440 = .data:0x816576E2; // type:object size:0x1B scope:local data:string
@28442 = .data:0x81657700; // type:object size:0x84 scope:local
__vt__Q33ipl5scene7APEvent = .data:0x81657784; // type:object size:0x18
__vt__Q33ipl5scene7Setting = .data:0x8165779C; // type:object size:0x68
@@ -22421,93 +22373,93 @@ lbl_81696FD0 = .sdata:0x81696FD0; // type:object size:0x6 data:wstring
lbl_81696FD6 = .sdata:0x81696FD6; // type:object size:0x4 data:wstring
lbl_81696FDA = .sdata:0x81696FDA; // type:object size:0x7 data:string
lbl_81696FE1 = .sdata:0x81696FE1; // type:object size:0x7 data:string
@16789 = .sdata:0x81696FE8; // type:object size:0x6 data:string
@16790 = .sdata:0x81696FEE; // type:object size:0x6 data:string
@16791 = .sdata:0x81696FF4; // type:object size:0x6 data:string
@16792 = .sdata:0x81696FFA; // type:object size:0x6 data:string
@16793 = .sdata:0x81697000; // type:object size:0x7 data:string
@16794 = .sdata:0x81697007; // type:object size:0x7 data:string
sSettingArrowNames__Q23ipl5scene = .sdata:0x81697010; // type:object size:0x8 data:4byte
@16795 = .sdata:0x81697018; // type:object size:0x8 data:string
@16796 = .sdata:0x81697020; // type:object size:0x8 data:string
@16797 = .sdata:0x81697028; // type:object size:0x8 data:string
@16798 = .sdata:0x81697030; // type:object size:0x8 data:string
@16799 = .sdata:0x81697038; // type:object size:0x8 data:string
@16800 = .sdata:0x81697040; // type:object size:0x8 data:string
@16801 = .sdata:0x81697048; // type:object size:0x6 data:string
@16802 = .sdata:0x8169704E; // type:object size:0x6 data:string
@16803 = .sdata:0x81697054; // type:object size:0x6 data:string
@16804 = .sdata:0x8169705A; // type:object size:0x6 data:string
@16805 = .sdata:0x81697060; // type:object size:0x6 data:string
@16806 = .sdata:0x81697066; // type:object size:0x6 data:string
@16809 = .sdata:0x8169706C; // type:object size:0x7 data:string
@16810 = .sdata:0x81697073; // type:object size:0x7 data:string
@16811 = .sdata:0x8169707A; // type:object size:0x8 data:string
@16812 = .sdata:0x81697082; // type:object size:0x7 data:string
@16813 = .sdata:0x81697089; // type:object size:0x6 data:string
@16814 = .sdata:0x8169708F; // type:object size:0x6 data:string
@16815 = .sdata:0x81697095; // type:object size:0x6 data:string
@16816 = .sdata:0x8169709B; // type:object size:0x6 data:string
@16817 = .sdata:0x816970A1; // type:object size:0x6 data:string
@16818 = .sdata:0x816970A7; // type:object size:0x6 data:string
@16819 = .sdata:0x816970AD; // type:object size:0x6 data:string
@16820 = .sdata:0x816970B3; // type:object size:0x6 data:string
@16827 = .sdata:0x816970B9; // type:object size:0x8 data:string
@16828 = .sdata:0x816970C1; // type:object size:0x8 data:string
@16829 = .sdata:0x816970C9; // type:object size:0x8 data:string
@16830 = .sdata:0x816970D1; // type:object size:0x8 data:string
@16831 = .sdata:0x816970D9; // type:object size:0x8 data:string
@16832 = .sdata:0x816970E1; // type:object size:0x8 data:string
@25504 = .sdata:0x816970E9; // type:object size:0x4 data:string
@25507 = .sdata:0x816970ED; // type:object size:0x4 data:string
@25617 = .sdata:0x816970F1; // type:object size:0x5 data:string
@25619 = .sdata:0x816970F6; // type:object size:0x4 data:string
@25626 = .sdata:0x816970FA; // type:object size:0x7 data:string
@25627 = .sdata:0x81697101; // type:object size:0x7 data:string
@17202 = .sdata:0x81697108; // type:object size:0x3 data:string
@17205 = .sdata:0x8169710B; // type:object size:0x6 data:string
@17206 = .sdata:0x81697111; // type:object size:0x7 data:string
@17207 = .sdata:0x81697118; // type:object size:0x6 data:string
@17208 = .sdata:0x8169711E; // type:object size:0x1
@17209 = .sdata:0x8169711F; // type:object size:0x6 data:string
@17210 = .sdata:0x81697125; // type:object size:0x6 data:string
@17211 = .sdata:0x8169712B; // type:object size:0x6 data:string
@17214 = .sdata:0x81697131; // type:object size:0x4 data:string
@17215 = .sdata:0x81697135; // type:object size:0x4 data:string
@17216 = .sdata:0x81697139; // type:object size:0x4 data:string
@17217 = .sdata:0x8169713D; // type:object size:0x4 data:string
@17218 = .sdata:0x81697141; // type:object size:0x4 data:string
@17219 = .sdata:0x81697145; // type:object size:0x4 data:string
@17220 = .sdata:0x81697149; // type:object size:0x4 data:string
@17221 = .sdata:0x8169714D; // type:object size:0x4 data:string
@17222 = .sdata:0x81697151; // type:object size:0x4 data:string
@17248 = .sdata:0x81697155; // type:object size:0x8 data:string
@17249 = .sdata:0x8169715D; // type:object size:0x6 data:string
@17253 = .sdata:0x81697163; // type:object size:0x7 data:string
@25725 = .sdata:0x8169716A; // type:object size:0x4 data:string
@26352 = .sdata:0x8169716E; // type:object size:0x5 data:string
@26503 = .sdata:0x81697173; // type:object size:0x7 data:string
@26504 = .sdata:0x8169717A; // type:object size:0x5 data:string
@26505 = .sdata:0x8169717F; // type:object size:0x5 data:string
@26506 = .sdata:0x81697184; // type:object size:0x5 data:string
@26625 = .sdata:0x8169718A; // type:object size:0x2
@26851 = .sdata:0x8169718C; // type:object size:0x3 data:string
@18811 = .sdata:0x8169718F; // type:object size:0x2 data:string
@18812 = .sdata:0x81697191; // type:object size:0x2 data:string
@18813 = .sdata:0x81697193; // type:object size:0x2 data:string
@18814 = .sdata:0x81697195; // type:object size:0x2 data:string
@18815 = .sdata:0x81697197; // type:object size:0x2 data:string
@27404 = .sdata:0x81697199; // type:object size:0x6 data:string
@27405 = .sdata:0x8169719F; // type:object size:0x6 data:string
@27406 = .sdata:0x816971A5; // type:object size:0x6 data:string
@27407 = .sdata:0x816971AB; // type:object size:0x6 data:string
@27556 = .sdata:0x816971B1; // type:object size:0x6 data:string
@27557 = .sdata:0x816971B7; // type:object size:0x6 data:string
@27558 = .sdata:0x816971BD; // type:object size:0x6 data:string
@27559 = .sdata:0x816971C3; // type:object size:0x6 data:string
@27560 = .sdata:0x816971C9; // type:object size:0x7 data:string
@27862 = .sdata:0x816971D0; // type:object size:0x3 data:string
@28152 = .sdata:0x816971D4; // type:object size:0x8 data:wstring
lbl_81696FE8 = .sdata:0x81696FE8; // type:object size:0x6 data:string
lbl_81696FEE = .sdata:0x81696FEE; // type:object size:0x6 data:string
lbl_81696FF4 = .sdata:0x81696FF4; // type:object size:0x6 data:string
lbl_81696FFA = .sdata:0x81696FFA; // type:object size:0x6 data:string
lbl_81697000 = .sdata:0x81697000; // type:object size:0x7 data:string
lbl_81697007 = .sdata:0x81697007; // type:object size:0x7 data:string
lbl_81697010 = .sdata:0x81697010; // type:object size:0x8 data:4byte
lbl_81697018 = .sdata:0x81697018; // type:object size:0x8 data:string
lbl_81697020 = .sdata:0x81697020; // type:object size:0x8 data:string
lbl_81697028 = .sdata:0x81697028; // type:object size:0x8 data:string
lbl_81697030 = .sdata:0x81697030; // type:object size:0x8 data:string
lbl_81697038 = .sdata:0x81697038; // type:object size:0x8 data:string
lbl_81697040 = .sdata:0x81697040; // type:object size:0x8 data:string
lbl_81697048 = .sdata:0x81697048; // type:object size:0x6 data:string
lbl_8169704E = .sdata:0x8169704E; // type:object size:0x6 data:string
lbl_81697054 = .sdata:0x81697054; // type:object size:0x6 data:string
lbl_8169705A = .sdata:0x8169705A; // type:object size:0x6 data:string
lbl_81697060 = .sdata:0x81697060; // type:object size:0x6 data:string
lbl_81697066 = .sdata:0x81697066; // type:object size:0x6 data:string
lbl_8169706C = .sdata:0x8169706C; // type:object size:0x7 data:string
lbl_81697073 = .sdata:0x81697073; // type:object size:0x7 data:string
lbl_8169707A = .sdata:0x8169707A; // type:object size:0x8 data:string
lbl_81697082 = .sdata:0x81697082; // type:object size:0x7 data:string
lbl_81697089 = .sdata:0x81697089; // type:object size:0x6 data:string
lbl_8169708F = .sdata:0x8169708F; // type:object size:0x6 data:string
lbl_81697095 = .sdata:0x81697095; // type:object size:0x6 data:string
lbl_8169709B = .sdata:0x8169709B; // type:object size:0x6 data:string
lbl_816970A1 = .sdata:0x816970A1; // type:object size:0x6 data:string
lbl_816970A7 = .sdata:0x816970A7; // type:object size:0x6 data:string
lbl_816970AD = .sdata:0x816970AD; // type:object size:0x6 data:string
lbl_816970B3 = .sdata:0x816970B3; // type:object size:0x6 data:string
lbl_816970B9 = .sdata:0x816970B9; // type:object size:0x8 data:string
lbl_816970C1 = .sdata:0x816970C1; // type:object size:0x8 data:string
lbl_816970C9 = .sdata:0x816970C9; // type:object size:0x8 data:string
lbl_816970D1 = .sdata:0x816970D1; // type:object size:0x8 data:string
lbl_816970D9 = .sdata:0x816970D9; // type:object size:0x8 data:string
lbl_816970E1 = .sdata:0x816970E1; // type:object size:0x8 data:string
lbl_816970E9 = .sdata:0x816970E9; // type:object size:0x4 data:string
lbl_816970ED = .sdata:0x816970ED; // type:object size:0x4 data:string
lbl_816970F1 = .sdata:0x816970F1; // type:object size:0x5 data:string
lbl_816970F6 = .sdata:0x816970F6; // type:object size:0x4 data:string
lbl_816970FA = .sdata:0x816970FA; // type:object size:0x7 data:string
lbl_81697101 = .sdata:0x81697101; // type:object size:0x7 data:string
lbl_81697108 = .sdata:0x81697108; // type:object size:0x3 data:string
lbl_8169710B = .sdata:0x8169710B; // type:object size:0x6 data:string
lbl_81697111 = .sdata:0x81697111; // type:object size:0x7 data:string
lbl_81697118 = .sdata:0x81697118; // type:object size:0x6 data:string
lbl_8169711E = .sdata:0x8169711E; // type:object size:0x1
lbl_8169711F = .sdata:0x8169711F; // type:object size:0x6 data:string
lbl_81697125 = .sdata:0x81697125; // type:object size:0x6 data:string
lbl_8169712B = .sdata:0x8169712B; // type:object size:0x6 data:string
lbl_81697131 = .sdata:0x81697131; // type:object size:0x4 data:string
lbl_81697135 = .sdata:0x81697135; // type:object size:0x4 data:string
lbl_81697139 = .sdata:0x81697139; // type:object size:0x4 data:string
lbl_8169713D = .sdata:0x8169713D; // type:object size:0x4 data:string
lbl_81697141 = .sdata:0x81697141; // type:object size:0x4 data:string
lbl_81697145 = .sdata:0x81697145; // type:object size:0x4 data:string
lbl_81697149 = .sdata:0x81697149; // type:object size:0x4 data:string
lbl_8169714D = .sdata:0x8169714D; // type:object size:0x4 data:string
lbl_81697151 = .sdata:0x81697151; // type:object size:0x4 data:string
lbl_81697155 = .sdata:0x81697155; // type:object size:0x8 data:string
lbl_8169715D = .sdata:0x8169715D; // type:object size:0x6 data:string
lbl_81697163 = .sdata:0x81697163; // type:object size:0x7 data:string
lbl_8169716A = .sdata:0x8169716A; // type:object size:0x4 data:string
lbl_8169716E = .sdata:0x8169716E; // type:object size:0x5 data:string
lbl_81697173 = .sdata:0x81697173; // type:object size:0x7 data:string
lbl_8169717A = .sdata:0x8169717A; // type:object size:0x5 data:string
lbl_8169717F = .sdata:0x8169717F; // type:object size:0x5 data:string
lbl_81697184 = .sdata:0x81697184; // type:object size:0x5 data:string
lbl_8169718A = .sdata:0x8169718A; // type:object size:0x2
lbl_8169718C = .sdata:0x8169718C; // type:object size:0x3 data:string
lbl_8169718F = .sdata:0x8169718F; // type:object size:0x2 data:string
lbl_81697191 = .sdata:0x81697191; // type:object size:0x2 data:string
lbl_81697193 = .sdata:0x81697193; // type:object size:0x2 data:string
lbl_81697195 = .sdata:0x81697195; // type:object size:0x2 data:string
lbl_81697197 = .sdata:0x81697197; // type:object size:0x2 data:string
lbl_81697199 = .sdata:0x81697199; // type:object size:0x6 data:string
lbl_8169719F = .sdata:0x8169719F; // type:object size:0x6 data:string
lbl_816971A5 = .sdata:0x816971A5; // type:object size:0x6 data:string
lbl_816971AB = .sdata:0x816971AB; // type:object size:0x6 data:string
lbl_816971B1 = .sdata:0x816971B1; // type:object size:0x6 data:string
lbl_816971B7 = .sdata:0x816971B7; // type:object size:0x6 data:string
lbl_816971BD = .sdata:0x816971BD; // type:object size:0x6 data:string
lbl_816971C3 = .sdata:0x816971C3; // type:object size:0x6 data:string
lbl_816971C9 = .sdata:0x816971C9; // type:object size:0x7 data:string
lbl_816971D0 = .sdata:0x816971D0; // type:object size:0x3 data:string
lbl_816971D4 = .sdata:0x816971D4; // type:object size:0x8 data:wstring
@12299 = .sdata:0x816971E0; // type:object size:0x5 scope:local data:string
@12302 = .sdata:0x816971E5; // type:object size:0x5 scope:local data:string
lbl_816971F0 = .sdata:0x816971F0; // type:object size:0x4 data:string

View File

@@ -766,7 +766,7 @@ config.libs = [
]
),
IPLSection("channelSelect", [
Object(Matching, "scene/channelSelect/iplChannelSelect.cpp"),
Object(Equivalent, "scene/channelSelect/iplChannelSelect.cpp"),
Object(Matching, "scene/channelSelect/iplClock.cpp"),
Object(Equivalent, "scene/channelSelect/iplChannelObj.cpp"),
]

View File

@@ -16,12 +16,12 @@ public:
AXVPB* getAXVPB() { return mpVPB; }
u32 getState() { return mState; }
u32 getUnk_0x08() { return unk_0x08; }
int getUpdateFlag() { return mUpdateFlag; }
int getUnk_0x0C() { return unk_0x0C; }
void setAXVPB(AXVPB* newVal) { mpVPB = newVal; }
void setState(u32 newVal) { mState = newVal; }
void setUnk_0x08(u32 newVal) { unk_0x08 = newVal; }
void setUpdateFlag(u32 newVal) { mUpdateFlag = newVal; }
void setUnk_0x0C(u32 newVal) { unk_0x0C = newVal; }
AXPBMIX* getMix() { return &mMix; }
@@ -31,7 +31,7 @@ private:
AXVPB* mpVPB; // 0x00
u32 mState; // 0x04
u32 unk_0x08; // 0x08
int mUpdateFlag; // 0x0c
int unk_0x0C; // 0x0c
AXPBMIX mMix; // 0x10
};

View File

@@ -266,32 +266,6 @@ namespace ipl {
};
#endif
#ifdef IPL_CHANNEL_SELECT_CPP
template <>
class HermiteIntp<f32> : public utility::FrameController {
public:
HermiteIntp() {}
virtual ~HermiteIntp() {}
void init(const f32& start, const f32& end, f32 maxFrame, f32 startTangent,
f32 endTangent, int playback = ANIM_TYPE_FORWARD, f32 speed = 1.0f) {
mStart = start;
mEnd = end;
utility::FrameController::init(playback, maxFrame, 0.0f, speed);
mStartTangent = startTangent;
mEndTangent = endTangent;
}
inline f32 get() const;
protected:
f32 mStart;
f32 mEnd;
f32 mStartTangent;
f32 mEndTangent;
};
#endif
#ifdef IPL_SD_CHANNEL_SELECT_CPP
} // namespace math
} // namespace ipl

View File

@@ -259,8 +259,8 @@ namespace ipl {
f32 mChanThumbOff_X; // 0xD0
f32 mChanThumbOff_Y; // 0xD4
math::VEC3 mOrthoTrans;
math::VEC2 mOrthoScale;
math::VEC3 unk_0xD8;
math::VEC2 unk_0xE4;
f32 mScaleAdjust; // 0xEC
int mDiskState; // 0xF0

View File

@@ -185,8 +185,8 @@ namespace ipl {
gui::PaneManager* mpGui; // 0x74
BOOL mbHovered[BTN_MAX]; // 0x78
u32 mPendingSceneId;
u32 mExitSeqStep;
u32 unk_0x90;
u32 unk_0x94;
static const char* smButtonName[BTN_MAX];
};

View File

@@ -365,8 +365,8 @@ namespace ipl {
int getChJumpChanPage() { return mChJumpPage; }
int getChJumpChanIndex() { return mChJumpIndex; }
void setDiskChannelReady(bool flag) { mbDiskChannelReady = flag; }
bool isDiskChannelReady() { return mbDiskChannelReady; }
void setUnk_0x1B81(bool flag) { unk_0x1B81 = flag; }
bool isUnk_0x1B81() { return unk_0x1B81; }
void resetChJumpLoad() { mbLoadedChJump = false; }
bool hasLoadedChJump() { return mbLoadedChJump; }
@@ -399,7 +399,7 @@ namespace ipl {
int mBS2State; // 0x1B7C
bool mbCanRefresh; // 0x1B80
bool mbDiskChannelReady;
bool unk_0x1B81;
u8* mpDiskIconBuf; // 0x1B84
u8* mpDiskBannerBuf; // 0x1B88

View File

@@ -33,7 +33,7 @@ namespace ipl {
u64 titleId; // 0x10
bool threadTerminated; // 0x18
bool unk_0x19;
bool mbHasNewMessage; // 0x1A
bool unk_0x1A;
EGG::ExpHeap* getHeap() { return heap; }
} CSData;

View File

@@ -118,26 +118,26 @@ namespace ipl {
public:
Base(int chan, KPADStatus& status) {
mButton = 0;
mDecideHoldCount = 0;
unk_0x08 = 0;
mLastRumbleTime = 0;
mRumbleType = -1;
mChan = chan;
mType = 2;
mbForceInvalid = 0;
unk_0x1C = 0;
KPADEnableDPD(chan);
mbPinching = 0;
mbWasPinching = 0;
mpKpadStatus = &status;
unk_0x1D = 0;
unk_0x1E = 0;
unk_0x20 = &status;
}
Base(int chan, int type, KPADStatus& status) {
mButton = 0;
mDecideHoldCount = 0;
unk_0x08 = 0;
mLastRumbleTime = 0;
mRumbleType = -1;
mChan = chan;
mType = type;
mbForceInvalid = 0;
unk_0x1C = 0;
KPADEnableDPD(chan);
}
@@ -152,15 +152,15 @@ namespace ipl {
protected:
u8 mButton;
u32 mDecideHoldCount;
u32 unk_0x08;
OSTick mLastRumbleTime;
s32 mRumbleType;
u32 mChan;
u32 mType;
u8 mbForceInvalid;
u8 mbPinching;
u8 mbWasPinching;
KPADStatus* mpKpadStatus;
u8 unk_0x1C;
u8 unk_0x1D;
u8 unk_0x1E;
KPADStatus* unk_0x20;
};
class Revolution : public Base {
@@ -206,8 +206,8 @@ namespace ipl {
virtual BOOL isValidDpdClassic() const;
private:
math::VEC2 mClassicCursorPos;
int mClassicCursorTimer;
math::VEC2 unk_0x24;
int unk_0x2C;
};
class Master : public Interface {
@@ -264,18 +264,18 @@ namespace ipl {
public:
Base(int chan, KPADStatus& arg1) {
mButton = 0;
mDecideHoldCount = 0;
unk_0x08 = 0;
mLastRumbleTime = 0;
mRumbleType = -1;
mChan = chan;
mType = 2;
mbForceInvalid = 0;
unk_0x1C = 0;
KPADEnableDPD(chan);
mbPinching = 0;
mbWasPinching = 0;
mpKpadStatus = &arg1;
unk_0x1D = 0;
unk_0x1E = 0;
unk_0x20 = &arg1;
}
virtual ~Base(); // 0x08
@@ -326,15 +326,15 @@ namespace ipl {
// protected:
u8 mButton; // 0x4
u32 mDecideHoldCount; // 0x8
u32 unk_0x08; // 0x8
OSTick mLastRumbleTime; // 0xC
s32 mRumbleType; // 0x10
u32 mChan; // 0x14
u32 mType; // 0x18
u8 mbForceInvalid;
u8 mbPinching; // 0x1D
u8 mbWasPinching; // 0x1E
KPADStatus* mpKpadStatus; // 0x20
u8 unk_0x1C;
u8 unk_0x1D; // 0x1D
u8 unk_0x1E; // 0x1E
KPADStatus* unk_0x20; // 0x20
};
class Interface : public Base {
@@ -446,8 +446,8 @@ namespace ipl {
virtual BOOL isValidDpdClassic() const; // 0x8C
private:
math::VEC2 mClassicCursorPos;
int mClassicCursorTimer;
math::VEC2 unk_0x24;
int unk_0x2C;
};
class Manager {

View File

@@ -27,11 +27,7 @@ namespace ipl {
void init(int type, f32 maxFrame, f32 minFrame, f32 speed = 1.0f);
void initFrame();
#ifdef IPL_CHANNEL_SELECT_CPP
virtual inline void calc();
#else
virtual void calc(); // 0x0C
#endif
void setMaxFrame(f32 value) { mMaxFrame = value; }
f32 getMaxFrame() const { return mMaxFrame; }

View File

@@ -163,12 +163,12 @@ typedef struct _ziGetParam {
ziWChar* candidates; // 0x18
ziU8 maxCandidates; // 0x1C
ziWChar firstCandidate; // 0x1E
ziU8 count; // 0x20 (EZTXGetParam.count)
ziU8 unk_0x20; // 0x20
ziU8 letters; // 0x21
ziU8 completion; // 0x22 (EZTXGetParam.completion)
ziU8* scratch; // 0x24
ziU32 unk_0x28; // 0x28
ziU8 letters; // 0x21
ziU8 count; // 0x22
ziU8* scratch; // 0x24
ziU32 unk_0x28; // 0x28
} ziGetParam;
typedef struct _ziLanguageEntry {
@@ -204,19 +204,19 @@ typedef struct _ziUwdNode {
} ziUwdNode;
struct __zi8_work_data_s {
ziU8 getcPhase; // 0x00
ziU8 unk_0x00;
ziU8 countOnly; // 0x01
ziU8 unk_0x02[2];
ziLanguageEntry* langEntries; // 0x04
ziU8 unk_0x08;
ziU8 unk_0x09;
ziU8 maxWordLength;
ziU8 formatFlags;
ziU8 unk_0x0A;
ziU8 unk_0x0B;
ziU32 targetCount; // 0x0C
ziU32 unk_0x0C;
ziU32 unk_0x10;
ziU16 unk_0x14;
ziU8 cangjieEnabled; // 0x16
ziU8 zhPudMinPrefix;
ziU8 unk_0x17;
ziU8 subLanguage; // 0x18
ziU8 unk_0x19;
ziU16 separator; // 0x1A
@@ -226,12 +226,12 @@ struct __zi8_work_data_s {
ziU16 unk_0xA0[0x42];
ziU16* unk_0x124[1];
ziU8* unk_0x128;
ziU8 uwdPtrCount; // 0x12C
ziU8 unk_0x12C;
ziU8 unk_0x12D;
ziU8 uwdPrioritySort; // 0x12E
ziU8 unk_0x12E;
ziU8 unk_0x12F;
ziPtr uwdDicts[2]; // 0x130
ziU8 uwdDictCount; // 0x138
ziPtr unk_0x130[2];
ziU8 unk_0x138;
ziU8 unk_0x139[3];
ziU32 unk_0x13C;
ziU8 unk_0x140;
@@ -269,18 +269,18 @@ struct __zi8_work_data_s {
ziU8 unk_0x1414[4];
ziU8 formatCount;
ziU8 unk_0x1419;
ziU16 capacity; // 0x141A
ziU8 forceAltGraph; // 0x141C (lang FI + group 0xC -> graphTableId 0x10)
ziU8 advanceGroup; // 0x141D (nonzero: skip first dawg group)
ziU8 graphTableId; // 0x141E
ziU16 unk_0x141A;
ziU8 unk_0x141C;
ziU8 unk_0x141D;
ziU8 unk_0x141E;
ziU8 maxCnt; // 0x141F
ziU8 unk_0x1420[4];
zi8DawgCtx dawgCtx; // 0x1424
ziU8 unk_0x1760[4]; // 0x1760
ziU8* groupPtr; // 0x1764
ziU8* unk_0x1764; // 0x1764
ziU8 unk_0x1768;
ziU8 unk_0x1769[0x81];
ziU16 matchOffset; // 0x17EA
ziU16 unk_0x17EA;
ziU8 unk_0x17EC;
ziU8 unk_0x17ED[3];
ziU8* dawgGroup; // 0x17F0
@@ -309,26 +309,26 @@ struct __zi8_work_data_s {
ziWChar unk_0x1A92[0x41];
ziU8 unk_0x1B14;
ziU8 unk_0x1B15[3];
ziU16* unicodeMap; // 0x1B18
ziU16 unicodeRange1Min; // 0x1B1C
ziU16 unicodeRange1Max; // 0x1B1E
ziU16 unicodeRange2Min; // 0x1B20
ziU16 unicodeRange2Max; // 0x1B22
ziU8 unicodeMapSubLang; // 0x1B24
ziU16* unk_0x1B18;
ziU16 unk_0x1B1C;
ziU16 unk_0x1B1E;
ziU16 unk_0x1B20;
ziU16 unk_0x1B22;
ziU8 unk_0x1B24;
ziU8 unk_0x1B25[3];
union {
ziU32 word;
struct {
ziU32 msb : 1;
} bits;
} pyFuzzy; // 0x1B28
} unk_0x1B28;
union {
ziU32 word;
struct {
ziU32 msb : 1;
} bits;
} unk_0x1B2C;
ziU8 koAltTables; // 0x1B30
ziU8 unk_0x1B30;
ziU8 unk_0x1B31;
ziU16 unk_0x1B32;
ziU16 unk_0x1B34;

View File

@@ -21,7 +21,7 @@ ziS32 Zi8Punctuation(ziGetParam* param ZI_NEED_WORK) {
}
if (fc == 0) {
count++;
if (ZI_WORK->getcPhase == 0) {
if (ZI_WORK->unk_0x00 == 0) {
param->candidates[i++] = Zi8PunctTable[j];
if ((param->context & 0x10) != 0) {
param->candidates[i++] = 0x20;
@@ -33,7 +33,7 @@ ziS32 Zi8Punctuation(ziGetParam* param ZI_NEED_WORK) {
break;
}
} else {
if (count >= (ziS32)ZI_WORK->targetCount) {
if (count >= (ziS32)ZI_WORK->unk_0x0C) {
return count;
}
}
@@ -42,7 +42,7 @@ ziS32 Zi8Punctuation(ziGetParam* param ZI_NEED_WORK) {
}
j++;
}
if (ZI_WORK->getcPhase == 0) {
if (ZI_WORK->unk_0x00 == 0) {
param->letters = count;
}
return count;

View File

@@ -2,14 +2,14 @@
#include <zi8clib/zitypes.h>
ziU32 Zi8GetZHuwdPtr(ziU32* arg0, ziU16* arg1 ZI_NEED_WORK) {
if (ZI_WORK->uwdPtrCount == 0) {
if (ZI_WORK->unk_0x12C == 0) {
*arg0 = 0;
*arg1 = 0;
Zi8LogError(0x1A5, ZI_WORK);
return 0;
} else {
*arg1 = ZI_WORK->unk_0x124[ZI_WORK->uwdPtrCount - 1][1] / 3;
*arg0 = (ziU32)ZI_WORK->unk_0x124[ZI_WORK->uwdPtrCount - 1];
*arg1 = ZI_WORK->unk_0x124[ZI_WORK->unk_0x12C - 1][1] / 3;
*arg0 = (ziU32)ZI_WORK->unk_0x124[ZI_WORK->unk_0x12C - 1];
*arg0 += 8;
Zi8LogError(0x64, ZI_WORK);
return 1;

View File

@@ -425,8 +425,8 @@ static int zi8InternalGetZH(ziGetParam* request, ZiChineseOptions* options, ziPt
charset <<= 4;
skipCount = request->firstCandidate;
request->letters = 0;
request->completion = 0;
request->count = 0;
request->unk_0x20 = 0;
if (getMode != 7 && getMode != 10 && getMode != 8 && getMode != 9) {
Zi8PrepareMatch(request, &match, 0, work);
} else {
@@ -577,27 +577,27 @@ static int zi8InternalGetZH(ziGetParam* request, ZiChineseOptions* options, ziPt
if (getMode == 1) {
switch ((int)match.phon2[index] >> 9) {
case 24: case 25:
if (((ziFuzzyPYPairs*)&((struct __zi8_work_data_s*)work)->pyFuzzy.word)->cANDch) ordinalIndex = 0xFDFF;
if (((ziFuzzyPYPairs*)&((struct __zi8_work_data_s*)work)->unk_0x1B28.word)->cANDch) ordinalIndex = 0xFDFF;
break;
case 26: case 27:
if (((ziFuzzyPYPairs*)&((struct __zi8_work_data_s*)work)->pyFuzzy.word)->sANDsh) ordinalIndex = 0xFDFF;
if (((ziFuzzyPYPairs*)&((struct __zi8_work_data_s*)work)->unk_0x1B28.word)->sANDsh) ordinalIndex = 0xFDFF;
break;
case 28: case 29:
if (((ziFuzzyPYPairs*)&((struct __zi8_work_data_s*)work)->pyFuzzy.word)->zANDzh) ordinalIndex = 0xFDFF;
if (((ziFuzzyPYPairs*)&((struct __zi8_work_data_s*)work)->unk_0x1B28.word)->zANDzh) ordinalIndex = 0xFDFF;
break;
case 56: case 59:
if (((ziFuzzyPYPairs*)&((struct __zi8_work_data_s*)work)->pyFuzzy.word)->fANDh) ordinalIndex = 0xF9FF;
if (((ziFuzzyPYPairs*)&((struct __zi8_work_data_s*)work)->unk_0x1B28.word)->fANDh) ordinalIndex = 0xF9FF;
break;
case 38:
if (((ziFuzzyPYPairs*)&((struct __zi8_work_data_s*)work)->pyFuzzy.word)->nANDl) ordinalIndex = 0xE5FF;
if (((ziFuzzyPYPairs*)&((struct __zi8_work_data_s*)work)->unk_0x1B28.word)->nANDl) ordinalIndex = 0xE5FF;
break;
case 43:
if (((ziFuzzyPYPairs*)&((struct __zi8_work_data_s*)work)->pyFuzzy.word)->nANDl && ((ziFuzzyPYPairs*)&((struct __zi8_work_data_s*)work)->pyFuzzy.word)->lANDr) ordinalIndex = 0xE1FF;
else if (((ziFuzzyPYPairs*)&((struct __zi8_work_data_s*)work)->pyFuzzy.word)->lANDr) ordinalIndex = 0xF1FF;
else if (((ziFuzzyPYPairs*)&((struct __zi8_work_data_s*)work)->pyFuzzy.word)->nANDl) ordinalIndex = 0xE5FF;
if (((ziFuzzyPYPairs*)&((struct __zi8_work_data_s*)work)->unk_0x1B28.word)->nANDl && ((ziFuzzyPYPairs*)&((struct __zi8_work_data_s*)work)->unk_0x1B28.word)->lANDr) ordinalIndex = 0xE1FF;
else if (((ziFuzzyPYPairs*)&((struct __zi8_work_data_s*)work)->unk_0x1B28.word)->lANDr) ordinalIndex = 0xF1FF;
else if (((ziFuzzyPYPairs*)&((struct __zi8_work_data_s*)work)->unk_0x1B28.word)->nANDl) ordinalIndex = 0xE5FF;
break;
case 44:
if (((ziFuzzyPYPairs*)&((struct __zi8_work_data_s*)work)->pyFuzzy.word)->lANDr) ordinalIndex = 0xF1FF;
if (((ziFuzzyPYPairs*)&((struct __zi8_work_data_s*)work)->unk_0x1B28.word)->lANDr) ordinalIndex = 0xF1FF;
break;
}
} else {
@@ -650,13 +650,13 @@ static int zi8InternalGetZH(ziGetParam* request, ZiChineseOptions* options, ziPt
if (getMode == 1) {
switch (match.phon2[index] & 0x1F0) {
case 0x10: case 0x80: case 0x100:
if (((ziFuzzyPYPairs*)&((struct __zi8_work_data_s*)work)->pyFuzzy.word)->anANDang) ordinalIndex = 0xFFF7;
if (((ziFuzzyPYPairs*)&((struct __zi8_work_data_s*)work)->unk_0x1B28.word)->anANDang) ordinalIndex = 0xFFF7;
break;
case 0x180:
if (((ziFuzzyPYPairs*)&((struct __zi8_work_data_s*)work)->pyFuzzy.word)->enANDeng) ordinalIndex = 0xFFF7;
if (((ziFuzzyPYPairs*)&((struct __zi8_work_data_s*)work)->unk_0x1B28.word)->enANDeng) ordinalIndex = 0xFFF7;
break;
case 0x60:
if (((ziFuzzyPYPairs*)&((struct __zi8_work_data_s*)work)->pyFuzzy.word)->inANDing) ordinalIndex = 0xFFF7;
if (((ziFuzzyPYPairs*)&((struct __zi8_work_data_s*)work)->unk_0x1B28.word)->inANDing) ordinalIndex = 0xFFF7;
break;
}
} else {
@@ -720,7 +720,7 @@ static int zi8InternalGetZH(ziGetParam* request, ZiChineseOptions* options, ziPt
return 0;
}
emitWords = 1;
if (request->completion) request->completion = request->elementCount;
if (request->count) request->count = request->elementCount;
}
if (!options->candidateMode) Zi8InitDupWordBuf(work);
records = (ziU8*)Zi8GetTableAddress(1, 0, work);
@@ -930,13 +930,13 @@ engine_search:
output[outputIndex++] = ' ';
if (outputIndex > outputLimit) {
request->letters = emittedCount;
request->count = emittedCount;
request->unk_0x20 = emittedCount;
goto engine_finish;
}
} else output[emittedCount++] = character;
if (emittedCount >= request->maxCandidates) {
request->letters = emittedCount;
request->count = emittedCount;
request->unk_0x20 = emittedCount;
goto engine_finish;
}
}
@@ -981,7 +981,7 @@ pud_candidate:
++rangeIndex;
}
if (rangeIndex == request->elementCount) {
if (!(request->context & 0x10)) request->completion = request->elementCount;
if (!(request->context & 0x10)) request->count = request->elementCount;
candidateStatus = 1;
character = currentSpelling[wordLength];
candidateOrdinal = 0xFFFF;
@@ -1108,13 +1108,13 @@ pud_charset:
output[outputIndex++] = ' ';
if (outputIndex > outputLimit) {
request->letters = emittedCount;
request->count = emittedCount;
request->unk_0x20 = emittedCount;
goto engine_finish;
}
} else output[emittedCount++] = character;
if (emittedCount >= request->maxCandidates) {
request->letters = emittedCount;
request->count = emittedCount;
request->unk_0x20 = emittedCount;
goto engine_finish;
}
}
@@ -1302,13 +1302,13 @@ context_word_lookup:
output[outputIndex++] = ' ';
if (outputIndex > outputLimit) {
request->letters = emittedCount;
request->count = emittedCount;
request->unk_0x20 = emittedCount;
goto engine_finish;
}
} else output[emittedCount++] = previousOrdinal;
if (emittedCount >= request->maxCandidates) {
request->letters = emittedCount;
request->count = emittedCount;
request->unk_0x20 = emittedCount;
goto engine_finish;
}
}
@@ -1321,7 +1321,7 @@ context_phrase_next:
}
}
context_results_done:
if (request->wordCharCount) request->count = emittedCount;
if (request->wordCharCount) request->unk_0x20 = emittedCount;
if (getOptions == 5) goto engine_finish;
if ((wordLength && (getMode == 1 || getMode == 2) && match.nCand > 1) ||
(wordLength && getMode == 0 && match.nSeg > 1)) {
@@ -1752,7 +1752,7 @@ tone_candidates:
}
}
user_character_search:
if (((struct __zi8_work_data_s*)work)->uwdPtrCount && (getMode != 0 || !firstPhoneticPass) &&
if (((struct __zi8_work_data_s*)work)->unk_0x12C && (getMode != 0 || !firstPhoneticPass) &&
!options->countOnly && (match.nCand <= 1 || (getMode != 1 && getMode != 2)) &&
Zi8GetZHuwdPtr(&userEntries, &userCount, work) && (getMode != 0 || match.nSeg <= 1)) {
userIndex = 0;
@@ -2572,7 +2572,7 @@ filtered_accept:
if (totalResults >= options->maxResults) goto engine_finish;
} else if (!options->countOnly) {
if (++((ZiChineseWork*)work)->duplicateIndex >= 64) ((ZiChineseWork*)work)->duplicateIndex = 0;
if (filteringMode == 4) request->count = emittedCount + 1;
if (filteringMode == 4) request->unk_0x20 = emittedCount + 1;
if (emitWords) {
++emittedCount;
outputIndex += rangeCount;

View File

@@ -39,10 +39,10 @@ ziU32 Zi8MatchROMdata0(ziWChar* elements, ziU8 count, ziU8 language,
}
if (mode == 1) acceptPrefix = 0;
} else {
if (ZI_WORK->graphTableId != 0 && graphTable == 0xc &&
Zi8GetTableSize(language, ZI_WORK->graphTableId, ZI_WORK) != 0) {
graphData = (ziU8*)Zi8GetTableAddress(language, ZI_WORK->graphTableId, ZI_WORK);
keyTable = ZI_WORK->graphTableId + 1;
if (ZI_WORK->unk_0x141E != 0 && graphTable == 0xc &&
Zi8GetTableSize(language, ZI_WORK->unk_0x141E, ZI_WORK) != 0) {
graphData = (ziU8*)Zi8GetTableAddress(language, ZI_WORK->unk_0x141E, ZI_WORK);
keyTable = ZI_WORK->unk_0x141E + 1;
} else {
if (Zi8GetTableSize(language, graphTable, ZI_WORK) == 0) {
Zi8LogError(0x961, ZI_WORK);
@@ -159,7 +159,7 @@ ziU8* NextDawgGroup(ziU8* group, ziU8 language, ziPtr __zi8_work_data)
Zi8LogError(0x962,ZI_WORK);
return 0;
}
if (ZI_WORK->advanceGroup == 0) {
if (ZI_WORK->unk_0x141D == 0) {
return group;
}
}
@@ -184,36 +184,36 @@ unsigned int Zi8MatchROMdata1(ziWChar *elements, ziU8 count, ziU8 language, ziWC
result = 0;
if (status == 0) {
ZI_WORK->groupPtr = (ziU8*)group;
if (ZI_WORK->groupPtr == 0) {
ZI_WORK->unk_0x1764 = (ziU8*)group;
if (ZI_WORK->unk_0x1764 == 0) {
if (Zi8GetTableSize(language & 0xff,0xb,ZI_WORK) != 0) {
ZI_WORK->groupPtr = (ziU8*)(tableAddress = Zi8GetTableAddress(language & 0xff,0xb,ZI_WORK));
ZI_WORK->unk_0x1764 = (ziU8*)(tableAddress = Zi8GetTableAddress(language & 0xff,0xb,ZI_WORK));
}
}
if (ZI_WORK->groupPtr != 0) {
for (; (*ZI_WORK->groupPtr != 0xff && ((groupIndex & 0xff) != 0));
if (ZI_WORK->unk_0x1764 != 0) {
for (; (*ZI_WORK->unk_0x1764 != 0xff && ((groupIndex & 0xff) != 0));
groupIndex = groupIndex - 1) {
while (*ZI_WORK->groupPtr != 0xff) {
ZI_WORK->groupPtr += 2;
while (*ZI_WORK->unk_0x1764 != 0xff) {
ZI_WORK->unk_0x1764 += 2;
}
ZI_WORK->groupPtr++;
ZI_WORK->unk_0x1764++;
}
}
}
if (ZI_WORK->groupPtr == 0) {
if (ZI_WORK->unk_0x1764 == 0) {
result = Zi8MatchROMdata0(elements,count,language & 0xff,output,capacity & 0xffff,
mode & 0xff,status & 0xff,0,1,acceptPrefix,0,&ZI_WORK->dawgCtx,
ZI_WORK->unk_0x1760,ZI_WORK);
}
else {
while (*ZI_WORK->groupPtr != 0xff) {
while (*ZI_WORK->unk_0x1764 != 0xff) {
result = Zi8MatchROMdata0(elements,count,language & 0xff,output,
capacity & 0xffff,mode & 0xff,status & 0xff,
*ZI_WORK->groupPtr,
ZI_WORK->groupPtr[1],acceptPrefix,0,
*ZI_WORK->unk_0x1764,
ZI_WORK->unk_0x1764[1],acceptPrefix,0,
&ZI_WORK->dawgCtx,ZI_WORK->unk_0x1760,ZI_WORK);
if ((result & 0xff) != 0) break;
ZI_WORK->groupPtr += 2;
ZI_WORK->unk_0x1764 += 2;
status = 0;
}
}
@@ -230,31 +230,31 @@ unsigned int Zi8MatchROMdata2(ziWChar* elements, ziU8 count, ziU8 language,
if (reservedMode != 0) return 0;
if (status == 0) {
ZI_WORK->unk_0x1768 = 0;
ZI_WORK->matchOffset = 0;
if (group != 0 && *group == 0xc && language == 10 && ZI_WORK->forceAltGraph != 0) {
ZI_WORK->graphTableId = 0x10;
ZI_WORK->unk_0x17EA = 0;
if (group != 0 && *group == 0xc && language == 10 && ZI_WORK->unk_0x141C != 0) {
ZI_WORK->unk_0x141E = 0x10;
} else {
ZI_WORK->graphTableId = 0;
ZI_WORK->unk_0x141E = 0;
}
}
search_segment:
ZI_WORK->maxCnt = 1;
result = Zi8MatchROMdata1(elements + ZI_WORK->matchOffset,
count - ZI_WORK->matchOffset, language,
&ZI_WORK->unk_0x17F4[ZI_WORK->matchOffset], capacity,
result = Zi8MatchROMdata1(elements + ZI_WORK->unk_0x17EA,
count - ZI_WORK->unk_0x17EA, language,
&ZI_WORK->unk_0x17F4[ZI_WORK->unk_0x17EA], capacity,
mode, status, ZI_WORK->unk_0x1768, (char*)group,
acceptPrefix, ZI_WORK);
if ((ziU8)result != 0) {
for (index = (ziU8)(ZI_WORK->matchOffset + result); index != 0; index--) {
for (index = (ziU8)(ZI_WORK->unk_0x17EA + result); index != 0; index--) {
output[index - 1] = ZI_WORK->unk_0x17F4[index - 1];
}
result = (ziU8)(result + ZI_WORK->matchOffset);
result = (ziU8)(result + ZI_WORK->unk_0x17EA);
} else {
if (status != 0 || count == 1) goto finish_segments;
if (mode == 1 && ZI_WORK->unk_0x1768 == 0 &&
(ziU8)Zi8MatchROMdata1(elements + ZI_WORK->matchOffset,
count - ZI_WORK->matchOffset, language,
&ZI_WORK->unk_0x17F4[ZI_WORK->matchOffset], capacity,
(ziU8)Zi8MatchROMdata1(elements + ZI_WORK->unk_0x17EA,
count - ZI_WORK->unk_0x17EA, language,
&ZI_WORK->unk_0x17F4[ZI_WORK->unk_0x17EA], capacity,
0, status, ZI_WORK->unk_0x1768, (char*)group,
acceptPrefix, ZI_WORK) != 0) goto finish_segments;
if ((Zi8GetTableCount(language, 0x1f, ZI_WORK) & 4) == 0) {
@@ -264,23 +264,23 @@ search_segment:
}
if (ZI_WORK->maxCnt > capacity) goto finish_segments;
for (index = ZI_WORK->maxCnt; index != 0; index--) {
result = Zi8MatchROMdata1(elements + ZI_WORK->matchOffset, index, language,
&ZI_WORK->unk_0x17F4[ZI_WORK->matchOffset], capacity,
result = Zi8MatchROMdata1(elements + ZI_WORK->unk_0x17EA, index, language,
&ZI_WORK->unk_0x17F4[ZI_WORK->unk_0x17EA], capacity,
1, 0, ZI_WORK->unk_0x1768, (char*)group,
acceptPrefix, ZI_WORK);
if ((ziU8)result != 0) {
ZI_WORK->matchOffset += (ziU8)result;
if (ZI_WORK->matchOffset == count) return 0;
ZI_WORK->unk_0x17EA += (ziU8)result;
if (ZI_WORK->unk_0x17EA == count) return 0;
ZI_WORK->unk_0x1768++;
status = 0;
ZI_WORK->graphTableId = 0;
ZI_WORK->unk_0x141E = 0;
if (ZI_WORK->dawgCtx.key == 0 && language == 10) {
for (index = 0; index < ZI_WORK->matchOffset; index++) {
for (index = 0; index < ZI_WORK->unk_0x17EA; index++) {
switch (ZI_WORK->unk_0x17F4[index]) {
case 0x61:
case 0x6f:
case 0x75:
ZI_WORK->graphTableId = 0x10;
ZI_WORK->unk_0x141E = 0x10;
goto search_segment;
}
}

View File

@@ -8,15 +8,11 @@ extern ziU8 Zi8SyllablesROMdata(ziWChar* keys, ziU8 count, ziU8 lang, ziWChar* o
ziU16 a, ziU8 b, ziU8* cntOut, ziU8 c ZI_NEED_WORK);
typedef struct _ziSwParam {
ziU8 countOnly; // 0x00 - same layout as ZiCandidateOptions
ziU8 maxWordLength; // 0x01
ziU8 lookupMode; // 0x02
ziU8 suffixOnly; // 0x03
ziU8 controls[8]; // 0x04
ziS32 maxCount; // 0x0C - signed view of ZiCandidateOptions.maxCount
ziU16 capacity; // 0x10
ziU8 minWordLength; // 0x12
ziU8 flags; // 0x13
ziU8 flag;
ziU8 unk_0x01[0xB];
ziS32 count;
ziU16 cap;
ziU8 unk_0x12[2];
} ziSwParam;
ziU32 Zi8GetSyllablesCandidates(ziGetParam* param, ziSwParam* sw ZI_NEED_WORK) {
@@ -58,16 +54,16 @@ ziU32 Zi8GetSyllablesCandidates(ziGetParam* param, ziSwParam* sw ZI_NEED_WORK) {
goto end;
}
if (sw->countOnly != 0 || (param->getOptions & 0xFD) != 0x81) {
if (sw->flag != 0 || (param->getOptions & 0xFD) != 0x81) {
out = buf;
rem = 0x40;
} else {
out = (ziWChar*)param->candidates;
rem = sw->capacity - 1;
rem = sw->cap - 1;
}
if ((param->getOptions & 0xFD) == 0x80) {
u28 = (ziU8*)param->candidates;
rem = sw->capacity - 1;
rem = sw->cap - 1;
}
if (rem <= param->elementCount) {
@@ -98,8 +94,8 @@ ziU32 Zi8GetSyllablesCandidates(ziGetParam* param, ziSwParam* sw ZI_NEED_WORK) {
firstCand--;
goto L5dc;
}
if (sw->countOnly != 0) {
if (++count >= sw->maxCount) goto end;
if (sw->flag != 0) {
if (++count >= sw->count) goto end;
goto L5dc;
}
@@ -151,8 +147,8 @@ L464b:
firstCand--;
goto L560;
}
if (sw->countOnly != 0) {
if (++count >= sw->maxCount) goto end;
if (sw->flag != 0) {
if (++count >= sw->count) goto end;
goto L560;
}
if (u28 != 0) {
@@ -206,7 +202,7 @@ dec:
goto L560;
end:
if (sw->countOnly != 0) {
if (sw->flag != 0) {
param->letters = 0;
} else {
param->letters = (ziU8)count;

View File

@@ -32,9 +32,9 @@ ziU32 Zi8GetCandidatesOrCount(ziGetParam* parameters, ZiCandidateOptions* option
ziBool Zi8ZHsetPYfuzzyPairs(ziFuzzyPYPairs pairs ZI_NEED_WORK) {
if (pairs.ziDefault) {
ZI_WORK->pyFuzzy.word = *(const ziU32*)&Zi8PYdefaultFuzzyPairs;
ZI_WORK->unk_0x1B28.word = *(const ziU32*)&Zi8PYdefaultFuzzyPairs;
} else {
ZI_WORK->pyFuzzy.word = *(ziU32*)&pairs;
ZI_WORK->unk_0x1B28.word = *(ziU32*)&pairs;
}
return 1;
}
@@ -158,7 +158,7 @@ static ziBool Zi8AlphaSignature(ziGetParam* parameters, ziBool countOnly ZI_NEED
length = length - parameters->firstCandidate;
if (countOnly != 0) {
parameters->letters = length;
ZI_WORK->maxWordLength = 0xff;
ZI_WORK->unk_0x0A = 0xff;
return 1;
}
if (parameters->maxCandidates < length) length = parameters->maxCandidates;
@@ -175,7 +175,7 @@ static ziBool Zi8AlphaSignature(ziGetParam* parameters, ziBool countOnly ZI_NEED
current = signatures.first;
length = signatures.length;
}
if (length > ZI_WORK->maxWordLength) length = ZI_WORK->maxWordLength;
if (length > ZI_WORK->unk_0x0A) length = ZI_WORK->unk_0x0A;
if ((parameters->elementCount < ZI_WORK->unk_0x140C[0] ||
(parameters->getOptions & 0x7e) == 2) && length > parameters->elementCount) {
length = parameters->elementCount;
@@ -185,7 +185,7 @@ static ziBool Zi8AlphaSignature(ziGetParam* parameters, ziBool countOnly ZI_NEED
if (parameters->letters == 2) {
current = signatures.second;
length = secondLength;
if (length > ZI_WORK->maxWordLength) length = ZI_WORK->maxWordLength;
if (length > ZI_WORK->unk_0x0A) length = ZI_WORK->unk_0x0A;
if ((parameters->elementCount < ZI_WORK->unk_0x140C[0] ||
(parameters->getOptions & 0x7e) == 2) && length > parameters->elementCount) {
length = parameters->elementCount;
@@ -194,7 +194,7 @@ static ziBool Zi8AlphaSignature(ziGetParam* parameters, ziBool countOnly ZI_NEED
*output++ = 0;
}
*output++ = 0;
ZI_WORK->maxWordLength = 0xff;
ZI_WORK->unk_0x0A = 0xff;
return 1;
}
@@ -226,7 +226,7 @@ static ziBool Zi8ZhSignature(ziGetParam* parameters, ziBool countOnly ZI_NEED_WO
length = length - parameters->firstCandidate;
if (countOnly != 0) {
parameters->letters = length;
ZI_WORK->maxWordLength = 0xff;
ZI_WORK->unk_0x0A = 0xff;
return 1;
}
if (parameters->maxCandidates < length) length = parameters->maxCandidates;
@@ -279,13 +279,13 @@ static ziBool Zi8ZhSignature(ziGetParam* parameters, ziBool countOnly ZI_NEED_WO
ziU8 _Zi8GetCandidates(ziGetParam* parameters ZI_NEED_WORK) {
ZiCandidateOptions options = {0};
options.capacity = ZI_WORK->capacity;
options.capacity = ZI_WORK->unk_0x141A;
return Zi8GetCandidatesOrCount(parameters, &options, ZI_WORK);
}
ziU8 _Zi8CheckCandidates(ziGetParam* parameters ZI_NEED_WORK) {
ZiCandidateOptions options = {0};
options.capacity = ZI_WORK->capacity;
options.capacity = ZI_WORK->unk_0x141A;
options.flags = 1;
return Zi8GetCandidatesOrCount(parameters, &options, ZI_WORK);
}
@@ -324,7 +324,7 @@ ziU32 Zi8GetCandidatesOrCount(ziGetParam* parameters, ZiCandidateOptions* option
saved.savedCandidates = 0;
saved.restoreCandidates = 0;
if (options->lookupMode == '\0') {
if (((ZI_WORK->getcPhase == '\t') && (parameters->elementCount != 0)) &&
if (((ZI_WORK->unk_0x00 == '\t') && (parameters->elementCount != 0)) &&
(((parameters->elements[parameters->elementCount - 1] == 0xEFF8 &&
((ziU8)Zi8AlphaSignature(parameters,options->countOnly,ZI_WORK) != 0)) ||
((parameters->elements[parameters->elementCount - 1] == 0xEF04 &&
@@ -339,22 +339,22 @@ ziU32 Zi8GetCandidatesOrCount(ziGetParam* parameters, ZiCandidateOptions* option
if ((parameters->elementCount == 1) && (parameters->firstCandidate == 0)) {
switch (parameters->language) {
case 1:
if ((ZI_WORK->getcPhase == '\0') || (ZI_WORK->countOnly == options->countOnly)) {
switch(ZI_WORK->getcPhase) {
if ((ZI_WORK->unk_0x00 == '\0') || (ZI_WORK->countOnly == options->countOnly)) {
switch(ZI_WORK->unk_0x00) {
case '\0':
if (parameters->elements[0] == 0xEF04) {
ZI_WORK->countOnly = options->countOnly;
ZI_WORK->getcPhase = '\x01';
ZI_WORK->unk_0x00 = '\x01';
}
break;
case '\x02':
case '\x04':
case '\x06':
if (parameters->elements[0] == 0xEF04) {
++ZI_WORK->getcPhase;
++ZI_WORK->unk_0x00;
}
else {
ZI_WORK->getcPhase = '\0';
ZI_WORK->unk_0x00 = '\0';
}
break;
case '\x01':
@@ -362,17 +362,17 @@ ziU32 Zi8GetCandidatesOrCount(ziGetParam* parameters, ZiCandidateOptions* option
case '\x05':
case '\a':
if (parameters->elements[0] == 0xEF01) {
++ZI_WORK->getcPhase;
++ZI_WORK->unk_0x00;
}
else {
ZI_WORK->getcPhase = '\0';
ZI_WORK->unk_0x00 = '\0';
}
break;
case '\b':
case '\t':
if ((parameters->elements[0] == 0xEF04) &&
((ziU8)Zi8ZhSignature(parameters,options->countOnly,ZI_WORK) != 0)) {
ZI_WORK->getcPhase = '\t';
ZI_WORK->unk_0x00 = '\t';
candidateCount = (unsigned int)parameters->letters;
if (options->countOnly != '\0') {
parameters->letters = 0;
@@ -381,10 +381,10 @@ ziU32 Zi8GetCandidatesOrCount(ziGetParam* parameters, ZiCandidateOptions* option
return candidateCount;
}
default:
ZI_WORK->getcPhase = '\0';
ZI_WORK->unk_0x00 = '\0';
}
if ((ZI_WORK->getcPhase == '\0') && (parameters->elements[0] == 0xEF04)) {
ZI_WORK->getcPhase = '\x01';
if ((ZI_WORK->unk_0x00 == '\0') && (parameters->elements[0] == 0xEF04)) {
ZI_WORK->unk_0x00 = '\x01';
}
}
break;
@@ -400,75 +400,75 @@ ziU32 Zi8GetCandidatesOrCount(ziGetParam* parameters, ZiCandidateOptions* option
break;
case 0x11:
default:
if ((ZI_WORK->getcPhase == '\0') || (ZI_WORK->countOnly == options->countOnly)) {
switch(ZI_WORK->getcPhase) {
if ((ZI_WORK->unk_0x00 == '\0') || (ZI_WORK->countOnly == options->countOnly)) {
switch(ZI_WORK->unk_0x00) {
case '\0':
if (parameters->elements[0] == 0xEFF2) {
ZI_WORK->countOnly = options->countOnly;
ZI_WORK->getcPhase = '\x01';
ZI_WORK->unk_0x00 = '\x01';
}
break;
case '\x01':
if (parameters->elements[0] == 0xEFF3) {
ZI_WORK->getcPhase = '\x02';
ZI_WORK->unk_0x00 = '\x02';
}
else {
ZI_WORK->getcPhase = '\0';
ZI_WORK->unk_0x00 = '\0';
}
break;
case '\x02':
if (parameters->elements[0] == 0xEFF5) {
ZI_WORK->getcPhase = '\x03';
ZI_WORK->unk_0x00 = '\x03';
}
else {
ZI_WORK->getcPhase = '\0';
ZI_WORK->unk_0x00 = '\0';
}
break;
case '\x03':
if (parameters->elements[0] == 0xEFF7) {
ZI_WORK->getcPhase = '\x04';
ZI_WORK->unk_0x00 = '\x04';
}
else {
ZI_WORK->getcPhase = '\0';
ZI_WORK->unk_0x00 = '\0';
}
break;
case '\x04':
if (parameters->elements[0] == 0xEFF8) {
ZI_WORK->getcPhase = '\x05';
ZI_WORK->unk_0x00 = '\x05';
}
else {
ZI_WORK->getcPhase = '\0';
ZI_WORK->unk_0x00 = '\0';
}
break;
case '\x05':
if (parameters->elements[0] == 0xEFF9) {
ZI_WORK->getcPhase = '\x06';
ZI_WORK->unk_0x00 = '\x06';
}
else {
ZI_WORK->getcPhase = '\0';
ZI_WORK->unk_0x00 = '\0';
}
break;
case '\x06':
if (parameters->elements[0] == 0xEFF2) {
ZI_WORK->getcPhase = '\a';
ZI_WORK->unk_0x00 = '\a';
}
else {
ZI_WORK->getcPhase = '\0';
ZI_WORK->unk_0x00 = '\0';
}
break;
case '\a':
if (parameters->elements[0] == 0xEFF5) {
ZI_WORK->getcPhase = '\b';
ZI_WORK->unk_0x00 = '\b';
}
else {
ZI_WORK->getcPhase = '\0';
ZI_WORK->unk_0x00 = '\0';
}
break;
case '\b':
case '\t':
if ((parameters->elements[0] == 0xEFF8) &&
((ziU8)Zi8AlphaSignature(parameters,options->countOnly,ZI_WORK) != 0)) {
ZI_WORK->getcPhase = '\t';
ZI_WORK->unk_0x00 = '\t';
candidateCount = (unsigned int)parameters->letters;
if (options->countOnly != '\0') {
parameters->letters = 0;
@@ -477,24 +477,24 @@ ziU32 Zi8GetCandidatesOrCount(ziGetParam* parameters, ZiCandidateOptions* option
return candidateCount;
}
default:
ZI_WORK->getcPhase = '\0';
ZI_WORK->unk_0x00 = '\0';
}
if ((ZI_WORK->getcPhase == '\0') && (parameters->elements[0] == 0xEFF2)) {
ZI_WORK->getcPhase = '\x01';
if ((ZI_WORK->unk_0x00 == '\0') && (parameters->elements[0] == 0xEFF2)) {
ZI_WORK->unk_0x00 = '\x01';
}
}
break;
}
}
else if (1 < parameters->elementCount) {
ZI_WORK->getcPhase = '\0';
ZI_WORK->unk_0x00 = '\0';
}
}
ZI_WORK->subLanguage = parameters->subLanguage;
ZI_WORK->cangjieEnabled = Zi8GetFormatVersion(1,ZI_WORK) & 2;
options->maxCount = ZI_WORK->unk_0x10;
options->maxWordLength = ZI_WORK->maxWordLength;
ZI_WORK->maxWordLength = -1;
options->maxWordLength = ZI_WORK->unk_0x0A;
ZI_WORK->unk_0x0A = -1;
if ((ziU8)Zi8LangSupported(parameters->language,ZI_WORK) == 0) {
Zi8LogError(0x163,ZI_WORK);
return 0;
@@ -521,7 +521,7 @@ ziU32 Zi8GetCandidatesOrCount(ziGetParam* parameters, ZiCandidateOptions* option
((ziU8)Zi8IsCharacter(parameters->elements[0],ZI_WORK) != 0)))) {
saved.convertedElementCount = Zi8GetCharInfo(parameters->elements[0],characterInfo,0x10,1,ZI_WORK);
if (saved.convertedElementCount == 0) {
parameters->letters = parameters->completion = parameters->count = 0;
parameters->letters = parameters->count = parameters->unk_0x20 = 0;
candidateCount = 0;
error = 900;
}
@@ -540,7 +540,7 @@ ziU32 Zi8GetCandidatesOrCount(ziGetParam* parameters, ZiCandidateOptions* option
parameters->elements = saved.savedElements;
parameters->elementCount = saved.savedElementCount;
parameters->getMode = saved.savedGetMode;
parameters->completion = 1;
parameters->count = 1;
}
}
else if ((parameters->language == 1) && (parameters->getMode == 0xf)) {
@@ -711,6 +711,6 @@ void Zi8Memcpy(ziU8* destination, ziU8* source, ziS32 count) {
}
ziBool Zi8SetMaxWordLength(ziU8 length ZI_NEED_WORK) {
ZI_WORK->maxWordLength = length;
ZI_WORK->unk_0x0A = length;
return 1;
}

View File

@@ -17,13 +17,13 @@ ziU8 Zi8InitializeDynamic(ziLanguageEntry* langEntries ZI_NEED_WORK) {
Zi8Memset(__zi8_work_data, 0, 0x1B44);
ZI_WORK->unk_0x08 = 1;
ZI_WORK->unk_0x09 = 1;
ZI_WORK->maxWordLength = 0xFF;
ZI_WORK->formatFlags = 1;
ZI_WORK->unk_0x0A = 0xFF;
ZI_WORK->unk_0x10 = 0x64;
*(ziU16*)&ZI_WORK->targetCount = 0xFFFF;
*(ziU16*)&ZI_WORK->unk_0x0C = 0xFFFF;
ZI_WORK->separator = 0x20;
ZI_WORK->unk_0x1C[2] = 0;
ZI_WORK->koAltTables = 0;
ZI_WORK->unk_0x1B30 = 0;
ZI_WORK->unk_0x1B3A = 0;
ZI_WORK->unk_0x1B36 = 0;
ZI_WORK->unk_0x1B32 = 0;
@@ -44,17 +44,17 @@ ziU8 Zi8InitializeDynamic(ziLanguageEntry* langEntries ZI_NEED_WORK) {
ZI_WORK->unk_0x1874 = 0x2D;
ZI_WORK->language = 0;
ZI_WORK->unk_0x1C[3] = 0;
ZI_WORK->capacity = 0x100;
ZI_WORK->unk_0x141A = 0x100;
Zi8SetLatinSearchOrder(0, 0, ZI_WORK);
ZADP_Zi8SetPDremoveOpt(1, ZI_WORK);
ZI_WORK->zhPudMinPrefix = 5;
ZI_WORK->unk_0x17 = 5;
ZI_WORK->cangjieEnabled = Zi8GetFormatVersion(1, ZI_WORK) & 2;
ZI_WORK->pyFuzzy.bits.msb = 1;
ZI_WORK->unk_0x1B28.bits.msb = 1;
ZI_WORK->unk_0x1B2C.bits.msb = 1;
zyFuzzy = ZI_WORK->unk_0x1B2C.word;
pzyFuzzy = &zyFuzzy;
Zi8ZHsetZYfuzzyPairs(pzyFuzzy, ZI_WORK);
pyFuzzy = ZI_WORK->pyFuzzy.word;
pyFuzzy = ZI_WORK->unk_0x1B28.word;
ppyFuzzy = &pyFuzzy;
Zi8ZHsetPYfuzzyPairs(ppyFuzzy, ZI_WORK);
Zi8SetParentalControls(2, ZI_WORK);

View File

@@ -65,19 +65,19 @@ ziU16 Zi8Uni2Ptr(ziU16 ch, ziE12* buf ZI_NEED_WORK) {
}
}
e = (ziU8*)table;
if (WORKP->unicodeMap != ZI8_NULL && WORKP->unicodeMapSubLang == WORKP->subLanguage) {
if ((ziU16)ch >= WORKP->unicodeRange1Min && (ziU16)ch <= WORKP->unicodeRange1Max) {
i = (ziU16)(ch - WORKP->unicodeRange1Min);
if (WORKP->unk_0x1B18 != ZI8_NULL && WORKP->unk_0x1B24 == WORKP->subLanguage) {
if ((ziU16)ch >= WORKP->unk_0x1B1C && (ziU16)ch <= WORKP->unk_0x1B1E) {
i = (ziU16)(ch - WORKP->unk_0x1B1C);
goto map;
}
if ((ziU16)ch >= WORKP->unicodeRange2Min && (ziU16)ch <= WORKP->unicodeRange2Max) {
i = (ziU16)(WORKP->unicodeRange1Max + (ch - WORKP->unicodeRange2Min) -
WORKP->unicodeRange1Min + 1);
if ((ziU16)ch >= WORKP->unk_0x1B20 && (ziU16)ch <= WORKP->unk_0x1B22) {
i = (ziU16)(WORKP->unk_0x1B1E + (ch - WORKP->unk_0x1B20) -
WORKP->unk_0x1B1C + 1);
goto map;
}
return 0xFFFF;
map:
i = WORKP->unicodeMap[i];
i = WORKP->unk_0x1B18[i];
if (i != 0xFFFF) {
e = (ziU8*)table + i * 0xC;
if (hi == e[6] && lo == e[7]) {

View File

@@ -102,7 +102,7 @@ ziU32 Zi8MatchPUDdata_ZHS(ziWChar* pattern, ziU8 length, ziU8 language, ziWChar*
wordSize = *word++;
entrySize = wordSize;
if (language == 1) {
if (ZI_WORK->zhPudMinPrefix > *word) goto next;
if (ZI_WORK->unk_0x17 > *word) goto next;
wordSize--;
entrySize--;
word++;

View File

@@ -41,7 +41,7 @@ ziBool Zi8_81480224(ziUserWord* word ZI_NEED_WORK) {
current = ZI_WORK->uwdList;
while (current != 0) {
candidate = (ziUserWord*)current->word;
if (ZI_WORK->uwdPrioritySort == 1 && candidate->priority < word->priority) break;
if (ZI_WORK->unk_0x12E == 1 && candidate->priority < word->priority) break;
if (candidate->length == length) {
position = 0;
while (position < length) {
@@ -105,11 +105,11 @@ ziU8 Zi8MatchUWDdata(ziWChar* pattern, ziU8 length, ziWChar* currentWord, ziU16
int position;
int prefixLength;
Zi8LogError(100, __zi8_work_data);
if (!(ZI_WORK->uwdDictCount <= 2 && ZI_WORK->uwdDictCount != 0 && ZI_WORK->uwdDicts[ZI_WORK->uwdDictCount - 1] != 0)) {
if (!(ZI_WORK->unk_0x138 <= 2 && ZI_WORK->unk_0x138 != 0 && ZI_WORK->unk_0x130[ZI_WORK->unk_0x138 - 1] != 0)) {
Zi8ReplaceLastError(0x19C, __zi8_work_data);
return 0;
}
dictionary = ZI_WORK->uwdDicts[ZI_WORK->uwdDictCount - 1];
dictionary = ZI_WORK->unk_0x130[ZI_WORK->unk_0x138 - 1];
if (continuation != 0) {
text = (ziU8*)Zi8_814803F4(__zi8_work_data);
entryLength = 0;

View File

@@ -52,7 +52,7 @@ ziU32 Zi8GetKoreanCandidates(ziGetParam* params, ziU8* argument,
result = 0;
state.characterIndex = 0xFF;
state.currentCandidate = params->firstCandidate;
params->letters = params->completion = params->count = 0;
params->letters = params->count = params->unk_0x20 = 0;
if ((argument != 0) && (*argument != 0)) {
Zi8LogError(0x7D0, workData);
return 0;
@@ -104,7 +104,7 @@ ziU32 Zi8GetKoreanCandidates(ziGetParam* params, ziU8* argument,
state.characterIndex,
(state.elementIndex - currentCharacter) - 1,
workData);
if ((((struct __zi8_work_data_s*)workData)->koAltTables == 1)) {
if ((((struct __zi8_work_data_s*)workData)->unk_0x1B30 == 1)) {
switch (state.characterIndex) {
case 1:
selectedTable = (ziU8*)Zi8GetTableAddress(ZI8_LANG_KO, 0x1E, workData);
@@ -179,13 +179,13 @@ ziU32 Zi8GetKoreanCandidates(ziGetParam* params, ziU8* argument,
} else {
params->candidates[(ziU8)result] =
((ziU16)selectedTable[state.nextIndex * 2] << 8) | (selectedTable + state.nextIndex * 2)[1];
if ((state.tableCount6 != 0) && (((struct __zi8_work_data_s*)workData)->koAltTables == 0)) {
if ((state.tableCount6 != 0) && (((struct __zi8_work_data_s*)workData)->unk_0x1B30 == 0)) {
params->candidates[(ziU8)result] += state.inputIndex * state.tableCount3;
}
result++;
}
if (currentCharacter == 0) {
params->completion = state.matched + 1;
params->count = state.matched + 1;
}
currentCharacter += state.matched;
} else {
@@ -199,14 +199,14 @@ ziU32 Zi8GetKoreanCandidates(ziGetParam* params, ziU8* argument,
state.currentCandidate--;
}
if (currentCharacter == 0) {
params->completion = 1;
params->count = 1;
}
} else {
for (state.index = 0; state.index < state.tableCount31; state.index++) {
if ((state.table31[(state.index * 3)] == buffer[currentCharacter]) &&
((state.table31 + state.index * 3)[1] == buffer[currentCharacter + 1])) {
if (currentCharacter == 0) {
params->completion = 1;
params->count = 1;
}
params->candidates[(ziU8)result] =
state.tableCount0 + (state.table31 + state.index * 3)[2];
@@ -218,7 +218,7 @@ ziU32 Zi8GetKoreanCandidates(ziGetParam* params, ziU8* argument,
if (state.index == state.tableCount31) {
if ((params->candidates[(ziU8)result] = buffer[currentCharacter]) < 0xFF) {
if (currentCharacter == 0) {
params->completion = 1;
params->count = 1;
}
params->candidates[(ziU8)result] += state.tableCount0;
result++;
@@ -249,7 +249,7 @@ ziU8 Zi8MatchKoreanSequence(ziU16* resultIndex, ziU16* input, ziU8 type, ziU16 c
firstCharacter = input[0];
mappedCharacter = 0xFF;
if (((struct __zi8_work_data_s*)workData)->koAltTables == 0) {
if (((struct __zi8_work_data_s*)workData)->unk_0x1B30 == 0) {
table = (ziU8*)Zi8GetTableAddress(ZI8_LANG_KO, 3, workData);
tableCount = Zi8GetTableCount(ZI8_LANG_KO, 3, workData);
} else {

View File

@@ -76,14 +76,14 @@ ziBool Zi8IsWordW(ziWChar* word, ziU8 language ZI_NEED_WORK) {
ZI_WORK->formats = (ziU32)formats;
if (ZI_WORK->unk_0x1C[0] == 2) {
ZI_WORK->formatCount = 0;
if (ZI_WORK->unk_0x09 & 1) formats[ZI_WORK->formatCount++] = 1;
if (ZI_WORK->unk_0x09 & 4) formats[ZI_WORK->formatCount++] = 2;
if (ZI_WORK->unk_0x09 & 2) formats[ZI_WORK->formatCount++] = 3;
if (ZI_WORK->unk_0x09 & 8) formats[ZI_WORK->formatCount++] = 4;
if (ZI_WORK->unk_0x09 & 1) formats[ZI_WORK->formatCount++] = 5;
if (ZI_WORK->unk_0x09 & 4) formats[ZI_WORK->formatCount++] = 6;
if (ZI_WORK->unk_0x09 & 2) formats[ZI_WORK->formatCount++] = 7;
if (ZI_WORK->unk_0x09 & 8) formats[ZI_WORK->formatCount++] = 8;
if (ZI_WORK->formatFlags & 1) formats[ZI_WORK->formatCount++] = 1;
if (ZI_WORK->formatFlags & 4) formats[ZI_WORK->formatCount++] = 2;
if (ZI_WORK->formatFlags & 2) formats[ZI_WORK->formatCount++] = 3;
if (ZI_WORK->formatFlags & 8) formats[ZI_WORK->formatCount++] = 4;
if (ZI_WORK->formatFlags & 1) formats[ZI_WORK->formatCount++] = 5;
if (ZI_WORK->formatFlags & 4) formats[ZI_WORK->formatCount++] = 6;
if (ZI_WORK->formatFlags & 2) formats[ZI_WORK->formatCount++] = 7;
if (ZI_WORK->formatFlags & 8) formats[ZI_WORK->formatCount++] = 8;
} else if (ZI_WORK->unk_0x1C[0] != 0) ZI_WORK->formatCount = 2;
else ZI_WORK->formatCount = 1;
count = Zi8GetCandidatesOrCount(&request, &search, __zi8_work_data);

View File

@@ -309,7 +309,7 @@ ziU32 Zi8GetKOcandidates(ziGetParam* param, ZiKoreanCandidateOptions* options ZI
}
if (options->countOnly == 0) {
param->letters = 0;
param->count = 0;
param->unk_0x20 = 0;
param->candidates[0] = 0;
}
Zi8LogError(100, ZI_WORK);
@@ -365,22 +365,22 @@ match_word:
return options->maxCount;
}
param->candidates[search.candidateCount++] = search.character;
++param->count;
++param->unk_0x20;
if (++param->letters >= param->maxCandidates) {
return param->letters;
}
}
} else {
param->candidates[search.candidateCount++] = search.character;
++param->count;
++param->unk_0x20;
if (++param->letters >= param->maxCandidates) {
Zi8_814834AC(param, &search.remainingCandidates, &search.candidateCount, &search.inserted, ZI_WORK);
param->count = search.candidateCount;
param->unk_0x20 = search.candidateCount;
param->letters = search.candidateCount;
if (search.candidateCount < param->maxCandidates) goto skip_word;
if (options->countOnly != 0) {
if ((search.prefixCount += search.candidateCount) >= (ziS32)options->maxCount) return options->maxCount;
param->count = 0;
param->unk_0x20 = 0;
param->letters = 0;
search.candidateCount = 0;
} else {
@@ -395,17 +395,17 @@ match_word:
if ((search.candidateIndex == search.candidateCount) &&
(Zi8_814833F0(param, search.character, ZI_WORK) == 0)) {
param->candidates[search.candidateCount++] = search.character;
++param->count;
++param->unk_0x20;
if (++param->letters < param->maxCandidates) {
goto skip_word;
}
Zi8_814834AC(param, &search.remainingCandidates, &search.candidateCount, &search.inserted, ZI_WORK);
param->count = search.candidateCount;
param->unk_0x20 = search.candidateCount;
param->letters = search.candidateCount;
if (search.candidateCount < param->maxCandidates) goto skip_word;
if (options->countOnly != 0) {
if ((search.prefixCount += search.candidateCount) >= (ziS32)options->maxCount) return options->maxCount;
param->count = 0;
param->unk_0x20 = 0;
param->letters = 0;
search.candidateCount = 0;
} else {
@@ -435,7 +435,7 @@ search_table:
if ((search.prefixCount += search.candidateCount) >= (ziS32)options->maxCount) return options->maxCount;
search.resultCount = search.prefixCount;
}
param->count = search.candidateCount;
param->unk_0x20 = search.candidateCount;
param->letters = search.candidateCount;
}
if (param->elementCount > 9) {

View File

@@ -239,7 +239,7 @@ ziBool Zi8PrepareMatch(ziGetParam* request, ziMatchParam* match, ziU8 skipMode Z
}
if ((request->getMode == '\x01') || (request->getMode == '\f')) {
match->nCand = Zi8GetPyPhonetic(request->elements,elementCount,match->phon,match->phon2,
&request->completion,&match->first,&match->first2,__zi8_work_data);
&request->count,&match->first,&match->first2,__zi8_work_data);
}
else {
initial = 0;
@@ -250,7 +250,7 @@ ziBool Zi8PrepareMatch(ziGetParam* request, ziMatchParam* match, ziU8 skipMode Z
previousFinal = 0;
buffers.phoneticInput = request->elements;
match->nCand = 0;
request->completion = request->elementCount;
request->count = request->elementCount;
phoneticLength = 1;
for (index = 0; index < elementCount; index++) {
stroke = Zi8GetBpmfPhonetic(buffers.phoneticInput,phoneticLength,&initial,&final,&bestInitial,&bestFinal,
@@ -287,7 +287,7 @@ savePhonetic:
goto savePhonetic;
}
if (match->nCand == 1) {
request->completion = phoneticLength - 1;
request->count = phoneticLength - 1;
}
buffers.phoneticInput = buffers.phoneticInput + phoneticLength - 1;
phoneticLength = 0;
@@ -306,7 +306,7 @@ savePhonetic:
}
}
if (((request->context & contextMask) != 0) &&
((1 < match->nCand || (request->completion != elementCount)))) {
((1 < match->nCand || (request->count != elementCount)))) {
match->phon[0] = 0xFFFF;
match->phon2[0] = 0xFFFF;
match->nCand = 0;

View File

@@ -10,7 +10,7 @@ extern "C" {
#endif
typedef void (*USBCallback)(IOSError result, void* arg);
typedef void (*USBIsoCallback)(IOSError err, void* isoArg, void* cbArg);
typedef void (*USBIsoCallback)(IOSError err, void* unkIsoArg, void* cbArg);
IOSError IUSB_OpenLib();
IOSError IUSB_CloseLib();

View File

@@ -133,11 +133,11 @@ typedef struct WPADExtConfig {
union {
struct WPADFSConfig {
s16 stickXCenter; // 0x00
s16 stickXMin; // 0x02
s16 stickXMax; // 0x04
s16 unk_0x02; // 0x02
s16 unk_0x04; // 0x04
s16 stickYCenter; // 0x06
s16 stickYMin; // 0x08
s16 stickYMax; // 0x0A
s16 unk_0x08; // 0x08
s16 unk_0x0A; // 0x0A
s16 accX0g; // 0x0C
s16 accY0g; // 0x0E
@@ -150,18 +150,18 @@ typedef struct WPADExtConfig {
struct WPADCLConfig {
s16 lStickXCenter; // 0x00
s16 lStickXMin; // 0x02
s16 lStickXMax; // 0x04
s16 unk_0x02; // 0x02
s16 unk_0x04; // 0x04
s16 lStickYCenter; // 0x06
s16 lStickYMin; // 0x08
s16 lStickYMax; // 0x0A
s16 unk_0x08; // 0x08
s16 unk_0x0A; // 0x0A
s16 rStickXCenter; // 0x0C
s16 rStickXMin; // 0x0E
s16 rStickXMax; // 0x10
s16 unk_0x0E; // 0x0E
s16 unk_0x10; // 0x10
s16 rStickYCenter; // 0x12
s16 rStickYMin; // 0x14
s16 rStickYMax; // 0x16
s16 unk_0x14; // 0x14
s16 unk_0x16; // 0x16
u8 triggerLZero; // 0x18
u8 triggerRZero; // 0x19
@@ -171,7 +171,7 @@ typedef struct WPADExtConfig {
typedef struct WPADCB {
WPADGameInfo gameInfo; // 0x00
s32 gameInfoStatus[2]; // 0x38
s32 unk_0x38[2];
u8 rxBufMain[RX_BUFFER_SIZE]; // 0x40
u8 rxBufs[2][RX_BUFFER_SIZE]; // 0xA0
WPADCommandQueue stdCmdQueue; // 0x160
@@ -223,7 +223,7 @@ typedef struct WPADCB {
u16 filterDiffExt; // 0x900
u16 filterSameExt; // 0x902
s64 lastReportSendTime; // 0x908
u8 suppressDisconnect; // 0x910
u8 unk_0x910;
u8 calibrated; // 0x911
u16 comboHeld; // 0x912
u8 encryptionKey[16]; // 0x914

View File

@@ -66,16 +66,16 @@
typedef struct
{
HC_BT_HDR *p_rx_msg[3]; // 0x00
UINT16 bytes_left[3]; // 0x0c
UINT16 buf_size; // 0x12
UINT8 pkt_type[3]; // 0x14
UINT8 len_hi[3]; // 0x17
UINT8 rx_state[3]; // 0x1a
HC_BT_HDR *at_0x00[3]; // 0x00
UINT16 at_0x0c[3]; // 0x0c
UINT16 at_0x12; // 0x12
UINT8 at_0x14[3]; // 0x14
UINT8 at_0x17[3]; // 0x17
UINT8 at_0x1a[3]; // 0x1a
char pad4_[1]; // 0x1d
UINT8 open_state; // 0x1e
UINT8 task_id; // 0x1f
UINT8 mbox; // 0x20
UINT8 at_0x1e; // 0x1e
UINT8 at_0x1f; // 0x1f
UINT8 at_0x20; // 0x20
char pad5_[2]; // 0x21
/* 1 byte padding */
} tHCISU_H2_CB; // size 0x24
@@ -135,7 +135,7 @@ UINT16 hcisu_h2_receive_msg(UINT16 pipe, tHCISU_H2_CB *p_cb)
UINT8 msg_received;
UINT16 r27;
if (p_cb->open_state != 2)
if (p_cb->at_0x1e != 2)
return 0;
r27 = pipe + 1;
@@ -148,36 +148,36 @@ UINT16 hcisu_h2_receive_msg(UINT16 pipe, tHCISU_H2_CB *p_cb)
++bytes_read;
msg_received = FALSE;
switch (p_cb->rx_state[pipe])
switch (p_cb->at_0x1a[pipe])
{
case 0:
if (r27 == 1)
{
p_cb->p_rx_msg[pipe] = GKI_getpoolbuf(GKI_POOL_ID_2);
p_cb->pkt_type[pipe] = 4;
p_cb->at_0x00[pipe] = GKI_getpoolbuf(GKI_POOL_ID_2);
p_cb->at_0x14[pipe] = 4;
}
else if (r27 == 2)
{
p_cb->p_rx_msg[pipe] = GKI_getpoolbuf(GKI_POOL_ID_3);
p_cb->pkt_type[pipe] = 2;
p_cb->at_0x00[pipe] = GKI_getpoolbuf(GKI_POOL_ID_3);
p_cb->at_0x14[pipe] = 2;
}
else if (r27 == 3)
{
p_cb->p_rx_msg[pipe] = GKI_getpoolbuf(GKI_POOL_ID_1);
p_cb->pkt_type[pipe] = 3;
p_cb->at_0x00[pipe] = GKI_getpoolbuf(GKI_POOL_ID_1);
p_cb->at_0x14[pipe] = 3;
}
else
{
break;
}
if (p_cb->p_rx_msg[pipe])
if (p_cb->at_0x00[pipe])
{
p_cb->p_rx_msg[pipe]->len = 0;
p_cb->p_rx_msg[pipe]->event =
hcisu_msg_evt_table[p_cb->pkt_type[pipe] - 1];
p_cb->p_rx_msg[pipe]->offset = 0;
p_cb->rx_state[pipe] = 1;
p_cb->at_0x00[pipe]->len = 0;
p_cb->at_0x00[pipe]->event =
hcisu_msg_evt_table[p_cb->at_0x14[pipe] - 1];
p_cb->at_0x00[pipe]->offset = 0;
p_cb->at_0x1a[pipe] = 1;
}
else
{
@@ -185,54 +185,54 @@ UINT16 hcisu_h2_receive_msg(UINT16 pipe, tHCISU_H2_CB *p_cb)
"HCIS: Unable to allocate buffer for incoming HCI "
"message.");
p_cb->rx_state[pipe] = 2;
p_cb->at_0x1a[pipe] = 2;
}
p_cb->bytes_left[pipe] =
hcisu_preamble_table[p_cb->pkt_type[pipe] - 1];
p_cb->at_0x0c[pipe] =
hcisu_preamble_table[p_cb->at_0x14[pipe] - 1];
/* fallthrough */
case 1:
*((UINT8 *)(p_cb->p_rx_msg[pipe] + 1)
+ p_cb->p_rx_msg[pipe]->len++) = byte;
*((UINT8 *)(p_cb->at_0x00[pipe] + 1)
+ p_cb->at_0x00[pipe]->len++) = byte;
--p_cb->bytes_left[pipe];
--p_cb->at_0x0c[pipe];
if (p_cb->bytes_left[pipe] == 0)
if (p_cb->at_0x0c[pipe] == 0)
{
msg_len = byte;
if (p_cb->pkt_type[pipe] == 2)
if (p_cb->at_0x14[pipe] == 2)
{
msg_len = (msg_len << 8) + p_cb->len_hi[pipe];
msg_len = (msg_len << 8) + p_cb->at_0x17[pipe];
if ((p_cb->p_rx_msg[pipe] =
if ((p_cb->at_0x00[pipe] =
(HC_BT_HDR *)l2cap_link_chk_pkt_start(
(BT_HDR *)p_cb->p_rx_msg[pipe]))
(BT_HDR *)p_cb->at_0x00[pipe]))
== 0)
{
p_cb->bytes_left[pipe] = msg_len;
p_cb->at_0x0c[pipe] = msg_len;
if (msg_len == 0)
p_cb->rx_state[pipe] = 0;
p_cb->at_0x1a[pipe] = 0;
else
p_cb->rx_state[pipe] = 4;
p_cb->at_0x1a[pipe] = 4;
break;
}
}
p_cb->bytes_left[pipe] = msg_len;
p_cb->at_0x0c[pipe] = msg_len;
if (sizeof(HC_BT_HDR)
+ hcisu_preamble_table[p_cb->pkt_type[pipe] - 1]
+ hcisu_preamble_table[p_cb->at_0x14[pipe] - 1]
+ msg_len
> GKI_get_buf_size(p_cb->p_rx_msg[pipe]))
> GKI_get_buf_size(p_cb->at_0x00[pipe]))
{
GKI_freebuf(p_cb->p_rx_msg[pipe]);
p_cb->p_rx_msg[pipe] = NULL;
p_cb->rx_state[pipe] = 4;
GKI_freebuf(p_cb->at_0x00[pipe]);
p_cb->at_0x00[pipe] = NULL;
p_cb->at_0x1a[pipe] = 4;
BT_TRACE(HCI, ERROR,
"HCIS: Invalid length for incoming HCI message.");
@@ -242,85 +242,85 @@ UINT16 hcisu_h2_receive_msg(UINT16 pipe, tHCISU_H2_CB *p_cb)
if (msg_len != 0)
{
p_cb->rx_state[pipe] = 3;
p_cb->at_0x1a[pipe] = 3;
}
else
{
msg_received = TRUE;
p_cb->rx_state[pipe] = 0;
p_cb->at_0x1a[pipe] = 0;
}
}
else
{
p_cb->len_hi[pipe] = byte;
p_cb->at_0x17[pipe] = byte;
}
break;
case 2:
--p_cb->bytes_left[pipe];
--p_cb->at_0x0c[pipe];
if (p_cb->bytes_left[pipe] == 0)
if (p_cb->at_0x0c[pipe] == 0)
{
msg_len = byte;
if (p_cb->pkt_type[pipe] == 2)
msg_len = (msg_len << 8) + p_cb->len_hi[pipe];
if (p_cb->at_0x14[pipe] == 2)
msg_len = (msg_len << 8) + p_cb->at_0x17[pipe];
p_cb->bytes_left[pipe] = msg_len;
p_cb->rx_state[pipe] = 4;
p_cb->at_0x0c[pipe] = msg_len;
p_cb->at_0x1a[pipe] = 4;
}
else
{
p_cb->len_hi[pipe] = byte;
p_cb->at_0x17[pipe] = byte;
}
break;
case 3:
*((UINT8 *)(p_cb->p_rx_msg[pipe] + 1)
+ p_cb->p_rx_msg[pipe]->len++) = byte;
*((UINT8 *)(p_cb->at_0x00[pipe] + 1)
+ p_cb->at_0x00[pipe]->len++) = byte;
--p_cb->bytes_left[pipe];
--p_cb->at_0x0c[pipe];
len = UUSB_Read(pipe + 1,
(UINT8 *)(p_cb->p_rx_msg[pipe] + 1)
+ p_cb->p_rx_msg[pipe]->len,
p_cb->bytes_left[pipe]);
(UINT8 *)(p_cb->at_0x00[pipe] + 1)
+ p_cb->at_0x00[pipe]->len,
p_cb->at_0x0c[pipe]);
p_cb->p_rx_msg[pipe]->len += len;
p_cb->bytes_left[pipe] -= len;
p_cb->at_0x00[pipe]->len += len;
p_cb->at_0x0c[pipe] -= len;
bytes_read += len;
if (p_cb->bytes_left[pipe] == 0)
if (p_cb->at_0x0c[pipe] == 0)
{
if (p_cb->pkt_type[pipe] == 2
if (p_cb->at_0x14[pipe] == 2
&& l2cap_link_chk_pkt_end() == 0)
{
p_cb->rx_state[pipe] = 0;
p_cb->at_0x1a[pipe] = 0;
}
else
{
msg_received = TRUE;
p_cb->rx_state[pipe] = 0;
p_cb->at_0x1a[pipe] = 0;
}
}
break;
case 4:
--p_cb->bytes_left[pipe];
--p_cb->at_0x0c[pipe];
if (p_cb->bytes_left[pipe] == 0)
p_cb->rx_state[pipe] = 0;
if (p_cb->at_0x0c[pipe] == 0)
p_cb->at_0x1a[pipe] = 0;
break;
}
if (msg_received)
{
GKI_send_msg(hcisu_h2_cb.task_id, 0, p_cb->p_rx_msg[pipe]);
p_cb->p_rx_msg[pipe] = NULL;
GKI_send_msg(hcisu_h2_cb.at_0x1f, 0, p_cb->at_0x00[pipe]);
p_cb->at_0x00[pipe] = NULL;
}
}
@@ -382,7 +382,7 @@ void hcisu_h2_send_msg_now(tHCISU_H2_CB *cb, HC_BT_HDR *p_msg)
{
p_msg->event = MSG_HC_TO_STACK_L2C_SEG_XMIT;
GKI_send_msg(hcisu_h2_cb.task_id, 0, p_msg);
GKI_send_msg(hcisu_h2_cb.at_0x1f, 0, p_msg);
return;
}
@@ -405,15 +405,15 @@ void hcisu_h2_send_msg(tHCISU_H2_CB *p_cb, HC_BT_HDR *p_msg)
void hcisu_h2_init(UINT8 taskId, UINT8 mbox, UINT16 bufSize)
{
hcisu_h2_cb.open_state = 0;
hcisu_h2_cb.at_0x1e = 0;
hcisu_h2_cb.rx_state[0] = 0;
hcisu_h2_cb.rx_state[1] = 0;
hcisu_h2_cb.rx_state[2] = 0;
hcisu_h2_cb.at_0x1a[0] = 0;
hcisu_h2_cb.at_0x1a[1] = 0;
hcisu_h2_cb.at_0x1a[2] = 0;
hcisu_h2_cb.task_id = taskId;
hcisu_h2_cb.mbox = mbox;
hcisu_h2_cb.buf_size = bufSize;
hcisu_h2_cb.at_0x1f = taskId;
hcisu_h2_cb.at_0x20 = mbox;
hcisu_h2_cb.at_0x12 = bufSize;
}
BOOLEAN hcisu_h2_open(tHCI_CFG *_p_cfg)
@@ -424,9 +424,9 @@ BOOLEAN hcisu_h2_open(tHCI_CFG *_p_cfg)
uusb.at_0x0b = 0;
uusb.at_0x04 = p_cfg->at_0x00;
uusb.at_0x06 = p_cfg->at_0x02;
uusb.at_0x08 = hcisu_h2_cb.task_id;
uusb.at_0x08 = hcisu_h2_cb.at_0x1f;
hcisu_h2_cb.open_state = 2;
hcisu_h2_cb.at_0x1e = 2;
UUSB_Register(&uusb);
UUSB_Open(&uusb, &hcisu_h2_usb_cback);
@@ -436,7 +436,7 @@ BOOLEAN hcisu_h2_open(tHCI_CFG *_p_cfg)
void hcisu_h2_close(void)
{
hcisu_h2_cb.open_state = 0;
hcisu_h2_cb.at_0x1e = 0;
UUSB_Close();
UUSB_Unregister();
@@ -454,7 +454,7 @@ int hcisu_h2_handle_event(UINT16 len)
UINT16 bytes_read;
bytes_read = hcisu_h2_receive_msg(
len - sizeof(HC_BT_HDR) - hcisu_h2_cb.buf_size, &hcisu_h2_cb);
len - sizeof(HC_BT_HDR) - hcisu_h2_cb.at_0x12, &hcisu_h2_cb);
return 0;
}

View File

@@ -33,7 +33,7 @@ typedef struct
u8 bulkEndpoint1;
u8 bulkEndpoint2;
u8 intrEndpoint1;
u8 intrEndpoint2;
char at_0x13; // intrEndpoint2?
int vid;
int pid;
UINT8 cmd_buffer_pool;
@@ -46,9 +46,9 @@ typedef struct
char pad4_[1];
UINT8 reading_intr_data;
BUFFER_Q bulk_buffer_q;
UINT8 bulk_outstanding;
UINT8 at_0x38;
BUFFER_Q intr_buffer_q;
UINT8 intr_outstanding;
UINT8 at_0x48;
char pad8_[3];
} tUUSB_CB;
@@ -158,7 +158,7 @@ static void uusb_CloseDeviceCB(long result, void *p_data)
usb.bulkEndpoint1 = 0;
usb.bulkEndpoint2 = 0;
usb.intrEndpoint1 = 0;
usb.intrEndpoint2 = 0;
usb.at_0x13 = 0;
usb.fd = 0;
@@ -363,12 +363,12 @@ static void uusb_WriteCtrlDataCB(long result, void *p_data)
GKI_disable();
--usb.intr_outstanding;
--usb.at_0x48;
GKI_enable();
}
if (usb.intr_outstanding >= 5)
if (usb.at_0x48 >= 5)
return;
if (usb.intr_buffer_q.count == 0)
@@ -389,7 +389,7 @@ static void uusb_WriteCtrlDataCB(long result, void *p_data)
{
GKI_disable();
++usb.intr_outstanding;
++usb.at_0x48;
GKI_enable();
}
@@ -411,12 +411,12 @@ static void uusb_WriteBulkDataCB(long result, void *p_data)
GKI_disable();
--usb.bulk_outstanding;
--usb.at_0x38;
GKI_enable();
}
if (usb.bulk_outstanding >= 5)
if (usb.at_0x38 >= 5)
return;
if (usb.bulk_buffer_q.count == 0)
@@ -436,7 +436,7 @@ static void uusb_WriteBulkDataCB(long result, void *p_data)
{
GKI_disable();
++usb.bulk_outstanding;
++usb.at_0x38;
GKI_enable();
}
@@ -504,7 +504,7 @@ void UUSB_Register(tUUSB *uusb)
usb.bulkEndpoint1 = 0;
usb.bulkEndpoint2 = 0;
usb.intrEndpoint1 = 0;
usb.intrEndpoint2 = 0;
usb.at_0x13 = 0;
if (uusb_get_devId(usb.vid, usb.pid) < 0)
return;
@@ -512,13 +512,13 @@ void UUSB_Register(tUUSB *uusb)
usb.bulkEndpoint1 = 2;
usb.bulkEndpoint2 = 130;
usb.intrEndpoint1 = 129;
usb.intrEndpoint2 = 0;
usb.at_0x13 = 0;
GKI_init_q(&usb.bulk_buffer_q);
usb.bulk_outstanding = 0;
usb.at_0x38 = 0;
GKI_init_q(&usb.intr_buffer_q);
usb.intr_outstanding = 0;
usb.at_0x48 = 0;
usb.cmd_buffer_pool = GKI_create_pool(660, 45, 1, NULL);
usb.acl_buffer_pool = GKI_create_pool(1800, 30, 1, NULL);
@@ -607,7 +607,7 @@ UINT16 UUSB_Write(UINT8 pipe, void *p_data, UINT16 len, void *unused)
memcpy(p_buffer, p_data, len);
if (usb.intr_outstanding < 5 && usb.intr_buffer_q.count == 0)
if (usb.at_0x48 < 5 && usb.intr_buffer_q.count == 0)
{
ret = IUSB_WriteCtrlMsgAsync(usb.fd, 0x20, 0, 0, 0, len, p_buffer,
uusb_WriteCtrlDataCB, p_buf);
@@ -634,7 +634,7 @@ UINT16 UUSB_Write(UINT8 pipe, void *p_data, UINT16 len, void *unused)
{
GKI_disable();
++usb.intr_outstanding;
++usb.at_0x48;
GKI_enable();
}
@@ -658,7 +658,7 @@ UINT16 UUSB_Write(UINT8 pipe, void *p_data, UINT16 len, void *unused)
if (len > 190)
UUSBDBG(" woah ! thats pretty Big ! :%d", len);
if (usb.bulk_outstanding < 5 && usb.bulk_buffer_q.count == 0)
if (usb.at_0x38 < 5 && usb.bulk_buffer_q.count == 0)
{
ret = IUSB_WriteBlkMsgAsync(usb.fd, usb.bulkEndpoint1, len,
p_buffer, uusb_WriteBulkDataCB, p_buf);
@@ -685,7 +685,7 @@ UINT16 UUSB_Write(UINT8 pipe, void *p_data, UINT16 len, void *unused)
{
GKI_disable();
++usb.bulk_outstanding;
++usb.at_0x38;
GKI_enable();
}

View File

@@ -41,13 +41,13 @@ typedef struct USBCommandBlock {
USBCallback callback; // 0x00
USBIsoCallback isoCallback; // 0x04
void* callbackArg; // 0x08
void* isoArg; // 0x0C
void* unkIsoArg; // 0x0C
char pad_0x10[0x4];
char unk_0x10[0x4];
void* clean[USB_NCLEAN_MAX]; // 0x14
u32 nclean; // 0x34
char pad_0x38[0x40 - 0x38];
char unk_0x38[0x40 - 0x38];
union {
char path[FS_MAX_PATH];
USBMsg msg;
@@ -174,7 +174,7 @@ static s32 _intrBlkCtrlIsoCb(s32 result, void* arg) {
block->callback(result, block->callbackArg);
} else if (block->isoCallback != NULL) {
USB_LOG("calling iso callback\n");
block->isoCallback(result, block->isoArg, block->callbackArg);
block->isoCallback(result, block->unkIsoArg, block->callbackArg);
}
IOSFree(block);

View File

@@ -7,9 +7,9 @@
static struct {
struct {
OSMessageQueue* queue; // 0x00
void* messages; // 0x04 (OSMessage* array for OSInitMessageQueue)
void* unk_0x04;
} entries[MAX_PUH_SEM]; // 0x00
void* pad_0x14; // unused
void* unk_0x14;
} st_uhs_ker_msg_mng;
s32 uhf_ker_send_message(int index, void* message) {

View File

@@ -7,12 +7,12 @@
static struct {
struct {
OSSemaphore* sem; // 0x00
u32 initCount;
u32 flags;
u32 unk_0x04;
u32 unk_0x08;
} entries[MAX_PUH_SEM]; // 0x00
u32 usedCount;
OSSemaphore* lockSem;
u8 pad[0x0C];
u32 unk_0x90;
OSSemaphore* unk_0x94;
u8 unk_0x98[0x0C];
} st_uhs_ker_sem_mng;
static OSSemaphore st_uhf_ker_sem[MAX_PUH_SEM];
@@ -20,17 +20,17 @@ static OSSemaphore st_uhf_ker_sem[MAX_PUH_SEM];
static s32 st_uhs_ker_sem_status;
static int uhf_ker_sem_inline_0() {
if (st_uhs_ker_sem_status != 1 || st_uhs_ker_sem_mng.lockSem == 0) {
if (st_uhs_ker_sem_status != 1 || st_uhs_ker_sem_mng.unk_0x94 == 0) {
return -1;
} else {
OSWaitSemaphore(st_uhs_ker_sem_mng.lockSem);
OSWaitSemaphore(st_uhs_ker_sem_mng.unk_0x94);
return 0;
}
}
static void uhf_ker_sem_inline_1() {
if (st_uhs_ker_sem_status == 1 && st_uhs_ker_sem_mng.lockSem != 0) {
OSSignalSemaphore(st_uhs_ker_sem_mng.lockSem);
if (st_uhs_ker_sem_status == 1 && st_uhs_ker_sem_mng.unk_0x94 != 0) {
OSSignalSemaphore(st_uhs_ker_sem_mng.unk_0x94);
}
}
@@ -48,7 +48,7 @@ s32 uhf_ker_create_sem(u32 initCount, int flags) {
return -5;
}
if (st_uhs_ker_sem_mng.usedCount == 12) {
if (st_uhs_ker_sem_mng.unk_0x90 == 12) {
uhf_ker_sem_inline_1();
return -24;
}
@@ -65,9 +65,9 @@ s32 uhf_ker_create_sem(u32 initCount, int flags) {
}
st_uhs_ker_sem_mng.entries[i].sem = sem;
st_uhs_ker_sem_mng.entries[i].initCount = initCount;
st_uhs_ker_sem_mng.entries[i].flags = flags;
st_uhs_ker_sem_mng.usedCount++;
st_uhs_ker_sem_mng.entries[i].unk_0x04 = initCount;
st_uhs_ker_sem_mng.entries[i].unk_0x08 = flags;
st_uhs_ker_sem_mng.unk_0x90++;
uhf_ker_sem_inline_1();
@@ -97,9 +97,9 @@ s32 uhf_ker_delete_sem(int sem) {
}
st_uhs_ker_sem_mng.entries[sem - 1].sem = NULL;
st_uhs_ker_sem_mng.entries[sem - 1].initCount = 0;
st_uhs_ker_sem_mng.entries[sem - 1].flags = 0;
st_uhs_ker_sem_mng.usedCount--;
st_uhs_ker_sem_mng.entries[sem - 1].unk_0x04 = 0;
st_uhs_ker_sem_mng.entries[sem - 1].unk_0x08 = 0;
st_uhs_ker_sem_mng.unk_0x90--;
uhf_ker_sem_inline_1();

View File

@@ -6,13 +6,13 @@
static struct {
struct {
OSThread* thread; // 0x00
u8 stack[0x33C]; // 0x04
OSThread* unk_0x00;
u8 unk_0x04[0x33C];
} entries[MAX_PUH_TSK]; // 0x00
u32 pad_0x680;
u32 pad_0x684;
u32 pad_0x688;
u32 pad_0x68C;
u32 unk_0x680;
u32 unk_0x684;
u32 unk_0x688;
u32 unk_0x68C;
} st_uhs_ker_tsk_mng;
s32 uhf_ker_set_priority(int tsk, int priority) {
@@ -24,9 +24,9 @@ s32 uhf_ker_set_priority(int tsk, int priority) {
return -5;
}
if (st_uhs_ker_tsk_mng.entries[tsk - 1].thread == NULL) {
if (st_uhs_ker_tsk_mng.entries[tsk - 1].unk_0x00 == NULL) {
return -1;
}
return OSSetThreadPriority(st_uhs_ker_tsk_mng.entries[tsk - 1].thread, priority) ? 0 : -20;
return OSSetThreadPriority(st_uhs_ker_tsk_mng.entries[tsk - 1].unk_0x00, priority) ? 0 : -20;
}

View File

@@ -20,7 +20,7 @@ typedef struct _usbKbdAsyncMem {
u32 state; // 0x00
void* kbd; // 0x04
char modifiers; // 0x08
u8 reserved; // 0x09
u8 unk_0x09;
u8 keys[6]; // 0x0A
} usbKbdAsyncMem;

View File

@@ -190,7 +190,7 @@ static s32 WPADiSendData(s32 chan, WPADCommand command) {
if (status == WPAD_ERR_COMMUNICATION_ERROR) {
if ((s32)OSTicksToSeconds(__OSGetSystemTime() - p->lastReportSendTime) > 1 && _sleepTime != 0) {
if (!p->suppressDisconnect) {
if (!p->unk_0x910) {
p->lastReportSendTime = __OSGetSystemTime();
WPADiDisconnect(chan, FALSE);
} else {
@@ -1263,7 +1263,7 @@ static void __ClearControlBlock(s32 chan) {
p->lastControllerDataUpdate = __OSGetSystemTime();
p->lastReportSendTime = __OSGetSystemTime();
p->suppressDisconnect = 0;
p->unk_0x910 = 0;
p->unk_0x8C9 = 0;
p->unk_0x8C4 = 0;
p->wmReadDataPtr = NULL;
@@ -1298,8 +1298,8 @@ static void __ClearControlBlock(s32 chan) {
memset(&p->decryptXorTable, 0, sizeof(p->decryptXorTable));
memset(&p->gameInfo, 0, sizeof(WPADGameInfo));
p->gameInfoStatus[0] = -1;
p->gameInfoStatus[1] = -1;
p->unk_0x38[0] = -1;
p->unk_0x38[1] = -1;
p->stdCmdQueue.buffer = p->stdCmdQueueList;
p->stdCmdQueue.capacity = ARRAY_LENGTH(p->stdCmdQueueList);
@@ -2692,7 +2692,7 @@ static void __SendData(s32 chan, WPADCommand command) {
u32 time;
memcpy(&time, command.dataBuf, sizeof(u32));
p->lastReportSendTime = __OSGetSystemTime() + time;
p->suppressDisconnect = 1;
p->unk_0x910 = 1;
return;
}
default: {
@@ -2704,7 +2704,7 @@ static void __SendData(s32 chan, WPADCommand command) {
p->cmdBlkCB = command.cmdCB;
p->lastReportID = reportID;
p->lastReportSendTime = __OSGetSystemTime() + OSSecondsToTicks(2);
p->suppressDisconnect = 0;
p->unk_0x910 = 0;
OSRestoreInterrupts(enabled);
}

View File

@@ -393,48 +393,48 @@ static void getExtConfig(s32 chan, s32 result) {
p_wpd->extConfig.u.fs.accX1g = (s16)((u16)(((u16)(p_buf[index + 4]) << 2) & 0xFFFC) | (u16)(((u16)(p_buf[index + 7]) >> 4) & 3));
p_wpd->extConfig.u.fs.accY1g = (s16)((u16)(((u16)(p_buf[index + 5]) << 2) & 0xFFFC) | (u16)(((u16)(p_buf[index + 7]) >> 2) & 3));
p_wpd->extConfig.u.fs.accZ1g = (s16)((u16)(((u16)(p_buf[index + 6]) << 2) & 0xFFFC) | (u16)(((u16)(p_buf[index + 7])) & 3));
p_wpd->extConfig.u.fs.stickXMax = (s8)p_buf[index + 8];
p_wpd->extConfig.u.fs.stickXMin = (s8)p_buf[index + 9];
p_wpd->extConfig.u.fs.unk_0x04 = (s8)p_buf[index + 8];
p_wpd->extConfig.u.fs.unk_0x02 = (s8)p_buf[index + 9];
p_wpd->extConfig.u.fs.stickXCenter = (s8)p_buf[index + 10];
p_wpd->extConfig.u.fs.stickYMax = (s8)p_buf[index + 11];
p_wpd->extConfig.u.fs.stickYMin = (s8)p_buf[index + 12];
p_wpd->extConfig.u.fs.unk_0x0A = (s8)p_buf[index + 11];
p_wpd->extConfig.u.fs.unk_0x08 = (s8)p_buf[index + 12];
p_wpd->extConfig.u.fs.stickYCenter = (s8)p_buf[index + 13];
DEBUGPrint("0G: fsaccX = %d, fsaccY = %d, fsaccZ = %d\n", p_wpd->extConfig.u.fs.accX0g, p_wpd->extConfig.u.fs.accY0g,
p_wpd->extConfig.u.fs.accZ0g);
DEBUGPrint("1G: fsaccX = %d, fsaccY = %d, fsaccZ = %d\n", p_wpd->extConfig.u.fs.accX1g, p_wpd->extConfig.u.fs.accY1g,
p_wpd->extConfig.u.fs.accZ1g);
DEBUGPrint("FS: X = %d, X max = %d, X min = %d\n", p_wpd->extConfig.u.fs.stickXCenter, p_wpd->extConfig.u.fs.stickXMax,
p_wpd->extConfig.u.fs.stickXMin);
DEBUGPrint("FS: Y = %d, Y max = %d, Y min = %d\n", p_wpd->extConfig.u.fs.stickYCenter, p_wpd->extConfig.u.fs.stickYMax,
p_wpd->extConfig.u.fs.stickYMin);
DEBUGPrint("FS: X = %d, X max = %d, X min = %d\n", p_wpd->extConfig.u.fs.stickXCenter, p_wpd->extConfig.u.fs.unk_0x04,
p_wpd->extConfig.u.fs.unk_0x02);
DEBUGPrint("FS: Y = %d, Y max = %d, Y min = %d\n", p_wpd->extConfig.u.fs.stickYCenter, p_wpd->extConfig.u.fs.unk_0x0A,
p_wpd->extConfig.u.fs.unk_0x08);
}
break;
case WPAD_DEV_CLASSIC:
p_wpd->extConfig.u.cl.lStickXMax = (s8)p_buf[index + 0];
p_wpd->extConfig.u.cl.lStickXMin = (s8)p_buf[index + 1];
p_wpd->extConfig.u.cl.unk_0x04 = (s8)p_buf[index + 0];
p_wpd->extConfig.u.cl.unk_0x02 = (s8)p_buf[index + 1];
p_wpd->extConfig.u.cl.lStickXCenter = (s8)p_buf[index + 2];
p_wpd->extConfig.u.cl.lStickYMax = (s8)p_buf[index + 3];
p_wpd->extConfig.u.cl.lStickYMin = (s8)p_buf[index + 4];
p_wpd->extConfig.u.cl.unk_0x0A = (s8)p_buf[index + 3];
p_wpd->extConfig.u.cl.unk_0x08 = (s8)p_buf[index + 4];
p_wpd->extConfig.u.cl.lStickYCenter = (s8)p_buf[index + 5];
p_wpd->extConfig.u.cl.rStickXMax = (s8)p_buf[index + 6];
p_wpd->extConfig.u.cl.rStickXMin = (s8)p_buf[index + 7];
p_wpd->extConfig.u.cl.unk_0x10 = (s8)p_buf[index + 6];
p_wpd->extConfig.u.cl.unk_0x0E = (s8)p_buf[index + 7];
p_wpd->extConfig.u.cl.rStickXCenter = (s8)p_buf[index + 8];
p_wpd->extConfig.u.cl.rStickYMax = (s8)p_buf[index + 9];
p_wpd->extConfig.u.cl.rStickYMin = (s8)p_buf[index + 10];
p_wpd->extConfig.u.cl.unk_0x16 = (s8)p_buf[index + 9];
p_wpd->extConfig.u.cl.unk_0x14 = (s8)p_buf[index + 10];
p_wpd->extConfig.u.cl.rStickYCenter = (s8)p_buf[index + 11];
p_wpd->extConfig.u.cl.triggerLZero = p_buf[index + 12];
p_wpd->extConfig.u.cl.triggerRZero = p_buf[index + 13];
DEBUGPrint("CL: X = %d, X max = %d, X min = %d\n", p_wpd->extConfig.u.cl.lStickXCenter, p_wpd->extConfig.u.cl.lStickXMax,
p_wpd->extConfig.u.cl.lStickXMin);
DEBUGPrint("CL: Y = %d, Y max = %d, Y min = %d\n", p_wpd->extConfig.u.cl.lStickYCenter, p_wpd->extConfig.u.cl.lStickYMax,
p_wpd->extConfig.u.cl.lStickYMin);
DEBUGPrint("CR: X = %d, X max = %d, X min = %d\n", p_wpd->extConfig.u.cl.rStickXCenter, p_wpd->extConfig.u.cl.rStickXMax,
p_wpd->extConfig.u.cl.rStickXMin);
DEBUGPrint("CR: Y = %d, Y max = %d, Y min = %d\n", p_wpd->extConfig.u.cl.rStickYCenter, p_wpd->extConfig.u.cl.rStickYMax,
p_wpd->extConfig.u.cl.rStickYMin);
DEBUGPrint("CL: X = %d, X max = %d, X min = %d\n", p_wpd->extConfig.u.cl.lStickXCenter, p_wpd->extConfig.u.cl.unk_0x04,
p_wpd->extConfig.u.cl.unk_0x02);
DEBUGPrint("CL: Y = %d, Y max = %d, Y min = %d\n", p_wpd->extConfig.u.cl.lStickYCenter, p_wpd->extConfig.u.cl.unk_0x0A,
p_wpd->extConfig.u.cl.unk_0x08);
DEBUGPrint("CR: X = %d, X max = %d, X min = %d\n", p_wpd->extConfig.u.cl.rStickXCenter, p_wpd->extConfig.u.cl.unk_0x10,
p_wpd->extConfig.u.cl.unk_0x0E);
DEBUGPrint("CR: Y = %d, Y max = %d, Y min = %d\n", p_wpd->extConfig.u.cl.rStickYCenter, p_wpd->extConfig.u.cl.unk_0x16,
p_wpd->extConfig.u.cl.unk_0x14);
DEBUGPrint("LR: L = %d, R = %d\n", p_wpd->extConfig.u.cl.triggerLZero, p_wpd->extConfig.u.cl.triggerRZero);
break;
}
@@ -547,9 +547,9 @@ static void getGameInfo(s32 chan, s32 result, u8 index) {
if (p_info->checksum == sum) {
memcpy(&p_wpd->gameInfo, p_buf, sizeof(WPADMEMGameInfo));
p_wpd->gameInfoStatus[index] = WPAD_ERR_NONE;
p_wpd->unk_0x38[index] = WPAD_ERR_NONE;
} else {
p_wpd->gameInfoStatus[index] = WPAD_ERR_INVALID;
p_wpd->unk_0x38[index] = WPAD_ERR_INVALID;
}
}
}

View File

@@ -17,9 +17,9 @@ typedef struct NWC24FLHeader {
u32 version; // 0x04
u32 infoCount; // 0x08
u32 registeredCount; // 0x0C
u32 confirmedBits[4]; // 0x10
u32 pad_0x20[7]; // unused
u32 listFlags; // 0x3C
u32 unk_0x10[4];
u32 unk_0x20[7];
u32 unk_0x3C;
NWC24UserId friendIds[NWC24_FRIEND_INFO_MAX]; // 0x40
} NWC24FLHeader;

View File

@@ -73,15 +73,15 @@ typedef struct NWC24MsgObjPrivate {
};
u32 raw;
} msgBoardFlags; // 0xCC
NWC24Data extraData; // 0xD0
NWC24Data unk_0xD0;
NWC24Data faceData; // 0xD8
NWC24Data altName; // 0xE0
u32 textSize; // 0xE4
u32 dwcId; // 0xEC
u32 iconNew; // 0xF0
u32 pad_0xF4;
u32 pad_0xF8;
u32 pad_0xFC;
u32 unk_0xF4;
u32 unk_0xF8;
u32 unk_0xFC;
} NWC24MsgObjPrivate;
#ifdef __cplusplus

View File

@@ -26,9 +26,9 @@ extern struct NWC24Work {
u8 configData[1024]; // 0x1300
u8 sendMbcHeader[128]; // 0x1700
u8 recvMbcHeader[128]; // 0x1780
u8 mbcEntry[256]; // 0x1800
u8 unk_0x1700[128]; // 0x1700
u8 unk_0x1780[128]; // 0x1780
u8 unk_0x1800[256]; // 0x1800
u8 base64Work[256]; // 0x1900
u8 unk_0x1A00[4096]; // 0x1A00

View File

@@ -62,7 +62,7 @@ typedef struct _CDBRecordKey {
} CDBRecordKey;
typedef struct _CDBRecord {
u32 database; // 0x00
u32 unk_0x00;
void* cryptBuf; // 0x04
CDBRecordKey key; // 0x08
void* file; // 0x38

View File

@@ -58,7 +58,7 @@ void CDBRecordInstanceInit(CDBRecordFile* recordFile, CDBRecord* record, int typ
recordFile->used = 1;
OSUnlockMutex((OSMutex*)recordFile);
recordFile->allocFlag = type;
recordFile->database = record->database;
recordFile->database = record->unk_0x00;
CDBAttrInit(&recordFile->attr);
CDBRecordKeyCopy(&recordFile->key, &record->key);
}
@@ -73,7 +73,7 @@ BOOL CDBRecordInstanceIsUsed(CDBRecordFile* recordFile) {
void CDBRecordInitDescriptor(CDBRecord* record, CDBDatabase* database, CDBRecordKey* key) {
CDBLock();
record->database = (u32)database;
record->unk_0x00 = (u32)database;
CDBRecordKeyCopy(&record->key, key);
record->cryptBuf = NULL;
record->file = NULL;
@@ -95,7 +95,7 @@ CDBErr CDBRecordCreateAtOnce(CDBRecord* record, CDBDatabase* database, const cha
CDBRecordKeyInit(&key, epoch, gameCode, makerCode, 0, fileType, CDB_FS_LOCATION_NAND);
CDBLock();
record->database = (u32)database;
record->unk_0x00 = (u32)database;
CDBRecordKeyCopy(&record->key, &key);
record->cryptBuf = NULL;
record->file = NULL;
@@ -128,7 +128,7 @@ CDBErr CDBRecordOpen_(CDBRecord* record) {
CDBDatabase* database;
CDBRecordDatabaseState* instance;
database = (CDBDatabase*)record->database;
database = (CDBDatabase*)record->unk_0x00;
instance = database->instance;
record->cryptBuf = NULL;
if (instance == NULL) {
@@ -292,7 +292,7 @@ CDBErr CDBRecordWrite_(CDBRecord* record, void* buffer, u32 size) {
CDBErr result;
CDBRecordDatabaseState* instance;
database = (CDBDatabase*)record->database;
database = (CDBDatabase*)record->unk_0x00;
instance = database->instance;
recordFile = record->file;
if (record->key.location == CDB_FS_LOCATION_SD) {
@@ -508,7 +508,7 @@ CDBErr CDBRecordUpdateModifiedDate(CDBRecord* record) {
ticks = OSGetTime();
modifiedDate = ticks / (OS_BUS_CLOCK / 4);
recordFile = record->file;
if ((((CDBRecordDatabaseState*)((CDBDatabase*)record->database)->instance)->openFlags & 2) == 0) {
if ((((CDBRecordDatabaseState*)((CDBDatabase*)record->unk_0x00)->instance)->openFlags & 2) == 0) {
CDBReportError("can't set modified time of the record; the database is opened as READONLY\n");
return CDB_ERROR_26;
}
@@ -570,7 +570,7 @@ CDBErr CDBRecordBackupToSD_(CDBRecord* record) {
CDBRecordKeyCopy(&localRecord.key, &record->key);
localRecord.file = NULL;
localRecord.key.location = CDB_FS_LOCATION_SD;
localRecord.database = record->database;
localRecord.unk_0x00 = record->unk_0x00;
err = CDBRecordFileCreateBlank(&localRecord);
if (err != CDB_ERROR_OK) {
CDBLock();
@@ -614,7 +614,7 @@ CDBErr CDBRecordBackupToSD_(CDBRecord* record) {
CDBLock();
recordFile = localRecord.file;
CDBRecordKeyCopy(&record->key, &localRecord.key);
record->database = localRecord.database;
record->unk_0x00 = localRecord.unk_0x00;
record->file = localRecord.file;
record->cryptBuf = localRecord.cryptBuf;
CDBRecordKeyCopy(&recordFile->key, &localRecord.key);

View File

@@ -27,7 +27,7 @@ static NWC24Err GetCachedFLHeader(NWC24FLHeader** header);
static ChkHostNameError CheckHostName(const char* hostName, u32 hostNameLength);
static inline NWC24Err CheckFriendInfo(const NWC24FriendInfo* friendInfo);
static u32 GetConfirmedBit(u32 index) {
static u32 GetUnkFlag(u32 index) {
NWC24Err result;
NWC24FLHeader* header;
u32 data;
@@ -37,11 +37,11 @@ static u32 GetConfirmedBit(u32 index) {
return result;
}
data = header->confirmedBits[index >> 5] >> (index & 0x1f) & 1;
data = header->unk_0x10[index >> 5] >> (index & 0x1f) & 1;
return (NWC24Err)data;
}
static NWC24Err SetConfirmedBit(u32 index, int flag) {
static NWC24Err SetUnkFlag(u32 index, int flag) {
NWC24Err result;
NWC24FLHeader* header;
@@ -50,11 +50,11 @@ static NWC24Err SetConfirmedBit(u32 index, int flag) {
return result;
}
header->confirmedBits[index >> 5] = ~(1 << (index & 0x1f)) & header->confirmedBits[index >> 5] | flag << (index & 0x1f);
header->unk_0x10[index >> 5] = ~(1 << (index & 0x1f)) & header->unk_0x10[index >> 5] | flag << (index & 0x1f);
return NWC24_OK;
}
static NWC24Err SetListFlag(int flag) {
static NWC24Err SetUnkFlag2(int flag) {
NWC24Err result;
NWC24FLHeader* header;
@@ -63,7 +63,7 @@ static NWC24Err SetListFlag(int flag) {
return result;
}
header->listFlags |= flag;
header->unk_0x3C |= flag;
return NWC24_OK;
}
@@ -101,7 +101,7 @@ NWC24Err NWC24ReadFriendInfo(NWC24FriendInfo* info, u32 index) {
Mail_memset(&info->addr.mailAddr[sizeof(NWC24UserId)], 0, sizeof(NWC24UserMailAddr) - sizeof(NWC24UserId));
}
result = GetConfirmedBit(index);
result = GetUnkFlag(index);
if (result == 1) {
info->attr.status = NWC24_FRIENDSTATUS_CONFIRMED;
}
@@ -189,9 +189,9 @@ NWC24Err NWC24WriteFriendInfo(const NWC24FriendInfo* friendInfo, u32 index) {
tmpFriendAddr = (NWC24FriendAddr*)&friendInfo->addr;
}
SetListFlag(1);
SetUnkFlag2(1);
result = SetConfirmedBit(index, 0);
result = SetUnkFlag(index, 0);
if (result != NWC24_OK) {
return result;
}
@@ -347,7 +347,7 @@ NWC24Err NWC24DeleteFriendInfo(u32 index) {
if (resultWrite == NWC24_OK) {
header->friendIds[index] = 0;
header->registeredCount--;
result = SetConfirmedBit(index, 0);
result = SetUnkFlag(index, 0);
if (result == NWC24_OK) {
NWC24FSeek(&file, 0, NWC24_SEEK_BEG);
resultWrite = NWC24FWrite(header, sizeof(NWC24FLHeader), &file);
@@ -374,8 +374,8 @@ NWC24Err NWC24SwapFriendInfos(u32 index1, u32 index2) {
u32 fileOffset1;
u32 fileOffset2;
int confirmedBit1;
int confirmedBit2;
int friendUnkFlag1;
int friendUnkFlag2;
if (!NWC24IsMsgLibOpened() && !NWC24IsMsgLibOpenedByTool()) {
return NWC24_ERR_LIB_NOT_OPENED;
@@ -429,10 +429,10 @@ NWC24Err NWC24SwapFriendInfos(u32 index1, u32 index2) {
header->friendIds[index2] = tmp;
// Swap some flag
confirmedBit1 = GetConfirmedBit(index1);
confirmedBit2 = GetConfirmedBit(index2);
SetConfirmedBit(index1, confirmedBit2);
SetConfirmedBit(index2, confirmedBit1);
friendUnkFlag1 = GetUnkFlag(index1);
friendUnkFlag2 = GetUnkFlag(index2);
SetUnkFlag(index1, friendUnkFlag2);
SetUnkFlag(index2, friendUnkFlag1);
// Write new header
NWC24FSeek(&file, 0, NWC24_SEEK_BEG);
@@ -629,10 +629,10 @@ NWC24Err NWC24iCreateFriendList() {
header->version = FRIEND_LIST_VERSION;
header->infoCount = NWC24_FRIEND_INFO_MAX;
header->registeredCount = 0;
header->confirmedBits[0] = 0;
header->confirmedBits[1] = 0;
header->confirmedBits[2] = 0;
header->confirmedBits[3] = 0;
header->unk_0x10[0] = 0;
header->unk_0x10[1] = 0;
header->unk_0x10[2] = 0;
header->unk_0x10[3] = 0;
result = NWC24FOpen(&file, FLFilePath, NWC24_OPEN_WRITE);
if (result != NWC24_OK) {

View File

@@ -170,7 +170,7 @@ NWC24Err NWC24GetMsgObj(NWC24MsgObj* msg, NWC24MBoxType type, u32 id) {
u32 count = 0;
if (!NWC24IsMsgLibOpened() && !NWC24IsMsgLibOpenedByTool())
return NWC24_ERR_LIB_NOT_OPENED;
entry = (MBCEntry*)NWC24WorkP->mbcEntry;
entry = (MBCEntry*)NWC24WorkP->unk_0x1800;
memset(entry, 0, sizeof(*entry));
if (id == 0)
return NWC24_ERR_HIDDEN;
@@ -251,7 +251,7 @@ NWC24Err NWC24GetMsgIdList(NWC24MBoxType type, u32* ids, u32 maxLength) {
MBCEntry* entry;
if (!NWC24IsMsgLibOpened() && !NWC24IsMsgLibOpenedByTool())
return NWC24_ERR_LIB_NOT_OPENED;
entry = (MBCEntry*)NWC24WorkP->mbcEntry;
entry = (MBCEntry*)NWC24WorkP->unk_0x1800;
err = GetCachedMBCHeader(type, &header);
if (err != NWC24_OK)
return err;
@@ -307,11 +307,11 @@ NWC24Err NWC24iOpenMBox(void) {
NWC24File recvFile, sendFile;
char* path = NWC24WorkP->pathWork;
NWC24Err err;
Mail_memset(NWC24WorkP->sendMbcHeader, 0, 128);
Mail_memset(NWC24WorkP->unk_0x1700, 0, 128);
err = GetCachedMBCHeader(NWC24_MBOX_TYPE_SEND, &header);
if (err != NWC24_OK)
return err;
Mail_memset(NWC24WorkP->recvMbcHeader, 0, 128);
Mail_memset(NWC24WorkP->unk_0x1780, 0, 128);
err = GetCachedMBCHeader(NWC24_MBOX_TYPE_RECV, &header);
if (err != NWC24_OK)
return err;
@@ -340,11 +340,11 @@ NWC24Err NWC24iInitMBox(void) {
NWC24File recvFile, sendFile;
NWC24Err recvResult, sendResult, err, sendStatus;
char* path = NWC24WorkP->pathWork;
Mail_memset(NWC24WorkP->sendMbcHeader, 0, 128);
Mail_memset(NWC24WorkP->unk_0x1700, 0, 128);
sendResult = CreateCtrlFile(NWC24_MBOX_TYPE_SEND, FALSE);
if (sendResult < 0)
return sendResult;
Mail_memset(NWC24WorkP->recvMbcHeader, 0, 128);
Mail_memset(NWC24WorkP->unk_0x1780, 0, 128);
recvResult = CreateCtrlFile(NWC24_MBOX_TYPE_RECV, FALSE);
if (recvResult < 0)
return recvResult;
@@ -616,11 +616,11 @@ static NWC24Err CreateCtrlFile(NWC24MBoxType type, BOOL force) {
err = MakeCtrlPath(path, type);
if (err != NWC24_OK)
return err;
entry = (MBCEntry*)NWC24WorkP->mbcEntry;
entry = (MBCEntry*)NWC24WorkP->unk_0x1800;
if (type == NWC24_MBOX_TYPE_SEND)
header = (MBCHeader*)NWC24WorkP->sendMbcHeader;
header = (MBCHeader*)NWC24WorkP->unk_0x1700;
else if (type == NWC24_MBOX_TYPE_RECV)
header = (MBCHeader*)NWC24WorkP->recvMbcHeader;
header = (MBCHeader*)NWC24WorkP->unk_0x1780;
else
return NWC24_ERR_INVALID_VALUE;
result = err;
@@ -676,7 +676,7 @@ static NWC24Err DeleteMsg(NWC24MBoxType type, u32 id, BOOL protect) {
NWC24Err err, deleteResult, closeResult;
if (!NWC24IsMsgLibOpened() && !NWC24IsMsgLibOpenedByTool())
return NWC24_ERR_LIB_NOT_OPENED;
entry = (MBCEntry*)NWC24WorkP->mbcEntry;
entry = (MBCEntry*)NWC24WorkP->unk_0x1800;
err = GetCachedMBCHeader(type, &header);
if (err != NWC24_OK)
return err;
@@ -754,7 +754,7 @@ static NWC24Err DuplicationCheck(MBCHeader* header, const NWC24MsgObjPrivate* ms
NWC24Err clearResult, deleteResult;
if (type == NWC24_MBOX_TYPE_SEND)
return NWC24_OK;
entry = (MBCEntry*)NWC24WorkP->mbcEntry;
entry = (MBCEntry*)NWC24WorkP->unk_0x1800;
for (offset = 128; offset < header->fileSize; offset += 128) {
if (count >= header->numMessages)
break;
@@ -809,9 +809,9 @@ static NWC24Err GetCachedMBCHeader(NWC24MBoxType type, MBCHeader** header) {
char* path;
NWC24Err err = NWC24_OK, closeResult;
if (type == NWC24_MBOX_TYPE_SEND)
*header = (MBCHeader*)NWC24WorkP->sendMbcHeader;
*header = (MBCHeader*)NWC24WorkP->unk_0x1700;
else if (type == NWC24_MBOX_TYPE_RECV)
*header = (MBCHeader*)NWC24WorkP->recvMbcHeader;
*header = (MBCHeader*)NWC24WorkP->unk_0x1780;
else {
*header = NULL;
return NWC24_ERR_INVALID_VALUE;
@@ -874,7 +874,7 @@ static NWC24Err InitMBCHeader(MBCHeader* header, NWC24MBoxType type) {
static NWC24Err AddMBCEntry(MBCHeader* header, const NWC24MsgObjPrivate* msg, NWC24File* file) {
u32 offset = header->freeOffset;
MBCEntry* entry = (MBCEntry*)NWC24WorkP->mbcEntry;
MBCEntry* entry = (MBCEntry*)NWC24WorkP->unk_0x1800;
u32 next;
NWC24Err err;
if (offset == 0)
@@ -906,7 +906,7 @@ static NWC24Err AddMBCEntry(MBCHeader* header, const NWC24MsgObjPrivate* msg, NW
}
static NWC24Err ClearMBCEntry(MBCHeader* header, NWC24File* file, u32 offset) {
MBCEntry* entry = (MBCEntry*)NWC24WorkP->mbcEntry;
MBCEntry* entry = (MBCEntry*)NWC24WorkP->unk_0x1800;
NWC24Err err = NWC24FSeek(file, offset, NWC24_SEEK_BEG);
if (err != NWC24_OK)
return err;

View File

@@ -243,11 +243,11 @@ static inline NWC24Err WriteMBDelayField(NWC24MsgObjPrivate* msg) {
static inline NWC24Err WriteExtraFields(NWC24MsgObjPrivate* msg) {
NWC24Err err;
if (msg->extraData.size == 0)
if (msg->unk_0xD0.size == 0)
return NWC24_OK;
err = NWC24FWrite(msg->extraData.ptr, msg->extraData.size, m_pFile);
err = NWC24FWrite(msg->unk_0xD0.ptr, msg->unk_0xD0.size, m_pFile);
if (err == NWC24_OK)
msg->length += msg->extraData.size;
msg->length += msg->unk_0xD0.size;
return err;
}

View File

@@ -77,7 +77,7 @@ NWC24Err NWC24InitMsgObj(NWC24MsgObj* msg, NWC24MsgType type) {
NWC24Data_Init(&msgObj->toData);
NWC24Data_Init(&msgObj->unk_0x50);
NWC24Data_Init(&msgObj->unk_0x58);
NWC24Data_Init(&msgObj->extraData);
NWC24Data_Init(&msgObj->unk_0xD0);
NWC24Data_Init(&msgObj->faceData);
NWC24Data_Init(&msgObj->altName);

View File

@@ -53,7 +53,7 @@ void AudioFrameCallback() {
for (i = 0; i < AX_VOICE_MAX; i++) {
VoiceInfo* currVoice = &Voices[i];
if (currVoice->getAXVPB() == NULL && currVoice->getUpdateFlag() != 2) {
if (currVoice->getAXVPB() == NULL && currVoice->getUnk_0x0C() != 2) {
continue;
}
@@ -108,7 +108,7 @@ void AudioFrameCallback() {
currVoice->setState(0);
currVoice->setUnk_0x08(0);
}
currVoice->setUpdateFlag(0);
currVoice->setUnk_0x0C(0);
}
return;
}
@@ -370,7 +370,7 @@ clean_up:
}
Voices[axVoiceBuf[i]->index].setAXVPB(axVoiceBuf[i]);
Voices[axVoiceBuf[i]->index].setState(1);
Voices[axVoiceBuf[i]->index].setUpdateFlag(1);
Voices[axVoiceBuf[i]->index].setUnk_0x0C(1);
}
if (handle != NULL) {
for (u32 i = 0; i < chanCount; i++) {
@@ -397,7 +397,7 @@ bool AxAdpcmHandle::setVolume(f32 newVolume) {
mix.vR = newVolume * mpVoices[i]->getMix()->vR;
AXSetVoiceMix(mpVoices[i]->getAXVPB(), &mix);
mpVoices[i]->setUpdateFlag(1);
mpVoices[i]->setUnk_0x0C(1);
a = true;
}
return a;
@@ -416,7 +416,7 @@ void AxAdpcmSimplePlayer::stop(AxAdpcmHandle* handle) {
}
handle->getVoice(i)->setState(7);
handle->getVoice(i)->setUpdateFlag(1);
handle->getVoice(i)->setUnk_0x0C(1);
if (handle->getVoice(i)->getUnk_0x08() != 0) {
handle->getVoice(i)->setUnk_0x08(0);
}
@@ -440,8 +440,8 @@ void AxAdpcmSimplePlayer::setVolume(AxAdpcmHandle* handle, f32 volume) {
void AxAdpcmSimplePlayer::calc() {
for (int i = 0; i < AX_VOICE_MAX; i++) {
if (Voices[i].getUpdateFlag() == 1) {
Voices[i].setUpdateFlag(2);
if (Voices[i].getUnk_0x0C() == 1) {
Voices[i].setUnk_0x0C(2);
}
}
}

View File

@@ -16,7 +16,7 @@ namespace ipl {
namespace cs {
namespace savedata {
struct data {
char sMountPath[MAX_PATH_LENGTH + sizeof(wchar_t)]; // 0x00
char unk_0x00[MAX_PATH_LENGTH + sizeof(wchar_t)]; // 0x00
char sPath[MAX_PATH_LENGTH + sizeof(wchar_t)]; // 0x42
u8 flag; // 0x84
u8* pData; // 0x88
@@ -67,7 +67,7 @@ namespace ipl {
data* data = static_cast<savedata::data*>(*hdr->value.ptr_v);
if (data->pData == NULL && data->size == 0) {
if (data->sMountPath[0] == 0) {
if (data->unk_0x00[0] == 0) {
error = load_nand_(vm, data, heap, offset, size, 0x20);
} else {
error = load_vf_(vm, data, heap, offset, size, 0x20);
@@ -127,7 +127,7 @@ namespace ipl {
}
}
if (data->sMountPath[0] == '\0') {
if (data->unk_0x00[0] == '\0') {
error = load_nand_(vm, data, csHeap, 0, size, -0x20);
} else {
error = load_vf_(vm, data, csHeap, 0, size, -0x20);
@@ -591,7 +591,7 @@ namespace ipl {
memset(data, 0, sizeof(savedata::data));
memset(temp, 0, sizeof(temp));
if (arg1 != NULL) {
util::utf16_to_ascii(data->sMountPath, temp, MAX_PATH_LENGTH, arg0);
util::utf16_to_ascii(data->unk_0x00, temp, MAX_PATH_LENGTH, arg0);
memset(temp, 0, sizeof(temp));
util::utf16_to_ascii(data->sPath, temp, MAX_PATH_LENGTH, arg1);
} else {

View File

@@ -436,10 +436,10 @@ namespace ipl {
data.titleId = System::getChannelManager()->getTitleID(mChanPage, mChanIndex);
data.threadTerminated = mbModuleTerminated;
data.unk_0x19 = true;
data.mbHasNewMessage = true;
data.unk_0x1A = true;
if (!(System::getNwc24Manager() != NULL && System::getNwc24Manager()->isNewMessageThere(ES_TITLE_CODE(data.titleId)))) {
data.mbHasNewMessage = false;
data.unk_0x1A = false;
}
System::getCSManager()->setData(data);

View File

@@ -1,5 +1,3 @@
#define IPL_CHANNEL_SELECT_CPP
#include <decomp/ide.h>
#include "iplSceneUI.h"
@@ -45,7 +43,8 @@ namespace ipl {
return r;
}
inline f32 HermiteIntp<f32>::get() const {
template <>
f32 HermiteIntp<f32>::get() const {
f32 var_f27 = mFrame;
f32 var_f28 = 1.0f / mMaxFrame;
f32 r = (mStart * (1.0f + ((var_f28 * (var_f28 * (var_f28 * (var_f27 * (2.0f * var_f27 * var_f27))))) -
@@ -330,8 +329,8 @@ namespace ipl {
setSceneParentFlags(SCN_PARENTFLAG_DRAW | SCN_PARENTFLAG_CALC);
mOrthoTrans = math::VEC3(0.0f, 0.0f, 0.0f);
mOrthoScale = math::VEC2(1.0f, 1.0f);
unk_0xD8 = math::VEC3(0.0f, 0.0f, 0.0f);
unk_0xE4 = math::VEC2(1.0f, 1.0f);
nw4r::ut::Rect proj4x3;
System::getProjectionRect4x3(&proj4x3);
@@ -648,7 +647,7 @@ namespace ipl {
void ChannelSelect::draw() {
if (mState != STATE_INACTIVE && System::getSceneManager()->onDrawLayer(scene::DRAW_LAYER_DEFAULT)) {
if (mState == STATE_NORMAL_FADE_ZOOM || mState == STATE_NORMAL_DONE_FADE_ZOOM || mState == STATE_NORMAL_RESTART) {
utility::Graphics::setOrthoTransAndScale(mOrthoTrans, mOrthoScale);
utility::Graphics::setOrthoTransAndScale(unk_0xD8, unk_0xE4);
}
utility::Graphics::setOrtho();
@@ -1845,7 +1844,7 @@ namespace ipl {
initChanZoomParam(myVec, 1);
setChanZoomOrtho();
if (System::getChannelManager()->isDiskChannelReady()) {
if (System::getChannelManager()->isUnk_0x1B81()) {
if (System::getBS2Manager()->getIPLState() == bs2::IPL_STATE_RVL_GAME ||
System::getBS2Manager()->getIPLState() == bs2::IPL_STATE_DISK_UPDATE) {
if (mspDiskID != NULL) {
@@ -1857,7 +1856,7 @@ namespace ipl {
if (strncmp(diskID, mspDiskID, 4) == 0) {
if (strncmp(diskMaker, mspDiskMaker, 2) == 0) {
System::getChannelManager()->setDiskChannelReady(false);
System::getChannelManager()->setUnk_0x1B81(false);
}
}
}
@@ -1910,10 +1909,10 @@ namespace ipl {
u16 efbHeight;
if (mState == STATE_NORMAL_FADE_ZOOM || mState == STATE_NORMAL_DONE_FADE_ZOOM || mState == STATE_NORMAL_RESTART) {
nw4r::math::MTX44 mtx;
f32 right = mOrthoTrans.x + projRect.right / mOrthoScale.x;
f32 left = mOrthoTrans.x + projRect.left / mOrthoScale.x;
f32 bottom = mOrthoTrans.y - projRect.bottom / mOrthoScale.y;
f32 top = mOrthoTrans.y - projRect.top / mOrthoScale.y;
f32 right = unk_0xD8.x + projRect.right / unk_0xE4.x;
f32 left = unk_0xD8.x + projRect.left / unk_0xE4.x;
f32 bottom = unk_0xD8.y - projRect.bottom / unk_0xE4.y;
f32 top = unk_0xD8.y - projRect.top / unk_0xE4.y;
MTXOrtho(mtx, top, bottom, left, right, -100.0f, 100.0f);
nw4r::math::VEC4 vec4_in(vec.x, vec.y, 0.0f, 1.0f);
nw4r::math::VEC4 vec4;
@@ -1921,10 +1920,10 @@ namespace ipl {
fbWidth = rMode->fbWidth;
efbHeight = rMode->efbHeight;
f32 projectionWidth = projRect.GetWidth();
scissorX = ((1.0f + vec4.x) * fbWidth / 2) - ((mChanThumbOff_X * mOrthoScale.x) * (fbWidth / projectionWidth));
scissorY = (efbHeight - ((1.0f + vec4.y) * efbHeight / 2)) - (mChanThumbOff_Y * mOrthoScale.y);
scissorWidth = 2.0f * (mChanThumbOff_X * mOrthoScale.x) * (fbWidth / projectionWidth);
scissorHeight = 2.0f * (mChanThumbOff_Y * mOrthoScale.y);
scissorX = ((1.0f + vec4.x) * fbWidth / 2) - ((mChanThumbOff_X * unk_0xE4.x) * (fbWidth / projectionWidth));
scissorY = (efbHeight - ((1.0f + vec4.y) * efbHeight / 2)) - (mChanThumbOff_Y * unk_0xE4.y);
scissorWidth = 2.0f * (mChanThumbOff_X * unk_0xE4.x) * (fbWidth / projectionWidth);
scissorHeight = 2.0f * (mChanThumbOff_Y * unk_0xE4.y);
} else {
fbWidth = rMode->fbWidth;
efbHeight = rMode->efbHeight;
@@ -2003,8 +2002,8 @@ namespace ipl {
nw4r::ut::Rect projRect;
System::getProjectionRect(&projRect);
mOrthoTrans = math::VEC3((frames[0].x + frames[1].x) / 2, (frames[0].y + frames[2].y) / 2, 0.0f);
mOrthoScale = math::VEC2(projRect.GetWidth() / (frames[1].x - frames[0].x), projRect.GetHeight() / (frames[0].y - frames[2].y));
unk_0xD8 = math::VEC3((frames[0].x + frames[1].x) / 2, (frames[0].y + frames[2].y) / 2, 0.0f);
unk_0xE4 = math::VEC2(projRect.GetWidth() / (frames[1].x - frames[0].x), projRect.GetHeight() / (frames[0].y - frames[2].y));
}
int ChannelSelect::isInChannelPaneNames(const char* name) const {

View File

@@ -467,7 +467,7 @@ namespace ipl {
mpDiskBnrLayout->calc();
} else {
calcModuleChannel();
System::getChannelManager()->setDiskChannelReady(false);
System::getChannelManager()->setUnk_0x1B81(false);
}
if ((mState == STATE_NORMAL || mState == STATE_WAIT_TMD || mState == STATE_PREPARE_BOOT || mState == STATE_BOOT_SCENE) && !unk_0x90 &&
@@ -1220,7 +1220,7 @@ namespace ipl {
#pragma ppc_iro_level 0
void ChannelTitle::calcNormalParentalDialog() {
if (mChanSceneID == SCENE_DISK_CHANNEL &&
(System::getBS2Manager()->getIPLState() != bs2::IPL_STATE_RVL_GAME || System::getChannelManager()->isDiskChannelReady())) {
(System::getBS2Manager()->getIPLState() != bs2::IPL_STATE_RVL_GAME || System::getChannelManager()->isUnk_0x1B81())) {
mParentalState = PARENTAL_STATE_FAILED;
}
@@ -1767,7 +1767,7 @@ namespace ipl {
data.threadTerminated = mbModuleTerminated;
if (System::getNwc24Manager() == NULL || !System::getNwc24Manager()->isNewMessageThere(ES_TITLE_CODE(data.titleId))) {
data.mbHasNewMessage = false;
data.unk_0x1A = false;
}
System::getCSManager()->setData(data);
if (!System::getCSManager()->init(mpModuleFile, mpModuleThread)) {
@@ -2064,7 +2064,7 @@ namespace ipl {
break;
}
case DISK_STATE_WII_DISK_IDLE: {
if (BS2State != bs2::IPL_STATE_RVL_GAME || System::getChannelManager()->isDiskChannelReady()) {
if (BS2State != bs2::IPL_STATE_RVL_GAME || System::getChannelManager()->isUnk_0x1B81()) {
mDiskState = DISK_STATE_EJECT;
mpDiskBnrAnims[DISK_ANIM_GRP_ALL][DISK_ANIM_DISK_EJECT]->play();
mpDiskBnrLayout->GetRootPane()->SetVisible(true);

View File

@@ -1118,7 +1118,7 @@ extern "C" void iplSDChannelTitle_updateScriptLoad(SDChannelTitle* scene) {
data.titleId = scene->mTitleId;
data.threadTerminated = scene->mbScriptFailed;
if (!System::getNwc24Manager() || !System::getNwc24Manager()->isNewMessageThere(static_cast<u32>(data.titleId & 0xffffffffULL))) {
data.mbHasNewMessage = false;
data.unk_0x1A = false;
}
System::getCSManager()->setData(data);
if (!System::getCSManager()->init(scene->mpScriptFile, scene->mpRsoThread)) {

View File

@@ -462,6 +462,7 @@ namespace ipl {
directPagePath = "index03.html";
break;
case 7:
default:
directPagePath = "index01.html";
break;
}
@@ -1605,10 +1606,10 @@ namespace ipl {
OSReport("initKeyboard formId:%d\n", mpWiiSettingData->data[0x11]);
memset(unk_0x938, 0, sizeof(unk_0x938));
int stringLimit;
keyboard::Manager::KeyboardType keyboardType = keyboard::Manager::LETTER;
int rowLimit;
int invalidInput = 0;
keyboard::Manager::KeyboardType keyboardType = keyboard::Manager::LETTER;
int rowLimit = 0;
int stringLimit = 0;
int productArea = static_cast<s8>(SCGetProductArea());
switch (mpWiiSettingData->data[0x11]) {
@@ -1710,16 +1711,14 @@ namespace ipl {
}
if (productArea == 11) {
void* systemDic = System::getKeyboard()->getZiSystemDic();
void* oemDic = System::getKeyboard()->getZiOemDic();
System::getKeyboard()->memoFrm()->setZiDictionary(oemDic, systemDic);
System::getKeyboard()->memoFrm()->setZiDictionary(System::getKeyboard()->getZiOemDic(), System::getKeyboard()->getZiSystemDic());
}
keyboard::Manager::KeyboardSetting setting;
setting.rowLimit = rowLimit;
setting.type = keyboardType;
setting.wcString = reinterpret_cast<const wchar_t*>(unk_0x938);
setting.stringLimit = stringLimit;
setting.type = keyboardType;
setting.rowLimit = rowLimit;
System::getKeyboard()->start(0, setting);
if (invalidInput != 0) {
@@ -1739,6 +1738,7 @@ namespace ipl {
if (mKeyboardState.pressOK) {
onTextInputOK();
u8 formId = mpWiiSettingData->data[0x11];
formText = NULL;
switch (formId) {
case 1:
formText = mpStringBuffer->nickname;
@@ -1809,8 +1809,7 @@ namespace ipl {
memcpy(mpStringBuffer->asterisks, mpStringBuffer->securityKey, sizeof(mpStringBuffer->securityKey));
mpStringBuffer->asterisks[0x41] = 0;
while (mpStringBuffer->asterisks[index] != 0) {
mpStringBuffer->asterisks[index] = '*';
index++;
mpStringBuffer->asterisks[index++] = '*';
}
if (index > 0x20) {
mpStringBuffer->asterisks[0x20] = '\n';
@@ -1822,6 +1821,7 @@ namespace ipl {
}
} else {
u8 formId = mpWiiSettingData->data[0x11];
formText = NULL;
switch (formId) {
case 1:
formText = mpStringBuffer->nickname;

View File

@@ -30,7 +30,7 @@ namespace ipl {
SettingSelect::SettingSelect(EGG::Heap* heap, int arg)
: Base(heap), ::gui::EventHandler(), mState(STATE_WAIT_BUTTON_FADE_IN), mPrevState(STATE_WAIT_BUTTON_FADE_IN), mSettingArg(arg),
mpLayout(NULL), mpLayoutFile(NULL), mpGui(NULL), mPendingSceneId(0), mExitSeqStep(0) {
mpLayout(NULL), mpLayoutFile(NULL), mpGui(NULL), unk_0x90(0), unk_0x94(0) {
setSceneParentFlags(SCN_PARENTFLAG_CALC | SCN_PARENTFLAG_DRAW);
}
@@ -222,7 +222,7 @@ namespace ipl {
void SettingSelect::stt_1st_fadeout() {
if (is_stopped_all_anm()) {
if (mPendingSceneId != 0) {
if (unk_0x90 != 0) {
System::getFader()->fadeOut();
CHANGE_STATE(STATE_WAIT_BLACK_OUT);
} else {
@@ -247,7 +247,7 @@ namespace ipl {
void SettingSelect::stt_2nd_fadeout() {
if (is_stopped_all_anm()) {
if (mPendingSceneId != 0) {
if (unk_0x90 != 0) {
CHANGE_STATE(STATE_WAIT_CHILD);
reset_gui();
} else {
@@ -309,7 +309,7 @@ namespace ipl {
case STATE_1ST_NORMAL: {
System::getChannelManager()->refreshAsync();
System::getFader()->fadeOut();
mPendingSceneId = SCENE_BOARD;
unk_0x90 = 4;
reserveAllSceneDestruction(SCENE_BOARD, NULL);
@@ -369,8 +369,8 @@ namespace ipl {
int backAnim = -1;
int inAnim = -1;
switch (mPendingSceneId) {
case SCENE_MEMORY: {
switch (unk_0x90) {
case 13: {
#ifndef KOREAN_BUILD
backAnim = ANIM_WII_SAVE_DATA_BACK;
inAnim = ANIM_GC_SAVE_DATA_IN;
@@ -380,12 +380,12 @@ namespace ipl {
#endif
break;
}
case SCENE_MEMORY_CARD: {
case 14: {
backAnim = ANIM_GC_SAVE_DATA_BACK;
inAnim = ANIM_WII_SAVE_DATA_IN;
break;
}
case SCENE_CHANNEL_EDIT: {
case 12: {
backAnim = ANIM_CHANNEL_BACK;
inAnim = ANIM_SAVE_DATA_IN;
if (mSettingArg == SettingSelectArg::ARG_START_SAVE_DATA) {
@@ -404,14 +404,14 @@ namespace ipl {
void SettingSelect::stt_wait_child_anm() {
if (is_stopped_all_anm()) {
switch (mPendingSceneId) {
case SCENE_CHANNEL_EDIT: {
switch (unk_0x90) {
case 12: {
static_cast<SettingButton*>(System::getScene(SCENE_SETTING_BUTTON))->showWii();
CHANGE_STATE(STATE_2ND_NORMAL);
break;
}
case SCENE_MEMORY:
case SCENE_MEMORY_CARD: {
case 13:
case 14: {
static_cast<SettingButton*>(System::getScene(SCENE_SETTING_BUTTON))->showWii();
#ifndef KOREAN_BUILD
CHANGE_STATE(STATE_3RD_NORMAL);
@@ -422,7 +422,7 @@ namespace ipl {
}
}
mPendingSceneId = 0;
unk_0x90 = 0;
}
}
@@ -587,7 +587,7 @@ namespace ipl {
break;
}
case BTN_SETTING: {
mPendingSceneId = SCENE_SETTING;
unk_0x90 = 18;
flashAnim = ANIM_SETTING_FLASH;
outAnim = ANIM_DATA_MANAGE_OUT;
reserveAllSceneDestruction(SCENE_SETTING, (void*)Setting::ARG_NORMAL_PAGE);
@@ -596,7 +596,7 @@ namespace ipl {
}
case BTN_SAVEDATA: {
#ifdef KOREAN_BUILD
mPendingSceneId = SCENE_MEMORY;
unk_0x90 = 13;
#endif
flashAnim = ANIM_SAVE_DATA_FLASH;
outAnim = ANIM_CHANNEL_OUT;
@@ -611,7 +611,7 @@ namespace ipl {
break;
}
case BTN_CHANNEL: {
mPendingSceneId = SCENE_CHANNEL_EDIT;
unk_0x90 = 12;
flashAnim = ANIM_CHANNEL_FLASH;
outAnim = ANIM_SAVE_DATA_OUT;
createChildScene(SCENE_CHANNEL_EDIT, this, NULL);
@@ -623,7 +623,7 @@ namespace ipl {
break;
}
case BTN_WII_SAVE: {
mPendingSceneId = SCENE_MEMORY;
unk_0x90 = 13;
flashAnim = ANIM_WII_SAVE_DATA_FLASH;
outAnim = ANIM_GC_SAVE_DATA_OUT;
createChildScene(SCENE_MEMORY, this, NULL);
@@ -632,7 +632,7 @@ namespace ipl {
break;
}
case BTN_GC_SAVE: {
mPendingSceneId = SCENE_MEMORY_CARD;
unk_0x90 = 14;
flashAnim = ANIM_GC_SAVE_DATA_FLASH;
outAnim = ANIM_WII_SAVE_DATA_OUT;
createChildScene(SCENE_MEMORY_CARD, this, NULL);
@@ -689,7 +689,7 @@ namespace ipl {
}
void SettingSelect::calc_exit_sequence() {
switch (mExitSeqStep) {
switch (unk_0x94) {
case 0: {
prepare_exit_abort();
break;
@@ -720,13 +720,13 @@ namespace ipl {
System::getBS2Manager()->abort();
System::stopReceiveSchedule();
mExitSeqStep = 1;
unk_0x94 = 1;
}
}
void SettingSelect::wait_decide_se() {
if (!snd::getSystem()->isSEActive("WIPL_SE_DECIDE")) {
mExitSeqStep = 2;
unk_0x94 = 2;
}
}
@@ -734,7 +734,7 @@ namespace ipl {
__WPADReconnect(TRUE);
snd::getSystem()->stopAllSound(20);
System::getFader()->fadeOut();
mExitSeqStep = 3;
unk_0x94 = 3;
}
void SettingSelect::finish_exit_reboot() {

View File

@@ -91,7 +91,7 @@ namespace ipl {
extern "C" const u32 scLangLookup__Q23ipl7channel[][16];
Manager::Manager(EGG::Heap* heap)
: mpHeap(heap), mState(INIT), mbCanRefresh(0), mbDiskChannelReady(false), mbSetDiskBannerInfo(false), mPrevNandResult(NAND_RESULT_OK),
: mpHeap(heap), mState(INIT), mbCanRefresh(0), unk_0x1B81(false), mbSetDiskBannerInfo(false), mPrevNandResult(NAND_RESULT_OK),
mbLoadedChJump(false) {
mpLockedMsgFile = NULL;
@@ -951,7 +951,7 @@ namespace ipl {
int state = System::getBS2Manager()->getIPLState();
if (state == bs2::IPL_STATE_RVL_GAME && mBS2State != bs2::IPL_STATE_RVL_GAME) {
mbSetDiskBannerInfo = setDiskBannerInfo(false);
mbDiskChannelReady = true;
unk_0x1B81 = true;
} else if (state != bs2::IPL_STATE_RVL_GAME && state != mBS2State) {
setDiskBannerInfo(true);
}
@@ -1076,7 +1076,7 @@ namespace ipl {
ARCFileInfo readFile;
if (unk) {
mbDiskChannelReady = false;
unk_0x1B81 = false;
}
int diskPage, diskIndex;

View File

@@ -46,17 +46,17 @@ namespace ipl {
}
if (mButton != 0) {
if (down(BTN_INTERACT)) {
mDecideHoldCount++;
unk_0x08++;
} else {
mDecideHoldCount = 0;
unk_0x08 = 0;
mButton = 0;
}
} else {
mDecideHoldCount = 0;
unk_0x08 = 0;
}
} else {
mButton = 0;
mDecideHoldCount = 0;
unk_0x08 = 0;
}
switch (mRumbleType) {
@@ -109,7 +109,7 @@ namespace ipl {
return NULL;
}
int ipl::controller::Base::decide() const {
return mDecideHoldCount == 5;
return unk_0x08 == 5;
}
int ipl::controller::Base::rumble(int type) {
int ret = FALSE;
@@ -130,44 +130,44 @@ namespace ipl {
}
void ipl::controller::Revolution::read() {
if (!isValidDpd()) {
mpKpadStatus->pos.y = 1.0f / 0.0f;
mpKpadStatus->pos.x = 1.0f / 0.0f;
mpKpadStatus->speed = 0.0f;
mpKpadStatus->vec.y = 0.0f;
mpKpadStatus->vec.x = 0.0f;
unk_0x20->pos.y = 1.0f / 0.0f;
unk_0x20->pos.x = 1.0f / 0.0f;
unk_0x20->speed = 0.0f;
unk_0x20->vec.y = 0.0f;
unk_0x20->vec.x = 0.0f;
}
mbWasPinching = mbPinching;
unk_0x1E = unk_0x1D;
if (isValidBtn()) {
if (mbWasPinching == 0) {
if (unk_0x1E == 0) {
if (down(0x800) && down(0x400)) {
mbPinching = 1;
unk_0x1D = 1;
}
} else if (!down(0x800) || !down(0x400)) {
mbPinching = 0;
unk_0x1D = 0;
}
} else {
mbPinching = 0;
unk_0x1D = 0;
}
Base::read();
}
bool ipl::controller::Revolution::isValidDpd() const {
if (mbForceInvalid != 0) {
if (unk_0x1C != 0) {
return false;
}
return (mpKpadStatus->wpad_err == 0 || mpKpadStatus->wpad_err == -7) && mpKpadStatus->dpd_valid_fg != 0;
return (unk_0x20->wpad_err == 0 || unk_0x20->wpad_err == -7) && unk_0x20->dpd_valid_fg != 0;
}
bool ipl::controller::Revolution::isValidBtn() const {
u8 val = mpKpadStatus->wpad_err;
u8 val = unk_0x20->wpad_err;
return (u8)(val + 7) <= 7 && ((1 << (val + 7)) & 0xA1) != 0;
}
bool ipl::controller::Revolution::down(u32 mButton) const {
bool ret = false;
if (isValidBtn()) {
if (mpKpadStatus->hold & (mButton & 0xFFFF)) {
if (unk_0x20->hold & (mButton & 0xFFFF)) {
ret = true;
}
}
@@ -177,7 +177,7 @@ namespace ipl {
ipl::math::VEC2 ipl::controller::Revolution::getDpdProjectionPos() const {
math::VEC2 ret;
Vec2 dest;
Vec2 src = {mpKpadStatus->pos.x, mpKpadStatus->pos.y};
Vec2 src = {unk_0x20->pos.x, unk_0x20->pos.y};
nw4r::ut::Rect nw4r_rect; // constructor shouldn't be inlined
Rect kpad_rect;
@@ -216,9 +216,9 @@ namespace ipl {
y = fy;
}
ipl::controller::Classic::Classic(int arg0, KPADStatus& arg1) : Revolution(arg0, arg1) {
mClassicCursorPos.x = 0.01f;
mClassicCursorPos.y = 0.01f;
mClassicCursorTimer = 0;
unk_0x24.x = 0.01f;
unk_0x24.y = 0.01f;
unk_0x2C = 0;
}
ipl::controller::Base::~Base() {
}
@@ -230,32 +230,32 @@ namespace ipl {
}
void ipl::controller::Classic::read() {
if (!Revolution::isValidDpd()) {
math::VEC2 lstick(mpKpadStatus->ex_status.cl.lstick.x, mpKpadStatus->ex_status.cl.lstick.y);
math::VEC2 lstick(unk_0x20->ex_status.cl.lstick.x, unk_0x20->ex_status.cl.lstick.y);
if (lstick.x * lstick.x + lstick.y * lstick.y > 0.0036f) {
mClassicCursorPos.x = math::abs_clamp(mClassicCursorPos.x + mpKpadStatus->ex_status.cl.lstick.x * 0.05f, 1.8f);
mClassicCursorPos.y = math::abs_clamp(mClassicCursorPos.y - mpKpadStatus->ex_status.cl.lstick.y * 0.05f, 1.2f);
unk_0x24.x = math::abs_clamp(unk_0x24.x + unk_0x20->ex_status.cl.lstick.x * 0.05f, 1.8f);
unk_0x24.y = math::abs_clamp(unk_0x24.y - unk_0x20->ex_status.cl.lstick.y * 0.05f, 1.2f);
}
math::VEC2 rstick = math::VEC2(mpKpadStatus->ex_status.cl.rstick.x, mpKpadStatus->ex_status.cl.rstick.y);
math::VEC2 rstick = math::VEC2(unk_0x20->ex_status.cl.rstick.x, unk_0x20->ex_status.cl.rstick.y);
if (getClassicHoldFlag() != 0 || lstick.x * lstick.x + lstick.y * lstick.y > 0.0036f ||
rstick.x * rstick.x + rstick.y * rstick.y > 0.0036f) {
mClassicCursorTimer = 180;
unk_0x2C = 180;
}
if (--mClassicCursorTimer < 0) {
mClassicCursorTimer = 0;
if (--unk_0x2C < 0) {
unk_0x2C = 0;
}
} else {
mClassicCursorPos.y = 0.01f;
mClassicCursorPos.x = 0.01f;
mClassicCursorTimer = 0;
unk_0x24.y = 0.01f;
unk_0x24.x = 0.01f;
unk_0x2C = 0;
}
Revolution::read();
}
int ipl::controller::Classic::getClassicHoldFlag() const {
return mpKpadStatus->ex_status.cl.hold;
return unk_0x20->ex_status.cl.hold;
}
template <>
f32 ipl::math::abs_clamp<f32>(const f32& x, const f32& y) {
@@ -270,7 +270,7 @@ namespace ipl {
ipl::math::VEC2 ipl::controller::Classic::getHorizon() const {
math::VEC2 ret;
if (Revolution::isValidDpd()) {
ret.set(mpKpadStatus->horizon.x, mpKpadStatus->horizon.y);
ret.set(unk_0x20->horizon.x, unk_0x20->horizon.y);
} else {
ret.x = 1.0f;
ret.y = -0.2679492f;
@@ -280,9 +280,9 @@ namespace ipl {
ipl::math::VEC2 ipl::controller::Classic::getDpdPos() const {
math::VEC2 ret;
if (Revolution::isValidDpd()) {
ret.set(mpKpadStatus->pos.x, mpKpadStatus->pos.y);
} else if (mClassicCursorTimer != 0) {
ret = mClassicCursorPos;
ret.set(unk_0x20->pos.x, unk_0x20->pos.y);
} else if (unk_0x2C != 0) {
ret = unk_0x24;
} else {
ret.x = (1.0f / 0.0f);
ret.y = (1.0f / 0.0f);
@@ -296,9 +296,9 @@ namespace ipl {
ipl::math::VEC2 ipl::controller::Classic::getDpdProjectionPos() const {
math::VEC2 ret;
if (Revolution::isValidDpd()) {
ret.set(mpKpadStatus->pos.x, mpKpadStatus->pos.y);
} else if (mClassicCursorTimer != 0) {
ret = mClassicCursorPos;
ret.set(unk_0x20->pos.x, unk_0x20->pos.y);
} else if (unk_0x2C != 0) {
ret = unk_0x24;
} else {
ret.set(1.0f / 0.0f, 1.0f / 0.0f);
}
@@ -454,7 +454,7 @@ void ipl::controller::Master::setForceInvalid(bool flag) {
return -1;
}
void ipl::controller::Base::setForceInvalid(bool flag) {
mbForceInvalid = flag;
unk_0x1C = flag;
}
int ipl::controller::Base::getType() const {
return mType;
@@ -463,65 +463,65 @@ void ipl::controller::Master::setForceInvalid(bool flag) {
return mChan;
}
KPADStatus* ipl::controller::Revolution::getKPADStatus() const {
return mpKpadStatus;
return unk_0x20;
}
f32 ipl::controller::Revolution::getDpdDistance() const {
return mpKpadStatus->dist;
return unk_0x20->dist;
}
int ipl::controller::Revolution::getReleaseFlag() const {
return mpKpadStatus->release;
return unk_0x20->release;
}
int ipl::controller::Revolution::getTrigFlag() const {
return mpKpadStatus->trig;
return unk_0x20->trig;
}
int ipl::controller::Revolution::getHoldFlag() const {
return mpKpadStatus->hold;
return unk_0x20->hold;
}
int ipl::controller::Revolution::pinchOffTrg() const {
int ret = 0;
if (isValidBtn() && mbPinching == 0 && mbWasPinching != 0) {
if (isValidBtn() && unk_0x1D == 0 && unk_0x1E != 0) {
ret = 1;
}
return ret;
}
int ipl::controller::Revolution::pinch() const {
int ret = 0;
if (isValidBtn() && mbPinching != 0) {
if (isValidBtn() && unk_0x1D != 0) {
ret = 1;
}
return ret;
}
int ipl::controller::Revolution::pinchTrg() const {
int ret = 0;
if (isValidBtn() && mbPinching != 0 && mbWasPinching == 0) {
if (isValidBtn() && unk_0x1D != 0 && unk_0x1E == 0) {
ret = 1;
}
return ret;
}
bool ipl::controller::Revolution::repeat(u32 button) const {
return down(button) && (mpKpadStatus->hold & 0x80000000) != 0;
return down(button) && (unk_0x20->hold & 0x80000000) != 0;
}
BOOL ipl::controller::Classic::isValidDpdClassic() const {
return mClassicCursorTimer != 0;
return unk_0x2C != 0;
}
bool ipl::controller::Classic::isValidDpd() const {
if (mbForceInvalid != 0) {
if (unk_0x1C != 0) {
return false;
}
return (Revolution::isValidDpd() != 0) || (mClassicCursorTimer != 0);
return (Revolution::isValidDpd() != 0) || (unk_0x2C != 0);
}
int ipl::controller::Classic::getClassicReleaseFlag() const {
return mpKpadStatus->ex_status.cl.release;
return unk_0x20->ex_status.cl.release;
}
int ipl::controller::Classic::getClassicTrigFlag() const {
return mpKpadStatus->ex_status.cl.trig;
return unk_0x20->ex_status.cl.trig;
}
bool ipl::controller::Classic::upTrg(u32 button) const {
bool ret = false;
if (isValidBtn()) {
bool pressed = true;
KPADStatus* status = mpKpadStatus;
KPADStatus* status = unk_0x20;
if ((status->release & (button & 0xFFFF)) == 0) {
if ((status->ex_status.cl.release & (button >> 16)) == 0) {
pressed = false;
@@ -537,7 +537,7 @@ void ipl::controller::Master::setForceInvalid(bool flag) {
bool ret = false;
if (isValidBtn()) {
bool pressed = true;
KPADStatus* status = mpKpadStatus;
KPADStatus* status = unk_0x20;
if ((status->trig & (button & 0xFFFF)) == 0) {
if ((status->ex_status.cl.trig & (button >> 16)) == 0) {
pressed = false;
@@ -553,8 +553,8 @@ void ipl::controller::Master::setForceInvalid(bool flag) {
bool ret = false;
if (isValidBtn()) {
bool pressed = true;
if ((mpKpadStatus->hold & (button & 0xFFFF)) == 0) {
if ((mpKpadStatus->ex_status.cl.hold & (button >> 16)) == 0) {
if ((unk_0x20->hold & (button & 0xFFFF)) == 0) {
if ((unk_0x20->ex_status.cl.hold & (button >> 16)) == 0) {
pressed = false;
}
}
@@ -565,15 +565,15 @@ void ipl::controller::Master::setForceInvalid(bool flag) {
return ret;
}
ipl::math::VEC2 ipl::controller::Revolution::getHorizon() const {
return math::VEC2(mpKpadStatus->horizon.x, mpKpadStatus->horizon.y);
return math::VEC2(unk_0x20->horizon.x, unk_0x20->horizon.y);
}
ipl::math::VEC2 ipl::controller::Revolution::getDpdPos() const {
return math::VEC2(mpKpadStatus->pos.x, mpKpadStatus->pos.y);
return math::VEC2(unk_0x20->pos.x, unk_0x20->pos.y);
}
bool ipl::controller::Revolution::upTrg(u32 button) const {
bool ret = false;
if (isValidBtn()) {
if (mpKpadStatus->release & (button & 0xFFFF)) {
if (unk_0x20->release & (button & 0xFFFF)) {
ret = true;
}
}
@@ -582,7 +582,7 @@ void ipl::controller::Master::setForceInvalid(bool flag) {
bool ipl::controller::Revolution::downTrg(u32 button) const {
bool ret = false;
if (isValidBtn()) {
if (mpKpadStatus->trig & (button & 0xFFFF)) {
if (unk_0x20->trig & (button & 0xFFFF)) {
ret = true;
}
}

View File

@@ -152,9 +152,9 @@ namespace ipl {
}
Revolution::Revolution(int chan, int type, KPADStatus& status) : Base(chan, type, status) {
mbPinching = 0;
mbWasPinching = 0;
mpKpadStatus = &status;
unk_0x1D = 0;
unk_0x1E = 0;
unk_0x20 = &status;
}
Interface* Manager::getMasterController() {

View File

@@ -1,48 +0,0 @@
# ChannelSelect native linking
Baseline: HEAD f7b1b9b0, Equivalent, DOL SHA1 26116613f624061ba99c8d1a299aaa6efa85670d. Unit code 25668/25668, data 2336/2336, functions 102/102. Existing untracked fresh1.attempts.md left alone.
1. Set only ChannelSelect to Matching to locate the first linked-byte divergence.
Matching SHA1 f045a95026c3ca34039d0d9064fad33832ce581a. First DOL mismatch at file 0x5ba, address 0x8133009a in __start; relocation points to data shifted by 0x40. nm and ELF comparison show the first text layout change at createChannelThumbnails, as recorded in the exact symbol table below. Extra weak Interporation<float> destructor is 0x40 bytes, plus its vtable; neither exists in the target symbols. .text grows 0x40. Pool identical, 98 strings.
/tmp/link1.baseline.elf: createChannelThumbnails__Q33ipl5scene13ChannelSelectFv 0x813abcc4 size 0x5c.
/tmp/link1.matching.main.elf: createChannelThumbnails__Q33ipl5scene13ChannelSelectFv 0x813abd04 size 0x5c.
/tmp/link1.matching.main.elf: __dt__Q33ipl4math16Interporation<f>Fv 0x813abcc4 size 0x40.
2. Model the scalar Hermite specialization as a direct FrameController subclass, with its destructor declared out of line, matching the existing scalar specialization used by ChannelTitle and the target ownership at 0x81363c10. Scope the new specialization to IPL_CHANNEL_SELECT_CPP. Preserve inline init and get calculations. This avoids instantiating a nonexistent Interporation<float> destructor or vtable.
Result: all 102 functions and data still 100%; other unit reports unchanged. DOL SHA1 acdfd504572753800958ecd275825fdc19bb92c1. Text now correct but .data is 32 bytes short: scalar table and base table reservations were removed. Real data/vtable pointers up through ChannelSelect table still identical.
3. Keep the original Hermite primary template and specialize only scalar Interporation as a novtable base, retaining its real start/end fields and methods. The target inlined constructor stores only the derived vtable; the extra base destructor had no target owner. Test whether suppressing base vtable use lets the linker discard this extra destructor while retaining ordinary compiler-emitted data reservations.
Result: SHA1 f7cdb8937b2638367aa0479f20a880cd063d06bb. Removing the scalar base vtable use strips the 64-byte extra destructor, but removes a 16-byte data reservation; createDiskLayout remains instruction exact.
4. Restore a direct scalar Hermite specialization, now with an inline empty destructor as in the target scalar destructor. Declare FrameController::calc inline only in this TU to test normal weak base-vtable emission. This preserves the ordinary scalar and FrameController vtables without defining or retaining any fake object. Target scalar construction only sets the derived table, destructor is empty; the target data has 32 bytes of discarded weak tables after the ChannelSelect vtable and before the GUI table reservations.
Result: DOL SHA1 26116613f624061ba99c8d1a299aaa6efa85670d with ChannelSelect Matching. Scalar and FrameController weak tables are compiler-emitted and deduplicated against their existing earlier owners; no Interporation<float> symbol remains. All 102 objdiff functions exact, code 25668/25668, data 2336/2336. Every other unit report is byte-for-byte equal as JSON to the initial live baseline. pool_diff identical, 98 strings; createDiskLayout 168/168 instructions, diffs 0; VEC3 Hermite destructor 16/16 instructions, diffs 0.
Validation: running the full clean gate, full build/43U/ok, and independent checks of all 102 function instruction streams. Inline FrameController declaration keeps the implementation in its existing owning TU and requests normal weak-vtable emission here. No forced sections, data padding, new assembly, label aliases, or force-active changes.
Final clean gate output:
```text
full build: ok
main.dol sha1: 26116613f624061ba99c8d1a299aaa6efa85670d
[src/scene/channelSelect/iplChannelSelect] pool: IDENTICAL
[src/scene/channelSelect/iplChannelSelect] objdiff: code 25668/25668 data 2336/2336 functions 102/102 fuzzy 100.0000 linked code 25668
[src/scene/channelSelect/iplChannelSelect] instruction-exact functions: 102/102
[src/scene/channelSelect/iplChannelSelect] section .data size 2144 match 100.0
[src/scene/channelSelect/iplChannelSelect] section .rodata size 16 match 100.0
[src/scene/channelSelect/iplChannelSelect] section .sbss size 8 match 100.0
[src/scene/channelSelect/iplChannelSelect] section .sdata size 80 match 100.0
[src/scene/channelSelect/iplChannelSelect] section .sdata2 size 88 match 100.0
[src/scene/channelSelect/iplChannelSelect] section .text size 25668 match 100.0
[src/scene/channelSelect/iplChannelSelect] baseline: code 25668/25668 data 2336 functions 102 fuzzy 100.0000
regressions vs baseline: 0
global matched_code_percent: 90.80962 -> 90.80962
global fuzzy_match_percent: 99.58569 -> 99.58569
global complete_code_percent: 72.50912 -> 73.36610
global matched_data_percent: 99.36639 -> 99.36639
forbidden patterns added (net, per file): 0
readability warnings (net, per file; must be 0 in the final result): 0
note: config touched: configure.py (orchestrator reviews every config/symbols change)
GATE PASS
```
Explicit ninja build/43U/ok passes. Regenerated live report: all other unit records unchanged from the initial snapshot. All 102 ctxdiff.py runs report identical instruction counts and diffs 0; no open function remains. DOL bytes identical to orig/43U/00000008.app, SHA1 26116613f624061ba99c8d1a299aaa6efa85670d. Functions 102/102 -> 102/102, code 25668/25668 -> 25668/25668, data 2336/2336 -> 2336/2336, linked code 0 -> 25668.