From d33830f4eb822a79c935ae750d3473de9e0f5b96 Mon Sep 17 00:00:00 2001 From: 2gifts Date: Fri, 25 Sep 2026 21:53:32 -0400 Subject: [PATCH 1/2] Match st_greenhill.cpp Co-Authored-By: Claude Opus 5.5 --- config/RSBE01_02/config.yml | 2 +- config/RSBE01_02/rels/st_greenhill/splits.txt | 7 + .../RSBE01_02/rels/st_greenhill/symbols.txt | 254 ++++++++------- configure.py | 4 +- include/st_greenhill/gr_greenhill.h | 84 +++++ include/st_greenhill/st_greenhill.h | 64 ++++ src/mo_stage/st_greenhill/st_greenhill.cpp | 305 ++++++++++++++++++ 7 files changed, 605 insertions(+), 115 deletions(-) create mode 100644 include/st_greenhill/gr_greenhill.h create mode 100644 include/st_greenhill/st_greenhill.h create mode 100644 src/mo_stage/st_greenhill/st_greenhill.cpp diff --git a/config/RSBE01_02/config.yml b/config/RSBE01_02/config.yml index 8fb15308c..91074dac7 100644 --- a/config/RSBE01_02/config.yml +++ b/config/RSBE01_02/config.yml @@ -371,7 +371,7 @@ modules: hash: 1b1bd2e86ff46d41bad1263cde6bb056fe0bd448 splits: config/RSBE01_02/rels/st_greenhill/splits.txt symbols: config/RSBE01_02/rels/st_greenhill/symbols.txt - force_active: [HomeBtnIcon] + force_active: [HomeBtnIcon, create__11stGreenhillFv] - object: files/module/st_pictchat.rel hash: 90899f1122cdf5c10f2aed3ad7718c094c59ebe3 splits: config/RSBE01_02/rels/st_pictchat/splits.txt diff --git a/config/RSBE01_02/rels/st_greenhill/splits.txt b/config/RSBE01_02/rels/st_greenhill/splits.txt index 2ec82a898..3fee86fa7 100644 --- a/config/RSBE01_02/rels/st_greenhill/splits.txt +++ b/config/RSBE01_02/rels/st_greenhill/splits.txt @@ -11,6 +11,13 @@ global_destructor_chain.c: .dtors start:0x00000000 end:0x00000008 .bss start:0x00000000 end:0x00000004 +mo_stage/st_greenhill/st_greenhill.cpp: + .text start:0x00000070 end:0x00001128 + .rodata start:0x00000000 end:0x00000038 + .data start:0x00000000 end:0x00000538 + .bss start:0x00000008 end:0x00000018 + .ctors start:0x00000000 end:0x00000004 + mo_stage/mo_stage.cpp: .text start:0x0000CD70 end:0x0000CE0C .data start:0x000046E0 end:0x000046ED diff --git a/config/RSBE01_02/rels/st_greenhill/symbols.txt b/config/RSBE01_02/rels/st_greenhill/symbols.txt index dc4c5c805..310ff8cc3 100644 --- a/config/RSBE01_02/rels/st_greenhill/symbols.txt +++ b/config/RSBE01_02/rels/st_greenhill/symbols.txt @@ -1,71 +1,71 @@ __register_global_object = .text:0x00000000; // type:function size:0x1C scope:global __destroy_global_chain = .text:0x0000001C; // type:function size:0x54 scope:global -fn_72_70 = .text:0x00000070; // type:function size:0x34 -fn_72_A4 = .text:0x000000A4; // type:function size:0xFC -fn_72_1A0 = .text:0x000001A0; // type:function size:0x6C -fn_72_20C = .text:0x0000020C; // type:function size:0x8 -fn_72_214 = .text:0x00000214; // type:function size:0x18C -fn_72_3A0 = .text:0x000003A0; // type:function size:0xC8 -fn_72_468 = .text:0x00000468; // type:function size:0x8 -fn_72_470 = .text:0x00000470; // type:function size:0x8 -fn_72_478 = .text:0x00000478; // type:function size:0x8 -fn_72_480 = .text:0x00000480; // type:function size:0x238 -fn_72_6B8 = .text:0x000006B8; // type:function size:0x8 -fn_72_6C0 = .text:0x000006C0; // type:function size:0x8 -fn_72_6C8 = .text:0x000006C8; // type:function size:0x8 -fn_72_6D0 = .text:0x000006D0; // type:function size:0xE0 -fn_72_7B0 = .text:0x000007B0; // type:function size:0x8 -fn_72_7B8 = .text:0x000007B8; // type:function size:0x8 -fn_72_7C0 = .text:0x000007C0; // type:function size:0x8 -fn_72_7C8 = .text:0x000007C8; // type:function size:0x328 -fn_72_AF0 = .text:0x00000AF0; // type:function size:0x8 -fn_72_AF8 = .text:0x00000AF8; // type:function size:0x8 -fn_72_B00 = .text:0x00000B00; // type:function size:0x9C -fn_72_B9C = .text:0x00000B9C; // type:function size:0x360 -fn_72_EFC = .text:0x00000EFC; // type:function size:0x4 -fn_72_F00 = .text:0x00000F00; // type:function size:0x8 -fn_72_F08 = .text:0x00000F08; // type:function size:0x8 -fn_72_F10 = .text:0x00000F10; // type:function size:0x8 -fn_72_F18 = .text:0x00000F18; // type:function size:0x8 -fn_72_F20 = .text:0x00000F20; // type:function size:0x8 -fn_72_F28 = .text:0x00000F28; // type:function size:0x4 -fn_72_F2C = .text:0x00000F2C; // type:function size:0x8 -fn_72_F34 = .text:0x00000F34; // type:function size:0x8 -fn_72_F3C = .text:0x00000F3C; // type:function size:0x8 -fn_72_F44 = .text:0x00000F44; // type:function size:0xC -fn_72_F50 = .text:0x00000F50; // type:function size:0xC -fn_72_F5C = .text:0x00000F5C; // type:function size:0x10 -fn_72_F6C = .text:0x00000F6C; // type:function size:0x14 -fn_72_F80 = .text:0x00000F80; // type:function size:0x8 -fn_72_F88 = .text:0x00000F88; // type:function size:0x8 -fn_72_F90 = .text:0x00000F90; // type:function size:0x8 -fn_72_F98 = .text:0x00000F98; // type:function size:0x8 -fn_72_FA0 = .text:0x00000FA0; // type:function size:0x8 -fn_72_FA8 = .text:0x00000FA8; // type:function size:0x4 -fn_72_FAC = .text:0x00000FAC; // type:function size:0x1C -fn_72_FC8 = .text:0x00000FC8; // type:function size:0x8 -fn_72_FD0 = .text:0x00000FD0; // type:function size:0x8 -fn_72_FD8 = .text:0x00000FD8; // type:function size:0x8 -fn_72_FE0 = .text:0x00000FE0; // type:function size:0x8 -fn_72_FE8 = .text:0x00000FE8; // type:function size:0xC -fn_72_FF4 = .text:0x00000FF4; // type:function size:0x4 -fn_72_FF8 = .text:0x00000FF8; // type:function size:0x8 -fn_72_1000 = .text:0x00001000; // type:function size:0x8 -fn_72_1008 = .text:0x00001008; // type:function size:0x8 -fn_72_1010 = .text:0x00001010; // type:function size:0x8 -fn_72_1018 = .text:0x00001018; // type:function size:0x64 -fn_72_107C = .text:0x0000107C; // type:function size:0x74 -fn_72_10F0 = .text:0x000010F0; // type:function size:0x34 -fn_72_1124 = .text:0x00001124; // type:function size:0x4 +create__11stGreenhillFv = .text:0x00000070; // type:function size:0x34 +__ct__11stGreenhillFv = .text:0x000000A4; // type:function size:0xFC +__dt__11stGreenhillFv = .text:0x000001A0; // type:function size:0x6C +loading__11stGreenhillFv = .text:0x0000020C; // type:function size:0x8 +createObj__11stGreenhillFv = .text:0x00000214; // type:function size:0x18C +createBackground__11stGreenhillFv = .text:0x000003A0; // type:function size:0xC8 +setStageData__6GroundFPv = .text:0x00000468; // type:function size:0x8 scope:weak +setPositions__13grGreenhillBgFP5Vec3f = .text:0x00000470; // type:function size:0x8 scope:weak +setState__13grGreenhillBgFPUc = .text:0x00000478; // type:function size:0x8 scope:weak +createBreaks__11stGreenhillFv = .text:0x00000480; // type:function size:0x238 +setIndex__16grGreenhillBreakFUc = .text:0x000006B8; // type:function size:0x8 scope:weak +setState__16grGreenhillBreakFPUc = .text:0x000006C0; // type:function size:0x8 scope:weak +setBackgroundState__16grGreenhillBreakFPUc = .text:0x000006C8; // type:function size:0x8 scope:weak +createMarker__11stGreenhillFv = .text:0x000006D0; // type:function size:0xE0 +setState__16grGreenhillCheckFPUc = .text:0x000007B0; // type:function size:0x8 scope:weak +setBreakStates__16grGreenhillCheckFPUc = .text:0x000007B8; // type:function size:0x8 scope:weak +setPositions__16grGreenhillCheckFP5Vec3f = .text:0x000007C0; // type:function size:0x8 scope:weak +createGuests__11stGreenhillFv = .text:0x000007C8; // type:function size:0x328 +setGuestData__16grGreenhillGuestFP18GreenhillGuestData = .text:0x00000AF0; // type:function size:0x8 scope:weak +setGuestData__20grGreenhillGuestLineFP18GreenhillGuestData = .text:0x00000AF8; // type:function size:0x8 scope:weak +update__11stGreenhillFf = .text:0x00000B00; // type:function size:0x9C +updateGuests__11stGreenhillFf = .text:0x00000B9C; // type:function size:0x360 +startFighterEvent__5StageFv = .text:0x00000EFC; // type:function size:0x4 scope:weak +initializeFighterAttackRatio__5StageFv = .text:0x00000F00; // type:function size:0x8 scope:weak +helperStarWarp__5StageFv = .text:0x00000F08; // type:function size:0x8 scope:weak +isSimpleBossBattleMode__5StageFv = .text:0x00000F10; // type:function size:0x8 scope:weak +isBossBattleMode__5StageFv = .text:0x00000F18; // type:function size:0x8 scope:weak +isCameraLocked__5StageFv = .text:0x00000F20; // type:function size:0x8 scope:weak +notifyTimmingGameStart__5StageFv = .text:0x00000F28; // type:function size:0x4 scope:weak +getFrameRuleTime__5StageFv = .text:0x00000F2C; // type:function size:0x8 scope:weak +setFrameRuleTime__5StageFf = .text:0x00000F34; // type:function size:0x8 scope:weak +isNextStepBgmEqualNowStepBgmFromFlag__5StageFv = .text:0x00000F3C; // type:function size:0x8 scope:weak +getBgmPlayOffsetFrame__5StageFv = .text:0x00000F44; // type:function size:0xC scope:weak +getBgmVolume__5StageFv = .text:0x00000F50; // type:function size:0xC scope:weak +setBgmChange__5StageFfbUl = .text:0x00000F5C; // type:function size:0x10 scope:weak +getBgmChangeID__5StageFPUlPf = .text:0x00000F6C; // type:function size:0x14 scope:weak +isBgmChange__5StageFv = .text:0x00000F80; // type:function size:0x8 scope:weak +getBgmOptionID__5StageFv = .text:0x00000F88; // type:function size:0x8 scope:weak +getNowStepBgmID__5StageFv = .text:0x00000F90; // type:function size:0x8 scope:weak +getBgmID__5StageFv = .text:0x00000F98; // type:function size:0x8 scope:weak +getBgmID__5StageCFv = .text:0x00000FA0; // type:function size:0x8 scope:weak +appearanceFighterLocal__5StageFv = .text:0x00000FA8; // type:function size:0x4 scope:weak +getScrollDir__5StageFP5Vec3f = .text:0x00000FAC; // type:function size:0x1C scope:weak +getDefaultLightSetIndex__5StageFv = .text:0x00000FC8; // type:function size:0x8 scope:weak +getAIRange__5StageFv = .text:0x00000FD0; // type:function size:0x8 scope:weak +isAdventureStage__5StageFv = .text:0x00000FD8; // type:function size:0x8 scope:weak +getPokeTrainerDrawLayer__5StageFv = .text:0x00000FE0; // type:function size:0x8 scope:weak +getPokeTrainerPositionZ__5StageFv = .text:0x00000FE8; // type:function size:0xC scope:weak +getPokeTrainerPointData__5StageFPii = .text:0x00000FF4; // type:function size:0x4 scope:weak +getPokeTrainerPointNum__5StageFv = .text:0x00000FF8; // type:function size:0x8 scope:weak +isReStartSamePoint__7stMeleeFv = .text:0x00001000; // type:function size:0x8 scope:weak +getWind2ndOnlyData__7stMeleeFv = .text:0x00001008; // type:function size:0x8 scope:weak +isBamperVector__11stGreenhillFv = .text:0x00001010; // type:function size:0x8 scope:weak +__sinit_\st_greenhill_cpp = .text:0x00001018; // type:function size:0x64 scope:local +__dt__33stClassInfoImpl<35,11stGreenhill>Fv = .text:0x0000107C; // type:function size:0x74 scope:weak +create__33stClassInfoImpl<35,11stGreenhill>Fv = .text:0x000010F0; // type:function size:0x34 scope:weak +preload__33stClassInfoImpl<35,11stGreenhill>Fv = .text:0x00001124; // type:function size:0x4 scope:weak fn_72_1128 = .text:0x00001128; // type:function size:0x8 fn_72_1130 = .text:0x00001130; // type:function size:0x64 fn_72_1194 = .text:0x00001194; // type:function size:0x58 -fn_72_11EC = .text:0x000011EC; // type:function size:0x118 +create__13grGreenhillBgFiPCcPCc = .text:0x000011EC; // type:function size:0x118 fn_72_1304 = .text:0x00001304; // type:function size:0x5C fn_72_1360 = .text:0x00001360; // type:function size:0xD0 fn_72_1430 = .text:0x00001430; // type:function size:0x74 -fn_72_14A4 = .text:0x000014A4; // type:function size:0x1D0 -fn_72_1674 = .text:0x00001674; // type:function size:0x3CC +updateCollision__13grGreenhillBgFf = .text:0x000014A4; // type:function size:0x1D0 +updateFlowers__13grGreenhillBgFf = .text:0x00001674; // type:function size:0x3CC fn_72_1A40 = .text:0x00001A40; // type:function size:0x8 fn_72_1A48 = .text:0x00001A48; // type:function size:0x8 fn_72_1A50 = .text:0x00001A50; // type:function size:0x4 @@ -80,19 +80,19 @@ fn_72_1A98 = .text:0x00001A98; // type:function size:0x1C fn_72_1AB4 = .text:0x00001AB4; // type:function size:0x8 fn_72_1ABC = .text:0x00001ABC; // type:function size:0x8 fn_72_1AC4 = .text:0x00001AC4; // type:function size:0x8 -fn_72_1ACC = .text:0x00001ACC; // type:function size:0xA8 +create__16grGreenhillCheckFiPCcPCc = .text:0x00001ACC; // type:function size:0xA8 fn_72_1B74 = .text:0x00001B74; // type:function size:0x100 fn_72_1C74 = .text:0x00001C74; // type:function size:0xF0 fn_72_1D64 = .text:0x00001D64; // type:function size:0x8C -fn_72_1DF0 = .text:0x00001DF0; // type:function size:0x58 -fn_72_1E48 = .text:0x00001E48; // type:function size:0x870 -fn_72_26B8 = .text:0x000026B8; // type:function size:0xBC -fn_72_2774 = .text:0x00002774; // type:function size:0x7C8 +updateYakumono__16grGreenhillCheckFf = .text:0x00001DF0; // type:function size:0x58 +updateMotion__16grGreenhillCheckFf = .text:0x00001E48; // type:function size:0x870 +updateCallback__16grGreenhillCheckFf = .text:0x000026B8; // type:function size:0xBC +createYakumono__16grGreenhillCheckFv = .text:0x00002774; // type:function size:0x7C8 fn_72_2F3C = .text:0x00002F3C; // type:function size:0x40 fn_72_2F7C = .text:0x00002F7C; // type:function size:0x40 -fn_72_2FBC = .text:0x00002FBC; // type:function size:0x19C -fn_72_3158 = .text:0x00003158; // type:function size:0x158 -fn_72_32B0 = .text:0x000032B0; // type:function size:0x448 +createAttack__16grGreenhillCheckFv = .text:0x00002FBC; // type:function size:0x19C +setMaterialColor__16grGreenhillCheckFi = .text:0x00003158; // type:function size:0x158 +setMotion__16grGreenhillCheckFUlbbPf = .text:0x000032B0; // type:function size:0x448 fn_72_36F8 = .text:0x000036F8; // type:function size:0x98 fn_72_3790 = .text:0x00003790; // type:function size:0x23C fn_72_39CC = .text:0x000039CC; // type:function size:0x23C @@ -393,18 +393,18 @@ fn_72_9D34 = .text:0x00009D34; // type:function size:0x8 fn_72_9D3C = .text:0x00009D3C; // type:function size:0x8 fn_72_9D44 = .text:0x00009D44; // type:function size:0x8 fn_72_9D4C = .text:0x00009D4C; // type:function size:0x8 -fn_72_9D54 = .text:0x00009D54; // type:function size:0xA8 +create__16grGreenhillBreakFiPCcPCc = .text:0x00009D54; // type:function size:0xA8 fn_72_9DFC = .text:0x00009DFC; // type:function size:0x160 fn_72_9F5C = .text:0x00009F5C; // type:function size:0xF0 fn_72_A04C = .text:0x0000A04C; // type:function size:0x8C -fn_72_A0D8 = .text:0x0000A0D8; // type:function size:0x9C -fn_72_A174 = .text:0x0000A174; // type:function size:0x240 -fn_72_A3B4 = .text:0x0000A3B4; // type:function size:0x564 +updateCollision__16grGreenhillBreakFf = .text:0x0000A0D8; // type:function size:0x9C +updateCallback__16grGreenhillBreakFf = .text:0x0000A174; // type:function size:0x240 +updateBreak__16grGreenhillBreakFf = .text:0x0000A3B4; // type:function size:0x564 fn_72_A918 = .text:0x0000A918; // type:function size:0xB8 -fn_72_A9D0 = .text:0x0000A9D0; // type:function size:0xA14 -fn_72_B3E4 = .text:0x0000B3E4; // type:function size:0x80 -fn_72_B464 = .text:0x0000B464; // type:function size:0x2B0 -fn_72_B714 = .text:0x0000B714; // type:function size:0x448 +createYakumono__16grGreenhillBreakFv = .text:0x0000A9D0; // type:function size:0xA14 +createAttack__16grGreenhillBreakFv = .text:0x0000B3E4; // type:function size:0x80 +createAttack__16grGreenhillBreakFi = .text:0x0000B464; // type:function size:0x2B0 +setMotion__16grGreenhillBreakFUlbbPf = .text:0x0000B714; // type:function size:0x448 fn_72_BB5C = .text:0x0000BB5C; // type:function size:0xFC fn_72_BC58 = .text:0x0000BC58; // type:function size:0x15C fn_72_BDB4 = .text:0x0000BDB4; // type:function size:0x68 @@ -444,18 +444,18 @@ fn_72_C04C = .text:0x0000C04C; // type:function size:0x8 fn_72_C054 = .text:0x0000C054; // type:function size:0x8 fn_72_C05C = .text:0x0000C05C; // type:function size:0x8 fn_72_C064 = .text:0x0000C064; // type:function size:0x8 -fn_72_C06C = .text:0x0000C06C; // type:function size:0x100 +create__16grGreenhillGuestFiPCcPCc = .text:0x0000C06C; // type:function size:0x100 fn_72_C16C = .text:0x0000C16C; // type:function size:0x68 fn_72_C1D4 = .text:0x0000C1D4; // type:function size:0x74 -fn_72_C248 = .text:0x0000C248; // type:function size:0x1C8 -fn_72_C410 = .text:0x0000C410; // type:function size:0x1BC -fn_72_C5CC = .text:0x0000C5CC; // type:function size:0xD0 +updateMotion__16grGreenhillGuestFf = .text:0x0000C248; // type:function size:0x1C8 +updateCallback__16grGreenhillGuestFf = .text:0x0000C410; // type:function size:0x1BC +create__20grGreenhillGuestLineFiPCcPCc = .text:0x0000C5CC; // type:function size:0xD0 fn_72_C69C = .text:0x0000C69C; // type:function size:0x58 fn_72_C6F4 = .text:0x0000C6F4; // type:function size:0x58 fn_72_C74C = .text:0x0000C74C; // type:function size:0x5C -fn_72_C7A8 = .text:0x0000C7A8; // type:function size:0x12C +updateMotion__20grGreenhillGuestLineFf = .text:0x0000C7A8; // type:function size:0x12C fn_72_C8D4 = .text:0x0000C8D4; // type:function size:0x54 -fn_72_C928 = .text:0x0000C928; // type:function size:0x448 +setMotion__20grGreenhillGuestLineFUlbbPf = .text:0x0000C928; // type:function size:0x448 _prolog = .text:0x0000CD70; // type:function size:0x48 scope:global _epilog = .text:0x0000CDB8; // type:function size:0x48 scope:global _unresolved = .text:0x0000CE00; // type:function size:0xC scope:global @@ -463,8 +463,20 @@ _ctors = .ctors:0x00000000; // type:label scope:global data:4byte _dtors = .dtors:0x00000000; // type:label scope:global data:4byte __destroy_global_chain_reference = .dtors:0x00000000; // type:object size:0x4 scope:global __destroy_global_chain_reference = .dtors:0x00000004; // type:object size:0x4 scope:global -lbl_72_rodata_0 = .rodata:0x00000000; // type:object size:0x4 data:float -lbl_72_rodata_4 = .rodata:0x00000004; // type:object size:0x34 align:4 data:float +@11989 = .rodata:0x00000000; // type:object size:0x4 data:float scope:local +@11990 = .rodata:0x00000004; // type:object size:0x4 align:4 data:float scope:local +@12087 = .rodata:0x00000008; // type:object size:0x4 scope:local +@12088 = .rodata:0x0000000C; // type:object size:0x4 scope:local +@12089 = .rodata:0x00000010; // type:object size:0x4 scope:local +@12090 = .rodata:0x00000014; // type:object size:0x4 scope:local +@12131 = .rodata:0x00000018; // type:object size:0x4 scope:local +@12132 = .rodata:0x0000001C; // type:object size:0x4 scope:local +@12133 = .rodata:0x00000020; // type:object size:0x4 scope:local +@12134 = .rodata:0x00000024; // type:object size:0x4 scope:local +@12135 = .rodata:0x00000028; // type:object size:0x4 scope:local +@12136 = .rodata:0x0000002C; // type:object size:0x4 scope:local +@12137 = .rodata:0x00000030; // type:object size:0x4 scope:local +@12138 = .rodata:0x00000034; // type:object size:0x4 scope:local lbl_72_rodata_38 = .rodata:0x00000038; // type:object size:0x8 align:4 data:float lbl_72_rodata_40 = .rodata:0x00000040; // type:object size:0x4 align:4 data:float lbl_72_rodata_44 = .rodata:0x00000044; // type:object size:0x4 align:4 data:float @@ -481,33 +493,49 @@ lbl_72_rodata_E4 = .rodata:0x000000E4; // type:object size:0x4 align:4 data:floa lbl_72_rodata_E8 = .rodata:0x000000E8; // type:object size:0x4 align:4 data:float lbl_72_rodata_EC = .rodata:0x000000EC; // type:object size:0x4 align:4 data:float lbl_72_rodata_F0 = .rodata:0x000000F0; // type:object size:0x8 align:8 data:double -lbl_72_data_0 = .data:0x00000000; // type:object size:0xC data:string -lbl_72_data_C = .data:0x0000000C; // type:object size:0xE data:string -lbl_72_data_1C = .data:0x0000001C; // type:object size:0x11 data:string -lbl_72_data_30 = .data:0x00000030; // type:object size:0x98 -lbl_72_data_C8 = .data:0x000000C8; // type:object size:0x13 data:string -lbl_72_data_DC = .data:0x000000DC; // type:object size:0xFC -lbl_72_data_1D8 = .data:0x000001D8; // type:object size:0x230 -lbl_72_data_408 = .data:0x00000408; // type:object size:0xC data:string -lbl_72_data_414 = .data:0x00000414; // type:object size:0x24 -lbl_72_data_438 = .data:0x00000438; // type:object size:0x8 -lbl_72_data_440 = .data:0x00000440; // type:object size:0x8 data:string -lbl_72_data_448 = .data:0x00000448; // type:object size:0x20 -lbl_72_data_468 = .data:0x00000468; // type:object size:0x8 -lbl_72_data_470 = .data:0x00000470; // type:object size:0x10 data:string -lbl_72_data_480 = .data:0x00000480; // type:object size:0x18 -lbl_72_data_498 = .data:0x00000498; // type:object size:0x8 -lbl_72_data_4A0 = .data:0x000004A0; // type:object size:0x6 data:string -lbl_72_data_4A8 = .data:0x000004A8; // type:object size:0x10 -lbl_72_data_4B8 = .data:0x000004B8; // type:object size:0x8 -lbl_72_data_4C0 = .data:0x000004C0; // type:object size:0x7 data:string -lbl_72_data_4C8 = .data:0x000004C8; // type:object size:0x8 -lbl_72_data_4D0 = .data:0x000004D0; // type:object size:0x14 -lbl_72_data_4E4 = .data:0x000004E4; // type:object size:0x21 data:string -lbl_72_data_508 = .data:0x00000508; // type:object size:0x10 -lbl_72_data_518 = .data:0x00000518; // type:object size:0x8 -lbl_72_data_520 = .data:0x00000520; // type:object size:0xC data:string -lbl_72_data_530 = .data:0x00000530; // type:object size:0x8 +@11988 = .data:0x00000000; // type:object size:0xC data:string scope:local +@12007 = .data:0x0000000C; // type:object size:0xE data:string scope:local +@12011 = .data:0x0000001C; // type:object size:0x11 data:string scope:local +@12012 = .data:0x00000030; // type:object size:0x12 scope:local +@12031 = .data:0x00000044; // type:object size:0x17 scope:local +@12032 = .data:0x0000005C; // type:object size:0x13 scope:local +@12033 = .data:0x00000070; // type:object size:0x17 scope:local +@12034 = .data:0x00000088; // type:object size:0x13 scope:local +@12035 = .data:0x0000009C; // type:object size:0x17 scope:local +@12036 = .data:0x000000B4; // type:object size:0x13 scope:local +@12048 = .data:0x000000C8; // type:object size:0x13 data:string scope:local +@12049 = .data:0x000000DC; // type:object size:0x12 scope:local +@12067 = .data:0x000000F0; // type:object size:0x1A scope:local +@12068 = .data:0x0000010C; // type:object size:0x14 scope:local +@12069 = .data:0x00000120; // type:object size:0x18 scope:local +@12070 = .data:0x00000138; // type:object size:0x12 scope:local +@12071 = .data:0x0000014C; // type:object size:0x17 scope:local +@12072 = .data:0x00000164; // type:object size:0x11 scope:local +@12073 = .data:0x00000178; // type:object size:0x18 scope:local +@12074 = .data:0x00000190; // type:object size:0x16 scope:local +@12075 = .data:0x000001A8; // type:object size:0x16 scope:local +@12076 = .data:0x000001C0; // type:object size:0x16 scope:local +__vt__11stGreenhill = .data:0x000001D8; // type:object size:0x230 +@11612 = .data:0x00000408; // type:object size:0xC data:string scope:local +@11613 = .data:0x00000414; // type:object size:0x24 scope:local +__RTTI__11stGreenhill = .data:0x00000438; // type:object size:0x8 scope:weak +@11614 = .data:0x00000440; // type:object size:0x8 data:string scope:local +@11615 = .data:0x00000448; // type:object size:0x1C scope:local +__RTTI__7stMelee = .data:0x00000468; // type:object size:0x8 scope:weak +@11616 = .data:0x00000470; // type:object size:0x10 data:string scope:local +@11617 = .data:0x00000480; // type:object size:0x14 scope:local +__RTTI__15stCommonGimmick = .data:0x00000498; // type:object size:0x8 scope:weak +@11618 = .data:0x000004A0; // type:object size:0x6 data:string scope:local +@11619 = .data:0x000004A8; // type:object size:0xC scope:local +__RTTI__5Stage = .data:0x000004B8; // type:object size:0x8 scope:weak +@11677 = .data:0x000004C0; // type:object size:0x7 data:string scope:local +__RTTI__6gfTask = .data:0x000004C8; // type:object size:0x8 scope:weak +__vt__33stClassInfoImpl<35,11stGreenhill> = .data:0x000004D0; // type:object size:0x14 scope:weak +@11867 = .data:0x000004E4; // type:object size:0x21 data:string scope:local +@11868 = .data:0x00000508; // type:object size:0xC scope:local +__RTTI__33stClassInfoImpl<35,11stGreenhill> = .data:0x00000518; // type:object size:0x8 scope:weak +@11869 = .data:0x00000520; // type:object size:0xC data:string scope:local +__RTTI__11stClassInfo = .data:0x00000530; // type:object size:0x8 scope:weak lbl_72_data_538 = .data:0x00000538; // type:object size:0x90 lbl_72_data_5C8 = .data:0x000005C8; // type:object size:0x1D8 lbl_72_data_7A0 = .data:0x000007A0; // type:object size:0xE data:string @@ -732,8 +760,8 @@ lbl_72_data_46D8 = .data:0x000046D8; // type:object size:0x8 lbl_72_data_46E0 = .data:0x000046E0; // type:object size:0xD scope:local align:4 data:string HomeBtnIcon = .data:0x00004700; // type:object size:0x18C0 scope:global align:32 __global_destructor_chain = .bss:0x00000000; // type:object size:0x4 scope:global -lbl_72_bss_8 = .bss:0x00000008; // type:object size:0xC -lbl_72_bss_14 = .bss:0x00000014; // type:object size:0x4 data:4byte +@11438 = .bss:0x00000008; // type:object size:0xC scope:local +bss_loc_14__11stGreenhill = .bss:0x00000014; // type:object size:0x4 data:4byte lbl_72_bss_18 = .bss:0x00000018; // type:object size:0xC lbl_72_bss_24 = .bss:0x00000024; // type:object size:0xC lbl_72_bss_30 = .bss:0x00000030; // type:object size:0xC diff --git a/configure.py b/configure.py index d44984a5b..c13ca9f8a 100755 --- a/configure.py +++ b/configure.py @@ -1203,7 +1203,9 @@ def MatchingFor(*versions): "mw_version": config.linker_version, "cflags": cflags_rel, "host": False, - "objects": [], + "objects": [ + Object(Matching, "mo_stage/st_greenhill/st_greenhill.cpp"), + ], }, { "lib": "st_gw", diff --git a/include/st_greenhill/gr_greenhill.h b/include/st_greenhill/gr_greenhill.h new file mode 100644 index 000000000..725248f3f --- /dev/null +++ b/include/st_greenhill/gr_greenhill.h @@ -0,0 +1,84 @@ +#pragma once + +#include + +struct GreenhillGuestData; + +class grGreenhill : public grYakumono { +protected: + u8 unk150; + float unk154; +}; +static_assert(sizeof(grGreenhill) == 0x158, "Class is wrong size!"); + +class grGreenhillBg : public grGreenhill { + Vec3f* unk158; + u8* unk15C; + +public: + static grGreenhillBg* create(int mdlIndex, const char* nodeName, const char* taskName); // Name unknown + virtual void updateCollision(float deltaFrame); // Name unknown + virtual void updateFlowers(float deltaFrame); // Name unknown + virtual void setPositions(Vec3f* positions) { unk158 = positions; } // Name unknown + virtual void setState(u8* state) { unk15C = state; } // Name unknown +}; + +class grGreenhillBreak : public grGreenhill { + u8 unk158[0xC]; + u8* unk164; + u8* unk168; + u8 unk16C; + +public: + static grGreenhillBreak* create(int mdlIndex, const char* nodeName, const char* taskName); // Name unknown + virtual void updateCollision(float deltaFrame); // Name unknown + virtual void updateCallback(float deltaFrame); // Name unknown + virtual void updateBreak(float deltaFrame); // Name unknown + virtual void createYakumono(); // Name unknown + virtual void createAttack(); // Name unknown + virtual void createAttack(int index); // Name unknown + virtual void setMotion(u32 index, bool loop, bool force, float* frameCount); // Name unknown + virtual void setState(u8* state) { unk164 = state; } // Name unknown + virtual void setIndex(u8 index) { unk16C = index; } // Name unknown + virtual void setBackgroundState(u8* state) { unk168 = state; } // Name unknown +}; + +class grGreenhillCheck : public grGreenhill { + u8 unk158[4]; + u8* unk15C; + u8* unk160; + Vec3f* unk164; + +public: + static grGreenhillCheck* create(int mdlIndex, const char* nodeName, const char* taskName); // Name unknown + virtual void updateYakumono(float deltaFrame); // Name unknown + virtual void updateMotion(float deltaFrame); // Name unknown + virtual void updateCallback(float deltaFrame); // Name unknown + virtual void createYakumono(); // Name unknown + virtual void createAttack(); // Name unknown + virtual void setMaterialColor(int state); // Name unknown + virtual void setMotion(u32 index, bool loop, bool force, float* frameCount); // Name unknown + virtual void setPositions(Vec3f* positions) { unk164 = positions; } // Name unknown + virtual void setState(u8* state) { unk15C = state; } // Name unknown + virtual void setBreakStates(u8* states) { unk160 = states; } // Name unknown +}; + +class grGreenhillGuest : public grGreenhill { + GreenhillGuestData* unk158; + +public: + static grGreenhillGuest* create(int mdlIndex, const char* nodeName, const char* taskName); // Name unknown + virtual void updateMotion(float deltaFrame); // Name unknown + virtual void updateCallback(float deltaFrame); // Name unknown + virtual void setGuestData(GreenhillGuestData* data) { unk158 = data; } // Name unknown +}; + +class grGreenhillGuestLine : public grGreenhill { + GreenhillGuestData* unk158; + +public: + static grGreenhillGuestLine* create(int mdlIndex, const char* nodeName, const char* taskName); // Name unknown + virtual void updateMotion(float deltaFrame); // Name unknown + virtual void setMotion(u32 index, bool loop, bool force, float* frameCount); // Name unknown + virtual void setGuestData(GreenhillGuestData* data) { unk158 = data; } // Name unknown +}; diff --git a/include/st_greenhill/st_greenhill.h b/include/st_greenhill/st_greenhill.h new file mode 100644 index 000000000..900d9ff5a --- /dev/null +++ b/include/st_greenhill/st_greenhill.h @@ -0,0 +1,64 @@ +#pragma once + +#include +#include +#include + +struct GreenhillGuestData { // Name unknown + u8 unk00; + u8 unk01; + Matrix unk04; + float unk34; + + GreenhillGuestData() : unk04(true) { } +}; +static_assert(sizeof(GreenhillGuestData) == 0x38, "Class is wrong size!"); + +template +class stClassInfoImpl : public stClassInfo { +public: + stClassInfoImpl() : stClassInfo() { + setClassInfo(Stages::GreenHill, this); + } + + virtual ~stClassInfoImpl() { + setClassInfo(Stages::GreenHill, nullptr); + } + + virtual T* create() { + return T::create(); + } + + virtual void preload() { } +}; + +class stGreenhill : public stMelee { + u8 unk1D8[3]; + u8 unk1DB; + u8 unk1DC; + u8 unk1DD; + u8 unk1DE; + float unk1E0; + u8 unk1E4; + u8 unk1E5[3]; + GreenhillGuestData unk1E8[3]; + Vec3f unk290[4]; + u8 unk2C0; + +public: + stGreenhill(); + virtual ~stGreenhill(); + virtual bool loading(); + virtual void createObj(); + virtual void update(float deltaFrame); + virtual bool isBamperVector() { return true; } + virtual void createBackground(); // Name unknown + virtual void createBreaks(); // Name unknown + virtual void createMarker(); // Name unknown + virtual void createGuests(); // Name unknown + virtual void updateGuests(float deltaFrame); // Name unknown + + static stGreenhill* create(); + static stClassInfoImpl bss_loc_14; +}; +static_assert(sizeof(stGreenhill) == 0x2C4, "Class is wrong size!"); diff --git a/src/mo_stage/st_greenhill/st_greenhill.cpp b/src/mo_stage/st_greenhill/st_greenhill.cpp new file mode 100644 index 000000000..545b7d2c7 --- /dev/null +++ b/src/mo_stage/st_greenhill/st_greenhill.cpp @@ -0,0 +1,305 @@ +#include +#include +#include +#include +#include +#include + +#include + +enum GuestEventState { + GuestEvent_Initialize, + GuestEvent_Wait, + GuestEvent_WaitForSingle, + GuestEvent_SelectOrder, + GuestEvent_DispatchOrder, + GuestEvent_ResetDelay +}; + +enum GuestState { + Guest_Start = 3, + Guest_Inactive = 5 +}; + +stClassInfoImpl stGreenhill::bss_loc_14; + +stGreenhill* stGreenhill::create() { + return new (Heaps::StageInstance) stGreenhill; +} + +stGreenhill::stGreenhill() : stMelee("stGreenhill", Stages::GreenHill) { + unk1D8[0] = 5; + unk1D8[1] = 5; + unk1D8[2] = 5; + unk1DB = 0; + unk1DC = 0; + unk1DD = 0; + unk1DE = GuestEvent_Initialize; + unk1E0 = 0.0f; + unk1E4 = 0; + memset(unk1E5, 0, sizeof(unk1E5)); + for (u8 i = 0; i < 3; i++) { + unk1E8[i].unk00 = Guest_Inactive; + unk1E8[i].unk01 = 3; + unk1E8[i].unk04.setIdentity(); + unk1E8[i].unk34 = 1.0f; + } + unk2C0 = 5; + memset(unk290, 0, sizeof(unk290)); +} + +stGreenhill::~stGreenhill() { + releaseArchive(); +} + +bool stGreenhill::loading() { + return true; +} + +void stGreenhill::createObj() { + testStageParamInit(m_fileData, 10); + testStageDataInit(m_fileData, 20, 80); + createBackground(); + createBreaks(); + createMarker(); + createGuests(); + createCollision(m_fileData, 2, nullptr); + initCameraParam(); + nw4r::g3d::ResFile posData(m_fileData->getData(Data_Type_Model, 100, 0xFFFE)); + if (posData.ptr()) { + nw4r::g3d::ResFile copyPosData = posData; + createStagePositions(©PosData); + } else { + createStagePositions(); + } + createWind2ndOnly(); + loadStageAttrParam(m_fileData, 30); + registScnAnim(static_cast(m_fileData->getData(Data_Type_Scene, 0, 0xFFFE)), 0); + initPosPokeTrainer(1, 0); + createObjPokeTrainer(m_fileData, 101, "PokeTrainer00", m_pokeTrainerPos, nullptr); +} + +void stGreenhill::createBackground() { + grGreenhillBg* ground = grGreenhillBg::create(1, "StgGreenhillMain", "grGreenhillMainBg"); + if (ground) { + addGround(ground); + ground->startup(m_fileData, 0, gfSceneRoot::Layer_Ground); + ground->setStageData(m_stageData); + ground->setPositions(unk290); + ground->setState(&unk1DB); + } +} + +void stGreenhill::createBreaks() { + grGreenhillBreak* ground = grGreenhillBreak::create(2, "StgGreenhillBrk_gake01", "grGreenhillBreak01"); + if (!ground) { + return; + } + addGround(ground); + ground->setIndex(0); + ground->startup(m_fileData, 0, gfSceneRoot::Layer_Ground); + ground->setStageData(m_stageData); + ground->setState(&unk1D8[0]); + ground->setBackgroundState(&unk1DB); + ground = grGreenhillBreak::create(3, "StgGreenhillBrk_gake02", "grGreenhillBreak02"); + if (!ground) { + return; + } + addGround(ground); + ground->setIndex(1); + ground->startup(m_fileData, 0, gfSceneRoot::Layer_Ground); + ground->setStageData(m_stageData); + ground->setState(&unk1D8[1]); + ground->setBackgroundState(&unk1DB); + ground = grGreenhillBreak::create(4, "StgGreenhillBrk_gake03", "grGreenhillBreak03"); + if (!ground) { + return; + } + addGround(ground); + ground->setIndex(2); + ground->startup(m_fileData, 0, gfSceneRoot::Layer_Ground); + ground->setStageData(m_stageData); + ground->setState(&unk1D8[2]); + ground->setBackgroundState(&unk1DB); +} + +void stGreenhill::createMarker() { + grGreenhillCheck* ground = grGreenhillCheck::create(5, "StgGreenhillMarker", "grGreenhillMarker"); + if (ground) { + addGround(ground); + ground->startup(m_fileData, 0, gfSceneRoot::Layer_Ground); + ground->setStageData(m_stageData); + ground->setState(&unk2C0); + ground->setBreakStates(unk1D8); + ground->setPositions(unk290); + } +} + +void stGreenhill::createGuests() { + unk1E8[0].unk01 = 0; + unk1E8[1].unk01 = 1; + unk1E8[2].unk01 = 2; + grGreenhillGuest* ground1 = grGreenhillGuest::create(10, "StgGreenhillKnuckles_TopN", "grGreenhillKnuckles"); + if (!ground1) { + return; + } + addGround(ground1); + ground1->startup(m_fileData, 0, gfSceneRoot::Layer_Ground); + ground1->setStageData(m_stageData); + ground1->setGuestData(&unk1E8[0]); + grGreenhillGuest* ground2 = grGreenhillGuest::create(11, "StgGreenhillSilver_TopN", "grGreenhillSilver"); + if (!ground2) { + return; + } + addGround(ground2); + ground2->startup(m_fileData, 0, gfSceneRoot::Layer_Ground); + ground2->setStageData(m_stageData); + ground2->setGuestData(&unk1E8[1]); + grGreenhillGuest* ground3 = grGreenhillGuest::create(12, "StgGreenhillTails_TopN", "grGreenhillTails"); + if (!ground3) { + return; + } + addGround(ground3); + ground3->startup(m_fileData, 0, gfSceneRoot::Layer_Ground); + ground3->setStageData(m_stageData); + ground3->setGuestData(&unk1E8[2]); + grGreenhillGuestLine* ground4 = + grGreenhillGuestLine::create(13, "StgGreenhillRunPosition", "grGreenhillGuestLineN"); + if (!ground4) { + return; + } + addGround(ground4); + ground4->startup(m_fileData, 0, gfSceneRoot::Layer_Ground); + ground4->setStageData(m_stageData); + ground4->setGuestData(&unk1E8[0]); + grGreenhillGuestLine* ground5 = + grGreenhillGuestLine::create(13, "StgGreenhillRunPosition", "grGreenhillGuestLineS"); + if (!ground5) { + return; + } + addGround(ground5); + ground5->startup(m_fileData, 0, gfSceneRoot::Layer_Ground); + ground5->setStageData(m_stageData); + ground5->setGuestData(&unk1E8[1]); + grGreenhillGuestLine* ground6 = + grGreenhillGuestLine::create(13, "StgGreenhillRunPosition", "grGreenhillGuestLineT"); + if (!ground6) { + return; + } + addGround(ground6); + ground6->startup(m_fileData, 0, gfSceneRoot::Layer_Ground); + ground6->setStageData(m_stageData); + ground6->setGuestData(&unk1E8[2]); +} + +void stGreenhill::update(float deltaFrame) { + if (m_isDevil == true) { + setCameraLimitRange(-160.0f, 180.0f, 140.0f, -45.0f); + } else { + resetCameraLimitRange(); + } + updateGuests(deltaFrame); +} + +struct GreenhillStageData { + u8 unk00[0x34]; + float unk34; + float unk38; + float unk3C; + u8 unk40[8]; + float unk48; + u32 unk4C; +}; + +void stGreenhill::updateGuests(float deltaFrame) { + GreenhillStageData* data = static_cast(m_stageData); + if (!data) { + return; + } + unk1E0 -= deltaFrame; + if (unk1E0 < 0.0f) { + unk1E0 = 0.0f; + } + switch (unk1DE) { + case GuestEvent_Initialize: + unk1E0 = data->unk34; + unk1DE = GuestEvent_Wait; + // FALL-THROUGH + case GuestEvent_Wait: + if (unk1E0 == 0.0f) { + if (unk1E4 >= data->unk4C) { + unk1E4 = 0; + unk1DE = GuestEvent_SelectOrder; + } else if (randf() < data->unk48) { + unk1E4 = 0; + unk1DE = GuestEvent_SelectOrder; + } else { + u8 index = 3.0f * randf(); + index = nw4r::ut::Min(2, nw4r::ut::Max(0, index)); + unk1E8[index].unk00 = Guest_Start; + unk1E8[index].unk34 = 0.5f + 0.3f * randf(); + unk1E4++; + unk1DE = GuestEvent_WaitForSingle; + } + } + break; + case GuestEvent_WaitForSingle: + if (unk1E8[0].unk00 == Guest_Inactive && unk1E8[1].unk00 == Guest_Inactive && + unk1E8[2].unk00 == Guest_Inactive) { + unk1DE = GuestEvent_ResetDelay; + } + break; + case GuestEvent_SelectOrder: + if (randf() < 1.0f / 3.0f) { + unk1E5[0] = 0; + if (randf() < 0.5f) { + unk1E5[1] = 1; + unk1E5[2] = 2; + } else { + unk1E5[1] = 2; + unk1E5[2] = 1; + } + } else if (randf() < 2.0f / 3.0f) { + unk1E5[0] = 1; + if (randf() < 0.5f) { + unk1E5[1] = 0; + unk1E5[2] = 2; + } else { + unk1E5[1] = 2; + unk1E5[2] = 0; + } + } else { + unk1E5[0] = 2; + if (randf() < 0.5f) { + unk1E5[1] = 0; + unk1E5[2] = 1; + } else { + unk1E5[1] = 1; + unk1E5[2] = 0; + } + } + unk1DE = GuestEvent_DispatchOrder; + unk1E0 = 15.0f; + // FALL-THROUGH + case GuestEvent_DispatchOrder: + if (unk1E0 == 0.0f) { + if (unk1E5[0] == 0xFF) { + if (unk1E8[0].unk00 == Guest_Inactive && unk1E8[1].unk00 == Guest_Inactive && + unk1E8[2].unk00 == Guest_Inactive) { + unk1DE = GuestEvent_ResetDelay; + } + } else { + unk1E8[unk1E5[0]].unk00 = Guest_Start; + unk1E5[0] = unk1E5[1]; + unk1E5[1] = unk1E5[2]; + unk1E5[2] = 0xFF; + unk1E0 = 24.0f + 21.0f * randf(); + } + } + break; + case GuestEvent_ResetDelay: + unk1E0 = data->unk38 + (data->unk3C - data->unk38) * randf(); + unk1DE = GuestEvent_Wait; + break; + } +} From dfb302599193e65be010a244688afd6c87809570 Mon Sep 17 00:00:00 2001 From: 2gifts Date: Sat, 26 Sep 2026 08:48:08 -0400 Subject: [PATCH 2/2] Use function names from the map file Co-Authored-By: Claude Opus 5.5 --- .../RSBE01_02/rels/st_greenhill/symbols.txt | 56 +++++++-------- include/st_greenhill/gr_greenhill.h | 70 +++++++++---------- include/st_greenhill/st_greenhill.h | 10 +-- src/mo_stage/st_greenhill/st_greenhill.cpp | 50 ++++++------- 4 files changed, 93 insertions(+), 93 deletions(-) diff --git a/config/RSBE01_02/rels/st_greenhill/symbols.txt b/config/RSBE01_02/rels/st_greenhill/symbols.txt index 310ff8cc3..0176bc3e3 100644 --- a/config/RSBE01_02/rels/st_greenhill/symbols.txt +++ b/config/RSBE01_02/rels/st_greenhill/symbols.txt @@ -5,23 +5,23 @@ __ct__11stGreenhillFv = .text:0x000000A4; // type:function size:0xFC __dt__11stGreenhillFv = .text:0x000001A0; // type:function size:0x6C loading__11stGreenhillFv = .text:0x0000020C; // type:function size:0x8 createObj__11stGreenhillFv = .text:0x00000214; // type:function size:0x18C -createBackground__11stGreenhillFv = .text:0x000003A0; // type:function size:0xC8 +createObjBg__11stGreenhillFv = .text:0x000003A0; // type:function size:0xC8 setStageData__6GroundFPv = .text:0x00000468; // type:function size:0x8 scope:weak -setPositions__13grGreenhillBgFP5Vec3f = .text:0x00000470; // type:function size:0x8 scope:weak -setState__13grGreenhillBgFPUc = .text:0x00000478; // type:function size:0x8 scope:weak -createBreaks__11stGreenhillFv = .text:0x00000480; // type:function size:0x238 -setIndex__16grGreenhillBreakFUc = .text:0x000006B8; // type:function size:0x8 scope:weak -setState__16grGreenhillBreakFPUc = .text:0x000006C0; // type:function size:0x8 scope:weak -setBackgroundState__16grGreenhillBreakFPUc = .text:0x000006C8; // type:function size:0x8 scope:weak -createMarker__11stGreenhillFv = .text:0x000006D0; // type:function size:0xE0 -setState__16grGreenhillCheckFPUc = .text:0x000007B0; // type:function size:0x8 scope:weak -setBreakStates__16grGreenhillCheckFPUc = .text:0x000007B8; // type:function size:0x8 scope:weak -setPositions__16grGreenhillCheckFP5Vec3f = .text:0x000007C0; // type:function size:0x8 scope:weak -createGuests__11stGreenhillFv = .text:0x000007C8; // type:function size:0x328 +setPosGimmickWork__13grGreenhillBgFP5Vec3f = .text:0x00000470; // type:function size:0x8 scope:weak +setBreakInfo__13grGreenhillBgFPUc = .text:0x00000478; // type:function size:0x8 scope:weak +createObjBreak__11stGreenhillFv = .text:0x00000480; // type:function size:0x238 +setType__16grGreenhillBreakFUc = .text:0x000006B8; // type:function size:0x8 scope:weak +setStateWork__16grGreenhillBreakFPUc = .text:0x000006C0; // type:function size:0x8 scope:weak +setBreakInfo__16grGreenhillBreakFPUc = .text:0x000006C8; // type:function size:0x8 scope:weak +createObjMarker__11stGreenhillFv = .text:0x000006D0; // type:function size:0xE0 +setStateWork__16grGreenhillCheckFPUc = .text:0x000007B0; // type:function size:0x8 scope:weak +setStateBreakWork__16grGreenhillCheckFPUc = .text:0x000007B8; // type:function size:0x8 scope:weak +setPosWork__16grGreenhillCheckFP5Vec3f = .text:0x000007C0; // type:function size:0x8 scope:weak +createObjGuest__11stGreenhillFv = .text:0x000007C8; // type:function size:0x328 setGuestData__16grGreenhillGuestFP18GreenhillGuestData = .text:0x00000AF0; // type:function size:0x8 scope:weak setGuestData__20grGreenhillGuestLineFP18GreenhillGuestData = .text:0x00000AF8; // type:function size:0x8 scope:weak update__11stGreenhillFf = .text:0x00000B00; // type:function size:0x9C -updateGuests__11stGreenhillFf = .text:0x00000B9C; // type:function size:0x360 +updateGuest__11stGreenhillFf = .text:0x00000B9C; // type:function size:0x360 startFighterEvent__5StageFv = .text:0x00000EFC; // type:function size:0x4 scope:weak initializeFighterAttackRatio__5StageFv = .text:0x00000F00; // type:function size:0x8 scope:weak helperStarWarp__5StageFv = .text:0x00000F08; // type:function size:0x8 scope:weak @@ -64,8 +64,8 @@ create__13grGreenhillBgFiPCcPCc = .text:0x000011EC; // type:function size:0x118 fn_72_1304 = .text:0x00001304; // type:function size:0x5C fn_72_1360 = .text:0x00001360; // type:function size:0xD0 fn_72_1430 = .text:0x00001430; // type:function size:0x74 -updateCollision__13grGreenhillBgFf = .text:0x000014A4; // type:function size:0x1D0 -updateFlowers__13grGreenhillBgFf = .text:0x00001674; // type:function size:0x3CC +updateJoint__13grGreenhillBgFf = .text:0x000014A4; // type:function size:0x1D0 +updateHang__13grGreenhillBgFf = .text:0x00001674; // type:function size:0x3CC fn_72_1A40 = .text:0x00001A40; // type:function size:0x8 fn_72_1A48 = .text:0x00001A48; // type:function size:0x8 fn_72_1A50 = .text:0x00001A50; // type:function size:0x4 @@ -85,13 +85,13 @@ fn_72_1B74 = .text:0x00001B74; // type:function size:0x100 fn_72_1C74 = .text:0x00001C74; // type:function size:0xF0 fn_72_1D64 = .text:0x00001D64; // type:function size:0x8C updateYakumono__16grGreenhillCheckFf = .text:0x00001DF0; // type:function size:0x58 -updateMotion__16grGreenhillCheckFf = .text:0x00001E48; // type:function size:0x870 -updateCallback__16grGreenhillCheckFf = .text:0x000026B8; // type:function size:0xBC -createYakumono__16grGreenhillCheckFv = .text:0x00002774; // type:function size:0x7C8 +updateActive__16grGreenhillCheckFf = .text:0x00001E48; // type:function size:0x870 +updateCallBack__16grGreenhillCheckFf = .text:0x000026B8; // type:function size:0xBC +setHit__16grGreenhillCheckFv = .text:0x00002774; // type:function size:0x7C8 fn_72_2F3C = .text:0x00002F3C; // type:function size:0x40 fn_72_2F7C = .text:0x00002F7C; // type:function size:0x40 -createAttack__16grGreenhillCheckFv = .text:0x00002FBC; // type:function size:0x19C -setMaterialColor__16grGreenhillCheckFi = .text:0x00003158; // type:function size:0x158 +setAttack__16grGreenhillCheckFv = .text:0x00002FBC; // type:function size:0x19C +changeColor__16grGreenhillCheckFi = .text:0x00003158; // type:function size:0x158 setMotion__16grGreenhillCheckFUlbbPf = .text:0x000032B0; // type:function size:0x448 fn_72_36F8 = .text:0x000036F8; // type:function size:0x98 fn_72_3790 = .text:0x00003790; // type:function size:0x23C @@ -397,13 +397,13 @@ create__16grGreenhillBreakFiPCcPCc = .text:0x00009D54; // type:function size:0xA fn_72_9DFC = .text:0x00009DFC; // type:function size:0x160 fn_72_9F5C = .text:0x00009F5C; // type:function size:0xF0 fn_72_A04C = .text:0x0000A04C; // type:function size:0x8C -updateCollision__16grGreenhillBreakFf = .text:0x0000A0D8; // type:function size:0x9C -updateCallback__16grGreenhillBreakFf = .text:0x0000A174; // type:function size:0x240 +updateJoint__16grGreenhillBreakFf = .text:0x0000A0D8; // type:function size:0x9C +updateYakumono__16grGreenhillBreakFf = .text:0x0000A174; // type:function size:0x240 updateBreak__16grGreenhillBreakFf = .text:0x0000A3B4; // type:function size:0x564 fn_72_A918 = .text:0x0000A918; // type:function size:0xB8 -createYakumono__16grGreenhillBreakFv = .text:0x0000A9D0; // type:function size:0xA14 -createAttack__16grGreenhillBreakFv = .text:0x0000B3E4; // type:function size:0x80 -createAttack__16grGreenhillBreakFi = .text:0x0000B464; // type:function size:0x2B0 +setHit__16grGreenhillBreakFv = .text:0x0000A9D0; // type:function size:0xA14 +setAttack__16grGreenhillBreakFv = .text:0x0000B3E4; // type:function size:0x80 +setAttack__16grGreenhillBreakFi = .text:0x0000B464; // type:function size:0x2B0 setMotion__16grGreenhillBreakFUlbbPf = .text:0x0000B714; // type:function size:0x448 fn_72_BB5C = .text:0x0000BB5C; // type:function size:0xFC fn_72_BC58 = .text:0x0000BC58; // type:function size:0x15C @@ -447,13 +447,13 @@ fn_72_C064 = .text:0x0000C064; // type:function size:0x8 create__16grGreenhillGuestFiPCcPCc = .text:0x0000C06C; // type:function size:0x100 fn_72_C16C = .text:0x0000C16C; // type:function size:0x68 fn_72_C1D4 = .text:0x0000C1D4; // type:function size:0x74 -updateMotion__16grGreenhillGuestFf = .text:0x0000C248; // type:function size:0x1C8 -updateCallback__16grGreenhillGuestFf = .text:0x0000C410; // type:function size:0x1BC +updateActive__16grGreenhillGuestFf = .text:0x0000C248; // type:function size:0x1C8 +updateCallBack__16grGreenhillGuestFf = .text:0x0000C410; // type:function size:0x1BC create__20grGreenhillGuestLineFiPCcPCc = .text:0x0000C5CC; // type:function size:0xD0 fn_72_C69C = .text:0x0000C69C; // type:function size:0x58 fn_72_C6F4 = .text:0x0000C6F4; // type:function size:0x58 fn_72_C74C = .text:0x0000C74C; // type:function size:0x5C -updateMotion__20grGreenhillGuestLineFf = .text:0x0000C7A8; // type:function size:0x12C +updateActive__20grGreenhillGuestLineFf = .text:0x0000C7A8; // type:function size:0x12C fn_72_C8D4 = .text:0x0000C8D4; // type:function size:0x54 setMotion__20grGreenhillGuestLineFUlbbPf = .text:0x0000C928; // type:function size:0x448 _prolog = .text:0x0000CD70; // type:function size:0x48 scope:global diff --git a/include/st_greenhill/gr_greenhill.h b/include/st_greenhill/gr_greenhill.h index 725248f3f..b21249c0b 100644 --- a/include/st_greenhill/gr_greenhill.h +++ b/include/st_greenhill/gr_greenhill.h @@ -16,11 +16,11 @@ class grGreenhillBg : public grGreenhill { u8* unk15C; public: - static grGreenhillBg* create(int mdlIndex, const char* nodeName, const char* taskName); // Name unknown - virtual void updateCollision(float deltaFrame); // Name unknown - virtual void updateFlowers(float deltaFrame); // Name unknown - virtual void setPositions(Vec3f* positions) { unk158 = positions; } // Name unknown - virtual void setState(u8* state) { unk15C = state; } // Name unknown + static grGreenhillBg* create(int mdlIndex, const char* nodeName, const char* taskName); + virtual void updateJoint(float deltaFrame); + virtual void updateHang(float deltaFrame); + virtual void setPosGimmickWork(Vec3f* positions) { unk158 = positions; } + virtual void setBreakInfo(u8* state) { unk15C = state; } }; class grGreenhillBreak : public grGreenhill { @@ -30,17 +30,17 @@ class grGreenhillBreak : public grGreenhill { u8 unk16C; public: - static grGreenhillBreak* create(int mdlIndex, const char* nodeName, const char* taskName); // Name unknown - virtual void updateCollision(float deltaFrame); // Name unknown - virtual void updateCallback(float deltaFrame); // Name unknown - virtual void updateBreak(float deltaFrame); // Name unknown - virtual void createYakumono(); // Name unknown - virtual void createAttack(); // Name unknown - virtual void createAttack(int index); // Name unknown - virtual void setMotion(u32 index, bool loop, bool force, float* frameCount); // Name unknown - virtual void setState(u8* state) { unk164 = state; } // Name unknown - virtual void setIndex(u8 index) { unk16C = index; } // Name unknown - virtual void setBackgroundState(u8* state) { unk168 = state; } // Name unknown + static grGreenhillBreak* create(int mdlIndex, const char* nodeName, const char* taskName); + virtual void updateJoint(float deltaFrame); + virtual void updateYakumono(float deltaFrame); + virtual void updateBreak(float deltaFrame); + virtual void setHit(); + virtual void setAttack(); + virtual void setAttack(int index); + virtual void setMotion(u32 index, bool loop, bool force, float* frameCount); + virtual void setStateWork(u8* state) { unk164 = state; } + virtual void setType(u8 type) { unk16C = type; } + virtual void setBreakInfo(u8* state) { unk168 = state; } }; class grGreenhillCheck : public grGreenhill { @@ -50,35 +50,35 @@ class grGreenhillCheck : public grGreenhill { Vec3f* unk164; public: - static grGreenhillCheck* create(int mdlIndex, const char* nodeName, const char* taskName); // Name unknown - virtual void updateYakumono(float deltaFrame); // Name unknown - virtual void updateMotion(float deltaFrame); // Name unknown - virtual void updateCallback(float deltaFrame); // Name unknown - virtual void createYakumono(); // Name unknown - virtual void createAttack(); // Name unknown - virtual void setMaterialColor(int state); // Name unknown - virtual void setMotion(u32 index, bool loop, bool force, float* frameCount); // Name unknown - virtual void setPositions(Vec3f* positions) { unk164 = positions; } // Name unknown - virtual void setState(u8* state) { unk15C = state; } // Name unknown - virtual void setBreakStates(u8* states) { unk160 = states; } // Name unknown + static grGreenhillCheck* create(int mdlIndex, const char* nodeName, const char* taskName); + virtual void updateYakumono(float deltaFrame); + virtual void updateActive(float deltaFrame); + virtual void updateCallBack(float deltaFrame); + virtual void setHit(); + virtual void setAttack(); + virtual void changeColor(int state); + virtual void setMotion(u32 index, bool loop, bool force, float* frameCount); + virtual void setPosWork(Vec3f* positions) { unk164 = positions; } + virtual void setStateWork(u8* state) { unk15C = state; } + virtual void setStateBreakWork(u8* states) { unk160 = states; } }; class grGreenhillGuest : public grGreenhill { GreenhillGuestData* unk158; public: - static grGreenhillGuest* create(int mdlIndex, const char* nodeName, const char* taskName); // Name unknown - virtual void updateMotion(float deltaFrame); // Name unknown - virtual void updateCallback(float deltaFrame); // Name unknown - virtual void setGuestData(GreenhillGuestData* data) { unk158 = data; } // Name unknown + static grGreenhillGuest* create(int mdlIndex, const char* nodeName, const char* taskName); + virtual void updateActive(float deltaFrame); + virtual void updateCallBack(float deltaFrame); + virtual void setGuestData(GreenhillGuestData* data) { unk158 = data; } }; class grGreenhillGuestLine : public grGreenhill { GreenhillGuestData* unk158; public: - static grGreenhillGuestLine* create(int mdlIndex, const char* nodeName, const char* taskName); // Name unknown - virtual void updateMotion(float deltaFrame); // Name unknown - virtual void setMotion(u32 index, bool loop, bool force, float* frameCount); // Name unknown - virtual void setGuestData(GreenhillGuestData* data) { unk158 = data; } // Name unknown + static grGreenhillGuestLine* create(int mdlIndex, const char* nodeName, const char* taskName); + virtual void updateActive(float deltaFrame); + virtual void setMotion(u32 index, bool loop, bool force, float* frameCount); + virtual void setGuestData(GreenhillGuestData* data) { unk158 = data; } }; diff --git a/include/st_greenhill/st_greenhill.h b/include/st_greenhill/st_greenhill.h index 900d9ff5a..0758a5ad8 100644 --- a/include/st_greenhill/st_greenhill.h +++ b/include/st_greenhill/st_greenhill.h @@ -52,11 +52,11 @@ class stGreenhill : public stMelee { virtual void createObj(); virtual void update(float deltaFrame); virtual bool isBamperVector() { return true; } - virtual void createBackground(); // Name unknown - virtual void createBreaks(); // Name unknown - virtual void createMarker(); // Name unknown - virtual void createGuests(); // Name unknown - virtual void updateGuests(float deltaFrame); // Name unknown + virtual void createObjBg(); + virtual void createObjBreak(); + virtual void createObjMarker(); + virtual void createObjGuest(); + virtual void updateGuest(float deltaFrame); static stGreenhill* create(); static stClassInfoImpl bss_loc_14; diff --git a/src/mo_stage/st_greenhill/st_greenhill.cpp b/src/mo_stage/st_greenhill/st_greenhill.cpp index 545b7d2c7..e01e1f54f 100644 --- a/src/mo_stage/st_greenhill/st_greenhill.cpp +++ b/src/mo_stage/st_greenhill/st_greenhill.cpp @@ -59,10 +59,10 @@ bool stGreenhill::loading() { void stGreenhill::createObj() { testStageParamInit(m_fileData, 10); testStageDataInit(m_fileData, 20, 80); - createBackground(); - createBreaks(); - createMarker(); - createGuests(); + createObjBg(); + createObjBreak(); + createObjMarker(); + createObjGuest(); createCollision(m_fileData, 2, nullptr); initCameraParam(); nw4r::g3d::ResFile posData(m_fileData->getData(Data_Type_Model, 100, 0xFFFE)); @@ -79,63 +79,63 @@ void stGreenhill::createObj() { createObjPokeTrainer(m_fileData, 101, "PokeTrainer00", m_pokeTrainerPos, nullptr); } -void stGreenhill::createBackground() { +void stGreenhill::createObjBg() { grGreenhillBg* ground = grGreenhillBg::create(1, "StgGreenhillMain", "grGreenhillMainBg"); if (ground) { addGround(ground); ground->startup(m_fileData, 0, gfSceneRoot::Layer_Ground); ground->setStageData(m_stageData); - ground->setPositions(unk290); - ground->setState(&unk1DB); + ground->setPosGimmickWork(unk290); + ground->setBreakInfo(&unk1DB); } } -void stGreenhill::createBreaks() { +void stGreenhill::createObjBreak() { grGreenhillBreak* ground = grGreenhillBreak::create(2, "StgGreenhillBrk_gake01", "grGreenhillBreak01"); if (!ground) { return; } addGround(ground); - ground->setIndex(0); + ground->setType(0); ground->startup(m_fileData, 0, gfSceneRoot::Layer_Ground); ground->setStageData(m_stageData); - ground->setState(&unk1D8[0]); - ground->setBackgroundState(&unk1DB); + ground->setStateWork(&unk1D8[0]); + ground->setBreakInfo(&unk1DB); ground = grGreenhillBreak::create(3, "StgGreenhillBrk_gake02", "grGreenhillBreak02"); if (!ground) { return; } addGround(ground); - ground->setIndex(1); + ground->setType(1); ground->startup(m_fileData, 0, gfSceneRoot::Layer_Ground); ground->setStageData(m_stageData); - ground->setState(&unk1D8[1]); - ground->setBackgroundState(&unk1DB); + ground->setStateWork(&unk1D8[1]); + ground->setBreakInfo(&unk1DB); ground = grGreenhillBreak::create(4, "StgGreenhillBrk_gake03", "grGreenhillBreak03"); if (!ground) { return; } addGround(ground); - ground->setIndex(2); + ground->setType(2); ground->startup(m_fileData, 0, gfSceneRoot::Layer_Ground); ground->setStageData(m_stageData); - ground->setState(&unk1D8[2]); - ground->setBackgroundState(&unk1DB); + ground->setStateWork(&unk1D8[2]); + ground->setBreakInfo(&unk1DB); } -void stGreenhill::createMarker() { +void stGreenhill::createObjMarker() { grGreenhillCheck* ground = grGreenhillCheck::create(5, "StgGreenhillMarker", "grGreenhillMarker"); if (ground) { addGround(ground); ground->startup(m_fileData, 0, gfSceneRoot::Layer_Ground); ground->setStageData(m_stageData); - ground->setState(&unk2C0); - ground->setBreakStates(unk1D8); - ground->setPositions(unk290); + ground->setStateWork(&unk2C0); + ground->setStateBreakWork(unk1D8); + ground->setPosWork(unk290); } } -void stGreenhill::createGuests() { +void stGreenhill::createObjGuest() { unk1E8[0].unk01 = 0; unk1E8[1].unk01 = 1; unk1E8[2].unk01 = 2; @@ -198,10 +198,10 @@ void stGreenhill::update(float deltaFrame) { } else { resetCameraLimitRange(); } - updateGuests(deltaFrame); + updateGuest(deltaFrame); } -struct GreenhillStageData { +struct GreenhillStageData { // Name unknown u8 unk00[0x34]; float unk34; float unk38; @@ -211,7 +211,7 @@ struct GreenhillStageData { u32 unk4C; }; -void stGreenhill::updateGuests(float deltaFrame) { +void stGreenhill::updateGuest(float deltaFrame) { GreenhillStageData* data = static_cast(m_stageData); if (!data) { return;