Compare commits
206 Commits
agent/cont
...
agent/w092
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
19a013e64a | ||
|
|
44fd31e660 | ||
|
|
ac51d83fa5 | ||
|
|
6490b90f65 | ||
|
|
823ee31937 | ||
|
|
51f940c1ea | ||
|
|
8e254f1c88 | ||
|
|
313e396989 | ||
|
|
f98e550b24 | ||
|
|
7f8b4c8a4f | ||
|
|
6806dc1926 | ||
|
|
f0f1462ff4 | ||
|
|
9347e0b1c3 | ||
|
|
341ce036f5 | ||
|
|
53be96c012 | ||
|
|
a4e7841498 | ||
|
|
fb81577a0f | ||
|
|
258f4a6f91 | ||
|
|
b719ba47a5 | ||
|
|
094cfd811e | ||
|
|
c98c2010b2 | ||
|
|
17a33b2d18 | ||
|
|
10bbb7b394 | ||
|
|
dcfa7b859d | ||
|
|
a255b91806 | ||
|
|
9779363fb5 | ||
|
|
1f3dbb0ff0 | ||
|
|
041460fc6b | ||
|
|
287f88ae75 | ||
|
|
c3e50612b2 | ||
|
|
99d70b31f7 | ||
|
|
27844c37b3 | ||
|
|
abf047bc3b | ||
|
|
52977bb782 | ||
|
|
b1fd404137 | ||
|
|
9a9f937e9e | ||
|
|
0792087bf1 | ||
|
|
1542f73080 | ||
|
|
d51e34beb2 | ||
|
|
5ffea56c30 | ||
|
|
3dfeacd4f6 | ||
|
|
36f3716be7 | ||
|
|
784a463f27 | ||
|
|
fadf50ce43 | ||
|
|
a824e02a30 | ||
|
|
75c7a24c2f | ||
|
|
12c7a67d2c | ||
|
|
e2c26aad07 | ||
|
|
622b7e678e | ||
|
|
ddbb9b1ab9 | ||
|
|
4b71db7dfd | ||
|
|
e052c9ae0c | ||
|
|
a843f0770f | ||
|
|
c356c90f22 | ||
|
|
6af767089f | ||
|
|
bee0a51dbf | ||
|
|
d9e7306a99 | ||
|
|
f214b726b5 | ||
|
|
cbe489cd37 | ||
|
|
d78ab4cfd1 | ||
|
|
311b437e5f | ||
|
|
8581b15e80 | ||
|
|
16317c11e2 | ||
|
|
667b9f6fa2 | ||
|
|
bf479c7e3f | ||
|
|
5ce99fb34c | ||
|
|
44a074bdce | ||
|
|
59e3ec6007 | ||
|
|
f9a70d7d43 | ||
|
|
e5adf3de29 | ||
|
|
373ea6a875 | ||
|
|
84c3af7235 | ||
|
|
1f0ce55081 | ||
|
|
002e2e7e36 | ||
|
|
6713cca2e3 | ||
|
|
43fb4f1bb7 | ||
|
|
e926be4585 | ||
|
|
8d95ccd8ab | ||
|
|
cf3d7c4393 | ||
|
|
da448d002b | ||
|
|
d6c74589e5 | ||
|
|
63492be139 | ||
|
|
bede348ee3 | ||
|
|
75bdcc3e2c | ||
|
|
4872b6e925 | ||
|
|
7b96616b53 | ||
|
|
b9895bb3d6 | ||
|
|
22961c86a3 | ||
|
|
e4b8d405ed | ||
|
|
584dbb6906 | ||
|
|
2f865cb308 | ||
|
|
476e471184 | ||
|
|
45514dad2d | ||
|
|
9e2b86d38a | ||
|
|
86ed50ab79 | ||
|
|
4a30cfa843 | ||
|
|
bb3365c7da | ||
|
|
511b8d2a57 | ||
|
|
98f0f11dc7 | ||
|
|
e194e9ccd4 | ||
|
|
9b89894ee2 | ||
|
|
71c1c07d3b | ||
|
|
12e0ec188d | ||
|
|
93b2f44cfc | ||
|
|
9df26503a6 | ||
|
|
836a348b64 | ||
|
|
8201dbba31 | ||
|
|
1711e860c7 | ||
|
|
0c3af7ea2e | ||
|
|
fb539fe968 | ||
|
|
cd2a126243 | ||
|
|
620f8c8b4e | ||
|
|
7bf0665f40 | ||
|
|
f5ccda1cb4 | ||
|
|
4c84325f64 | ||
|
|
380c8a059c | ||
|
|
df19b05818 | ||
|
|
e27bb4c191 | ||
|
|
6aafa4acfe | ||
|
|
704850f5dd | ||
|
|
ca4acc8625 | ||
|
|
9e9c6bcd54 | ||
|
|
1975cefade | ||
|
|
721f9907df | ||
|
|
21c1e8a207 | ||
|
|
34f121b783 | ||
|
|
8647740dd8 | ||
|
|
84d8c7fe7a | ||
|
|
8923728dc4 | ||
|
|
71b4ac3296 | ||
|
|
21c4d9b7d9 | ||
|
|
558bb52727 | ||
|
|
cacffaa5ee | ||
|
|
d4cb1ee2ee | ||
|
|
ec93b2aad3 | ||
|
|
f026821af2 | ||
|
|
dd369fbb8c | ||
|
|
47f78dcead | ||
|
|
d951489ea3 | ||
|
|
2afb673a8e | ||
|
|
5b7475fe54 | ||
|
|
51f1c36f3f | ||
|
|
eb2d67bfe3 | ||
|
|
e167441313 | ||
|
|
fcf28f93e2 | ||
|
|
956f076799 | ||
|
|
3283047615 | ||
|
|
d0f6f8a7b9 | ||
|
|
8bec89c069 | ||
|
|
84ce6d4198 | ||
|
|
fba54700b6 | ||
|
|
748265e71b | ||
|
|
06e8788815 | ||
|
|
44a7f17e41 | ||
|
|
e1bd339ba5 | ||
|
|
0532e405d3 | ||
|
|
961a1b0431 | ||
|
|
e65297484f | ||
|
|
10f3bbc57c | ||
|
|
747e87959f | ||
|
|
0f89a4218d | ||
|
|
d0127008b2 | ||
|
|
8f31470be5 | ||
|
|
8a46eaae2d | ||
|
|
55946192bf | ||
|
|
f5486c85f4 | ||
|
|
bcbffb2c06 | ||
|
|
3793ce8c4e | ||
|
|
5cd7bcb31f | ||
|
|
c6ae812dd3 | ||
|
|
eeb6e310cf | ||
|
|
2242c861de | ||
|
|
ded8d62531 | ||
|
|
2c9e8eb028 | ||
|
|
a8c6bcf550 | ||
|
|
aa72085db7 | ||
|
|
4f747f363b | ||
|
|
2dce7103d1 | ||
|
|
f812a3bf87 | ||
|
|
25177c690e | ||
|
|
912546fd58 | ||
|
|
39aef1c7c0 | ||
|
|
872f55c573 | ||
|
|
ba46047e4d | ||
|
|
3e41051d36 | ||
|
|
fa2c5714ad | ||
|
|
cebdd7236d | ||
|
|
87cf5dacc3 | ||
|
|
9424c50f7b | ||
|
|
020ba288c3 | ||
|
|
1ab4726f50 | ||
|
|
2b016f9144 | ||
|
|
29984adbed | ||
|
|
e2832af0d2 | ||
|
|
df3f27980e | ||
|
|
28a693c7ad | ||
|
|
1d16705416 | ||
|
|
1ccf72e0d5 | ||
|
|
11b63fc609 | ||
|
|
3ae7c32d1c | ||
|
|
1171037c9b | ||
|
|
0a6a722237 | ||
|
|
18e76c8e59 | ||
|
|
0391409f25 | ||
|
|
b9ceb6a11a | ||
|
|
cc637c0b19 |
21
AGENTS.md
21
AGENTS.md
@@ -170,6 +170,12 @@ disjoint tasks. Never duplicate a source file or function
|
||||
range. Workers return changed paths, exact objdiff measurements, and validation
|
||||
results. Fuzzy-only results are not accepted.
|
||||
|
||||
Workers must do the work through tool calls and avoid conversational messages.
|
||||
Send findings to the parent only through the collaboration tool, with concise
|
||||
paths, measurements, and validation evidence. Put PR discussion on the PR when
|
||||
needed. Do not send user-facing status chatter; the orchestrator follows the
|
||||
reporting rule below.
|
||||
|
||||
### Worker loop
|
||||
|
||||
Workers iterate until exact-name `objdiff` reports `100.0%`. They must not stop
|
||||
@@ -299,6 +305,21 @@ After a successful merge:
|
||||
worktree and local branch. A failed or conflicted leaf keeps its worktree
|
||||
and worker alive.
|
||||
|
||||
### User-facing progress reports
|
||||
|
||||
Keep user-facing messages to a minimum and use as few tokens as possible.
|
||||
Do not send routine status updates or commentary while workers are running or
|
||||
PRs are open. After each matching-work PR is merged and the live progress
|
||||
report has been regenerated, send only the current linked, fuzzy, and data
|
||||
percentages in this format:
|
||||
|
||||
```
|
||||
Linked: <percent> | Fuzzy: <percent> | Data: <percent>
|
||||
```
|
||||
|
||||
Do not report stale values, unmerged PR results, or add other text to that
|
||||
update. Continue all required verification and coordination silently.
|
||||
|
||||
## Goal completion contract
|
||||
|
||||
The decompilation loop does not stop after a successful wave, a convenient
|
||||
|
||||
@@ -10,6 +10,33 @@ splits: 'config/43U/splits.txt'
|
||||
|
||||
ldscript_template: 'config/ldscript_ipl2.lcf'
|
||||
|
||||
force_active:
|
||||
- labs
|
||||
- itoa
|
||||
- strpbrk
|
||||
- strspn
|
||||
- strcspn
|
||||
- atol
|
||||
- padding__Q23ipl5scene
|
||||
- lbl_81695063
|
||||
- lbl_81695067
|
||||
- __vt__Q49textinput6extend4memo19NigaoeEventObserver
|
||||
|
||||
# textinput::toolbar::csPaneToAnimation points one past the end of csAninationFile.
|
||||
block_relocations:
|
||||
- source: .data:0x8165E15C
|
||||
- source: .data:0x8165E19C
|
||||
|
||||
add_relocations:
|
||||
- source: .data:0x8165E15C
|
||||
type: abs
|
||||
target: csAninationFile__Q29textinput7toolbar
|
||||
addend: 0x1DC
|
||||
- source: .data:0x8165E19C
|
||||
type: abs
|
||||
target: csAninationFile__Q29textinput7toolbar
|
||||
addend: 0x1DC
|
||||
|
||||
quick_analysis: true
|
||||
fill_gaps: false
|
||||
|
||||
|
||||
@@ -37,11 +37,16 @@ src/system/iplSystem.cpp:
|
||||
.sdata start:0x81696060 end:0x81696080
|
||||
|
||||
src/system/iplController.cpp:
|
||||
.text start:0x81335CCC end:0x81337978
|
||||
.text start:0x81335CCC end:0x81337318
|
||||
.rodata start:0x8160D2C0 end:0x8160D2D0
|
||||
.data start:0x816346A8 end:0x81634A28
|
||||
.sdata2 start:0x81694440 end:0x81694490
|
||||
.data start:0x816346A8 end:0x81634910
|
||||
.sdata2 start:0x81694440 end:0x81694478
|
||||
.sdata start:0x81696080 end:0x81696088
|
||||
|
||||
src/system/iplControllerManager.cpp:
|
||||
.text start:0x81337318 end:0x81337978
|
||||
.data start:0x81634910 end:0x81634A28
|
||||
.sdata2 start:0x81694478 end:0x81694490
|
||||
.sbss start:0x81698680 end:0x81698690
|
||||
|
||||
src/system/iplChannelManager.cpp:
|
||||
|
||||
@@ -7,7 +7,7 @@ mMac__Q33ipl6socket13SocketSetting = .bss:0x81089720; // type:object size:0x40
|
||||
_database__7LibTVRC = .bss:0x81089760; // type:object size:0x20 data:4byte
|
||||
_alarm__7LibTVRC = .bss:0x81089780; // type:object size:0x30
|
||||
_tickWait__7LibTVRC = .bss:0x810897B0; // type:object size:0x10 data:4byte
|
||||
mArg__Q33ipl7utility8Graphics = .bss:0x810897C0; // type:object size:0x88
|
||||
mArg__Q33ipl7utility8Graphics = .bss:0x810897C0; // type:object size:0x84
|
||||
unk__Q23ipl3snd = .bss:0x81089848; // type:object size:0xC
|
||||
_seBlk__Q23ipl3snd = .bss:0x81089854; // type:object size:0xD8 data:4byte
|
||||
sSystem__Q23ipl3snd = .bss:0x8108992C; // type:object size:0x63C data:4byte
|
||||
@@ -123,7 +123,7 @@ CDB_SD_ROOT_PATH_LS = .bss:0x810C8A08; // type:object size:0x20
|
||||
CDB_SD_VFF_FILE_NAME = .bss:0x810C8A28; // type:object size:0x48
|
||||
lbl_810C8A80 = .bss:0x810C8A80; // type:object size:0x40 align:32
|
||||
lbl_810C8AC0 = .bss:0x810C8AC0; // type:object size:0x40 align:32
|
||||
s_mutex = .bss:0x810C8B00; // type:object size:0x20 scope:local
|
||||
s_mutex = .bss:0x810C8B00; // type:object size:0x18 scope:local
|
||||
s_cdbWiiId = .bss:0x810C8B20; // type:object size:0x40 scope:local
|
||||
ncdMutex = .bss:0x810C8B60; // type:object size:0x20
|
||||
ncdCommonResult = .bss:0x810C8B80; // type:object size:0x20 align:32 data:4byte
|
||||
@@ -161,7 +161,7 @@ l_dev_init_info_table = .bss:0x810F55C0; // type:object size:0xD0 scope:local
|
||||
l_tmpWName = .bss:0x810F5690; // type:object size:0x10 scope:local data:2byte
|
||||
hashTable = .bss:0x810F56A0; // type:object size:0x22E scope:local data:byte
|
||||
l_driveInfo = .bss:0x810F58D0; // type:object size:0x208 scope:local data:4byte
|
||||
l_nandFunc = .bss:0x810F5AD8; // type:object size:0x1A8 scope:local
|
||||
l_nandFunc = .bss:0x810F5AD8; // type:object size:0x1A0 scope:local
|
||||
l_event = .bss:0x810F5C80; // type:object size:0x340 scope:local
|
||||
l_sddrv_info = .bss:0x810F5FC0; // type:object size:0x80 scope:local
|
||||
sZeroBuffer__Q44nw4r3snd6detail9AxManager = .bss:0x810F6040; // type:object size:0x100
|
||||
@@ -4558,44 +4558,44 @@ __ct__Q33ipl5scene15SDChannelSelectFPQ23EGG4Heap = .text:0x813DAB08; // type:fun
|
||||
__dt__Q33ipl5scene15SDChannelSelectFv = .text:0x813DAE7C; // type:function size:0x5C
|
||||
prepare__Q33ipl5scene15SDChannelSelectFv = .text:0x813DAED8; // type:function size:0xA8
|
||||
create__Q33ipl5scene15SDChannelSelectFv = .text:0x813DAF80; // type:function size:0x248
|
||||
iplSDChannelSelect_813DB1C8 = .text:0x813DB1C8; // type:function size:0x44
|
||||
iplSDChannelSelect_813DB20C = .text:0x813DB20C; // type:function size:0x48
|
||||
iplSDChannelSelect_813DB254 = .text:0x813DB254; // type:function size:0xB4
|
||||
iplSDChannelSelect_813DB308 = .text:0x813DB308; // type:function size:0x5C
|
||||
iplSDChannelSelect_813DB364 = .text:0x813DB364; // type:function size:0x5C
|
||||
iplSDChannelSelect_813DB3C0 = .text:0x813DB3C0; // type:function size:0x5C
|
||||
iplSDChannelSelect_813DB41C = .text:0x813DB41C; // type:function size:0x5C
|
||||
iplSDChannelSelect_813DB478 = .text:0x813DB478; // type:function size:0x5C
|
||||
iplSDChannelSelect_813DB4D4 = .text:0x813DB4D4; // type:function size:0x5C
|
||||
iplSDChannelSelect_813DB530 = .text:0x813DB530; // type:function size:0x5C
|
||||
iplSDChannelSelect_813DB58C = .text:0x813DB58C; // type:function size:0x60
|
||||
iplSDChannelSelect_813DB5EC = .text:0x813DB5EC; // type:function size:0x60
|
||||
iplSDChannelSelect_813DB64C = .text:0x813DB64C; // type:function size:0x40
|
||||
iplSDChannelSelect_813DB68C = .text:0x813DB68C; // type:function size:0x40
|
||||
iplSDChannelSelect_813DB6CC = .text:0x813DB6CC; // type:function size:0x518
|
||||
iplSDChannelSelect_813DBBE4 = .text:0x813DBBE4; // type:function size:0xB0
|
||||
iplSDChannelSelect_813DBC94 = .text:0x813DBC94; // type:function size:0xB8
|
||||
iplSDChannelSelect_813DBD4C = .text:0x813DBD4C; // type:function size:0x48
|
||||
iplSDChannelSelect_813DBD94 = .text:0x813DBD94; // type:function size:0xD8
|
||||
iplSDChannelSelect_813DBE6C = .text:0x813DBE6C; // type:function size:0x28
|
||||
iplSDChannelSelect_813DBE94 = .text:0x813DBE94; // type:function size:0x124
|
||||
iplSDChannelSelect_813DBFB8 = .text:0x813DBFB8; // type:function size:0x28
|
||||
iplSDChannelSelect_813DBFE0 = .text:0x813DBFE0; // type:function size:0x2AC
|
||||
iplSDChannelSelect_813DC28C = .text:0x813DC28C; // type:function size:0x64
|
||||
iplSDChannelSelect_813DC2F0 = .text:0x813DC2F0; // type:function size:0x1B0
|
||||
iplSDChannelSelect_813DC4A0 = .text:0x813DC4A0; // type:function size:0x5C
|
||||
iplSDChannelSelect_813DC4FC = .text:0x813DC4FC; // type:function size:0x78
|
||||
iplSDChannelSelect_813DC574 = .text:0x813DC574; // type:function size:0x80
|
||||
iplSDChannelSelect_813DC5F4 = .text:0x813DC5F4; // type:function size:0x48
|
||||
iplSDChannelSelect_813DC63C = .text:0x813DC63C; // type:function size:0x48
|
||||
iplSDChannelSelect_813DC684 = .text:0x813DC684; // type:function size:0x90
|
||||
iplSDChannelSelect_813DC714 = .text:0x813DC714; // type:function size:0x48
|
||||
iplSDChannelSelect_813DC75C = .text:0x813DC75C; // type:function size:0x48
|
||||
iplSDChannelSelect_813DC7A4 = .text:0x813DC7A4; // type:function size:0x48
|
||||
iplSDChannelSelect_813DC7EC = .text:0x813DC7EC; // type:function size:0x14C
|
||||
iplSDChannelSelect_813DC938 = .text:0x813DC938; // type:function size:0x18C
|
||||
iplSDChannelSelect_813DCAC4 = .text:0x813DCAC4; // type:function size:0x42C
|
||||
iplSDChannelSelect_813DCEF0 = .text:0x813DCEF0; // type:function size:0x24
|
||||
enqueueStartNotice__Q33ipl5scene15SDChannelSelectFv = .text:0x813DB1C8; // type:function size:0x44
|
||||
enqueueFinishNotice__Q33ipl5scene15SDChannelSelectFv = .text:0x813DB20C; // type:function size:0x48
|
||||
enqueueNotice__Q33ipl5scene15SDChannelSelectFUlUlUl = .text:0x813DB254; // type:function size:0xB4
|
||||
enqueueLoadNotice__Q33ipl5scene15SDChannelSelectFv = .text:0x813DB308; // type:function size:0x5C
|
||||
enqueuePageNotice__Q33ipl5scene15SDChannelSelectFv = .text:0x813DB364; // type:function size:0x5C
|
||||
enqueueResultNotice__Q33ipl5scene15SDChannelSelectFUl = .text:0x813DB3C0; // type:function size:0x5C
|
||||
enqueueChannelNotice__Q33ipl5scene15SDChannelSelectFUlUlUlUl = .text:0x813DB41C; // type:function size:0x5C
|
||||
enqueueMoveNotice__Q33ipl5scene15SDChannelSelectFUlUlUl = .text:0x813DB478; // type:function size:0x5C
|
||||
enqueueStateNotice__Q33ipl5scene15SDChannelSelectFUlUlUlUl = .text:0x813DB4D4; // type:function size:0x5C
|
||||
enqueueErrorNotice__Q33ipl5scene15SDChannelSelectFUlUl = .text:0x813DB530; // type:function size:0x5C
|
||||
enqueueCommandNotice__Q33ipl5scene15SDChannelSelectFUlUlUl = .text:0x813DB58C; // type:function size:0x60
|
||||
enqueueDeleteNotice__Q33ipl5scene15SDChannelSelectFUlUlUl = .text:0x813DB5EC; // type:function size:0x60
|
||||
clearCommandQueue__Q33ipl5scene15SDChannelSelectFv = .text:0x813DB64C; // type:function size:0x40
|
||||
clearNoticeQueue__Q33ipl5scene15SDChannelSelectFv = .text:0x813DB68C; // type:function size:0x40
|
||||
processWorkerCommands__Q33ipl5scene15SDChannelSelectFv = .text:0x813DB6CC; // type:function size:0x518
|
||||
handleWorkerStartup__Q33ipl5scene15SDChannelSelectFv = .text:0x813DBBE4; // type:function size:0xB0
|
||||
handleNandTitleCount__Q33ipl5scene15SDChannelSelectFv = .text:0x813DBC94; // type:function size:0xB8
|
||||
handleNandTitleUsageComplete__Q33ipl5scene15SDChannelSelectFv = .text:0x813DBD4C; // type:function size:0x48
|
||||
handleNandTitleUsage__Q33ipl5scene15SDChannelSelectFv = .text:0x813DBD94; // type:function size:0xD8
|
||||
compareTitleUsage__Q33ipl5scene15SDChannelSelectFPCvPCv = .text:0x813DBE6C; // type:function size:0x28
|
||||
handleSDTitleList__Q33ipl5scene15SDChannelSelectFv = .text:0x813DBE94; // type:function size:0x124
|
||||
compareTitleInfo__Q33ipl5scene15SDChannelSelectFPCvPCv = .text:0x813DBFB8; // type:function size:0x28
|
||||
handleSDTitleListResult__Q33ipl5scene15SDChannelSelectFv = .text:0x813DBFE0; // type:function size:0x2AC
|
||||
handleSDMountComplete__Q33ipl5scene15SDChannelSelectFv = .text:0x813DC28C; // type:function size:0x64
|
||||
handleSDChannelUpdateComplete__Q33ipl5scene15SDChannelSelectFv = .text:0x813DC2F0; // type:function size:0x1B0
|
||||
handleSDCardReady__Q33ipl5scene15SDChannelSelectFv = .text:0x813DC4A0; // type:function size:0x5C
|
||||
handleCardCommand__Q33ipl5scene15SDChannelSelectFv = .text:0x813DC4FC; // type:function size:0x78
|
||||
handleCopyComplete__Q33ipl5scene15SDChannelSelectFv = .text:0x813DC574; // type:function size:0x80
|
||||
handleSDLocationUpdateComplete__Q33ipl5scene15SDChannelSelectFv = .text:0x813DC5F4; // type:function size:0x48
|
||||
handleSDLocationReadComplete__Q33ipl5scene15SDChannelSelectFv = .text:0x813DC63C; // type:function size:0x48
|
||||
handleMoveComplete__Q33ipl5scene15SDChannelSelectFv = .text:0x813DC684; // type:function size:0x90
|
||||
handleBackupFitComplete__Q33ipl5scene15SDChannelSelectFv = .text:0x813DC714; // type:function size:0x48
|
||||
handleNandSDCleanupComplete__Q33ipl5scene15SDChannelSelectFv = .text:0x813DC75C; // type:function size:0x48
|
||||
handleSDDeleteComplete__Q33ipl5scene15SDChannelSelectFv = .text:0x813DC7A4; // type:function size:0x48
|
||||
updateChannelNotices__Q33ipl5scene15SDChannelSelectFii = .text:0x813DC7EC; // type:function size:0x14C
|
||||
processWorkerState__Q33ipl5scene15SDChannelSelectFv = .text:0x813DC938; // type:function size:0x18C
|
||||
updateDialogAnimation__Q33ipl5scene15SDChannelSelectFv = .text:0x813DCAC4; // type:function size:0x42C
|
||||
setDialogMessage__Q33ipl5scene15SDChannelSelectFUlUl = .text:0x813DCEF0; // type:function size:0x24
|
||||
iplSDChannelSelect_813DCF14 = .text:0x813DCF14; // type:function size:0xCC
|
||||
iplSDChannelSelect_813DCFE0 = .text:0x813DCFE0; // type:function size:0xCC
|
||||
iplSDChannelSelect_813DD0AC = .text:0x813DD0AC; // type:function size:0x194
|
||||
@@ -4619,31 +4619,31 @@ initCalcFadeout__Q33ipl5scene15SDChannelSelectFv = .text:0x813DE24C; // type:fun
|
||||
calcFadeout__Q33ipl5scene15SDChannelSelectFv = .text:0x813DE2EC; // type:function size:0x50
|
||||
draw__Q33ipl5scene15SDChannelSelectFv = .text:0x813DE33C; // type:function size:0x38C
|
||||
destroy__Q33ipl5scene15SDChannelSelectFv = .text:0x813DE6C8; // type:function size:0x334
|
||||
iplSDChannelSelect_813DE9FC = .text:0x813DE9FC; // type:function size:0x440
|
||||
iplSDChannelSelect_813DEE3C = .text:0x813DEE3C; // type:function size:0x5C
|
||||
iplSDChannelSelect_813DEE98 = .text:0x813DEE98; // type:function size:0x78
|
||||
iplSDChannelSelect_813DEF10 = .text:0x813DEF10; // type:function size:0x58
|
||||
createBaseLayout__Q33ipl5scene15SDChannelSelectFv = .text:0x813DE9FC; // type:function size:0x440
|
||||
updateChannelObjects__Q33ipl5scene15SDChannelSelectFv = .text:0x813DEE3C; // type:function size:0x5C
|
||||
updateChannelObject__Q33ipl5scene15SDChannelSelectFPQ33ipl5scene12SDChannelObj = .text:0x813DEE98; // type:function size:0x78
|
||||
calcChannelObjects__Q33ipl5scene15SDChannelSelectFv = .text:0x813DEF10; // type:function size:0x58
|
||||
iplSDChannelSelect_813DEF68 = .text:0x813DEF68; // type:function size:0x27C
|
||||
iplSDChannelSelect_813DF1E4 = .text:0x813DF1E4; // type:function size:0x14
|
||||
iplSDChannelSelect_813DF1F8 = .text:0x813DF1F8; // type:function size:0xB0
|
||||
drawChannelObjects__Q33ipl5scene15SDChannelSelectFv = .text:0x813DF1F8; // type:function size:0xB0
|
||||
iplSDChannelSelect_813DF2A8 = .text:0x813DF2A8; // type:function size:0x138
|
||||
iplSDChannelSelect_813DF3E0 = .text:0x813DF3E0; // type:function size:0x1C
|
||||
iplSDChannelSelect_813DF3FC = .text:0x813DF3FC; // type:function size:0x110
|
||||
iplSDChannelSelect_813DF50C = .text:0x813DF50C; // type:function size:0x4C
|
||||
iplSDChannelSelect_813DF558 = .text:0x813DF558; // type:function size:0x178
|
||||
iplSDChannelSelect_813DF6D0 = .text:0x813DF6D0; // type:function size:0x164
|
||||
iplSDChannelSelect_813DF834 = .text:0x813DF834; // type:function size:0x110
|
||||
iplSDChannelSelect_813DF944 = .text:0x813DF944; // type:function size:0x84
|
||||
iplSDChannelSelect_813DF9C8 = .text:0x813DF9C8; // type:function size:0xF8
|
||||
iplSDChannelSelect_813DFAC0 = .text:0x813DFAC0; // type:function size:0xFC
|
||||
iplSDChannelSelect_813DFBBC = .text:0x813DFBBC; // type:function size:0xE4
|
||||
iplSDChannelSelect_813DFCA0 = .text:0x813DFCA0; // type:function size:0x50
|
||||
createChannelList__Q33ipl5scene15SDChannelSelectFib = .text:0x813DF834; // type:function size:0x110
|
||||
createChannelObject__Q33ipl5scene15SDChannelSelectFii = .text:0x813DF944; // type:function size:0x84
|
||||
destroyUnusedChannelObjects__Q33ipl5scene15SDChannelSelectFiPQ33ipl5scene12SDChannelObj = .text:0x813DF9C8; // type:function size:0xF8
|
||||
refreshChannelList__Q33ipl5scene15SDChannelSelectFv = .text:0x813DFAC0; // type:function size:0xFC
|
||||
refreshAfterSDTitleList__Q33ipl5scene15SDChannelSelectFv = .text:0x813DFBBC; // type:function size:0xE4
|
||||
destroyChannelObject__Q33ipl5scene15SDChannelSelectFPQ33ipl5scene12SDChannelObj = .text:0x813DFCA0; // type:function size:0x50
|
||||
iplSDChannelSelect_813DFCF0 = .text:0x813DFCF0; // type:function size:0x74
|
||||
iplSDChannelSelect_813DFD64 = .text:0x813DFD64; // type:function size:0x154
|
||||
iplSDChannelSelect_813DFEB8 = .text:0x813DFEB8; // type:function size:0x74
|
||||
findChannelObject__Q33ipl5scene15SDChannelSelectCFii = .text:0x813DFEB8; // type:function size:0x74
|
||||
iplSDChannelSelect_813DFF2C = .text:0x813DFF2C; // type:function size:0x1C0
|
||||
iplSDChannelSelect_813E00EC = .text:0x813E00EC; // type:function size:0x140
|
||||
iplSDChannelSelect_813E022C = .text:0x813E022C; // type:function size:0x68
|
||||
hasChannelObject__Q33ipl5scene15SDChannelSelectCFii = .text:0x813E00EC; // type:function size:0x140
|
||||
isChannelInCalc__Q33ipl5scene15SDChannelSelectCFiii = .text:0x813E022C; // type:function size:0x68
|
||||
iplSDChannelSelect_813E0294 = .text:0x813E0294; // type:function size:0x104
|
||||
iplSDChannelSelect_813E0398 = .text:0x813E0398; // type:function size:0x18
|
||||
iplSDChannelSelect_813E03B0 = .text:0x813E03B0; // type:function size:0xA0
|
||||
@@ -4651,13 +4651,13 @@ iplSDChannelSelect_813E0450 = .text:0x813E0450; // type:function size:0xEC
|
||||
iplSDChannelSelect_813E053C = .text:0x813E053C; // type:function size:0x84
|
||||
iplSDChannelSelect_813E05C0 = .text:0x813E05C0; // type:function size:0x64
|
||||
iplSDChannelSelect_813E0624 = .text:0x813E0624; // type:function size:0xB4
|
||||
iplSDChannelSelect_813E06D8 = .text:0x813E06D8; // type:function size:0xAC
|
||||
iplSDChannelSelect_813E0784 = .text:0x813E0784; // type:function size:0x30
|
||||
iplSDChannelSelect_813E07B4 = .text:0x813E07B4; // type:function size:0x30
|
||||
iplSDChannelSelect_813E07E4 = .text:0x813E07E4; // type:function size:0x64
|
||||
getChannelBasePane__Q33ipl5scene15SDChannelSelectCFiii = .text:0x813E06D8; // type:function size:0xAC
|
||||
getCenterChannelPane__Q33ipl5scene15SDChannelSelectCFi = .text:0x813E0784; // type:function size:0x30
|
||||
getChannelPane__Q33ipl5scene15SDChannelSelectCFi = .text:0x813E07B4; // type:function size:0x30
|
||||
getChannelPanePosition__Q33ipl5scene15SDChannelSelectFPQ33ipl5scene15SDChannelSelecti = .text:0x813E07E4; // type:function size:0x64
|
||||
iplSDChannelSelect_813E0848 = .text:0x813E0848; // type:function size:0x3A4
|
||||
iplSDChannelSelect_813E0BEC = .text:0x813E0BEC; // type:function size:0x294
|
||||
iplSDChannelSelect_813E0E80 = .text:0x813E0E80; // type:function size:0x60
|
||||
calcPageAnimations__Q33ipl5scene15SDChannelSelectFv = .text:0x813E0E80; // type:function size:0x60
|
||||
iplSDChannelSelect_813E0EE0 = .text:0x813E0EE0; // type:function size:0x26C
|
||||
iplSDChannelSelect_813E114C = .text:0x813E114C; // type:function size:0x78
|
||||
iplSDChannelSelect_813E11C4 = .text:0x813E11C4; // type:function size:0x3A4
|
||||
@@ -4678,10 +4678,10 @@ iplSDChannelSelect_813E2750 = .text:0x813E2750; // type:function size:0x164
|
||||
iplSDChannelSelect_813E28B4 = .text:0x813E28B4; // type:function size:0x2A0
|
||||
iplSDChannelSelect_813E2B54 = .text:0x813E2B54; // type:function size:0x240
|
||||
startResetting__Q33ipl5scene15SDChannelSelectFv = .text:0x813E2D94; // type:function size:0x44
|
||||
iplSDChannelSelect_813E2DD8 = .text:0x813E2DD8; // type:function size:0x4C
|
||||
iplSDChannelSelect_813E2E24 = .text:0x813E2E24; // type:function size:0x80
|
||||
iplSDChannelSelect_813E2EA4 = .text:0x813E2EA4; // type:function size:0x4C
|
||||
iplSDChannelSelect_813E2EF0 = .text:0x813E2EF0; // type:function size:0x34
|
||||
pop__Q33ipl5scene26SDChannelSelectNoticeQueueFv = .text:0x813E2DD8; // type:function size:0x4C
|
||||
push__Q33ipl5scene27SDChannelSelectCommandQueueFRCQ33ipl5scene22SDChannelSelectCommand = .text:0x813E2E24; // type:function size:0x80
|
||||
pop__Q33ipl5scene27SDChannelSelectCommandQueueFv = .text:0x813E2EA4; // type:function size:0x4C
|
||||
copyFrom__Q33ipl5scene22SDChannelSelectCommandFRCQ33ipl5scene22SDChannelSelectCommand = .text:0x813E2EF0; // type:function size:0x34
|
||||
@20@__dt__Q33ipl5scene15SDChannelSelectFv = .text:0x813E2F24; // type:function size:0x8
|
||||
__ct__Q33ipl5scene12SDChannelObjFPQ23EGG4Heapii = .text:0x813E2F2C; // type:function size:0x130
|
||||
__dt__Q33ipl5scene12SDChannelObjFv = .text:0x813E305C; // type:function size:0xA8
|
||||
@@ -4837,70 +4837,70 @@ onEvent__Q33ipl5scene22SDMenuEventHandlerBaseFUlUlPv = .text:0x813EB51C; // type
|
||||
onEventDerived__Q33ipl5scene22SDMenuEventHandlerBaseFUlUlPCQ33ipl10controller9Interface = .text:0x813EB5E8; // type:function size:0x4
|
||||
__ct__Q33ipl5scene8SDMemoryFv = .text:0x813EB5EC; // type:function size:0x48
|
||||
__dt__Q33ipl5scene8SDMemoryFv = .text:0x813EB634; // type:function size:0x5C
|
||||
iplSDMemory_813EB690 = .text:0x813EB690; // type:function size:0x10A0
|
||||
iplSDMemory_813EC730 = .text:0x813EC730; // type:function size:0xD4
|
||||
iplSDMemory_813EC804 = .text:0x813EC804; // type:function size:0x144
|
||||
iplSDMemory_813EC948 = .text:0x813EC948; // type:function size:0x20
|
||||
iplSDMemory_813EC968 = .text:0x813EC968; // type:function size:0x84
|
||||
iplSDMemory_813EC9EC = .text:0x813EC9EC; // type:function size:0x9C
|
||||
iplSDMemory_813ECA88 = .text:0x813ECA88; // type:function size:0x74
|
||||
iplSDMemory_813ECAFC = .text:0x813ECAFC; // type:function size:0x74
|
||||
iplSDMemory_813ECB70 = .text:0x813ECB70; // type:function size:0x78
|
||||
iplSDMemory_813ECBE8 = .text:0x813ECBE8; // type:function size:0x78
|
||||
iplSDMemory_813ECC60 = .text:0x813ECC60; // type:function size:0x160
|
||||
iplSDMemory_813ECDC0 = .text:0x813ECDC0; // type:function size:0x60
|
||||
iplSDMemory_813ECE20 = .text:0x813ECE20; // type:function size:0x60
|
||||
iplSDMemory_813ECE80 = .text:0x813ECE80; // type:function size:0x64
|
||||
iplSDMemory_813ECEE4 = .text:0x813ECEE4; // type:function size:0x64
|
||||
iplSDMemory_813ECF48 = .text:0x813ECF48; // type:function size:0x13C
|
||||
iplSDMemory_813ED084 = .text:0x813ED084; // type:function size:0x268
|
||||
iplSDMemory_813ED2EC = .text:0x813ED2EC; // type:function size:0x4CC
|
||||
iplSDMemory_813ED7B8 = .text:0x813ED7B8; // type:function size:0xA4
|
||||
iplSDMemory_813ED85C = .text:0x813ED85C; // type:function size:0xC4
|
||||
iplSDMemory_813ED920 = .text:0x813ED920; // type:function size:0x124
|
||||
iplSDMemory_813EDA44 = .text:0x813EDA44; // type:function size:0x110
|
||||
iplSDMemory_813EDB54 = .text:0x813EDB54; // type:function size:0x78
|
||||
iplSDMemory_813EDBCC = .text:0x813EDBCC; // type:function size:0xC0
|
||||
iplSDMemory_813EDC8C = .text:0x813EDC8C; // type:function size:0x278
|
||||
iplSDMemory_813EDF04 = .text:0x813EDF04; // type:function size:0xA4
|
||||
iplSDMemory_813EDFA8 = .text:0x813EDFA8; // type:function size:0x130
|
||||
iplSDMemory_813EE0D8 = .text:0x813EE0D8; // type:function size:0xE0
|
||||
iplSDMemory_813EE1B8 = .text:0x813EE1B8; // type:function size:0x1A0
|
||||
create__Q33ipl5scene8SDMemoryFPQ23EGG4HeapPQ33ipl4nand10LayoutFilePQ33ipl5scene15SDChannelSelect = .text:0x813EB690; // type:function size:0x10A0
|
||||
setTitleLists__Q33ipl5scene8SDMemoryFRCQ43ipl5scene8SDMemory10TitleRangeRCQ43ipl5scene8SDMemory10TitleRange = .text:0x813EC730; // type:function size:0xD4
|
||||
setScrollLimit__Q33ipl5scene8SDMemoryFv = .text:0x813EC804; // type:function size:0x144
|
||||
init__Q33ipl7utility8ScrollerFv = .text:0x813EC948; // type:function size:0x20
|
||||
resetScrollArrows__Q33ipl5scene8SDMemoryFv = .text:0x813EC968; // type:function size:0x84
|
||||
updateScrollArrows__Q33ipl5scene8SDMemoryFUlUlUlUl = .text:0x813EC9EC; // type:function size:0x9C
|
||||
showDownArrow__Q33ipl5scene8SDMemoryFv = .text:0x813ECA88; // type:function size:0x74
|
||||
showUpArrow__Q33ipl5scene8SDMemoryFv = .text:0x813ECAFC; // type:function size:0x74
|
||||
hideDownArrow__Q33ipl5scene8SDMemoryFv = .text:0x813ECB70; // type:function size:0x78
|
||||
hideUpArrow__Q33ipl5scene8SDMemoryFv = .text:0x813ECBE8; // type:function size:0x78
|
||||
updateSideArrows__Q33ipl5scene8SDMemoryFv = .text:0x813ECC60; // type:function size:0x160
|
||||
showLeftArrow__Q33ipl5scene8SDMemoryFv = .text:0x813ECDC0; // type:function size:0x60
|
||||
showRightArrow__Q33ipl5scene8SDMemoryFv = .text:0x813ECE20; // type:function size:0x60
|
||||
hideLeftArrow__Q33ipl5scene8SDMemoryFv = .text:0x813ECE80; // type:function size:0x64
|
||||
hideRightArrow__Q33ipl5scene8SDMemoryFv = .text:0x813ECEE4; // type:function size:0x64
|
||||
resetDialogPaneAnimations__Q33ipl5scene8SDMemoryFv = .text:0x813ECF48; // type:function size:0x13C
|
||||
calc__Q33ipl5scene8SDMemoryFv = .text:0x813ED084; // type:function size:0x268
|
||||
updateState__Q33ipl5scene8SDMemoryFv = .text:0x813ED2EC; // type:function size:0x4CC
|
||||
onDialogState0__Q33ipl5scene8SDMemoryFv = .text:0x813ED7B8; // type:function size:0xA4
|
||||
onDialogState2__Q33ipl5scene8SDMemoryFv = .text:0x813ED85C; // type:function size:0xC4
|
||||
onDialogState3__Q33ipl5scene8SDMemoryFv = .text:0x813ED920; // type:function size:0x124
|
||||
onDialogState4__Q33ipl5scene8SDMemoryFv = .text:0x813EDA44; // type:function size:0x110
|
||||
onDialogState6__Q33ipl5scene8SDMemoryFv = .text:0x813EDB54; // type:function size:0x78
|
||||
onDialogState7__Q33ipl5scene8SDMemoryFv = .text:0x813EDBCC; // type:function size:0xC0
|
||||
onDialogState8__Q33ipl5scene8SDMemoryFv = .text:0x813EDC8C; // type:function size:0x278
|
||||
onDialogState9__Q33ipl5scene8SDMemoryFv = .text:0x813EDF04; // type:function size:0xA4
|
||||
onDialogState10__Q33ipl5scene8SDMemoryFv = .text:0x813EDFA8; // type:function size:0x130
|
||||
onDialogState11__Q33ipl5scene8SDMemoryFv = .text:0x813EE0D8; // type:function size:0xE0
|
||||
onDialogState12__Q33ipl5scene8SDMemoryFv = .text:0x813EE1B8; // type:function size:0x1A0
|
||||
iplSDMemory_813EE358 = .text:0x813EE358; // type:function size:0x44
|
||||
iplSDMemory_813EE39C = .text:0x813EE39C; // type:function size:0xEC
|
||||
iplSDMemory_813EE488 = .text:0x813EE488; // type:function size:0x1C4
|
||||
iplSDMemory_813EE64C = .text:0x813EE64C; // type:function size:0x12C
|
||||
iplSDMemory_813EE778 = .text:0x813EE778; // type:function size:0xA0
|
||||
iplSDMemory_813EE818 = .text:0x813EE818; // type:function size:0x128
|
||||
iplSDMemory_813EE940 = .text:0x813EE940; // type:function size:0xE8
|
||||
iplSDMemory_813EEA28 = .text:0x813EEA28; // type:function size:0x84
|
||||
iplSDMemory_813EEAAC = .text:0x813EEAAC; // type:function size:0xE8
|
||||
iplSDMemory_813EEB94 = .text:0x813EEB94; // type:function size:0x148
|
||||
iplSDMemory_813EECDC = .text:0x813EECDC; // type:function size:0x11C
|
||||
iplSDMemory_813EEDF8 = .text:0x813EEDF8; // type:function size:0x78
|
||||
iplSDMemory_813EEE70 = .text:0x813EEE70; // type:function size:0xC0
|
||||
iplSDMemory_813EEF30 = .text:0x813EEF30; // type:function size:0x88
|
||||
iplSDMemory_813EEFB8 = .text:0x813EEFB8; // type:function size:0x70C
|
||||
iplSDMemory_813EF6C4 = .text:0x813EF6C4; // type:function size:0x14
|
||||
iplSDMemory_813EF6D8 = .text:0x813EF6D8; // type:function size:0x48
|
||||
onDialogState13__Q33ipl5scene8SDMemoryFv = .text:0x813EE39C; // type:function size:0xEC
|
||||
onDialogState14__Q33ipl5scene8SDMemoryFv = .text:0x813EE488; // type:function size:0x1C4
|
||||
onDialogState15__Q33ipl5scene8SDMemoryFv = .text:0x813EE64C; // type:function size:0x12C
|
||||
onDialogState16__Q33ipl5scene8SDMemoryFv = .text:0x813EE778; // type:function size:0xA0
|
||||
onDialogState17__Q33ipl5scene8SDMemoryFv = .text:0x813EE818; // type:function size:0x128
|
||||
onDialogState18__Q33ipl5scene8SDMemoryFv = .text:0x813EE940; // type:function size:0xE8
|
||||
onDialogState19__Q33ipl5scene8SDMemoryFv = .text:0x813EEA28; // type:function size:0x84
|
||||
onDialogState20__Q33ipl5scene8SDMemoryFv = .text:0x813EEAAC; // type:function size:0xE8
|
||||
onDialogState21__Q33ipl5scene8SDMemoryFv = .text:0x813EEB94; // type:function size:0x148
|
||||
onDialogState22__Q33ipl5scene8SDMemoryFv = .text:0x813EECDC; // type:function size:0x11C
|
||||
onDialogState23__Q33ipl5scene8SDMemoryFv = .text:0x813EEDF8; // type:function size:0x78
|
||||
onDialogState24__Q33ipl5scene8SDMemoryFv = .text:0x813EEE70; // type:function size:0xC0
|
||||
draw__Q33ipl5scene8SDMemoryFv = .text:0x813EEF30; // type:function size:0x88
|
||||
drawTransferTitles__Q33ipl5scene8SDMemoryFv = .text:0x813EEFB8; // type:function size:0x70C
|
||||
writeFourFlagBytes__Q23ipl5sceneFPUcUcUcUcUc = .text:0x813EF6C4; // type:function size:0x14
|
||||
setTitleRowColors__Q23ipl5sceneFPQ34nw4r3lyt7TextBoxRCQ34nw4r2ut5ColorRCQ34nw4r2ut5Color = .text:0x813EF6D8; // type:function size:0x48
|
||||
GetBeginIter__Q34nw4r2ut28LinkList<Q34nw4r3lyt4Pane,4>Fv = .text:0x813EF720; // type:function size:0x8
|
||||
iplSDMemory_813EF728 = .text:0x813EF728; // type:function size:0x8
|
||||
GetEndIter__Q34nw4r2ut28LinkList<Q34nw4r3lyt4Pane,4>Fv = .text:0x813EF728; // type:function size:0x8
|
||||
__ne__Q24nw4r2utFQ44nw4r2ut28LinkList<Q34nw4r3lyt4Pane,4>8IteratorQ44nw4r2ut28LinkList<Q34nw4r3lyt4Pane,4>8Iterator = .text:0x813EF730; // type:function size:0x18
|
||||
iplSDMemory_813EF748 = .text:0x813EF748; // type:function size:0x74
|
||||
iplSDMemory_813EF7BC = .text:0x813EF7BC; // type:function size:0x128
|
||||
iplSDMemory_813EF8E4 = .text:0x813EF8E4; // type:function size:0xF0
|
||||
iplSDMemory_813EF9D4 = .text:0x813EF9D4; // type:function size:0x120
|
||||
iplSDMemory_813EFAF4 = .text:0x813EFAF4; // type:function size:0xD8
|
||||
iplSDMemory_813EFBCC = .text:0x813EFBCC; // type:function size:0xC0
|
||||
iplSDMemory_813EFC8C = .text:0x813EFC8C; // type:function size:0x160
|
||||
iplSDMemory_813EFDEC = .text:0x813EFDEC; // type:function size:0x128
|
||||
iplSDMemory_813EFF14 = .text:0x813EFF14; // type:function size:0x24C
|
||||
iplSDMemory_813F0160 = .text:0x813F0160; // type:function size:0xD8
|
||||
iplSDMemory_813F0238 = .text:0x813F0238; // type:function size:0x74
|
||||
iplSDMemory_813F02AC = .text:0x813F02AC; // type:function size:0x144
|
||||
iplSDMemory_813F03F0 = .text:0x813F03F0; // type:function size:0x10C
|
||||
iplSDMemory_813F04FC = .text:0x813F04FC; // type:function size:0x1A0
|
||||
iplSDMemory_813F069C = .text:0x813F069C; // type:function size:0xD8
|
||||
getControlPaneIndex__Q33ipl5scene8SDMemoryFPCc = .text:0x813EF748; // type:function size:0x74
|
||||
activateControlPane__Q33ipl5scene8SDMemoryFPCcPQ23gui9Component = .text:0x813EF7BC; // type:function size:0x128
|
||||
deactivateControlPane__Q33ipl5scene8SDMemoryFPCc = .text:0x813EF8E4; // type:function size:0xF0
|
||||
cancelControlPane__Q33ipl5scene8SDMemoryFPCc = .text:0x813EF9D4; // type:function size:0x120
|
||||
onEvent__Q43ipl5scene8SDMemory23ControlPaneEventHandlerFUlUlPv = .text:0x813EFAF4; // type:function size:0xD8
|
||||
getTitlePaneIndex__Q33ipl5scene8SDMemoryFPCc = .text:0x813EFBCC; // type:function size:0xC0
|
||||
activateTitlePane__Q33ipl5scene8SDMemoryFPCcPQ23gui9Component = .text:0x813EFC8C; // type:function size:0x160
|
||||
deactivateTitlePane__Q33ipl5scene8SDMemoryFPCc = .text:0x813EFDEC; // type:function size:0x128
|
||||
selectTitlePane__Q33ipl5scene8SDMemoryFPCc = .text:0x813EFF14; // type:function size:0x24C
|
||||
onEvent__Q43ipl5scene8SDMemory21TitlePaneEventHandlerFUlUlPv = .text:0x813F0160; // type:function size:0xD8
|
||||
getDialogPaneIndex__Q33ipl5scene8SDMemoryFPCc = .text:0x813F0238; // type:function size:0x74
|
||||
activateDialogPane__Q33ipl5scene8SDMemoryFPCcPQ23gui9Component = .text:0x813F02AC; // type:function size:0x144
|
||||
deactivateDialogPane__Q33ipl5scene8SDMemoryFPCc = .text:0x813F03F0; // type:function size:0x10C
|
||||
selectDialogPane__Q33ipl5scene8SDMemoryFPCc = .text:0x813F04FC; // type:function size:0x1A0
|
||||
onEvent__Q43ipl5scene8SDMemory22DialogPaneEventHandlerFUlUlPv = .text:0x813F069C; // type:function size:0xD8
|
||||
__ct__Q33ipl5scene7SettingFPQ23EGG4Heapi = .text:0x813F0774; // type:function size:0xF8
|
||||
isAnimating__Q33ipl5scene7SettingFv = .text:0x813F086C; // type:function size:0x3C
|
||||
getFuncMsgQ__Q33ipl5scene7SettingFv = .text:0x813F08A8; // type:function size:0x68
|
||||
@@ -13835,8 +13835,8 @@ scAnmTable__10homebutton = .rodata:0x8160F378; // type:object size:0x60 scope:lo
|
||||
scGroupAnmTable__10homebutton = .rodata:0x8160F3D8; // type:object size:0x250 scope:local data:4byte
|
||||
__DVDErrorMessage = .rodata:0x8160F628; // type:object size:0x28
|
||||
lbl_8160F650 = .rodata:0x8160F650; // type:object size:0x16 data:2byte
|
||||
lbl_8160F668 = .rodata:0x8160F668; // type:object size:0xB data:byte
|
||||
lbl_8160F673 = .rodata:0x8160F673; // type:object size:0xC data:byte
|
||||
specials$18760 = .rodata:0x8160F668; // type:object size:0xB data:byte
|
||||
@19145 = .rodata:0x8160F673; // type:object size:0xC data:byte
|
||||
lbl_8160F67F = .rodata:0x8160F67F; // type:object size:0xD data:byte
|
||||
lbl_8160F690 = .rodata:0x8160F690; // type:object size:0x18 data:2byte
|
||||
scAnmFrame__Q23ipl5scene = .rodata:0x8160F6A8; // type:object size:0x20 scope:local
|
||||
@@ -13938,7 +13938,7 @@ pppURLCheck = .rodata:0x816152A8; // type:object size:0x28 scope:local
|
||||
lbl_816152D0 = .rodata:0x816152D0; // type:object size:0x10 scope:local data:4byte
|
||||
csAninationFile__Q29textinput12candidatebox = .rodata:0x816152E0; // type:object size:0x378 scope:local
|
||||
lbl_81615658 = .rodata:0x81615658; // type:object size:0xA0 scope:local data:4byte
|
||||
csAninationFile__Q29textinput7toolbar = .rodata:0x816156F8; // type:object size:0x1E0 scope:local data:4byte
|
||||
csAninationFile__Q29textinput7toolbar = .rodata:0x816156F8; // type:object size:0x1DC scope:local data:4byte
|
||||
csAninationFile__Q29textinput11predictlang = .rodata:0x816158D8; // type:object size:0x268 scope:local
|
||||
csAninationFileForSign__Q39textinput8keyboard10signwindow = .rodata:0x81615B40; // type:object size:0x268 scope:local
|
||||
csPaneNameToControlKey__Q39textinput8keyboard10signwindow = .rodata:0x81615DA8; // type:object size:0x48 scope:local
|
||||
@@ -15435,26 +15435,46 @@ __vt__Q33ipl5scene7Address = .data:0x81647B70; // type:object size:0x120
|
||||
@11177 = .data:0x81647D9A; // type:object size:0xF scope:local data:string
|
||||
__vt__Q33ipl5scene18AddressAddSelEvent = .data:0x81647DAC; // type:object size:0x18
|
||||
__vt__Q33ipl5scene13AddressAddSel = .data:0x81647DC4; // type:object size:0x88
|
||||
lbl_81647EE0 = .data:0x81647EE0; // type:object size:0xD data:string
|
||||
lbl_81647EED = .data:0x81647EED; // type:object size:0xD data:string
|
||||
lbl_81647EFA = .data:0x81647EFA; // type:object size:0xD data:string
|
||||
lbl_81647F07 = .data:0x81647F07; // type:object size:0xE data:string
|
||||
lbl_81647F15 = .data:0x81647F15; // type:object size:0xC data:string
|
||||
lbl_81647F24 = .data:0x81647F24; // type:object size:0x14
|
||||
lbl_81647F38 = .data:0x81647F38; // type:object size:0xE data:string
|
||||
lbl_81647F46 = .data:0x81647F46; // type:object size:0x83
|
||||
lbl_81647FC9 = .data:0x81647FC9; // type:object size:0xC data:string
|
||||
lbl_81647FD5 = .data:0x81647FD5; // type:object size:0x128
|
||||
lbl_816480FD = .data:0x816480FD; // type:object size:0xE data:string
|
||||
lbl_8164810B = .data:0x8164810B; // type:object size:0x1F5
|
||||
jumptable_81648300 = .data:0x81648300; // type:object size:0xC0 scope:local
|
||||
jumptable_816483C0 = .data:0x816483C0; // type:object size:0xC0 scope:local
|
||||
lbl_8164848D = .data:0x8164848D; // type:object size:0x16 data:string
|
||||
lbl_816484A3 = .data:0x816484A3; // type:object size:0xF data:string
|
||||
jumptable_816484B4 = .data:0x816484B4; // type:object size:0x44 scope:local
|
||||
jumptable_81648508 = .data:0x81648508; // type:object size:0x58 scope:local
|
||||
jumptable_81648560 = .data:0x81648560; // type:object size:0x8C scope:local
|
||||
lbl_816485EC = .data:0x816485EC; // type:object size:0xC data:wstring
|
||||
@16959 = .data:0x81647EE0; // type:object size:0xD data:string
|
||||
@16960 = .data:0x81647EED; // type:object size:0xD data:string
|
||||
@16961 = .data:0x81647EFA; // type:object size:0xD data:string
|
||||
@16962 = .data:0x81647F07; // type:object size:0xE data:string
|
||||
@16963 = .data:0x81647F15; // type:object size:0xC data:string
|
||||
sButtonPaneNames = .data:0x81647F24; // type:object size:0x14
|
||||
@16964 = .data:0x81647F38; // type:object size:0xE data:string
|
||||
@23886 = .data:0x81647F46; // type:object size:0xC data:string
|
||||
@24207 = .data:0x81647F52; // type:object size:0x12 data:string
|
||||
@24208 = .data:0x81647F64; // type:object size:0x1C data:string
|
||||
@24209 = .data:0x81647F80; // type:object size:0xF data:string
|
||||
@24210 = .data:0x81647F8F; // type:object size:0x19 data:string
|
||||
@24211 = .data:0x81647FA8; // type:object size:0xB data:string
|
||||
@24212 = .data:0x81647FB3; // type:object size:0xB data:string
|
||||
@24213 = .data:0x81647FBE; // type:object size:0xB data:string
|
||||
@24214 = .data:0x81647FC9; // type:object size:0xC data:string
|
||||
@24215 = .data:0x81647FD5; // type:object size:0xE data:string
|
||||
@24216 = .data:0x81647FE3; // type:object size:0x1A data:string
|
||||
@24217 = .data:0x81647FFD; // type:object size:0x1A data:string
|
||||
@24218 = .data:0x81648017; // type:object size:0x1D data:string
|
||||
@24219 = .data:0x81648034; // type:object size:0x1E data:string
|
||||
@24220 = .data:0x81648052; // type:object size:0xC data:string
|
||||
@24221 = .data:0x8164805E; // type:object size:0x22 data:string
|
||||
@24222 = .data:0x81648080; // type:object size:0x9 data:string
|
||||
@24223 = .data:0x81648089; // type:object size:0x23 data:string
|
||||
@24224 = .data:0x816480AC; // type:object size:0x1C data:string
|
||||
@24225 = .data:0x816480C8; // type:object size:0xD data:string
|
||||
@24226 = .data:0x816480D5; // type:object size:0xD data:string
|
||||
@24227 = .data:0x816480E2; // type:object size:0xD data:string
|
||||
@24228 = .data:0x816480EF; // type:object size:0xE data:string
|
||||
@24229 = .data:0x816480FD; // type:object size:0xE data:string
|
||||
@24231 = .data:0x8164810B; // type:object size:0x1F5
|
||||
@25188 = .data:0x81648300; // type:object size:0xC0 scope:local
|
||||
@25187 = .data:0x816483C0; // type:object size:0xC0 scope:local
|
||||
@25711 = .data:0x8164848D; // type:object size:0x16 data:string
|
||||
@25835 = .data:0x816484A3; // type:object size:0xF data:string
|
||||
@25838 = .data:0x816484B4; // type:object size:0x44 scope:local
|
||||
@26007 = .data:0x81648508; // type:object size:0x58 scope:local
|
||||
@26006 = .data:0x81648560; // type:object size:0x8C scope:local
|
||||
@26030 = .data:0x816485EC; // type:object size:0xC data:wstring
|
||||
__vt__Q33ipl5scene17AddressInputEvent = .data:0x816485F8; // type:object size:0x18
|
||||
__vt__Q33ipl5scene16AddressEditEvent = .data:0x81648610; // type:object size:0x18
|
||||
__vt__Q33ipl5scene11AddressEdit = .data:0x81648628; // type:object size:0x120
|
||||
@@ -15733,47 +15753,47 @@ panes__Q23ipl5scene = .data:0x8164C8A4; // type:object size:0xB4 scope:local
|
||||
@16662 = .data:0x8164CBF4; // type:object size:0xC scope:local data:string
|
||||
@16898 = .data:0x8164CC00; // type:object size:0x1A scope:local data:string
|
||||
__vt__Q33ipl5scene11ChannelEdit = .data:0x8164CC1C; // type:object size:0x4C
|
||||
lbl_8164CC68 = .data:0x8164CC68; // type:object size:0x21 data:string
|
||||
lbl_8164CC89 = .data:0x8164CC89; // type:object size:0xA data:string
|
||||
lbl_8164CC93 = .data:0x8164CC93; // type:object size:0x22 data:string
|
||||
lbl_8164CCB5 = .data:0x8164CCB5; // type:object size:0x23 data:string
|
||||
lbl_8164CCD8 = .data:0x8164CCD8; // type:object size:0x9 data:string
|
||||
lbl_8164CCE1 = .data:0x8164CCE1; // type:object size:0x2C data:string
|
||||
lbl_8164CD0D = .data:0x8164CD0D; // type:object size:0xC data:string
|
||||
lbl_8164CD19 = .data:0x8164CD19; // type:object size:0x2D data:string
|
||||
lbl_8164CD46 = .data:0x8164CD46; // type:object size:0x29 data:string
|
||||
lbl_8164CD6F = .data:0x8164CD6F; // type:object size:0x25 data:string
|
||||
lbl_8164CD94 = .data:0x8164CD94; // type:object size:0xB data:string
|
||||
lbl_8164CD9F = .data:0x8164CD9F; // type:object size:0x26 data:string
|
||||
lbl_8164CDC5 = .data:0x8164CDC5; // type:object size:0x28 data:string
|
||||
lbl_8164CDED = .data:0x8164CDED; // type:object size:0x20 data:string
|
||||
lbl_8164CE0D = .data:0x8164CE0D; // type:object size:0x20 data:string
|
||||
lbl_8164CE2D = .data:0x8164CE2D; // type:object size:0x21 data:string
|
||||
lbl_8164CE4E = .data:0x8164CE4E; // type:object size:0xA data:string
|
||||
lbl_8164CE58 = .data:0x8164CE58; // type:object size:0xA data:string
|
||||
lbl_8164CE62 = .data:0x8164CE62; // type:object size:0x22 data:string
|
||||
lbl_8164CE84 = .data:0x8164CE84; // type:object size:0xD data:string
|
||||
lbl_8164CE91 = .data:0x8164CE91; // type:object size:0xD data:string
|
||||
lbl_8164CE9E = .data:0x8164CE9E; // type:object size:0x23 data:string
|
||||
lbl_8164CEC1 = .data:0x8164CEC1; // type:object size:0x1F data:string
|
||||
lbl_8164CEE0 = .data:0x8164CEE0; // type:object size:0xA data:string
|
||||
lbl_8164CEEA = .data:0x8164CEEA; // type:object size:0x21 data:string
|
||||
lbl_8164CF0B = .data:0x8164CF0B; // type:object size:0xB data:string
|
||||
lbl_8164CF16 = .data:0x8164CF16; // type:object size:0xB data:string
|
||||
lbl_8164CF21 = .data:0x8164CF21; // type:object size:0x1F data:string
|
||||
lbl_8164CF40 = .data:0x8164CF40; // type:object size:0x25 data:string
|
||||
lbl_8164CF65 = .data:0x8164CF65; // type:object size:0xB data:string
|
||||
lbl_8164CF70 = .data:0x8164CF70; // type:object size:0x26 data:string
|
||||
lbl_8164CF96 = .data:0x8164CF96; // type:object size:0xF data:string
|
||||
lbl_8164CFA5 = .data:0x8164CFA5; // type:object size:0xF data:string
|
||||
lbl_8164CFB4 = .data:0x8164CFB4; // type:object size:0xE data:string
|
||||
lbl_8164CFC2 = .data:0x8164CFC2; // type:object size:0xE data:string
|
||||
lbl_8164CFD0 = .data:0x8164CFD0; // type:object size:0xB data:string
|
||||
lbl_8164CFDB = .data:0x8164CFDB; // type:object size:0xA data:string
|
||||
lbl_8164CFE5 = .data:0x8164CFE5; // type:object size:0xA data:string
|
||||
lbl_8164CFEF = .data:0x8164CFEF; // type:object size:0xF data:string
|
||||
lbl_8164CFFE = .data:0x8164CFFE; // type:object size:0xE data:string
|
||||
jumptable_8164D00C = .data:0x8164D00C; // type:object size:0x30 scope:local
|
||||
@17285 = .data:0x8164CC68; // type:object size:0x21 scope:local data:string
|
||||
@17286 = .data:0x8164CC89; // type:object size:0xA scope:local data:string
|
||||
@17287 = .data:0x8164CC93; // type:object size:0x22 scope:local data:string
|
||||
@17288 = .data:0x8164CCB5; // type:object size:0x23 scope:local data:string
|
||||
@17289 = .data:0x8164CCD8; // type:object size:0x9 scope:local data:string
|
||||
@17290 = .data:0x8164CCE1; // type:object size:0x2C scope:local data:string
|
||||
@17291 = .data:0x8164CD0D; // type:object size:0xC scope:local data:string
|
||||
@17292 = .data:0x8164CD19; // type:object size:0x2D scope:local data:string
|
||||
@17293 = .data:0x8164CD46; // type:object size:0x29 scope:local data:string
|
||||
@17294 = .data:0x8164CD6F; // type:object size:0x25 scope:local data:string
|
||||
@17295 = .data:0x8164CD94; // type:object size:0xB scope:local data:string
|
||||
@17296 = .data:0x8164CD9F; // type:object size:0x26 scope:local data:string
|
||||
@17297 = .data:0x8164CDC5; // type:object size:0x28 scope:local data:string
|
||||
@17298 = .data:0x8164CDED; // type:object size:0x20 scope:local data:string
|
||||
@17300 = .data:0x8164CE0D; // type:object size:0x20 scope:local data:string
|
||||
@17301 = .data:0x8164CE2D; // type:object size:0x21 scope:local data:string
|
||||
@17302 = .data:0x8164CE4E; // type:object size:0xA scope:local data:string
|
||||
@17303 = .data:0x8164CE58; // type:object size:0xA scope:local data:string
|
||||
@17304 = .data:0x8164CE62; // type:object size:0x22 scope:local data:string
|
||||
@17305 = .data:0x8164CE84; // type:object size:0xD scope:local data:string
|
||||
@17306 = .data:0x8164CE91; // type:object size:0xD scope:local data:string
|
||||
@17307 = .data:0x8164CE9E; // type:object size:0x23 scope:local data:string
|
||||
@17308 = .data:0x8164CEC1; // type:object size:0x1F scope:local data:string
|
||||
@17309 = .data:0x8164CEE0; // type:object size:0xA scope:local data:string
|
||||
@17310 = .data:0x8164CEEA; // type:object size:0x21 scope:local data:string
|
||||
@17311 = .data:0x8164CF0B; // type:object size:0xB scope:local data:string
|
||||
@17312 = .data:0x8164CF16; // type:object size:0xB scope:local data:string
|
||||
@17313 = .data:0x8164CF21; // type:object size:0x1F scope:local data:string
|
||||
@17314 = .data:0x8164CF40; // type:object size:0x25 scope:local data:string
|
||||
@17315 = .data:0x8164CF65; // type:object size:0xB scope:local data:string
|
||||
@17316 = .data:0x8164CF70; // type:object size:0x26 scope:local data:string
|
||||
@17317 = .data:0x8164CF96; // type:object size:0xF scope:local data:string
|
||||
@17318 = .data:0x8164CFA5; // type:object size:0xF scope:local data:string
|
||||
@17319 = .data:0x8164CFB4; // type:object size:0xE scope:local data:string
|
||||
@17320 = .data:0x8164CFC2; // type:object size:0xE scope:local data:string
|
||||
@17321 = .data:0x8164CFD0; // type:object size:0xB scope:local data:string
|
||||
@17325 = .data:0x8164CFDB; // type:object size:0xA scope:local data:string
|
||||
@17326 = .data:0x8164CFE5; // type:object size:0xA scope:local data:string
|
||||
@17329 = .data:0x8164CFEF; // type:object size:0xF scope:local data:string
|
||||
@17330 = .data:0x8164CFFE; // type:object size:0xE scope:local data:string
|
||||
@17390 = .data:0x8164D00C; // type:object size:0x30 scope:local
|
||||
__vt__Q33ipl5scene11ChanAppBase = .data:0x8164D03C; // type:object size:0x28
|
||||
__vt__Q33ipl5scene13AnmController = .data:0x8164D0F8; // type:object size:0xC scope:weak
|
||||
lbl_8164D108 = .data:0x8164D108; // type:object size:0x25 data:string
|
||||
@@ -15791,56 +15811,56 @@ lbl_8164D1F4 = .data:0x8164D1F4; // type:object size:0xA data:string
|
||||
lbl_8164D1FE = .data:0x8164D1FE; // type:object size:0x11 data:string
|
||||
lbl_8164D20F = .data:0x8164D20F; // type:object size:0x11 data:string
|
||||
__vt__Q33ipl5scene10ChanAppBox = .data:0x8164D220; // type:object size:0x28
|
||||
lbl_8164D2E8 = .data:0x8164D2E8; // type:object size:0x20 data:string
|
||||
lbl_8164D308 = .data:0x8164D308; // type:object size:0x21 data:string
|
||||
lbl_8164D329 = .data:0x8164D329; // type:object size:0x26 data:string
|
||||
lbl_8164D34F = .data:0x8164D34F; // type:object size:0x27 data:string
|
||||
lbl_8164D376 = .data:0x8164D376; // type:object size:0x23 data:string
|
||||
lbl_8164D399 = .data:0x8164D399; // type:object size:0xC data:string
|
||||
lbl_8164D3A5 = .data:0x8164D3A5; // type:object size:0x25 data:string
|
||||
lbl_8164D3CA = .data:0x8164D3CA; // type:object size:0x26 data:string
|
||||
lbl_8164D3F0 = .data:0x8164D3F0; // type:object size:0x22 data:string
|
||||
lbl_8164D412 = .data:0x8164D412; // type:object size:0xB data:string
|
||||
lbl_8164D41D = .data:0x8164D41D; // type:object size:0x23 data:string
|
||||
lbl_8164D440 = .data:0x8164D440; // type:object size:0x9 data:string
|
||||
lbl_8164D449 = .data:0x8164D449; // type:object size:0x24 data:string
|
||||
lbl_8164D46D = .data:0x8164D46D; // type:object size:0x26 data:string
|
||||
lbl_8164D493 = .data:0x8164D493; // type:object size:0x1E data:string
|
||||
lbl_8164D4B1 = .data:0x8164D4B1; // type:object size:0x26 data:string
|
||||
lbl_8164D4D7 = .data:0x8164D4D7; // type:object size:0x26 data:string
|
||||
lbl_8164D4FD = .data:0x8164D4FD; // type:object size:0x27 data:string
|
||||
lbl_8164D524 = .data:0x8164D524; // type:object size:0x23 data:string
|
||||
lbl_8164D547 = .data:0x8164D547; // type:object size:0xC data:string
|
||||
lbl_8164D553 = .data:0x8164D553; // type:object size:0xA data:string
|
||||
lbl_8164D55D = .data:0x8164D55D; // type:object size:0xA data:string
|
||||
lbl_8164D567 = .data:0x8164D567; // type:object size:0x9 data:string
|
||||
lbl_8164D570 = .data:0x8164D570; // type:object size:0xB data:string
|
||||
lbl_8164D57B = .data:0x8164D57B; // type:object size:0xB data:string
|
||||
lbl_8164D586 = .data:0x8164D586; // type:object size:0xD data:string
|
||||
lbl_8164D593 = .data:0x8164D593; // type:object size:0xB data:string
|
||||
lbl_8164D59E = .data:0x8164D59E; // type:object size:0xB data:string
|
||||
lbl_8164D5A9 = .data:0x8164D5A9; // type:object size:0xB data:string
|
||||
lbl_8164D5B4 = .data:0x8164D5B4; // type:object size:0xB data:string
|
||||
lbl_8164D5BF = .data:0x8164D5BF; // type:object size:0x9 data:string
|
||||
lbl_8164D5C8 = .data:0x8164D5C8; // type:object size:0xB data:string
|
||||
lbl_8164D5D3 = .data:0x8164D5D3; // type:object size:0xB data:string
|
||||
lbl_8164D5DE = .data:0x8164D5DE; // type:object size:0xA data:string
|
||||
lbl_8164D5E8 = .data:0x8164D5E8; // type:object size:0xB data:string
|
||||
lbl_8164D5F3 = .data:0x8164D5F3; // type:object size:0xD data:string
|
||||
lbl_8164D600 = .data:0x8164D600; // type:object size:0x10 data:string
|
||||
lbl_8164D610 = .data:0x8164D610; // type:object size:0xB data:string
|
||||
lbl_8164D61B = .data:0x8164D61B; // type:object size:0xE data:string
|
||||
lbl_8164D629 = .data:0x8164D629; // type:object size:0xA data:string
|
||||
lbl_8164D633 = .data:0x8164D633; // type:object size:0xA data:string
|
||||
lbl_8164D63D = .data:0x8164D63D; // type:object size:0x9 data:string
|
||||
jumptable_8164D648 = .data:0x8164D648; // type:object size:0x34 scope:local
|
||||
lbl_8164D67C = .data:0x8164D67C; // type:object size:0xF data:string
|
||||
lbl_8164D68B = .data:0x8164D68B; // type:object size:0xE data:string
|
||||
lbl_8164D699 = .data:0x8164D699; // type:object size:0xA data:string
|
||||
lbl_8164D6A3 = .data:0x8164D6A3; // type:object size:0xC data:string
|
||||
lbl_8164D6AF = .data:0x8164D6AF; // type:object size:0xC data:string
|
||||
lbl_8164D6BB = .data:0x8164D6BB; // type:object size:0xB data:string
|
||||
lbl_8164D6C6 = .data:0x8164D6C6; // type:object size:0xF data:string
|
||||
@18429 = .data:0x8164D2E8; // type:object size:0x20 scope:local data:string
|
||||
@18431 = .data:0x8164D308; // type:object size:0x21 scope:local data:string
|
||||
@18432 = .data:0x8164D329; // type:object size:0x26 scope:local data:string
|
||||
@18434 = .data:0x8164D34F; // type:object size:0x27 scope:local data:string
|
||||
@18435 = .data:0x8164D376; // type:object size:0x23 scope:local data:string
|
||||
@18436 = .data:0x8164D399; // type:object size:0xC scope:local data:string
|
||||
@18437 = .data:0x8164D3A5; // type:object size:0x25 scope:local data:string
|
||||
@18439 = .data:0x8164D3CA; // type:object size:0x26 scope:local data:string
|
||||
@18440 = .data:0x8164D3F0; // type:object size:0x22 scope:local data:string
|
||||
@18441 = .data:0x8164D412; // type:object size:0xB scope:local data:string
|
||||
@18442 = .data:0x8164D41D; // type:object size:0x23 scope:local data:string
|
||||
@18443 = .data:0x8164D440; // type:object size:0x9 scope:local data:string
|
||||
@18444 = .data:0x8164D449; // type:object size:0x24 scope:local data:string
|
||||
@18445 = .data:0x8164D46D; // type:object size:0x26 scope:local data:string
|
||||
@18446 = .data:0x8164D493; // type:object size:0x1E scope:local data:string
|
||||
@18448 = .data:0x8164D4B1; // type:object size:0x26 scope:local data:string
|
||||
@18450 = .data:0x8164D4D7; // type:object size:0x26 scope:local data:string
|
||||
@18452 = .data:0x8164D4FD; // type:object size:0x27 scope:local data:string
|
||||
@18453 = .data:0x8164D524; // type:object size:0x23 scope:local data:string
|
||||
@18454 = .data:0x8164D547; // type:object size:0xC scope:local data:string
|
||||
@18455 = .data:0x8164D553; // type:object size:0xA scope:local data:string
|
||||
@18456 = .data:0x8164D55D; // type:object size:0xA scope:local data:string
|
||||
@18457 = .data:0x8164D567; // type:object size:0x9 scope:local data:string
|
||||
@18458 = .data:0x8164D570; // type:object size:0xB scope:local data:string
|
||||
@18460 = .data:0x8164D57B; // type:object size:0xB scope:local data:string
|
||||
@18461 = .data:0x8164D586; // type:object size:0xD scope:local data:string
|
||||
@18462 = .data:0x8164D593; // type:object size:0xB scope:local data:string
|
||||
@18463 = .data:0x8164D59E; // type:object size:0xB scope:local data:string
|
||||
@18464 = .data:0x8164D5A9; // type:object size:0xB scope:local data:string
|
||||
@18465 = .data:0x8164D5B4; // type:object size:0xB scope:local data:string
|
||||
@18467 = .data:0x8164D5BF; // type:object size:0x9 scope:local data:string
|
||||
@18469 = .data:0x8164D5C8; // type:object size:0xB scope:local data:string
|
||||
@18470 = .data:0x8164D5D3; // type:object size:0xB scope:local data:string
|
||||
@18471 = .data:0x8164D5DE; // type:object size:0xA scope:local data:string
|
||||
@18472 = .data:0x8164D5E8; // type:object size:0xB scope:local data:string
|
||||
@18473 = .data:0x8164D5F3; // type:object size:0xD scope:local data:string
|
||||
@18474 = .data:0x8164D600; // type:object size:0x10 scope:local data:string
|
||||
@18475 = .data:0x8164D610; // type:object size:0xB scope:local data:string
|
||||
@18476 = .data:0x8164D61B; // type:object size:0xE scope:local data:string
|
||||
@18477 = .data:0x8164D629; // type:object size:0xA scope:local data:string
|
||||
@18478 = .data:0x8164D633; // type:object size:0xA scope:local data:string
|
||||
@18479 = .data:0x8164D63D; // type:object size:0x9 scope:local data:string
|
||||
@18554 = .data:0x8164D648; // type:object size:0x34 scope:local
|
||||
@18692 = .data:0x8164D67C; // type:object size:0xF scope:local data:string
|
||||
@18693 = .data:0x8164D68B; // type:object size:0xE scope:local data:string
|
||||
@18695 = .data:0x8164D699; // type:object size:0xA scope:local data:string
|
||||
@18696 = .data:0x8164D6A3; // type:object size:0xC scope:local data:string
|
||||
@18697 = .data:0x8164D6AF; // type:object size:0xC scope:local data:string
|
||||
@18698 = .data:0x8164D6BB; // type:object size:0xB scope:local data:string
|
||||
@18826 = .data:0x8164D6C6; // type:object size:0xF scope:local data:string
|
||||
__vt__Q33ipl5scene11ChanAppEdit = .data:0x8164D6D8; // type:object size:0x28
|
||||
@15167 = .data:0x8164D7C0; // type:object size:0x7C scope:local
|
||||
...data.0 = .data:0x8164D7C0; // type:label scope:local
|
||||
@@ -17535,20 +17555,20 @@ __vt__Q39textinput12candidatebox4Base = .data:0x8165DFA8; // type:object size:0x
|
||||
__vt__Q39textinput12candidatebox18CandidateBoxCaller = .data:0x8165DFFC; // type:object size:0x1C
|
||||
__vt__Q39textinput11nw4rmanager11AnmObserver = .data:0x8165E018; // type:object size:0x4C
|
||||
__vt__Q39textinput4util12AnimObserver = .data:0x8165E064; // type:object size:0xC
|
||||
lbl_8165E070 = .data:0x8165E070; // type:object size:0xC data:string
|
||||
lbl_8165E080 = .data:0x8165E080; // type:object size:0x10 data:string
|
||||
lbl_8165E090 = .data:0x8165E090; // type:object size:0xD data:string
|
||||
lbl_8165E0A0 = .data:0x8165E0A0; // type:object size:0xC data:string
|
||||
@6142 = .data:0x8165E070; // type:object size:0xC scope:local data:string
|
||||
@6143 = .data:0x8165E080; // type:object size:0x10 scope:local data:string
|
||||
@6144 = .data:0x8165E090; // type:object size:0xD scope:local data:string
|
||||
@6145 = .data:0x8165E0A0; // type:object size:0xC scope:local data:string
|
||||
csPaneToAnimation__Q29textinput7toolbar = .data:0x8165E0B0; // type:object size:0x100
|
||||
lbl_8165E1B0 = .data:0x8165E1B0; // type:object size:0xD data:string
|
||||
lbl_8165E1C0 = .data:0x8165E1C0; // type:object size:0xC data:string
|
||||
lbl_8165E1CC = .data:0x8165E1CC; // type:object size:0xD data:string
|
||||
lbl_8165E1DC = .data:0x8165E1DC; // type:object size:0xC data:string
|
||||
lbl_8165E1E8 = .data:0x8165E1E8; // type:object size:0xC data:string
|
||||
lbl_8165E1F8 = .data:0x8165E1F8; // type:object size:0x10 data:string
|
||||
jumptable_8165E208 = .data:0x8165E208; // type:object size:0x30 scope:local
|
||||
lbl_8165E238 = .data:0x8165E238; // type:object size:0xC data:string
|
||||
jumptable_8165E244 = .data:0x8165E244; // type:object size:0x1C scope:local
|
||||
@6802 = .data:0x8165E1B0; // type:object size:0xD scope:local data:string
|
||||
@6805 = .data:0x8165E1C0; // type:object size:0xC scope:local data:string
|
||||
@6808 = .data:0x8165E1CC; // type:object size:0xD scope:local data:string
|
||||
@6812 = .data:0x8165E1DC; // type:object size:0xC scope:local data:string
|
||||
@6816 = .data:0x8165E1E8; // type:object size:0xC scope:local data:string
|
||||
@6817 = .data:0x8165E1F8; // type:object size:0x10 scope:local data:string
|
||||
@6837 = .data:0x8165E208; // type:object size:0x30 scope:local
|
||||
@6894 = .data:0x8165E238; // type:object size:0xC scope:local data:string
|
||||
@6937 = .data:0x8165E244; // type:object size:0x1C scope:local
|
||||
__vt__Q39textinput7toolbar19ToggleButtonAnmPane = .data:0x8165E260; // type:object size:0x2C
|
||||
__vt__Q39textinput7toolbar19NormalButtonAnmPane = .data:0x8165E28C; // type:object size:0x2C
|
||||
__vt__Q39textinput7toolbar7AnmPane = .data:0x8165E2B8; // type:object size:0x2C
|
||||
@@ -21691,7 +21711,7 @@ lbl_816965C4 = .sdata:0x816965C4; // type:object size:0x6 data:string
|
||||
lbl_816965CA = .sdata:0x816965CA; // type:object size:0x4
|
||||
smButtonName__Q33ipl5scene13AddressAddSel = .sdata:0x816965D0; // type:object size:0x8
|
||||
@10971 = .sdata:0x816965D8; // type:object size:0x4 scope:local data:string
|
||||
lbl_816965E0 = .sdata:0x816965E0; // type:object size:0x4 data:4byte
|
||||
sInputPaneName = .sdata:0x816965E0; // type:object size:0x4 data:4byte
|
||||
lbl_816965E4 = .sdata:0x816965E4; // type:object size:0x4 data:string
|
||||
lbl_816965E8 = .sdata:0x816965E8; // type:object size:0x2
|
||||
lbl_816965EA = .sdata:0x816965EA; // type:object size:0x6 data:string
|
||||
@@ -22266,10 +22286,10 @@ lbl_816973C4 = .sdata:0x816973C4; // type:object size:0x4 data:4byte
|
||||
lbl_816973C8 = .sdata:0x816973C8; // type:object size:0x8
|
||||
lbl_816973D0 = .sdata:0x816973D0; // type:object size:0x8 data:string
|
||||
lbl_816973D8 = .sdata:0x816973D8; // type:object size:0x8 data:string
|
||||
lbl_816973E0 = .sdata:0x816973E0; // type:object size:0x4 data:4byte
|
||||
lbl_816973E4 = .sdata:0x816973E4; // type:object size:0x4 data:4byte
|
||||
lbl_816973E8 = .sdata:0x816973E8; // type:object size:0x5 data:string
|
||||
lbl_816973F0 = .sdata:0x816973F0; // type:object size:0x7 data:string
|
||||
COMMON_BUTTON_ANIM__Q29textinput7toolbar = .sdata:0x816973E0; // type:object size:0x4 scope:local data:4byte
|
||||
COMMON_CHG_ANIM__Q29textinput7toolbar = .sdata:0x816973E4; // type:object size:0x4 scope:local data:4byte
|
||||
@6901 = .sdata:0x816973E8; // type:object size:0x5 scope:local data:string
|
||||
@6908 = .sdata:0x816973F0; // type:object size:0x7 scope:local data:string
|
||||
lbl_816973F8 = .sdata:0x816973F8; // type:object size:0x4 data:4byte
|
||||
lbl_81697400 = .sdata:0x81697400; // type:object size:0x4 data:4byte
|
||||
lbl_81697404 = .sdata:0x81697404; // type:object size:0x4 data:4byte
|
||||
@@ -23523,7 +23543,7 @@ s_fatalVFFlag = .sbss:0x81698D7C; // type:object size:0x4 scope:local data:4byte
|
||||
CDBPrintDebugLevel = .sbss:0x81698D80; // type:object size:0x4 data:4byte
|
||||
s_lastNANDError = .sbss:0x81698D84; // type:object size:0x4 scope:local data:4byte
|
||||
s_lastVFError = .sbss:0x81698D88; // type:object size:0x4 scope:local data:4byte
|
||||
lbl_81698D8C = .sbss:0x81698D8C; // type:object size:0x4 scope:local data:4byte
|
||||
CDBDatabaseWorkBuf = .sbss:0x81698D8C; // type:object size:0x4 data:4byte
|
||||
s_recordPool = .sbss:0x81698D90; // type:object size:0x4 scope:local data:4byte
|
||||
s_databasePool = .sbss:0x81698D94; // type:object size:0x4 scope:local data:4byte
|
||||
lbl_81698D98 = .sbss:0x81698D98; // type:object size:0x4 data:4byte
|
||||
|
||||
@@ -36,3 +36,7 @@ SECTIONS {
|
||||
__ArenaLo = (_db_stack_addr + 0x1F) & ~0x1F;
|
||||
__ArenaHi = $ARENAHI;
|
||||
}
|
||||
|
||||
FORCEACTIVE {
|
||||
$FORCEACTIVE
|
||||
}
|
||||
|
||||
181
configure.py
181
configure.py
@@ -623,8 +623,9 @@ config.libs = [
|
||||
Object(Matching, "system/enc_dummy.c"),
|
||||
Object(Matching, "system/rvl_dec.c"),
|
||||
Object(Matching, "system/RIPL_BoardRecord.c"),
|
||||
Object(Equivalent, "system/iplSystem.cpp"),
|
||||
Object(NonMatching, "system/iplController.cpp"),
|
||||
Object(Matching, "system/iplSystem.cpp"),
|
||||
Object(Matching, "system/iplController.cpp"),
|
||||
Object(Matching, "system/iplControllerManager.cpp"),
|
||||
Object(Matching, "system/iplChannelManager.cpp"),
|
||||
Object(Matching, "system/iplChannelScriptManager.cpp"),
|
||||
Object(Matching, "system/iplNand.cpp"),
|
||||
@@ -641,7 +642,7 @@ config.libs = [
|
||||
Object(Matching, "system/iplCdbManager.cpp"),
|
||||
Object(Matching, "system/iplCdbWrapper.cpp"),
|
||||
Object(Matching, "system/iplPlayTimeLog.cpp"),
|
||||
Object(Equivalent, "system/iplNwc24Manager.cpp"),
|
||||
Object(Matching, "system/iplNwc24Manager.cpp"),
|
||||
Object(Matching, "system/iplPointer.cpp"),
|
||||
Object(Matching, "system/iplPointerCore.cpp"),
|
||||
Object(Matching, "system/iplDialogWindow.cpp"),
|
||||
@@ -653,7 +654,7 @@ config.libs = [
|
||||
Object(Matching, "system/iplWarningHandler.cpp"),
|
||||
Object(Matching, "system/iplSocketSetting.cpp"),
|
||||
Object(Matching, "system/iplPostmanManager.cpp"),
|
||||
Object(NonMatching, "system/iplSaveDataManager.cpp"),
|
||||
Object(Matching, "system/iplSaveDataManager.cpp"),
|
||||
Object(Matching, "system/iplChannelRsoThread.cpp"),
|
||||
Object(Matching, "system/RsoSystem.cpp"),
|
||||
Object(Matching, "system/iplCdbBackup.cpp"),
|
||||
@@ -662,7 +663,7 @@ config.libs = [
|
||||
Object(Matching, "system/iplNandWrapper.cpp"),
|
||||
Object(Matching, "system/main.cpp"),
|
||||
Object(Matching, "system/iplBS2Manager.cpp"),
|
||||
Object(NonMatching, "system/TVRC.cpp"),
|
||||
Object(Matching, "system/TVRC.cpp"),
|
||||
Object(Matching, "system/iplTVRCManager.cpp"),
|
||||
Object(Matching, "system/_DATA_.c"),
|
||||
]
|
||||
@@ -671,7 +672,7 @@ config.libs = [
|
||||
Object(Matching, "utility/iplTVRCUtils.cpp"),
|
||||
Object(Matching, "utility/iplTree.cpp"),
|
||||
Object(Matching, "utility/iplFrameController.cpp"),
|
||||
Object(Equivalent, "utility/iplGraphics.cpp"),
|
||||
Object(Matching, "utility/iplGraphics.cpp"),
|
||||
Object(Matching, "utility/iplCapture.cpp"),
|
||||
Object(Matching, "utility/iplUtility.cpp"),
|
||||
Object(Matching, "utility/iplThread.cpp"),
|
||||
@@ -692,19 +693,19 @@ config.libs = [
|
||||
]
|
||||
),
|
||||
IPLSection("iplwww", [
|
||||
Object(Equivalent, "iplwww/www_browser.cpp"),
|
||||
Object(Matching, "iplwww/www_browser.cpp"),
|
||||
Object(Matching, "iplwww/www_message.cpp"),
|
||||
Object(Matching, "iplwww/www_surface.cpp"),
|
||||
Object(Matching, "iplwww/www_thread.cpp"),
|
||||
Object(Matching, "iplwww/www_print.cpp"),
|
||||
Object(Equivalent, "iplwww/www_window.cpp"),
|
||||
Object(Matching, "iplwww/www_window.cpp"),
|
||||
Object(Matching, "iplwww/www_trasition.cpp"),
|
||||
Object(Equivalent, "iplwww/www_wiisetting.cpp"),
|
||||
Object(Matching, "iplwww/www_arcreader.cpp"),
|
||||
]
|
||||
),
|
||||
IPLSection("homebutton", [
|
||||
Object(Equivalent, "homebutton/HBMBase.cpp"),
|
||||
Object(Matching, "homebutton/HBMBase.cpp"),
|
||||
Object(Matching, "homebutton/HBMAnmController.cpp"),
|
||||
Object(Matching, "homebutton/HBMController.cpp"),
|
||||
Object(Matching, "homebutton/HBMFrameController.cpp"),
|
||||
@@ -738,9 +739,9 @@ config.libs = [
|
||||
),
|
||||
IPLSection("board", [
|
||||
Object(Equivalent, "scene/board/iplBoard.cpp"),
|
||||
Object(Equivalent, "scene/board/iplBoardObject.cpp"),
|
||||
Object(Matching, "scene/board/iplBoardObject.cpp"),
|
||||
Object(Matching, "scene/board/iplBoardSD.cpp"),
|
||||
Object(Equivalent, "scene/board/iplUrlProcessor.cpp"),
|
||||
Object(Matching, "scene/board/iplUrlProcessor.cpp"),
|
||||
Object(Equivalent, "scene/board/iplFocusObject.cpp"),
|
||||
]
|
||||
),
|
||||
@@ -750,15 +751,15 @@ config.libs = [
|
||||
]
|
||||
),
|
||||
IPLSection("calendar", [
|
||||
Object(Equivalent, "scene/calendar/iplCalendar.cpp"),
|
||||
Object(Equivalent, "scene/calendar/iplDate.cpp"),
|
||||
Object(Matching, "scene/calendar/iplCalendar.cpp"),
|
||||
Object(Matching, "scene/calendar/iplDate.cpp"),
|
||||
]
|
||||
),
|
||||
IPLSection("channelEdit", [
|
||||
Object(Matching, "scene/channelEdit/iplChannelEdit.cpp"),
|
||||
Object(Equivalent, "scene/channelEdit/iplChanAppBase.cpp"),
|
||||
Object(Equivalent, "scene/channelEdit/iplChanAppBox.cpp"),
|
||||
Object(Equivalent, "scene/channelEdit/iplChanAppEdit.cpp"),
|
||||
Object(Matching, "scene/channelEdit/iplChanAppBase.cpp"),
|
||||
Object(Matching, "scene/channelEdit/iplChanAppBox.cpp"),
|
||||
Object(Matching, "scene/channelEdit/iplChanAppEdit.cpp"),
|
||||
Object(Matching, "scene/channelEdit/iplAnmController.cpp"),
|
||||
Object(Matching, "scene/channelEdit/iplNandSDCardManager.cpp"),
|
||||
Object(Matching, "scene/channelEdit/iplThumbnail.cpp"),
|
||||
@@ -783,12 +784,12 @@ config.libs = [
|
||||
]
|
||||
),
|
||||
IPLSection("kitayamaTest", [
|
||||
Object(Equivalent, "scene/kitayamaTest/iplKitayamaTest.cpp"),
|
||||
Object(Matching, "scene/kitayamaTest/iplKitayamaTest.cpp"),
|
||||
Object(Matching, "scene/kitayamaTest/nandsdworker_autotest.cpp"),
|
||||
]
|
||||
),
|
||||
IPLSection("letterWriter", [
|
||||
Object(Equivalent, "scene/letterWriter/iplLetterWriter.cpp"),
|
||||
Object(Matching, "scene/letterWriter/iplLetterWriter.cpp"),
|
||||
]
|
||||
),
|
||||
IPLSection("limitOver", [
|
||||
@@ -899,7 +900,7 @@ config.libs = [
|
||||
]
|
||||
),
|
||||
IPLSection("bannerSound", [
|
||||
Object(Equivalent, "bannerSound/AudioWavePlayer.cpp"),
|
||||
Object(Matching, "bannerSound/AudioWavePlayer.cpp"),
|
||||
Object(Equivalent, "bannerSound/AxAdpcmPlayer.cpp"),
|
||||
Object(Matching, "bannerSound/BannerSoundPlayer.cpp"),
|
||||
Object(Matching, "bannerSound/AudioWaveUtility.cpp"),
|
||||
@@ -911,8 +912,8 @@ config.libs = [
|
||||
Object(NonMatching, "keyboard/tiCellPhone.cpp", extra_cflags=["-O4,p"]),
|
||||
Object(NonMatching, "keyboard/tiInputForm.cpp", extra_cflags=["-O4,p"]),
|
||||
Object(NonMatching, "keyboard/tiCandidateBox.cpp", extra_cflags=["-O4,p"]),
|
||||
Object(NonMatching, "keyboard/tiToolBar.cpp", extra_cflags=["-O4,p"]),
|
||||
Object(NonMatching, "keyboard/tiPredictLang.cpp", extra_cflags=["-O4,p"]),
|
||||
Object(Matching, "keyboard/tiToolBar.cpp", extra_cflags=["-O4,p"]),
|
||||
Object(Matching, "keyboard/tiPredictLang.cpp", extra_cflags=["-O4,p"]),
|
||||
Object(NonMatching, "keyboard/tiSignWindow.cpp", extra_cflags=["-O4,p"]),
|
||||
Object(NonMatching, "keyboard/tiString.cpp", extra_cflags=["-O4,p"]),
|
||||
Object(NonMatching, "keyboard/tiAtokString.cpp", extra_cflags=["-O4,p"]), # for 4.3J
|
||||
@@ -931,7 +932,7 @@ config.libs = [
|
||||
Object(NonMatching, "keyboard/MyTiLetterForm.cpp", extra_cflags=["-O4,p"]),
|
||||
Object(Matching, "keyboard/MyTiBg.cpp", extra_cflags=["-O4,p"]),
|
||||
Object(Matching, "keyboard/tiDebug.cpp", extra_cflags=["-O4,p"]),
|
||||
Object(Equivalent, "keyboard/tiGUIManager.cpp", extra_cflags=["-O4,p"]),
|
||||
Object(Matching, "keyboard/tiGUIManager.cpp", extra_cflags=["-O4,p"]),
|
||||
Object(NonMatching, "keyboard/tiHKBManager.cpp", extra_cflags=["-O4,p"]),
|
||||
Object(NonMatching, "keyboard/tiHwKeyboard.cpp", extra_cflags=["-O4,p"]),
|
||||
Object(Matching, "keyboard/tiLayout.cpp", extra_cflags=["-O4,p"]),
|
||||
@@ -944,7 +945,7 @@ config.libs = [
|
||||
Object(Matching, "channelScript/systemmenu/VmSystem.c"),
|
||||
Object(Matching, "channelScript/systemmenu/iplCSSystem.cpp"),
|
||||
Object(Matching, "channelScript/systemmenu/iplCSLayout.cpp"),
|
||||
Object(Equivalent, "channelScript/systemmenu/iplCSPane.cpp"),
|
||||
Object(Matching, "channelScript/systemmenu/iplCSPane.cpp"),
|
||||
Object(Matching, "channelScript/systemmenu/iplCSMaterial.cpp"),
|
||||
Object(Matching, "channelScript/systemmenu/iplCSTexture.cpp"),
|
||||
Object(Matching, "channelScript/systemmenu/iplCSSavedata.cpp"),
|
||||
@@ -980,7 +981,7 @@ config.libs = [
|
||||
]
|
||||
),
|
||||
ZI8Lib("zi8clib", [
|
||||
Object(NonMatching, "clib/zaddress.c"),
|
||||
Object(Matching, "clib/zaddress.c"),
|
||||
Object(NonMatching, "clib/zconvert.c"),
|
||||
Object(NonMatching, "clib/zi81key.c"),
|
||||
Object(NonMatching, "clib/zi8alpha.c"),
|
||||
@@ -1001,7 +1002,7 @@ config.libs = [
|
||||
Object(NonMatching, "clib/zi8space.c"),
|
||||
Object(NonMatching, "clib/zi8uwd.c"),
|
||||
Object(Matching, "clib/zi8ver.c"),
|
||||
Object(NonMatching, "clib/zi8ZHuwd.c"),
|
||||
Object(Matching, "clib/zi8ZHuwd.c"),
|
||||
Object(NonMatching, "clib/zidawg1.c"),
|
||||
Object(NonMatching, "clib/zikorean.c"),
|
||||
Object(NonMatching, "clib/ziswordw.c"),
|
||||
@@ -1015,18 +1016,18 @@ config.libs = [
|
||||
# RevoEX
|
||||
RevoEXLib("cdb", [
|
||||
Object(Matching, "cdb/cdb.c"),
|
||||
Object(Equivalent, "cdb/CDBConv.c"), # hmm
|
||||
Object(NonMatching, "cdb/CDBDatabase.c"),
|
||||
Object(Equivalent, "cdb/CDBFileSystemUtils.c"),
|
||||
Object(Matching, "cdb/CDBConv.c"), # hmm
|
||||
Object(Matching, "cdb/CDBDatabase.c"),
|
||||
Object(Matching, "cdb/CDBFileSystemUtils.c"),
|
||||
Object(Matching, "cdb/CDBFileSystem.c"),
|
||||
Object(Matching, "cdb/CDBFileSystemVF.c"),
|
||||
Object(Matching, "cdb/CDBFileSystemSD.c"),
|
||||
Object(NonMatching, "cdb/CDBRecord.c"),
|
||||
Object(Matching, "cdb/CDBRecordFile.c"),
|
||||
Object(NonMatching, "cdb/CDBRecordKey.c"),
|
||||
Object(Matching, "cdb/CDBRecordKey.c"),
|
||||
Object(NonMatching, "cdb/CDBIntArray.c"),
|
||||
Object(NonMatching, "cdb/CDBSystem.c"),
|
||||
Object(Equivalent, "cdb/CDBAttr.c"),
|
||||
Object(Matching, "cdb/CDBSystem.c"),
|
||||
Object(Matching, "cdb/CDBAttr.c"),
|
||||
Object(Matching, "cdb/CDBFBridge.c"),
|
||||
Object(Matching, "cdb/CDBFBridgeVF.c"),
|
||||
Object(Matching, "cdb/CDBFBridgeSD.c"),
|
||||
@@ -1035,12 +1036,12 @@ config.libs = [
|
||||
]
|
||||
),
|
||||
RevoEXLib("ncd", [
|
||||
Object(NonMatching, "ncd/ncdsystem.c"),
|
||||
Object(Matching, "ncd/ncdsystem.c"),
|
||||
Object(NonMatching, "ncd/ncdsleep.c"),
|
||||
]
|
||||
),
|
||||
RevoEXLib("net", [
|
||||
Object(NonMatching, "net/nettime.c"),
|
||||
Object(Matching, "net/nettime.c"),
|
||||
Object(Matching, "net/crc.c"),
|
||||
Object(NonMatching, "net/md5.c"),
|
||||
Object(NonMatching, "net/sha1.c"),
|
||||
@@ -1068,12 +1069,12 @@ config.libs = [
|
||||
]
|
||||
),
|
||||
RevoEXLib("nwc24", [
|
||||
Object(NonMatching, "nwc24/NWC24StdAPI.c"),
|
||||
Object(Matching, "nwc24/NWC24StdAPI.c"),
|
||||
Object(Matching, "nwc24/NWC24FileAPI.c"),
|
||||
Object(Matching, "nwc24/NWC24Config.c"),
|
||||
Object(Matching, "nwc24/NWC24Utils.c"),
|
||||
Object(NonMatching, "nwc24/NWC24Manage.c"),
|
||||
Object(NonMatching, "nwc24/NWC24MsgObj.c"),
|
||||
Object(Matching, "nwc24/NWC24Manage.c"),
|
||||
Object(Matching, "nwc24/NWC24MsgObj.c"),
|
||||
Object(NonMatching, "nwc24/NWC24MBoxCtrl.c"),
|
||||
Object(NonMatching, "nwc24/NWC24Mime.c"),
|
||||
Object(Matching, "nwc24/NWC24Stream.c"),
|
||||
@@ -1083,18 +1084,18 @@ config.libs = [
|
||||
Object(NonMatching, "nwc24/NWC24MsgSubject.c"),
|
||||
Object(Matching, "nwc24/NWC24Schedule.c"),
|
||||
Object(NonMatching, "nwc24/NWC24DateParser.c"),
|
||||
Object(Equivalent, "nwc24/NWC24FriendList.c"),
|
||||
Object(Matching, "nwc24/NWC24FriendList.c"),
|
||||
Object(Matching, "nwc24/NWC24SecretFList.c"),
|
||||
Object(NonMatching, "nwc24/NWC24UserId.c"),
|
||||
Object(Matching, "nwc24/NWC24UserId.c"),
|
||||
Object(Matching, "nwc24/NWC24Time.c"),
|
||||
Object(Matching, "nwc24/NWC24Ipc.c"),
|
||||
Object(NonMatching, "nwc24/NWC24Download.c"),
|
||||
Object(Equivalent, "nwc24/NWC24CHJump.c"),
|
||||
Object(Matching, "nwc24/NWC24CHJump.c"),
|
||||
Object(NonMatching, "nwc24/NWC24System.c"),
|
||||
]
|
||||
),
|
||||
RevoEXLib("so", [
|
||||
Object(NonMatching, "so/SOCommon.c"),
|
||||
Object(Matching, "so/SOCommon.c"),
|
||||
Object(NonMatching, "so/SOBasic.c"),
|
||||
Object(NonMatching, "so/SOInformation.c"),
|
||||
Object(NonMatching, "so/SOOption.c"),
|
||||
@@ -1159,19 +1160,19 @@ config.libs = [
|
||||
Object(Matching, "vf/system/pf_system.c"),
|
||||
|
||||
Object(Matching, "vf/develop/d_vf.c"),
|
||||
Object(NonMatching, "vf/develop/d_vf_sys.c"),
|
||||
Object(Matching, "vf/develop/d_vf_sys.c"),
|
||||
Object(Matching, "vf/develop/d_hash.c"),
|
||||
Object(Matching, "vf/develop/d_time.c"),
|
||||
Object(Matching, "vf/develop/d_common.c"),
|
||||
Object(NonMatching, "vf/develop/nand_drv.c"),
|
||||
Object(NonMatching, "vf/develop/sd_drv.c"),
|
||||
Object(Matching, "vf/develop/nand_drv.c"),
|
||||
Object(Matching, "vf/develop/sd_drv.c"),
|
||||
]
|
||||
),
|
||||
RevoEXLib("wd", [
|
||||
Object(Matching, "wd/wd_misc.c"),
|
||||
Object(Matching, "wd/wd_request.c"),
|
||||
Object(Matching, "wd/wd_init.c"),
|
||||
Object(NonMatching, "wd/WDScan.c"),
|
||||
Object(Matching, "wd/WDScan.c"),
|
||||
]
|
||||
),
|
||||
# RVLFaceLib
|
||||
@@ -1197,20 +1198,20 @@ config.libs = [
|
||||
# TMC JPEG
|
||||
TMCJpegLib(
|
||||
[
|
||||
Object(NonMatching, "buffer/mkhdec3.c"),
|
||||
Object(Matching, "buffer/mkhdec3.c"),
|
||||
Object(Matching, "buffer/buffer_system.c"),
|
||||
Object(Equivalent, "buffer/getcode.c"),
|
||||
Object(Matching, "buffer/getcode.c"),
|
||||
Object(NonMatching, "buffer/idct_block_var.c"),
|
||||
|
||||
Object(Matching, "api/decapi.c"),
|
||||
|
||||
Object(Matching, "jpegdec/jdec.c"),
|
||||
Object(NonMatching, "jpegdec/jdec_main.c"),
|
||||
Object(Matching, "jpegdec/jdec_main.c"),
|
||||
Object(Matching, "jpegdec/jpformat.c"),
|
||||
|
||||
Object(NonMatching, "exif/exif_parse.c"),
|
||||
|
||||
Object(Equivalent, "reschange/iqdec_resolution_change_a3.c"),
|
||||
Object(Matching, "reschange/iqdec_resolution_change_a3.c"),
|
||||
Object(NonMatching, "reschange/idct_resolution_change_var.c"),
|
||||
|
||||
Object(NonMatching, "texturecvtr/Texture_MCUtoY8U8V8.c"),
|
||||
@@ -1299,7 +1300,7 @@ config.libs = [
|
||||
Object(Matching, "ut/ut_ResFontBase.cpp"),
|
||||
Object(Matching, "ut/ut_ResFont.cpp"),
|
||||
Object(NonMatching, "ut/ut_ArchiveFontBase.cpp"),
|
||||
Object(NonMatching, "ut/ut_ArchiveFont.cpp"),
|
||||
Object(Matching, "ut/ut_ArchiveFont.cpp"),
|
||||
Object(Matching, "ut/ut_CharWriter.cpp"),
|
||||
Object(Matching, "ut/ut_TextWriterBase.cpp"),
|
||||
]
|
||||
@@ -1446,7 +1447,7 @@ config.libs = [
|
||||
RVLSDKLib("axfx", [
|
||||
Object(Matching, "axfx/AXFXReverbHi.c"),
|
||||
Object(Matching, "axfx/AXFXReverbHiDpl2.c"),
|
||||
Object(NonMatching, "axfx/AXFXReverbHiExp.c"),
|
||||
Object(Matching, "axfx/AXFXReverbHiExp.c"),
|
||||
Object(NonMatching, "axfx/AXFXReverbHiExpDpl2.c"),
|
||||
Object(Matching, "axfx/AXFXDelay.c"),
|
||||
Object(Matching, "axfx/AXFXReverbStd.c"),
|
||||
@@ -1483,7 +1484,7 @@ config.libs = [
|
||||
Object(Matching, "card/CARDBios.c"),
|
||||
Object(Matching, "card/CARDUnlock.c"),
|
||||
Object(Matching, "card/CARDRdwr.c"),
|
||||
Object(Equivalent, "card/CARDBlock.c"),
|
||||
Object(Matching, "card/CARDBlock.c"),
|
||||
Object(Matching, "card/CARDDir.c"),
|
||||
Object(Matching, "card/CARDCheck.c"),
|
||||
Object(Matching, "card/CARDMount.c"),
|
||||
@@ -1550,7 +1551,7 @@ config.libs = [
|
||||
]
|
||||
),
|
||||
RVLSDKLib("wpad", [
|
||||
Object(Equivalent, "wpad/WPAD.c"),
|
||||
Object(Matching, "wpad/WPAD.c"),
|
||||
Object(NonMatching, "wpad/WPADHIDParser.c"),
|
||||
Object(Matching, "wpad/WPADMem.c"),
|
||||
Object(Matching, "wpad/WPADEncrypt.c"),
|
||||
@@ -1699,14 +1700,14 @@ config.libs = [
|
||||
Object(NonMatching, "fa/pf_fat12.c"),
|
||||
Object(NonMatching, "fa/pf_fat16.c"),
|
||||
Object(NonMatching, "fa/pf_fat32.c"),
|
||||
Object(NonMatching, "fa/pf_fatfs.c"),
|
||||
Object(Matching, "fa/pf_fatfs.c"),
|
||||
Object(NonMatching, "fa/pf_file.c"),
|
||||
Object(NonMatching, "fa/pf_path.c"),
|
||||
Object(NonMatching, "fa/pf_sector.c"),
|
||||
Object(NonMatching, "fa/pf_volume.c"),
|
||||
Object(NonMatching, "fa/pf_volume_apiadd.c"),
|
||||
Object(NonMatching, "fa/pf_cp932.c"),
|
||||
Object(NonMatching, "fa/pf_api_util.c"),
|
||||
Object(Matching, "fa/pf_api_util.c"),
|
||||
Object(NonMatching, "fa/pf_attach.c"),
|
||||
Object(NonMatching, "fa/pf_buffering.c"),
|
||||
Object(NonMatching, "fa/pf_cdelete.c"),
|
||||
@@ -1714,7 +1715,7 @@ config.libs = [
|
||||
Object(NonMatching, "fa/pf_chdmod.c"),
|
||||
Object(NonMatching, "fa/pf_chmod.c"),
|
||||
Object(NonMatching, "fa/pf_cinsert.c"),
|
||||
Object(NonMatching, "fa/pf_closedir.c"),
|
||||
Object(Matching, "fa/pf_closedir.c"),
|
||||
Object(NonMatching, "fa/pf_combine.c"),
|
||||
Object(NonMatching, "fa/pf_create.c"),
|
||||
Object(NonMatching, "fa/pf_createdir.c"),
|
||||
@@ -1722,27 +1723,27 @@ config.libs = [
|
||||
Object(NonMatching, "fa/pf_derrnum.c"),
|
||||
Object(NonMatching, "fa/pf_detach.c"),
|
||||
Object(NonMatching, "fa/pf_divide.c"),
|
||||
Object(NonMatching, "fa/pf_errnum.c"),
|
||||
Object(Matching, "fa/pf_errnum.c"),
|
||||
Object(NonMatching, "fa/pf_fadjust.c"),
|
||||
Object(NonMatching, "fa/pf_fappend.c"),
|
||||
Object(NonMatching, "fa/pf_fchdir.c"),
|
||||
Object(NonMatching, "fa/pf_fclose.c"),
|
||||
Object(Matching, "fa/pf_fclose.c"),
|
||||
Object(NonMatching, "fa/pf_fconcat.c"),
|
||||
Object(NonMatching, "fa/pf_feof.c"),
|
||||
Object(NonMatching, "fa/pf_ferror.c"),
|
||||
Object(Matching, "fa/pf_feof.c"),
|
||||
Object(Matching, "fa/pf_ferror.c"),
|
||||
Object(NonMatching, "fa/pf_finfo.c"),
|
||||
Object(NonMatching, "fa/pf_flock.c"),
|
||||
Object(Matching, "fa/pf_flock.c"),
|
||||
Object(NonMatching, "fa/pf_fopen.c"),
|
||||
Object(NonMatching, "fa/pf_format.c"),
|
||||
Object(NonMatching, "fa/pf_fread.c"),
|
||||
Object(Matching, "fa/pf_fread.c"),
|
||||
Object(NonMatching, "fa/pf_fseek.c"),
|
||||
Object(NonMatching, "fa/pf_fsetclstlink.c"),
|
||||
Object(NonMatching, "fa/pf_fsexec.c"),
|
||||
Object(NonMatching, "fa/pf_fsfirst.c"),
|
||||
Object(NonMatching, "fa/pf_fsnext.c"),
|
||||
Object(NonMatching, "fa/pf_fstat.c"),
|
||||
Object(NonMatching, "fa/pf_fsync.c"),
|
||||
Object(NonMatching, "fa/pf_fwrite.c"),
|
||||
Object(Matching, "fa/pf_fsync.c"),
|
||||
Object(Matching, "fa/pf_fwrite.c"),
|
||||
Object(NonMatching, "fa/pf_getdev.c"),
|
||||
Object(NonMatching, "fa/pf_getvol.c"),
|
||||
Object(NonMatching, "fa/pf_getvolcfg.c"),
|
||||
@@ -1773,7 +1774,7 @@ config.libs = [
|
||||
Object(NonMatching, "fa/pf_unmount.c"),
|
||||
Object(NonMatching, "fa/pf_unregctx.c"),
|
||||
Object(NonMatching, "fa/pf_xdivide.c"),
|
||||
Object(NonMatching, "fa/pf_w_api_util.c"),
|
||||
Object(Matching, "fa/pf_w_api_util.c"),
|
||||
Object(NonMatching, "fa/pf_w_cdelete.c"),
|
||||
Object(NonMatching, "fa/pf_w_chdir.c"),
|
||||
Object(NonMatching, "fa/pf_w_chdmod.c"),
|
||||
@@ -1831,19 +1832,19 @@ config.libs = [
|
||||
Object(NonMatching, "fa/api/FACreatedir.c"),
|
||||
Object(NonMatching, "fa/api/FADetach.c"),
|
||||
Object(NonMatching, "fa/api/FAErrnum.c"),
|
||||
Object(NonMatching, "fa/api/FAFclose.c"),
|
||||
Object(NonMatching, "fa/api/FAFinfo.c"),
|
||||
Object(Matching, "fa/api/FAFclose.c"),
|
||||
Object(Matching, "fa/api/FAFinfo.c"),
|
||||
Object(NonMatching, "fa/api/FAFopen.c"),
|
||||
Object(NonMatching, "fa/api/FAFormat.c"),
|
||||
Object(NonMatching, "fa/api/FAFread.c"),
|
||||
Object(Matching, "fa/api/FAFread.c"),
|
||||
Object(NonMatching, "fa/api/FAFseek.c"),
|
||||
Object(NonMatching, "fa/api/FAFsfirst.c"),
|
||||
Object(NonMatching, "fa/api/FAFsnext.c"),
|
||||
Object(NonMatching, "fa/api/FAFstat.c"),
|
||||
Object(NonMatching, "fa/api/FAFwrite.c"),
|
||||
Object(Matching, "fa/api/FAFwrite.c"),
|
||||
Object(NonMatching, "fa/api/FAGetdev.c"),
|
||||
Object(NonMatching, "fa/api/FAInit.c"),
|
||||
Object(NonMatching, "fa/api/FAInitDiskManager.c"),
|
||||
Object(Matching, "fa/api/FAInitDiskManager.c"),
|
||||
Object(NonMatching, "fa/api/FAMount.c"),
|
||||
Object(NonMatching, "fa/api/FARegistCB.c"),
|
||||
Object(NonMatching, "fa/api/FARemove.c"),
|
||||
@@ -1863,7 +1864,7 @@ config.libs = [
|
||||
]
|
||||
),
|
||||
RVLSDKLib("sdi", [
|
||||
Object(NonMatching, "sdi/sdi_api.c"),
|
||||
Object(Matching, "sdi/sdi_api.c"),
|
||||
]
|
||||
),
|
||||
RVLSDKLib("nup", [
|
||||
@@ -1899,17 +1900,17 @@ config.libs = [
|
||||
]
|
||||
),
|
||||
RVLSDKLib("cntcache", [
|
||||
Object(NonMatching, "cntcache/cntcache.c"),
|
||||
Object(Matching, "cntcache/cntcache.c"),
|
||||
]
|
||||
),
|
||||
# EGG library (for Nintendo EAD software)
|
||||
EGGLib(
|
||||
[
|
||||
Object(Matching, "core/eggAllocator.cpp"),
|
||||
Object(Equivalent, "core/eggAudioArcPlayerMgr.cpp"),
|
||||
Object(Matching, "core/eggAudioArcPlayerMgr.cpp"),
|
||||
Object(Equivalent, "core/eggAudioExpMgr.cpp"),
|
||||
Object(Matching, "core/eggAudioFxMgr.cpp"),
|
||||
Object(Equivalent, "core/eggAudioMgr.cpp"),
|
||||
Object(Matching, "core/eggAudioMgr.cpp"),
|
||||
Object(Matching, "core/eggAudioHeapMgr.cpp"),
|
||||
Object(Matching, "core/eggColorFader.cpp"),
|
||||
Object(Matching, "core/eggDisposer.cpp"),
|
||||
@@ -1940,44 +1941,44 @@ config.libs = [
|
||||
),
|
||||
# MSL Library
|
||||
MSLLib("MSL_C.PPCEABI.bare.H", [
|
||||
Object(NonMatching, "MSL_Common/alloc.c"),
|
||||
Object(Matching, "MSL_Common/alloc.c"),
|
||||
Object(Matching, "MSL_Common/errno.c"),
|
||||
Object(Matching, "MSL_Common/ansi_files.c"),
|
||||
Object(NonMatching, "MSL_Common_Embedded/ansi_fp.c"),
|
||||
Object(Matching, "MSL_Common/ctype.c"),
|
||||
Object(NonMatching, "MSL_Common/locale.c"),
|
||||
Object(NonMatching, "MSL_Common/arith.c"),
|
||||
Object(NonMatching, "MSL_Common/bsearch.c"),
|
||||
Object(NonMatching, "MSL_Common/buffer_io.c"),
|
||||
Object(NonMatching, "MSL_Common/direct_io.c"),
|
||||
Object(Matching, "MSL_Common/arith.c", extra_cflags=["-Cpp_exceptions on"]),
|
||||
Object(Matching, "MSL_Common/bsearch.c", extra_cflags=["-Cpp_exceptions on"]),
|
||||
Object(Matching, "MSL_Common/buffer_io.c", extra_cflags=["-Cpp_exceptions on"]),
|
||||
Object(Matching, "MSL_Common/direct_io.c", extra_cflags=["-Cpp_exceptions on"]),
|
||||
Object(NonMatching, "MSL_Common/file_io.c"),
|
||||
Object(NonMatching, "MSL_Common/FILE_POS.c"),
|
||||
Object(NonMatching, "MSL_Common/mbstring.c"),
|
||||
Object(Matching, "MSL_Common/FILE_POS.c", extra_cflags=["-Cpp_exceptions on"]),
|
||||
Object(Matching, "MSL_Common/mbstring.c", extra_cflags=["-Cpp_exceptions on"]),
|
||||
Object(Matching, "MSL_Common/mem.c"),
|
||||
Object(Matching, "MSL_Common/mem_funcs.c"),
|
||||
Object(Matching, "MSL_Common/math_api.c"),
|
||||
Object(NonMatching, "MSL_Common/misc_io.c"),
|
||||
Object(Matching, "MSL_Common/misc_io.c"),
|
||||
Object(NonMatching, "MSL_Common/printf.c"),
|
||||
Object(NonMatching, "MSL_Common/qsort.c"),
|
||||
Object(Matching, "MSL_Common/qsort.c", extra_cflags=["-Cpp_exceptions on"]),
|
||||
Object(Matching, "MSL_Common/rand.c"),
|
||||
Object(NonMatching, "MSL_Common/scanf.c"),
|
||||
Object(NonMatching, "MSL_Common/signal.c"),
|
||||
Object(NonMatching, "MSL_Common/string.c"),
|
||||
Object(Matching, "MSL_Common/signal.c", extra_cflags=["-Cpp_exceptions on"]),
|
||||
Object(Matching, "MSL_Common/string.c"),
|
||||
Object(Matching, "MSL_Common/float.c"),
|
||||
Object(NonMatching, "MSL_Common/strtold.c"),
|
||||
Object(NonMatching, "MSL_Common/strtoul.c"),
|
||||
Object(Matching, "MSL_Common/strtoul.c", extra_cflags=["-Cpp_exceptions on"]),
|
||||
Object(NonMatching, "MSL_Common/time.c"),
|
||||
Object(NonMatching, "MSL_Common/wctype.c"),
|
||||
Object(Matching, "MSL_Common/wctype.c"),
|
||||
Object(Matching, "MSL_Common/wmem.c"),
|
||||
Object(NonMatching, "MSL_Common/wprintf.c"),
|
||||
Object(NonMatching, "MSL_Common/wstring.c"),
|
||||
Object(NonMatching, "MSL_Common/wchar_io.c"),
|
||||
Object(Matching, "MSL_Common/wstring.c"),
|
||||
Object(Matching, "MSL_Common/wchar_io.c"),
|
||||
Object(Matching, "PPC_EABI/time.dolphin.c"),
|
||||
Object(Matching, "PPC_EABI/sysenv.GCN.c"),
|
||||
Object(Matching, "PPC_EABI/uart_console_io_gcn.c"),
|
||||
Object(Matching, "PPC_EABI/abort_exit_ppc_eabi.c"),
|
||||
Object(NonMatching, "MSL_Common/math_sun.c"),
|
||||
Object(NonMatching, "MSL_Common/extras.c"),
|
||||
Object(Matching, "MSL_Common/math_sun.c", extra_cflags=["-Cpp_exceptions on"]),
|
||||
Object(Matching, "MSL_Common/extras.c"),
|
||||
|
||||
Object(Matching, "MSL_Common_Embedded/Math/e_acos.c"),
|
||||
Object(Matching, "MSL_Common_Embedded/Math/e_asin.c"),
|
||||
|
||||
@@ -30,9 +30,9 @@ private:
|
||||
class WaveFileAiff : public WaveFile {
|
||||
public:
|
||||
WaveFileAiff();
|
||||
virtual ~WaveFileAiff() {}
|
||||
|
||||
virtual u32 getBit() const override;
|
||||
virtual ~WaveFileAiff();
|
||||
virtual int getChannels() const override { return mNumChans; }
|
||||
virtual f64 getSamplingRate() const override { return mSamplingRate; }
|
||||
virtual s32 getFrames() const override;
|
||||
@@ -67,9 +67,9 @@ private:
|
||||
class WaveFileWav : public WaveFile {
|
||||
public:
|
||||
WaveFileWav();
|
||||
virtual ~WaveFileWav() {}
|
||||
|
||||
virtual u32 getBit() const override;
|
||||
virtual ~WaveFileWav();
|
||||
virtual int getChannels() const override { return mNumChans; }
|
||||
virtual f64 getSamplingRate() const override { return mSamplingRate; }
|
||||
virtual s32 getFrames() const override;
|
||||
|
||||
@@ -272,20 +272,20 @@ namespace homebutton {
|
||||
f32 mFadeOutSeTime; // 0x798
|
||||
|
||||
private:
|
||||
static const int scSoundHeapSize_but2;
|
||||
static const int scSoundHeapSize_but3;
|
||||
static const int scSoundThreadPrio;
|
||||
static const int scDvdThreadPrio;
|
||||
static const int scSoundHeapSize_but2 = 0x60000;
|
||||
static const int scSoundHeapSize_but3 = 0x6f800;
|
||||
static const int scSoundThreadPrio = 4;
|
||||
static const int scDvdThreadPrio = 3;
|
||||
|
||||
static const int scReConnectTime;
|
||||
static const int scReConnectTime2;
|
||||
static const int scPadDrawWaitTime;
|
||||
static const int scGetPadInfoTime;
|
||||
static const int scForcusSEWaitTime;
|
||||
static const int scReConnectTime = 3600;
|
||||
static const int scReConnectTime2 = 3570;
|
||||
static const int scPadDrawWaitTime = 5;
|
||||
static const int scGetPadInfoTime = 100;
|
||||
static const int scForcusSEWaitTime = 2;
|
||||
static const f32 scOnPaneVibTime;
|
||||
static const f32 scOnPaneVibWaitTime;
|
||||
static const int scWaitStopMotorTime;
|
||||
static const int scWaitDisConnectTime;
|
||||
static const int scWaitStopMotorTime = 30;
|
||||
static const int scWaitDisConnectTime = 180;
|
||||
|
||||
static const char* scCursorLytName[res::eCursorLyt_Max];
|
||||
static const char* scCursorPaneName;
|
||||
|
||||
@@ -139,6 +139,9 @@ namespace ext_ead {
|
||||
u32 unk_0x14; // 0x14
|
||||
u32 unk_0x18; // 0x18
|
||||
u32 maxLength; // 0x1c
|
||||
|
||||
ImeData& operator=(const ImeData&);
|
||||
|
||||
} ImeData;
|
||||
|
||||
class BrowserThread : public ut_thread {
|
||||
@@ -170,6 +173,9 @@ namespace ext_ead {
|
||||
} updateIme; // ID 4
|
||||
u32 raw[6];
|
||||
} data;
|
||||
|
||||
CmdPacket& operator=(const CmdPacket&);
|
||||
|
||||
};
|
||||
|
||||
BrowserThread();
|
||||
|
||||
@@ -290,7 +290,7 @@ namespace textinput {
|
||||
public:
|
||||
PaneComponent(u32 id) : GUIComponent(id) { mpPane = NULL; }
|
||||
|
||||
virtual ~PaneComponent() {} // 0x08
|
||||
virtual ~PaneComponent(); // 0x08
|
||||
|
||||
virtual void draw(); // 0x1C
|
||||
|
||||
|
||||
@@ -162,6 +162,7 @@ namespace textinput {
|
||||
virtual void autoScroll();
|
||||
|
||||
virtual bool doWordWrap(const wchar_t* string, u32, f32);
|
||||
f32 getWordWrapRectWidth() const { return mRect.right - mRect.left; }
|
||||
virtual void drawFixString(u32);
|
||||
|
||||
virtual void onSE(sound::SE seId);
|
||||
|
||||
@@ -67,6 +67,9 @@ namespace textinput {
|
||||
virtual void setAspectRatio(bool b4x3);
|
||||
|
||||
virtual void setSecretInputMode(bool secretInputMode) { mpInputForm->setSecretModeOn(secretInputMode); }
|
||||
#ifdef IPL_ADDRESS_EDIT_CPP
|
||||
void enableKSXFilter(bool compatibleFilter);
|
||||
#endif
|
||||
|
||||
virtual void setDefaultPredictionJP(int num, const char** predicts);
|
||||
virtual void setFixedPredictionJP(int num, const char** predicts);
|
||||
|
||||
@@ -14,6 +14,10 @@ namespace textinput {
|
||||
|
||||
class Base : public CommandSender {
|
||||
public:
|
||||
#ifdef TI_PREDICTLANG_SAMPLE_CLASS
|
||||
Base(Manager* manager) : mePredictMode(inputform::Base::PM_USEn), mpAllocator(NULL), mpManager(manager) {}
|
||||
#endif
|
||||
|
||||
virtual void create(MEMAllocator* allocator) override { mpAllocator = allocator; }
|
||||
virtual void setPredictMode(inputform::Base::PredictMode mode) { mePredictMode = mode; }
|
||||
|
||||
@@ -28,6 +32,12 @@ namespace textinput {
|
||||
|
||||
class LayoutByNW4R : public Base, public nw4rmanager::Layout, public nw4rmanager::AnmObserver {
|
||||
public:
|
||||
#ifdef TI_PREDICTLANG_SAMPLE_CLASS
|
||||
LayoutByNW4R(Manager* manager, nw4r::lyt::MultiArcResourceAccessor* resAccessor, EventObserver* observer)
|
||||
: Base(manager), nw4rmanager::Layout(resAccessor, "fs_prdicSelWidw_a.brlyt", observer), mbActive(false), mbInput(false),
|
||||
mpEventHandler(NULL), meDestination(DST_US), mpCaller(NULL) {}
|
||||
#endif
|
||||
|
||||
virtual ~LayoutByNW4R();
|
||||
virtual void create(MEMAllocator* allocator) override;
|
||||
virtual void init() override;
|
||||
@@ -58,6 +68,15 @@ namespace textinput {
|
||||
keyboard::KeyboardBase* mpCaller; // 0xD4
|
||||
};
|
||||
|
||||
#ifdef TI_PREDICTLANG_SAMPLE_CLASS
|
||||
class Sample : public LayoutByNW4R {
|
||||
public:
|
||||
Sample(Manager* manager, nw4r::lyt::MultiArcResourceAccessor* resAccessor, EventObserver* observer)
|
||||
: LayoutByNW4R(manager, resAccessor, observer) {}
|
||||
virtual ~Sample() {}
|
||||
};
|
||||
#endif
|
||||
|
||||
class EventHandler : public nw4rmanager::TiEventHandler {
|
||||
public:
|
||||
EventHandler(LayoutByNW4R* layout) : mpLayoutByNW4R(layout) {}
|
||||
|
||||
@@ -79,7 +79,7 @@ namespace textinput {
|
||||
virtual void isEnableCursorCache();
|
||||
virtual void getDrawModifyStartLine();
|
||||
virtual void getDrawModifyEndLine();
|
||||
virtual void getDrawCacheStartPos();
|
||||
virtual u32 getDrawCacheStartPos() const;
|
||||
virtual void dirtyDrawCache();
|
||||
virtual void dirtyCursorCache();
|
||||
|
||||
|
||||
@@ -10,6 +10,10 @@ namespace textinput {
|
||||
namespace toolbar {
|
||||
class Base {
|
||||
public:
|
||||
#ifdef TI_TOOLBAR_SAMPLE_CLASS
|
||||
Base(Manager* manager) : mQwerty(true), meLanguage(USA), mpAllocator(NULL), mpManager(manager) {}
|
||||
#endif
|
||||
|
||||
virtual void create(MEMAllocator* allocator) { mpAllocator = allocator; }
|
||||
virtual void init() {}
|
||||
virtual bool isQwerty() const { return mQwerty; }
|
||||
@@ -31,6 +35,12 @@ namespace textinput {
|
||||
|
||||
class LayoutByNW4R : public Base, public nw4rmanager::Layout {
|
||||
public:
|
||||
#ifdef TI_TOOLBAR_SAMPLE_CLASS
|
||||
LayoutByNW4R(Manager* manager, nw4r::lyt::MultiArcResourceAccessor* resAccessor, EventObserver* observer)
|
||||
: Base(manager), nw4rmanager::Layout(resAccessor, "fs_VK_toolbar_a.brlyt", observer), mpEventHandler(NULL),
|
||||
mbIsEnableQwertyChg(false) {}
|
||||
#endif
|
||||
|
||||
virtual ~LayoutByNW4R();
|
||||
virtual void create(MEMAllocator* allocator) override;
|
||||
virtual void init() override;
|
||||
@@ -107,7 +117,16 @@ namespace textinput {
|
||||
KeyType meKeyType; // 0x30
|
||||
};
|
||||
|
||||
#ifdef TI_TOOLBAR_SAMPLE_CLASS
|
||||
class Sample : public LayoutByNW4R {
|
||||
public:
|
||||
Sample(Manager* manager, nw4r::lyt::MultiArcResourceAccessor* resAccessor, EventObserver* observer)
|
||||
: LayoutByNW4R(manager, resAccessor, observer) {}
|
||||
virtual ~Sample() {}
|
||||
};
|
||||
#else
|
||||
class Sample {};
|
||||
#endif
|
||||
|
||||
class NormalButtonAnmPane : public AnmPane {
|
||||
public:
|
||||
|
||||
@@ -30,10 +30,18 @@ namespace gui {
|
||||
virtual void draw(Mtx& mtx) {} // 0x14 (0x05)
|
||||
virtual void draw() {} // 0x18 (0x06)
|
||||
|
||||
virtual ~Interface() {} // 0x1C (0x07)
|
||||
#ifdef IPL_CHANNEL_TITLE_NOVTABLE
|
||||
virtual ~Interface(); // 0x1C (0x07)
|
||||
#else
|
||||
virtual ~Interface() {} // 0x1C (0x07)
|
||||
#endif
|
||||
};
|
||||
|
||||
#ifdef IPL_CHANNEL_TITLE_NOVTABLE
|
||||
class __declspec(novtable) EventHandler {
|
||||
#else
|
||||
class EventHandler {
|
||||
#endif
|
||||
public:
|
||||
enum {
|
||||
ON_TRIG = 0,
|
||||
|
||||
@@ -11,14 +11,18 @@
|
||||
namespace ipl {
|
||||
namespace gui {
|
||||
class PaneComponent : public ::gui::PaneComponent {};
|
||||
class PaneManager : public ::gui::PaneManager {
|
||||
class PaneManager : public ::gui::PaneManager {
|
||||
public:
|
||||
PaneManager(::gui::EventHandler* event, const nw4r::lyt::DrawInfo* drawInfo, EGG::Heap* heap, EGG::Allocator* allocator, bool bDisableCon = false) :
|
||||
::gui::PaneManager(event, allocator, drawInfo),
|
||||
mpHeap(heap),
|
||||
mbDisableCon(bDisableCon) {}
|
||||
|
||||
#ifdef IPL_CHANNEL_TITLE_NOVTABLE
|
||||
virtual ~PaneManager();
|
||||
#else
|
||||
virtual ~PaneManager() {}
|
||||
#endif
|
||||
|
||||
void update();
|
||||
void update(int chan);
|
||||
|
||||
@@ -180,7 +180,11 @@ namespace ipl {
|
||||
|
||||
/*** TODO: These always generate a weak. Try and make them not do that. ***/
|
||||
const nw4r::ut::Rect getTextDrawRect(const nw4r::lyt::TextBox* textBox) const { return textBox->GetTextDrawRect(mDrawInfo); }
|
||||
#ifdef IPL_SDMEMORY_GET_TEXT_DRAW_RECT_OUT_OF_LINE
|
||||
const nw4r::ut::Rect getTextDrawRect(const char* paneName) const;
|
||||
#else
|
||||
const nw4r::ut::Rect getTextDrawRect(const char* paneName) const { return getTextDrawRect(nw4r::ut::DynamicCast<nw4r::lyt::TextBox*>(mLayout.GetRootPane()->FindPaneByName(paneName))); }
|
||||
#endif
|
||||
|
||||
const nw4r::ut::Rect getPaneRect(nw4r::lyt::Pane* pane) const { return pane->GetPaneRect(mDrawInfo); }
|
||||
const nw4r::ut::Rect getPaneRect(const char* paneName) const { return getPaneRect(mLayout.GetRootPane()->FindPaneByName(paneName)); }
|
||||
|
||||
@@ -12,6 +12,9 @@ namespace ipl {
|
||||
template <typename T>
|
||||
class Interporation : public utility::FrameController {
|
||||
public:
|
||||
#ifdef IPL_BOARD_OBJECT_INLINE_INTERPOLATION_DTORS
|
||||
virtual ~Interporation();
|
||||
#endif
|
||||
void init(int playback, f32 maxFrame, f32 minFrame, const T& start, const T& end, f32 speed = 1.0f) {
|
||||
mStart = start;
|
||||
mEnd = end;
|
||||
@@ -34,6 +37,9 @@ namespace ipl {
|
||||
template <typename T>
|
||||
class LinearIntp : public Interporation<T> {
|
||||
public:
|
||||
#ifdef IPL_BOARD_OBJECT_INLINE_INTERPOLATION_DTORS
|
||||
virtual ~LinearIntp();
|
||||
#endif
|
||||
T get() const {
|
||||
T r = mEnd * getCurrentFrame();
|
||||
T b = mStart * (mMaxFrame - mFrame);
|
||||
@@ -44,6 +50,94 @@ namespace ipl {
|
||||
T get2() const { return (((mStart * (mMaxFrame - mFrame)) + (mEnd * mFrame)) / mMaxFrame); }
|
||||
};
|
||||
|
||||
#ifdef IPL_CHANNEL_TITLE_NOVTABLE
|
||||
template <typename T>
|
||||
class __declspec(novtable) HermiteIntp : public utility::FrameController {
|
||||
public:
|
||||
HermiteIntp() {}
|
||||
virtual ~HermiteIntp();
|
||||
|
||||
void init(const T& start, const T& end, f32 maxFrame, f32 param_5, f32 param_6, int playback = ANIM_TYPE_FORWARD, f32 speed = 1.0f);
|
||||
|
||||
T get() const {
|
||||
f32 var_f27 = mFrame;
|
||||
f32 var_f28 = 1.0f / mMaxFrame;
|
||||
T r =
|
||||
(mStart *
|
||||
(1.0f + ((var_f28 * (var_f28 * (var_f28 * (var_f27 * (2.0f * var_f27 * var_f27))))) -
|
||||
(var_f28 * (var_f28 * (3.0f * var_f27 * var_f27)))))) -
|
||||
(mEnd * ((var_f28 * (var_f28 * (var_f28 * (var_f27 * (2.0f * var_f27 * var_f27))))) -
|
||||
(var_f28 * (var_f28 * (3.0f * var_f27 * var_f27)))));
|
||||
r +=
|
||||
(unkVal0 *
|
||||
(var_f27 +
|
||||
((var_f28 * (var_f28 * (var_f27 * (var_f27 * var_f27)))) -
|
||||
(var_f28 * (2.0f * var_f27 * var_f27))))) +
|
||||
(unkVal1 * ((var_f28 * (var_f28 * (var_f27 * (var_f27 * var_f27)))) -
|
||||
(var_f28 * (var_f27 * var_f27))));
|
||||
|
||||
return r;
|
||||
|
||||
/*f32 var_f27 = mMaxFrame;
|
||||
f32 var_f28 = 1.0f / mMaxFrame;
|
||||
T sp28 = mEnd * ((var_f28 * (var_f28 * (var_f28 * (var_f27 * (2.0f * var_f27 * var_f27))))) -
|
||||
(var_f28 * (var_f28 * (3.0f * var_f27 * var_f27))));
|
||||
T sp1C = mStart * (1.0f + ((var_f28 * (var_f28 * (var_f28 * (var_f27 * (2.0f * var_f27 * var_f27))))) -
|
||||
(var_f28 * (var_f28 * (3.0f * var_f27 * var_f27)))));
|
||||
T r = sp1C - sp28;
|
||||
|
||||
f32 temp_f4 = var_f27 * var_f27;
|
||||
f32 temp_f7 = var_f28 * (var_f28 * (var_f27 * temp_f4));
|
||||
f32 temp_f3 =
|
||||
(unkVal0 * (var_f27 + (temp_f7 - (var_f28 * (2.0f * var_f27 * var_f27))))) + (unkVal1 * (temp_f7 - (var_f28 * temp_f4)));
|
||||
r = r + temp_f3;
|
||||
return r;*/
|
||||
}
|
||||
|
||||
protected:
|
||||
T mStart;
|
||||
T mEnd;
|
||||
f32 unkVal0;
|
||||
f32 unkVal1;
|
||||
};
|
||||
|
||||
template <>
|
||||
class HermiteIntp<f32> : public utility::FrameController {
|
||||
public:
|
||||
HermiteIntp() {}
|
||||
virtual ~HermiteIntp();
|
||||
|
||||
void init(const f32& start, const f32& end, f32 maxFrame, f32 param_5, f32 param_6, int playback = ANIM_TYPE_FORWARD,
|
||||
f32 speed = 1.0f);
|
||||
|
||||
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))))) -
|
||||
(var_f28 * (var_f28 * (3.0f * var_f27 * var_f27)))))) -
|
||||
(mEnd * ((var_f28 * (var_f28 * (var_f28 * (var_f27 * (2.0f * var_f27 * var_f27))))) -
|
||||
(var_f28 * (var_f28 * (3.0f * var_f27 * var_f27)))));
|
||||
r +=
|
||||
(unkVal0 *
|
||||
(var_f27 + ((var_f28 * (var_f28 * (var_f27 * (var_f27 * var_f27)))) -
|
||||
(var_f28 * (2.0f * var_f27 * var_f27))))) +
|
||||
(unkVal1 * ((var_f28 * (var_f28 * (var_f27 * (var_f27 * var_f27)))) -
|
||||
(var_f28 * (var_f27 * var_f27))));
|
||||
|
||||
return r;
|
||||
}
|
||||
|
||||
protected:
|
||||
f32 mStart;
|
||||
f32 mEnd;
|
||||
f32 unkVal0;
|
||||
f32 unkVal1;
|
||||
};
|
||||
|
||||
#pragma dont_instantiate HermiteIntp<float>
|
||||
#else
|
||||
template <typename T>
|
||||
class HermiteIntp : public Interporation<T> {
|
||||
public:
|
||||
@@ -94,6 +188,8 @@ namespace ipl {
|
||||
f32 unkVal0;
|
||||
f32 unkVal1;
|
||||
};
|
||||
#endif
|
||||
|
||||
} // namespace math
|
||||
} // namespace ipl
|
||||
|
||||
|
||||
@@ -35,6 +35,10 @@ namespace ipl {
|
||||
return x;
|
||||
}
|
||||
}
|
||||
#ifdef IPL_CONTROLLER_OUT_OF_LINE_ABS_CLAMP
|
||||
template <>
|
||||
f32 abs_clamp<f32>(const f32& x, const f32& y);
|
||||
#endif
|
||||
|
||||
typedef struct MTX33 : public nw4r::math::MTX33 {
|
||||
} MTX33;
|
||||
@@ -55,19 +59,27 @@ namespace ipl {
|
||||
x = r.x;
|
||||
y = r.y;
|
||||
}
|
||||
#ifdef IPL_CONTROLLER_OUT_OF_LINE_VEC2
|
||||
VEC2(f32 fx, f32 fy);
|
||||
#else
|
||||
VEC2(f32 fx, f32 fy) {
|
||||
x = fx;
|
||||
y = fy;
|
||||
}
|
||||
#endif
|
||||
|
||||
void operator=(const VEC2& r);
|
||||
|
||||
VEC2 operator*(f32 val) const { return VEC2(x * val, y * val); }
|
||||
|
||||
#ifdef IPL_CONTROLLER_OUT_OF_LINE_VEC2
|
||||
void set(f32 fx, f32 fy);
|
||||
#else
|
||||
void set(f32 fx, f32 fy) {
|
||||
x = fx;
|
||||
y = fy;
|
||||
}
|
||||
#endif
|
||||
|
||||
void clear() {
|
||||
y = 0;
|
||||
@@ -91,11 +103,15 @@ namespace ipl {
|
||||
y = r.y;
|
||||
z = 0.0f;
|
||||
}
|
||||
#if defined(IPL_ADDRESS_EDIT_CPP) || defined(IPL_SD_CHANNEL_SELECT_CPP)
|
||||
VEC3(f32 fx, f32 fy, f32 fz);
|
||||
#else
|
||||
VEC3(f32 fx, f32 fy, f32 fz) {
|
||||
x = fx;
|
||||
y = fy;
|
||||
z = fz;
|
||||
}
|
||||
#endif
|
||||
|
||||
VEC3& operator+=(const VEC3& rhs) {
|
||||
VEC3Add(this, this, &rhs);
|
||||
|
||||
@@ -1,44 +1,277 @@
|
||||
#ifndef IPL_SCENE_ADDRESS_H
|
||||
#define IPL_SCENE_ADDRESS_H
|
||||
|
||||
#include "iplSceneHeader.h"
|
||||
#include "iplSceneUIHeader.h"
|
||||
|
||||
#include "scene/button/iplButton.h"
|
||||
|
||||
#include <revolution/nwc24.h>
|
||||
|
||||
namespace ipl {
|
||||
namespace nigaoe {
|
||||
class Object;
|
||||
}
|
||||
|
||||
namespace scene {
|
||||
class AddressEvent;
|
||||
|
||||
class FriendListCache {
|
||||
public:
|
||||
enum {
|
||||
FRIEND_MAX = 100,
|
||||
};
|
||||
|
||||
FriendListCache() : mbOpened(false) {}
|
||||
|
||||
BOOL init();
|
||||
void fin();
|
||||
|
||||
void add(u32 index, const NWC24FriendInfo& info);
|
||||
void update(u32 index, const wchar_t* name, u64 fdId);
|
||||
void del(u32 index);
|
||||
void swap(u32 index1, u32 index2);
|
||||
|
||||
BOOL isValidId(const NWC24UserId& userId);
|
||||
BOOL isDupId(const NWC24UserId& userId);
|
||||
BOOL isDupMail(const char* mailAddr);
|
||||
|
||||
void sendRegisterMail(u32 index);
|
||||
|
||||
s32 check();
|
||||
s32 getErrCode() const;
|
||||
|
||||
const NWC24FriendInfo& getInfo(int index) const { return mInfos[index]; }
|
||||
BOOL isThere(u32 index) const { return mbThere[index]; }
|
||||
u32 getRegFriendNum() const { return mRegFriendNum; }
|
||||
NWC24UserId getMyUserId() const { return mMyUserId; }
|
||||
s32 getLastErr() const { return mErrCode; }
|
||||
|
||||
private:
|
||||
NWC24FriendInfo mInfos[100];
|
||||
NWC24FriendInfo mInfos[FRIEND_MAX]; // 0x0000
|
||||
u8 mbThere[FRIEND_MAX]; // 0x7D00
|
||||
NWC24UserId mMyUserId; // 0x7D68
|
||||
u32 mRegFriendNum; // 0x7D70
|
||||
u8 mSendWork[0x2000]; // 0x7D74
|
||||
s32 mErrCode; // 0x9D74
|
||||
bool mbOpened; // 0x9D78
|
||||
};
|
||||
|
||||
FADER_SCENE_CLASS(Address) {
|
||||
FADER_SCENE_CLASS(Address), public ButtonEventHandlerBase {
|
||||
public:
|
||||
Address(EGG::Heap * heap, int);
|
||||
virtual void destroy() override;
|
||||
Address(EGG::Heap * heap, int mode);
|
||||
virtual ~Address();
|
||||
|
||||
virtual void prepare();
|
||||
virtual void create();
|
||||
virtual void draw();
|
||||
virtual void destroy();
|
||||
|
||||
virtual FaderSceneCommand calcFadein();
|
||||
|
||||
virtual void initCalcNormal();
|
||||
virtual FaderSceneCommand calcNormal();
|
||||
|
||||
virtual void initCalcFadeout();
|
||||
virtual FaderSceneCommand calcFadeout();
|
||||
|
||||
virtual void calcCommonAfter();
|
||||
|
||||
virtual void onEventDerived(u32 compId, u32 event, const controller::Interface* con);
|
||||
|
||||
enum {
|
||||
SCENE_ADD_WII = 1,
|
||||
SCENE_ADD_EMAIL,
|
||||
};
|
||||
|
||||
enum {
|
||||
BTN_MAX = 5,
|
||||
BTN_SPACE_MAX = BTN_MAX - 1,
|
||||
PAGE_MAX = 20,
|
||||
};
|
||||
|
||||
int getChosenFriendIndex() {
|
||||
return unk_0xC0;
|
||||
return mChosenFriend;
|
||||
}
|
||||
FriendListCache* getFriendCache() {
|
||||
return unk_0x274;
|
||||
return mpFriendCache;
|
||||
}
|
||||
|
||||
private:
|
||||
u8 unk_0x58[0x68];
|
||||
int unk_0xC0;
|
||||
u8 unk_0xC4[0x1B0];
|
||||
FriendListCache* unk_0x274;
|
||||
u8 unk_0x278[0x28];
|
||||
enum {
|
||||
FADEIN_STATE_WAIT_OPEN = 0,
|
||||
FADEIN_STATE_FADEIN,
|
||||
FADEIN_STATE_DONE,
|
||||
};
|
||||
|
||||
enum {
|
||||
STATE_INIT = 0,
|
||||
STATE_COVER_NORMAL,
|
||||
STATE_COVER_FORWARD,
|
||||
STATE_COVER_BACKWARD,
|
||||
STATE_NORMAL,
|
||||
STATE_FORWARD,
|
||||
STATE_BACKWARD,
|
||||
STATE_LOOP_FORWARD,
|
||||
STATE_LOOP_BACKWARD,
|
||||
STATE_DECIDE,
|
||||
STATE_DRAG,
|
||||
STATE_RELEASE,
|
||||
STATE_WAIT_CHILD_CST,
|
||||
STATE_WAIT_CHILD_DST,
|
||||
STATE_WAIT_CHILD_FADEOUT,
|
||||
STATE_MSG_NET,
|
||||
STATE_WAIT_PARENTAL,
|
||||
STATE_WAIT_PARENTAL_DST,
|
||||
STATE_MSG_WC,
|
||||
STATE_WAIT_PARENTAL_WC,
|
||||
STATE_WAIT_PARENTAL_DST_WC,
|
||||
STATE_MSG_NWC24_ERROR,
|
||||
STATE_MSG_FI_FULL,
|
||||
STATE_MSG_PARENTAL,
|
||||
STATE_MSG_OPEN_FAILURE,
|
||||
STATE_WAIT_DIALOG,
|
||||
STATE_DONE,
|
||||
};
|
||||
|
||||
class MiiObj {
|
||||
public:
|
||||
MiiObj();
|
||||
~MiiObj();
|
||||
|
||||
void init(nw4r::lyt::Pane* pane);
|
||||
void set(u64 fdId);
|
||||
void reset();
|
||||
|
||||
static void create_callback(nigaoe::Object* object, void* work);
|
||||
|
||||
GXTexObj mTexObj; // 0x00
|
||||
nigaoe::Object* mpNigaoe; // 0x20
|
||||
nw4r::lyt::Material* mpMaterial; // 0x24
|
||||
};
|
||||
|
||||
struct DragInfo {
|
||||
nw4r::math::VEC2 mPos; // 0x00
|
||||
int mChan; // 0x08
|
||||
int mPage; // 0x0C
|
||||
int mButton; // 0x10
|
||||
int mNextCount; // 0x14
|
||||
int mPrevCount; // 0x18
|
||||
int unk_0x1C; // 0x1C
|
||||
bool mbDragging; // 0x20
|
||||
};
|
||||
|
||||
void fistt_wait_open();
|
||||
void fistt_fadein();
|
||||
|
||||
void onInitFriendList();
|
||||
|
||||
void stt_cover_normal();
|
||||
void stt_cover_forward();
|
||||
void stt_cover_backward();
|
||||
void stt_normal();
|
||||
void stt_forward();
|
||||
void stt_backward();
|
||||
void stt_loop_forward();
|
||||
void stt_loop_backward();
|
||||
void stt_decide();
|
||||
void stt_drag();
|
||||
void stt_release();
|
||||
void stt_wait_child_cst();
|
||||
void stt_wait_child_dst();
|
||||
void stt_wait_child_fadeout();
|
||||
void stt_msg_net();
|
||||
void stt_wait_parental();
|
||||
void stt_wait_parental_dst();
|
||||
void stt_msg_wc();
|
||||
void stt_wait_parental_wc();
|
||||
void stt_wait_parental_dst_wc();
|
||||
void stt_msg_nwc24_error();
|
||||
void stt_msg_fi_full();
|
||||
void stt_msg_parental();
|
||||
void stt_msg_open_failure();
|
||||
void stt_wait_dialog();
|
||||
|
||||
void add_translate(nw4r::lyt::Pane* pane, const math::VEC2& offset);
|
||||
void set_friend(const char* paneName, u32 friendNo, u32 buttonNo, MiiObj& miiObj, bool bDrag);
|
||||
void set_page_text(const char* paneName, int page);
|
||||
void set_textbox(const char* paneName, const wchar_t* text);
|
||||
void set_textbox(const char* paneName, u32 msgId);
|
||||
void reset_friend();
|
||||
|
||||
void start_point_event(const char* paneName, controller::Interface* con);
|
||||
void start_left_event(const char* paneName);
|
||||
void start_trig_event(const char* paneName);
|
||||
void start_drag_event(const char* paneName, const controller::Interface* con);
|
||||
void start_drag_point_event(const char* paneName, controller::Interface* con);
|
||||
void start_drag_left_event(const char* paneName);
|
||||
void start_release_event(const char* paneName);
|
||||
|
||||
void on_point_event(int buttonNo, controller::Interface* con);
|
||||
void left_point_event(int buttonNo);
|
||||
|
||||
int get_button_no(const char* paneName);
|
||||
int get_button_space_no(const char* paneName);
|
||||
|
||||
void reset_gui(bool bKeepPointed);
|
||||
|
||||
BOOL is_selectable(u32 friendNo);
|
||||
|
||||
void onNextPage();
|
||||
void onPreviousPage();
|
||||
|
||||
void set_err_msg(wchar_t* errMsg, u32 errMsgLen, NWC24Err err);
|
||||
|
||||
void entry_friend();
|
||||
|
||||
bool isReleasableArea(int page, int buttonNo);
|
||||
|
||||
void changePage_onDrag();
|
||||
void movePane_onDrag();
|
||||
|
||||
DragInfo mDrag; // 0x64
|
||||
int mMode; // 0x88
|
||||
layout::Object* mpLayout; // 0x8C
|
||||
int unk_0x90; // 0x90
|
||||
AddressEvent* mpEvent; // 0x94
|
||||
gui::PaneManager* mpGui; // 0x98
|
||||
layout::Object* mpBackLayout; // 0x9C
|
||||
layout::Object* mpDialogLayout; // 0xA0
|
||||
int mFadeinState; // 0xA4
|
||||
int mWaitOpenCount; // 0xA8
|
||||
int mState; // 0xAC
|
||||
int mPage; // 0xB0
|
||||
int mNextPageNum; // 0xB4
|
||||
int mPrevPageNum; // 0xB8
|
||||
int mSelectedButton; // 0xBC
|
||||
u32 mChosenFriend; // 0xC0
|
||||
bool mbFaceValid[BTN_MAX]; // 0xC4
|
||||
int mPointCount[BTN_MAX]; // 0xCC
|
||||
bool mbParentalOK; // 0xE0
|
||||
bool mbCover; // 0xE1
|
||||
MiiObj mMiiObj[BTN_MAX]; // 0xE4
|
||||
MiiObj mNextMiiObj[BTN_MAX]; // 0x1AC
|
||||
FriendListCache* mpFriendCache; // 0x274
|
||||
GXTexObj mDragTexObj; // 0x278
|
||||
u8* mpWork; // 0x298
|
||||
f32 mDragOffsetX; // 0x29C
|
||||
|
||||
static const math::VEC2 smcPageOffset;
|
||||
|
||||
friend class AddressEvent;
|
||||
#ifdef IPL_ADDRESS_EDIT_CPP
|
||||
friend class AddressEdit;
|
||||
#endif
|
||||
};
|
||||
|
||||
class AddressEvent : public ::gui::EventHandler {
|
||||
public:
|
||||
AddressEvent(Address* instance) : ::gui::EventHandler(), mpInstance(instance) {}
|
||||
|
||||
virtual void onEvent(u32 compId, u32 event, void* data);
|
||||
|
||||
private:
|
||||
Address* mpInstance; // 0x0C
|
||||
int mTrigChan; // 0x10
|
||||
};
|
||||
} // namespace scene
|
||||
} // namespace ipl
|
||||
|
||||
@@ -2,22 +2,128 @@
|
||||
#define IPL_SCENE_ADDRESS_EDIT_H
|
||||
|
||||
#include "iplSceneHeader.h"
|
||||
#include "scene/button/iplButton.h"
|
||||
|
||||
#include <RFL_Types.h>
|
||||
#include <revolution/nwc24.h>
|
||||
|
||||
namespace ipl {
|
||||
namespace nigaoe {
|
||||
class Object;
|
||||
}
|
||||
|
||||
namespace scene {
|
||||
FADER_SCENE_CLASS(AddressEdit) {
|
||||
class AddressEditEvent;
|
||||
class AddressInputEvent;
|
||||
class FriendListCache;
|
||||
|
||||
FADER_SCENE_CLASS(AddressEdit), public ButtonEventHandlerBase {
|
||||
public:
|
||||
AddressEdit(EGG::Heap * heap, int friendCode);
|
||||
virtual ~AddressEdit();
|
||||
|
||||
virtual void prepare();
|
||||
virtual void create();
|
||||
virtual void draw();
|
||||
|
||||
virtual void initCalcNormal();
|
||||
virtual void initCalcFadeout();
|
||||
virtual void calcCommonAfter();
|
||||
|
||||
virtual FaderSceneCommand calcFadein();
|
||||
virtual FaderSceneCommand calcNormal();
|
||||
virtual FaderSceneCommand calcFadeout();
|
||||
virtual void onEventDerived(u32 compId, u32 event, const controller::Interface* con);
|
||||
|
||||
void stt_msg_code_add();
|
||||
void stt_msg_code_edit();
|
||||
void stt_msg_parental();
|
||||
void stt_msg_nwc24_error();
|
||||
void reset_gui();
|
||||
void start_point_event(const char* paneName, controller::Interface* controller);
|
||||
void start_left_event(const char* paneName);
|
||||
void start_trig_event(const char* paneName);
|
||||
void start_ipt_point_event(const char* paneName, int channel);
|
||||
void start_ipt_left_event(const char* paneName, int channel);
|
||||
void start_ipt_trig_event(const char* paneName, int channel);
|
||||
int get_button_no(const char*);
|
||||
void add_friendinfo();
|
||||
void delete_friendinfo();
|
||||
void set_textbox(nw4r::lyt::Pane*, const wchar_t*);
|
||||
void setDefaultTitleText(const wchar_t*, bool);
|
||||
static void wiiid_utf16(u64, wchar_t*);
|
||||
static void nigaoe_create_callback_add(ipl::nigaoe::Object*, void*);
|
||||
static void nigaoe_create_callback_edit(ipl::nigaoe::Object*, void*);
|
||||
void set_err_msg(wchar_t*, u32, NWC24Err);
|
||||
void get_friendinfo();
|
||||
static u64 utf16_wiiid(const wchar_t*);
|
||||
void stt_add_code_fadein();
|
||||
void stt_add_code_fadeout();
|
||||
void stt_add_code_input();
|
||||
void stt_add_code_normal();
|
||||
void stt_add_confirm_fadein();
|
||||
void stt_add_confirm_fadeout();
|
||||
void stt_add_confirm_normal();
|
||||
void stt_add_mii_fadein();
|
||||
void stt_add_mii_fadeout();
|
||||
void stt_add_mii_input();
|
||||
void stt_add_mii_normal();
|
||||
void stt_add_name_fadein();
|
||||
void stt_add_name_fadeout();
|
||||
void stt_add_name_input();
|
||||
void stt_add_name_normal();
|
||||
void stt_ipt_input();
|
||||
void stt_ipt_normal();
|
||||
void stt_ipt_wait_fadein();
|
||||
void stt_ipt_wait_fadeout();
|
||||
void stt_msg_add_rlt();
|
||||
void stt_msg_code_invalid();
|
||||
void stt_msg_del_rlt();
|
||||
void stt_msg_dup_email();
|
||||
void stt_msg_dup_wii_no();
|
||||
void stt_msg_my_wii_no();
|
||||
void stt_msg_net();
|
||||
void stt_msg_no_established();
|
||||
void stt_msg_no_mii();
|
||||
void stt_msg_no_mii_add();
|
||||
void stt_msg_wc();
|
||||
void stt_select_mii();
|
||||
void stt_wait_btn_fadein();
|
||||
void stt_wait_btn_fadeout();
|
||||
void stt_wait_del_msg_fadein();
|
||||
void stt_wait_del_msg_fadeout();
|
||||
void stt_wait_del_msg_fadeout_to_rlt();
|
||||
void stt_wait_delete();
|
||||
void stt_wait_decide_anm_add();
|
||||
void stt_wait_parental();
|
||||
void stt_wait_parental_dst();
|
||||
void stt_wait_parental_dst_wc();
|
||||
void stt_wait_parental_wc();
|
||||
void stt_normal();
|
||||
void stt_wait_decide_anm();
|
||||
void update_friendinfo();
|
||||
void requestSceneChange(int sceneId, void* args) { reserveSceneChange(sceneId, args); }
|
||||
u32 getPreviousScene() const { return getPrevSceneID(); }
|
||||
EGG::Heap* getHeap() { return getSceneHeap(); }
|
||||
::gui::Manager* getGuiManager() { return mpManager; }
|
||||
|
||||
class String {
|
||||
public:
|
||||
void clear();
|
||||
const wchar_t* getDispCodeLong() const;
|
||||
void setName(const wchar_t* value);
|
||||
void setEMail(const wchar_t* value);
|
||||
void setWiiNo(const wchar_t* value);
|
||||
BOOL isDupCode() const;
|
||||
BOOL isMyCode() const;
|
||||
|
||||
wchar_t mValue[0x102];
|
||||
wchar_t mName[0x0c];
|
||||
wchar_t mDisplayText[0x102];
|
||||
bool mbValidMail;
|
||||
bool mbNameNotEmpty;
|
||||
bool mbHasWiiNo;
|
||||
AddressEdit* mpCallbackOwner;
|
||||
};
|
||||
|
||||
enum {
|
||||
@@ -25,8 +131,27 @@ namespace ipl {
|
||||
SCENE_ADD_EMAIL,
|
||||
};
|
||||
|
||||
private:
|
||||
u8 unk_0x58[0x498];
|
||||
int mState;
|
||||
layout::Object* mpCodeLayout;
|
||||
AddressEditEvent* mpEditEvent;
|
||||
gui::PaneManager* mpEditGui;
|
||||
layout::Object* mpNameLayout;
|
||||
AddressInputEvent* mpInputEvent;
|
||||
gui::PaneManager* mpInputGui;
|
||||
layout::Object* mpBackgroundLayout;
|
||||
int mMode;
|
||||
int mSelectedButton;
|
||||
int mSubState;
|
||||
s32 mPointCount[5];
|
||||
u32 mSelectedFriend;
|
||||
TextBalloon* mpBalloon;
|
||||
nand::LayoutFile* mpBalloonFile;
|
||||
String mString;
|
||||
bool mbParentalOK;
|
||||
nigaoe::Object* mpNigaoe;
|
||||
RFLCreateID mCreateID;
|
||||
int mNigaoeState;
|
||||
FriendListCache* mpFriendCache;
|
||||
};
|
||||
} // namespace scene
|
||||
} // namespace ipl
|
||||
|
||||
@@ -19,6 +19,13 @@
|
||||
|
||||
namespace ipl {
|
||||
namespace scene {
|
||||
extern wchar_t scTextDateJpnFormat[];
|
||||
extern wchar_t scTextDateKorFormat[];
|
||||
extern wchar_t scTextDateGerFormat[];
|
||||
extern wchar_t scTextDatePalengFormat[];
|
||||
#ifdef IPL_BOARD_DATE_HELPERS_INLINE
|
||||
extern const u32 scWeekMsgId[];
|
||||
#endif
|
||||
class focus_object;
|
||||
SCENE_CLASS(Board), public ButtonEventHandlerBase {
|
||||
public:
|
||||
@@ -81,13 +88,57 @@ namespace ipl {
|
||||
void set_text_date();
|
||||
void set_text_date(const utility::Date& date, const char* paneName);
|
||||
|
||||
#ifdef IPL_BOARD_DATE_HELPERS_INLINE
|
||||
void get_text_jpn(const utility::Date& date, wchar_t* text, u32 textLen) {
|
||||
message::Manager* msgMgr = System::getMessageManager();
|
||||
const wchar_t* week = msgMgr->getMessage(scWeekMsgId[utility::Calendar::getWeek(date)]);
|
||||
const wchar_t* sep1 = msgMgr->getMessage(MESG_CALENDAR_MONDAY);
|
||||
const wchar_t* sep2 = msgMgr->getMessage(MESG_CALENDAR_MONDAY);
|
||||
const wchar_t* weekStart = msgMgr->getMessage(MESG_CALENDAR_WEEK_START);
|
||||
const wchar_t* weekEnd = msgMgr->getMessage(MESG_CALENDAR_WEEK_END);
|
||||
|
||||
swprintf(text, textLen, scTextDateJpnFormat, date.month, sep1, date.day, sep2, weekStart, week, weekEnd);
|
||||
}
|
||||
|
||||
void get_text_kor(const utility::Date& date, wchar_t* text, u32 textLen) {
|
||||
message::Manager* msgMgr = System::getMessageManager();
|
||||
const wchar_t* week = msgMgr->getMessage(scWeekMsgId[utility::Calendar::getWeek(date)]);
|
||||
const wchar_t* sep1 = msgMgr->getMessage(MESG_CALENDAR_MONDAY);
|
||||
const wchar_t* sep2 = msgMgr->getMessage(MESG_CALENDAR_MONDAY);
|
||||
const wchar_t* weekStart = msgMgr->getMessage(MESG_CALENDAR_WEEK_START);
|
||||
const wchar_t* weekEnd = msgMgr->getMessage(MESG_CALENDAR_WEEK_END);
|
||||
|
||||
swprintf(text, textLen, scTextDateKorFormat, date.month, sep1, date.day, sep2, weekStart, week, weekEnd);
|
||||
}
|
||||
#else
|
||||
void get_text_jpn(const utility::Date& date, wchar_t* text, u32 textLen);
|
||||
void get_text_kor(const utility::Date& date, wchar_t* text, u32 textLen);
|
||||
#endif
|
||||
void get_text_spa(const utility::Date& date, wchar_t* text, u32 textLen);
|
||||
#ifdef IPL_BOARD_DATE_HELPERS_INLINE
|
||||
void get_text_ger(const utility::Date& date, wchar_t* text, u32 textLen) {
|
||||
message::Manager* msgMgr = System::getMessageManager();
|
||||
const wchar_t* week = msgMgr->getMessage(scWeekMsgId[utility::Calendar::getWeek(date)]);
|
||||
const wchar_t* weekStart = msgMgr->getMessage(MESG_CALENDAR_WEEK_START);
|
||||
const wchar_t* weekEnd = msgMgr->getMessage(MESG_CALENDAR_WEEK_END);
|
||||
|
||||
swprintf(text, textLen, scTextDateGerFormat, date.day, date.month, weekStart, week, weekEnd);
|
||||
}
|
||||
#else
|
||||
void get_text_ger(const utility::Date& date, wchar_t* text, u32 textLen);
|
||||
#endif
|
||||
void get_text_usaeng(const utility::Date& date, wchar_t* text, u32 textLen);
|
||||
void get_text_usafre(const utility::Date& date, wchar_t* text, u32 textLen);
|
||||
#ifdef IPL_BOARD_DATE_HELPERS_INLINE
|
||||
void get_text_paleng(const utility::Date& date, wchar_t* text, u32 textLen) {
|
||||
message::Manager* msgMgr = System::getMessageManager();
|
||||
const wchar_t* week = msgMgr->getMessage(scWeekMsgId[utility::Calendar::getWeek(date)]);
|
||||
|
||||
swprintf(text, textLen, scTextDatePalengFormat, week, date.day, date.month);
|
||||
}
|
||||
#else
|
||||
void get_text_paleng(const utility::Date& date, wchar_t* text, u32 textLen);
|
||||
#endif
|
||||
|
||||
void show_ricon();
|
||||
void hide_ricon();
|
||||
@@ -226,8 +277,17 @@ namespace ipl {
|
||||
STATE_DONE,
|
||||
};
|
||||
|
||||
#ifdef IPL_BOARD_INLINE_GETTERS
|
||||
static Button* get_button() {
|
||||
return static_cast<Button*>(System::getScene(SCENE_BUTTON));
|
||||
}
|
||||
static Arrow* get_arrow() {
|
||||
return static_cast<Arrow*>(System::getScene(SCENE_ARROW));
|
||||
}
|
||||
#else
|
||||
static Button* get_button();
|
||||
static Arrow* get_arrow();
|
||||
#endif
|
||||
|
||||
static const int OBJECTS_ON_SCREEN = 10;
|
||||
|
||||
|
||||
@@ -85,6 +85,9 @@ namespace ipl {
|
||||
}
|
||||
|
||||
const utility::BScroller& getBInst() { return mBScroller; }
|
||||
#ifdef IPL_SDMEMORY_SCROLLER_BINST_RESET
|
||||
void resetBInst() { mBScroller.reset(); }
|
||||
#endif
|
||||
|
||||
bool isDownEnd() const { return mScroller.isDownEnd(); }
|
||||
bool isUpEnd() const { return mScroller.isUpEnd(); }
|
||||
@@ -98,6 +101,9 @@ namespace ipl {
|
||||
|
||||
void setDownLimit(f32 v) { mScroller.setDownLimit(v); }
|
||||
void setUpLimit(f32 v) { mScroller.setUpLimit(v); }
|
||||
#ifdef IPL_SDMEMORY_SCROLLER_STATE_ACCESSOR
|
||||
void setState(int state) { mScroller.setState(state); }
|
||||
#endif
|
||||
|
||||
bool isActive() const { return mScroller.isActive(); }
|
||||
|
||||
|
||||
@@ -3,7 +3,15 @@
|
||||
|
||||
#include <revolution/types.h>
|
||||
|
||||
#ifdef IPL_ANM_CONTROLLER_FORWARD_GUI
|
||||
namespace ipl {
|
||||
namespace gui {
|
||||
class PaneManager;
|
||||
}
|
||||
}
|
||||
#else
|
||||
#include "layout/iplGuiManager.h"
|
||||
#endif
|
||||
#include "layout/iplLayout.h"
|
||||
|
||||
namespace ipl {
|
||||
|
||||
@@ -404,7 +404,12 @@ namespace ipl {
|
||||
int mModuleIndex; // 0x400
|
||||
EGG::ExpHeap* mpCSHeap; // 0x404
|
||||
|
||||
static ESTicketView msTicketView;
|
||||
struct TicketViewStorage {
|
||||
ESTicketView view;
|
||||
u8 pad[8];
|
||||
};
|
||||
|
||||
static TicketViewStorage msTicketView;
|
||||
static ESTicketView msUnlockTicket;
|
||||
|
||||
static const char* mscBtnNames[BTN_MAX];
|
||||
|
||||
@@ -35,7 +35,14 @@ namespace ipl {
|
||||
virtual void onSend();
|
||||
virtual int sendMessageByNWC24(NWC24UserId userId, const wchar_t* wcString);
|
||||
|
||||
#ifdef IPL_ADDRESS_MATCHING
|
||||
virtual void setFriendInfo(const NWC24FriendInfo& info) {
|
||||
mbToFriend = true;
|
||||
mFriendInfo = info;
|
||||
}
|
||||
#else
|
||||
virtual void setFriendInfo(const NWC24FriendInfo& info);
|
||||
#endif
|
||||
virtual void setPhoto(const GXTexObj& texObj);
|
||||
|
||||
virtual int sendToWii(NWC24UserId userId, const wchar_t* wcString);
|
||||
|
||||
158
include/scene/sdChannelMemory/iplSDMemory.h
Normal file
158
include/scene/sdChannelMemory/iplSDMemory.h
Normal file
@@ -0,0 +1,158 @@
|
||||
#ifndef IPL_SCENE_SD_MEMORY_H
|
||||
#define IPL_SCENE_SD_MEMORY_H
|
||||
|
||||
#include <revolution.h>
|
||||
|
||||
#include "layout/iplLayout.h"
|
||||
#include "layout/iplGuiManager.h"
|
||||
#include "scene/board/iplFocusObject.h"
|
||||
#include "scene/channelEdit/iplNandSDCardManager.h"
|
||||
|
||||
namespace ipl {
|
||||
namespace scene {
|
||||
class SDChannelSelect;
|
||||
|
||||
class SDMemory {
|
||||
public:
|
||||
struct TitleRange {
|
||||
s32 mByteSize;
|
||||
u32 mCount;
|
||||
};
|
||||
|
||||
SDMemory();
|
||||
~SDMemory();
|
||||
|
||||
void create(EGG::Heap* heap, nand::LayoutFile* layoutFile, SDChannelSelect* channelSelect);
|
||||
void setTitleLists(const TitleRange& nandTitles, const TitleRange& sdTitles);
|
||||
bool calc();
|
||||
void draw();
|
||||
void setScrollLimit();
|
||||
void updateSideArrows();
|
||||
void resetScrollArrows();
|
||||
void updateScrollArrows(u32 previousDownEnd, u32 previousUpEnd, u32 downEnd, u32 upEnd);
|
||||
void showDownArrow();
|
||||
void showUpArrow();
|
||||
void hideDownArrow();
|
||||
void hideUpArrow();
|
||||
void showLeftArrow();
|
||||
void showRightArrow();
|
||||
void hideLeftArrow();
|
||||
void hideRightArrow();
|
||||
|
||||
private:
|
||||
s32 updateState();
|
||||
void drawTransferTitles();
|
||||
void onDialogState0();
|
||||
void onDialogState2();
|
||||
bool onDialogState3();
|
||||
void onDialogState4();
|
||||
void onDialogState6();
|
||||
void onDialogState7();
|
||||
void onDialogState8();
|
||||
void onDialogState9();
|
||||
void onDialogState10();
|
||||
void onDialogState11();
|
||||
void onDialogState12();
|
||||
void onDialogState13();
|
||||
void onDialogState14();
|
||||
void onDialogState15();
|
||||
void onDialogState16();
|
||||
void onDialogState17();
|
||||
void onDialogState18();
|
||||
void onDialogState19();
|
||||
bool onDialogState20();
|
||||
void onDialogState21();
|
||||
bool onDialogState22();
|
||||
void onDialogState23();
|
||||
bool onDialogState24();
|
||||
void resetDialogPaneAnimations();
|
||||
s32 getControlPaneIndex(const char* paneName);
|
||||
void activateControlPane(const char* paneName, ::gui::Component* component);
|
||||
void deactivateControlPane(const char* paneName);
|
||||
void cancelControlPane(const char* paneName);
|
||||
s32 getTitlePaneIndex(const char* paneName);
|
||||
void activateTitlePane(const char* paneName, ::gui::Component* component);
|
||||
void deactivateTitlePane(const char* paneName);
|
||||
void selectTitlePane(const char* paneName);
|
||||
s32 getDialogPaneIndex(const char* paneName);
|
||||
void activateDialogPane(const char* paneName, ::gui::Component* component);
|
||||
void deactivateDialogPane(const char* paneName);
|
||||
void selectDialogPane(const char* paneName);
|
||||
|
||||
class ControlPaneEventHandler : public ::gui::EventHandler {
|
||||
public:
|
||||
ControlPaneEventHandler(SDMemory* instance) : ::gui::EventHandler(), mpInstance(instance) {}
|
||||
virtual void onEvent(u32 compId, u32 event, void* data);
|
||||
|
||||
private:
|
||||
SDMemory* mpInstance;
|
||||
};
|
||||
|
||||
class TitlePaneEventHandler : public ::gui::EventHandler {
|
||||
public:
|
||||
TitlePaneEventHandler(SDMemory* instance) : ::gui::EventHandler(), mpInstance(instance) {}
|
||||
virtual void onEvent(u32 compId, u32 event, void* data);
|
||||
|
||||
private:
|
||||
SDMemory* mpInstance;
|
||||
};
|
||||
|
||||
class DialogPaneEventHandler : public ::gui::EventHandler {
|
||||
public:
|
||||
DialogPaneEventHandler(SDMemory* instance) : ::gui::EventHandler(), mpInstance(instance) {}
|
||||
virtual void onEvent(u32 compId, u32 event, void* data);
|
||||
|
||||
private:
|
||||
SDMemory* mpInstance;
|
||||
};
|
||||
|
||||
layout::Object* mpMainLayout;
|
||||
layout::Object* mpTitleLayout;
|
||||
layout::Object* mpDialogLayout;
|
||||
layout::Object* mpProgressLayout;
|
||||
gui::PaneManager* mpPaneManagers[3];
|
||||
s32 mDialogState;
|
||||
s32 mProcessState;
|
||||
s32 mDisplayMode;
|
||||
s32 mMessageId;
|
||||
u32 mErrorCode;
|
||||
u32 mPanelStates[3];
|
||||
u32 mTitlePanelStates[5];
|
||||
u32 mPanelAnimationStates[4];
|
||||
SDChannelSelect* mpSDChannelSelect;
|
||||
TitleRange mNandTitleRange;
|
||||
TitleRange mSDTitleRange;
|
||||
u32 mTitleCount;
|
||||
u32 mCurrentTitle;
|
||||
u32 mTitleFlags;
|
||||
ESTitleId mTitleIds[96];
|
||||
wchar_t mTitleNames[96][21];
|
||||
u32 mTitleNameCount;
|
||||
u32 mSDTitleCount;
|
||||
ESTitleId mSDTitleIds[96];
|
||||
u32 mNandTitleCount;
|
||||
u32 mNandTitleNameCount;
|
||||
ESTitleId mNandTitleIds[96];
|
||||
wchar_t mCurrentTitleName[0x840];
|
||||
u8 mTransferFlags[4];
|
||||
u32 mTransferStatus;
|
||||
u64 mTransferStartTime;
|
||||
s32 mTransferFrame;
|
||||
struct TitleListState {
|
||||
ESTitleId* mpTitles;
|
||||
u32 mCount;
|
||||
ESTitleId* mpSecondaryTitles;
|
||||
u32 mSecondaryCount;
|
||||
ESTitleId* mpNames;
|
||||
u32 mNameCount;
|
||||
} mTitleListState;
|
||||
scroller mScroller;
|
||||
s32 mButtonState;
|
||||
u8 mControllerFlags[4];
|
||||
u32 mFinalState[3];
|
||||
u8 mFinalFlags[4];
|
||||
};
|
||||
} // namespace scene
|
||||
} // namespace ipl
|
||||
|
||||
#endif
|
||||
@@ -1,18 +1,302 @@
|
||||
#ifndef IPL_SCENE_SD_CHANNEL_SELECT_H
|
||||
#define IPL_SCENE_SD_CHANNEL_SELECT_H
|
||||
|
||||
#include "iplSceneHeader.h"
|
||||
#include "iplSceneUIHeader.h"
|
||||
|
||||
#include "math/iplInterporation.h"
|
||||
#include "scene/sdButton/iplSDButton.h"
|
||||
#include "system/iplChannelRsoThread.h"
|
||||
#include "system/iplNandSDWorker.h"
|
||||
|
||||
namespace ipl {
|
||||
namespace scene {
|
||||
FADER_SCENE_CLASS(SDChannelSelect) {
|
||||
class SDChannelObj {
|
||||
public:
|
||||
SDChannelSelect(EGG::Heap * heap);
|
||||
SDChannelObj(EGG::Heap* heap, int page, int index);
|
||||
~SDChannelObj();
|
||||
|
||||
EGG::Heap* getHeap() const { return mpHeap; }
|
||||
int getPage() const { return mPage; }
|
||||
int getIndex() const { return mIndex; }
|
||||
|
||||
private:
|
||||
u8 unk_0x58[0x728];
|
||||
};
|
||||
} // namespace scene
|
||||
} // namespace ipl
|
||||
friend class SDChannelSelect;
|
||||
|
||||
#endif // IPL_SCENE_SD_CHANNEL_SELECT_H
|
||||
nw4r::ut::Link mListLink;
|
||||
EGG::ExpHeap* mpDialogHeap;
|
||||
EGG::ExpHeap* mpChannelHeap;
|
||||
EGG::Heap* mpHeap;
|
||||
u32 mState;
|
||||
int mPage;
|
||||
int mIndex;
|
||||
nand::LayoutFile* mpLayoutFile;
|
||||
nw4r::lyt::Pane* mpPane;
|
||||
layout::Animator* mpPaneAnimator;
|
||||
layout::Object* mpBaseLayout;
|
||||
layout::Animator* mpBaseAnimator;
|
||||
layout::Object* mpPageLayout;
|
||||
layout::Animator* mpPageAnimators[3];
|
||||
int mPageAnimation;
|
||||
int mPageAnimationFrame;
|
||||
layout::Object* mpDialogLayout;
|
||||
layout::Animator* mpDialogAnimator;
|
||||
int mDialogState;
|
||||
int mDialogFrame;
|
||||
int mDialogTimer;
|
||||
int mAnimationState;
|
||||
nw4r::lyt::Group* mpNewMessageGroup;
|
||||
int mNewMessageCount;
|
||||
u8 mbNewMessageGroupActive;
|
||||
int mNewMessageState;
|
||||
int mNewMessageFrame;
|
||||
f32 mOffsetX;
|
||||
f32 mOffsetY;
|
||||
f32 mAspectRatioScale;
|
||||
int mStateFlags;
|
||||
void* mpThumbnailData;
|
||||
NandSDWorker::SDAppMetaEntry mAppMeta;
|
||||
};
|
||||
extern "C" void iplSDChannelObj_813E3104(SDChannelObj* channel);
|
||||
extern "C" void iplSDChannelObj_813E311C(SDChannelObj* channel, EGG::ExpHeap* firstHeap,
|
||||
EGG::ExpHeap* secondHeap);
|
||||
extern "C" void iplSDChannelObj_813E322C(SDChannelObj* channel);
|
||||
extern "C" void iplSDChannelObj_813E3178(SDChannelObj* channel, nw4r::lyt::Pane* pane);
|
||||
extern "C" void iplSDChannelObj_813E3180(SDChannelObj* channel, nand::LayoutFile* layoutFile);
|
||||
extern "C" void iplSDChannelObj_813E3304(SDChannelObj* channel);
|
||||
extern "C" void iplSDChannelObj_813E330C(SDChannelObj* channel);
|
||||
extern "C" void* iplSDChannelObj_813E3128(SDChannelObj* channel);
|
||||
extern "C" bool iplSDChannelObj_813E3330(SDChannelObj* channel);
|
||||
|
||||
union SDChannelSelectCommandArguments {
|
||||
u32 values[3];
|
||||
NandSDWorker::AppBlocksInfo* appBlocks[3];
|
||||
NandSDWorker::TitleIdList* titleLists[3];
|
||||
void* pointers[3];
|
||||
};
|
||||
|
||||
struct SDChannelSelectCommand {
|
||||
u32 type;
|
||||
u64 titleId;
|
||||
SDChannelSelectCommandArguments arguments;
|
||||
|
||||
void copyFrom(const SDChannelSelectCommand& other);
|
||||
};
|
||||
|
||||
struct SDChannelSelectCommandQueue {
|
||||
SDChannelSelectCommand commands[4];
|
||||
int capacity;
|
||||
int count;
|
||||
int readIndex;
|
||||
int writeIndex;
|
||||
|
||||
SDChannelSelectCommandQueue(u32 capacity, u32 count, u32 readIndex, u32 writeIndex)
|
||||
: capacity(capacity), count(count), readIndex(readIndex), writeIndex(writeIndex) {
|
||||
}
|
||||
|
||||
bool push(const SDChannelSelectCommand& command);
|
||||
bool pop();
|
||||
};
|
||||
|
||||
struct SDChannelSelectTitleInfo {
|
||||
ESTitleId32 titleId;
|
||||
bool used;
|
||||
};
|
||||
|
||||
struct SDChannelSelectNoticeQueue {
|
||||
SDChannelSelectCommand notices[42];
|
||||
int capacity;
|
||||
int count;
|
||||
int readIndex;
|
||||
int writeIndex;
|
||||
|
||||
SDChannelSelectNoticeQueue(u32 capacity, u32 count, u32 readIndex, u32 writeIndex)
|
||||
: capacity(capacity), count(count), readIndex(readIndex), writeIndex(writeIndex) {
|
||||
}
|
||||
|
||||
bool pop();
|
||||
};
|
||||
|
||||
FADER_SCENE_CLASS(SDChannelSelect) {
|
||||
public:
|
||||
enum {
|
||||
PAGE_COUNT = 5,
|
||||
};
|
||||
|
||||
SDChannelSelect(EGG::Heap* heap);
|
||||
virtual ~SDChannelSelect();
|
||||
|
||||
NandSDWorker::WorkSDState getSDState() const {
|
||||
return static_cast<NandSDWorker::WorkSDState>(mCurrentSDState);
|
||||
}
|
||||
NandSDWorker* getWorker() const { return mpSDWorker; }
|
||||
|
||||
virtual BOOL isResetProcessDone();
|
||||
virtual void startResetting();
|
||||
virtual void prepare();
|
||||
virtual void create();
|
||||
virtual void draw();
|
||||
virtual void destroy();
|
||||
virtual void initCalcFadeout();
|
||||
virtual void calcCommon();
|
||||
virtual FaderSceneCommand calcFadein();
|
||||
virtual FaderSceneCommand calcNormal();
|
||||
virtual FaderSceneCommand calcFadeout();
|
||||
|
||||
static const char* mscChannelPaneNames[PAGE_COUNT][MAX_CHANNEL_INDEX];
|
||||
static const char* mscBasePaneNames[PAGE_COUNT];
|
||||
static const char* mscPicturePaneNames[PAGE_COUNT];
|
||||
static const char* mscEdgePaneNames[PAGE_COUNT];
|
||||
static const char* mscClockPaneNames[3];
|
||||
static const char* mscMaskPaneName;
|
||||
|
||||
private:
|
||||
void enqueueStartNotice();
|
||||
bool enqueueFinishNotice();
|
||||
bool enqueueNotice(u32 highTitleId, u32 lowTitleId, u32 result);
|
||||
bool enqueueLoadNotice();
|
||||
bool enqueuePageNotice();
|
||||
bool enqueueResultNotice(u32 result);
|
||||
bool enqueueChannelNotice(u32 controller, u32 page, u32 index, u32 value);
|
||||
bool enqueueMoveNotice(u32 controller, u32 page, u32 index);
|
||||
bool enqueueStateNotice(u32 controller, u32 page, u32 index, u32 state);
|
||||
bool enqueueErrorNotice(u32 page, u32 index);
|
||||
bool enqueueCommandNotice(u32 page, u32 index, u32 command);
|
||||
bool enqueueDeleteNotice(u32 controller, u32 page, u32 index);
|
||||
void clearCommandQueue();
|
||||
void clearNoticeQueue();
|
||||
void calcChannelObjects();
|
||||
void updateChannelObjects();
|
||||
void updateChannelObject(SDChannelObj* channel);
|
||||
void drawChannelObjects();
|
||||
bool isChannelInCalc(int page, int index, int currentPage) const;
|
||||
nw4r::lyt::Pane* getChannelBasePane(int page, int index, int currentPage) const;
|
||||
nw4r::lyt::Pane* getCenterChannelPane(int index) const;
|
||||
nw4r::lyt::Pane* getChannelPane(int index) const;
|
||||
static math::VEC3 getChannelPanePosition(SDChannelSelect* scene, int index);
|
||||
void calcPageAnimations();
|
||||
void updateArrowVisibility();
|
||||
void processWorkerState();
|
||||
void updateDialogAnimation();
|
||||
void processWorkerCommands();
|
||||
void handleWorkerStartup();
|
||||
void handleNandTitleCount();
|
||||
void handleNandTitleUsage();
|
||||
void handleNandTitleUsageComplete();
|
||||
void handleSDTitleList();
|
||||
void handleSDTitleListResult();
|
||||
void refreshAfterSDTitleList();
|
||||
void handleSDChannelUpdateComplete();
|
||||
void updateChannelNotices(int pageOffset, int index);
|
||||
void handleSDMountComplete();
|
||||
void handleCopyComplete();
|
||||
void handleDeleteComplete();
|
||||
void handleMoveComplete();
|
||||
void handleStorageCheckComplete();
|
||||
void handleCardCommand();
|
||||
void handleSDCardReady();
|
||||
void handleSDLocationUpdateComplete();
|
||||
void handleSDLocationReadComplete();
|
||||
void handleBackupFitComplete();
|
||||
void handleNandSDCleanupComplete();
|
||||
void handleSDDeleteComplete();
|
||||
bool setDialogMessage(u32 state, u32 message);
|
||||
static int compareTitleUsage(const void* lhs, const void* rhs);
|
||||
static int compareTitleInfo(const void* lhs, const void* rhs);
|
||||
void createChannelList(int page, bool force);
|
||||
void destroyChannelObject(SDChannelObj* channel);
|
||||
void destroyUnusedChannelObjects(int currentPage, SDChannelObj* keepChannel);
|
||||
void refreshChannelList();
|
||||
bool hasChannelObject(int page, int index) const;
|
||||
SDChannelObj* findChannelObject(int page, int index) const;
|
||||
void createChannelObject(int page, int index);
|
||||
void createBaseLayout();
|
||||
void updateNoCardLayouts();
|
||||
void createChannelThumbnails();
|
||||
|
||||
nw4r::ut::List mChannelObjects;
|
||||
nand::LayoutFile* mpLayoutFile;
|
||||
layout::Object* mpLayout;
|
||||
math::HermiteIntp<math::VEC3>* mpPageAnimations[4];
|
||||
gui::PaneManager* mpPaneManager;
|
||||
layout::Object* mpNoCardLayout;
|
||||
layout::Object* mpPageLayouts[3];
|
||||
layout::Object* mpDialogLayout;
|
||||
SDButtonEventHandlerBase* mpButtonEventHandler;
|
||||
int mState;
|
||||
int mCurrentPage;
|
||||
int mPageCount;
|
||||
int mCurrentChannelIndex;
|
||||
f32 mThumbOffsetX;
|
||||
f32 mThumbOffsetY;
|
||||
nw4r::math::VEC3 mPosition;
|
||||
math::VEC2 mScale;
|
||||
f32 mAspectRatioScale;
|
||||
bool mbLeftArrowVisible;
|
||||
bool mbRightArrowVisible;
|
||||
u8 mArrowState;
|
||||
u8 mNoCardState;
|
||||
EGG::UnitHeap* mpLayoutHeap;
|
||||
EGG::ExpHeap* mpDialogHeap;
|
||||
EGG::ExpHeap* mpChannelHeap;
|
||||
EGG::ExpHeap* mpThumbnailHeap;
|
||||
nw4r::math::VEC2 mPointerPosition;
|
||||
int mControllerChannel;
|
||||
int mSourcePage;
|
||||
int mSourceIndex;
|
||||
int mDestinationPage;
|
||||
int mDestinationIndex;
|
||||
int mPendingPage;
|
||||
int mPendingIndex;
|
||||
int mMoveState;
|
||||
bool mbButtonEnabled;
|
||||
bool mbDialogActive;
|
||||
u16 mInputFlags;
|
||||
SDChannelObj* mpCurrentChannel;
|
||||
layout::Object* mpStateLayout;
|
||||
layout::Object* mpHelpLayout;
|
||||
EGG::ExpHeap* mpRsoHeap;
|
||||
channel::RsoThread* mpRsoThread;
|
||||
u32 mCommandQueueState;
|
||||
SDChannelSelectCommandQueue mCommandQueue;
|
||||
SDChannelSelectNoticeQueue mNoticeQueue;
|
||||
int mCurrentSDState;
|
||||
int mPreviousSDState;
|
||||
int mWorkerState;
|
||||
int mWorkerCommand;
|
||||
EGG::Heap* mpWorkerHeap;
|
||||
EGG::Heap* mpThumbnailWorkHeap;
|
||||
NandSDWorker* mpSDWorker;
|
||||
ESTitleId32* mpSDTitleIds;
|
||||
SDChannelSelectTitleInfo* mpSDTitleInfo;
|
||||
NandSDWorker::TitleUsage* mpNandTitleInfo;
|
||||
u32 mFirstTitleCount;
|
||||
u32 mSecondTitleCount;
|
||||
SDChannelObj* mpCurrentLoadedChannel;
|
||||
u32 mSDTitleCount;
|
||||
u32 mNandTitleCount;
|
||||
u32* mpChannelTitleIds;
|
||||
u32 mPendingOperation;
|
||||
int mLastOperation;
|
||||
layout::Object* mpErrorLayout;
|
||||
layout::Object* mpPointerLayout;
|
||||
layout::Object* mpHelpButtonLayout;
|
||||
int mOperationResult;
|
||||
u8 mbShowNoCardMessage;
|
||||
u8 mbOperationActive;
|
||||
u8 mbSDCardBroken;
|
||||
u32 mOperationState;
|
||||
u32 mDialogState;
|
||||
nand::File* mpSaveDataFile;
|
||||
u32 mAnimationState;
|
||||
u32 mAnimationTarget;
|
||||
OSTime mOperationStartTime;
|
||||
nand::File* mpCorruptIconFile;
|
||||
u8 mbHazardTitleFound;
|
||||
u8 mbChannelLimitReached;
|
||||
u8 mbInitialLoadComplete;
|
||||
u8 mbNeedsRefresh;
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -17,7 +17,11 @@ namespace ipl {
|
||||
|
||||
virtual ~APScanThread(); // 0x08
|
||||
virtual void* Run(); // 0x0C
|
||||
virtual void unk_0x2C() = 0; // 0x2C
|
||||
#ifdef IPL_SETTING_IMPLEMENTATION
|
||||
virtual void unk_0x2C();
|
||||
#else
|
||||
virtual void unk_0x2C() = 0;
|
||||
#endif
|
||||
|
||||
void setResultData(unsigned short* buffer);
|
||||
void setParam();
|
||||
|
||||
@@ -3,14 +3,171 @@
|
||||
|
||||
#include "iplSceneHeader.h"
|
||||
|
||||
#ifdef IPL_SETTING_IMPLEMENTATION
|
||||
#include <revolution/os.h>
|
||||
#include "layout/iplGuiManager.h"
|
||||
#include "layout/GUIManager.h"
|
||||
#include "iplwww/www_wiisetting.h"
|
||||
#include "iplwww/www_browser.h"
|
||||
#include "system/iplKeyboard.h"
|
||||
#include "system/iplNand.h"
|
||||
#include "utility/iplThread.h"
|
||||
extern "C" {
|
||||
#include <revolution/wd.h>
|
||||
}
|
||||
#endif
|
||||
|
||||
namespace ipl {
|
||||
namespace controller {
|
||||
class Interface;
|
||||
}
|
||||
}
|
||||
|
||||
namespace ipl {
|
||||
namespace scene {
|
||||
#ifdef IPL_SETTING_IMPLEMENTATION
|
||||
class Setting;
|
||||
class APScanThread;
|
||||
|
||||
class APEvent : public ::gui::EventHandler {
|
||||
public:
|
||||
APEvent(Setting* setting) : ::gui::EventHandler(), mpSetting(setting) {}
|
||||
|
||||
virtual void onEvent(u32 componentID, u32 event, void* data);
|
||||
|
||||
private:
|
||||
Setting* mpSetting;
|
||||
};
|
||||
|
||||
struct SettingAnimation {
|
||||
u8 unknown[0x14];
|
||||
int state;
|
||||
};
|
||||
|
||||
struct SettingAPScanList {
|
||||
u8 unknown[0x14];
|
||||
u16 count;
|
||||
u8 entries[0x7fe];
|
||||
union {
|
||||
WDBssDesc_* currentDescriptor;
|
||||
u16* currentDescriptorWords;
|
||||
};
|
||||
};
|
||||
#endif
|
||||
|
||||
FADER_SCENE_CLASS(Setting) {
|
||||
public:
|
||||
Setting(EGG::Heap * heap, int arg);
|
||||
void setInitializeResult(bool, int);
|
||||
#ifdef IPL_SETTING_IMPLEMENTATION
|
||||
virtual ~Setting();
|
||||
|
||||
bool isAnimating();
|
||||
void getFuncMsgQ();
|
||||
void resetFuncMsgQ();
|
||||
void createBrowser();
|
||||
void initDirectUrl();
|
||||
void initString();
|
||||
void initWiiSettingData();
|
||||
void initNickName();
|
||||
void initSecurityKey();
|
||||
void initSSID();
|
||||
void initIP();
|
||||
void initDNS();
|
||||
void initProxy();
|
||||
void initBasic();
|
||||
void initMTU();
|
||||
void initSecA();
|
||||
void initVersion();
|
||||
void updateController_();
|
||||
void setSE();
|
||||
void changeVideoMode();
|
||||
bool isInitialSequenceExit(const ::ipl::controller::Interface* input);
|
||||
bool updateScreenMode();
|
||||
void initHTMLText();
|
||||
void initMessage();
|
||||
void initKeyboard(const char* text);
|
||||
bool checkInputString(const wchar_t* text);
|
||||
int checkIPString(const wchar_t* text);
|
||||
void setDefaultBackString();
|
||||
void calcKeyboard();
|
||||
void calcSetting();
|
||||
void onTextInputOK();
|
||||
void setDisPos();
|
||||
void setNickName();
|
||||
void setSecurityKey();
|
||||
void setSSID();
|
||||
void setIP();
|
||||
void setDNS();
|
||||
void setProxy();
|
||||
void setBasic();
|
||||
void setMTU();
|
||||
void setParePass();
|
||||
void setPareRePass();
|
||||
void setPareJudgePass();
|
||||
void setSecA();
|
||||
void setReSecA();
|
||||
void setMasterKey();
|
||||
void adjustSecA(wchar_t* text);
|
||||
void reAdjustSecA();
|
||||
u8 checkTextNum(const char* text);
|
||||
bool checkSpace();
|
||||
void convertIP(char* destination, const u8* address);
|
||||
void convertRevIP(u8* destination, const char* address);
|
||||
void initScroll();
|
||||
void updateScroll();
|
||||
void setAPDraw();
|
||||
int getRadioLevel(const WDBssDesc_* descriptor);
|
||||
void setUseEULA_Init_();
|
||||
void setUseEULA_Cancel_();
|
||||
void setUseEULA_Start_();
|
||||
void setUseEULA_WaitStopMotor_();
|
||||
bool validateEULA_();
|
||||
void setUpdate_Init_();
|
||||
void setUpdate_WaitAcceptDialog_();
|
||||
void setUpdate_ConnectTestStart_();
|
||||
void setUpdate_ConnectTestCreateWait_();
|
||||
void setUpdate_ConnectTestRun_();
|
||||
void setUpdate_ConnectTestFailed_();
|
||||
void setUpdate_SuccessDialog_();
|
||||
void setUpdate_NoUpdateDialog_();
|
||||
void setUpdate_EULAInit_();
|
||||
void setUpdate_Reboot_();
|
||||
void makeErrorMessage();
|
||||
bool calcSafeMode();
|
||||
void waitStart();
|
||||
void waitFinish();
|
||||
bool isWaitPlaying();
|
||||
void initAP();
|
||||
void resetAP();
|
||||
void redrawAP();
|
||||
void scanAP();
|
||||
void setNUP();
|
||||
void setUSBAP();
|
||||
void cancelUSBAP();
|
||||
void AOSSProcess();
|
||||
void RakuProcess();
|
||||
void setUpdate_();
|
||||
void setUseEULA_();
|
||||
void start_point_event(const char* pageName);
|
||||
void start_trig_event(const char* pageName);
|
||||
void start_left_event(const char* pageName);
|
||||
int get_arw_no(const char* paneName);
|
||||
int get_ap_no(const char* buttonName);
|
||||
void makeSupportCode();
|
||||
int getErrorNum();
|
||||
virtual void destroy();
|
||||
virtual void prepare();
|
||||
virtual void create();
|
||||
virtual void calc();
|
||||
virtual void draw();
|
||||
virtual FaderSceneCommand calcFadein();
|
||||
virtual FaderSceneCommand calcNormal();
|
||||
virtual FaderSceneCommand calcFadeout();
|
||||
virtual BOOL isResetAcceptable() const;
|
||||
#endif
|
||||
|
||||
u16 getProfileID();
|
||||
void setInitializeResult(bool, int);
|
||||
void setConnectTestResult(int, int, bool, int);
|
||||
int getUpdateTiming();
|
||||
|
||||
@@ -25,7 +182,85 @@ namespace ipl {
|
||||
};
|
||||
|
||||
private:
|
||||
#ifdef IPL_SETTING_IMPLEMENTATION
|
||||
int mUpdateTiming;
|
||||
u8 unk_0x5C;
|
||||
u8 unk_0x5D[3];
|
||||
nand::Base* mpWWWLibraryFile;
|
||||
nand::Base* mpSettingHTMLFile;
|
||||
nand::Base* mpWWWArchiveFile;
|
||||
nand::Base* mpFontFile;
|
||||
nand::Base* mpBackgroundTPLFile;
|
||||
int unk_0x74;
|
||||
int unk_0x78;
|
||||
int unk_0x7C;
|
||||
int mProfileIDMode;
|
||||
int unk_0x84;
|
||||
int mAOSSState;
|
||||
int mRakuState;
|
||||
int mFuncMsgPending;
|
||||
int unk_0x94;
|
||||
ESTitleId mUpdateTitleId;
|
||||
u32 mPrepareTick;
|
||||
u8 mSettingData[0x16];
|
||||
u8 unk_0xBA[2];
|
||||
nand::LayoutFile* mpSettingLayoutFile;
|
||||
layout::Object* mpChangeLayout;
|
||||
layout::Object* mpMainLayout;
|
||||
layout::Object* mpWaitLayout;
|
||||
SettingAnimation* mpFirstAnimation;
|
||||
SettingAnimation* mpSecondAnimation;
|
||||
APEvent* mpEventHandler;
|
||||
gui::PaneManager* mpPaneManager;
|
||||
void* mpUSBAPThread;
|
||||
utility::ut_thread* mpAOSSThread;
|
||||
utility::ut_thread* mpRakuRakuThread;
|
||||
APScanThread* mpAPScanThread;
|
||||
SettingAPScanList mAPScanList;
|
||||
void* mpMem1BrowserBuffer;
|
||||
u32 unk_0x908;
|
||||
void* mpMem2BrowserBuffer;
|
||||
void* mpBrowserStringBuffer;
|
||||
int unk_0x914;
|
||||
int unk_0x918;
|
||||
u8 unk_0x91C[4];
|
||||
ext_ead::www::ImeData* mpBrowserData;
|
||||
www::wiisetting::WiiData* mpWiiSettingData;
|
||||
www::wiisetting::WiiFlag* mpWiiSettingFlag;
|
||||
u8 unk_0x92C;
|
||||
u8 unk_0x92D[3];
|
||||
int unk_0x930;
|
||||
www::wiisetting::SetStringBuf* mpStringBuffer;
|
||||
#ifdef IPL_SETTING_IMPLEMENTATION
|
||||
wchar_t unk_0x938[0x101];
|
||||
#else
|
||||
u8 unk_0x938[0x202];
|
||||
#endif
|
||||
u8 unk_0xB3A;
|
||||
u8 mBrowserCreated;
|
||||
keyboard::Manager::State mKeyboardState;
|
||||
int mInitialArgument;
|
||||
int mAspectRatio;
|
||||
int mProgressiveMode;
|
||||
int mEuRgb60Mode;
|
||||
u8 mIsResetAcceptable;
|
||||
u8 unk_0xB5D[3];
|
||||
OSMessageQueue mFuncMessageQueue;
|
||||
OSMessage mFuncMessages[5];
|
||||
int unk_0xB94;
|
||||
int mState;
|
||||
int unk_0xB9C;
|
||||
OSTime mCreatePageTime;
|
||||
u32 unk_0xBA8;
|
||||
u8 unk_0xBAC;
|
||||
u8 unk_0xBAD[3];
|
||||
u8 unk_0xBB0[0x10];
|
||||
static void* mem1Buffer_;
|
||||
static void* mem2Buffer_;
|
||||
#else
|
||||
u8 unk_0x58[0xB68];
|
||||
#endif
|
||||
|
||||
};
|
||||
} // namespace scene
|
||||
} // namespace ipl
|
||||
|
||||
@@ -62,6 +62,204 @@ namespace ipl {
|
||||
};
|
||||
// clang-format on
|
||||
|
||||
#ifdef IPL_CONTROLLER_NATIVE_HIERARCHY
|
||||
#ifdef IPL_CONTROLLER_OUT_OF_LINE_INTERFACE
|
||||
#define IPL_CONTROLLER_DEFAULT_VIRTUAL(signature, implementation) virtual signature;
|
||||
#else
|
||||
#ifdef IPL_CONTROLLER_INLINE_INTERFACE
|
||||
#define IPL_CONTROLLER_DEFAULT_VIRTUAL(signature, implementation) virtual signature implementation
|
||||
#else
|
||||
#define IPL_CONTROLLER_DEFAULT_VIRTUAL(signature, implementation) virtual signature;
|
||||
#endif
|
||||
#endif
|
||||
class Interface {
|
||||
public:
|
||||
virtual ~Interface() = 0;
|
||||
IPL_CONTROLLER_DEFAULT_VIRTUAL(int getType() const, { return -1; })
|
||||
IPL_CONTROLLER_DEFAULT_VIRTUAL(int getChannel() const, { return -1; })
|
||||
IPL_CONTROLLER_DEFAULT_VIRTUAL(bool down(u32 button) const, { return false; })
|
||||
IPL_CONTROLLER_DEFAULT_VIRTUAL(bool downTrg(u32 button) const, { return false; })
|
||||
IPL_CONTROLLER_DEFAULT_VIRTUAL(bool upTrg(u32 button) const, { return false; })
|
||||
IPL_CONTROLLER_DEFAULT_VIRTUAL(int pinch() const, { return 0; })
|
||||
IPL_CONTROLLER_DEFAULT_VIRTUAL(int pinchTrg() const, { return 0; })
|
||||
IPL_CONTROLLER_DEFAULT_VIRTUAL(int pinchOffTrg() const, { return 0; })
|
||||
virtual int decide() const = 0;
|
||||
IPL_CONTROLLER_DEFAULT_VIRTUAL(bool repeat(u32 button) const, { return false; })
|
||||
IPL_CONTROLLER_DEFAULT_VIRTUAL(BOOL rumble(int type = 0), { return FALSE; })
|
||||
IPL_CONTROLLER_DEFAULT_VIRTUAL(void cancelRumbling(), { })
|
||||
IPL_CONTROLLER_DEFAULT_VIRTUAL(int getHoldFlag() const, { return 0; })
|
||||
IPL_CONTROLLER_DEFAULT_VIRTUAL(int getTrigFlag() const, { return 0; })
|
||||
IPL_CONTROLLER_DEFAULT_VIRTUAL(int getReleaseFlag() const, { return 0; })
|
||||
IPL_CONTROLLER_DEFAULT_VIRTUAL(int getClassicHoldFlag() const, { return 0; })
|
||||
IPL_CONTROLLER_DEFAULT_VIRTUAL(int getClassicTrigFlag() const, { return 0; })
|
||||
IPL_CONTROLLER_DEFAULT_VIRTUAL(int getClassicReleaseFlag() const, { return 0; })
|
||||
IPL_CONTROLLER_DEFAULT_VIRTUAL(math::VEC2 getDpdPos() const, { return math::VEC2(0.0f, 0.0f); })
|
||||
IPL_CONTROLLER_DEFAULT_VIRTUAL(math::VEC2 getDpdProjectionPos() const, { return math::VEC2(0.0f, 0.0f); })
|
||||
IPL_CONTROLLER_DEFAULT_VIRTUAL(math::VEC2 getHorizon() const, { return math::VEC2(0.0f, 0.0f); })
|
||||
IPL_CONTROLLER_DEFAULT_VIRTUAL(f32 getDpdDistance() const, { return 0.0f; })
|
||||
IPL_CONTROLLER_DEFAULT_VIRTUAL(KPADStatus* getKPADStatus() const, { return NULL; })
|
||||
IPL_CONTROLLER_DEFAULT_VIRTUAL(PADStatus* getPADStatus() const, { return NULL; })
|
||||
IPL_CONTROLLER_DEFAULT_VIRTUAL(bool isValidBtn() const, { return false; })
|
||||
IPL_CONTROLLER_DEFAULT_VIRTUAL(bool isValidDpd() const, { return false; })
|
||||
virtual void setForceInvalid(bool flag) = 0;
|
||||
IPL_CONTROLLER_DEFAULT_VIRTUAL(int getMainStickX() const, { return 0; })
|
||||
IPL_CONTROLLER_DEFAULT_VIRTUAL(int getMainStickY() const, { return 0; })
|
||||
IPL_CONTROLLER_DEFAULT_VIRTUAL(int getSubStickX() const, { return 0; })
|
||||
IPL_CONTROLLER_DEFAULT_VIRTUAL(int getSubStickY() const, { return 0; })
|
||||
IPL_CONTROLLER_DEFAULT_VIRTUAL(void read(), { })
|
||||
};
|
||||
|
||||
#undef IPL_CONTROLLER_DEFAULT_VIRTUAL
|
||||
#ifdef IPL_CONTROLLER_INLINE_INTERFACE
|
||||
inline Interface::~Interface() {}
|
||||
#endif
|
||||
|
||||
class Base : public Interface {
|
||||
public:
|
||||
Base(int chan, KPADStatus& status) {
|
||||
mButton = 0;
|
||||
unk_0x08 = 0;
|
||||
mLastRumbleTime = 0;
|
||||
mRumbleType = -1;
|
||||
mChan = chan;
|
||||
mType = 2;
|
||||
unk_0x1C = 0;
|
||||
KPADEnableDPD(chan);
|
||||
unk_0x1D = 0;
|
||||
unk_0x1E = 0;
|
||||
unk_0x20 = &status;
|
||||
}
|
||||
|
||||
Base(int chan, int type, KPADStatus& status) {
|
||||
mButton = 0;
|
||||
unk_0x08 = 0;
|
||||
mLastRumbleTime = 0;
|
||||
mRumbleType = -1;
|
||||
mChan = chan;
|
||||
mType = type;
|
||||
unk_0x1C = 0;
|
||||
KPADEnableDPD(chan);
|
||||
}
|
||||
|
||||
virtual ~Base();
|
||||
virtual int getType() const override;
|
||||
virtual int getChannel() const override;
|
||||
virtual int decide() const override;
|
||||
virtual BOOL rumble(int timer = 0) override;
|
||||
virtual void cancelRumbling() override;
|
||||
virtual void setForceInvalid(bool flag) override;
|
||||
virtual void read() override;
|
||||
|
||||
protected:
|
||||
u8 mButton;
|
||||
u32 unk_0x08;
|
||||
OSTick mLastRumbleTime;
|
||||
s32 mRumbleType;
|
||||
u32 mChan;
|
||||
u32 mType;
|
||||
u8 unk_0x1C;
|
||||
u8 unk_0x1D;
|
||||
u8 unk_0x1E;
|
||||
KPADStatus* unk_0x20;
|
||||
};
|
||||
|
||||
class Revolution : public Base {
|
||||
public:
|
||||
Revolution(int chan, KPADStatus& status) : Base(chan, status) {}
|
||||
Revolution(int chan, int type, KPADStatus& status);
|
||||
virtual ~Revolution();
|
||||
virtual bool down(u32 button) const override;
|
||||
virtual bool downTrg(u32 button) const override;
|
||||
virtual bool upTrg(u32 button) const override;
|
||||
virtual int pinch() const override;
|
||||
virtual int pinchTrg() const override;
|
||||
virtual int pinchOffTrg() const override;
|
||||
virtual bool repeat(u32 button) const override;
|
||||
virtual f32 getDpdDistance() const override;
|
||||
virtual KPADStatus* getKPADStatus() const override;
|
||||
virtual int getReleaseFlag() const override;
|
||||
virtual int getTrigFlag() const override;
|
||||
virtual int getHoldFlag() const override;
|
||||
virtual math::VEC2 getDpdPos() const override;
|
||||
virtual math::VEC2 getDpdProjectionPos() const override;
|
||||
virtual math::VEC2 getHorizon() const override;
|
||||
virtual bool isValidBtn() const override;
|
||||
virtual bool isValidDpd() const override;
|
||||
virtual void read() override;
|
||||
};
|
||||
|
||||
class Classic : public Revolution {
|
||||
public:
|
||||
Classic(int chan, KPADStatus& status);
|
||||
virtual ~Classic();
|
||||
virtual bool down(u32 button) const override;
|
||||
virtual bool downTrg(u32 button) const override;
|
||||
virtual bool upTrg(u32 button) const override;
|
||||
virtual int getClassicHoldFlag() const override;
|
||||
virtual int getClassicTrigFlag() const override;
|
||||
virtual int getClassicReleaseFlag() const override;
|
||||
virtual math::VEC2 getDpdPos() const override;
|
||||
virtual math::VEC2 getDpdProjectionPos() const override;
|
||||
virtual math::VEC2 getHorizon() const override;
|
||||
virtual bool isValidDpd() const override;
|
||||
virtual void read() override;
|
||||
virtual BOOL isValidDpdClassic() const;
|
||||
|
||||
private:
|
||||
math::VEC2 unk_0x24;
|
||||
int unk_0x2C;
|
||||
};
|
||||
|
||||
class Master : public Interface {
|
||||
public:
|
||||
Master(Interface** controllers) : mpControllers(controllers) {}
|
||||
virtual ~Master();
|
||||
virtual bool down(u32 button) const override;
|
||||
virtual bool downTrg(u32 button) const override;
|
||||
virtual bool upTrg(u32 button) const override;
|
||||
virtual bool repeat(u32 button) const override;
|
||||
virtual int decide() const override;
|
||||
virtual void setForceInvalid(bool flag) override;
|
||||
|
||||
private:
|
||||
bool call(u32 button, bool (Interface::*func)(u32) const) const;
|
||||
Interface** mpControllers;
|
||||
};
|
||||
|
||||
class Core : public Revolution {
|
||||
public:
|
||||
Core(int chan, int type, KPADStatus& status) : Revolution(chan, type, status) {}
|
||||
virtual ~Core();
|
||||
};
|
||||
|
||||
class FreeStyle : public Revolution {
|
||||
public:
|
||||
FreeStyle(int chan, int type, KPADStatus& status) : Revolution(chan, type, status) {}
|
||||
virtual ~FreeStyle();
|
||||
};
|
||||
|
||||
class Manager {
|
||||
public:
|
||||
Manager(EGG::Heap* heap);
|
||||
void read();
|
||||
Interface* getController(int chan);
|
||||
Interface* getMasterController();
|
||||
Interface* getYoungController();
|
||||
static void* alloc(u32 size);
|
||||
static int free(void* ptr);
|
||||
|
||||
private:
|
||||
static void* mpBuf;
|
||||
static EGG::Heap* mpParentHeap;
|
||||
static EGG::ExpHeap* mpHeap;
|
||||
static EGG::Allocator* mpAllocator;
|
||||
Interface* mControllers[4];
|
||||
u32 mControllerStorage[4][12];
|
||||
Master mMaster;
|
||||
KPADStatus mKPADStatus[4];
|
||||
s32 mInvalidCount[4];
|
||||
};
|
||||
#else
|
||||
class Base {
|
||||
public:
|
||||
Base(int chan, KPADStatus& arg1) {
|
||||
@@ -118,11 +316,11 @@ namespace ipl {
|
||||
|
||||
virtual bool setForceInvalid(bool flag); // 0x74
|
||||
|
||||
virtual f32 getMainStickX() const; // 0x78
|
||||
virtual f32 getMainStickY() const; // 0x7C
|
||||
virtual int getMainStickX() const; // 0x78
|
||||
virtual int getMainStickY() const; // 0x7C
|
||||
|
||||
virtual f32 getSubStickX() const; // 0x80
|
||||
virtual f32 getSubStickY() const; // 0x84
|
||||
virtual int getSubStickX() const; // 0x80
|
||||
virtual int getSubStickY() const; // 0x84
|
||||
|
||||
virtual void read(); // 0x88
|
||||
|
||||
@@ -169,10 +367,10 @@ namespace ipl {
|
||||
virtual math::VEC2 getDpdPos() const override;
|
||||
virtual math::VEC2 getDpdProjectionPos() const override;
|
||||
virtual math::VEC2 getHorizon() const override;
|
||||
virtual f32 getMainStickX() const override;
|
||||
virtual f32 getMainStickY() const override;
|
||||
virtual f32 getSubStickX() const override;
|
||||
virtual f32 getSubStickY() const override;
|
||||
virtual int getMainStickX() const override;
|
||||
virtual int getMainStickY() const override;
|
||||
virtual int getSubStickX() const override;
|
||||
virtual int getSubStickY() const override;
|
||||
virtual BOOL rumble(int type = 0) override;
|
||||
virtual void read() override;
|
||||
};
|
||||
@@ -228,6 +426,7 @@ namespace ipl {
|
||||
class Classic : public Revolution {
|
||||
public:
|
||||
Classic(int arg0, KPADStatus& arg1);
|
||||
virtual ~Classic();
|
||||
|
||||
virtual bool down(u32 button) const override;
|
||||
virtual bool downTrg(u32 button) const override;
|
||||
@@ -268,6 +467,7 @@ namespace ipl {
|
||||
static EGG::Allocator* mpAllocator;
|
||||
u8 dummy[0x2F8];
|
||||
};
|
||||
#endif
|
||||
} // namespace controller
|
||||
} // namespace ipl
|
||||
|
||||
|
||||
@@ -118,6 +118,11 @@ namespace ipl {
|
||||
int getLastResult() { return mLastResult; }
|
||||
/** @return If the dialog is moving onto the next state. */
|
||||
bool doingNextState() { return mbNextState; }
|
||||
#ifdef IPL_SDMEMORY_DIALOG_STATE_ACCESSOR
|
||||
int getStateForSDMemory() const { return mState; }
|
||||
int getResultForSDMemory() const { return mResult; }
|
||||
void setTitleForSDMemory(const wchar_t* text) { set_title(text); }
|
||||
#endif
|
||||
|
||||
/*=================*/
|
||||
/* DIALOG BUTTON 0 */
|
||||
@@ -322,6 +327,9 @@ namespace ipl {
|
||||
void setProgBarLength(int len) { mProgBarLen = len; }
|
||||
/** @return The current length of the progress bar */
|
||||
int getProgBarLength() { return mProgBarLen; }
|
||||
#ifdef IPL_SDMEMORY_DIALOG_PROGRESS_FRAME_ACCESSOR
|
||||
int getProgBarFrame() const { return mProgBarFrame; }
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Dialog component handler (Automatically executed by the GUI manager)
|
||||
|
||||
@@ -54,14 +54,24 @@ namespace ipl {
|
||||
const wchar_t* wcString; // 0x04
|
||||
u32 stringLimit; // 0x08
|
||||
u32 rowLimit; // 0x0C
|
||||
#ifdef IPL_ADDRESS_EDIT_CPP
|
||||
KeyboardSetting(KeyboardType keyboardType, const wchar_t* value, u32 limit, u32 rows);
|
||||
#endif
|
||||
} KeyboardSetting;
|
||||
|
||||
typedef struct State {
|
||||
textinput::MemoManager::StateType type; // 0x00
|
||||
KeyboardState iplType; // 0x04
|
||||
bool pressOK; // 0x08
|
||||
#ifdef IPL_SETTING_IMPLEMENTATION
|
||||
u8 reservedByte;
|
||||
#else
|
||||
u8 unused_0x09;
|
||||
#endif
|
||||
wchar_t* wcString; // 0x0C
|
||||
#ifdef IPL_SETTING_IMPLEMENTATION
|
||||
State& operator=(const State& other);
|
||||
#endif
|
||||
} State;
|
||||
|
||||
Manager() : mpManager(NULL), mEvent(), mCurrentConChan(0), mbActivated(false), mpSaveFile(NULL) {}
|
||||
|
||||
@@ -179,6 +179,10 @@ namespace ipl {
|
||||
|
||||
static const int SD_APP_BACKUP_THUMBNAIL_LENGTH = 0xC800;
|
||||
|
||||
#ifdef IPL_SDMEMORY_COMPLETION_PCT_ACCESSOR
|
||||
static int getCompletionPct() { return s_completion_pct; }
|
||||
#endif
|
||||
|
||||
protected:
|
||||
static const int FAT_PAGES = 8;
|
||||
static const int DATA_PAGES = 32;
|
||||
|
||||
@@ -38,6 +38,9 @@ namespace ipl {
|
||||
}
|
||||
|
||||
const GXTexObj& getIconTexture() const { return mFaceTexObj; }
|
||||
#ifdef IPL_ADDRESS_MATCHING
|
||||
u8* getIconImage() const { return mpIconTex; }
|
||||
#endif
|
||||
u32 getIndex() const { return mFaceId; }
|
||||
|
||||
BOOL created() const { return mbCreated; }
|
||||
|
||||
@@ -19,6 +19,8 @@ namespace ipl {
|
||||
class Manager;
|
||||
}
|
||||
namespace savedata {
|
||||
extern "C" BOOL iplSavedata_813597A0(void* manager, ESTitleId titleId);
|
||||
|
||||
class Manager {
|
||||
public:
|
||||
Manager(EGG::Heap* heap);
|
||||
@@ -48,6 +50,12 @@ namespace ipl {
|
||||
|
||||
int getPrevPage() { return mLastPrevPage; }
|
||||
|
||||
#ifdef IPL_SD_CHANNEL_SELECT_ACCESS
|
||||
int getLastSDPrevPage() { return mLastSDPrevPage; }
|
||||
void setLastSDPrevPage(int page) { mLastSDPrevPage = page; }
|
||||
BOOL didntGotoSDMenu() const { return mData.didntGotoSDMenu; }
|
||||
#endif
|
||||
|
||||
bool hasPhotoMP3Dummy() { return mbPhotoMP3; }
|
||||
bool hasPhoto2Title() { return mbPhoto2; }
|
||||
bool hasPhoto2DummyCheck() { return mbPhoto2Check; }
|
||||
@@ -151,6 +159,7 @@ namespace ipl {
|
||||
u8 unused_0x504[28];
|
||||
|
||||
friend class channel::Manager;
|
||||
friend BOOL iplSavedata_813597A0(void* manager, ESTitleId titleId);
|
||||
};
|
||||
} // namespace savedata
|
||||
} // namespace ipl
|
||||
|
||||
@@ -20,7 +20,12 @@ namespace ipl {
|
||||
|
||||
Date() : year(MIN_YEAR), month(MIN_MONTH), day(MIN_DAY) {}
|
||||
Date(int myYear, int myMonth, int myDay) : year(myYear), month(myMonth), day(myDay) {}
|
||||
#ifdef IPL_BOARD_DATE_CTOR_OUT_OF_LINE
|
||||
Date(const OSCalendarTime& cal);
|
||||
#else
|
||||
Date(const OSCalendarTime& cal) : year(cal.year), month(cal.mon + 1), day(cal.mday) {}
|
||||
#endif
|
||||
#line 24 "include/utility/iplCalendar.h"
|
||||
Date(const Date& date) : year(date.year), month(date.month), day(date.day) {}
|
||||
|
||||
static Date getMaxDate() {
|
||||
@@ -127,6 +132,9 @@ namespace ipl {
|
||||
return days[month - 1];
|
||||
}
|
||||
|
||||
#ifdef IPL_BOARD_WEEK_FUNCTION_OUT_OF_LINE
|
||||
static int getWeek(const Date& date) NO_INLINE;
|
||||
#else
|
||||
static int getWeek(const Date& date) NO_INLINE {
|
||||
int month, year, day;
|
||||
month = date.month;
|
||||
@@ -138,6 +146,8 @@ namespace ipl {
|
||||
}
|
||||
return (day + (((month * 13) + 8) / 5) + ((year / 400) + ((year + (year / 4)) - (year / 100)))) % 7;
|
||||
}
|
||||
#endif
|
||||
#line 147 "include/utility/iplCalendar.h"
|
||||
|
||||
static int getWeek(int year, int month, int day) NO_INLINE {
|
||||
if (month <= 2) {
|
||||
|
||||
@@ -49,6 +49,9 @@ namespace ipl {
|
||||
public:
|
||||
Scroller();
|
||||
|
||||
#ifdef IPL_SDMEMORY_SCROLLER_INIT_OUT_OF_LINE
|
||||
void init();
|
||||
#else
|
||||
void init() {
|
||||
mState = 0;
|
||||
mScroll = 0.0f;
|
||||
@@ -56,6 +59,7 @@ namespace ipl {
|
||||
mUpLimit = 0.0f;
|
||||
mDownLimit = 0.0f;
|
||||
}
|
||||
#endif
|
||||
|
||||
void calc();
|
||||
f32 get() const;
|
||||
@@ -69,6 +73,9 @@ namespace ipl {
|
||||
|
||||
void setDownLimit(f32 v) { mDownLimit = v; }
|
||||
void setUpLimit(f32 v) { mUpLimit = v; }
|
||||
#ifdef IPL_SDMEMORY_SCROLLER_STATE_ACCESSOR
|
||||
void setState(int state) { mState = state; }
|
||||
#endif
|
||||
|
||||
void addScroll(f32 v) { mScroll += v; }
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ namespace EGG {
|
||||
|
||||
class SoundHeapMgr {
|
||||
public:
|
||||
SoundHeapMgr() NO_INLINE {}
|
||||
SoundHeapMgr();
|
||||
|
||||
~SoundHeapMgr() { destroySoundHeap(); }
|
||||
|
||||
|
||||
@@ -17,14 +17,7 @@ namespace EGG {
|
||||
s32 soundThreadPrio; // 0x08
|
||||
s32 dvdThreadPrio; // 0x0C
|
||||
|
||||
Arg() NO_INLINE {
|
||||
pHeap = NULL;
|
||||
|
||||
soundThreadPrio = nw4r::snd::SoundSystem::DEFAULT_SOUND_THREAD_PRIORITY;
|
||||
dvdThreadPrio = nw4r::snd::SoundSystem::DEFAULT_DVD_THREAD_PRIORITY;
|
||||
|
||||
unk_0x04 = 0;
|
||||
}
|
||||
Arg();
|
||||
};
|
||||
|
||||
public:
|
||||
|
||||
@@ -7,6 +7,15 @@
|
||||
#include <revolution/ax.h>
|
||||
|
||||
namespace EGG {
|
||||
IAudioMgr::Arg::Arg() {
|
||||
pHeap = NULL;
|
||||
|
||||
soundThreadPrio = nw4r::snd::SoundSystem::DEFAULT_SOUND_THREAD_PRIORITY;
|
||||
dvdThreadPrio = nw4r::snd::SoundSystem::DEFAULT_DVD_THREAD_PRIORITY;
|
||||
|
||||
unk_0x04 = 0;
|
||||
}
|
||||
|
||||
SimpleAudioMgr::SimpleAudioMgrArg::SimpleAudioMgrArg() {
|
||||
soundHeapSize = DEFAULT_SOUND_HEAP_SIZE;
|
||||
}
|
||||
@@ -14,6 +23,8 @@ namespace EGG {
|
||||
SimpleAudioMgr::SimpleAudioMgr() : ArcPlayer(&getSoundHeap()) {
|
||||
}
|
||||
|
||||
SoundHeapMgr::SoundHeapMgr() {}
|
||||
|
||||
SimpleAudioMgr::~SimpleAudioMgr() {
|
||||
}
|
||||
|
||||
|
||||
@@ -5,6 +5,19 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define SIGNAL_ACTION_DEFAULT ((__signal_func_ptr)0)
|
||||
#define SIGNAL_ACTION_IGNORE ((__signal_func_ptr)1)
|
||||
|
||||
#define SIGNAL_ABORT 1
|
||||
#define SIGNAL_UNK2 2
|
||||
#define SIGNAL_UNK3 3
|
||||
#define SIGNAL_UNK4 4
|
||||
#define SIGNAL_UNK5 5
|
||||
#define SIGNAL_UNK6 6
|
||||
#define SIGNAL_UNK7 7
|
||||
|
||||
typedef void (*__signal_func_ptr)(int);
|
||||
|
||||
int raise(int signal);
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
112
libs/MSL/src/MSL_Common/FILE_POS.c
Normal file
112
libs/MSL/src/MSL_Common/FILE_POS.c
Normal file
@@ -0,0 +1,112 @@
|
||||
#include <errno.h>
|
||||
#include <internal/file_struct.h>
|
||||
#include <stdio.h>
|
||||
|
||||
enum file_kinds {
|
||||
file_closed,
|
||||
file_disk,
|
||||
file_console,
|
||||
file_unavailable
|
||||
};
|
||||
|
||||
enum io_states {
|
||||
neutral,
|
||||
writing,
|
||||
reading,
|
||||
rereading
|
||||
};
|
||||
|
||||
enum io_modes {
|
||||
io_read = 1,
|
||||
io_write = 2,
|
||||
io_append = 4
|
||||
};
|
||||
|
||||
int __flush_buffer(FILE* file, size_t* pos);
|
||||
|
||||
long _ftell(FILE* file) {
|
||||
int buf = 0;
|
||||
int pos;
|
||||
|
||||
unsigned char file_kind = file->mode.file_kind;
|
||||
if (!(file_kind == file_disk || file_kind == file_console) || file->state.error) {
|
||||
errno = EFPOS;
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (file->state.io_state == neutral) {
|
||||
return file->pos;
|
||||
}
|
||||
|
||||
pos = file->buffer_pos + (file->buffer_ptr - file->buffer);
|
||||
|
||||
if (file->state.io_state >= rereading) {
|
||||
buf = file->state.io_state - reading;
|
||||
pos -= buf;
|
||||
}
|
||||
|
||||
if (!file->mode.binary_io) {
|
||||
int n = file->buffer_ptr - file->buffer - buf;
|
||||
unsigned char* p = file->buffer;
|
||||
|
||||
while (n-- != 0) {
|
||||
if (*p++ == '\n') {
|
||||
pos++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return pos;
|
||||
}
|
||||
|
||||
long ftell(FILE* stream) {
|
||||
return _ftell(stream);
|
||||
}
|
||||
|
||||
int _fseek(FILE* file, long offset, int whence) {
|
||||
if (file->mode.file_kind != file_disk || file->state.error != 0) {
|
||||
errno = EFPOS;
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (file->state.io_state == writing) {
|
||||
if (__flush_buffer(file, 0) != 0) {
|
||||
file->state.error = 1;
|
||||
file->buffer_len = 0;
|
||||
errno = EFPOS;
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
if (whence == 1) {
|
||||
whence = 0;
|
||||
offset += _ftell(file);
|
||||
}
|
||||
|
||||
if ((whence != 2) && file->mode.io_mode != (io_read | io_write) && (file->state.io_state == reading || file->state.io_state == rereading)) {
|
||||
if ((offset >= file->pos) || offset < file->buffer_pos) {
|
||||
file->state.io_state = neutral;
|
||||
} else {
|
||||
file->buffer_ptr = file->buffer + (offset - file->buffer_pos);
|
||||
file->buffer_len = file->pos - offset;
|
||||
file->state.io_state = reading;
|
||||
}
|
||||
} else {
|
||||
file->state.io_state = neutral;
|
||||
}
|
||||
|
||||
if (file->state.io_state == neutral) {
|
||||
if (file->pos_proc != 0 && (*file->pos_proc)(file->handle, &offset, whence, file->ref)) {
|
||||
file->state.error = 1;
|
||||
file->buffer_len = 0;
|
||||
errno = EFPOS;
|
||||
return -1;
|
||||
}
|
||||
|
||||
file->state.eof = 0;
|
||||
file->pos = offset;
|
||||
file->buffer_len = 0;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -3,144 +3,151 @@
|
||||
#pragma exceptions on
|
||||
|
||||
extern void __sys_free(void* ptr);
|
||||
|
||||
typedef struct Block {
|
||||
struct Block* prev;
|
||||
struct Block* next;
|
||||
unsigned int max_size;
|
||||
unsigned int size;
|
||||
} Block;
|
||||
|
||||
typedef struct SubBlock {
|
||||
unsigned int size;
|
||||
Block* block;
|
||||
struct SubBlock* prev;
|
||||
struct SubBlock* next;
|
||||
} SubBlock;
|
||||
|
||||
struct FixSubBlock;
|
||||
|
||||
typedef struct FixBlock {
|
||||
struct FixBlock* prev_;
|
||||
struct FixBlock* next_;
|
||||
unsigned int client_size_;
|
||||
struct FixSubBlock* start_;
|
||||
unsigned int n_allocated_;
|
||||
} FixBlock;
|
||||
|
||||
typedef struct FixSubBlock {
|
||||
FixBlock* block_;
|
||||
struct FixSubBlock* next_;
|
||||
} FixSubBlock;
|
||||
|
||||
typedef struct FixStart {
|
||||
FixBlock* tail_;
|
||||
FixBlock* head_;
|
||||
} FixStart;
|
||||
|
||||
typedef struct __mem_pool_obj {
|
||||
Block* start_;
|
||||
FixStart fix_start[6];
|
||||
} __mem_pool_obj;
|
||||
extern void* __sys_alloc(unsigned int size);
|
||||
|
||||
typedef struct __mem_pool {
|
||||
void* reserved[14];
|
||||
} __mem_pool;
|
||||
|
||||
typedef int tag_word;
|
||||
typedef struct Block {
|
||||
struct Block* pPrev;
|
||||
struct Block* pNext;
|
||||
unsigned int maxSize;
|
||||
unsigned int size;
|
||||
} Block;
|
||||
|
||||
typedef struct block_header {
|
||||
tag_word tag;
|
||||
struct block_header* prev;
|
||||
struct block_header* next;
|
||||
} block_header;
|
||||
typedef struct SubBlock {
|
||||
unsigned int size;
|
||||
Block* pBlock;
|
||||
struct SubBlock* pPrev;
|
||||
struct SubBlock* pNext;
|
||||
} SubBlock;
|
||||
|
||||
typedef struct list_header {
|
||||
block_header* rover;
|
||||
block_header header;
|
||||
} list_header;
|
||||
struct FixSubBlock;
|
||||
|
||||
typedef struct heap_header {
|
||||
struct heap_header* prev;
|
||||
struct heap_header* next;
|
||||
} heap_header;
|
||||
typedef struct FixBlock {
|
||||
struct FixBlock* pPrev;
|
||||
struct FixBlock* pNext;
|
||||
unsigned int clientSize;
|
||||
struct FixSubBlock* pStart;
|
||||
unsigned int allocatedSize;
|
||||
} FixBlock;
|
||||
|
||||
struct mem_pool_obj;
|
||||
typedef void* (*sys_alloc_ptr)(unsigned int, struct mem_pool_obj*);
|
||||
typedef void (*sys_free_ptr)(void*, struct mem_pool_obj*);
|
||||
typedef struct FixSubBlock {
|
||||
FixBlock* pBlock;
|
||||
struct FixSubBlock* pNext;
|
||||
} FixSubBlock;
|
||||
|
||||
typedef struct pool_options {
|
||||
sys_alloc_ptr sys_alloc_func;
|
||||
sys_free_ptr sys_free_func;
|
||||
unsigned int min_heap_size;
|
||||
int always_search_first;
|
||||
} pool_options;
|
||||
typedef struct FixStart {
|
||||
FixBlock* pTail;
|
||||
FixBlock* pHead;
|
||||
} FixStart;
|
||||
|
||||
typedef struct mem_pool_obj {
|
||||
list_header free_list;
|
||||
pool_options options;
|
||||
heap_header* heap_list;
|
||||
void* userData;
|
||||
|
||||
} mem_pool_obj;
|
||||
|
||||
mem_pool_obj __malloc_pool;
|
||||
static int initialized = 0;
|
||||
typedef struct __mem_pool_obj {
|
||||
Block* pStart;
|
||||
FixStart fixStart[6];
|
||||
} __mem_pool_obj;
|
||||
|
||||
static SubBlock* SubBlock_merge_prev(SubBlock*, SubBlock**);
|
||||
static void SubBlock_merge_next(SubBlock*, SubBlock**);
|
||||
static SubBlock* Block_subBlock(Block*, unsigned int, unsigned int*);
|
||||
static void* allocate_from_var_pools(__mem_pool_obj*, unsigned int, unsigned int*);
|
||||
static void* soft_allocate_from_var_pools(__mem_pool_obj*, unsigned int, unsigned int*);
|
||||
static void FixBlock_construct(FixBlock*, FixBlock*, FixBlock*, unsigned int, void*, unsigned int);
|
||||
static void* allocate_from_fixed_pools(__mem_pool_obj*, unsigned int, unsigned int*);
|
||||
static unsigned int __pool_allocate_resize(__mem_pool_obj*, void*, unsigned int, unsigned int*);
|
||||
|
||||
static const unsigned int fix_pool_sizes[] = {4, 12, 20, 36, 52, 68};
|
||||
const unsigned int fix_pool_sizes[] = {4, 12, 20, 36, 52, 68};
|
||||
|
||||
#define SubBlock_size(ths) ((ths)->size & 0xFFFFFFF8)
|
||||
#define SubBlock_block(ths) ((Block*)((unsigned int)((ths)->block) & ~0x1))
|
||||
#define SubBlock_block(ths) ((Block*)((unsigned int)((ths)->pBlock) & ~0x1))
|
||||
#define Block_size(ths) ((ths)->size & 0xFFFFFFF8)
|
||||
#define Block_start(ths) (*(SubBlock**)((char*)(ths) + Block_size((ths)) - sizeof(unsigned int)))
|
||||
|
||||
#define SubBlock_set_free(ths) \
|
||||
unsigned int this_size = SubBlock_size((ths)); \
|
||||
(ths)->size &= ~0x2; \
|
||||
*(unsigned int*)((char*)(ths) + this_size) &= ~0x4; \
|
||||
((SubBlock*)((char*)(ths) + this_size))->size &= ~0x4; \
|
||||
*(unsigned int*)((char*)(ths) + this_size - sizeof(unsigned int)) = this_size
|
||||
|
||||
#define SubBlock_is_free(ths) !((ths)->size & 2)
|
||||
#define SubBlock_set_size(ths, sz) \
|
||||
(ths)->size &= ~0xFFFFFFF8; \
|
||||
(ths)->size |= (sz) & 0xFFFFFFF8; \
|
||||
if (SubBlock_is_free((ths))) \
|
||||
*(unsigned int*)((char*)(ths) + (sz) - sizeof(unsigned int)) = (sz)
|
||||
if (SubBlock_is_free((ths))) { \
|
||||
*(unsigned int*)((char*)(ths) + (sz) - sizeof(unsigned int)) = (sz); \
|
||||
}
|
||||
|
||||
#define SubBlock_from_pointer(ptr) ((SubBlock*)((char*)(ptr) - 8))
|
||||
#define FixSubBlock_from_pointer(ptr) ((FixSubBlock*)((char*)(ptr) - 4))
|
||||
|
||||
#define FixBlock_client_size(ths) ((ths)->client_size_)
|
||||
#define FixSubBlock_size(ths) (FixBlock_client_size((ths)->block_))
|
||||
#define FixBlock_client_size(ths) ((ths)->clientSize)
|
||||
#define FixSubBlock_size(ths) (FixBlock_client_size((ths)->pBlock))
|
||||
|
||||
#define classify(ptr) (*(unsigned int*)((char*)(ptr) - sizeof(unsigned int)) & 1)
|
||||
#define classify(ptr) ((unsigned int)FixSubBlock_from_pointer(ptr)->pBlock & 1)
|
||||
#define __msize_inline(ptr) (!classify(ptr) ? FixSubBlock_size(FixSubBlock_from_pointer(ptr)) : SubBlock_size(SubBlock_from_pointer(ptr)) - 8)
|
||||
|
||||
#define Block_empty(ths) (_sb = (SubBlock*)((char*)(ths) + 16)), SubBlock_is_free(_sb) && SubBlock_size(_sb) == Block_size((ths)) - 24
|
||||
#define Block_empty(ths) (_sb = (SubBlock*)(ths + 1)), SubBlock_is_free(_sb) && SubBlock_size(_sb) == Block_size((ths)) - 24
|
||||
|
||||
void Block_link(Block* ths, SubBlock* sb) {
|
||||
SubBlock** st;
|
||||
SubBlock_set_free(sb);
|
||||
st = &Block_start(ths);
|
||||
void Block_link(Block*, SubBlock*);
|
||||
void deallocate_from_fixed_pools(__mem_pool_obj*, void*, unsigned int);
|
||||
void* malloc(unsigned int);
|
||||
void* calloc(unsigned int, unsigned int);
|
||||
void* realloc(void*, unsigned int);
|
||||
void free(void*);
|
||||
|
||||
if (*st != 0) {
|
||||
sb->prev = (*st)->prev;
|
||||
sb->prev->next = sb;
|
||||
sb->next = *st;
|
||||
(*st)->prev = sb;
|
||||
*st = sb;
|
||||
*st = SubBlock_merge_prev(*st, st);
|
||||
SubBlock_merge_next(*st, st);
|
||||
} else {
|
||||
*st = sb;
|
||||
sb->prev = sb;
|
||||
sb->next = sb;
|
||||
static void SubBlock_construct(SubBlock* ths, unsigned int size, Block* bp, int prev_alloc, int this_alloc) {
|
||||
ths->pBlock = (Block*)((unsigned int)bp | 1);
|
||||
ths->size = size;
|
||||
if (prev_alloc) {
|
||||
ths->size |= 4;
|
||||
}
|
||||
if (this_alloc) {
|
||||
ths->size |= 2;
|
||||
((SubBlock*)((char*)ths + size))->size |= 4;
|
||||
} else {
|
||||
*(unsigned int*)((char*)ths + size - sizeof(unsigned int)) = size;
|
||||
}
|
||||
}
|
||||
|
||||
static SubBlock* SubBlock_split(SubBlock* ths, unsigned int sz) {
|
||||
unsigned int origsize;
|
||||
int isfree;
|
||||
int isprevalloc;
|
||||
SubBlock* np;
|
||||
Block* bp;
|
||||
origsize = SubBlock_size(ths);
|
||||
isfree = SubBlock_is_free(ths);
|
||||
isprevalloc = (int)(ths->size & 4);
|
||||
np = (SubBlock*)((char*)ths + sz);
|
||||
bp = SubBlock_block(ths);
|
||||
SubBlock_construct(ths, sz, bp, isprevalloc, !isfree);
|
||||
SubBlock_construct(np, origsize - sz, bp, !isfree, !isfree);
|
||||
if (isfree) {
|
||||
np->pNext = ths->pNext;
|
||||
np->pNext->pPrev = np;
|
||||
np->pPrev = ths;
|
||||
ths->pNext = np;
|
||||
}
|
||||
return np;
|
||||
}
|
||||
|
||||
static void Block_unlink(Block* ths, SubBlock* sb) {
|
||||
SubBlock** st;
|
||||
unsigned int this_size = SubBlock_size(sb);
|
||||
sb->size |= 2;
|
||||
((SubBlock*)((char*)sb + this_size))->size |= 4;
|
||||
st = &Block_start(ths);
|
||||
if (*st == sb) {
|
||||
*st = sb->pNext;
|
||||
}
|
||||
if (*st == sb) {
|
||||
*st = NULL;
|
||||
ths->maxSize = 0;
|
||||
} else {
|
||||
sb->pNext->pPrev = sb->pPrev;
|
||||
sb->pPrev->pNext = sb->pNext;
|
||||
}
|
||||
if (ths->max_size < SubBlock_size(*st))
|
||||
ths->max_size = SubBlock_size(*st);
|
||||
}
|
||||
|
||||
static SubBlock* SubBlock_merge_prev(SubBlock* ths, SubBlock** start) {
|
||||
@@ -149,72 +156,39 @@ static SubBlock* SubBlock_merge_prev(SubBlock* ths, SubBlock** start) {
|
||||
|
||||
if (!(ths->size & 0x04)) {
|
||||
prevsz = *(unsigned int*)((char*)ths - sizeof(unsigned int));
|
||||
if (prevsz & 0x2)
|
||||
if (prevsz & 0x2) {
|
||||
return ths;
|
||||
}
|
||||
p = (SubBlock*)((char*)ths - prevsz);
|
||||
SubBlock_set_size(p, prevsz + SubBlock_size(ths));
|
||||
|
||||
if (*start == ths)
|
||||
*start = (*start)->next;
|
||||
ths->next->prev = ths->prev;
|
||||
ths->next->prev->next = ths->next;
|
||||
if (*start == ths) {
|
||||
*start = (*start)->pNext;
|
||||
}
|
||||
ths->pNext->pPrev = ths->pPrev;
|
||||
ths->pNext->pPrev->pNext = ths->pNext;
|
||||
return p;
|
||||
}
|
||||
return ths;
|
||||
}
|
||||
|
||||
static void SubBlock_merge_next(SubBlock* pBlock, SubBlock** pStart) {
|
||||
SubBlock* next_sub_block;
|
||||
unsigned int this_cur_size;
|
||||
|
||||
next_sub_block = (SubBlock*)((char*)pBlock + (pBlock->size & 0xFFFFFFF8));
|
||||
|
||||
if (!(next_sub_block->size & 2)) {
|
||||
this_cur_size = (pBlock->size & 0xFFFFFFF8) + (next_sub_block->size & 0xFFFFFFF8);
|
||||
|
||||
pBlock->size &= ~0xFFFFFFF8;
|
||||
pBlock->size |= this_cur_size & 0xFFFFFFF8;
|
||||
|
||||
if (!(pBlock->size & 2)) {
|
||||
*(unsigned int*)((char*)(pBlock) + (this_cur_size)-4) = (this_cur_size);
|
||||
}
|
||||
|
||||
if (!(pBlock->size & 2)) {
|
||||
*(unsigned int*)((char*)pBlock + this_cur_size) &= ~4;
|
||||
} else {
|
||||
*(unsigned int*)((char*)pBlock + this_cur_size) |= 4;
|
||||
}
|
||||
|
||||
if (*pStart == next_sub_block) {
|
||||
*pStart = (*pStart)->next;
|
||||
}
|
||||
|
||||
if (*pStart == next_sub_block) {
|
||||
*pStart = 0;
|
||||
}
|
||||
|
||||
next_sub_block->next->prev = next_sub_block->prev;
|
||||
next_sub_block->prev->next = next_sub_block->next;
|
||||
}
|
||||
}
|
||||
|
||||
static Block* __unlink(__mem_pool_obj* pool_obj, Block* bp) {
|
||||
Block* result = bp->next;
|
||||
Block* result = bp->pNext;
|
||||
if (result == bp) {
|
||||
result = 0;
|
||||
result = NULL;
|
||||
}
|
||||
|
||||
if (pool_obj->start_ == bp) {
|
||||
pool_obj->start_ = result;
|
||||
if (pool_obj->pStart == bp) {
|
||||
pool_obj->pStart = result;
|
||||
}
|
||||
|
||||
if (result != 0) {
|
||||
result->prev = bp->prev;
|
||||
result->prev->next = result;
|
||||
if (result != NULL) {
|
||||
result->pPrev = bp->pPrev;
|
||||
result->pPrev->pNext = result;
|
||||
}
|
||||
|
||||
bp->next = 0;
|
||||
bp->prev = 0;
|
||||
bp->pNext = NULL;
|
||||
bp->pPrev = NULL;
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -231,12 +205,13 @@ static void deallocate_from_var_pools(__mem_pool_obj* pool_obj, void* ptr) {
|
||||
}
|
||||
}
|
||||
|
||||
void __init_pool_obj(__mem_pool* pool_obj) {
|
||||
static void __init_pool_obj(__mem_pool* pool_obj) {
|
||||
memset(pool_obj, 0, sizeof(__mem_pool_obj));
|
||||
}
|
||||
|
||||
__mem_pool protopool;
|
||||
|
||||
static __mem_pool* get_malloc_pool() {
|
||||
static __mem_pool protopool;
|
||||
static unsigned char init = 0;
|
||||
if (!init) {
|
||||
__init_pool_obj(&protopool);
|
||||
@@ -246,67 +221,11 @@ static __mem_pool* get_malloc_pool() {
|
||||
return &protopool;
|
||||
}
|
||||
|
||||
void deallocate_from_fixed_pools(__mem_pool_obj* pool_obj, void* ptr, unsigned int size) {
|
||||
unsigned int i = 0;
|
||||
FixSubBlock* p;
|
||||
FixBlock* b;
|
||||
FixStart* fs;
|
||||
|
||||
while (size > fix_pool_sizes[i]) {
|
||||
++i;
|
||||
}
|
||||
|
||||
fs = &pool_obj->fix_start[i];
|
||||
p = FixSubBlock_from_pointer(ptr);
|
||||
b = p->block_;
|
||||
|
||||
if (b->start_ == 0 && fs->head_ != b) {
|
||||
if (fs->tail_ == b) {
|
||||
fs->head_ = fs->head_->prev_;
|
||||
fs->tail_ = fs->tail_->prev_;
|
||||
} else {
|
||||
b->prev_->next_ = b->next_;
|
||||
b->next_->prev_ = b->prev_;
|
||||
b->next_ = fs->head_;
|
||||
b->prev_ = b->next_->prev_;
|
||||
b->prev_->next_ = b;
|
||||
b->next_->prev_ = b;
|
||||
fs->head_ = b;
|
||||
}
|
||||
}
|
||||
|
||||
p->next_ = b->start_;
|
||||
b->start_ = p;
|
||||
|
||||
if (--b->n_allocated_ == 0) {
|
||||
if (fs->head_ == b) {
|
||||
fs->head_ = b->next_;
|
||||
}
|
||||
|
||||
if (fs->tail_ == b) {
|
||||
fs->tail_ = b->prev_;
|
||||
}
|
||||
|
||||
b->prev_->next_ = b->next_;
|
||||
b->next_->prev_ = b->prev_;
|
||||
|
||||
if (fs->head_ == b) {
|
||||
fs->head_ = 0;
|
||||
}
|
||||
|
||||
if (fs->tail_ == b) {
|
||||
fs->tail_ = 0;
|
||||
}
|
||||
|
||||
deallocate_from_var_pools(pool_obj, b);
|
||||
}
|
||||
}
|
||||
|
||||
void __pool_free(__mem_pool* pool, void* ptr) {
|
||||
static void __pool_free(__mem_pool* pool, void* ptr) {
|
||||
__mem_pool_obj* pool_obj;
|
||||
unsigned int size;
|
||||
|
||||
if (ptr == 0) {
|
||||
if (ptr == NULL) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -320,6 +239,559 @@ void __pool_free(__mem_pool* pool, void* ptr) {
|
||||
}
|
||||
}
|
||||
|
||||
static void link(__mem_pool_obj* pool, Block* bp) {
|
||||
if (pool->pStart != NULL) {
|
||||
bp->pPrev = pool->pStart->pPrev;
|
||||
bp->pPrev->pNext = bp;
|
||||
bp->pNext = pool->pStart;
|
||||
pool->pStart->pPrev = bp;
|
||||
pool->pStart = bp;
|
||||
} else {
|
||||
pool->pStart = bp;
|
||||
bp->pPrev = bp;
|
||||
bp->pNext = bp;
|
||||
}
|
||||
}
|
||||
|
||||
static void Block_construct(Block* ths, unsigned int size) {
|
||||
SubBlock* sb;
|
||||
|
||||
ths->size = size | 3;
|
||||
((SubBlock*)((char*)ths + size - 8))->size = ths->size;
|
||||
|
||||
sb = (SubBlock*)(ths + 1);
|
||||
sb->pBlock = (Block*)((unsigned int)ths | 1);
|
||||
sb->size = size - 0x18;
|
||||
*(unsigned int*)((char*)sb + (size - 0x18) - sizeof(unsigned int)) = size - 0x18;
|
||||
|
||||
ths->maxSize = size - 0x18;
|
||||
Block_start(ths) = NULL;
|
||||
|
||||
Block_link(ths, sb);
|
||||
}
|
||||
|
||||
static Block* link_new_block(__mem_pool_obj* pool, unsigned int size) {
|
||||
Block* bp;
|
||||
|
||||
size = (size + 31) & ~7;
|
||||
if (size < 0x10000) {
|
||||
size = 0x10000;
|
||||
}
|
||||
|
||||
bp = (Block*)__sys_alloc(size);
|
||||
if (bp == NULL) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
Block_construct(bp, size);
|
||||
link(pool, bp);
|
||||
return bp;
|
||||
}
|
||||
|
||||
static SubBlock* Block_subBlock(Block* bp, unsigned int size, unsigned int* out) {
|
||||
SubBlock* st;
|
||||
SubBlock* sb;
|
||||
unsigned int sb_size;
|
||||
unsigned int max_found;
|
||||
st = Block_start(bp);
|
||||
if (st == NULL) {
|
||||
bp->maxSize = 0;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
sb = st;
|
||||
sb_size = SubBlock_size(sb);
|
||||
max_found = sb_size;
|
||||
|
||||
while (sb_size < size) {
|
||||
sb = sb->pNext;
|
||||
sb_size = SubBlock_size(sb);
|
||||
if (max_found < sb_size) {
|
||||
max_found = sb_size;
|
||||
}
|
||||
if (sb == st) {
|
||||
bp->maxSize = max_found;
|
||||
if (out != NULL) {
|
||||
*out = max_found - 8;
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
|
||||
if (sb_size - size >= 0x50) {
|
||||
SubBlock_split(sb, size);
|
||||
}
|
||||
|
||||
Block_start(bp) = sb->pNext;
|
||||
Block_unlink(bp, sb);
|
||||
|
||||
if (out != NULL) {
|
||||
*out = SubBlock_size(sb) - 8;
|
||||
}
|
||||
|
||||
return sb;
|
||||
}
|
||||
|
||||
static void Block_link(Block* ths, SubBlock* sb) {
|
||||
SubBlock** st;
|
||||
SubBlock_set_free(sb);
|
||||
st = &Block_start(ths);
|
||||
|
||||
if (*st != NULL) {
|
||||
sb->pPrev = (*st)->pPrev;
|
||||
sb->pPrev->pNext = sb;
|
||||
sb->pNext = *st;
|
||||
(*st)->pPrev = sb;
|
||||
*st = sb;
|
||||
*st = SubBlock_merge_prev(*st, st);
|
||||
SubBlock_merge_next(*st, st);
|
||||
} else {
|
||||
*st = sb;
|
||||
sb->pPrev = sb;
|
||||
sb->pNext = sb;
|
||||
}
|
||||
if (ths->maxSize < SubBlock_size(*st)) {
|
||||
ths->maxSize = SubBlock_size(*st);
|
||||
}
|
||||
}
|
||||
|
||||
static void SubBlock_merge_next(SubBlock* pBlock, SubBlock** pStart) {
|
||||
SubBlock* next_sub_block;
|
||||
unsigned int this_cur_size;
|
||||
|
||||
next_sub_block = (SubBlock*)((char*)pBlock + (pBlock->size & 0xFFFFFFF8));
|
||||
|
||||
if (!(next_sub_block->size & 2)) {
|
||||
this_cur_size = (pBlock->size & 0xFFFFFFF8) + (next_sub_block->size & 0xFFFFFFF8);
|
||||
|
||||
pBlock->size &= ~0xFFFFFFF8;
|
||||
pBlock->size |= this_cur_size & 0xFFFFFFF8;
|
||||
|
||||
if (!(pBlock->size & 2)) {
|
||||
*(unsigned int*)((char*)pBlock + this_cur_size - sizeof(unsigned int)) = this_cur_size;
|
||||
}
|
||||
|
||||
if (!(pBlock->size & 2)) {
|
||||
((SubBlock*)((char*)pBlock + this_cur_size))->size &= ~4;
|
||||
} else {
|
||||
((SubBlock*)((char*)pBlock + this_cur_size))->size |= 4;
|
||||
}
|
||||
|
||||
if (*pStart == next_sub_block) {
|
||||
*pStart = (*pStart)->pNext;
|
||||
}
|
||||
|
||||
if (*pStart == next_sub_block) {
|
||||
*pStart = NULL;
|
||||
}
|
||||
|
||||
next_sub_block->pNext->pPrev = next_sub_block->pPrev;
|
||||
next_sub_block->pPrev->pNext = next_sub_block->pNext;
|
||||
}
|
||||
}
|
||||
|
||||
static void* allocate_from_var_pools(__mem_pool_obj* pool, unsigned int size, unsigned int* out) {
|
||||
Block* bp;
|
||||
SubBlock* ptr;
|
||||
|
||||
if (out != NULL) {
|
||||
*out = 0;
|
||||
}
|
||||
|
||||
size = (size + 15) & ~7;
|
||||
if (size < 0x50) {
|
||||
size = 0x50;
|
||||
}
|
||||
|
||||
bp = pool->pStart != NULL ? pool->pStart : link_new_block(pool, size);
|
||||
if (bp == NULL) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
do {
|
||||
if (size <= bp->maxSize) {
|
||||
ptr = Block_subBlock(bp, size, out);
|
||||
if (ptr != NULL) {
|
||||
pool->pStart = bp;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
bp = bp->pNext;
|
||||
if (bp == pool->pStart) {
|
||||
bp = link_new_block(pool, size);
|
||||
if (bp == NULL) {
|
||||
return NULL;
|
||||
}
|
||||
ptr = Block_subBlock(bp, size, out);
|
||||
break;
|
||||
}
|
||||
} while (1);
|
||||
|
||||
return (char*)ptr + 8;
|
||||
}
|
||||
|
||||
static void* soft_allocate_from_var_pools(__mem_pool_obj* pool, unsigned int size, unsigned int* out) {
|
||||
register Block* bp;
|
||||
register SubBlock* ptr;
|
||||
|
||||
size = (size + 15) & ~7;
|
||||
if (size < 0x50) {
|
||||
size = 0x50;
|
||||
}
|
||||
*out = 0;
|
||||
bp = pool->pStart;
|
||||
if (bp == NULL) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
do {
|
||||
if (size <= bp->maxSize) {
|
||||
ptr = Block_subBlock(bp, size, NULL);
|
||||
if (ptr != NULL) {
|
||||
pool->pStart = bp;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (bp->maxSize > 8 && *out < bp->maxSize - 8) {
|
||||
*out = bp->maxSize - 8;
|
||||
}
|
||||
bp = bp->pNext;
|
||||
if (bp == pool->pStart) {
|
||||
return NULL;
|
||||
}
|
||||
} while (1);
|
||||
|
||||
return (char*)ptr + 8;
|
||||
}
|
||||
|
||||
static void FixBlock_construct(FixBlock* this, FixBlock* prev, FixBlock* next, unsigned int poolIdx, void* start, unsigned int totalSize) {
|
||||
unsigned int fixSubBlockSize;
|
||||
unsigned int n;
|
||||
char* p;
|
||||
unsigned int i;
|
||||
char* np;
|
||||
|
||||
this->pPrev = prev;
|
||||
this->pNext = next;
|
||||
prev->pNext = this;
|
||||
next->pPrev = this;
|
||||
this->clientSize = fix_pool_sizes[poolIdx];
|
||||
fixSubBlockSize = fix_pool_sizes[poolIdx] + 4;
|
||||
n = totalSize / fixSubBlockSize;
|
||||
p = (char*)start;
|
||||
for (i = 0; i < n - 1; ++i) {
|
||||
np = p + fixSubBlockSize;
|
||||
((FixSubBlock*)p)->pBlock = this;
|
||||
((FixSubBlock*)p)->pNext = (FixSubBlock*)np;
|
||||
p = np;
|
||||
}
|
||||
((FixSubBlock*)p)->pBlock = this;
|
||||
((FixSubBlock*)p)->pNext = NULL;
|
||||
this->pStart = (FixSubBlock*)start;
|
||||
this->allocatedSize = 0;
|
||||
}
|
||||
|
||||
static void* allocate_from_fixed_pools(__mem_pool_obj* pool, unsigned int size, unsigned int* out) {
|
||||
unsigned int i = 0;
|
||||
FixSubBlock* p;
|
||||
FixStart* fs;
|
||||
|
||||
while (size > fix_pool_sizes[i]) {
|
||||
++i;
|
||||
}
|
||||
fs = &pool->fixStart[i];
|
||||
if (fs->pHead == NULL || fs->pHead->pStart == NULL) {
|
||||
unsigned int size_requested = 0x1000;
|
||||
char* newblock;
|
||||
unsigned int size_received;
|
||||
unsigned int n, nsave, size_has;
|
||||
|
||||
n = (size_requested - sizeof(FixBlock)) / (fix_pool_sizes[i] + 4);
|
||||
if (n > 0x100) {
|
||||
n = 0x100;
|
||||
}
|
||||
nsave = n;
|
||||
while (n >= 10) {
|
||||
size_requested = n * (fix_pool_sizes[i] + 4) + sizeof(FixBlock);
|
||||
newblock = (char*)soft_allocate_from_var_pools(pool, size_requested, &size_has);
|
||||
if (newblock != NULL) {
|
||||
break;
|
||||
}
|
||||
if (size_has > sizeof(FixBlock)) {
|
||||
n = (size_has - sizeof(FixBlock)) / (fix_pool_sizes[i] + 4);
|
||||
} else {
|
||||
n = 0;
|
||||
}
|
||||
}
|
||||
if (newblock == NULL) {
|
||||
unsigned int cr_backup;
|
||||
n = nsave;
|
||||
while (1) {
|
||||
size_requested = n * (fix_pool_sizes[i] + 4) + sizeof(FixBlock);
|
||||
newblock = (char*)allocate_from_var_pools(pool, size_requested, &cr_backup);
|
||||
if (newblock != NULL) {
|
||||
break;
|
||||
}
|
||||
n = cr_backup / (fix_pool_sizes[i] + sizeof(FixBlock) + 4);
|
||||
if (n < 10) {
|
||||
if (out != NULL) {
|
||||
*out = 0;
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
}
|
||||
size_received = __msize_inline(newblock);
|
||||
if (fs->pHead == NULL) {
|
||||
fs->pHead = (FixBlock*)newblock;
|
||||
fs->pTail = (FixBlock*)newblock;
|
||||
}
|
||||
FixBlock_construct((FixBlock*)newblock, fs->pTail, fs->pHead, i, (FixSubBlock*)((FixBlock*)newblock + 1), size_received - sizeof(FixBlock));
|
||||
fs->pHead = (FixBlock*)newblock;
|
||||
}
|
||||
p = fs->pHead->pStart;
|
||||
fs->pHead->pStart = p->pNext;
|
||||
++fs->pHead->allocatedSize;
|
||||
if (fs->pHead->pStart == NULL) {
|
||||
fs->pHead = fs->pHead->pNext;
|
||||
fs->pTail = fs->pTail->pNext;
|
||||
}
|
||||
if (out != NULL) {
|
||||
*out = fix_pool_sizes[i];
|
||||
}
|
||||
return (char*)p + 4;
|
||||
}
|
||||
|
||||
void deallocate_from_fixed_pools(__mem_pool_obj* pool_obj, void* ptr, unsigned int size) {
|
||||
unsigned int i = 0;
|
||||
FixSubBlock* p;
|
||||
FixBlock* b;
|
||||
FixStart* fs;
|
||||
|
||||
while (size > fix_pool_sizes[i]) {
|
||||
++i;
|
||||
}
|
||||
|
||||
fs = &pool_obj->fixStart[i];
|
||||
p = FixSubBlock_from_pointer(ptr);
|
||||
b = p->pBlock;
|
||||
|
||||
if (b->pStart == NULL && fs->pHead != b) {
|
||||
if (fs->pTail == b) {
|
||||
fs->pHead = fs->pHead->pPrev;
|
||||
fs->pTail = fs->pTail->pPrev;
|
||||
} else {
|
||||
b->pPrev->pNext = b->pNext;
|
||||
b->pNext->pPrev = b->pPrev;
|
||||
b->pNext = fs->pHead;
|
||||
b->pPrev = b->pNext->pPrev;
|
||||
b->pPrev->pNext = b;
|
||||
b->pNext->pPrev = b;
|
||||
fs->pHead = b;
|
||||
}
|
||||
}
|
||||
|
||||
p->pNext = b->pStart;
|
||||
b->pStart = p;
|
||||
|
||||
if (--b->allocatedSize == 0) {
|
||||
if (fs->pHead == b) {
|
||||
fs->pHead = b->pNext;
|
||||
}
|
||||
|
||||
if (fs->pTail == b) {
|
||||
fs->pTail = b->pPrev;
|
||||
}
|
||||
|
||||
b->pPrev->pNext = b->pNext;
|
||||
b->pNext->pPrev = b->pPrev;
|
||||
|
||||
if (fs->pHead == b) {
|
||||
fs->pHead = NULL;
|
||||
}
|
||||
|
||||
if (fs->pTail == b) {
|
||||
fs->pTail = NULL;
|
||||
}
|
||||
|
||||
deallocate_from_var_pools(pool_obj, b);
|
||||
}
|
||||
}
|
||||
|
||||
static unsigned int __pool_allocate_resize(__mem_pool_obj* pool, void* ptr, unsigned int size, unsigned int* out) {
|
||||
unsigned int sz;
|
||||
unsigned int this_size;
|
||||
unsigned int orig_size;
|
||||
SubBlock* sb;
|
||||
SubBlock* next_sub;
|
||||
|
||||
orig_size = __msize_inline(ptr);
|
||||
|
||||
if (size == orig_size) {
|
||||
if (out != NULL) {
|
||||
*out = orig_size;
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (classify(ptr)) {
|
||||
if (size > 0xFFFFFF7F) {
|
||||
size = 0xFFFFFF7F;
|
||||
}
|
||||
sz = size + 8;
|
||||
sz = (sz + 7) & ~7;
|
||||
if (sz < 0x50) {
|
||||
sz = 0x50;
|
||||
}
|
||||
|
||||
sb = SubBlock_from_pointer(ptr);
|
||||
this_size = orig_size + 8;
|
||||
next_sub = (SubBlock*)((char*)sb + this_size);
|
||||
|
||||
if (SubBlock_is_free(next_sub) && sz <= this_size + SubBlock_size(next_sub)) {
|
||||
SubBlock_merge_next(sb, &Block_start(SubBlock_block(sb)));
|
||||
this_size = SubBlock_size(sb);
|
||||
}
|
||||
|
||||
if (this_size >= sz + 0x50) {
|
||||
Block_link(SubBlock_block(sb), SubBlock_split(sb, sz));
|
||||
this_size = SubBlock_size(sb);
|
||||
}
|
||||
|
||||
this_size -= 8;
|
||||
|
||||
if (out != NULL) {
|
||||
*out = this_size;
|
||||
}
|
||||
|
||||
if (size > orig_size) {
|
||||
if (out != NULL && size > this_size && SubBlock_is_free(next_sub)) {
|
||||
*out += SubBlock_size(next_sub);
|
||||
}
|
||||
return size <= this_size;
|
||||
}
|
||||
|
||||
return this_size < orig_size;
|
||||
}
|
||||
|
||||
if (out != NULL) {
|
||||
*out = orig_size;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
void* malloc(register unsigned int size) {
|
||||
void* rv;
|
||||
register __mem_pool_obj* pool_obj;
|
||||
|
||||
if (size == 0) {
|
||||
goto null_return;
|
||||
}
|
||||
|
||||
pool_obj = (__mem_pool_obj*)get_malloc_pool();
|
||||
|
||||
if (size > ~0x30u) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (size <= 68) {
|
||||
rv = allocate_from_fixed_pools(pool_obj, size, NULL);
|
||||
} else {
|
||||
rv = allocate_from_var_pools(pool_obj, size, NULL);
|
||||
}
|
||||
|
||||
return rv;
|
||||
|
||||
null_return:
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void free(void* ptr) {
|
||||
__pool_free(get_malloc_pool(), ptr);
|
||||
}
|
||||
|
||||
void* realloc(void* ptr, unsigned int size) {
|
||||
register unsigned int rv = size;
|
||||
register __mem_pool_obj* pool;
|
||||
unsigned int current_size;
|
||||
unsigned int orig_size;
|
||||
|
||||
pool = (__mem_pool_obj*)get_malloc_pool();
|
||||
|
||||
if (ptr == NULL) {
|
||||
if (rv > ~0x30u) {
|
||||
return NULL;
|
||||
}
|
||||
if (rv <= 68) {
|
||||
return allocate_from_fixed_pools(pool, rv, NULL);
|
||||
}
|
||||
return allocate_from_var_pools(pool, rv, NULL);
|
||||
}
|
||||
|
||||
if (rv == 0) {
|
||||
if (ptr != NULL) {
|
||||
current_size = __msize_inline(ptr);
|
||||
if (current_size <= 68) {
|
||||
deallocate_from_fixed_pools(pool, ptr, current_size);
|
||||
} else {
|
||||
deallocate_from_var_pools(pool, ptr);
|
||||
}
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
orig_size = __msize_inline(ptr);
|
||||
{
|
||||
unsigned int result = __pool_allocate_resize(pool, ptr, rv, NULL);
|
||||
if (result || rv <= orig_size) {
|
||||
return ptr;
|
||||
}
|
||||
}
|
||||
|
||||
if (rv > ~0x30u) {
|
||||
rv = 0;
|
||||
} else if (rv <= 68) {
|
||||
rv = (unsigned int)allocate_from_fixed_pools(pool, rv, NULL);
|
||||
} else {
|
||||
rv = (unsigned int)allocate_from_var_pools(pool, rv, NULL);
|
||||
}
|
||||
|
||||
if (rv != 0) {
|
||||
memcpy((void*)rv, ptr, orig_size);
|
||||
if (ptr != NULL) {
|
||||
unsigned int cur_sz = __msize_inline(ptr);
|
||||
if (cur_sz <= 68) {
|
||||
deallocate_from_fixed_pools(pool, ptr, cur_sz);
|
||||
} else {
|
||||
deallocate_from_var_pools(pool, ptr);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return (void*)rv;
|
||||
}
|
||||
|
||||
void* calloc(unsigned int nmemb, unsigned int size) {
|
||||
register void* ptr;
|
||||
register unsigned int total;
|
||||
__mem_pool_obj* pool_obj;
|
||||
|
||||
pool_obj = (__mem_pool_obj*)get_malloc_pool();
|
||||
|
||||
total = size * nmemb;
|
||||
|
||||
if (total > ~0x30u) {
|
||||
ptr = NULL;
|
||||
} else if (total <= 68) {
|
||||
ptr = allocate_from_fixed_pools(pool_obj, total, NULL);
|
||||
} else {
|
||||
ptr = allocate_from_var_pools(pool_obj, total, NULL);
|
||||
}
|
||||
|
||||
if (ptr != NULL) {
|
||||
memset(ptr, 0, total);
|
||||
}
|
||||
|
||||
return ptr;
|
||||
}
|
||||
|
||||
142
libs/MSL/src/MSL_Common/arith.c
Normal file
142
libs/MSL/src/MSL_Common/arith.c
Normal file
@@ -0,0 +1,142 @@
|
||||
#include <limits.h>
|
||||
#include <math.h>
|
||||
|
||||
typedef struct ldiv_t {
|
||||
long quot;
|
||||
long rem;
|
||||
} ldiv_t;
|
||||
|
||||
#undef abs
|
||||
|
||||
int abs(int n) {
|
||||
int mask = n >> 31;
|
||||
return (mask ^ n) - mask;
|
||||
}
|
||||
|
||||
long labs(long n) {
|
||||
long mask = n >> 31;
|
||||
return (mask ^ n) - mask;
|
||||
}
|
||||
|
||||
div_t div(int numerator, int denominator) {
|
||||
int n_sign, d_sign;
|
||||
div_t value;
|
||||
|
||||
n_sign = 1;
|
||||
d_sign = 1;
|
||||
if (numerator < 0) {
|
||||
numerator = -numerator;
|
||||
n_sign = -1;
|
||||
}
|
||||
if (denominator < 0) {
|
||||
denominator = -denominator;
|
||||
d_sign = -1;
|
||||
}
|
||||
value.quot = (numerator / denominator) * (n_sign * d_sign);
|
||||
value.rem = (numerator * n_sign) - (value.quot * denominator * d_sign);
|
||||
return value;
|
||||
}
|
||||
|
||||
int __msl_add(int* a, int b) {
|
||||
int val = *a;
|
||||
|
||||
if (b < 0) {
|
||||
if (val < 0 && b < (-LONG_MAX - 1) - val) {
|
||||
return 0;
|
||||
}
|
||||
} else if (val > 0 && b > LONG_MAX - val) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
*a = val + b;
|
||||
return 1;
|
||||
}
|
||||
|
||||
int __msl_ladd(long* a, long b) {
|
||||
long val = *a;
|
||||
|
||||
if (b < 0) {
|
||||
if (val < 0 && b < (-LONG_MAX - 1L) - val) {
|
||||
return 0;
|
||||
}
|
||||
} else if (val > 0 && b > LONG_MAX - val) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
*a = val + b;
|
||||
return 1;
|
||||
}
|
||||
|
||||
int __msl_lmul(long* a, long b) {
|
||||
long val = *a;
|
||||
int sign = (val < 0) ^ (b < 0) ? -1 : 1;
|
||||
|
||||
if (val < 0) {
|
||||
val = -val;
|
||||
}
|
||||
if (b < 0) {
|
||||
b = -b;
|
||||
}
|
||||
|
||||
if (val > LONG_MAX / b) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
*a = val * b * sign;
|
||||
return 1;
|
||||
}
|
||||
|
||||
ldiv_t __msl_div(long a, long b) {
|
||||
ldiv_t ret;
|
||||
long quotient, a_sign, b_sign, sign, remainder;
|
||||
|
||||
a_sign = 1;
|
||||
b_sign = 1;
|
||||
if (a < 0) {
|
||||
a = -a;
|
||||
a_sign = -1;
|
||||
}
|
||||
if (b < 0) {
|
||||
b = -b;
|
||||
b_sign = -1;
|
||||
}
|
||||
sign = a_sign * b_sign;
|
||||
quotient = (a / b) * sign;
|
||||
remainder = a * a_sign - b_sign * (quotient * b);
|
||||
|
||||
if (remainder != 0 && sign < 0) {
|
||||
quotient--;
|
||||
remainder += b * b_sign;
|
||||
}
|
||||
|
||||
ret.quot = quotient;
|
||||
ret.rem = remainder;
|
||||
return ret;
|
||||
}
|
||||
|
||||
int __msl_mod(int a, int b) {
|
||||
int quotient, remainder, a_sign, b_sign, sign;
|
||||
|
||||
a_sign = 1;
|
||||
b_sign = 1;
|
||||
|
||||
if (a < 0) {
|
||||
a = -a;
|
||||
a_sign = -1;
|
||||
}
|
||||
if (b < 0) {
|
||||
b = -b;
|
||||
b_sign = -1;
|
||||
}
|
||||
|
||||
sign = a_sign * b_sign;
|
||||
quotient = (a / b) * sign;
|
||||
remainder = (a * a_sign) - (quotient * b * b_sign);
|
||||
|
||||
if (remainder && sign < 0) {
|
||||
quotient -= 1;
|
||||
remainder += b * b_sign;
|
||||
}
|
||||
|
||||
return remainder;
|
||||
}
|
||||
43
libs/MSL/src/MSL_Common/bsearch.c
Normal file
43
libs/MSL/src/MSL_Common/bsearch.c
Normal file
@@ -0,0 +1,43 @@
|
||||
#include <search.h>
|
||||
|
||||
void* bsearch(const void* key, const void* ptr, size_t count, size_t size, COMPARE_FUNC comp) {
|
||||
const char* p;
|
||||
int cmp;
|
||||
size_t low, high, mid;
|
||||
|
||||
if (key == NULL || ptr == NULL || count == 0 || size == 0 || comp == NULL) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
p = (const char*)ptr;
|
||||
cmp = comp(key, p);
|
||||
|
||||
if (cmp == 0) {
|
||||
return (void*)p;
|
||||
}
|
||||
|
||||
if (cmp < 0) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
low = 1;
|
||||
high = count - 1;
|
||||
|
||||
while (low <= high) {
|
||||
mid = (low + high) >> 1;
|
||||
p = (const char*)ptr + size * mid;
|
||||
cmp = comp(key, p);
|
||||
|
||||
if (cmp == 0) {
|
||||
return (void*)p;
|
||||
}
|
||||
|
||||
if (cmp < 0) {
|
||||
high = mid - 1;
|
||||
} else {
|
||||
low = mid + 1;
|
||||
}
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
146
libs/MSL/src/MSL_Common/direct_io.c
Normal file
146
libs/MSL/src/MSL_Common/direct_io.c
Normal file
@@ -0,0 +1,146 @@
|
||||
#include <internal/file_struct.h>
|
||||
#include <stddef.h>
|
||||
#include <string.h>
|
||||
#include <wchar.h>
|
||||
|
||||
enum file_kinds {
|
||||
file_closed,
|
||||
file_disk,
|
||||
file_console,
|
||||
file_unavailable
|
||||
};
|
||||
|
||||
enum io_states {
|
||||
neutral,
|
||||
writing,
|
||||
reading,
|
||||
rereading
|
||||
};
|
||||
|
||||
enum io_modes {
|
||||
io_read = 1,
|
||||
io_write = 2,
|
||||
io_append = 4
|
||||
};
|
||||
|
||||
enum buffer_modes {
|
||||
buffer_none,
|
||||
buffer_full,
|
||||
buffer_line
|
||||
};
|
||||
|
||||
void __prep_buffer(FILE* file);
|
||||
int __flush_buffer(FILE* file, size_t* pos);
|
||||
void __stdio_atexit(void);
|
||||
int _fseek(FILE* file, long offset, int whence);
|
||||
void* __memrchr(const void* ptr, int ch, size_t count);
|
||||
|
||||
size_t __fwrite(const void* ptr, size_t memb_size, size_t num_memb, FILE* file) {
|
||||
unsigned char* cur_ptr;
|
||||
size_t num_bytes, rem_bytes, bytes_written;
|
||||
int res, buff;
|
||||
|
||||
if (fwide(file, 0) == 0) {
|
||||
fwide(file, -1);
|
||||
}
|
||||
|
||||
rem_bytes = memb_size * num_memb;
|
||||
|
||||
if (rem_bytes == 0 || file->state.error || file->mode.file_kind == file_closed) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (file->mode.file_kind == file_console) {
|
||||
__stdio_atexit();
|
||||
}
|
||||
|
||||
buff = !file->mode.binary_io || file->mode.buffer_mode == buffer_line || file->mode.buffer_mode == buffer_full;
|
||||
|
||||
if (file->state.io_state == neutral && file->mode.io_mode & io_write) {
|
||||
if (file->mode.io_mode & io_append) {
|
||||
if (_fseek(file, 0, 2)) {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
file->state.io_state = writing;
|
||||
__prep_buffer(file);
|
||||
}
|
||||
|
||||
if (file->state.io_state != writing) {
|
||||
file->state.error = 1;
|
||||
file->buffer_len = 0;
|
||||
return 0;
|
||||
}
|
||||
|
||||
cur_ptr = (unsigned char*)ptr;
|
||||
bytes_written = 0;
|
||||
|
||||
if (rem_bytes && (file->buffer_ptr != file->buffer || buff)) {
|
||||
file->buffer_len = file->buffer_size - (file->buffer_ptr - file->buffer);
|
||||
|
||||
do {
|
||||
unsigned char* nw = NULL;
|
||||
num_bytes = file->buffer_len;
|
||||
|
||||
if (num_bytes > rem_bytes) {
|
||||
num_bytes = rem_bytes;
|
||||
}
|
||||
|
||||
if (file->mode.buffer_mode == buffer_full && num_bytes) {
|
||||
if ((nw = (unsigned char*)__memrchr(cur_ptr, '\n', num_bytes)) != NULL) {
|
||||
num_bytes = nw + 1 - cur_ptr;
|
||||
}
|
||||
}
|
||||
|
||||
if (num_bytes != 0) {
|
||||
memcpy(file->buffer_ptr, cur_ptr, num_bytes);
|
||||
cur_ptr += num_bytes;
|
||||
rem_bytes -= num_bytes;
|
||||
file->buffer_ptr += num_bytes;
|
||||
file->buffer_len -= num_bytes;
|
||||
}
|
||||
|
||||
if (file->buffer_len == 0 || nw != 0 || file->mode.buffer_mode == buffer_none) {
|
||||
res = __flush_buffer(file, 0);
|
||||
|
||||
if (res != 0) {
|
||||
file->state.error = 1;
|
||||
file->buffer_len = 0;
|
||||
rem_bytes = 0;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
bytes_written += num_bytes;
|
||||
|
||||
} while (rem_bytes && buff);
|
||||
}
|
||||
|
||||
if (rem_bytes && buff == 0) {
|
||||
unsigned char* save_buf = file->buffer;
|
||||
size_t save_size = file->buffer_size;
|
||||
|
||||
file->buffer = cur_ptr;
|
||||
file->buffer_size = rem_bytes;
|
||||
file->buffer_ptr = cur_ptr + rem_bytes;
|
||||
|
||||
if (__flush_buffer(file, &num_bytes) != 0) {
|
||||
file->state.error = 1;
|
||||
file->buffer_len = 0;
|
||||
} else {
|
||||
bytes_written += num_bytes;
|
||||
}
|
||||
|
||||
file->buffer = save_buf;
|
||||
file->buffer_size = save_size;
|
||||
__prep_buffer(file);
|
||||
file->buffer_len = 0;
|
||||
}
|
||||
|
||||
if (file->mode.buffer_mode != buffer_line) {
|
||||
file->buffer_len = 0;
|
||||
}
|
||||
|
||||
return bytes_written / memb_size;
|
||||
}
|
||||
73
libs/MSL/src/MSL_Common/extras.c
Normal file
73
libs/MSL/src/MSL_Common/extras.c
Normal file
@@ -0,0 +1,73 @@
|
||||
#include <ctype.h>
|
||||
#include <internal/locale.h>
|
||||
#include <stdbool.h>
|
||||
#include <string.h>
|
||||
|
||||
extern int __msl_strnicmp(const char*, const char*, int);
|
||||
extern char* __msl_itoa(int, char*, int);
|
||||
|
||||
int stricmp(const char* s1, const char* s2) {
|
||||
char c1, c2;
|
||||
|
||||
while (true) {
|
||||
c1 = tolower(*s1++);
|
||||
c2 = tolower(*s2++);
|
||||
|
||||
if (c1 < c2) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (c1 > c2) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (c1 == 0) {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
int strnicmp(const char* s1, const char* s2, size_t n) {
|
||||
return __msl_strnicmp(s1, s2, n);
|
||||
}
|
||||
|
||||
int strcmpi(const char* s1, const char* s2) {
|
||||
return stricmp(s1, s2);
|
||||
}
|
||||
|
||||
char* itoa(int value, char* buffer, int radix) {
|
||||
return __msl_itoa(value, buffer, radix);
|
||||
}
|
||||
|
||||
int wcsnicmp(const char* s1, const char* s2, size_t n) {
|
||||
const wchar_t* p1 = (const wchar_t*)s1;
|
||||
const wchar_t* p2 = (const wchar_t*)s2;
|
||||
unsigned int c1;
|
||||
unsigned int c2;
|
||||
struct _loc_ctype_cmpt* ctype_cmpt = _current_locale.ctype_cmpt_ptr;
|
||||
size_t i;
|
||||
|
||||
for (i = 0; i < n; i++) {
|
||||
c1 = *p1++;
|
||||
c1 = (c1 >= 256) ? c1 : ctype_cmpt->wlower_map_ptr[(unsigned short)c1];
|
||||
c1 &= 0xFFFF;
|
||||
|
||||
c2 = *p2++;
|
||||
c2 = (c2 >= 256) ? c2 : ctype_cmpt->wlower_map_ptr[(unsigned short)c2];
|
||||
c2 &= 0xFFFF;
|
||||
|
||||
if (c1 < c2) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (c1 > c2) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (c1 == 0) {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
10
libs/MSL/src/MSL_Common/math_sun.c
Normal file
10
libs/MSL/src/MSL_Common/math_sun.c
Normal file
@@ -0,0 +1,10 @@
|
||||
#include <math.h>
|
||||
|
||||
double scalbn(double x, int n) {
|
||||
double man;
|
||||
int exponent;
|
||||
|
||||
man = frexp(x, &exponent);
|
||||
exponent += n;
|
||||
return ldexp(man, exponent);
|
||||
}
|
||||
97
libs/MSL/src/MSL_Common/mbstring.c
Normal file
97
libs/MSL/src/MSL_Common/mbstring.c
Normal file
@@ -0,0 +1,97 @@
|
||||
#include <internal/locale.h>
|
||||
#include <string.h>
|
||||
|
||||
int mbtowc(wchar_t* pwc, const char* s, size_t n) {
|
||||
return _current_locale.ctype_cmpt_ptr->decode_mb(pwc, s, n);
|
||||
}
|
||||
|
||||
int __mbtowc_noconv(wchar_t* pwc, const char* s, size_t n) {
|
||||
if (s == NULL) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (n == 0) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (pwc != NULL) {
|
||||
*pwc = (unsigned char)*s;
|
||||
}
|
||||
|
||||
if (!*s) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
int __wctomb_noconv(char* s, wchar_t wchar) {
|
||||
if (s == NULL) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
*s = (char)wchar;
|
||||
return 1;
|
||||
}
|
||||
|
||||
size_t mbstowcs(wchar_t* dest, const char* src, size_t len) {
|
||||
int count;
|
||||
char* src_ptr;
|
||||
size_t slen;
|
||||
|
||||
slen = strlen(src);
|
||||
|
||||
if (dest != NULL) {
|
||||
src_ptr = (char*)src;
|
||||
|
||||
for (count = 0; count < len; count++) {
|
||||
if (*src_ptr) {
|
||||
int res = mbtowc(dest++, src_ptr, slen);
|
||||
|
||||
if (res > 0) {
|
||||
src_ptr += res;
|
||||
slen -= res;
|
||||
} else {
|
||||
return -1;
|
||||
}
|
||||
} else {
|
||||
*dest = 0;
|
||||
break;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
count = 0;
|
||||
}
|
||||
|
||||
return count;
|
||||
}
|
||||
|
||||
size_t wcstombs(char* s, const wchar_t* pwcs, size_t n) {
|
||||
int result;
|
||||
int chars_written = 0;
|
||||
char temp[3];
|
||||
wchar_t* source;
|
||||
|
||||
if (s == NULL || pwcs == NULL) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
source = (wchar_t*)pwcs;
|
||||
|
||||
while (chars_written <= n) {
|
||||
if (!*source) {
|
||||
*(s + chars_written) = '\0';
|
||||
break;
|
||||
}
|
||||
|
||||
result = _current_locale.ctype_cmpt_ptr->encode_wc(temp, *source++);
|
||||
if (chars_written + result > n) {
|
||||
break;
|
||||
}
|
||||
|
||||
strncpy(s + chars_written, temp, result);
|
||||
chars_written += result;
|
||||
}
|
||||
|
||||
return chars_written;
|
||||
}
|
||||
6
libs/MSL/src/MSL_Common/misc_io.c
Normal file
6
libs/MSL/src/MSL_Common/misc_io.c
Normal file
@@ -0,0 +1,6 @@
|
||||
extern void (*__stdio_exit)(void);
|
||||
void __close_all(void);
|
||||
|
||||
void __stdio_atexit(void) {
|
||||
__stdio_exit = __close_all;
|
||||
}
|
||||
73
libs/MSL/src/MSL_Common/qsort.c
Normal file
73
libs/MSL/src/MSL_Common/qsort.c
Normal file
@@ -0,0 +1,73 @@
|
||||
#include <search.h>
|
||||
|
||||
#define swap(dst, src, cnt) \
|
||||
do { \
|
||||
char* p; \
|
||||
char* q; \
|
||||
size_t n = cnt; \
|
||||
unsigned long tmp; \
|
||||
for (p = (char*)src - 1, q = (char*)dst - 1, n++; --n;) { \
|
||||
tmp = *++q; \
|
||||
*q = *++p; \
|
||||
*p = tmp; \
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
void qsort(void* table_base, size_t num_members, size_t member_size, COMPARE_FUNC compare_members) {
|
||||
size_t cur_ofs;
|
||||
size_t neg_size;
|
||||
size_t l, r, j;
|
||||
char* lp;
|
||||
char* rp;
|
||||
char* ip;
|
||||
char* jp;
|
||||
char* kp;
|
||||
|
||||
if (num_members < 2) {
|
||||
return;
|
||||
}
|
||||
|
||||
r = num_members;
|
||||
l = (r / 2) + 1;
|
||||
lp = (char*)table_base + member_size * (l - 1);
|
||||
rp = (char*)table_base + member_size * (r - 1);
|
||||
neg_size = (long)(member_size - member_size * 2);
|
||||
cur_ofs = l * member_size;
|
||||
|
||||
for (;;) {
|
||||
if (l > 1) {
|
||||
l--;
|
||||
cur_ofs -= member_size;
|
||||
lp -= member_size;
|
||||
} else {
|
||||
swap(lp, rp, member_size);
|
||||
if (--r == 1) {
|
||||
return;
|
||||
}
|
||||
rp -= member_size;
|
||||
}
|
||||
|
||||
j = l;
|
||||
jp = (char*)table_base + (cur_ofs + neg_size);
|
||||
|
||||
while (j * 2 <= r) {
|
||||
j *= 2;
|
||||
ip = jp;
|
||||
jp = (char*)table_base + member_size * (j - 1);
|
||||
|
||||
if (j < r) {
|
||||
kp = jp + member_size;
|
||||
if (compare_members(jp, kp) < 0) {
|
||||
j++;
|
||||
jp = kp;
|
||||
}
|
||||
}
|
||||
|
||||
if (compare_members(ip, jp) < 0) {
|
||||
swap(ip, jp, member_size);
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
30
libs/MSL/src/MSL_Common/signal.c
Normal file
30
libs/MSL/src/MSL_Common/signal.c
Normal file
@@ -0,0 +1,30 @@
|
||||
#include <signal.h>
|
||||
|
||||
int exit(int);
|
||||
|
||||
__signal_func_ptr signal_funcs[8];
|
||||
|
||||
int raise(int sig) {
|
||||
__signal_func_ptr signal_func;
|
||||
|
||||
if (sig < SIGNAL_ABORT || sig > SIGNAL_UNK7) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
signal_func = signal_funcs[sig - 1];
|
||||
|
||||
if (signal_func != SIGNAL_ACTION_IGNORE) {
|
||||
signal_funcs[sig - 1] = SIGNAL_ACTION_DEFAULT;
|
||||
}
|
||||
|
||||
if (signal_func == SIGNAL_ACTION_IGNORE || (signal_func == SIGNAL_ACTION_DEFAULT && sig == SIGNAL_ABORT)) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (signal_func == SIGNAL_ACTION_DEFAULT) {
|
||||
exit(0);
|
||||
}
|
||||
|
||||
(*signal_func)(sig);
|
||||
return 0;
|
||||
}
|
||||
382
libs/MSL/src/MSL_Common/strtoul.c
Normal file
382
libs/MSL/src/MSL_Common/strtoul.c
Normal file
@@ -0,0 +1,382 @@
|
||||
#include <ctype.h>
|
||||
#include <errno.h>
|
||||
enum __ReadProcActions {
|
||||
__GetAChar,
|
||||
__UngetAChar,
|
||||
__TestForError
|
||||
};
|
||||
|
||||
typedef struct {
|
||||
char* spNextChar;
|
||||
int nullCharDetected;
|
||||
} __InStrCtrl;
|
||||
|
||||
int __StringRead(void* ptr, int ch, int act);
|
||||
#include <limits.h>
|
||||
#include <stddef.h>
|
||||
|
||||
enum scan_states {
|
||||
start = 0x01,
|
||||
check_for_zero = 0x02,
|
||||
leading_zero = 0x04,
|
||||
need_digit = 0x08,
|
||||
digit_loop = 0x10,
|
||||
finished = 0x20,
|
||||
failure = 0x40
|
||||
};
|
||||
|
||||
#define final_state(scan_state) (scan_state & (finished | failure))
|
||||
#define success(scan_state) (scan_state & (leading_zero | digit_loop | finished))
|
||||
#define fetch() (count++, (*ReadProc)(ReadProcArg, 0, __GetAChar))
|
||||
#define unfetch(c) (*ReadProc)(ReadProcArg, c, __UngetAChar)
|
||||
|
||||
unsigned long __strtoul(int base, int max_width, int (*ReadProc)(void*, int, int), void* ReadProcArg, int* chars_scanned, int* negative,
|
||||
int* overflow) {
|
||||
int scan_state = start;
|
||||
int count = 0;
|
||||
int spaces = 0;
|
||||
unsigned long value = 0;
|
||||
unsigned long value_max = 0;
|
||||
int c;
|
||||
|
||||
*negative = *overflow = 0;
|
||||
|
||||
if (base < 0 || base == 1 || base > 36 || max_width < 1) {
|
||||
scan_state = failure;
|
||||
} else {
|
||||
c = fetch();
|
||||
}
|
||||
|
||||
if (base != 0) {
|
||||
value_max = ULONG_MAX / base;
|
||||
}
|
||||
|
||||
while (count <= max_width && c != -1 && !final_state(scan_state)) {
|
||||
switch (scan_state) {
|
||||
case start: {
|
||||
if (isspace(c)) {
|
||||
c = fetch();
|
||||
count--;
|
||||
spaces++;
|
||||
break;
|
||||
}
|
||||
|
||||
if (c == '+') {
|
||||
c = fetch();
|
||||
} else if (c == '-') {
|
||||
c = fetch();
|
||||
*negative = 1;
|
||||
}
|
||||
|
||||
scan_state = check_for_zero;
|
||||
break;
|
||||
}
|
||||
|
||||
case check_for_zero: {
|
||||
if (base == 0 || base == 16) {
|
||||
if (c == '0') {
|
||||
scan_state = leading_zero;
|
||||
c = fetch();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
scan_state = need_digit;
|
||||
break;
|
||||
}
|
||||
|
||||
case leading_zero: {
|
||||
if (c == 'X' || c == 'x') {
|
||||
base = 16;
|
||||
scan_state = need_digit;
|
||||
c = fetch();
|
||||
break;
|
||||
}
|
||||
|
||||
if (base == 0) {
|
||||
base = 8;
|
||||
}
|
||||
|
||||
scan_state = digit_loop;
|
||||
break;
|
||||
}
|
||||
|
||||
case need_digit:
|
||||
case digit_loop: {
|
||||
if (base == 0) {
|
||||
base = 10;
|
||||
}
|
||||
|
||||
if (!value_max) {
|
||||
value_max = ULONG_MAX / base;
|
||||
}
|
||||
|
||||
if (isdigit(c)) {
|
||||
if ((c -= '0') >= base) {
|
||||
if (scan_state == digit_loop) {
|
||||
scan_state = finished;
|
||||
} else {
|
||||
scan_state = failure;
|
||||
}
|
||||
|
||||
c += '0';
|
||||
break;
|
||||
}
|
||||
} else if (!isalpha(c) || (toupper(c) - 'A' + 10) >= base) {
|
||||
if (scan_state == digit_loop) {
|
||||
scan_state = finished;
|
||||
} else {
|
||||
scan_state = failure;
|
||||
}
|
||||
|
||||
break;
|
||||
} else {
|
||||
c = toupper(c) - 'A' + 10;
|
||||
}
|
||||
|
||||
if (value > value_max) {
|
||||
*overflow = 1;
|
||||
}
|
||||
|
||||
value *= base;
|
||||
|
||||
if (c > (ULONG_MAX - value)) {
|
||||
*overflow = 1;
|
||||
}
|
||||
|
||||
value += c;
|
||||
scan_state = digit_loop;
|
||||
c = fetch();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!success(scan_state)) {
|
||||
count = 0;
|
||||
value = 0;
|
||||
*chars_scanned = 0;
|
||||
} else {
|
||||
count--;
|
||||
*chars_scanned = count + spaces;
|
||||
}
|
||||
|
||||
unfetch(c);
|
||||
return value;
|
||||
}
|
||||
|
||||
unsigned long long __strtoull(int base, int max_width, int (*ReadProc)(void*, int, int), void* ReadProcArg, int* chars_scanned, int* negative,
|
||||
int* overflow) {
|
||||
int scan_state = start;
|
||||
int count = 0;
|
||||
int spaces = 0;
|
||||
unsigned long long value = 0;
|
||||
unsigned long long value_max = 0;
|
||||
int c;
|
||||
|
||||
*negative = *overflow = 0;
|
||||
|
||||
if (base < 0 || base == 1 || base > 36 || max_width < 1) {
|
||||
scan_state = failure;
|
||||
} else {
|
||||
c = fetch();
|
||||
}
|
||||
|
||||
if (base != 0) {
|
||||
value_max = ULLONG_MAX / base;
|
||||
}
|
||||
|
||||
while (count <= max_width && c != -1 && !final_state(scan_state)) {
|
||||
switch (scan_state) {
|
||||
case start: {
|
||||
if (isspace(c)) {
|
||||
c = fetch();
|
||||
count--;
|
||||
spaces++;
|
||||
break;
|
||||
}
|
||||
|
||||
if (c == '+') {
|
||||
c = fetch();
|
||||
} else if (c == '-') {
|
||||
c = fetch();
|
||||
*negative = 1;
|
||||
}
|
||||
|
||||
scan_state = check_for_zero;
|
||||
break;
|
||||
}
|
||||
|
||||
case check_for_zero: {
|
||||
if (base == 0 || base == 16) {
|
||||
if (c == '0') {
|
||||
scan_state = leading_zero;
|
||||
c = fetch();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
scan_state = need_digit;
|
||||
break;
|
||||
}
|
||||
|
||||
case leading_zero: {
|
||||
if (c == 'X' || c == 'x') {
|
||||
base = 16;
|
||||
scan_state = need_digit;
|
||||
c = fetch();
|
||||
break;
|
||||
}
|
||||
|
||||
if (base == 0) {
|
||||
base = 8;
|
||||
}
|
||||
|
||||
scan_state = digit_loop;
|
||||
break;
|
||||
}
|
||||
|
||||
case need_digit:
|
||||
case digit_loop: {
|
||||
if (base == 0) {
|
||||
base = 10;
|
||||
}
|
||||
|
||||
if (!value_max) {
|
||||
value_max = ULLONG_MAX / base;
|
||||
}
|
||||
|
||||
if (isdigit(c)) {
|
||||
if ((c -= '0') >= base) {
|
||||
if (scan_state == digit_loop) {
|
||||
scan_state = finished;
|
||||
} else {
|
||||
scan_state = failure;
|
||||
}
|
||||
|
||||
c += '0';
|
||||
break;
|
||||
}
|
||||
} else if (!isalpha(c) || (toupper(c) - 'A' + 10) >= base) {
|
||||
if (scan_state == digit_loop) {
|
||||
scan_state = finished;
|
||||
} else {
|
||||
scan_state = failure;
|
||||
}
|
||||
|
||||
break;
|
||||
} else {
|
||||
c = toupper(c) - 'A' + 10;
|
||||
}
|
||||
|
||||
if (value > value_max) {
|
||||
*overflow = 1;
|
||||
}
|
||||
|
||||
value *= base;
|
||||
|
||||
if (c > (ULLONG_MAX - value)) {
|
||||
*overflow = 1;
|
||||
}
|
||||
|
||||
value += c;
|
||||
scan_state = digit_loop;
|
||||
c = fetch();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!success(scan_state)) {
|
||||
count = 0;
|
||||
value = 0;
|
||||
*chars_scanned = 0;
|
||||
} else {
|
||||
count--;
|
||||
*chars_scanned = count + spaces;
|
||||
}
|
||||
|
||||
unfetch(c);
|
||||
return value;
|
||||
}
|
||||
|
||||
unsigned long strtoul(const char* str, char** end, int base) {
|
||||
unsigned long value;
|
||||
int count, negative, overflow;
|
||||
__InStrCtrl isc;
|
||||
|
||||
isc.spNextChar = (char*)str;
|
||||
isc.nullCharDetected = 0;
|
||||
|
||||
value = __strtoul(base, INT_MAX, &__StringRead, &isc, &count, &negative, &overflow);
|
||||
|
||||
if (end) {
|
||||
*end = (char*)str + count;
|
||||
}
|
||||
|
||||
if (overflow) {
|
||||
value = ULONG_MAX;
|
||||
errno = ERANGE;
|
||||
} else if (negative) {
|
||||
value = -value;
|
||||
}
|
||||
|
||||
return value;
|
||||
}
|
||||
|
||||
unsigned long long strtoull(const char* str, char** end, int base) {
|
||||
unsigned long long value;
|
||||
int count, negative, overflow;
|
||||
__InStrCtrl isc;
|
||||
|
||||
isc.spNextChar = (char*)str;
|
||||
isc.nullCharDetected = 0;
|
||||
|
||||
value = __strtoull(base, INT_MAX, &__StringRead, &isc, &count, &negative, &overflow);
|
||||
|
||||
if (end) {
|
||||
*end = (char*)str + count;
|
||||
}
|
||||
|
||||
if (overflow) {
|
||||
value = ULLONG_MAX;
|
||||
errno = ERANGE;
|
||||
} else if (negative) {
|
||||
value = -value;
|
||||
}
|
||||
|
||||
return value;
|
||||
}
|
||||
|
||||
long strtol(const char* str, char** end, int base) {
|
||||
unsigned long uvalue;
|
||||
long svalue;
|
||||
int count, negative, overflow;
|
||||
__InStrCtrl isc;
|
||||
|
||||
isc.spNextChar = (char*)str;
|
||||
isc.nullCharDetected = 0;
|
||||
|
||||
uvalue = __strtoul(base, INT_MAX, &__StringRead, &isc, &count, &negative, &overflow);
|
||||
|
||||
if (end) {
|
||||
*end = (char*)str + count;
|
||||
}
|
||||
|
||||
if (overflow || (!negative && uvalue > LONG_MAX) || (negative && uvalue > -(unsigned long)LONG_MIN)) {
|
||||
svalue = (negative ? -(unsigned long)LONG_MIN : LONG_MAX);
|
||||
errno = ERANGE;
|
||||
} else {
|
||||
svalue = (negative ? -(long)uvalue : (long)uvalue);
|
||||
}
|
||||
|
||||
return svalue;
|
||||
}
|
||||
|
||||
int atoi(const char* str) {
|
||||
return (int)strtol(str, NULL, 10);
|
||||
}
|
||||
|
||||
long atol(const char* str) {
|
||||
return strtol(str, NULL, 10);
|
||||
}
|
||||
44
libs/MSL/src/MSL_Common/wchar_io.c
Normal file
44
libs/MSL/src/MSL_Common/wchar_io.c
Normal file
@@ -0,0 +1,44 @@
|
||||
#include "internal/file_struct.h"
|
||||
|
||||
enum file_kinds {
|
||||
file_closed
|
||||
};
|
||||
|
||||
enum file_orientation {
|
||||
file_unoriented,
|
||||
file_char_oriented,
|
||||
file_wide_oriented
|
||||
};
|
||||
|
||||
int fwide(FILE* file, int file_mode) {
|
||||
int orientation;
|
||||
int res;
|
||||
|
||||
if (file == NULL || file->mode.file_kind == file_closed) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
orientation = file->mode.file_orientation;
|
||||
|
||||
switch (orientation) {
|
||||
case file_unoriented:
|
||||
if (file_mode > 0) {
|
||||
file->mode.file_orientation = file_wide_oriented;
|
||||
} else if (file_mode < 0) {
|
||||
file->mode.file_orientation = file_char_oriented;
|
||||
}
|
||||
|
||||
res = file_mode;
|
||||
break;
|
||||
|
||||
case file_wide_oriented:
|
||||
res = 1;
|
||||
break;
|
||||
|
||||
case file_char_oriented:
|
||||
res = -1;
|
||||
break;
|
||||
}
|
||||
|
||||
return res;
|
||||
}
|
||||
104
libs/MSL/src/MSL_Common/wctype.c
Normal file
104
libs/MSL/src/MSL_Common/wctype.c
Normal file
@@ -0,0 +1,104 @@
|
||||
const unsigned int __wctype_mapC[128] = {
|
||||
0x00040004, 0x00040004, 0x00040004, 0x00040004,
|
||||
0x00040106, 0x01040104, 0x01040104, 0x00040004,
|
||||
0x00040004, 0x00040004, 0x00040004, 0x00040004,
|
||||
0x00040004, 0x00040004, 0x00040004, 0x00040004,
|
||||
0x014200D0, 0x00D000D0, 0x00D000D0, 0x00D000D0,
|
||||
0x00D000D0, 0x00D000D0, 0x00D000D0, 0x00D000D0,
|
||||
0x04580458, 0x04580458, 0x04580458, 0x04580458,
|
||||
0x04580458, 0x00D000D0, 0x00D000D0, 0x00D000D0,
|
||||
0x00D00651, 0x06510651, 0x06510651, 0x06510251,
|
||||
0x02510251, 0x02510251, 0x02510251, 0x02510251,
|
||||
0x02510251, 0x02510251, 0x02510251, 0x02510251,
|
||||
0x02510251, 0x025100D0, 0x00D000D0, 0x00D000D0,
|
||||
0x00D00471, 0x04710471, 0x04710471, 0x04710071,
|
||||
0x00710071, 0x00710071, 0x00710071, 0x00710071,
|
||||
0x00710071, 0x00710071, 0x00710071, 0x00710071,
|
||||
0x00710071, 0x007100D0, 0x00D000D0, 0x00D00004,
|
||||
0x00000000, 0x00000000, 0x00000000, 0x00000000,
|
||||
0x00000000, 0x00000000, 0x00000000, 0x00000000,
|
||||
0x00000000, 0x00000000, 0x00000000, 0x00000000,
|
||||
0x00000000, 0x00000000, 0x00000000, 0x00000000,
|
||||
0x00000000, 0x00000000, 0x00000000, 0x00000000,
|
||||
0x00000000, 0x00000000, 0x00000000, 0x00000000,
|
||||
0x00000000, 0x00000000, 0x00000000, 0x00000000,
|
||||
0x00000000, 0x00000000, 0x00000000, 0x00000000,
|
||||
0x00000000, 0x00000000, 0x00000000, 0x00000000,
|
||||
0x00000000, 0x00000000, 0x00000000, 0x00000000,
|
||||
0x00000000, 0x00000000, 0x00000000, 0x00000000,
|
||||
0x00000000, 0x00000000, 0x00000000, 0x00000000,
|
||||
0x00000000, 0x00000000, 0x00000000, 0x00000000,
|
||||
0x00000000, 0x00000000, 0x00000000, 0x00000000,
|
||||
0x00000000, 0x00000000, 0x00000000, 0x00000000,
|
||||
0x00000000, 0x00000000, 0x00000000, 0x00000000,
|
||||
};
|
||||
|
||||
const unsigned int __wlower_mapC[128] = {
|
||||
0x00000001, 0x00020003, 0x00040005, 0x00060007,
|
||||
0x00080009, 0x000A000B, 0x000C000D, 0x000E000F,
|
||||
0x00100011, 0x00120013, 0x00140015, 0x00160017,
|
||||
0x00180019, 0x001A001B, 0x001C001D, 0x001E001F,
|
||||
0x00200021, 0x00220023, 0x00240025, 0x00260027,
|
||||
0x00280029, 0x002A002B, 0x002C002D, 0x002E002F,
|
||||
0x00300031, 0x00320033, 0x00340035, 0x00360037,
|
||||
0x00380039, 0x003A003B, 0x003C003D, 0x003E003F,
|
||||
0x00400061, 0x00620063, 0x00640065, 0x00660067,
|
||||
0x00680069, 0x006A006B, 0x006C006D, 0x006E006F,
|
||||
0x00700071, 0x00720073, 0x00740075, 0x00760077,
|
||||
0x00780079, 0x007A005B, 0x005C005D, 0x005E005F,
|
||||
0x00600061, 0x00620063, 0x00640065, 0x00660067,
|
||||
0x00680069, 0x006A006B, 0x006C006D, 0x006E006F,
|
||||
0x00700071, 0x00720073, 0x00740075, 0x00760077,
|
||||
0x00780079, 0x007A007B, 0x007C007D, 0x007E007F,
|
||||
0x00800081, 0x00820083, 0x00840085, 0x00860087,
|
||||
0x00880089, 0x008A008B, 0x008C008D, 0x008E008F,
|
||||
0x00900091, 0x00920093, 0x00940095, 0x00960097,
|
||||
0x00980099, 0x009A009B, 0x009C009D, 0x009E009F,
|
||||
0x00A000A1, 0x00A200A3, 0x00A400A5, 0x00A600A7,
|
||||
0x00A800A9, 0x00AA00AB, 0x00AC00AD, 0x00AE00AF,
|
||||
0x00B000B1, 0x00B200B3, 0x00B400B5, 0x00B600B7,
|
||||
0x00B800B9, 0x00BA00BB, 0x00BC00BD, 0x00BE00BF,
|
||||
0x00C000C1, 0x00C200C3, 0x00C400C5, 0x00C600C7,
|
||||
0x00C800C9, 0x00CA00CB, 0x00CC00CD, 0x00CE00CF,
|
||||
0x00D000D1, 0x00D200D3, 0x00D400D5, 0x00D600D7,
|
||||
0x00D800D9, 0x00DA00DB, 0x00DC00DD, 0x00DE00DF,
|
||||
0x00E000E1, 0x00E200E3, 0x00E400E5, 0x00E600E7,
|
||||
0x00E800E9, 0x00EA00EB, 0x00EC00ED, 0x00EE00EF,
|
||||
0x00F000F1, 0x00F200F3, 0x00F400F5, 0x00F600F7,
|
||||
0x00F800F9, 0x00FA00FB, 0x00FC00FD, 0x00FE00FF,
|
||||
};
|
||||
|
||||
const unsigned int __wupper_mapC[128] = {
|
||||
0x00000001, 0x00020003, 0x00040005, 0x00060007,
|
||||
0x00080009, 0x000A000B, 0x000C000D, 0x000E000F,
|
||||
0x00100011, 0x00120013, 0x00140015, 0x00160017,
|
||||
0x00180019, 0x001A001B, 0x001C001D, 0x001E001F,
|
||||
0x00200021, 0x00220023, 0x00240025, 0x00260027,
|
||||
0x00280029, 0x002A002B, 0x002C002D, 0x002E002F,
|
||||
0x00300031, 0x00320033, 0x00340035, 0x00360037,
|
||||
0x00380039, 0x003A003B, 0x003C003D, 0x003E003F,
|
||||
0x00400041, 0x00420043, 0x00440045, 0x00460047,
|
||||
0x00480049, 0x004A004B, 0x004C004D, 0x004E004F,
|
||||
0x00500051, 0x00520053, 0x00540055, 0x00560057,
|
||||
0x00580059, 0x005A005B, 0x005C005D, 0x005E005F,
|
||||
0x00600041, 0x00420043, 0x00440045, 0x00460047,
|
||||
0x00480049, 0x004A004B, 0x004C004D, 0x004E004F,
|
||||
0x00500051, 0x00520053, 0x00540055, 0x00560057,
|
||||
0x00580059, 0x005A007B, 0x007C007D, 0x007E007F,
|
||||
0x00800081, 0x00820083, 0x00840085, 0x00860087,
|
||||
0x00880089, 0x008A008B, 0x008C008D, 0x008E008F,
|
||||
0x00900091, 0x00920093, 0x00940095, 0x00960097,
|
||||
0x00980099, 0x009A009B, 0x009C009D, 0x009E009F,
|
||||
0x00A000A1, 0x00A200A3, 0x00A400A5, 0x00A600A7,
|
||||
0x00A800A9, 0x00AA00AB, 0x00AC00AD, 0x00AE00AF,
|
||||
0x00B000B1, 0x00B200B3, 0x00B400B5, 0x00B600B7,
|
||||
0x00B800B9, 0x00BA00BB, 0x00BC00BD, 0x00BE00BF,
|
||||
0x00C000C1, 0x00C200C3, 0x00C400C5, 0x00C600C7,
|
||||
0x00C800C9, 0x00CA00CB, 0x00CC00CD, 0x00CE00CF,
|
||||
0x00D000D1, 0x00D200D3, 0x00D400D5, 0x00D600D7,
|
||||
0x00D800D9, 0x00DA00DB, 0x00DC00DD, 0x00DE00DF,
|
||||
0x00E000E1, 0x00E200E3, 0x00E400E5, 0x00E600E7,
|
||||
0x00E800E9, 0x00EA00EB, 0x00EC00ED, 0x00EE00EF,
|
||||
0x00F000F1, 0x00F200F3, 0x00F400F5, 0x00F600F7,
|
||||
0x00F800F9, 0x00FA00FB, 0x00FC00FD, 0x00FE00FF,
|
||||
};
|
||||
160
libs/MSL/src/MSL_Common/wstring.c
Normal file
160
libs/MSL/src/MSL_Common/wstring.c
Normal file
@@ -0,0 +1,160 @@
|
||||
#include <wchar.h>
|
||||
|
||||
size_t wcslen(const wchar_t* str) {
|
||||
const wchar_t* p = str - 1;
|
||||
size_t len = -1;
|
||||
|
||||
do {
|
||||
len++;
|
||||
} while (*++p != 0);
|
||||
|
||||
return len;
|
||||
}
|
||||
|
||||
wchar_t* wcscpy(wchar_t* dest, const wchar_t* src) {
|
||||
const wchar_t* s = src - 1;
|
||||
wchar_t* d = dest - 1;
|
||||
wchar_t c;
|
||||
|
||||
do {
|
||||
c = *++s;
|
||||
*++d = c;
|
||||
} while (c != 0);
|
||||
|
||||
return dest;
|
||||
}
|
||||
|
||||
wchar_t* wcsncpy(wchar_t* dest, const wchar_t* src, size_t num) {
|
||||
const wchar_t* s = src - 1;
|
||||
wchar_t* d = dest - 1;
|
||||
wchar_t c;
|
||||
size_t n = num + 1;
|
||||
|
||||
while (--n != 0) {
|
||||
c = *++s;
|
||||
*++d = c;
|
||||
if (c == 0) {
|
||||
while (--n != 0) {
|
||||
*++d = 0;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return dest;
|
||||
}
|
||||
|
||||
wchar_t* wcscat(wchar_t* dest, const wchar_t* src) {
|
||||
const wchar_t* s = src - 1;
|
||||
wchar_t* d = dest - 1;
|
||||
|
||||
while (*++d != 0)
|
||||
;
|
||||
d--;
|
||||
do {
|
||||
*++d = *++s;
|
||||
} while (*s != 0);
|
||||
|
||||
return dest;
|
||||
}
|
||||
|
||||
wchar_t* wcsncat(wchar_t* dest, const wchar_t* src, size_t num) {
|
||||
const wchar_t* s = src - 1;
|
||||
wchar_t* d = dest - 1;
|
||||
wchar_t c;
|
||||
size_t n;
|
||||
|
||||
while (*++d != 0)
|
||||
;
|
||||
d--;
|
||||
n = num + 1;
|
||||
|
||||
while (--n != 0) {
|
||||
c = *++s;
|
||||
*++d = c;
|
||||
if (c == 0) {
|
||||
d--;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
*++d = 0;
|
||||
return dest;
|
||||
}
|
||||
|
||||
int wcsncmp(const wchar_t* s1, const wchar_t* s2, size_t num) {
|
||||
wchar_t c2;
|
||||
wchar_t c1;
|
||||
const wchar_t* p1;
|
||||
const wchar_t* p2;
|
||||
size_t n;
|
||||
|
||||
p1 = s1 - 1;
|
||||
p2 = s2 - 1;
|
||||
n = num + 1;
|
||||
|
||||
while (--n != 0) {
|
||||
c1 = *++p1;
|
||||
c2 = *++p2;
|
||||
if (c1 != c2) {
|
||||
return (int)(c1 - c2);
|
||||
}
|
||||
if (c1 == 0) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
wchar_t* wcschr(wchar_t* ws, wchar_t wc) {
|
||||
wchar_t* p = ws - 1;
|
||||
wchar_t ch;
|
||||
|
||||
while ((ch = *++p) != 0) {
|
||||
if (ch == wc) {
|
||||
return p;
|
||||
}
|
||||
}
|
||||
|
||||
if (wc == 0) {
|
||||
return p;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
wchar_t* wcsstr(const wchar_t* s1, const wchar_t* s2) {
|
||||
const wchar_t* p1;
|
||||
wchar_t c;
|
||||
wchar_t c1;
|
||||
wchar_t c2;
|
||||
|
||||
c = *s2;
|
||||
p1 = s1 - 1;
|
||||
if (c == 0) {
|
||||
return (wchar_t*)s1;
|
||||
}
|
||||
|
||||
while ((c1 = *++p1) != 0) {
|
||||
if (c1 == c) {
|
||||
wchar_t ic1;
|
||||
const wchar_t* ps1;
|
||||
const wchar_t* p2;
|
||||
ps1 = p1 - 1;
|
||||
p2 = s2 - 1;
|
||||
do {
|
||||
ic1 = *++ps1;
|
||||
c2 = *++p2;
|
||||
if (ic1 != c2) {
|
||||
break;
|
||||
}
|
||||
} while (ic1 != 0);
|
||||
|
||||
if (c2 == 0) {
|
||||
return (wchar_t*)p1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -88,7 +88,11 @@ namespace nw4r {
|
||||
PaneList& GetChildList() { return mChildList; }
|
||||
|
||||
const math::VEC3& GetTranslate() { return mTranslate; }
|
||||
#ifdef IPL_SDMEMORY_SET_TRANSLATE_OUT_OF_LINE
|
||||
void SetTranslate(const math::VEC3& translate);
|
||||
#else
|
||||
void SetTranslate(const math::VEC3& translate) { mTranslate = translate; }
|
||||
#endif
|
||||
void SetTranslate(const math::VEC2& translate) { SetTranslate(math::VEC3(translate.x, translate.y, 0.0f)); }
|
||||
|
||||
const math::VEC3& GetRotate() const { return mRotate; }
|
||||
|
||||
@@ -55,6 +55,12 @@ namespace nw4r {
|
||||
NW4R_ASSERT(type < TEXTCOLOR_MAX);
|
||||
return mTextColors[type];
|
||||
}
|
||||
#ifdef IPL_SDMEMORY_SET_TEXT_COLORS
|
||||
void SetTextColors(const ut::Color& first, const ut::Color& second) {
|
||||
mTextColors[0] = first;
|
||||
mTextColors[1] = second;
|
||||
}
|
||||
#endif
|
||||
void SetTextColor(u32 type, ut::Color value) {
|
||||
NW4R_ASSERT(type < TEXTCOLOR_MAX);
|
||||
mTextColors[type] = value;
|
||||
|
||||
@@ -50,6 +50,10 @@ namespace nw4r {
|
||||
|
||||
f32 FrSqrt(f32 x);
|
||||
u32 CntBit1(u32 x);
|
||||
|
||||
#ifdef IPL_ADDRESS_MATCHING
|
||||
inline f32 FSqrt(f32 x) { return (x <= 0.0f) ? 0.0f : x * FrSqrt(x); }
|
||||
#endif
|
||||
} // namespace math
|
||||
} // namespace nw4r
|
||||
|
||||
|
||||
@@ -118,6 +118,10 @@ namespace nw4r {
|
||||
return *this;
|
||||
}
|
||||
|
||||
#ifdef IPL_ADDRESS_MATCHING
|
||||
VEC2 operator-() const { return VEC2(-x, -y); }
|
||||
#endif
|
||||
|
||||
VEC2 operator+(const VEC2& rhs) const { return VEC2(x + rhs.x, y + rhs.y); }
|
||||
VEC2 operator-(const VEC2& rhs) const { return VEC2(x - rhs.x, y - rhs.y); }
|
||||
VEC2 operator*(f32 val) const { return VEC2(val * x, val * y); }
|
||||
@@ -130,6 +134,10 @@ namespace nw4r {
|
||||
bool operator!=(const VEC2& rhs) const { return x != rhs.x || y != rhs.y; }
|
||||
} VEC2;
|
||||
|
||||
#ifdef IPL_ADDRESS_MATCHING
|
||||
inline f32 VEC2LenSq(const VEC2* p) { return p->x * p->x + p->y * p->y; }
|
||||
#endif
|
||||
|
||||
typedef struct VEC3 VEC3;
|
||||
|
||||
inline VEC3* VEC3Transform(VEC3* pOut, const MTX34* pMtx, const VEC3* pVec);
|
||||
|
||||
@@ -59,7 +59,7 @@ namespace nw4r {
|
||||
b = blue;
|
||||
a = alpha;
|
||||
}
|
||||
} Color;
|
||||
} ATTRIBUTE_ALIGN(4) Color;
|
||||
} // namespace ut
|
||||
} // namespace nw4r
|
||||
|
||||
|
||||
@@ -16,7 +16,9 @@ namespace nw4r {
|
||||
#endif
|
||||
Rect(f32 l, f32 t, f32 r, f32 b) : left(l), top(t), right(r), bottom(b) {}
|
||||
|
||||
#ifndef IPL_CONTROLLER_TRIVIAL_RECT_DTOR
|
||||
~Rect() {}
|
||||
#endif
|
||||
|
||||
void SetWidth(f32 width) { right = left + width; }
|
||||
void SetHeight(f32 height) { bottom = top + height; }
|
||||
|
||||
@@ -37,6 +37,9 @@ namespace nw4r {
|
||||
} // namespace detail
|
||||
|
||||
template <typename TDerived, typename TBase>
|
||||
#ifdef IPL_BOARD_OBJECT_EXTERNAL_DYNAMIC_CAST
|
||||
TDerived DynamicCast(TBase* pPtr);
|
||||
#else
|
||||
inline TDerived DynamicCast(TBase* pPtr) {
|
||||
const detail::RuntimeTypeInfo* pDerivedTypeInfo = detail::GetTypeInfoFromPtr_(static_cast<TDerived>(NULL));
|
||||
if (pPtr->GetRuntimeTypeInfo()->IsDerivedFrom(pDerivedTypeInfo)) {
|
||||
@@ -44,6 +47,7 @@ namespace nw4r {
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
#endif
|
||||
} // namespace ut
|
||||
} // namespace nw4r
|
||||
|
||||
|
||||
@@ -34,20 +34,29 @@ namespace nw4r {
|
||||
const u32* flags0A;
|
||||
const u32* flags0C;
|
||||
|
||||
int i, j;
|
||||
int i;
|
||||
int entryI;
|
||||
const HeaderedGlyphGroups* offsetPGlgr;
|
||||
const u8* offsetFlags;
|
||||
u32 loadedSheetCount, loadedSmth0ASize, loadedSmth0CSize;
|
||||
u32 flagWord;
|
||||
const u8* offsetFlags;
|
||||
const char* groupName;
|
||||
const u32* offsetData;
|
||||
int j;
|
||||
|
||||
u32 sheetOffsetsSize;
|
||||
u32 loadedSheetsSize;
|
||||
u32 neededCharacterSize;
|
||||
u32 baseSize;
|
||||
|
||||
u32 count0CWork;
|
||||
|
||||
u32& neededCharacterSizeRef = neededCharacterSize;
|
||||
|
||||
u32 loadedSizeRef;
|
||||
|
||||
u32 groupOffset;
|
||||
|
||||
if (!ArchiveFontBase::IsValidResource(fontData, 0x4000)) {
|
||||
return 0;
|
||||
}
|
||||
@@ -55,29 +64,30 @@ namespace nw4r {
|
||||
font = (ArchiveFontBinaryLayout*)fontData;
|
||||
pGlgr = &font->glgr;
|
||||
|
||||
countName = font->glgr.inner.nameCount;
|
||||
countSheet = font->glgr.inner.sheetCount;
|
||||
count0A = font->glgr.inner.smthCount_0x0a;
|
||||
count0C = font->glgr.inner.smthCount_0x0c;
|
||||
countName = pGlgr->inner.nameCount;
|
||||
countSheet = pGlgr->inner.sheetCount;
|
||||
count0A = pGlgr->inner.smthCount_0x0a;
|
||||
count0C = pGlgr->inner.smthCount_0x0c;
|
||||
count0CWork = count0C;
|
||||
|
||||
stepSheets = ((s32)countSheet + 0x1f) / 32 * 4;
|
||||
step0A = ((s32)count0A + 0x1f) / 32 * 4;
|
||||
step0C = ((s32)count0C + 0x1f) / 32 * 4;
|
||||
step0C = ((s32)count0CWork + 0x1f) / 32 * 4;
|
||||
|
||||
dataSheetsOff = ROUNDUP(offsetof(ArchiveFontBinaryLayout, glgr.inner.nameOffsets) + countName * sizeof(u16), 4);
|
||||
data0AOff = ROUNDUP(dataSheetsOff + countSheet * sizeof(u32), 4);
|
||||
data0COff = ROUNDUP(data0AOff + count0A * sizeof(u32), 4);
|
||||
dataSheets = lyt::detail::ConvertOffsToPtr<u32>(fontData, dataSheetsOff);
|
||||
data0A = lyt::detail::ConvertOffsToPtr<u32>(fontData, data0AOff);
|
||||
data0C = lyt::detail::ConvertOffsToPtr<u32>(fontData, data0COff);
|
||||
dataSheets = (const u32*)((u32)dataSheetsOff + (u32)fontData);
|
||||
data0A = (const u32*)((u32)data0AOff + (u32)fontData);
|
||||
data0C = (const u32*)((u32)data0COff + (u32)fontData);
|
||||
|
||||
flagsSheetsOff = ROUNDUP(data0COff + count0C * sizeof(u32), 4);
|
||||
flagsSheetsOff = ROUNDUP(data0COff + count0CWork * sizeof(u32), 4);
|
||||
flags0AOff = ROUNDUP(flagsSheetsOff + stepSheets * countName, 4);
|
||||
flags0COff = ROUNDUP(flags0AOff + step0A * countName, 4);
|
||||
|
||||
flagsSheets = lyt::detail::ConvertOffsToPtr<u32>(fontData, flagsSheetsOff);
|
||||
flags0A = lyt::detail::ConvertOffsToPtr<u32>(fontData, flags0AOff);
|
||||
flags0C = lyt::detail::ConvertOffsToPtr<u32>(fontData, flags0COff);
|
||||
flagsSheets = (const u32*)((u32)flagsSheetsOff + (u32)fontData);
|
||||
flags0A = (const u32*)((u32)flags0AOff + (u32)fontData);
|
||||
flags0C = (const u32*)((u32)flags0COff + (u32)fontData);
|
||||
|
||||
loadedSheetCount = 0;
|
||||
loadedSmth0ASize = 0;
|
||||
@@ -90,7 +100,7 @@ namespace nw4r {
|
||||
flagWord = 0;
|
||||
for (j = 0, offsetPGlgr = pGlgr; j < pGlgr->inner.nameCount;
|
||||
offsetPGlgr = (const HeaderedGlyphGroups*)((const u8*)offsetPGlgr + 2), j++) {
|
||||
groupName = (const char*)fontData + offsetPGlgr->inner.nameOffsets[0];
|
||||
groupName = (const char*)((u32)offsetPGlgr->inner.nameOffsets[0] + (u32)fontData);
|
||||
if (*includedGroups == '\0' || detail::ArchiveFontBase::IncludeName(includedGroups, groupName)) {
|
||||
flagWord |= *(const u32*)((const u8*)offsetFlags + ROUNDDOWN(j * stepSheets, 4));
|
||||
}
|
||||
@@ -101,12 +111,13 @@ namespace nw4r {
|
||||
// getLoadedSheetCount(pGlgr, flagsSheets, stepSheets, fontData, includedGroups, &loadedSheetCount);
|
||||
|
||||
// Get the SIZE of unk_0x0a that should be loaded
|
||||
for (i = 0, entryI = 0; entryI < pGlgr->inner.smthCount_0x0a; entryI += 32, i++) {
|
||||
for (i = 0; i * 32 < pGlgr->inner.smthCount_0x0a; i++) {
|
||||
offsetFlags = (const u8*)flags0A + i * sizeof(u32);
|
||||
|
||||
flagWord = 0;
|
||||
for (j = 0; j < pGlgr->inner.nameCount; j++) {
|
||||
groupName = (const char*)fontData + pGlgr->inner.nameOffsets[j];
|
||||
groupOffset = pGlgr->inner.nameOffsets[j];
|
||||
groupName = (const char*)(groupOffset + (u32)fontData);
|
||||
if (*includedGroups == '\0' || detail::ArchiveFontBase::IncludeName(includedGroups, groupName)) {
|
||||
flagWord |= *(const u32*)((const u8*)offsetFlags + ROUNDDOWN(j * step0A, 4));
|
||||
}
|
||||
@@ -121,12 +132,13 @@ namespace nw4r {
|
||||
}
|
||||
|
||||
// Get the SIZE of unk_0x0C that should be loaded
|
||||
for (i = 0, entryI = 0; entryI < pGlgr->inner.smthCount_0x0c; entryI += 32, i++) {
|
||||
for (i = 0; i * 32 < pGlgr->inner.smthCount_0x0c; i++) {
|
||||
offsetFlags = (const u8*)flags0C + i * sizeof(u32);
|
||||
|
||||
flagWord = 0;
|
||||
for (j = 0; j < pGlgr->inner.nameCount; j++) {
|
||||
groupName = (const char*)fontData + pGlgr->inner.nameOffsets[j];
|
||||
groupOffset = pGlgr->inner.nameOffsets[j];
|
||||
groupName = (const char*)(groupOffset + (u32)fontData);
|
||||
if (*includedGroups == '\0' || detail::ArchiveFontBase::IncludeName(includedGroups, groupName)) {
|
||||
flagWord |= *(const u32*)((const u8*)offsetFlags + ROUNDDOWN(j * step0C, 4));
|
||||
}
|
||||
@@ -145,13 +157,14 @@ namespace nw4r {
|
||||
sheetOffsetsSize = ROUNDUP(pGlgr->inner.sheetCount * 2, 4);
|
||||
loadedSheetsSize = ROUNDUP(loadedSheetCount * pGlgr->inner.uncompSheetSize, 4);
|
||||
|
||||
neededCharacterSize = sizeof(CXUncompContextHuffman);
|
||||
if (loadedSmth0ASize + loadedSmth0CSize >= sizeof(CXUncompContextHuffman)) {
|
||||
neededCharacterSize = loadedSmth0ASize + loadedSmth0CSize;
|
||||
loadedSizeRef = loadedSmth0ASize + loadedSmth0CSize;
|
||||
neededCharacterSizeRef = sizeof(CXUncompContextHuffman);
|
||||
if (loadedSizeRef >= sizeof(CXUncompContextHuffman)) {
|
||||
neededCharacterSize = loadedSizeRef;
|
||||
}
|
||||
|
||||
baseSize = OSRoundUp32B(sizeof(FontInformation) + sizeof(FontTextureGlyph) + sheetOffsetsSize);
|
||||
return baseSize + neededCharacterSize + loadedSheetsSize;
|
||||
return (baseSize + loadedSheetsSize) + neededCharacterSize;
|
||||
}
|
||||
|
||||
detail::ArchiveFontBase::ConstructState ArchiveFont::StreamingConstruct(ConstructContext* ctx, const void* fontData, u32 fontDataSize) {
|
||||
@@ -164,8 +177,9 @@ namespace nw4r {
|
||||
}
|
||||
|
||||
state = CONSTRUCT_STATE_WORKING;
|
||||
reader = &ctx->mReader;
|
||||
reader->Attach(fontData, fontDataSize);
|
||||
CachedStreamReader& readerRef = ctx->mReader;
|
||||
reader = &readerRef;
|
||||
readerRef.Attach(fontData, fontDataSize);
|
||||
|
||||
while (state == CONSTRUCT_STATE_WORKING) {
|
||||
switch (ctx->mNextCmd) {
|
||||
|
||||
@@ -57,6 +57,46 @@ void RFLiInitCtrlBuf(MEMiHeapHead* sysHeap) {
|
||||
}
|
||||
}
|
||||
|
||||
int RFLiGetControllerData(RFLiCharInfo* dst, s32 chan, u8 index, BOOL hiddenAvailable) {
|
||||
RFLiCtrlManager* manager;
|
||||
RFLiCtrlBuffer* buffer;
|
||||
u16 flag;
|
||||
|
||||
RFLi_ASSERTLINE_RANGE(chan, 0, WPAD_MAX_CONTROLLERS, 1412);
|
||||
RFLi_ASSERTLINE_RANGE(index, 0, RFL_MAX_CTRL_BUFFER, 1413);
|
||||
|
||||
if (chan < 0 || chan >= WPAD_MAX_CONTROLLERS) {
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if (index >= RFL_MAX_CTRL_BUFFER) {
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
manager = RFLiGetCtrlBufManager();
|
||||
if (manager == NULL) {
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if (!manager->mIsLoaded[chan]) {
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
flag = (1 << index);
|
||||
buffer = manager->mBuffer[chan];
|
||||
if (!RFLiIsValidID((RFLCreateID*)&buffer->mData[index].createID)) {
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if (!hiddenAvailable && (buffer->mSecretFlag & flag) != 0) {
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
RFLiConvertRaw2Info(&buffer->mData[index], dst);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
BOOL RFLiCheckCtrlBufferCore(const RFLiCtrlBuffer* buffer, u8 index, RFLiCtrlCheckType type) {
|
||||
u16 flag = (1 << index);
|
||||
|
||||
@@ -771,46 +811,6 @@ int RFLiSetControllerData(const RFLiCharInfo* src, s32 chan, u8 index) {
|
||||
return setDataCore_(src, chan, index, FALSE);
|
||||
}
|
||||
|
||||
int RFLiGetControllerData(RFLiCharInfo* dst, s32 chan, u8 index, BOOL hiddenAvailable) {
|
||||
RFLiCtrlManager* manager;
|
||||
RFLiCtrlBuffer* buffer;
|
||||
u16 flag;
|
||||
|
||||
RFLi_ASSERTLINE_RANGE(chan, 0, WPAD_MAX_CONTROLLERS, 1412);
|
||||
RFLi_ASSERTLINE_RANGE(index, 0, RFL_MAX_CTRL_BUFFER, 1413);
|
||||
|
||||
if (chan < 0 || chan >= WPAD_MAX_CONTROLLERS) {
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if (index >= RFL_MAX_CTRL_BUFFER) {
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
manager = RFLiGetCtrlBufManager();
|
||||
if (manager == NULL) {
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if (!manager->mIsLoaded[chan]) {
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
flag = (1 << index);
|
||||
buffer = manager->mBuffer[chan];
|
||||
if (!RFLiIsValidID((RFLCreateID*)&buffer->mData[index].createID)) {
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if (!hiddenAvailable && (buffer->mSecretFlag & flag) != 0) {
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
RFLiConvertRaw2Info(&buffer->mData[index], dst);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
RFLErrcode RFLUnloadController(s32 chan) {
|
||||
RFLi_ASSERTLINE_RANGE(chan, 0, WPAD_MAX_CONTROLLERS, 1461);
|
||||
|
||||
|
||||
@@ -204,7 +204,7 @@ void RFLi_MakeRandomFace_Core(RFLiCharInfo* pCharInfo, RFLi_SEX argSex, RFLi_AGE
|
||||
pCharInfo->personal.localonly = FALSE;
|
||||
}
|
||||
|
||||
u8 RFLi_GetFacelineType(RFLi_SEX sex, RFLi_AGE age, RFLi_RACE race) {
|
||||
static u8 RFLi_GetFacelineType(RFLi_SEX sex, RFLi_AGE age, RFLi_RACE race) {
|
||||
// clang-format off
|
||||
static const u8 facelineTypeTable[RFLSex_All * RFLAge_All * RFLRace_All][10] = {
|
||||
/* Male, Child, Black */ {0, 0, 0, 1, 1, 1, 2, 3, 4, 5},
|
||||
@@ -272,7 +272,7 @@ u8 RFLi_GetHairType(RFLi_SEX sex, RFLi_AGE age, RFLi_RACE race) {
|
||||
return hair_parts[index][RFLi_GetRandU32(hair_parts_num[index])];
|
||||
}
|
||||
|
||||
u8 RFLi_GetEyeType(RFLi_SEX sex, RFLi_AGE age, RFLi_RACE race) {
|
||||
static u8 RFLi_GetEyeType(RFLi_SEX sex, RFLi_AGE age, RFLi_RACE race) {
|
||||
// clang-format off
|
||||
u8 eye_parts[RFLSex_All * RFLAge_All * RFLRace_All][48] = {
|
||||
/* Male, Child, Black */ { 2, 3, 5, 7, 8, 9, 11, 12, 13, 15, 16, 18, 27, 29, 32, 34, 36, 38, 39, 41, 43, 47, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
|
||||
@@ -307,7 +307,7 @@ u8 RFLi_GetEyeType(RFLi_SEX sex, RFLi_AGE age, RFLi_RACE race) {
|
||||
return eye_parts[index][RFLi_GetRandU32(eye_parts_num[index])];
|
||||
}
|
||||
|
||||
u8 RFLi_GetEyebrowType(RFLi_SEX sex, RFLi_AGE age, RFLi_RACE race) {
|
||||
static u8 RFLi_GetEyebrowType(RFLi_SEX sex, RFLi_AGE age, RFLi_RACE race) {
|
||||
// clang-format off
|
||||
static const u8 eyebrow_parts[RFLSex_All * RFLAge_All * RFLRace_All][24] = {
|
||||
/* Male, Child, Black */ { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 17, 18, 20, 0, 0, 0, 0, 0, 0},
|
||||
@@ -342,7 +342,7 @@ u8 RFLi_GetEyebrowType(RFLi_SEX sex, RFLi_AGE age, RFLi_RACE race) {
|
||||
return eyebrow_parts[index][RFLi_GetRandU32(eyebrow_parts_num[index])];
|
||||
}
|
||||
|
||||
u8 RFLi_GetNoseType(RFLi_SEX sex, RFLi_AGE age, RFLi_RACE race) {
|
||||
static u8 RFLi_GetNoseType(RFLi_SEX sex, RFLi_AGE age, RFLi_RACE race) {
|
||||
// clang-format off
|
||||
u8 nose_parts[RFLSex_All * RFLAge_All * RFLRace_All][12] = {
|
||||
/* Male, Child, Black */ { 0, 1, 2, 3, 4, 5, 7, 8, 10, 0, 0, 0},
|
||||
@@ -377,7 +377,7 @@ u8 RFLi_GetNoseType(RFLi_SEX sex, RFLi_AGE age, RFLi_RACE race) {
|
||||
return nose_parts[index][RFLi_GetRandU32(nose_parts_num[index])];
|
||||
}
|
||||
|
||||
u8 RFLi_GetMouthType(RFLi_SEX sex, RFLi_AGE age, RFLi_RACE race) {
|
||||
static u8 RFLi_GetMouthType(RFLi_SEX sex, RFLi_AGE age, RFLi_RACE race) {
|
||||
// clang-format off
|
||||
u8 mouth_parts[RFLSex_All * RFLAge_All * RFLRace_All][24] = {
|
||||
/* Male, Child, Black */ { 0, 2, 3, 6, 7, 8, 9, 10, 12, 14, 15, 17, 18, 19, 21, 22, 23, 0, 0, 0, 0, 0, 0, 0},
|
||||
@@ -412,7 +412,7 @@ u8 RFLi_GetMouthType(RFLi_SEX sex, RFLi_AGE age, RFLi_RACE race) {
|
||||
return mouth_parts[index][RFLi_GetRandU32(mouth_parts_num[index])];
|
||||
}
|
||||
|
||||
u8 RFLi_GetFaceTexType(RFLi_SEX sex, RFLi_AGE age, RFLi_RACE race) {
|
||||
static u8 RFLi_GetFaceTexType(RFLi_SEX sex, RFLi_AGE age, RFLi_RACE race) {
|
||||
// clang-format off
|
||||
static const u8 faceTexTypeTable[RFLSex_All * RFLAge_All * RFLRace_All][20] = {
|
||||
/* Male, Child, Black */ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 3},
|
||||
@@ -507,7 +507,7 @@ u8 RFLi_GetGlassType(RFLi_AGE age) {
|
||||
}
|
||||
}
|
||||
|
||||
u8 RFLi_GetFaceColor(RFLi_SEX sex, RFLi_RACE race) {
|
||||
static u8 RFLi_GetFaceColor(RFLi_SEX sex, RFLi_RACE race) {
|
||||
// clang-format off
|
||||
static const u8 faceColorTable[RFLSex_All * RFLRace_All][10] = {
|
||||
/* Male, Black */ { 2, 2, 4, 4, 4, 4, 5, 5, 5, 5 },
|
||||
@@ -526,7 +526,7 @@ u8 RFLi_GetFaceColor(RFLi_SEX sex, RFLi_RACE race) {
|
||||
return faceColorTable[(sex * RFLRace_All) + race][RFLi_GetRandU32(GET_ARRAY_LENGTH(faceColorTable[0]))];
|
||||
}
|
||||
|
||||
u8 RFLi_GetHairColor(RFLi_AGE age, RFLi_RACE race) {
|
||||
static u8 RFLi_GetHairColor(RFLi_AGE age, RFLi_RACE race) {
|
||||
// clang-format off
|
||||
static const u8 hairColorTable[RFLAge_All * RFLRace_All][20] = {
|
||||
/* Black, Child */ {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
|
||||
@@ -547,7 +547,7 @@ u8 RFLi_GetHairColor(RFLi_AGE age, RFLi_RACE race) {
|
||||
return hairColorTable[(race * 4 - race) + age][RFLi_GetRandU32(GET_ARRAY_LENGTH(hairColorTable[0]))];
|
||||
}
|
||||
|
||||
u8 RFLi_GetEyeColor(RFLi_RACE race) {
|
||||
static u8 RFLi_GetEyeColor(RFLi_RACE race) {
|
||||
// clang-format off
|
||||
static const u8 eyeColorTable[RFLRace_All][10] = {
|
||||
/* Black */ {0, 0, 0, 0, 0, 0, 0, 0, 0, 1},
|
||||
@@ -561,6 +561,6 @@ u8 RFLi_GetEyeColor(RFLi_RACE race) {
|
||||
return eyeColorTable[race][RFLi_GetRandU32(GET_ARRAY_LENGTH(eyeColorTable[0]))];
|
||||
}
|
||||
|
||||
u32 RFLi_GetRandU32(u32 max) {
|
||||
static u32 RFLi_GetRandU32(u32 max) {
|
||||
return OSGetTick() % max;
|
||||
}
|
||||
|
||||
@@ -133,7 +133,7 @@ void RFLiEndWorking(RFLErrcode errcode) {
|
||||
RFLiEndWorkingReason(errcode, 0);
|
||||
}
|
||||
|
||||
NANDCommandBlock* RFLiSetCommandBlock(RFLiFileType type, RFLiAsyncTag tag) {
|
||||
inline NANDCommandBlock* RFLiSetCommandBlock(RFLiFileType type, RFLiAsyncTag tag) {
|
||||
NANDCommandBlock* block = &RFLiGetAccInfo(type)->commandBlock;
|
||||
RFLiCallbackTag* store = &RFLiGetAccInfo(type)->callbackTag;
|
||||
|
||||
@@ -147,7 +147,7 @@ NANDCommandBlock* RFLiSetCommandBlock(RFLiFileType type, RFLiAsyncTag tag) {
|
||||
return block;
|
||||
}
|
||||
|
||||
RFLiAsyncTag RFLiGetTag(NANDCommandBlock* block) {
|
||||
inline RFLiAsyncTag RFLiGetTag(NANDCommandBlock* block) {
|
||||
RFLiCallbackTag* stored;
|
||||
|
||||
RFLi_ASSERTLINE_NULL(block, 312);
|
||||
@@ -159,7 +159,7 @@ RFLiAsyncTag RFLiGetTag(NANDCommandBlock* block) {
|
||||
return stored->tag;
|
||||
}
|
||||
|
||||
RFLiFileType RFLiGetType(NANDCommandBlock* block) {
|
||||
inline RFLiFileType RFLiGetType(NANDCommandBlock* block) {
|
||||
RFLiCallbackTag* stored;
|
||||
|
||||
RFLi_ASSERTLINE_NULL(block, 335);
|
||||
@@ -171,7 +171,7 @@ RFLiFileType RFLiGetType(NANDCommandBlock* block) {
|
||||
return stored->type;
|
||||
}
|
||||
|
||||
NANDFileInfo* RFLiGetWorkingFile(RFLiFileType type) {
|
||||
inline NANDFileInfo* RFLiGetWorkingFile(RFLiFileType type) {
|
||||
RFLi_ASSERTLINE_RANGE(type, RFLiFileType_Database, RFLiFileType_Max, 356);
|
||||
|
||||
if (!RFLAvailable()) {
|
||||
|
||||
@@ -202,7 +202,7 @@ void RFLExit() {
|
||||
}
|
||||
}
|
||||
|
||||
RFLErrcode RFLiBootLoad() {
|
||||
static inline RFLErrcode RFLiBootLoad() {
|
||||
RFLiBootLoadAsync();
|
||||
return RFLWaitAsync();
|
||||
}
|
||||
@@ -223,7 +223,7 @@ static void bootloadDB2Res_() {
|
||||
}
|
||||
}
|
||||
|
||||
RFLErrcode RFLiBootLoadAsync() {
|
||||
static inline RFLErrcode RFLiBootLoadAsync() {
|
||||
return RFLiBootLoadDatabaseAsync(bootloadDB2Res_);
|
||||
}
|
||||
|
||||
@@ -249,7 +249,7 @@ void RFLiFree(void* block) {
|
||||
MEMFreeToExpHeap(RFLiGetManager()->mTmpHeap, block);
|
||||
}
|
||||
|
||||
u32 RFLiGetUsedWorkSize() {
|
||||
static inline u32 RFLiGetUsedWorkSize() {
|
||||
if (RFLAvailable()) {
|
||||
MEMiHeapHead* heap = RFLiGetManager()->mTmpHeap;
|
||||
return MEMGetAllocatableSizeForExpHeap(heap) - MEMGetTotalFreeSizeForExpHeap(heap);
|
||||
@@ -397,7 +397,7 @@ BOOL RFLiNeedRepairError() {
|
||||
return ((*list & (1 << RFLiFileBrokenType_DBBroken)) != 0) ? TRUE : FALSE;
|
||||
}
|
||||
|
||||
BOOL RFLiCriticalError() {
|
||||
static inline BOOL RFLiCriticalError() {
|
||||
u8* list = &sRFLBrokenType;
|
||||
BOOL ret = FALSE; // Unused
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ ziU32 Zi8GetZHuwdPtr(ziU32* arg0, ziU16* arg1 ZI_NEED_WORK) {
|
||||
return 0;
|
||||
} else {
|
||||
*arg1 = ZI_WORK->unk_0x124[ZI_WORK->unk_0x12C - 1][1] / 3;
|
||||
*arg0 = ZI_WORK->unk_0x124[ZI_WORK->unk_0x12C - 1][0];
|
||||
*arg0 = (ziU32)ZI_WORK->unk_0x124[ZI_WORK->unk_0x12C - 1];
|
||||
*arg0 += 8;
|
||||
Zi8LogError(0x64, ZI_WORK);
|
||||
return 1;
|
||||
|
||||
534
libs/RVLMiddleware/eZiText/src/clib/zkokeyp.c
Normal file
534
libs/RVLMiddleware/eZiText/src/clib/zkokeyp.c
Normal file
@@ -0,0 +1,534 @@
|
||||
#include <zi8clib/zierror.h>
|
||||
|
||||
extern ziU16 Zi8GetTableCount(ziU8 lang, ziU8 tableIdx ZI_NEED_WORK);
|
||||
extern ziU32 Zi8GetTableAddress(ziU8 lang, ziU8 tableIdx ZI_NEED_WORK);
|
||||
|
||||
ziU32 Zi8_8148302C(ziU16 key, ziU8* table ZI_NEED_WORK) {
|
||||
ziU32 value;
|
||||
ziU16 count;
|
||||
ziU32 i;
|
||||
|
||||
count = Zi8GetTableCount(ZI8_LANG_KO, 9, ZI_WORK);
|
||||
for (i = 0; (ziU16)i < count; i++) {
|
||||
value = (ziU16)(((ziU16)table[((i & 0xFFFF) << 3) + (i & 0xFFFF) + 7] << 8) |
|
||||
table[((i & 0xFFFF) << 3) + (i & 0xFFFF) + 8]);
|
||||
if (key == value) {
|
||||
Zi8LogError(0x64, ZI_WORK);
|
||||
return i;
|
||||
}
|
||||
}
|
||||
|
||||
Zi8LogError(0x96A, ZI_WORK);
|
||||
return 0xFFFF;
|
||||
}
|
||||
|
||||
void Zi8_81483118(ziGetParam* param, ziU8* output) {
|
||||
ziU8 i;
|
||||
|
||||
for (i = 0; i < 5; i++) {
|
||||
output[i] = 0;
|
||||
}
|
||||
|
||||
switch (param->elementCount) {
|
||||
case 9:
|
||||
output[4] |= (ziU8)((param->elements[8] & 0xF) << 4);
|
||||
case 8:
|
||||
output[3] = param->elements[7] & 0xF;
|
||||
case 7:
|
||||
output[3] |= (ziU8)((param->elements[6] & 0xF) << 4);
|
||||
case 6:
|
||||
output[2] = param->elements[5] & 0xF;
|
||||
case 5:
|
||||
output[2] |= (ziU8)((param->elements[4] & 0xF) << 4);
|
||||
case 4:
|
||||
output[1] = param->elements[3] & 0xF;
|
||||
case 3:
|
||||
output[1] |= (ziU8)((param->elements[2] & 0xF) << 4);
|
||||
case 2:
|
||||
output[0] = param->elements[1] & 0xF;
|
||||
case 1:
|
||||
output[0] |= (ziU8)((param->elements[0] & 0xF) << 4);
|
||||
case 0:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
ziU32 Zi8_81483264(const ziGetParam* param ZI_NEED_WORK) {
|
||||
ziU8 i;
|
||||
|
||||
if (param->scratch == ZI8_NULL) {
|
||||
Zi8LogError(0x164, ZI_WORK);
|
||||
return 1;
|
||||
}
|
||||
|
||||
for (i = 0; i < param->maxCandidates; i++) {
|
||||
((ziU16*)param->scratch)[i] = 0;
|
||||
}
|
||||
|
||||
Zi8LogError(0x64, ZI_WORK);
|
||||
return 0;
|
||||
}
|
||||
|
||||
ziU32 Zi8_81483308(ziGetParam* param, ziU16 key, ziU8* count ZI_NEED_WORK) {
|
||||
ziU8 i;
|
||||
|
||||
Zi8LogError(0x64, ZI_WORK);
|
||||
if (param->scratch == ZI8_NULL) {
|
||||
Zi8ReplaceLastError(0x164, ZI_WORK);
|
||||
return 1;
|
||||
}
|
||||
|
||||
for (i = 0; i < param->maxCandidates; i++) {
|
||||
if (key == ((ziU16*)param->scratch)[i]) {
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
((ziU16*)param->scratch)[*count] = key;
|
||||
if (++*count >= param->maxCandidates) {
|
||||
*count = 0;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
ziBool Zi8_814833F0(const ziGetParam* param, ziU16 key ZI_NEED_WORK) {
|
||||
ziU8 i;
|
||||
|
||||
Zi8LogError(0x64, ZI_WORK);
|
||||
if (param->scratch == ZI8_NULL) {
|
||||
Zi8ReplaceLastError(0x164, ZI_WORK);
|
||||
return 0;
|
||||
}
|
||||
|
||||
for (i = 0; i < param->maxCandidates; i++) {
|
||||
if (key == ((ziU16*)param->scratch)[i]) {
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
ziU32 Zi8_814834AC(ziGetParam* param, ziU16* remaining, ziU8* count,
|
||||
ziU8* inserted ZI_NEED_WORK) {
|
||||
ziBool matches;
|
||||
ziS32 entry;
|
||||
ziS32 tableA;
|
||||
ziS32 tableB;
|
||||
ziU16 tableCount;
|
||||
ziU8 matched;
|
||||
ziU32 j;
|
||||
ziS32 i;
|
||||
ziU8 candidateIndex;
|
||||
union {
|
||||
ziU32 words[13];
|
||||
ziU8 bytes[52];
|
||||
} local;
|
||||
|
||||
matched = 0;
|
||||
local.words[0] = 0;
|
||||
local.bytes[4] = 0;
|
||||
Zi8LogError(0x64, ZI_WORK);
|
||||
if (param->elementCount == 0) {
|
||||
if (*remaining >= *count) {
|
||||
for (i = 0; i < *count; i++) {
|
||||
Zi8_81483308(param, param->candidates[i], inserted, ZI_WORK);
|
||||
}
|
||||
*remaining = *remaining - *count;
|
||||
*count = 0;
|
||||
} else {
|
||||
for (i = 0; i < *remaining; i++) {
|
||||
Zi8_81483308(param, param->candidates[i], inserted, ZI_WORK);
|
||||
}
|
||||
for (i = 0; i < ((ziS32)*count - (ziS32)*remaining); i++) {
|
||||
param->candidates[i] = param->candidates[(ziU32)*remaining + i];
|
||||
}
|
||||
*count = *count - (ziU8)*remaining;
|
||||
*remaining = 0;
|
||||
}
|
||||
return 1;
|
||||
} else if (param->elementCount <= 9) {
|
||||
tableA = Zi8GetTableAddress(param->language, 9, ZI_WORK);
|
||||
tableB = Zi8GetTableAddress(param->language, 10, ZI_WORK);
|
||||
if (tableA == 0) {
|
||||
Zi8ReplaceLastError(0x76C, ZI_WORK);
|
||||
return 0;
|
||||
} else if (tableB == 0) {
|
||||
Zi8ReplaceLastError(0x776, ZI_WORK);
|
||||
return 0;
|
||||
} else {
|
||||
tableCount = Zi8GetTableCount(ZI8_LANG_KO, 9, ZI_WORK);
|
||||
Zi8_81483118(param, local.bytes);
|
||||
i = 0;
|
||||
while (i < tableCount && matched < *count) {
|
||||
matches = ZI8_TRUE;
|
||||
entry = (i << 3) + tableA + i;
|
||||
j = 0;
|
||||
if (param->elementCount > 1) {
|
||||
for (j = 0; (j & 0xFF) < (ziU32)(param->elementCount >> 1); j++) {
|
||||
if (local.bytes[j & 0xFF] != *((ziU8*)entry + (j & 0xFF))) {
|
||||
matches = ZI8_FALSE;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (matches && (param->elementCount & 1) != 0 &&
|
||||
((local.bytes[j & 0xFF] & 0xF0) != (*((ziU8*)entry + (j & 0xFF)) & 0xF0))) {
|
||||
matches = ZI8_FALSE;
|
||||
}
|
||||
if (matches) {
|
||||
for (candidateIndex = 0; candidateIndex < *count; candidateIndex++) {
|
||||
if (param->candidates[candidateIndex] ==
|
||||
(ziU16)((*((ziU8*)entry + 7) << 8) | *((ziU8*)entry + 8))) {
|
||||
matched++;
|
||||
param->candidates[candidateIndex] =
|
||||
param->candidates[candidateIndex] & 0x7FFF;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
i++;
|
||||
}
|
||||
if ((ziU16)matched >= *remaining) {
|
||||
matched = *count;
|
||||
*count = 0;
|
||||
for (i = 0; i < matched; i++) {
|
||||
if ((param->candidates[i] & 0x8000) == 0) {
|
||||
param->candidates[i] = param->candidates[i] | 0x8000;
|
||||
if (*remaining == 0) {
|
||||
if (*count != i) {
|
||||
param->candidates[*count] = param->candidates[i];
|
||||
}
|
||||
*count = *count + 1;
|
||||
} else {
|
||||
*remaining = *remaining - 1;
|
||||
Zi8_81483308(param, param->candidates[i], inserted, ZI_WORK);
|
||||
}
|
||||
}
|
||||
}
|
||||
*remaining = 0;
|
||||
} else {
|
||||
for (i = 0; i < *count; i++) {
|
||||
if ((param->candidates[i] & 0x8000) == 0) {
|
||||
param->candidates[i] = param->candidates[i] | 0x8000;
|
||||
Zi8_81483308(param, param->candidates[i], inserted, ZI_WORK);
|
||||
}
|
||||
}
|
||||
*remaining = *remaining - (ziU16)matched;
|
||||
*count = 0;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
*count = 0;
|
||||
return 0;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
ziU32 Zi8GetKOcandidates(ziGetParam* param, ziU8* options ZI_NEED_WORK) {
|
||||
ziBool bVar1;
|
||||
ziU8 bVar2;
|
||||
ziS32 iVar4;
|
||||
ziU32 uVar6;
|
||||
ziU8* pbVar7;
|
||||
union {
|
||||
ziU32 words[10];
|
||||
ziU8 bytes[40];
|
||||
} local_28;
|
||||
ziU8 local_57;
|
||||
ziU8 local_56;
|
||||
ziU8 local_55;
|
||||
ziU8 local_54;
|
||||
ziU8 local_53;
|
||||
ziS8 local_52;
|
||||
ziU16 local_50;
|
||||
ziU16 local_4E;
|
||||
ziU16 local_4C;
|
||||
ziU16 local_4A;
|
||||
ziU16 local_48;
|
||||
ziS32 local_44;
|
||||
ziS32 local_2C;
|
||||
ziS32 local_30;
|
||||
ziU32 local_34;
|
||||
ziU32 local_38;
|
||||
ziU32 local_3C;
|
||||
ziU32 local_40;
|
||||
|
||||
local_4E = 0xFFFF;
|
||||
local_34 = 0;
|
||||
local_28.words[0] = 0;
|
||||
local_28.bytes[4] = 0;
|
||||
local_52 = 0;
|
||||
local_53 = 0;
|
||||
local_54 = 0;
|
||||
local_55 = 0;
|
||||
local_50 = param->firstCandidate;
|
||||
local_3C = 0;
|
||||
local_40 = 0;
|
||||
local_57 = 0;
|
||||
Zi8LogError(100, ZI_WORK);
|
||||
Zi8_81483264(param, ZI_WORK);
|
||||
iVar4 = Zi8GetTableAddress(ZI8_LANG_KO, 9, ZI_WORK);
|
||||
local_2C = Zi8GetTableAddress(ZI8_LANG_KO, 10, ZI_WORK);
|
||||
if (iVar4 == 0) {
|
||||
Zi8ReplaceLastError(0x76C, ZI_WORK);
|
||||
uVar6 = 0;
|
||||
} else {
|
||||
if (local_2C == 0) {
|
||||
Zi8ReplaceLastError(0x776, ZI_WORK);
|
||||
uVar6 = 0;
|
||||
goto LAB_000114C4;
|
||||
}
|
||||
if (*options == 0) {
|
||||
param->letters = 0;
|
||||
param->count = 0;
|
||||
param->candidates[0] = 0;
|
||||
}
|
||||
Zi8LogError(100, ZI_WORK);
|
||||
if (param->wordCharCount != 0) {
|
||||
local_48 = Zi8_8148302C(param->currentWord[0], (ziU8*)iVar4, ZI_WORK);
|
||||
if ((local_48 != 0xFFFF) &&
|
||||
((((ziU8*)iVar4)[((ziU32)local_48 * 9) + 4] & 8) != 0)) {
|
||||
local_38 = (ziU32)((ziU8*)iVar4)[((ziU32)local_48 * 9) + 6] |
|
||||
((ziU32)((ziU8*)iVar4)[((ziU32)local_48 * 9) + 4] & 3) << 16 |
|
||||
(ziU32)((ziU8*)iVar4)[((ziU32)local_48 * 9) + 5] << 8;
|
||||
local_52 = param->wordCharCount - 1;
|
||||
local_53 = 1;
|
||||
pbVar7 = (ziU8*)(local_2C + local_38);
|
||||
LAB_00010D44:
|
||||
if (local_52 != 0) {
|
||||
local_48 = Zi8_8148302C(param->currentWord[local_53], (ziU8*)iVar4, ZI_WORK);
|
||||
if (local_48 == (ziU16)((*pbVar7 & 0x1F) << 8 | pbVar7[1])) {
|
||||
local_52 = local_52 - 1;
|
||||
local_53 = local_53 + 1;
|
||||
if ((*pbVar7 & 0x40) == 0) {
|
||||
pbVar7 = pbVar7 + 2;
|
||||
goto LAB_00010D44;
|
||||
}
|
||||
local_52 = param->wordCharCount - 1;
|
||||
local_53 = 1;
|
||||
} else {
|
||||
local_53 = 1;
|
||||
local_52 = param->wordCharCount - 1;
|
||||
}
|
||||
}
|
||||
if (local_52 == 0) {
|
||||
local_48 = (*pbVar7 & 0x1F) << 8 | pbVar7[1];
|
||||
local_4C = (ziU16)(((ziU8*)((ziU32)local_48 * 9 + (ziU32)local_48 + (ziU32)iVar4))[7] << 8 |
|
||||
((ziU8*)((ziU32)local_48 * 9 + (ziU32)local_48 + (ziU32)iVar4))[8]);
|
||||
if (param->wordCharCount == 1) {
|
||||
if (local_48 == local_4E) {
|
||||
for (; (*pbVar7 & 0x40) == 0; pbVar7 = pbVar7 + 2) {
|
||||
}
|
||||
local_52 = param->wordCharCount;
|
||||
goto LAB_00011114;
|
||||
}
|
||||
local_4E = local_48;
|
||||
if (param->elementCount == 0) {
|
||||
if (local_50 == 0) {
|
||||
if (*options != 0) {
|
||||
local_3C = local_3C + 1;
|
||||
if ((ziS32)local_3C < *(ziS32*)(options + 0xC)) {
|
||||
goto LAB_000110E8;
|
||||
}
|
||||
uVar6 = *(ziU32*)(options + 0xC);
|
||||
goto LAB_000114C4;
|
||||
}
|
||||
param->candidates[local_54] = local_4C;
|
||||
local_54 = local_54 + 1;
|
||||
param->count = param->count + 1;
|
||||
bVar2 = param->letters + 1;
|
||||
param->letters = bVar2;
|
||||
if (param->maxCandidates <= bVar2) {
|
||||
uVar6 = param->letters;
|
||||
goto LAB_000114C4;
|
||||
}
|
||||
} else {
|
||||
local_50 = local_50 + -1;
|
||||
}
|
||||
} else {
|
||||
param->candidates[local_54] = local_4C;
|
||||
local_54 = local_54 + 1;
|
||||
param->count = param->count + 1;
|
||||
bVar2 = param->letters + 1;
|
||||
param->letters = bVar2;
|
||||
if (param->maxCandidates <= bVar2) {
|
||||
Zi8_814834AC(param, &local_50, &local_54, &local_57, ZI_WORK);
|
||||
param->count = local_54;
|
||||
param->letters = local_54;
|
||||
if (param->maxCandidates <= local_54) {
|
||||
if (*options == 0) {
|
||||
uVar6 = local_54;
|
||||
goto LAB_000114C4;
|
||||
}
|
||||
local_3C = local_3C + local_54;
|
||||
if (*(ziS32*)(options + 0xC) <= (ziS32)local_3C) {
|
||||
uVar6 = *(ziU32*)(options + 0xC);
|
||||
goto LAB_000114C4;
|
||||
}
|
||||
param->count = 0;
|
||||
param->letters = 0;
|
||||
local_54 = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
for (local_40 = 0;
|
||||
(local_40 < local_54 &&
|
||||
(local_4C != param->candidates[local_40]));
|
||||
local_40 = local_40 + 1) {
|
||||
}
|
||||
if ((local_40 == local_54) &&
|
||||
(Zi8_814833F0(param, local_4C, ZI_WORK) == 0)) {
|
||||
param->candidates[local_54] = local_4C;
|
||||
local_54 = local_54 + 1;
|
||||
param->count = param->count + 1;
|
||||
bVar2 = param->letters + 1;
|
||||
param->letters = bVar2;
|
||||
if (bVar2 < param->maxCandidates) {
|
||||
goto LAB_000110E8;
|
||||
}
|
||||
Zi8_814834AC(param, &local_50, &local_54, &local_57, ZI_WORK);
|
||||
param->count = local_54;
|
||||
param->letters = local_54;
|
||||
if (param->maxCandidates <= local_54) {
|
||||
if (*options == 0) {
|
||||
uVar6 = local_54;
|
||||
goto LAB_000114C4;
|
||||
}
|
||||
local_3C = local_3C + local_54;
|
||||
if (*(ziS32*)(options + 0xC) <= (ziS32)local_3C) {
|
||||
uVar6 = *(ziU32*)(options + 0xC);
|
||||
goto LAB_000114C4;
|
||||
}
|
||||
param->count = 0;
|
||||
param->letters = 0;
|
||||
local_54 = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
LAB_000110E8:
|
||||
for (; (*pbVar7 & 0x40) == 0; pbVar7 = pbVar7 + 2) {
|
||||
}
|
||||
local_52 = param->wordCharCount;
|
||||
LAB_00011114:
|
||||
local_52 = local_52 + -1;
|
||||
local_53 = 1;
|
||||
pbVar7 = pbVar7 + 2;
|
||||
if ((*pbVar7 & 0x80) != 0) {
|
||||
goto LAB_00011124;
|
||||
}
|
||||
goto LAB_00010D44;
|
||||
}
|
||||
}
|
||||
LAB_00011124:
|
||||
local_34 = local_3C;
|
||||
if (local_54 != 0) {
|
||||
Zi8_814834AC(param, &local_50, &local_54, &local_57, ZI_WORK);
|
||||
uVar6 = local_34;
|
||||
if ((*options != 0) &&
|
||||
(local_3C = local_3C + local_54, uVar6 = local_3C,
|
||||
*(ziS32*)(options + 0xC) <= (ziS32)local_3C)) {
|
||||
uVar6 = *(ziU32*)(options + 0xC);
|
||||
goto LAB_000114C4;
|
||||
}
|
||||
local_34 = uVar6;
|
||||
param->count = local_54;
|
||||
param->letters = local_54;
|
||||
}
|
||||
if (param->elementCount < 10) {
|
||||
if ((param->elementCount == 0) || (*options != 0)) {
|
||||
local_56 = 1;
|
||||
} else {
|
||||
local_56 = 0;
|
||||
}
|
||||
local_4A = Zi8GetTableCount(ZI8_LANG_KO, 9, ZI_WORK);
|
||||
Zi8_81483118(param, local_28.bytes);
|
||||
do {
|
||||
for (local_30 = 0; local_30 < (ziS32)(ziU32)local_4A; local_30 = local_30 + 1) {
|
||||
bVar1 = ZI8_TRUE;
|
||||
local_44 = iVar4 + local_30 * 9;
|
||||
local_55 = 0;
|
||||
if (1 < param->elementCount) {
|
||||
for (local_55 = 0;
|
||||
(ziU32)local_55 < (ziU32)((ziS32)(ziU32)param->elementCount >> 1);
|
||||
local_55 = local_55 + 1) {
|
||||
if (local_28.bytes[local_55] != *(ziU8*)(local_44 + local_55)) {
|
||||
bVar1 = ZI8_FALSE;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
if ((bVar1 && ((param->elementCount & 1) != 0)) &&
|
||||
((local_28.bytes[local_55] & 0xF0) !=
|
||||
(*(ziU8*)(local_44 + local_55) & 0xF0))) {
|
||||
bVar1 = ZI8_FALSE;
|
||||
}
|
||||
if (bVar1) {
|
||||
bVar2 = local_56;
|
||||
if ((param->elementCount & 1) == 0) {
|
||||
if ((*(ziU8*)(local_44 + local_55) & 0xF0) == 0) {
|
||||
if (local_56 == 0) {
|
||||
goto LAB_000113B0;
|
||||
}
|
||||
bVar2 = *options;
|
||||
}
|
||||
if (bVar2 == 0) {
|
||||
goto LAB_00011478;
|
||||
}
|
||||
} else {
|
||||
if ((*(ziU8*)(local_44 + local_55) & 0xF) != 0) {
|
||||
goto LAB_000113AC;
|
||||
}
|
||||
if (local_56 != 0) {
|
||||
bVar2 = *options;
|
||||
goto LAB_000113AC;
|
||||
}
|
||||
}
|
||||
LAB_000113AC:
|
||||
if (bVar2 == 0) {
|
||||
goto LAB_00011478;
|
||||
}
|
||||
LAB_000113B0:
|
||||
if (local_50 == 0) {
|
||||
if (*options == 0) {
|
||||
param->candidates[local_54] =
|
||||
(ziU16)((*(ziU8*)(local_30 * 9 + iVar4 + 7) << 8) |
|
||||
*(ziU8*)(local_30 * 9 + iVar4 + 8));
|
||||
local_54 = local_54 + 1;
|
||||
bVar2 = param->letters + 1;
|
||||
param->letters = bVar2;
|
||||
if (param->maxCandidates <= bVar2) {
|
||||
uVar6 = param->letters;
|
||||
goto LAB_000114C4;
|
||||
}
|
||||
} else {
|
||||
local_34 = local_34 + 1;
|
||||
if (*(ziS32*)(options + 0xC) <= (ziS32)local_34) {
|
||||
uVar6 = *(ziU32*)(options + 0xC);
|
||||
goto LAB_000114C4;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
local_50 = local_50 + -1;
|
||||
}
|
||||
}
|
||||
LAB_00011478:
|
||||
;
|
||||
}
|
||||
local_56 = local_56 + 1;
|
||||
} while (local_56 < 2);
|
||||
uVar6 = local_34;
|
||||
if (*options == 0) {
|
||||
uVar6 = param->letters;
|
||||
}
|
||||
} else {
|
||||
param->letters = 0;
|
||||
uVar6 = 0;
|
||||
}
|
||||
}
|
||||
LAB_000114C4:
|
||||
return uVar6;
|
||||
}
|
||||
@@ -55,7 +55,7 @@ typedef struct AXFX_REVERBHI_EXP {
|
||||
f32 sendGain; // 0x144
|
||||
} AXFX_REVERBHI_EXP;
|
||||
|
||||
u32 AXFXReverbHiExpGetMemSize(const AXFX_REVERBHI_EXP* fx);
|
||||
u32 AXFXReverbHiExpGetMemSize(AXFX_REVERBHI_EXP* fx);
|
||||
BOOL AXFXReverbHiExpInit(AXFX_REVERBHI_EXP* fx);
|
||||
void AXFXReverbHiExpShutdown(AXFX_REVERBHI_EXP* fx);
|
||||
BOOL AXFXReverbHiExpSettings(AXFX_REVERBHI_EXP* fx);
|
||||
|
||||
@@ -10,7 +10,16 @@ extern "C" {
|
||||
#endif
|
||||
|
||||
typedef struct _GXColor {
|
||||
#ifdef IPL_SYSTEM_COLOR_ALIGNMENT
|
||||
union {
|
||||
struct {
|
||||
u8 r, g, b, a;
|
||||
};
|
||||
u32 value;
|
||||
};
|
||||
#else
|
||||
u8 r, g, b, a; // 0x00
|
||||
#endif
|
||||
} GXColor;
|
||||
|
||||
typedef struct _GXColorS10 {
|
||||
|
||||
447
libs/RVL_SDK/src/axfx/AXFXReverbHiExp.c
Normal file
447
libs/RVL_SDK/src/axfx/AXFXReverbHiExp.c
Normal file
@@ -0,0 +1,447 @@
|
||||
#include <private/axfx.h>
|
||||
#include <revolution/AXFX.h>
|
||||
#include <revolution/MEM.h>
|
||||
#include <revolution/OS.h>
|
||||
|
||||
#include <math.h>
|
||||
#include <string.h>
|
||||
|
||||
static BOOL __AllocDelayLine(AXFX_REVERBHI_EXP* fx);
|
||||
static void __BzeroDelayLines(AXFX_REVERBHI_EXP* fx);
|
||||
static void __FreeDelayLine(AXFX_REVERBHI_EXP* fx);
|
||||
static BOOL __InitParams(AXFX_REVERBHI_EXP* fx);
|
||||
|
||||
static u32 __EarlySizeTable[8][3] = {{157, 479, 829}, {317, 809, 1117}, {479, 941, 1487}, {641, 1259, 1949},
|
||||
{797, 1667, 2579}, {967, 1901, 2903}, {1123, 2179, 3413}, {1279, 2477, 3889}};
|
||||
|
||||
static f32 __EarlyCoefTable[8][3] = {{0.4f, -1.0f, 0.3f}, {0.5f, -0.95f, 0.3f}, {0.6f, -0.9f, 0.3f}, {0.75f, -0.85f, 0.3f},
|
||||
{-0.9f, 0.8f, 0.3f}, {-1.0f, 0.7f, 0.3f}, {-1.0f, 0.7f, 0.3f}, {-1.0f, 0.7f, 0.3f}};
|
||||
|
||||
static u32 __FilterSizeTable[7][8] = {{1789, 1999, 2333, 433, 149, 47, 73, 67}, {149, 293, 449, 251, 103, 47, 73, 67},
|
||||
{947, 1361, 1531, 433, 137, 47, 73, 67}, {1279, 1531, 1973, 509, 149, 47, 73, 67},
|
||||
{1531, 1847, 2297, 563, 179, 47, 73, 67}, {1823, 2357, 2693, 571, 137, 47, 73, 67},
|
||||
{1823, 2357, 2693, 571, 179, 47, 73, 67}};
|
||||
|
||||
u32 AXFXReverbHiExpGetMemSize(AXFX_REVERBHI_EXP* fx) {
|
||||
u32 sum = 0;
|
||||
u32 i = 0;
|
||||
|
||||
sum += __EarlySizeTable[7][2];
|
||||
sum += (int)(fx->preDelayTimeMax * 32000);
|
||||
|
||||
for (i = 0; i < 5; i++) {
|
||||
sum += __FilterSizeTable[6][i];
|
||||
}
|
||||
|
||||
sum *= 3;
|
||||
|
||||
for (i = 5; i < 8; i++) {
|
||||
sum += __FilterSizeTable[6][i];
|
||||
}
|
||||
|
||||
sum *= 4;
|
||||
|
||||
return sum;
|
||||
}
|
||||
|
||||
BOOL AXFXReverbHiExpInit(AXFX_REVERBHI_EXP* fx) {
|
||||
u32 ch, i;
|
||||
BOOL result = TRUE;
|
||||
BOOL mask = OSDisableInterrupts();
|
||||
|
||||
fx->active = 1;
|
||||
|
||||
if (fx->preDelayTimeMax < 0.0f) {
|
||||
AXFXReverbHiExpShutdown(fx);
|
||||
OSRestoreInterrupts(mask);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
fx->earlyMaxLength = __EarlySizeTable[8 - 1][2];
|
||||
fx->preDelayMaxLength = (u32)(fx->preDelayTimeMax * 32000);
|
||||
|
||||
for (i = 0; i < 3; i++) {
|
||||
fx->combMaxLength[i] = __FilterSizeTable[6][i];
|
||||
}
|
||||
|
||||
for (i = 0; i < 2; i++) {
|
||||
fx->allpassMaxLength[i] = __FilterSizeTable[6][3 + i];
|
||||
}
|
||||
|
||||
for (ch = 0; ch < 3; ch++) {
|
||||
fx->lastAllpassMaxLength[ch] = __FilterSizeTable[6][5 + ch];
|
||||
}
|
||||
|
||||
result = __AllocDelayLine(fx);
|
||||
if (result == FALSE) {
|
||||
AXFXReverbHiExpShutdown(fx);
|
||||
OSRestoreInterrupts(mask);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
__BzeroDelayLines(fx);
|
||||
result = __InitParams(fx);
|
||||
if (result == FALSE) {
|
||||
AXFXReverbHiExpShutdown(fx);
|
||||
OSRestoreInterrupts(mask);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
fx->active &= ~1;
|
||||
OSRestoreInterrupts(mask);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
BOOL AXFXReverbHiExpSettings(AXFX_REVERBHI_EXP* fx) {
|
||||
BOOL mask = OSDisableInterrupts();
|
||||
fx->active = fx->active | 1;
|
||||
AXFXReverbHiExpShutdown(fx);
|
||||
|
||||
if (!AXFXReverbHiExpInit(fx)) {
|
||||
AXFXReverbHiExpShutdown(fx);
|
||||
OSRestoreInterrupts(mask);
|
||||
return FALSE;
|
||||
} else {
|
||||
fx->active |= 2;
|
||||
fx->active &= ~1;
|
||||
OSRestoreInterrupts(mask);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void AXFXReverbHiExpShutdown(AXFX_REVERBHI_EXP* fx) {
|
||||
BOOL mask = OSDisableInterrupts();
|
||||
fx->active |= 1;
|
||||
__FreeDelayLine(fx);
|
||||
OSRestoreInterrupts(mask);
|
||||
}
|
||||
|
||||
void AXFXReverbHiExpCallback(AXFX_BUFFERUPDATE* bufferUpdate, AXFX_REVERBHI_EXP* fx) {
|
||||
u32 ch, i;
|
||||
u32 samp;
|
||||
s32* input[3];
|
||||
f32 data;
|
||||
f32 output[3];
|
||||
f32* earlyLine;
|
||||
f32 earlyOut;
|
||||
f32* preDelayLine;
|
||||
f32 preDelayOut;
|
||||
f32 filterOut;
|
||||
f32* combLine;
|
||||
f32 combOutOne;
|
||||
f32* allpass;
|
||||
f32 outTmp;
|
||||
f32 allpassIn;
|
||||
f32 allpassCoef;
|
||||
f32 lpfOut;
|
||||
f32 lpfCoef1;
|
||||
f32 lpfCoef2;
|
||||
f32 fusedOut[3];
|
||||
f32 fusedGain;
|
||||
f32 crosstalkGain;
|
||||
f32 crosstalkL;
|
||||
f32 crosstalkR;
|
||||
f32 crosstalkS;
|
||||
s32* inBusData[3];
|
||||
s32* outBusData[3];
|
||||
|
||||
if (fx->active != 0) {
|
||||
fx->active &= ~2;
|
||||
return;
|
||||
}
|
||||
|
||||
input[0] = bufferUpdate->left;
|
||||
input[1] = bufferUpdate->right;
|
||||
input[2] = bufferUpdate->surround;
|
||||
|
||||
if (fx->busIn != NULL) {
|
||||
inBusData[0] = fx->busIn->left;
|
||||
inBusData[1] = fx->busIn->right;
|
||||
inBusData[2] = fx->busIn->surround;
|
||||
}
|
||||
|
||||
if (fx->busOut != NULL) {
|
||||
outBusData[0] = fx->busOut->left;
|
||||
outBusData[1] = fx->busOut->right;
|
||||
outBusData[2] = fx->busOut->surround;
|
||||
}
|
||||
|
||||
lpfCoef1 = 1.0f - fx->lpfCoef;
|
||||
lpfCoef2 = fx->lpfCoef;
|
||||
allpassCoef = fx->allpassCoef;
|
||||
fusedGain = fx->fusedGain * 0.6f;
|
||||
crosstalkGain = fx->crosstalk * 0.5f;
|
||||
|
||||
for (samp = 0; samp < 96; samp++) {
|
||||
for (ch = 0; ch < 3; ch++) {
|
||||
if (fx->busIn != NULL) {
|
||||
data = (f32)(*(input[ch]) + *(inBusData[ch]++));
|
||||
} else {
|
||||
data = (f32)(*input[ch]);
|
||||
}
|
||||
|
||||
earlyLine = fx->earlyLine[ch];
|
||||
earlyOut = earlyLine[fx->earlyPos[0]] * fx->earlyCoef[0] + earlyLine[fx->earlyPos[1]] * fx->earlyCoef[1] +
|
||||
earlyLine[fx->earlyPos[2]] * fx->earlyCoef[2];
|
||||
|
||||
earlyLine[fx->earlyPos[2]] = data;
|
||||
|
||||
if (fx->preDelayLength != 0) {
|
||||
preDelayLine = fx->preDelayLine[ch];
|
||||
preDelayOut = preDelayLine[fx->preDelayPos];
|
||||
preDelayLine[fx->preDelayPos] = data;
|
||||
} else {
|
||||
preDelayOut = data;
|
||||
}
|
||||
|
||||
filterOut = 0.0f;
|
||||
for (i = 0; i < 3; i++) {
|
||||
combLine = fx->combLine[ch][i];
|
||||
combOutOne = combLine[fx->combPos[i]];
|
||||
combLine[fx->combPos[i]] = preDelayOut + (combOutOne * fx->combCoef[i]);
|
||||
filterOut += combOutOne;
|
||||
}
|
||||
|
||||
for (i = 0; i < 2; i++) {
|
||||
allpass = fx->allpassLine[ch][i];
|
||||
outTmp = allpass[fx->allpassPos[i]];
|
||||
allpassIn = filterOut + outTmp * allpassCoef;
|
||||
allpass[fx->allpassPos[i]] = allpassIn;
|
||||
filterOut = outTmp - allpassIn * allpassCoef;
|
||||
}
|
||||
|
||||
lpfOut = lpfCoef1 * filterOut + lpfCoef2 * fx->lastLpfOut[ch];
|
||||
fx->lastLpfOut[ch] = lpfOut;
|
||||
allpass = fx->lastAllpassLine[ch];
|
||||
outTmp = allpass[fx->lastAllpassPos[ch]];
|
||||
allpassIn = lpfOut + outTmp * allpassCoef;
|
||||
allpass[fx->lastAllpassPos[ch]] = allpassIn;
|
||||
fusedOut[ch] = outTmp - allpassIn * allpassCoef;
|
||||
if (++fx->lastAllpassPos[ch] >= fx->lastAllpassLength[ch]) {
|
||||
fx->lastAllpassPos[ch] = 0;
|
||||
}
|
||||
|
||||
fusedOut[ch] *= fusedGain;
|
||||
fusedOut[ch] += earlyOut;
|
||||
}
|
||||
|
||||
crosstalkL = fusedOut[1] + fusedOut[2];
|
||||
crosstalkR = fusedOut[0] + fusedOut[2];
|
||||
crosstalkS = fusedOut[0] + fusedOut[1];
|
||||
|
||||
output[0] = fusedOut[0] + crosstalkL * crosstalkGain;
|
||||
output[1] = fusedOut[1] + crosstalkR * crosstalkGain;
|
||||
output[2] = fusedOut[2] + crosstalkS * crosstalkGain;
|
||||
|
||||
*(input[0]++) = (s32)(output[0] * fx->outGain);
|
||||
*(input[1]++) = (s32)(output[1] * fx->outGain);
|
||||
*(input[2]++) = (s32)(output[2] * fx->outGain);
|
||||
|
||||
if (fx->busOut != NULL) {
|
||||
*(outBusData[0]++) = (s32)(output[0] * fx->sendGain);
|
||||
*(outBusData[1]++) = (s32)(output[1] * fx->sendGain);
|
||||
*(outBusData[2]++) = (s32)(output[2] * fx->sendGain);
|
||||
}
|
||||
|
||||
for (i = 0; i < 3; i++) {
|
||||
if (++fx->earlyPos[i] >= fx->earlyLength) {
|
||||
fx->earlyPos[i] = 0;
|
||||
}
|
||||
}
|
||||
|
||||
if (fx->preDelayLength != 0) {
|
||||
if (++fx->preDelayPos >= fx->preDelayLength) {
|
||||
fx->preDelayPos = 0;
|
||||
}
|
||||
}
|
||||
|
||||
for (i = 0; i < 3; i++) {
|
||||
if (++fx->combPos[i] >= fx->combLength[i]) {
|
||||
fx->combPos[i] = 0;
|
||||
}
|
||||
}
|
||||
|
||||
for (i = 0; i < 2; i++) {
|
||||
if (++fx->allpassPos[i] >= fx->allpassLength[i]) {
|
||||
fx->allpassPos[i] = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static BOOL __AllocDelayLine(AXFX_REVERBHI_EXP* fx) {
|
||||
u32 ch, i;
|
||||
|
||||
for (ch = 0; ch < 3; ch++) {
|
||||
fx->earlyLine[ch] = (f32*)__AXFXAlloc(sizeof(f32) * fx->earlyMaxLength);
|
||||
if (fx->earlyLine[ch] == NULL)
|
||||
return FALSE;
|
||||
|
||||
if (fx->preDelayMaxLength != 0) {
|
||||
fx->preDelayLine[ch] = (f32*)__AXFXAlloc(sizeof(f32) * fx->preDelayMaxLength);
|
||||
if (fx->preDelayLine[ch] == NULL)
|
||||
return FALSE;
|
||||
} else {
|
||||
fx->preDelayLine[ch] = NULL;
|
||||
}
|
||||
|
||||
for (i = 0; i < 3; i++) {
|
||||
fx->combLine[ch][i] = (f32*)__AXFXAlloc(sizeof(f32) * fx->combMaxLength[i]);
|
||||
if (fx->combLine[ch][i] == NULL)
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
for (i = 0; i < 2; i++) {
|
||||
fx->allpassLine[ch][i] = (f32*)__AXFXAlloc(sizeof(f32) * fx->allpassMaxLength[i]);
|
||||
if (fx->allpassLine[ch][i] == NULL)
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
fx->lastAllpassLine[ch] = (f32*)__AXFXAlloc(sizeof(f32) * fx->lastAllpassMaxLength[ch]);
|
||||
if (fx->lastAllpassLine[ch] == NULL)
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static void __BzeroDelayLines(AXFX_REVERBHI_EXP* fx) {
|
||||
u32 ch, i;
|
||||
|
||||
for (ch = 0; ch < 3; ch++) {
|
||||
if (fx->earlyLine[ch] != NULL) {
|
||||
memset(fx->earlyLine[ch], 0, sizeof(f32) * fx->earlyMaxLength);
|
||||
}
|
||||
|
||||
if (fx->preDelayLine[ch] != NULL) {
|
||||
memset(fx->preDelayLine[ch], 0, sizeof(f32) * fx->preDelayMaxLength);
|
||||
}
|
||||
|
||||
for (i = 0; i < 3; i++) {
|
||||
if (fx->combLine[ch][i] != NULL) {
|
||||
memset(fx->combLine[ch][i], 0, sizeof(f32) * fx->combMaxLength[i]);
|
||||
}
|
||||
}
|
||||
|
||||
for (i = 0; i < 2; i++) {
|
||||
if (fx->allpassLine[ch][i] != NULL) {
|
||||
memset(fx->allpassLine[ch][i], 0, sizeof(f32) * fx->allpassMaxLength[i]);
|
||||
}
|
||||
}
|
||||
|
||||
if (fx->lastAllpassLine[ch] != NULL) {
|
||||
memset(fx->lastAllpassLine[ch], 0, sizeof(f32) * fx->lastAllpassMaxLength[ch]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void __FreeDelayLine(AXFX_REVERBHI_EXP* fx) {
|
||||
u32 ch, i;
|
||||
|
||||
for (ch = 0; ch < 3; ch++) {
|
||||
if (fx->earlyLine[ch] != NULL) {
|
||||
__AXFXFree(fx->earlyLine[ch]);
|
||||
fx->earlyLine[ch] = NULL;
|
||||
}
|
||||
|
||||
if (fx->preDelayLine[ch] != NULL) {
|
||||
__AXFXFree(fx->preDelayLine[ch]);
|
||||
fx->preDelayLine[ch] = NULL;
|
||||
}
|
||||
|
||||
for (i = 0; i < 3; i++) {
|
||||
if (fx->combLine[ch][i] != NULL) {
|
||||
__AXFXFree(fx->combLine[ch][i]);
|
||||
fx->combLine[ch][i] = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
for (i = 0; i < 2; i++) {
|
||||
if (fx->allpassLine[ch][i] != NULL) {
|
||||
__AXFXFree(fx->allpassLine[ch][i]);
|
||||
fx->allpassLine[ch][i] = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
if (fx->lastAllpassLine[ch] != NULL) {
|
||||
__AXFXFree(fx->lastAllpassLine[ch]);
|
||||
fx->lastAllpassLine[ch] = NULL;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
DECOMP_FORCE_LITERAL(AXFXReverbHiExp_c, -3.0f, 10.0);
|
||||
|
||||
static BOOL __InitParams(AXFX_REVERBHI_EXP* reverb) {
|
||||
u32 ch, i;
|
||||
|
||||
if (reverb->earlyMode >= 8)
|
||||
return FALSE;
|
||||
|
||||
if (reverb->preDelayTime < 0.0f || reverb->preDelayTime > reverb->preDelayTimeMax)
|
||||
return FALSE;
|
||||
|
||||
if (reverb->fusedMode >= 6)
|
||||
return FALSE;
|
||||
|
||||
if (reverb->fusedTime < 0.0f)
|
||||
return FALSE;
|
||||
|
||||
if (reverb->coloration < 0.0f || reverb->coloration > 1.0f)
|
||||
return FALSE;
|
||||
|
||||
if (reverb->damping < 0.0f || reverb->damping > 1.0f)
|
||||
return FALSE;
|
||||
|
||||
if (reverb->crosstalk < 0.0f || reverb->crosstalk > 1.0f)
|
||||
return FALSE;
|
||||
|
||||
if (reverb->earlyGain < 0.0f || reverb->earlyGain > 1.0f)
|
||||
return FALSE;
|
||||
|
||||
if (reverb->fusedGain < 0.0f || reverb->fusedGain > 1.0f)
|
||||
return FALSE;
|
||||
|
||||
if (reverb->outGain < 0.0f || reverb->outGain > 1.0f)
|
||||
return FALSE;
|
||||
|
||||
if (reverb->sendGain < 0.0f || reverb->sendGain > 1.0f)
|
||||
return FALSE;
|
||||
|
||||
reverb->earlyLength = __EarlySizeTable[reverb->earlyMode][2];
|
||||
for (i = 0; i < 3; i++) {
|
||||
reverb->earlyPos[i] = reverb->earlyLength - __EarlySizeTable[reverb->earlyMode][i];
|
||||
reverb->earlyCoef[i] = __EarlyCoefTable[reverb->earlyMode][i] * reverb->earlyGain * 0.6f;
|
||||
}
|
||||
|
||||
reverb->preDelayPos = 0;
|
||||
reverb->preDelayLength = (u32)(reverb->preDelayTime * (f32)32000);
|
||||
|
||||
for (i = 0; i < 3; i++) {
|
||||
reverb->combPos[i] = 0;
|
||||
reverb->combLength[i] = __FilterSizeTable[reverb->fusedMode][i];
|
||||
reverb->combCoef[i] = pow(10.0f, (-3.0f * (f32)(reverb->combLength[i]) / (f32)(reverb->fusedTime * 32000)));
|
||||
}
|
||||
|
||||
for (i = 0; i < 2; i++) {
|
||||
reverb->allpassPos[i] = 0;
|
||||
reverb->allpassLength[i] = __FilterSizeTable[reverb->fusedMode][3 + i];
|
||||
}
|
||||
|
||||
for (ch = 0; ch < 3; ch++) {
|
||||
reverb->lastAllpassPos[ch] = 0;
|
||||
reverb->lastAllpassLength[ch] = __FilterSizeTable[reverb->fusedMode][5 + ch];
|
||||
}
|
||||
|
||||
reverb->allpassCoef = reverb->coloration;
|
||||
reverb->lpfCoef = 1.0f - reverb->damping;
|
||||
if (reverb->lpfCoef > 0.95f)
|
||||
reverb->lpfCoef = 0.95f;
|
||||
|
||||
for (ch = 0; ch < 3; ch++) {
|
||||
reverb->lastLpfOut[ch] = 0.0f;
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
@@ -1,35 +1,55 @@
|
||||
#include <revolution/verdefs.h>
|
||||
|
||||
#include <revolution/os.h>
|
||||
|
||||
#include <private/nand.h>
|
||||
#include <revolution/nand.h>
|
||||
|
||||
#include <private/es.h>
|
||||
|
||||
#include <errno.h>
|
||||
#include <stddef.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
SDKDefineVersion(CNTCACHE, "Apr 20 2010", "14:15:28");
|
||||
char lbl_81693350[0xd0] = {
|
||||
0x3c, 0x3c, 0x20, 0x52, 0x56, 0x4c, 0x5f, 0x53, 0x44, 0x4b, 0x20, 0x2d, 0x20, 0x43, 0x4e, 0x54,
|
||||
0x43, 0x41, 0x43, 0x48, 0x45, 0x20, 0x09, 0x72, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x20, 0x62,
|
||||
0x75, 0x69, 0x6c, 0x64, 0x3a, 0x20, 0x41, 0x70, 0x72, 0x20, 0x32, 0x30, 0x20, 0x32, 0x30, 0x31,
|
||||
0x30, 0x20, 0x31, 0x34, 0x3a, 0x31, 0x35, 0x3a, 0x32, 0x38, 0x20, 0x28, 0x30, 0x78, 0x34, 0x31,
|
||||
0x39, 0x39, 0x5f, 0x36, 0x30, 0x38, 0x33, 0x31, 0x29, 0x20, 0x3e, 0x3e, 0x00, 0x00, 0x00, 0x00,
|
||||
0x2f, 0x73, 0x68, 0x61, 0x72, 0x65, 0x64, 0x32, 0x2f, 0x63, 0x6e, 0x74, 0x63, 0x61, 0x63, 0x68,
|
||||
0x65, 0x2e, 0x74, 0x78, 0x74, 0x00, 0x00, 0x00, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x54, 0x69,
|
||||
0x74, 0x6c, 0x65, 0x20, 0x00, 0x00, 0x00, 0x00, 0x25, 0x30, 0x31, 0x36, 0x6c, 0x6c, 0x78, 0x20,
|
||||
0x00, 0x00, 0x00, 0x00, 0x2f, 0x74, 0x6d, 0x70, 0x2f, 0x63, 0x6e, 0x74, 0x63, 0x61, 0x63, 0x68,
|
||||
0x65, 0x2e, 0x74, 0x78, 0x74, 0x00, 0x00, 0x00, 0x2f, 0x73, 0x68, 0x61, 0x72, 0x65, 0x64, 0x32,
|
||||
0x00, 0x00, 0x00, 0x00, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e,
|
||||
0x74, 0x20, 0x00, 0x00, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x54, 0x69, 0x74, 0x6c, 0x65, 0x00,
|
||||
0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x00, 0x00, 0x00
|
||||
};
|
||||
char lbl_81693420[0x16] = {
|
||||
0x2f, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x2f, 0x25, 0x30, 0x38, 0x78, 0x2f, 0x25, 0x30, 0x38, 0x78,
|
||||
0x2f, 0x64, 0x61, 0x74, 0x61, 0x00,
|
||||
};
|
||||
const char* __CNTCACHEVersion = lbl_81693350;
|
||||
char lbl_816985DC[3] = {0x20, 0x0a, 0x00};
|
||||
|
||||
extern void _savegpr_23();
|
||||
extern void _restgpr_23();
|
||||
extern void _savegpr_26();
|
||||
extern void _restgpr_26();
|
||||
|
||||
OSMutex _CNTCACHEMutex;
|
||||
|
||||
int _CNTCACHEUnused816997A8;
|
||||
long long _CNTCACHEUnused816997A8;
|
||||
int _CNTCACHEUnused816997A4;
|
||||
|
||||
BOOL _CNTCACHEInitialized;
|
||||
|
||||
void CNTCACHEClear();
|
||||
BOOL _CNTCACHEIsTitleRemovable(ESTitleId titleId);
|
||||
void _CNTCACHEDeleteTitle();
|
||||
void _CNTCACHEDeleteContent();
|
||||
|
||||
|
||||
void CNTCACHEInit(int unk0, int unk1) {
|
||||
if (_CNTCACHEInitialized == FALSE) {
|
||||
BOOL old;
|
||||
|
||||
OSRegisterVersion(GetVersion(CNTCACHE));
|
||||
OSRegisterVersion(__CNTCACHEVersion);
|
||||
|
||||
OSInitMutex(&_CNTCACHEMutex);
|
||||
ES_InitLib();
|
||||
@@ -41,87 +61,492 @@ void CNTCACHEInit(int unk0, int unk1) {
|
||||
CNTCACHEClear();
|
||||
|
||||
_CNTCACHEUnused816997A4 = unk0;
|
||||
_CNTCACHEUnused816997A8 = unk1;
|
||||
*((int*)&_CNTCACHEUnused816997A8) = unk1;
|
||||
}
|
||||
asm void CNTCACHEClear() {
|
||||
clrlwi r11, r1, 0x1b
|
||||
mr r12, r1
|
||||
subfic r11, r11, -0x500
|
||||
stwux r1, r1, r11
|
||||
mflr r0
|
||||
mr r11, r12
|
||||
stw r0, 4(r12)
|
||||
bl _savegpr_23
|
||||
lis r30, lbl_81693350@ha
|
||||
lis r3, _CNTCACHEMutex@ha
|
||||
addi r30, r30, lbl_81693350@l
|
||||
li r29, 0
|
||||
addi r3, r3, _CNTCACHEMutex@l
|
||||
bl OSLockMutex
|
||||
addi r3, r30, 0x50
|
||||
addi r4, r1, 0x24
|
||||
li r27, 1
|
||||
li r5, 3
|
||||
bl NANDPrivateOpen
|
||||
cmpwi r3, -0xc
|
||||
mr r28, r3
|
||||
bne L_d4
|
||||
li r28, 0
|
||||
b L_28c
|
||||
L_d4:
|
||||
cmpwi r3, 0
|
||||
beq L_e0
|
||||
b L_268
|
||||
L_e0:
|
||||
addi r3, r1, 0x24
|
||||
addi r4, r1, 0x20
|
||||
bl NANDGetLength
|
||||
cmpwi r3, 0
|
||||
mr r28, r3
|
||||
beq L_fc
|
||||
b L_268
|
||||
L_fc:
|
||||
li r26, 0
|
||||
li r31, 0
|
||||
b L_25c
|
||||
L_108:
|
||||
lwz r25, 0x20(r1)
|
||||
cmplwi r25, 0x400
|
||||
ble L_118
|
||||
li r25, 0x400
|
||||
L_118:
|
||||
addi r24, r1, 0xc0
|
||||
addi r0, r25, 0x1f
|
||||
addi r3, r1, 0x24
|
||||
mr r4, r24
|
||||
rlwinm r5, r0, 0, 0, 0x1a
|
||||
bl NANDRead
|
||||
cmpw r3, r25
|
||||
beq L_140
|
||||
li r28, -0x14b3
|
||||
b L_268
|
||||
L_140:
|
||||
mr r4, r24
|
||||
li r28, 0
|
||||
mtctr r25
|
||||
cmplwi r25, 0
|
||||
ble L_16c
|
||||
L_154:
|
||||
lbz r0, 0(r4)
|
||||
cmpwi r0, 0xa
|
||||
bne L_164
|
||||
b L_170
|
||||
L_164:
|
||||
addi r4, r4, 1
|
||||
bdnz L_154
|
||||
L_16c:
|
||||
li r4, 0
|
||||
L_170:
|
||||
cmpwi r4, 0
|
||||
bne L_224
|
||||
li r28, 0
|
||||
b L_268
|
||||
b L_224
|
||||
L_184:
|
||||
stb r31, 0(r4)
|
||||
subf r23, r24, r4
|
||||
mr r3, r24
|
||||
la r4, lbl_816985DC
|
||||
bl strtok
|
||||
cmpwi r3, 0
|
||||
mr r29, r3
|
||||
beq L_1d4
|
||||
addi r4, r30, 0xb4
|
||||
bl strcmp
|
||||
cmpwi r3, 0
|
||||
bne L_1bc
|
||||
bl _CNTCACHEDeleteTitle
|
||||
b L_1d4
|
||||
L_1bc:
|
||||
mr r3, r29
|
||||
addi r4, r30, 0xc0
|
||||
bl strcmp
|
||||
cmpwi r3, 0
|
||||
bne L_1d4
|
||||
bl _CNTCACHEDeleteContent
|
||||
L_1d4:
|
||||
lwz r0, 0x20(r1)
|
||||
addi r23, r23, 1
|
||||
add r24, r24, r23
|
||||
subf r0, r23, r0
|
||||
subf r25, r23, r25
|
||||
mr r4, r24
|
||||
stw r0, 0x20(r1)
|
||||
add r26, r26, r23
|
||||
mtctr r25
|
||||
cmplwi r25, 0
|
||||
ble L_218
|
||||
L_200:
|
||||
lbz r0, 0(r4)
|
||||
cmpwi r0, 0xa
|
||||
bne L_210
|
||||
b L_21c
|
||||
L_210:
|
||||
addi r4, r4, 1
|
||||
bdnz L_200
|
||||
L_218:
|
||||
li r4, 0
|
||||
L_21c:
|
||||
cmpwi r4, 0
|
||||
beq L_22c
|
||||
L_224:
|
||||
cmpwi r25, 0
|
||||
bgt L_184
|
||||
L_22c:
|
||||
lwz r0, 0x20(r1)
|
||||
cmpwi r0, 0
|
||||
beq L_25c
|
||||
mr r4, r26
|
||||
addi r3, r1, 0x24
|
||||
li r5, 0
|
||||
bl NANDSeek
|
||||
cmplw r3, r26
|
||||
beq L_258
|
||||
li r28, -0x14b3
|
||||
b L_268
|
||||
L_258:
|
||||
li r28, 0
|
||||
L_25c:
|
||||
lwz r0, 0x20(r1)
|
||||
cmpwi r0, 0
|
||||
bne L_108
|
||||
L_268:
|
||||
addi r3, r1, 0x24
|
||||
bl NANDClose
|
||||
addi r3, r30, 0x50
|
||||
li r29, 0
|
||||
bl NANDPrivateDelete
|
||||
cmpwi r3, 0
|
||||
addi r3, r30, 0x84
|
||||
bl NANDPrivateDelete
|
||||
cmpwi r3, 0
|
||||
L_28c:
|
||||
cmpwi r29, 0
|
||||
beq L_29c
|
||||
addi r3, r1, 0x24
|
||||
bl NANDClose
|
||||
L_29c:
|
||||
cmpwi r27, 0
|
||||
beq L_2b0
|
||||
lis r3, _CNTCACHEMutex@ha
|
||||
addi r3, r3, _CNTCACHEMutex@l
|
||||
bl OSUnlockMutex
|
||||
L_2b0:
|
||||
mr r3, r28
|
||||
lwz r10, 0(r1)
|
||||
mr r11, r10
|
||||
bl _restgpr_23
|
||||
lwz r0, 4(r10)
|
||||
mtlr r0
|
||||
mr r1, r10
|
||||
blr
|
||||
}
|
||||
|
||||
void _CNTCACHEDeleteTitle() {
|
||||
char* tok = strtok(NULL, " \n");
|
||||
while (tok != NULL) {
|
||||
ESTitleId titleId;
|
||||
|
||||
errno = 0;
|
||||
titleId = strtoull(tok, NULL, 16);
|
||||
|
||||
if (errno == 0 && NANDTitleIdHi(titleId) != 0x00000001) {
|
||||
BOOL result = _CNTCACHEIsTitleRemovable(titleId);
|
||||
if (result == TRUE) {
|
||||
ES_DeleteTitle(titleId);
|
||||
} else if (result == FALSE) {
|
||||
ES_DeleteTitleContent(titleId);
|
||||
}
|
||||
}
|
||||
tok = strtok(NULL, " \n");
|
||||
}
|
||||
asm void _CNTCACHEDeleteTitle() {
|
||||
stwu r1, -0x20(r1)
|
||||
mflr r0
|
||||
li r3, 0
|
||||
la r4, lbl_816985DC
|
||||
stw r0, 0x24(r1)
|
||||
stw r31, 0x1c(r1)
|
||||
stw r30, 0x18(r1)
|
||||
stw r29, 0x14(r1)
|
||||
stw r28, 0x10(r1)
|
||||
bl strtok
|
||||
li r30, 0
|
||||
li r31, -1
|
||||
b L_370
|
||||
L_304:
|
||||
stw r30, errno(r0)
|
||||
li r4, 0
|
||||
li r5, 0x10
|
||||
bl strtoull
|
||||
lwz r0, errno(r0)
|
||||
mr r28, r4
|
||||
mr r29, r3
|
||||
cmpwi r0, 0
|
||||
bne L_364
|
||||
and r0, r3, r31
|
||||
cmplwi r0, 1
|
||||
beq L_364
|
||||
bl _CNTCACHEIsTitleRemovable
|
||||
cmpwi r3, 1
|
||||
bne L_350
|
||||
mr r4, r28
|
||||
mr r3, r29
|
||||
bl ES_DeleteTitle
|
||||
b L_364
|
||||
L_350:
|
||||
cmpwi r3, 0
|
||||
bne L_364
|
||||
mr r4, r28
|
||||
mr r3, r29
|
||||
bl ES_DeleteTitleContent
|
||||
L_364:
|
||||
li r3, 0
|
||||
la r4, lbl_816985DC
|
||||
bl strtok
|
||||
L_370:
|
||||
cmpwi r3, 0
|
||||
bne L_304
|
||||
lwz r0, 0x24(r1)
|
||||
lwz r31, 0x1c(r1)
|
||||
lwz r30, 0x18(r1)
|
||||
lwz r29, 0x14(r1)
|
||||
lwz r28, 0x10(r1)
|
||||
mtlr r0
|
||||
addi r1, r1, 0x20
|
||||
blr
|
||||
}
|
||||
|
||||
static int GetSavePath(ESTitleId titleId) {
|
||||
char nandPath[64] ALIGN32;
|
||||
|
||||
s32 ret;
|
||||
u32 usedBlocks = 1;
|
||||
u32 usedINodes = 1;
|
||||
|
||||
snprintf(nandPath, (int)sizeof(nandPath), "/title/%08x/%08x/data", NANDTitleIdHi(titleId), NANDTitleIdLo(titleId));
|
||||
ret = NANDSecretGetUsage(nandPath, &usedBlocks, &usedINodes);
|
||||
|
||||
if (ret == NAND_RESULT_NOEXISTS) {
|
||||
ret = 2;
|
||||
} else if (ret >= NAND_RESULT_OK) {
|
||||
if (usedINodes == 1 && usedBlocks == 0) {
|
||||
ret = 1;
|
||||
} else {
|
||||
ret = 0;
|
||||
}
|
||||
}
|
||||
return ret;
|
||||
asm int _CNTCACHEIsTitleRemovable(ESTitleId titleId) {
|
||||
clrlwi r11, r1, 0x1b
|
||||
mr r12, r1
|
||||
subfic r11, r11, -0x2100
|
||||
stwux r1, r1, r11
|
||||
mflr r0
|
||||
lis r5, lbl_81693420@ha
|
||||
stw r0, 4(r12)
|
||||
li r0, 1
|
||||
addi r5, r5, lbl_81693420@l
|
||||
stw r31, -4(r12)
|
||||
stw r30, -8(r12)
|
||||
mr r30, r3
|
||||
addi r3, r1, 0x40
|
||||
stw r29, -0xc(r12)
|
||||
mr r29, r4
|
||||
li r4, -1
|
||||
stw r0, 0x20(r1)
|
||||
and r6, r30, r4
|
||||
and r7, r29, r4
|
||||
li r4, 0x40
|
||||
stw r0, 0x24(r1)
|
||||
crclr 4*cr1+eq
|
||||
bl snprintf
|
||||
addi r3, r1, 0x40
|
||||
addi r4, r1, 0x20
|
||||
addi r5, r1, 0x24
|
||||
bl NANDSecretGetUsage
|
||||
cmpwi r3, -0xc
|
||||
mr r4, r3
|
||||
bne L_418
|
||||
li r4, 2
|
||||
b L_444
|
||||
L_418:
|
||||
cmpwi r3, 0
|
||||
blt L_444
|
||||
lwz r0, 0x24(r1)
|
||||
cmplwi r0, 1
|
||||
bne L_440
|
||||
lwz r0, 0x20(r1)
|
||||
cmpwi r0, 0
|
||||
bne L_440
|
||||
li r4, 1
|
||||
b L_444
|
||||
L_440:
|
||||
li r4, 0
|
||||
L_444:
|
||||
cmpwi r4, 1
|
||||
bne L_4bc
|
||||
mr r4, r29
|
||||
mr r3, r30
|
||||
addi r31, r1, 0x80
|
||||
addi r6, r1, 0x28
|
||||
li r5, 0
|
||||
bl ES_GetTmdView
|
||||
cmpwi r3, 0
|
||||
beq L_470
|
||||
b L_4c0
|
||||
L_470:
|
||||
lwz r0, 0x28(r1)
|
||||
cmplwi r0, 0x2060
|
||||
ble L_484
|
||||
li r3, -0x400
|
||||
b L_4c0
|
||||
L_484:
|
||||
mr r4, r29
|
||||
mr r3, r30
|
||||
mr r5, r31
|
||||
addi r6, r1, 0x28
|
||||
bl ES_GetTmdView
|
||||
cmpwi r3, 0
|
||||
beq L_4a4
|
||||
b L_4c0
|
||||
L_4a4:
|
||||
lhz r0, 0xd8(r1)
|
||||
rlwinm. r0, r0, 0x18, 0x18, 0x1f
|
||||
bne L_4b8
|
||||
li r4, 1
|
||||
b L_4bc
|
||||
L_4b8:
|
||||
li r4, 0
|
||||
L_4bc:
|
||||
mr r3, r4
|
||||
L_4c0:
|
||||
lwz r10, 0(r1)
|
||||
lwz r0, 4(r10)
|
||||
lwz r31, -4(r10)
|
||||
lwz r30, -8(r10)
|
||||
lwz r29, -0xc(r10)
|
||||
mtlr r0
|
||||
mr r1, r10
|
||||
blr
|
||||
}
|
||||
|
||||
static int GetTmdView(ESTitleId titleId, ESTmdView* tmdView) {
|
||||
s32 ret;
|
||||
u32* tmdSize = NULL;
|
||||
|
||||
ret = ES_GetTmdView(titleId, NULL, tmdSize);
|
||||
if (ret != ES_ERR_OK) {
|
||||
return ret;
|
||||
}
|
||||
if (*tmdSize > OSRoundUp32B(sizeof(ESTmdView))) {
|
||||
ret = -1024;
|
||||
goto out;
|
||||
}
|
||||
ret = ES_GetTmdView(titleId, tmdView, tmdSize);
|
||||
out:
|
||||
return ret;
|
||||
}
|
||||
|
||||
int _CNTCACHEIsTitleRemovable(ESTitleId titleId) {
|
||||
ESTmdView tmd ALIGN32;
|
||||
s32 ret = -1;
|
||||
|
||||
ret = GetSavePath(titleId);
|
||||
if (ret == 1) {
|
||||
ret = GetTmdView(titleId, &tmd);
|
||||
if (ret != ES_ERR_OK) {
|
||||
return ret;
|
||||
}
|
||||
|
||||
if (tmd.head.titleVersion >> 8 == 0) {
|
||||
ret = 1;
|
||||
} else {
|
||||
ret = 0;
|
||||
}
|
||||
goto out;
|
||||
}
|
||||
|
||||
out:
|
||||
return ret;
|
||||
asm void _CNTCACHEDeleteContent() {
|
||||
clrlwi r11, r1, 0x1b
|
||||
mr r12, r1
|
||||
subfic r11, r11, -0x2100
|
||||
stwux r1, r1, r11
|
||||
mflr r0
|
||||
mr r11, r12
|
||||
stw r0, 4(r12)
|
||||
bl _savegpr_26
|
||||
li r3, 0
|
||||
la r4, lbl_816985DC
|
||||
bl strtok
|
||||
li r31, 0
|
||||
li r4, 0
|
||||
stw r31, errno(r0)
|
||||
li r5, 0x10
|
||||
bl strtoull
|
||||
lwz r0, errno(r0)
|
||||
mr r29, r4
|
||||
mr r30, r3
|
||||
cmpwi r0, 0
|
||||
bne L_708
|
||||
li r0, -1
|
||||
and r5, r3, r0
|
||||
addis r0, r5, -1
|
||||
cmplwi r0, 5
|
||||
bne L_708
|
||||
addi r28, r1, 0x80
|
||||
addi r6, r1, 0x28
|
||||
li r5, 0
|
||||
bl ES_GetTmdView
|
||||
cmpwi r3, -0x6a
|
||||
beq L_708
|
||||
cmpwi r3, 0
|
||||
bne L_708
|
||||
mr r4, r29
|
||||
mr r3, r30
|
||||
mr r5, r28
|
||||
addi r6, r1, 0x28
|
||||
bl ES_GetTmdView
|
||||
cmpwi r3, 0
|
||||
bne L_708
|
||||
lwz r3, 0x94(r1)
|
||||
rlwinm. r0, r3, 0, 0x1c, 0x1c
|
||||
beq L_6f0
|
||||
rlwinm. r0, r3, 0, 0x1b, 0x1b
|
||||
beq L_6f0
|
||||
li r3, 0
|
||||
la r4, lbl_816985DC
|
||||
bl strtok
|
||||
li r26, 1
|
||||
lis r27, lbl_81693420@ha
|
||||
b L_6e8
|
||||
L_5b0:
|
||||
stw r31, errno(r0)
|
||||
li r4, 0
|
||||
li r5, 0xa
|
||||
bl strtoul
|
||||
lwz r0, errno(r0)
|
||||
cmpwi r0, 0
|
||||
bne L_6dc
|
||||
cmplwi r3, 0x1fe
|
||||
bgt L_6dc
|
||||
lhz r0, 0xda(r1)
|
||||
li r4, 0
|
||||
mtctr r0
|
||||
cmplwi r0, 0
|
||||
ble L_6dc
|
||||
L_5e8:
|
||||
add r5, r28, r4
|
||||
lhz r0, 0x60(r5)
|
||||
cmplw r3, r0
|
||||
bne L_6d4
|
||||
lhz r0, 0x62(r5)
|
||||
rlwinm. r0, r0, 0, 0x10, 0x10
|
||||
bne L_6dc
|
||||
lwz r5, 0x5c(r5)
|
||||
mr r4, r29
|
||||
mr r3, r30
|
||||
bl ES_DeleteContent
|
||||
cmpwi r3, 0
|
||||
bne L_6dc
|
||||
mr r4, r29
|
||||
mr r3, r30
|
||||
addi r6, r1, 0x2c
|
||||
li r5, 0
|
||||
bl ES_ListTitleContentsOnCard
|
||||
cmpwi r3, 0
|
||||
bne L_6dc
|
||||
lwz r0, 0x2c(r1)
|
||||
cmpwi r0, 0
|
||||
bne L_6dc
|
||||
li r0, -1
|
||||
stw r26, 0x20(r1)
|
||||
addi r3, r1, 0x40
|
||||
addi r5, r27, lbl_81693420@l
|
||||
stw r26, 0x24(r1)
|
||||
and r6, r30, r0
|
||||
and r7, r29, r0
|
||||
li r4, 0x40
|
||||
crclr 4*cr1+eq
|
||||
bl snprintf
|
||||
addi r3, r1, 0x40
|
||||
addi r4, r1, 0x20
|
||||
addi r5, r1, 0x24
|
||||
bl NANDSecretGetUsage
|
||||
cmpwi r3, -0xc
|
||||
mr r0, r3
|
||||
bne L_690
|
||||
li r0, 2
|
||||
b L_6bc
|
||||
L_690:
|
||||
cmpwi r3, 0
|
||||
blt L_6bc
|
||||
lwz r0, 0x24(r1)
|
||||
cmplwi r0, 1
|
||||
bne L_6b8
|
||||
lwz r0, 0x20(r1)
|
||||
cmpwi r0, 0
|
||||
bne L_6b8
|
||||
li r0, 1
|
||||
b L_6bc
|
||||
L_6b8:
|
||||
li r0, 0
|
||||
L_6bc:
|
||||
cmpwi r0, 1
|
||||
bne L_6dc
|
||||
mr r4, r29
|
||||
mr r3, r30
|
||||
bl ES_DeleteTitle
|
||||
b L_6dc
|
||||
L_6d4:
|
||||
addi r4, r4, 0x10
|
||||
bdnz L_5e8
|
||||
L_6dc:
|
||||
li r3, 0
|
||||
la r4, lbl_816985DC
|
||||
bl strtok
|
||||
L_6e8:
|
||||
cmpwi r3, 0
|
||||
bne L_5b0
|
||||
L_6f0:
|
||||
lwz r5, 0x28(r1)
|
||||
addi r3, r1, 0x80
|
||||
li r4, 0
|
||||
addi r0, r5, 0x1f
|
||||
rlwinm r5, r0, 0, 0, 0x1a
|
||||
bl memset
|
||||
L_708:
|
||||
lwz r10, 0(r1)
|
||||
mr r11, r10
|
||||
bl _restgpr_26
|
||||
lwz r0, 4(r10)
|
||||
mtlr r0
|
||||
mr r1, r10
|
||||
blr
|
||||
}
|
||||
|
||||
8
libs/RVL_SDK/src/fa/api/FAFclose.c
Normal file
8
libs/RVL_SDK/src/fa/api/FAFclose.c
Normal file
@@ -0,0 +1,8 @@
|
||||
#include <revolution/fa.h>
|
||||
|
||||
extern s32 pfstub_fclose(FAFILE* stream);
|
||||
|
||||
FAError FAFclose(FAFILE* stream) {
|
||||
s32 error = pfstub_fclose(stream);
|
||||
return (-error | error) >> 31;
|
||||
}
|
||||
8
libs/RVL_SDK/src/fa/api/FAFinfo.c
Normal file
8
libs/RVL_SDK/src/fa/api/FAFinfo.c
Normal file
@@ -0,0 +1,8 @@
|
||||
#include <revolution/fa.h>
|
||||
|
||||
extern s32 pfstub_finfo(FAFILE* stream, FAFileInfo* info);
|
||||
|
||||
FAError FAFinfo(FAFILE* stream, FAFileInfo* info) {
|
||||
s32 error = pfstub_finfo(stream, info);
|
||||
return (-error | error) >> 31;
|
||||
}
|
||||
7
libs/RVL_SDK/src/fa/api/FAFread.c
Normal file
7
libs/RVL_SDK/src/fa/api/FAFread.c
Normal file
@@ -0,0 +1,7 @@
|
||||
#include <revolution/fa.h>
|
||||
|
||||
extern size_t pfstub_fread(void* buffer, size_t size, size_t count, FAFILE* stream);
|
||||
|
||||
size_t FAFread(void* buffer, size_t size, size_t count, FAFILE* stream) {
|
||||
return pfstub_fread(buffer, size, count, stream);
|
||||
}
|
||||
7
libs/RVL_SDK/src/fa/api/FAFwrite.c
Normal file
7
libs/RVL_SDK/src/fa/api/FAFwrite.c
Normal file
@@ -0,0 +1,7 @@
|
||||
#include <revolution/fa.h>
|
||||
|
||||
extern size_t pfstub_fwrite(void* buffer, size_t size, size_t count, FAFILE* stream);
|
||||
|
||||
size_t FAFwrite(void* buffer, size_t size, size_t count, FAFILE* stream) {
|
||||
return pfstub_fwrite(buffer, size, count, stream);
|
||||
}
|
||||
2
libs/RVL_SDK/src/fa/api/FAInitDiskManager.c
Normal file
2
libs/RVL_SDK/src/fa/api/FAInitDiskManager.c
Normal file
@@ -0,0 +1,2 @@
|
||||
int FADiskInitializedPadding;
|
||||
int FADiskInitialized;
|
||||
127
libs/RVL_SDK/src/fa/pf_api_util.c
Normal file
127
libs/RVL_SDK/src/fa/pf_api_util.c
Normal file
@@ -0,0 +1,127 @@
|
||||
#include <revolution/fa/types.h>
|
||||
#include <revolution/types.h>
|
||||
|
||||
static s32 pf_error_to_api_error[] = {FA_ERR_SUCCESS, FA_ERR_EINVAL, FA_ERR_EINVAL, FA_ERR_ENOENT, FA_ERR_EBUSY, FA_ERR_ENOTEMPTY, FA_ERR_ENOSPC,
|
||||
FA_ERR_ENOEXEC, FA_ERR_EEXIST, FA_ERR_ENOEXEC, FA_ERR_EINVAL, FA_ERR_EWRTPROTECT, FA_ERR_ENOSYS, FA_ERR_ENOEXEC,
|
||||
FA_ERR_ENOEXEC, FA_ERR_ENOEXEC, FA_ERR_EACCES, FA_ERR_EIO, FA_ERR_ENOEXEC, FA_ERR_EACCES, FA_ERR_ENOENT,
|
||||
FA_ERR_ENFILE, FA_ERR_EMFILE, FA_ERR_EISDIR, FA_ERR_EACCES, FA_ERR_EPERM, FA_ERR_ENOEXEC, FA_ERR_ENOEXEC,
|
||||
FA_ERR_ENOEXEC, FA_ERR_ENOEXEC, FA_ERR_ENOMEM, FA_ERR_EINVAL, FA_ERR_EINVAL, FA_ERR_ENOEXEC, FA_ERR_ENOENT,
|
||||
FA_ERR_ENOEXEC, FA_ERR_ENOEXEC, FA_ERR_EFBIG, FA_ERR_EBADF, FA_ERR_ENOLCK};
|
||||
|
||||
s32 PFAPI_ParseOpenModeString(const char* mode_str) {
|
||||
s32 open_mode = 0;
|
||||
u32 i = 0;
|
||||
|
||||
if (mode_str == NULL) {
|
||||
open_mode = 10;
|
||||
return open_mode;
|
||||
}
|
||||
|
||||
switch (mode_str[i++]) {
|
||||
case 'r': {
|
||||
open_mode = 2;
|
||||
break;
|
||||
}
|
||||
case 'w': {
|
||||
open_mode = 1;
|
||||
break;
|
||||
}
|
||||
case 'a': {
|
||||
open_mode = 4;
|
||||
break;
|
||||
}
|
||||
default: {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
if (mode_str[i] == 'b') {
|
||||
i++;
|
||||
}
|
||||
switch (mode_str[i++]) {
|
||||
case 0: {
|
||||
return open_mode;
|
||||
}
|
||||
case 't':
|
||||
default: {
|
||||
return 0;
|
||||
}
|
||||
case '+': {
|
||||
switch (mode_str[i]) {
|
||||
case 0: {
|
||||
return open_mode | 8;
|
||||
}
|
||||
default: {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
s32 PFAPI_convertError(s32 err) {
|
||||
if (err == 0) {
|
||||
return 0;
|
||||
}
|
||||
if (err == -1) {
|
||||
return -1;
|
||||
}
|
||||
if (err > 0 && err < 0xA0) {
|
||||
return pf_error_to_api_error[err];
|
||||
}
|
||||
if (err == 0x1000) {
|
||||
err = FA_ERR_EIO;
|
||||
}
|
||||
return err;
|
||||
}
|
||||
|
||||
s32 PFAPI_convertDriverError(s32 err) {
|
||||
if (err == 0) {
|
||||
return 0;
|
||||
}
|
||||
if (err <= 0) {
|
||||
return err;
|
||||
}
|
||||
if ((u32)err < 0xA0) {
|
||||
err = 1;
|
||||
}
|
||||
return err;
|
||||
}
|
||||
|
||||
s32 PFAPI_convertReturnValue(s32 err) {
|
||||
if (err == 0) {
|
||||
return 0;
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
s32 PFAPI_convertReturnValue4feof(s32 err) {
|
||||
if (err == 1) {
|
||||
return 1;
|
||||
}
|
||||
if (err == 0) {
|
||||
return 0;
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
void* PFAPI_convertReturnValue2NULL(s32 err, void* p_stream) {
|
||||
void* ret;
|
||||
if (err) {
|
||||
ret = NULL;
|
||||
} else {
|
||||
ret = p_stream;
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
s32 PFAPI_convertReturnValue4unmount(s32 err) {
|
||||
if (err == 0) {
|
||||
return 0;
|
||||
}
|
||||
if (err == 1) {
|
||||
return 1;
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
10
libs/RVL_SDK/src/fa/pf_closedir.c
Normal file
10
libs/RVL_SDK/src/fa/pf_closedir.c
Normal file
@@ -0,0 +1,10 @@
|
||||
typedef int s32;
|
||||
|
||||
extern s32 PFDIR_closedir(void* dir);
|
||||
extern s32 PFAPI_convertReturnValue(s32 err);
|
||||
|
||||
s32 pf2_closedir(void* dir) {
|
||||
s32 err = PFDIR_closedir(dir);
|
||||
err = PFAPI_convertReturnValue(err);
|
||||
return err;
|
||||
}
|
||||
1726
libs/RVL_SDK/src/fa/pf_dir.c
Normal file
1726
libs/RVL_SDK/src/fa/pf_dir.c
Normal file
File diff suppressed because it is too large
Load Diff
10
libs/RVL_SDK/src/fa/pf_errnum.c
Normal file
10
libs/RVL_SDK/src/fa/pf_errnum.c
Normal file
@@ -0,0 +1,10 @@
|
||||
#include <revolution/fa.h>
|
||||
|
||||
extern s32 PFVOL_errnum(void);
|
||||
extern s32 PFAPI_convertError(s32 error);
|
||||
|
||||
FAError pf2_errnum() {
|
||||
s32 error = PFVOL_errnum();
|
||||
error = PFAPI_convertError(error);
|
||||
return error;
|
||||
}
|
||||
7
libs/RVL_SDK/src/fa/pf_fatfs.c
Normal file
7
libs/RVL_SDK/src/fa/pf_fatfs.c
Normal file
@@ -0,0 +1,7 @@
|
||||
#include <revolution/types.h>
|
||||
|
||||
extern s32 PFVOL_InitModule(u32 config, void* param);
|
||||
|
||||
s32 PFFATFS_initializeFATFS(u32 config, void* param) {
|
||||
return PFVOL_InitModule(config, param);
|
||||
}
|
||||
10
libs/RVL_SDK/src/fa/pf_fclose.c
Normal file
10
libs/RVL_SDK/src/fa/pf_fclose.c
Normal file
@@ -0,0 +1,10 @@
|
||||
#include <revolution/fa.h>
|
||||
|
||||
extern s32 PFFILE_fclose(FAFILE* stream);
|
||||
extern s32 PFAPI_convertReturnValue(s32 error);
|
||||
|
||||
FAError pf2_fclose(FAFILE* stream) {
|
||||
s32 error = PFFILE_fclose(stream);
|
||||
error = PFAPI_convertReturnValue(error);
|
||||
return error;
|
||||
}
|
||||
10
libs/RVL_SDK/src/fa/pf_feof.c
Normal file
10
libs/RVL_SDK/src/fa/pf_feof.c
Normal file
@@ -0,0 +1,10 @@
|
||||
#include <revolution/fa.h>
|
||||
|
||||
extern s32 PFFILE_feof(FAFILE* stream);
|
||||
extern s32 PFAPI_convertReturnValue4feof(s32 error);
|
||||
|
||||
FAError pf2_feof(FAFILE* stream) {
|
||||
s32 error = PFFILE_feof(stream);
|
||||
error = PFAPI_convertReturnValue4feof(error);
|
||||
return error;
|
||||
}
|
||||
10
libs/RVL_SDK/src/fa/pf_ferror.c
Normal file
10
libs/RVL_SDK/src/fa/pf_ferror.c
Normal file
@@ -0,0 +1,10 @@
|
||||
#include <revolution/fa.h>
|
||||
|
||||
extern s32 PFFILE_ferror(FAFILE* stream);
|
||||
extern s32 PFAPI_convertError(s32 error);
|
||||
|
||||
FAError pf2_ferror(FAFILE* stream) {
|
||||
s32 error = PFFILE_ferror(stream);
|
||||
error = PFAPI_convertError(error);
|
||||
return error;
|
||||
}
|
||||
2205
libs/RVL_SDK/src/fa/pf_file.c
Normal file
2205
libs/RVL_SDK/src/fa/pf_file.c
Normal file
File diff suppressed because it is too large
Load Diff
12
libs/RVL_SDK/src/fa/pf_flock.c
Normal file
12
libs/RVL_SDK/src/fa/pf_flock.c
Normal file
@@ -0,0 +1,12 @@
|
||||
#include <revolution/fa.h>
|
||||
|
||||
extern s32 PFFILE_flock(FAFILE* stream, s32 mode);
|
||||
extern s32 PFAPI_convertReturnValue(s32 error);
|
||||
|
||||
FAError pf2_flock(FAFILE* stream, s32 mode) {
|
||||
s32 error;
|
||||
mode |= 8;
|
||||
error = PFFILE_flock(stream, mode);
|
||||
error = PFAPI_convertReturnValue(error);
|
||||
return error;
|
||||
}
|
||||
9
libs/RVL_SDK/src/fa/pf_fread.c
Normal file
9
libs/RVL_SDK/src/fa/pf_fread.c
Normal file
@@ -0,0 +1,9 @@
|
||||
#include <revolution/fa.h>
|
||||
|
||||
extern s32 PFFILE_fread(void* buffer, size_t size, size_t count, FAFILE* stream, size_t* countRead);
|
||||
|
||||
size_t pf2_fread(void* buffer, size_t size, size_t count, FAFILE* stream) {
|
||||
size_t countRead;
|
||||
PFFILE_fread(buffer, size, count, stream, &countRead);
|
||||
return countRead;
|
||||
}
|
||||
10
libs/RVL_SDK/src/fa/pf_fsync.c
Normal file
10
libs/RVL_SDK/src/fa/pf_fsync.c
Normal file
@@ -0,0 +1,10 @@
|
||||
#include <revolution/fa.h>
|
||||
|
||||
extern s32 PFFILE_fsync(FAFILE* stream);
|
||||
extern s32 PFAPI_convertReturnValue(s32 error);
|
||||
|
||||
FAError pf2_fsync(FAFILE* stream) {
|
||||
s32 error = PFFILE_fsync(stream);
|
||||
error = PFAPI_convertReturnValue(error);
|
||||
return error;
|
||||
}
|
||||
9
libs/RVL_SDK/src/fa/pf_fwrite.c
Normal file
9
libs/RVL_SDK/src/fa/pf_fwrite.c
Normal file
@@ -0,0 +1,9 @@
|
||||
#include <revolution/fa.h>
|
||||
|
||||
extern s32 PFFILE_fwrite(void* buffer, size_t size, size_t count, FAFILE* stream, size_t* countWritten);
|
||||
|
||||
size_t pf2_fwrite(void* buffer, size_t size, size_t count, FAFILE* stream) {
|
||||
size_t countWritten;
|
||||
PFFILE_fwrite(buffer, size, count, stream, &countWritten);
|
||||
return countWritten;
|
||||
}
|
||||
2129
libs/RVL_SDK/src/fa/pf_volume.c
Normal file
2129
libs/RVL_SDK/src/fa/pf_volume.c
Normal file
File diff suppressed because it is too large
Load Diff
53
libs/RVL_SDK/src/fa/pf_w_api_util.c
Normal file
53
libs/RVL_SDK/src/fa/pf_w_api_util.c
Normal file
@@ -0,0 +1,53 @@
|
||||
#include <revolution/types.h>
|
||||
|
||||
s32 PFWAPI_ParseOpenModeString(const unsigned short* mode_str) {
|
||||
s32 open_mode = 0;
|
||||
u32 i = 0;
|
||||
|
||||
if (mode_str == NULL) {
|
||||
open_mode = 10;
|
||||
return open_mode;
|
||||
}
|
||||
|
||||
switch (mode_str[i++]) {
|
||||
case 'r': {
|
||||
open_mode = 2;
|
||||
break;
|
||||
}
|
||||
case 'w': {
|
||||
open_mode = 1;
|
||||
break;
|
||||
}
|
||||
case 'a': {
|
||||
open_mode = 4;
|
||||
break;
|
||||
}
|
||||
default: {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
if (mode_str[i] == 'b') {
|
||||
i++;
|
||||
}
|
||||
switch (mode_str[i++]) {
|
||||
case 0: {
|
||||
return open_mode;
|
||||
}
|
||||
case 't':
|
||||
default: {
|
||||
return 0;
|
||||
}
|
||||
case '+': {
|
||||
switch (mode_str[i]) {
|
||||
case 0: {
|
||||
return open_mode | 8;
|
||||
}
|
||||
default: {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
1824
libs/RVL_SDK/src/kpad/KPAD.c
Normal file
1824
libs/RVL_SDK/src/kpad/KPAD.c
Normal file
File diff suppressed because it is too large
Load Diff
@@ -66,6 +66,7 @@ void __OSEVStart();
|
||||
void __OSEVEnd();
|
||||
#define __OSEVSize ((u32)__OSEVEnd - (u32)__OSEVStart)
|
||||
void __OSEVSetNumber();
|
||||
void __OSDBJumpTarget();
|
||||
|
||||
void __DBVECTOR();
|
||||
|
||||
@@ -795,7 +796,7 @@ static asm void __OSDBJump() {
|
||||
#ifdef __MWERKS__
|
||||
nofralloc
|
||||
entry __OSDBJUMPSTART
|
||||
bla OS_ADDR_DB_INTEGRATOR_HOOK
|
||||
bla __OSDBJumpTarget
|
||||
entry __OSDBJUMPEND
|
||||
#endif // __MWERKS__
|
||||
// clang-format on
|
||||
@@ -831,6 +832,7 @@ entry __OSEVStart
|
||||
mflr r3
|
||||
stw r3, OSContext.lr(r4)
|
||||
mfctr r3
|
||||
entry __OSDBJumpTarget
|
||||
stw r3, OSContext.ctr(r4)
|
||||
mfxer r3
|
||||
stw r3, OSContext.xer(r4)
|
||||
|
||||
3519
libs/RVL_SDK/src/wad/wad.c
Normal file
3519
libs/RVL_SDK/src/wad/wad.c
Normal file
File diff suppressed because it is too large
Load Diff
2020
libs/RVL_SDK/src/wpad/WPADHIDParser.c
Normal file
2020
libs/RVL_SDK/src/wpad/WPADHIDParser.c
Normal file
File diff suppressed because it is too large
Load Diff
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user