Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions config/RSBE01_02/rels/st_emblem/splits.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,13 @@ global_destructor_chain.c:
.dtors start:0x00000000 end:0x00000008
.bss start:0x00000000 end:0x00000004

mo_stage/st_emblem/st_emblem.cpp:
.text start:0x00000070 end:0x0000281C
.ctors start:0x00000000 end:0x00000004
.rodata start:0x00000000 end:0x000000B4
.data start:0x00000000 end:0x00000560
.bss start:0x00000008 end:0x00000018

mo_stage/mo_stage.cpp:
.text start:0x0000281C end:0x000028B8
.data start:0x00000560 end:0x0000056D
Expand Down
135 changes: 67 additions & 68 deletions config/RSBE01_02/rels/st_emblem/symbols.txt
Original file line number Diff line number Diff line change
@@ -1,61 +1,60 @@
__register_global_object = .text:0x00000000; // type:function size:0x1C scope:global
__destroy_global_chain = .text:0x0000001C; // type:function size:0x54 scope:global
fn_64_70 = .text:0x00000070; // type:function size:0x34
fn_64_A4 = .text:0x000000A4; // type:function size:0x1D0
fn_64_274 = .text:0x00000274; // type:function size:0x58
fn_64_2CC = .text:0x000002CC; // type:function size:0xD0
fn_64_39C = .text:0x0000039C; // type:function size:0x8
fn_64_3A4 = .text:0x000003A4; // type:function size:0x4F4
fn_64_898 = .text:0x00000898; // type:function size:0x104
fn_64_99C = .text:0x0000099C; // type:function size:0x188
fn_64_B24 = .text:0x00000B24; // type:function size:0x8
fn_64_B2C = .text:0x00000B2C; // type:function size:0x8
fn_64_B34 = .text:0x00000B34; // type:function size:0xC
fn_64_B40 = .text:0x00000B40; // type:function size:0xD4
fn_64_C14 = .text:0x00000C14; // type:function size:0xD8
fn_64_CEC = .text:0x00000CEC; // type:function size:0x994
fn_64_1680 = .text:0x00001680; // type:function size:0x298
fn_64_1918 = .text:0x00001918; // type:function size:0x750
fn_64_2068 = .text:0x00002068; // type:function size:0x268
fn_64_22D0 = .text:0x000022D0; // type:function size:0x1E8
fn_64_24B8 = .text:0x000024B8; // type:function size:0xF0
fn_64_25A8 = .text:0x000025A8; // type:function size:0x4
fn_64_25AC = .text:0x000025AC; // type:function size:0x30
fn_64_25DC = .text:0x000025DC; // type:function size:0x1C
fn_64_25F8 = .text:0x000025F8; // type:function size:0x4
fn_64_25FC = .text:0x000025FC; // type:function size:0x8
fn_64_2604 = .text:0x00002604; // type:function size:0x8
fn_64_260C = .text:0x0000260C; // type:function size:0x8
fn_64_2614 = .text:0x00002614; // type:function size:0x8
fn_64_261C = .text:0x0000261C; // type:function size:0x8
fn_64_2624 = .text:0x00002624; // type:function size:0x4
fn_64_2628 = .text:0x00002628; // type:function size:0x8
fn_64_2630 = .text:0x00002630; // type:function size:0x8
fn_64_2638 = .text:0x00002638; // type:function size:0x8
fn_64_2640 = .text:0x00002640; // type:function size:0xC
fn_64_264C = .text:0x0000264C; // type:function size:0xC
fn_64_2658 = .text:0x00002658; // type:function size:0x10
fn_64_2668 = .text:0x00002668; // type:function size:0x14
fn_64_267C = .text:0x0000267C; // type:function size:0x8
fn_64_2684 = .text:0x00002684; // type:function size:0x8
fn_64_268C = .text:0x0000268C; // type:function size:0x8
fn_64_2694 = .text:0x00002694; // type:function size:0x8
fn_64_269C = .text:0x0000269C; // type:function size:0x8
fn_64_26A4 = .text:0x000026A4; // type:function size:0x4
fn_64_26A8 = .text:0x000026A8; // type:function size:0x1C
fn_64_26C4 = .text:0x000026C4; // type:function size:0x8
fn_64_26CC = .text:0x000026CC; // type:function size:0x8
fn_64_26D4 = .text:0x000026D4; // type:function size:0x8
fn_64_26DC = .text:0x000026DC; // type:function size:0x8
fn_64_26E4 = .text:0x000026E4; // type:function size:0xC
fn_64_26F0 = .text:0x000026F0; // type:function size:0x4
fn_64_26F4 = .text:0x000026F4; // type:function size:0x8
fn_64_26FC = .text:0x000026FC; // type:function size:0x8
fn_64_2704 = .text:0x00002704; // type:function size:0x8
fn_64_270C = .text:0x0000270C; // type:function size:0x64
fn_64_2770 = .text:0x00002770; // type:function size:0x74
fn_64_27E4 = .text:0x000027E4; // type:function size:0x34
fn_64_2818 = .text:0x00002818; // type:function size:0x4
create__8stEmblemFv = .text:0x00000070; // type:function size:0x34
__ct__8stEmblemFv = .text:0x000000A4; // type:function size:0x1D0
__dt__Q28StSeUtil18SeSeqInstance<2,2>Fv = .text:0x00000274; // type:function size:0x58
__dt__8stEmblemFv = .text:0x000002CC; // type:function size:0xD0
loading__8stEmblemFv = .text:0x0000039C; // type:function size:0x8
createObj__8stEmblemFv = .text:0x000003A4; // type:function size:0x4F4
setSceneCollision__8stEmblemFv = .text:0x00000898; // type:function size:0x104
createSceneGround__8stEmblemFi = .text:0x0000099C; // type:function size:0x188
setChangeSceneNumber__8stEmblemFl = .text:0x00000B24; // type:function size:0x8
checkChangeScene__8stEmblemFv = .text:0x00000B2C; // type:function size:0x8
resetChangeScene__8stEmblemFv = .text:0x00000B34; // type:function size:0xC
startScene__8stEmblemFv = .text:0x00000B40; // type:function size:0xD4
moveGround__8stEmblemFfbP5Vec3f = .text:0x00000C14; // type:function size:0xD8
updateScene__8stEmblemFf = .text:0x00000CEC; // type:function size:0x994
updateScene00__8stEmblemFf = .text:0x00001680; // type:function size:0x298
updateScene01__8stEmblemFf = .text:0x00001918; // type:function size:0x750
updateScene02__8stEmblemFf = .text:0x00002068; // type:function size:0x268
update__8stEmblemFf = .text:0x000022D0; // type:function size:0x1E8
updateSE__8stEmblemFf = .text:0x000024B8; // type:function size:0xF4
isEventEnd__8stEmblemFiPiPi = .text:0x000025AC; // type:function size:0x30
getFinalTechniqColor__8stEmblemFv = .text:0x000025DC; // type:function size:0x1C
startFighterEvent__5StageFv = .text:0x000025F8; // type:function size:0x4
initializeFighterAttackRatio__5StageFv = .text:0x000025FC; // type:function size:0x8
helperStarWarp__5StageFv = .text:0x00002604; // type:function size:0x8
isSimpleBossBattleMode__5StageFv = .text:0x0000260C; // type:function size:0x8
isBossBattleMode__5StageFv = .text:0x00002614; // type:function size:0x8
isCameraLocked__5StageFv = .text:0x0000261C; // type:function size:0x8
notifyTimmingGameStart__5StageFv = .text:0x00002624; // type:function size:0x4
getFrameRuleTime__5StageFv = .text:0x00002628; // type:function size:0x8
setFrameRuleTime__5StageFf = .text:0x00002630; // type:function size:0x8
isNextStepBgmEqualNowStepBgmFromFlag__5StageFv = .text:0x00002638; // type:function size:0x8
getBgmPlayOffsetFrame__5StageFv = .text:0x00002640; // type:function size:0xC
getBgmVolume__5StageFv = .text:0x0000264C; // type:function size:0xC
setBgmChange__5StageFfbUl = .text:0x00002658; // type:function size:0x10
getBgmChangeID__5StageFPUlPf = .text:0x00002668; // type:function size:0x14
isBgmChange__5StageFv = .text:0x0000267C; // type:function size:0x8
getBgmOptionID__5StageFv = .text:0x00002684; // type:function size:0x8
getNowStepBgmID__5StageFv = .text:0x0000268C; // type:function size:0x8
getBgmID__5StageFv = .text:0x00002694; // type:function size:0x8
getBgmID__5StageCFv = .text:0x0000269C; // type:function size:0x8
appearanceFighterLocal__5StageFv = .text:0x000026A4; // type:function size:0x4
getScrollDir__5StageFP5Vec3f = .text:0x000026A8; // type:function size:0x1C
getDefaultLightSetIndex__5StageFv = .text:0x000026C4; // type:function size:0x8
getAIRange__5StageFv = .text:0x000026CC; // type:function size:0x8
isAdventureStage__5StageFv = .text:0x000026D4; // type:function size:0x8
getPokeTrainerDrawLayer__5StageFv = .text:0x000026DC; // type:function size:0x8
getPokeTrainerPositionZ__5StageFv = .text:0x000026E4; // type:function size:0xC
getPokeTrainerPointData__5StageFPii = .text:0x000026F0; // type:function size:0x4
getPokeTrainerPointNum__5StageFv = .text:0x000026F4; // type:function size:0x8
isReStartSamePoint__7stMeleeFv = .text:0x000026FC; // type:function size:0x8
getWind2ndOnlyData__7stMeleeFv = .text:0x00002704; // type:function size:0x8
__sinit_\st_emblem_cpp = .text:0x0000270C; // type:function size:0x64
__dt__29stClassInfoImpl<25,8stEmblem>Fv = .text:0x00002770; // type:function size:0x74
create__29stClassInfoImpl<25,8stEmblem>Fv = .text:0x000027E4; // type:function size:0x34
preload__29stClassInfoImpl<25,8stEmblem>Fv = .text:0x00002818; // type:function size:0x4
_prolog = .text:0x0000281C; // type:function size:0x48 scope:global
_epilog = .text:0x00002864; // type:function size:0x48 scope:global
_unresolved = .text:0x000028AC; // type:function size:0xC scope:global
Expand Down Expand Up @@ -83,33 +82,33 @@ lbl_64_data_13C = .data:0x0000013C; // type:object size:0x6 data:string
lbl_64_data_144 = .data:0x00000144; // type:object size:0x6 data:string
lbl_64_data_14C = .data:0x0000014C; // type:object size:0x6 data:string
lbl_64_data_154 = .data:0x00000154; // type:object size:0x6C
lbl_64_data_1C0 = .data:0x000001C0; // type:object size:0x220
__vt__8stEmblem = .data:0x000001C0; // type:object size:0x220
lbl_64_data_3E0 = .data:0x000003E0; // type:object size:0x9 data:string
lbl_64_data_3EC = .data:0x000003EC; // type:object size:0x24
lbl_64_data_410 = .data:0x00000410; // type:object size:0x8
lbl_64_data_418 = .data:0x00000418; // type:object size:0xC
__RTTI__8stEmblem = .data:0x00000410; // type:object size:0x8
__vt__Q28StSeUtil18SeSeqInstance<2,2> = .data:0x00000418; // type:object size:0xC
lbl_64_data_424 = .data:0x00000424; // type:object size:0x1E data:string
lbl_64_data_444 = .data:0x00000444; // type:object size:0xC
lbl_64_data_450 = .data:0x00000450; // type:object size:0x8
__RTTI__Q28StSeUtil18SeSeqInstance<2,2> = .data:0x00000450; // type:object size:0x8
lbl_64_data_458 = .data:0x00000458; // type:object size:0x10 data:string
lbl_64_data_468 = .data:0x00000468; // type:object size:0x8
__RTTI__Q28StSeUtil5SeSeq = .data:0x00000468; // type:object size:0x8
lbl_64_data_470 = .data:0x00000470; // type:object size:0x8 data:string
lbl_64_data_478 = .data:0x00000478; // type:object size:0x20
lbl_64_data_498 = .data:0x00000498; // type:object size:0x8
__RTTI__7stMelee = .data:0x00000498; // type:object size:0x8
lbl_64_data_4A0 = .data:0x000004A0; // type:object size:0x10 data:string
lbl_64_data_4B0 = .data:0x000004B0; // type:object size:0x18
lbl_64_data_4C8 = .data:0x000004C8; // type:object size:0x8
__RTTI__15stCommonGimmick = .data:0x000004C8; // type:object size:0x8
lbl_64_data_4D0 = .data:0x000004D0; // type:object size:0x6 data:string
lbl_64_data_4D8 = .data:0x000004D8; // type:object size:0x10
lbl_64_data_4E8 = .data:0x000004E8; // type:object size:0x8
__RTTI__5Stage = .data:0x000004E8; // type:object size:0x8
lbl_64_data_4F0 = .data:0x000004F0; // type:object size:0x7 data:string
lbl_64_data_4F8 = .data:0x000004F8; // type:object size:0x8
lbl_64_data_500 = .data:0x00000500; // type:object size:0x14
__RTTI__6gfTask = .data:0x000004F8; // type:object size:0x8
__vt__29stClassInfoImpl<25,8stEmblem> = .data:0x00000500; // type:object size:0x14
lbl_64_data_514 = .data:0x00000514; // type:object size:0x1E data:string
lbl_64_data_534 = .data:0x00000534; // type:object size:0xC
lbl_64_data_540 = .data:0x00000540; // type:object size:0x8
__RTTI__29stClassInfoImpl<25,8stEmblem> = .data:0x00000540; // type:object size:0x8
lbl_64_data_548 = .data:0x00000548; // type:object size:0xC data:string
lbl_64_data_558 = .data:0x00000558; // type:object size:0x8
__RTTI__11stClassInfo = .data:0x00000558; // type:object size:0x8
lbl_64_data_560 = .data:0x00000560; // type:object size:0xD scope:local align:4 data:string
HomeBtnIcon = .data:0x00000580; // type:object size:0x18C0 scope:global align:32
__global_destructor_chain = .bss:0x00000000; // type:object size:0x4 scope:global
Expand Down
4 changes: 3 additions & 1 deletion configure.py
Original file line number Diff line number Diff line change
Expand Up @@ -1139,7 +1139,9 @@ def MatchingFor(*versions):
"mw_version": config.linker_version,
"cflags": cflags_rel,
"host": False,
"objects": [],
"objects": [
Object(NonMatching, "mo_stage/st_emblem/st_emblem.cpp"),
],
},
{
"lib": "st_famicom",
Expand Down
122 changes: 122 additions & 0 deletions include/st_emblem/st_emblem.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,122 @@
#pragma once

#include <GX/GXTypes.h>
#include <memory.h>
#include <types.h>
#include <gf/gf_archive.h>
#include <gm/gm_lib.h>
#include <gr/gr_madein.h>
#include <gr/gr_tengan_event.h>
#include <mt/mt_prng.h>
#include <mt/mt_vector.h>
#include <nw4r/ut/ut_Color.h>
#include <snd/snd_id.h>
#include <st/se_util.h>
#include <st/stage.h>
#include <st/st_class_info.h>
#include <st/st_melee.h>

ST_CLASS_INFO

class stEmblem : public stMelee {
grTenganEvent m_scene_lifecycle;
grTenganEvent event2;
grTenganEvent m_curr_scene_effect;
grTenganEvent event4;
grTenganEvent m_curr_scene;
grTenganEvent eventArray[2];
u32 m_effects[14];
s32 m_scene_ground_num[0x5];
grMadein* m_scene_grounds[0x5];
bool m_change_scene;
bool m_not_first_scene;//: 1;
s32 m_scene_num;
s32 m_prev_scene_num;
float unk6f8;
u32 unk6fc[2];
u32 unk704[2];
u32 m_unused;
s32 unk710;
s32 ambientSnd;
float unk718;
float unk71C;
float unk720;
float unk724;
s32 unkSnd728;
float rockTimer;
float rockFixTime;
grCollision* unk734;
grCollision* unk738;
u8 m_isKemuriHigh;
float m_lampEffTimer;
u32 unk744;
s32 quakeSnd;
u8 m_eventType;
StSeUtil::SeSeqInstance<2, 2> m_se_player;
StSeUtil::SeSeqInstance<2, 2> m_se_player2;
u8 unk800;
float unk804;
float unk808;
//s32 m_great_fox_engine_se;
//snd3DGenerator m_great_fox_sndgen;
//snd3DGenerator m_pleiades_sndgen;
//Vec3f m_slope_rotate;
//u8 m_corneria_phase;

static const int SCENE_ASTEROID = 0;
static const int SCENE_BATTLESHIP = 1;
static const int SCENE_CORNERIA = 2;
static const int SCENE_SPACE = 3;

void setSceneCollision();
grMadein* createSceneGround(s16 index);
void moveGround(float param3,bool isStartHigh, Vec3f* pos);
void startScene();
void updateScene(float deltaFrame);
void updateScene00(float deltaFrame);
void updateScene01(float deltaFrame);
void updateScene02(float deltaFrame);
void startAppearCore();
public:
stEmblem();

virtual ~stEmblem();
virtual void createObj();
virtual bool loading();
virtual void update(float deltaFrame);
virtual void updateSE(float deltaFrame);
virtual bool checkChangeScene();
virtual void resetChangeScene();
virtual void setChangeSceneNumber(s32 n);

virtual bool isEventEnd(int param1, int* eventState, int* decision);
virtual GXColor getFinalTechniqColor();

static stEmblem* create();
static stClassInfoImpl<Stages::Emblem, stEmblem> bss_loc_14;
};

StSeUtil::UnkStruct data_loc_0[] = {
{snd_se_stage_Emblem_sutatue_break, 0.000, 0.000, 0.000},
{snd_se_stage_Emblem_floor_break, 0.000, 67.000, 0.000}
};

StSeUtil::UnkStruct data_loc_20[] = {
{snd_se_stage_Emblem_sutatue_break, 0.000, 0.000, 0.000},
{snd_se_stage_Emblem_floor_break, 0.000, 36.000, 0.000}
};

StSeUtil::UnkStruct data_loc_40[] = {
{snd_se_stage_Emblem_under_amb, 0.000, 0.000, 0.000},
};

SndID data_loc_11A0[] = {
snd_se_stage_Emblem_sutatue_break,
snd_se_stage_Emblem_floor_break
};

static const size_t SndSeqTable1Size = sizeof(data_loc_0)/sizeof(data_loc_0[0]);
static const size_t SndSeqTable2Size = sizeof(data_loc_40)/sizeof(data_loc_40[0]);
//static const size_t SndSeqTable3Size = sizeof(data_loc_980)/sizeof(data_loc_980[0]);
//static const size_t SndSeqTable4Size = sizeof(data_loc_9C0)/sizeof(data_loc_9C0[0]);
static const size_t SndIDTableSize = sizeof(data_loc_11A0)/sizeof(data_loc_11A0[0]);
Loading
Loading