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
5 changes: 5 additions & 0 deletions config/RSBE01_02/splits.txt
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,11 @@ sora/gf/gf_keep_fb.cpp:
sora/gf/gf_memory_util.cpp:
.text start:0x80026474 end:0x80026478

sora/gf/gf_system_callback.cpp:
.text start:0x80038684 end:0x800387AC
.ctors start:0x80406508 end:0x8040650C
.sbss start:0x805A00A0 end:0x805A00A8

sora/mt/mt_prng.cpp:
.text start:0x8003FABC end:0x8003FD5C
.ctors start:0x80406510 end:0x80406514
Expand Down
10 changes: 5 additions & 5 deletions config/RSBE01_02/symbols.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2810,10 +2810,10 @@ fn_80038254 = .text:0x80038254; // type:function size:0x278
fn_800384CC = .text:0x800384CC; // type:function size:0x90
fn_8003855C = .text:0x8003855C; // type:function size:0x14
fn_80038570 = .text:0x80038570; // type:function size:0x114
fn_80038684 = .text:0x80038684; // type:function size:0x30
fn_800386B4 = .text:0x800386B4; // type:function size:0x68
fn_8003871C = .text:0x8003871C; // type:function size:0x74
fn_80038790 = .text:0x80038790; // type:function size:0x1C
add__26gfReturnStatusCallbackListFP22gfReturnStatusCallback = .text:0x80038684; // type:function size:0x30
remove__26gfReturnStatusCallbackListFP22gfReturnStatusCallback = .text:0x800386B4; // type:function size:0x68
process__26gfReturnStatusCallbackListCFv = .text:0x8003871C; // type:function size:0x74
__sinit_\gf_system_callback_cpp = .text:0x80038790; // type:function size:0x1C scope:local
fn_800387AC = .text:0x800387AC; // type:function size:0xE4
fn_80038890 = .text:0x80038890; // type:function size:0x40
fn_800388D0 = .text:0x800388D0; // type:function size:0xB4
Expand Down Expand Up @@ -30654,7 +30654,7 @@ lbl_805A0080 = .sbss:0x805A0080; // type:object size:0x8 data:byte
lbl_805A0088 = .sbss:0x805A0088; // type:object size:0x8 data:4byte
lbl_805A0090 = .sbss:0x805A0090; // type:object size:0x8 data:4byte
lbl_805A0098 = .sbss:0x805A0098; // type:object size:0x8 data:4byte
lbl_805A00A0 = .sbss:0x805A00A0; // type:object size:0x8 data:4byte
g_unk805a00a0__32@unnamed@gf_system_callback_cpp@ = .sbss:0x805A00A0; // type:object size:0x8 scope:local data:4byte
lbl_805A00A8 = .sbss:0x805A00A8; // type:object size:0x2 data:2byte
lbl_805A00AA = .sbss:0x805A00AA; // type:object size:0x6 data:2byte
lbl_805A00B0 = .sbss:0x805A00B0; // 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 @@ -292,6 +292,7 @@ def MatchingFor(*versions):
Object(Matching, "sora/main.cpp"),
Object(Matching, "sora/gf/gf_3d_scene_event.cpp"),
Object(Matching, "sora/gf/gf_3d_scene_light_resource.cpp"),
Object(Matching, "sora/gf/gf_system_callback.cpp"),
Object(Matching, "sora/gf/gf_archive_load_thread.cpp"),
Object(Matching, "sora/gf/gf_archive_file.cpp"),
Object(Matching, "sora/gf/gf_camera_controller.cpp"),
Expand Down
2 changes: 1 addition & 1 deletion include/lib/BrawlHeaders
4 changes: 3 additions & 1 deletion include/st_starfox/st_starfox.h
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
#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_vector.h>
#include <nw4r/ut/ut_Color.h>
#include <snd/snd_id.h>
#include <st/se_util.h>
#include <st/stage.h>
Expand Down Expand Up @@ -68,7 +70,7 @@ class stStarfox : public stMelee {
virtual void resetChangeScene();
virtual void setChangeSceneNumber(s32 n);

virtual u32 getFinalTechniqColor() { return 0x14000496; }
virtual GXColor getFinalTechniqColor() { return nw4r::ut::Color(0x14000496); }
virtual IfSmashAppearTask* getAppearTask() { return m_smash_taunt_task; }
virtual bool isBamperVector() { return true; }
virtual int getPokeTrainerDrawLayer() { return 1; }
Expand Down
63 changes: 63 additions & 0 deletions src/sora/gf/gf_system_callback.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
#include <gf/gf_system_callback.h>
#include <types.h>

void gfReturnStatusCallbackList::add(gfReturnStatusCallback* node) {
if (!m_head) {
m_head = node;
} else {
gfReturnStatusCallback* curr = m_head;
while (curr->m_next) {
curr = curr->m_next;
}
curr->m_next = node;
}
}

bool gfReturnStatusCallbackList::remove(gfReturnStatusCallback* node) {
gfReturnStatusCallback* curr = m_head;
bool success = true;
if (curr == node) {
m_head = node->m_next;
} else {
success = false;
if (curr == node) {
curr = nullptr;
}
while (curr) {
if (curr->m_next == node) {
break;
}
curr = curr->m_next;
}
if (curr) {
curr->m_next = node->m_next;
node->m_next = nullptr;
success = true;
}
}
return success;
}

bool gfReturnStatusCallbackList::process() const {
bool allSuccess = true;
gfReturnStatusCallback* curr = m_head;
while (curr) {
bool res = curr->returnStatus();
curr = curr->m_next;
allSuccess = (allSuccess && res);
}
return allSuccess;
}

namespace {
struct UnusedClass {
u32 a : 8;
u32 b : 8;
u32 c : 8;
u32 d : 8;
u32 y;
UnusedClass() : b(0), y(0) { }
};

UnusedClass g_unk805a00a0;
}