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
3 changes: 3 additions & 0 deletions config/RSBE01_02/splits.txt
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@ sora/gf/gf_camera_controller.cpp:
.data start:0x80420B88 end:0x80420BA0
.sdata start:0x8059C4F8 end:0x8059C500

sora/gf/gf_callback.cpp:
.text start:0x8001A3AC end:0x8001A48C

sora/gf/gf_keep_fb.cpp:
.text start:0x80024D6C end:0x80024E50

Expand Down
56 changes: 28 additions & 28 deletions config/RSBE01_02/symbols.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2301,7 +2301,7 @@ fn_8001A194 = .text:0x8001A194; // type:function size:0x210
draw__18gfCameraControllerFv = .text:0x8001A3A4; // type:function size:0x8
add__14gfCallBackListFP10gfCallBack = .text:0x8001A3AC; // type:function size:0x30
remove__14gfCallBackListFP10gfCallBack = .text:0x8001A3DC; // type:function size:0x64
fn_8001A440 = .text:0x8001A440; // type:function size:0x4C
process__14gfCallBackListFv = .text:0x8001A440; // type:function size:0x4C
fn_8001A48C = .text:0x8001A48C; // type:function size:0x134
gfDrawSetVtxPosColorPrimEnvironment__Fv = .text:0x8001A5C0; // type:function size:0x1EC
gfDrawSetVtxPosColorTexPrimEnvironment__Fv = .text:0x8001A7AC; // type:function size:0x1D4
Expand Down Expand Up @@ -17570,7 +17570,7 @@ lbl_80420518 = .rodata:0x80420518; // type:object size:0x28 data:4byte
lbl_80420540 = .rodata:0x80420540; // type:object size:0x28 data:4byte
EndofProgramInstruction$159 = .rodata:0x80420568; // type:object size:0x4 scope:local
lbl_8042056C = .rodata:0x8042056C; // type:object size:0x104
@58 = .data:0x80420680; // type:object size:0xD scope:local data:string
@60 = .data:0x80420680; // type:object size:0xD scope:local data:string
lbl_80420690 = .data:0x80420690; // type:object size:0xC
lbl_8042069C = .data:0x8042069C; // type:object size:0x14 data:string
lbl_804206B0 = .data:0x804206B0; // type:object size:0x64
Expand Down Expand Up @@ -17613,7 +17613,7 @@ jumptable_80420AE8 = .data:0x80420AE8; // type:object size:0x20 scope:local
lbl_80420B08 = .data:0x80420B08; // type:object size:0x64
lbl_80420B6C = .data:0x80420B6C; // type:object size:0xC
lbl_80420B78 = .data:0x80420B78; // type:object size:0x10
@241 = .data:0x80420B88; // type:object size:0x13 scope:local data:string
@243 = .data:0x80420B88; // type:object size:0x13 scope:local data:string
lbl_80420BA0 = .data:0x80420BA0; // type:object size:0x10
lbl_80420BB0 = .data:0x80420BB0; // type:object size:0x10
lbl_80420BC0 = .data:0x80420BC0; // type:object size:0x10
Expand Down Expand Up @@ -25386,8 +25386,8 @@ lbl_80454FD0 = .data:0x80454FD0; // type:object size:0x10
lbl_80454FE0 = .data:0x80454FE0; // type:object size:0x14
lbl_80454FF4 = .data:0x80454FF4; // type:object size:0xC
__vt__22cmMeleeFixedController = .data:0x80455000; // type:object size:0x10
@256 = .data:0x80455010; // type:object size:0x17 scope:local data:string
@257 = .data:0x80455028; // type:object size:0xC scope:local
@258 = .data:0x80455010; // type:object size:0x17 scope:local data:string
@259 = .data:0x80455028; // type:object size:0xC scope:local
lbl_80455038 = .data:0x80455038; // type:object size:0x10 data:4byte
lbl_80455048 = .data:0x80455048; // type:object size:0x10
lbl_80455058 = .data:0x80455058; // type:object size:0x14
Expand Down Expand Up @@ -26069,19 +26069,19 @@ __vt__10soNullable = .data:0x8045DDC4; // type:object size:0xC
lbl_8045DDD0 = .data:0x8045DDD0; // type:object size:0xC
lbl_8045DDDC = .data:0x8045DDDC; // type:object size:0x14 data:string
__vt__13acAnimCmdImpl = .data:0x8045DDF0; // type:object size:0x34
@868 = .data:0x8045DE24; // type:object size:0xE scope:local data:string
@869 = .data:0x8045DE34; // type:object size:0x14 scope:local
@888 = .data:0x8045DE24; // type:object size:0xE scope:local data:string
@889 = .data:0x8045DE34; // type:object size:0x14 scope:local
__vt__41soArrayContractibleTable<C12acCmdArgConv> = .data:0x8045DE48; // type:object size:0x30 scope:weak
@872 = .data:0x8045DE78; // type:object size:0x2D scope:local data:string
@873 = .data:0x8045DEA8; // type:object size:0x24 scope:local
@874 = .data:0x8045DED0; // type:object size:0x28 scope:local data:string
@875 = .data:0x8045DEF8; // type:object size:0x14 scope:local
@876 = .data:0x8045DF0C; // type:object size:0x21 scope:local data:string
@877 = .data:0x8045DF30; // type:object size:0xC scope:local
@878 = .data:0x8045DF3C; // type:object size:0x3C scope:local data:string
@892 = .data:0x8045DE78; // type:object size:0x2D scope:local data:string
@893 = .data:0x8045DEA8; // type:object size:0x24 scope:local
@894 = .data:0x8045DED0; // type:object size:0x28 scope:local data:string
@895 = .data:0x8045DEF8; // type:object size:0x14 scope:local
@896 = .data:0x8045DF0C; // type:object size:0x21 scope:local data:string
@897 = .data:0x8045DF30; // type:object size:0xC scope:local
@898 = .data:0x8045DF3C; // type:object size:0x3C scope:local data:string
__vt__13acAnimCmdNull = .data:0x8045DF78; // type:object size:0x34
@859 = .data:0x8045DFAC; // type:object size:0xE scope:local data:string
@860 = .data:0x8045DFBC; // type:object size:0x14 scope:local
@879 = .data:0x8045DFAC; // type:object size:0xE scope:local data:string
@880 = .data:0x8045DFBC; // type:object size:0x14 scope:local
lbl_8045DFD0 = .data:0x8045DFD0; // type:object size:0xC
lbl_8045DFDC = .data:0x8045DFDC; // type:object size:0xC
lbl_8045DFE8 = .data:0x8045DFE8; // type:object size:0x18
Expand Down Expand Up @@ -27938,8 +27938,8 @@ lbl_8049E588 = .bss:0x8049E588; // type:object size:0xC
lbl_8049E594 = .bss:0x8049E594; // type:object size:0xC data:4byte
lbl_8049E5A0 = .bss:0x8049E5A0; // type:object size:0x118
lbl_8049E6B8 = .bss:0x8049E6B8; // type:object size:0x358
@810 = .bss:0x8049EA10; // type:object size:0xC scope:local
@15 = .bss:0x8049EA20; // type:object size:0xC scope:local
@830 = .bss:0x8049EA10; // type:object size:0xC scope:local
@17 = .bss:0x8049EA20; // type:object size:0xC scope:local
lbl_8049EA30 = .bss:0x8049EA30; // type:object size:0x120
lbl_8049EB50 = .bss:0x8049EB50; // type:object size:0x80
lbl_8049EBD0 = .bss:0x8049EBD0; // type:object size:0x10
Expand Down Expand Up @@ -31833,12 +31833,12 @@ lbl_805A1734 = .sdata2:0x805A1734; // type:object size:0x4 align:4 data:float
lbl_805A1738 = .sdata2:0x805A1738; // type:object size:0x8 align:4 data:float
lbl_805A1740 = .sdata2:0x805A1740; // type:object size:0x4 align:4 data:float
lbl_805A1744 = .sdata2:0x805A1744; // type:object size:0x4 align:4 data:float
@105 = .sdata2:0x805A1748; // type:object size:0x8 scope:local align:8 data:double
@108 = .sdata2:0x805A1750; // type:object size:0x8 scope:local align:8 data:double
@111 = .sdata2:0x805A1758; // type:object size:0x8 scope:local align:8 data:double
@117 = .sdata2:0x805A1760; // type:object size:0x4 scope:local align:4 data:float
@124 = .sdata2:0x805A1764; // type:object size:0x4 scope:local align:4 data:float
@125 = .sdata2:0x805A1768; // type:object size:0x4 scope:local align:4 data:float
@107 = .sdata2:0x805A1748; // type:object size:0x8 scope:local align:8 data:double
@110 = .sdata2:0x805A1750; // type:object size:0x8 scope:local align:8 data:double
@113 = .sdata2:0x805A1758; // type:object size:0x8 scope:local align:8 data:double
@119 = .sdata2:0x805A1760; // type:object size:0x4 scope:local align:4 data:float
@126 = .sdata2:0x805A1764; // type:object size:0x4 scope:local align:4 data:float
@127 = .sdata2:0x805A1768; // type:object size:0x4 scope:local align:4 data:float
lbl_805A1770 = .sdata2:0x805A1770; // type:object size:0x4 align:4 data:float
lbl_805A1774 = .sdata2:0x805A1774; // type:object size:0x4 align:4 data:float
lbl_805A1778 = .sdata2:0x805A1778; // type:object size:0x4 align:4 data:float
Expand Down Expand Up @@ -32433,10 +32433,10 @@ lbl_805A21C0 = .sdata2:0x805A21C0; // type:object size:0x8 align:8 data:double
lbl_805A21C8 = .sdata2:0x805A21C8; // type:object size:0x4 align:4 data:float
lbl_805A21CC = .sdata2:0x805A21CC; // type:object size:0x4 align:4 data:float
lbl_805A21D0 = .sdata2:0x805A21D0; // type:object size:0x8 align:4 data:float
@1675 = .sdata2:0x805A21D8; // type:object size:0x4 scope:local align:4 data:float
@1676 = .sdata2:0x805A21DC; // type:object size:0x4 scope:local align:4 data:float
@1677 = .sdata2:0x805A21E0; // type:object size:0x4 scope:local align:4 data:float
@1678 = .sdata2:0x805A21E4; // type:object size:0x4 scope:local align:4 data:float
@1698 = .sdata2:0x805A21D8; // type:object size:0x4 scope:local align:4 data:float
@1699 = .sdata2:0x805A21DC; // type:object size:0x4 scope:local align:4 data:float
@1700 = .sdata2:0x805A21E0; // type:object size:0x4 scope:local align:4 data:float
@1701 = .sdata2:0x805A21E4; // type:object size:0x4 scope:local align:4 data:float
lbl_805A21E8 = .sdata2:0x805A21E8; // type:object size:0x8 align:4 data:float
lbl_805A21F0 = .sdata2:0x805A21F0; // type:object size:0x8
lbl_805A21F8 = .sdata2:0x805A21F8; // type:object size:0x8 align:8 data:double
Expand Down
1 change: 1 addition & 0 deletions configure.py
Original file line number Diff line number Diff line change
Expand Up @@ -294,6 +294,7 @@ def MatchingFor(*versions):
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"),
Object(Matching, "sora/gf/gf_callback.cpp"),
Object(Matching, "sora/gf/gf_keep_fb.cpp"),
Object(Matching, "sora/gf/gf_memory_util.cpp"),
Object(Matching, "sora/mt/mt_prng.cpp", extra_cflags=["-RTTI off"]),
Expand Down
46 changes: 46 additions & 0 deletions src/sora/gf/gf_callback.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
#include <gf/gf_callback.h>
#include <types.h>

void gfCallBackList::add(gfCallBack* cb) {
gfCallBack* curr = m_head;
if (!curr) {
m_head = cb;
return;
}
while (curr->m_next) {
curr = curr->m_next;
}
curr->m_next = cb;
}

// BUG: This function loops infinitely if cb is neither the first nor
// second node in the linked list
bool gfCallBackList::remove(gfCallBack* cb) {
gfCallBack* curr = m_head;
bool found = true;
if (m_head == cb) {
m_head = cb->m_next;
} else {
found = false;
if (curr == cb) {
curr = nullptr;
}
while (curr) {
if (curr->m_next == cb) {
break;
}
}
if (curr) {
found = true;
curr->m_next = cb->m_next;
cb->m_next = nullptr;
}
}
return found;
}

void gfCallBackList::process() {
for (gfCallBack* curr = m_head; curr; curr = curr->m_next) {
curr->userProc();
}
}