Skip to content
Open
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
2 changes: 1 addition & 1 deletion config/RSBE01_02/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
7 changes: 7 additions & 0 deletions config/RSBE01_02/rels/st_greenhill/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_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
Expand Down
254 changes: 141 additions & 113 deletions config/RSBE01_02/rels/st_greenhill/symbols.txt

Large diffs are not rendered by default.

4 changes: 3 additions & 1 deletion configure.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
84 changes: 84 additions & 0 deletions include/st_greenhill/gr_greenhill.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
#pragma once

#include <gr/gr_yakumono.h>

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);
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 {
u8 unk158[0xC];
u8* unk164;
u8* unk168;
u8 unk16C;

public:
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 {
u8 unk158[4];
u8* unk15C;
u8* unk160;
Vec3f* unk164;

public:
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);
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);
virtual void updateActive(float deltaFrame);
virtual void setMotion(u32 index, bool loop, bool force, float* frameCount);
virtual void setGuestData(GreenhillGuestData* data) { unk158 = data; }
};
64 changes: 64 additions & 0 deletions include/st_greenhill/st_greenhill.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
#pragma once

#include <mt/mt_matrix.h>
#include <st/st_class_info.h>
#include <st/st_melee.h>

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<typename T>
class stClassInfoImpl<Stages::GreenHill, T> : 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 createObjBg();
virtual void createObjBreak();
virtual void createObjMarker();
virtual void createObjGuest();
virtual void updateGuest(float deltaFrame);

static stGreenhill* create();
static stClassInfoImpl<Stages::GreenHill, stGreenhill> bss_loc_14;
};
static_assert(sizeof(stGreenhill) == 0x2C4, "Class is wrong size!");
Loading