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
6 changes: 6 additions & 0 deletions config/RSBE01_02/splits.txt
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,12 @@ sora/gf/gf_pad_thread.cpp:
.data start:0x80422E88 end:0x80422EA8
.sdata2 start:0x805A1550 end:0x805A1560

sora/gf/gf_scene_manager.cpp:
.text start:0x8002CB1C end:0x8002D8B8
.data start:0x80422EB8 end:0x80422EC8
.sdata start:0x8059C660 end:0x8059C668
.sbss start:0x805A0060 end:0x805A0064

sora/gf/gf_task.cpp:
.text start:0x8002D8B8 end:0x8002E09C
.data start:0x80422EC8 end:0x80422F6C
Expand Down
24 changes: 12 additions & 12 deletions config/RSBE01_02/symbols.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2147,7 +2147,7 @@ setUseCopyFB__11gfSceneRootFUc = .text:0x8000E1F8; // type:function size:0x1C
fn_8000E214 = .text:0x8000E214; // type:function size:0x37C
fn_8000E590 = .text:0x8000E590; // type:function size:0x18
fn_8000E5A8 = .text:0x8000E5A8; // type:function size:0x160
fn_8000E708 = .text:0x8000E708; // type:function size:0x8
resetLight__11gfSceneRootCFv = .text:0x8000E708; // type:function size:0x8
fn_8000E710 = .text:0x8000E710; // type:function size:0x9C
fn_8000E7AC = .text:0x8000E7AC; // type:function size:0x4
fn_8000E7B0 = .text:0x8000E7B0; // type:function size:0x7C
Expand Down Expand Up @@ -2281,7 +2281,7 @@ fn_80017BA4 = .text:0x80017BA4; // type:function size:0x94
fn_80017C38 = .text:0x80017C38; // type:function size:0x648
fn_80018280 = .text:0x80018280; // type:function size:0x24
fn_800182A4 = .text:0x800182A4; // type:function size:0x36C
fn_80018610 = .text:0x80018610; // type:function size:0x168
reset__8gfCameraFv = .text:0x80018610; // type:function size:0x168
calc__8gfCameraFv = .text:0x80018778; // type:function size:0x66C
setGX__8gfCameraFv = .text:0x80018DE4; // type:function size:0xE0
fn_80018EC4 = .text:0x80018EC4; // type:function size:0x5E8
Expand Down Expand Up @@ -2534,7 +2534,7 @@ loadModuleRequest__15gfModuleManagerFPQ215gfModuleManager17LoadRequestResultP15g
loadModuleRequestOnImage__15gfModuleManagerFPCcQ25Heaps8HeapTypeP14gfModuleHeaderPi = .text:0x80027060; // type:function size:0x2A0
isLoaded__15gfModuleManagerFPCc = .text:0x80027300; // type:function size:0x7C
destroy__15gfModuleManagerFPCc = .text:0x8002737C; // type:function size:0x154
fn_800274D0 = .text:0x800274D0; // type:function size:0x140
release__15gfModuleManagerFPCc = .text:0x800274D0; // type:function size:0x140
bind__16gfModelAnimationFPQ34nw4r3g3d6ScnMdlP16gfModelAnimation = .text:0x80027610; // type:function size:0x10C
bindNodeAnim__16gfModelAnimationFPQ34nw4r3g3d6ScnMdl = .text:0x8002771C; // type:function size:0x2C
bindVisibleAnim__16gfModelAnimationFPQ34nw4r3g3d6ScnMdl = .text:0x80027748; // type:function size:0x2C
Expand Down Expand Up @@ -2630,16 +2630,16 @@ create__14gfSceneManagerFv = .text:0x8002CFD0; // type:function size:0x48
getInstance__14gfSceneManagerFv = .text:0x8002D018; // type:function size:0x8
changeNextScene__14gfSceneManagerFv = .text:0x8002D020; // type:function size:0x13C
setModule__7gfSceneFv = .text:0x8002D15C; // type:function size:0x4
registScene__14gfSceneManagerFv = .text:0x8002D160; // type:function size:0x20
registSequence__14gfSceneManagerFv = .text:0x8002D180; // type:function size:0x20
registScene__14gfSceneManagerFP7gfScene = .text:0x8002D160; // type:function size:0x20
registSequence__14gfSceneManagerFP10gfSequence = .text:0x8002D180; // type:function size:0x20
process__14gfSceneManagerFv = .text:0x8002D1A0; // type:function size:0x18C
postProcess__14gfSceneManagerFv = .text:0x8002D32C; // type:function size:0xC8
searchScene__14gfSceneManagerFPCc = .text:0x8002D3F4; // type:function size:0x80
searchSequence__14gfSceneManagerFv = .text:0x8002D474; // type:function size:0x80
startSequence__14gfSceneManagerFv = .text:0x8002D4F4; // type:function size:0xB8
setNextScene__14gfSceneManagerFv = .text:0x8002D5AC; // type:function size:0x94
setNextSequence__14gfSceneManagerFv = .text:0x8002D640; // type:function size:0x94
setLoadModuleName__14gfSceneManagerFv = .text:0x8002D6D4; // type:function size:0x68
searchScene__14gfSceneManagerCFPCc = .text:0x8002D3F4; // type:function size:0x80
searchSequence__14gfSceneManagerCFPCc = .text:0x8002D474; // type:function size:0x80
startSequence__14gfSceneManagerFPCci = .text:0x8002D4F4; // type:function size:0xB8
setNextScene__14gfSceneManagerFPCci = .text:0x8002D5AC; // type:function size:0x94
setNextSequence__14gfSceneManagerFPCci = .text:0x8002D640; // type:function size:0x94
setLoadModuleName__14gfSceneManagerFPCcPCcbb = .text:0x8002D6D4; // type:function size:0x68
loadModule__14gfSceneManagerFv = .text:0x8002D73C; // type:function size:0x17C
__ct__6gfTaskFPCcQ26gfTask8Categoryiib = .text:0x8002D8B8; // type:function size:0x164
__dt__6gfTaskFv = .text:0x8002DA1C; // type:function size:0x104
Expand Down Expand Up @@ -30746,7 +30746,7 @@ lbl_805A0048 = .sbss:0x805A0048; // type:object size:0x8
lbl_805A0050 = .sbss:0x805A0050; // type:object size:0x8
lbl_805A0058 = .sbss:0x805A0058; // type:object size:0x4 data:4byte
lbl_805A005C = .sbss:0x805A005C; // type:object size:0x4 data:4byte
lbl_805A0060 = .sbss:0x805A0060; // type:object size:0x8 data:4byte
g_gfSceneManager = .sbss:0x805A0060; // type:object size:0x4 data:4byte
g_taskScheduler = .sbss:0x805A0068; // type:object size:0x4 align:8 data:4byte
lbl_805A0070 = .sbss:0x805A0070; // type:object size:0x8 align:8 data:4byte
lbl_805A0078 = .sbss:0x805A0078; // type:object size:0x8 data:4byte
Expand Down
1 change: 1 addition & 0 deletions configure.py
Original file line number Diff line number Diff line change
Expand Up @@ -877,6 +877,7 @@ def NW4RObject(completed, name, **options):
Object(Matching, "sora/gf/gf_memory_util.cpp"),
Object(Matching, "sora/gf/gf_pad_queue.cpp"),
Object(Matching, "sora/gf/gf_pad_thread.cpp", extra_cflags=["-RTTI off"]),
Object(Matching, "sora/gf/gf_scene_manager.cpp"),
Object(Matching, "sora/gf/gf_task.cpp"),
Object(NonMatching, "sora/gf/gf_task_scheduler.cpp"),
Object(Matching, "sora/gf/gf_thread.cpp"),
Expand Down
1 change: 1 addition & 0 deletions include/Brawl/Include/gf/gf_3d_scene.h
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ class gfSceneRoot : public gfTask {
virtual void renderDebug();
virtual ~gfSceneRoot();

void resetLight() const;
void setCurrentFrame(float);
void removeResAnmScn();
nw4r::g3d::LightObj* getLightObj(u8 p1);
Expand Down
1 change: 1 addition & 0 deletions include/Brawl/Include/gf/gf_camera.h
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ class gfCamera {
ProjectionType m_projectionType;
char _spacer4[48];

void reset();
void calc();
void setGX();
void calcProjection3Dto2D(Vec3f*, Vec2f*);
Expand Down
1 change: 1 addition & 0 deletions include/Brawl/Include/gf/gf_module.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ class gfModuleManager {
void destroy(const char* moduleName);
void loadModuleRequestOnImage(const char* moduleName, HeapType heapType, gfModuleHeader* moduleHeader, int* nodeSize);
bool isLoaded(const char* moduleName);
void release(const char* moduleName);
static void loadModuleRequest(LoadRequestResult*, gfModuleManager*, const char* moduleName, HeapType heapType, bool, bool);

static gfModuleManager* getInstance();
Expand Down
37 changes: 34 additions & 3 deletions include/Brawl/Include/gf/gf_scene.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,16 @@ static_assert(sizeof(gfSequence) == 8, "Class is wrong size!");

class gfSceneManager {
public:
struct LoadModuleInfo {
const char* m_moduleName;
const char* m_sceneName;
bool unk8;
u8 m_status;

LoadModuleInfo() : m_moduleName(nullptr), m_sceneName(nullptr), unk8(false), m_status(0) { }
};
static_assert(sizeof(LoadModuleInfo) == 0xC, "Class is wrong size!");

gfScene* m_prevScene;
gfScene* m_currentScene;
gfScene* m_nextScene;
Expand All @@ -38,13 +48,34 @@ class gfSceneManager {
gfSequence* m_sequences[50];
int m_sceneCount;
int m_sequenceCount;
char _spacer3[8];
bool unk278_b7 : 1;
bool unk278_b6 : 1;
gfScene* m_exitScene;
int m_memoryLayout; // 0x280
int unk1;
int processStep;
char _spacer4[148];
int m_sequenceStep;
LoadModuleInfo m_loadModules[11]; // 0x290
int m_loadState; // 0x314
int m_loadIndex;
int unk31c;

gfScene* searchScene(const char* sceneName);
gfSceneManager();
static gfSceneManager* create();
void changeNextScene();
int registScene(gfScene* scene);
int registSequence(gfSequence* sequence);
int process();
int postProcess();
gfScene* searchScene(const char* sceneName) const;
gfSequence* searchSequence(const char* sequenceName) const;
void startSequence(const char* sequenceName, int p2);
void setNextScene(const char* sceneName, int memoryLayout);
void setNextSequence(const char* sequenceName, int p2);
int setLoadModuleName(const char* moduleName, const char* sceneName, bool p3, bool p4);
bool loadModule();
static gfSceneManager* getInstance();
};
static_assert(sizeof(gfSceneManager) == 800, "Class is wrong size!");

extern gfSceneManager* g_gfSceneManager;
6 changes: 5 additions & 1 deletion include/Brawl/Include/gm/gm_lib.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,11 @@
#define MAX_PLAYERS 7

struct gmAppData {
char _0x0[0x30];
char _0x0[0x28];
bool unk28_b7 : 1;
bool unk28_b6 : 1;
bool unk28_b5 : 1;
char _0x29[7];
};
static_assert(sizeof(gmAppData) == 0x30, "Class is wrong size!");

Expand Down
20 changes: 12 additions & 8 deletions include/RSBE01.lst
Original file line number Diff line number Diff line change
Expand Up @@ -538,6 +538,7 @@ CC008000:WGPIPE
80018de4:setGX__gfCameraManagerFV
80019fa4:getManager__15gfCameraManagerFv
80019a2c:calcProjection3Dto2D__8gfCameraFP5Vec3fP5Vec2f
80018610:reset__8gfCameraFv

// gfModule
800264d8:create__8gfModuleFPvPvUl
Expand All @@ -550,6 +551,7 @@ CC008000:WGPIPE
80026c78:setTempolaryLoadHeap__15gfModuleManagerFQ25Heaps8HeapType
8002737c:destroy__15gfModuleManagerFPCc
80027300:isLoaded__15gfModuleManagerFPCc
800274D0:release__15gfModuleManagerFPCc

// gfModuleHeader
80026478:getTextSectionAddr__14gfModuleHeaderFv
Expand All @@ -559,21 +561,23 @@ CC008000:WGPIPE
8002cfd0:create__14gfSceneManagerFv
8002d018:getInstance__14gfSceneManagerFv
8002d020:changeNextScene__14gfSceneManagerFv
8002d160:registScene__14gfSceneManagerFv
8002d180:registSequence__14gfSceneManagerFv
8002d160:registScene__14gfSceneManagerFP7gfScene
8002d180:registSequence__14gfSceneManagerFP10gfSequence
8002d1a0:process__14gfSceneManagerFv
8002d32c:postProcess__14gfSceneManagerFv
8002d3f4:searchScene__14gfSceneManagerFPCc
8002d474:searchSequence__14gfSceneManagerFv
8002d4f4:startSequence__14gfSceneManagerFv
8002d5ac:setNextScene__14gfSceneManagerFv
8002d640:setNextSequence__14gfSceneManagerFv
8002d6d4:setLoadModuleName__14gfSceneManagerFv
8002d3f4:searchScene__14gfSceneManagerCFPCc
8002d474:searchSequence__14gfSceneManagerCFPCc
8002d4f4:startSequence__14gfSceneManagerFPCci
8002d5ac:setNextScene__14gfSceneManagerFPCci
8002d640:setNextSequence__14gfSceneManagerFPCci
8002d6d4:setLoadModuleName__14gfSceneManagerFPCcPCcbb
8002d73c:loadModule__14gfSceneManagerFv
805A0060:g_gfSceneManager

// gfSceneRoot
8000d818:setCurrentFrame__11gfSceneRootFf
8000d56c:removeResAnmScn__11gfSceneRootFv
8000E708:resetLight__11gfSceneRootCFv

// gfPadSystem
80028c58:__ct__11gfPadSystemFv
Expand Down
Loading
Loading