Merge branch 'main' into nw4r-lyt

This commit is contained in:
Elijah Thomas
2024-06-09 23:49:04 -04:00
committed by GitHub
56 changed files with 2565 additions and 415 deletions
@@ -2,7 +2,7 @@ Sections:
.text type:code align:16
.ctors type:rodata align:4
.dtors type:rodata align:4
.rodata type:rodata align:16
.data type:data align:16
.bss type:bss align:8
REL/executor.c:
@@ -16,3 +16,5 @@ REL/global_destructor_chain.c:
REL/d/t/d_t_rock_boat.cpp:
.text start:0x000000F0 end:0x00000A28
.ctors start:0x00000000 end:0x00000004
.data start:0x00000000 end:0x00000200
.bss start:0x00000008 end:0x00000048
+43 -43
View File
@@ -3,50 +3,50 @@ _epilog = .text:0x00000030; // type:function size:0x2C scope:global
_unresolved = .text:0x00000060; // type:function size:0x4 scope:global
__register_global_object = .text:0x00000070; // type:function size:0x1C scope:global
__destroy_global_chain = .text:0x00000090; // type:function size:0x54 scope:global
fn_487_F0 = .text:0x000000F0; // type:function size:0xAC
fn_487_1A0 = .text:0x000001A0; // type:function size:0x58
fn_487_200 = .text:0x00000200; // type:function size:0x58
fn_487_260 = .text:0x00000260; // type:function size:0x6C
fn_487_2D0 = .text:0x000002D0; // type:function size:0xA0
fn_487_370 = .text:0x00000370; // type:function size:0xA4
fn_487_420 = .text:0x00000420; // type:function size:0x50
fn_487_470 = .text:0x00000470; // type:function size:0x10
fn_487_480 = .text:0x00000480; // type:function size:0x8
fn_487_490 = .text:0x00000490; // type:function size:0x30
fn_487_4C0 = .text:0x000004C0; // type:function size:0x10
fn_487_4D0 = .text:0x000004D0; // type:function size:0x8
fn_487_4E0 = .text:0x000004E0; // type:function size:0x4
fn_487_4F0 = .text:0x000004F0; // type:function size:0x90
fn_487_580 = .text:0x00000580; // type:function size:0x4
fn_487_590 = .text:0x00000590; // type:function size:0xC8
fn_487_660 = .text:0x00000660; // type:function size:0x10
fn_487_670 = .text:0x00000670; // type:function size:0x60
fn_487_6D0 = .text:0x000006D0; // type:function size:0xC
fn_487_6E0 = .text:0x000006E0; // type:function size:0x1C
fn_487_700 = .text:0x00000700; // type:function size:0x1C
fn_487_720 = .text:0x00000720; // type:function size:0x1C
fn_487_740 = .text:0x00000740; // type:function size:0x10
fn_487_750 = .text:0x00000750; // type:function size:0x10
fn_487_760 = .text:0x00000760; // type:function size:0x10
fn_487_770 = .text:0x00000770; // type:function size:0x10
fn_487_780 = .text:0x00000780; // type:function size:0x10
fn_487_790 = .text:0x00000790; // type:function size:0x10
fn_487_7A0 = .text:0x000007A0; // type:function size:0x30
fn_487_7D0 = .text:0x000007D0; // type:function size:0x30
fn_487_800 = .text:0x00000800; // type:function size:0x30
fn_487_830 = .text:0x00000830; // type:function size:0x10C
fn_487_940 = .text:0x00000940; // type:function size:0x58
fn_487_9A0 = .text:0x000009A0; // type:function size:0x88
dTgRockBoat_c_classInit__Fv = .text:0x000000F0; // type:function size:0xAC
__dt__8dTgAbs_cFv = .text:0x000001A0; // type:function size:0x58
__dt__26sFState_c<13dTgRockBoat_c>Fv = .text:0x00000200; // type:function size:0x58
__dt__29sFStateFct_c<13dTgRockBoat_c>Fv = .text:0x00000260; // type:function size:0x6C
__dt__82sStateMgr_c<13dTgRockBoat_c,20sStateMethodUsr_FI_c,12sFStateFct_c,13sStateIDChk_c>Fv = .text:0x000002D0; // type:function size:0xA0
__dt__52sFStateMgr_c<13dTgRockBoat_c,20sStateMethodUsr_FI_c>Fv = .text:0x00000370; // type:function size:0xA4
create__13dTgRockBoat_cFv = .text:0x00000420; // type:function size:0x50
changeState__82sStateMgr_c<13dTgRockBoat_c,20sStateMethodUsr_FI_c,12sFStateFct_c,13sStateIDChk_c>FRC12sStateIDIf_c = .text:0x00000470; // type:function size:0x10
doDelete__13dTgRockBoat_cFv = .text:0x00000480; // type:function size:0x8
actorExecute__13dTgRockBoat_cFv = .text:0x00000490; // type:function size:0x30
executeState__82sStateMgr_c<13dTgRockBoat_c,20sStateMethodUsr_FI_c,12sFStateFct_c,13sStateIDChk_c>Fv = .text:0x000004C0; // type:function size:0x10
draw__13dTgRockBoat_cFv = .text:0x000004D0; // type:function size:0x8
initializeState_Wait__13dTgRockBoat_cFv = .text:0x000004E0; // type:function size:0x4
executeState_Wait__13dTgRockBoat_cFv = .text:0x000004F0; // type:function size:0x90
finalizeState_Wait__13dTgRockBoat_cFv = .text:0x00000580; // type:function size:0x4
__dt__13dTgRockBoat_cFv = .text:0x00000590; // type:function size:0xC8
getStateID__82sStateMgr_c<13dTgRockBoat_c,20sStateMethodUsr_FI_c,12sFStateFct_c,13sStateIDChk_c>CFv = .text:0x00000660; // type:function size:0x10
build__29sFStateFct_c<13dTgRockBoat_c>FRC12sStateIDIf_c = .text:0x00000670; // type:function size:0x60
dispose__29sFStateFct_c<13dTgRockBoat_c>FRP10sStateIf_c = .text:0x000006D0; // type:function size:0xC
initialize__26sFState_c<13dTgRockBoat_c>Fv = .text:0x000006E0; // type:function size:0x1C
execute__26sFState_c<13dTgRockBoat_c>Fv = .text:0x00000700; // type:function size:0x1C
finalize__26sFState_c<13dTgRockBoat_c>Fv = .text:0x00000720; // type:function size:0x1C
initializeState__82sStateMgr_c<13dTgRockBoat_c,20sStateMethodUsr_FI_c,12sFStateFct_c,13sStateIDChk_c>Fv = .text:0x00000740; // type:function size:0x10
finalizeState__82sStateMgr_c<13dTgRockBoat_c,20sStateMethodUsr_FI_c,12sFStateFct_c,13sStateIDChk_c>Fv = .text:0x00000750; // type:function size:0x10
refreshState__82sStateMgr_c<13dTgRockBoat_c,20sStateMethodUsr_FI_c,12sFStateFct_c,13sStateIDChk_c>Fv = .text:0x00000760; // type:function size:0x10
getState__82sStateMgr_c<13dTgRockBoat_c,20sStateMethodUsr_FI_c,12sFStateFct_c,13sStateIDChk_c>CFv = .text:0x00000770; // type:function size:0x10
getNewStateID__82sStateMgr_c<13dTgRockBoat_c,20sStateMethodUsr_FI_c,12sFStateFct_c,13sStateIDChk_c>CFv = .text:0x00000780; // type:function size:0x10
getOldStateID__82sStateMgr_c<13dTgRockBoat_c,20sStateMethodUsr_FI_c,12sFStateFct_c,13sStateIDChk_c>CFv = .text:0x00000790; // type:function size:0x10
finalizeState__28sFStateID_c<13dTgRockBoat_c>CFR13dTgRockBoat_c = .text:0x000007A0; // type:function size:0x30
executeState__28sFStateID_c<13dTgRockBoat_c>CFR13dTgRockBoat_c = .text:0x000007D0; // type:function size:0x30
initializeState__28sFStateID_c<13dTgRockBoat_c>CFR13dTgRockBoat_c = .text:0x00000800; // type:function size:0x30
__sinit_\d_t_rock_boat_cpp = .text:0x00000830; // type:function size:0x10C scope:local
__dt__28sFStateID_c<13dTgRockBoat_c>Fv = .text:0x00000940; // type:function size:0x58
isSameName__28sFStateID_c<13dTgRockBoat_c>CFPCc = .text:0x000009A0; // type:function size:0x88
_ctors = .ctors:0x00000000; // type:label scope:global
_dtors = .dtors:0x00000000; // type:label scope:global
__destroy_global_chain_reference = .dtors:0x00000000; // type:object size:0x4 scope:global
lbl_487_section4_0 = .rodata:0x00000000; // type:object size:0x10 data:4byte
lbl_487_section4_10 = .rodata:0x00000010; // type:object size:0x78
lbl_487_section4_88 = .rodata:0x00000088; // type:object size:0x30
lbl_487_section4_B8 = .rodata:0x000000B8; // type:object size:0x30
lbl_487_section4_E8 = .rodata:0x000000E8; // type:object size:0x18
lbl_487_section4_100 = .rodata:0x00000100; // type:object size:0xCC
lbl_487_section4_1CC = .rodata:0x000001CC; // type:object size:0x34
g_profile_TAG_ROCK_BOAT = .data:0x00000000; // type:object size:0x10 data:4byte
__vt__13dTgRockBoat_c = .data:0x00000010; // type:object size:0x74
__vt__52sFStateMgr_c<13dTgRockBoat_c,20sStateMethodUsr_FI_c> = .data:0x00000088; // type:object size:0x30
__vt__82sStateMgr_c<13dTgRockBoat_c,20sStateMethodUsr_FI_c,12sFStateFct_c,13sStateIDChk_c> = .data:0x000000B8; // type:object size:0x30
__vt__29sFStateFct_c<13dTgRockBoat_c> = .data:0x000000E8; // type:object size:0x14
__vt__26sFState_c<13dTgRockBoat_c> = .data:0x00000100; // type:object size:0x18
__vt__28sFStateID_c<13dTgRockBoat_c> = .data:0x000001CC; // type:object size:0x34
__global_destructor_chain = .bss:0x00000000; // type:object size:0x4 scope:global
lbl_487_bss_8 = .bss:0x00000008; // type:object size:0x10
lbl_487_bss_18 = .bss:0x00000018; // type:object size:0x30 data:4byte
lbl_487_bss_8 = .bss:0x00000008; // type:object size:0xC scope:local
StateID_Wait__13dTgRockBoat_c = .bss:0x00000018; // type:object size:0x30 data:4byte
+2 -1
View File
@@ -2,7 +2,7 @@ Sections:
.text type:code align:16
.ctors type:rodata align:4
.dtors type:rodata align:4
.rodata type:rodata align:8
.data type:data align:8
.bss type:bss align:8
REL/executor.c:
@@ -10,3 +10,4 @@ REL/executor.c:
REL/d/t/d_t_timer.cpp:
.text start:0x00000070 end:0x000004CC
.data start:0x00000000 end:0x0000011C
+22 -21
View File
@@ -1,26 +1,27 @@
_prolog = .text:0x00000000; // type:function size:0x2C scope:global
_epilog = .text:0x00000030; // type:function size:0x2C scope:global
_unresolved = .text:0x00000060; // type:function size:0x4 scope:global
fn_506_70 = .text:0x00000070; // type:function size:0x4C
fn_506_C0 = .text:0x000000C0; // type:function size:0x58
fn_506_120 = .text:0x00000120; // type:function size:0x24
fn_506_150 = .text:0x00000150; // type:function size:0xD4
fn_506_230 = .text:0x00000230; // type:function size:0xB8
fn_506_2F0 = .text:0x000002F0; // type:function size:0xC
fn_506_300 = .text:0x00000300; // type:function size:0xC
fn_506_310 = .text:0x00000310; // type:function size:0xC
fn_506_320 = .text:0x00000320; // type:function size:0xC
fn_506_330 = .text:0x00000330; // type:function size:0x8
fn_506_340 = .text:0x00000340; // type:function size:0x8
fn_506_350 = .text:0x00000350; // type:function size:0x8
fn_506_360 = .text:0x00000360; // type:function size:0x28
fn_506_390 = .text:0x00000390; // type:function size:0x8
fn_506_3A0 = .text:0x000003A0; // type:function size:0x44
fn_506_3F0 = .text:0x000003F0; // type:function size:0x58
fn_506_450 = .text:0x00000450; // type:function size:0x8
fn_506_460 = .text:0x00000460; // type:function size:0x4
fn_506_470 = .text:0x00000470; // type:function size:0x5C
dTgTimer_c_classInit__Fv = .text:0x00000070; // type:function size:0x4C
__dt__14dTgTimerBase_cFv = .text:0x000000C0; // type:function size:0x58
increment__FPUs = .text:0x00000120; // type:function size:0x24
create__10dTgTimer_cFv = .text:0x00000150; // type:function size:0xD4
actorExecute__10dTgTimer_cFv = .text:0x00000230; // type:function size:0xB8
getSubtypeFromParams__10dTgTimer_cFv = .text:0x000002F0; // type:function size:0xC
getTimerFromParams__10dTgTimer_cFv = .text:0x00000300; // type:function size:0xC
getCheckSceneflag__10dTgTimer_cFv = .text:0x00000310; // type:function size:0xC
getSetSceneflag__10dTgTimer_cFv = .text:0x00000320; // type:function size:0xC
getTimer__10dTgTimer_cFv = .text:0x00000330; // type:function size:0x8
getConstant0x50__10dTgTimer_cFv = .text:0x00000340; // type:function size:0x8
setTimer__10dTgTimer_cFUs = .text:0x00000350; // type:function size:0x8
getTargetTime__10dTgTimer_cFv = .text:0x00000360; // type:function size:0x28
resetTimer__10dTgTimer_cFv = .text:0x00000390; // type:function size:0x8
incrementTimer__10dTgTimer_cFv = .text:0x000003A0; // type:function size:0x44
checkShouldTrigger__10dTgTimer_cFv = .text:0x000003F0; // type:function size:0x58
getStoredTargetTime__10dTgTimer_cFv = .text:0x00000450; // type:function size:0x8
getConstant0x50_Thunk__10dTgTimer_cFv = .text:0x00000460; // type:function size:0x4
__dt__10dTgTimer_cFv = .text:0x00000470; // type:function size:0x5C
_ctors = .ctors:0x00000000; // type:label scope:global
_dtors = .dtors:0x00000000; // type:label scope:global
lbl_506_section4_0 = .rodata:0x00000000; // type:object size:0x34 data:4byte
lbl_506_section4_34 = .rodata:0x00000034; // type:object size:0xE8
g_profile_TIMER_TAG = .data:0x00000000; // type:object size:0x10 data:4byte
__vt__10dTgTimer_c = .data:0x00000034; // type:object size:0x74
__vt__14dTgTimerBase_c = .data:0x000000A8; // type:object size:0x74
@@ -17,3 +17,6 @@ REL/global_destructor_chain.c:
REL/d/t/d_t_tumble_weed.cpp:
.text start:0x000000F0 end:0x00001288
.ctors start:0x00000000 end:0x00000004
.rodata start:0x00000000 end:0x00000064
.data start:0x00000000 end:0x00000294
.bss start:0x00000008 end:0x000000C8
@@ -3,66 +3,66 @@ _epilog = .text:0x00000030; // type:function size:0x2C scope:global
_unresolved = .text:0x00000060; // type:function size:0x4 scope:global
__register_global_object = .text:0x00000070; // type:function size:0x1C scope:global
__destroy_global_chain = .text:0x00000090; // type:function size:0x54 scope:global
fn_476_F0 = .text:0x000000F0; // type:function size:0xC0
fn_476_1B0 = .text:0x000001B0; // type:function size:0x58
fn_476_210 = .text:0x00000210; // type:function size:0x58
fn_476_270 = .text:0x00000270; // type:function size:0x6C
fn_476_2E0 = .text:0x000002E0; // type:function size:0xA0
fn_476_380 = .text:0x00000380; // type:function size:0xA4
fn_476_430 = .text:0x00000430; // type:function size:0x48
fn_476_480 = .text:0x00000480; // type:function size:0x10
fn_476_490 = .text:0x00000490; // type:function size:0x8
fn_476_4A0 = .text:0x000004A0; // type:function size:0x48
fn_476_4F0 = .text:0x000004F0; // type:function size:0x10
fn_476_500 = .text:0x00000500; // type:function size:0x1C
fn_476_520 = .text:0x00000520; // type:function size:0x8
fn_476_530 = .text:0x00000530; // type:function size:0x4
fn_476_540 = .text:0x00000540; // type:function size:0xA0
fn_476_5E0 = .text:0x000005E0; // type:function size:0x4
fn_476_5F0 = .text:0x000005F0; // type:function size:0x4
fn_476_600 = .text:0x00000600; // type:function size:0xC8
fn_476_6D0 = .text:0x000006D0; // type:function size:0x4
fn_476_6E0 = .text:0x000006E0; // type:function size:0x44
fn_476_730 = .text:0x00000730; // type:function size:0x74
fn_476_7B0 = .text:0x000007B0; // type:function size:0x4
fn_476_7C0 = .text:0x000007C0; // type:function size:0x98
fn_476_860 = .text:0x00000860; // type:function size:0x54
fn_476_8C0 = .text:0x000008C0; // type:function size:0x288
fn_476_B50 = .text:0x00000B50; // type:function size:0x114
fn_476_C70 = .text:0x00000C70; // type:function size:0xD8
fn_476_D50 = .text:0x00000D50; // type:function size:0x10
fn_476_D60 = .text:0x00000D60; // type:function size:0x60
fn_476_DC0 = .text:0x00000DC0; // type:function size:0xC
fn_476_DD0 = .text:0x00000DD0; // type:function size:0x1C
fn_476_DF0 = .text:0x00000DF0; // type:function size:0x1C
fn_476_E10 = .text:0x00000E10; // type:function size:0x1C
fn_476_E30 = .text:0x00000E30; // type:function size:0x10
fn_476_E40 = .text:0x00000E40; // type:function size:0x10
fn_476_E50 = .text:0x00000E50; // type:function size:0x10
fn_476_E60 = .text:0x00000E60; // type:function size:0x10
fn_476_E70 = .text:0x00000E70; // type:function size:0x10
fn_476_E80 = .text:0x00000E80; // type:function size:0x10
fn_476_E90 = .text:0x00000E90; // type:function size:0x30
fn_476_EC0 = .text:0x00000EC0; // type:function size:0x30
fn_476_EF0 = .text:0x00000EF0; // type:function size:0x30
fn_476_F20 = .text:0x00000F20; // type:function size:0x27C
fn_476_11A0 = .text:0x000011A0; // type:function size:0x58
fn_476_1200 = .text:0x00001200; // type:function size:0x88
dTgTumbleWeed_c_classInit__Fv = .text:0x000000F0; // type:function size:0xC0
__dt__8dTgAbs_cFv = .text:0x000001B0; // type:function size:0x58
__dt__28sFState_c<15dTgTumbleWeed_c>Fv = .text:0x00000210; // type:function size:0x58
__dt__31sFStateFct_c<15dTgTumbleWeed_c>Fv = .text:0x00000270; // type:function size:0x6C
__dt__84sStateMgr_c<15dTgTumbleWeed_c,20sStateMethodUsr_FI_c,12sFStateFct_c,13sStateIDChk_c>Fv = .text:0x000002E0; // type:function size:0xA0
__dt__54sFStateMgr_c<15dTgTumbleWeed_c,20sStateMethodUsr_FI_c>Fv = .text:0x00000380; // type:function size:0xA4
create__15dTgTumbleWeed_cFv = .text:0x00000430; // type:function size:0x48
changeState__84sStateMgr_c<15dTgTumbleWeed_c,20sStateMethodUsr_FI_c,12sFStateFct_c,13sStateIDChk_c>FRC12sStateIDIf_c = .text:0x00000480; // type:function size:0x10
doDelete__15dTgTumbleWeed_cFv = .text:0x00000490; // type:function size:0x8
actorExecute__15dTgTumbleWeed_cFv = .text:0x000004A0; // type:function size:0x48
executeState__84sStateMgr_c<15dTgTumbleWeed_c,20sStateMethodUsr_FI_c,12sFStateFct_c,13sStateIDChk_c>Fv = .text:0x000004F0; // type:function size:0x10
decr__FPUs = .text:0x00000500; // type:function size:0x1C
draw__15dTgTumbleWeed_cFv = .text:0x00000520; // type:function size:0x8
initializeState_AreaOut__15dTgTumbleWeed_cFv = .text:0x00000530; // type:function size:0x4
executeState_AreaOut__15dTgTumbleWeed_cFv = .text:0x00000540; // type:function size:0xA0
finalizeState_AreaOut__15dTgTumbleWeed_cFv = .text:0x000005E0; // type:function size:0x4
initializeState_AreaIn__15dTgTumbleWeed_cFv = .text:0x000005F0; // type:function size:0x4
executeState_AreaIn__15dTgTumbleWeed_cFv = .text:0x00000600; // type:function size:0xC8
finalizeState_AreaIn__15dTgTumbleWeed_cFv = .text:0x000006D0; // type:function size:0x4
initializeState_Wind__15dTgTumbleWeed_cFv = .text:0x000006E0; // type:function size:0x44
executeState_Wind__15dTgTumbleWeed_cFv = .text:0x00000730; // type:function size:0x74
finalizeState_Wind__15dTgTumbleWeed_cFv = .text:0x000007B0; // type:function size:0x4
shouldSpawnTumbleweed__15dTgTumbleWeed_cFv = .text:0x000007C0; // type:function size:0x98
shouldDoWind__15dTgTumbleWeed_cFv = .text:0x00000860; // type:function size:0x54
doSpawnTumbleweed__15dTgTumbleWeed_cFv = .text:0x000008C0; // type:function size:0x288
getWind__15dTgTumbleWeed_cFP7mVec3_c = .text:0x00000B50; // type:function size:0x114
__dt__15dTgTumbleWeed_cFv = .text:0x00000C70; // type:function size:0xD8
getStateID__84sStateMgr_c<15dTgTumbleWeed_c,20sStateMethodUsr_FI_c,12sFStateFct_c,13sStateIDChk_c>CFv = .text:0x00000D50; // type:function size:0x10
build__31sFStateFct_c<15dTgTumbleWeed_c>FRC12sStateIDIf_c = .text:0x00000D60; // type:function size:0x60
dispose__31sFStateFct_c<15dTgTumbleWeed_c>FRP10sStateIf_c = .text:0x00000DC0; // type:function size:0xC
initialize__28sFState_c<15dTgTumbleWeed_c>Fv = .text:0x00000DD0; // type:function size:0x1C
execute__28sFState_c<15dTgTumbleWeed_c>Fv = .text:0x00000DF0; // type:function size:0x1C
finalize__28sFState_c<15dTgTumbleWeed_c>Fv = .text:0x00000E10; // type:function size:0x1C
initializeState__84sStateMgr_c<15dTgTumbleWeed_c,20sStateMethodUsr_FI_c,12sFStateFct_c,13sStateIDChk_c>Fv = .text:0x00000E30; // type:function size:0x10
finalizeState__84sStateMgr_c<15dTgTumbleWeed_c,20sStateMethodUsr_FI_c,12sFStateFct_c,13sStateIDChk_c>Fv = .text:0x00000E40; // type:function size:0x10
refreshState__84sStateMgr_c<15dTgTumbleWeed_c,20sStateMethodUsr_FI_c,12sFStateFct_c,13sStateIDChk_c>Fv = .text:0x00000E50; // type:function size:0x10
getState__84sStateMgr_c<15dTgTumbleWeed_c,20sStateMethodUsr_FI_c,12sFStateFct_c,13sStateIDChk_c>CFv = .text:0x00000E60; // type:function size:0x10
getNewStateID__84sStateMgr_c<15dTgTumbleWeed_c,20sStateMethodUsr_FI_c,12sFStateFct_c,13sStateIDChk_c>CFv = .text:0x00000E70; // type:function size:0x10
getOldStateID__84sStateMgr_c<15dTgTumbleWeed_c,20sStateMethodUsr_FI_c,12sFStateFct_c,13sStateIDChk_c>CFv = .text:0x00000E80; // type:function size:0x10
finalizeState__30sFStateID_c<15dTgTumbleWeed_c>CFR15dTgTumbleWeed_c = .text:0x00000E90; // type:function size:0x30
executeState__30sFStateID_c<15dTgTumbleWeed_c>CFR15dTgTumbleWeed_c = .text:0x00000EC0; // type:function size:0x30
initializeState__30sFStateID_c<15dTgTumbleWeed_c>CFR15dTgTumbleWeed_c = .text:0x00000EF0; // type:function size:0x30
__sinit_\d_t_tumble_weed_cpp = .text:0x00000F20; // type:function size:0x27C
__dt__30sFStateID_c<15dTgTumbleWeed_c>Fv = .text:0x000011A0; // type:function size:0x58
isSameName__30sFStateID_c<15dTgTumbleWeed_c>CFPCc = .text:0x00001200; // type:function size:0x88
_ctors = .ctors:0x00000000; // type:label scope:global
_dtors = .dtors:0x00000000; // type:label scope:global
__destroy_global_chain_reference = .dtors:0x00000000; // type:object size:0x4 scope:global
lbl_476_rodata_0 = .rodata:0x00000000; // type:object size:0x1C data:float
lbl_476_rodata_1C = .rodata:0x0000001C; // type:object size:0x4 data:float
lbl_476_rodata_20 = .rodata:0x00000020; // type:object size:0x44 data:float
lbl_476_data_0 = .data:0x00000000; // type:object size:0x10 data:4byte
lbl_476_data_10 = .data:0x00000010; // type:object size:0x78
lbl_476_data_88 = .data:0x00000088; // type:object size:0x30
lbl_476_data_B8 = .data:0x000000B8; // type:object size:0x30
lbl_476_data_E8 = .data:0x000000E8; // type:object size:0x18
lbl_476_data_100 = .data:0x00000100; // type:object size:0x160
lbl_476_data_260 = .data:0x00000260; // type:object size:0x34
g_profile_TAG_TUMBLE_WEED = .data:0x00000000; // type:object size:0x10 data:4byte
__vt__15dTgTumbleWeed_c = .data:0x00000010; // type:object size:0x74
__vt__54sFStateMgr_c<15dTgTumbleWeed_c,20sStateMethodUsr_FI_c> = .data:0x00000088; // type:object size:0x30
__vt__84sStateMgr_c<15dTgTumbleWeed_c,20sStateMethodUsr_FI_c,12sFStateFct_c,13sStateIDChk_c> = .data:0x000000B8; // type:object size:0x30
__vt__31sFStateFct_c<15dTgTumbleWeed_c> = .data:0x000000E8; // type:object size:0x14
__vt__28sFState_c<15dTgTumbleWeed_c> = .data:0x00000100; // type:object size:0x18
__vt__30sFStateID_c<15dTgTumbleWeed_c> = .data:0x00000260; // type:object size:0x34
__global_destructor_chain = .bss:0x00000000; // type:object size:0x4 scope:global
lbl_476_bss_8 = .bss:0x00000008; // type:object size:0x10 data:4byte
lbl_476_bss_18 = .bss:0x00000018; // type:object size:0x40 data:4byte
lbl_476_bss_58 = .bss:0x00000058; // type:object size:0x40 data:4byte
StateID_AreaOut__15dTgTumbleWeed_c = .bss:0x00000018; // type:object size:0x30 data:4byte
lbl_476_bss_58 = .bss:0x00000058; // type:object size:0x30 data:4byte
lbl_476_bss_98 = .bss:0x00000098; // type:object size:0x30 data:4byte
+38
View File
@@ -107,6 +107,7 @@ d/d_player.cpp:
d/d_rawarchive.cpp:
.text start:0x80061B10 end:0x800629D0
.data start:0x8050DDD8 end:0x8050DDF8
d/d_scene.cpp:
.text start:0x800629D0 end:0x80062E40
@@ -118,6 +119,26 @@ d/d_stage.cpp:
d/d_sys.cpp:
.text start:0x80064250 end:0x80064920
toBeSorted/arc_managers/current_stage_arc_manager.cpp:
.text start:0x80068FD0 end:0x80069910
.ctors start:0x804DB6A8 end:0x804DB6AC
.data start:0x8050DFE0 end:0x8050E010
.sdata start:0x80571D30 end:0x80571D40
.sbss start:0x80575278 end:0x80575280
.bss start:0x805A0868 end:0x805A08C8
toBeSorted/arc_managers/oarc_manager.cpp:
.text start:0x80069910 end:0x80069ED4
.data start:0x8050E010 end:0x8050E038
.sdata start:0x80571D40 end:0x80571D68
.sbss start:0x80575280 end:0x80575288
toBeSorted/arc_managers/layout_arc_manager.cpp:
.text start:0x8006A0C0 end:0x8006A2D4
.data start:0x8050E048 end:0x8050E054
.sdata start:0x80571D68 end:0x80571D70
.sbss start:0x80575288 end:0x80575290
toBeSorted/sceneflag_manager.cpp:
.text start:0x800BD8C0 end:0x800BE7A8
.sbss start:0x805753E0 end:0x805753F0
@@ -198,6 +219,23 @@ toBeSorted/counters/extra_wallet_counter.cpp:
.data start:0x805280B0 end:0x805280D0
.sbss start:0x80575640 end:0x80575648
s/s_StateId.cpp:
.text start:0x802DDDB0 end:0x802DE1F4
.ctors start:0x804DB8B8 end:0x804DB8BC
.data start:0x80541930 end:0x805419A8
.sbss start:0x80575B68 end:0x80575B70
.bss start:0x805B84B0 end:0x805B84C8
s/s_StateMethod.cpp:
.text start:0x802DE200 end:0x802DE534
.data start:0x805419A8 end:0x805419E8
s/s_StateMethodUsr_FI.cpp:
.text start:0x802DE540 end:0x802DE6EC
s/s_Phase.cpp:
.text start:0x802DEEB0 end:0x802DEF74
DynamicLink.cpp:
.text start:0x802DF100 end:0x802DFD74
.data start:0x805419E8 end:0x80541A70
+150 -150
View File
@@ -723,7 +723,7 @@ fn_8001F680 = .text:0x8001F680; // type:function size:0x70
fn_8001F6F0 = .text:0x8001F6F0; // type:function size:0x4
fn_8001F700 = .text:0x8001F700; // type:function size:0xA8
fn_8001F7B0 = .text:0x8001F7B0; // type:function size:0x64
fn_8001F820 = .text:0x8001F820; // type:function size:0xD0
sprintf__15SizedString<32>FPCce = .text:0x8001F820; // type:function size:0xD0
fn_8001F8F0 = .text:0x8001F8F0; // type:function size:0x14
fn_8001F910 = .text:0x8001F910; // type:function size:0xD4
fn_8001F9F0 = .text:0x8001F9F0; // type:function size:0xB4
@@ -1118,7 +1118,7 @@ fn_8002E2A0 = .text:0x8002E2A0; // type:function size:0x90
fn_8002E330 = .text:0x8002E330; // type:function size:0x27C
fn_8002E5B0 = .text:0x8002E5B0; // type:function size:0x8
fn_8002E5C0 = .text:0x8002E5C0; // type:function size:0x70
fn_8002E630 = .text:0x8002E630; // type:function size:0x98
create__12dAcObjBase_cFQ28fProfile14PROFILE_NAME_eScUlP7mVec3_cP7mAng3_cP7mVec3_cUl = .text:0x8002E630; // type:function size:0x98
fn_8002E6D0 = .text:0x8002E6D0; // type:function size:0xA0
fn_8002E770 = .text:0x8002E770; // type:function size:0x7C
fn_8002E7F0 = .text:0x8002E7F0; // type:function size:0x58
@@ -1231,7 +1231,7 @@ fn_80032840 = .text:0x80032840; // type:function size:0x10
fn_80032850 = .text:0x80032850; // type:function size:0x64
fn_800328C0 = .text:0x800328C0; // type:function size:0x58
fn_80032920 = .text:0x80032920; // type:function size:0x10
fn_80032930 = .text:0x80032930; // type:function size:0x8
getStateID__14sStateMethod_cCFv = .text:0x80032930; // type:function size:0x8
fn_80032940 = .text:0x80032940; // type:function size:0x10
fn_80032950 = .text:0x80032950; // type:function size:0x8
fn_80032960 = .text:0x80032960; // type:function size:0x94
@@ -1552,7 +1552,7 @@ fn_8003D590 = .text:0x8003D590; // type:function size:0x30
fn_8003D5C0 = .text:0x8003D5C0; // type:function size:0x4
fn_8003D5D0 = .text:0x8003D5D0; // type:function size:0xC
fn_8003D5E0 = .text:0x8003D5E0; // type:function size:0x68
fn_8003D650 = .text:0x8003D650; // type:function size:0xD0
sprintf__16SizedString<128>FPCce = .text:0x8003D650; // type:function size:0xD0
fn_8003D720 = .text:0x8003D720; // type:function size:0x40
fn_8003D760 = .text:0x8003D760; // type:function size:0x11C
fn_8003D880 = .text:0x8003D880; // type:function size:0x20C
@@ -1620,10 +1620,10 @@ fn_8003EE80 = .text:0x8003EE80; // type:function size:0xC
fn_8003EE90 = .text:0x8003EE90; // type:function size:0x1C
fn_8003EEB0 = .text:0x8003EEB0; // type:function size:0x1C
fn_8003EED0 = .text:0x8003EED0; // type:function size:0x1C
fn_8003EEF0 = .text:0x8003EEF0; // type:function size:0xC
fn_8003EF00 = .text:0x8003EF00; // type:function size:0x8
fn_8003EF10 = .text:0x8003EF10; // type:function size:0x8
fn_8003EF20 = .text:0x8003EF20; // type:function size:0x8
refreshStateMethod__14sStateMethod_cFv = .text:0x8003EEF0; // type:function size:0xC
getState__14sStateMethod_cCFv = .text:0x8003EF00; // type:function size:0x8
getNewStateID__14sStateMethod_cCFv = .text:0x8003EF10; // type:function size:0x8
getOldStateID__14sStateMethod_cCFv = .text:0x8003EF20; // type:function size:0x8
fn_8003EF30 = .text:0x8003EF30; // type:function size:0x10
fn_8003EF40 = .text:0x8003EF40; // type:function size:0x10
fn_8003EF50 = .text:0x8003EF50; // type:function size:0x10
@@ -2741,35 +2741,35 @@ fn_80061AB0 = .text:0x80061AB0; // type:function size:0x5C
fn_80061B10 = .text:0x80061B10; // type:function size:0x88
fn_80061BA0 = .text:0x80061BA0; // type:function size:0x34
fn_80061BE0 = .text:0x80061BE0; // type:function size:0x10
fn_80061BF0 = .text:0x80061BF0; // type:function size:0x28
fn_80061C20 = .text:0x80061C20; // type:function size:0x80
fn_80061CA0 = .text:0x80061CA0; // type:function size:0xA0
fn_80061D40 = .text:0x80061D40; // type:function size:0x8
fn_80061D50 = .text:0x80061D50; // type:function size:0x8
fn_80061D60 = .text:0x80061D60; // type:function size:0x104
fn_80061E70 = .text:0x80061E70; // type:function size:0x74
fn_80061EF0 = .text:0x80061EF0; // type:function size:0xD0
fn_80061FC0 = .text:0x80061FC0; // type:function size:0x34
fn_80062000 = .text:0x80062000; // type:function size:0x9C
fn_800620A0 = .text:0x800620A0; // type:function size:0x104
fn_800621B0 = .text:0x800621B0; // type:function size:0x14C
fn_80062300 = .text:0x80062300; // type:function size:0x5C
fn_80062360 = .text:0x80062360; // type:function size:0x14
fn_80062380 = .text:0x80062380; // type:function size:0x74
fn_80062400 = .text:0x80062400; // type:function size:0x90
fn_80062490 = .text:0x80062490; // type:function size:0xAC
fn_80062540 = .text:0x80062540; // type:function size:0xB0
fn_800625F0 = .text:0x800625F0; // type:function size:0x44
fn_80062640 = .text:0x80062640; // type:function size:0x44
fn_80062690 = .text:0x80062690; // type:function size:0x2C
fn_800626C0 = .text:0x800626C0; // type:function size:0x5C
fn_80062720 = .text:0x80062720; // type:function size:0x60
fn_80062780 = .text:0x80062780; // type:function size:0x80
fn_80062800 = .text:0x80062800; // type:function size:0x34
fn_80062840 = .text:0x80062840; // type:function size:0x80
fn_800628C0 = .text:0x800628C0; // type:function size:0x90
fn_80062950 = .text:0x80062950; // type:function size:0x34
fn_80062990 = .text:0x80062990; // type:function size:0x40
__ct__14dRawArcEntry_cFv = .text:0x80061BF0; // type:function size:0x28
__dt__14dRawArcEntry_cFv = .text:0x80061C20; // type:function size:0x80
searchCallback__14dRawArcEntry_cFPvPvPC11ARCDirEntryPCcb = .text:0x80061CA0; // type:function size:0xA0
searchCallback1__14dRawArcEntry_cFPvPvPC11ARCDirEntryPCc = .text:0x80061D40; // type:function size:0x8
searchCallback2__14dRawArcEntry_cFPvPvPC11ARCDirEntryPCc = .text:0x80061D50; // type:function size:0x8
destroy__14dRawArcEntry_cFPv = .text:0x80061D60; // type:function size:0x104
loadArcFromDiskChecked__14dRawArcEntry_cFPCcPCcUcPQ23EGG4Heap = .text:0x80061E70; // type:function size:0x74
loadArcFromDisk__14dRawArcEntry_cFPCcPCcUcPQ23EGG4Heap = .text:0x80061EF0; // type:function size:0xD0
checkArcExistsOnDisk__14dRawArcEntry_cFPCcPCc = .text:0x80061FC0; // type:function size:0x34
checkArcExistsOnDiskInner__14dRawArcEntry_cFR16SizedString<128>PCcPCc = .text:0x80062000; // type:function size:0x9C
mount__14dRawArcEntry_cFPCcPvPvUcPQ23EGG4Heap = .text:0x800620A0; // type:function size:0x104
ensureLoadedMaybe__14dRawArcEntry_cFPv = .text:0x800621B0; // type:function size:0x14C
onMount__14dRawArcEntry_cFPv = .text:0x80062300; // type:function size:0x5C
__ct__14dRawArcTable_cFv = .text:0x80062360; // type:function size:0x14
__dt__14dRawArcTable_cFv = .text:0x80062380; // type:function size:0x74
init__14dRawArcTable_cFUsPvPQ23EGG4Heap = .text:0x80062400; // type:function size:0x90
getArcOrLoadFromDisk__14dRawArcTable_cFPCcPCcUcPQ23EGG4Heap = .text:0x80062490; // type:function size:0xAC
addEntryFromSuperArc__14dRawArcTable_cFPCcPvUcPQ23EGG4Heap = .text:0x80062540; // type:function size:0xB0
ensureLoadedMaybe2__14dRawArcTable_cFPCc = .text:0x800625F0; // type:function size:0x44
ensureLoadedMaybe__14dRawArcTable_cFPCc = .text:0x80062640; // type:function size:0x44
hasEntry__14dRawArcTable_cFPCc = .text:0x80062690; // type:function size:0x2C
decreaseRefCount__14dRawArcTable_cFPCc = .text:0x800626C0; // type:function size:0x5C
getDataFromOarc__14dRawArcTable_cFPCcPCc = .text:0x80062720; // type:function size:0x60
getSubEntryData__14dRawArcTable_cFPCcPCc = .text:0x80062780; // type:function size:0x80
getLoadedArcData__14dRawArcTable_cFPCc = .text:0x80062800; // type:function size:0x34
ensureAllEntriesLoaded__14dRawArcTable_cFv = .text:0x80062840; // type:function size:0x80
findEntry__14dRawArcTable_cCFPCc = .text:0x800628C0; // type:function size:0x90
findEmptySlot__14dRawArcTable_cFv = .text:0x80062950; // type:function size:0x34
findLoadedEntry__14dRawArcTable_cFPCc = .text:0x80062990; // type:function size:0x40
fn_800629D0 = .text:0x800629D0; // type:function size:0x60
fn_80062A30 = .text:0x80062A30; // type:function size:0x50
fn_80062A80 = .text:0x80062A80; // type:function size:0x58
@@ -2982,58 +2982,58 @@ fn_80068E70 = .text:0x80068E70; // type:function size:0xC
fn_80068E80 = .text:0x80068E80; // type:function size:0x6C
fn_80068EF0 = .text:0x80068EF0; // type:function size:0xC0
fn_80068FB0 = .text:0x80068FB0; // type:function size:0x20
fn_80068FD0 = .text:0x80068FD0; // type:function size:0x54
fn_80069030 = .text:0x80069030; // type:function size:0x64
fn_800690A0 = .text:0x800690A0; // type:function size:0x14
fn_800690C0 = .text:0x800690C0; // type:function size:0x218
fn_800692E0 = .text:0x800692E0; // type:function size:0x38
fn_80069320 = .text:0x80069320; // type:function size:0x14
fn_80069340 = .text:0x80069340; // type:function size:0x14
fn_80069360 = .text:0x80069360; // type:function size:0x10C
fn_80069470 = .text:0x80069470; // type:function size:0x5C
fn_800694D0 = .text:0x800694D0; // type:function size:0x74
fn_80069550 = .text:0x80069550; // type:function size:0x38
fn_80069590 = .text:0x80069590; // type:function size:0x3C
fn_800695D0 = .text:0x800695D0; // type:function size:0x28
fn_80069600 = .text:0x80069600; // type:function size:0x48
fn_80069650 = .text:0x80069650; // type:function size:0x48
fn_800696A0 = .text:0x800696A0; // type:function size:0x8
fn_800696B0 = .text:0x800696B0; // type:function size:0x12C
fn_800697E0 = .text:0x800697E0; // type:function size:0xB0
fn_80069890 = .text:0x80069890; // type:function size:0x64
fn_80069900 = .text:0x80069900; // type:function size:0x10
fn_80069910 = .text:0x80069910; // type:function size:0x44
fn_80069960 = .text:0x80069960; // type:function size:0x64
fn_800699D0 = .text:0x800699D0; // type:function size:0x14
fn_800699F0 = .text:0x800699F0; // type:function size:0x34
fn_80069A30 = .text:0x80069A30; // type:function size:0x48
fn_80069A80 = .text:0x80069A80; // type:function size:0x44
fn_80069AD0 = .text:0x80069AD0; // type:function size:0x8
fn_80069AE0 = .text:0x80069AE0; // type:function size:0x8
fn_80069AF0 = .text:0x80069AF0; // type:function size:0x30
fn_80069B20 = .text:0x80069B20; // type:function size:0x8
fn_80069B30 = .text:0x80069B30; // type:function size:0x10
fn_80069B40 = .text:0x80069B40; // type:function size:0x10
fn_80069B50 = .text:0x80069B50; // type:function size:0x10
fn_80069B60 = .text:0x80069B60; // type:function size:0x178
fn_80069CE0 = .text:0x80069CE0; // type:function size:0x178
fn_80069E60 = .text:0x80069E60; // type:function size:0x8
fn_80069E70 = .text:0x80069E70; // type:function size:0x64
__ct__22CurrentStageArcManagerFv = .text:0x80068FD0; // type:function size:0x54
__dt__22CurrentStageArcManagerFv = .text:0x80069030; // type:function size:0x64
init__22CurrentStageArcManagerFPQ23EGG4Heap = .text:0x800690A0; // type:function size:0x14
setStage__22CurrentStageArcManagerFPCc = .text:0x800690C0; // type:function size:0x218
decrement__22CurrentStageArcManagerFv = .text:0x800692E0; // type:function size:0x38
getData__22CurrentStageArcManagerFPCc = .text:0x80069320; // type:function size:0x14
getFileFromCurrentLay0Arc__22CurrentStageArcManagerFPCc = .text:0x80069340; // type:function size:0x14
loadFileFromExtraLayerArc__22CurrentStageArcManagerFi = .text:0x80069360; // type:function size:0x10C
unloadExtraLayerArc__22CurrentStageArcManagerFv = .text:0x80069470; // type:function size:0x5C
loadRoomArc__22CurrentStageArcManagerFi = .text:0x800694D0; // type:function size:0x74
addEntryFromSuperArc__22CurrentStageArcManagerFPCcPv = .text:0x80069550; // type:function size:0x38
unloadRoomArc__22CurrentStageArcManagerFi = .text:0x80069590; // type:function size:0x3C
decrement__22CurrentStageArcManagerFPCc = .text:0x800695D0; // type:function size:0x28
loadFromRoomArc__22CurrentStageArcManagerFiPCc = .text:0x80069600; // type:function size:0x48
getDataFromRoomArc__22CurrentStageArcManagerFiPCc = .text:0x80069650; // type:function size:0x48
getHeap__Fv = .text:0x800696A0; // type:function size:0x8
getCurrentStageDirectory__22CurrentStageArcManagerFv = .text:0x800696B0; // type:function size:0x12C
getRoomArcDirectory__22CurrentStageArcManagerCFi = .text:0x800697E0; // type:function size:0xB0
create__22CurrentStageArcManagerFPQ23EGG4Heap = .text:0x80069890; // type:function size:0x64
__sinit_\current_stage_arc_manager_cpp = .text:0x80069900; // type:function size:0x10 scope:local
__ct__11OarcManagerFv = .text:0x80069910; // type:function size:0x44
__dt__11OarcManagerFv = .text:0x80069960; // type:function size:0x64
init__11OarcManagerFPQ23EGG4Heap = .text:0x800699D0; // type:function size:0x14
checkIfObjectArcExistsOnDisk__11OarcManagerFPCc = .text:0x800699F0; // type:function size:0x34
loadObjectArcFromDisk__11OarcManagerFPCcPQ23EGG4Heap = .text:0x80069A30; // type:function size:0x48
addEntryFromSuperArc__11OarcManagerFPCcPvPQ23EGG4Heap = .text:0x80069A80; // type:function size:0x44
ensureLoaded1__11OarcManagerFPCc = .text:0x80069AD0; // type:function size:0x8
ensureLoaded2__11OarcManagerFPCc = .text:0x80069AE0; // type:function size:0x8
decrement__11OarcManagerFPCc = .text:0x80069AF0; // type:function size:0x30
getData__11OarcManagerFPCcPCc = .text:0x80069B20; // type:function size:0x8
getMdlFromArc2__11OarcManagerFPCc = .text:0x80069B30; // type:function size:0x10
getMdlFromArc__11OarcManagerFPCc = .text:0x80069B40; // type:function size:0x10
getZevFromArc__11OarcManagerFPCc = .text:0x80069B50; // type:function size:0x10
getDzbFromArc__11OarcManagerFPCcPCc = .text:0x80069B60; // type:function size:0x178
getPlcFromArc__11OarcManagerFPCcPCc = .text:0x80069CE0; // type:function size:0x178
getSubEntryData__11OarcManagerFPCcPCc = .text:0x80069E60; // type:function size:0x8
create__11OarcManagerFPQ23EGG4Heap = .text:0x80069E70; // type:function size:0x64
fn_80069EE0 = .text:0x80069EE0; // type:function size:0x6C
fn_80069F50 = .text:0x80069F50; // type:function size:0xC
fn_80069F60 = .text:0x80069F60; // type:function size:0x88
fn_80069FF0 = .text:0x80069FF0; // type:function size:0xC4
fn_8006A0C0 = .text:0x8006A0C0; // type:function size:0x44
fn_8006A110 = .text:0x8006A110; // type:function size:0x64
fn_8006A180 = .text:0x8006A180; // type:function size:0x14
fn_8006A1A0 = .text:0x8006A1A0; // type:function size:0x48
fn_8006A1F0 = .text:0x8006A1F0; // type:function size:0x8
fn_8006A200 = .text:0x8006A200; // type:function size:0x8
fn_8006A210 = .text:0x8006A210; // type:function size:0x8
fn_8006A220 = .text:0x8006A220; // type:function size:0x30
fn_8006A250 = .text:0x8006A250; // type:function size:0x8
fn_8006A260 = .text:0x8006A260; // type:function size:0x8
fn_8006A270 = .text:0x8006A270; // type:function size:0x64
__ct__16LayoutArcManagerFv = .text:0x8006A0C0; // type:function size:0x44
__dt__16LayoutArcManagerFv = .text:0x8006A110; // type:function size:0x64
init__16LayoutArcManagerFPQ23EGG4Heap = .text:0x8006A180; // type:function size:0x14
loadLayoutArcFromDisk__16LayoutArcManagerFPCcPQ23EGG4Heap = .text:0x8006A1A0; // type:function size:0x48
ensureLoaded1__16LayoutArcManagerFPCc = .text:0x8006A1F0; // type:function size:0x8
ensureLoaded2__16LayoutArcManagerFPCc = .text:0x8006A200; // type:function size:0x8
hasEntry__16LayoutArcManagerFPCc = .text:0x8006A210; // type:function size:0x8
decrement__16LayoutArcManagerFPCc = .text:0x8006A220; // type:function size:0x30
getData__16LayoutArcManagerFPCcPCc = .text:0x8006A250; // type:function size:0x8
getLoadedData__16LayoutArcManagerFPCc = .text:0x8006A260; // type:function size:0x8
create__16LayoutArcManagerFPQ23EGG4Heap = .text:0x8006A270; // type:function size:0x64
fn_8006A2E0 = .text:0x8006A2E0; // type:function size:0x6C
fn_8006A350 = .text:0x8006A350; // type:function size:0xC
fn_8006A360 = .text:0x8006A360; // type:function size:0x88
@@ -17168,36 +17168,36 @@ fn_802DDC20 = .text:0x802DDC20; // type:function size:0x40
fn_802DDC60 = .text:0x802DDC60; // type:function size:0x58
fn_802DDCC0 = .text:0x802DDCC0; // type:function size:0xA8
fn_802DDD70 = .text:0x802DDD70; // type:function size:0x40
fn_802DDDB0 = .text:0x802DDDB0; // type:function size:0x34
fn_802DDDF0 = .text:0x802DDDF0; // type:function size:0x58
fn_802DDE50 = .text:0x802DDE50; // type:function size:0x10
fn_802DDE60 = .text:0x802DDE60; // type:function size:0x68
fn_802DDED0 = .text:0x802DDED0; // type:function size:0x10
fn_802DDEE0 = .text:0x802DDEE0; // type:function size:0x34
fn_802DDF20 = .text:0x802DDF20; // type:function size:0x8
fn_802DDF30 = .text:0x802DDF30; // type:function size:0x8
fn_802DDF40 = .text:0x802DDF40; // type:function size:0x8
fn_802DDF50 = .text:0x802DDF50; // type:function size:0x40
fn_802DDF90 = .text:0x802DDF90; // type:function size:0x40
fn_802DDFD0 = .text:0x802DDFD0; // type:function size:0x58
fn_802DE030 = .text:0x802DE030; // type:function size:0x40
fn_802DE070 = .text:0x802DE070; // type:function size:0x40
fn_802DE0B0 = .text:0x802DE0B0; // type:function size:0x40
fn_802DE0F0 = .text:0x802DE0F0; // type:function size:0x58
fn_802DE150 = .text:0x802DE150; // type:function size:0x40
fn_802DE190 = .text:0x802DE190; // type:function size:0x8
fn_802DE1A0 = .text:0x802DE1A0; // type:function size:0x54
fn_802DE200 = .text:0x802DE200; // type:function size:0x48
fn_802DE250 = .text:0x802DE250; // type:function size:0x58
fn_802DE2B0 = .text:0x802DE2B0; // type:function size:0xA8
fn_802DE360 = .text:0x802DE360; // type:function size:0xC4
fn_802DE430 = .text:0x802DE430; // type:function size:0x8C
fn_802DE4C0 = .text:0x802DE4C0; // type:function size:0x74
fn_802DE540 = .text:0x802DE540; // type:function size:0x3C
fn_802DE580 = .text:0x802DE580; // type:function size:0x68
fn_802DE5F0 = .text:0x802DE5F0; // type:function size:0x4C
fn_802DE640 = .text:0x802DE640; // type:function size:0x54
fn_802DE6A0 = .text:0x802DE6A0; // type:function size:0x4C
__ct__10sStateID_cFPCc = .text:0x802DDDB0; // type:function size:0x34
__dt__10sStateID_cFv = .text:0x802DDDF0; // type:function size:0x58
isNull__10sStateID_cCFv = .text:0x802DDE50; // type:function size:0x10
isEqual__10sStateID_cCFRC12sStateIDIf_c = .text:0x802DDE60; // type:function size:0x68
__eq__10sStateID_cCFRC12sStateIDIf_c = .text:0x802DDED0; // type:function size:0x10
__ne__10sStateID_cCFRC12sStateIDIf_c = .text:0x802DDEE0; // type:function size:0x34
isSameName__10sStateID_cCFPCc = .text:0x802DDF20; // type:function size:0x8
name__10sStateID_cCFv = .text:0x802DDF30; // type:function size:0x8
number__10sStateID_cCFv = .text:0x802DDF40; // type:function size:0x8
__dt__13sStateFctIf_cFv = .text:0x802DDF50; // type:function size:0x40
__dt__15sStateIDChkIf_cFv = .text:0x802DDF90; // type:function size:0x40
__dt__13sStateIDChk_cFv = .text:0x802DDFD0; // type:function size:0x58
__dt__12sStateIDIf_cFv = .text:0x802DE030; // type:function size:0x40
__dt__10sStateIf_cFv = .text:0x802DE070; // type:function size:0x40
__dt__16sStateMethodIf_cFv = .text:0x802DE0B0; // type:function size:0x40
__dt__20sStateMethodUsr_FI_cFv = .text:0x802DE0F0; // type:function size:0x58
__dt__13sStateMgrIf_cFv = .text:0x802DE150; // type:function size:0x40
isNormalID__13sStateIDChk_cCFRC12sStateIDIf_c = .text:0x802DE190; // type:function size:0x8
__sinit_\s_StateId_cpp = .text:0x802DE1A0; // type:function size:0x54 scope:local
__ct__14sStateMethod_cFR15sStateIDChkIf_cR13sStateFctIf_cRC12sStateIDIf_c = .text:0x802DE200; // type:function size:0x48
__dt__14sStateMethod_cFv = .text:0x802DE250; // type:function size:0x58
initializeStateMethod__14sStateMethod_cFv = .text:0x802DE2B0; // type:function size:0xA8
executeStateMethod__14sStateMethod_cFv = .text:0x802DE360; // type:function size:0xC4
finalizeStateMethod__14sStateMethod_cFv = .text:0x802DE430; // type:function size:0x8C
changeStateMethod__14sStateMethod_cFRC12sStateIDIf_c = .text:0x802DE4C0; // type:function size:0x74
__ct__20sStateMethodUsr_FI_cFR15sStateIDChkIf_cR13sStateFctIf_cRC12sStateIDIf_c = .text:0x802DE540; // type:function size:0x3C
initializeStateLocalMethod__20sStateMethodUsr_FI_cFv = .text:0x802DE580; // type:function size:0x68
executeStateLocalMethod__20sStateMethodUsr_FI_cFv = .text:0x802DE5F0; // type:function size:0x4C
finalizeStateLocalMethod__20sStateMethodUsr_FI_cFv = .text:0x802DE640; // type:function size:0x54
changeStateLocalMethod__20sStateMethodUsr_FI_cFRC12sStateIDIf_c = .text:0x802DE6A0; // type:function size:0x4C
fn_802DE6F0 = .text:0x802DE6F0; // type:function size:0x4
fn_802DE700 = .text:0x802DE700; // type:function size:0x8
fn_802DE710 = .text:0x802DE710; // type:function size:0x2C
@@ -17221,8 +17221,8 @@ fn_802DED40 = .text:0x802DED40; // type:function size:0x4
fn_802DED50 = .text:0x802DED50; // type:function size:0x50
fn_802DEDA0 = .text:0x802DEDA0; // type:function size:0x64
fn_802DEE10 = .text:0x802DEE10; // type:function size:0x98
fn_802DEEB0 = .text:0x802DEEB0; // type:function size:0x14
fn_802DEED0 = .text:0x802DEED0; // type:function size:0xA4
__ct__8sPhase_cFPPFPv_Q28sPhase_c15METHOD_RESULT_ei = .text:0x802DEEB0; // type:function size:0x14
callMethod__8sPhase_cFPv = .text:0x802DEED0; // type:function size:0xA4
fn_802DEF80 = .text:0x802DEF80; // type:function size:0x8
fn_802DEF90 = .text:0x802DEF90; // type:function size:0x4C
fn_802DEFE0 = .text:0x802DEFE0; // type:function size:0x80
@@ -17288,7 +17288,7 @@ fn_802E0AB0 = .text:0x802E0AB0; // type:function size:0x34
fn_802E0AF0 = .text:0x802E0AF0; // type:function size:0x1BC
fn_802E0CB0 = .text:0x802E0CB0; // type:function size:0x48
fn_802E0D00 = .text:0x802E0D00; // type:function size:0x8
fn_802E0D10 = .text:0x802E0D10; // type:function size:0x8
rnd__2cMFv = .text:0x802E0D10; // type:function size:0x8
fn_802E0D20 = .text:0x802E0D20; // type:function size:0x58
fn_802E0D80 = .text:0x802E0D80; // type:function size:0x38
fn_802E0DC0 = .text:0x802E0DC0; // type:function size:0x48
@@ -26139,7 +26139,7 @@ getFileFast__Q23EGG7ArchiveFlPQ23EGG4Heapl = .text:0x80493DC0; // type:function
countFileCallbackFunc__3EGGFPvPvUlPC11ARCDirEntryPCc = .text:0x80493F10; // type:function size:0x18
countFile__Q23EGG7ArchiveFv = .text:0x80493F30; // type:function size:0x38
searchInsideWithPath__3EGGFPQ23EGG7ArchiveP9ARCHandlePFPvPvUlPC11ARCDirEntryPCc_vPvPcUl = .text:0x80493F70; // type:function size:0x144
searchInside__Q23EGG7ArchiveFPFPvPvUlPC11ARCDirEntryPCc_vPv = .text:0x804940C0; // type:function size:0x74
searchInside__Q23EGG7ArchiveFPFPvPvPC11ARCDirEntryPCc_vPv = .text:0x804940C0; // type:function size:0x74
loadFromDisc__EGG__Archive = .text:0x80494140; // type:function size:0x114
initialize__Q23EGG7DvdFileFv = .text:0x80494260; // type:function size:0x40
__ct__Q23EGG7DvdFileFv = .text:0x804942A0; // type:function size:0x44
@@ -27383,11 +27383,11 @@ strlen = .text:0x804C64DC; // type:function size:0x1C scope:weak
__va_arg = .text:0x804C64F8; // type:function size:0xC8 scope:global
__register_global_object = .text:0x804C65C0; // type:function size:0x18 scope:global
__destroy_global_chain = .text:0x804C65D8; // type:function size:0x48 scope:global
fn_804C6620 = .text:0x804C6620; // type:function size:0x104
__construct_new_array = .text:0x804C6620; // type:function size:0x104
fn_804C6724 = .text:0x804C6724; // type:function size:0xBC
__construct_array = .text:0x804C67E0; // type:function size:0xF8
__destroy_arr = .text:0x804C68D8; // type:function size:0x78
fn_804C6950 = .text:0x804C6950; // type:function size:0x80
__destroy_new_array = .text:0x804C6950; // type:function size:0x80
__ptmf_test = .text:0x804C69D0; // type:function size:0x30
fn_804C6A00 = .text:0x804C6A00; // type:function size:0x3C
__ptmf_scall = .text:0x804C6A3C; // type:function size:0x28
@@ -30760,8 +30760,8 @@ lbl_8050DD58 = .data:0x8050DD58; // type:object size:0x18
lbl_8050DD70 = .data:0x8050DD70; // type:object size:0x30
lbl_8050DDA0 = .data:0x8050DDA0; // type:object size:0x18
lbl_8050DDB8 = .data:0x8050DDB8; // type:object size:0x20
lbl_8050DDD8 = .data:0x8050DDD8; // type:object size:0x10
lbl_8050DDE8 = .data:0x8050DDE8; // type:object size:0x10
lbl_8050DDD8 = .data:0x8050DDD8; // type:object size:0xE data:string
lbl_8050DDE8 = .data:0x8050DDE8; // type:object size:0xB data:string
lbl_8050DDF8 = .data:0x8050DDF8; // type:object size:0x50
lbl_8050DE48 = .data:0x8050DE48; // type:object size:0x10
lbl_8050DE58 = .data:0x8050DE58; // type:object size:0x5C
@@ -30781,15 +30781,15 @@ lbl_8050DFB0 = .data:0x8050DFB0; // type:object size:0xC
lbl_8050DFBC = .data:0x8050DFBC; // type:object size:0xC
lbl_8050DFC8 = .data:0x8050DFC8; // type:object size:0xC
lbl_8050DFD4 = .data:0x8050DFD4; // type:object size:0xC
lbl_8050DFE0 = .data:0x8050DFE0; // type:object size:0xC
lbl_8050DFEC = .data:0x8050DFEC; // type:object size:0xC
lbl_8050DFF8 = .data:0x8050DFF8; // type:object size:0xC
lbl_8050E004 = .data:0x8050E004; // type:object size:0xC
lbl_8050DFE0 = .data:0x8050DFE0; // type:object size:0xA data:string
lbl_8050DFEC = .data:0x8050DFEC; // type:object size:0xB data:string
lbl_8050DFF8 = .data:0x8050DFF8; // type:object size:0x9 data:string
__vt__22CurrentStageArcManager = .data:0x8050E004; // type:object size:0xC
lbl_8050E010 = .data:0x8050E010; // type:object size:0x10 data:string
lbl_8050E020 = .data:0x8050E020; // type:object size:0xC data:string
lbl_8050E02C = .data:0x8050E02C; // type:object size:0xC
__vt__11OarcManager = .data:0x8050E02C; // type:object size:0xC
lbl_8050E038 = .data:0x8050E038; // type:object size:0x10
lbl_8050E048 = .data:0x8050E048; // type:object size:0xC
__vt__16LayoutArcManager = .data:0x8050E048; // type:object size:0xC
lbl_8050E054 = .data:0x8050E054; // type:object size:0xC
lbl_8050E060 = .data:0x8050E060; // type:object size:0x30
lbl_8050E090 = .data:0x8050E090; // type:object size:0x2FC
@@ -35656,13 +35656,13 @@ lbl_805417B8 = .data:0x805417B8; // type:object size:0x8C
lbl_80541844 = .data:0x80541844; // type:object size:0x58
lbl_8054189C = .data:0x8054189C; // type:object size:0x4C
lbl_805418E8 = .data:0x805418E8; // type:object size:0x48
lbl_80541930 = .data:0x80541930; // type:object size:0x10
lbl_80541940 = .data:0x80541940; // type:object size:0x40
lbl_80541980 = .data:0x80541980; // type:object size:0x28
lbl_805419A8 = .data:0x805419A8; // type:object size:0x40
__vt__13sStateIDChk_c = .data:0x80541930; // type:object size:0x10
__vt__20sStateMethodUsr_FI_c = .data:0x80541940; // type:object size:0x40
__vt__10sStateID_c = .data:0x80541980; // type:object size:0x28
__vt__14sStateMethod_c = .data:0x805419A8; // type:object size:0x40
lbl_805419E8 = .data:0x805419E8; // type:object size:0xC data:string
lbl_805419F4 = .data:0x805419F4; // type:object size:0xC data:string
lbl_80541A00 = .data:0x80541A00; // type:object size:0x10
@LOCAL@getModuleTypeString__20DynamicModuleControlCFv@REL_LOAD_TYPES = .data:0x80541A00; // type:object size:0x10
__vt__20DynamicModuleControl = .data:0x80541A10; // type:object size:0x30
__vt__24DynamicModuleControlBase = .data:0x80541A40; // type:object size:0x30
lbl_80541A70 = .data:0x80541A70; // type:object size:0x808
@@ -37656,14 +37656,14 @@ lbl_80571D10 = .sdata:0x80571D10; // type:object size:0x8
lbl_80571D18 = .sdata:0x80571D18; // type:object size:0x8
lbl_80571D20 = .sdata:0x80571D20; // type:object size:0x8
lbl_80571D28 = .sdata:0x80571D28; // type:object size:0x8 data:string
lbl_80571D30 = .sdata:0x80571D30; // type:object size:0x8
lbl_80571D38 = .sdata:0x80571D38; // type:object size:0x8
lbl_80571D40 = .sdata:0x80571D40; // type:object size:0x8
lbl_80571D48 = .sdata:0x80571D48; // type:object size:0x8
lbl_80571D50 = .sdata:0x80571D50; // type:object size:0x8
lbl_80571D58 = .sdata:0x80571D58; // type:object size:0x8
lbl_80571D60 = .sdata:0x80571D60; // type:object size:0x8
lbl_80571D68 = .sdata:0x80571D68; // type:object size:0x8
lbl_80571D30 = .sdata:0x80571D30; // type:object size:0x7 data:string
lbl_80571D38 = .sdata:0x80571D38; // type:object size:0x7 data:string
lbl_80571D40 = .sdata:0x80571D40; // type:object size:0x7 data:string
lbl_80571D48 = .sdata:0x80571D48; // type:object size:0x5 data:string
lbl_80571D50 = .sdata:0x80571D50; // type:object size:0x5 data:string
lbl_80571D58 = .sdata:0x80571D58; // type:object size:0x5 data:string
lbl_80571D60 = .sdata:0x80571D60; // type:object size:0x5 data:string
lbl_80571D68 = .sdata:0x80571D68; // type:object size:0x7 data:string
lbl_80571D70 = .sdata:0x80571D70; // type:object size:0x4
lbl_80571D74 = .sdata:0x80571D74; // type:object size:0x4
lbl_80571D78 = .sdata:0x80571D78; // type:object size:0x4 data:wstring
@@ -39819,10 +39819,10 @@ lbl_80575260 = .sbss:0x80575260; // type:object size:0x8 data:4byte
lbl_80575268 = .sbss:0x80575268; // type:object size:0x8 data:4byte
lbl_80575270 = .sbss:0x80575270; // type:object size:0x1 data:byte
lbl_80575274 = .sbss:0x80575274; // type:object size:0x4 data:4byte
lbl_80575278 = .sbss:0x80575278; // type:object size:0x4 data:4byte
lbl_8057527C = .sbss:0x8057527C; // type:object size:0x1 data:byte
lbl_80575280 = .sbss:0x80575280; // type:object size:0x8 data:4byte
lbl_80575288 = .sbss:0x80575288; // type:object size:0x8 data:4byte
sInstance__22CurrentStageArcManager = .sbss:0x80575278; // type:object size:0x4 data:4byte
@GUARD@getCurrentStageDirectory__22CurrentStageArcManagerFv@sStageDirTmp = .sbss:0x8057527C; // type:object size:0x1 data:byte
sInstance__11OarcManager = .sbss:0x80575280; // type:object size:0x4 data:4byte
sInstance__16LayoutArcManager = .sbss:0x80575288; // type:object size:0x8 data:4byte
lbl_80575290 = .sbss:0x80575290; // type:object size:0x4
lbl_80575294 = .sbss:0x80575294; // type:object size:0x4
lbl_80575298 = .sbss:0x80575298; // type:object size:0x4 data:4byte
@@ -40270,7 +40270,7 @@ lbl_80575B00 = .sbss:0x80575B00; // type:object size:0x20 data:4byte
lbl_80575B20 = .sbss:0x80575B20; // type:object size:0x20 data:4byte
lbl_80575B40 = .sbss:0x80575B40; // type:object size:0x20 data:4byte
lbl_80575B60 = .sbss:0x80575B60; // type:object size:0x8 data:4byte
lbl_80575B68 = .sbss:0x80575B68; // type:object size:0x8 data:4byte
sm_numberMemo__10sStateID_c = .sbss:0x80575B68; // type:object size:0x8 data:4byte
lbl_80575B70 = .sbss:0x80575B70; // type:object size:0x8 data:4byte
lbl_80575B78 = .sbss:0x80575B78; // type:object size:0x4 data:4byte
lbl_80575B7C = .sbss:0x80575B7C; // type:object size:0x4 data:4byte
@@ -48206,8 +48206,8 @@ lbl_805A07E4 = .bss:0x805A07E4; // type:object size:0xC
lbl_805A07F0 = .bss:0x805A07F0; // type:object size:0xC
lbl_805A07FC = .bss:0x805A07FC; // type:object size:0x44 data:byte
lbl_805A0840 = .bss:0x805A0840; // type:object size:0x28 data:byte
lbl_805A0868 = .bss:0x805A0868; // type:object size:0x40 data:byte
lbl_805A08A8 = .bss:0x805A08A8; // type:object size:0x20 data:byte
@LOCAL@getCurrentStageDirectory__22CurrentStageArcManagerFv@sStageDirTmp = .bss:0x805A0868; // type:object size:0x40 data:byte
s_roomArcTmp = .bss:0x805A08A8; // type:object size:0x20 data:byte
lbl_805A08C8 = .bss:0x805A08C8; // type:object size:0x138 data:2byte
lbl_805A0A00 = .bss:0x805A0A00; // type:object size:0x28 data:byte
lbl_805A0A28 = .bss:0x805A0A28; // type:object size:0x28 data:byte
@@ -49100,7 +49100,7 @@ lbl_805B8378 = .bss:0x805B8378; // type:object size:0x28 data:4byte
lbl_805B83A0 = .bss:0x805B83A0; // type:object size:0x100
lbl_805B84A0 = .bss:0x805B84A0; // type:object size:0x10 data:4byte
lbl_805B84B0 = .bss:0x805B84B0; // type:object size:0xC
lbl_805B84BC = .bss:0x805B84BC; // type:object size:0xC
null__8sStateID = .bss:0x805B84BC; // type:object size:0xC
m_tmpCtData__7fBase_c = .bss:0x805B84C8; // type:object size:0x10 data:4byte
m_connectManage__10fManager_c = .bss:0x805B84D8; // type:object size:0x10 data:4byte
m_createManage__10fManager_c = .bss:0x805B84E8; // type:object size:0x14 data:4byte
+10 -2
View File
@@ -289,10 +289,14 @@ config.libs = [
Object(NonMatching, "d/d_dvd_unk.cpp"),
Object(NonMatching, "d/d_dylink.cpp"),
Object(NonMatching, "d/d_heap.cpp"),
Object(Matching, "d/d_rawarchive.cpp"),
Object(NonMatching, "d/d_stage.cpp"),
Object(NonMatching, "d/d_sys.cpp"),
Object(NonMatching, "d/a/d_a_base.cpp"),
Object(NonMatching, "d/a/obj/d_a_obj_base.cpp"),
Object(Matching, "toBeSorted/arc_managers/current_stage_arc_manager.cpp"),
Object(Matching, "toBeSorted/arc_managers/oarc_manager.cpp"),
Object(Matching, "toBeSorted/arc_managers/layout_arc_manager.cpp"),
Object(Matching, "toBeSorted/save_file.cpp"),
Object(Matching, "toBeSorted/counters/counter.cpp"),
Object(Matching, "toBeSorted/counters/rupee_counter.cpp"),
@@ -313,6 +317,10 @@ config.libs = [
Object(Matching, "m/m_heap.cpp"),
Object(NonMatching, "m/m_mtx.cpp"),
Object(Matching, "m/m_pad.cpp"),
Object(Matching, "s/s_StateId.cpp"),
Object(Matching, "s/s_StateMethod.cpp"),
Object(Matching, "s/s_StateMethodUsr_FI.cpp"),
Object(Matching, "s/s_Phase.cpp"),
Object(Matching, "DynamicLink.cpp"),
# framework (f_name)
# d stuff (d_name)
@@ -1074,7 +1082,7 @@ config.libs = [
Rel(NonMatching, "d_t_reaction", "REL/d/t/d_t_reaction.cpp"),
Rel(NonMatching, "d_t_restart_time_stone", "REL/d/t/d_t_restart_time_stone.cpp"),
Rel(NonMatching, "d_t_ride_rock_set", "REL/d/t/d_t_ride_rock_set.cpp"),
Rel(NonMatching, "d_t_rock_boat", "REL/d/t/d_t_rock_boat.cpp"),
Rel(Matching, "d_t_rock_boat", "REL/d/t/d_t_rock_boat.cpp"),
Rel(NonMatching, "d_t_roll_attack_log", "REL/d/t/d_t_roll_attack_log.cpp"),
Rel(NonMatching, "d_t_ro_at_target_manager", "REL/d/t/d_t_ro_at_target_manager.cpp"),
Rel(NonMatching, "d_t_scene_change", "REL/d/t/d_t_scene_change.cpp"),
@@ -1096,7 +1104,7 @@ config.libs = [
Rel(NonMatching, "d_t_sw_area", "REL/d/t/d_t_sw_area.cpp"),
Rel(Matching, "d_t_tackle", "REL/d/t/d_t_tackle.cpp"),
Rel(NonMatching, "d_t_telop", "REL/d/t/d_t_telop.cpp"),
Rel(NonMatching, "d_t_timer", "REL/d/t/d_t_timer.cpp"),
Rel(Matching, "d_t_timer", "REL/d/t/d_t_timer.cpp"),
Rel(NonMatching, "d_t_time_area_check", "REL/d/t/d_t_time_area_check.cpp"),
Rel(NonMatching, "d_t_time_door_beam", "REL/d/t/d_t_time_door_beam.cpp"),
Rel(NonMatching, "d_t_touch", "REL/d/t/d_t_touch.cpp"),
+5
View File
@@ -5,6 +5,11 @@
namespace cM {
static s16 atan2s(f32, f32);
void initRnd(s32);
f32 rnd();
int rndInt(int max);
f32 rndF(f32 max);
f32 rndFX(f32 amp);
} // namespace cM
#endif
+2 -2
View File
@@ -49,9 +49,9 @@ public:
/* 8002ea20 */ virtual bool drop();
public:
/* 8002e630 */ static dAcObjBase_c create(fProfile::PROFILE_NAME_e actorId, u32 roomId, u32 params1, mVec3_c *pos,
/* 8002e630 */ static dAcObjBase_c *create(fProfile::PROFILE_NAME_e actorId, s8 roomId, u32 params1, mVec3_c *pos,
mAng3_c *rot, mVec3_c *scale, u32 params2);
/* 8002e6d0 */ static dAcObjBase_c create(char *name, u32 roomId, u32 params1, mVec3_c *pos, mAng3_c *rot,
/* 8002e6d0 */ static dAcObjBase_c *create(char *name, u32 roomId, u32 params1, mVec3_c *pos, mAng3_c *rot,
mVec3_c *scale, u32 params2, u16 id, u8 viewclipId);
/* 8002e770 */ static dAcObjBase_c *findObject(fProfile::PROFILE_NAME_e actorId, fLiNdBa_c *refList,
dAcObjBase_c *parent);
+107
View File
@@ -0,0 +1,107 @@
#ifndef D_RAWARCHIVE_H
#define D_RAWARCHIVE_H
#include <common.h>
#include <m/m_dvd.h>
// clang-format off
#include <sized_string.h>
// clang-format on
// TODO: loading status could be an enum (-2/-1/0/+1)
// Ghidra: ArcManagerEntry
// size: 0x40
class dRawArcEntry_c {
public:
dRawArcEntry_c();
~dRawArcEntry_c();
bool destroy(void *arg);
bool loadArcFromDiskChecked(const char *fileName, const char *dirName, u8 mountDirection, EGG::Heap *heap);
bool loadArcFromDisk(const char *fileName, const char *dirName, u8 mountDirection, EGG::Heap *heap);
static BOOL checkArcExistsOnDisk(const char *fileName, const char *dirName);
static BOOL checkArcExistsOnDiskInner(SizedString<128> &path, const char *fileName, const char *dirName);
int mount(const char *name, void *data, void *callbackArg, u8 mountDirection, EGG::Heap *heap);
int onMount(void *callbackArg);
int ensureLoadedMaybe(void *callbackArg);
inline bool isReferenced() {
return mRefCount != 0;
}
inline const char *name() const {
return &mArcName;
}
inline bool isNotLoaded() {
return mpArc == nullptr;
}
inline bool isLoading() {
return mpDvdReq != nullptr;
}
inline void increaseRefCount() {
mRefCount++;
}
inline void decreaseRefCount() {
mRefCount--;
}
inline void *getData() {
return mpData;
}
inline EGG::Archive *getArc() {
return mpArc;
}
private:
static void searchCallback(void *, void *, const ARCDirEntry *, const char *, bool);
static void searchCallback1(void *, void *, const ARCDirEntry *, const char *);
static void searchCallback2(void *, void *, const ARCDirEntry *, const char *);
private:
/* 0x00 */ SizedString<32> mArcName;
/* 0x20 */ u16 mRefCount;
/* 0x24 */ mDvd_mountMemArchive_c *mpDvdReq;
/* 0x28 */ EGG::Archive *mpArc;
/* 0x2C */ EGG::Heap *mpCommandHeap;
/* 0x30 */ void *mpData;
/* 0x34 */ u32 mAmountRead;
/* 0x38 */ u32 mChecksum;
/* 0x3C */ EGG::FrmHeap *mpFrmHeap;
};
// Ghidra: ArcManagerEntryTable
// size: 0xC
class dRawArcTable_c {
public:
dRawArcTable_c();
~dRawArcTable_c();
bool init(u16 count, void *callbackArg, EGG::Heap *heap);
BOOL getArcOrLoadFromDisk(const char *name, const char *dirName, u8 mountDirection, EGG::Heap *heap);
BOOL addEntryFromSuperArc(const char *name, void *data, u8 mountDirection, EGG::Heap *heap);
int ensureLoadedMaybe2(const char *name);
int ensureLoadedMaybe(const char *name);
bool hasEntry(const char *name);
BOOL decreaseRefCount(const char *name);
void *getDataFromOarc(const char *name, const char *path);
void *getSubEntryData(const char *name, const char *path);
void *getLoadedArcData(const char *name);
int ensureAllEntriesLoaded();
dRawArcEntry_c *findEntry(const char *name) const;
dRawArcEntry_c *findEmptySlot();
dRawArcEntry_c *findLoadedEntry(const char *name);
private:
/* 0x0 */ dRawArcEntry_c *mpEntries;
/* 0x4 */ u16 mCount;
/* 0x8 */ void *mCallbackArg;
};
#endif;
+31
View File
@@ -0,0 +1,31 @@
#ifndef D_T_ROCK_BOAT
#define D_T_ROCK_BOAT
#include <d/a/d_a_base.h>
#include <f/f_list_nd.h>
#include <s/s_State.hpp>
#include <s/s_StateMgr.hpp>
class dTgAbs_c : public dAcBase_c {
public:
virtual ~dTgAbs_c() {}
};
class dTgRockBoat_c : public dTgAbs_c {
public:
dTgRockBoat_c() : mStateMgr(*this, sStateID::null) {}
virtual ~dTgRockBoat_c() {}
virtual int create() override;
virtual int actorExecute() override;
virtual int draw() override;
virtual int doDelete() override;
STATE_FUNC_DECLARE(dTgRockBoat_c, Wait);
private:
STATE_MGR_DECLARE(dTgRockBoat_c);
int cooldown;
int boatNum;
};
#endif
+41
View File
@@ -0,0 +1,41 @@
#ifndef D_T_TIMER_H
#define D_T_TIMER_H
#include <d/a/d_a_base.h>
class dTgTimerBase_c : public dAcBase_c {
public:
virtual ~dTgTimerBase_c() {}
};
class dTgTimer_c : public dTgTimerBase_c {
public:
dTgTimer_c() {}
virtual ~dTgTimer_c() {}
virtual int create() override;
virtual int actorExecute() override;
int getSubtypeFromParams();
u16 getTimerFromParams();
u16 getCheckSceneflag();
u16 getSetSceneflag();
u16 getTimer();
u16 setTimer(u16 val);
u16 getTargetTime();
bool checkShouldTrigger();
u16 getStoredTargetTime();
u16 getConstant0x50();
void incrementTimer();
void resetTimer();
u16 getConstant0x50_Thunk();
u16 (dTgTimer_c::*mGetTargetTimeFunc)();
u16 mTimer;
u16 mTargetTime;
};
#endif
+41
View File
@@ -0,0 +1,41 @@
#ifndef D_T_TUMBLE_WEED_H
#define D_T_TUMBLE_WEED_H
#include <d/tg/d_tg.h>
#include <f/f_list_nd.h>
#include <s/s_State.hpp>
#include <s/s_StateMgr.hpp>
class fLiNdTumbleweed_c : public fLiNdBaAutoUnlink_c {
public:
fLiNdTumbleweed_c(fBase_c *owner) : fLiNdBaAutoUnlink_c(owner) {}
u16 someField;
};
class dTgTumbleWeed_c : public dTg_c {
public:
dTgTumbleWeed_c() : mStateMgr(*this, sStateID::null), childTumbleweed(nullptr) {}
virtual ~dTgTumbleWeed_c() {}
virtual int create() override;
virtual int actorExecute() override;
virtual int draw() override;
virtual int doDelete() override;
STATE_FUNC_DECLARE(dTgTumbleWeed_c, AreaOut);
STATE_FUNC_DECLARE(dTgTumbleWeed_c, AreaIn);
STATE_FUNC_DECLARE(dTgTumbleWeed_c, Wind);
private:
bool shouldSpawnTumbleweed();
bool shouldDoWind();
void doSpawnTumbleweed();
void getWind(mVec3_c *);
STATE_MGR_DECLARE(dTgTumbleWeed_c);
u16 tumbleweedTimer;
u16 padding;
u16 windTimer;
fLiNdTumbleweed_c childTumbleweed;
};
#endif
+1 -1
View File
@@ -45,7 +45,7 @@ public:
/* 80493a40 */ static Archive *mountNandFile(NANDFileInfo *, Heap *heap, s32 align);
/* 80493ac0 */ static Archive *loadFST(const char *fileName, Heap *heap, s32 align);
/* 80493b80 */ void unmount();
/* 80493c20 */ u32 getFile(const char *name, FileInfo *out);
/* 80493c20 */ void *getFile(const char *name, FileInfo *out);
/* 80493cf0 */ s32 convertPathToEntryID(const char *path);
/* 80493d00 */ void *getFileFast(s32 entryId, FileInfo *fileinfo);
/* 80493dc0 */ void *getFileFast(s32 entryId, Heap *heap, s32 align);
+7
View File
@@ -12,6 +12,7 @@ class fBase_c;
class fLiNdBa_c : public cListNd_c {
public:
fLiNdBa_c(fBase_c *owner) : p_owner(owner) {}
~fLiNdBa_c() {}
inline fLiNdBa_c *getPrev() const {
return (fLiNdBa_c *)cListNd_c::getPrev();
@@ -27,4 +28,10 @@ public:
fBase_c *p_owner;
};
class fLiNdBaAutoUnlink_c : public fLiNdBa_c {
public:
fLiNdBaAutoUnlink_c(fBase_c *owner) : fLiNdBa_c(owner) {}
~fLiNdBaAutoUnlink_c() { unlink(); }
};
#endif
+1
View File
@@ -29,6 +29,7 @@ public:
PROC_FLAG_DRAW = GET_PROC_FLAG(DRAW)
};
fManager_c(fBase_c *owner) : connect_node(owner), execute_node(owner), draw_node(owner), search_node(owner) {}
~fManager_c() {}
/* 802e28c0 */ int getSearchTableNum();
/* 802e28d0 */ static fBase_c *searchBaseByID(fBaseID_e id);
/* 802e2920 */ static fBase_c *searchBaseByProfName(ProfileName profID, const fBase_c *parent);
+1 -1
View File
@@ -44,7 +44,7 @@ public:
/* 802f1590 */ static void createCommandHeap(size_t size, EGG::Heap *parentHeap);
/* 802f15c0 */ static void createDylinkHeap(size_t size, EGG::Heap *parentHeap);
/* 802f15f0 */ static EGG::AssertHeap *createAssertHeap(EGG::Heap *parentHeap);
/* 802f1640 */ static EGG::Heap *makeHeapOnCurrentGameHeap(size_t size, const char *name, u32 align, u32 flags);
/* 802f1640 */ static EGG::FrmHeap *makeHeapOnCurrentGameHeap(size_t size, const char *name, u32 align, u32 flags);
static int getDefaultGameHeapId();
+18
View File
@@ -0,0 +1,18 @@
This library was ported from https://github.com/NSMBW-Community/NSMBW-Decomp/tree/master/include/dol/sLib
with differences/modifications outlined below:
## No inline destructors
The NSMBW code uses inlined destructors. In SS, these destructors are all part of the s_StateID.cpp(?) TU,
and pretty much every generic instantiation of the state manager (which for a large part are in RELs)
will call back into those destructors in the main DOL. As a result, the destructors were made not inline
and explicitly instantiated in s_StateID.cpp
## s_StateIDChk.hpp
In order for vtable ordering to match, some classes had to be extracted to a new header.
## sStateMethodIf_c
S_StateMethod_c's destructors calls back into another destructors. sStateMethodIf_c follows the example of
the other abstract interface classes and provides this dtor.
+14
View File
@@ -0,0 +1,14 @@
#ifndef S_DOCGROUP_H
#define S_DOCGROUP_H
// [This header file defines documentation groups for better categorization]
/// @ingroup game
/// @defgroup slib sLib
/// @brief Provides various utilities (including the state system).
/// @defgroup state sState
/// @ingroup slib
/// @brief A state system implementation.
#endif
+48
View File
@@ -0,0 +1,48 @@
#ifndef S_FSTATE_H
#define S_FSTATE_H
#include <s/s_StateInterfaces.hpp>
#include <s/s_FStateID.hpp>
// Note: Ported from https://github.com/NSMBW-Community/NSMBW-Decomp/tree/master/include/dol/sLib
// See include/s/README.txt for changes made
/// @brief A state holder for a given class.
/// @tparam T The class that this state belongs to.
/// @ingroup state
template<class T>
class sFState_c : public sStateIf_c {
public:
sFState_c(T &owner) : mpOwner(owner) { mpID = nullptr; }
enum STATE_ACTION_e {
INITIALIZE,
EXECUTE,
FINALIZE
};
/// @brief Performs a state action.
/// @details [Gets inlined, needed for function order to match].
/// @param action The action to perform.
void performAction(STATE_ACTION_e action) {
if (action == FINALIZE) {
mpID->finalizeState(mpOwner);
} else if (action == EXECUTE) {
mpID->executeState(mpOwner);
} else if (action == INITIALIZE) {
mpID->initializeState(mpOwner);
}
}
virtual void initialize() { performAction(INITIALIZE); }
virtual void execute() { performAction(EXECUTE); }
virtual void finalize() { performAction(FINALIZE); }
void setID(const sFStateID_c<T> *id) { mpID = id; }
private:
T &mpOwner; ///< The owner of this state.
const sFStateID_c<T> *mpID; ///< The state ID that runs the state methods.
};
#endif
+33
View File
@@ -0,0 +1,33 @@
#ifndef S_FSTATEFCT_H
#define S_FSTATEFCT_H
#include <s/s_StateInterfaces.hpp>
#include <s/s_FState.hpp>
#include <s/s_StateID.hpp>
// Note: Ported from https://github.com/NSMBW-Community/NSMBW-Decomp/tree/master/include/dol/sLib
// See include/s/README.txt for changes made
/// @brief A state factory for a given class.
/// @tparam T The class that this state belongs to.
/// @ingroup state
template <class T>
class sFStateFct_c : public sStateFctIf_c {
public:
sFStateFct_c(T &owner) : mState(owner) {}
virtual sStateIf_c* build(const sStateIDIf_c &id) {
if (!id.isNull()) {
mState.setID((const sFStateID_c<T> *) &id);
return &mState;
}
return nullptr;
}
virtual void dispose(sStateIf_c *&id) { id = nullptr; }
private:
sFState_c<T> mState;
};
#endif
+65
View File
@@ -0,0 +1,65 @@
#ifndef S_FSTATEID_H
#define S_FSTATEID_H
#include <s/s_StateID.hpp>
#include <MSL_C/string.h>
// Note: Ported from https://github.com/NSMBW-Community/NSMBW-Decomp/tree/master/include/dol/sLib
// See include/s/README.txt for changes made
/// @brief An implementation of a state ID for a given class.
/// @details It adds the ability to call the three state methods on a state owner class.
/// @tparam T The class that this state belongs to.
/// @ingroup state
template<class T>
class sFStateID_c : public sStateID_c {
public:
typedef void (T::*stateFunc)();
/**
* @brief Constructs a new sFStateID_c instance.
*
* @param name The name of this state ID.
* @param initialize The initialize method for this state ID.
* @param execute The execute method for this state ID.
* @param finalize The finalize method for this state ID.
*/
sFStateID_c(const char *name, stateFunc initialize, stateFunc execute, stateFunc finalize) :
sStateID_c(name),
mpInitialize(initialize),
mpExecute(execute),
mpFinalize(finalize) {}
/// @brief Returns true if the given name matches this state ID's name.
virtual bool isSameName(const char *otherName) const {
char *part = strrchr(otherName, ':');
if (part != nullptr) {
otherName = part + 1;
}
const char *thisName = strrchr(name(), ':') + 1;
if (strcmp(thisName, otherName) == 0) {
return true;
} else {
return false;
}
}
/// @brief Calls the initialize method on the owner.
/// @param owner The owner of this state ID.
virtual void initializeState(T &owner) const { (owner.*mpInitialize)(); }
/// @brief Calls the execute method on the owner.
/// @param owner The owner of this state ID.
virtual void executeState(T &owner) const { (owner.*mpExecute)(); }
/// @brief Calls the finalize method on the owner.
/// @param owner The owner of this state ID.
virtual void finalizeState(T &owner) const { (owner.*mpFinalize)(); }
private:
stateFunc mpInitialize; ///< The initialize method for this state ID.
stateFunc mpExecute; ///< The execute method for this state ID.
stateFunc mpFinalize; ///< The finalize method for this state ID.
};
#endif
+24
View File
@@ -0,0 +1,24 @@
#ifndef S_FSTATEMGR_H
#define S_FSTATEMGR_H
#include <s/s_FStateID.hpp>
#include <s/s_StateMgr.hpp>
#include <s/s_FState.hpp>
#include <s/s_FStateFct.hpp>
#include <s/s_StateIDChk.hpp>
// Note: Ported from https://github.com/NSMBW-Community/NSMBW-Decomp/tree/master/include/dol/sLib
// See include/s/README.txt for changes made
/// @brief A wrapper for sStateMgr_c that uses sFStateFct_c and sStateIDChk_c.
/// @tparam T The class that this state belongs to.
/// @tparam Method The method to use for the state manager.
/// @ingroup state
template <class T, class Method>
class sFStateMgr_c : public sStateMgr_c<T, Method, sFStateFct_c, sStateIDChk_c> {
public:
sFStateMgr_c(T &owner, const sStateIDIf_c &initializeState) :
sStateMgr_c<T, Method, sFStateFct_c, sStateIDChk_c>(owner, initializeState) {}
};
#endif
+40
View File
@@ -0,0 +1,40 @@
#ifndef S_PHASE_H
#define S_PHASE_H
// Note: Ported from https://github.com/NSMBW-Community/NSMBW-Decomp/tree/master/include/dol/sLib
// See include/s/README.txt for changes made
/// @brief A phase is a list of methods to be called in order.
/// @ingroup slib dol
class sPhase_c {
public:
/// @brief Return value of a phase method and ::callMethod.
/// @unofficial
enum METHOD_RESULT_e {
WAIT, ///< Do not proceed to the next method in the phase.
OK, ///< Proceed to the next method in the phase.
DONE ///< The phase is done.
};
typedef METHOD_RESULT_e (phaseMethod)(void *);
/**
* @brief Constructs a new phase with a given method list.
*
* @param methodList The list of methods in the phase.
* @param count The length of the method list.
*/
sPhase_c(phaseMethod **methodList, int count);
/**
* @brief Executes the phase until the end is reached or a method returns METHOD_RESULT_e::WAIT.
*
* @param thisPtr A pointer to the owner.
* @return METHOD_RESULT_e::WAIT if the phase is not done yet, and METHOD_RESULT_e::DONE if the phase is finished.
*/
METHOD_RESULT_e callMethod(void *thisPtr);
phaseMethod **mpMethodList; ///< The method list.
unsigned short mPhaseLength; ///< The length of the method list.
unsigned short mCurrMethod; ///< The index of the method to execute.
};
#endif
+25
View File
@@ -0,0 +1,25 @@
#ifndef S_STATE_H
#define S_STATE_H
#include <s/s_FStateMgr.hpp>
#include <s/s_StateMethodUsr_FI.hpp>
// Note: Ported from https://github.com/NSMBW-Community/NSMBW-Decomp/tree/master/include/dol/sLib
// See include/s/README.txt for changes made
#define STATE_FUNC_DECLARE(class, name) \
void initializeState_##name(); \
void executeState_##name(); \
void finalizeState_##name(); \
static sFStateID_c<class> StateID_##name
#define STATE_DEFINE(class, name) \
sFStateID_c<class> class ::StateID_##name(#class "::StateID_" #name, &class ::initializeState_##name, \
&class ::executeState_##name, &class ::finalizeState_##name)
#define STATE_MGR_DECLARE(class_name) \
sFStateMgr_c<class_name, sStateMethodUsr_FI_c> mStateMgr; \
void dummy_GetStateID() { \
mStateMgr.getStateID(); \
}
#endif
+50
View File
@@ -0,0 +1,50 @@
#ifndef S_STATEID_H
#define S_STATEID_H
#include <s/s_StateInterfaces.hpp>
// Note: Ported from https://github.com/NSMBW-Community/NSMBW-Decomp/tree/master/include/dol/sLib
// See include/s/README.txt for changes made
/// @brief A generic implementation of a state ID.
/// @details It simply contains a name string and a unique number.
/// @ingroup state
class sStateID_c : public sStateIDIf_c {
public:
class NumberMemo_c {
public:
NumberMemo_c() : curr(0) {}
unsigned int get() {
curr++;
return curr;
}
unsigned int curr;
};
sStateID_c(const char *name);
virtual ~sStateID_c();
virtual bool isNull() const;
virtual bool isEqual(const sStateIDIf_c &other) const;
virtual bool operator==(const sStateIDIf_c &other) const;
virtual bool operator!=(const sStateIDIf_c &other) const;
virtual bool isSameName(const char *name) const;
virtual const char *name() const;
virtual unsigned int number() const;
protected:
const char *mpName; ///< The name of this state ID.
unsigned int mNumber; ///< The number of this state ID.
static NumberMemo_c sm_numberMemo; ///< Used to give each state a unique number.
};
namespace sStateID {
/// @ingroup state
extern sStateID_c null; ///< A null state instance.
}
#endif
+17
View File
@@ -0,0 +1,17 @@
#ifndef S_STATEIDCHK_H
#define S_STATEIDCHK_H
#include <s/s_StateInterfaces.hpp>
// Note: Ported from https://github.com/NSMBW-Community/NSMBW-Decomp/tree/master/include/dol/sLib
// See include/s/README.txt for changes made
/// @brief A default implementation of a state ID checker.
/// @details ::isNormalID always returns true.
class sStateIDChk_c : public sStateIDChkIf_c {
public:
virtual ~sStateIDChk_c();
virtual bool isNormalID(const sStateIDIf_c &) const { return true; }
};
#endif
+79
View File
@@ -0,0 +1,79 @@
#ifndef S_STATEINTERFACES_H
#define S_STATEINTERFACES_H
// Note: Ported from https://github.com/NSMBW-Community/NSMBW-Decomp/tree/master/include/dol/sLib
// See include/s/README.txt for changes made
/// @addtogroup state
/// @{
class sStateMethodIf_c {
public:
virtual ~sStateMethodIf_c();
};
/// @brief The interface for state IDs.
/// @details A state ID is made up of a name string and a unique number, where 0 denotes a null state.
/// Null states do not have any corresponding behaviour. They can be used, for example,
/// if a state holder needs to be initialized but the initial state ID is not known yet.
class sStateIDIf_c {
public:
virtual ~sStateIDIf_c();
virtual bool isNull() const = 0; ///< Returns whether this is a null state.
virtual bool isEqual(const sStateIDIf_c &other) const = 0; ///< Returns whether both states have the same number.
virtual bool operator==(const sStateIDIf_c &other) const = 0; ///< Overloaded equality operator, using ::isEqual.
virtual bool operator!=(const sStateIDIf_c &other) const = 0; ///< Overloaded inequality operator, using ::isEqual.
virtual bool isSameName(const char *name) const = 0; ///< Returns whether this state ID is called @p name.
virtual const char *name() const = 0; ///< Returns the name of this state ID.
virtual unsigned int number() const = 0; ///< Returns the number of this state ID.
};
/// @brief The interface for a state holder.
/// @details A state holder is linked to a state ID and can execute its corresponding behaviour.
class sStateIf_c {
public:
virtual ~sStateIf_c();
virtual const void initialize() = 0; ///< Initializes the state.
virtual const void execute() = 0; ///< Executes the state.
virtual const void finalize() = 0; ///< Prepares the state for termination.
};
/// @brief The interface for state factories.
/// @details A state factory produces a state holder from a given state ID.
class sStateFctIf_c {
public:
virtual ~sStateFctIf_c();
virtual sStateIf_c *build(sStateIDIf_c const &id) = 0; ///< Returns a new state with a given state ID.
virtual void dispose(sStateIf_c *&id) = 0; ///< Clears out the pointer to a state.
};
/// @brief The interface for state ID checkers.
/// @details [This class is not really used, but it seems to be intended for testing if a state is "normal", most likely a debug leftover].
class sStateIDChkIf_c {
public:
virtual ~sStateIDChkIf_c();
virtual bool isNormalID(const sStateIDIf_c &id) const = 0; ///< Returns whether a state ID is normal.
};
/// @brief The interface for state managers.
/// @details A state manager handles execution of and transitioning between state IDs.
class sStateMgrIf_c {
public:
virtual ~sStateMgrIf_c();
virtual void initializeState() = 0; ///< Initializes the current state.
virtual void executeState() = 0; ///< Executes the current state.
virtual void finalizeState() = 0; ///< Prepares the current state for termination.
virtual void changeState(const sStateIDIf_c &newStateID) = 0; ///< Transitions to a new state ID.
virtual void refreshState() = 0; ///< Marks the current state to be executed again.
virtual sStateIf_c *getState() const = 0; ///< Gets the state holder.
virtual const sStateIDIf_c *getNewStateID() const = 0; ///< Gets the next state ID.
virtual const sStateIDIf_c *getStateID() const = 0; ///< Gets the current state ID.
virtual const sStateIDIf_c *getOldStateID() const = 0; ///< Gets the previous state ID.
};
/// @}
#endif
+56
View File
@@ -0,0 +1,56 @@
#ifndef S_STATEMETHOD_H
#define S_STATEMETHOD_H
#include <s/s_StateInterfaces.hpp>
// Note: Ported from https://github.com/NSMBW-Community/NSMBW-Decomp/tree/master/include/dol/sLib
// See include/s/README.txt for changes made
/// @brief A class that handles state execution and transition.
/// @details [Presumably, sStateMethod_c actually means "methods for state interaction", or something like that].
/// @ingroup state
class sStateMethod_c : public sStateMethodIf_c {
public:
/**
* @brief Constructs a new sStateMethod_c instance.
*
* @param checker The state checker to use.
* @param factory The state factory to use.
* @param initialState The initial state ID of this instance.
*/
sStateMethod_c(sStateIDChkIf_c &checker, sStateFctIf_c &factory, const sStateIDIf_c &initialState);
virtual ~sStateMethod_c(); ///< Destroys the sStateMethod_c instance.
virtual void initializeStateMethod(); ///< @copydoc sStateMgrIf_c::initializeState
virtual void executeStateMethod(); ///< @copydoc sStateMgrIf_c::executeState
virtual void finalizeStateMethod(); ///< @copydoc sStateMgrIf_c::finalizeState
virtual void changeStateMethod(const sStateIDIf_c &newStateID); ///< @copydoc sStateMgrIf_c::changeState
virtual void refreshStateMethod() { mRefreshStateMethod = true; } ///< @copydoc sStateMgrIf_c::refreshState
virtual sStateIf_c *getState() const { return mpState; } ///< @copydoc sStateMgrIf_c::getState
virtual const sStateIDIf_c *getNewStateID() const { return mpNewStateID; } ///< @copydoc sStateMgrIf_c::getNewStateID
virtual const sStateIDIf_c *getStateID() const { return mpStateID; } ///< @copydoc sStateMgrIf_c::getStateID
virtual const sStateIDIf_c *getOldStateID() const { return mpOldStateID; } ///< @copydoc sStateMgrIf_c::getOldStateID
virtual int initializeStateLocalMethod() = 0; ///< Performs the actual state initialization.
virtual void executeStateLocalMethod() = 0; ///< Performs the actual state execution.
virtual void finalizeStateLocalMethod() = 0; ///< Performs the actual state termination.
virtual void changeStateLocalMethod(const sStateIDIf_c &newStateID) = 0; ///< Performs the actual state transition.
protected:
sStateIDChkIf_c &mpStateChk; ///< @unused The state checker to use.
sStateFctIf_c &mpStateFct; ///< The state factory which produces the state holder.
bool mInitFinalizeLock; ///< A lock to ensure ::initializeStateMethod and ::finalizeStateMethod are not called recursively.
bool mExecutionLock; ///< A lock to ensure ::executeStateMethod is not called recursively.
bool mIsValid; ///< If the state holder contains a valid state ID.
bool mStateChanged; ///< If the current state has changed during execution.
bool mRefreshStateMethod; ///< True, if after a state transition, the state should be executed again.
const sStateIDIf_c *mpNewStateID; ///< The next state ID.
const sStateIDIf_c *mpOldStateID; ///< The previous state ID.
const sStateIDIf_c *mpStateID; ///< The current state ID.
sStateIf_c *mpState; ///< The current state holder.
};
#endif
+23
View File
@@ -0,0 +1,23 @@
#ifndef S_STATEMETHODUSR_FI_H
#define S_STATEMETHODUSR_FI_H
#include <s/s_StateMethod.hpp>
// Note: Ported from https://github.com/NSMBW-Community/NSMBW-Decomp/tree/master/include/dol/sLib
// See include/s/README.txt for changes made
/// @brief An extension to sStateMethod_c that implements the remaining abstract methods.
/// @details [Name might mean "Functionality implementation"].
/// @ingroup state
class sStateMethodUsr_FI_c : public sStateMethod_c {
public:
sStateMethodUsr_FI_c(sStateIDChkIf_c &checker, sStateFctIf_c &factory, const sStateIDIf_c &initialState);
virtual ~sStateMethodUsr_FI_c();
virtual int initializeStateLocalMethod();
virtual void executeStateLocalMethod();
virtual void finalizeStateLocalMethod();
virtual void changeStateLocalMethod(const sStateIDIf_c &newStateID);
};
#endif
+44
View File
@@ -0,0 +1,44 @@
#ifndef S_STATEMGR_H
#define S_STATEMGR_H
#include <s/s_StateInterfaces.hpp>
// Note: Ported from https://github.com/NSMBW-Community/NSMBW-Decomp/tree/master/include/dol/sLib
// See include/s/README.txt for changes made
/**
* @brief An implementation of sStateMgrIf_c.
*
* @tparam T The parent class for this state manager.
* @tparam Method The state method handler to use.
* @tparam Factory The state factory to use.
* @tparam Check The state ID checker to use.
* @ingroup state
*/
template <class T, class Method, template <class> class Factory, class Check>
class sStateMgr_c : sStateMgrIf_c {
public:
sStateMgr_c(T &owner, const sStateIDIf_c &initialState) :
mFactory(owner),
mMethod(mCheck, mFactory, initialState) {}
virtual void initializeState() { mMethod.initializeStateMethod(); }
virtual void executeState() { mMethod.executeStateMethod(); }
virtual void finalizeState() { mMethod.finalizeStateMethod(); }
virtual void changeState(const sStateIDIf_c &newState) { mMethod.changeStateMethod(newState); }
virtual void refreshState() { mMethod.refreshStateMethod(); }
virtual sStateIf_c *getState() const { return mMethod.getState(); }
virtual const sStateIDIf_c *getNewStateID() const { return mMethod.getNewStateID(); }
virtual const sStateIDIf_c *getStateID() const { return mMethod.getStateID(); }
virtual const sStateIDIf_c *getOldStateID() const { return mMethod.getOldStateID(); }
private:
Check mCheck;
Factory<T> mFactory;
Method mMethod;
};
#endif
+73
View File
@@ -0,0 +1,73 @@
#ifndef SIZED_STRING_H
#define SIZED_STRING_H
#include <MSL_C/string.h>
/**
* A statically sized string buffer used for resource
* identification where strings are guaranteed to be short.
*
* Note: We aren't aware of any other projects that use a similar
* class and given that SS has no debugging info anywhere it's hard
* to be certain about anything.
*/
template <size_t Size>
struct SizedString {
SizedString() {
mChars[0] = '\0';
}
SizedString(const char *src) {
operator=(src);
}
char mChars[Size];
char *operator&() {
return mChars;
}
const char *operator&() const {
return mChars;
}
void operator=(const char *src) {
if (src != mChars) {
mChars[0] = '\0';
operator+=(src);
}
}
void operator+=(const char *src) {
if (src != nullptr) {
size_t destLen = strlen(mChars);
size_t copyLen = strlen(src);
// Make sure copy length isnt more than destination length
if (destLen + copyLen + 1 >= Size) {
size_t tmpLen = Size - destLen;
copyLen = tmpLen - 1;
}
strncpy(mChars + destLen, src, copyLen);
// make sure string is null terminated
size_t offset = destLen + copyLen;
mChars[offset] = '\0';
}
}
int sprintf(const char *fmt, ...) {
va_list args;
va_start(args, fmt);
int printed = vsnprintf(this->mChars, Size, fmt, args);
if (printed != strlen(this->mChars)) {
this->mChars[0] = '\0';
}
va_end(list);
return printed;
}
};
#endif
-37
View File
@@ -1,37 +0,0 @@
#ifndef ARC_MANAGER_H
#define ARC_MANAGER_H
#include <common.h>
// Ghidra: ArcManagerEntry
// size: 0x40
struct ArcManagerEntry {
/* 0x00 */ char arc_name[0x20];
/* 0x20 */ u16 ref_count;
/* 0x24 */ int dvd_req_ptr;
/* 0x28 */ int archive_ptr;
/* 0x2C */ int heap_ptr_0;
/* 0x30 */ char field_0x30[0x3C - 0x30];
/* 0x3C */ int heap_ptr_1;
};
// Ghidra: ArcManagerEntryTable
// size: 0xC
class ArcMangerEntryTable {
public:
/* 0x0 */ ArcManagerEntry *entries;
/* 0x4 */ u16 count;
/* 0x8 */ u32 field_0x8;
public:
ArcMangerEntryTable();
};
class OarcManager {
public:
void *getDataFromOarc(char *oarcName, char *fileName);
};
OarcManager g_OarcManager;
#endif;
@@ -0,0 +1,41 @@
#ifndef CURRENT_STAGE_ARC_MANAGER_H
#define CURRENT_STAGE_ARC_MANAGER_H
#include <d/d_rawarchive.h>
#include <egg/core/eggHeap.h>
#include <sized_string.h>
class CurrentStageArcManager {
CurrentStageArcManager();
virtual ~CurrentStageArcManager();
SizedString<32> mStageName;
SizedString<32> mCurrentLoadingStageArcName;
SizedString<32> mStageExtraLayerArcName;
dRawArcTable_c mArcTable;
static CurrentStageArcManager *sInstance;
static bool create(EGG::Heap *heap);
void init(EGG::Heap *heap);
bool setStage(const char *stage);
bool decrement();
void *getData(const char *fileName);
void *getFileFromCurrentLay0Arc(const char *fileName);
bool loadFileFromExtraLayerArc(int layer);
bool unloadExtraLayerArc();
bool loadRoomArc(int room);
bool addEntryFromSuperArc(const char *name, void *data);
bool unloadRoomArc(int room);
bool decrement(const char *path);
void *loadFromRoomArc(int roomId, const char *fileName);
void *getDataFromRoomArc(int roomId, const char *fileName);
const char *getCurrentStageDirectory();
const char *getRoomArcDirectory(int room) const;
static EGG::ExpHeap *getHeap();
};
#endif
@@ -0,0 +1,29 @@
#ifndef LAYOUT_ARC_MANAGER_H
#define LAYOUT_ARC_MANAGER_H
#include <d/d_rawarchive.h>
#include <egg/core/eggHeap.h>
#include <sized_string.h>
class LayoutArcManager {
LayoutArcManager();
virtual ~LayoutArcManager();
dRawArcTable_c mArcTable;
static LayoutArcManager *sInstance;
static bool create(EGG::Heap *heap);
void init(EGG::Heap *heap);
bool loadLayoutArcFromDisk(const char *object, EGG::Heap *heap);
void ensureLoaded1(const char *object);
void ensureLoaded2(const char *object);
bool hasEntry(const char *object);
bool decrement(const char *path);
void *getData(const char *oarcName, const char *fileName);
void *getLoadedData(const char *path);
};
#endif
@@ -0,0 +1,36 @@
#ifndef OARC_MANAGER_H
#define OARC_MANAGER_H
#include <d/d_rawarchive.h>
#include <egg/core/eggHeap.h>
#include <sized_string.h>
class OarcManager {
OarcManager();
virtual ~OarcManager();
dRawArcTable_c mArcTable;
static OarcManager *sInstance;
static bool create(EGG::Heap *heap);
void init(EGG::Heap *heap);
bool checkIfObjectArcExistsOnDisk(const char *object);
bool loadObjectArcFromDisk(const char *object, EGG::Heap *heap);
bool addEntryFromSuperArc(const char *object, void *data, EGG::Heap *heap);
void ensureLoaded1(const char *object);
void ensureLoaded2(const char *object);
bool decrement(const char *path);
void *getData(const char *oarcName, const char *fileName);
void *getMdlFromArc2(const char *oarcName);
void *getMdlFromArc(const char *oarcName);
void *getZevFromArc(const char *oarcName);
void *getDzbFromArc(const char *oarcName, const char *fileName);
void *getPlcFromArc(const char *oarcName, const char *fileName);
void *getSubEntryData(const char *oarcName, const char *fileName);
};
#endif
+63
View File
@@ -0,0 +1,63 @@
#ifndef SCENEFLAG_MANAGER_H
#define SCENEFLAG_MANAGER_H
#include <common.h>
#include <toBeSorted/flag_space.h>
#include <toBeSorted/bitwise_flag_helper.h>
class SceneflagManager {
public:
FlagSpace mSceneflags;
FlagSpace mTempflags;
FlagSpace mZoneflags;
BitwiseFlagHelper mFlagHelper;
u16 mSceneIdx;
u8 mShouldCommit;
static u16 sTempFlags[4];
static u16 sSceneFlags[8];
static u16 sZoneFlags[0xFC];
static SceneflagManager *sInstance;
void doNothing();
void setShouldCommit(u16 flag);
SceneflagManager();
s32 isNotTempOrZoneFlag(u16 flag);
s32 isZoneFlag(u32 flag);
void updateFlagindex(u16 flagindex);
void copyFromSave(u32 flagindex);
void unsetAllTempflags();
void zoneflagsResetAll();
void zoneflagsResetForRoom(u16 roomId);
void unsetZoneAndTempflags();
void unsetAllZoneflags();
void unsetZoneflagsForRoom(u16 roomId);
u16 getZoneflagSlot(u16 roomId, u16 flag);
u16 getSceneflagSlotGlobal(u16 sceneIdx, u16 flag);
u16 getSceneflagSlot(u16 flag);
u16 getTempflagSlot(u16 flag);
bool checkZoneFlag(u16 roomId, u16 flag);
bool checkUncommittedZoneflag(u16 roomId, u16 flag);
u16 checkUncommittedZoneflag2(u16 roomId, u16 flag) {
return checkUncommittedZoneflag(roomId, flag);
}
bool checkUncommittedTempOrSceneflag(u16 flag);
u16 checkUncommittedTempOrSceneflag2(u16 flag) {
return checkUncommittedTempOrSceneflag(flag);
}
u16 checkFlag(u16 roomId, u16 flag);
bool checkSceneflagGlobal(u16 sceneIdx, u16 flag);
bool checkTempOrSceneflag(u16 flag);
bool checkUncommittedFlag(u16 roomId, u16 flag);
void setZoneflag(u16 roomId, u16 flag);
void setFlag(u16 roomId, u16 flag);
void setSceneflagGlobal(u16 sceneIdx, u16 flag);
void setTempOrSceneflag(u16 flag);
void unsetZoneflag(u16 roomId, u16 flag);
void unsetFlag(u16 roomId, u16 flag);
void unsetSceneflagGlobal(u16 sceneIdx, u16 flag);
void unsetTempOrSceneflag(u16 flag);
s32 doCommit();
};
#endif
+37
View File
@@ -0,0 +1,37 @@
#include <d/tg/d_t_rock_boat.h>
#include <d/a/obj/d_a_obj_base.h>
SPECIAL_ACTOR_PROFILE(TAG_ROCK_BOAT, dTgRockBoat_c, fProfile::TAG_ROCK_BOAT, 0x173, 0, 3);
STATE_DEFINE(dTgRockBoat_c, Wait);
int dTgRockBoat_c::create() {
mStateMgr.changeState(StateID_Wait);
cooldown = 1;
return 1;
}
int dTgRockBoat_c::doDelete() {
return 1;
}
int dTgRockBoat_c::actorExecute() {
mStateMgr.executeState();
return 1;
}
int dTgRockBoat_c::draw() {
return 1;
}
void dTgRockBoat_c::initializeState_Wait() {}
void dTgRockBoat_c::executeState_Wait() {
if (cooldown > 0 && --cooldown == 0) {
dAcObjBase_c::create(fProfile::OBJ_ROCK_BOAT, roomid, (boatNum << 0x1c) | 0xff, &position, 0, 0, -1);
cooldown = 0x259;
if (++boatNum == 0xf) {
boatNum = 0;
}
}
}
void dTgRockBoat_c::finalizeState_Wait() {}
+100
View File
@@ -0,0 +1,100 @@
#include <d/tg/d_t_timer.h>
#include <toBeSorted/sceneflag_manager.h>
SPECIAL_ACTOR_PROFILE(TIMER_TAG, dTgTimer_c, fProfile::TAG_TIMER, 0x029F, 0, 0);
// TODO counter abstraction
bool increment(u16 *t) {
if (*t < 0xFFFF) {
(*t)++;
return true;
}
return false;
}
int dTgTimer_c::create() {
switch (getSubtypeFromParams()) {
case 0:
mGetTargetTimeFunc = dTgTimer_c::getConstant0x50_Thunk;
break;
case 1:
mTargetTime = getTimerFromParams() * 0x1e;
mGetTargetTimeFunc = getStoredTargetTime;
break;
default:
mTargetTime = getTimerFromParams();
mGetTargetTimeFunc = getStoredTargetTime;
break;
}
resetTimer();
return 1;
}
int dTgTimer_c::actorExecute() {
bool getFlag = SceneflagManager::sInstance->checkFlag(roomid, getCheckSceneflag());
if (getFlag) {
if (checkShouldTrigger()) {
SceneflagManager::sInstance->setFlag(roomid, getSetSceneflag());
} else {
incrementTimer();
}
} else {
resetTimer();
}
return 1;
}
int dTgTimer_c::getSubtypeFromParams() {
return params & 0xFF;
}
u16 dTgTimer_c::getTimerFromParams() {
return params >> 8 & 0xFF;
}
u16 dTgTimer_c::getCheckSceneflag() {
return params >> 0x10 & 0xFF;
}
u16 dTgTimer_c::getSetSceneflag() {
return params >> 0x18 & 0xFF;
}
u16 dTgTimer_c::getTimer() {
return mTimer;
}
u16 dTgTimer_c::getConstant0x50() {
return 0x50;
}
u16 dTgTimer_c::setTimer(u16 val) {
mTimer = val;
}
u16 dTgTimer_c::getTargetTime() {
return (this->*mGetTargetTimeFunc)();
}
void dTgTimer_c::resetTimer() {
setTimer(0);
}
void dTgTimer_c::incrementTimer() {
u16 t = getTimer();
increment(&t);
setTimer(t);
}
bool dTgTimer_c::checkShouldTrigger() {
return getTargetTime() <= getTimer();
}
u16 dTgTimer_c::getStoredTargetTime() {
return mTargetTime;
}
// TODO what causes this (likely weak) thunk?
u16 dTgTimer_c::getConstant0x50_Thunk() {
return getConstant0x50();
}
+114
View File
@@ -0,0 +1,114 @@
#include <c/c_math.h>
#include <d/tg/d_t_tumble_weed.h>
#include <m/m_vec.h>
SPECIAL_ACTOR_PROFILE(TAG_TUMBLE_WEED, dTgTumbleWeed_c, fProfile::TUMBLE_WEED_TAG, 0x0244, 0, 0);
STATE_DEFINE(dTgTumbleWeed_c, AreaOut);
STATE_DEFINE(dTgTumbleWeed_c, AreaIn);
STATE_DEFINE(dTgTumbleWeed_c, Wind);
int dTgTumbleWeed_c::create() {
tumbleweedTimer = 0;
windTimer = 0x96;
mStateMgr.changeState(StateID_AreaOut);
return 1;
}
u16 decr(u16 *num);
int dTgTumbleWeed_c::doDelete() {
return 1;
}
int dTgTumbleWeed_c::actorExecute() {
mStateMgr.executeState();
decr(&tumbleweedTimer);
return 1;
}
u16 decr(u16 *num) {
if (*num != 0) {
(*num)--;
}
return *num;
}
int dTgTumbleWeed_c::draw() {
return 1;
}
void dTgTumbleWeed_c::initializeState_AreaOut() {}
void dTgTumbleWeed_c::executeState_AreaOut() {
if (decr(&windTimer) == 0) {
windTimer = 0x96;
if (shouldDoWind()) {
mStateMgr.changeState(StateID_Wind);
return;
}
}
if (isWithinPlayerRadius(scale.x)) {
mStateMgr.changeState(StateID_AreaIn);
}
}
void dTgTumbleWeed_c::finalizeState_AreaOut() {}
void dTgTumbleWeed_c::initializeState_AreaIn() {}
void dTgTumbleWeed_c::executeState_AreaIn() {
if (tumbleweedTimer == 0) {
if (shouldSpawnTumbleweed()) {
doSpawnTumbleweed();
}
tumbleweedTimer = 600;
}
if (decr(&windTimer) == 0) {
windTimer = 0x96;
if (shouldDoWind()) {
mStateMgr.changeState(StateID_Wind);
return;
}
}
if (!isWithinPlayerRadius(scale.x)) {
mStateMgr.changeState(StateID_AreaOut);
}
}
void dTgTumbleWeed_c::finalizeState_AreaIn() {}
extern "C" void fn_475_1B00(fBase_c *, mVec3_c&);
void dTgTumbleWeed_c::initializeState_Wind() {
mVec3_c vec;
getWind(&vec);
if (childTumbleweed.p_owner != nullptr) {
fn_475_1B00(childTumbleweed.p_owner, vec);
}
}
void dTgTumbleWeed_c::executeState_Wind() {
if (isWithinPlayerRadius(scale.x)) {
mStateMgr.changeState(StateID_AreaIn);
} else {
mStateMgr.changeState(StateID_AreaOut);
}
}
void dTgTumbleWeed_c::finalizeState_Wind() {}
bool dTgTumbleWeed_c::shouldSpawnTumbleweed() {
bool spawnAllowed = false;
if (childTumbleweed.p_owner == nullptr && cM::rnd() <= 0.8f) {
spawnAllowed = true;
}
if (spawnAllowed) {
return true;
}
return false;
}
bool dTgTumbleWeed_c::shouldDoWind() {
return childTumbleweed.p_owner != nullptr && cM::rnd() <= 0.5f;
}
void dTgTumbleWeed_c::doSpawnTumbleweed() {
}
void dTgTumbleWeed_c::getWind(mVec3_c*) {}
+8 -11
View File
@@ -1,6 +1,8 @@
#include <d/d_dvd.h>
#include <m/m_dvd.h>
// clang-format off
#include <sized_string.h>
// clang-format on
namespace dDvd {
/** 800520f0 */
@@ -19,25 +21,20 @@ loader_c::loader_c() {
/** 80052130 */
loader_c::~loader_c() {}
// sprintf2
extern "C" void fn_8003D650(char *out, const char *fmt, ...);
/** 80052170 */
void *loader_c::request(const char *path, u8 mountDirection, EGG::Heap *heap) {
char buf[128];
if (mpBuffer != nullptr) {
return mpBuffer;
}
if (mpCommand == 0) {
mSize = -1;
mpHeap = heap != nullptr ? heap : mDvd::getArchiveHeap();
buf[0] = '\0';
fn_8003D650(buf, "US%s", path);
if (!mDvd::IsExistPath(buf)) {
fn_8003D650(buf, "%s", path);
SizedString<128> buf;
buf.sprintf("US%s", path);
if (!mDvd::IsExistPath(&buf)) {
buf.sprintf("%s", path);
}
mpCommand = mDvd_toMainRam_normal_c::create(buf, mountDirection, heap);
mpCommand = mDvd_toMainRam_normal_c::create(&buf, mountDirection, heap);
}
if (mpCommand != nullptr && mpCommand->mStatus != 0) {
mpBuffer = mpCommand->mDataPtr;
+398
View File
@@ -0,0 +1,398 @@
#include <d/d_rawarchive.h>
#include <rvl/VI.h>
class UnkManager {
public:
/* vtable at 8050df50 */
/** 800651c0 */
virtual void CreateArc(void *data, const char *path);
/** 800653d0 */
virtual void DestroyArc(const char *path);
u32 stage;
};
extern "C" int fn_80061B10(void *d, u32 len) {
u32 *data = (u32 *)d;
u32 result = 0;
// Compiler will unroll this loop
for (u32 len_words = len / 4; len_words != 0; len_words--) {
result += *data++;
}
return result;
}
extern "C" int fn_80061BA0(void *data, u32 len) {
int result = fn_80061B10(data, len);
return result != 0 ? result : -1;
}
extern "C" void fn_80061BE0(UnkManager *mgr, const char *name, size_t len) {
// Sets stage to all spaces
mgr->stage = 0x20202020;
// copies the stage name?
memcpy((char *)&mgr->stage, name, len);
}
dRawArcEntry_c::dRawArcEntry_c() {
mRefCount = 0;
mpDvdReq = nullptr;
mpArc = nullptr;
mpCommandHeap = nullptr;
mpData = nullptr;
mChecksum = 0;
mpFrmHeap = 0;
}
dRawArcEntry_c::~dRawArcEntry_c() {
// Wait for request to complete before destroying
if (mpDvdReq->mStatus == 0) {
do {
VIWaitForRetrace();
} while (mpDvdReq->mStatus == 0);
}
destroy(nullptr);
}
void dRawArcEntry_c::searchCallback(void *arg, void *data, const ARCDirEntry *entry, const char *path, bool ctrl) {
UnkManager *mgr = (UnkManager *)arg;
if (entry->isDir) {
int len = strlen(entry->name);
fn_80061BE0(mgr, entry->name, len <= 4 ? len : 4);
} else {
// dolphin: arg vtable at 8050df50
// any others?
if (ctrl) {
mgr->CreateArc(data, path);
// branch to 800651c0, sets up room
} else {
mgr->DestroyArc(path);
// branch to 800653d0, destroys room
}
}
}
void dRawArcEntry_c::searchCallback1(void *a, void *b, const ARCDirEntry *c, const char *d) {
searchCallback(a, b, c, d, true);
}
void dRawArcEntry_c::searchCallback2(void *a, void *b, const ARCDirEntry *c, const char *d) {
searchCallback(a, b, c, d, false);
}
bool dRawArcEntry_c::destroy(void *arg) {
if (mpDvdReq != nullptr) {
if (mpDvdReq->mStatus == 0) {
// Can't destroy if the request is still ongoing
return false;
}
mpArc = mpDvdReq->mDataPtr;
mpData = mpDvdReq->getArcBinary();
mAmountRead = mpDvdReq->mAmountRead;
mpCommandHeap = mpDvdReq->mHeap;
mpDvdReq->do_delete();
mpDvdReq = nullptr;
}
if (mpArc != nullptr) {
if (arg != nullptr) {
mpArc->searchInside(searchCallback2, arg);
}
if (mpFrmHeap != nullptr) {
mHeap::destroyFrmHeap(mpFrmHeap);
mpFrmHeap = nullptr;
}
mpArc->unmount();
mpArc = nullptr;
}
if (mpData != nullptr) {
EGG::Heap::free(mpData, nullptr);
mpData = nullptr;
}
mAmountRead = 0;
mChecksum = 0;
mpCommandHeap = 0;
return true;
}
bool dRawArcEntry_c::loadArcFromDiskChecked(const char *fileName, const char *dirName, u8 mountDirection,
EGG::Heap *heap) {
SizedString<128> path;
if (checkArcExistsOnDiskInner(path, fileName, dirName)) {
return loadArcFromDisk(fileName, &path, mountDirection, heap);
}
return false;
}
bool dRawArcEntry_c::loadArcFromDisk(const char *arcName, const char *arcPath, u8 mountDirection, EGG::Heap *heap) {
mpDvdReq = mDvd_mountMemArchive_c::create(arcPath, mountDirection, heap);
if (mpDvdReq == nullptr) {
return false;
}
mArcName = arcName;
return true;
}
BOOL dRawArcEntry_c::checkArcExistsOnDisk(const char *fileName, const char *dirName) {
SizedString<128> path;
return checkArcExistsOnDiskInner(path, fileName, dirName);
}
// sprintf2
extern "C" void fn_8003D650(char *out, const char *fmt, ...);
BOOL dRawArcEntry_c::checkArcExistsOnDiskInner(SizedString<128> &path, const char *fileName, const char *dirName) {
path.sprintf("/US/%s/%s.arc", dirName, fileName);
if (!mDvd::IsExistPath(&path)) {
path.sprintf("/%s/%s.arc", dirName, fileName);
if (!mDvd::IsExistPath(&path)) {
return false;
}
}
return true;
}
int dRawArcEntry_c::mount(const char *name, void *data, void *callbackArg, u8 mountDirection, EGG::Heap *heap) {
mArcName = name;
mpArc = EGG::Archive::mount(data, heap, (mountDirection == 0 || mountDirection == 1) ? 4 : -4);
if (mpArc == nullptr) {
return -1;
} else {
int result = onMount(callbackArg);
int ret = 0;
if (result == -1) {
ret = result;
}
return ret;
}
}
int dRawArcEntry_c::ensureLoadedMaybe(void *callbackArg) {
if (mpArc == nullptr) {
if (mpDvdReq == nullptr) {
return -1;
}
if (mpDvdReq->mStatus == 0) {
return 1;
}
mpArc = mpDvdReq->mDataPtr;
mpData = mpDvdReq->getArcBinary();
mAmountRead = mpDvdReq->mAmountRead;
if (mpData != nullptr) {
u32 blockSize = EGG::ExpHeap::getSizeForMBlock(mpData);
if (mAmountRead != blockSize) {
mAmountRead = blockSize;
}
}
mpCommandHeap = mpDvdReq->mHeap;
mpDvdReq->do_delete();
mpDvdReq = nullptr;
if (mpArc == nullptr) {
return -1;
}
mpFrmHeap = mHeap::makeHeapOnCurrentGameHeap(-1, name(), 0x20, 0);
if (mpFrmHeap == nullptr) {
return -1;
}
int result = onMount(callbackArg);
mHeap::restoreCurrentHeap();
mHeap::adjustFrmHeap(mpFrmHeap);
mChecksum = fn_80061BA0(mpData, mAmountRead);
if (result == -1) {
return result;
}
DCStoreRange(mpFrmHeap, mpFrmHeap->mHeapHandle->end - (u8 *)mpFrmHeap);
}
return 0;
}
int dRawArcEntry_c::onMount(void *callbackArg) {
mpArc->countFile();
if (callbackArg != nullptr) {
mpArc->searchInside(searchCallback1, callbackArg);
}
return 0;
}
dRawArcTable_c::dRawArcTable_c() {
mpEntries = nullptr;
mCount = 0;
mCallbackArg = nullptr;
}
dRawArcTable_c::~dRawArcTable_c() {
if (mpEntries) {
delete[] mpEntries;
mpEntries = nullptr;
mCount = 0;
}
}
bool dRawArcTable_c::init(u16 count, void *callbackArg, EGG::Heap *heap) {
mpEntries = new (heap, 0x04) dRawArcEntry_c[count]();
if (mpEntries == nullptr) {
return false;
}
mCount = count;
mCallbackArg = callbackArg;
return true;
}
BOOL dRawArcTable_c::getArcOrLoadFromDisk(const char *name, const char *dirName, u8 mountDirection, EGG::Heap *heap) {
dRawArcEntry_c *entry = findEntry(name);
if (entry == nullptr) {
entry = findEmptySlot();
if (entry == nullptr) {
return false;
}
bool result = entry->loadArcFromDiskChecked(name, dirName, mountDirection, heap);
if (!result) {
entry->destroy(mCallbackArg);
return false;
}
}
entry->increaseRefCount();
return true;
}
BOOL dRawArcTable_c::addEntryFromSuperArc(const char *name, void *data, u8 mountDirection, EGG::Heap *heap) {
dRawArcEntry_c *entry = findEntry(name);
if (entry == nullptr) {
entry = findEmptySlot();
if (entry == nullptr) {
return false;
}
int result = entry->mount(name, data, mCallbackArg, mountDirection, heap);
if (result != 0) {
entry->destroy(mCallbackArg);
return false;
}
}
entry->increaseRefCount();
return true;
}
int dRawArcTable_c::ensureLoadedMaybe2(const char *name) {
dRawArcEntry_c *entry = findEntry(name);
if (entry == nullptr) {
return -2;
}
return entry->ensureLoadedMaybe(mCallbackArg);
}
int dRawArcTable_c::ensureLoadedMaybe(const char *name) {
dRawArcEntry_c *entry = findEntry(name);
if (entry == nullptr) {
return -2;
}
return entry->ensureLoadedMaybe(mCallbackArg);
}
bool dRawArcTable_c::hasEntry(const char *name) {
return findEntry(name) != nullptr;
}
BOOL dRawArcTable_c::decreaseRefCount(const char *name) {
dRawArcEntry_c *entry = findEntry(name);
if (entry == nullptr) {
return false;
}
entry->decreaseRefCount();
if (!entry->isReferenced()) {
entry->destroy(mCallbackArg);
}
return true;
}
void *dRawArcTable_c::getDataFromOarc(const char *name, const char *path) {
void *data = nullptr;
dRawArcEntry_c *entry = findLoadedEntry(name);
if (entry != nullptr) {
EGG::Archive *arc = entry->getArc();
if (arc != nullptr) {
data = arc->getFile(path, nullptr);
}
}
return data;
}
void *dRawArcTable_c::getSubEntryData(const char *name, const char *path) {
void *data = nullptr;
dRawArcEntry_c *entry = findLoadedEntry(name);
if (entry != nullptr) {
EGG::Archive *arc = entry->getArc();
if (arc != nullptr) {
int num = arc->convertPathToEntryID(path);
if (num >= 0) {
data = arc->getFileFast(num, nullptr);
}
}
}
return data;
}
void *dRawArcTable_c::getLoadedArcData(const char *name) {
dRawArcEntry_c *entry = findLoadedEntry(name);
return entry == nullptr ? nullptr : entry->getData();
}
int dRawArcTable_c::ensureAllEntriesLoaded() {
dRawArcEntry_c *entry = mpEntries;
int result = 0;
for (int i = 0; i < mCount; i++) {
if (entry->isLoading()) {
result = entry->ensureLoadedMaybe(mCallbackArg);
if (result != 0) {
return result;
}
}
entry++;
}
return 0;
}
extern "C" bool strequals(const char *, const char *);
dRawArcEntry_c *dRawArcTable_c::findEntry(const char *name) const {
dRawArcEntry_c *entry = mpEntries;
for (int i = 0; i < mCount; i++) {
if (entry->isReferenced() && strequals(entry->name(), name)) {
return entry;
}
entry++;
}
return nullptr;
}
dRawArcEntry_c *dRawArcTable_c::findEmptySlot() {
dRawArcEntry_c *entry = mpEntries;
for (int i = 0; i < mCount; i++) {
if (!entry->isReferenced()) {
return entry;
}
entry++;
}
return nullptr;
}
dRawArcEntry_c *dRawArcTable_c::findLoadedEntry(const char *name) {
dRawArcEntry_c *entry = findEntry(name);
if (entry == nullptr) {
return nullptr;
} else if (entry->isNotLoaded()) {
return nullptr;
}
return entry;
}
+2 -3
View File
@@ -24,7 +24,6 @@ void (*fBase_c::sUnloadCallback)();
fBase_c::fBase_c()
: unique_ID(m_rootUniqueID), params(m_tmpCtData.params), profile_name(m_tmpCtData.prof_name),
group_type(m_tmpCtData.group_type), manager(this) {
fManager_c *mgr = &manager;
m_rootUniqueID = (fBaseID_e)(m_rootUniqueID + 1);
if (m_rootUniqueID == INVALID) {
@@ -33,8 +32,8 @@ fBase_c::fBase_c()
}
}
fManager_c::m_connectManage.addTreeNode(&mgr->connect_node, m_tmpCtData.connect_parent);
int searchTableIdx = mgr->getSearchTableNum();
fManager_c::m_connectManage.addTreeNode(&manager.connect_node, m_tmpCtData.connect_parent);
int searchTableIdx = manager.getSearchTableNum();
fManager_c::m_searchManage[searchTableIdx].prepend(&manager.search_node);
const fProfile::fBaseProfile_c *profile = (*fProfile::sProfileList)[profile_name];
+1 -1
View File
@@ -207,6 +207,6 @@ EGG::AssertHeap *mHeap::createAssertHeap(EGG::Heap *parent) {
return g_assertHeap;
}
EGG::Heap *mHeap::makeHeapOnCurrentGameHeap(size_t size, const char *name, u32 align, u32 flags) {
EGG::FrmHeap *mHeap::makeHeapOnCurrentGameHeap(size_t size, const char *name, u32 align, u32 flags) {
return makeFrmHeapAndUpdate(size, g_gameHeaps[0], name, align, flags);
}
+31
View File
@@ -0,0 +1,31 @@
#include <s/s_Phase.hpp>
// Note: Ported from https://github.com/NSMBW-Community/NSMBW-Decomp/tree/master/include/dol/sLib
// See include/s/README.txt for changes made
sPhase_c::sPhase_c(phaseMethod **methodList, int count) {
mpMethodList = methodList;
mPhaseLength = count;
mCurrMethod = 0;
}
sPhase_c::METHOD_RESULT_e sPhase_c::callMethod(void *thisPtr) {
if (mCurrMethod >= mPhaseLength) {
return DONE;
}
METHOD_RESULT_e result = OK;
while (result == OK) {
result = (mpMethodList[mCurrMethod])(thisPtr);
if (result == OK) {
// Go to the next method
mCurrMethod++;
if (mCurrMethod >= mPhaseLength) {
return DONE;
}
}
}
return result;
}
+56
View File
@@ -0,0 +1,56 @@
#include <common.h>
#include <s/s_StateInterfaces.hpp>
#include <s/s_StateID.hpp>
#include <s/s_StateMethodUsr_FI.hpp>
#include <s/s_StateIDChk.hpp>
// Note: Ported from https://github.com/NSMBW-Community/NSMBW-Decomp/tree/master/include/dol/sLib
// See include/s/README.txt for changes made
sStateID_c::NumberMemo_c sStateID_c::sm_numberMemo;
sStateID_c sStateID::null(nullptr);
sStateID_c::sStateID_c(const char *name) {
mpName = name;
mNumber = (name != nullptr) ? sm_numberMemo.get() : 0;
}
sStateID_c::~sStateID_c() {}
bool sStateID_c::isNull() const {
return mNumber == 0;
}
bool sStateID_c::isEqual(const sStateIDIf_c &other) const {
return number() == other.number();
}
bool sStateID_c::operator==(const sStateIDIf_c &other) const {
return isEqual(other);
}
bool sStateID_c::operator!=(const sStateIDIf_c &other) const {
return !isEqual(other);
}
bool sStateID_c::isSameName(const char *name) const {
// Just return false, the full implementation is in sFStateID_c
return false;
}
const char *sStateID_c::name() const {
return mpName;
}
unsigned int sStateID_c::number() const {
return mNumber;
}
sStateFctIf_c::~sStateFctIf_c() {}
sStateIDChkIf_c::~sStateIDChkIf_c() {}
sStateIDChk_c::~sStateIDChk_c() {}
sStateIDIf_c::~sStateIDIf_c() {}
sStateIf_c::~sStateIf_c() {}
sStateMethodIf_c::~sStateMethodIf_c() {}
sStateMethodUsr_FI_c::~sStateMethodUsr_FI_c() {}
sStateMgrIf_c::~sStateMgrIf_c() {}
+78
View File
@@ -0,0 +1,78 @@
#include <common.h>
#include <s/s_StateInterfaces.hpp>
#include <s/s_StateMethod.hpp>
#include <s/s_StateID.hpp>
// Note: Ported from https://github.com/NSMBW-Community/NSMBW-Decomp/tree/master/include/dol/sLib
// See include/s/README.txt for changes made
sStateMethod_c::sStateMethod_c(sStateIDChkIf_c &checker, sStateFctIf_c &factory, const sStateIDIf_c &initialState) :
mpStateChk(checker),
mpStateFct(factory),
mInitFinalizeLock(false),
mExecutionLock(false),
mIsValid(false),
mStateChanged(false),
mRefreshStateMethod(false),
mpNewStateID(&initialState),
mpOldStateID(&sStateID::null),
mpStateID(&initialState),
mpState(nullptr) {
}
sStateMethod_c::~sStateMethod_c() {}
void sStateMethod_c::initializeStateMethod() {
if (!mpNewStateID->isNull() && !mInitFinalizeLock && !mIsValid) {
mInitFinalizeLock = true;
mpStateID = mpNewStateID;
int ret = initializeStateLocalMethod();
if (ret != 0) {
mIsValid = true;
} else {
mIsValid = false;
}
mInitFinalizeLock = false;
}
}
void sStateMethod_c::executeStateMethod() {
if (!mExecutionLock) {
// Skyward Sword change: Prevent runaway state changes?
int i = 2;
do {
if (mRefreshStateMethod) {
i--;
}
mRefreshStateMethod = false;
// We only want to execute if we have a valid next state
if (!mpNewStateID->isNull()) {
mExecutionLock = true;
executeStateLocalMethod();
mExecutionLock = false;
}
} while (mRefreshStateMethod && mStateChanged && i);
}
}
void sStateMethod_c::finalizeStateMethod() {
if (!mpNewStateID->isNull() && mIsValid && !mInitFinalizeLock) {
mInitFinalizeLock = true;
mpOldStateID = mpStateID;
finalizeStateLocalMethod();
mIsValid = false;
mInitFinalizeLock = false;
}
}
void sStateMethod_c::changeStateMethod(const sStateIDIf_c &newID) {
if (!newID.isNull()) {
mpNewStateID = &newID;
changeStateLocalMethod(newID);
mStateChanged = true;
}
}
+30
View File
@@ -0,0 +1,30 @@
#include <common.h>
#include <s/s_StateMethodUsr_FI.hpp>
// Note: Ported from https://github.com/NSMBW-Community/NSMBW-Decomp/tree/master/include/dol/sLib
// See include/s/README.txt for changes made
sStateMethodUsr_FI_c::sStateMethodUsr_FI_c(sStateIDChkIf_c &check, sStateFctIf_c &factory, const sStateIDIf_c &state) :
sStateMethod_c(check, factory, state) {
}
int sStateMethodUsr_FI_c::initializeStateLocalMethod() {
mpState = mpStateFct.build(*getNewStateID()); // Create new state holder with the next state ID
mpState->initialize();
return 1;
}
void sStateMethodUsr_FI_c::executeStateLocalMethod() {
initializeStateMethod(); // Ensure we are in a valid state (this only actually initializes the state if !mIsValid)
mpState->execute();
}
void sStateMethodUsr_FI_c::finalizeStateLocalMethod() {
mpState->finalize();
mpStateFct.dispose(mpState);
}
void sStateMethodUsr_FI_c::changeStateLocalMethod(const sStateIDIf_c &newID) {
finalizeStateMethod(); // Terminate the current state
initializeStateMethod(); // Initialize the new state
}
@@ -0,0 +1,121 @@
#include <d/d_heap.h>
#include <toBeSorted/arc_managers/current_stage_arc_manager.h>
CurrentStageArcManager *CurrentStageArcManager::sInstance;
CurrentStageArcManager::CurrentStageArcManager() {
sInstance = this;
}
CurrentStageArcManager::~CurrentStageArcManager() {
sInstance = nullptr;
}
extern char lbl_80575250;
void CurrentStageArcManager::init(EGG::Heap *heap) {
mArcTable.init(18, &lbl_80575250, heap);
}
bool CurrentStageArcManager::setStage(const char *newStage) {
mStageName = newStage;
mCurrentLoadingStageArcName.sprintf("%s_stg_l0", mStageName);
if (dRawArcEntry_c::checkArcExistsOnDisk(&mCurrentLoadingStageArcName, getCurrentStageDirectory())) {
return (bool)mArcTable.getArcOrLoadFromDisk(&mCurrentLoadingStageArcName, getCurrentStageDirectory(), 0,
dHeap::work2Heap.heap);
} else {
mCurrentLoadingStageArcName.sprintf("%s_stg", mStageName);
return (bool)mArcTable.getArcOrLoadFromDisk(&mCurrentLoadingStageArcName, getCurrentStageDirectory(), 0,
dHeap::work2Heap.heap);
}
}
bool CurrentStageArcManager::decrement() {
return mArcTable.decreaseRefCount(&mCurrentLoadingStageArcName);
}
void *CurrentStageArcManager::getData(const char *fileName) {
return mArcTable.getDataFromOarc(&mCurrentLoadingStageArcName, fileName);
}
void *CurrentStageArcManager::getFileFromCurrentLay0Arc(const char *fileName) {
return mArcTable.getSubEntryData(&mCurrentLoadingStageArcName, fileName);
}
bool CurrentStageArcManager::loadFileFromExtraLayerArc(int layer) {
if (layer == 0) {
return true;
}
mStageExtraLayerArcName.sprintf("%s_stg_l%d", mStageName, layer);
if (dRawArcEntry_c::checkArcExistsOnDisk(&mStageExtraLayerArcName, getCurrentStageDirectory())) {
return (bool)mArcTable.getArcOrLoadFromDisk(&mStageExtraLayerArcName, getCurrentStageDirectory(), 0,
dHeap::work2Heap.heap);
} else {
return true;
}
}
bool CurrentStageArcManager::unloadExtraLayerArc() {
if (mArcTable.hasEntry(&mStageExtraLayerArcName)) {
return mArcTable.decreaseRefCount(&mStageExtraLayerArcName);
}
return true;
}
bool CurrentStageArcManager::loadRoomArc(int room) {
return (bool)mArcTable.getArcOrLoadFromDisk(getRoomArcDirectory(room), getCurrentStageDirectory(), 0,
dHeap::work2Heap.heap);
}
bool CurrentStageArcManager::addEntryFromSuperArc(const char *path, void *data) {
return (bool)mArcTable.addEntryFromSuperArc(path, data, 0, EGG::Heap::sCurrentHeap);
}
bool CurrentStageArcManager::unloadRoomArc(int room) {
mArcTable.decreaseRefCount(getRoomArcDirectory(room));
return true;
}
bool CurrentStageArcManager::decrement(const char *path) {
mArcTable.decreaseRefCount(path);
return true;
}
void *CurrentStageArcManager::loadFromRoomArc(int roomId, const char *fileName) {
return mArcTable.getDataFromOarc(getRoomArcDirectory(roomId), fileName);
}
void *CurrentStageArcManager::getDataFromRoomArc(int roomId, const char *fileName) {
return mArcTable.getSubEntryData(getRoomArcDirectory(roomId), fileName);
}
EGG::ExpHeap *getHeap() {
return dHeap::workExHeap.heap;
}
const char *CurrentStageArcManager::getCurrentStageDirectory() {
static SizedString<64> sStageDirTmp;
sStageDirTmp = "Stage/";
sStageDirTmp += &mStageName;
return &sStageDirTmp;
}
static SizedString<32> s_roomArcTmp;
const char *CurrentStageArcManager::getRoomArcDirectory(int room) const {
s_roomArcTmp.sprintf("%s_r%02d", mStageName, room);
return &s_roomArcTmp;
}
bool CurrentStageArcManager::create(EGG::Heap *heap) {
new (heap, 0x04) CurrentStageArcManager();
if (CurrentStageArcManager::sInstance == nullptr) {
return false;
}
CurrentStageArcManager::sInstance->init(heap);
return true;
}
@@ -0,0 +1,59 @@
#include <d/d_heap.h>
#include <toBeSorted/arc_managers/layout_arc_manager.h>
LayoutArcManager *LayoutArcManager::sInstance;
LayoutArcManager::LayoutArcManager() {
sInstance = this;
}
LayoutArcManager::~LayoutArcManager() {
sInstance = nullptr;
}
extern char lbl_80575250;
void LayoutArcManager::init(EGG::Heap *heap) {
mArcTable.init(16, &lbl_80575250, heap);
}
bool LayoutArcManager::loadLayoutArcFromDisk(const char *object, EGG::Heap *heap) {
if (heap == nullptr) {
heap = dHeap::layoutResHeap.heap;
}
return mArcTable.getArcOrLoadFromDisk(object, "Layout", 0, heap);
}
void LayoutArcManager::ensureLoaded1(const char *object) {
mArcTable.ensureLoadedMaybe2(object);
}
void LayoutArcManager::ensureLoaded2(const char *object) {
mArcTable.ensureLoadedMaybe(object);
}
bool LayoutArcManager::hasEntry(const char *object) {
return mArcTable.hasEntry(object);
}
bool LayoutArcManager::decrement(const char *path) {
return mArcTable.decreaseRefCount(path);
}
void *LayoutArcManager::getData(const char *oarcName, const char *fileName) {
return mArcTable.getDataFromOarc(oarcName, fileName);
}
void *LayoutArcManager::getLoadedData(const char *path) {
return mArcTable.getLoadedArcData(path);
}
bool LayoutArcManager::create(EGG::Heap *heap) {
new (heap, 0x04) LayoutArcManager();
if (LayoutArcManager::sInstance == nullptr) {
return false;
}
LayoutArcManager::sInstance->init(heap);
return true;
}
@@ -0,0 +1,92 @@
#include <d/d_heap.h>
#include <toBeSorted/arc_managers/oarc_manager.h>
OarcManager *OarcManager::sInstance;
OarcManager::OarcManager() {
sInstance = this;
}
OarcManager::~OarcManager() {
sInstance = nullptr;
}
extern char lbl_80575250;
void OarcManager::init(EGG::Heap *heap) {
mArcTable.init(200, &lbl_80575250, heap);
}
bool OarcManager::checkIfObjectArcExistsOnDisk(const char *object) {
return dRawArcEntry_c::checkArcExistsOnDisk(object, "Object");
}
bool OarcManager::loadObjectArcFromDisk(const char *object, EGG::Heap *heap) {
if (heap == nullptr) {
heap = dHeap::work2Heap.heap;
}
return mArcTable.getArcOrLoadFromDisk(object, "Object", 0, heap);
}
bool OarcManager::addEntryFromSuperArc(const char *object, void *data, EGG::Heap *heap) {
if (heap == nullptr) {
heap = EGG::Heap::sCurrentHeap;
}
return mArcTable.addEntryFromSuperArc(object, data, 0, heap);
}
void OarcManager::ensureLoaded1(const char *object) {
mArcTable.ensureLoadedMaybe2(object);
}
void OarcManager::ensureLoaded2(const char *object) {
mArcTable.ensureLoadedMaybe(object);
}
bool OarcManager::decrement(const char *path) {
return mArcTable.decreaseRefCount(path);
}
void *OarcManager::getData(const char *oarcName, const char *fileName) {
return mArcTable.getDataFromOarc(oarcName, fileName);
}
void *OarcManager::getMdlFromArc2(const char *oarcName) {
return mArcTable.getDataFromOarc(oarcName, "g3d/model.brres");
}
void *OarcManager::getMdlFromArc(const char *oarcName) {
return mArcTable.getSubEntryData(oarcName, "g3d/model.brres");
}
void *OarcManager::getZevFromArc(const char *oarcName) {
return mArcTable.getDataFromOarc(oarcName, "dat/zev.dat");
}
void *OarcManager::getDzbFromArc(const char *oarcName, const char *fileName) {
SizedString<32> str = "dzb/";
str += fileName;
str += ".dzb";
return mArcTable.getDataFromOarc(oarcName, &str);
}
void *OarcManager::getPlcFromArc(const char *oarcName, const char *fileName) {
SizedString<32> str = "dat/";
str += fileName;
str += ".plc";
return mArcTable.getDataFromOarc(oarcName, &str);
}
void *OarcManager::getSubEntryData(const char *oarcName, const char *fileName) {
return mArcTable.getSubEntryData(oarcName, fileName);
}
bool OarcManager::create(EGG::Heap *heap) {
new (heap, 0x04) OarcManager();
if (OarcManager::sInstance == nullptr) {
return false;
}
OarcManager::sInstance->init(heap);
return true;
}
+6 -29
View File
@@ -1,8 +1,9 @@
#include "toBeSorted/file_manager.h"
#include "f/f_base.h"
#include <m/m_heap.h>
// #include "libc.h"
#include <MSL_C/string.h>
// clang-format off
#include <sized_string.h>
// clang-format on
// This class here makes no sense and the name might
// be a total misnomer, but this gets the sinit section correct
@@ -101,29 +102,6 @@ u16 *FileManager::getStoryFlagsMut() {
/* 8000AA30 */ u16 *FileManager::getSkipFlags() {}
/* 8000AA40 */ void FileManager::setSkipFlagsChecked(u16 *flags, u32 offset, u16 count) {}
// This does strncat things - append src to dest
inline void fake_strncat(char *dest, const char *src, size_t max_len) {
if (src != nullptr) {
size_t len = strlen(dest);
size_t count = strlen(src);
count = len + count + 1 >= max_len ? max_len - len - 1 : count;
strncpy(dest + len, src, count);
// one instshuffle here - this should be (len + count),
// but then regalloc blows up and uses one more register in initFile
dest[count + len] = '\0';
}
}
// A function like this is inlined into in a bunch of area-related code
// It doesn't make a whole lot of sense to use strncat on a string just
// clipped to zero length...
inline void strnsth(char *dest, const char *src, size_t max_len) {
if (src != dest) {
dest[0] = '\0';
fake_strncat(dest, src, max_len);
}
}
/* 8000AAA0 */ void FileManager::initFile(int fileNum) {
mIsFileInvalid[1] = 1;
@@ -140,10 +118,9 @@ inline void strnsth(char *dest, const char *src, size_t max_len) {
file->selectedDowsingSlot = 0x8;
file->lastUsedPouchItemSlot = 0x8;
char buf[0x20];
buf[0] = '\0';
strnsth(buf, "F405", 0x20);
file->setAreaT1(buf);
SizedString<32> buf;
buf = "F405";
file->setAreaT1(&buf);
file->room_id_t1 = 0;
file->forced_layer_t1 = 0;
file->entrance_t1_load_flag = 1;
+2 -58
View File
@@ -1,64 +1,8 @@
#include "libc.h"
#include <common.h>
#include "toBeSorted/bitwise_flag_helper.h"
#include "toBeSorted/sceneflag_manager.h"
#include "toBeSorted/file_manager.h"
#include "toBeSorted/flag_space.h"
class SceneflagManager {
public:
FlagSpace mSceneflags;
FlagSpace mTempflags;
FlagSpace mZoneflags;
BitwiseFlagHelper mFlagHelper;
u16 mSceneIdx;
u8 mShouldCommit;
static u16 sTempFlags[4];
static u16 sSceneFlags[8];
static u16 sZoneFlags[0xFC];
static SceneflagManager *sInstance;
void doNothing();
void setShouldCommit(u16 flag);
SceneflagManager();
s32 isNotTempOrZoneFlag(u16 flag);
s32 isZoneFlag(u32 flag);
void updateFlagindex(u16 flagindex);
void copyFromSave(u32 flagindex);
void unsetAllTempflags();
void zoneflagsResetAll();
void zoneflagsResetForRoom(u16 roomId);
void unsetZoneAndTempflags();
void unsetAllZoneflags();
void unsetZoneflagsForRoom(u16 roomId);
u16 getZoneflagSlot(u16 roomId, u16 flag);
u16 getSceneflagSlotGlobal(u16 sceneIdx, u16 flag);
u16 getSceneflagSlot(u16 flag);
u16 getTempflagSlot(u16 flag);
bool checkZoneFlag(u16 roomId, u16 flag);
bool checkUncommittedZoneflag(u16 roomId, u16 flag);
u16 checkUncommittedZoneflag2(u16 roomId, u16 flag) {
return checkUncommittedZoneflag(roomId, flag);
}
bool checkUncommittedTempOrSceneflag(u16 flag);
u16 checkUncommittedTempOrSceneflag2(u16 flag) {
return checkUncommittedTempOrSceneflag(flag);
}
bool checkFlag(u16 roomId, u16 flag);
bool checkSceneflagGlobal(u16 sceneIdx, u16 flag);
bool checkTempOrSceneflag(u16 flag);
bool checkUncommittedFlag(u16 roomId, u16 flag);
void setZoneflag(u16 roomId, u16 flag);
void setFlag(u16 roomId, u16 flag);
void setSceneflagGlobal(u16 sceneIdx, u16 flag);
void setTempOrSceneflag(u16 flag);
void unsetZoneflag(u16 roomId, u16 flag);
void unsetFlag(u16 roomId, u16 flag);
void unsetSceneflagGlobal(u16 sceneIdx, u16 flag);
void unsetTempOrSceneflag(u16 flag);
s32 doCommit();
};
SceneflagManager *SceneflagManager::sInstance = nullptr;
u16 SceneflagManager::sTempFlags[] = {};
@@ -200,7 +144,7 @@ bool SceneflagManager::checkUncommittedTempOrSceneflag(u16 flag) {
// mFlagHelper.checkFlag(getSceneflagSlot2(flag), flag % 16, pData, mSceneflags.mCount);
}
}
bool SceneflagManager::checkFlag(u16 roomId, u16 flag) {
u16 SceneflagManager::checkFlag(u16 roomId, u16 flag) {
if (isZoneFlag(flag)) {
return checkZoneFlag(roomId, flag);
} else {
+90
View File
@@ -0,0 +1,90 @@
"""
REL Sieve finds RELs that are good candidates for matching.
RELs have a bunch of dependencies on the main DOL, not all of which are
decomped or have correct headers set up yet, so we can't start matching every
REL right now. The REL sieve finds rels where dependencies *are* set up already
and suggests good candidates for matching.
The approach is that we start with the assumption that every REL *can* be matched
right now, and then when you look at a REL you may find dependencies that block
this REL (usually in terms of a function call). You then add this function label
to the list in this file and re-run the script, at which point this REL and any others
that call this function will be filtered out. You then repeat the process until
you find a REL you can somewhat easily match.
When a system in the DOL becomes available (via headers or a full-on decomp) you
can remove the corresponding function label here and more RELs may become available.
Of course, some of these RELs may have other dependencies, which you can then add etc.
The hope is that this helps us keep an overview over which RELs can be matched and
which DOL systems are good candidates for decomping.
"""
import glob
import json
import os
import pathlib
BLOCKING_SYMBOLS = [
['fn_80353D70', 'UnkCollider::ctor'],
['fn_80353F30', 'UnkCollider::ctor2'],
['fn_80353FF0', 'UnkCollider::init'],
['fn_800C3EC0', 'ActorEventFlowManagerRelated::checkEventFinished'],
['fn_802E6000', 'mdlAnmChr_c::create'],
['fn_802EB6F0', 'm3d::mdl_c::mdl_c'],
['fn_802EDF30', 'm3d::smdl_c::smdl_c'],
['fn_800275C0', 'EffectsStruct::ctor'],
['fn_80027610', 'EffectsStruct::ctor'],
['fn_803465D0', 'ActorCollision::ctor'],
['fn_80341A70', 'checkCollision'],
['fn_80016C10', 'AnimModelWrapper::ctor'],
['fn_802EBBD0', 'm3d::scnLeaf_c::scnLeaf_c'],
['fn_8009C910', 'ActorEventRelated::ctor'],
['fn_802E32B0', 'm2d::FrameCtrl_c::setFrame'],
['fn_802F04A0', 'mFader_c::draw'],
['fn_801695F0', 'LytCommonTitle::ctor'],
['fn_80067020', 'matrixCreateFromPosRotYScale'],
['fn_800C43D0', 'ActorEventFlowManagerRelated *FUN_800c43d0'],
['fn_801BB3C0', 'isCurrentStage'],
['fn_8037DCC0', 'EnemySoundMgr'],
['fn_800A6690', 'ActorOnRail::ctor'],
['fn_80355080', 'getColliderManager'],
['fn_800975D0', 'initializeDowsingTarget'],
['fn_800A0680', 'getCurrentEventActor'],
['fn_80390FE0', 'something harp sound'],
['fn_801BB6F0', 'getCamera'],
['fn_800225F0', 'something light'],
['fn_80179250', 'shutter fence list'],
]
def main():
matched_names = set()
with open('./objdiff.json') as f:
objdiff = json.load(f)
for unit in objdiff["units"]:
if unit.get("complete", False):
matched_names.add(unit["name"].split('/')[-1])
data = {}
for folder in os.listdir('./build/SOUE01'):
if folder.startswith('d_') and not folder[:-2] in matched_names:
data[folder] = []
s_files = glob.glob(f'./build/SOUE01/{folder}/asm/REL/d/**/*.s', recursive=True)
# maybe won't be true at some point?
assert len(s_files) == 1
text = pathlib.Path(s_files[0]).read_text()
for [sym, comment] in BLOCKING_SYMBOLS:
if sym in text:
data[folder].append(comment)
output = sorted([
[rel, deps] for rel, deps in data.items()
], key=lambda x: -len(x[1]))
for [rel, deps] in output:
print(rel + ':', ", ".join(deps) if len(deps) else "No identified blockers! Go decomp this REL, or add a blocker to this script")
if __name__ == "__main__":
main()