Compare commits
76 Commits
agent/cont
...
agent/w092
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4e41a7ba9c | ||
|
|
d2d00f38ff | ||
|
|
33911687c7 | ||
|
|
03bc324c97 | ||
|
|
7e24906764 | ||
|
|
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 |
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
|
||||
@@ -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
|
||||
}
|
||||
|
||||
115
configure.py
115
configure.py
@@ -625,6 +625,7 @@ config.libs = [
|
||||
Object(Matching, "system/RIPL_BoardRecord.c"),
|
||||
Object(Matching, "system/iplSystem.cpp"),
|
||||
Object(NonMatching, "system/iplController.cpp"),
|
||||
Object(NonMatching, "system/iplControllerManager.cpp"),
|
||||
Object(Matching, "system/iplChannelManager.cpp"),
|
||||
Object(Matching, "system/iplChannelScriptManager.cpp"),
|
||||
Object(Matching, "system/iplNand.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,7 +693,7 @@ 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"),
|
||||
@@ -704,7 +705,7 @@ config.libs = [
|
||||
]
|
||||
),
|
||||
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,7 +739,7 @@ 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(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(Matching, "scene/channelEdit/iplChanAppBase.cpp"),
|
||||
Object(Matching, "scene/channelEdit/iplChanAppBox.cpp"),
|
||||
Object(Equivalent, "scene/channelEdit/iplChanAppEdit.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", [
|
||||
@@ -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
|
||||
@@ -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"),
|
||||
@@ -1015,7 +1016,7 @@ config.libs = [
|
||||
# RevoEX
|
||||
RevoEXLib("cdb", [
|
||||
Object(Matching, "cdb/cdb.c"),
|
||||
Object(Equivalent, "cdb/CDBConv.c"), # hmm
|
||||
Object(Matching, "cdb/CDBConv.c"), # hmm
|
||||
Object(Matching, "cdb/CDBDatabase.c"),
|
||||
Object(Matching, "cdb/CDBFileSystemUtils.c"),
|
||||
Object(Matching, "cdb/CDBFileSystem.c"),
|
||||
@@ -1023,10 +1024,10 @@ config.libs = [
|
||||
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,7 +1036,7 @@ config.libs = [
|
||||
]
|
||||
),
|
||||
RevoEXLib("ncd", [
|
||||
Object(NonMatching, "ncd/ncdsystem.c"),
|
||||
Object(Matching, "ncd/ncdsystem.c"),
|
||||
Object(NonMatching, "ncd/ncdsleep.c"),
|
||||
]
|
||||
),
|
||||
@@ -1085,7 +1086,7 @@ config.libs = [
|
||||
Object(NonMatching, "nwc24/NWC24DateParser.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"),
|
||||
@@ -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"),
|
||||
@@ -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"),
|
||||
@@ -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"),
|
||||
@@ -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"),
|
||||
@@ -1831,8 +1832,8 @@ 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(Matching, "fa/api/FAFread.c"),
|
||||
@@ -1843,7 +1844,7 @@ config.libs = [
|
||||
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"),
|
||||
@@ -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/eggAudioExpMgr.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"),
|
||||
@@ -1946,13 +1947,13 @@ config.libs = [
|
||||
Object(NonMatching, "MSL_Common_Embedded/ansi_fp.c"),
|
||||
Object(Matching, "MSL_Common/ctype.c"),
|
||||
Object(NonMatching, "MSL_Common/locale.c"),
|
||||
Object(Matching, "MSL_Common/arith.c"),
|
||||
Object(Matching, "MSL_Common/bsearch.c"),
|
||||
Object(Matching, "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"),
|
||||
@@ -1965,19 +1966,19 @@ config.libs = [
|
||||
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(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(Matching, "MSL_Common/math_sun.c", extra_cflags=["-Cpp_exceptions on"]),
|
||||
Object(NonMatching, "MSL_Common/extras.c"),
|
||||
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();
|
||||
|
||||
@@ -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) {}
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
#ifdef IPL_ADDRESS_EDIT_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,125 @@
|
||||
#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);
|
||||
|
||||
wchar_t mValue[0x102];
|
||||
wchar_t mName[0x0c];
|
||||
wchar_t mDisplayText[0x102];
|
||||
bool mbValidMail;
|
||||
bool mbNameNotEmpty;
|
||||
bool mbHasWiiNo;
|
||||
};
|
||||
|
||||
enum {
|
||||
@@ -25,8 +128,28 @@ 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;
|
||||
AddressEdit* mpCallbackOwner;
|
||||
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;
|
||||
|
||||
|
||||
@@ -7,12 +7,6 @@
|
||||
|
||||
namespace ipl {
|
||||
namespace scene {
|
||||
class MaxDate : public utility::Date {
|
||||
public:
|
||||
u8 padding[0x10];
|
||||
MaxDate(int year, int month, int day) : utility::Date(year, month, day) {}
|
||||
};
|
||||
|
||||
class Date : ::gui::EventHandler {
|
||||
public:
|
||||
typedef struct AnmFrame {
|
||||
@@ -88,7 +82,7 @@ namespace ipl {
|
||||
static const char* mscAnimPanes[ANIM_PANE_MAX];
|
||||
|
||||
static utility::Date mscMinDate;
|
||||
static MaxDate mscMaxDate;
|
||||
static utility::Date mscMaxDate;
|
||||
|
||||
nw4r::ut::Link mNode1; // 0x40
|
||||
nw4r::ut::Link mNode2; // 0x48
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -25,7 +25,7 @@ namespace ipl {
|
||||
void closeDatabase();
|
||||
|
||||
BOOL createNewRecord(const char* recordName, const char* recordFileType, const OSCalendarTime* dateTime, u32* gameCode, u16* makerCode,
|
||||
const math::VEC2& recordPos, u32 recordFlags, const NWC24FriendAddr& addr, NWC24FriendType addrType, u16 noReplyFlag,
|
||||
const math::VEC2& recordPos, u32 recordFlags, const NWC24FriendAddr& addr, u16 addrType, u16 noReplyFlag,
|
||||
const wchar_t* titleText, const wchar_t* bodyText, const void* faceData, const void** attachData, u32* attachSize,
|
||||
RBRAttachmentType* attachType);
|
||||
|
||||
|
||||
@@ -62,6 +62,200 @@ namespace ipl {
|
||||
};
|
||||
// clang-format on
|
||||
|
||||
#ifdef IPL_CONTROLLER_NATIVE_HIERARCHY
|
||||
#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
|
||||
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; })
|
||||
IPL_CONTROLLER_DEFAULT_VIRTUAL(int decide() const, { return 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 +312,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 +363,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 +422,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 +463,7 @@ namespace ipl {
|
||||
static EGG::Allocator* mpAllocator;
|
||||
u8 dummy[0x2F8];
|
||||
};
|
||||
#endif
|
||||
} // namespace controller
|
||||
} // namespace ipl
|
||||
|
||||
|
||||
@@ -54,6 +54,9 @@ 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 {
|
||||
|
||||
@@ -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);
|
||||
@@ -151,6 +153,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) {
|
||||
|
||||
@@ -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() {
|
||||
}
|
||||
|
||||
|
||||
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;
|
||||
}
|
||||
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;
|
||||
}
|
||||
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;
|
||||
}
|
||||
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);
|
||||
}
|
||||
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;
|
||||
}
|
||||
@@ -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);
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
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);
|
||||
|
||||
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;
|
||||
}
|
||||
@@ -22,12 +22,12 @@ char lbl_81693350[0xd0] = {
|
||||
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[0x18] = {
|
||||
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[4] = {0x20, 0x0a, 0x00};
|
||||
char lbl_816985DC[3] = {0x20, 0x0a, 0x00};
|
||||
|
||||
extern void _savegpr_23();
|
||||
extern void _restgpr_23();
|
||||
|
||||
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;
|
||||
}
|
||||
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;
|
||||
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;
|
||||
}
|
||||
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;
|
||||
}
|
||||
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;
|
||||
}
|
||||
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;
|
||||
}
|
||||
@@ -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)
|
||||
|
||||
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
@@ -46,7 +46,7 @@ void CDBRecordKeyGetKeyStr(CDBRecordKey* recordKey, char* keyString);
|
||||
|
||||
void CDBRecordKeySetSerialNumber(CDBRecordKey* recordKey, int serialNum);
|
||||
|
||||
void CDBRecordKeyCopy(CDBRecordKey* recordKey, CDBRecordKey* newRecordKey);
|
||||
void CDBRecordKeyCopy(CDBRecordKey* recordKey, const CDBRecordKey* newRecordKey);
|
||||
|
||||
BOOL CDBRecordKeyCompare(CDBRecordKey* recordKey1, CDBRecordKey* recordKey2);
|
||||
int CDBRecordKeyCompareByDate(CDBRecordKey* recordKey1, CDBRecordKey* recordKey2);
|
||||
|
||||
@@ -11,9 +11,7 @@ static char CDB_ATTR_MAGIC[] = "CDBFILE";
|
||||
static const u32 CDB_ATTR_VERSION = 0x02000000;
|
||||
static const u32 CDB_ATTR_VERSION_PADDING = 0;
|
||||
|
||||
static u32 s_seed = 0;
|
||||
|
||||
u32 CDBAttrGetDescOffset(CDBAttr* attr) {
|
||||
static u32 CDBAttrGetDescOffset(CDBAttr* attr) {
|
||||
return attr->buf.version == 1 ? 0x0D : offsetof(CDBAttrBuf, descLength);
|
||||
}
|
||||
|
||||
@@ -171,28 +169,18 @@ void CDBAttrGetKeyStr(CDBAttr* attr, char* keyString) {
|
||||
memcpy(keyString, attr->buf.keyString, CDB_ATTR_BUF_KEY_STRING_LEN);
|
||||
}
|
||||
|
||||
u32 CDBAttrSetIV(CDBAttr* attr, u32 seed);
|
||||
|
||||
void CDBAttrInitIV(CDBAttr* attr) {
|
||||
int i, j;
|
||||
u32 seed;
|
||||
static u32 s_seed = 0;
|
||||
int i;
|
||||
|
||||
if (s_seed == 0) {
|
||||
s_seed = OSGetTick();
|
||||
}
|
||||
|
||||
s_seed = CDBAttrSetIV(attr, s_seed);
|
||||
}
|
||||
|
||||
u32 CDBAttrSetIV(CDBAttr* attr, u32 seed) {
|
||||
int i, j;
|
||||
for (i = 0; i < 2; i++) {
|
||||
for (j = 0; j < 8; j++) {
|
||||
seed = 1566083941 * seed + 2531011;
|
||||
attr->buf.iv[(i * 8) + j] = (s8)(seed >> 16);
|
||||
}
|
||||
for (i = 0; i < CDB_ATTR_BUF_KEY_IV_LEN; i++) {
|
||||
s_seed = 1566083941 * s_seed + 2531011;
|
||||
attr->buf.iv[i] = (s8)(s_seed >> 16);
|
||||
}
|
||||
return seed;
|
||||
}
|
||||
|
||||
void CDBAttrGetIV(CDBAttr* attr, u8* iv) {
|
||||
|
||||
@@ -62,7 +62,7 @@ extern void _restgpr_25();
|
||||
extern void _restgpr_26();
|
||||
extern int atoi();
|
||||
#pragma section sdata_type ".sdata"
|
||||
extern u32 lbl_81698D8C;
|
||||
extern u32 CDBDatabaseWorkBuf;
|
||||
extern char lbl_8166B528[];
|
||||
extern char lbl_8166B550[];
|
||||
extern char lbl_8166B57C[];
|
||||
@@ -834,7 +834,7 @@ asm CDBErr CDBDatabaseSearchRecordLayer() {
|
||||
stw r0, 0x124(r1)
|
||||
addi r11, r1, 0x120
|
||||
bl _savegpr_14
|
||||
lwz r11, lbl_81698D8C(r0)
|
||||
lwz r11, CDBDatabaseWorkBuf(r0)
|
||||
mr r20, r5
|
||||
mr r22, r7
|
||||
mr r24, r9
|
||||
@@ -855,7 +855,7 @@ asm CDBErr CDBDatabaseSearchRecordLayer() {
|
||||
bl CDBConvDirStrToCDBDate
|
||||
lwz r0, 0x18(r19)
|
||||
mr r31, r3
|
||||
lwz r25, lbl_81698D8C(r0)
|
||||
lwz r25, CDBDatabaseWorkBuf(r0)
|
||||
addi r26, r3, 0x3b
|
||||
cmpwi r0, 0x0
|
||||
addi r0, r25, 0x994
|
||||
@@ -1327,7 +1327,7 @@ asm CDBErr CDBDatabaseSearchMinuteLayer() {
|
||||
stw r0, 0x174(r1)
|
||||
addi r11, r1, 0x170
|
||||
bl _savegpr_17
|
||||
lwz r10, lbl_81698D8C(r0)
|
||||
lwz r10, CDBDatabaseWorkBuf(r0)
|
||||
mr r21, r5
|
||||
mr r19, r3
|
||||
mr r20, r4
|
||||
@@ -1589,7 +1589,7 @@ asm CDBErr CDBDatabaseSearchHourLayer() {
|
||||
stw r0, 0xb4(r1)
|
||||
addi r11, r1, 0xb0
|
||||
bl _savegpr_18
|
||||
lwz r9, lbl_81698D8C(r0)
|
||||
lwz r9, CDBDatabaseWorkBuf(r0)
|
||||
mr r22, r5
|
||||
mr r20, r3
|
||||
mr r21, r4
|
||||
@@ -1846,7 +1846,7 @@ asm CDBErr CDBDatabaseSearchDayLayer() {
|
||||
stw r0, 0x104(r1)
|
||||
addi r11, r1, 0x100
|
||||
bl _savegpr_17
|
||||
lwz r8, lbl_81698D8C(r0)
|
||||
lwz r8, CDBDatabaseWorkBuf(r0)
|
||||
mr r19, r5
|
||||
mr r17, r3
|
||||
mr r18, r4
|
||||
@@ -2128,7 +2128,7 @@ asm CDBErr CDBDatabaseSearchMonthLayer() {
|
||||
stw r0, 0xb4(r1)
|
||||
addi r11, r1, 0xb0
|
||||
bl _savegpr_19
|
||||
lwz r7, lbl_81698D8C(r0)
|
||||
lwz r7, CDBDatabaseWorkBuf(r0)
|
||||
mr r23, r5
|
||||
mr r21, r3
|
||||
mr r22, r4
|
||||
@@ -2398,7 +2398,7 @@ asm CDBErr CDBDatabaseSearchYearLayer() {
|
||||
stw r0, 0x94(r1)
|
||||
addi r11, r1, 0x90
|
||||
bl _savegpr_22
|
||||
lwz r6, lbl_81698D8C(r0)
|
||||
lwz r6, CDBDatabaseWorkBuf(r0)
|
||||
and. r0, r3, r4
|
||||
mr r24, r3
|
||||
mr r25, r4
|
||||
@@ -2832,7 +2832,7 @@ asm CDBErr CDBDatabaseCleanUpEmptyDirectoriesRecord() {
|
||||
stw r0, 0x134(r1)
|
||||
addi r11, r1, 0x130
|
||||
bl _savegpr_25
|
||||
lwz r11, lbl_81698D8C(r0)
|
||||
lwz r11, CDBDatabaseWorkBuf(r0)
|
||||
mr r25, r4
|
||||
lwz r29, 0x138(r1)
|
||||
mr r26, r5
|
||||
@@ -2912,7 +2912,7 @@ asm CDBErr CDBDatabaseCleanUpEmptyDirectoriesType() {
|
||||
addi r11, r1, 0x140
|
||||
bl _savegpr_22
|
||||
li r0, 0x0
|
||||
lwz r11, lbl_81698D8C(r0)
|
||||
lwz r11, CDBDatabaseWorkBuf(r0)
|
||||
stw r0, 0x10(r1)
|
||||
mr r22, r3
|
||||
lwz r30, 0x148(r1)
|
||||
@@ -3010,7 +3010,7 @@ asm CDBErr CDBDatabaseCleanUpEmptyDirectoriesCode() {
|
||||
stw r0, 0x144(r1)
|
||||
addi r11, r1, 0x140
|
||||
bl _savegpr_23
|
||||
lwz r11, lbl_81698D8C(r0)
|
||||
lwz r11, CDBDatabaseWorkBuf(r0)
|
||||
li r0, 0x0
|
||||
mr r23, r3
|
||||
mr r24, r4
|
||||
@@ -3105,7 +3105,7 @@ asm CDBErr CDBDatabaseCleanUpEmptyDirectoriesMinute() {
|
||||
stw r0, 0x134(r1)
|
||||
addi r11, r1, 0x130
|
||||
bl _savegpr_24
|
||||
lwz r10, lbl_81698D8C(r0)
|
||||
lwz r10, CDBDatabaseWorkBuf(r0)
|
||||
li r0, 0x0
|
||||
mr r24, r3
|
||||
mr r25, r4
|
||||
@@ -3197,7 +3197,7 @@ asm CDBErr CDBDatabaseCleanUpEmptyDirectoriesHour() {
|
||||
stw r0, 0x134(r1)
|
||||
addi r11, r1, 0x130
|
||||
bl _savegpr_25
|
||||
lwz r9, lbl_81698D8C(r0)
|
||||
lwz r9, CDBDatabaseWorkBuf(r0)
|
||||
li r0, 0x0
|
||||
mr r25, r3
|
||||
mr r26, r4
|
||||
@@ -3286,7 +3286,7 @@ asm CDBErr CDBDatabaseCleanUpEmptyDirectoriesDay() {
|
||||
stw r0, 0x134(r1)
|
||||
addi r11, r1, 0x130
|
||||
bl _savegpr_26
|
||||
lwz r8, lbl_81698D8C(r0)
|
||||
lwz r8, CDBDatabaseWorkBuf(r0)
|
||||
li r0, 0x0
|
||||
mr r26, r3
|
||||
mr r27, r4
|
||||
@@ -3382,7 +3382,7 @@ asm CDBErr CDBDatabaseCleanUpEmptyDirectoriesMonth() {
|
||||
mr r28, r3
|
||||
mr r4, r28
|
||||
addi r3, r1, 0x10
|
||||
lwz r7, lbl_81698D8C(r0)
|
||||
lwz r7, CDBDatabaseWorkBuf(r0)
|
||||
stw r0, 0x8(r1)
|
||||
addi r31, r7, 0x3a78
|
||||
bl CDBConvYearStrToFullPath
|
||||
@@ -3460,7 +3460,7 @@ asm CDBErr CDBDatabaseCleanUpEmptyDirectories(CDBDatabase* database, CDBRecordLo
|
||||
stw r30, 0x18(r1)
|
||||
stw r29, 0x14(r1)
|
||||
mr r29, r4
|
||||
lwz r5, lbl_81698D8C(r0)
|
||||
lwz r5, CDBDatabaseWorkBuf(r0)
|
||||
addi r30, r5, 0x430c
|
||||
bne L_8148A13C
|
||||
li r3, 0x1
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
|
||||
#pragma push
|
||||
#pragma section sconst_type ".sdata"
|
||||
extern const char lbl_816979E8[1] = "/";
|
||||
extern const char lbl_816979E8[8] = "/\0\0\0\0\0\0\0";
|
||||
#pragma pop
|
||||
|
||||
void CDBFSConcatenatePath(char* path, const char* concatPath) {
|
||||
|
||||
@@ -29,23 +29,25 @@ BOOL CDBRecordKeyIsValid(CDBRecordKey* recordKey) {
|
||||
}
|
||||
|
||||
void CDBRecordKeyInit(CDBRecordKey* recordKey, CDBDate epoch, int gameCode, u16 makerCode, int serialNumber, char* fileType, int unk) {
|
||||
char typeStr[8];
|
||||
char gcStr[8];
|
||||
char mcStr[8];
|
||||
struct {
|
||||
char mcStr[4];
|
||||
char typeStr[8];
|
||||
char gcStr[8];
|
||||
} strings;
|
||||
|
||||
u32 typeLength;
|
||||
|
||||
CDBConvMCValueToMCStr(makerCode, mcStr);
|
||||
CDBConvGCValueToGCStr(gameCode, gcStr);
|
||||
CDBConvMCValueToMCStr(makerCode, strings.mcStr);
|
||||
CDBConvGCValueToGCStr(gameCode, strings.gcStr);
|
||||
|
||||
recordKey->wiiId = CDBGetWiiId();
|
||||
recordKey->location = unk;
|
||||
|
||||
typeLength = strlen(typeStr);
|
||||
strcpy(typeStr, fileType);
|
||||
CDBToLower(typeStr, typeLength);
|
||||
typeLength = strlen(fileType);
|
||||
strcpy(strings.typeStr, fileType);
|
||||
CDBToLower(((char*)strings.typeStr), typeLength);
|
||||
|
||||
sprintf(recordKey->keyString, "%010u_%s_%s_%03d.%s", epoch, gcStr, mcStr, serialNumber, typeStr);
|
||||
sprintf(recordKey->keyString, "%010u_%s_%s_%03d.%s", epoch, strings.gcStr, strings.mcStr, serialNumber, strings.typeStr);
|
||||
}
|
||||
|
||||
void CDBRecordKeySetSerialNumber(CDBRecordKey* recordKey, int serialNum) {
|
||||
@@ -72,9 +74,8 @@ void CDBRecordKeyInitFromFileName2(CDBRecordKey* recordKey, char* keyString, cha
|
||||
recordKey->location = CDB_FS_LOCATION_SD;
|
||||
}
|
||||
|
||||
void CDBRecordKeyCopy(CDBRecordKey* recordKey, CDBRecordKey* newRecordKey) {
|
||||
void CDBRecordKeyCopy(CDBRecordKey* recordKey, const CDBRecordKey* newRecordKey) {
|
||||
strcpy(recordKey->keyString, newRecordKey->keyString);
|
||||
|
||||
recordKey->wiiId = newRecordKey->wiiId;
|
||||
recordKey->location = newRecordKey->location;
|
||||
}
|
||||
@@ -136,6 +137,156 @@ CDBRecordKey* CDBRecordKeyArrayEnd(CDBRecordKeyArray* recordArray) {
|
||||
return recordArray->records + recordArray->size;
|
||||
}
|
||||
|
||||
#pragma dont_inline on
|
||||
|
||||
int CDBRecordKeyArrayDicInsertR(CDBRecordKeyArray* recordArray, CDBRecordKey* recordKey, int first, int last) {
|
||||
int index;
|
||||
int result;
|
||||
|
||||
if (first == last || first == last - 1) {
|
||||
result = CDBRecordKeyCompare(recordKey, recordArray->records + first);
|
||||
if (result < 0) {
|
||||
return first;
|
||||
}
|
||||
|
||||
result = CDBRecordKeyCompare(recordKey, recordArray->records + last);
|
||||
if (result >= 0) {
|
||||
last++;
|
||||
}
|
||||
return last;
|
||||
}
|
||||
|
||||
index = first + (last - first) / 2;
|
||||
result = CDBRecordKeyCompare(recordKey, recordArray->records + index);
|
||||
if (result < 0) {
|
||||
return CDBRecordKeyArrayDicInsertR(recordArray, recordKey, first, index);
|
||||
}
|
||||
if (result > 0) {
|
||||
return CDBRecordKeyArrayDicInsertR(recordArray, recordKey, index, last);
|
||||
}
|
||||
|
||||
return index;
|
||||
}
|
||||
|
||||
CDBRecordKey* CDBRecordKeyArrayDicInsert(CDBRecordKeyArray* recordArray, CDBRecordKey* recordKey) {
|
||||
int size = recordArray->size;
|
||||
int index;
|
||||
int moveCount;
|
||||
CDBRecordKey* record;
|
||||
|
||||
if (size == 0) {
|
||||
if (size < recordArray->capacity) {
|
||||
record = recordArray->records + size;
|
||||
CDBRecordKeyCopy(record, recordKey);
|
||||
recordArray->size++;
|
||||
}
|
||||
return recordKey;
|
||||
}
|
||||
|
||||
if (recordArray->capacity <= size) {
|
||||
if (recordArray->reverse == 1) {
|
||||
if (size != 0) {
|
||||
record = recordArray->records + (size - 1);
|
||||
} else {
|
||||
record = recordArray->records;
|
||||
}
|
||||
if (CDBRecordKeyCompare(record, recordKey) < 0) {
|
||||
return record;
|
||||
}
|
||||
|
||||
recordArray->size--;
|
||||
index = CDBRecordKeyArrayDicInsertR(recordArray, recordKey, 0, recordArray->size - 1);
|
||||
moveCount = (recordArray->size - index) * sizeof(CDBRecordKey);
|
||||
if (recordArray->capacity <= recordArray->size) {
|
||||
moveCount -= sizeof(CDBRecordKey);
|
||||
}
|
||||
if (moveCount > 0) {
|
||||
memmove((CDBRecordKey*)((char*)recordArray->records + (index + 1) * sizeof(CDBRecordKey)),
|
||||
(CDBRecordKey*)((char*)recordArray->records + index * sizeof(CDBRecordKey)),
|
||||
moveCount);
|
||||
}
|
||||
CDBRecordKeyCopy((CDBRecordKey*)((char*)recordArray->records + index * sizeof(CDBRecordKey)), recordKey);
|
||||
if (recordArray->size < recordArray->capacity) {
|
||||
recordArray->size++;
|
||||
}
|
||||
return (CDBRecordKey*)((char*)recordArray->records + index * sizeof(CDBRecordKey));
|
||||
}
|
||||
|
||||
record = recordArray->records;
|
||||
if (CDBRecordKeyCompare(recordKey, record) < 0) {
|
||||
return record;
|
||||
}
|
||||
|
||||
recordArray->size--;
|
||||
if (recordArray->size >= 0 && recordArray->capacity - 1 >= 0) {
|
||||
memmove(recordArray->records, recordArray->records + 1, recordArray->size * sizeof(CDBRecordKey));
|
||||
}
|
||||
index = CDBRecordKeyArrayDicInsertR(recordArray, recordKey, 0, recordArray->size - 1);
|
||||
moveCount = (recordArray->size - index) * sizeof(CDBRecordKey);
|
||||
if (recordArray->capacity <= recordArray->size) {
|
||||
moveCount -= sizeof(CDBRecordKey);
|
||||
}
|
||||
if (moveCount > 0) {
|
||||
memmove((CDBRecordKey*)((char*)recordArray->records + (index + 1) * sizeof(CDBRecordKey)),
|
||||
(CDBRecordKey*)((char*)recordArray->records + index * sizeof(CDBRecordKey)),
|
||||
moveCount);
|
||||
}
|
||||
CDBRecordKeyCopy((CDBRecordKey*)((char*)recordArray->records + index * sizeof(CDBRecordKey)), recordKey);
|
||||
if (recordArray->size < recordArray->capacity) {
|
||||
recordArray->size++;
|
||||
}
|
||||
return (CDBRecordKey*)((char*)recordArray->records + index * sizeof(CDBRecordKey));
|
||||
}
|
||||
|
||||
index = CDBRecordKeyArrayDicInsertR(recordArray, recordKey, 0, size - 1);
|
||||
moveCount = (recordArray->size - index) * sizeof(CDBRecordKey);
|
||||
if (recordArray->capacity <= recordArray->size) {
|
||||
moveCount -= sizeof(CDBRecordKey);
|
||||
}
|
||||
if (moveCount > 0) {
|
||||
memmove((CDBRecordKey*)((char*)recordArray->records + (index + 1) * sizeof(CDBRecordKey)),
|
||||
(CDBRecordKey*)((char*)recordArray->records + index * sizeof(CDBRecordKey)),
|
||||
moveCount);
|
||||
}
|
||||
CDBRecordKeyCopy((CDBRecordKey*)((char*)recordArray->records + index * sizeof(CDBRecordKey)), recordKey);
|
||||
if (recordArray->size < recordArray->capacity) {
|
||||
recordArray->size++;
|
||||
}
|
||||
return (CDBRecordKey*)((char*)recordArray->records + index * sizeof(CDBRecordKey));
|
||||
}
|
||||
|
||||
int CDBRecordKeyArrayDicFindR(CDBRecordKeyArray* recordArray, CDBRecordKey* recordKey, int first, int last) {
|
||||
int index;
|
||||
int result;
|
||||
|
||||
if (first == last || first == last - 1) {
|
||||
result = CDBRecordKeyCompare(recordKey, recordArray->records + first);
|
||||
if (result == 0) {
|
||||
return first;
|
||||
}
|
||||
|
||||
result = CDBRecordKeyCompare(recordKey, recordArray->records + last);
|
||||
if (result != 0) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
return last;
|
||||
}
|
||||
|
||||
index = first + (last - first) / 2;
|
||||
result = CDBRecordKeyCompare(recordKey, recordArray->records + index);
|
||||
if (result < 0) {
|
||||
return CDBRecordKeyArrayDicFindR(recordArray, recordKey, first, index);
|
||||
}
|
||||
if (result > 0) {
|
||||
return CDBRecordKeyArrayDicFindR(recordArray, recordKey, index, last);
|
||||
}
|
||||
|
||||
return index;
|
||||
}
|
||||
|
||||
#pragma dont_inline reset
|
||||
|
||||
CDBRecordKey* CDBRecordKeyArrayDicFind(CDBRecordKeyArray* recordArray, CDBRecordKey* recordKey) {
|
||||
int size = recordArray->size;
|
||||
int index;
|
||||
|
||||
@@ -9,19 +9,32 @@
|
||||
#include <revolution/dvd.h>
|
||||
#include <revolution/os.h>
|
||||
|
||||
typedef struct {
|
||||
u32 used;
|
||||
u8 padding[0xC00C];
|
||||
u32 flags;
|
||||
u32 unk;
|
||||
} CDBDatabaseInstanceWork;
|
||||
|
||||
static OSMutex s_mutex;
|
||||
static BOOL s_mutexInitialized = FALSE;
|
||||
|
||||
static BOOL s_fatalVFFlag = FALSE;
|
||||
|
||||
// This was likely a local originally, but oh well!
|
||||
s32 CDBPrintDebugLevel = CDB_VERBOSE_LEVEL_NONE;
|
||||
|
||||
static u8 s_cdbWiiId[OSRoundUp32B(CDB_WIIID_DAT_SIZE)] ALIGN32;
|
||||
static CDBDatabaseInstanceWork* s_databasePool;
|
||||
static u8* s_recordPool;
|
||||
u8* CDBDatabaseWorkBuf;
|
||||
static VFErr s_lastVFError;
|
||||
static s32 s_lastNANDError;
|
||||
|
||||
static u8 s_cdbWiiId[OSRoundUp32B(CDB_WIIID_DAT_SIZE)] ALIGN32;
|
||||
static u8* s_recordPool;
|
||||
extern void CDBDatabaseInstanceInit(void* instance, int flag, CDBDatabase* database);
|
||||
extern BOOL CDBDatabaseInstanceIsUsed(void* instance);
|
||||
extern void CDBRecordInstanceInit(void* instance, CDBRecord* record, int flag);
|
||||
extern BOOL CDBRecordInstanceIsUsed(void* instance);
|
||||
extern BOOL CDBRecordKeyCompare(CDBRecordKey* recordKey1, CDBRecordKey* recordKey2);
|
||||
|
||||
void MutexInitialized() {
|
||||
s_mutexInitialized = TRUE;
|
||||
@@ -35,6 +48,216 @@ void CDBUnlock() {
|
||||
OSUnlockMutex(&s_mutex);
|
||||
}
|
||||
|
||||
void CDBDatabaseInstancePoolInit(void* work) {
|
||||
u32* workPointer = (u32*)work;
|
||||
|
||||
s_databasePool = (CDBDatabaseInstanceWork*)workPointer;
|
||||
s_databasePool[0].used = 0;
|
||||
s_databasePool[1].used = 0;
|
||||
if (((u32)(workPointer + 0x7880) & 0x3f) != 0) {
|
||||
CDBReportWarn("割り当てられた領域が64バイトアライメントされていません(%d)\n", (u64)((u32)(workPointer + 0x7880) & 0x3f));
|
||||
}
|
||||
CDBCryptBufSysInit((CDBCryptBuf*)(workPointer + 0x7880));
|
||||
if (!s_mutexInitialized) {
|
||||
OSInitMutex(&s_mutex);
|
||||
}
|
||||
CDBDatabaseWorkBuf = (u8*)workPointer + 0x19660;
|
||||
}
|
||||
|
||||
void CDBRecordPoolInit(void* work) {
|
||||
int i;
|
||||
|
||||
s_recordPool = (u8*)work + 0x18030;
|
||||
for (i = 0; i < 5; i++) {
|
||||
*(u32*)(s_recordPool + i * 0x470 + 0x18) = 0;
|
||||
if (!s_mutexInitialized) {
|
||||
OSInitMutex((OSMutex*)(s_recordPool + i * 0x470));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
CDBErr CDBDatabaseAllocate(CDBDatabase* database, u32 flag) {
|
||||
CDBDatabaseInstanceWork* databaseInstance;
|
||||
CDBDatabaseInstanceWork* requestedInstance;
|
||||
u32 writeFlag;
|
||||
int i;
|
||||
|
||||
if (s_recordPool == NULL) {
|
||||
OSPanic(__FILE__, 0x185, "(CDB) error : CDBInit() is not called\n");
|
||||
}
|
||||
|
||||
OSLockMutex(&s_mutex);
|
||||
requestedInstance = database->instance;
|
||||
if (requestedInstance != NULL) {
|
||||
for (i = 0, databaseInstance = s_databasePool; i < 2; i++, databaseInstance++) {
|
||||
if (requestedInstance == databaseInstance) {
|
||||
if (requestedInstance->flags == 0) {
|
||||
CDBReportFatal("CDBDatabaseAllocate system error\n");
|
||||
OSUnlockMutex(&s_mutex);
|
||||
return CDB_ERROR_FATAL_ERROR;
|
||||
}
|
||||
CDBReportError("database descripter has opened already\n");
|
||||
OSUnlockMutex(&s_mutex);
|
||||
return 0x1c;
|
||||
}
|
||||
}
|
||||
|
||||
CDBReportError("database descripter is not initialized\n");
|
||||
OSUnlockMutex(&s_mutex);
|
||||
return 0x18;
|
||||
}
|
||||
|
||||
writeFlag = flag & CDB_RECORD_ALLOC_WRITE;
|
||||
for (i = 0, databaseInstance = s_databasePool; i < 2; i++, databaseInstance++) {
|
||||
if (databaseInstance->used != 0) {
|
||||
if ((databaseInstance->flags & CDB_RECORD_ALLOC_WRITE) != 0) {
|
||||
CDBReportError("can't open the database as WRITE mode; another database discripter opened the database as WRITE mode\n");
|
||||
OSUnlockMutex(&s_mutex);
|
||||
return 0x19;
|
||||
}
|
||||
if (writeFlag != 0) {
|
||||
CDBReportError("can't open the database as WRITE mode; other database discripter(s) opened the database as READ mode\n");
|
||||
OSUnlockMutex(&s_mutex);
|
||||
return 0x19;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (i = 0; i < 2; i++) {
|
||||
if (s_databasePool[i].used == 0) {
|
||||
CDBDatabaseInstanceInit(s_databasePool + i, flag, database);
|
||||
database->instance = s_databasePool + i;
|
||||
OSUnlockMutex(&s_mutex);
|
||||
return CDB_ERROR_OK;
|
||||
}
|
||||
}
|
||||
|
||||
CDBReportError("can't open databases any more\n");
|
||||
OSUnlockMutex(&s_mutex);
|
||||
return CDB_ERROR_CRYPT_ALLOC_FAIL;
|
||||
}
|
||||
|
||||
CDBErr CDBDatabaseFree(CDBDatabase* database) {
|
||||
int offset;
|
||||
int i;
|
||||
u32* databaseInstance = database->instance;
|
||||
BOOL hasOpenRecord = FALSE;
|
||||
|
||||
if (databaseInstance == NULL) {
|
||||
return 0x1b;
|
||||
}
|
||||
|
||||
OSLockMutex(&s_mutex);
|
||||
for (i = 0, offset = 0; i < 5; i++, offset += 0x470) {
|
||||
if (CDBRecordInstanceIsUsed(s_recordPool + offset) &&
|
||||
*(CDBDatabase**)(s_recordPool + offset + 0x468) == database) {
|
||||
CDBReportError("can't close database; record %s is opened\n", s_recordPool + offset + 0x438);
|
||||
hasOpenRecord = TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
if (hasOpenRecord) {
|
||||
OSUnlockMutex(&s_mutex);
|
||||
return 0x21;
|
||||
}
|
||||
|
||||
databaseInstance[0] = 0;
|
||||
database->instance = NULL;
|
||||
OSUnlockMutex(&s_mutex);
|
||||
return CDB_ERROR_OK;
|
||||
}
|
||||
|
||||
CDBErr CDBDatabaseCheckOpenDatabase() {
|
||||
int i;
|
||||
BOOL hasOpenDatabase = FALSE;
|
||||
|
||||
OSLockMutex(&s_mutex);
|
||||
for (i = 0; i < 2; i++) {
|
||||
if (CDBDatabaseInstanceIsUsed(s_databasePool + i)) {
|
||||
CDBReportError("database is opened\n");
|
||||
hasOpenDatabase = TRUE;
|
||||
}
|
||||
}
|
||||
OSUnlockMutex(&s_mutex);
|
||||
if (hasOpenDatabase) {
|
||||
return 0x22;
|
||||
}
|
||||
return CDB_ERROR_OK;
|
||||
}
|
||||
|
||||
CDBErr CDBDatabaseCheckOpenRecord() {
|
||||
int offset;
|
||||
int i;
|
||||
BOOL hasOpenRecord = FALSE;
|
||||
|
||||
OSLockMutex(&s_mutex);
|
||||
for (i = 0, offset = 0; i < 5; i++, offset += 0x470) {
|
||||
if (CDBRecordInstanceIsUsed(s_recordPool + offset)) {
|
||||
CDBReportError("record %s is opened\n", s_recordPool + offset + 0x438);
|
||||
hasOpenRecord = TRUE;
|
||||
}
|
||||
}
|
||||
OSUnlockMutex(&s_mutex);
|
||||
if (hasOpenRecord) {
|
||||
return 0x21;
|
||||
}
|
||||
return CDB_ERROR_OK;
|
||||
}
|
||||
|
||||
char s_recordOnSDMessage[] = "record %s on SD is opened\n";
|
||||
|
||||
CDBErr CDBRecordAllocate(CDBRecord* record, int flag) {
|
||||
int writeFlag;
|
||||
int offset;
|
||||
int i;
|
||||
CDBDatabaseInstanceWork* databaseInstance = ((CDBDatabase*)*(CDBDatabase**)record)->instance;
|
||||
|
||||
OSLockMutex(&s_mutex);
|
||||
if (databaseInstance == NULL) {
|
||||
CDBReportError("can't open the record; database is closed\n");
|
||||
OSUnlockMutex(&s_mutex);
|
||||
return 0x1b;
|
||||
}
|
||||
|
||||
if ((databaseInstance->flags & CDB_RECORD_ALLOC_WRITE) == 0 && (flag & CDB_RECORD_ALLOC_WRITE) != 0) {
|
||||
CDBReportError("can't open the record as WRITE mode; database is readonly mode\n");
|
||||
OSUnlockMutex(&s_mutex);
|
||||
return 0x1a;
|
||||
}
|
||||
|
||||
writeFlag = flag & CDB_RECORD_ALLOC_WRITE;
|
||||
for (i = 0, offset = 0; i < 5; i++, offset += 0x470) {
|
||||
if (CDBRecordInstanceIsUsed(s_recordPool + offset) &&
|
||||
CDBRecordKeyCompare(&record->key, (CDBRecordKey*)(s_recordPool + offset + 0x438)) == FALSE &&
|
||||
*(s32*)((u8*)record + 0x30) == *(s32*)(s_recordPool + offset + 0x460)) {
|
||||
if ((*(u32*)(s_recordPool + offset + 0x1c) & CDB_RECORD_ALLOC_WRITE) != 0) {
|
||||
CDBReportError("can't open the record as WRITE mode; another record discripter opened the record as WRITE mode\n");
|
||||
OSUnlockMutex(&s_mutex);
|
||||
return 0x19;
|
||||
}
|
||||
if (writeFlag != 0) {
|
||||
CDBReportError("can't open the record as WRITE mode; other record discripter(s) opened the record as READ mode \n");
|
||||
OSUnlockMutex(&s_mutex);
|
||||
return 0x19;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (i = 0; i < 5; i++) {
|
||||
if (!CDBRecordInstanceIsUsed(s_recordPool + i * 0x470)) {
|
||||
offset = i * 0x470;
|
||||
CDBRecordInstanceInit(s_recordPool + offset, record, flag);
|
||||
record->file = s_recordPool + offset;
|
||||
OSUnlockMutex(&s_mutex);
|
||||
return CDB_ERROR_OK;
|
||||
}
|
||||
}
|
||||
|
||||
CDBReportError("can't open record any more\n");
|
||||
OSUnlockMutex(&s_mutex);
|
||||
return CDB_ERROR_CRYPT_ALLOC_FAIL;
|
||||
}
|
||||
|
||||
CDBErr CDBRecordFree(CDBRecord* record) {
|
||||
CDBRecordFile* recordFile = record->file;
|
||||
|
||||
@@ -73,18 +296,6 @@ void CDBSetFatalVFErrorFlag() {
|
||||
s_fatalVFFlag = TRUE;
|
||||
}
|
||||
|
||||
void CDBRecordPoolInit(void* work) {
|
||||
int i;
|
||||
|
||||
s_recordPool = (u8*)work + 0x18030;
|
||||
for (i = 0; i < 5; i++) {
|
||||
*(u32*)(s_recordPool + i * 0x470 + 0x18) = 0;
|
||||
if (!s_mutexInitialized) {
|
||||
OSInitMutex((OSMutex*)(s_recordPool + i * 0x470));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void CDBTryToCreate_wiiiddat(u8* data) {
|
||||
NANDFileInfo fileInfo;
|
||||
u32 nandCheck;
|
||||
@@ -92,7 +303,7 @@ void CDBTryToCreate_wiiiddat(u8* data) {
|
||||
// Requires 1 NAND block and 1 NAND node
|
||||
s32 ret = NANDCheck(1, 1, &nandCheck);
|
||||
if (ret != NAND_RESULT_OK) {
|
||||
CDBReportError("failed NANDCheck\n");
|
||||
CDBReportFatal("failed NANDCheck\n");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -327,6 +538,29 @@ void CDBCheckMakerCodeStr(char* makerCodeStr) {
|
||||
}
|
||||
}
|
||||
|
||||
BOOL CDBRecordBelongedDBOpenedAsRW(CDBRecord* record) {
|
||||
int i;
|
||||
CDBDatabaseInstanceWork* databaseInstance = NULL;
|
||||
CDBDatabaseInstanceWork* databasePool;
|
||||
|
||||
if (record == NULL) {
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
databasePool = s_databasePool;
|
||||
for (i = 0; i < 2; i++) {
|
||||
if (databasePool[i].used != 0 && (databasePool[i].flags & CDB_RECORD_ALLOC_WRITE) != 0) {
|
||||
databaseInstance = databasePool + i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (databaseInstance == NULL) {
|
||||
return FALSE;
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static int s_vfSync = 1;
|
||||
|
||||
CDBErr CDBSetVFSyncMode(int sync) {
|
||||
|
||||
@@ -9,8 +9,8 @@
|
||||
#define NCD_IPC_HEAP_SIZE 0x1B60
|
||||
#define NCD_MAX_PROFILE 3
|
||||
|
||||
static u32 ncdInitialized;
|
||||
static NCDConfig* ncdCommonBuffer;
|
||||
static u32 ncdInitialized;
|
||||
|
||||
struct NCDMutex {
|
||||
OSMutex mutex;
|
||||
@@ -24,7 +24,7 @@ const char* __NCDUnofficialVersion = "<< RVL_SDK - NCD \trelease build: Dec 12 2
|
||||
|
||||
static void LockRight(void);
|
||||
static NCDErr ExecConfigCommand(const char* name, NCDConfig* config, u32 command);
|
||||
static NCDErr NCDiGetWirelessMacAddress(u8* macAddr);
|
||||
NCDErr NCDiGetWirelessMacAddress(u8* macAddr);
|
||||
|
||||
NCDErr NCDReadConfig(NCDConfig* config) {
|
||||
if (config == NULL) {
|
||||
@@ -323,7 +323,7 @@ NCDErr NCDGetWirelessMacAddress(u8* macAddr) {
|
||||
return NCDiGetWirelessMacAddress(macAddr);
|
||||
}
|
||||
|
||||
static NCDErr NCDiGetWirelessMacAddress(u8* macAddr) {
|
||||
NCDErr NCDiGetWirelessMacAddress(u8* macAddr) {
|
||||
NCDErr err = 0;
|
||||
s32 fd;
|
||||
|
||||
|
||||
@@ -385,7 +385,7 @@ VFErr VFSysSetSyncMode(s32 i_handle_idx, u32 i_mode) {
|
||||
return VF_ERR_SYSTEM;
|
||||
}
|
||||
|
||||
u32 VFSysGetSyncMode(s32 i_handle_idx) {
|
||||
static u32 VFSysGetSyncMode(s32 i_handle_idx) {
|
||||
VFSys_handle* handle_p = VFSysGetHandleP(i_handle_idx);
|
||||
|
||||
if (handle_p == NULL || handle_p->drive.pf_disk_p == NULL || handle_p->device_p == NULL) {
|
||||
@@ -541,7 +541,7 @@ s32 VFSysHandleP2Idx(VFSys_handle* i_handle_p) {
|
||||
return VF_ERR_SYSTEM;
|
||||
}
|
||||
|
||||
VFSys_handle* VFSysVol2HandleP(PF_VOLUME* i_vol_p) {
|
||||
static VFSys_handle* VFSysVol2HandleP(PF_VOLUME* i_vol_p) {
|
||||
if (i_vol_p != NULL) {
|
||||
VFSys_handle* handle_p = VFSysGetHandleP(0);
|
||||
VFSys_handle* handle_end_p = &handle_p[l_vfsys_vol_max];
|
||||
@@ -728,7 +728,7 @@ static void VFiSysClearDeviceSDDirect(VFSys_deviceSD* o_sd_p) {
|
||||
o_sd_p->slotNo = -1;
|
||||
}
|
||||
|
||||
VFSys_device* VFSysGetDeviceP(s32 i_idx) {
|
||||
static VFSys_device* VFSysGetDeviceP(s32 i_idx) {
|
||||
VFSys_handle* handle_p = VFSysGetHandleP(i_idx);
|
||||
if (handle_p != NULL) {
|
||||
return handle_p->device_p;
|
||||
@@ -1170,7 +1170,7 @@ static VFErr VFiSysGetLastDeviceError_common(VFSys_handle* i_handle_p) {
|
||||
return VF_ERR_SYSTEM;
|
||||
}
|
||||
|
||||
void VFSysSetDevErrInfo(s32 i_handle_idx, VFErr i_err) {
|
||||
static void VFSysSetDevErrInfo(s32 i_handle_idx, VFErr i_err) {
|
||||
VFSys_handle* handle_p = VFSysGetHandleP(i_handle_idx);
|
||||
if (handle_p != NULL) {
|
||||
VFiSysSetDeviceErrInfo(handle_p, i_err);
|
||||
|
||||
@@ -53,8 +53,8 @@ static struct {
|
||||
VFi_NANDDelete delete; // 0x0C
|
||||
} l_nandFunc[PF_DRIVE_COUNT];
|
||||
|
||||
int VF_nand_retry_max;
|
||||
int VF_nand_sleep_msec;
|
||||
int VF_nand_retry_max;
|
||||
|
||||
#ifdef DEBUG
|
||||
#define VFi_NANDPrint(...) printf(__VA_ARGS__)
|
||||
@@ -130,7 +130,7 @@ s32 VFi_NandPrivateOpen(const char* path, NANDFileInfo* info, u8 accType) {
|
||||
VFi_NANDFunction(NANDPrivateOpen(path, info, accType));
|
||||
}
|
||||
|
||||
s32 VFi_NandWrite(NANDFileInfo* info, void* buf, u32 length) {
|
||||
inline s32 VFi_NandWrite(NANDFileInfo* info, void* buf, u32 length) {
|
||||
VFi_NANDFunction(NANDWrite(info, buf, length));
|
||||
}
|
||||
|
||||
@@ -146,7 +146,7 @@ s32 VFi_NandPrivateCreateDir(const char* path, u8 perm, u8 attr) {
|
||||
VFi_NANDFunction(NANDPrivateCreateDir(path, perm, attr));
|
||||
}
|
||||
|
||||
s32 VFi_NandSeek(NANDFileInfo* info, s32 offset, s32 whence) {
|
||||
inline s32 VFi_NandSeek(NANDFileInfo* info, s32 offset, s32 whence) {
|
||||
VFi_NANDFunction(NANDSeek(info, offset, whence));
|
||||
}
|
||||
|
||||
@@ -177,12 +177,12 @@ static u8 _MakePermitForRVL(u8 i_perm) {
|
||||
return perm;
|
||||
}
|
||||
|
||||
s32 VFi_NandCreateSp(const char* path, u8 i_perm, u8 attr, u32 i_handleIdx) {
|
||||
inline s32 VFi_NandCreateSp(const char* path, u8 i_perm, u8 attr, u32 i_handleIdx) {
|
||||
u8 perm = _MakePermitForRVL(i_perm);
|
||||
if (i_handleIdx < PF_DRIVE_COUNT) {
|
||||
VFi_NANDCreate tmpCreate;
|
||||
tmpCreate = l_nandFunc[i_handleIdx].create;
|
||||
if (tmpCreate != NULL) {
|
||||
if (tmpCreate) {
|
||||
return tmpCreate(path, perm, attr);
|
||||
}
|
||||
return VFi_NandCreate(path, perm, attr);
|
||||
@@ -197,7 +197,7 @@ s32 VFi_NandOpenSp(const char* path, void* info, u8 accType, u32 i_handleIdx) {
|
||||
NANDFileInfo* info_p = info;
|
||||
if (i_handleIdx < PF_DRIVE_COUNT) {
|
||||
VFi_NANDOpen tmpOpen = l_nandFunc[i_handleIdx].open;
|
||||
if (tmpOpen != NULL) {
|
||||
if (tmpOpen) {
|
||||
return tmpOpen(path, info_p, accType);
|
||||
}
|
||||
return VFi_NandOpen(path, info_p, accType);
|
||||
@@ -208,10 +208,10 @@ s32 VFi_NandOpenSp(const char* path, void* info, u8 accType, u32 i_handleIdx) {
|
||||
return VFi_NandPrivateOpen(path, info_p, accType);
|
||||
}
|
||||
|
||||
s32 VFi_NandDeleteSp(const char* path, u32 i_handleIdx) {
|
||||
inline s32 VFi_NandDeleteSp(const char* path, u32 i_handleIdx) {
|
||||
if (i_handleIdx < PF_DRIVE_COUNT) {
|
||||
VFi_NANDDelete tmpDelete = l_nandFunc[i_handleIdx].delete;
|
||||
if (tmpDelete != NULL) {
|
||||
if (tmpDelete) {
|
||||
return tmpDelete(path);
|
||||
}
|
||||
return VFi_NandDelete(path);
|
||||
|
||||
@@ -8,15 +8,38 @@
|
||||
|
||||
#include <string.h>
|
||||
|
||||
extern volatile const u8 lbl_81695060;
|
||||
extern volatile const u8 lbl_81695061;
|
||||
extern volatile const u8 lbl_81695062;
|
||||
extern volatile const u8 lbl_81695064;
|
||||
extern volatile const u8 lbl_81695065;
|
||||
extern volatile const u8 lbl_81695066;
|
||||
extern volatile u8 lbl_81697D70;
|
||||
extern volatile u8 lbl_81697D71;
|
||||
extern volatile u8 lbl_81697D72;
|
||||
#pragma push
|
||||
#pragma section sconst_type ".sdata2"
|
||||
const u8 lbl_81695060 = 0;
|
||||
const u8 lbl_81695061 = 0x0F;
|
||||
const u8 lbl_81695062 = 0xAC;
|
||||
const u8 lbl_81695063 = 0;
|
||||
const u8 lbl_81695064 = 0;
|
||||
const u8 lbl_81695065 = 0x50;
|
||||
const u8 lbl_81695066 = 0xF2;
|
||||
const u8 lbl_81695067 = 0;
|
||||
#pragma pop
|
||||
#pragma push
|
||||
#pragma section sconst_type ".sdata"
|
||||
const u8 lbl_81697D70 = 0;
|
||||
const u8 lbl_81697D71 = 0x50;
|
||||
const u8 lbl_81697D72 = 0xF2;
|
||||
const u8 lbl_81697D73 = 0;
|
||||
const u8 lbl_81697D74 = 0;
|
||||
const u8 lbl_81697D75 = 0;
|
||||
const u8 lbl_81697D76 = 0;
|
||||
const u8 lbl_81697D77 = 0;
|
||||
#pragma pop
|
||||
|
||||
#define lbl_81695060 (*((volatile const u8*)&lbl_81695060))
|
||||
#define lbl_81695061 (*((volatile const u8*)&lbl_81695061))
|
||||
#define lbl_81695062 (*((volatile const u8*)&lbl_81695062))
|
||||
#define lbl_81695064 (*((volatile const u8*)&lbl_81695064))
|
||||
#define lbl_81695065 (*((volatile const u8*)&lbl_81695065))
|
||||
#define lbl_81695066 (*((volatile const u8*)&lbl_81695066))
|
||||
#define lbl_81697D70 (*((volatile const u8*)&lbl_81697D70))
|
||||
#define lbl_81697D71 (*((volatile const u8*)&lbl_81697D71))
|
||||
#define lbl_81697D72 (*((volatile const u8*)&lbl_81697D72))
|
||||
extern void _savegpr_21();
|
||||
extern void _restgpr_21();
|
||||
|
||||
|
||||
@@ -80,6 +80,10 @@ SimpleWavePlayer::SimpleWavePlayer() : mSetupParam(1, nw4r::snd::SAMPLE_FORMAT_P
|
||||
mThreadRunning = false;
|
||||
}
|
||||
|
||||
WaveFileAiff::~WaveFileAiff() {}
|
||||
|
||||
WaveFileWav::~WaveFileWav() {}
|
||||
|
||||
SimpleWavePlayer::~SimpleWavePlayer() {
|
||||
}
|
||||
|
||||
|
||||
@@ -8,8 +8,6 @@ namespace ipl {
|
||||
// used but pooled first
|
||||
DECOMP_FORCE_ACTIVE(iplCSMtx_cpp, "MTX34");
|
||||
|
||||
static const char mtx34_name[] = "MTX34";
|
||||
|
||||
#define PROPERTY_COUNT 13
|
||||
extern const CHANSVmPropertyList cPropertyList[PROPERTY_COUNT];
|
||||
|
||||
@@ -153,7 +151,7 @@ namespace ipl {
|
||||
BOOL init(CHANSVm* vm) {
|
||||
BOOL result = FALSE;
|
||||
// Create class
|
||||
CHANSVmNativeClass* cls = CHANSVmAddNativeClass(vm, mtx34_name, ctor, NULL);
|
||||
CHANSVmNativeClass* cls = CHANSVmAddNativeClass(vm, "MTX34", ctor, NULL);
|
||||
if (cls != NULL) {
|
||||
// Add properties
|
||||
result = CHANSVmAddNativePropertyAccessorsList(vm, cls, cPropertyList, PROPERTY_COUNT) == CHANS_VM_OK;
|
||||
|
||||
@@ -34,7 +34,9 @@ static MEMAllocator sAllocator;
|
||||
static MEMAllocator* spAllocator = &sAllocator;
|
||||
|
||||
void* HBMAllocMem(u32 size) {
|
||||
return MEMAllocFromAllocator(spAllocator, size);
|
||||
void* addr = MEMAllocFromAllocator(spAllocator, size);
|
||||
|
||||
return addr;
|
||||
}
|
||||
|
||||
void HBMFreeMem(void* pBlock) {
|
||||
@@ -124,17 +126,6 @@ BOOL HBMIsReassignedControllers() {
|
||||
|
||||
/* THE LOGIC */
|
||||
|
||||
extern const f32 lbl_816946D8;
|
||||
extern const f32 lbl_81694748;
|
||||
extern const f32 lbl_81694744;
|
||||
extern const f32 lbl_816946DC;
|
||||
extern const f32 lbl_81694754;
|
||||
extern volatile const f32 lbl_8169474C;
|
||||
extern volatile const f32 lbl_81694750;
|
||||
|
||||
extern const f32 lbl_81694714;
|
||||
extern const f32 lbl_81694710;
|
||||
|
||||
namespace homebutton {
|
||||
static void SimpleSyncCallback(s32 result, s32 num);
|
||||
|
||||
@@ -156,16 +147,6 @@ namespace homebutton {
|
||||
|
||||
HomeButton* HomeButton::spHomeButtonObj = NULL;
|
||||
|
||||
const int HomeButton::scReConnectTime = 3600;
|
||||
const int HomeButton::scReConnectTime2 = 3570;
|
||||
const int HomeButton::scPadDrawWaitTime = 5;
|
||||
const int HomeButton::scGetPadInfoTime = 100;
|
||||
const int HomeButton::scForcusSEWaitTime = 2;
|
||||
const f32 HomeButton::scOnPaneVibTime = 3.0f;
|
||||
const f32 HomeButton::scOnPaneVibWaitTime = 9.0f;
|
||||
const int HomeButton::scWaitStopMotorTime = 30;
|
||||
const int HomeButton::scWaitDisConnectTime = 180;
|
||||
|
||||
const char* HomeButton::scCursorLytName[res::eCursorLyt_Max] = {
|
||||
"P1_Def.brlyt",
|
||||
"P2_Def.brlyt",
|
||||
@@ -616,8 +597,8 @@ namespace homebutton {
|
||||
mpController[i]->initCallback();
|
||||
mpController[i]->initSound();
|
||||
|
||||
mOnPaneVibFrame[i] = ::lbl_816946D8;
|
||||
mOnPaneVibWaitFrame[i] = ::lbl_816946D8;
|
||||
mOnPaneVibFrame[i] = 0.0f;
|
||||
mOnPaneVibWaitFrame[i] = 0.0f;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -638,7 +619,7 @@ namespace homebutton {
|
||||
|
||||
if (mpSoundArchivePlayer != NULL) {
|
||||
for (i = 0; i < mpSoundArchivePlayer->GetSoundPlayerCount(); i++) {
|
||||
mpSoundArchivePlayer->GetSoundPlayer(i).SetVolume(::lbl_816946DC);
|
||||
mpSoundArchivePlayer->GetSoundPlayer(i).SetVolume(1.0f);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -798,7 +779,7 @@ namespace homebutton {
|
||||
if (mOnPaneVibFrame[i] <= 0.0f || mState == 17) {
|
||||
getController(i)->stopMotor();
|
||||
mOnPaneVibFrame[i] = 0.0f;
|
||||
mOnPaneVibWaitFrame[i] = scOnPaneVibWaitTime;
|
||||
mOnPaneVibWaitFrame[i] = 9.0f;
|
||||
}
|
||||
}
|
||||
} else if (mOnPaneVibWaitFrame[i] > 0.0f) {
|
||||
@@ -1271,20 +1252,6 @@ namespace homebutton {
|
||||
}
|
||||
}
|
||||
|
||||
void HomeButton::calc_letter() {
|
||||
if (mLetterFlag && !mpPairGroupAnmController[res::ePairAnm_ltrIcn_on]->isPlaying()) {
|
||||
mpLayout->GetRootPane()->FindPaneByName(scFuncPaneName[res::eFuncPane_let_icn_00], true)->SetVisible(true);
|
||||
|
||||
mpPairGroupAnmController[res::ePairAnm_ltrIcn_on]->setAnmType(ANIM_TYPE_LOOP);
|
||||
|
||||
mpPairGroupAnmController[res::ePairAnm_ltrIcn_on]->play();
|
||||
} else if (!mLetterFlag) {
|
||||
mpLayout->GetRootPane()->FindPaneByName(scFuncPaneName[res::eFuncPane_let_icn_00], true)->SetVisible(false);
|
||||
|
||||
mpPairGroupAnmController[res::ePairAnm_ltrIcn_on]->stop();
|
||||
}
|
||||
}
|
||||
|
||||
void HomeButton::calc_battery(int chan) {
|
||||
for (int i = 0; i < res::eBatteryPane_Max; i++) {
|
||||
if (i < mWpadInfo[chan].battery) {
|
||||
@@ -1311,6 +1278,20 @@ namespace homebutton {
|
||||
getController(chan)->clrBatteryFlag();
|
||||
}
|
||||
|
||||
void HomeButton::calc_letter() {
|
||||
if (mLetterFlag && !mpPairGroupAnmController[res::ePairAnm_ltrIcn_on]->isPlaying()) {
|
||||
mpLayout->GetRootPane()->FindPaneByName(scFuncPaneName[res::eFuncPane_let_icn_00], true)->SetVisible(true);
|
||||
|
||||
mpPairGroupAnmController[res::ePairAnm_ltrIcn_on]->setAnmType(ANIM_TYPE_LOOP);
|
||||
|
||||
mpPairGroupAnmController[res::ePairAnm_ltrIcn_on]->play();
|
||||
} else if (!mLetterFlag) {
|
||||
mpLayout->GetRootPane()->FindPaneByName(scFuncPaneName[res::eFuncPane_let_icn_00], true)->SetVisible(false);
|
||||
|
||||
mpPairGroupAnmController[res::ePairAnm_ltrIcn_on]->stop();
|
||||
}
|
||||
}
|
||||
|
||||
void HomeButton::draw() {
|
||||
mpLayout->Draw(mDrawInfo);
|
||||
|
||||
@@ -1475,13 +1456,12 @@ namespace homebutton {
|
||||
nw4r::math::VEC3 vec;
|
||||
|
||||
if (pController->wiiCon[i].use_devtype == WPAD_DEV_CLASSIC && pController->wiiCon[i].kpad->dev_type == WPAD_DEV_CLASSIC) {
|
||||
vec = nw4r::math::VEC3(lbl_816946D8, lbl_816946D8,
|
||||
*((volatile const f32*)&lbl_81694710));
|
||||
vec = nw4r::math::VEC3(0.0f, 0.0f, 15.0f);
|
||||
} else {
|
||||
Vec2 v = pController->wiiCon[i].kpad->horizon;
|
||||
f32 rad = nw4r::math::Atan2FIdx(-v.y, v.x) * lbl_81694714;
|
||||
f32 rad = nw4r::math::Atan2FIdx(-v.y, v.x) * 1.40625f;
|
||||
|
||||
vec = nw4r::math::VEC3(lbl_816946D8, lbl_816946D8, rad);
|
||||
vec = nw4r::math::VEC3(0.0f, 0.0f, rad);
|
||||
}
|
||||
|
||||
if (!mpHBInfo->cursor) {
|
||||
@@ -1933,8 +1913,8 @@ namespace homebutton {
|
||||
}
|
||||
|
||||
if (onFlag && pController != NULL) {
|
||||
if (!getController(pController->chan)->isRumbling() && mOnPaneVibWaitFrame[pController->chan] <= ::lbl_816946D8) {
|
||||
mOnPaneVibFrame[pController->chan] = ::lbl_81694744;
|
||||
if (!getController(pController->chan)->isRumbling() && mOnPaneVibWaitFrame[pController->chan] <= 0.0f) {
|
||||
mOnPaneVibFrame[pController->chan] = 3.0f;
|
||||
getController(pController->chan)->startMotor();
|
||||
}
|
||||
}
|
||||
@@ -2388,10 +2368,10 @@ namespace homebutton {
|
||||
void HomeButton::reset_guiManager(int num) {
|
||||
if (num < 0) {
|
||||
for (int i = 0; i < 8; i++) {
|
||||
mpPaneManager->update(i, ::lbl_81694748, ::lbl_81694748, 0, 0, 0, NULL);
|
||||
mpPaneManager->update(i, -10000.0f, -10000.0f, 0, 0, 0, NULL);
|
||||
}
|
||||
} else {
|
||||
mpPaneManager->update(num, ::lbl_81694748, ::lbl_81694748, 0, 0, 0, NULL);
|
||||
mpPaneManager->update(num, -10000.0f, -10000.0f, 0, 0, 0, NULL);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2500,7 +2480,7 @@ namespace homebutton {
|
||||
}
|
||||
}
|
||||
} else {
|
||||
scale = nw4r::math::VEC2(::lbl_816946DC, ::lbl_816946DC);
|
||||
scale = nw4r::math::VEC2(1.0f, 1.0f);
|
||||
mpLayout->GetRootPane()->SetScale(scale);
|
||||
|
||||
if (!mpHBInfo->cursor) {
|
||||
@@ -2645,14 +2625,9 @@ namespace homebutton {
|
||||
|
||||
initgx();
|
||||
GXColor clr = {red_, green_, blue_, alpha};
|
||||
drawBlackPlate(::lbl_8169474C, ::lbl_8169474C, ::lbl_81694750, ::lbl_81694750, clr);
|
||||
drawBlackPlate(-1000.0f, -1000.0f, 1000.0f, 1000.0f, clr);
|
||||
}
|
||||
|
||||
const int HomeButton::scSoundHeapSize_but2 = 0x60000;
|
||||
const int HomeButton::scSoundHeapSize_but3 = 0x6f800;
|
||||
const int HomeButton::scSoundThreadPrio = 4;
|
||||
const int HomeButton::scDvdThreadPrio = 3;
|
||||
|
||||
void HomeButton::update_sound() {
|
||||
if (mpSoundArchivePlayer != NULL) {
|
||||
mpSoundArchivePlayer->Update();
|
||||
@@ -2684,7 +2659,7 @@ namespace homebutton {
|
||||
}
|
||||
|
||||
if (mEndInitSoundFlag) {
|
||||
AXSetAuxAReturnVolume(lbl_81694754 * gain);
|
||||
AXSetAuxAReturnVolume(32768.0f * gain);
|
||||
}
|
||||
|
||||
if (mpSoundArchivePlayer != NULL) {
|
||||
|
||||
@@ -595,5 +595,23 @@ namespace ext_ead {
|
||||
}
|
||||
}
|
||||
|
||||
BrowserThread::CmdPacket& BrowserThread::CmdPacket::operator=(const BrowserThread::CmdPacket& other) {
|
||||
type = other.type;
|
||||
data = other.data;
|
||||
return *this;
|
||||
}
|
||||
|
||||
ImeData& ImeData::operator=(const ImeData& other) {
|
||||
unk_0x00 = other.unk_0x00;
|
||||
imeID = other.imeID;
|
||||
text = other.text;
|
||||
unk_0x0C = other.unk_0x0C;
|
||||
unk_0x10 = other.unk_0x10;
|
||||
unk_0x14 = other.unk_0x14;
|
||||
unk_0x18 = other.unk_0x18;
|
||||
maxLength = other.maxLength;
|
||||
return *this;
|
||||
}
|
||||
|
||||
} // namespace www
|
||||
} // namespace ext_ead
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
namespace textinput {
|
||||
namespace gui {
|
||||
extern "C" void drawLine___Q29textinput3guiFfffffUcR8_GXColor();
|
||||
extern "C" const f32 lbl_81694EE8;
|
||||
|
||||
void drawLine_(f32 x0, f32 y0, f32 x1, f32 y1, f32 z, u8 width, GXColor& color) {
|
||||
GXClearVtxDesc();
|
||||
@@ -30,7 +31,7 @@ namespace textinput {
|
||||
GXSetBlendMode(GX_BM_NONE, GX_BL_ZERO, GX_BL_ZERO, GX_LO_NOOP);
|
||||
|
||||
Mtx mtx;
|
||||
MTXTrans(mtx, 0.0f, 0.0f, 0.0f);
|
||||
MTXTrans(mtx, lbl_81694EE8, lbl_81694EE8, lbl_81694EE8);
|
||||
GXLoadPosMtxImm(mtx, 0);
|
||||
|
||||
GXSetLineWidth(width, GX_TO_ZERO);
|
||||
@@ -46,16 +47,6 @@ namespace textinput {
|
||||
GXEnd();
|
||||
}
|
||||
|
||||
#pragma push
|
||||
#pragma section sconst_type ".sdata2"
|
||||
extern "C" const f32 lbl_81694EE8 = 0.0f;
|
||||
extern "C" const u8 lbl_81694EEC = 0xFF;
|
||||
extern "C" const u8 lbl_81694EED = 0x00;
|
||||
extern "C" const u8 lbl_81694EEE = 0x00;
|
||||
extern "C" const u8 lbl_81694EEF = 0xFF;
|
||||
extern "C" const f32 lbl_81694EF0 = 0.5f;
|
||||
#pragma pop
|
||||
|
||||
u32 GUIComponent::updatePointerImpl(const GUIPointer& pointer) {
|
||||
int point = pointer.getCtrlNo();
|
||||
u32 event = EVENT_NONE;
|
||||
@@ -250,6 +241,8 @@ namespace textinput {
|
||||
}
|
||||
}
|
||||
|
||||
PaneComponent::~PaneComponent() {}
|
||||
|
||||
void PaneManager::createLayoutScene(const nw4r::lyt::Layout& layout) {
|
||||
mIDCounter = 0;
|
||||
walkInChildren(layout.GetRootPane()->GetChildList());
|
||||
@@ -315,8 +308,6 @@ namespace textinput {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
PaneComponent::~PaneComponent() {}
|
||||
|
||||
void PaneManager::setAllBoundingBoxComponentTriggerTarget(bool bEnable) {
|
||||
const volatile u16& numObjects = mPaneComponents.numObjects;
|
||||
for (u32 i = 0; i < numObjects; i++) {
|
||||
@@ -343,7 +334,7 @@ namespace textinput {
|
||||
MTXInverse(mpPane->GetGlobalMtx(), globalMtx);
|
||||
|
||||
nw4r::math::VEC3 pos;
|
||||
MTXMultVec(globalMtx, nw4r::math::VEC3(x, y, 0), pos);
|
||||
MTXMultVec(globalMtx, nw4r::math::VEC3(x, y, lbl_81694EE8), pos);
|
||||
|
||||
nw4r::ut::Rect rect = mpPane->GetPaneRect(*drawInfo);
|
||||
|
||||
@@ -355,6 +346,16 @@ namespace textinput {
|
||||
}
|
||||
}
|
||||
|
||||
#pragma push
|
||||
#pragma section sconst_type ".sdata2"
|
||||
extern "C" const f32 lbl_81694EE8 = 0.0f;
|
||||
extern "C" const u8 lbl_81694EEC = 0xFF;
|
||||
extern "C" const u8 lbl_81694EED = 0x00;
|
||||
extern "C" const u8 lbl_81694EEE = 0x00;
|
||||
extern "C" const u8 lbl_81694EEF = 0xFF;
|
||||
extern "C" const f32 lbl_81694EF0 = 0.5f;
|
||||
#pragma pop
|
||||
|
||||
extern "C" asm void draw__Q39textinput3gui13PaneComponentFv() {
|
||||
nofralloc
|
||||
stwu r1, -0x40(r1)
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
#define TI_PREDICTLANG_SAMPLE_CLASS
|
||||
#include "keyboard/tiPredictLang.h"
|
||||
#undef TI_PREDICTLANG_SAMPLE_CLASS
|
||||
|
||||
#include "keyboard/tiLanguageIndependentData.h"
|
||||
#include "keyboard/tiManager.h"
|
||||
@@ -33,6 +35,8 @@ namespace textinput {
|
||||
{ANM_RollOver, "fs_prdicSelWidw_a_PRDC_Roll_over.brlan"}, {ANM_ToggleOff, "fs_prdicSelWidw_a_PRDC_toggle-OFF.brlan"},
|
||||
{ANM_ToggleOn, "fs_prdicSelWidw_a_PRDC_toggle-ON.brlan"}};
|
||||
|
||||
extern "C" __declspec(section ".rodata") const u32 tiPredictLang_rodata_pad = 0;
|
||||
|
||||
static const PaneToAnimation csPaneToAnimation[] = {
|
||||
{KT_Whole, "N_PRDCkeytop_all", 3, NULL, {&csAninationFile[0], &csAninationFile[4], &csAninationFile[5]}},
|
||||
{KT_ChangeButton,
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
#define TI_TOOLBAR_SAMPLE_CLASS
|
||||
#include "keyboard/tiToolBar.h"
|
||||
#undef TI_TOOLBAR_SAMPLE_CLASS
|
||||
|
||||
#include "keyboard/tiHKBManager.h"
|
||||
#include "keyboard/tiLanguageIndependentData.h"
|
||||
@@ -182,7 +184,7 @@ namespace textinput {
|
||||
}
|
||||
break;
|
||||
}
|
||||
case ANM_07:
|
||||
case ANM_08:
|
||||
case ANM_11: {
|
||||
pane->changeAnimation(ANM_09);
|
||||
break;
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -1,5 +1,15 @@
|
||||
#define IPL_BOARD_DATE_CTOR_OUT_OF_LINE
|
||||
#define IPL_BOARD_WEEK_FUNCTION_OUT_OF_LINE
|
||||
|
||||
#include "iplSceneUI.h"
|
||||
|
||||
#include "iplSystem.h"
|
||||
|
||||
#if defined(SYSMENU_REGION_USA)
|
||||
#define IPL_BOARD_DATE_HELPERS_INLINE
|
||||
#endif
|
||||
#define IPL_BOARD_INLINE_GETTERS
|
||||
|
||||
#include "scene/board/iplBoard.h"
|
||||
|
||||
#include "scene/board/iplBoardObject.h"
|
||||
@@ -13,8 +23,6 @@
|
||||
|
||||
#include "scene/setting/iplSetting.h"
|
||||
|
||||
#include "iplSystem.h"
|
||||
|
||||
#include "utility/iplRBRUtility.h"
|
||||
|
||||
#define RECORD_DATE_TO_CDB(x) (CDBMakeCDBDate((x).year, (x).month, (x).day, (x).hour, (x).min, (x).sec))
|
||||
@@ -71,6 +79,11 @@ namespace ipl {
|
||||
init_search_condition();
|
||||
}
|
||||
|
||||
}
|
||||
namespace utility {
|
||||
Date::Date(const OSCalendarTime& cal) : year(cal.year), month(cal.mon + 1), day(cal.mday) {}
|
||||
}
|
||||
namespace scene {
|
||||
void Board::prepare() {
|
||||
System::checkNandOverFlowFlagAsync();
|
||||
|
||||
@@ -197,55 +210,53 @@ namespace ipl {
|
||||
mpLayoutBg->calc();
|
||||
mpLayoutFocusBg->calc();
|
||||
|
||||
if (mState != STATE_TO_SETTINGS && mState != STATE_TERMINATE) {
|
||||
if (mState == STATE_DONE) {
|
||||
return;
|
||||
if (mState == STATE_TO_SETTINGS || mState == STATE_TERMINATE || mState == STATE_DONE) {
|
||||
return;
|
||||
}
|
||||
|
||||
calc_board_object();
|
||||
|
||||
Button* button = get_button();
|
||||
|
||||
if (mbNewMsgAnimCount && button != NULL) {
|
||||
/* Message count on button icon */
|
||||
|
||||
wchar_t numStr[3] = L"";
|
||||
int index = 0;
|
||||
|
||||
int mailCount;
|
||||
|
||||
if (mMsgCount >= 0) {
|
||||
mailCount = 99;
|
||||
if (mMsgCount <= 99) {
|
||||
mailCount = mMsgCount;
|
||||
}
|
||||
} else {
|
||||
mailCount = 0;
|
||||
}
|
||||
|
||||
calc_board_object();
|
||||
if (mailCount >= 10) {
|
||||
index = 1;
|
||||
numStr[0] = scNumber[(mailCount / 10) % 10];
|
||||
}
|
||||
numStr[index++] = scNumber[mailCount % 10];
|
||||
|
||||
Button* button = get_button();
|
||||
button->setText("T_BbsMark1", numStr);
|
||||
|
||||
if (mbNewMsgAnimCount && button != NULL) {
|
||||
/* Message count on button icon */
|
||||
// New mail animation
|
||||
|
||||
int index = 0;
|
||||
wchar_t numStr[3] = L"";
|
||||
|
||||
int mailCount;
|
||||
|
||||
if (mMsgCount >= 0) {
|
||||
mailCount = 99;
|
||||
if (mMsgCount <= 99) {
|
||||
mailCount = mMsgCount;
|
||||
}
|
||||
} else {
|
||||
mailCount = 0;
|
||||
}
|
||||
|
||||
if (mailCount >= 10) {
|
||||
index = 1;
|
||||
numStr[0] = scNumber[(mailCount / 10) % 10];
|
||||
}
|
||||
numStr[index++] = scNumber[mailCount % 10];
|
||||
|
||||
button->setText("T_BbsMark1", numStr);
|
||||
|
||||
// New mail animation
|
||||
|
||||
if (mailCount != 0) {
|
||||
button->startMailNumAnm();
|
||||
} else {
|
||||
button->stopMailNumAnm();
|
||||
}
|
||||
|
||||
mbNewMsgAnimCount = false;
|
||||
if (mailCount != 0) {
|
||||
button->startMailNumAnm();
|
||||
} else {
|
||||
button->stopMailNumAnm();
|
||||
}
|
||||
|
||||
// Do SD process
|
||||
if (System::getCdbManager() != NULL && mState != STATE_WAIT_INIT) {
|
||||
mBoardSD.update();
|
||||
}
|
||||
mbNewMsgAnimCount = false;
|
||||
}
|
||||
|
||||
// Do SD process
|
||||
if (System::getCdbManager() != NULL && mState != STATE_WAIT_INIT) {
|
||||
mBoardSD.update();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -429,7 +440,13 @@ namespace ipl {
|
||||
|
||||
cdb::Manager* cdbManager = System::getCdbManager();
|
||||
|
||||
BOOL result = TRUE;
|
||||
struct InterruptState {
|
||||
BOOL first;
|
||||
BOOL second;
|
||||
BOOL third;
|
||||
BOOL result;
|
||||
} interrupts;
|
||||
interrupts.result = TRUE;
|
||||
|
||||
char recordType[8] = "";
|
||||
|
||||
@@ -462,17 +479,17 @@ namespace ipl {
|
||||
|
||||
// Find any free space to put the object on screen
|
||||
|
||||
BOOL old = OSDisableInterrupts();
|
||||
interrupts.first = OSDisableInterrupts();
|
||||
BOOL exist = is_exist_diff_date();
|
||||
BoardObject* obj = mObjList.getNextFree();
|
||||
OSRestoreInterrupts(old);
|
||||
OSRestoreInterrupts(interrupts.first);
|
||||
|
||||
if (obj == NULL && exist) {
|
||||
while (obj == NULL) {
|
||||
OSSleepMilliseconds((OSTime)1);
|
||||
BOOL old2 = OSDisableInterrupts();
|
||||
interrupts.second = OSDisableInterrupts();
|
||||
obj = mObjList.getNextFree();
|
||||
OSRestoreInterrupts(old2);
|
||||
OSRestoreInterrupts(interrupts.second);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -512,16 +529,16 @@ namespace ipl {
|
||||
goto close;
|
||||
}
|
||||
|
||||
result = TRUE;
|
||||
interrupts.result = TRUE;
|
||||
|
||||
if (((RBRHeader*)rbrData)->magic == RBR_MAGIC && cdbManager->isValidHeader((RBRHeader*)rbrData)) {
|
||||
BOOL old3 = OSDisableInterrupts();
|
||||
interrupts.third = OSDisableInterrupts();
|
||||
|
||||
if (recordDate == mCurrentDate) {
|
||||
if (mbReading == true && mSearchRecord_Prev.created) {
|
||||
mbReading = false;
|
||||
delete[] rbrData;
|
||||
OSRestoreInterrupts(old3);
|
||||
OSRestoreInterrupts(interrupts.third);
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
@@ -539,11 +556,11 @@ namespace ipl {
|
||||
memcpy(&mSearchRecord_Prev, &mSearchRecord_Next, sizeof(SearchRecord));
|
||||
}
|
||||
} else {
|
||||
result = FALSE;
|
||||
interrupts.result = FALSE;
|
||||
delete[] rbrData;
|
||||
}
|
||||
|
||||
OSRestoreInterrupts(old3);
|
||||
OSRestoreInterrupts(interrupts.third);
|
||||
} else {
|
||||
delete[] rbrData;
|
||||
}
|
||||
@@ -567,13 +584,13 @@ namespace ipl {
|
||||
show_ricon();
|
||||
}
|
||||
|
||||
result = FALSE;
|
||||
interrupts.result = FALSE;
|
||||
goto out;
|
||||
|
||||
error:
|
||||
result = FALSE;
|
||||
interrupts.result = FALSE;
|
||||
out:
|
||||
return result;
|
||||
return interrupts.result;
|
||||
}
|
||||
|
||||
void Board::stt_wait_cdb_init() {
|
||||
@@ -907,14 +924,16 @@ namespace ipl {
|
||||
if (mState == STATE_NORMAL) {
|
||||
for (int i = 0; i < WPAD_MAX_CONTROLLERS; i++) {
|
||||
BoardObject* object = NULL;
|
||||
FOREACH_OBJ_IN_LIST(object) {
|
||||
BoardObject* nextObject = NULL;
|
||||
while ((nextObject = mObjList.getNext(object)) != NULL) {
|
||||
object = nextObject;
|
||||
if ((mHoveredObjs[i] == NULL || mHoveredObjs[i] == object) && mState == STATE_NORMAL) {
|
||||
object->update(i);
|
||||
}
|
||||
}
|
||||
|
||||
if (System::getController(i) == NULL && mHoveredObjs[i] != NULL) {
|
||||
object->start_left_event(i);
|
||||
mHoveredObjs[i]->start_left_event(i);
|
||||
mHoveredObjs[i] = NULL;
|
||||
}
|
||||
}
|
||||
@@ -1134,9 +1153,11 @@ namespace ipl {
|
||||
bool result = mbDoReadTask == false;
|
||||
BoardObject* object = NULL;
|
||||
FOREACH_OBJ_IN_LIST(object) {
|
||||
result = (result & (!object->mbRightWay && !object->mbLeftWay && !object->mMoveAnim.isPlaying() && object->mpLayout != NULL &&
|
||||
!object->mpLayout->getAnim(BoardObject::ANIM_NEXT_PAGE)->isPlaying())) != false &&
|
||||
object->mbModifiedPos == false;
|
||||
bool stillMoving = (result & (!object->mbRightWay && !object->mbLeftWay && !object->mMoveAnim.isPlaying() &&
|
||||
object->mpLayout != NULL &&
|
||||
!object->mpLayout->getAnim(BoardObject::ANIM_NEXT_PAGE)->isPlaying())) != false;
|
||||
bool modifiedPos = object->mbModifiedPos;
|
||||
result = stillMoving & (modifiedPos == false);
|
||||
}
|
||||
|
||||
if (result) {
|
||||
@@ -1388,10 +1409,11 @@ namespace ipl {
|
||||
#undef TEXT_LENGTH
|
||||
}
|
||||
|
||||
static const u32 scWeekMsgId[] = {MESG_CALENDAR_SUNDAY, MESG_CALENDAR_MONDAY, MESG_CALENDAR_TUESDAY, MESG_CALENDAR_WEDNESDAY,
|
||||
MESG_CALENDAR_THURSDAY, MESG_CALENDAR_FRIDAY, MESG_CALENDAR_SATURDAY};
|
||||
|
||||
void Board::get_text_jpn(const utility::Date& date, wchar_t* text, u32 textLen) {
|
||||
const u32 scWeekMsgId[] = {MESG_CALENDAR_SUNDAY, MESG_CALENDAR_MONDAY, MESG_CALENDAR_TUESDAY, MESG_CALENDAR_WEDNESDAY,
|
||||
MESG_CALENDAR_THURSDAY, MESG_CALENDAR_FRIDAY, MESG_CALENDAR_SATURDAY};
|
||||
wchar_t scTextDateJpnFormat[] = L"%d%ls%d%ls%ls%ls%ls";
|
||||
#ifndef IPL_BOARD_DATE_HELPERS_INLINE
|
||||
inline void Board::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);
|
||||
@@ -1399,10 +1421,13 @@ namespace ipl {
|
||||
const wchar_t* weekStart = msgMgr->getMessage(MESG_CALENDAR_WEEK_START);
|
||||
const wchar_t* weekEnd = msgMgr->getMessage(MESG_CALENDAR_WEEK_END);
|
||||
|
||||
swprintf(text, textLen, L"%d%ls%d%ls%ls%ls%ls", date.month, sep1, date.day, sep2, weekStart, week, weekEnd);
|
||||
swprintf(text, textLen, scTextDateJpnFormat, date.month, sep1, date.day, sep2, weekStart, week, weekEnd);
|
||||
}
|
||||
#endif
|
||||
|
||||
void Board::get_text_kor(const utility::Date& date, wchar_t* text, u32 textLen) {
|
||||
wchar_t scTextDateKorFormat[] = L"%d%ls %d%ls%ls%ls%ls";
|
||||
#ifndef IPL_BOARD_DATE_HELPERS_INLINE
|
||||
inline void Board::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);
|
||||
@@ -1410,9 +1435,25 @@ namespace ipl {
|
||||
const wchar_t* weekStart = msgMgr->getMessage(MESG_CALENDAR_WEEK_START);
|
||||
const wchar_t* weekEnd = msgMgr->getMessage(MESG_CALENDAR_WEEK_END);
|
||||
|
||||
swprintf(text, textLen, L"%d%ls %d%ls%ls%ls%ls", date.month, sep1, date.day, sep2, weekStart, week, weekEnd);
|
||||
swprintf(text, textLen, scTextDateKorFormat, date.month, sep1, date.day, sep2, weekStart, week, weekEnd);
|
||||
}
|
||||
#endif
|
||||
|
||||
}
|
||||
namespace utility {
|
||||
int Calendar::getWeek(const Date& date) NO_INLINE {
|
||||
int month, year, day;
|
||||
month = date.month;
|
||||
day = date.day;
|
||||
year = date.year;
|
||||
if (month <= 2) {
|
||||
year--;
|
||||
month += MAX_MONTH;
|
||||
}
|
||||
return (day + (((month * 13) + 8) / 5) + ((year / 400) + ((year + (year / 4)) - (year / 100)))) % 7;
|
||||
}
|
||||
}
|
||||
namespace scene {
|
||||
void Board::get_text_spa(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)]);
|
||||
@@ -1420,14 +1461,17 @@ namespace ipl {
|
||||
swprintf(text, textLen, L"%ls %02d-%02d", week, date.day, date.month);
|
||||
}
|
||||
|
||||
void Board::get_text_ger(const utility::Date& date, wchar_t* text, u32 textLen) {
|
||||
wchar_t scTextDateGerFormat[] = L"%02d.%02d.%ls%ls%ls";
|
||||
#ifndef IPL_BOARD_DATE_HELPERS_INLINE
|
||||
inline void Board::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, L"%02d.%02d.%ls%ls%ls", date.day, date.month, weekStart, week, weekEnd);
|
||||
swprintf(text, textLen, scTextDateGerFormat, date.day, date.month, weekStart, week, weekEnd);
|
||||
}
|
||||
#endif
|
||||
|
||||
void Board::get_text_usaeng(const utility::Date& date, wchar_t* text, u32 textLen) {
|
||||
message::Manager* msgMgr = System::getMessageManager();
|
||||
@@ -1443,12 +1487,15 @@ namespace ipl {
|
||||
swprintf(text, textLen, L"%ls %02d-%02d", week, date.month, date.day);
|
||||
}
|
||||
|
||||
void Board::get_text_paleng(const utility::Date& date, wchar_t* text, u32 textLen) {
|
||||
wchar_t scTextDatePalengFormat[] = L"%ls %02d/%02d";
|
||||
#ifndef IPL_BOARD_DATE_HELPERS_INLINE
|
||||
inline void Board::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, L"%ls %02d/%02d", week, date.day, date.month);
|
||||
swprintf(text, textLen, scTextDatePalengFormat, week, date.day, date.month);
|
||||
}
|
||||
#endif
|
||||
|
||||
void Board::show_ricon() {
|
||||
u8 prev = mbRIconEnable;
|
||||
@@ -1565,31 +1612,30 @@ namespace ipl {
|
||||
void Board::edge_arrow() {
|
||||
Button* button = get_button();
|
||||
|
||||
if (System::getScene(SCENE_CHANNEL_SELECT) == NULL && System::getReservedScene() == NULL) {
|
||||
if (mState == STATE_WAIT_CHILD_CST) {
|
||||
} else {
|
||||
enable_licon();
|
||||
enable_ricon();
|
||||
if (System::getScene(SCENE_CHANNEL_SELECT) != NULL || System::getReservedScene() != NULL || mState == STATE_WAIT_CHILD_CST) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (mCurrentDate == utility::Date::getMaxDate()) {
|
||||
if (button->isArrowVisible(Button::ARROW_BTN_RIGHT) && mbRIconEnable != true) {
|
||||
button->animation(Button::IDANIM_ARROW_RIGHT_DISAPPEAR);
|
||||
}
|
||||
if (!button->isArrowVisible(Button::ARROW_BTN_LEFT)) {
|
||||
button->animation(Button::IDANIM_ARROW_LEFT_APPEAR);
|
||||
}
|
||||
} else {
|
||||
if (mCurrentDate == utility::Date::getMinDate()) {
|
||||
if (button->isArrowVisible(Button::ARROW_BTN_LEFT) && mbLIconEnable != true) {
|
||||
button->animation(Button::IDANIM_ARROW_LEFT_DISAPPEAR);
|
||||
}
|
||||
if (!button->isArrowVisible(Button::ARROW_BTN_RIGHT)) {
|
||||
button->animation(Button::IDANIM_ARROW_RIGHT_APPEAR);
|
||||
}
|
||||
} else {
|
||||
appear_arrow();
|
||||
}
|
||||
enable_licon();
|
||||
enable_ricon();
|
||||
|
||||
if (mCurrentDate == utility::Date::getMaxDate()) {
|
||||
if (button->isArrowVisible(Button::ARROW_BTN_RIGHT) && mbRIconEnable != true) {
|
||||
button->animation(Button::IDANIM_ARROW_RIGHT_DISAPPEAR);
|
||||
}
|
||||
if (!button->isArrowVisible(Button::ARROW_BTN_LEFT)) {
|
||||
button->animation(Button::IDANIM_ARROW_LEFT_APPEAR);
|
||||
}
|
||||
} else {
|
||||
if (mCurrentDate == utility::Date::getMinDate()) {
|
||||
if (button->isArrowVisible(Button::ARROW_BTN_LEFT) && mbLIconEnable != true) {
|
||||
button->animation(Button::IDANIM_ARROW_LEFT_DISAPPEAR);
|
||||
}
|
||||
if (!button->isArrowVisible(Button::ARROW_BTN_RIGHT)) {
|
||||
button->animation(Button::IDANIM_ARROW_RIGHT_APPEAR);
|
||||
}
|
||||
} else {
|
||||
appear_arrow();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1675,6 +1721,12 @@ namespace ipl {
|
||||
return result;
|
||||
}
|
||||
|
||||
static inline nw4r::math::VEC3 addTranslate(const nw4r::math::VEC3& a, const nw4r::math::VEC3& b) {
|
||||
nw4r::math::VEC3 sum;
|
||||
nw4r::math::VEC3Add(&sum, &a, &b);
|
||||
return sum;
|
||||
}
|
||||
|
||||
void Board::calc_board_object() {
|
||||
nw4r::lyt::Pane* pane = mpLayoutBg->FindPaneByName("N_TopBack");
|
||||
|
||||
@@ -1682,8 +1734,7 @@ namespace ipl {
|
||||
FOREACH_OBJ_IN_LIST(object) {
|
||||
nw4r::lyt::Pane* posPane = mpLayoutBg->FindPaneByName(scScrollPane[get_date_label(object->mBoardDate)]);
|
||||
|
||||
math::VEC3 pos;
|
||||
nw4r::math::VEC3Add(&pos, &pane->GetTranslate(), &posPane->GetTranslate());
|
||||
math::VEC3 pos = addTranslate(pane->GetTranslate(), posPane->GetTranslate());
|
||||
|
||||
object->calc(math::VEC2(pos.x, pos.y));
|
||||
}
|
||||
@@ -2024,6 +2075,7 @@ namespace ipl {
|
||||
}
|
||||
}
|
||||
|
||||
#ifndef IPL_BOARD_INLINE_GETTERS
|
||||
Button* Board::get_button() {
|
||||
return static_cast<Button*>(System::getScene(SCENE_BUTTON));
|
||||
}
|
||||
@@ -2031,5 +2083,6 @@ namespace ipl {
|
||||
Arrow* Board::get_arrow() {
|
||||
return static_cast<Arrow*>(System::getScene(SCENE_ARROW));
|
||||
}
|
||||
#endif
|
||||
} // namespace scene
|
||||
} // namespace ipl
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
#define IPL_BOARD_OBJECT_EXTERNAL_DYNAMIC_CAST
|
||||
#define IPL_BOARD_OBJECT_INLINE_INTERPOLATION_DTORS
|
||||
|
||||
#include "iplSceneUI.h"
|
||||
|
||||
#include "scene/board/iplBoard.h"
|
||||
@@ -43,6 +46,10 @@ extern "C" void __ct__Q33ipl4math4VEC2Fff(ipl::math::VEC2*, f32, f32);
|
||||
#define PICTURE_THUMB_HEIGHT 48
|
||||
|
||||
namespace ipl {
|
||||
namespace math {
|
||||
template <> inline LinearIntp<VEC2>::~LinearIntp() {}
|
||||
template <> inline Interporation<VEC2>::~Interporation() {}
|
||||
}
|
||||
namespace scene {
|
||||
// clang-format off
|
||||
const char* BoardObject::mAnimNames[BoardObject::TYPE_MAX][1+BoardObject::ANIM_MAX] = {
|
||||
@@ -478,8 +485,10 @@ namespace ipl {
|
||||
}
|
||||
|
||||
void BoardObject::stt_stand() {
|
||||
f32 dVar2 = nw4r::math::CosFIdx((0.7111111f * (mStandData.unk_0x0C * 30.0f + 30.0f)));
|
||||
f32 dVar3 = nw4r::math::SinFIdx((0.7111111f * (mStandData.unk_0x0C * 30.0f + 30.0f)));
|
||||
f32 degrees = mStandData.unk_0x0C * 30.0f + 30.0f;
|
||||
f32 dVar2 = nw4r::math::CosFIdx(degrees * 0.7111111f);
|
||||
degrees = mStandData.unk_0x0C * 30.0f + 30.0f;
|
||||
f32 dVar3 = nw4r::math::SinFIdx(degrees * 0.7111111f);
|
||||
|
||||
math::VEC2 standPos;
|
||||
__ct__Q33ipl4math4VEC2Fff(&standPos, dVar3 * 160.0f, dVar2 * 160.0f);
|
||||
@@ -879,14 +888,5 @@ namespace ipl {
|
||||
return result;
|
||||
}
|
||||
|
||||
#ifndef NON_MATCHING
|
||||
void forceWeakFunc(nw4r::math::VEC2& vec) {
|
||||
nw4r::math::VEC2 end(vec / 10.0f);
|
||||
}
|
||||
#endif
|
||||
|
||||
void GenerateWEAK() {
|
||||
nw4r::lyt::TextBox* textBox = nw4r::ut::DynamicCast<nw4r::lyt::TextBox*>(((nw4r::lyt::Pane*)NULL)->FindPaneByName(NULL));
|
||||
}
|
||||
} // namespace scene
|
||||
} // namespace ipl
|
||||
|
||||
@@ -879,11 +879,8 @@ namespace ipl {
|
||||
}
|
||||
|
||||
BOOL Calendar::is_lower_limit() {
|
||||
static const f32 pad0 __attribute__((section(".data"), aligned(1), used)) = 0.0f;
|
||||
return mpBoardDate->year == mscMinDate.year && mpBoardDate->month == mscMinDate.month;
|
||||
}
|
||||
__declspec(weak) f32 calendar_data_pad() {
|
||||
static const f32 pad __attribute__((section(".data"), aligned(1))) = 0.0f;
|
||||
return *((volatile const f32*)&pad);
|
||||
}
|
||||
} // namespace scene
|
||||
} // namespace ipl
|
||||
|
||||
@@ -60,9 +60,11 @@ namespace ipl {
|
||||
// clang-format on
|
||||
|
||||
utility::Date Date::mscMinDate(MIN_YEAR, MIN_MONTH, MIN_DAY);
|
||||
MaxDate Date::mscMaxDate(MAX_YEAR, MAX_MONTH, MAX_DAY);
|
||||
utility::Date Date::mscMaxDate(MAX_YEAR, MAX_MONTH, MAX_DAY);
|
||||
|
||||
DECOMP_FORCE_ACTIVE(iplDate_cpp, &Date::mscMaxDate);
|
||||
u8 padding[0x10];
|
||||
|
||||
DECOMP_FORCE_ACTIVE(iplDate_cpp, padding);
|
||||
|
||||
Date::Date(EGG::Heap* heap, nand::LayoutFile* file, const char* layoutFolder, const char* layoutFileName)
|
||||
: ::gui::EventHandler(), mbAppearMsg(0), unk_0x10(0), unk_0x14(0), mpLayout(NULL), mpCurrentPaneAnim(0), unk_0x3C(0) {
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
#define IPL_ANM_CONTROLLER_FORWARD_GUI
|
||||
#include "scene/channelEdit/iplAnmController.h"
|
||||
#undef IPL_ANM_CONTROLLER_FORWARD_GUI
|
||||
|
||||
#include "scene/channelEdit/iplChanAppBase.h"
|
||||
|
||||
#include "scene/channelEdit/iplChannelEdit.h"
|
||||
|
||||
@@ -7,11 +7,18 @@
|
||||
|
||||
namespace ipl {
|
||||
namespace math {
|
||||
static inline VEC3 add(const VEC3& a, const VEC3& b) {
|
||||
VEC3 sum;
|
||||
VEC3Add(&sum, &a, &b);
|
||||
return sum;
|
||||
}
|
||||
|
||||
template <>
|
||||
VEC3 LinearIntp<VEC3>::get() const {
|
||||
VEC3 r = mEnd * getCurrentFrame();
|
||||
r += mStart * (mMaxFrame - mFrame);
|
||||
return r * (f64)(1.0f / getMaxFrame());
|
||||
nw4r::math::VEC3 result;
|
||||
VEC3 sum = add(mStart * (mMaxFrame - mFrame), mEnd * getCurrentFrame());
|
||||
VEC3Scale(&result, &sum, 1.0f / getMaxFrame());
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,3 +1,4 @@
|
||||
#define IPL_CHANNEL_TITLE_NOVTABLE
|
||||
#include <revolution/types.h>
|
||||
#define vu8 u8
|
||||
#include "system/iplChannelManager.h"
|
||||
@@ -19,113 +20,196 @@
|
||||
#include <private/os.h>
|
||||
#include <private/wpad.h>
|
||||
|
||||
#pragma dont_instantiate ipl::math::HermiteIntp<float>
|
||||
|
||||
#undef IPL_CHANNEL_TITLE_NOVTABLE
|
||||
|
||||
// :)
|
||||
#define PREV_LOADED_INDEX (1 - mLoadedIndex)
|
||||
|
||||
namespace ipl {
|
||||
namespace scene {
|
||||
ESTicketView ChannelTitle::msTicketView;
|
||||
ChannelTitle::TicketViewStorage ChannelTitle::msTicketView ALIGN32;
|
||||
ESTicketView ChannelTitle::msUnlockTicket;
|
||||
|
||||
extern "C" char lbl_81696A10[];
|
||||
extern "C" char lbl_81696A17[];
|
||||
extern "C" char lbl_81696A28[];
|
||||
extern "C" char lbl_81696A34[];
|
||||
extern "C" char lbl_81696A3A[];
|
||||
extern "C" char lbl_81696A44[];
|
||||
extern "C" char lbl_81696A54[];
|
||||
extern "C" char lbl_81696A5A[];
|
||||
extern "C" char lbl_81696A60[];
|
||||
extern "C" char lbl_81696A66[];
|
||||
extern "C" char lbl_81696A6C[];
|
||||
extern "C" char lbl_81696A72[];
|
||||
extern "C" char lbl_81696A78[];
|
||||
extern "C" char lbl_81696A7E[];
|
||||
extern "C" char lbl_81696A84[];
|
||||
extern "C" char lbl_81696A8A[];
|
||||
extern "C" char lbl_81696A90[];
|
||||
extern "C" char lbl_81696A96[];
|
||||
extern "C" char lbl_81696A9C[];
|
||||
extern "C" char lbl_81696AA3[];
|
||||
|
||||
// clang-format off
|
||||
const char* ChannelTitle::mscBtnNames[BTN_MAX] = {
|
||||
"B_BtnA",
|
||||
"B_BtnB",
|
||||
};
|
||||
extern "C" char lbl_8164E768[] = "G_FocusBtnA";
|
||||
extern "C" char lbl_8164E774[] = "G_FocusBtnB";
|
||||
extern "C" char lbl_8164E780[] = "G_SelectBtnA";
|
||||
extern "C" char lbl_8164E78D[] = "G_SelectBtnB";
|
||||
extern "C" char lbl_8164E79A[] = "G_OnOffBtnA";
|
||||
extern "C" char lbl_8164E7A6[] = "G_OnOffBtnB";
|
||||
extern "C" char lbl_8164E7B2[] = "G_ChangeTextA";
|
||||
extern "C" char lbl_8164E7C0[] = "G_ChangeTextB";
|
||||
|
||||
const char* ChannelTitle::mscChangeName[] = {
|
||||
"Change"
|
||||
};
|
||||
|
||||
const char* ChannelTitle::mscAnimGroups[ANIM_GRP_MAX+1] = {
|
||||
"G_FocusBtnA",
|
||||
"G_FocusBtnB",
|
||||
"G_SelectBtnA",
|
||||
"G_SelectBtnB",
|
||||
"G_OnOffBtnA",
|
||||
"G_OnOffBtnB",
|
||||
"G_ChangeTextA",
|
||||
"G_ChangeTextB",
|
||||
NULL // ?
|
||||
};
|
||||
|
||||
const char* ChannelTitle::mscAnimNames[ANIM_MAX] = {
|
||||
"my_ChTop_a_FocusBtnA_off.brlan",
|
||||
"my_ChTop_a_FocusBtn_on.brlan",
|
||||
"my_ChTop_a_SelectBtn_Ac.brlan",
|
||||
"my_ChTop_a_OffBtn.brlan",
|
||||
"my_ChTop_a_OnBtn.brlan",
|
||||
"my_ChTop_a_ChangeTextOut.brlan",
|
||||
"my_ChTop_a_ChangeTextIn.brlan",
|
||||
"my_ChTop_a_ChangeIn.brlan",
|
||||
"my_ChTop_a_ChangeRoop.brlan",
|
||||
"my_ChTop_a_ChangeOut.brlan"
|
||||
};
|
||||
|
||||
const char* ChannelTitle::mscBannerAnims[BANNER_ANIM_MAX] = {
|
||||
"banner.brlan",
|
||||
"banner_Start.brlan",
|
||||
"banner_Loop.brlan"
|
||||
};
|
||||
|
||||
const char* ChannelTitle::mscDiskGroups[DISK_ANIM_GRP_MAX] = {
|
||||
"G_Comment0",
|
||||
"G_Wii",
|
||||
"G_GC",
|
||||
// Not including the unused "G_DVD"
|
||||
"G_DiskIn",
|
||||
const char* scAnimGroups[8+1] = {
|
||||
lbl_8164E768,
|
||||
lbl_8164E774,
|
||||
lbl_8164E780,
|
||||
lbl_8164E78D,
|
||||
lbl_8164E79A,
|
||||
lbl_8164E7A6,
|
||||
lbl_8164E7B2,
|
||||
lbl_8164E7C0,
|
||||
NULL
|
||||
};
|
||||
|
||||
const char* ChannelTitle::mscDiskAnimNames[DISK_ANIM_MAX] = {
|
||||
"my_DiskCh_a_Start.brlan",
|
||||
"my_DiskCh_a_DiskStart.brlan",
|
||||
"my_DiskCh_a_DiskLoop.brlan",
|
||||
"my_DiskCh_a_DiskEnd.brlan",
|
||||
"my_DiskCh_a_DiskLost.brlan",
|
||||
"my_DiskCh_a_DiskIn.brlan",
|
||||
"my_DiskCh_a_DiskEject.brlan",
|
||||
"my_DiskCh_a_Unknown.brlan",
|
||||
"my_DiskCh_a_UnknownLoop.brlan",
|
||||
"my_DiskCh_a_UnknwnEject.brlan"
|
||||
extern "C" char lbl_8164E7F4[] = "my_ChTop_a_FocusBtnA_off.brlan";
|
||||
extern "C" char lbl_8164E813[] = "my_ChTop_a_FocusBtn_on.brlan";
|
||||
extern "C" char lbl_8164E830[] = "my_ChTop_a_SelectBtn_Ac.brlan";
|
||||
extern "C" char lbl_8164E84E[] = "my_ChTop_a_OffBtn.brlan";
|
||||
extern "C" char lbl_8164E866[] = "my_ChTop_a_OnBtn.brlan";
|
||||
extern "C" char lbl_8164E87D[] = "my_ChTop_a_ChangeTextOut.brlan";
|
||||
extern "C" char lbl_8164E89C[] = "my_ChTop_a_ChangeTextIn.brlan";
|
||||
extern "C" char lbl_8164E8BA[] = "my_ChTop_a_ChangeIn.brlan";
|
||||
extern "C" char lbl_8164E8D4[] = "my_ChTop_a_ChangeRoop.brlan";
|
||||
extern "C" char lbl_8164E8F0[] = "my_ChTop_a_ChangeOut.brlan";
|
||||
|
||||
const char* scAnimNames[10] = {
|
||||
lbl_8164E7F4,
|
||||
lbl_8164E813,
|
||||
lbl_8164E830,
|
||||
lbl_8164E84E,
|
||||
lbl_8164E866,
|
||||
lbl_8164E87D,
|
||||
lbl_8164E89C,
|
||||
lbl_8164E8BA,
|
||||
lbl_8164E8D4,
|
||||
lbl_8164E8F0
|
||||
};
|
||||
|
||||
const char* ChannelTitle::mscDiskLytFile[] = {
|
||||
"my_DiskCh_a.brlyt"
|
||||
extern "C" char lbl_8164E934[] = "banner.brlan";
|
||||
extern "C" char lbl_8164E941[] = "banner_Start.brlan";
|
||||
extern "C" char lbl_8164E954[] = "banner_Loop.brlan";
|
||||
|
||||
const char* scBannerAnims[3] = {
|
||||
lbl_8164E934,
|
||||
lbl_8164E941,
|
||||
lbl_8164E954
|
||||
};
|
||||
|
||||
const char* ChannelTitle::mscGCAnimGroups[] = {
|
||||
"G_Back"
|
||||
extern "C" char lbl_8164E974[] = "G_Comment0";
|
||||
extern "C" char lbl_8164E97F[] = "G_DiskIn";
|
||||
|
||||
const char* scDiskGroups[5] = {
|
||||
lbl_8164E974,
|
||||
lbl_81696A34,
|
||||
lbl_81696A3A,
|
||||
lbl_8164E97F,
|
||||
NULL
|
||||
};
|
||||
|
||||
const char* ChannelTitle::mscGCAnimNames[] = {
|
||||
"my_GCTop_a_BackLoop.brlan"
|
||||
extern "C" char lbl_8164E99C[] = "my_DiskCh_a_Start.brlan";
|
||||
extern "C" char lbl_8164E9B4[] = "my_DiskCh_a_DiskStart.brlan";
|
||||
extern "C" char lbl_8164E9D0[] = "my_DiskCh_a_DiskLoop.brlan";
|
||||
extern "C" char lbl_8164E9EB[] = "my_DiskCh_a_DiskEnd.brlan";
|
||||
extern "C" char lbl_8164EA05[] = "my_DiskCh_a_DiskLost.brlan";
|
||||
extern "C" char lbl_8164EA20[] = "my_DiskCh_a_DiskIn.brlan";
|
||||
extern "C" char lbl_8164EA39[] = "my_DiskCh_a_DiskEject.brlan";
|
||||
extern "C" char lbl_8164EA55[] = "my_DiskCh_a_Unknown.brlan";
|
||||
extern "C" char lbl_8164EA6F[] = "my_DiskCh_a_UnknownLoop.brlan";
|
||||
extern "C" char lbl_8164EA8D[] = "my_DiskCh_a_UnknwnEject.brlan";
|
||||
|
||||
const char* scDiskAnimNames[10] = {
|
||||
lbl_8164E99C,
|
||||
lbl_8164E9B4,
|
||||
lbl_8164E9D0,
|
||||
lbl_8164E9EB,
|
||||
lbl_8164EA05,
|
||||
lbl_8164EA20,
|
||||
lbl_8164EA39,
|
||||
lbl_8164EA55,
|
||||
lbl_8164EA6F,
|
||||
lbl_8164EA8D
|
||||
};
|
||||
|
||||
static const char* scWidePanes[3][4] = {
|
||||
extern "C" char lbl_8164EAD4[] = "my_DiskCh_a.brlyt";
|
||||
extern "C" char lbl_8164EAE6[] = "my_GCTop_a_BackLoop.brlan";
|
||||
|
||||
#pragma push
|
||||
#pragma section data_type ".sdata"
|
||||
extern "C" char lbl_81696A10[] = "B_BtnA";
|
||||
extern "C" char lbl_81696A17[] = "B_BtnB";
|
||||
extern "C" const char* lbl_81696A20[2] = {
|
||||
lbl_81696A10,
|
||||
lbl_81696A17,
|
||||
};
|
||||
extern "C" char lbl_81696A28[] = "Change";
|
||||
extern "C" const char* lbl_81696A30[] = {
|
||||
lbl_81696A28,
|
||||
};
|
||||
extern "C" char lbl_81696A34[] = "G_Wii";
|
||||
extern "C" char lbl_81696A3A[] = "G_GC";
|
||||
const char* scLayoutNames[] = {
|
||||
lbl_8164EAD4,
|
||||
};
|
||||
extern "C" char lbl_81696A44[] = "G_Back";
|
||||
const char* scGCAnimGroups[] = {
|
||||
lbl_81696A44,
|
||||
};
|
||||
const char* scGCAnimNames[] = {
|
||||
lbl_8164EAE6,
|
||||
};
|
||||
extern "C" char lbl_81696A54[] = "Fre_a";
|
||||
extern "C" char lbl_81696A5A[] = "Fre_d";
|
||||
extern "C" char lbl_81696A60[] = "Fre_i";
|
||||
extern "C" char lbl_81696A66[] = "Fre_l";
|
||||
extern "C" char lbl_81696A6C[] = "Fre_e";
|
||||
extern "C" char lbl_81696A72[] = "Fre_f";
|
||||
extern "C" char lbl_81696A78[] = "Fre_g";
|
||||
extern "C" char lbl_81696A7E[] = "Fre_h";
|
||||
extern "C" char lbl_81696A84[] = "Fre_b";
|
||||
extern "C" char lbl_81696A8A[] = "Fre_c";
|
||||
extern "C" char lbl_81696A90[] = "Fre_j";
|
||||
extern "C" char lbl_81696A96[] = "Fre_k";
|
||||
extern "C" char lbl_81696A9C[] = "T_BtnA";
|
||||
extern "C" char lbl_81696AA3[] = "T_BtnB";
|
||||
const char* lbl_81696AAC[] = {
|
||||
lbl_81696A9C,
|
||||
lbl_81696AA3,
|
||||
};
|
||||
#pragma pop
|
||||
|
||||
const char* scWidePanes[3][4] = {
|
||||
{
|
||||
"Fre_a",
|
||||
"Fre_d",
|
||||
"Fre_i",
|
||||
"Fre_l",
|
||||
lbl_81696A54,
|
||||
lbl_81696A5A,
|
||||
lbl_81696A60,
|
||||
lbl_81696A66,
|
||||
}, {
|
||||
"Fre_e",
|
||||
"Fre_f",
|
||||
"Fre_g",
|
||||
"Fre_h",
|
||||
lbl_81696A6C,
|
||||
lbl_81696A72,
|
||||
lbl_81696A78,
|
||||
lbl_81696A7E,
|
||||
}, {
|
||||
"Fre_b",
|
||||
"Fre_c",
|
||||
"Fre_j",
|
||||
"Fre_k",
|
||||
lbl_81696A84,
|
||||
lbl_81696A8A,
|
||||
lbl_81696A90,
|
||||
lbl_81696A96,
|
||||
}
|
||||
};
|
||||
|
||||
const char* ChannelTitle::mscButtonTextName[BTN_MAX] = {
|
||||
"T_BtnA",
|
||||
"T_BtnB"
|
||||
};
|
||||
|
||||
static const f32 cfChanThumbOfss[2][2] = {
|
||||
{
|
||||
64.0f,
|
||||
@@ -137,9 +221,6 @@ namespace ipl {
|
||||
}
|
||||
};
|
||||
|
||||
// Titles:
|
||||
// Tiger Woods PGA Tour 08
|
||||
// Tiger Woods PGA Tour 07
|
||||
static const ESTitleId scSoundSizeSkipTitles[] = {
|
||||
'RT8\0',
|
||||
'RT7\0'
|
||||
@@ -260,12 +341,12 @@ namespace ipl {
|
||||
}
|
||||
}
|
||||
|
||||
setMessage(mpLayout->FindPaneByName(mscButtonTextName[0]), MESG_CMN_WII_MENU);
|
||||
setMessage(mpLayout->FindPaneByName(lbl_81696AAC[0]), MESG_CMN_WII_MENU);
|
||||
|
||||
if (System::getChannelManager()->checkNeedUpdate(mChanPage, mChanIndex)) {
|
||||
setMessage(mpLayout->FindPaneByName(mscButtonTextName[BTN_B]), MESG_CHAN_TTL_BTN_UPDATE);
|
||||
setMessage(mpLayout->FindPaneByName(lbl_81696AAC[BTN_B]), MESG_CHAN_TTL_BTN_UPDATE);
|
||||
} else {
|
||||
setMessage(mpLayout->FindPaneByName(mscButtonTextName[BTN_B]), MESG_CMN_START);
|
||||
setMessage(mpLayout->FindPaneByName(lbl_81696AAC[BTN_B]), MESG_CMN_START);
|
||||
}
|
||||
|
||||
if (isEnableToExecute(mChanPage, mChanIndex)) {
|
||||
@@ -273,43 +354,43 @@ namespace ipl {
|
||||
}
|
||||
|
||||
mpGrpAnims[ANIM_GRP_FOCUS_BTN_A][ANIM_BTM_FOCUS_IN] =
|
||||
mpLayout->bindToGroup(mscAnimNames[ANIM_BTM_FOCUS_IN], mscAnimGroups[ANIM_GRP_FOCUS_BTN_A], false, false);
|
||||
mpLayout->bindToGroup(scAnimNames[ANIM_BTM_FOCUS_IN], scAnimGroups[ANIM_GRP_FOCUS_BTN_A], false, false);
|
||||
mpGrpAnims[ANIM_GRP_FOCUS_BTN_A][ANIM_BTM_FOCUS_OUT] =
|
||||
mpLayout->bindToGroup(mscAnimNames[ANIM_BTM_FOCUS_OUT], mscAnimGroups[ANIM_GRP_FOCUS_BTN_A], false);
|
||||
mpLayout->bindToGroup(scAnimNames[ANIM_BTM_FOCUS_OUT], scAnimGroups[ANIM_GRP_FOCUS_BTN_A], false);
|
||||
|
||||
if (mpChanSelScn->mStartType == ChannelSelect::START_FROM_CHJUMP && isEnableToExecute(mChanPage, mChanIndex)) {
|
||||
mpGrpAnims[ANIM_GRP_FOCUS_BTN_B][ANIM_BTM_FOCUS_IN] =
|
||||
mpLayout->bindToGroup(mscAnimNames[ANIM_BTM_FOCUS_IN], mscAnimGroups[ANIM_GRP_FOCUS_BTN_B], false);
|
||||
mpLayout->bindToGroup(scAnimNames[ANIM_BTM_FOCUS_IN], scAnimGroups[ANIM_GRP_FOCUS_BTN_B], false);
|
||||
mpGrpAnims[ANIM_GRP_FOCUS_BTN_B][ANIM_BTM_FOCUS_OUT] =
|
||||
mpLayout->bindToGroup(mscAnimNames[ANIM_BTM_FOCUS_OUT], mscAnimGroups[ANIM_GRP_FOCUS_BTN_B], false, false);
|
||||
mpLayout->bindToGroup(scAnimNames[ANIM_BTM_FOCUS_OUT], scAnimGroups[ANIM_GRP_FOCUS_BTN_B], false, false);
|
||||
} else {
|
||||
mpGrpAnims[ANIM_GRP_FOCUS_BTN_B][ANIM_BTM_FOCUS_IN] =
|
||||
mpLayout->bindToGroup(mscAnimNames[ANIM_BTM_FOCUS_IN], mscAnimGroups[ANIM_GRP_FOCUS_BTN_B], false, false);
|
||||
mpLayout->bindToGroup(scAnimNames[ANIM_BTM_FOCUS_IN], scAnimGroups[ANIM_GRP_FOCUS_BTN_B], false, false);
|
||||
mpGrpAnims[ANIM_GRP_FOCUS_BTN_B][ANIM_BTM_FOCUS_OUT] = mpLayout->bindToGroup(
|
||||
mscAnimNames[ANIM_BTM_FOCUS_OUT], mscAnimGroups[ANIM_GRP_FOCUS_BTN_B], false, isEnableToExecute(mChanPage, mChanIndex));
|
||||
scAnimNames[ANIM_BTM_FOCUS_OUT], scAnimGroups[ANIM_GRP_FOCUS_BTN_B], false, isEnableToExecute(mChanPage, mChanIndex));
|
||||
}
|
||||
|
||||
mpGrpAnims[ANIM_GRP_SELECT_BTN_A][ANIM_SELECT_BTN] =
|
||||
mpLayout->bindToGroup(mscAnimNames[ANIM_SELECT_BTN], mscAnimGroups[ANIM_GRP_SELECT_BTN_A], false, false);
|
||||
mpLayout->bindToGroup(scAnimNames[ANIM_SELECT_BTN], scAnimGroups[ANIM_GRP_SELECT_BTN_A], false, false);
|
||||
mpGrpAnims[ANIM_GRP_SELECT_BTN_B][ANIM_SELECT_BTN] =
|
||||
mpLayout->bindToGroup(mscAnimNames[ANIM_SELECT_BTN], mscAnimGroups[ANIM_GRP_SELECT_BTN_B], false, false);
|
||||
mpLayout->bindToGroup(scAnimNames[ANIM_SELECT_BTN], scAnimGroups[ANIM_GRP_SELECT_BTN_B], false, false);
|
||||
mpGrpAnims[ANIM_GRP_ONOFF_BTN_A][ANIM_OFF_BTN] =
|
||||
mpLayout->bindToGroup(mscAnimNames[ANIM_OFF_BTN], mscAnimGroups[ANIM_GRP_ONOFF_BTN_A], false, false);
|
||||
mpLayout->bindToGroup(scAnimNames[ANIM_OFF_BTN], scAnimGroups[ANIM_GRP_ONOFF_BTN_A], false, false);
|
||||
mpGrpAnims[ANIM_GRP_ONOFF_BTN_B][ANIM_OFF_BTN] =
|
||||
mpLayout->bindToGroup(mscAnimNames[ANIM_OFF_BTN], mscAnimGroups[ANIM_GRP_ONOFF_BTN_B], false, false);
|
||||
mpLayout->bindToGroup(scAnimNames[ANIM_OFF_BTN], scAnimGroups[ANIM_GRP_ONOFF_BTN_B], false, false);
|
||||
mpGrpAnims[ANIM_GRP_ONOFF_BTN_A][ANIM_ON_BTN] =
|
||||
mpLayout->bindToGroup(mscAnimNames[ANIM_ON_BTN], mscAnimGroups[ANIM_GRP_ONOFF_BTN_A], false, false);
|
||||
mpGrpAnims[ANIM_GRP_ONOFF_BTN_B][ANIM_ON_BTN] = mpLayout->bindToGroup(mscAnimNames[ANIM_ON_BTN], mscAnimGroups[ANIM_GRP_ONOFF_BTN_B],
|
||||
mpLayout->bindToGroup(scAnimNames[ANIM_ON_BTN], scAnimGroups[ANIM_GRP_ONOFF_BTN_A], false, false);
|
||||
mpGrpAnims[ANIM_GRP_ONOFF_BTN_B][ANIM_ON_BTN] = mpLayout->bindToGroup(scAnimNames[ANIM_ON_BTN], scAnimGroups[ANIM_GRP_ONOFF_BTN_B],
|
||||
false, !isEnableToExecute(mChanPage, mChanIndex));
|
||||
|
||||
for (int i = ANIM_GRP_CHANGE_BTN_A; i <= ANIM_GRP_CHANGE_BTN_B; i++) {
|
||||
for (int j = ANIM_CHANGE_TEXT_IN; j <= ANIM_CHANGE_TEXT_OUT; j++) {
|
||||
mpGrpAnims[i][j] = mpLayout->bindToGroup(mscAnimNames[j], mscAnimGroups[i], false, false);
|
||||
mpGrpAnims[i][j] = mpLayout->bindToGroup(scAnimNames[j], scAnimGroups[i], false, false);
|
||||
}
|
||||
}
|
||||
|
||||
for (int i = ANIM_CHANGE_IN; i <= ANIM_CHANGE_OUT; i++) {
|
||||
mpChangeAnims[i] = mpLayout->bind(mscAnimNames[i], mscChangeName[0], false, false);
|
||||
mpChangeAnims[i] = mpLayout->bind(scAnimNames[i], lbl_81696A30[0], false, false);
|
||||
}
|
||||
|
||||
mpLayout->finishBinding();
|
||||
@@ -319,8 +400,8 @@ namespace ipl {
|
||||
mpGui->createLayoutScene(*mpLayout->getNW4RLyt());
|
||||
mpGui->setAllComponentTriggerTarget(false);
|
||||
|
||||
mpGui->getPaneComponentByPane(mpLayout->FindPaneByName(mscBtnNames[BTN_A]))->setTriggerTarget(true);
|
||||
mpGui->getPaneComponentByPane(mpLayout->FindPaneByName(mscBtnNames[BTN_B]))->setTriggerTarget(true);
|
||||
mpGui->getPaneComponentByPane(mpLayout->FindPaneByName(lbl_81696A20[BTN_A]))->setTriggerTarget(true);
|
||||
mpGui->getPaneComponentByPane(mpLayout->FindPaneByName(lbl_81696A20[BTN_B]))->setTriggerTarget(true);
|
||||
|
||||
mpLimitRemainLyt = new layout::Object(getSceneHeap(), mpLayoutFile, "arc", "my_Timer_a.brlyt");
|
||||
mpLimitDoneLyt = new layout::Object(getSceneHeap(), mpLayoutFile, "arc", "my_Timer_b.brlyt");
|
||||
@@ -336,7 +417,7 @@ namespace ipl {
|
||||
updateLockedMsg(LOCKED_MSG_AUTO);
|
||||
dispTimeLimitWindow();
|
||||
|
||||
mpDiskBnrLayout = new layout::Object(getSceneHeap(), mpDiskBnrFile, "arc", mscDiskLytFile[0]);
|
||||
mpDiskBnrLayout = new layout::Object(getSceneHeap(), mpDiskBnrFile, "arc", scLayoutNames[0]);
|
||||
|
||||
bindDiskAnms();
|
||||
|
||||
@@ -773,7 +854,7 @@ namespace ipl {
|
||||
nw4r::ut::Rect drawRect(mDispTrans.x - mpChanSelScn->mChanThumbOff_X, mDispTrans.y + mpChanSelScn->mChanThumbOff_Y,
|
||||
mDispTrans.x + mpChanSelScn->mChanThumbOff_X, mDispTrans.y - mpChanSelScn->mChanThumbOff_Y);
|
||||
|
||||
GXColor textureColor = {255, 255, 255, 255};
|
||||
GXColor textureColor = {255, 255, 255, 0};
|
||||
textureColor.a = (u8)mpZoomAnim->get();
|
||||
utility::Graphics::drawTexture(drawRect, mpCapture->getGXTex(), textureColor, 1);
|
||||
|
||||
@@ -952,7 +1033,7 @@ namespace ipl {
|
||||
} else if (mpGCBannerFile != NULL && lytFile == mpGCBannerFile) {
|
||||
if (mpGCBannerLyt == NULL) {
|
||||
mpGCBannerLyt = layout::Object::create(System::getMem2App(), 0x40000, lytFile, "arc", "my_GCTop_a.brlyt");
|
||||
mpGCBannerAnim = mpGCBannerLyt->bindToGroup(mscGCAnimNames[0], mscGCAnimGroups[0], false);
|
||||
mpGCBannerAnim = mpGCBannerLyt->bindToGroup(scGCAnimNames[0], scGCAnimGroups[0], false);
|
||||
mpGCBannerLyt->finishBinding();
|
||||
mpGCBannerLyt->adjustHeap();
|
||||
}
|
||||
@@ -1106,9 +1187,9 @@ namespace ipl {
|
||||
if (mpGrpAnims[ANIM_GRP_CHANGE_BTN_B][ANIM_CHANGE_TEXT_IN]->getCurrentFrame() ==
|
||||
mpGrpAnims[ANIM_GRP_CHANGE_BTN_B][ANIM_CHANGE_TEXT_IN]->getMaxFrame()) {
|
||||
if (System::getChannelManager()->checkNeedUpdate(mChanPage, mChanIndex)) {
|
||||
setMessage(mpLayout->FindPaneByName(mscButtonTextName[BTN_B]), MESG_CHAN_SEL_UPDATE_BTN, false);
|
||||
setMessage(mpLayout->FindPaneByName(lbl_81696AAC[BTN_B]), MESG_CHAN_SEL_UPDATE_BTN, false);
|
||||
} else {
|
||||
setMessage(mpLayout->FindPaneByName(mscButtonTextName[BTN_B]), MESG_CHAN_SEL_START_BTN, false);
|
||||
setMessage(mpLayout->FindPaneByName(lbl_81696AAC[BTN_B]), MESG_CHAN_SEL_START_BTN, false);
|
||||
}
|
||||
mpGrpAnims[ANIM_GRP_CHANGE_BTN_B][ANIM_CHANGE_TEXT_OUT]->play();
|
||||
mpGrpAnims[ANIM_GRP_CHANGE_BTN_B][ANIM_CHANGE_TEXT_IN]->initAnmFrame();
|
||||
@@ -1771,18 +1852,18 @@ namespace ipl {
|
||||
|
||||
void ChannelTitle::bindChanBaseAnms() {
|
||||
for (int i = 0; i < BANNER_ANIM_MAX; i++) {
|
||||
if (mpChanBannerLyt->searchFile(mscBannerAnims[i])) {
|
||||
if (mpChanBannerLyt->searchFile(scBannerAnims[i])) {
|
||||
if (i == 0) {
|
||||
mpChanBannerAnims[i] = mpChanBannerLyt->bind(mscBannerAnims[i]);
|
||||
mpChanBannerAnims[i] = mpChanBannerLyt->bind(scBannerAnims[i]);
|
||||
mpChanBannerAnims[i]->setAnmType(ANIM_TYPE_LOOP);
|
||||
} else if (i == 1) {
|
||||
mpChanBannerAnims[i] = mpChanBannerLyt->bind(mscBannerAnims[i]);
|
||||
mpChanBannerAnims[i] = mpChanBannerLyt->bind(scBannerAnims[i]);
|
||||
mpChanBannerAnims[i]->setAnmType(ANIM_TYPE_FORWARD);
|
||||
} else {
|
||||
if (mpChanBannerAnims[BANNER_ANIM_START] == NULL) {
|
||||
mpChanBannerAnims[i] = mpChanBannerLyt->bind(mscBannerAnims[i], true);
|
||||
mpChanBannerAnims[i] = mpChanBannerLyt->bind(scBannerAnims[i], true);
|
||||
} else {
|
||||
mpChanBannerAnims[i] = mpChanBannerLyt->bind(mscBannerAnims[i], false);
|
||||
mpChanBannerAnims[i] = mpChanBannerLyt->bind(scBannerAnims[i], false);
|
||||
}
|
||||
mpChanBannerAnims[i]->setAnmType(ANIM_TYPE_LOOP);
|
||||
}
|
||||
@@ -1795,9 +1876,9 @@ namespace ipl {
|
||||
void ChannelTitle::bindDiskAnms() {
|
||||
memset(mpDiskBnrAnims, 0, sizeof(mpDiskBnrAnims));
|
||||
|
||||
mpDiskBnrAnims[DISK_ANIM_GRP_ALL][DISK_ANIM_START] = mpDiskBnrLayout->bind(mscDiskAnimNames[DISK_ANIM_START]);
|
||||
mpDiskBnrAnims[DISK_ANIM_GRP_ALL][DISK_ANIM_START] = mpDiskBnrLayout->bind(scDiskAnimNames[DISK_ANIM_START]);
|
||||
mpDiskBnrAnims[DISK_ANIM_GRP_COMMENT][DISK_ANIM_START] =
|
||||
mpDiskBnrLayout->bindToGroup(mscDiskAnimNames[DISK_ANIM_START], mscDiskGroups[DISK_ANIM_GRP_COMMENT], false, false);
|
||||
mpDiskBnrLayout->bindToGroup(scDiskAnimNames[DISK_ANIM_START], scDiskGroups[DISK_ANIM_GRP_COMMENT], false, false);
|
||||
|
||||
for (int i = DISK_ANIM_GRP_COMMENT; i <= DISK_ANIM_GRP_GC; i++) {
|
||||
for (int j = DISK_ANIM_DISK_START; j <= DISK_ANIM_DISK_IN; j++) {
|
||||
@@ -1805,16 +1886,16 @@ namespace ipl {
|
||||
break;
|
||||
}
|
||||
|
||||
mpDiskBnrAnims[i][j] = mpDiskBnrLayout->bindToGroup(mscDiskAnimNames[j], mscDiskGroups[i], false, false);
|
||||
mpDiskBnrAnims[i][j] = mpDiskBnrLayout->bindToGroup(scDiskAnimNames[j], scDiskGroups[i], false, false);
|
||||
}
|
||||
}
|
||||
|
||||
for (int i = DISK_ANIM_DISK_EJECT; i <= DISK_ANIM_UNKNOWN_EJECT; i++) {
|
||||
mpDiskBnrAnims[DISK_ANIM_GRP_ALL][i] = mpDiskBnrLayout->bind(mscDiskAnimNames[i], false);
|
||||
mpDiskBnrAnims[DISK_ANIM_GRP_ALL][i] = mpDiskBnrLayout->bind(scDiskAnimNames[i], false);
|
||||
}
|
||||
|
||||
mpDiskBnrAnims[DISK_ANIM_GRP_DISK_IN][DISK_ANIM_DISK_IN] =
|
||||
mpDiskBnrLayout->bindToGroup(mscDiskAnimNames[DISK_ANIM_DISK_IN], mscDiskGroups[DISK_ANIM_GRP_DISK_IN], false, false);
|
||||
mpDiskBnrLayout->bindToGroup(scDiskAnimNames[DISK_ANIM_DISK_IN], scDiskGroups[DISK_ANIM_GRP_DISK_IN], false, false);
|
||||
}
|
||||
|
||||
void ChannelTitle::updateDiskState(int page, int index) {
|
||||
@@ -1847,8 +1928,9 @@ namespace ipl {
|
||||
|
||||
bool noDisk = BS2State == bs2::IPL_STATE_NO_DISK;
|
||||
|
||||
nw4r::lyt::Group* group = mpDiskBnrLayout->FindGroupByName(mscDiskGroups[DISK_ANIM_GRP_COMMENT]);
|
||||
for (nw4r::lyt::PaneLinkList::Iterator it = group->GetPaneList().GetBeginIter(); it != group->GetPaneList().GetEndIter();
|
||||
nw4r::lyt::Group* group = mpDiskBnrLayout->FindGroupByName(scDiskGroups[DISK_ANIM_GRP_COMMENT]);
|
||||
nw4r::lyt::Group*& groupAlias = group;
|
||||
for (nw4r::lyt::PaneLinkList::Iterator it = groupAlias->GetPaneList().GetBeginIter(); it != groupAlias->GetPaneList().GetEndIter();
|
||||
it++) {
|
||||
it->mTarget->SetVisible(noDisk);
|
||||
}
|
||||
@@ -1867,9 +1949,10 @@ namespace ipl {
|
||||
!mpDiskBnrAnims[DISK_ANIM_GRP_COMMENT][DISK_ANIM_START]->isPlaying()) {
|
||||
mDiskState = DISK_STATE_IDLE;
|
||||
if (BS2State == bs2::IPL_STATE_NO_DISK) {
|
||||
nw4r::lyt::Group* group = mpDiskBnrLayout->FindGroupByName(mscDiskGroups[DISK_ANIM_GRP_COMMENT]);
|
||||
for (nw4r::lyt::PaneLinkList::Iterator it = group->GetPaneList().GetBeginIter();
|
||||
it != group->GetPaneList().GetEndIter(); it++) {
|
||||
nw4r::lyt::Group* group = mpDiskBnrLayout->FindGroupByName(scDiskGroups[DISK_ANIM_GRP_COMMENT]);
|
||||
nw4r::lyt::Group*& groupAlias = group;
|
||||
for (nw4r::lyt::PaneLinkList::Iterator it = groupAlias->GetPaneList().GetBeginIter();
|
||||
it != groupAlias->GetPaneList().GetEndIter(); it++) {
|
||||
it->mTarget->SetVisible(true);
|
||||
}
|
||||
}
|
||||
@@ -1927,8 +2010,9 @@ namespace ipl {
|
||||
case DISK_STATE_INTERRUPT_EJECT: {
|
||||
if (!mpDiskBnrAnims[DISK_ANIM_GRP_WII][DISK_ANIM_DISK_END]->isPlaying() &&
|
||||
!mpDiskBnrAnims[DISK_ANIM_GRP_GC][DISK_ANIM_DISK_END]->isPlaying()) {
|
||||
nw4r::lyt::Group* group = mpDiskBnrLayout->FindGroupByName(mscDiskGroups[DISK_ANIM_GRP_COMMENT]);
|
||||
for (nw4r::lyt::PaneLinkList::Iterator it = group->GetPaneList().GetBeginIter(); it != group->GetPaneList().GetEndIter();
|
||||
nw4r::lyt::Group* group = mpDiskBnrLayout->FindGroupByName(scDiskGroups[DISK_ANIM_GRP_COMMENT]);
|
||||
nw4r::lyt::Group*& groupAlias = group;
|
||||
for (nw4r::lyt::PaneLinkList::Iterator it = groupAlias->GetPaneList().GetBeginIter(); it != groupAlias->GetPaneList().GetEndIter();
|
||||
it++) {
|
||||
it->mTarget->SetVisible(true);
|
||||
}
|
||||
@@ -2039,8 +2123,9 @@ namespace ipl {
|
||||
mpDiskBnrAnims[DISK_ANIM_GRP_ALL][DISK_ANIM_UNKNOWN_LOOP]->stop();
|
||||
mpDiskBnrAnims[DISK_ANIM_GRP_ALL][DISK_ANIM_UNKNOWN_EJECT]->play();
|
||||
|
||||
nw4r::lyt::Group* group = mpDiskBnrLayout->FindGroupByName(mscDiskGroups[DISK_ANIM_GRP_COMMENT]);
|
||||
for (nw4r::lyt::PaneLinkList::Iterator it = group->GetPaneList().GetBeginIter(); it != group->GetPaneList().GetEndIter();
|
||||
nw4r::lyt::Group* group = mpDiskBnrLayout->FindGroupByName(scDiskGroups[DISK_ANIM_GRP_COMMENT]);
|
||||
nw4r::lyt::Group*& groupAlias = group;
|
||||
for (nw4r::lyt::PaneLinkList::Iterator it = groupAlias->GetPaneList().GetBeginIter(); it != groupAlias->GetPaneList().GetEndIter();
|
||||
it++) {
|
||||
it->mTarget->SetVisible(true);
|
||||
}
|
||||
@@ -2379,7 +2464,7 @@ namespace ipl {
|
||||
if (unk_0x8C == 0) {
|
||||
mpGrpAnims[ANIM_GRP_ONOFF_BTN_B][ANIM_OFF_BTN]->stop();
|
||||
mpGrpAnims[ANIM_GRP_ONOFF_BTN_B][ANIM_ON_BTN]->play();
|
||||
mpGui->initPane(mpLayout->FindPaneByName(mscBtnNames[BTN_B]));
|
||||
mpGui->initPane(mpLayout->FindPaneByName(lbl_81696A20[BTN_B]));
|
||||
mbHovered[BTN_B] = FALSE;
|
||||
}
|
||||
unk_0x8C = 1;
|
||||
@@ -2417,11 +2502,9 @@ namespace ipl {
|
||||
}
|
||||
|
||||
void ChannelTitle::setMessage(nw4r::lyt::Pane* targetPane, u32 msgId, bool alloc) {
|
||||
static const int LENGTH = 255;
|
||||
|
||||
wchar_t msg[LENGTH + 1];
|
||||
wcsncpy(msg, System::getMessage(msgId), LENGTH + 1);
|
||||
msg[LENGTH] = 0;
|
||||
wchar_t msg[255 + 1];
|
||||
wcsncpy(msg, System::getMessage(msgId), 255 + 1);
|
||||
msg[255] = 0;
|
||||
|
||||
nw4r::lyt::TextBox* textBox = nw4r::ut::DynamicCast<nw4r::lyt::TextBox*>(targetPane);
|
||||
if (alloc) {
|
||||
@@ -2602,12 +2685,12 @@ namespace ipl {
|
||||
|
||||
ESTitleId titleId = System::getChannelManager()->getTitleID(chanTtl->mChanPage, chanTtl->mChanIndex);
|
||||
int ticketIdx = System::getChannelManager()->getChannel(chanTtl->mChanPage, chanTtl->mChanIndex).ticketIdx;
|
||||
ESError err = utility::ESMisc::GetTicketView(System::getMem2App(), titleId, &msTicketView, ticketIdx);
|
||||
ESError err = utility::ESMisc::GetTicketView(System::getMem2App(), titleId, &msTicketView.view, ticketIdx);
|
||||
if (err != ES_ERR_OK) {
|
||||
IPLErrorLogAndDisplay(MESG_ERR_FILE, "ES", err, 4789);
|
||||
}
|
||||
|
||||
if (chanTtl->isTimeLimitedTicket(&msTicketView, &chanTtl->mTimeLimitRemain)) {
|
||||
if (chanTtl->isTimeLimitedTicket(&msTicketView.view, &chanTtl->mTimeLimitRemain)) {
|
||||
chanTtl->mLimitType = LIMIT_TYPE_TIME;
|
||||
} else {
|
||||
chanTtl->mLimitType = LIMIT_TYPE_COUNT;
|
||||
@@ -2739,12 +2822,12 @@ namespace ipl {
|
||||
break;
|
||||
}
|
||||
if (con->downTrg(controller::BTN_INTERACT)) {
|
||||
if (strcmp(paneName, ChannelTitle::mscBtnNames[ChannelTitle::BTN_A]) == 0) {
|
||||
if (strcmp(paneName, lbl_81696A20[ChannelTitle::BTN_A]) == 0) {
|
||||
mpInstance->mpGrpAnims[ChannelTitle::ANIM_GRP_SELECT_BTN_A][ChannelTitle::ANIM_SELECT_BTN]->play();
|
||||
snd::getSystem()->startSE("WIPL_SE_BT_PUSH");
|
||||
mpInstance->mState = ChannelTitle::STATE_START_ZOOM_OUT;
|
||||
mpInstance->tryToGoBackward();
|
||||
} else if (strcmp(paneName, ChannelTitle::mscBtnNames[ChannelTitle::BTN_B]) == 0) {
|
||||
} else if (strcmp(paneName, lbl_81696A20[ChannelTitle::BTN_B]) == 0) {
|
||||
if (mpInstance->unk_0x8C != 2) {
|
||||
snd::getSystem()->startSE("WIPL_SE_GRAY_BUTTON");
|
||||
} else {
|
||||
@@ -2758,7 +2841,7 @@ namespace ipl {
|
||||
}
|
||||
case ::gui::EventHandler::ON_POINT: {
|
||||
for (int i = 0; i < ChannelTitle::BTN_MAX; i++) {
|
||||
if (strcmp(paneName, ChannelTitle::mscBtnNames[i]) == 0) {
|
||||
if (strcmp(paneName, lbl_81696A20[i]) == 0) {
|
||||
if (i == 0 || mpInstance->unk_0x8C > 0) {
|
||||
mpInstance->mbHovered[i]++;
|
||||
if (mpInstance->mbHovered[i] <= TRUE) {
|
||||
@@ -2774,7 +2857,7 @@ namespace ipl {
|
||||
}
|
||||
case ::gui::EventHandler::ON_LEFT: {
|
||||
for (int i = 0; i < ChannelTitle::BTN_MAX; i++) {
|
||||
if (strcmp(paneName, ChannelTitle::mscBtnNames[i]) == 0) {
|
||||
if (strcmp(paneName, lbl_81696A20[i]) == 0) {
|
||||
if (i == 0 || mpInstance->unk_0x8C > 0) {
|
||||
mpInstance->mbHovered[i]--;
|
||||
if (mpInstance->mbHovered[i] <= FALSE) {
|
||||
|
||||
@@ -63,6 +63,8 @@ namespace ipl {
|
||||
void KitayamaTest::calcCommon() {
|
||||
}
|
||||
|
||||
#pragma push
|
||||
#pragma ppc_iro_level 2
|
||||
FaderSceneCommand KitayamaTest::calcNormal() {
|
||||
FaderSceneCommand command = FADER_SCN_CONTINUE;
|
||||
controller::Interface* controller = System::getMasterController();
|
||||
@@ -268,6 +270,7 @@ namespace ipl {
|
||||
|
||||
return command;
|
||||
}
|
||||
#pragma pop
|
||||
|
||||
FaderSceneCommand KitayamaTest::calcFadeout() {
|
||||
if (mOption == KITAYAMA_OPT_INIT_NAND) {
|
||||
|
||||
@@ -18,8 +18,6 @@ namespace ipl {
|
||||
return caption;
|
||||
}
|
||||
|
||||
extern "C" char lbl_81650380[0x19] = "my_IplTopBalloon_a.brlyt";
|
||||
|
||||
LetterWriter::LetterWriter(EGG::Heap* heap, int type)
|
||||
: TextWriter(heap), mbToFriend(false), mLetterState(LETTER_STATE_NORMAL), mLetterType((textinput::extend::letter::InputForm::Type)type),
|
||||
mpTextSubjectWork(NULL), mpCaptionString(NULL), mpCaptionAllocator(NULL), mNwc24ErrCountdown2(0) {
|
||||
@@ -91,7 +89,7 @@ namespace ipl {
|
||||
f32 f0 = 30.0f;
|
||||
f32 f1 = 120.0f;
|
||||
mpNigaoeBalloon =
|
||||
new TextBalloon(getSceneHeap(), mpBalloonFile, "arc", lbl_81650380,
|
||||
new TextBalloon(getSceneHeap(), mpBalloonFile, "arc", "my_IplTopBalloon_a.brlyt",
|
||||
math::VEC3(0.0f, (f1 = 120.0f, 0.0f), (f0 = 30.0f, 0.0f)), f1, f0);
|
||||
|
||||
// Scroller
|
||||
@@ -293,6 +291,10 @@ namespace ipl {
|
||||
System::getKeyboard()->endMgr();
|
||||
}
|
||||
|
||||
FaderSceneCommand LetterWriter::calcFadeout() {
|
||||
return TextWriter::calcFadeout();
|
||||
}
|
||||
|
||||
void LetterWriter::onEventDerived(u32 compId, u32 event, const controller::Interface* con) {
|
||||
if (mState != STATE_SEL_FACE) {
|
||||
if (getMemoManager()->getState()->getStateType() != textinput::extend::memo::Manager::ST_Appearing) {
|
||||
@@ -378,30 +380,10 @@ namespace ipl {
|
||||
}
|
||||
}
|
||||
|
||||
FaderSceneCommand LetterWriter::calcFadeout() {
|
||||
return TextWriter::calcFadeout();
|
||||
}
|
||||
|
||||
extern "C" char lbl_816503BF[] = "WIPL_SE_DECIDE";
|
||||
extern "C" char lbl_816503CE[0x12A] =
|
||||
"\x91\x97\x90\x4D\x8E\xB8\x94\x73\n\0"
|
||||
"NWC24InitMsgObj err\n\0"
|
||||
"NWC24SetMsgToId err\n\0"
|
||||
"[to]: %016llu\n\0"
|
||||
"NWC24SetMsgText err\n\0"
|
||||
"RFLSetOfficial2NWC24Msg err = %d\n\0"
|
||||
"NWC24SetMsgMBNoReply err\n\0"
|
||||
"setMsgCommand err\n\0"
|
||||
"NWC24SetMsgAttached err\n\0"
|
||||
"NWC24CommitMsg err\n\0"
|
||||
"NWC24SetMsgToAddr err\n\0"
|
||||
"[LetterWriter]: send to %s\n\0"
|
||||
"setMsgSubjectAndTextPublic err\n\0";
|
||||
|
||||
void LetterWriter::onSend() {
|
||||
Button* button = getButton();
|
||||
|
||||
snd::getSystem()->startSE(lbl_816503BF);
|
||||
snd::getSystem()->startSE("WIPL_SE_DECIDE");
|
||||
|
||||
unk_0x7D = false;
|
||||
|
||||
@@ -417,7 +399,7 @@ namespace ipl {
|
||||
}
|
||||
|
||||
if (sendMessageByNWC24(myUserId, mWCString) != 0) {
|
||||
OSReport(lbl_816503CE);
|
||||
OSReport("送信失敗\n"); // "Send failure"
|
||||
} else {
|
||||
PlayTimeLog::sendMsgLog((wchar_t*)mFriendInfo.attr.name);
|
||||
getBoard()->reopen_log();
|
||||
@@ -488,27 +470,26 @@ namespace ipl {
|
||||
|
||||
int LetterWriter::sendToWii(NWC24UserId userId, const wchar_t* wcString) {
|
||||
NWC24MsgObj msgObj;
|
||||
const char* report = lbl_81650380;
|
||||
|
||||
// Create message object
|
||||
if (!System::getNwc24Manager()->initMsgObj(&msgObj, NWC24_MSGTYPE_WII_MENU)) {
|
||||
OSReport(report + 0x58);
|
||||
OSReport("NWC24InitMsgObj err\n");
|
||||
return SEND_ERR_NWC24;
|
||||
}
|
||||
|
||||
// Set message to ID (in this case, my user ID)
|
||||
if (!System::getNwc24Manager()->setMsgToId(&msgObj, userId)) {
|
||||
OSReport(report + 0x6D);
|
||||
OSReport("NWC24SetMsgToId err\n");
|
||||
return SEND_ERR_NWC24;
|
||||
}
|
||||
|
||||
OSReport(report + 0x82, userId);
|
||||
OSReport("[to]: %016llu\n", userId);
|
||||
|
||||
// Set letter contents
|
||||
if (*wcString != 0) {
|
||||
if (!System::getNwc24Manager()->setMsgText(&msgObj, (char*)wcString, wcslen(wcString) * sizeof(wchar_t), NWC24_UTF_16BE,
|
||||
NWC24_ENC_BASE64)) {
|
||||
OSReport(report + 0x91);
|
||||
OSReport("NWC24SetMsgText err\n");
|
||||
return SEND_ERR_NWC24;
|
||||
}
|
||||
} else {
|
||||
@@ -518,7 +499,7 @@ namespace ipl {
|
||||
|
||||
if (!System::getNwc24Manager()->setMsgText(&msgObj, (char*)blank, wcslen(blank) * sizeof(wchar_t), NWC24_UTF_16BE,
|
||||
NWC24_ENC_BASE64)) {
|
||||
OSReport(report + 0x91);
|
||||
OSReport("NWC24SetMsgText err\n");
|
||||
return SEND_ERR_NWC24;
|
||||
}
|
||||
}
|
||||
@@ -528,19 +509,19 @@ namespace ipl {
|
||||
RFLCharData data;
|
||||
RFLErrcode err = RFLiSetOfficial2NWC24Msg(&msgObj, &data, mSelectedFaceId);
|
||||
if (err != RFLErrcode_Success) {
|
||||
OSReport(report + 0xA6, err);
|
||||
OSReport("RFLSetOfficial2NWC24Msg err = %d\n", err);
|
||||
return SEND_ERR_RFL;
|
||||
}
|
||||
}
|
||||
|
||||
// Do not reply
|
||||
if (!System::getNwc24Manager()->setMsgMBNoReply(&msgObj, false)) {
|
||||
OSReport(report + 0xC8);
|
||||
OSReport("NWC24SetMsgMBNoReply err\n");
|
||||
return SEND_ERR_NWC24;
|
||||
}
|
||||
|
||||
if (!System::getNwc24Manager()->setLedPattern(&msgObj)) {
|
||||
OSReport(report + 0xE2);
|
||||
OSReport("setMsgCommand err\n");
|
||||
return SEND_ERR_NWC24;
|
||||
}
|
||||
|
||||
@@ -549,14 +530,14 @@ namespace ipl {
|
||||
u32 picLength = 0;
|
||||
const void* picData = board->getPicture(&picLength);
|
||||
if (NWC24SetMsgAttached(&msgObj, picData, picLength, NWC24_X_WII_PICTURE) != NWC24_OK) {
|
||||
OSReport(report + 0xF5);
|
||||
OSReport("NWC24SetMsgAttached err\n");
|
||||
return SEND_ERR_NWC24;
|
||||
}
|
||||
}
|
||||
|
||||
// Send!
|
||||
if (!System::getNwc24Manager()->commitMsg(&msgObj)) {
|
||||
OSReport(report + 0x10E);
|
||||
OSReport("NWC24CommitMsg err\n");
|
||||
return SEND_ERR_NWC24;
|
||||
}
|
||||
|
||||
@@ -565,33 +546,32 @@ namespace ipl {
|
||||
|
||||
int LetterWriter::sendToPC(NWC24UserId userId, const wchar_t* wcString) {
|
||||
NWC24MsgObj msgObj;
|
||||
const char* report = lbl_816503CE + 0x4E;
|
||||
|
||||
// Create message object
|
||||
if (!System::getNwc24Manager()->initMsgObj(&msgObj, NWC24_MSGTYPE_PUBLIC)) {
|
||||
OSReport(report + 0xA);
|
||||
OSReport("NWC24InitMsgObj err\n");
|
||||
return SEND_ERR_NWC24;
|
||||
}
|
||||
|
||||
// Set message to ID (in this case, my user ID)
|
||||
if (!System::getNwc24Manager()->setMsgToAddr(&msgObj, mFriendInfo.addr.mailAddr, strlen(mFriendInfo.addr.mailAddr))) {
|
||||
OSReport(report + 0xD4);
|
||||
OSReport("NWC24SetMsgToAddr err\n");
|
||||
return SEND_ERR_NWC24;
|
||||
}
|
||||
|
||||
OSReport(report + 0xEB, mFriendInfo.addr.mailAddr);
|
||||
OSReport("[LetterWriter]: send to %s\n", mFriendInfo.addr.mailAddr);
|
||||
|
||||
// Set letter contents
|
||||
const wchar_t* subject = System::getMessage(MESG_LETTERWRITER_EMAIL_SUBJECT);
|
||||
if (!System::getNwc24Manager()->setMsgSubjectAndTextPublic(&msgObj, (u16*)subject, wcslen(subject), (u16*)wcString, wcslen(wcString),
|
||||
mpTextSubjectWork, mTextSubjectWorkSize)) {
|
||||
OSReport(report + 0x107);
|
||||
OSReport("setMsgSubjectAndTextPublic err\n");
|
||||
return SEND_ERR_NWC24;
|
||||
}
|
||||
|
||||
// Send!
|
||||
if (!System::getNwc24Manager()->commitMsg(&msgObj)) {
|
||||
OSReport(report + 0xC0);
|
||||
OSReport("NWC24CommitMsg err\n");
|
||||
return SEND_ERR_NWC24;
|
||||
}
|
||||
|
||||
|
||||
@@ -119,175 +119,11 @@ namespace LibTVRC {
|
||||
|
||||
void __FTVRCLoop0Handler(OSAlarm *alarm, OSContext *ctx);
|
||||
|
||||
void __FTVRCLoop1Handler(OSAlarm *alarm, OSContext *ctx) {
|
||||
if (_ctCombo != 0 && _isActive != 0) {
|
||||
if (_func1state == -1) {
|
||||
_unitStartTime = OSGetTime();
|
||||
_func1state = 0;
|
||||
}
|
||||
|
||||
if (_isLastOnOff != 0) {
|
||||
_unitLastTime = OSGetTime();
|
||||
|
||||
if (_func1state == 0) {
|
||||
WPADSetSensorBarPower(TRUE);
|
||||
_func1state = 1;
|
||||
OSSetAlarm(&_alarm, _tickWait[1], __FTVRCLoop1Handler);
|
||||
return;
|
||||
}
|
||||
|
||||
BOOL active = (int)(_unitLastTime - _unitStartTime) < (int)(*(u32*)&_tickT * _ctCombo);
|
||||
WPADSetSensorBarPower(FALSE);
|
||||
_func1state = 0;
|
||||
if (active) {
|
||||
OSSetAlarm(&_alarm, _tickWait[0], __FTVRCLoop1Handler);
|
||||
} else {
|
||||
OSSetAlarm(&_alarm, _tickWait[0], __FTVRCLoop0Handler);
|
||||
}
|
||||
} else {
|
||||
WPADSetSensorBarPower(FALSE);
|
||||
OSSetAlarm(&_alarm, *(u32*)&_tickT * _ctCombo, __FTVRCLoop0Handler);
|
||||
}
|
||||
}
|
||||
}
|
||||
void __FTVRCLoop1Handler(OSAlarm *alarm, OSContext *ctx);
|
||||
} // namespace LibTVRC
|
||||
|
||||
using namespace LibTVRC;
|
||||
|
||||
extern "C" asm void __FTVRCLoop0Handler__7LibTVRCFP7OSAlarmP9OSContext() {
|
||||
nofralloc
|
||||
stwu r1, -0x10(r1)
|
||||
mflr r0
|
||||
stw r0, 0x14(r1)
|
||||
stw r31, 0xc(r1)
|
||||
mr r31, r4
|
||||
stw r30, 0x8(r1)
|
||||
mr r30, r3
|
||||
lwz r0, _isActive__7LibTVRC
|
||||
cmpwi r0, 0
|
||||
bne TVRCLoop0_active
|
||||
li r0, 2
|
||||
stw r0, _func0state__7LibTVRC
|
||||
TVRCLoop0_active:
|
||||
lwz r0, _func0state__7LibTVRC
|
||||
cmpwi r0, 1
|
||||
bne TVRCLoop0_check_state
|
||||
li r0, 0
|
||||
stw r0, _func0state__7LibTVRC
|
||||
b TVRCLoop0_prepare
|
||||
TVRCLoop0_check_state:
|
||||
cmpwi r0, 0
|
||||
bne TVRCLoop0_check_stop
|
||||
lwz r4, _loop0count__7LibTVRC
|
||||
li r0, 0
|
||||
lwz r3, _isOnOff__7LibTVRC
|
||||
addi r4, r4, 1
|
||||
stw r0, _func0state__7LibTVRC
|
||||
stw r4, _loop0count__7LibTVRC
|
||||
stw r3, _isLastOnOff__7LibTVRC
|
||||
b TVRCLoop0_prepare
|
||||
TVRCLoop0_check_stop:
|
||||
cmpwi r0, 2
|
||||
bne TVRCLoop0_prepare
|
||||
lwz r0, _isReserveDeactive__7LibTVRC
|
||||
cmpwi r0, 0
|
||||
bne TVRCLoop0_stop
|
||||
bl OSGetTime
|
||||
lis r5, 0x8000
|
||||
lwz r6, _totalStartTime__7LibTVRC+4
|
||||
lwz r5, 0xf8(r5)
|
||||
li r0, 0x3e8
|
||||
subfc r4, r6, r4
|
||||
lwz r7, _totalStartTime__7LibTVRC
|
||||
srwi r6, r5, 2
|
||||
li r5, 0
|
||||
divwu r6, r6, r0
|
||||
subfe r3, r7, r3
|
||||
bl __div2i
|
||||
lwz r7, _limitMilli__7LibTVRC
|
||||
li r6, 0
|
||||
xoris r5, r3, 0x8000
|
||||
xoris r0, r6, 0x8000
|
||||
subfc r3, r4, r7
|
||||
subfe r5, r5, r0
|
||||
subfe r5, r0, r0
|
||||
neg. r5, r5
|
||||
beq TVRCLoop0_continue
|
||||
TVRCLoop0_stop:
|
||||
li r3, 1
|
||||
bl WPADSetSensorBarPower
|
||||
li r0, 0
|
||||
stw r0, _isActive__7LibTVRC
|
||||
b TVRCLoop0_exit
|
||||
TVRCLoop0_continue:
|
||||
lwz r4, _isUseRepeatCode__7LibTVRC
|
||||
lwz r3, _repeatBitLength__7LibTVRC
|
||||
lwz r0, _repeatBitArray__7LibTVRC
|
||||
stw r4, _isRepeatActive__7LibTVRC
|
||||
stw r3, _bitLength__7LibTVRC
|
||||
stw r0, _bitArray__7LibTVRC
|
||||
stw r6, _isOnOff__7LibTVRC
|
||||
stw r6, _isLastOnOff__7LibTVRC
|
||||
stw r6, _func0state__7LibTVRC
|
||||
stw r6, _loop0count__7LibTVRC
|
||||
TVRCLoop0_prepare:
|
||||
li r3, 0
|
||||
lwz r7, _bitArray__7LibTVRC
|
||||
stw r3, _ctCombo__7LibTVRC
|
||||
lwz r8, _bitLength__7LibTVRC
|
||||
lwz r4, _loop0count__7LibTVRC
|
||||
lwz r0, _isLastOnOff__7LibTVRC
|
||||
b TVRCLoop0_check_bits
|
||||
TVRCLoop0_bit_loop:
|
||||
srawi r5, r4, 3
|
||||
addi r3, r3, 1
|
||||
addze r6, r5
|
||||
srawi r5, r4, 3
|
||||
lbzx r6, r7, r6
|
||||
addze r5, r5
|
||||
slwi r5, r5, 3
|
||||
stw r3, _ctCombo__7LibTVRC
|
||||
subf r5, r5, r4
|
||||
subfic r5, r5, 7
|
||||
sraw r5, r6, r5
|
||||
clrlwi r5, r5, 31
|
||||
cmpw r0, r5
|
||||
stw r5, _isOnOff__7LibTVRC
|
||||
beq TVRCLoop0_bit_match
|
||||
li r3, -1
|
||||
li r0, 0
|
||||
stw r3, _func1state__7LibTVRC
|
||||
mr r3, r30
|
||||
mr r4, r31
|
||||
stw r0, _func0state__7LibTVRC
|
||||
bl __FTVRCLoop1Handler__7LibTVRCFP7OSAlarmP9OSContext
|
||||
b TVRCLoop0_exit
|
||||
TVRCLoop0_bit_match:
|
||||
addi r4, r4, 1
|
||||
stw r5, _isLastOnOff__7LibTVRC
|
||||
mr r0, r5
|
||||
stw r4, _loop0count__7LibTVRC
|
||||
TVRCLoop0_check_bits:
|
||||
cmpw r4, r8
|
||||
blt TVRCLoop0_bit_loop
|
||||
addi r3, r3, 1
|
||||
li r5, -1
|
||||
li r0, 2
|
||||
stw r3, _ctCombo__7LibTVRC
|
||||
mr r3, r30
|
||||
mr r4, r31
|
||||
stw r5, _func1state__7LibTVRC
|
||||
stw r0, _func0state__7LibTVRC
|
||||
bl __FTVRCLoop1Handler__7LibTVRCFP7OSAlarmP9OSContext
|
||||
TVRCLoop0_exit:
|
||||
lwz r0, 0x14(r1)
|
||||
lwz r31, 0xc(r1)
|
||||
lwz r30, 0x8(r1)
|
||||
mtlr r0
|
||||
addi r1, r1, 0x10
|
||||
blr
|
||||
}
|
||||
|
||||
BOOL TVRCInit(void* pRsrc) {
|
||||
if (_isInitialized) {
|
||||
_lastError = 0;
|
||||
@@ -596,3 +432,171 @@ TVRCSendStartAsync_exit:
|
||||
addi r1, r1, 0x40
|
||||
blr
|
||||
}
|
||||
|
||||
extern "C" asm void __FTVRCLoop0Handler__7LibTVRCFP7OSAlarmP9OSContext() {
|
||||
nofralloc
|
||||
stwu r1, -0x10(r1)
|
||||
mflr r0
|
||||
stw r0, 0x14(r1)
|
||||
stw r31, 0xc(r1)
|
||||
mr r31, r4
|
||||
stw r30, 0x8(r1)
|
||||
mr r30, r3
|
||||
lwz r0, _isActive__7LibTVRC
|
||||
cmpwi r0, 0
|
||||
bne TVRCLoop0_active
|
||||
li r0, 2
|
||||
stw r0, _func0state__7LibTVRC
|
||||
TVRCLoop0_active:
|
||||
lwz r0, _func0state__7LibTVRC
|
||||
cmpwi r0, 1
|
||||
bne TVRCLoop0_check_state
|
||||
li r0, 0
|
||||
stw r0, _func0state__7LibTVRC
|
||||
b TVRCLoop0_prepare
|
||||
TVRCLoop0_check_state:
|
||||
cmpwi r0, 0
|
||||
bne TVRCLoop0_check_stop
|
||||
lwz r4, _loop0count__7LibTVRC
|
||||
li r0, 0
|
||||
lwz r3, _isOnOff__7LibTVRC
|
||||
addi r4, r4, 1
|
||||
stw r0, _func0state__7LibTVRC
|
||||
stw r4, _loop0count__7LibTVRC
|
||||
stw r3, _isLastOnOff__7LibTVRC
|
||||
b TVRCLoop0_prepare
|
||||
TVRCLoop0_check_stop:
|
||||
cmpwi r0, 2
|
||||
bne TVRCLoop0_prepare
|
||||
lwz r0, _isReserveDeactive__7LibTVRC
|
||||
cmpwi r0, 0
|
||||
bne TVRCLoop0_stop
|
||||
bl OSGetTime
|
||||
lis r5, 0x8000
|
||||
lwz r6, _totalStartTime__7LibTVRC+4
|
||||
lwz r5, 0xf8(r5)
|
||||
li r0, 0x3e8
|
||||
subfc r4, r6, r4
|
||||
lwz r7, _totalStartTime__7LibTVRC
|
||||
srwi r6, r5, 2
|
||||
li r5, 0
|
||||
divwu r6, r6, r0
|
||||
subfe r3, r7, r3
|
||||
bl __div2i
|
||||
lwz r7, _limitMilli__7LibTVRC
|
||||
li r6, 0
|
||||
xoris r5, r3, 0x8000
|
||||
xoris r0, r6, 0x8000
|
||||
subfc r3, r4, r7
|
||||
subfe r5, r5, r0
|
||||
subfe r5, r0, r0
|
||||
neg. r5, r5
|
||||
beq TVRCLoop0_continue
|
||||
TVRCLoop0_stop:
|
||||
li r3, 1
|
||||
bl WPADSetSensorBarPower
|
||||
li r0, 0
|
||||
stw r0, _isActive__7LibTVRC
|
||||
b TVRCLoop0_exit
|
||||
TVRCLoop0_continue:
|
||||
lwz r4, _isUseRepeatCode__7LibTVRC
|
||||
lwz r3, _repeatBitLength__7LibTVRC
|
||||
lwz r0, _repeatBitArray__7LibTVRC
|
||||
stw r4, _isRepeatActive__7LibTVRC
|
||||
stw r3, _bitLength__7LibTVRC
|
||||
stw r0, _bitArray__7LibTVRC
|
||||
stw r6, _isOnOff__7LibTVRC
|
||||
stw r6, _isLastOnOff__7LibTVRC
|
||||
stw r6, _func0state__7LibTVRC
|
||||
stw r6, _loop0count__7LibTVRC
|
||||
TVRCLoop0_prepare:
|
||||
li r3, 0
|
||||
lwz r7, _bitArray__7LibTVRC
|
||||
stw r3, _ctCombo__7LibTVRC
|
||||
lwz r8, _bitLength__7LibTVRC
|
||||
lwz r4, _loop0count__7LibTVRC
|
||||
lwz r0, _isLastOnOff__7LibTVRC
|
||||
b TVRCLoop0_check_bits
|
||||
TVRCLoop0_bit_loop:
|
||||
srawi r5, r4, 3
|
||||
addi r3, r3, 1
|
||||
addze r6, r5
|
||||
srawi r5, r4, 3
|
||||
lbzx r6, r7, r6
|
||||
addze r5, r5
|
||||
slwi r5, r5, 3
|
||||
stw r3, _ctCombo__7LibTVRC
|
||||
subf r5, r5, r4
|
||||
subfic r5, r5, 7
|
||||
sraw r5, r6, r5
|
||||
clrlwi r5, r5, 31
|
||||
cmpw r0, r5
|
||||
stw r5, _isOnOff__7LibTVRC
|
||||
beq TVRCLoop0_bit_match
|
||||
li r3, -1
|
||||
li r0, 0
|
||||
stw r3, _func1state__7LibTVRC
|
||||
mr r3, r30
|
||||
mr r4, r31
|
||||
stw r0, _func0state__7LibTVRC
|
||||
bl __FTVRCLoop1Handler__7LibTVRCFP7OSAlarmP9OSContext
|
||||
b TVRCLoop0_exit
|
||||
TVRCLoop0_bit_match:
|
||||
addi r4, r4, 1
|
||||
stw r5, _isLastOnOff__7LibTVRC
|
||||
mr r0, r5
|
||||
stw r4, _loop0count__7LibTVRC
|
||||
TVRCLoop0_check_bits:
|
||||
cmpw r4, r8
|
||||
blt TVRCLoop0_bit_loop
|
||||
addi r3, r3, 1
|
||||
li r5, -1
|
||||
li r0, 2
|
||||
stw r3, _ctCombo__7LibTVRC
|
||||
mr r3, r30
|
||||
mr r4, r31
|
||||
stw r5, _func1state__7LibTVRC
|
||||
stw r0, _func0state__7LibTVRC
|
||||
bl __FTVRCLoop1Handler__7LibTVRCFP7OSAlarmP9OSContext
|
||||
TVRCLoop0_exit:
|
||||
lwz r0, 0x14(r1)
|
||||
lwz r31, 0xc(r1)
|
||||
lwz r30, 0x8(r1)
|
||||
mtlr r0
|
||||
addi r1, r1, 0x10
|
||||
blr
|
||||
}
|
||||
|
||||
namespace LibTVRC {
|
||||
void __FTVRCLoop1Handler(OSAlarm *alarm, OSContext *ctx) {
|
||||
if (_ctCombo != 0 && _isActive != 0) {
|
||||
if (_func1state == -1) {
|
||||
_unitStartTime = OSGetTime();
|
||||
_func1state = 0;
|
||||
}
|
||||
|
||||
if (_isLastOnOff != 0) {
|
||||
_unitLastTime = OSGetTime();
|
||||
|
||||
if (_func1state == 0) {
|
||||
WPADSetSensorBarPower(TRUE);
|
||||
_func1state = 1;
|
||||
OSSetAlarm(&_alarm, _tickWait[1], __FTVRCLoop1Handler);
|
||||
return;
|
||||
}
|
||||
|
||||
BOOL active = (int)(_unitLastTime - _unitStartTime) < (int)(*(u32*)&_tickT * _ctCombo);
|
||||
WPADSetSensorBarPower(FALSE);
|
||||
_func1state = 0;
|
||||
if (active) {
|
||||
OSSetAlarm(&_alarm, _tickWait[0], __FTVRCLoop1Handler);
|
||||
} else {
|
||||
OSSetAlarm(&_alarm, _tickWait[0], __FTVRCLoop0Handler);
|
||||
}
|
||||
} else {
|
||||
WPADSetSensorBarPower(FALSE);
|
||||
OSSetAlarm(&_alarm, *(u32*)&_tickT * _ctCombo, __FTVRCLoop0Handler);
|
||||
}
|
||||
}
|
||||
}
|
||||
} // namespace LibTVRC
|
||||
|
||||
@@ -38,7 +38,7 @@ namespace ipl {
|
||||
}
|
||||
|
||||
BOOL Manager::createNewRecord(const char* recordName, const char* recordFileType, const OSCalendarTime* dateTime, u32* gameCode,
|
||||
u16* makerCode, const math::VEC2& recordPos, u32 recordFlags, const NWC24FriendAddr& addr, NWC24FriendType addrType,
|
||||
u16* makerCode, const math::VEC2& recordPos, u32 recordFlags, const NWC24FriendAddr& addr, u16 addrType,
|
||||
u16 noReplyFlag, const wchar_t* titleText, const wchar_t* bodyText, const void* faceData,
|
||||
const void** attachData, u32* attachSize, RBRAttachmentType* attachType) {
|
||||
BOOL result = FALSE;
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
187
src/system/iplControllerManager.cpp
Normal file
187
src/system/iplControllerManager.cpp
Normal file
@@ -0,0 +1,187 @@
|
||||
#include <decomp/ide.h>
|
||||
#include <math/iplMathTypes.h>
|
||||
#define IPL_SOUND_RECT_OUT_OF_LINE
|
||||
#include <nw4r/ut/Rect.h>
|
||||
#undef IPL_SOUND_RECT_OUT_OF_LINE
|
||||
#include <revolution/kpad.h>
|
||||
#include <revolution/mtx/GeoTypes.h>
|
||||
#include <revolution/os.h>
|
||||
#include <revolution/os/OSTime.h>
|
||||
#include <revolution/sc.h>
|
||||
#include <revolution/wpad.h>
|
||||
|
||||
#define IPL_CONTROLLER_NATIVE_HIERARCHY
|
||||
#include "system/iplController.h"
|
||||
#undef IPL_CONTROLLER_NATIVE_HIERARCHY
|
||||
#include "system/iplSystem.h"
|
||||
|
||||
extern "C" void _savegpr_16();
|
||||
extern "C" void _restgpr_16();
|
||||
extern "C" void _savegpr_29();
|
||||
extern "C" void _restgpr_29();
|
||||
extern "C" void _savegpr_27();
|
||||
extern "C" void _restgpr_27();
|
||||
extern "C" void _savegpr_28();
|
||||
extern "C" void _restgpr_28();
|
||||
|
||||
namespace ipl {
|
||||
namespace controller {
|
||||
void* Manager::mpBuf;
|
||||
EGG::Heap* Manager::mpParentHeap;
|
||||
EGG::ExpHeap* Manager::mpHeap;
|
||||
EGG::Allocator* Manager::mpAllocator;
|
||||
|
||||
void* Manager::alloc(u32 size) {
|
||||
return mpAllocator->alloc(size);
|
||||
}
|
||||
|
||||
int Manager::free(void* ptr) {
|
||||
mpAllocator->free(ptr);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
Manager::Manager(EGG::Heap* heap) : mMaster(mControllers) {
|
||||
memset(mKPADStatus, 0, sizeof(mKPADStatus));
|
||||
memset(mControllers, 0, sizeof(mControllers));
|
||||
|
||||
u32 workSize = WPADGetWorkMemorySize() + 0x400;
|
||||
if (mpBuf != NULL && mpParentHeap != NULL) {
|
||||
mpParentHeap->free(mpBuf);
|
||||
}
|
||||
|
||||
mpParentHeap = heap;
|
||||
mpBuf = heap->alloc(workSize, 0x20);
|
||||
if (mpHeap != NULL) {
|
||||
mpHeap->destroy();
|
||||
}
|
||||
|
||||
mpHeap = EGG::ExpHeap::create(mpBuf, workSize, 2);
|
||||
if (mpAllocator != NULL) {
|
||||
delete mpAllocator;
|
||||
}
|
||||
|
||||
mpAllocator = new (heap, 4) EGG::Allocator(mpHeap, 4);
|
||||
WPADRegisterAllocator(alloc, free);
|
||||
KPADInit();
|
||||
|
||||
u32 sensitivity = SCGetBtDpdSensibility();
|
||||
for (int i = 0; i < 4; i++) {
|
||||
WPADSetDpdSensitivity(sensitivity);
|
||||
KPADSetBtnRepeat(i, 0.5f, 0.1f);
|
||||
}
|
||||
|
||||
read();
|
||||
}
|
||||
|
||||
void Manager::read() {
|
||||
for (int chan = 0; chan < 4; chan++) {
|
||||
if (SCGetWpadSensorBarPosition() == 1) {
|
||||
KPADSetSensorHeight(chan, 0.2f);
|
||||
} else {
|
||||
KPADSetSensorHeight(chan, -0.2f);
|
||||
}
|
||||
|
||||
u32 deviceType;
|
||||
s32 probe = WPADProbe(chan, &deviceType);
|
||||
if (probe == -1) {
|
||||
goto probe_invalid;
|
||||
}
|
||||
if (probe < -1) {
|
||||
if (probe >= -3) {
|
||||
goto probe_valid;
|
||||
}
|
||||
goto probe_invalid;
|
||||
} else if (probe >= 1) {
|
||||
goto probe_invalid;
|
||||
}
|
||||
|
||||
probe_valid:
|
||||
{
|
||||
s32 read = KPADRead(chan, &mKPADStatus[chan], 1);
|
||||
if (read > 0) {
|
||||
if (mKPADStatus[chan].wpad_err == -4 || deviceType == 0xfd) {
|
||||
goto store_null;
|
||||
}
|
||||
|
||||
mInvalidCount[chan] = 0;
|
||||
if (mKPADStatus[chan].wpad_err == -7 || deviceType == 0 || deviceType == 0xfb ||
|
||||
deviceType == 0xfc || deviceType == 0xff) {
|
||||
if (mControllers[chan] == NULL || mControllers[chan]->getType() != 0) {
|
||||
mControllers[chan] = new (mControllerStorage[chan]) Core(chan, 0, mKPADStatus[chan]);
|
||||
}
|
||||
} else if (deviceType == 1) {
|
||||
if (mControllers[chan] == NULL || mControllers[chan]->getType() != 1) {
|
||||
mControllers[chan] = new (mControllerStorage[chan]) FreeStyle(chan, 1, mKPADStatus[chan]);
|
||||
}
|
||||
} else if (deviceType == 2) {
|
||||
if (mControllers[chan] == NULL || mControllers[chan]->getType() != 2) {
|
||||
mControllers[chan] = new (mControllerStorage[chan]) Classic(chan, mKPADStatus[chan]);
|
||||
}
|
||||
} else {
|
||||
mControllers[chan] = NULL;
|
||||
}
|
||||
} else if (read == 0) {
|
||||
mInvalidCount[chan]++;
|
||||
if (mInvalidCount[chan] > 0x3c) {
|
||||
mInvalidCount[chan] = 0x3c;
|
||||
if (mControllers[chan] != NULL) {
|
||||
WPADControlMotor(chan, 0);
|
||||
}
|
||||
mControllers[chan] = NULL;
|
||||
}
|
||||
} else {
|
||||
goto store_null;
|
||||
}
|
||||
}
|
||||
goto channel_done;
|
||||
|
||||
store_null:
|
||||
mControllers[chan] = NULL;
|
||||
goto channel_done;
|
||||
|
||||
probe_invalid:
|
||||
KPADRead(chan, &mKPADStatus[chan], 1);
|
||||
mControllers[chan] = NULL;
|
||||
|
||||
channel_done:
|
||||
KPADSetPosParam(chan, 0.05f, 1.0f);
|
||||
}
|
||||
|
||||
for (int chan = 0; chan < 4; chan++) {
|
||||
if (mControllers[chan] != NULL) {
|
||||
mControllers[chan]->read();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Revolution::Revolution(int chan, int type, KPADStatus& status) : Base(chan, type, status) {
|
||||
unk_0x1D = 0;
|
||||
unk_0x1E = 0;
|
||||
unk_0x20 = &status;
|
||||
}
|
||||
|
||||
Interface* Manager::getMasterController() {
|
||||
return &mMaster;
|
||||
}
|
||||
|
||||
Interface* Manager::getController(int chan) {
|
||||
return ((Interface**)this)[chan];
|
||||
}
|
||||
|
||||
Interface* Manager::getYoungController() {
|
||||
Interface* ret = NULL;
|
||||
for (int i = 0; i < 4; i++) {
|
||||
Interface* controller = ((Interface**)this)[i];
|
||||
if (controller != NULL) {
|
||||
ret = controller;
|
||||
break;
|
||||
}
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
Core::~Core() {}
|
||||
|
||||
FreeStyle::~FreeStyle() {}
|
||||
}
|
||||
}
|
||||
@@ -569,7 +569,7 @@ namespace ipl {
|
||||
NWC24FriendAddr msgFriendAddr;
|
||||
memset(&msgFriendAddr, 0, sizeof(msgFriendAddr));
|
||||
|
||||
NWC24FriendType msgFriendType;
|
||||
u16 msgFriendType;
|
||||
|
||||
// Get friend data
|
||||
if (msgType == NWC24_MSGTYPE_PUBLIC) {
|
||||
@@ -586,7 +586,11 @@ namespace ipl {
|
||||
} else {
|
||||
u32 index = 0;
|
||||
getMsgFromId(&msgObj, &msgFriendAddr.wiiId);
|
||||
msgFriendType = msgFriendAddr.wiiId == myUserId ? NWC24_FRIENDTYPE_NONE : NWC24_FRIENDTYPE_WII;
|
||||
if (msgFriendAddr.wiiId == myUserId) {
|
||||
msgFriendType = NWC24_FRIENDTYPE_NONE;
|
||||
} else {
|
||||
msgFriendType = NWC24_FRIENDTYPE_WII;
|
||||
}
|
||||
if (searchFriendInfo(msgFriendAddr.wiiId, &index)) {
|
||||
NWC24FriendInfo friendInfo ALIGN32;
|
||||
readFriendInfo(&friendInfo, index);
|
||||
|
||||
@@ -751,215 +751,13 @@ namespace ipl {
|
||||
blr
|
||||
}
|
||||
|
||||
asm void Manager::integrateTitleIDList(register ESTitleId* titleIdsOut, register ESTitleId* titleIdsIn, register u32 titleCount) {
|
||||
nofralloc
|
||||
stwu r1, -0x1d0(r1)
|
||||
mflr r0
|
||||
stw r0, 0x1d4(r1)
|
||||
addi r11, r1, 0x1d0
|
||||
bl _savegpr_28
|
||||
li r0, 0x36
|
||||
mr r28, r3
|
||||
mr r29, r4
|
||||
mr r30, r5
|
||||
mr r31, r6
|
||||
addi r4, r1, 4
|
||||
li r3, 0
|
||||
mtctr r0
|
||||
integrateTitleIDList_L1:
|
||||
stw r3, 4(r4)
|
||||
stwu r3, 8(r4)
|
||||
bdnz integrateTitleIDList_L1
|
||||
mr r3, r28
|
||||
mr r4, r29
|
||||
li r5, 0x30
|
||||
bl getAvailableNumInList__Q33ipl8savedata7ManagerFPCUxUl
|
||||
cmpwi r3, 0
|
||||
mr r5, r3
|
||||
beq integrateTitleIDList_L2
|
||||
mr r3, r28
|
||||
mr r6, r30
|
||||
mr r7, r31
|
||||
addi r4, r1, 8
|
||||
bl makeTmpList__Q33ipl8savedata7ManagerFPUxUlPUxUl
|
||||
mr r3, r28
|
||||
mr r4, r29
|
||||
addi r5, r1, 8
|
||||
bl moveTitleTmpToPrior__Q33ipl8savedata7ManagerFPUxPCUx
|
||||
integrateTitleIDList_L2:
|
||||
addi r11, r1, 0x1d0
|
||||
bl _restgpr_28
|
||||
lwz r0, 0x1d4(r1)
|
||||
mtlr r0
|
||||
addi r1, r1, 0x1d0
|
||||
blr
|
||||
}
|
||||
|
||||
asm BOOL Manager::doUpdateChanInfos(register ESTitleId* titleIds) {
|
||||
nofralloc
|
||||
stwu r1, -0x40(r1)
|
||||
mflr r0
|
||||
stw r0, 0x44(r1)
|
||||
addi r11, r1, 0x40
|
||||
bl _savegpr_20
|
||||
mr r27, r3
|
||||
mr r28, r4
|
||||
li r3, 0
|
||||
li r30, 0
|
||||
li r26, 0
|
||||
li r25, 0
|
||||
li r20, 3
|
||||
li r21, 0
|
||||
li r22, 0xe
|
||||
li r23, -1
|
||||
doUpdateChanInfos_L1:
|
||||
add r31, r27, r26
|
||||
li r29, 0
|
||||
li r24, 0
|
||||
doUpdateChanInfos_L2:
|
||||
add r4, r31, r24
|
||||
lbz r0, 0x30(r4)
|
||||
cmplwi r0, 1
|
||||
beq doUpdateChanInfos_L5
|
||||
add r0, r29, r25
|
||||
lwz r9, 0x38(r4)
|
||||
slwi r0, r0, 3
|
||||
lwz r5, 0x3c(r4)
|
||||
add r8, r28, r0
|
||||
lwzx r6, r28, r0
|
||||
lwz r7, 4(r8)
|
||||
xor r0, r9, r6
|
||||
xor r5, r5, r7
|
||||
or. r0, r5, r0
|
||||
beq doUpdateChanInfos_L5
|
||||
or. r0, r7, r6
|
||||
bne doUpdateChanInfos_L4
|
||||
addi r3, r4, 0x30
|
||||
li r4, 0
|
||||
li r5, 0x10
|
||||
bl memset
|
||||
b doUpdateChanInfos_L6
|
||||
doUpdateChanInfos_L4:
|
||||
stb r20, 0x30(r4)
|
||||
stb r21, 0x31(r4)
|
||||
stb r21, 0x32(r4)
|
||||
stb r21, 0x33(r4)
|
||||
stw r22, 0x34(r4)
|
||||
lwz r0, 0(r8)
|
||||
and r0, r0, r23
|
||||
stw r0, 0x38(r4)
|
||||
lwz r0, 4(r8)
|
||||
and r0, r0, r23
|
||||
stw r0, 0x3c(r4)
|
||||
doUpdateChanInfos_L6:
|
||||
li r3, 1
|
||||
doUpdateChanInfos_L5:
|
||||
addi r29, r29, 1
|
||||
addi r24, r24, 0x10
|
||||
cmpwi r29, 0xc
|
||||
blt doUpdateChanInfos_L2
|
||||
addi r30, r30, 1
|
||||
addi r25, r25, 0xc
|
||||
cmpwi r30, 4
|
||||
addi r26, r26, 0xc0
|
||||
blt doUpdateChanInfos_L1
|
||||
addi r11, r1, 0x40
|
||||
bl _restgpr_20
|
||||
lwz r0, 0x44(r1)
|
||||
mtlr r0
|
||||
addi r1, r1, 0x40
|
||||
blr
|
||||
}
|
||||
|
||||
asm void Manager::iplSavedata_813596B8(register ESTitleId titleId) {
|
||||
nofralloc
|
||||
lis r7, 0x4841
|
||||
lis r4, 1
|
||||
addi r0, r7, 0x5445
|
||||
addi r8, r4, 1
|
||||
xor r4, r6, r0
|
||||
xor r0, r5, r8
|
||||
or. r0, r4, r0
|
||||
beqlr
|
||||
addi r4, r7, 0x4445
|
||||
xor r0, r5, r8
|
||||
xor r4, r6, r4
|
||||
or. r0, r4, r0
|
||||
bne iplSavedata_813596B8_L1
|
||||
blr
|
||||
iplSavedata_813596B8_L1:
|
||||
addis r0, r5, -1
|
||||
cmplwi r0, 1
|
||||
beq iplSavedata_813596B8_L2
|
||||
cmplwi r0, 3
|
||||
beq iplSavedata_813596B8_L2
|
||||
cmplwi r0, 4
|
||||
beq iplSavedata_813596B8_L2
|
||||
cmplwi r0, 6
|
||||
bnelr
|
||||
iplSavedata_813596B8_L2:
|
||||
li r0, 0x30
|
||||
li r9, 0
|
||||
li r4, 0
|
||||
mtctr r0
|
||||
iplSavedata_813596B8_L3:
|
||||
add r7, r3, r4
|
||||
lwz r0, 0x340(r7)
|
||||
lwz r7, 0x344(r7)
|
||||
xor r0, r5, r0
|
||||
xor r7, r6, r7
|
||||
or. r0, r7, r0
|
||||
beq iplSavedata_813596B8_L4
|
||||
addi r9, r9, 1
|
||||
addi r4, r4, 8
|
||||
bdnz iplSavedata_813596B8_L3
|
||||
iplSavedata_813596B8_L4:
|
||||
cmpwi r9, 0x30
|
||||
bne iplSavedata_813596B8_L5
|
||||
li r9, 0x2f
|
||||
iplSavedata_813596B8_L5:
|
||||
slwi r4, r9, 3
|
||||
mtctr r9
|
||||
cmpwi r9, 0
|
||||
ble iplSavedata_813596B8_L6
|
||||
iplSavedata_813596B8_L7:
|
||||
addi r0, r9, -1
|
||||
add r7, r3, r4
|
||||
slwi r0, r0, 3
|
||||
addi r9, r9, -1
|
||||
add r8, r3, r0
|
||||
addi r4, r4, -8
|
||||
lwz r0, 0x340(r8)
|
||||
lwz r8, 0x344(r8)
|
||||
stw r8, 0x344(r7)
|
||||
stw r0, 0x340(r7)
|
||||
bdnz iplSavedata_813596B8_L7
|
||||
iplSavedata_813596B8_L6:
|
||||
stw r6, 0x344(r3)
|
||||
stw r5, 0x340(r3)
|
||||
blr
|
||||
}
|
||||
|
||||
extern "C" asm BOOL iplSavedata_813597A0(register void* manager, register ESTitleId titleId) {
|
||||
nofralloc
|
||||
li r0, 0x30
|
||||
li r4, 0
|
||||
mtctr r0
|
||||
iplSavedata_813597A0_L1:
|
||||
add r7, r3, r4
|
||||
lwz r0, 0x340(r7)
|
||||
lwz r7, 0x344(r7)
|
||||
xor r0, r5, r0
|
||||
xor r7, r6, r7
|
||||
or. r0, r7, r0
|
||||
bne iplSavedata_813597A0_L2
|
||||
li r3, 1
|
||||
blr
|
||||
iplSavedata_813597A0_L2:
|
||||
addi r4, r4, 8
|
||||
bdnz iplSavedata_813597A0_L1
|
||||
li r3, 0
|
||||
blr
|
||||
void Manager::integrateTitleIDList(ESTitleId* titleIdsOut, ESTitleId* titleIdsIn, u32 titleCount) {
|
||||
ESTitleId temporaryTitleIds[0x36] = {0};
|
||||
int availableCount = getAvailableNumInList(titleIdsOut, 0x30);
|
||||
if (availableCount != 0) {
|
||||
makeTmpList(temporaryTitleIds, availableCount, titleIdsIn, titleCount);
|
||||
moveTitleTmpToPrior(titleIdsOut, temporaryTitleIds);
|
||||
}
|
||||
}
|
||||
|
||||
asm void Manager::makeTmpList(register ESTitleId* titleIdsOut, register u32 availableCount, register ESTitleId* titleIdsIn, register u32 titleCount) {
|
||||
@@ -1073,47 +871,91 @@ namespace ipl {
|
||||
blr
|
||||
}
|
||||
|
||||
asm void Manager::moveTitleTmpToPrior(register ESTitleId* titleIdsOut, register const ESTitleId* titleIdsIn) {
|
||||
void Manager::moveTitleTmpToPrior(ESTitleId* titleIdsOut, const ESTitleId* titleIdsIn) {
|
||||
for (int titleIndex = 0; titleIndex < 0x36; titleIndex++) {
|
||||
if (titleIdsIn[titleIndex] != TITLE_NULL) {
|
||||
int availableIndex = getAvailableInList(titleIdsOut, 0x30);
|
||||
if (availableIndex == -1) {
|
||||
return;
|
||||
}
|
||||
titleIdsOut[availableIndex] = titleIdsIn[titleIndex];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
asm BOOL Manager::doUpdateChanInfos(register ESTitleId* titleIds) {
|
||||
nofralloc
|
||||
stwu r1, -0x20(r1)
|
||||
stwu r1, -0x40(r1)
|
||||
mflr r0
|
||||
stw r0, 0x24(r1)
|
||||
addi r11, r1, 0x20
|
||||
bl _savegpr_26
|
||||
mr r26, r3
|
||||
mr r27, r4
|
||||
mr r28, r5
|
||||
stw r0, 0x44(r1)
|
||||
addi r11, r1, 0x40
|
||||
bl _savegpr_20
|
||||
mr r27, r3
|
||||
mr r28, r4
|
||||
li r3, 0
|
||||
li r30, 0
|
||||
li r26, 0
|
||||
li r25, 0
|
||||
li r20, 3
|
||||
li r21, 0
|
||||
li r22, 0xe
|
||||
li r23, -1
|
||||
doUpdateChanInfos_L1:
|
||||
add r31, r27, r26
|
||||
li r29, 0
|
||||
li r31, 0
|
||||
moveTitleTmpToPrior_L1:
|
||||
add r30, r28, r31
|
||||
lwzx r0, r28, r31
|
||||
lwz r3, 4(r30)
|
||||
or. r0, r3, r0
|
||||
beq moveTitleTmpToPrior_L2
|
||||
mr r3, r26
|
||||
mr r4, r27
|
||||
li r5, 0x30
|
||||
bl getAvailableInList__Q33ipl8savedata7ManagerFPCUxUl
|
||||
cmpwi r3, -1
|
||||
beq moveTitleTmpToPrior_L3
|
||||
slwi r0, r3, 3
|
||||
lwz r4, 4(r30)
|
||||
add r3, r27, r0
|
||||
lwz r0, 0(r30)
|
||||
stw r4, 4(r3)
|
||||
stw r0, 0(r3)
|
||||
moveTitleTmpToPrior_L2:
|
||||
li r24, 0
|
||||
doUpdateChanInfos_L2:
|
||||
add r4, r31, r24
|
||||
lbz r0, 0x30(r4)
|
||||
cmplwi r0, 1
|
||||
beq doUpdateChanInfos_L5
|
||||
add r0, r29, r25
|
||||
lwz r9, 0x38(r4)
|
||||
slwi r0, r0, 3
|
||||
lwz r5, 0x3c(r4)
|
||||
add r8, r28, r0
|
||||
lwzx r6, r28, r0
|
||||
lwz r7, 4(r8)
|
||||
xor r0, r9, r6
|
||||
xor r5, r5, r7
|
||||
or. r0, r5, r0
|
||||
beq doUpdateChanInfos_L5
|
||||
or. r0, r7, r6
|
||||
bne doUpdateChanInfos_L4
|
||||
addi r3, r4, 0x30
|
||||
li r4, 0
|
||||
li r5, 0x10
|
||||
bl memset
|
||||
b doUpdateChanInfos_L6
|
||||
doUpdateChanInfos_L4:
|
||||
stb r20, 0x30(r4)
|
||||
stb r21, 0x31(r4)
|
||||
stb r21, 0x32(r4)
|
||||
stb r21, 0x33(r4)
|
||||
stw r22, 0x34(r4)
|
||||
lwz r0, 0(r8)
|
||||
and r0, r0, r23
|
||||
stw r0, 0x38(r4)
|
||||
lwz r0, 4(r8)
|
||||
and r0, r0, r23
|
||||
stw r0, 0x3c(r4)
|
||||
doUpdateChanInfos_L6:
|
||||
li r3, 1
|
||||
doUpdateChanInfos_L5:
|
||||
addi r29, r29, 1
|
||||
addi r31, r31, 8
|
||||
cmpwi r29, 0x36
|
||||
blt moveTitleTmpToPrior_L1
|
||||
moveTitleTmpToPrior_L3:
|
||||
addi r11, r1, 0x20
|
||||
bl _restgpr_26
|
||||
lwz r0, 0x24(r1)
|
||||
addi r24, r24, 0x10
|
||||
cmpwi r29, 0xc
|
||||
blt doUpdateChanInfos_L2
|
||||
addi r30, r30, 1
|
||||
addi r25, r25, 0xc
|
||||
cmpwi r30, 4
|
||||
addi r26, r26, 0xc0
|
||||
blt doUpdateChanInfos_L1
|
||||
addi r11, r1, 0x40
|
||||
bl _restgpr_20
|
||||
lwz r0, 0x44(r1)
|
||||
mtlr r0
|
||||
addi r1, r1, 0x20
|
||||
addi r1, r1, 0x40
|
||||
blr
|
||||
}
|
||||
#endif
|
||||
@@ -1289,6 +1131,87 @@ namespace ipl {
|
||||
mData.prevSDPage = 0;
|
||||
}
|
||||
|
||||
#ifdef __MWERKS__
|
||||
asm void Manager::iplSavedata_813596B8(register ESTitleId titleId) {
|
||||
nofralloc
|
||||
lis r7, 0x4841
|
||||
lis r4, 1
|
||||
addi r0, r7, 0x5445
|
||||
addi r8, r4, 1
|
||||
xor r4, r6, r0
|
||||
xor r0, r5, r8
|
||||
or. r0, r4, r0
|
||||
beqlr
|
||||
addi r4, r7, 0x4445
|
||||
xor r0, r5, r8
|
||||
xor r4, r6, r4
|
||||
or. r0, r4, r0
|
||||
bne iplSavedata_813596B8_L1
|
||||
blr
|
||||
iplSavedata_813596B8_L1:
|
||||
addis r0, r5, -1
|
||||
cmplwi r0, 1
|
||||
beq iplSavedata_813596B8_L2
|
||||
cmplwi r0, 3
|
||||
beq iplSavedata_813596B8_L2
|
||||
cmplwi r0, 4
|
||||
beq iplSavedata_813596B8_L2
|
||||
cmplwi r0, 6
|
||||
bnelr
|
||||
iplSavedata_813596B8_L2:
|
||||
li r0, 0x30
|
||||
li r9, 0
|
||||
li r4, 0
|
||||
mtctr r0
|
||||
iplSavedata_813596B8_L3:
|
||||
add r7, r3, r4
|
||||
lwz r0, 0x340(r7)
|
||||
lwz r7, 0x344(r7)
|
||||
xor r0, r5, r0
|
||||
xor r7, r6, r7
|
||||
or. r0, r7, r0
|
||||
beq iplSavedata_813596B8_L4
|
||||
addi r9, r9, 1
|
||||
addi r4, r4, 8
|
||||
bdnz iplSavedata_813596B8_L3
|
||||
iplSavedata_813596B8_L4:
|
||||
cmpwi r9, 0x30
|
||||
bne iplSavedata_813596B8_L5
|
||||
li r9, 0x2f
|
||||
iplSavedata_813596B8_L5:
|
||||
slwi r4, r9, 3
|
||||
mtctr r9
|
||||
cmpwi r9, 0
|
||||
ble iplSavedata_813596B8_L6
|
||||
iplSavedata_813596B8_L7:
|
||||
addi r0, r9, -1
|
||||
add r7, r3, r4
|
||||
slwi r0, r0, 3
|
||||
addi r9, r9, -1
|
||||
add r8, r3, r0
|
||||
addi r4, r4, -8
|
||||
lwz r0, 0x340(r8)
|
||||
lwz r8, 0x344(r8)
|
||||
stw r8, 0x344(r7)
|
||||
stw r0, 0x340(r7)
|
||||
bdnz iplSavedata_813596B8_L7
|
||||
iplSavedata_813596B8_L6:
|
||||
stw r6, 0x344(r3)
|
||||
stw r5, 0x340(r3)
|
||||
blr
|
||||
}
|
||||
|
||||
extern "C" BOOL iplSavedata_813597A0(void* manager, ESTitleId titleId) {
|
||||
Manager* savedataManager = static_cast<Manager*>(manager);
|
||||
for (int index = 0; index < MAX_CHANNEL_TOTAL; index++) {
|
||||
if (savedataManager->mData.titleCache[0][index] == titleId) {
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
#endif
|
||||
|
||||
BOOL Manager::nand_error_handling(int code) {
|
||||
BOOL result = FALSE;
|
||||
|
||||
|
||||
2148
src/system/odh.cpp
2148
src/system/odh.cpp
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