From 94fcca005b731468e15335ab22100bc7bf1948eb Mon Sep 17 00:00:00 2001 From: Max <34987259+mparisi20@users.noreply.github.com> Date: Mon, 22 Jun 2026 00:09:02 -0400 Subject: [PATCH] Match st_common_gimmick.cpp --- config/RSBE01_02/rels/ft_purin/symbols.txt | 20 +-- config/RSBE01_02/rels/sora_melee/splits.txt | 4 + config/RSBE01_02/rels/sora_melee/symbols.txt | 55 ++++---- config/RSBE01_02/symbols.txt | 6 +- configure.py | 1 + include/lib/BrawlHeaders | 2 +- .../sora_melee/st/st_common_gimmick.cpp | 129 ++++++++++++++++++ 7 files changed, 175 insertions(+), 42 deletions(-) create mode 100644 src/mo_melee/sora_melee/st/st_common_gimmick.cpp diff --git a/config/RSBE01_02/rels/ft_purin/symbols.txt b/config/RSBE01_02/rels/ft_purin/symbols.txt index c765b50e8..7a18a391b 100644 --- a/config/RSBE01_02/rels/ft_purin/symbols.txt +++ b/config/RSBE01_02/rels/ft_purin/symbols.txt @@ -22,7 +22,7 @@ fn_124_1F7C = .text:0x00001F7C; // type:function size:0xD8 fn_124_2054 = .text:0x00002054; // type:function size:0x8C fn_124_20E0 = .text:0x000020E0; // type:function size:0x5C fn_124_213C = .text:0x0000213C; // type:function size:0x40 -fn_124_217C = .text:0x0000217C; // type:function size:0x40 +__dt__33soAnimCmdAddressPackArraySeparateFv = .text:0x0000217C; // type:function size:0x40 fn_124_21BC = .text:0x000021BC; // type:function size:0x5C fn_124_2218 = .text:0x00002218; // type:function size:0x6C fn_124_2284 = .text:0x00002284; // type:function size:0x5C @@ -293,11 +293,11 @@ fn_124_8638 = .text:0x00008638; // type:function size:0x18 fn_124_8650 = .text:0x00008650; // type:function size:0x18 fn_124_8668 = .text:0x00008668; // type:function size:0x10 fn_124_8678 = .text:0x00008678; // type:function size:0x10 -fn_124_8688 = .text:0x00008688; // type:function size:0x8 -fn_124_8690 = .text:0x00008690; // type:function size:0xB4 -fn_124_8744 = .text:0x00008744; // type:function size:0x54 -fn_124_8798 = .text:0x00008798; // type:function size:0x12C -fn_124_88C4 = .text:0x000088C4; // type:function size:0x34 +isNull__33soAnimCmdAddressPackArraySeparateCFv = .text:0x00008688; // type:function size:0x8 +size__33soAnimCmdAddressPackArraySeparateCFv = .text:0x00008690; // type:function size:0xB4 +at__33soAnimCmdAddressPackArraySeparateFl = .text:0x00008744; // type:function size:0x54 +atSub__33soAnimCmdAddressPackArraySeparateCFl = .text:0x00008798; // type:function size:0x12C +at__33soAnimCmdAddressPackArraySeparateCFl = .text:0x000088C4; // type:function size:0x34 getParamFloat__40ftExtendParamAccesserEx<3999,49,24999,4>FP16soModuleAccesserll = .text:0x000088F8; // type:function size:0x58 getValueVariation__15soValueAccesserFv = .text:0x00008950; // type:function size:0xC getParamInt__40ftExtendParamAccesserEx<3999,49,24999,4>FP16soModuleAccesserll = .text:0x0000895C; // type:function size:0x5C @@ -314,7 +314,7 @@ fn_124_9490 = .text:0x00009490; // type:function size:0xC fn_124_949C = .text:0x0000949C; // type:function size:0x14 fn_124_94B0 = .text:0x000094B0; // type:function size:0xC fn_124_94BC = .text:0x000094BC; // type:function size:0xC -fn_124_94C8 = .text:0x000094C8; // type:function size:0x34 +isEmpty__40soArrayFixed<24soAnimCmdAddressPackConv>CFv = .text:0x000094C8; // type:function size:0x34 fn_124_94FC = .text:0x000094FC; // type:function size:0x10 fn_124_950C = .text:0x0000950C; // type:function size:0x18 fn_124_9524 = .text:0x00009524; // type:function size:0x60 @@ -640,13 +640,13 @@ lbl_124_data_1654 = .data:0x00001654; // type:object size:0x12 data:string lbl_124_data_1668 = .data:0x00001668; // type:object size:0x8 lbl_124_data_1670 = .data:0x00001670; // type:object size:0x13 data:string lbl_124_data_1684 = .data:0x00001684; // type:object size:0x8 -lbl_124_data_168C = .data:0x0000168C; // type:object size:0x20 +__vt__33soAnimCmdAddressPackArraySeparate = .data:0x0000168C; // type:object size:0x20 lbl_124_data_16AC = .data:0x000016AC; // type:object size:0x22 data:string lbl_124_data_16D0 = .data:0x000016D0; // type:object size:0x14 -lbl_124_data_16E4 = .data:0x000016E4; // type:object size:0x8 +__RTTI__33soAnimCmdAddressPackArraySeparate = .data:0x000016E4; // type:object size:0x8 lbl_124_data_16EC = .data:0x000016EC; // type:object size:0x27 data:string lbl_124_data_1714 = .data:0x00001714; // type:object size:0xC -lbl_124_data_1720 = .data:0x00001720; // type:object size:0x8 +__RTTI__40soArrayFixed<24soAnimCmdAddressPackConv> = .data:0x00001720; // type:object size:0x8 lbl_124_data_1728 = .data:0x00001728; // type:object size:0x16 data:string lbl_124_data_1740 = .data:0x00001740; // type:object size:0xC lbl_124_data_174C = .data:0x0000174C; // type:object size:0x8 diff --git a/config/RSBE01_02/rels/sora_melee/splits.txt b/config/RSBE01_02/rels/sora_melee/splits.txt index 847d5690a..0872596da 100644 --- a/config/RSBE01_02/rels/sora_melee/splits.txt +++ b/config/RSBE01_02/rels/sora_melee/splits.txt @@ -95,6 +95,10 @@ mo_melee/sora_melee/ft/ft_fighter_build_data.cpp: .data start:0x00032A98 end:0x00032BF8 .bss start:0x00005040 end:0x00005050 +mo_melee/sora_melee/st/st_common_gimmick.cpp: + .text start:0x00237C00 end:0x002381FC + .data start:0x0004C748 end:0x0004C96C + mo_melee/mo_melee.cpp: .text start:0x003CBCBC end:0x003CBE40 .ctors start:0x00000514 end:0x00000518 diff --git a/config/RSBE01_02/rels/sora_melee/symbols.txt b/config/RSBE01_02/rels/sora_melee/symbols.txt index ce927023d..880a88558 100644 --- a/config/RSBE01_02/rels/sora_melee/symbols.txt +++ b/config/RSBE01_02/rels/sora_melee/symbols.txt @@ -19910,7 +19910,7 @@ fn_27_2201A8 = .text:0x002201A8; // type:function size:0x4 fn_27_2201AC = .text:0x002201AC; // type:function size:0xD8 fn_27_220284 = .text:0x00220284; // type:function size:0x17A0 fn_27_221A24 = .text:0x00221A24; // type:function size:0x40 -fn_27_221A64 = .text:0x00221A64; // type:function size:0x104 +__ct__5StageFPCcQ26Stages11srStageKind = .text:0x00221A64; // type:function size:0x104 initializeStage__5StageFv = .text:0x00221B68; // type:function size:0x1E0 __dt__5StageFv = .text:0x00221D48; // type:function size:0x238 closeStage__5StageFv = .text:0x00221F80; // type:function size:0x210 @@ -19939,7 +19939,7 @@ getZoneLightSetIndex__5StageFv = .text:0x002227E0; // type:function size:0x8 removeGround__5StageFP6Ground = .text:0x002227E8; // type:function size:0x48 getGroundNum__5StageFv = .text:0x00222830; // type:function size:0x20 getGround__5StageFi = .text:0x00222850; // type:function size:0x24 -fn_27_222874 = .text:0x00222874; // type:function size:0x4 +setCollision__5StageFP11grCollision = .text:0x00222874; // type:function size:0x4 fn_27_222878 = .text:0x00222878; // type:function size:0x80 fn_27_2228F8 = .text:0x002228F8; // type:function size:0xC registScnAnim__5StageFPQ34nw4r3g3d11ResFileDataUl = .text:0x00222904; // type:function size:0x8C @@ -19953,7 +19953,7 @@ createCollision__5StageFP9gfArchiveiP6Ground = .text:0x00222AB0; // type:functio clearCameraParam__5StageFv = .text:0x00222B54; // type:function size:0x44 initCameraParam__5StageFv = .text:0x00222B98; // type:function size:0x104 fn_27_222C9C = .text:0x00222C9C; // type:function size:0x30C -fn_27_222FA8 = .text:0x00222FA8; // type:function size:0x148 +testCollDataInit__5StageFP9gfArchiveP10grCollDataUl = .text:0x00222FA8; // type:function size:0x148 fn_27_2230F0 = .text:0x002230F0; // type:function size:0x50 testStageParamInit__5StageFP9gfArchivei = .text:0x00223140; // type:function size:0x1E0 fn_27_223320 = .text:0x00223320; // type:function size:0x78 @@ -20057,15 +20057,15 @@ setFrameRuleTime__5StageFf = .text:0x00225700; // type:function size:0x8 isNextStepBgmEqualNowStepBgmFromFlag__5StageFv = .text:0x00225708; // type:function size:0x8 getBgmPlayOffsetFrame__5StageFv = .text:0x00225710; // type:function size:0xC getBgmVolume__5StageFv = .text:0x0022571C; // type:function size:0xC -setBgmChange__5StageFfii = .text:0x00225728; // type:function size:0x10 -getBgmChangeID__5StageFii = .text:0x00225738; // type:function size:0x14 +setBgmChange__5StageFfbUl = .text:0x00225728; // type:function size:0x10 +getBgmChangeID__5StageFPUlPf = .text:0x00225738; // type:function size:0x14 isBgmChange__5StageFv = .text:0x0022574C; // type:function size:0x8 getBgmOptionID__5StageFv = .text:0x00225754; // type:function size:0x8 getNowStepBgmID__5StageFv = .text:0x0022575C; // type:function size:0x8 getBgmID__5StageFv = .text:0x00225764; // type:function size:0x8 getBgmID__5StageCFv = .text:0x0022576C; // type:function size:0x8 appearanceFighterLocal__5StageFv = .text:0x00225774; // type:function size:0x4 -getScrollDir__5StageFi = .text:0x00225778; // type:function size:0x1C +getScrollDir__5StageFP5Vec3f = .text:0x00225778; // type:function size:0x1C isAdventureStage__5StageFv = .text:0x00225794; // type:function size:0x8 getPokeTrainerDrawLayer__5StageFv = .text:0x0022579C; // type:function size:0x8 getPokeTrainerPositionZ__5StageFv = .text:0x002257A4; // type:function size:0xC @@ -20107,7 +20107,7 @@ fn_27_2283F0 = .text:0x002283F0; // type:function size:0x64 fn_27_228454 = .text:0x00228454; // type:function size:0x4B8 fn_27_22890C = .text:0x0022890C; // type:function size:0x10 fn_27_22891C = .text:0x0022891C; // type:function size:0x128 -fn_27_228A44 = .text:0x00228A44; // type:function size:0x8C +clearShadowObject__8stShadowFv = .text:0x00228A44; // type:function size:0x8C fn_27_228AD0 = .text:0x00228AD0; // type:function size:0x134 fn_27_228C04 = .text:0x00228C04; // type:function size:0x70 fn_27_228C74 = .text:0x00228C74; // type:function size:0x164 @@ -20290,7 +20290,7 @@ fn_27_233CFC = .text:0x00233CFC; // type:function size:0x1DC fn_27_233ED8 = .text:0x00233ED8; // type:function size:0x4 fn_27_233EDC = .text:0x00233EDC; // type:function size:0x4 fn_27_233EE0 = .text:0x00233EE0; // type:function size:0x4 -fn_27_233EE4 = .text:0x00233EE4; // type:function size:0x74 +setValidCallback__9stTriggerFP10gfCallBack = .text:0x00233EE4; // type:function size:0x74 fn_27_233F58 = .text:0x00233F58; // type:function size:0x74 fn_27_233FCC = .text:0x00233FCC; // type:function size:0x74 setAreaSleep__9stTriggerFb = .text:0x00234040; // type:function size:0x60 @@ -20347,7 +20347,7 @@ fn_27_236ED0 = .text:0x00236ED0; // type:function size:0x88 fn_27_236F58 = .text:0x00236F58; // type:function size:0xE4 fn_27_23703C = .text:0x0023703C; // type:function size:0x88 fn_27_2370C4 = .text:0x002370C4; // type:function size:0x88 -fn_27_23714C = .text:0x0023714C; // type:function size:0x74 +__ct__24stActTriggerFrameExcelCBFP25grGimmickFrameTriggerData = .text:0x0023714C; // type:function size:0x74 fn_27_2371C0 = .text:0x002371C0; // type:function size:0x108 fn_27_2372C8 = .text:0x002372C8; // type:function size:0x2C fn_27_2372F4 = .text:0x002372F4; // type:function size:0xB4 @@ -20365,23 +20365,21 @@ fn_27_2378D0 = .text:0x002378D0; // type:function size:0xCC fn_27_23799C = .text:0x0023799C; // type:function size:0xCC fn_27_237A68 = .text:0x00237A68; // type:function size:0xCC fn_27_237B34 = .text:0x00237B34; // type:function size:0xCC -fn_27_237C00 = .text:0x00237C00; // type:function size:0x58 -fn_27_237C58 = .text:0x00237C58; // type:function size:0x58 -fn_27_237CB0 = .text:0x00237CB0; // type:function size:0x70 +__ct__15stCommonGimmickFPCcQ26Stages11srStageKind = .text:0x00237C00; // type:function size:0x58 +__dt__15stCommonGimmickFv = .text:0x00237C58; // type:function size:0x58 +setupItemSheet__15stCommonGimmickFv = .text:0x00237CB0; // type:function size:0x70 createGimmickLadder__15stCommonGimmickFP19grGimmickLadderDataP9gfArchive = .text:0x00237D20; // type:function size:0xB0 createGimmickWind2__15stCommonGimmickFP17grGimmickWindData = .text:0x00237DD0; // type:function size:0x48 createGimmickBeltConveyor2__15stCommonGimmickFP25grGimmickBeltConveyorData = .text:0x00237E18; // type:function size:0x48 createGimmickWaterArea__15stCommonGimmickFP18grGimmickWaterData = .text:0x00237E60; // type:function size:0x48 createGimmickHitPointEffectArea__15stCommonGimmickFP27grGimmickHitPointEffectData = .text:0x00237EA8; // type:function size:0x48 -fn_27_237EF0 = .text:0x00237EF0; // type:function size:0xB0 -fn_27_237FA0 = .text:0x00237FA0; // type:function size:0x78 -createGimmickCollision__15stCommonGimmickFiP6GroundP9gfArchive = .text:0x00238018; // type:function size:0x98 -releaseArchive__15stCommonGimmickFv = .text:0x002380B0; // type:function size:0x20 -fn_27_2380D0 = .text:0x002380D0; // type:function size:0x4 -fn_27_2380D4 = .text:0x002380D4; // type:function size:0x20 -fn_27_2380F4 = .text:0x002380F4; // type:function size:0x4 -fn_27_2380F8 = .text:0x002380F8; // type:function size:0x84 -fn_27_23817C = .text:0x0023817C; // type:function size:0x80 +createGimmickCatapult__15stCommonGimmickFP21grGimmickCatapultDataP9gfArchive = .text:0x00237EF0; // type:function size:0xB0 +createGimmickFrameTrigger__15stCommonGimmickFP25grGimmickFrameTriggerData = .text:0x00237FA0; // type:function size:0x78 +createGimmickCollision__15stCommonGimmickFUlP6GroundP9gfArchive = .text:0x00238018; // type:function size:0x98 +releaseArchive__15stCommonGimmickFv = .text:0x002380B0; // type:function size:0x24 +releaseArchiveCommon__15stCommonGimmickFv = .text:0x002380D4; // type:function size:0x24 +processBegin__15stCommonGimmickFv = .text:0x002380F8; // type:function size:0x84 +setPause__15stCommonGimmickFb = .text:0x0023817C; // type:function size:0x80 fn_27_2381FC = .text:0x002381FC; // type:function size:0x34 fn_27_238230 = .text:0x00238230; // type:function size:0xE0 fn_27_238310 = .text:0x00238310; // type:function size:0x4 @@ -21569,7 +21567,7 @@ fn_27_26F508 = .text:0x0026F508; // type:function size:0x40 fn_27_26F548 = .text:0x0026F548; // type:function size:0xC fn_27_26F554 = .text:0x0026F554; // type:function size:0x58 fn_27_26F5AC = .text:0x0026F5AC; // type:function size:0x58 -fn_27_26F604 = .text:0x0026F604; // type:function size:0xC0 +create__15grGimmickLadderFsPCc = .text:0x0026F604; // type:function size:0xC0 __ct__15grGimmickLadderFPCc = .text:0x0026F6C4; // type:function size:0x70 __dt__15grGimmickLadderFv = .text:0x0026F734; // type:function size:0x58 startup__15grGimmickLadderFP9gfArchiveUlUl = .text:0x0026F78C; // type:function size:0x1B4 @@ -21699,7 +21697,7 @@ startup__17grGimmickWarpZoneFP9gfArchiveUlUl = .text:0x00274168; // type:functio setInitializeFlag__17grGimmickWarpZoneFv = .text:0x002744C0; // type:function size:0x9C update__17grGimmickWarpZoneFf = .text:0x0027455C; // type:function size:0x38 onGimmickEvent__17grGimmickWarpZoneFP18soGimmickEventArgsPi = .text:0x00274594; // type:function size:0xBC -fn_27_274650 = .text:0x00274650; // type:function size:0xB8 +create__17grGimmickCatapultFsPCc = .text:0x00274650; // type:function size:0xB8 __dt__17grGimmickCatapultFv = .text:0x00274708; // type:function size:0x58 update__17grGimmickCatapultFf = .text:0x00274760; // type:function size:0xC4 processFixPosition__17grGimmickCatapultFv = .text:0x00274824; // type:function size:0x1A8 @@ -21707,7 +21705,7 @@ startup__17grGimmickCatapultFP9gfArchiveUlUl = .text:0x002749CC; // type:functio onGimmickEvent__17grGimmickCatapultFP18soGimmickEventArgsPi = .text:0x00274DF4; // type:function size:0x144 fn_27_274F38 = .text:0x00274F38; // type:function size:0x120 fn_27_275058 = .text:0x00275058; // type:function size:0x2EC -fn_27_275344 = .text:0x00275344; // type:function size:0xB8 +create__11grCollisionFP5StagePvP6Groundi = .text:0x00275344; // type:function size:0xB8 fn_27_2753FC = .text:0x002753FC; // type:function size:0xB8 fn_27_2754B4 = .text:0x002754B4; // type:function size:0x80 fn_27_275534 = .text:0x00275534; // type:function size:0xF4 @@ -27957,7 +27955,7 @@ lbl_27_data_408 = .data:0x00000408; // type:object size:0xC lbl_27_data_414 = .data:0x00000414; // type:object size:0xE data:string lbl_27_data_428 = .data:0x00000428; // type:object size:0x8 lbl_27_data_430 = .data:0x00000430; // type:object size:0x7 data:string -lbl_27_data_438 = .data:0x00000438; // type:object size:0x8 +__RTTI__6gfTask = .data:0x00000438; // type:object size:0x8 lbl_27_data_440 = .data:0x00000440; // type:object size:0x28 data:string lbl_27_data_468 = .data:0x00000468; // type:object size:0x18 lbl_27_data_480 = .data:0x00000480; // type:object size:0x8 @@ -34611,7 +34609,7 @@ lbl_27_data_4A1E0 = .data:0x0004A1E0; // type:object size:0x8 lbl_27_data_4A1E8 = .data:0x0004A1E8; // type:object size:0x204 data:4byte lbl_27_data_4A3EC = .data:0x0004A3EC; // type:object size:0x6 data:string lbl_27_data_4A3F4 = .data:0x0004A3F4; // type:object size:0xC -lbl_27_data_4A400 = .data:0x0004A400; // type:object size:0x8 +__RTTI__5Stage = .data:0x0004A400; // type:object size:0x8 lbl_27_data_4A408 = .data:0x0004A408; // type:object size:0x14 lbl_27_data_4A41C = .data:0x0004A41C; // type:object size:0xC data:string lbl_27_data_4A428 = .data:0x0004A428; // type:object size:0x8 @@ -34667,7 +34665,8 @@ lbl_27_data_4B080 = .data:0x0004B080; // type:object size:0x20 lbl_27_data_4B0A0 = .data:0x0004B0A0; // type:object size:0x8 lbl_27_data_4B0A8 = .data:0x0004B0A8; // type:object size:0x10 data:string lbl_27_data_4B0B8 = .data:0x0004B0B8; // type:object size:0x18 -lbl_27_data_4B0D0 = .data:0x0004B0D0; // type:object size:0x38 +__RTTI__15stCommonGimmick = .data:0x0004B0D0; // type:object size:0x8 +lbl_27_data_4B0D8 = .data:0x0004B0D8; // type:object size:0x30 lbl_27_data_4B108 = .data:0x0004B108; // type:object size:0x14 lbl_27_data_4B11C = .data:0x0004B11C; // type:object size:0x1E data:string lbl_27_data_4B13C = .data:0x0004B13C; // type:object size:0xC @@ -34815,7 +34814,7 @@ lbl_27_data_4C728 = .data:0x0004C728; // type:object size:0x18 lbl_27_data_4C740 = .data:0x0004C740; // type:object size:0x8 lbl_27_data_4C748 = .data:0x0004C748; // type:object size:0x10 data:string lbl_27_data_4C758 = .data:0x0004C758; // type:object size:0xE data:string -lbl_27_data_4C768 = .data:0x0004C768; // type:object size:0x208 +__vt__15stCommonGimmick = .data:0x0004C768; // type:object size:0x204 lbl_27_data_4C970 = .data:0x0004C970; // type:object size:0x24 lbl_27_data_4C994 = .data:0x0004C994; // type:object size:0x11 data:string lbl_27_data_4C9A8 = .data:0x0004C9A8; // type:object size:0x10 diff --git a/config/RSBE01_02/symbols.txt b/config/RSBE01_02/symbols.txt index 292a8858a..5f17c9853 100644 --- a/config/RSBE01_02/symbols.txt +++ b/config/RSBE01_02/symbols.txt @@ -2245,7 +2245,7 @@ fn_800158D8 = .text:0x800158D8; // type:function size:0x4D4 fn_80015DAC = .text:0x80015DAC; // type:function size:0x8 fn_80015DB4 = .text:0x80015DB4; // type:function size:0x28 getData__9gfArchiveF11ARCNodeTypeiUs = .text:0x80015DDC; // type:function size:0x38 -getData__9gfArchiveF11ARCNodeTypeiPiUl = .text:0x80015E14; // type:function size:0x20 +getData__9gfArchiveF11ARCNodeTypeiPiUs = .text:0x80015E14; // type:function size:0x20 fn_80015E34 = .text:0x80015E34; // type:function size:0x144 fn_80015F78 = .text:0x80015F78; // type:function size:0x1B8 fn_80016130 = .text:0x80016130; // type:function size:0x2D8 @@ -3488,8 +3488,8 @@ fn_8005F660 = .text:0x8005F660; // type:function size:0x4 fn_8005F664 = .text:0x8005F664; // type:function size:0x4 fn_8005F668 = .text:0x8005F668; // type:function size:0x9C fn_8005F704 = .text:0x8005F704; // type:function size:0x4 -fn_8005F708 = .text:0x8005F708; // type:function size:0x24 -fn_8005F72C = .text:0x8005F72C; // type:function size:0x2C +pushsetCurrentGroup__5ecMgrFUl = .text:0x8005F708; // type:function size:0x24 +popCurrentGroup__5ecMgrFv = .text:0x8005F72C; // type:function size:0x2C fn_8005F758 = .text:0x8005F758; // type:function size:0x1C setDrawPrio__5ecMgrFi = .text:0x8005F774; // type:function size:0x20 fn_8005F794 = .text:0x8005F794; // type:function size:0x8 diff --git a/configure.py b/configure.py index d398217ea..f3a84fbea 100755 --- a/configure.py +++ b/configure.py @@ -821,6 +821,7 @@ def MatchingFor(*versions): Object(Matching, "mo_melee/sora_melee/ft/ft_class_info.cpp"), Object(Matching, "mo_melee/sora_melee/ft/ft_extend_param_accesser.cpp"), Object(Matching, "mo_melee/sora_melee/ft/ft_fighter_build_data.cpp"), + Object(Matching, "mo_melee/sora_melee/st/st_common_gimmick.cpp"), Object(Matching, "mo_melee/mo_melee.cpp"), ], }, diff --git a/include/lib/BrawlHeaders b/include/lib/BrawlHeaders index 4e6d9dc17..399a313fa 160000 --- a/include/lib/BrawlHeaders +++ b/include/lib/BrawlHeaders @@ -1 +1 @@ -Subproject commit 4e6d9dc177c14a4835306805edeed12f17fbde9b +Subproject commit 399a313fa9a87f92b9df04a8f3d4132ddea36813 diff --git a/src/mo_melee/sora_melee/st/st_common_gimmick.cpp b/src/mo_melee/sora_melee/st/st_common_gimmick.cpp new file mode 100644 index 000000000..09ced3b9f --- /dev/null +++ b/src/mo_melee/sora_melee/st/st_common_gimmick.cpp @@ -0,0 +1,129 @@ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +stCommonGimmick::stCommonGimmick(const char* name, srStageKind stageKind) + : Stage(name, stageKind), unk1AC(false) { + m_fileData = nullptr; + m_secondaryFileData = nullptr; + unk1A8 = nullptr; + m_commonFileData = nullptr; + m_isPaused = false; +} + +stCommonGimmick::~stCommonGimmick() { } + +void stCommonGimmick::setupItemSheet() { + if (m_fileData) { + int nodeSize; + void* data = m_fileData->getData(Data_Type_Misc, 10000, &nodeSize, 0xFFFE); + if (data) + m_itemSheetArchive.setFileImage(data, nodeSize, Heaps::StageInstance); + } +} + +grGimmickLadder* stCommonGimmick::createGimmickLadder(grGimmickLadderData* ladderData, gfArchive* archive) { + grGimmickLadder* ladder = + grGimmickLadder::create(ladderData->m_mdlIndex, "grGimmickLadder"); + if (ladder) { + addGround(ladder); + ladder->setGimmickData(ladderData); + ladder->startup(archive, 0, gfSceneRoot::Layer_Ground); + } + return ladder; +} + +bool stCommonGimmick::createGimmickWind2(grGimmickWindData* windAreaData) { + g_stTriggerMng->createTrigger(Gimmick::Area_Wind, -1) + ->setWindTrigger(windAreaData); + return false; +} + +bool stCommonGimmick::createGimmickBeltConveyor2(grGimmickBeltConveyorData* beltConveyorAreaData) { + g_stTriggerMng->createTrigger(Gimmick::Area_BeltConveyor, -1) + ->setBeltConveyorTrigger(beltConveyorAreaData); + return false; +} + +bool stCommonGimmick::createGimmickWaterArea(grGimmickWaterData* waterAreaData) { + g_stTriggerMng->createTrigger(Gimmick::Area_Water, -1) + ->setWaterTrigger(waterAreaData); + return false; +} + +bool stCommonGimmick::createGimmickHitPointEffectArea(grGimmickHitPointEffectData* hitPointEffectData) { + g_stTriggerMng->createTrigger(Gimmick::Area_HitPoint_Effect, -1) + ->setHitPointEffectTrigger(hitPointEffectData); + return false; +} + +grGimmickCatapult* stCommonGimmick::createGimmickCatapult(grGimmickCatapultData* catapultData, gfArchive* archive) { + grGimmickCatapult* catapult = + grGimmickCatapult::create(catapultData->m_mdlIndex, "FighterPos_01"); + if (catapult) { + addGround(catapult); + catapult->setGimmickData(catapultData); + catapult->startup(archive, 0, gfSceneRoot::Layer_Ground); + } + return catapult; +} + +bool stCommonGimmick::createGimmickFrameTrigger(grGimmickFrameTriggerData* frameTriggerData) { + stTrigger* trigger = g_stTriggerMng->createTrigger(Gimmick::Area_None, &frameTriggerData->unkC); + stActTriggerFrameExcelCB* cb = new (Heaps::StageInstance) stActTriggerFrameExcelCB(frameTriggerData); + trigger->setValidCallback(cb); + return false; +} + +void stCommonGimmick::createGimmickCollision(u32 collIndex, Ground* ground, gfArchive* archive) { + if (collIndex != 0xFF) { + grCollData* collData = new (Heaps::StageInstance) grCollData; + if (collData) { + testCollDataInit(archive, collData, collIndex); + setCollision(grCollision::create(this, collData, ground, 1)); + } + delete collData; + } +} + +void stCommonGimmick::releaseArchive() { + if (!unk1AC && m_fileData) + delete m_fileData; +} + +void stCommonGimmick::releaseArchiveCommon() { + if (!unk1AC && m_commonFileData) + delete m_commonFileData; +} + +void stCommonGimmick::processBegin() { + // FIXME: magic numbers + g_ecMgr->pushsetCurrentGroup(0x2000000); + m_shadow->clearShadowObject(); + if (!m_isPaused) + unk194++; + if (!unk1AC) + Stage::processBegin(); + else + unk40 = 4; + g_ecMgr->popCurrentGroup(); +} + +void stCommonGimmick::setPause(bool pause) { + u32 i = 0; + u32 e = getGroundNum(); + m_isPaused = pause; + for ( ; i != e; i++) { + Ground* gr = getGround(i); + if (gr) + gr->m_isPauseAnim = m_isPaused; + } +}