mirror of
https://github.com/zeldaret/ss
synced 2026-06-20 16:01:13 -04:00
d_scene OK (#114)
* d_scene OK * d_s_boot * Rename -> PROFILE_MAX * Some more ---------
This commit is contained in:
@@ -17,3 +17,6 @@ REL/global_destructor_chain.c:
|
||||
REL/d/d_s_boot.cpp:
|
||||
.text start:0x000000F0 end:0x000027E8
|
||||
.ctors start:0x00000000 end:0x00000004
|
||||
.rodata start:0x00000000 end:0x00000008
|
||||
.data start:0x00000000 end:0x00000A2C
|
||||
.bss start:0x00000008 end:0x00000108
|
||||
|
||||
@@ -3,43 +3,43 @@ _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_3_F0 = .text:0x000000F0; // type:function size:0x10
|
||||
fn_3_100 = .text:0x00000100; // type:function size:0xF0
|
||||
fn_3_1F0 = .text:0x000001F0; // type:function size:0xD0
|
||||
fn_3_2C0 = .text:0x000002C0; // type:function size:0x84
|
||||
fn_3_350 = .text:0x00000350; // type:function size:0x30
|
||||
fn_3_380 = .text:0x00000380; // type:function size:0x4C
|
||||
executeLoadPhase__9dScBoot_cFv = .text:0x000000F0; // type:function size:0x10
|
||||
cb1__9dScBoot_cFv = .text:0x00000100; // type:function size:0xF0
|
||||
sprintf__16SizedString<128>FPCce = .text:0x000001F0; // type:function size:0xD0
|
||||
cb2__9dScBoot_cFv = .text:0x000002C0; // type:function size:0x84
|
||||
cb3__9dScBoot_cFv = .text:0x00000350; // type:function size:0x30
|
||||
cb4__9dScBoot_cFv = .text:0x00000380; // type:function size:0x4C
|
||||
fn_3_3D0 = .text:0x000003D0; // type:function size:0xC
|
||||
fn_3_3E0 = .text:0x000003E0; // type:function size:0x40
|
||||
fn_3_420 = .text:0x00000420; // type:function size:0x7C
|
||||
fn_3_4A0 = .text:0x000004A0; // type:function size:0x17C
|
||||
fn_3_620 = .text:0x00000620; // type:function size:0x160
|
||||
fn_3_780 = .text:0x00000780; // type:function size:0x8
|
||||
fn_3_790 = .text:0x00000790; // type:function size:0x58
|
||||
dvdCallback__9dScBoot_cFPv = .text:0x000003E0; // type:function size:0x40
|
||||
cb5__9dScBoot_cFv = .text:0x00000420; // type:function size:0x7C
|
||||
cb6__9dScBoot_cFv = .text:0x000004A0; // type:function size:0x17C
|
||||
cb7__9dScBoot_cFv = .text:0x00000620; // type:function size:0x160
|
||||
cb8__9dScBoot_cFv = .text:0x00000780; // type:function size:0x8
|
||||
cb9__9dScBoot_cFv = .text:0x00000790; // type:function size:0x58
|
||||
dScBoot_c_classInit__Fv = .text:0x000007F0; // type:function size:0x30
|
||||
fn_3_820 = .text:0x00000820; // type:function size:0x38
|
||||
fn_3_860 = .text:0x00000860; // type:function size:0x2EC
|
||||
fn_3_B50 = .text:0x00000B50; // type:function size:0x40
|
||||
fn_3_B90 = .text:0x00000B90; // type:function size:0x74
|
||||
fn_3_C10 = .text:0x00000C10; // type:function size:0xD0
|
||||
fn_3_CE0 = .text:0x00000CE0; // type:function size:0xD4
|
||||
removeRef = .text:0x00000DC0; // type:function size:0x58
|
||||
fn_3_E20 = .text:0x00000E20; // type:function size:0xBC
|
||||
fn_3_EE0 = .text:0x00000EE0; // type:function size:0x8
|
||||
fn_3_EF0 = .text:0x00000EF0; // type:function size:0x58
|
||||
__ct__Q29dScBoot_c7strap_cFv = .text:0x00000860; // type:function size:0x2EC
|
||||
__dt__Q34nw4r3lyt11FontRefLinkFv = .text:0x00000B50; // type:function size:0x40
|
||||
__dt__Q23d2d10ResAccIf_cFv = .text:0x00000B90; // type:function size:0x74
|
||||
sprintf__15SizedString<64>FPCce = .text:0x00000C10; // type:function size:0xD0
|
||||
create__Q29dScBoot_c7strap_cFv = .text:0x00000CE0; // type:function size:0xD4
|
||||
remove__Q29dScBoot_c7strap_cFv = .text:0x00000DC0; // type:function size:0x58
|
||||
execute__Q29dScBoot_c7strap_cFv = .text:0x00000E20; // type:function size:0xBC
|
||||
draw__Q29dScBoot_c7strap_cFv = .text:0x00000EE0; // type:function size:0x8
|
||||
init__Q29dScBoot_c7strap_cFv = .text:0x00000EF0; // type:function size:0x58
|
||||
__ct__9dScBoot_cFv = .text:0x00000F50; // type:function size:0x120
|
||||
fn_3_1070 = .text:0x00001070; // type:function size:0x58
|
||||
__dt__19sFPhase<9dScBoot_c>Fv = .text:0x00001070; // type:function size:0x58
|
||||
__dt__21sFState_c<9dScBoot_c>Fv = .text:0x000010D0; // type:function size:0x58
|
||||
__dt__24sFStateFct_c<9dScBoot_c>Fv = .text:0x00001130; // type:function size:0x6C
|
||||
__dt__77sStateMgr_c<9dScBoot_c,20sStateMethodUsr_FI_c,12sFStateFct_c,13sStateIDChk_c>Fv = .text:0x000011A0; // type:function size:0xA0
|
||||
__dt__47sFStateMgr_c<9dScBoot_c,20sStateMethodUsr_FI_c>Fv = .text:0x00001240; // type:function size:0xA4
|
||||
__dt__9dScBoot_cFv = .text:0x000012F0; // type:function size:0x158
|
||||
ScBoot__init = .text:0x00001450; // type:function size:0x90
|
||||
create__9dScBoot_cFv = .text:0x00001450; // type:function size:0x90
|
||||
changeState__77sStateMgr_c<9dScBoot_c,20sStateMethodUsr_FI_c,12sFStateFct_c,13sStateIDChk_c>FRC12sStateIDIf_c = .text:0x000014E0; // type:function size:0x10
|
||||
ScBoot__destroy = .text:0x000014F0; // type:function size:0xB4
|
||||
ScBoot__baseUpdate = .text:0x000015B0; // type:function size:0x78
|
||||
ScBoot__draw = .text:0x00001630; // type:function size:0x34
|
||||
fn_3_1670 = .text:0x00001670; // type:function size:0x4
|
||||
doDelete__9dScBoot_cFv = .text:0x000014F0; // type:function size:0xB4
|
||||
execute__9dScBoot_cFv = .text:0x000015B0; // type:function size:0x78
|
||||
draw__9dScBoot_cFv = .text:0x00001630; // type:function size:0x34
|
||||
deleteReady__9dScBoot_cFv = .text:0x00001670; // type:function size:0x4
|
||||
initializeState_Init__9dScBoot_cFv = .text:0x00001680; // type:function size:0x20
|
||||
executeState_Init__9dScBoot_cFv = .text:0x000016A0; // type:function size:0x18
|
||||
finalizeState_Init__9dScBoot_cFv = .text:0x000016C0; // type:function size:0x4
|
||||
@@ -53,7 +53,7 @@ initializeState_Save__9dScBoot_cFv = .text:0x00001DC0; // type:function size:0x1
|
||||
executeState_Save__9dScBoot_cFv = .text:0x00001DE0; // type:function size:0x29C
|
||||
finalizeState_Save__9dScBoot_cFv = .text:0x00002080; // type:function size:0x4
|
||||
fn_3_2090 = .text:0x00002090; // type:function size:0x78
|
||||
fn_3_2110 = .text:0x00002110; // type:function size:0x2C
|
||||
checkDone__9dScBoot_cFv = .text:0x00002110; // type:function size:0x2C
|
||||
build__24sFStateFct_c<9dScBoot_c>FRC12sStateIDIf_c = .text:0x00002140; // type:function size:0x60
|
||||
dispose__24sFStateFct_c<9dScBoot_c>FRP10sStateIf_c = .text:0x000021A0; // type:function size:0xC
|
||||
initialize__21sFState_c<9dScBoot_c>Fv = .text:0x000021B0; // type:function size:0x1C
|
||||
@@ -67,10 +67,10 @@ getState__77sStateMgr_c<9dScBoot_c,20sStateMethodUsr_FI_c,12sFStateFct_c,13sStat
|
||||
getNewStateID__77sStateMgr_c<9dScBoot_c,20sStateMethodUsr_FI_c,12sFStateFct_c,13sStateIDChk_c>CFv = .text:0x00002260; // type:function size:0x10
|
||||
getStateID__77sStateMgr_c<9dScBoot_c,20sStateMethodUsr_FI_c,12sFStateFct_c,13sStateIDChk_c>CFv = .text:0x00002270; // type:function size:0x10
|
||||
getOldStateID__77sStateMgr_c<9dScBoot_c,20sStateMethodUsr_FI_c,12sFStateFct_c,13sStateIDChk_c>CFv = .text:0x00002280; // type:function size:0x10
|
||||
fn_3_2290 = .text:0x00002290; // type:function size:0x30
|
||||
fn_3_22C0 = .text:0x000022C0; // type:function size:0xC
|
||||
fn_3_22D0 = .text:0x000022D0; // type:function size:0x10
|
||||
fn_3_22E0 = .text:0x000022E0; // type:function size:0x2C
|
||||
callPhase__19sFPhase<9dScBoot_c>Fv = .text:0x00002290; // type:function size:0x30
|
||||
onReset__19sFPhase<9dScBoot_c>Fv = .text:0x000022C0; // type:function size:0xC
|
||||
nextPhase__19sFPhase<9dScBoot_c>Fv = .text:0x000022D0; // type:function size:0x10
|
||||
hasReachedEnd__19sFPhase<9dScBoot_c>CFv = .text:0x000022E0; // type:function size:0x2C
|
||||
finalizeState__23sFStateID_c<9dScBoot_c>CFR9dScBoot_c = .text:0x00002310; // type:function size:0x30
|
||||
executeState__23sFStateID_c<9dScBoot_c>CFR9dScBoot_c = .text:0x00002340; // type:function size:0x30
|
||||
initializeState__23sFStateID_c<9dScBoot_c>CFR9dScBoot_c = .text:0x00002370; // type:function size:0x30
|
||||
@@ -82,7 +82,7 @@ _dtors = .dtors:0x00000000; // type:label scope:global
|
||||
__destroy_global_chain_reference = .dtors:0x00000000; // type:object size:0x4 scope:global
|
||||
lbl_3_rodata_0 = .rodata:0x00000000; // type:object size:0x4 data:float
|
||||
lbl_3_rodata_4 = .rodata:0x00000004; // type:object size:0x4 data:float
|
||||
lbl_3_data_0 = .data:0x00000000; // type:object size:0x98 data:4byte
|
||||
sCallbacks__9dScBoot_c = .data:0x00000000; // type:object size:0x78 data:4byte
|
||||
lbl_3_data_98 = .data:0x00000098; // type:object size:0x1C
|
||||
lbl_3_data_B4 = .data:0x000000B4; // type:object size:0x14
|
||||
lbl_3_data_C8 = .data:0x000000C8; // type:object size:0x8
|
||||
@@ -183,19 +183,19 @@ lbl_3_data_548 = .data:0x00000548; // type:object size:0xC
|
||||
lbl_3_data_554 = .data:0x00000554; // type:object size:0xC
|
||||
lbl_3_data_560 = .data:0x00000560; // type:object size:0x8
|
||||
lbl_3_data_568 = .data:0x00000568; // type:object size:0x22C
|
||||
g_profile_BOOT = .data:0x00000794; // type:object size:0x50
|
||||
g_profile_BOOT = .data:0x00000794; // type:object size:0xC
|
||||
lbl_3_data_7E4 = .data:0x000007E4; // type:object size:0x4
|
||||
ScBoot__vtable = .data:0x000007E8; // type:object size:0x50
|
||||
lbl_3_data_838 = .data:0x00000838; // type:object size:0x30
|
||||
lbl_3_data_868 = .data:0x00000868; // type:object size:0x30
|
||||
lbl_3_data_898 = .data:0x00000898; // type:object size:0x18
|
||||
lbl_3_data_8B0 = .data:0x000008B0; // type:object size:0x18
|
||||
lbl_3_data_8C8 = .data:0x000008C8; // type:object size:0x24
|
||||
lbl_3_data_8EC = .data:0x000008EC; // type:object size:0x10C
|
||||
__vt__9dScBoot_c = .data:0x000007E8; // type:object size:0x4C
|
||||
__vt__47sFStateMgr_c<9dScBoot_c,20sStateMethodUsr_FI_c> = .data:0x00000838; // type:object size:0x30
|
||||
__vt__77sStateMgr_c<9dScBoot_c,20sStateMethodUsr_FI_c,12sFStateFct_c,13sStateIDChk_c> = .data:0x00000868; // type:object size:0x30
|
||||
__vt__24sFStateFct_c<9dScBoot_c> = .data:0x00000898; // type:object size:0x14
|
||||
__vt__21sFState_c<9dScBoot_c> = .data:0x000008B0; // type:object size:0x18
|
||||
__vt__19sFPhase<9dScBoot_c> = .data:0x000008C8; // type:object size:0x24
|
||||
__vt__Q23d2d10ResAccIf_c = .data:0x000008EC; // type:object size:0x14
|
||||
lbl_3_data_9F8 = .data:0x000009F8; // type:object size:0x34
|
||||
__global_destructor_chain = .bss:0x00000000; // type:object size:0x4 scope:global
|
||||
lbl_3_bss_8 = .bss:0x00000008; // type:object size:0x10 data:4byte
|
||||
ScBoot__STATE_INIT = .bss:0x00000018; // type:object size:0x40 data:4byte
|
||||
ScBoot__STATE_STRAP = .bss:0x00000058; // type:object size:0x40 data:4byte
|
||||
ScBoot__STATE_CONNECT = .bss:0x00000098; // type:object size:0x40 data:4byte
|
||||
ScBoot__STATE_SAVE = .bss:0x000000D8; // type:object size:0x30 data:4byte
|
||||
StateID_Init__9dScBoot_c = .bss:0x00000018; // type:object size:0x30 data:4byte
|
||||
StateID_Strap__9dScBoot_c = .bss:0x00000058; // type:object size:0x30 data:4byte
|
||||
StateID_Connect__9dScBoot_c = .bss:0x00000098; // type:object size:0x30 data:4byte
|
||||
StateID_Save__9dScBoot_c = .bss:0x000000D8; // type:object size:0x30 data:4byte
|
||||
|
||||
@@ -141,8 +141,12 @@ d/d_rawarchive.cpp:
|
||||
.data start:0x8050DDD8 end:0x8050DDF8
|
||||
|
||||
d/d_scene.cpp:
|
||||
.text start:0x800629D0 end:0x80062E40
|
||||
.text start:0x800629D0 end:0x80062E3C
|
||||
.ctors start:0x804DB690 end:0x804DB694
|
||||
.data start:0x8050DDF8 end:0x8050DE48
|
||||
.sdata start:0x80571D08 end:0x80571D10
|
||||
.sbss start:0x80575220 end:0x80575228
|
||||
.bss start:0x805A06F0 end:0x805A0720
|
||||
|
||||
d/d_stage.cpp:
|
||||
.text start:0x80062E40 end:0x80064250
|
||||
@@ -794,6 +798,9 @@ d/tg/d_t_genki_mgr.cpp:
|
||||
d/a/obj/d_a_obj_water_mark.cpp:
|
||||
.text start:0x802D9D60 end:0x802DA0BC
|
||||
|
||||
s/s_FPhase.cpp:
|
||||
.text start:0x802DDC20 end:0x802DDDB0
|
||||
|
||||
s/s_StateID.cpp:
|
||||
.text start:0x802DDDB0 end:0x802DE1F4
|
||||
.ctors start:0x804DB8B8 end:0x804DB8BC
|
||||
|
||||
+25
-25
@@ -2770,16 +2770,16 @@ ensureAllEntriesLoaded__14dRawArcTable_cFv = .text:0x80062840; // type:function
|
||||
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
|
||||
fn_80062AE0 = .text:0x80062AE0; // type:function size:0x174
|
||||
fn_80062C60 = .text:0x80062C60; // type:function size:0x74
|
||||
setGameStateToBoot = .text:0x80062CE0; // type:function size:0x18
|
||||
fn_80062D00 = .text:0x80062D00; // type:function size:0x68
|
||||
SetRootActor = .text:0x80062D70; // type:function size:0x30
|
||||
fn_80062DA0 = .text:0x80062DA0; // type:function size:0x5C
|
||||
dScene__sinit = .text:0x80062E00; // type:function size:0x3C
|
||||
__ct__8dScene_cFv = .text:0x800629D0; // type:function size:0x60
|
||||
postCreate__8dScene_cFQ27fBase_c12MAIN_STATE_e = .text:0x80062A30; // type:function size:0x50
|
||||
postDelete__8dScene_cFQ27fBase_c12MAIN_STATE_e = .text:0x80062A80; // type:function size:0x58
|
||||
preExecute__8dScene_cFv = .text:0x80062AE0; // type:function size:0x174
|
||||
postExecute__8dScene_cFQ27fBase_c12MAIN_STATE_e = .text:0x80062C60; // type:function size:0x74
|
||||
staticCreate__8dScene_cFv = .text:0x80062CE0; // type:function size:0x18
|
||||
staticExecute__8dScene_cFv = .text:0x80062D00; // type:function size:0x68
|
||||
setRootActor__8dScene_cFQ28fProfile14PROFILE_NAME_eUlll = .text:0x80062D70; // type:function size:0x30
|
||||
__dt__8dScene_cFv = .text:0x80062DA0; // type:function size:0x5C
|
||||
__sinit_\d_scene_cpp = .text:0x80062E00; // type:function size:0x3C scope:local
|
||||
fn_80062E40 = .text:0x80062E40; // type:function size:0x4
|
||||
fn_80062E50 = .text:0x80062E50; // type:function size:0x60
|
||||
fn_80062EB0 = .text:0x80062EB0; // type:function size:0x4
|
||||
@@ -2830,7 +2830,7 @@ EGG__ConfigurationData__onBeginFrame = .text:0x800643D0; // type:function size:0
|
||||
dSys_c__endFrame = .text:0x800643E0; // type:function size:0x48
|
||||
EGG__ConfigurationData__onEndFrame = .text:0x80064430; // type:function size:0x4
|
||||
dSys_c__setBlack = .text:0x80064440; // type:function size:0x80
|
||||
dSys_c__setFrameRate = .text:0x800644C0; // type:function size:0x10
|
||||
setFrameRate__4dSysFUl = .text:0x800644C0; // type:function size:0x10
|
||||
dSys_c__getFrameRate = .text:0x800644D0; // type:function size:0x10
|
||||
dSys_c__setClearColor = .text:0x800644E0; // type:function size:0x60
|
||||
dSys_c__getClearColor = .text:0x80064540; // type:function size:0x14
|
||||
@@ -2927,7 +2927,7 @@ fn_80067A60 = .text:0x80067A60; // type:function size:0x34
|
||||
fn_80067AA0 = .text:0x80067AA0; // type:function size:0x3C
|
||||
fn_80067AE0 = .text:0x80067AE0; // type:function size:0x34
|
||||
fn_80067B20 = .text:0x80067B20; // type:function size:0x4C
|
||||
getReloadColorFaderPtr = .text:0x80067B70; // type:function size:0x8
|
||||
GetInstance__16ReloadColorFaderFv = .text:0x80067B70; // type:function size:0x8
|
||||
fn_80067B80 = .text:0x80067B80; // type:function size:0x84
|
||||
fn_80067C10 = .text:0x80067C10; // type:function size:0xA8
|
||||
fn_80067CC0 = .text:0x80067CC0; // type:function size:0x7C
|
||||
@@ -2936,9 +2936,9 @@ fn_80067DB0 = .text:0x80067DB0; // type:function size:0x14
|
||||
fn_80067DD0 = .text:0x80067DD0; // type:function size:0x8
|
||||
fn_80067DE0 = .text:0x80067DE0; // type:function size:0xD4
|
||||
getStatus__Q23EGG10ColorFaderCFv = .text:0x80067EC0; // type:function size:0x8
|
||||
fn_80067ED0 = .text:0x80067ED0; // type:function size:0x24
|
||||
fn_80067F00 = .text:0x80067F00; // type:function size:0x50
|
||||
fn_80067F50 = .text:0x80067F50; // type:function size:0x4
|
||||
fn_80067ED0__16ReloadColorFaderFv = .text:0x80067ED0; // type:function size:0x24
|
||||
fn_80067F00__16ReloadColorFaderFv = .text:0x80067F00; // type:function size:0x50
|
||||
fn_80067F50__16ReloadColorFaderFv = .text:0x80067F50; // type:function size:0x4
|
||||
fn_80067F60 = .text:0x80067F60; // type:function size:0x38
|
||||
fn_80067FA0 = .text:0x80067FA0; // type:function size:0xC
|
||||
fn_80067FB0 = .text:0x80067FB0; // type:function size:0xC
|
||||
@@ -17165,10 +17165,10 @@ fn_802DC8D0 = .text:0x802DC8D0; // type:function size:0x698
|
||||
fn_802DCF70 = .text:0x802DCF70; // type:function size:0x698
|
||||
fn_802DD610 = .text:0x802DD610; // type:function size:0x9C
|
||||
fn_802DD6B0 = .text:0x802DD6B0; // type:function size:0x568
|
||||
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
|
||||
__dt__15sFPhaseBaseBaseFv = .text:0x802DDC20; // type:function size:0x40
|
||||
__dt__11sFPhaseBaseFv = .text:0x802DDC60; // type:function size:0x58
|
||||
step__11sFPhaseBaseFv = .text:0x802DDCC0; // type:function size:0xA8
|
||||
reset__11sFPhaseBaseFv = .text:0x802DDD70; // type:function size:0x40
|
||||
__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
|
||||
@@ -29201,7 +29201,7 @@ lbl_804FBF58 = .rodata:0x804FBF58; // type:object size:0x10
|
||||
lbl_804FBF68 = .rodata:0x804FBF68; // type:object size:0x10
|
||||
lbl_804FBF78 = .rodata:0x804FBF78; // type:object size:0x20
|
||||
lbl_804FBF98 = .rodata:0x804FBF98; // type:object size:0x10
|
||||
EMPTY_PTMF = .rodata:0x804FBFA8; // type:object size:0x10 data:4byte
|
||||
__ptmf_null = .rodata:0x804FBFA8; // type:object size:0x10 data:4byte
|
||||
lbl_804FBFB8 = .rodata:0x804FBFB8; // type:object size:0x18 data:double
|
||||
lbl_804FBFD0 = .rodata:0x804FBFD0; // type:object size:0x70
|
||||
lbl_804FC040 = .rodata:0x804FC040; // type:object size:0x18 data:4byte
|
||||
@@ -30772,7 +30772,7 @@ ActorLink__mainBodyModelCallbackVtable = .data:0x8050DDA0; // type:object size:0
|
||||
lbl_8050DDB8 = .data:0x8050DDB8; // type:object size:0x20
|
||||
@4669 = .data:0x8050DDD8; // type:object size:0xE scope:local data:string
|
||||
@4670 = .data:0x8050DDE8; // type:object size:0xB scope:local data:string
|
||||
lbl_8050DDF8 = .data:0x8050DDF8; // type:object size:0x50
|
||||
__vt__8dScene_c = .data:0x8050DDF8; // type:object size:0x4C
|
||||
lbl_8050DE48 = .data:0x8050DE48; // type:object size:0x10
|
||||
lbl_8050DE58 = .data:0x8050DE58; // type:object size:0x5C
|
||||
lbl_8050DEB4 = .data:0x8050DEB4; // type:object size:0x10
|
||||
@@ -37826,7 +37826,7 @@ lbl_80571CF0 = .sdata:0x80571CF0; // type:object size:0x8
|
||||
lbl_80571CF8 = .sdata:0x80571CF8; // type:object size:0x8 data:string
|
||||
lbl_80571D00 = .sdata:0x80571D00; // type:object size:0x8 data:string
|
||||
RootActorID = .sdata:0x80571D08; // type:object size:0x2 data:2byte
|
||||
gameStateIsActive = .sdata:0x80571D0A; // type:object size:0x6 data:byte
|
||||
gameStateIsActive = .sdata:0x80571D0A; // type:object size:0x1 data:byte
|
||||
@9006 = .sdata:0x80571D10; // type:object size:0x7 scope:local data:string
|
||||
@9007 = .sdata:0x80571D18; // type:object size:0x3 scope:local data:string
|
||||
lbl_80571D20 = .sdata:0x80571D20; // type:object size:0x8
|
||||
@@ -39979,7 +39979,7 @@ lbl_8057520B = .sbss:0x8057520B; // type:object size:0x5 data:byte
|
||||
guideColor1 = .sbss:0x80575210; // type:object size:0x4 data:4byte
|
||||
guideColor2 = .sbss:0x80575214; // type:object size:0x4 data:4byte
|
||||
guideColor3 = .sbss:0x80575218; // type:object size:0x8 data:4byte
|
||||
RootActorParams = .sbss:0x80575220; // type:object size:0x8 data:4byte
|
||||
RootActorParams = .sbss:0x80575220; // type:object size:0x4 data:4byte
|
||||
ms_configuration_p__6dSys_c = .sbss:0x80575228; // type:object size:0x4 data:4byte
|
||||
dSys_c__ms_RootHeapMem1 = .sbss:0x8057522C; // type:object size:0x4 data:4byte
|
||||
dSys_c__ms_RootHeapMem2 = .sbss:0x80575230; // type:object size:0x4 data:4byte
|
||||
@@ -40177,7 +40177,7 @@ lbl_8057569C = .sbss:0x8057569C; // type:object size:0x4 data:4byte
|
||||
lbl_805756A0 = .sbss:0x805756A0; // type:object size:0x4 data:4byte
|
||||
lbl_805756A4 = .sbss:0x805756A4; // type:object size:0x4 data:4byte
|
||||
sInstance__19GoddessChestCounter = .sbss:0x805756A8; // type:object size:0x8 data:4byte
|
||||
BOOT_PTR = .sbss:0x805756B0; // type:object size:0x4 data:4byte
|
||||
sInstance__9dScBoot_c = .sbss:0x805756B0; // type:object size:0x4 data:4byte
|
||||
lbl_805756B4 = .sbss:0x805756B4; // type:object size:0x4 data:4byte
|
||||
TITLE_SCREEN_CHANGE = .sbss:0x805756B8; // type:object size:0x4 data:4byte
|
||||
SIREN_TAG = .sbss:0x805756BC; // type:object size:0x4 data:4byte
|
||||
@@ -48442,7 +48442,7 @@ HandMats = .bss:0x805A06C8; // type:object size:0x10 data:byte
|
||||
SOUND_BREAKING_MAYBE = .bss:0x805A06D8; // type:object size:0xC data:2byte
|
||||
lbl_805A06E4 = .bss:0x805A06E4; // type:object size:0xC data:float
|
||||
lbl_805A06F0 = .bss:0x805A06F0; // type:object size:0xC
|
||||
lbl_805A06FC = .bss:0x805A06FC; // type:object size:0x24 data:4byte
|
||||
sFader__8dScene_c = .bss:0x805A06FC; // type:object size:0x24 data:4byte
|
||||
SysConfig = .bss:0x805A0720; // type:object size:0x58 data:4byte
|
||||
lbl_805A0778 = .bss:0x805A0778; // type:object size:0xC data:4byte
|
||||
lbl_805A0784 = .bss:0x805A0784; // type:object size:0xC data:4byte
|
||||
|
||||
@@ -339,6 +339,7 @@ config.libs = [
|
||||
Object(Matching, "d/d_font_manager.cpp"),
|
||||
Object(Matching, "d/d_heap.cpp"),
|
||||
Object(Matching, "d/d_rawarchive.cpp"),
|
||||
Object(Matching, "d/d_scene.cpp"),
|
||||
Object(NonMatching, "d/d_stage.cpp"),
|
||||
Object(NonMatching, "d/d_sys.cpp"),
|
||||
Object(NonMatching, "toBeSorted/sound_info.cpp"),
|
||||
@@ -557,6 +558,7 @@ config.libs = [
|
||||
"objects": [
|
||||
Object(Matching, "s/s_Crc.cpp"),
|
||||
Object(NonMatching, "s/s_Math.cpp"),
|
||||
Object(Matching, "s/s_FPhase.cpp"),
|
||||
Object(Matching, "s/s_StateID.cpp"),
|
||||
Object(Matching, "s/s_StateMethod.cpp"),
|
||||
Object(Matching, "s/s_StateMethodUsr_FI.cpp"),
|
||||
|
||||
@@ -17,4 +17,13 @@ private:
|
||||
int mCount;
|
||||
};
|
||||
|
||||
namespace dDyl {
|
||||
|
||||
void initRelsArc();
|
||||
bool destroy();
|
||||
bool isLinked(u16 relId);
|
||||
int tryLink(u16 relId);
|
||||
|
||||
} // namespace dDyl
|
||||
|
||||
#endif
|
||||
|
||||
+31
-5
@@ -6,9 +6,9 @@
|
||||
#include "m/m_color_fader.h"
|
||||
#include "m/m_fader.h"
|
||||
|
||||
class dFader_c : mFader_c {
|
||||
class dFader_c : public mFader_c {
|
||||
public:
|
||||
dFader_c() : mpColorFader(nullptr), mpLytFader(nullptr), mpScreenFader(nullptr) {}
|
||||
dFader_c() : mpColorFader(nullptr), mpLytFader(nullptr), mpScreenFader(nullptr), field_0x14(0) {}
|
||||
virtual ~dFader_c();
|
||||
|
||||
bool create();
|
||||
@@ -16,15 +16,41 @@ public:
|
||||
u8 getColorFaderAlpha();
|
||||
bool initForLyt();
|
||||
|
||||
bool fadeIn() {
|
||||
setFader(mFadeInType);
|
||||
mpFader->setFrame(mFadeInFrame);
|
||||
return mpFader->fadeIn();
|
||||
}
|
||||
|
||||
bool fadeOut() {
|
||||
setFader(mFadeOutType);
|
||||
mpFader->setFrame(mFadeOutFrame);
|
||||
return mpFader->fadeOut();
|
||||
}
|
||||
|
||||
void setTypes(s32 fadeInType, s32 fadeOutType) {
|
||||
mFadeInType = fadeInType;
|
||||
mFadeOutType = fadeOutType;
|
||||
}
|
||||
|
||||
void resetFrames() {
|
||||
mFadeInFrame = 30;
|
||||
mFadeOutFrame = 30;
|
||||
}
|
||||
|
||||
void setFadeInFrame(u16 frame) {
|
||||
mFadeInFrame = frame;
|
||||
}
|
||||
|
||||
private:
|
||||
/* 0x08 */ mColorFader_c *mpColorFader;
|
||||
/* 0x0C */ dLytFader_c *mpLytFader;
|
||||
/* 0x10 */ dScreenFader_c *mpScreenFader;
|
||||
/* 0x14 */ UNKWORD field_0x14;
|
||||
/* 0x14 */ u8 field_0x14;
|
||||
/* 0x18 */ s32 mFadeInType;
|
||||
/* 0x1C */ s32 mFadeOutType;
|
||||
/* 0x20 */ u16 field_0x20;
|
||||
/* 0x22 */ u16 field_0x22;
|
||||
/* 0x20 */ u16 mFadeInFrame;
|
||||
/* 0x22 */ u16 mFadeOutFrame;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
+72
-4
@@ -1,11 +1,16 @@
|
||||
#ifndef D_S_BOOT_H
|
||||
#define D_S_BOOT_H
|
||||
|
||||
#include "d/d_base.h"
|
||||
#include "d/d_fader.h"
|
||||
#include "d/d_scene.h"
|
||||
#include "d/lyt/d2d.h"
|
||||
#include "m/m2d.h"
|
||||
#include "m/m_dvd.h"
|
||||
#include "s/s_FPhase.h"
|
||||
#include "s/s_State.hpp"
|
||||
#include "s/s_StateMgr.hpp"
|
||||
#include "sized_string.h"
|
||||
|
||||
class dScBoot_c : public dBase_c {
|
||||
class dScBoot_c : public dScene_c {
|
||||
public:
|
||||
dScBoot_c();
|
||||
virtual ~dScBoot_c();
|
||||
@@ -15,8 +20,71 @@ public:
|
||||
STATE_FUNC_DECLARE(dScBoot_c, Connect);
|
||||
STATE_FUNC_DECLARE(dScBoot_c, Save);
|
||||
|
||||
static dScBoot_c *sInstance;
|
||||
|
||||
private:
|
||||
/* 0x??? */ STATE_MGR_DECLARE(dScBoot_c);
|
||||
class strap_c {
|
||||
public:
|
||||
strap_c();
|
||||
|
||||
bool create();
|
||||
bool execute();
|
||||
bool remove();
|
||||
void draw();
|
||||
void init();
|
||||
|
||||
private:
|
||||
/* 0x000 */ SizedString<64> mArcName;
|
||||
/* 0x040 */ SizedString<64> mStr2;
|
||||
/* 0x080 */ SizedString<64> mStr3;
|
||||
/* 0x0C0 */ d2d::ResAccIf_c mResAcc;
|
||||
/* 0x430 */ m2d::Simple_c mLyt;
|
||||
/* 0x4C8 */ m2d::Anm_c mAnm;
|
||||
/* 0x4EC */ u8 field_0x4EC;
|
||||
/* 0x4EE */ u16 field_0x4EE;
|
||||
/* 0x4F0 */ u8 field_0x4F0;
|
||||
};
|
||||
|
||||
sFPhaseBase::sFPhaseState executeLoadPhase();
|
||||
|
||||
virtual int create() override;
|
||||
virtual int execute() override;
|
||||
virtual int doDelete() override;
|
||||
virtual int draw() override;
|
||||
virtual void deleteReady() override;
|
||||
|
||||
bool checkDone();
|
||||
|
||||
sFPhaseBase::sFPhaseState cb1();
|
||||
sFPhaseBase::sFPhaseState cb2();
|
||||
sFPhaseBase::sFPhaseState cb3();
|
||||
sFPhaseBase::sFPhaseState cb4();
|
||||
sFPhaseBase::sFPhaseState cb5();
|
||||
sFPhaseBase::sFPhaseState cb6();
|
||||
sFPhaseBase::sFPhaseState cb7();
|
||||
sFPhaseBase::sFPhaseState cb8();
|
||||
sFPhaseBase::sFPhaseState cb9();
|
||||
|
||||
static u32 dvdCallback(void *data);
|
||||
|
||||
static sFPhase<dScBoot_c>::phaseCallback sCallbacks[];
|
||||
|
||||
/* 0x068 */ strap_c mStrapScreen;
|
||||
/* 0x55C */ sFPhase<dScBoot_c> mPhases;
|
||||
/* 0x570 */ mDvd_callback_c *mpDvdCallback;
|
||||
/* 0x574 */ STATE_MGR_DECLARE(dScBoot_c);
|
||||
/* 0x5B4 */ dFader_c mFader;
|
||||
/* 0x5D4 */ s32 field_0x5D4;
|
||||
/* 0x5D8 */ u32 field_0x5D8;
|
||||
/* 0x5DC */ u8 field_0x5DC;
|
||||
/* 0x5DD */ u8 field_0x5DD;
|
||||
/* 0x5DE */ u8 field_0x5DE;
|
||||
/* 0x5DF */ u8 field_0x5DF;
|
||||
/* 0x5E0 */ u8 field_0x5E0;
|
||||
/* 0x5E1 */ u8 field_0x5E1;
|
||||
/* 0x5E2 */ u8 field_0x5E2;
|
||||
/* 0x5E3 */ u8 field_0x5E3;
|
||||
/* 0x5E4 */ u8 field_0x5E4;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
#ifndef D_SCENE_H
|
||||
#define D_SCENE_H
|
||||
|
||||
#include "d/d_base.h"
|
||||
#include "d/d_fader.h"
|
||||
#include "f/f_profile_name.h"
|
||||
|
||||
class dScene_c : public dBase_c {
|
||||
public:
|
||||
dScene_c();
|
||||
virtual ~dScene_c() {}
|
||||
|
||||
virtual void postCreate(MAIN_STATE_e state) override;
|
||||
virtual void postDelete(MAIN_STATE_e state) override;
|
||||
virtual int preExecute() override;
|
||||
virtual void postExecute(MAIN_STATE_e status) override;
|
||||
|
||||
static void staticCreate();
|
||||
static dBase_c *staticExecute();
|
||||
static void setRootActor(fProfile::PROFILE_NAME_e rootActor, u32 params, s32 fadeInType, s32 fadeOutType);
|
||||
|
||||
protected:
|
||||
static dFader_c sFader;
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -1,4 +1,12 @@
|
||||
#ifndef D_SYS_H
|
||||
#define D_SYS_H
|
||||
|
||||
#include "common.h"
|
||||
|
||||
namespace dSys {
|
||||
|
||||
void setFrameRate(u32);
|
||||
|
||||
} // namespace dSys_c
|
||||
|
||||
#endif
|
||||
|
||||
@@ -108,6 +108,10 @@ public:
|
||||
Heap *becomeCurrentHeap();
|
||||
Heap *_becomeCurrentHeapWithoutLock();
|
||||
|
||||
void disableAllocation() {
|
||||
mFlag.set(HEAP_FLAG_LOCKED);
|
||||
}
|
||||
|
||||
public:
|
||||
template <typename T>
|
||||
static T *alloc(u32 count, Heap *heap, int align = 4) {
|
||||
|
||||
@@ -84,7 +84,7 @@ struct fActorProfile_c /* : fBaseProfile_c */ {
|
||||
u32 mActorProperties; ///< Some actor-related properties. @todo Document the bitfield.
|
||||
};
|
||||
|
||||
extern const fBaseProfile_c *(*sProfileList)[NUMBER_OF_ACTORS]; ///< A list of all profiles.
|
||||
extern const fBaseProfile_c *(*sProfileList)[PROFILE_MAX]; ///< A list of all profiles.
|
||||
|
||||
} // namespace fProfile
|
||||
|
||||
|
||||
@@ -707,8 +707,7 @@ enum PROFILE_NAME_e {
|
||||
/* 700 (0x2BC) */ BOOT,
|
||||
/* 701 (0x2BD) */ ROOM,
|
||||
/* 702 (0x2BE) */ LAST,
|
||||
/* 703 */ NUMBER_OF_ACTORS,
|
||||
INVALID,
|
||||
/* 703 */ PROFILE_MAX,
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
+5
-2
@@ -123,6 +123,7 @@ private:
|
||||
|
||||
class Anm_c {
|
||||
public:
|
||||
Anm_c() : mpTransform(nullptr), mFlags(0) {}
|
||||
virtual ~Anm_c();
|
||||
|
||||
bool doSomething(const char *path, ResAccIf_c *acc);
|
||||
@@ -148,8 +149,6 @@ private:
|
||||
void updateFrame();
|
||||
nw4r::lyt::AnimTransform *mpTransform;
|
||||
FrameCtrl_c mFrameCtrl;
|
||||
|
||||
public:
|
||||
u8 mFlags;
|
||||
};
|
||||
|
||||
@@ -190,6 +189,10 @@ public:
|
||||
return (field_0x94 & 1) ? 1 : 0;
|
||||
}
|
||||
|
||||
void setResAcc(ResAccIf_c *resAcc) {
|
||||
mpResAcc = resAcc;
|
||||
}
|
||||
|
||||
private:
|
||||
Layout_c mLayout;
|
||||
nw4r::lyt::DrawInfo mDrawInfo;
|
||||
|
||||
@@ -78,6 +78,7 @@ public:
|
||||
virtual u32 execute() override;
|
||||
|
||||
static mDvd_callback_c *create(dvdReadCallback cb, void *cbData);
|
||||
// createOrDie__15mDvd_callback_cFPFPv_PvPv ?
|
||||
static mDvd_callback_c *createOrFail(dvdReadCallback cb, void *cbData);
|
||||
|
||||
dvdReadCallback mCallback;
|
||||
|
||||
@@ -12,6 +12,18 @@ public:
|
||||
return mpFader->getStatus() == status;
|
||||
}
|
||||
|
||||
bool isNotStatus(mFaderBase_c::EStatus status) {
|
||||
return isStatus(status) != true;
|
||||
}
|
||||
|
||||
void setStatus(mFaderBase_c::EStatus status) {
|
||||
mpFader->setStatus(status);
|
||||
}
|
||||
|
||||
bool calc() {
|
||||
return mpFader->calc();
|
||||
}
|
||||
protected:
|
||||
mFaderBase_c *mpFader;
|
||||
};
|
||||
|
||||
|
||||
@@ -26,3 +26,7 @@ this seems the most reasonable.
|
||||
## s_FStateVirtualID
|
||||
|
||||
Implemented by SS based on NSMBW symbols. Probably missing some parts, sync with NSMBW if they get around to it.
|
||||
|
||||
## s_FPhase
|
||||
|
||||
SS-only. Symbols/names completely made up.
|
||||
|
||||
@@ -0,0 +1,80 @@
|
||||
#ifndef S_FPHASE_H
|
||||
#define S_FPHASE_H
|
||||
|
||||
#include "common.h"
|
||||
|
||||
// Not present in NSMBW
|
||||
|
||||
// Look these BaseBase names are terrible but I can't find any better states
|
||||
|
||||
class sFPhaseBaseBase {
|
||||
public:
|
||||
~sFPhaseBaseBase();
|
||||
};
|
||||
|
||||
class sFPhaseBase : public sFPhaseBaseBase {
|
||||
public:
|
||||
sFPhaseBase() : mState(PHASE_INITIAL) {}
|
||||
|
||||
enum sFPhaseState {
|
||||
PHASE_INITIAL,
|
||||
PHASE_RETRY,
|
||||
PHASE_NEXT,
|
||||
PHASE_ALL_DONE,
|
||||
STATE_4, // PHASE_CANCEL? This causes the system to stop running any phase callbacks
|
||||
};
|
||||
virtual ~sFPhaseBase();
|
||||
|
||||
sFPhaseState getState() const {
|
||||
return mState;
|
||||
}
|
||||
|
||||
bool isFinalized() const {
|
||||
return mState == STATE_4 || mState == PHASE_ALL_DONE;
|
||||
}
|
||||
|
||||
virtual void reset();
|
||||
virtual sFPhaseState step();
|
||||
protected:
|
||||
virtual sFPhaseState callPhase() = 0;
|
||||
virtual void onReset() = 0;
|
||||
virtual void nextPhase() = 0;
|
||||
virtual bool hasReachedEnd() const = 0;
|
||||
|
||||
private:
|
||||
/* 0x04 */ sFPhaseState mState;
|
||||
};
|
||||
|
||||
template <class T>
|
||||
class sFPhase : public sFPhaseBase {
|
||||
public:
|
||||
typedef sFPhaseState (T::*phaseCallback)(void);
|
||||
sFPhase(T *owner, phaseCallback *phases) {
|
||||
mpOwner = owner;
|
||||
mpCurrentPhase = nullptr;
|
||||
mpPhases = phases;
|
||||
reset();
|
||||
}
|
||||
virtual ~sFPhase() {}
|
||||
|
||||
protected:
|
||||
virtual sFPhaseState callPhase() override {
|
||||
return (mpOwner->*(*mpCurrentPhase))();
|
||||
}
|
||||
virtual void onReset() override {
|
||||
mpCurrentPhase = mpPhases;
|
||||
}
|
||||
virtual void nextPhase() override {
|
||||
mpCurrentPhase++;
|
||||
}
|
||||
virtual bool hasReachedEnd() const override {
|
||||
return *mpCurrentPhase == nullptr;
|
||||
}
|
||||
|
||||
private:
|
||||
/* 0x08 */ T *mpOwner;
|
||||
/* 0x0C */ phaseCallback *mpPhases;
|
||||
/* 0x10 */ phaseCallback *mpCurrentPhase;
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -3,28 +3,32 @@
|
||||
|
||||
#include "d/d_rawarchive.h"
|
||||
#include "egg/core/eggHeap.h"
|
||||
#include "sized_string.h"
|
||||
|
||||
class LayoutArcManager {
|
||||
public:
|
||||
LayoutArcManager();
|
||||
virtual ~LayoutArcManager();
|
||||
|
||||
dRawArcTable_c mArcTable;
|
||||
|
||||
static LayoutArcManager *sInstance;
|
||||
|
||||
static bool create(EGG::Heap *heap);
|
||||
|
||||
void init(EGG::Heap *heap);
|
||||
|
||||
inline int ensureAllEntriesLoaded() {
|
||||
return mArcTable.ensureAllEntriesLoaded();
|
||||
}
|
||||
|
||||
bool loadLayoutArcFromDisk(const char *object, EGG::Heap *heap);
|
||||
void ensureLoaded1(const char *object);
|
||||
int 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);
|
||||
|
||||
private:
|
||||
dRawArcTable_c mArcTable;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
|
||||
#include "d/d_rawarchive.h"
|
||||
#include "egg/core/eggHeap.h"
|
||||
#include "sized_string.h"
|
||||
|
||||
class OarcManager {
|
||||
public:
|
||||
@@ -16,6 +15,10 @@ public:
|
||||
|
||||
void init(EGG::Heap *heap);
|
||||
|
||||
inline int ensureAllEntriesLoaded() {
|
||||
return mArcTable.ensureAllEntriesLoaded();
|
||||
}
|
||||
|
||||
bool checkIfObjectArcExistsOnDisk(const char *object);
|
||||
bool loadObjectArcFromDisk(const char *object, EGG::Heap *heap);
|
||||
bool addEntryFromSuperArc(const char *object, void *data, EGG::Heap *heap);
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
#ifndef HBM_H
|
||||
#define HBM_H
|
||||
|
||||
extern "C" void *getHBM();
|
||||
extern "C" int fn_801967D0(void *hbm);
|
||||
extern "C" int fn_80197560(void *hbm, int);
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,7 @@
|
||||
#ifndef MUSIC_MGRS_H
|
||||
#define MUSIC_MGRS_H
|
||||
|
||||
extern "C" void *BGM_MGR;
|
||||
extern "C" void fn_8035E000();
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,16 @@
|
||||
#ifndef RELOAD_COLOR_FADER_H
|
||||
#define RELOAD_COLOR_FADER_H
|
||||
|
||||
#include "common.h"
|
||||
class ReloadColorFader {
|
||||
public:
|
||||
static ReloadColorFader *GetInstance();
|
||||
void fn_80067ED0();
|
||||
void fn_80067F00();
|
||||
void fn_80067F50();
|
||||
|
||||
u8 field_0x00[0x0C - 0x00];
|
||||
s32 field_0x0C;
|
||||
};
|
||||
|
||||
#endif
|
||||
+544
-12
@@ -1,24 +1,556 @@
|
||||
#include "d/d_s_boot.h"
|
||||
|
||||
SPECIAL_ACTOR_PROFILE(BOOT, dScBoot_c, fProfile::BOOT, 0x2A7, 0, 1174405120);
|
||||
#include "common.h"
|
||||
#include "d/d_base.h"
|
||||
#include "d/d_dylink.h"
|
||||
#include "d/d_font_manager.h"
|
||||
#include "d/d_heap.h"
|
||||
#include "d/d_scene.h"
|
||||
#include "d/d_sys.h"
|
||||
#include "d/lyt/d_lyt_battery.h"
|
||||
#include "f/f_base.h"
|
||||
#include "f/f_profile.h"
|
||||
#include "f/f_profile_name.h"
|
||||
#include "m/m2d.h"
|
||||
#include "m/m_dvd.h"
|
||||
#include "m/m_fader_base.h"
|
||||
#include "m/m_heap.h"
|
||||
#include "m/m_pad.h"
|
||||
#include "nw4r/ut/ut_ResFont.h"
|
||||
#include "rvl/TPL/TPL.h"
|
||||
#include "s/s_FPhase.h"
|
||||
#include "sized_string.h"
|
||||
#include "toBeSorted/arc_managers/layout_arc_manager.h"
|
||||
#include "toBeSorted/arc_managers/oarc_manager.h"
|
||||
#include "toBeSorted/hbm.h"
|
||||
#include "toBeSorted/reload_color_fader.h"
|
||||
|
||||
sFPhase<dScBoot_c>::phaseCallback dScBoot_c::sCallbacks[] = {&dScBoot_c::cb1, &dScBoot_c::cb2, &dScBoot_c::cb3,
|
||||
&dScBoot_c::cb4, &dScBoot_c::cb5, &dScBoot_c::cb9,
|
||||
&dScBoot_c::cb6, &dScBoot_c::cb7, &dScBoot_c::cb8,
|
||||
nullptr};
|
||||
|
||||
// 40 seconds
|
||||
#define SC_BOOT_STRAP_MAX_DURATION 1200
|
||||
// 2 seconds
|
||||
#define SC_BOOT_STRAP_MIN_DURATION 60
|
||||
|
||||
sFPhaseBase::sFPhaseState dScBoot_c::executeLoadPhase() {
|
||||
return mPhases.step();
|
||||
}
|
||||
|
||||
extern "C" u8 getUsedLanguageNTSCNum();
|
||||
extern "C" const char *getEventFlowFileNameByIndex(int, int);
|
||||
extern "C" const char *getUsedLanguageString();
|
||||
extern "C" u8 fn_80054F30();
|
||||
extern "C" nw4r::ut::ResFont *lbl_805750D8;
|
||||
extern "C" u8 *SOME_GFX_THING;
|
||||
|
||||
sFPhaseBase::sFPhaseState dScBoot_c::cb1() {
|
||||
LayoutArcManager::sInstance->loadLayoutArcFromDisk("cursor", mHeap::g_archiveHeap);
|
||||
LayoutArcManager::sInstance->loadLayoutArcFromDisk("CursorStick", mHeap::g_archiveHeap);
|
||||
LayoutArcManager::sInstance->loadLayoutArcFromDisk("System2D", nullptr);
|
||||
LayoutArcManager::sInstance->loadLayoutArcFromDisk("saveBannerU", nullptr);
|
||||
|
||||
for (int i = 0; i < 6; i++) {
|
||||
SizedString<128> str;
|
||||
str.sprintf("%s/%s", getUsedLanguageString(), getEventFlowFileNameByIndex(i, 1));
|
||||
OarcManager::sInstance->loadObjectArcFromDisk(str, mHeap::g_archiveHeap);
|
||||
}
|
||||
OarcManager::sInstance->loadObjectArcFromDisk("System", mHeap::g_archiveHeap);
|
||||
return sFPhaseBase::PHASE_NEXT;
|
||||
}
|
||||
|
||||
sFPhaseBase::sFPhaseState dScBoot_c::cb2() {
|
||||
if (OarcManager::sInstance->ensureAllEntriesLoaded()) {
|
||||
return sFPhaseBase::PHASE_RETRY;
|
||||
}
|
||||
if (LayoutArcManager::sInstance->ensureAllEntriesLoaded()) {
|
||||
return sFPhaseBase::PHASE_RETRY;
|
||||
}
|
||||
|
||||
TPLPalette *tpl =
|
||||
static_cast<TPLPalette *>(LayoutArcManager::sInstance->getData("saveBannerU", "tmp/saveBanner.tpl"));
|
||||
TPLBind(tpl);
|
||||
|
||||
return sFPhaseBase::PHASE_NEXT;
|
||||
}
|
||||
|
||||
sFPhaseBase::sFPhaseState dScBoot_c::cb3() {
|
||||
return !dFontMng_c::create() ? sFPhaseBase::PHASE_RETRY : sFPhaseBase::PHASE_NEXT;
|
||||
}
|
||||
|
||||
sFPhaseBase::sFPhaseState dScBoot_c::cb4() {
|
||||
if (!fn_801967D0(getHBM())) {
|
||||
return sFPhaseBase::PHASE_RETRY;
|
||||
}
|
||||
dHeap::HBMHeap.heap->disableAllocation();
|
||||
return sFPhaseBase::PHASE_NEXT;
|
||||
}
|
||||
|
||||
u32 dScBoot_c::dvdCallback(void *data) {}
|
||||
|
||||
sFPhaseBase::sFPhaseState dScBoot_c::cb5() {
|
||||
if (mpDvdCallback == nullptr) {
|
||||
mpDvdCallback = mDvd_callback_c::createOrFail(&dvdCallback, nullptr);
|
||||
if (mpDvdCallback == nullptr) {
|
||||
return sFPhaseBase::PHASE_RETRY;
|
||||
}
|
||||
}
|
||||
if (mpDvdCallback->mStatus == 0) {
|
||||
return sFPhaseBase::PHASE_RETRY;
|
||||
} else {
|
||||
mpDvdCallback->do_delete();
|
||||
return sFPhaseBase::PHASE_NEXT;
|
||||
}
|
||||
}
|
||||
|
||||
sFPhaseBase::sFPhaseState dScBoot_c::cb6() {
|
||||
dDyl::initRelsArc();
|
||||
OarcManager::sInstance->loadObjectArcFromDisk("JpaCommon", dHeap::workExHeap.heap);
|
||||
LayoutArcManager::sInstance->loadLayoutArcFromDisk("Main2D", nullptr);
|
||||
LayoutArcManager::sInstance->loadLayoutArcFromDisk("DoButton", nullptr);
|
||||
LayoutArcManager::sInstance->loadLayoutArcFromDisk("MenuHelp", nullptr);
|
||||
u8 result = fn_80054F30();
|
||||
s32 gameOverType;
|
||||
if (result == 3) {
|
||||
gameOverType = 1;
|
||||
} else {
|
||||
gameOverType = result == 4 ? 2 : 0;
|
||||
}
|
||||
|
||||
if (gameOverType == 0) {
|
||||
LayoutArcManager::sInstance->loadLayoutArcFromDisk("gameOver_01", nullptr);
|
||||
} else if (gameOverType == 1) {
|
||||
LayoutArcManager::sInstance->loadLayoutArcFromDisk("gameOver_02", nullptr);
|
||||
} else {
|
||||
LayoutArcManager::sInstance->loadLayoutArcFromDisk("gameOver_03", nullptr);
|
||||
}
|
||||
|
||||
if (OarcManager::sInstance->checkIfObjectArcExistsOnDisk("ObjectPack")) {
|
||||
OarcManager::sInstance->loadObjectArcFromDisk("ObjectPack", mHeap::g_archiveHeap);
|
||||
} else {
|
||||
static const char *OBJECT_PACK_OARCS[] = {
|
||||
"Camera",
|
||||
"Common",
|
||||
"Alink",
|
||||
"PLCommonAnime",
|
||||
"PLCommonAnmSnd",
|
||||
"PLCompItem",
|
||||
"SwordGirl",
|
||||
"GrassA",
|
||||
"GrassB",
|
||||
"GrassC",
|
||||
"GrassD",
|
||||
"GrassE",
|
||||
"FlowerA00",
|
||||
"FlowerB00",
|
||||
"FlowerB01",
|
||||
"UI_Data",
|
||||
"GetBomb",
|
||||
"Zelda",
|
||||
"Zelda_face",
|
||||
"Zelda_handL",
|
||||
"Zelda_handR",
|
||||
"Zelda_hair",
|
||||
"Rival",
|
||||
"Bird_Link",
|
||||
"FX_WaterColumn",
|
||||
"GetBottleWater",
|
||||
"PutRupee",
|
||||
"GetRupee",
|
||||
"PutHeart",
|
||||
"GetHeart",
|
||||
"PutArrow",
|
||||
"GetArrow",
|
||||
"PutBombSet",
|
||||
"GetBombSet",
|
||||
"PutSeed",
|
||||
"GetSeed",
|
||||
"GetSozaiE",
|
||||
"GetSozaiI",
|
||||
"GetSozaiJ",
|
||||
"GetSozaiM",
|
||||
"PutFairy",
|
||||
"GetFairy",
|
||||
"GetBottleFairy",
|
||||
"TBoxNormalT",
|
||||
"TBoxSmallT",
|
||||
"TBoxBossT",
|
||||
"GoddessTBox",
|
||||
"FX_TBoxOpen",
|
||||
"InsectButterfly",
|
||||
"GetInsectButterfly",
|
||||
"FlowerHeart",
|
||||
"Tubo",
|
||||
"GetGenki",
|
||||
"PutHeartKakera",
|
||||
"GetHeartKakera",
|
||||
"GrassOcta",
|
||||
"Kanban",
|
||||
"KanbanTree",
|
||||
"SaveObjectA",
|
||||
"SaveObjectB",
|
||||
"SaveObjectC",
|
||||
"KibakoHang",
|
||||
"ShotMark",
|
||||
"GetBottleEmpty",
|
||||
"GoddessCube",
|
||||
"GetGuts",
|
||||
"PutGuts",
|
||||
"RockCarryMiddle",
|
||||
"RockCarrySmall",
|
||||
"RockRollB",
|
||||
"BRockWall00",
|
||||
"BRockWall",
|
||||
"BRockHole00",
|
||||
"Bee",
|
||||
"GetInsectBee",
|
||||
"MogumaMud",
|
||||
"FlowerBomb",
|
||||
"FenceBoko",
|
||||
"ShutterFencedAnim",
|
||||
"ShutterFenced00",
|
||||
"SwitchHit",
|
||||
"KanbanStone",
|
||||
"GetMap",
|
||||
"GetKeySmall",
|
||||
"PutKeySmall",
|
||||
"MoundShovel",
|
||||
"MudShovel",
|
||||
"HoleShovel",
|
||||
"WiiRemocon",
|
||||
"ShutterChain",
|
||||
"LockSmall",
|
||||
"GetBottleKinokoA",
|
||||
"GetBottleKinokoB",
|
||||
"DoorBoss",
|
||||
"SwitchWall",
|
||||
"Candle00",
|
||||
"SkyCmn",
|
||||
"Bc",
|
||||
};
|
||||
for (int i = 0; i < ARRAY_LENGTH(OBJECT_PACK_OARCS); i++) {
|
||||
OarcManager::sInstance->loadObjectArcFromDisk(OBJECT_PACK_OARCS[i], mHeap::g_archiveHeap);
|
||||
}
|
||||
}
|
||||
|
||||
// TODO we think this is a ResFont but
|
||||
// the offset is larger than ResFont...
|
||||
((u8 *)lbl_805750D8)[0x2C] = 1;
|
||||
field_0x5DF = 1;
|
||||
return sFPhaseBase::PHASE_NEXT;
|
||||
}
|
||||
|
||||
sFPhaseBase::sFPhaseState dScBoot_c::cb7() {
|
||||
if (!dDyl::destroy()) {
|
||||
return sFPhaseBase::PHASE_RETRY;
|
||||
}
|
||||
|
||||
static u16 profilesToLoad[] = {
|
||||
// ??? not sure what these correspond to
|
||||
0x278,
|
||||
0x279,
|
||||
0x1B0,
|
||||
0x1A9,
|
||||
};
|
||||
|
||||
bool allOk = true;
|
||||
for (int i = 0; i < ARRAY_LENGTH(profilesToLoad); i++) {
|
||||
if (!dDyl::isLinked(profilesToLoad[i]) && dDyl::tryLink(profilesToLoad[i]) != 1) {
|
||||
allOk = false;
|
||||
}
|
||||
}
|
||||
|
||||
if (!allOk) {
|
||||
return sFPhaseBase::PHASE_RETRY;
|
||||
}
|
||||
|
||||
if (OarcManager::sInstance->ensureAllEntriesLoaded()) {
|
||||
return sFPhaseBase::PHASE_RETRY;
|
||||
}
|
||||
|
||||
if (LayoutArcManager::sInstance->ensureAllEntriesLoaded()) {
|
||||
return sFPhaseBase::PHASE_RETRY;
|
||||
}
|
||||
|
||||
// TODO JParticle monkaS
|
||||
OarcManager::sInstance->getData("System", "dat/navi_table.dat");
|
||||
OarcManager::sInstance->getData("JpaCommon", "dat/Common.jpc");
|
||||
OarcManager::sInstance->getData("JpaCommon", "dat/Common.jpn");
|
||||
|
||||
return sFPhaseBase::PHASE_NEXT;
|
||||
}
|
||||
|
||||
sFPhaseBase::sFPhaseState dScBoot_c::cb8() {
|
||||
return sFPhaseBase::PHASE_NEXT;
|
||||
}
|
||||
|
||||
sFPhaseBase::sFPhaseState dScBoot_c::cb9() {
|
||||
dBase_c::createRoot(fProfile::MESSAGE, 0, dBase_c::OTHER);
|
||||
dBase_c::createRoot(fProfile::C_BASE, 0, dBase_c::OTHER);
|
||||
|
||||
dLytBattery_c::create();
|
||||
return sFPhaseBase::PHASE_NEXT;
|
||||
}
|
||||
|
||||
SPECIAL_BASE_PROFILE(BOOT, dScBoot_c, fProfile::BOOT, 0x2A7, 0);
|
||||
|
||||
STATE_DEFINE(dScBoot_c, Init);
|
||||
STATE_DEFINE(dScBoot_c, Strap);
|
||||
STATE_DEFINE(dScBoot_c, Connect);
|
||||
STATE_DEFINE(dScBoot_c, Save);
|
||||
|
||||
dScBoot_c::dScBoot_c() : mStateMgr(*this, sStateID::null) {}
|
||||
dScBoot_c::~dScBoot_c() {}
|
||||
dScBoot_c::strap_c::strap_c() {
|
||||
SizedString<8> str;
|
||||
u8 langNum = getUsedLanguageNTSCNum();
|
||||
mArcName.mChars[0] = '\0';
|
||||
mStr2.mChars[0] = '\0';
|
||||
mStr3.mChars[0] = '\0';
|
||||
if (langNum == 3) {
|
||||
str = "F";
|
||||
} else if (langNum == 4) {
|
||||
str = "S";
|
||||
} else {
|
||||
str = "U";
|
||||
}
|
||||
// UB: Cannot pass object of non-POD type 'SizedString<8>' through variadic method
|
||||
mArcName.sprintf("strap%s", str);
|
||||
mStr2.sprintf("strap_00_%s.brlyt", str);
|
||||
mStr3.sprintf("strap_00_%s_loop.brlan", str);
|
||||
LayoutArcManager::sInstance->loadLayoutArcFromDisk(mArcName, dHeap::work2Heap.heap);
|
||||
field_0x4EC = 0;
|
||||
}
|
||||
|
||||
bool dScBoot_c::strap_c::create() {
|
||||
if (!field_0x4EC) {
|
||||
if (LayoutArcManager::sInstance->ensureLoaded1(mArcName)) {
|
||||
return false;
|
||||
}
|
||||
void *data = LayoutArcManager::sInstance->getLoadedData(mArcName);
|
||||
// HACK: Why does this use the m2d attach function?
|
||||
// Inlines break instruction scheduling, and I don't
|
||||
// want to undo shadowing...
|
||||
((m2d::ResAccIf_c *)&mResAcc)->attach(data, "");
|
||||
mLyt.setResAcc(&mResAcc);
|
||||
mLyt.build(mStr2, nullptr);
|
||||
mAnm.doSomething(mStr3, &mResAcc);
|
||||
mLyt.bind(&mAnm);
|
||||
field_0x4EC = 1;
|
||||
field_0x4EE = 0;
|
||||
field_0x4F0 = 0;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool dScBoot_c::strap_c::remove() {
|
||||
mLyt.unbind(&mAnm);
|
||||
mAnm.destroySomething();
|
||||
// HACK: See above
|
||||
((m2d::ResAccIf_c *)&mResAcc)->detach();
|
||||
LayoutArcManager::sInstance->decrement(mArcName);
|
||||
return true;
|
||||
}
|
||||
|
||||
bool dScBoot_c::strap_c::execute() {
|
||||
// TODO Button mask
|
||||
if (field_0x4F0 == 0 && mPad::g_currentCore->downTrigger(0xF0F)) {
|
||||
field_0x4F0 = 1;
|
||||
}
|
||||
mAnm.play();
|
||||
mLyt.calc();
|
||||
if (field_0x4EE <= SC_BOOT_STRAP_MAX_DURATION) {
|
||||
field_0x4EE++;
|
||||
}
|
||||
if (!(field_0x4EE <= SC_BOOT_STRAP_MAX_DURATION) ||
|
||||
!(field_0x4EE <= SC_BOOT_STRAP_MIN_DURATION || field_0x4F0 == 0)) {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
void dScBoot_c::strap_c::draw() {
|
||||
mLyt.addToDrawList();
|
||||
}
|
||||
|
||||
void dScBoot_c::strap_c::init() {
|
||||
mAnm.setFrame(0.0f);
|
||||
mLyt.calc();
|
||||
field_0x4EE = 0;
|
||||
field_0x4F0 = 0;
|
||||
}
|
||||
|
||||
dScBoot_c::dScBoot_c() : mStateMgr(*this, sStateID::null), mPhases(this, sCallbacks), mpDvdCallback(nullptr) {
|
||||
field_0x5DF = 0;
|
||||
sInstance = this;
|
||||
field_0x5E1 = 0;
|
||||
field_0x5E2 = 0;
|
||||
field_0x5E3 = 0;
|
||||
field_0x5E4 = 0;
|
||||
}
|
||||
|
||||
dScBoot_c::~dScBoot_c() {
|
||||
fn_80197560(getHBM(), 0);
|
||||
sInstance = nullptr;
|
||||
}
|
||||
|
||||
int dScBoot_c::create() {
|
||||
if (!mStrapScreen.create()) {
|
||||
return NOT_READY;
|
||||
};
|
||||
|
||||
mFader.create();
|
||||
mFader.setFadeInFrame(1);
|
||||
// TODO
|
||||
dSys::setFrameRate(1);
|
||||
mStateMgr.changeState(StateID_Init);
|
||||
|
||||
return SUCCEEDED;
|
||||
}
|
||||
|
||||
int dScBoot_c::doDelete() {
|
||||
int removed = mStrapScreen.remove();
|
||||
sFPhaseBase::sFPhaseState phaseState = mPhases.step();
|
||||
if (!removed || phaseState != sFPhaseBase::PHASE_ALL_DONE) {
|
||||
return NOT_READY;
|
||||
}
|
||||
// TODO
|
||||
}
|
||||
|
||||
int dScBoot_c::execute() {
|
||||
mFader.calc();
|
||||
mStateMgr.executeState();
|
||||
sFPhaseBase::sFPhaseState state = executeLoadPhase();
|
||||
if (field_0x5DE == 0 && state == sFPhaseBase::PHASE_ALL_DONE) {
|
||||
field_0x5DE = 1;
|
||||
}
|
||||
|
||||
return SUCCEEDED;
|
||||
}
|
||||
|
||||
int dScBoot_c::draw() {
|
||||
if (field_0x5E1 == 1) {
|
||||
mStrapScreen.draw();
|
||||
}
|
||||
|
||||
return SUCCEEDED;
|
||||
}
|
||||
|
||||
void dScBoot_c::deleteReady() {
|
||||
// TODO
|
||||
}
|
||||
|
||||
void dScBoot_c::initializeState_Init() {
|
||||
field_0x5D4 = 0;
|
||||
field_0x5D8 = 0;
|
||||
field_0x5DC = 0;
|
||||
field_0x5DD = 0;
|
||||
field_0x5DE = 0;
|
||||
field_0x5E0 = 0;
|
||||
}
|
||||
|
||||
void dScBoot_c::executeState_Init() {
|
||||
mStateMgr.changeState(StateID_Strap);
|
||||
}
|
||||
|
||||
void dScBoot_c::initializeState_Init() {}
|
||||
void dScBoot_c::executeState_Init() {}
|
||||
void dScBoot_c::finalizeState_Init() {}
|
||||
void dScBoot_c::initializeState_Strap() {}
|
||||
void dScBoot_c::executeState_Strap() {}
|
||||
void dScBoot_c::finalizeState_Strap() {}
|
||||
void dScBoot_c::initializeState_Connect() {}
|
||||
void dScBoot_c::executeState_Connect() {}
|
||||
|
||||
void dScBoot_c::initializeState_Strap() {
|
||||
field_0x5D4 = 0;
|
||||
field_0x5E1 = 1;
|
||||
mFader.fadeIn();
|
||||
mFader.resetFrames();
|
||||
}
|
||||
|
||||
void dScBoot_c::executeState_Strap() {
|
||||
if (dScene_c::sFader.isStatus(mFaderBase_c::FADED_IN)) {
|
||||
switch (field_0x5D4) {
|
||||
case 0:
|
||||
if (!checkDone() && mFader.isNotStatus(mFaderBase_c::FADING_IN)) {
|
||||
field_0x5D4 = 1;
|
||||
}
|
||||
break;
|
||||
case 1:
|
||||
if (!checkDone()) {
|
||||
bool ok = mStrapScreen.execute();
|
||||
if (ReloadColorFader::GetInstance()->field_0x0C == 1) {
|
||||
ok = false;
|
||||
}
|
||||
|
||||
if (ok) {
|
||||
field_0x5DC = 1;
|
||||
if (mFader.fadeOut() == true) {
|
||||
field_0x5D4 = 2;
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
if (!checkDone() && mFader.isNotStatus(mFaderBase_c::FADING_OUT)) {
|
||||
if (mFader.fadeIn() == true) {
|
||||
field_0x5D4 = 3;
|
||||
field_0x5E1 = 0;
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 3:
|
||||
if (!checkDone() && mFader.isNotStatus(mFaderBase_c::FADING_IN)) {
|
||||
mStateMgr.changeState(StateID_Connect);
|
||||
}
|
||||
break;
|
||||
case 4:
|
||||
mFader.setStatus(mFaderBase_c::FADED_OUT);
|
||||
if (mFader.fadeIn() == true) {
|
||||
field_0x5E4 = 1;
|
||||
if (field_0x5DC != 0) {
|
||||
field_0x5E1 = 0;
|
||||
mStateMgr.changeState(StateID_Connect);
|
||||
} else {
|
||||
field_0x5D4 = 0;
|
||||
mStrapScreen.init();
|
||||
}
|
||||
fn_80197560(getHBM(), 0);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void dScBoot_c::finalizeState_Strap() {
|
||||
// TODO
|
||||
SOME_GFX_THING[9] = 1;
|
||||
}
|
||||
|
||||
void dScBoot_c::initializeState_Connect() {
|
||||
field_0x5D4 = 0;
|
||||
dSys::setFrameRate(2);
|
||||
}
|
||||
|
||||
void dScBoot_c::executeState_Connect() {
|
||||
// TODO
|
||||
}
|
||||
|
||||
void dScBoot_c::finalizeState_Connect() {}
|
||||
void dScBoot_c::initializeState_Save() {}
|
||||
void dScBoot_c::executeState_Save() {}
|
||||
|
||||
void dScBoot_c::initializeState_Save() {
|
||||
field_0x5D4 = 0;
|
||||
field_0x5D8 = 0;
|
||||
// TODO
|
||||
}
|
||||
|
||||
void dScBoot_c::executeState_Save() {
|
||||
// TODO
|
||||
}
|
||||
|
||||
void dScBoot_c::finalizeState_Save() {}
|
||||
|
||||
bool dScBoot_c::checkDone() {
|
||||
if (field_0x5E3 == 1) {
|
||||
field_0x5E3 = 0;
|
||||
field_0x5D4 = 4;
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
+2
-2
@@ -38,8 +38,8 @@ bool dFader_c::create() {
|
||||
|
||||
mFadeOutType = 0;
|
||||
mFadeInType = 0;
|
||||
field_0x20 = 0x1E;
|
||||
field_0x22 = 0x1E;
|
||||
mFadeInFrame = 0x1E;
|
||||
mFadeOutFrame = 0x1E;
|
||||
setFader(0);
|
||||
|
||||
return true;
|
||||
|
||||
@@ -0,0 +1,108 @@
|
||||
#include "d/d_scene.h"
|
||||
|
||||
#include "common.h"
|
||||
#include "d/d_base.h"
|
||||
#include "f/f_base.h"
|
||||
#include "f/f_profile_name.h"
|
||||
#include "m/m_fader_base.h"
|
||||
#include "toBeSorted/reload_color_fader.h"
|
||||
|
||||
static u16 RootActorID = fProfile::PROFILE_MAX;
|
||||
static u32 RootActorParams = 0;
|
||||
static bool gameStateIsActive = true;
|
||||
|
||||
extern "C" u32 lbl_80574FA0;
|
||||
extern "C" u32 lbl_80574FA4;
|
||||
extern "C" void fn_801942F0(int, int);
|
||||
extern "C" void fn_80066D30(int);
|
||||
|
||||
dFader_c dScene_c::sFader;
|
||||
|
||||
dScene_c::dScene_c() {
|
||||
lbl_80574FA0 = 0;
|
||||
lbl_80574FA4 = 0;
|
||||
setProcControlFlag(ROOT_DISABLE_DRAW | ROOT_DISABLE_EXECUTE);
|
||||
fn_801942F0(0, 0);
|
||||
}
|
||||
|
||||
void dScene_c::postCreate(MAIN_STATE_e state) {
|
||||
if (state == SUCCESS) {
|
||||
ReloadColorFader::GetInstance()->fn_80067ED0();
|
||||
}
|
||||
dBase_c::postCreate(state);
|
||||
}
|
||||
|
||||
void dScene_c::postDelete(MAIN_STATE_e state) {
|
||||
if (state == SUCCESS) {
|
||||
gameStateIsActive = false;
|
||||
ReloadColorFader::GetInstance()->fn_80067F50();
|
||||
}
|
||||
dBase_c::postDelete(state);
|
||||
}
|
||||
|
||||
int dScene_c::preExecute() {
|
||||
if (dBase_c::preExecute() == NOT_READY) {
|
||||
return NOT_READY;
|
||||
} else if (RootActorID != fProfile::PROFILE_MAX) {
|
||||
if (sFader.isStatus(mFaderBase_c::FADED_IN)) {
|
||||
sFader.fadeOut();
|
||||
} else if (sFader.isStatus(mFaderBase_c::FADED_OUT)) {
|
||||
deleteRequest();
|
||||
resetFlags();
|
||||
fn_80066D30(-1);
|
||||
}
|
||||
return NOT_READY;
|
||||
} else {
|
||||
if ((proc_control & ROOT_DISABLE_EXECUTE)) {
|
||||
if (!checkChildProcessCreateState()) {
|
||||
clearProcControlFlag(ROOT_DISABLE_EXECUTE);
|
||||
clearProcControlFlag(ROOT_DISABLE_DRAW);
|
||||
}
|
||||
return NOT_READY;
|
||||
}
|
||||
if (sFader.isStatus(mFaderBase_c::FADED_OUT)) {
|
||||
sFader.fadeIn();
|
||||
}
|
||||
return SUCCEEDED;
|
||||
}
|
||||
}
|
||||
|
||||
void dScene_c::postExecute(MAIN_STATE_e status) {
|
||||
if (status != CANCELED) {
|
||||
ReloadColorFader::GetInstance()->fn_80067F00();
|
||||
}
|
||||
dBase_c::postExecute(status);
|
||||
if (proc_control & ROOT_DISABLE_EXECUTE) {
|
||||
lbl_80574FA0++;
|
||||
lbl_80574FA4++;
|
||||
}
|
||||
}
|
||||
|
||||
void dScene_c::staticCreate() {
|
||||
RootActorID = fProfile::BOOT;
|
||||
RootActorParams = 0;
|
||||
gameStateIsActive = false;
|
||||
}
|
||||
|
||||
dBase_c *dScene_c::staticExecute() {
|
||||
if (gameStateIsActive || RootActorID == fProfile::PROFILE_MAX) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
dBase_c *base = dBase_c::createRoot(RootActorID, RootActorParams, SCENE);
|
||||
if (base != nullptr) {
|
||||
RootActorID = fProfile::PROFILE_MAX;
|
||||
gameStateIsActive = true;
|
||||
return base;
|
||||
}
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
void dScene_c::setRootActor(fProfile::PROFILE_NAME_e rootActor, u32 params, s32 fadeOutType, s32 fadeInType) {
|
||||
if (RootActorID != fProfile::PROFILE_MAX && rootActor != fProfile::TITLE) {
|
||||
return;
|
||||
}
|
||||
RootActorID = rootActor;
|
||||
RootActorParams = params;
|
||||
sFader.setTypes(fadeInType, fadeOutType);
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
#include "s/s_FPhase.h"
|
||||
|
||||
// Not present in NSMBW
|
||||
|
||||
sFPhaseBaseBase::~sFPhaseBaseBase() {}
|
||||
sFPhaseBase::~sFPhaseBase() {}
|
||||
|
||||
sFPhaseBase::sFPhaseState sFPhaseBase::step() {
|
||||
if (!isFinalized()) {
|
||||
mState = callPhase();
|
||||
if (mState == PHASE_NEXT) {
|
||||
nextPhase();
|
||||
if (hasReachedEnd()) {
|
||||
mState = PHASE_ALL_DONE;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return mState;
|
||||
}
|
||||
|
||||
void sFPhaseBase::reset() {
|
||||
onReset();
|
||||
mState = PHASE_INITIAL;
|
||||
}
|
||||
@@ -19,13 +19,14 @@ void CurrentStageArcManager::init(EGG::Heap *heap) {
|
||||
|
||||
bool CurrentStageArcManager::setStage(const char *newStage) {
|
||||
mStageName = newStage;
|
||||
|
||||
// UB: Cannot pass object of non-POD type 'SizedString<32>' through variadic method
|
||||
mCurrentLoadingStageArcName.sprintf("%s_stg_l0", mStageName);
|
||||
if (dRawArcEntry_c::checkArcExistsOnDisk(mCurrentLoadingStageArcName, getCurrentStageDirectory())) {
|
||||
return (bool)mArcTable.getArcOrLoadFromDisk(
|
||||
mCurrentLoadingStageArcName, getCurrentStageDirectory(), 0, dHeap::work2Heap.heap
|
||||
);
|
||||
} else {
|
||||
// UB: Cannot pass object of non-POD type 'SizedString<32>' through variadic method
|
||||
mCurrentLoadingStageArcName.sprintf("%s_stg", mStageName);
|
||||
return (bool)mArcTable.getArcOrLoadFromDisk(
|
||||
mCurrentLoadingStageArcName, getCurrentStageDirectory(), 0, dHeap::work2Heap.heap
|
||||
@@ -50,6 +51,7 @@ bool CurrentStageArcManager::loadFileFromExtraLayerArc(int layer) {
|
||||
return true;
|
||||
}
|
||||
|
||||
// UB: Cannot pass object of non-POD type 'SizedString<32>' through variadic method
|
||||
mStageExtraLayerArcName.sprintf("%s_stg_l%d", mStageName, layer);
|
||||
if (dRawArcEntry_c::checkArcExistsOnDisk(mStageExtraLayerArcName, getCurrentStageDirectory())) {
|
||||
return (bool
|
||||
@@ -108,6 +110,7 @@ const char *CurrentStageArcManager::getCurrentStageDirectory() {
|
||||
static SizedString<32> s_roomArcTmp;
|
||||
|
||||
const char *CurrentStageArcManager::getRoomArcDirectory(int room) const {
|
||||
// UB: Cannot pass object of non-POD type 'const SizedString<32>' through variadic method
|
||||
s_roomArcTmp.sprintf("%s_r%02d", mStageName, room);
|
||||
return s_roomArcTmp;
|
||||
}
|
||||
|
||||
@@ -24,8 +24,8 @@ bool LayoutArcManager::loadLayoutArcFromDisk(const char *object, EGG::Heap *heap
|
||||
return mArcTable.getArcOrLoadFromDisk(object, "Layout", 0, heap);
|
||||
}
|
||||
|
||||
void LayoutArcManager::ensureLoaded1(const char *object) {
|
||||
mArcTable.ensureLoadedMaybe2(object);
|
||||
int LayoutArcManager::ensureLoaded1(const char *object) {
|
||||
return mArcTable.ensureLoadedMaybe2(object);
|
||||
}
|
||||
|
||||
void LayoutArcManager::ensureLoaded2(const char *object) {
|
||||
|
||||
Reference in New Issue
Block a user