Compare commits
56 Commits
cleanup/se
...
cleanup/bt
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d2fc569c09 | ||
|
|
2dba9bd13b | ||
|
|
fd775c34dc | ||
|
|
a8ab2099cd | ||
|
|
96db1eac04 | ||
|
|
5a332eceba | ||
|
|
ed2d5b30b4 | ||
|
|
02dbcc53bd | ||
|
|
2da1c58f2c | ||
|
|
1c8ada226a | ||
|
|
f05f7bbcf7 | ||
|
|
f508371ca0 | ||
|
|
7216fd527f | ||
|
|
26e90aa988 | ||
|
|
e059ea0632 | ||
|
|
e6f54e254d | ||
|
|
299a6ca724 | ||
|
|
77439a3268 | ||
|
|
f65fac3351 | ||
|
|
c7ceb3efe0 | ||
|
|
401d0c88e7 | ||
|
|
6cb5ac9ded | ||
|
|
8870c4aa75 | ||
|
|
402687106b | ||
|
|
2080aeb0cf | ||
|
|
1f3d89772e | ||
|
|
f429cd07cc | ||
|
|
f7b1b9b09b | ||
|
|
fcbc0c56b7 | ||
|
|
ab8bece04e | ||
|
|
0059de422f | ||
|
|
413c779180 | ||
|
|
f9ecefa6a2 | ||
|
|
320700d49b | ||
|
|
c52153e9f7 | ||
|
|
899438ff02 | ||
|
|
8476c93f00 | ||
|
|
9b375e1e50 | ||
|
|
73795cb3fb | ||
|
|
0c780f6d1f | ||
|
|
63f4c7aeab | ||
|
|
282ddd99b7 | ||
|
|
c7d0f8f01b | ||
|
|
414b553743 | ||
|
|
da96c27969 | ||
|
|
0a925c7053 | ||
|
|
c0126c37d4 | ||
|
|
fc2d150c6d | ||
|
|
7851b2b29f | ||
|
|
263411ccac | ||
|
|
09de907f0b | ||
|
|
4e3ab6eae5 | ||
|
|
99d6fe20a2 | ||
|
|
00013016df | ||
|
|
3e279ef189 | ||
|
|
32417fe8a2 |
@@ -53,9 +53,9 @@ Progress
|
||||
<!-- progress:start -->
|
||||
| Decompiled | Matched | Linked | Data |
|
||||
|:---:|:---:|:---:|:---:|
|
||||
| 99.59% | 90.81% | 71.43% | 99.37% |
|
||||
| 99.59% | 90.92% | 73.37% | 99.37% |
|
||||
|
||||
units 956/1027 complete, functions 12365/12563 matched.
|
||||
units 960/1027 complete, functions 12368/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 -->
|
||||
|
||||
@@ -13904,10 +13904,15 @@ 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: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
|
||||
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
|
||||
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
|
||||
@@ -17165,7 +17170,23 @@ 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
|
||||
@@ -17179,10 +17200,32 @@ 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
|
||||
@@ -17216,6 +17259,11 @@ 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
|
||||
@@ -22373,93 +22421,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
|
||||
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
|
||||
@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
|
||||
@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
|
||||
|
||||
@@ -766,7 +766,7 @@ config.libs = [
|
||||
]
|
||||
),
|
||||
IPLSection("channelSelect", [
|
||||
Object(Equivalent, "scene/channelSelect/iplChannelSelect.cpp"),
|
||||
Object(Matching, "scene/channelSelect/iplChannelSelect.cpp"),
|
||||
Object(Matching, "scene/channelSelect/iplClock.cpp"),
|
||||
Object(Equivalent, "scene/channelSelect/iplChannelObj.cpp"),
|
||||
]
|
||||
|
||||
@@ -266,6 +266,32 @@ 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
|
||||
|
||||
@@ -18,11 +18,11 @@ namespace ipl {
|
||||
|
||||
class line_collision {
|
||||
public:
|
||||
line_collision() : unk_0x00(0.0f), unk_0x04(0.0f), unk_0x08(0.0f) {}
|
||||
line_collision() : mLeft(0.0f), mRight(0.0f), mY(0.0f) {}
|
||||
|
||||
f32 unk_0x00;
|
||||
f32 unk_0x04;
|
||||
f32 unk_0x08;
|
||||
f32 mLeft;
|
||||
f32 mRight;
|
||||
f32 mY;
|
||||
nw4r::ut::Link mLinkList; // 0x0C
|
||||
};
|
||||
|
||||
@@ -31,9 +31,9 @@ namespace ipl {
|
||||
url_collision();
|
||||
~url_collision();
|
||||
|
||||
int unk_0x00;
|
||||
wchar_t* unk_0x04;
|
||||
wchar_t* unk_0x08;
|
||||
int mTagNo;
|
||||
wchar_t* mpStart;
|
||||
wchar_t* mpEnd;
|
||||
nw4r::ut::Link mLinkList; // 0x0C
|
||||
nw4r::ut::List mLineCollisions; // 0x14
|
||||
};
|
||||
@@ -53,19 +53,19 @@ namespace ipl {
|
||||
void parse(nw4r::ut::PrintContext<wchar_t>* context);
|
||||
|
||||
BOOL is_focused() const;
|
||||
void select(int unk);
|
||||
void select(int tagNo);
|
||||
|
||||
int get_focused_tagno(int chan) const;
|
||||
url_collision* get_selected_col();
|
||||
|
||||
void get_url(char* urlOut, u32 urlLen);
|
||||
|
||||
void setUnk_0x40(f32 val) { unk_0x40 = val; }
|
||||
void setUnk_0x44(f32 val) { unk_0x44 = val; }
|
||||
void setUnk_0x53(bool val) { unk_0x53 = val; }
|
||||
void setHitYOffset(f32 val) { mHitYOffset = val; }
|
||||
void setMemoTranslateY(f32 val) { mMemoTranslateY = val; }
|
||||
void setFocusEnabled(bool val) { mbFocusEnabled = val; }
|
||||
|
||||
u8 getUnk_0x50() const { return unk_0x50; }
|
||||
void setUnk_0x50(u8 val) { unk_0x50 = val; }
|
||||
u8 getColorPass() const { return mbColorPass; }
|
||||
void setColorPass(u8 val) { mbColorPass = val; }
|
||||
|
||||
private:
|
||||
typedef struct {
|
||||
@@ -75,14 +75,14 @@ namespace ipl {
|
||||
|
||||
con_data mConData[WPAD_MAX_CONTROLLERS]; // 0x00
|
||||
nw4r::ut::List mUrlCollisions; // 0x34
|
||||
f32 unk_0x40;
|
||||
f32 unk_0x44;
|
||||
int unk_0x48;
|
||||
int unk_0x4C;
|
||||
u8 unk_0x50;
|
||||
u8 unk_0x51;
|
||||
u8 unk_0x52;
|
||||
u8 unk_0x53;
|
||||
f32 mHitYOffset;
|
||||
f32 mMemoTranslateY;
|
||||
int mCurTagNo;
|
||||
int mSelectedTagNo;
|
||||
u8 mbColorPass;
|
||||
u8 mbInTag;
|
||||
u8 mbHoverOffset;
|
||||
u8 mbFocusEnabled;
|
||||
};
|
||||
} // namespace scene
|
||||
} // namespace ipl
|
||||
|
||||
@@ -259,8 +259,8 @@ namespace ipl {
|
||||
|
||||
f32 mChanThumbOff_X; // 0xD0
|
||||
f32 mChanThumbOff_Y; // 0xD4
|
||||
math::VEC3 unk_0xD8;
|
||||
math::VEC2 unk_0xE4;
|
||||
math::VEC3 mOrthoTrans;
|
||||
math::VEC2 mOrthoScale;
|
||||
f32 mScaleAdjust; // 0xEC
|
||||
|
||||
int mDiskState; // 0xF0
|
||||
|
||||
@@ -69,10 +69,10 @@ namespace ipl {
|
||||
|
||||
CmdEntry mCmdQueue[64];
|
||||
|
||||
int mCmdCapacity;
|
||||
int mCmdCount;
|
||||
int mCmdReadIdx;
|
||||
int mCmdWriteIdx;
|
||||
int mQueueCapacity;
|
||||
int mQueueCount;
|
||||
int mQueueRead;
|
||||
int mQueueWrite;
|
||||
|
||||
int mSettingArg; // 0x274
|
||||
|
||||
|
||||
@@ -185,8 +185,8 @@ namespace ipl {
|
||||
gui::PaneManager* mpGui; // 0x74
|
||||
|
||||
BOOL mbHovered[BTN_MAX]; // 0x78
|
||||
u32 unk_0x90;
|
||||
u32 unk_0x94;
|
||||
u32 mPendingSceneId;
|
||||
u32 mExitSeqStep;
|
||||
|
||||
static const char* smButtonName[BTN_MAX];
|
||||
};
|
||||
|
||||
@@ -89,10 +89,10 @@ namespace ipl {
|
||||
|
||||
int mIPLState; // 0x04
|
||||
volatile BS2State mState; // 0x08
|
||||
bool unk_0x0C;
|
||||
bool unk_0x0D;
|
||||
bool unk_0x0E;
|
||||
bool unk_0x0F;
|
||||
bool mbTickEnabled; // 0x0C
|
||||
bool mbUpdateRequested; // 0x0D
|
||||
bool mbAbortRequested; // 0x0E
|
||||
bool mbRestartRequested; // 0x0F
|
||||
bool mbIsDiagDisc; // 0x10
|
||||
bool mbIncludesSeatTitles; // 0x11
|
||||
u8* mpBannerBuffer; // 0x14
|
||||
|
||||
@@ -365,8 +365,8 @@ namespace ipl {
|
||||
int getChJumpChanPage() { return mChJumpPage; }
|
||||
int getChJumpChanIndex() { return mChJumpIndex; }
|
||||
|
||||
void setUnk_0x1B81(bool flag) { unk_0x1B81 = flag; }
|
||||
bool isUnk_0x1B81() { return unk_0x1B81; }
|
||||
void setDiskChannelReady(bool flag) { mbDiskChannelReady = flag; }
|
||||
bool isDiskChannelReady() { return mbDiskChannelReady; }
|
||||
|
||||
void resetChJumpLoad() { mbLoadedChJump = false; }
|
||||
bool hasLoadedChJump() { return mbLoadedChJump; }
|
||||
@@ -399,7 +399,7 @@ namespace ipl {
|
||||
|
||||
int mBS2State; // 0x1B7C
|
||||
bool mbCanRefresh; // 0x1B80
|
||||
bool unk_0x1B81;
|
||||
bool mbDiskChannelReady;
|
||||
|
||||
u8* mpDiskIconBuf; // 0x1B84
|
||||
u8* mpDiskBannerBuf; // 0x1B88
|
||||
|
||||
@@ -33,7 +33,7 @@ namespace ipl {
|
||||
u64 titleId; // 0x10
|
||||
bool threadTerminated; // 0x18
|
||||
bool unk_0x19;
|
||||
bool unk_0x1A;
|
||||
bool mbHasNewMessage; // 0x1A
|
||||
|
||||
EGG::ExpHeap* getHeap() { return heap; }
|
||||
} CSData;
|
||||
|
||||
@@ -118,26 +118,26 @@ namespace ipl {
|
||||
public:
|
||||
Base(int chan, KPADStatus& status) {
|
||||
mButton = 0;
|
||||
unk_0x08 = 0;
|
||||
mDecideHoldCount = 0;
|
||||
mLastRumbleTime = 0;
|
||||
mRumbleType = -1;
|
||||
mChan = chan;
|
||||
mType = 2;
|
||||
unk_0x1C = 0;
|
||||
mbForceInvalid = 0;
|
||||
KPADEnableDPD(chan);
|
||||
unk_0x1D = 0;
|
||||
unk_0x1E = 0;
|
||||
unk_0x20 = &status;
|
||||
mbPinching = 0;
|
||||
mbWasPinching = 0;
|
||||
mpKpadStatus = &status;
|
||||
}
|
||||
|
||||
Base(int chan, int type, KPADStatus& status) {
|
||||
mButton = 0;
|
||||
unk_0x08 = 0;
|
||||
mDecideHoldCount = 0;
|
||||
mLastRumbleTime = 0;
|
||||
mRumbleType = -1;
|
||||
mChan = chan;
|
||||
mType = type;
|
||||
unk_0x1C = 0;
|
||||
mbForceInvalid = 0;
|
||||
KPADEnableDPD(chan);
|
||||
}
|
||||
|
||||
@@ -152,15 +152,15 @@ namespace ipl {
|
||||
|
||||
protected:
|
||||
u8 mButton;
|
||||
u32 unk_0x08;
|
||||
u32 mDecideHoldCount;
|
||||
OSTick mLastRumbleTime;
|
||||
s32 mRumbleType;
|
||||
u32 mChan;
|
||||
u32 mType;
|
||||
u8 unk_0x1C;
|
||||
u8 unk_0x1D;
|
||||
u8 unk_0x1E;
|
||||
KPADStatus* unk_0x20;
|
||||
u8 mbForceInvalid;
|
||||
u8 mbPinching;
|
||||
u8 mbWasPinching;
|
||||
KPADStatus* mpKpadStatus;
|
||||
};
|
||||
|
||||
class Revolution : public Base {
|
||||
@@ -206,8 +206,8 @@ namespace ipl {
|
||||
virtual BOOL isValidDpdClassic() const;
|
||||
|
||||
private:
|
||||
math::VEC2 unk_0x24;
|
||||
int unk_0x2C;
|
||||
math::VEC2 mClassicCursorPos;
|
||||
int mClassicCursorTimer;
|
||||
};
|
||||
|
||||
class Master : public Interface {
|
||||
@@ -264,18 +264,18 @@ namespace ipl {
|
||||
public:
|
||||
Base(int chan, KPADStatus& arg1) {
|
||||
mButton = 0;
|
||||
unk_0x08 = 0;
|
||||
mDecideHoldCount = 0;
|
||||
mLastRumbleTime = 0;
|
||||
mRumbleType = -1;
|
||||
mChan = chan;
|
||||
mType = 2;
|
||||
unk_0x1C = 0;
|
||||
mbForceInvalid = 0;
|
||||
|
||||
KPADEnableDPD(chan);
|
||||
|
||||
unk_0x1D = 0;
|
||||
unk_0x1E = 0;
|
||||
unk_0x20 = &arg1;
|
||||
mbPinching = 0;
|
||||
mbWasPinching = 0;
|
||||
mpKpadStatus = &arg1;
|
||||
}
|
||||
|
||||
virtual ~Base(); // 0x08
|
||||
@@ -326,15 +326,15 @@ namespace ipl {
|
||||
|
||||
// protected:
|
||||
u8 mButton; // 0x4
|
||||
u32 unk_0x08; // 0x8
|
||||
u32 mDecideHoldCount; // 0x8
|
||||
OSTick mLastRumbleTime; // 0xC
|
||||
s32 mRumbleType; // 0x10
|
||||
u32 mChan; // 0x14
|
||||
u32 mType; // 0x18
|
||||
u8 unk_0x1C;
|
||||
u8 unk_0x1D; // 0x1D
|
||||
u8 unk_0x1E; // 0x1E
|
||||
KPADStatus* unk_0x20; // 0x20
|
||||
u8 mbForceInvalid;
|
||||
u8 mbPinching; // 0x1D
|
||||
u8 mbWasPinching; // 0x1E
|
||||
KPADStatus* mpKpadStatus; // 0x20
|
||||
};
|
||||
|
||||
class Interface : public Base {
|
||||
@@ -446,8 +446,8 @@ namespace ipl {
|
||||
virtual BOOL isValidDpdClassic() const; // 0x8C
|
||||
|
||||
private:
|
||||
math::VEC2 unk_0x24;
|
||||
int unk_0x2C;
|
||||
math::VEC2 mClassicCursorPos;
|
||||
int mClassicCursorTimer;
|
||||
};
|
||||
|
||||
class Manager {
|
||||
|
||||
@@ -60,9 +60,9 @@ namespace ipl {
|
||||
|
||||
int mMessageID; // 0x08
|
||||
|
||||
int unk_0x0C;
|
||||
int unk_0x10;
|
||||
char unk_0x14[4];
|
||||
int mArg2;
|
||||
int mArg3;
|
||||
char mArg1[4];
|
||||
|
||||
u8* mpArcData; // 0x18
|
||||
u32 mArcSize; // 0x1C
|
||||
|
||||
@@ -139,7 +139,7 @@ namespace ipl {
|
||||
|
||||
bool received() { return mbReviecedMsg; }
|
||||
void prepNextReceive() { mbReviecedMsg = false; }
|
||||
volatile bool isUnk0xA31() { return unk_0xA31 == false; }
|
||||
volatile bool isReceivingIdle() { return mbReceiving == false; }
|
||||
|
||||
BOOL isAppDlEnableLock(u32 appId) {
|
||||
utility::autoMutexLock lock(mAutoLock);
|
||||
@@ -175,9 +175,9 @@ namespace ipl {
|
||||
OSMutex mAutoLock; // 0xA18
|
||||
|
||||
bool mbReviecedMsg;
|
||||
bool unk_0xA31;
|
||||
bool mbReceiving;
|
||||
bool mbReceivePaused; // 0xA32
|
||||
bool unk_0xA33;
|
||||
bool mbNewTitleTblReady;
|
||||
|
||||
static Arg smArg;
|
||||
|
||||
|
||||
@@ -27,7 +27,11 @@ 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; }
|
||||
|
||||
@@ -63,7 +63,7 @@ typedef struct {
|
||||
u8 mcuYRem; // 0x0F
|
||||
u16 mcuYCount; // 0x10
|
||||
u16 mcuXCount2; // 0x12
|
||||
u32 unk_0x14;
|
||||
u32 mcuTotal; // 0x14
|
||||
u8 remX; // 0x18
|
||||
u8 remY; // 0x19
|
||||
u8 compCount; // 0x1A
|
||||
@@ -142,7 +142,7 @@ struct TMCCJPEGDecWork_t {
|
||||
u8 mcuYRem; // 0x17FF
|
||||
u16 mcuYCount; // 0x1800
|
||||
u16 mcuXCount2; // 0x1802
|
||||
u32 unk_0x1804;
|
||||
u32 mcuTotal; // 0x1804
|
||||
u8 remX; // 0x1808
|
||||
u8 remY; // 0x1809
|
||||
u8 compCount; // 0x180A
|
||||
|
||||
@@ -51,7 +51,7 @@ s32 TMCJPEGDEC_Setsize(TMCCJPEGDecWork* work) {
|
||||
}
|
||||
|
||||
state->componentCount = work->componentCount;
|
||||
state->result = work->unk_0x1804;
|
||||
state->result = work->mcuTotal;
|
||||
state->maxX = work->mcuYCount;
|
||||
state->maxY = work->mcuXCount2;
|
||||
|
||||
|
||||
@@ -567,7 +567,7 @@ s32 TMCJPEGDEC_scan_varinit(TMCCJPEGDecWork* work) {
|
||||
|
||||
p->mcuYCount = p->mcuYCount + ((u8)remX != 0 ? 1 : 0);
|
||||
p->mcuXCount2 = p->mcuXCount2 + ((u8)remY != 0 ? 1 : 0);
|
||||
p->unk_0x14 = (u32)p->mcuYCount * (u32)p->mcuXCount2;
|
||||
p->mcuTotal = (u32)p->mcuYCount * (u32)p->mcuXCount2;
|
||||
|
||||
for (idx = 0; idx < (s32)p->scanCompCount; idx++) {
|
||||
u8 compId;
|
||||
@@ -1929,7 +1929,7 @@ static s32 TMCJPEGDEC_parse_sof(TMCCJPEGDecWork* work) {
|
||||
mcuCountY += yr;
|
||||
frameInfo->mcuYCount = mcuCountX;
|
||||
frameInfo->mcuXCount2 = mcuCountY;
|
||||
work->unk_0x1804 = (u32)mcuCountX * (u32)mcuCountY;
|
||||
work->mcuTotal = (u32)mcuCountX * (u32)mcuCountY;
|
||||
}
|
||||
|
||||
compCount2 = frameInfo->compCount;
|
||||
|
||||
@@ -163,12 +163,12 @@ typedef struct _ziGetParam {
|
||||
ziWChar* candidates; // 0x18
|
||||
ziU8 maxCandidates; // 0x1C
|
||||
ziWChar firstCandidate; // 0x1E
|
||||
ziU8 unk_0x20; // 0x20
|
||||
ziU8 count; // 0x20 (EZTXGetParam.count)
|
||||
|
||||
ziU8 letters; // 0x21
|
||||
ziU8 count; // 0x22
|
||||
ziU8* scratch; // 0x24
|
||||
ziU32 unk_0x28; // 0x28
|
||||
ziU8 letters; // 0x21
|
||||
ziU8 completion; // 0x22 (EZTXGetParam.completion)
|
||||
ziU8* scratch; // 0x24
|
||||
ziU32 unk_0x28; // 0x28
|
||||
} ziGetParam;
|
||||
|
||||
typedef struct _ziLanguageEntry {
|
||||
@@ -204,13 +204,13 @@ typedef struct _ziUwdNode {
|
||||
} ziUwdNode;
|
||||
|
||||
struct __zi8_work_data_s {
|
||||
ziU8 unk_0x00;
|
||||
ziU8 unk_0x01;
|
||||
ziU8 getcPhase; // 0x00
|
||||
ziU8 countOnly; // 0x01
|
||||
ziU8 unk_0x02[2];
|
||||
ziLanguageEntry* langEntries; // 0x04
|
||||
ziU8 unk_0x08;
|
||||
ziU8 unk_0x09;
|
||||
ziU8 unk_0x0A;
|
||||
ziU8 maxWordLength;
|
||||
ziU8 unk_0x0B;
|
||||
ziU32 unk_0x0C;
|
||||
ziU32 unk_0x10;
|
||||
@@ -226,12 +226,12 @@ struct __zi8_work_data_s {
|
||||
ziU16 unk_0xA0[0x42];
|
||||
ziU16* unk_0x124[1];
|
||||
ziU8* unk_0x128;
|
||||
ziU8 unk_0x12C;
|
||||
ziU8 uwdPtrCount; // 0x12C
|
||||
ziU8 unk_0x12D;
|
||||
ziU8 unk_0x12E;
|
||||
ziU8 uwdPrioritySort; // 0x12E
|
||||
ziU8 unk_0x12F;
|
||||
ziPtr unk_0x130[2];
|
||||
ziU8 unk_0x138;
|
||||
ziPtr uwdDicts[2]; // 0x130
|
||||
ziU8 uwdDictCount; // 0x138
|
||||
ziU8 unk_0x139[3];
|
||||
ziU32 unk_0x13C;
|
||||
ziU8 unk_0x140;
|
||||
@@ -265,25 +265,25 @@ struct __zi8_work_data_s {
|
||||
ziPtr unk_0x11FC;
|
||||
ziPtr userKeys[0x83]; // 0x1200
|
||||
ziU8 unk_0x140C[4];
|
||||
ziU32 unk_0x1410;
|
||||
ziU32 formats; // 0x1410
|
||||
ziU8 unk_0x1414[4];
|
||||
ziU8 unk_0x1418;
|
||||
ziU8 formatCount;
|
||||
ziU8 unk_0x1419;
|
||||
ziU16 unk_0x141A;
|
||||
ziU16 capacity; // 0x141A
|
||||
ziU8 unk_0x141C;
|
||||
ziU8 unk_0x141D;
|
||||
ziU8 unk_0x141E;
|
||||
ziU8 unk_0x141F;
|
||||
ziU8 graphTableId; // 0x141E
|
||||
ziU8 maxCnt; // 0x141F
|
||||
ziU8 unk_0x1420[4];
|
||||
zi8DawgCtx dawgCtx; // 0x1424
|
||||
ziU8 unk_0x1760[4]; // 0x1760
|
||||
ziU8* unk_0x1764; // 0x1764
|
||||
ziU8* groupPtr; // 0x1764
|
||||
ziU8 unk_0x1768;
|
||||
ziU8 unk_0x1769[0x81];
|
||||
ziU16 unk_0x17EA;
|
||||
ziU16 matchOffset; // 0x17EA
|
||||
ziU8 unk_0x17EC;
|
||||
ziU8 unk_0x17ED[3];
|
||||
ziU8* unk_0x17F0;
|
||||
ziU8* dawgGroup; // 0x17F0
|
||||
ziWChar unk_0x17F4[0x40]; // 0x17F4..0x1874
|
||||
ziU16 unk_0x1874;
|
||||
ziU8 unk_0x1876;
|
||||
@@ -309,26 +309,26 @@ struct __zi8_work_data_s {
|
||||
ziWChar unk_0x1A92[0x41];
|
||||
ziU8 unk_0x1B14;
|
||||
ziU8 unk_0x1B15[3];
|
||||
ziU16* unk_0x1B18;
|
||||
ziU16 unk_0x1B1C;
|
||||
ziU16 unk_0x1B1E;
|
||||
ziU16 unk_0x1B20;
|
||||
ziU16 unk_0x1B22;
|
||||
ziU8 unk_0x1B24;
|
||||
ziU16* unicodeMap; // 0x1B18
|
||||
ziU16 unicodeRange1Min; // 0x1B1C
|
||||
ziU16 unicodeRange1Max; // 0x1B1E
|
||||
ziU16 unicodeRange2Min; // 0x1B20
|
||||
ziU16 unicodeRange2Max; // 0x1B22
|
||||
ziU8 unicodeMapSubLang; // 0x1B24
|
||||
ziU8 unk_0x1B25[3];
|
||||
union {
|
||||
ziU32 word;
|
||||
struct {
|
||||
ziU32 msb : 1;
|
||||
} bits;
|
||||
} unk_0x1B28;
|
||||
} pyFuzzy; // 0x1B28
|
||||
union {
|
||||
ziU32 word;
|
||||
struct {
|
||||
ziU32 msb : 1;
|
||||
} bits;
|
||||
} unk_0x1B2C;
|
||||
ziU8 unk_0x1B30;
|
||||
ziU8 koAltTables; // 0x1B30
|
||||
ziU8 unk_0x1B31;
|
||||
ziU16 unk_0x1B32;
|
||||
ziU16 unk_0x1B34;
|
||||
|
||||
@@ -21,7 +21,7 @@ ziS32 Zi8Punctuation(ziGetParam* param ZI_NEED_WORK) {
|
||||
}
|
||||
if (fc == 0) {
|
||||
count++;
|
||||
if (ZI_WORK->unk_0x00 == 0) {
|
||||
if (ZI_WORK->getcPhase == 0) {
|
||||
param->candidates[i++] = Zi8PunctTable[j];
|
||||
if ((param->context & 0x10) != 0) {
|
||||
param->candidates[i++] = 0x20;
|
||||
@@ -42,7 +42,7 @@ ziS32 Zi8Punctuation(ziGetParam* param ZI_NEED_WORK) {
|
||||
}
|
||||
j++;
|
||||
}
|
||||
if (ZI_WORK->unk_0x00 == 0) {
|
||||
if (ZI_WORK->getcPhase == 0) {
|
||||
param->letters = count;
|
||||
}
|
||||
return count;
|
||||
|
||||
@@ -2,14 +2,14 @@
|
||||
#include <zi8clib/zitypes.h>
|
||||
|
||||
ziU32 Zi8GetZHuwdPtr(ziU32* arg0, ziU16* arg1 ZI_NEED_WORK) {
|
||||
if (ZI_WORK->unk_0x12C == 0) {
|
||||
if (ZI_WORK->uwdPtrCount == 0) {
|
||||
*arg0 = 0;
|
||||
*arg1 = 0;
|
||||
Zi8LogError(0x1A5, ZI_WORK);
|
||||
return 0;
|
||||
} else {
|
||||
*arg1 = ZI_WORK->unk_0x124[ZI_WORK->unk_0x12C - 1][1] / 3;
|
||||
*arg0 = (ziU32)ZI_WORK->unk_0x124[ZI_WORK->unk_0x12C - 1];
|
||||
*arg1 = ZI_WORK->unk_0x124[ZI_WORK->uwdPtrCount - 1][1] / 3;
|
||||
*arg0 = (ziU32)ZI_WORK->unk_0x124[ZI_WORK->uwdPtrCount - 1];
|
||||
*arg0 += 8;
|
||||
Zi8LogError(0x64, ZI_WORK);
|
||||
return 1;
|
||||
|
||||
@@ -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)->unk_0x1B28.word)->cANDch) ordinalIndex = 0xFDFF;
|
||||
if (((ziFuzzyPYPairs*)&((struct __zi8_work_data_s*)work)->pyFuzzy.word)->cANDch) ordinalIndex = 0xFDFF;
|
||||
break;
|
||||
case 26: case 27:
|
||||
if (((ziFuzzyPYPairs*)&((struct __zi8_work_data_s*)work)->unk_0x1B28.word)->sANDsh) ordinalIndex = 0xFDFF;
|
||||
if (((ziFuzzyPYPairs*)&((struct __zi8_work_data_s*)work)->pyFuzzy.word)->sANDsh) ordinalIndex = 0xFDFF;
|
||||
break;
|
||||
case 28: case 29:
|
||||
if (((ziFuzzyPYPairs*)&((struct __zi8_work_data_s*)work)->unk_0x1B28.word)->zANDzh) ordinalIndex = 0xFDFF;
|
||||
if (((ziFuzzyPYPairs*)&((struct __zi8_work_data_s*)work)->pyFuzzy.word)->zANDzh) ordinalIndex = 0xFDFF;
|
||||
break;
|
||||
case 56: case 59:
|
||||
if (((ziFuzzyPYPairs*)&((struct __zi8_work_data_s*)work)->unk_0x1B28.word)->fANDh) ordinalIndex = 0xF9FF;
|
||||
if (((ziFuzzyPYPairs*)&((struct __zi8_work_data_s*)work)->pyFuzzy.word)->fANDh) ordinalIndex = 0xF9FF;
|
||||
break;
|
||||
case 38:
|
||||
if (((ziFuzzyPYPairs*)&((struct __zi8_work_data_s*)work)->unk_0x1B28.word)->nANDl) ordinalIndex = 0xE5FF;
|
||||
if (((ziFuzzyPYPairs*)&((struct __zi8_work_data_s*)work)->pyFuzzy.word)->nANDl) ordinalIndex = 0xE5FF;
|
||||
break;
|
||||
case 43:
|
||||
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;
|
||||
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;
|
||||
break;
|
||||
case 44:
|
||||
if (((ziFuzzyPYPairs*)&((struct __zi8_work_data_s*)work)->unk_0x1B28.word)->lANDr) ordinalIndex = 0xF1FF;
|
||||
if (((ziFuzzyPYPairs*)&((struct __zi8_work_data_s*)work)->pyFuzzy.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)->unk_0x1B28.word)->anANDang) ordinalIndex = 0xFFF7;
|
||||
if (((ziFuzzyPYPairs*)&((struct __zi8_work_data_s*)work)->pyFuzzy.word)->anANDang) ordinalIndex = 0xFFF7;
|
||||
break;
|
||||
case 0x180:
|
||||
if (((ziFuzzyPYPairs*)&((struct __zi8_work_data_s*)work)->unk_0x1B28.word)->enANDeng) ordinalIndex = 0xFFF7;
|
||||
if (((ziFuzzyPYPairs*)&((struct __zi8_work_data_s*)work)->pyFuzzy.word)->enANDeng) ordinalIndex = 0xFFF7;
|
||||
break;
|
||||
case 0x60:
|
||||
if (((ziFuzzyPYPairs*)&((struct __zi8_work_data_s*)work)->unk_0x1B28.word)->inANDing) ordinalIndex = 0xFFF7;
|
||||
if (((ziFuzzyPYPairs*)&((struct __zi8_work_data_s*)work)->pyFuzzy.word)->inANDing) ordinalIndex = 0xFFF7;
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
@@ -720,7 +720,7 @@ static int zi8InternalGetZH(ziGetParam* request, ZiChineseOptions* options, ziPt
|
||||
return 0;
|
||||
}
|
||||
emitWords = 1;
|
||||
if (request->count) request->count = request->elementCount;
|
||||
if (request->completion) request->completion = 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->unk_0x20 = emittedCount;
|
||||
request->count = emittedCount;
|
||||
goto engine_finish;
|
||||
}
|
||||
} else output[emittedCount++] = character;
|
||||
if (emittedCount >= request->maxCandidates) {
|
||||
request->letters = emittedCount;
|
||||
request->unk_0x20 = emittedCount;
|
||||
request->count = emittedCount;
|
||||
goto engine_finish;
|
||||
}
|
||||
}
|
||||
@@ -981,7 +981,7 @@ pud_candidate:
|
||||
++rangeIndex;
|
||||
}
|
||||
if (rangeIndex == request->elementCount) {
|
||||
if (!(request->context & 0x10)) request->count = request->elementCount;
|
||||
if (!(request->context & 0x10)) request->completion = request->elementCount;
|
||||
candidateStatus = 1;
|
||||
character = currentSpelling[wordLength];
|
||||
candidateOrdinal = 0xFFFF;
|
||||
@@ -1108,13 +1108,13 @@ pud_charset:
|
||||
output[outputIndex++] = ' ';
|
||||
if (outputIndex > outputLimit) {
|
||||
request->letters = emittedCount;
|
||||
request->unk_0x20 = emittedCount;
|
||||
request->count = emittedCount;
|
||||
goto engine_finish;
|
||||
}
|
||||
} else output[emittedCount++] = character;
|
||||
if (emittedCount >= request->maxCandidates) {
|
||||
request->letters = emittedCount;
|
||||
request->unk_0x20 = emittedCount;
|
||||
request->count = emittedCount;
|
||||
goto engine_finish;
|
||||
}
|
||||
}
|
||||
@@ -1302,13 +1302,13 @@ context_word_lookup:
|
||||
output[outputIndex++] = ' ';
|
||||
if (outputIndex > outputLimit) {
|
||||
request->letters = emittedCount;
|
||||
request->unk_0x20 = emittedCount;
|
||||
request->count = emittedCount;
|
||||
goto engine_finish;
|
||||
}
|
||||
} else output[emittedCount++] = previousOrdinal;
|
||||
if (emittedCount >= request->maxCandidates) {
|
||||
request->letters = emittedCount;
|
||||
request->unk_0x20 = emittedCount;
|
||||
request->count = emittedCount;
|
||||
goto engine_finish;
|
||||
}
|
||||
}
|
||||
@@ -1321,7 +1321,7 @@ context_phrase_next:
|
||||
}
|
||||
}
|
||||
context_results_done:
|
||||
if (request->wordCharCount) request->unk_0x20 = emittedCount;
|
||||
if (request->wordCharCount) request->count = 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)->unk_0x12C && (getMode != 0 || !firstPhoneticPass) &&
|
||||
if (((struct __zi8_work_data_s*)work)->uwdPtrCount && (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->unk_0x20 = emittedCount + 1;
|
||||
if (filteringMode == 4) request->count = emittedCount + 1;
|
||||
if (emitWords) {
|
||||
++emittedCount;
|
||||
outputIndex += rangeCount;
|
||||
|
||||
@@ -39,10 +39,10 @@ ziU32 Zi8MatchROMdata0(ziWChar* elements, ziU8 count, ziU8 language,
|
||||
}
|
||||
if (mode == 1) acceptPrefix = 0;
|
||||
} else {
|
||||
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;
|
||||
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;
|
||||
} else {
|
||||
if (Zi8GetTableSize(language, graphTable, ZI_WORK) == 0) {
|
||||
Zi8LogError(0x961, ZI_WORK);
|
||||
@@ -136,7 +136,7 @@ descend:
|
||||
records[context->cnt].node = ZiDAWGGetChild(records[context->cnt - 1].node);
|
||||
if (records[context->cnt].node == (ziU8*)0) goto next_sibling;
|
||||
context->cnt++;
|
||||
if (ZI_WORK->unk_0x141F < context->cnt) ZI_WORK->unk_0x141F = context->cnt;
|
||||
if (ZI_WORK->maxCnt < context->cnt) ZI_WORK->maxCnt = context->cnt;
|
||||
goto update_current;
|
||||
next_sibling:
|
||||
while (context->cnt != 0) {
|
||||
@@ -184,36 +184,36 @@ unsigned int Zi8MatchROMdata1(ziWChar *elements, ziU8 count, ziU8 language, ziWC
|
||||
|
||||
result = 0;
|
||||
if (status == 0) {
|
||||
ZI_WORK->unk_0x1764 = (ziU8*)group;
|
||||
if (ZI_WORK->unk_0x1764 == 0) {
|
||||
ZI_WORK->groupPtr = (ziU8*)group;
|
||||
if (ZI_WORK->groupPtr == 0) {
|
||||
if (Zi8GetTableSize(language & 0xff,0xb,ZI_WORK) != 0) {
|
||||
ZI_WORK->unk_0x1764 = (ziU8*)(tableAddress = Zi8GetTableAddress(language & 0xff,0xb,ZI_WORK));
|
||||
ZI_WORK->groupPtr = (ziU8*)(tableAddress = Zi8GetTableAddress(language & 0xff,0xb,ZI_WORK));
|
||||
}
|
||||
}
|
||||
if (ZI_WORK->unk_0x1764 != 0) {
|
||||
for (; (*ZI_WORK->unk_0x1764 != 0xff && ((groupIndex & 0xff) != 0));
|
||||
if (ZI_WORK->groupPtr != 0) {
|
||||
for (; (*ZI_WORK->groupPtr != 0xff && ((groupIndex & 0xff) != 0));
|
||||
groupIndex = groupIndex - 1) {
|
||||
while (*ZI_WORK->unk_0x1764 != 0xff) {
|
||||
ZI_WORK->unk_0x1764 += 2;
|
||||
while (*ZI_WORK->groupPtr != 0xff) {
|
||||
ZI_WORK->groupPtr += 2;
|
||||
}
|
||||
ZI_WORK->unk_0x1764++;
|
||||
ZI_WORK->groupPtr++;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (ZI_WORK->unk_0x1764 == 0) {
|
||||
if (ZI_WORK->groupPtr == 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->unk_0x1764 != 0xff) {
|
||||
while (*ZI_WORK->groupPtr != 0xff) {
|
||||
result = Zi8MatchROMdata0(elements,count,language & 0xff,output,
|
||||
capacity & 0xffff,mode & 0xff,status & 0xff,
|
||||
*ZI_WORK->unk_0x1764,
|
||||
ZI_WORK->unk_0x1764[1],acceptPrefix,0,
|
||||
*ZI_WORK->groupPtr,
|
||||
ZI_WORK->groupPtr[1],acceptPrefix,0,
|
||||
&ZI_WORK->dawgCtx,ZI_WORK->unk_0x1760,ZI_WORK);
|
||||
if ((result & 0xff) != 0) break;
|
||||
ZI_WORK->unk_0x1764 += 2;
|
||||
ZI_WORK->groupPtr += 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->unk_0x17EA = 0;
|
||||
ZI_WORK->matchOffset = 0;
|
||||
if (group != 0 && *group == 0xc && language == 10 && ZI_WORK->unk_0x141C != 0) {
|
||||
ZI_WORK->unk_0x141E = 0x10;
|
||||
ZI_WORK->graphTableId = 0x10;
|
||||
} else {
|
||||
ZI_WORK->unk_0x141E = 0;
|
||||
ZI_WORK->graphTableId = 0;
|
||||
}
|
||||
}
|
||||
search_segment:
|
||||
ZI_WORK->unk_0x141F = 1;
|
||||
result = Zi8MatchROMdata1(elements + ZI_WORK->unk_0x17EA,
|
||||
count - ZI_WORK->unk_0x17EA, language,
|
||||
&ZI_WORK->unk_0x17F4[ZI_WORK->unk_0x17EA], capacity,
|
||||
ZI_WORK->maxCnt = 1;
|
||||
result = Zi8MatchROMdata1(elements + ZI_WORK->matchOffset,
|
||||
count - ZI_WORK->matchOffset, language,
|
||||
&ZI_WORK->unk_0x17F4[ZI_WORK->matchOffset], capacity,
|
||||
mode, status, ZI_WORK->unk_0x1768, (char*)group,
|
||||
acceptPrefix, ZI_WORK);
|
||||
if ((ziU8)result != 0) {
|
||||
for (index = (ziU8)(ZI_WORK->unk_0x17EA + result); index != 0; index--) {
|
||||
for (index = (ziU8)(ZI_WORK->matchOffset + result); index != 0; index--) {
|
||||
output[index - 1] = ZI_WORK->unk_0x17F4[index - 1];
|
||||
}
|
||||
result = (ziU8)(result + ZI_WORK->unk_0x17EA);
|
||||
result = (ziU8)(result + ZI_WORK->matchOffset);
|
||||
} else {
|
||||
if (status != 0 || count == 1) goto finish_segments;
|
||||
if (mode == 1 && ZI_WORK->unk_0x1768 == 0 &&
|
||||
(ziU8)Zi8MatchROMdata1(elements + ZI_WORK->unk_0x17EA,
|
||||
count - ZI_WORK->unk_0x17EA, language,
|
||||
&ZI_WORK->unk_0x17F4[ZI_WORK->unk_0x17EA], capacity,
|
||||
(ziU8)Zi8MatchROMdata1(elements + ZI_WORK->matchOffset,
|
||||
count - ZI_WORK->matchOffset, language,
|
||||
&ZI_WORK->unk_0x17F4[ZI_WORK->matchOffset], capacity,
|
||||
0, status, ZI_WORK->unk_0x1768, (char*)group,
|
||||
acceptPrefix, ZI_WORK) != 0) goto finish_segments;
|
||||
if ((Zi8GetTableCount(language, 0x1f, ZI_WORK) & 4) == 0) {
|
||||
@@ -262,25 +262,25 @@ search_segment:
|
||||
if (elements[index] == 0xeff1) goto finish_segments;
|
||||
}
|
||||
}
|
||||
if (ZI_WORK->unk_0x141F > capacity) goto finish_segments;
|
||||
for (index = ZI_WORK->unk_0x141F; index != 0; index--) {
|
||||
result = Zi8MatchROMdata1(elements + ZI_WORK->unk_0x17EA, index, language,
|
||||
&ZI_WORK->unk_0x17F4[ZI_WORK->unk_0x17EA], capacity,
|
||||
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,
|
||||
1, 0, ZI_WORK->unk_0x1768, (char*)group,
|
||||
acceptPrefix, ZI_WORK);
|
||||
if ((ziU8)result != 0) {
|
||||
ZI_WORK->unk_0x17EA += (ziU8)result;
|
||||
if (ZI_WORK->unk_0x17EA == count) return 0;
|
||||
ZI_WORK->matchOffset += (ziU8)result;
|
||||
if (ZI_WORK->matchOffset == count) return 0;
|
||||
ZI_WORK->unk_0x1768++;
|
||||
status = 0;
|
||||
ZI_WORK->unk_0x141E = 0;
|
||||
ZI_WORK->graphTableId = 0;
|
||||
if (ZI_WORK->dawgCtx.key == 0 && language == 10) {
|
||||
for (index = 0; index < ZI_WORK->unk_0x17EA; index++) {
|
||||
for (index = 0; index < ZI_WORK->matchOffset; index++) {
|
||||
switch (ZI_WORK->unk_0x17F4[index]) {
|
||||
case 0x61:
|
||||
case 0x6f:
|
||||
case 0x75:
|
||||
ZI_WORK->unk_0x141E = 0x10;
|
||||
ZI_WORK->graphTableId = 0x10;
|
||||
goto search_segment;
|
||||
}
|
||||
}
|
||||
@@ -306,7 +306,7 @@ ziU32 Zi8MatchROMdata(ziWChar* elements, ziU8 count, ziU8 language,
|
||||
} else {
|
||||
if (status == 0) {
|
||||
ZI_WORK->unk_0x17EC = 0;
|
||||
ZI_WORK->unk_0x17F0 = NextDawgGroup(0, language, ZI_WORK);
|
||||
ZI_WORK->dawgGroup = NextDawgGroup(0, language, ZI_WORK);
|
||||
} else if (ZI_WORK->unk_0x17EC != 0) {
|
||||
Zi8LogError(100, ZI_WORK);
|
||||
goto finish_match;
|
||||
@@ -316,30 +316,30 @@ ziU32 Zi8MatchROMdata(ziWChar* elements, ziU8 count, ziU8 language,
|
||||
result = Zi8MatchROMdata2(elements, count, language, output, capacity,
|
||||
mode, status, reservedMode, 0, acceptPrefix, ZI_WORK);
|
||||
} else {
|
||||
while (ZI_WORK->unk_0x17F0 != 0) {
|
||||
while (ZI_WORK->dawgGroup != 0) {
|
||||
result = Zi8MatchROMdata2(elements, count, language, output, capacity,
|
||||
mode, status, reservedMode, ZI_WORK->unk_0x17F0,
|
||||
mode, status, reservedMode, ZI_WORK->dawgGroup,
|
||||
acceptPrefix, ZI_WORK);
|
||||
if ((ziU8)result != 0) break;
|
||||
status = 0;
|
||||
if (count <= 1 && language == 0x36) break;
|
||||
ZI_WORK->unk_0x17F0 = NextDawgGroup(ZI_WORK->unk_0x17F0, language, ZI_WORK);
|
||||
ZI_WORK->dawgGroup = NextDawgGroup(ZI_WORK->dawgGroup, language, ZI_WORK);
|
||||
}
|
||||
}
|
||||
if ((ziU8)result == 0 && status == 0 && mode == 1 && count == 1 && capacity >= 1) {
|
||||
mode = 0;
|
||||
ZI_WORK->unk_0x17EC = 1;
|
||||
if (tableSize != 0) {
|
||||
ZI_WORK->unk_0x17F0 = NextDawgGroup(0, language, ZI_WORK);
|
||||
while (ZI_WORK->unk_0x17F0 != 0) {
|
||||
ZI_WORK->dawgGroup = NextDawgGroup(0, language, ZI_WORK);
|
||||
while (ZI_WORK->dawgGroup != 0) {
|
||||
if ((ziU8)Zi8MatchROMdata2(elements, count, language, output, capacity,
|
||||
mode, status, reservedMode, ZI_WORK->unk_0x17F0,
|
||||
mode, status, reservedMode, ZI_WORK->dawgGroup,
|
||||
acceptPrefix, ZI_WORK) != 0) {
|
||||
*output = *elements;
|
||||
result = 1;
|
||||
break;
|
||||
}
|
||||
ZI_WORK->unk_0x17F0 = NextDawgGroup(ZI_WORK->unk_0x17F0, language, ZI_WORK);
|
||||
ZI_WORK->dawgGroup = NextDawgGroup(ZI_WORK->dawgGroup, language, ZI_WORK);
|
||||
}
|
||||
} else {
|
||||
if ((ziU8)Zi8MatchROMdata2(elements, count, language, output, capacity,
|
||||
|
||||
@@ -32,9 +32,9 @@ ziU32 Zi8GetCandidatesOrCount(ziGetParam* parameters, ZiCandidateOptions* option
|
||||
|
||||
ziBool Zi8ZHsetPYfuzzyPairs(ziFuzzyPYPairs pairs ZI_NEED_WORK) {
|
||||
if (pairs.ziDefault) {
|
||||
ZI_WORK->unk_0x1B28.word = *(const ziU32*)&Zi8PYdefaultFuzzyPairs;
|
||||
ZI_WORK->pyFuzzy.word = *(const ziU32*)&Zi8PYdefaultFuzzyPairs;
|
||||
} else {
|
||||
ZI_WORK->unk_0x1B28.word = *(ziU32*)&pairs;
|
||||
ZI_WORK->pyFuzzy.word = *(ziU32*)&pairs;
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
@@ -50,11 +50,11 @@ ziBool Zi8ZHsetZYfuzzyPairs(ziFuzzyZYPairs pairs ZI_NEED_WORK) {
|
||||
|
||||
ziBool Zi8SetLatinSearchOrder(ziU8* searchArray, ziU8 searchSize ZI_NEED_WORK) {
|
||||
if (searchArray == 0 || *searchArray == 0) {
|
||||
ZI_WORK->unk_0x1410 = (ziU32)Zi8SOdefaultArray;
|
||||
ZI_WORK->unk_0x1418 = 9;
|
||||
ZI_WORK->formats = (ziU32)Zi8SOdefaultArray;
|
||||
ZI_WORK->formatCount = 9;
|
||||
} else {
|
||||
ZI_WORK->unk_0x1410 = (ziU32)searchArray;
|
||||
ZI_WORK->unk_0x1418 = searchSize;
|
||||
ZI_WORK->formats = (ziU32)searchArray;
|
||||
ZI_WORK->formatCount = searchSize;
|
||||
}
|
||||
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->unk_0x0A = 0xff;
|
||||
ZI_WORK->maxWordLength = 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->unk_0x0A) length = ZI_WORK->unk_0x0A;
|
||||
if (length > ZI_WORK->maxWordLength) length = ZI_WORK->maxWordLength;
|
||||
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->unk_0x0A) length = ZI_WORK->unk_0x0A;
|
||||
if (length > ZI_WORK->maxWordLength) length = ZI_WORK->maxWordLength;
|
||||
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->unk_0x0A = 0xff;
|
||||
ZI_WORK->maxWordLength = 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->unk_0x0A = 0xff;
|
||||
ZI_WORK->maxWordLength = 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->unk_0x141A;
|
||||
options.capacity = ZI_WORK->capacity;
|
||||
return Zi8GetCandidatesOrCount(parameters, &options, ZI_WORK);
|
||||
}
|
||||
|
||||
ziU8 _Zi8CheckCandidates(ziGetParam* parameters ZI_NEED_WORK) {
|
||||
ZiCandidateOptions options = {0};
|
||||
options.capacity = ZI_WORK->unk_0x141A;
|
||||
options.capacity = ZI_WORK->capacity;
|
||||
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->unk_0x00 == '\t') && (parameters->elementCount != 0)) &&
|
||||
if (((ZI_WORK->getcPhase == '\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->unk_0x00 == '\0') || (ZI_WORK->unk_0x01 == options->countOnly)) {
|
||||
switch(ZI_WORK->unk_0x00) {
|
||||
if ((ZI_WORK->getcPhase == '\0') || (ZI_WORK->countOnly == options->countOnly)) {
|
||||
switch(ZI_WORK->getcPhase) {
|
||||
case '\0':
|
||||
if (parameters->elements[0] == 0xEF04) {
|
||||
ZI_WORK->unk_0x01 = options->countOnly;
|
||||
ZI_WORK->unk_0x00 = '\x01';
|
||||
ZI_WORK->countOnly = options->countOnly;
|
||||
ZI_WORK->getcPhase = '\x01';
|
||||
}
|
||||
break;
|
||||
case '\x02':
|
||||
case '\x04':
|
||||
case '\x06':
|
||||
if (parameters->elements[0] == 0xEF04) {
|
||||
++ZI_WORK->unk_0x00;
|
||||
++ZI_WORK->getcPhase;
|
||||
}
|
||||
else {
|
||||
ZI_WORK->unk_0x00 = '\0';
|
||||
ZI_WORK->getcPhase = '\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->unk_0x00;
|
||||
++ZI_WORK->getcPhase;
|
||||
}
|
||||
else {
|
||||
ZI_WORK->unk_0x00 = '\0';
|
||||
ZI_WORK->getcPhase = '\0';
|
||||
}
|
||||
break;
|
||||
case '\b':
|
||||
case '\t':
|
||||
if ((parameters->elements[0] == 0xEF04) &&
|
||||
((ziU8)Zi8ZhSignature(parameters,options->countOnly,ZI_WORK) != 0)) {
|
||||
ZI_WORK->unk_0x00 = '\t';
|
||||
ZI_WORK->getcPhase = '\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->unk_0x00 = '\0';
|
||||
ZI_WORK->getcPhase = '\0';
|
||||
}
|
||||
if ((ZI_WORK->unk_0x00 == '\0') && (parameters->elements[0] == 0xEF04)) {
|
||||
ZI_WORK->unk_0x00 = '\x01';
|
||||
if ((ZI_WORK->getcPhase == '\0') && (parameters->elements[0] == 0xEF04)) {
|
||||
ZI_WORK->getcPhase = '\x01';
|
||||
}
|
||||
}
|
||||
break;
|
||||
@@ -400,75 +400,75 @@ ziU32 Zi8GetCandidatesOrCount(ziGetParam* parameters, ZiCandidateOptions* option
|
||||
break;
|
||||
case 0x11:
|
||||
default:
|
||||
if ((ZI_WORK->unk_0x00 == '\0') || (ZI_WORK->unk_0x01 == options->countOnly)) {
|
||||
switch(ZI_WORK->unk_0x00) {
|
||||
if ((ZI_WORK->getcPhase == '\0') || (ZI_WORK->countOnly == options->countOnly)) {
|
||||
switch(ZI_WORK->getcPhase) {
|
||||
case '\0':
|
||||
if (parameters->elements[0] == 0xEFF2) {
|
||||
ZI_WORK->unk_0x01 = options->countOnly;
|
||||
ZI_WORK->unk_0x00 = '\x01';
|
||||
ZI_WORK->countOnly = options->countOnly;
|
||||
ZI_WORK->getcPhase = '\x01';
|
||||
}
|
||||
break;
|
||||
case '\x01':
|
||||
if (parameters->elements[0] == 0xEFF3) {
|
||||
ZI_WORK->unk_0x00 = '\x02';
|
||||
ZI_WORK->getcPhase = '\x02';
|
||||
}
|
||||
else {
|
||||
ZI_WORK->unk_0x00 = '\0';
|
||||
ZI_WORK->getcPhase = '\0';
|
||||
}
|
||||
break;
|
||||
case '\x02':
|
||||
if (parameters->elements[0] == 0xEFF5) {
|
||||
ZI_WORK->unk_0x00 = '\x03';
|
||||
ZI_WORK->getcPhase = '\x03';
|
||||
}
|
||||
else {
|
||||
ZI_WORK->unk_0x00 = '\0';
|
||||
ZI_WORK->getcPhase = '\0';
|
||||
}
|
||||
break;
|
||||
case '\x03':
|
||||
if (parameters->elements[0] == 0xEFF7) {
|
||||
ZI_WORK->unk_0x00 = '\x04';
|
||||
ZI_WORK->getcPhase = '\x04';
|
||||
}
|
||||
else {
|
||||
ZI_WORK->unk_0x00 = '\0';
|
||||
ZI_WORK->getcPhase = '\0';
|
||||
}
|
||||
break;
|
||||
case '\x04':
|
||||
if (parameters->elements[0] == 0xEFF8) {
|
||||
ZI_WORK->unk_0x00 = '\x05';
|
||||
ZI_WORK->getcPhase = '\x05';
|
||||
}
|
||||
else {
|
||||
ZI_WORK->unk_0x00 = '\0';
|
||||
ZI_WORK->getcPhase = '\0';
|
||||
}
|
||||
break;
|
||||
case '\x05':
|
||||
if (parameters->elements[0] == 0xEFF9) {
|
||||
ZI_WORK->unk_0x00 = '\x06';
|
||||
ZI_WORK->getcPhase = '\x06';
|
||||
}
|
||||
else {
|
||||
ZI_WORK->unk_0x00 = '\0';
|
||||
ZI_WORK->getcPhase = '\0';
|
||||
}
|
||||
break;
|
||||
case '\x06':
|
||||
if (parameters->elements[0] == 0xEFF2) {
|
||||
ZI_WORK->unk_0x00 = '\a';
|
||||
ZI_WORK->getcPhase = '\a';
|
||||
}
|
||||
else {
|
||||
ZI_WORK->unk_0x00 = '\0';
|
||||
ZI_WORK->getcPhase = '\0';
|
||||
}
|
||||
break;
|
||||
case '\a':
|
||||
if (parameters->elements[0] == 0xEFF5) {
|
||||
ZI_WORK->unk_0x00 = '\b';
|
||||
ZI_WORK->getcPhase = '\b';
|
||||
}
|
||||
else {
|
||||
ZI_WORK->unk_0x00 = '\0';
|
||||
ZI_WORK->getcPhase = '\0';
|
||||
}
|
||||
break;
|
||||
case '\b':
|
||||
case '\t':
|
||||
if ((parameters->elements[0] == 0xEFF8) &&
|
||||
((ziU8)Zi8AlphaSignature(parameters,options->countOnly,ZI_WORK) != 0)) {
|
||||
ZI_WORK->unk_0x00 = '\t';
|
||||
ZI_WORK->getcPhase = '\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->unk_0x00 = '\0';
|
||||
ZI_WORK->getcPhase = '\0';
|
||||
}
|
||||
if ((ZI_WORK->unk_0x00 == '\0') && (parameters->elements[0] == 0xEFF2)) {
|
||||
ZI_WORK->unk_0x00 = '\x01';
|
||||
if ((ZI_WORK->getcPhase == '\0') && (parameters->elements[0] == 0xEFF2)) {
|
||||
ZI_WORK->getcPhase = '\x01';
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
else if (1 < parameters->elementCount) {
|
||||
ZI_WORK->unk_0x00 = '\0';
|
||||
ZI_WORK->getcPhase = '\0';
|
||||
}
|
||||
}
|
||||
ZI_WORK->subLanguage = parameters->subLanguage;
|
||||
ZI_WORK->cangjieEnabled = Zi8GetFormatVersion(1,ZI_WORK) & 2;
|
||||
options->maxCount = ZI_WORK->unk_0x10;
|
||||
options->maxWordLength = ZI_WORK->unk_0x0A;
|
||||
ZI_WORK->unk_0x0A = -1;
|
||||
options->maxWordLength = ZI_WORK->maxWordLength;
|
||||
ZI_WORK->maxWordLength = -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->count = parameters->unk_0x20 = 0;
|
||||
parameters->letters = parameters->completion = parameters->count = 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->count = 1;
|
||||
parameters->completion = 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->unk_0x0A = length;
|
||||
ZI_WORK->maxWordLength = length;
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -18,12 +18,12 @@ 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->unk_0x0A = 0xFF;
|
||||
ZI_WORK->maxWordLength = 0xFF;
|
||||
ZI_WORK->unk_0x10 = 0x64;
|
||||
*(ziU16*)&ZI_WORK->unk_0x0C = 0xFFFF;
|
||||
ZI_WORK->separator = 0x20;
|
||||
ZI_WORK->unk_0x1C[2] = 0;
|
||||
ZI_WORK->unk_0x1B30 = 0;
|
||||
ZI_WORK->koAltTables = 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->unk_0x141A = 0x100;
|
||||
ZI_WORK->capacity = 0x100;
|
||||
Zi8SetLatinSearchOrder(0, 0, ZI_WORK);
|
||||
ZADP_Zi8SetPDremoveOpt(1, ZI_WORK);
|
||||
ZI_WORK->unk_0x17 = 5;
|
||||
ZI_WORK->cangjieEnabled = Zi8GetFormatVersion(1, ZI_WORK) & 2;
|
||||
ZI_WORK->unk_0x1B28.bits.msb = 1;
|
||||
ZI_WORK->pyFuzzy.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->unk_0x1B28.word;
|
||||
pyFuzzy = ZI_WORK->pyFuzzy.word;
|
||||
ppyFuzzy = &pyFuzzy;
|
||||
Zi8ZHsetPYfuzzyPairs(ppyFuzzy, ZI_WORK);
|
||||
Zi8SetParentalControls(2, ZI_WORK);
|
||||
|
||||
@@ -65,19 +65,19 @@ ziU16 Zi8Uni2Ptr(ziU16 ch, ziE12* buf ZI_NEED_WORK) {
|
||||
}
|
||||
}
|
||||
e = (ziU8*)table;
|
||||
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);
|
||||
if (WORKP->unicodeMap != ZI8_NULL && WORKP->unicodeMapSubLang == WORKP->subLanguage) {
|
||||
if ((ziU16)ch >= WORKP->unicodeRange1Min && (ziU16)ch <= WORKP->unicodeRange1Max) {
|
||||
i = (ziU16)(ch - WORKP->unicodeRange1Min);
|
||||
goto map;
|
||||
}
|
||||
if ((ziU16)ch >= WORKP->unk_0x1B20 && (ziU16)ch <= WORKP->unk_0x1B22) {
|
||||
i = (ziU16)(WORKP->unk_0x1B1E + (ch - WORKP->unk_0x1B20) -
|
||||
WORKP->unk_0x1B1C + 1);
|
||||
if ((ziU16)ch >= WORKP->unicodeRange2Min && (ziU16)ch <= WORKP->unicodeRange2Max) {
|
||||
i = (ziU16)(WORKP->unicodeRange1Max + (ch - WORKP->unicodeRange2Min) -
|
||||
WORKP->unicodeRange1Min + 1);
|
||||
goto map;
|
||||
}
|
||||
return 0xFFFF;
|
||||
map:
|
||||
i = WORKP->unk_0x1B18[i];
|
||||
i = WORKP->unicodeMap[i];
|
||||
if (i != 0xFFFF) {
|
||||
e = (ziU8*)table + i * 0xC;
|
||||
if (hi == e[6] && lo == e[7]) {
|
||||
|
||||
@@ -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->unk_0x12E == 1 && candidate->priority < word->priority) break;
|
||||
if (ZI_WORK->uwdPrioritySort == 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->unk_0x138 <= 2 && ZI_WORK->unk_0x138 != 0 && ZI_WORK->unk_0x130[ZI_WORK->unk_0x138 - 1] != 0)) {
|
||||
if (!(ZI_WORK->uwdDictCount <= 2 && ZI_WORK->uwdDictCount != 0 && ZI_WORK->uwdDicts[ZI_WORK->uwdDictCount - 1] != 0)) {
|
||||
Zi8ReplaceLastError(0x19C, __zi8_work_data);
|
||||
return 0;
|
||||
}
|
||||
dictionary = ZI_WORK->unk_0x130[ZI_WORK->unk_0x138 - 1];
|
||||
dictionary = ZI_WORK->uwdDicts[ZI_WORK->uwdDictCount - 1];
|
||||
if (continuation != 0) {
|
||||
text = (ziU8*)Zi8_814803F4(__zi8_work_data);
|
||||
entryLength = 0;
|
||||
|
||||
@@ -52,7 +52,7 @@ ziU32 Zi8GetKoreanCandidates(ziGetParam* params, ziU8* argument,
|
||||
result = 0;
|
||||
state.characterIndex = 0xFF;
|
||||
state.currentCandidate = params->firstCandidate;
|
||||
params->letters = params->count = params->unk_0x20 = 0;
|
||||
params->letters = params->completion = params->count = 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)->unk_0x1B30 == 1)) {
|
||||
if ((((struct __zi8_work_data_s*)workData)->koAltTables == 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)->unk_0x1B30 == 0)) {
|
||||
if ((state.tableCount6 != 0) && (((struct __zi8_work_data_s*)workData)->koAltTables == 0)) {
|
||||
params->candidates[(ziU8)result] += state.inputIndex * state.tableCount3;
|
||||
}
|
||||
result++;
|
||||
}
|
||||
if (currentCharacter == 0) {
|
||||
params->count = state.matched + 1;
|
||||
params->completion = state.matched + 1;
|
||||
}
|
||||
currentCharacter += state.matched;
|
||||
} else {
|
||||
@@ -199,14 +199,14 @@ ziU32 Zi8GetKoreanCandidates(ziGetParam* params, ziU8* argument,
|
||||
state.currentCandidate--;
|
||||
}
|
||||
if (currentCharacter == 0) {
|
||||
params->count = 1;
|
||||
params->completion = 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->count = 1;
|
||||
params->completion = 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->count = 1;
|
||||
params->completion = 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)->unk_0x1B30 == 0) {
|
||||
if (((struct __zi8_work_data_s*)workData)->koAltTables == 0) {
|
||||
table = (ziU8*)Zi8GetTableAddress(ZI8_LANG_KO, 3, workData);
|
||||
tableCount = Zi8GetTableCount(ZI8_LANG_KO, 3, workData);
|
||||
} else {
|
||||
|
||||
@@ -45,8 +45,8 @@ ziBool Zi8IsWordW(ziWChar* word, ziU8 language ZI_NEED_WORK) {
|
||||
ziWChar* cursor;
|
||||
ziU8* data;
|
||||
ziU8 formats[8] = {1, 5, 0, 0, 0, 0, 0, 0};
|
||||
ziU32 savedFormats = ZI_WORK->unk_0x1410;
|
||||
ziU8 savedCount = ZI_WORK->unk_0x1418;
|
||||
ziU32 savedFormats = ZI_WORK->formats;
|
||||
ziU8 savedCount = ZI_WORK->formatCount;
|
||||
ziSearchState search = {0};
|
||||
Zi8LogError(100, __zi8_work_data);
|
||||
if (word == 0 || *word == 0) {
|
||||
@@ -73,22 +73,22 @@ ziBool Zi8IsWordW(ziWChar* word, ziU8 language ZI_NEED_WORK) {
|
||||
request.candidates = ordinals;
|
||||
request.maxCandidates = 1;
|
||||
request.firstCandidate = 0;
|
||||
ZI_WORK->unk_0x1410 = (ziU32)formats;
|
||||
ZI_WORK->formats = (ziU32)formats;
|
||||
if (ZI_WORK->unk_0x1C[0] == 2) {
|
||||
ZI_WORK->unk_0x1418 = 0;
|
||||
if (ZI_WORK->unk_0x09 & 1) formats[ZI_WORK->unk_0x1418++] = 1;
|
||||
if (ZI_WORK->unk_0x09 & 4) formats[ZI_WORK->unk_0x1418++] = 2;
|
||||
if (ZI_WORK->unk_0x09 & 2) formats[ZI_WORK->unk_0x1418++] = 3;
|
||||
if (ZI_WORK->unk_0x09 & 8) formats[ZI_WORK->unk_0x1418++] = 4;
|
||||
if (ZI_WORK->unk_0x09 & 1) formats[ZI_WORK->unk_0x1418++] = 5;
|
||||
if (ZI_WORK->unk_0x09 & 4) formats[ZI_WORK->unk_0x1418++] = 6;
|
||||
if (ZI_WORK->unk_0x09 & 2) formats[ZI_WORK->unk_0x1418++] = 7;
|
||||
if (ZI_WORK->unk_0x09 & 8) formats[ZI_WORK->unk_0x1418++] = 8;
|
||||
} else if (ZI_WORK->unk_0x1C[0] != 0) ZI_WORK->unk_0x1418 = 2;
|
||||
else ZI_WORK->unk_0x1418 = 1;
|
||||
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;
|
||||
} else if (ZI_WORK->unk_0x1C[0] != 0) ZI_WORK->formatCount = 2;
|
||||
else ZI_WORK->formatCount = 1;
|
||||
count = Zi8GetCandidatesOrCount(&request, &search, __zi8_work_data);
|
||||
ZI_WORK->unk_0x1410 = savedFormats;
|
||||
ZI_WORK->unk_0x1418 = savedCount;
|
||||
ZI_WORK->formats = savedFormats;
|
||||
ZI_WORK->formatCount = savedCount;
|
||||
if (count != 0) return 1;
|
||||
}
|
||||
if (language != 1) {
|
||||
|
||||
@@ -309,7 +309,7 @@ ziU32 Zi8GetKOcandidates(ziGetParam* param, ZiKoreanCandidateOptions* options ZI
|
||||
}
|
||||
if (options->countOnly == 0) {
|
||||
param->letters = 0;
|
||||
param->unk_0x20 = 0;
|
||||
param->count = 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->unk_0x20;
|
||||
++param->count;
|
||||
if (++param->letters >= param->maxCandidates) {
|
||||
return param->letters;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
param->candidates[search.candidateCount++] = search.character;
|
||||
++param->unk_0x20;
|
||||
++param->count;
|
||||
if (++param->letters >= param->maxCandidates) {
|
||||
Zi8_814834AC(param, &search.remainingCandidates, &search.candidateCount, &search.inserted, ZI_WORK);
|
||||
param->unk_0x20 = search.candidateCount;
|
||||
param->count = 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->unk_0x20 = 0;
|
||||
param->count = 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->unk_0x20;
|
||||
++param->count;
|
||||
if (++param->letters < param->maxCandidates) {
|
||||
goto skip_word;
|
||||
}
|
||||
Zi8_814834AC(param, &search.remainingCandidates, &search.candidateCount, &search.inserted, ZI_WORK);
|
||||
param->unk_0x20 = search.candidateCount;
|
||||
param->count = 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->unk_0x20 = 0;
|
||||
param->count = 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->unk_0x20 = search.candidateCount;
|
||||
param->count = search.candidateCount;
|
||||
param->letters = search.candidateCount;
|
||||
}
|
||||
if (param->elementCount > 9) {
|
||||
|
||||
@@ -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->count,&match->first,&match->first2,__zi8_work_data);
|
||||
&request->completion,&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->count = request->elementCount;
|
||||
request->completion = 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->count = phoneticLength - 1;
|
||||
request->completion = phoneticLength - 1;
|
||||
}
|
||||
buffers.phoneticInput = buffers.phoneticInput + phoneticLength - 1;
|
||||
phoneticLength = 0;
|
||||
@@ -306,7 +306,7 @@ savePhonetic:
|
||||
}
|
||||
}
|
||||
if (((request->context & contextMask) != 0) &&
|
||||
((1 < match->nCand || (request->count != elementCount)))) {
|
||||
((1 < match->nCand || (request->completion != elementCount)))) {
|
||||
match->phon[0] = 0xFFFF;
|
||||
match->phon2[0] = 0xFFFF;
|
||||
match->nCand = 0;
|
||||
|
||||
@@ -62,8 +62,8 @@ typedef struct
|
||||
|
||||
typedef struct
|
||||
{
|
||||
UINT16 at_0x00; // 0x00
|
||||
UINT16 at_0x02; // 0x02
|
||||
UINT16 vendorId; // 0x00
|
||||
UINT16 productId; // 0x02
|
||||
} tHCI_CFG; // size 0x04
|
||||
|
||||
typedef void tHCI_INIT(UINT8, UINT8, UINT16);
|
||||
|
||||
@@ -19,11 +19,11 @@ typedef void tUUSB_CBACK(UINT8, INT8);
|
||||
typedef struct
|
||||
{
|
||||
char pad0_[4];
|
||||
UINT16 at_0x04;
|
||||
UINT16 at_0x06;
|
||||
UINT16 at_0x08;
|
||||
UINT16 vendorId; // 0x04
|
||||
UINT16 productId; // 0x06
|
||||
UINT16 taskId; // 0x08
|
||||
char pad1_[1];
|
||||
char at_0x0b;
|
||||
char pad_0x0b; // 0x0b unused
|
||||
char pad2_[1]; // for stack
|
||||
} tUUSB;
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@ extern "C" {
|
||||
#endif
|
||||
|
||||
typedef void (*USBCallback)(IOSError result, void* arg);
|
||||
typedef void (*USBIsoCallback)(IOSError err, void* unkIsoArg, void* cbArg);
|
||||
typedef void (*USBIsoCallback)(IOSError err, void* isoArg, void* cbArg);
|
||||
|
||||
IOSError IUSB_OpenLib();
|
||||
IOSError IUSB_CloseLib();
|
||||
|
||||
@@ -133,11 +133,11 @@ typedef struct WPADExtConfig {
|
||||
union {
|
||||
struct WPADFSConfig {
|
||||
s16 stickXCenter; // 0x00
|
||||
s16 unk_0x02; // 0x02
|
||||
s16 unk_0x04; // 0x04
|
||||
s16 stickXMin; // 0x02
|
||||
s16 stickXMax; // 0x04
|
||||
s16 stickYCenter; // 0x06
|
||||
s16 unk_0x08; // 0x08
|
||||
s16 unk_0x0A; // 0x0A
|
||||
s16 stickYMin; // 0x08
|
||||
s16 stickYMax; // 0x0A
|
||||
|
||||
s16 accX0g; // 0x0C
|
||||
s16 accY0g; // 0x0E
|
||||
@@ -150,18 +150,18 @@ typedef struct WPADExtConfig {
|
||||
|
||||
struct WPADCLConfig {
|
||||
s16 lStickXCenter; // 0x00
|
||||
s16 unk_0x02; // 0x02
|
||||
s16 unk_0x04; // 0x04
|
||||
s16 lStickXMin; // 0x02
|
||||
s16 lStickXMax; // 0x04
|
||||
s16 lStickYCenter; // 0x06
|
||||
s16 unk_0x08; // 0x08
|
||||
s16 unk_0x0A; // 0x0A
|
||||
s16 lStickYMin; // 0x08
|
||||
s16 lStickYMax; // 0x0A
|
||||
|
||||
s16 rStickXCenter; // 0x0C
|
||||
s16 unk_0x0E; // 0x0E
|
||||
s16 unk_0x10; // 0x10
|
||||
s16 rStickXMin; // 0x0E
|
||||
s16 rStickXMax; // 0x10
|
||||
s16 rStickYCenter; // 0x12
|
||||
s16 unk_0x14; // 0x14
|
||||
s16 unk_0x16; // 0x16
|
||||
s16 rStickYMin; // 0x14
|
||||
s16 rStickYMax; // 0x16
|
||||
|
||||
u8 triggerLZero; // 0x18
|
||||
u8 triggerRZero; // 0x19
|
||||
@@ -171,7 +171,7 @@ typedef struct WPADExtConfig {
|
||||
|
||||
typedef struct WPADCB {
|
||||
WPADGameInfo gameInfo; // 0x00
|
||||
s32 unk_0x38[2];
|
||||
s32 gameInfoStatus[2]; // 0x38
|
||||
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 unk_0x910;
|
||||
u8 suppressDisconnect; // 0x910
|
||||
u8 calibrated; // 0x911
|
||||
u16 comboHeld; // 0x912
|
||||
u8 encryptionKey[16]; // 0x914
|
||||
@@ -242,8 +242,8 @@ typedef struct WPADCB {
|
||||
WPADCallback getInfoCB; // 0x988
|
||||
u8 getInfoBusy; // 0x98C
|
||||
|
||||
u8 unk_0x98D; // 0x98D
|
||||
u8 unk_0x98E; // 0x98E
|
||||
u8 encStatus; // 0x98D
|
||||
u8 continuous; // 0x98E
|
||||
u8 unk_0x98F[0x9A0 - 0x990];
|
||||
} WPADCB;
|
||||
|
||||
@@ -261,7 +261,7 @@ void WPADiExcludeButton(s32 chan);
|
||||
void WPADiCopyOut(s32 chan);
|
||||
|
||||
BOOL WPADiSendSetPort(WPADCommandQueue* pQueue, u8 port, WPADCallback pCallback);
|
||||
BOOL WPADiSendSetReportType(WPADCommandQueue* pQueue, s32 format, BOOL unk, WPADCallback pCallback);
|
||||
BOOL WPADiSendSetReportType(WPADCommandQueue* pQueue, s32 format, BOOL continuous, WPADCallback pCallback);
|
||||
BOOL WPADiSendEnableDPD(WPADCommandQueue* pQueue, BOOL enable, WPADCallback pCallback);
|
||||
BOOL WPADiSendEnableSpeaker(WPADCommandQueue* pQueue, BOOL enable, WPADCallback pCallback);
|
||||
BOOL WPADiSendGetContStat(WPADCommandQueue* pQueue, WPADInfo* pInfo, WPADCallback pCallback);
|
||||
|
||||
@@ -24,7 +24,7 @@ typedef struct WPADMemBlock {
|
||||
int unk_0x04; // 0x04
|
||||
s16 unk_0x08; // 0x08
|
||||
int unk_0x0C; // 0x0C
|
||||
WPADCallback unk_0x10; // 0x10
|
||||
WPADCallback callback; // 0x10
|
||||
} WPADMemBlock;
|
||||
|
||||
typedef struct WPADGameInfo {
|
||||
|
||||
@@ -66,16 +66,16 @@
|
||||
|
||||
typedef struct
|
||||
{
|
||||
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
|
||||
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
|
||||
char pad4_[1]; // 0x1d
|
||||
UINT8 at_0x1e; // 0x1e
|
||||
UINT8 at_0x1f; // 0x1f
|
||||
UINT8 at_0x20; // 0x20
|
||||
UINT8 open_state; // 0x1e
|
||||
UINT8 task_id; // 0x1f
|
||||
UINT8 mbox; // 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->at_0x1e != 2)
|
||||
if (p_cb->open_state != 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->at_0x1a[pipe])
|
||||
switch (p_cb->rx_state[pipe])
|
||||
{
|
||||
case 0:
|
||||
if (r27 == 1)
|
||||
{
|
||||
p_cb->at_0x00[pipe] = GKI_getpoolbuf(GKI_POOL_ID_2);
|
||||
p_cb->at_0x14[pipe] = 4;
|
||||
p_cb->p_rx_msg[pipe] = GKI_getpoolbuf(GKI_POOL_ID_2);
|
||||
p_cb->pkt_type[pipe] = 4;
|
||||
}
|
||||
else if (r27 == 2)
|
||||
{
|
||||
p_cb->at_0x00[pipe] = GKI_getpoolbuf(GKI_POOL_ID_3);
|
||||
p_cb->at_0x14[pipe] = 2;
|
||||
p_cb->p_rx_msg[pipe] = GKI_getpoolbuf(GKI_POOL_ID_3);
|
||||
p_cb->pkt_type[pipe] = 2;
|
||||
}
|
||||
else if (r27 == 3)
|
||||
{
|
||||
p_cb->at_0x00[pipe] = GKI_getpoolbuf(GKI_POOL_ID_1);
|
||||
p_cb->at_0x14[pipe] = 3;
|
||||
p_cb->p_rx_msg[pipe] = GKI_getpoolbuf(GKI_POOL_ID_1);
|
||||
p_cb->pkt_type[pipe] = 3;
|
||||
}
|
||||
else
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
||||
if (p_cb->at_0x00[pipe])
|
||||
if (p_cb->p_rx_msg[pipe])
|
||||
{
|
||||
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;
|
||||
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;
|
||||
}
|
||||
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->at_0x1a[pipe] = 2;
|
||||
p_cb->rx_state[pipe] = 2;
|
||||
}
|
||||
|
||||
p_cb->at_0x0c[pipe] =
|
||||
hcisu_preamble_table[p_cb->at_0x14[pipe] - 1];
|
||||
p_cb->bytes_left[pipe] =
|
||||
hcisu_preamble_table[p_cb->pkt_type[pipe] - 1];
|
||||
|
||||
/* fallthrough */
|
||||
|
||||
case 1:
|
||||
*((UINT8 *)(p_cb->at_0x00[pipe] + 1)
|
||||
+ p_cb->at_0x00[pipe]->len++) = byte;
|
||||
*((UINT8 *)(p_cb->p_rx_msg[pipe] + 1)
|
||||
+ p_cb->p_rx_msg[pipe]->len++) = byte;
|
||||
|
||||
--p_cb->at_0x0c[pipe];
|
||||
--p_cb->bytes_left[pipe];
|
||||
|
||||
if (p_cb->at_0x0c[pipe] == 0)
|
||||
if (p_cb->bytes_left[pipe] == 0)
|
||||
{
|
||||
msg_len = byte;
|
||||
|
||||
if (p_cb->at_0x14[pipe] == 2)
|
||||
if (p_cb->pkt_type[pipe] == 2)
|
||||
{
|
||||
msg_len = (msg_len << 8) + p_cb->at_0x17[pipe];
|
||||
msg_len = (msg_len << 8) + p_cb->len_hi[pipe];
|
||||
|
||||
if ((p_cb->at_0x00[pipe] =
|
||||
if ((p_cb->p_rx_msg[pipe] =
|
||||
(HC_BT_HDR *)l2cap_link_chk_pkt_start(
|
||||
(BT_HDR *)p_cb->at_0x00[pipe]))
|
||||
(BT_HDR *)p_cb->p_rx_msg[pipe]))
|
||||
== 0)
|
||||
{
|
||||
p_cb->at_0x0c[pipe] = msg_len;
|
||||
p_cb->bytes_left[pipe] = msg_len;
|
||||
|
||||
if (msg_len == 0)
|
||||
p_cb->at_0x1a[pipe] = 0;
|
||||
p_cb->rx_state[pipe] = 0;
|
||||
else
|
||||
p_cb->at_0x1a[pipe] = 4;
|
||||
p_cb->rx_state[pipe] = 4;
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
p_cb->at_0x0c[pipe] = msg_len;
|
||||
p_cb->bytes_left[pipe] = msg_len;
|
||||
|
||||
if (sizeof(HC_BT_HDR)
|
||||
+ hcisu_preamble_table[p_cb->at_0x14[pipe] - 1]
|
||||
+ hcisu_preamble_table[p_cb->pkt_type[pipe] - 1]
|
||||
+ msg_len
|
||||
> GKI_get_buf_size(p_cb->at_0x00[pipe]))
|
||||
> GKI_get_buf_size(p_cb->p_rx_msg[pipe]))
|
||||
{
|
||||
GKI_freebuf(p_cb->at_0x00[pipe]);
|
||||
p_cb->at_0x00[pipe] = NULL;
|
||||
p_cb->at_0x1a[pipe] = 4;
|
||||
GKI_freebuf(p_cb->p_rx_msg[pipe]);
|
||||
p_cb->p_rx_msg[pipe] = NULL;
|
||||
p_cb->rx_state[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->at_0x1a[pipe] = 3;
|
||||
p_cb->rx_state[pipe] = 3;
|
||||
}
|
||||
else
|
||||
{
|
||||
msg_received = TRUE;
|
||||
p_cb->at_0x1a[pipe] = 0;
|
||||
p_cb->rx_state[pipe] = 0;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
p_cb->at_0x17[pipe] = byte;
|
||||
p_cb->len_hi[pipe] = byte;
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case 2:
|
||||
--p_cb->at_0x0c[pipe];
|
||||
--p_cb->bytes_left[pipe];
|
||||
|
||||
if (p_cb->at_0x0c[pipe] == 0)
|
||||
if (p_cb->bytes_left[pipe] == 0)
|
||||
{
|
||||
msg_len = byte;
|
||||
|
||||
if (p_cb->at_0x14[pipe] == 2)
|
||||
msg_len = (msg_len << 8) + p_cb->at_0x17[pipe];
|
||||
if (p_cb->pkt_type[pipe] == 2)
|
||||
msg_len = (msg_len << 8) + p_cb->len_hi[pipe];
|
||||
|
||||
p_cb->at_0x0c[pipe] = msg_len;
|
||||
p_cb->at_0x1a[pipe] = 4;
|
||||
p_cb->bytes_left[pipe] = msg_len;
|
||||
p_cb->rx_state[pipe] = 4;
|
||||
}
|
||||
else
|
||||
{
|
||||
p_cb->at_0x17[pipe] = byte;
|
||||
p_cb->len_hi[pipe] = byte;
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case 3:
|
||||
*((UINT8 *)(p_cb->at_0x00[pipe] + 1)
|
||||
+ p_cb->at_0x00[pipe]->len++) = byte;
|
||||
*((UINT8 *)(p_cb->p_rx_msg[pipe] + 1)
|
||||
+ p_cb->p_rx_msg[pipe]->len++) = byte;
|
||||
|
||||
--p_cb->at_0x0c[pipe];
|
||||
--p_cb->bytes_left[pipe];
|
||||
|
||||
len = UUSB_Read(pipe + 1,
|
||||
(UINT8 *)(p_cb->at_0x00[pipe] + 1)
|
||||
+ p_cb->at_0x00[pipe]->len,
|
||||
p_cb->at_0x0c[pipe]);
|
||||
(UINT8 *)(p_cb->p_rx_msg[pipe] + 1)
|
||||
+ p_cb->p_rx_msg[pipe]->len,
|
||||
p_cb->bytes_left[pipe]);
|
||||
|
||||
p_cb->at_0x00[pipe]->len += len;
|
||||
p_cb->at_0x0c[pipe] -= len;
|
||||
p_cb->p_rx_msg[pipe]->len += len;
|
||||
p_cb->bytes_left[pipe] -= len;
|
||||
bytes_read += len;
|
||||
|
||||
if (p_cb->at_0x0c[pipe] == 0)
|
||||
if (p_cb->bytes_left[pipe] == 0)
|
||||
{
|
||||
if (p_cb->at_0x14[pipe] == 2
|
||||
if (p_cb->pkt_type[pipe] == 2
|
||||
&& l2cap_link_chk_pkt_end() == 0)
|
||||
{
|
||||
p_cb->at_0x1a[pipe] = 0;
|
||||
p_cb->rx_state[pipe] = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
msg_received = TRUE;
|
||||
p_cb->at_0x1a[pipe] = 0;
|
||||
p_cb->rx_state[pipe] = 0;
|
||||
}
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case 4:
|
||||
--p_cb->at_0x0c[pipe];
|
||||
--p_cb->bytes_left[pipe];
|
||||
|
||||
if (p_cb->at_0x0c[pipe] == 0)
|
||||
p_cb->at_0x1a[pipe] = 0;
|
||||
if (p_cb->bytes_left[pipe] == 0)
|
||||
p_cb->rx_state[pipe] = 0;
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
if (msg_received)
|
||||
{
|
||||
GKI_send_msg(hcisu_h2_cb.at_0x1f, 0, p_cb->at_0x00[pipe]);
|
||||
p_cb->at_0x00[pipe] = NULL;
|
||||
GKI_send_msg(hcisu_h2_cb.task_id, 0, p_cb->p_rx_msg[pipe]);
|
||||
p_cb->p_rx_msg[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.at_0x1f, 0, p_msg);
|
||||
GKI_send_msg(hcisu_h2_cb.task_id, 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.at_0x1e = 0;
|
||||
hcisu_h2_cb.open_state = 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.rx_state[0] = 0;
|
||||
hcisu_h2_cb.rx_state[1] = 0;
|
||||
hcisu_h2_cb.rx_state[2] = 0;
|
||||
|
||||
hcisu_h2_cb.at_0x1f = taskId;
|
||||
hcisu_h2_cb.at_0x20 = mbox;
|
||||
hcisu_h2_cb.at_0x12 = bufSize;
|
||||
hcisu_h2_cb.task_id = taskId;
|
||||
hcisu_h2_cb.mbox = mbox;
|
||||
hcisu_h2_cb.buf_size = bufSize;
|
||||
}
|
||||
|
||||
BOOLEAN hcisu_h2_open(tHCI_CFG *_p_cfg)
|
||||
@@ -421,12 +421,12 @@ BOOLEAN hcisu_h2_open(tHCI_CFG *_p_cfg)
|
||||
tHCI_CFG *p_cfg = _p_cfg;
|
||||
tUUSB uusb;
|
||||
|
||||
uusb.at_0x0b = 0;
|
||||
uusb.at_0x04 = p_cfg->at_0x00;
|
||||
uusb.at_0x06 = p_cfg->at_0x02;
|
||||
uusb.at_0x08 = hcisu_h2_cb.at_0x1f;
|
||||
uusb.pad_0x0b = 0;
|
||||
uusb.vendorId = p_cfg->vendorId;
|
||||
uusb.productId = p_cfg->productId;
|
||||
uusb.taskId = hcisu_h2_cb.task_id;
|
||||
|
||||
hcisu_h2_cb.at_0x1e = 2;
|
||||
hcisu_h2_cb.open_state = 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.at_0x1e = 0;
|
||||
hcisu_h2_cb.open_state = 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.at_0x12, &hcisu_h2_cb);
|
||||
len - sizeof(HC_BT_HDR) - hcisu_h2_cb.buf_size, &hcisu_h2_cb);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -41,13 +41,13 @@ typedef struct USBCommandBlock {
|
||||
USBCallback callback; // 0x00
|
||||
USBIsoCallback isoCallback; // 0x04
|
||||
void* callbackArg; // 0x08
|
||||
void* unkIsoArg; // 0x0C
|
||||
void* isoArg; // 0x0C
|
||||
|
||||
char unk_0x10[0x4];
|
||||
char pad_0x10[0x4];
|
||||
|
||||
void* clean[USB_NCLEAN_MAX]; // 0x14
|
||||
u32 nclean; // 0x34
|
||||
char unk_0x38[0x40 - 0x38];
|
||||
char pad_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->unkIsoArg, block->callbackArg);
|
||||
block->isoCallback(result, block->isoArg, block->callbackArg);
|
||||
}
|
||||
|
||||
IOSFree(block);
|
||||
|
||||
@@ -7,9 +7,9 @@
|
||||
static struct {
|
||||
struct {
|
||||
OSMessageQueue* queue; // 0x00
|
||||
void* unk_0x04;
|
||||
void* messages; // 0x04 (OSMessage* array for OSInitMessageQueue)
|
||||
} entries[MAX_PUH_SEM]; // 0x00
|
||||
void* unk_0x14;
|
||||
void* pad_0x14; // unused
|
||||
} st_uhs_ker_msg_mng;
|
||||
|
||||
s32 uhf_ker_send_message(int index, void* message) {
|
||||
|
||||
@@ -7,12 +7,12 @@
|
||||
static struct {
|
||||
struct {
|
||||
OSSemaphore* sem; // 0x00
|
||||
u32 unk_0x04;
|
||||
u32 unk_0x08;
|
||||
u32 initCount;
|
||||
u32 flags;
|
||||
} entries[MAX_PUH_SEM]; // 0x00
|
||||
u32 unk_0x90;
|
||||
OSSemaphore* unk_0x94;
|
||||
u8 unk_0x98[0x0C];
|
||||
u32 usedCount;
|
||||
OSSemaphore* lockSem;
|
||||
u8 pad[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.unk_0x94 == 0) {
|
||||
if (st_uhs_ker_sem_status != 1 || st_uhs_ker_sem_mng.lockSem == 0) {
|
||||
return -1;
|
||||
} else {
|
||||
OSWaitSemaphore(st_uhs_ker_sem_mng.unk_0x94);
|
||||
OSWaitSemaphore(st_uhs_ker_sem_mng.lockSem);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
static void uhf_ker_sem_inline_1() {
|
||||
if (st_uhs_ker_sem_status == 1 && st_uhs_ker_sem_mng.unk_0x94 != 0) {
|
||||
OSSignalSemaphore(st_uhs_ker_sem_mng.unk_0x94);
|
||||
if (st_uhs_ker_sem_status == 1 && st_uhs_ker_sem_mng.lockSem != 0) {
|
||||
OSSignalSemaphore(st_uhs_ker_sem_mng.lockSem);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -48,7 +48,7 @@ s32 uhf_ker_create_sem(u32 initCount, int flags) {
|
||||
return -5;
|
||||
}
|
||||
|
||||
if (st_uhs_ker_sem_mng.unk_0x90 == 12) {
|
||||
if (st_uhs_ker_sem_mng.usedCount == 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].unk_0x04 = initCount;
|
||||
st_uhs_ker_sem_mng.entries[i].unk_0x08 = flags;
|
||||
st_uhs_ker_sem_mng.unk_0x90++;
|
||||
st_uhs_ker_sem_mng.entries[i].initCount = initCount;
|
||||
st_uhs_ker_sem_mng.entries[i].flags = flags;
|
||||
st_uhs_ker_sem_mng.usedCount++;
|
||||
|
||||
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].unk_0x04 = 0;
|
||||
st_uhs_ker_sem_mng.entries[sem - 1].unk_0x08 = 0;
|
||||
st_uhs_ker_sem_mng.unk_0x90--;
|
||||
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--;
|
||||
|
||||
uhf_ker_sem_inline_1();
|
||||
|
||||
|
||||
@@ -6,8 +6,8 @@
|
||||
|
||||
static struct {
|
||||
struct {
|
||||
OSThread* unk_0x00;
|
||||
u8 unk_0x04[0x33C];
|
||||
OSThread* thread; // 0x00
|
||||
u8 stack[0x33C]; // 0x04
|
||||
} entries[MAX_PUH_TSK]; // 0x00
|
||||
u32 unk_0x680;
|
||||
u32 unk_0x684;
|
||||
@@ -24,9 +24,9 @@ s32 uhf_ker_set_priority(int tsk, int priority) {
|
||||
return -5;
|
||||
}
|
||||
|
||||
if (st_uhs_ker_tsk_mng.entries[tsk - 1].unk_0x00 == NULL) {
|
||||
if (st_uhs_ker_tsk_mng.entries[tsk - 1].thread == NULL) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
return OSSetThreadPriority(st_uhs_ker_tsk_mng.entries[tsk - 1].unk_0x00, priority) ? 0 : -20;
|
||||
return OSSetThreadPriority(st_uhs_ker_tsk_mng.entries[tsk - 1].thread, priority) ? 0 : -20;
|
||||
}
|
||||
|
||||
@@ -20,7 +20,7 @@ typedef struct _usbKbdAsyncMem {
|
||||
u32 state; // 0x00
|
||||
void* kbd; // 0x04
|
||||
char modifiers; // 0x08
|
||||
u8 unk_0x09;
|
||||
u8 reserved; // 0x09
|
||||
u8 keys[6]; // 0x0A
|
||||
} usbKbdAsyncMem;
|
||||
|
||||
|
||||
@@ -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->unk_0x910) {
|
||||
if (!p->suppressDisconnect) {
|
||||
p->lastReportSendTime = __OSGetSystemTime();
|
||||
WPADiDisconnect(chan, FALSE);
|
||||
} else {
|
||||
@@ -1263,7 +1263,7 @@ static void __ClearControlBlock(s32 chan) {
|
||||
|
||||
p->lastControllerDataUpdate = __OSGetSystemTime();
|
||||
p->lastReportSendTime = __OSGetSystemTime();
|
||||
p->unk_0x910 = 0;
|
||||
p->suppressDisconnect = 0;
|
||||
p->unk_0x8C9 = 0;
|
||||
p->unk_0x8C4 = 0;
|
||||
p->wmReadDataPtr = NULL;
|
||||
@@ -1283,7 +1283,7 @@ static void __ClearControlBlock(s32 chan) {
|
||||
p->sleeping = TRUE;
|
||||
p->getInfoBusy = FALSE;
|
||||
p->getInfoCB = NULL;
|
||||
p->unk_0x98E = 0;
|
||||
p->continuous = 0;
|
||||
|
||||
memset(&p->wpInfo, 0, sizeof(p->wpInfo));
|
||||
memset(&p->wmReadDataBuf, 0, sizeof(p->wmReadDataBuf));
|
||||
@@ -1298,8 +1298,8 @@ static void __ClearControlBlock(s32 chan) {
|
||||
memset(&p->decryptXorTable, 0, sizeof(p->decryptXorTable));
|
||||
memset(&p->gameInfo, 0, sizeof(WPADGameInfo));
|
||||
|
||||
p->unk_0x38[0] = -1;
|
||||
p->unk_0x38[1] = -1;
|
||||
p->gameInfoStatus[0] = -1;
|
||||
p->gameInfoStatus[1] = -1;
|
||||
|
||||
p->stdCmdQueue.buffer = p->stdCmdQueueList;
|
||||
p->stdCmdQueue.capacity = ARRAY_LENGTH(p->stdCmdQueueList);
|
||||
@@ -1315,7 +1315,7 @@ static void __ClearControlBlock(s32 chan) {
|
||||
_wmb[chan].unk_0x04 = 0;
|
||||
_wmb[chan].unk_0x08 = 0;
|
||||
_wmb[chan].unk_0x0C = 0;
|
||||
_wmb[chan].unk_0x10 = NULL;
|
||||
_wmb[chan].callback = NULL;
|
||||
|
||||
_rumbleCnt[chan] = 0;
|
||||
}
|
||||
@@ -1551,7 +1551,7 @@ static void firmwareCheckCallback(s32 chan, s32 status) {
|
||||
|
||||
DEBUGPrint(" ==>this error means that the firmware is for NDEV %s\n", p->configIndex != 0 ? "2.0" : "2.1 or later");
|
||||
|
||||
WPADiSendSetReportType(&p->stdCmdQueue, WPAD_FMT_CORE_BTN, p->unk_0x98E, &abortConnCallback);
|
||||
WPADiSendSetReportType(&p->stdCmdQueue, WPAD_FMT_CORE_BTN, p->continuous, &abortConnCallback);
|
||||
|
||||
WPADiSendDPDCSB(&p->stdCmdQueue, FALSE, &abortConnCallback);
|
||||
WPADiSendSetPort(&p->stdCmdQueue, port, &abortConnCallback);
|
||||
@@ -1626,7 +1626,7 @@ static void WPADiConnCallback(WUDDevInfo* devInfo, u8 open) {
|
||||
p->status = WPAD_ERR_OK;
|
||||
p->radioSensitivity = 100;
|
||||
p->sleeping = FALSE;
|
||||
p->unk_0x98D = FALSE;
|
||||
p->encStatus = FALSE;
|
||||
|
||||
WPADiSendReadData(&p->stdCmdQueue, p->wmReadDataBuf, 1, WM_ADDR_MEM_1770, firmwareCheckCallback);
|
||||
|
||||
@@ -1643,8 +1643,8 @@ static void WPADiConnCallback(WUDDevInfo* devInfo, u8 open) {
|
||||
|
||||
if (p->cmdBlkCB != NULL) {
|
||||
p->cmdBlkCB(chan, WPAD_ERR_NO_CONTROLLER);
|
||||
} else if (_wmb[chan].unk_0x10 != NULL) {
|
||||
_wmb[chan].unk_0x10(chan, WPAD_ERR_NO_CONTROLLER);
|
||||
} else if (_wmb[chan].callback != NULL) {
|
||||
_wmb[chan].callback(chan, WPAD_ERR_NO_CONTROLLER);
|
||||
}
|
||||
|
||||
do {
|
||||
@@ -1886,7 +1886,7 @@ s32 WPADSetDataFormat(s32 chan, u32 format) {
|
||||
}
|
||||
|
||||
if (currFormat != format) {
|
||||
if (!WPADiSendSetReportType(&p->stdCmdQueue, format, p->unk_0x98E, NULL)) {
|
||||
if (!WPADiSendSetReportType(&p->stdCmdQueue, format, p->continuous, NULL)) {
|
||||
status = WPAD_ERR_COMMUNICATION_ERROR;
|
||||
} else {
|
||||
enabled = OSDisableInterrupts();
|
||||
@@ -2692,7 +2692,7 @@ static void __SendData(s32 chan, WPADCommand command) {
|
||||
u32 time;
|
||||
memcpy(&time, command.dataBuf, sizeof(u32));
|
||||
p->lastReportSendTime = __OSGetSystemTime() + time;
|
||||
p->unk_0x910 = 1;
|
||||
p->suppressDisconnect = 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->unk_0x910 = 0;
|
||||
p->suppressDisconnect = 0;
|
||||
|
||||
OSRestoreInterrupts(enabled);
|
||||
}
|
||||
@@ -2741,13 +2741,13 @@ BOOL WPADiSendSetPort(WPADCommandQueue* pQueue, u8 port, WPADCallback pCallback)
|
||||
return success;
|
||||
}
|
||||
|
||||
BOOL WPADiSendSetReportType(WPADCommandQueue* pQueue, s32 format, BOOL unk, WPADCallback pCallback) {
|
||||
BOOL WPADiSendSetReportType(WPADCommandQueue* pQueue, s32 format, BOOL continuous, WPADCallback pCallback) {
|
||||
BOOL success;
|
||||
WPADCommand command;
|
||||
|
||||
command.reportID = RPTID_SET_DATA_REPORT_MODE;
|
||||
command.dataLength = RPT12_SIZE;
|
||||
command.dataBuf[RPT12_CONT_REPORT] = unk ? 0 : 4; // Always continuous reporting
|
||||
command.dataBuf[RPT12_CONT_REPORT] = continuous ? 0 : 4; // Always continuous reporting
|
||||
command.cmdCB = pCallback;
|
||||
|
||||
switch (format) {
|
||||
|
||||
@@ -111,8 +111,8 @@ static void initExtension(s32 chan) {
|
||||
|
||||
WPADiClearQueue(&p_wpd->extCmdQueue);
|
||||
WPADiSendSetReportType(&p_wpd->extCmdQueue, p_wpd->dataFormat,
|
||||
p_wpd->unk_0x98E, abortInitExtension);
|
||||
p_wpd->unk_0x98D = 1;
|
||||
p_wpd->continuous, abortInitExtension);
|
||||
p_wpd->encStatus = 1;
|
||||
WPADiSendWriteDataCmd(&p_wpd->extCmdQueue, 0x55, 0x04a400f0,
|
||||
abortInitExtension);
|
||||
WPADiSendWriteDataCmd(&p_wpd->extCmdQueue, 0, 0x04a400fb,
|
||||
@@ -127,7 +127,7 @@ static void abortInitExtension(s32 chan, s32 result) {
|
||||
|
||||
if (result != WPAD_ERR_NONE) {
|
||||
WPADiClearQueue(&p_wpd->extCmdQueue);
|
||||
p_wpd->unk_0x98D = 0;
|
||||
p_wpd->encStatus = 0;
|
||||
if (result == WPAD_ERR_NO_CONTROLLER) {
|
||||
type = WPAD_DEV_NOT_FOUND;
|
||||
}
|
||||
@@ -142,7 +142,7 @@ static void abortInitExtension(s32 chan, s32 result) {
|
||||
|
||||
else {
|
||||
DEBUGPrint("detaching extension during initialization.\n");
|
||||
WPADiSendSetReportType(&p_wpd->extCmdQueue, p_wpd->dataFormat, p_wpd->unk_0x98E, NULL);
|
||||
WPADiSendSetReportType(&p_wpd->extCmdQueue, p_wpd->dataFormat, p_wpd->continuous, NULL);
|
||||
return;
|
||||
}
|
||||
p_wpd->devType = (u8)type;
|
||||
@@ -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.unk_0x04 = (s8)p_buf[index + 8];
|
||||
p_wpd->extConfig.u.fs.unk_0x02 = (s8)p_buf[index + 9];
|
||||
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.stickXCenter = (s8)p_buf[index + 10];
|
||||
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.stickYMax = (s8)p_buf[index + 11];
|
||||
p_wpd->extConfig.u.fs.stickYMin = (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.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);
|
||||
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);
|
||||
}
|
||||
break;
|
||||
|
||||
case WPAD_DEV_CLASSIC:
|
||||
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.lStickXMax = (s8)p_buf[index + 0];
|
||||
p_wpd->extConfig.u.cl.lStickXMin = (s8)p_buf[index + 1];
|
||||
p_wpd->extConfig.u.cl.lStickXCenter = (s8)p_buf[index + 2];
|
||||
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.lStickYMax = (s8)p_buf[index + 3];
|
||||
p_wpd->extConfig.u.cl.lStickYMin = (s8)p_buf[index + 4];
|
||||
p_wpd->extConfig.u.cl.lStickYCenter = (s8)p_buf[index + 5];
|
||||
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.rStickXMax = (s8)p_buf[index + 6];
|
||||
p_wpd->extConfig.u.cl.rStickXMin = (s8)p_buf[index + 7];
|
||||
p_wpd->extConfig.u.cl.rStickXCenter = (s8)p_buf[index + 8];
|
||||
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.rStickYMax = (s8)p_buf[index + 9];
|
||||
p_wpd->extConfig.u.cl.rStickYMin = (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.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("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("LR: L = %d, R = %d\n", p_wpd->extConfig.u.cl.triggerLZero, p_wpd->extConfig.u.cl.triggerRZero);
|
||||
break;
|
||||
}
|
||||
@@ -509,7 +509,7 @@ static void getExtType(s32 chan, s32 result) {
|
||||
}
|
||||
} else {
|
||||
if (isExtEncMain(_devType[chan])) {
|
||||
p_wpd->unk_0x98D = 2;
|
||||
p_wpd->encStatus = 2;
|
||||
WPADiSendWriteDataCmd(cmdq, 0xAA, 0x4A400F0, abortInitExtension);
|
||||
WPADiCreateKey(chan);
|
||||
WPADiSendWriteData(cmdq, p_wpd->encryptionKey, 6, 0x4A40040, abortInitExtension);
|
||||
@@ -517,7 +517,7 @@ static void getExtType(s32 chan, s32 result) {
|
||||
WPADiSendWriteData(cmdq, p_wpd->encryptionKey + 12, 4, 0x4A4004C, abortInitExtension);
|
||||
WPADiSendReadData(cmdq, p_wpd->wmReadDataBuf, 32, 0x4A40020, p_wpd->extensionCB);
|
||||
} else {
|
||||
p_wpd->unk_0x98D = 3;
|
||||
p_wpd->encStatus = 3;
|
||||
WPADiSendWriteDataCmd(cmdq, 0xAA, 0x4A400F0, abortInitExtension);
|
||||
WPADiCreateKeyFor3rd(chan);
|
||||
WPADiSendWriteData(cmdq, p_wpd->encryptionKey, 6, 0x4A40040, abortInitExtension);
|
||||
@@ -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->unk_0x38[index] = WPAD_ERR_NONE;
|
||||
p_wpd->gameInfoStatus[index] = WPAD_ERR_NONE;
|
||||
} else {
|
||||
p_wpd->unk_0x38[index] = WPAD_ERR_INVALID;
|
||||
p_wpd->gameInfoStatus[index] = WPAD_ERR_INVALID;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -651,7 +651,7 @@ void __a1_20_status_report(u8 chan, u8* data) {
|
||||
p_wpd->devMode = 0;
|
||||
|
||||
WPADiClearQueue(&p_wpd->extCmdQueue);
|
||||
WPADiSendSetReportType(&p_wpd->extCmdQueue, p_wpd->dataFormat, p_wpd->unk_0x98E, NULL);
|
||||
WPADiSendSetReportType(&p_wpd->extCmdQueue, p_wpd->dataFormat, p_wpd->continuous, NULL);
|
||||
|
||||
if (attach) {
|
||||
if (p_wpd->extensionCB) {
|
||||
@@ -741,11 +741,11 @@ void __a1_21_user_data(u8 chan, u8* data) {
|
||||
DEBUGPrint("length : %d\n", p_wpd->wmReadLength);
|
||||
status = (p_wpd->wmReadHadError < 0) ? WPAD_ERR_TRANSFER : 0;
|
||||
DEBUGPrint("i2c = %04x\n", i2c);
|
||||
DEBUGPrint("enc = %d\n", p_wpd->unk_0x98D);
|
||||
DEBUGPrint("enc = %d\n", p_wpd->encStatus);
|
||||
|
||||
if (i2c == 0x04a4) {
|
||||
DEBUGPrint("Access to extension register.\n");
|
||||
if (p_wpd->unk_0x98D == 2 || p_wpd->unk_0x98D == 3) {
|
||||
if (p_wpd->encStatus == 2 || p_wpd->encStatus == 3) {
|
||||
DEBUGPrint("Decode!!!!\n");
|
||||
DEBUGPrint(" len = %d, addr = %04x\n", len, base);
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@ typedef struct _CDBRecordFile {
|
||||
#else
|
||||
u8 unk_0x00[0x1C - 0x00];
|
||||
#endif
|
||||
int unk_0x1C;
|
||||
int allocFlag; // 0x1C
|
||||
CDBAttr attr; // 0x20
|
||||
CDBBridgeFile bridgeFile; // 0x42C
|
||||
u8 unk_0x434[0x438 - 0x434];
|
||||
|
||||
@@ -17,9 +17,9 @@ typedef struct NWC24FLHeader {
|
||||
u32 version; // 0x04
|
||||
u32 infoCount; // 0x08
|
||||
u32 registeredCount; // 0x0C
|
||||
u32 unk_0x10[4];
|
||||
u32 unk_0x20[7];
|
||||
u32 unk_0x3C;
|
||||
u32 confirmedBits[4]; // 0x10
|
||||
u32 pad_0x20[7]; // unused
|
||||
u32 listFlags; // 0x3C
|
||||
NWC24UserId friendIds[NWC24_FRIEND_INFO_MAX]; // 0x40
|
||||
} NWC24FLHeader;
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@ typedef struct NWC24MsgObjPrivate {
|
||||
#ifdef NWC24_MSG_READ
|
||||
u32 headerSize;
|
||||
#elif defined(NWC24_MBOX_CTRL) || defined(NWC24_MSG_COMMIT)
|
||||
u32 unk_0x10;
|
||||
u32 headerSize; // 0x10
|
||||
#else
|
||||
u8 unk_0x10[0x4];
|
||||
#endif
|
||||
@@ -46,8 +46,8 @@ typedef struct NWC24MsgObjPrivate {
|
||||
#endif
|
||||
u32 date; // 0x28
|
||||
u32 receivedDate; // 0x2C
|
||||
NWC24Data unk_0x30;
|
||||
NWC24Data unk_0x38;
|
||||
NWC24Data fromData; // 0x30
|
||||
NWC24Data toData; // 0x38
|
||||
NWC24Data subject; // 0x40
|
||||
NWC24Data text; // 0x48
|
||||
NWC24Data unk_0x50;
|
||||
@@ -73,15 +73,15 @@ typedef struct NWC24MsgObjPrivate {
|
||||
};
|
||||
u32 raw;
|
||||
} msgBoardFlags; // 0xCC
|
||||
NWC24Data unk_0xD0;
|
||||
NWC24Data extraData; // 0xD0
|
||||
NWC24Data faceData; // 0xD8
|
||||
NWC24Data altName; // 0xE0
|
||||
u32 textSize; // 0xE4
|
||||
u32 dwcId; // 0xEC
|
||||
u32 iconNew; // 0xF0
|
||||
u32 unk_0xF4;
|
||||
u32 unk_0xF8;
|
||||
u32 unk_0xFC;
|
||||
u32 pad_0xF4;
|
||||
u32 pad_0xF8;
|
||||
u32 pad_0xFC;
|
||||
} NWC24MsgObjPrivate;
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
@@ -26,9 +26,9 @@ extern struct NWC24Work {
|
||||
|
||||
u8 configData[1024]; // 0x1300
|
||||
|
||||
u8 unk_0x1700[128]; // 0x1700
|
||||
u8 unk_0x1780[128]; // 0x1780
|
||||
u8 unk_0x1800[256]; // 0x1800
|
||||
u8 sendMbcHeader[128]; // 0x1700
|
||||
u8 recvMbcHeader[128]; // 0x1780
|
||||
u8 mbcEntry[256]; // 0x1800
|
||||
u8 base64Work[256]; // 0x1900
|
||||
u8 unk_0x1A00[4096]; // 0x1A00
|
||||
|
||||
|
||||
@@ -62,7 +62,7 @@ typedef struct _CDBRecordKey {
|
||||
} CDBRecordKey;
|
||||
|
||||
typedef struct _CDBRecord {
|
||||
u32 unk_0x00;
|
||||
u32 database; // 0x00
|
||||
void* cryptBuf; // 0x04
|
||||
CDBRecordKey key; // 0x08
|
||||
void* file; // 0x38
|
||||
|
||||
@@ -57,8 +57,8 @@ void CDBRecordInstanceInit(CDBRecordFile* recordFile, CDBRecord* record, int typ
|
||||
OSLockMutex((OSMutex*)recordFile);
|
||||
recordFile->used = 1;
|
||||
OSUnlockMutex((OSMutex*)recordFile);
|
||||
recordFile->unk_0x1C = type;
|
||||
recordFile->database = record->unk_0x00;
|
||||
recordFile->allocFlag = type;
|
||||
recordFile->database = record->database;
|
||||
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->unk_0x00 = (u32)database;
|
||||
record->database = (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->unk_0x00 = (u32)database;
|
||||
record->database = (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->unk_0x00;
|
||||
database = (CDBDatabase*)record->database;
|
||||
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->unk_0x00;
|
||||
database = (CDBDatabase*)record->database;
|
||||
instance = database->instance;
|
||||
recordFile = record->file;
|
||||
if (record->key.location == CDB_FS_LOCATION_SD) {
|
||||
@@ -310,7 +310,7 @@ CDBErr CDBRecordWrite_(CDBRecord* record, void* buffer, u32 size) {
|
||||
CDBReportError("can't write data in the record; the record is closed\n");
|
||||
return CDB_ERROR_27;
|
||||
}
|
||||
if ((recordFile->unk_0x1C & 2) == 0) {
|
||||
if ((recordFile->allocFlag & 2) == 0) {
|
||||
CDBReportError("can't write data in the record; the record is opened as READONLY\n");
|
||||
return CDB_ERROR_27;
|
||||
}
|
||||
@@ -508,7 +508,7 @@ CDBErr CDBRecordUpdateModifiedDate(CDBRecord* record) {
|
||||
ticks = OSGetTime();
|
||||
modifiedDate = ticks / (OS_BUS_CLOCK / 4);
|
||||
recordFile = record->file;
|
||||
if ((((CDBRecordDatabaseState*)((CDBDatabase*)record->unk_0x00)->instance)->openFlags & 2) == 0) {
|
||||
if ((((CDBRecordDatabaseState*)((CDBDatabase*)record->database)->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.unk_0x00 = record->unk_0x00;
|
||||
localRecord.database = record->database;
|
||||
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->unk_0x00 = localRecord.unk_0x00;
|
||||
record->database = localRecord.database;
|
||||
record->file = localRecord.file;
|
||||
record->cryptBuf = localRecord.cryptBuf;
|
||||
CDBRecordKeyCopy(&recordFile->key, &localRecord.key);
|
||||
@@ -687,7 +687,7 @@ CDBErr CDBRecordEncrypt(CDBRecord* record, void* buffer, CDBRecordKey* key, u32
|
||||
if ((s32)recordFile == 0) {
|
||||
return CDB_ERROR_27;
|
||||
}
|
||||
if (recordFile->unk_0x1C == 1) {
|
||||
if (recordFile->allocFlag == 1) {
|
||||
return CDB_ERROR_26;
|
||||
}
|
||||
if ((s32)buffer == 0) {
|
||||
@@ -699,7 +699,7 @@ CDBErr CDBRecordEncrypt(CDBRecord* record, void* buffer, CDBRecordKey* key, u32
|
||||
tempFile = record->file;
|
||||
if ((s32)tempFile == 0) {
|
||||
result = CDB_ERROR_27;
|
||||
} else if (tempFile->unk_0x1C == 1) {
|
||||
} else if (tempFile->allocFlag == 1) {
|
||||
result = CDB_ERROR_26;
|
||||
} else {
|
||||
CDBAttrSetWiiId(&tempFile->attr, CDBGetWiiId());
|
||||
@@ -713,7 +713,7 @@ CDBErr CDBRecordEncrypt(CDBRecord* record, void* buffer, CDBRecordKey* key, u32
|
||||
CDBErr result;
|
||||
if ((s32)record->file == 0) {
|
||||
result = CDB_ERROR_27;
|
||||
} else if (((CDBRecordFile*)record->file)->unk_0x1C == 1) {
|
||||
} else if (((CDBRecordFile*)record->file)->allocFlag == 1) {
|
||||
result = CDB_ERROR_26;
|
||||
} else {
|
||||
CDBAttrInitIV(&((CDBRecordFile*)record->file)->attr);
|
||||
@@ -727,7 +727,7 @@ CDBErr CDBRecordEncrypt(CDBRecord* record, void* buffer, CDBRecordKey* key, u32
|
||||
CDBErr result;
|
||||
if ((s32)record->file == 0) {
|
||||
result = CDB_ERROR_27;
|
||||
} else if (((CDBRecordFile*)record->file)->unk_0x1C == 1) {
|
||||
} else if (((CDBRecordFile*)record->file)->allocFlag == 1) {
|
||||
result = CDB_ERROR_26;
|
||||
} else {
|
||||
CDBAttrSetKeyStr(&((CDBRecordFile*)record->file)->attr, key);
|
||||
|
||||
@@ -265,7 +265,7 @@ CDBErr CDBRecordFree(CDBRecord* record) {
|
||||
OSLockMutex((OSMutex*)recordFile);
|
||||
*(u32*)&recordFile->unk_0x00[0x18] = 0;
|
||||
OSUnlockMutex((OSMutex*)recordFile);
|
||||
recordFile->unk_0x1C = 0;
|
||||
recordFile->allocFlag = 0;
|
||||
record->file = NULL;
|
||||
OSUnlockMutex(&s_mutex);
|
||||
}
|
||||
|
||||
@@ -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 GetUnkFlag(u32 index) {
|
||||
static u32 GetConfirmedBit(u32 index) {
|
||||
NWC24Err result;
|
||||
NWC24FLHeader* header;
|
||||
u32 data;
|
||||
@@ -37,11 +37,11 @@ static u32 GetUnkFlag(u32 index) {
|
||||
return result;
|
||||
}
|
||||
|
||||
data = header->unk_0x10[index >> 5] >> (index & 0x1f) & 1;
|
||||
data = header->confirmedBits[index >> 5] >> (index & 0x1f) & 1;
|
||||
return (NWC24Err)data;
|
||||
}
|
||||
|
||||
static NWC24Err SetUnkFlag(u32 index, int flag) {
|
||||
static NWC24Err SetConfirmedBit(u32 index, int flag) {
|
||||
NWC24Err result;
|
||||
NWC24FLHeader* header;
|
||||
|
||||
@@ -50,11 +50,11 @@ static NWC24Err SetUnkFlag(u32 index, int flag) {
|
||||
return result;
|
||||
}
|
||||
|
||||
header->unk_0x10[index >> 5] = ~(1 << (index & 0x1f)) & header->unk_0x10[index >> 5] | flag << (index & 0x1f);
|
||||
header->confirmedBits[index >> 5] = ~(1 << (index & 0x1f)) & header->confirmedBits[index >> 5] | flag << (index & 0x1f);
|
||||
return NWC24_OK;
|
||||
}
|
||||
|
||||
static NWC24Err SetUnkFlag2(int flag) {
|
||||
static NWC24Err SetListFlag(int flag) {
|
||||
NWC24Err result;
|
||||
NWC24FLHeader* header;
|
||||
|
||||
@@ -63,7 +63,7 @@ static NWC24Err SetUnkFlag2(int flag) {
|
||||
return result;
|
||||
}
|
||||
|
||||
header->unk_0x3C |= flag;
|
||||
header->listFlags |= 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 = GetUnkFlag(index);
|
||||
result = GetConfirmedBit(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;
|
||||
}
|
||||
|
||||
SetUnkFlag2(1);
|
||||
SetListFlag(1);
|
||||
|
||||
result = SetUnkFlag(index, 0);
|
||||
result = SetConfirmedBit(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 = SetUnkFlag(index, 0);
|
||||
result = SetConfirmedBit(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 friendUnkFlag1;
|
||||
int friendUnkFlag2;
|
||||
int confirmedBit1;
|
||||
int confirmedBit2;
|
||||
|
||||
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
|
||||
friendUnkFlag1 = GetUnkFlag(index1);
|
||||
friendUnkFlag2 = GetUnkFlag(index2);
|
||||
SetUnkFlag(index1, friendUnkFlag2);
|
||||
SetUnkFlag(index2, friendUnkFlag1);
|
||||
confirmedBit1 = GetConfirmedBit(index1);
|
||||
confirmedBit2 = GetConfirmedBit(index2);
|
||||
SetConfirmedBit(index1, confirmedBit2);
|
||||
SetConfirmedBit(index2, confirmedBit1);
|
||||
|
||||
// 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->unk_0x10[0] = 0;
|
||||
header->unk_0x10[1] = 0;
|
||||
header->unk_0x10[2] = 0;
|
||||
header->unk_0x10[3] = 0;
|
||||
header->confirmedBits[0] = 0;
|
||||
header->confirmedBits[1] = 0;
|
||||
header->confirmedBits[2] = 0;
|
||||
header->confirmedBits[3] = 0;
|
||||
|
||||
result = NWC24FOpen(&file, FLFilePath, NWC24_OPEN_WRITE);
|
||||
if (result != NWC24_OK) {
|
||||
|
||||
@@ -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->unk_0x1800;
|
||||
entry = (MBCEntry*)NWC24WorkP->mbcEntry;
|
||||
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->unk_0x1800;
|
||||
entry = (MBCEntry*)NWC24WorkP->mbcEntry;
|
||||
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->unk_0x1700, 0, 128);
|
||||
Mail_memset(NWC24WorkP->sendMbcHeader, 0, 128);
|
||||
err = GetCachedMBCHeader(NWC24_MBOX_TYPE_SEND, &header);
|
||||
if (err != NWC24_OK)
|
||||
return err;
|
||||
Mail_memset(NWC24WorkP->unk_0x1780, 0, 128);
|
||||
Mail_memset(NWC24WorkP->recvMbcHeader, 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->unk_0x1700, 0, 128);
|
||||
Mail_memset(NWC24WorkP->sendMbcHeader, 0, 128);
|
||||
sendResult = CreateCtrlFile(NWC24_MBOX_TYPE_SEND, FALSE);
|
||||
if (sendResult < 0)
|
||||
return sendResult;
|
||||
Mail_memset(NWC24WorkP->unk_0x1780, 0, 128);
|
||||
Mail_memset(NWC24WorkP->recvMbcHeader, 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->unk_0x1800;
|
||||
entry = (MBCEntry*)NWC24WorkP->mbcEntry;
|
||||
if (type == NWC24_MBOX_TYPE_SEND)
|
||||
header = (MBCHeader*)NWC24WorkP->unk_0x1700;
|
||||
header = (MBCHeader*)NWC24WorkP->sendMbcHeader;
|
||||
else if (type == NWC24_MBOX_TYPE_RECV)
|
||||
header = (MBCHeader*)NWC24WorkP->unk_0x1780;
|
||||
header = (MBCHeader*)NWC24WorkP->recvMbcHeader;
|
||||
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->unk_0x1800;
|
||||
entry = (MBCEntry*)NWC24WorkP->mbcEntry;
|
||||
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->unk_0x1800;
|
||||
entry = (MBCEntry*)NWC24WorkP->mbcEntry;
|
||||
for (offset = 128; offset < header->fileSize; offset += 128) {
|
||||
if (count >= header->numMessages)
|
||||
break;
|
||||
@@ -783,7 +783,7 @@ static NWC24Err DuplicationCheck(MBCHeader* header, const NWC24MsgObjPrivate* ms
|
||||
continue;
|
||||
}
|
||||
if (msg->unk_0x1C != 0 && entry->crc == msg->unk_0x1C && entry->type == msg->type && entry->length == msg->length &&
|
||||
entry->flags == msg->unk_0x10 && (s32)entry->date == (s32)msg->date) {
|
||||
entry->flags == msg->headerSize && (s32)entry->date == (s32)msg->date) {
|
||||
duplicateId = entry->msgId;
|
||||
duplicateOffset = offset;
|
||||
continue;
|
||||
@@ -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->unk_0x1700;
|
||||
*header = (MBCHeader*)NWC24WorkP->sendMbcHeader;
|
||||
else if (type == NWC24_MBOX_TYPE_RECV)
|
||||
*header = (MBCHeader*)NWC24WorkP->unk_0x1780;
|
||||
*header = (MBCHeader*)NWC24WorkP->recvMbcHeader;
|
||||
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->unk_0x1800;
|
||||
MBCEntry* entry = (MBCEntry*)NWC24WorkP->mbcEntry;
|
||||
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->unk_0x1800;
|
||||
MBCEntry* entry = (MBCEntry*)NWC24WorkP->mbcEntry;
|
||||
NWC24Err err = NWC24FSeek(file, offset, NWC24_SEEK_BEG);
|
||||
if (err != NWC24_OK)
|
||||
return err;
|
||||
@@ -947,8 +947,8 @@ static NWC24Err MountVFMBox(NWC24MBoxType type) {
|
||||
}
|
||||
|
||||
static NWC24Err CopyMsgObjToMBCFmt(const NWC24MsgObjPrivate* msg, MBCEntry* entry) {
|
||||
u32 field1 = ((u32)msg->unk_0x30.ptr & 0xFFFFF) | (msg->unk_0x30.size << 20);
|
||||
u32 field2 = ((u32)msg->unk_0x38.ptr & 0xFFFFF) | (msg->unk_0x38.size << 20);
|
||||
u32 field1 = ((u32)msg->fromData.ptr & 0xFFFFF) | (msg->fromData.size << 20);
|
||||
u32 field2 = ((u32)msg->toData.ptr & 0xFFFFF) | (msg->toData.size << 20);
|
||||
u32 field3 = ((u32)msg->subject.ptr & 0xFFFFF) | (msg->subject.size << 20);
|
||||
u32 field4 = ((u32)msg->unk_0x50.ptr & 0xFFFFF) | (msg->unk_0x50.size << 20);
|
||||
u32 field5 = ((u32)msg->unk_0x58.ptr & 0xFFFFF) | (msg->unk_0x58.size << 20);
|
||||
@@ -956,7 +956,7 @@ static NWC24Err CopyMsgObjToMBCFmt(const NWC24MsgObjPrivate* msg, MBCEntry* entr
|
||||
entry->type = msg->type;
|
||||
entry->length = msg->length;
|
||||
entry->appId = msg->appId;
|
||||
entry->flags = msg->unk_0x10;
|
||||
entry->flags = msg->headerSize;
|
||||
entry->tag = msg->tag;
|
||||
entry->ledPattern = msg->ledPattern;
|
||||
entry->crc = msg->unk_0x1C;
|
||||
@@ -1003,7 +1003,7 @@ static NWC24Err CopyMsgObjToPrvFmt(const MBCEntry* entry, NWC24MsgObjPrivate* ms
|
||||
msg->type = entry->type;
|
||||
msg->length = entry->length;
|
||||
msg->appId = entry->appId;
|
||||
msg->unk_0x10 = entry->flags;
|
||||
msg->headerSize = entry->flags;
|
||||
msg->tag = entry->tag;
|
||||
msg->ledPattern = entry->ledPattern;
|
||||
msg->unk_0x1C = entry->crc;
|
||||
@@ -1019,10 +1019,10 @@ static NWC24Err CopyMsgObjToPrvFmt(const MBCEntry* entry, NWC24MsgObjPrivate* ms
|
||||
msg->textSize = entry->textSize;
|
||||
msg->dwcId = entry->dwcId;
|
||||
msg->iconNew = entry->iconNew;
|
||||
msg->unk_0x30.ptr = (void*)offset1;
|
||||
msg->unk_0x30.size = size1;
|
||||
msg->unk_0x38.ptr = (void*)offset2;
|
||||
msg->unk_0x38.size = size2;
|
||||
msg->fromData.ptr = (void*)offset1;
|
||||
msg->fromData.size = size1;
|
||||
msg->toData.ptr = (void*)offset2;
|
||||
msg->toData.size = size2;
|
||||
msg->subject.ptr = (void*)offset3;
|
||||
msg->subject.size = size3;
|
||||
msg->unk_0x50.ptr = (void*)offset4;
|
||||
|
||||
@@ -243,11 +243,11 @@ static inline NWC24Err WriteMBDelayField(NWC24MsgObjPrivate* msg) {
|
||||
|
||||
static inline NWC24Err WriteExtraFields(NWC24MsgObjPrivate* msg) {
|
||||
NWC24Err err;
|
||||
if (msg->unk_0xD0.size == 0)
|
||||
if (msg->extraData.size == 0)
|
||||
return NWC24_OK;
|
||||
err = NWC24FWrite(msg->unk_0xD0.ptr, msg->unk_0xD0.size, m_pFile);
|
||||
err = NWC24FWrite(msg->extraData.ptr, msg->extraData.size, m_pFile);
|
||||
if (err == NWC24_OK)
|
||||
msg->length += msg->unk_0xD0.size;
|
||||
msg->length += msg->extraData.size;
|
||||
return err;
|
||||
}
|
||||
|
||||
@@ -330,7 +330,7 @@ static NWC24Err NWC24CommitMsgInternal(NWC24MsgObjPrivate* msg, NWC24MBoxType ty
|
||||
}
|
||||
CHECK_WRITE(WriteString(msg, buffer));
|
||||
if (msg->type & 0x10000) {
|
||||
msg->unk_0x10 = msg->length;
|
||||
msg->headerSize = msg->length;
|
||||
buffer = NWC24WorkP->stringWork;
|
||||
Mail_memset(buffer, 0, 1024);
|
||||
Mail_sprintf(buffer, "\r\n--%s", MultiPartDivider);
|
||||
@@ -339,7 +339,7 @@ static NWC24Err NWC24CommitMsgInternal(NWC24MsgObjPrivate* msg, NWC24MBoxType ty
|
||||
}
|
||||
CHECK_WRITE(WriteContentTypeField(msg));
|
||||
if (!(msg->type & 0x10000))
|
||||
msg->unk_0x10 = msg->length;
|
||||
msg->headerSize = msg->length;
|
||||
text.ptr = (const void*)msg->length;
|
||||
{ NWC24Err textResult = WritePlainText(msg);
|
||||
err = textResult == NWC24_ERR_NULL ? NWC24_OK : textResult; }
|
||||
@@ -577,7 +577,7 @@ static NWC24Err WriteFromField(NWC24MsgObjPrivate* msg) {
|
||||
Mail_memset(buffer, 0, 1024);
|
||||
Mail_strncat(buffer, "From: ", 1022);
|
||||
address = buffer + 6;
|
||||
msg->unk_0x30.ptr = (const void*)(msg->length + 6);
|
||||
msg->fromData.ptr = (const void*)(msg->length + 6);
|
||||
type = 1;
|
||||
if (msg->type & 0x100000)
|
||||
type = 2;
|
||||
@@ -596,7 +596,7 @@ static NWC24Err WriteFromField(NWC24MsgObjPrivate* msg) {
|
||||
err = NWC24FWrite(NWC24WorkP->stringWork, total, m_pFile);
|
||||
if (err == NWC24_OK) {
|
||||
msg->length += total;
|
||||
msg->unk_0x30.size = msg->length - (u32)msg->unk_0x30.ptr - 2;
|
||||
msg->fromData.size = msg->length - (u32)msg->fromData.ptr - 2;
|
||||
}
|
||||
}
|
||||
return err;
|
||||
@@ -612,7 +612,7 @@ static NWC24Err WriteToField(NWC24MsgObjPrivate* msg) {
|
||||
cursor += 4;
|
||||
index = 0;
|
||||
total = 4;
|
||||
msg->unk_0x38.ptr = (const void*)(msg->length + 4);
|
||||
msg->toData.ptr = (const void*)(msg->length + 4);
|
||||
remaining = 1018;
|
||||
for (; index < msg->numTo; ++index) {
|
||||
err = SynthesizeAddrStr(&msg->toAddrs[index], msg->type, cursor, remaining, &length);
|
||||
@@ -641,7 +641,7 @@ static NWC24Err WriteToField(NWC24MsgObjPrivate* msg) {
|
||||
err = NWC24FWrite(NWC24WorkP->stringWork, total + 2, m_pFile);
|
||||
if (err == NWC24_OK) {
|
||||
msg->length += total + 2;
|
||||
msg->unk_0x38.size = msg->length - (u32)msg->unk_0x38.ptr - 2;
|
||||
msg->toData.size = msg->length - (u32)msg->toData.ptr - 2;
|
||||
}
|
||||
}
|
||||
return err;
|
||||
|
||||
@@ -73,11 +73,11 @@ NWC24Err NWC24InitMsgObj(NWC24MsgObj* msg, NWC24MsgType type) {
|
||||
msgObj->attachedType[i] = NWC24_TEXT_PLAIN;
|
||||
}
|
||||
|
||||
NWC24Data_Init(&msgObj->unk_0x30);
|
||||
NWC24Data_Init(&msgObj->unk_0x38);
|
||||
NWC24Data_Init(&msgObj->fromData);
|
||||
NWC24Data_Init(&msgObj->toData);
|
||||
NWC24Data_Init(&msgObj->unk_0x50);
|
||||
NWC24Data_Init(&msgObj->unk_0x58);
|
||||
NWC24Data_Init(&msgObj->unk_0xD0);
|
||||
NWC24Data_Init(&msgObj->extraData);
|
||||
NWC24Data_Init(&msgObj->faceData);
|
||||
NWC24Data_Init(&msgObj->altName);
|
||||
|
||||
|
||||
@@ -289,7 +289,7 @@ NWC24Err NWC24ReadMsgFromAddr(const NWC24MsgObj* msg, char* address, u32 capacit
|
||||
default:
|
||||
return result;
|
||||
}
|
||||
if (privateMsg->unk_0x30.size == 0)
|
||||
if (privateMsg->fromData.size == 0)
|
||||
return NWC24_ERR_NULL;
|
||||
result = NWC24iMBoxOpenStoredMsg(type, privateMsg->msgId, &file);
|
||||
switch (result) {
|
||||
@@ -300,9 +300,9 @@ NWC24Err NWC24ReadMsgFromAddr(const NWC24MsgObj* msg, char* address, u32 capacit
|
||||
}
|
||||
result = NWC24FStreamInit(&stream, &file, 0, privateMsg->length, buffer, 1024);
|
||||
if (result == NWC24_OK) {
|
||||
result = NWC24FStreamSeek(&stream, (u32)privateMsg->unk_0x30.ptr);
|
||||
result = NWC24FStreamSeek(&stream, (u32)privateMsg->fromData.ptr);
|
||||
if (result == NWC24_OK)
|
||||
result = NWC24iExtractAddrSpec(&stream, privateMsg->unk_0x30.size, 0, address, capacity);
|
||||
result = NWC24iExtractAddrSpec(&stream, privateMsg->fromData.size, 0, address, capacity);
|
||||
}
|
||||
closeResult = NWC24iMBoxCloseMsg(&file);
|
||||
if (result != NWC24_OK)
|
||||
|
||||
@@ -930,13 +930,13 @@ namespace ipl {
|
||||
math::VEC3 translate(mpLayout->FindPaneByName("N_Memo")->GetTranslate());
|
||||
|
||||
mURLProc.clear_prev_drawing();
|
||||
mURLProc.setUnk_0x44(translate.y);
|
||||
mURLProc.setMemoTranslateY(translate.y);
|
||||
|
||||
bool result = false;
|
||||
if (mState == STATE_NORMAL && mScroller.is_busy() == FALSE) {
|
||||
result = true;
|
||||
}
|
||||
mURLProc.setUnk_0x53(result);
|
||||
mURLProc.setFocusEnabled(result);
|
||||
|
||||
if (translate.y < 500.0f) {
|
||||
mpLayout->draw("N_Header");
|
||||
@@ -983,8 +983,8 @@ namespace ipl {
|
||||
mpLayout->draw("ReplyMask");
|
||||
}
|
||||
|
||||
if (!mURLProc.getUnk_0x50()) {
|
||||
mURLProc.setUnk_0x50(1);
|
||||
if (!mURLProc.getColorPass()) {
|
||||
mURLProc.setColorPass(1);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1512,7 +1512,7 @@ namespace ipl {
|
||||
mURLProc.init();
|
||||
|
||||
if (mpBoardObj->mLetterType == BoardObject::TYPE_MEMO) {
|
||||
mURLProc.setUnk_0x40(8.0f);
|
||||
mURLProc.setHitYOffset(8.0f);
|
||||
}
|
||||
|
||||
nw4r::lyt::Pane* pane = mpLayout->FindPaneByName("T_Letter");
|
||||
|
||||
@@ -15,16 +15,16 @@ namespace ipl {
|
||||
}
|
||||
|
||||
void UrlProcessor::init() {
|
||||
unk_0x52 = 0;
|
||||
unk_0x51 = 0;
|
||||
unk_0x50 = 0;
|
||||
unk_0x53 = 1;
|
||||
mbHoverOffset = 0;
|
||||
mbInTag = 0;
|
||||
mbColorPass = 0;
|
||||
mbFocusEnabled = 1;
|
||||
|
||||
unk_0x40 = 0.0f;
|
||||
unk_0x44 = 0.0f;
|
||||
mHitYOffset = 0.0f;
|
||||
mMemoTranslateY = 0.0f;
|
||||
|
||||
unk_0x48 = 0;
|
||||
unk_0x4C = -1;
|
||||
mCurTagNo = 0;
|
||||
mSelectedTagNo = -1;
|
||||
|
||||
for (int i = 0; i < WPAD_MAX_CONTROLLERS; i++) {
|
||||
mConData[i].valid = false;
|
||||
@@ -60,14 +60,14 @@ namespace ipl {
|
||||
}
|
||||
|
||||
void UrlProcessor::clear_prev_drawing() {
|
||||
unk_0x48 = 0;
|
||||
unk_0x52 = 0;
|
||||
unk_0x51 = 0;
|
||||
mCurTagNo = 0;
|
||||
mbHoverOffset = 0;
|
||||
mbInTag = 0;
|
||||
}
|
||||
|
||||
nw4r::ut::Operation UrlProcessor::Process(u16 code, nw4r::ut::PrintContext<wchar_t>* context) {
|
||||
if (code == SEPERATOR || code == (u16)'\n') {
|
||||
if (unk_0x50 == 0) {
|
||||
if (mbColorPass == 0) {
|
||||
make_collision(context, code);
|
||||
} else if (code == SEPERATOR) {
|
||||
parse(context);
|
||||
@@ -78,42 +78,42 @@ namespace ipl {
|
||||
|
||||
void UrlProcessor::make_collision(nw4r::ut::PrintContext<wchar_t>* context, u16 code) {
|
||||
if (code == SEPERATOR) {
|
||||
if (unk_0x51 == 0) {
|
||||
if (mbInTag == 0) {
|
||||
url_collision* const url_col = new (System::getMem2App(), 4) url_collision();
|
||||
line_collision* const line_col = new (System::getMem2App(), 4) line_collision();
|
||||
|
||||
url_col->unk_0x00 = unk_0x48;
|
||||
url_col->unk_0x04 = (wchar_t*)context->str;
|
||||
url_col->mTagNo = mCurTagNo;
|
||||
url_col->mpStart = (wchar_t*)context->str;
|
||||
|
||||
line_col->unk_0x00 = context->writer->GetCursorX();
|
||||
line_col->mLeft = context->writer->GetCursorX();
|
||||
nw4r::ut::List_Append(&url_col->mLineCollisions, line_col);
|
||||
nw4r::ut::List_Append(&mUrlCollisions, url_col);
|
||||
|
||||
unk_0x51 = 1;
|
||||
mbInTag = 1;
|
||||
} else {
|
||||
void* url_col_raw = nw4r::ut::List_GetPrev(&mUrlCollisions, NULL);
|
||||
void* line_col_raw = nw4r::ut::List_GetPrev(&((url_collision*)url_col_raw)->mLineCollisions, NULL);
|
||||
url_collision* url_col = (url_collision*)url_col_raw;
|
||||
line_collision* line_col = (line_collision*)line_col_raw;
|
||||
|
||||
line_col->unk_0x04 = context->writer->GetCursorX();
|
||||
line_col->unk_0x08 = context->writer->GetCursorY();
|
||||
line_col->mRight = context->writer->GetCursorX();
|
||||
line_col->mY = context->writer->GetCursorY();
|
||||
|
||||
url_col->unk_0x08 = (wchar_t*)context->str;
|
||||
url_col->mpEnd = (wchar_t*)context->str;
|
||||
|
||||
unk_0x51 = 0;
|
||||
unk_0x48++;
|
||||
mbInTag = 0;
|
||||
mCurTagNo++;
|
||||
}
|
||||
} else {
|
||||
if (unk_0x51 != 0) {
|
||||
if (mbInTag != 0) {
|
||||
url_collision* url_col = (url_collision*)nw4r::ut::List_GetPrev(&mUrlCollisions, NULL);
|
||||
line_collision* line_col = (line_collision*)nw4r::ut::List_GetPrev(&url_col->mLineCollisions, NULL);
|
||||
|
||||
line_col->unk_0x04 = context->writer->GetCursorX();
|
||||
line_col->unk_0x08 = context->writer->GetCursorY();
|
||||
line_col->mRight = context->writer->GetCursorX();
|
||||
line_col->mY = context->writer->GetCursorY();
|
||||
|
||||
line_col = new (System::getMem2App(), 4) line_collision();
|
||||
line_col->unk_0x00 = -208.0f;
|
||||
line_col->mLeft = -208.0f;
|
||||
|
||||
nw4r::ut::List_Append(&url_col->mLineCollisions, line_col);
|
||||
}
|
||||
@@ -122,41 +122,41 @@ namespace ipl {
|
||||
|
||||
void UrlProcessor::parse(nw4r::ut::PrintContext<wchar_t>* context) {
|
||||
f32 curY = context->writer->GetCursorY();
|
||||
if (unk_0x51 == 0) {
|
||||
if (unk_0x4C == unk_0x48) {
|
||||
if (mbInTag == 0) {
|
||||
if (mSelectedTagNo == mCurTagNo) {
|
||||
context->writer->SetTextColor(0xFFE664FF);
|
||||
} else if (unk_0x53 != 0 && is_focused()) {
|
||||
} else if (mbFocusEnabled != 0 && is_focused()) {
|
||||
context->writer->SetCursorY(curY - 2.0f);
|
||||
context->writer->SetTextColor(0xF06E28FF);
|
||||
unk_0x52 = 1;
|
||||
mbHoverOffset = 1;
|
||||
} else {
|
||||
context->writer->SetTextColor(0x34BEEDFF);
|
||||
}
|
||||
unk_0x51 = 1;
|
||||
mbInTag = 1;
|
||||
} else {
|
||||
if (unk_0x52 != 0) {
|
||||
if (mbHoverOffset != 0) {
|
||||
context->writer->SetCursorY(2.0f + curY);
|
||||
unk_0x52 = 0;
|
||||
mbHoverOffset = 0;
|
||||
}
|
||||
|
||||
context->writer->SetTextColor(0x646464FF);
|
||||
|
||||
unk_0x51 = 0;
|
||||
unk_0x48++;
|
||||
mbInTag = 0;
|
||||
mCurTagNo++;
|
||||
}
|
||||
}
|
||||
|
||||
BOOL UrlProcessor::is_focused() const {
|
||||
for (int i = 0; i < WPAD_MAX_CONTROLLERS; i++) {
|
||||
if (unk_0x48 == get_focused_tagno(i)) {
|
||||
if (mCurTagNo == get_focused_tagno(i)) {
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
void UrlProcessor::select(int unk) {
|
||||
unk_0x4C = unk;
|
||||
void UrlProcessor::select(int tagNo) {
|
||||
mSelectedTagNo = tagNo;
|
||||
}
|
||||
|
||||
int UrlProcessor::get_focused_tagno(int chan) const {
|
||||
@@ -174,13 +174,13 @@ namespace ipl {
|
||||
|
||||
while (url_col = (url_collision*)nw4r::ut::List_GetNext(&mUrlCollisions, url_col), url_col != NULL) {
|
||||
while (line_col = (line_collision*)nw4r::ut::List_GetNext(&url_col->mLineCollisions, line_col), line_col != NULL) {
|
||||
f32 left = line_col->unk_0x00 - var_f28;
|
||||
f32 right = var_f28 + line_col->unk_0x04;
|
||||
f32 temp_f0 = ((unk_0x44 + unk_0x40) - line_col->unk_0x08);
|
||||
f32 left = line_col->mLeft - var_f28;
|
||||
f32 right = var_f28 + line_col->mRight;
|
||||
f32 temp_f0 = ((mMemoTranslateY + mHitYOffset) - line_col->mY);
|
||||
f32 top = (var_f29 + temp_f0) - var_f28;
|
||||
f32 bottom = var_f28 + (var_f30 + temp_f0);
|
||||
if (left <= var_f31 && var_f31 <= right && top <= -pos.y && -pos.y <= bottom) {
|
||||
return url_col->unk_0x00;
|
||||
return url_col->mTagNo;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -194,7 +194,7 @@ namespace ipl {
|
||||
url_collision* url_col = NULL;
|
||||
|
||||
while (got = (url_collision*)nw4r::ut::List_GetNext(&mUrlCollisions, got), got != NULL) {
|
||||
if (got->unk_0x00 == unk_0x4C) {
|
||||
if (got->mTagNo == mSelectedTagNo) {
|
||||
url_col = got;
|
||||
break;
|
||||
}
|
||||
@@ -210,10 +210,10 @@ namespace ipl {
|
||||
|
||||
int chIdx2 = 0;
|
||||
int chIdx = 0;
|
||||
u32 count = (u32)url_col->unk_0x08 - (u32)url_col->unk_0x04;
|
||||
u32 count = (u32)url_col->mpEnd - (u32)url_col->mpStart;
|
||||
count >>= 1;
|
||||
for (u32 i = 0; i < count; i++) {
|
||||
wchar_t wch = url_col->unk_0x04[i];
|
||||
wchar_t wch = url_col->mpStart[i];
|
||||
if (wch != SEPERATOR && chIdx2 < 0x200) {
|
||||
url[chIdx2++] = wch;
|
||||
}
|
||||
@@ -226,9 +226,9 @@ namespace ipl {
|
||||
}
|
||||
|
||||
UrlProcessor::url_collision::url_collision() {
|
||||
unk_0x00 = 0;
|
||||
unk_0x04 = NULL;
|
||||
unk_0x08 = NULL;
|
||||
mTagNo = 0;
|
||||
mpStart = NULL;
|
||||
mpEnd = NULL;
|
||||
nw4r::ut::List_Init(&mLineCollisions, offsetof(line_collision, mLinkList));
|
||||
}
|
||||
|
||||
|
||||
@@ -436,10 +436,10 @@ namespace ipl {
|
||||
data.titleId = System::getChannelManager()->getTitleID(mChanPage, mChanIndex);
|
||||
data.threadTerminated = mbModuleTerminated;
|
||||
data.unk_0x19 = true;
|
||||
data.unk_0x1A = true;
|
||||
data.mbHasNewMessage = true;
|
||||
|
||||
if (!(System::getNwc24Manager() != NULL && System::getNwc24Manager()->isNewMessageThere(ES_TITLE_CODE(data.titleId)))) {
|
||||
data.unk_0x1A = false;
|
||||
data.mbHasNewMessage = false;
|
||||
}
|
||||
|
||||
System::getCSManager()->setData(data);
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
#define IPL_CHANNEL_SELECT_CPP
|
||||
|
||||
#include <decomp/ide.h>
|
||||
#include "iplSceneUI.h"
|
||||
|
||||
@@ -43,8 +45,7 @@ namespace ipl {
|
||||
return r;
|
||||
}
|
||||
|
||||
template <>
|
||||
f32 HermiteIntp<f32>::get() const {
|
||||
inline 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))))) -
|
||||
@@ -329,8 +330,8 @@ namespace ipl {
|
||||
|
||||
setSceneParentFlags(SCN_PARENTFLAG_DRAW | SCN_PARENTFLAG_CALC);
|
||||
|
||||
unk_0xD8 = math::VEC3(0.0f, 0.0f, 0.0f);
|
||||
unk_0xE4 = math::VEC2(1.0f, 1.0f);
|
||||
mOrthoTrans = math::VEC3(0.0f, 0.0f, 0.0f);
|
||||
mOrthoScale = math::VEC2(1.0f, 1.0f);
|
||||
|
||||
nw4r::ut::Rect proj4x3;
|
||||
System::getProjectionRect4x3(&proj4x3);
|
||||
@@ -647,7 +648,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(unk_0xD8, unk_0xE4);
|
||||
utility::Graphics::setOrthoTransAndScale(mOrthoTrans, mOrthoScale);
|
||||
}
|
||||
utility::Graphics::setOrtho();
|
||||
|
||||
@@ -1844,7 +1845,7 @@ namespace ipl {
|
||||
initChanZoomParam(myVec, 1);
|
||||
setChanZoomOrtho();
|
||||
|
||||
if (System::getChannelManager()->isUnk_0x1B81()) {
|
||||
if (System::getChannelManager()->isDiskChannelReady()) {
|
||||
if (System::getBS2Manager()->getIPLState() == bs2::IPL_STATE_RVL_GAME ||
|
||||
System::getBS2Manager()->getIPLState() == bs2::IPL_STATE_DISK_UPDATE) {
|
||||
if (mspDiskID != NULL) {
|
||||
@@ -1856,7 +1857,7 @@ namespace ipl {
|
||||
|
||||
if (strncmp(diskID, mspDiskID, 4) == 0) {
|
||||
if (strncmp(diskMaker, mspDiskMaker, 2) == 0) {
|
||||
System::getChannelManager()->setUnk_0x1B81(false);
|
||||
System::getChannelManager()->setDiskChannelReady(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1909,10 +1910,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 = 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;
|
||||
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;
|
||||
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;
|
||||
@@ -1920,10 +1921,10 @@ namespace ipl {
|
||||
fbWidth = rMode->fbWidth;
|
||||
efbHeight = rMode->efbHeight;
|
||||
f32 projectionWidth = projRect.GetWidth();
|
||||
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);
|
||||
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);
|
||||
} else {
|
||||
fbWidth = rMode->fbWidth;
|
||||
efbHeight = rMode->efbHeight;
|
||||
@@ -2002,8 +2003,8 @@ namespace ipl {
|
||||
nw4r::ut::Rect projRect;
|
||||
System::getProjectionRect(&projRect);
|
||||
|
||||
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));
|
||||
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));
|
||||
}
|
||||
|
||||
int ChannelSelect::isInChannelPaneNames(const char* name) const {
|
||||
|
||||
@@ -467,7 +467,7 @@ namespace ipl {
|
||||
mpDiskBnrLayout->calc();
|
||||
} else {
|
||||
calcModuleChannel();
|
||||
System::getChannelManager()->setUnk_0x1B81(false);
|
||||
System::getChannelManager()->setDiskChannelReady(false);
|
||||
}
|
||||
|
||||
if ((mState == STATE_NORMAL || mState == STATE_WAIT_TMD || mState == STATE_PREPARE_BOOT || mState == STATE_BOOT_SCENE) && !unk_0x90 &&
|
||||
@@ -648,7 +648,7 @@ namespace ipl {
|
||||
}
|
||||
|
||||
if (System::getFader()->getStatus() == EGG::Fader::PREPARE_IN && System::isReceiveScheduleStopped()) {
|
||||
if (System::getNwc24Manager() && !System::getNwc24Manager()->isUnk0xA31()) {
|
||||
if (System::getNwc24Manager() && !System::getNwc24Manager()->isReceivingIdle()) {
|
||||
goto scn_continue;
|
||||
}
|
||||
|
||||
@@ -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()->isUnk_0x1B81())) {
|
||||
(System::getBS2Manager()->getIPLState() != bs2::IPL_STATE_RVL_GAME || System::getChannelManager()->isDiskChannelReady())) {
|
||||
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.unk_0x1A = false;
|
||||
data.mbHasNewMessage = 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()->isUnk_0x1B81()) {
|
||||
if (BS2State != bs2::IPL_STATE_RVL_GAME || System::getChannelManager()->isDiskChannelReady()) {
|
||||
mDiskState = DISK_STATE_EJECT;
|
||||
mpDiskBnrAnims[DISK_ANIM_GRP_ALL][DISK_ANIM_DISK_EJECT]->play();
|
||||
mpDiskBnrLayout->GetRootPane()->SetVisible(true);
|
||||
|
||||
@@ -25,16 +25,16 @@ typedef struct {
|
||||
undefined4 result;
|
||||
undefined4 errCode;
|
||||
HTTPTestState httpTestState;
|
||||
undefined4 unk_0x030;
|
||||
undefined4 unk_0x034;
|
||||
undefined4 unk_0x038;
|
||||
undefined4 unk_0x03c;
|
||||
undefined4 natState;
|
||||
undefined4 gsAvailable;
|
||||
undefined4 natTimedOut;
|
||||
undefined4 natFailed;
|
||||
OSTime detectStartTime;
|
||||
NHTTPConnection httpConnection;
|
||||
NHTTPRequest* httpRequest;
|
||||
NHTTPResponse* httpResponse;
|
||||
NCDProxyProfile proxy;
|
||||
void* unk_0x7f0;
|
||||
void* httpBuf;
|
||||
NAT nat;
|
||||
} StaticSession;
|
||||
|
||||
@@ -64,14 +64,14 @@ void IPLContestInitialize(void* heapBuf, NCDProxyProfile* proxy) {
|
||||
g_session.result = 0xFF00;
|
||||
g_session.errCode = 0;
|
||||
g_session.httpTestState = HTTP_TEST_NOT_STARTED;
|
||||
g_session.unk_0x030 = 0;
|
||||
g_session.natState = 0;
|
||||
g_session.detectStartTime = 0;
|
||||
g_session.httpConnection = 0;
|
||||
g_session.httpRequest = 0;
|
||||
g_session.httpResponse = NULL;
|
||||
g_session.unk_0x034 = 0;
|
||||
g_session.unk_0x038 = 0;
|
||||
g_session.unk_0x03c = 1;
|
||||
g_session.gsAvailable = 0;
|
||||
g_session.natTimedOut = 0;
|
||||
g_session.natFailed = 1;
|
||||
g_session.proxy = *proxy;
|
||||
}
|
||||
|
||||
@@ -100,7 +100,7 @@ int IPLContestProcess() {
|
||||
g_session.errCode = g_session.errCode != 0 ? g_session.errCode : -52200;
|
||||
OSReport("[error] Failed to start up NHTTP.\n");
|
||||
} else {
|
||||
g_session.unk_0x7f0 = IPLContestAlloc(0x400);
|
||||
g_session.httpBuf = IPLContestAlloc(0x400);
|
||||
g_session.httpTestState = HTTP_TEST_STARTED;
|
||||
OSReport("Starting HTTP conectting test.\n");
|
||||
}
|
||||
@@ -108,7 +108,7 @@ int IPLContestProcess() {
|
||||
}
|
||||
case HTTP_TEST_STARTED: {
|
||||
g_session.httpRequest =
|
||||
NHTTPCreateRequest("http://conntest.nintendowifi.net/", 0, g_session.unk_0x7f0, 0x400, sNHTTPReqCallback, 0);
|
||||
NHTTPCreateRequest("http://conntest.nintendowifi.net/", 0, g_session.httpBuf, 0x400, sNHTTPReqCallback, 0);
|
||||
if (g_session.httpRequest == 0) {
|
||||
g_session.httpTestState = HTTP_TEST_RESPONSE_ERRORED;
|
||||
g_session.result |= 4;
|
||||
@@ -156,9 +156,9 @@ int IPLContestProcess() {
|
||||
NHTTPDestroyResponse(g_session.httpResponse);
|
||||
g_session.httpResponse = NULL;
|
||||
}
|
||||
if (g_session.unk_0x7f0 != NULL) {
|
||||
IPLContestFree(g_session.unk_0x7f0, 0);
|
||||
g_session.unk_0x7f0 = NULL;
|
||||
if (g_session.httpBuf != NULL) {
|
||||
IPLContestFree(g_session.httpBuf, 0);
|
||||
g_session.httpBuf = NULL;
|
||||
}
|
||||
g_session.httpTestState = HTTP_TEST_DONE;
|
||||
NHTTPCleanupAsync(sNHTTPCleanupCallback);
|
||||
@@ -176,9 +176,9 @@ int IPLContestProcess() {
|
||||
NHTTPDestroyResponse(g_session.httpResponse);
|
||||
g_session.httpResponse = NULL;
|
||||
}
|
||||
if (g_session.unk_0x7f0 != NULL) {
|
||||
IPLContestFree(g_session.unk_0x7f0, 0);
|
||||
g_session.unk_0x7f0 = NULL;
|
||||
if (g_session.httpBuf != NULL) {
|
||||
IPLContestFree(g_session.httpBuf, 0);
|
||||
g_session.httpBuf = NULL;
|
||||
}
|
||||
g_session.httpTestState = HTTP_TEST_DONE;
|
||||
NHTTPCleanupAsync(sNHTTPCleanupCallback);
|
||||
@@ -198,11 +198,11 @@ int IPLContestProcess() {
|
||||
OSReport("Port mapping detectioning test has been skipped.\n");
|
||||
|
||||
} else
|
||||
switch (g_session.unk_0x030) {
|
||||
switch (g_session.natState) {
|
||||
case 0: {
|
||||
gsiMemoryCallbacksSet(IPLContestGSMalloc, IPLContestGSFree, IPLContestGSRealloc, IPLContestGSMemalign);
|
||||
GSIStartAvailableCheckA("wiinat");
|
||||
g_session.unk_0x030 = 1;
|
||||
g_session.natState = 1;
|
||||
OSReport("Starting GameSpy available check.\n");
|
||||
break;
|
||||
}
|
||||
@@ -212,14 +212,14 @@ int IPLContestProcess() {
|
||||
break;
|
||||
}
|
||||
case GSIACAvailable: {
|
||||
g_session.unk_0x034 = 1;
|
||||
g_session.unk_0x030 = 2;
|
||||
g_session.gsAvailable = 1;
|
||||
g_session.natState = 2;
|
||||
OSReport("GameSpy server is currently available.\n");
|
||||
break;
|
||||
}
|
||||
default: {
|
||||
g_session.unk_0x034 = 0;
|
||||
g_session.unk_0x030 = 5;
|
||||
g_session.gsAvailable = 0;
|
||||
g_session.natState = 5;
|
||||
OSReport("GameSpy server is currently unavailable.\n");
|
||||
break;
|
||||
}
|
||||
@@ -228,7 +228,7 @@ int IPLContestProcess() {
|
||||
}
|
||||
case 2: {
|
||||
NNStartNatDetection(onNatDetectionDone);
|
||||
g_session.unk_0x030 = 3;
|
||||
g_session.natState = 3;
|
||||
OSReport("Port mapping detectioning test has been started.\n");
|
||||
g_session.detectStartTime = OSGetTime();
|
||||
break;
|
||||
@@ -238,8 +238,8 @@ int IPLContestProcess() {
|
||||
if (OSGetTime() - g_session.detectStartTime < OSMillisecondsToTicks((OSTime)90000)) {
|
||||
break;
|
||||
}
|
||||
g_session.unk_0x030 = 5;
|
||||
g_session.unk_0x038 = 1;
|
||||
g_session.natState = 5;
|
||||
g_session.natTimedOut = 1;
|
||||
OSReport("[error] NAT timeout.\n");
|
||||
break;
|
||||
}
|
||||
@@ -289,10 +289,10 @@ int IPLGetNATSupportCode(int conntype) {
|
||||
|
||||
nat = g_session.nat;
|
||||
|
||||
if (g_session.unk_0x034 != 0) {
|
||||
if (g_session.unk_0x038 != 0) {
|
||||
if (g_session.gsAvailable != 0) {
|
||||
if (g_session.natTimedOut != 0) {
|
||||
code = 11180;
|
||||
} else if (g_session.unk_0x03c != 0) {
|
||||
} else if (g_session.natFailed != 0) {
|
||||
code = 11170;
|
||||
} else {
|
||||
if (nat.mappingScheme == 0 && nat.mappings[2].publicPort == nat.mappings[1].publicPort * 2 - nat.mappings[0].publicPort) {
|
||||
@@ -464,10 +464,10 @@ void sNHTTPCleanupCallback() {
|
||||
void onNatDetectionDone(gsi_bool success, NAT nat) {
|
||||
if (success) {
|
||||
g_session.nat = nat;
|
||||
g_session.unk_0x03c = 0;
|
||||
g_session.natFailed = 0;
|
||||
} else {
|
||||
g_session.unk_0x03c = 1;
|
||||
g_session.natFailed = 1;
|
||||
}
|
||||
g_session.unk_0x030 = 4;
|
||||
g_session.natState = 4;
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -353,7 +353,7 @@ FaderSceneCommand SDChannelTitle::calcFadeout() {
|
||||
mWpadStopTick = OSGetTick();
|
||||
}
|
||||
if (System::getFader()->getStatus() == EGG::Fader::PREPARE_IN && System::isReceiveScheduleStopped() &&
|
||||
(!System::getNwc24Manager() || System::getNwc24Manager()->isUnk0xA31())) {
|
||||
(!System::getNwc24Manager() || System::getNwc24Manager()->isReceivingIdle())) {
|
||||
OSReport("NWC24 Scheduler stopped.\n");
|
||||
NandSDWorker* worker = mpChannelSelect->getWorker();
|
||||
if (mNextScene == 17) {
|
||||
@@ -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.unk_0x1A = false;
|
||||
data.mbHasNewMessage = false;
|
||||
}
|
||||
System::getCSManager()->setData(data);
|
||||
if (!System::getCSManager()->init(scene->mpScriptFile, scene->mpRsoThread)) {
|
||||
|
||||
@@ -462,7 +462,6 @@ namespace ipl {
|
||||
directPagePath = "index03.html";
|
||||
break;
|
||||
case 7:
|
||||
default:
|
||||
directPagePath = "index01.html";
|
||||
break;
|
||||
}
|
||||
@@ -1606,10 +1605,10 @@ namespace ipl {
|
||||
OSReport("initKeyboard formId:%d\n", mpWiiSettingData->data[0x11]);
|
||||
memset(unk_0x938, 0, sizeof(unk_0x938));
|
||||
|
||||
int invalidInput = 0;
|
||||
int stringLimit;
|
||||
keyboard::Manager::KeyboardType keyboardType = keyboard::Manager::LETTER;
|
||||
int rowLimit = 0;
|
||||
int stringLimit = 0;
|
||||
int rowLimit;
|
||||
int invalidInput = 0;
|
||||
int productArea = static_cast<s8>(SCGetProductArea());
|
||||
|
||||
switch (mpWiiSettingData->data[0x11]) {
|
||||
@@ -1711,14 +1710,16 @@ namespace ipl {
|
||||
}
|
||||
|
||||
if (productArea == 11) {
|
||||
System::getKeyboard()->memoFrm()->setZiDictionary(System::getKeyboard()->getZiOemDic(), System::getKeyboard()->getZiSystemDic());
|
||||
void* systemDic = System::getKeyboard()->getZiSystemDic();
|
||||
void* oemDic = System::getKeyboard()->getZiOemDic();
|
||||
System::getKeyboard()->memoFrm()->setZiDictionary(oemDic, systemDic);
|
||||
}
|
||||
|
||||
keyboard::Manager::KeyboardSetting setting;
|
||||
setting.type = keyboardType;
|
||||
setting.rowLimit = rowLimit;
|
||||
setting.wcString = reinterpret_cast<const wchar_t*>(unk_0x938);
|
||||
setting.stringLimit = stringLimit;
|
||||
setting.rowLimit = rowLimit;
|
||||
setting.type = keyboardType;
|
||||
System::getKeyboard()->start(0, setting);
|
||||
|
||||
if (invalidInput != 0) {
|
||||
@@ -1738,7 +1739,6 @@ namespace ipl {
|
||||
if (mKeyboardState.pressOK) {
|
||||
onTextInputOK();
|
||||
u8 formId = mpWiiSettingData->data[0x11];
|
||||
formText = NULL;
|
||||
switch (formId) {
|
||||
case 1:
|
||||
formText = mpStringBuffer->nickname;
|
||||
@@ -1809,7 +1809,8 @@ namespace ipl {
|
||||
memcpy(mpStringBuffer->asterisks, mpStringBuffer->securityKey, sizeof(mpStringBuffer->securityKey));
|
||||
mpStringBuffer->asterisks[0x41] = 0;
|
||||
while (mpStringBuffer->asterisks[index] != 0) {
|
||||
mpStringBuffer->asterisks[index++] = '*';
|
||||
mpStringBuffer->asterisks[index] = '*';
|
||||
index++;
|
||||
}
|
||||
if (index > 0x20) {
|
||||
mpStringBuffer->asterisks[0x20] = '\n';
|
||||
@@ -1821,7 +1822,6 @@ namespace ipl {
|
||||
}
|
||||
} else {
|
||||
u8 formId = mpWiiSettingData->data[0x11];
|
||||
formText = NULL;
|
||||
switch (formId) {
|
||||
case 1:
|
||||
formText = mpStringBuffer->nickname;
|
||||
|
||||
@@ -15,10 +15,10 @@ namespace ipl {
|
||||
// clang-format on
|
||||
|
||||
SettingButton::SettingButton(EGG::Heap* heap, int arg) : FaderSceneBase(heap), ::gui::EventHandler() {
|
||||
mCmdCapacity = 64;
|
||||
mCmdCount = 0;
|
||||
mCmdReadIdx = 0;
|
||||
mCmdWriteIdx = 0;
|
||||
mQueueCapacity = 64;
|
||||
mQueueCount = 0;
|
||||
mQueueRead = 0;
|
||||
mQueueWrite = 0;
|
||||
mSettingArg = arg;
|
||||
mpLayout = NULL;
|
||||
mpLayoutFile = NULL;
|
||||
@@ -81,9 +81,9 @@ namespace ipl {
|
||||
|
||||
FaderSceneCommand SettingButton::calcNormal() {
|
||||
if (!mpLayout->getAnim(ANIM_ALPHA_IN)->isPlaying() && !mpLayout->getAnim(ANIM_ALPHA_OUT)->isPlaying() &&
|
||||
!mpLayout->getAnim(ANIM_BTN_FLASH)->isPlaying() && mCmdCount != 0) {
|
||||
CmdEntry unk = mCmdQueue[mCmdReadIdx];
|
||||
switch (unk.command) {
|
||||
!mpLayout->getAnim(ANIM_BTN_FLASH)->isPlaying() && mQueueCount != 0) {
|
||||
CmdEntry entry = mCmdQueue[mQueueRead];
|
||||
switch (entry.command) {
|
||||
case CMD_SHOW_BTN: {
|
||||
showBtn();
|
||||
break;
|
||||
@@ -93,16 +93,16 @@ namespace ipl {
|
||||
break;
|
||||
}
|
||||
case CMD_SET_TEXT: {
|
||||
setText(unk.msgID);
|
||||
setText(entry.msgID);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (mCmdCount != 0) {
|
||||
if (++mCmdReadIdx >= mCmdCapacity) {
|
||||
mCmdReadIdx = 0;
|
||||
if (mQueueCount != 0) {
|
||||
if (++mQueueRead >= mQueueCapacity) {
|
||||
mQueueRead = 0;
|
||||
}
|
||||
mCmdCount--;
|
||||
mQueueCount--;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -225,16 +225,16 @@ namespace ipl {
|
||||
}
|
||||
|
||||
void SettingButton::reserve(int command, u32 msgId) {
|
||||
if (mCmdCapacity != mCmdCount) {
|
||||
int unk = mCmdWriteIdx;
|
||||
mCmdQueue[unk].command = command;
|
||||
mCmdQueue[unk].msgID = msgId;
|
||||
mCmdWriteIdx++;
|
||||
if (mQueueCapacity != mQueueCount) {
|
||||
int writeIdx = mQueueWrite;
|
||||
mCmdQueue[writeIdx].command = command;
|
||||
mCmdQueue[writeIdx].msgID = msgId;
|
||||
mQueueWrite++;
|
||||
|
||||
if (mCmdWriteIdx >= mCmdCapacity) {
|
||||
mCmdWriteIdx = 0;
|
||||
if (mQueueWrite >= mQueueCapacity) {
|
||||
mQueueWrite = 0;
|
||||
}
|
||||
mCmdCount++;
|
||||
mQueueCount++;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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), unk_0x90(0), unk_0x94(0) {
|
||||
mpLayout(NULL), mpLayoutFile(NULL), mpGui(NULL), mPendingSceneId(0), mExitSeqStep(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 (unk_0x90 != 0) {
|
||||
if (mPendingSceneId != 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 (unk_0x90 != 0) {
|
||||
if (mPendingSceneId != 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();
|
||||
unk_0x90 = 4;
|
||||
mPendingSceneId = SCENE_BOARD;
|
||||
|
||||
reserveAllSceneDestruction(SCENE_BOARD, NULL);
|
||||
|
||||
@@ -369,8 +369,8 @@ namespace ipl {
|
||||
int backAnim = -1;
|
||||
int inAnim = -1;
|
||||
|
||||
switch (unk_0x90) {
|
||||
case 13: {
|
||||
switch (mPendingSceneId) {
|
||||
case SCENE_MEMORY: {
|
||||
#ifndef KOREAN_BUILD
|
||||
backAnim = ANIM_WII_SAVE_DATA_BACK;
|
||||
inAnim = ANIM_GC_SAVE_DATA_IN;
|
||||
@@ -380,12 +380,12 @@ namespace ipl {
|
||||
#endif
|
||||
break;
|
||||
}
|
||||
case 14: {
|
||||
case SCENE_MEMORY_CARD: {
|
||||
backAnim = ANIM_GC_SAVE_DATA_BACK;
|
||||
inAnim = ANIM_WII_SAVE_DATA_IN;
|
||||
break;
|
||||
}
|
||||
case 12: {
|
||||
case SCENE_CHANNEL_EDIT: {
|
||||
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 (unk_0x90) {
|
||||
case 12: {
|
||||
switch (mPendingSceneId) {
|
||||
case SCENE_CHANNEL_EDIT: {
|
||||
static_cast<SettingButton*>(System::getScene(SCENE_SETTING_BUTTON))->showWii();
|
||||
CHANGE_STATE(STATE_2ND_NORMAL);
|
||||
break;
|
||||
}
|
||||
case 13:
|
||||
case 14: {
|
||||
case SCENE_MEMORY:
|
||||
case SCENE_MEMORY_CARD: {
|
||||
static_cast<SettingButton*>(System::getScene(SCENE_SETTING_BUTTON))->showWii();
|
||||
#ifndef KOREAN_BUILD
|
||||
CHANGE_STATE(STATE_3RD_NORMAL);
|
||||
@@ -422,7 +422,7 @@ namespace ipl {
|
||||
}
|
||||
}
|
||||
|
||||
unk_0x90 = 0;
|
||||
mPendingSceneId = 0;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -587,7 +587,7 @@ namespace ipl {
|
||||
break;
|
||||
}
|
||||
case BTN_SETTING: {
|
||||
unk_0x90 = 18;
|
||||
mPendingSceneId = SCENE_SETTING;
|
||||
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
|
||||
unk_0x90 = 13;
|
||||
mPendingSceneId = SCENE_MEMORY;
|
||||
#endif
|
||||
flashAnim = ANIM_SAVE_DATA_FLASH;
|
||||
outAnim = ANIM_CHANNEL_OUT;
|
||||
@@ -611,7 +611,7 @@ namespace ipl {
|
||||
break;
|
||||
}
|
||||
case BTN_CHANNEL: {
|
||||
unk_0x90 = 12;
|
||||
mPendingSceneId = SCENE_CHANNEL_EDIT;
|
||||
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: {
|
||||
unk_0x90 = 13;
|
||||
mPendingSceneId = SCENE_MEMORY;
|
||||
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: {
|
||||
unk_0x90 = 14;
|
||||
mPendingSceneId = SCENE_MEMORY_CARD;
|
||||
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 (unk_0x94) {
|
||||
switch (mExitSeqStep) {
|
||||
case 0: {
|
||||
prepare_exit_abort();
|
||||
break;
|
||||
@@ -720,13 +720,13 @@ namespace ipl {
|
||||
|
||||
System::getBS2Manager()->abort();
|
||||
System::stopReceiveSchedule();
|
||||
unk_0x94 = 1;
|
||||
mExitSeqStep = 1;
|
||||
}
|
||||
}
|
||||
|
||||
void SettingSelect::wait_decide_se() {
|
||||
if (!snd::getSystem()->isSEActive("WIPL_SE_DECIDE")) {
|
||||
unk_0x94 = 2;
|
||||
mExitSeqStep = 2;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -734,7 +734,7 @@ namespace ipl {
|
||||
__WPADReconnect(TRUE);
|
||||
snd::getSystem()->stopAllSound(20);
|
||||
System::getFader()->fadeOut();
|
||||
unk_0x94 = 3;
|
||||
mExitSeqStep = 3;
|
||||
}
|
||||
|
||||
void SettingSelect::finish_exit_reboot() {
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
namespace ipl {
|
||||
namespace bs2 {
|
||||
Manager::Manager(EGG::Heap* pHeap)
|
||||
: mIPLState(IPL_STATE_NO_DISK), mState(BS2_STT_NO_DISK), unk_0x0C(true), unk_0x0D(false), unk_0x0E(false), unk_0x0F(false),
|
||||
: mIPLState(IPL_STATE_NO_DISK), mState(BS2_STT_NO_DISK), mbTickEnabled(true), mbUpdateRequested(false), mbAbortRequested(false), mbRestartRequested(false),
|
||||
mbIsDiagDisc(false), mbIncludesSeatTitles(false), mbHasBanner(FALSE), mUnlockedState(BS2_STT_NO_DISK), mbStartUpdate(false),
|
||||
mEntries(NULL), mEntrySize(1), mEntryOffset(0) {
|
||||
mpBannerBuffer = new (pHeap, DEFAULT_ALIGN) u8[BS2_DEFAULT_BANNER_SIZE];
|
||||
@@ -30,13 +30,13 @@ namespace ipl {
|
||||
return mIPLState;
|
||||
}
|
||||
|
||||
if (unk_0x0F && !System::isNandFull()) {
|
||||
if (mbRestartRequested && !System::isNandFull()) {
|
||||
BS2RestartStateMachine();
|
||||
|
||||
unk_0x0C = true;
|
||||
mbTickEnabled = true;
|
||||
mIPLState = IPL_STATE_NO_DISK;
|
||||
unk_0x0F = false;
|
||||
} else if (unk_0x0C) {
|
||||
mbRestartRequested = false;
|
||||
} else if (mbTickEnabled) {
|
||||
BOOL old = OSDisableInterrupts();
|
||||
|
||||
mState = BS2Tick();
|
||||
@@ -51,7 +51,7 @@ namespace ipl {
|
||||
|
||||
if (mbIsDiagDisc && System::isRsrcLoaded()) {
|
||||
__WPADReconnect(TRUE);
|
||||
unk_0x0C = false;
|
||||
mbTickEnabled = false;
|
||||
bootNewSystem();
|
||||
}
|
||||
}
|
||||
@@ -65,7 +65,7 @@ namespace ipl {
|
||||
}
|
||||
|
||||
void Manager::startUpdate() {
|
||||
unk_0x0D = true;
|
||||
mbUpdateRequested = true;
|
||||
mbStartUpdate = true;
|
||||
mPrevEntry = 0;
|
||||
mPrevFound = 0;
|
||||
@@ -88,11 +88,11 @@ namespace ipl {
|
||||
}
|
||||
|
||||
void Manager::reserveRVLGame() {
|
||||
unk_0x0C = false;
|
||||
mbTickEnabled = false;
|
||||
}
|
||||
|
||||
void Manager::reserveGCGame() {
|
||||
unk_0x0C = false;
|
||||
mbTickEnabled = false;
|
||||
}
|
||||
|
||||
void Manager::startRVLGame() {
|
||||
@@ -103,13 +103,13 @@ namespace ipl {
|
||||
}
|
||||
|
||||
void Manager::abort() {
|
||||
unk_0x0E = true;
|
||||
unk_0x0F = false;
|
||||
mbAbortRequested = true;
|
||||
mbRestartRequested = false;
|
||||
}
|
||||
|
||||
void Manager::restart() {
|
||||
unk_0x0E = false;
|
||||
unk_0x0F = true;
|
||||
mbAbortRequested = false;
|
||||
mbRestartRequested = true;
|
||||
|
||||
System::checkNandOverFlowFlagAsync();
|
||||
}
|
||||
@@ -195,7 +195,7 @@ namespace ipl {
|
||||
break;
|
||||
}
|
||||
case BS2_STT_64: {
|
||||
unk_0x0C = false;
|
||||
mbTickEnabled = false;
|
||||
mIPLState = IPL_STATE_8;
|
||||
break;
|
||||
}
|
||||
@@ -216,25 +216,25 @@ namespace ipl {
|
||||
}
|
||||
|
||||
void Manager::execTick(BS2State state) {
|
||||
if (unk_0x0D) {
|
||||
if (mbUpdateRequested) {
|
||||
if (state == BS2_STT_UPDATE_DISK) {
|
||||
BS2StartUpdate();
|
||||
} else {
|
||||
mbStartUpdate = false;
|
||||
}
|
||||
} else if (unk_0x0E) {
|
||||
} else if (mbAbortRequested) {
|
||||
if (state == BS2_STT_NO_DISK || state == BS2_STT_COVER_OPEN || state == BS2_STT_55 || state == BS2_STT_WRONG_DISK ||
|
||||
state == BS2_STT_66 || state == BS2_STT_67 || state == BS2_STT_68 || state == BS2_STT_FATAL_ERROR ||
|
||||
state == BS2_STT_UPDATE_FAILED || state == BS2_STT_DIRTY_DISK) {
|
||||
unk_0x0C = false;
|
||||
mbTickEnabled = false;
|
||||
mIPLState = IPL_STATE_8;
|
||||
} else {
|
||||
BS2AbortStateMachine();
|
||||
}
|
||||
}
|
||||
|
||||
unk_0x0D = false;
|
||||
unk_0x0E = false;
|
||||
mbUpdateRequested = false;
|
||||
mbAbortRequested = false;
|
||||
}
|
||||
|
||||
void Manager::updateTick() {
|
||||
|
||||
@@ -91,7 +91,7 @@ namespace ipl {
|
||||
extern "C" const u32 scLangLookup__Q23ipl7channel[][16];
|
||||
|
||||
Manager::Manager(EGG::Heap* heap)
|
||||
: mpHeap(heap), mState(INIT), mbCanRefresh(0), unk_0x1B81(false), mbSetDiskBannerInfo(false), mPrevNandResult(NAND_RESULT_OK),
|
||||
: mpHeap(heap), mState(INIT), mbCanRefresh(0), mbDiskChannelReady(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);
|
||||
unk_0x1B81 = true;
|
||||
mbDiskChannelReady = true;
|
||||
} else if (state != bs2::IPL_STATE_RVL_GAME && state != mBS2State) {
|
||||
setDiskBannerInfo(true);
|
||||
}
|
||||
@@ -1076,7 +1076,7 @@ namespace ipl {
|
||||
ARCFileInfo readFile;
|
||||
|
||||
if (unk) {
|
||||
unk_0x1B81 = false;
|
||||
mbDiskChannelReady = false;
|
||||
}
|
||||
|
||||
int diskPage, diskIndex;
|
||||
|
||||
@@ -46,17 +46,17 @@ namespace ipl {
|
||||
}
|
||||
if (mButton != 0) {
|
||||
if (down(BTN_INTERACT)) {
|
||||
unk_0x08++;
|
||||
mDecideHoldCount++;
|
||||
} else {
|
||||
unk_0x08 = 0;
|
||||
mDecideHoldCount = 0;
|
||||
mButton = 0;
|
||||
}
|
||||
} else {
|
||||
unk_0x08 = 0;
|
||||
mDecideHoldCount = 0;
|
||||
}
|
||||
} else {
|
||||
mButton = 0;
|
||||
unk_0x08 = 0;
|
||||
mDecideHoldCount = 0;
|
||||
}
|
||||
|
||||
switch (mRumbleType) {
|
||||
@@ -109,7 +109,7 @@ namespace ipl {
|
||||
return NULL;
|
||||
}
|
||||
int ipl::controller::Base::decide() const {
|
||||
return unk_0x08 == 5;
|
||||
return mDecideHoldCount == 5;
|
||||
}
|
||||
int ipl::controller::Base::rumble(int type) {
|
||||
int ret = FALSE;
|
||||
@@ -130,44 +130,44 @@ namespace ipl {
|
||||
}
|
||||
void ipl::controller::Revolution::read() {
|
||||
if (!isValidDpd()) {
|
||||
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;
|
||||
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_0x1E = unk_0x1D;
|
||||
mbWasPinching = mbPinching;
|
||||
if (isValidBtn()) {
|
||||
if (unk_0x1E == 0) {
|
||||
if (mbWasPinching == 0) {
|
||||
if (down(0x800) && down(0x400)) {
|
||||
unk_0x1D = 1;
|
||||
mbPinching = 1;
|
||||
}
|
||||
} else if (!down(0x800) || !down(0x400)) {
|
||||
unk_0x1D = 0;
|
||||
mbPinching = 0;
|
||||
}
|
||||
} else {
|
||||
unk_0x1D = 0;
|
||||
mbPinching = 0;
|
||||
}
|
||||
|
||||
Base::read();
|
||||
}
|
||||
bool ipl::controller::Revolution::isValidDpd() const {
|
||||
if (unk_0x1C != 0) {
|
||||
if (mbForceInvalid != 0) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return (unk_0x20->wpad_err == 0 || unk_0x20->wpad_err == -7) && unk_0x20->dpd_valid_fg != 0;
|
||||
return (mpKpadStatus->wpad_err == 0 || mpKpadStatus->wpad_err == -7) && mpKpadStatus->dpd_valid_fg != 0;
|
||||
}
|
||||
bool ipl::controller::Revolution::isValidBtn() const {
|
||||
u8 val = unk_0x20->wpad_err;
|
||||
u8 val = mpKpadStatus->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 (unk_0x20->hold & (mButton & 0xFFFF)) {
|
||||
if (mpKpadStatus->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 = {unk_0x20->pos.x, unk_0x20->pos.y};
|
||||
Vec2 src = {mpKpadStatus->pos.x, mpKpadStatus->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) {
|
||||
unk_0x24.x = 0.01f;
|
||||
unk_0x24.y = 0.01f;
|
||||
unk_0x2C = 0;
|
||||
mClassicCursorPos.x = 0.01f;
|
||||
mClassicCursorPos.y = 0.01f;
|
||||
mClassicCursorTimer = 0;
|
||||
}
|
||||
ipl::controller::Base::~Base() {
|
||||
}
|
||||
@@ -230,32 +230,32 @@ namespace ipl {
|
||||
}
|
||||
void ipl::controller::Classic::read() {
|
||||
if (!Revolution::isValidDpd()) {
|
||||
math::VEC2 lstick(unk_0x20->ex_status.cl.lstick.x, unk_0x20->ex_status.cl.lstick.y);
|
||||
math::VEC2 lstick(mpKpadStatus->ex_status.cl.lstick.x, mpKpadStatus->ex_status.cl.lstick.y);
|
||||
|
||||
if (lstick.x * lstick.x + lstick.y * lstick.y > 0.0036f) {
|
||||
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);
|
||||
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);
|
||||
}
|
||||
|
||||
math::VEC2 rstick = math::VEC2(unk_0x20->ex_status.cl.rstick.x, unk_0x20->ex_status.cl.rstick.y);
|
||||
math::VEC2 rstick = math::VEC2(mpKpadStatus->ex_status.cl.rstick.x, mpKpadStatus->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) {
|
||||
unk_0x2C = 180;
|
||||
mClassicCursorTimer = 180;
|
||||
}
|
||||
|
||||
if (--unk_0x2C < 0) {
|
||||
unk_0x2C = 0;
|
||||
if (--mClassicCursorTimer < 0) {
|
||||
mClassicCursorTimer = 0;
|
||||
}
|
||||
} else {
|
||||
unk_0x24.y = 0.01f;
|
||||
unk_0x24.x = 0.01f;
|
||||
unk_0x2C = 0;
|
||||
mClassicCursorPos.y = 0.01f;
|
||||
mClassicCursorPos.x = 0.01f;
|
||||
mClassicCursorTimer = 0;
|
||||
}
|
||||
|
||||
Revolution::read();
|
||||
}
|
||||
int ipl::controller::Classic::getClassicHoldFlag() const {
|
||||
return unk_0x20->ex_status.cl.hold;
|
||||
return mpKpadStatus->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(unk_0x20->horizon.x, unk_0x20->horizon.y);
|
||||
ret.set(mpKpadStatus->horizon.x, mpKpadStatus->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(unk_0x20->pos.x, unk_0x20->pos.y);
|
||||
} else if (unk_0x2C != 0) {
|
||||
ret = unk_0x24;
|
||||
ret.set(mpKpadStatus->pos.x, mpKpadStatus->pos.y);
|
||||
} else if (mClassicCursorTimer != 0) {
|
||||
ret = mClassicCursorPos;
|
||||
} 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(unk_0x20->pos.x, unk_0x20->pos.y);
|
||||
} else if (unk_0x2C != 0) {
|
||||
ret = unk_0x24;
|
||||
ret.set(mpKpadStatus->pos.x, mpKpadStatus->pos.y);
|
||||
} else if (mClassicCursorTimer != 0) {
|
||||
ret = mClassicCursorPos;
|
||||
} 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) {
|
||||
unk_0x1C = flag;
|
||||
mbForceInvalid = 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 unk_0x20;
|
||||
return mpKpadStatus;
|
||||
}
|
||||
f32 ipl::controller::Revolution::getDpdDistance() const {
|
||||
return unk_0x20->dist;
|
||||
return mpKpadStatus->dist;
|
||||
}
|
||||
int ipl::controller::Revolution::getReleaseFlag() const {
|
||||
return unk_0x20->release;
|
||||
return mpKpadStatus->release;
|
||||
}
|
||||
int ipl::controller::Revolution::getTrigFlag() const {
|
||||
return unk_0x20->trig;
|
||||
return mpKpadStatus->trig;
|
||||
}
|
||||
int ipl::controller::Revolution::getHoldFlag() const {
|
||||
return unk_0x20->hold;
|
||||
return mpKpadStatus->hold;
|
||||
}
|
||||
int ipl::controller::Revolution::pinchOffTrg() const {
|
||||
int ret = 0;
|
||||
if (isValidBtn() && unk_0x1D == 0 && unk_0x1E != 0) {
|
||||
if (isValidBtn() && mbPinching == 0 && mbWasPinching != 0) {
|
||||
ret = 1;
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
int ipl::controller::Revolution::pinch() const {
|
||||
int ret = 0;
|
||||
if (isValidBtn() && unk_0x1D != 0) {
|
||||
if (isValidBtn() && mbPinching != 0) {
|
||||
ret = 1;
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
int ipl::controller::Revolution::pinchTrg() const {
|
||||
int ret = 0;
|
||||
if (isValidBtn() && unk_0x1D != 0 && unk_0x1E == 0) {
|
||||
if (isValidBtn() && mbPinching != 0 && mbWasPinching == 0) {
|
||||
ret = 1;
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
bool ipl::controller::Revolution::repeat(u32 button) const {
|
||||
return down(button) && (unk_0x20->hold & 0x80000000) != 0;
|
||||
return down(button) && (mpKpadStatus->hold & 0x80000000) != 0;
|
||||
}
|
||||
BOOL ipl::controller::Classic::isValidDpdClassic() const {
|
||||
return unk_0x2C != 0;
|
||||
return mClassicCursorTimer != 0;
|
||||
}
|
||||
bool ipl::controller::Classic::isValidDpd() const {
|
||||
if (unk_0x1C != 0) {
|
||||
if (mbForceInvalid != 0) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return (Revolution::isValidDpd() != 0) || (unk_0x2C != 0);
|
||||
return (Revolution::isValidDpd() != 0) || (mClassicCursorTimer != 0);
|
||||
}
|
||||
int ipl::controller::Classic::getClassicReleaseFlag() const {
|
||||
return unk_0x20->ex_status.cl.release;
|
||||
return mpKpadStatus->ex_status.cl.release;
|
||||
}
|
||||
int ipl::controller::Classic::getClassicTrigFlag() const {
|
||||
return unk_0x20->ex_status.cl.trig;
|
||||
return mpKpadStatus->ex_status.cl.trig;
|
||||
}
|
||||
bool ipl::controller::Classic::upTrg(u32 button) const {
|
||||
bool ret = false;
|
||||
if (isValidBtn()) {
|
||||
bool pressed = true;
|
||||
KPADStatus* status = unk_0x20;
|
||||
KPADStatus* status = mpKpadStatus;
|
||||
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 = unk_0x20;
|
||||
KPADStatus* status = mpKpadStatus;
|
||||
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 ((unk_0x20->hold & (button & 0xFFFF)) == 0) {
|
||||
if ((unk_0x20->ex_status.cl.hold & (button >> 16)) == 0) {
|
||||
if ((mpKpadStatus->hold & (button & 0xFFFF)) == 0) {
|
||||
if ((mpKpadStatus->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(unk_0x20->horizon.x, unk_0x20->horizon.y);
|
||||
return math::VEC2(mpKpadStatus->horizon.x, mpKpadStatus->horizon.y);
|
||||
}
|
||||
ipl::math::VEC2 ipl::controller::Revolution::getDpdPos() const {
|
||||
return math::VEC2(unk_0x20->pos.x, unk_0x20->pos.y);
|
||||
return math::VEC2(mpKpadStatus->pos.x, mpKpadStatus->pos.y);
|
||||
}
|
||||
bool ipl::controller::Revolution::upTrg(u32 button) const {
|
||||
bool ret = false;
|
||||
if (isValidBtn()) {
|
||||
if (unk_0x20->release & (button & 0xFFFF)) {
|
||||
if (mpKpadStatus->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 (unk_0x20->trig & (button & 0xFFFF)) {
|
||||
if (mpKpadStatus->trig & (button & 0xFFFF)) {
|
||||
ret = true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -152,9 +152,9 @@ namespace ipl {
|
||||
}
|
||||
|
||||
Revolution::Revolution(int chan, int type, KPADStatus& status) : Base(chan, type, status) {
|
||||
unk_0x1D = 0;
|
||||
unk_0x1E = 0;
|
||||
unk_0x20 = &status;
|
||||
mbPinching = 0;
|
||||
mbWasPinching = 0;
|
||||
mpKpadStatus = &status;
|
||||
}
|
||||
|
||||
Interface* Manager::getMasterController() {
|
||||
|
||||
@@ -43,13 +43,13 @@ namespace ipl {
|
||||
mMessageID = msgId;
|
||||
|
||||
// Debug related? (seems to be incomplete; unused)
|
||||
unk_0x0C = arg2;
|
||||
unk_0x10 = arg3;
|
||||
mArg2 = arg2;
|
||||
mArg3 = arg3;
|
||||
if (arg1) {
|
||||
strncpy(unk_0x14, arg1, sizeof(unk_0x14));
|
||||
unk_0x14[sizeof(unk_0x14) - 1] = 0;
|
||||
strncpy(mArg1, arg1, sizeof(mArg1));
|
||||
mArg1[sizeof(mArg1) - 1] = 0;
|
||||
} else {
|
||||
memset(unk_0x14, 0, sizeof(unk_0x14));
|
||||
memset(mArg1, 0, sizeof(mArg1));
|
||||
}
|
||||
|
||||
curThread = OSGetCurrentThread();
|
||||
|
||||
@@ -47,7 +47,7 @@ namespace ipl {
|
||||
(((mLastError > NWC24_ERR_FILE_OPEN || mLastError < NWC24_ERR_FILE_OTHER) && mLastError != NWC24_ERR_NAND_CORRUPT) && \
|
||||
(mLastError != NWC24_ERR_FILE_EXISTS && mLastError != NWC24_ERR_INTERNAL_VF && mLastError != NWC24_ERR_FILE_BROKEN))
|
||||
|
||||
Manager::Manager(EGG::Heap* heap) : mbReviecedMsg(false), unk_0xA31(false), mbReceivePaused(false), unk_0xA33(false) {
|
||||
Manager::Manager(EGG::Heap* heap) : mbReviecedMsg(false), mbReceiving(false), mbReceivePaused(false), mbNewTitleTblReady(false) {
|
||||
OSInitMutex(&mLock);
|
||||
OSInitMutex(&mAutoLock);
|
||||
|
||||
@@ -526,7 +526,7 @@ namespace ipl {
|
||||
return;
|
||||
}
|
||||
|
||||
unk_0xA31 = true;
|
||||
mbReceiving = true;
|
||||
|
||||
NWC24UserId myUserId;
|
||||
getMyUserId(&myUserId);
|
||||
@@ -910,8 +910,8 @@ namespace ipl {
|
||||
|
||||
close();
|
||||
|
||||
unk_0xA33 = true;
|
||||
unk_0xA31 = false;
|
||||
mbNewTitleTblReady = true;
|
||||
mbReceiving = false;
|
||||
}
|
||||
|
||||
void Manager::addDlTask() {
|
||||
@@ -996,7 +996,7 @@ namespace ipl {
|
||||
}
|
||||
|
||||
BOOL Manager::getNewTitleTbl(u32* titleTbl) const {
|
||||
if (!unk_0xA33) {
|
||||
if (!mbNewTitleTblReady) {
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
||||
@@ -61,7 +61,7 @@ namespace ipl {
|
||||
if (System::getPostmanManager()->IsUnknown() ||
|
||||
(System::getSceneManager() != NULL && System::getScene(SCENE_ADDRESS) != NULL)) {
|
||||
if (System::getNwc24Manager() != NULL && !System::isNandFull()) {
|
||||
if (System::createdAfterAndLibMgr() && !System::getNwc24Manager()->isUnk0xA31()) {
|
||||
if (System::createdAfterAndLibMgr() && !System::getNwc24Manager()->isReceivingIdle()) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
48
tools/decomp-assist/link1.attempts.md
Normal file
48
tools/decomp-assist/link1.attempts.md
Normal file
@@ -0,0 +1,48 @@
|
||||
# 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.
|
||||
Reference in New Issue
Block a user