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
11 changes: 11 additions & 0 deletions config/RSBE01_02/splits.txt
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,11 @@ sora/gf/gf_system_callback.cpp:
.ctors start:0x80406508 end:0x8040650C
.sbss start:0x805A00A0 end:0x805A00A8

sora/gf/gf_capture_util.cpp:
.text start:0x800387AC end:0x80038890
.data start:0x80423518 end:0x80423550
.sdata start:0x8059C6B0 end:0x8059C6B8

sora/gf/gf_monitor.cpp:
.text start:0x8003D794 end:0x8003D864
.data start:0x8042ADD0 end:0x8042AE08
Expand Down Expand Up @@ -116,6 +121,12 @@ sora/cm/cm_controller_default.cpp:
.text start:0x8009F560 end:0x8009F564
.data start:0x80454CC0 end:0x80454CD0

sora/cm/cm_controller_menu_fixed.cpp:
.text start:0x800A68C0 end:0x800A6A78
.data start:0x80454ED8 end:0x80454F10
.sdata start:0x8059DEB8 end:0x8059DEC0
.sdata2 start:0x805A2048 end:0x805A2058

sora/cm/cm_controller_melee_fixed.cpp:
.text start:0x800AA998 end:0x800AA9F8
.data start:0x80455000 end:0x80455038
Expand Down
20 changes: 10 additions & 10 deletions config/RSBE01_02/symbols.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2814,7 +2814,7 @@ add__26gfReturnStatusCallbackListFP22gfReturnStatusCallback = .text:0x80038684;
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
run__16gfJpegEncodeWorkFv = .text:0x800387AC; // type:function size:0xE4
fn_80038890 = .text:0x80038890; // type:function size:0x40
fn_800388D0 = .text:0x800388D0; // type:function size:0xB4
fn_80038984 = .text:0x80038984; // type:function size:0x144
Expand Down Expand Up @@ -4278,9 +4278,9 @@ fn_800A6598 = .text:0x800A6598; // type:function size:0x50
fn_800A65E8 = .text:0x800A65E8; // type:function size:0x3C
fn_800A6624 = .text:0x800A6624; // type:function size:0x44
fn_800A6668 = .text:0x800A6668; // type:function size:0x258
fn_800A68C0 = .text:0x800A68C0; // type:function size:0x44
fn_800A6904 = .text:0x800A6904; // type:function size:0x3C
fn_800A6940 = .text:0x800A6940; // type:function size:0x6C
__ct__21cmMenuFixedControllerFv = .text:0x800A68C0; // type:function size:0x44
storeDefault__21cmMenuFixedControllerFv = .text:0x800A6904; // type:function size:0x3C
init__21cmMenuFixedControllerFv = .text:0x800A6940; // type:function size:0x6C
fn_800A69AC = .text:0x800A69AC; // type:function size:0xCC
fn_800A6A78 = .text:0x800A6A78; // type:function size:0x1C
fn_800A6A94 = .text:0x800A6A94; // type:function size:0x40
Expand Down Expand Up @@ -10856,8 +10856,8 @@ fn_80260074 = .text:0x80260074; // type:function size:0x124
fn_80260198 = .text:0x80260198; // type:function size:0x104
fn_8026029C = .text:0x8026029C; // type:function size:0xE0
fn_8026037C = .text:0x8026037C; // type:function size:0xE0
fn_8026045C = .text:0x8026045C; // type:function size:0x184
fn_802605E0 = .text:0x802605E0; // type:function size:0x150
TMCCJPEGEncGetQFactor = .text:0x8026045C; // type:function size:0x184
TMCCJPEGEncEncode = .text:0x802605E0; // type:function size:0x150
fn_80260730 = .text:0x80260730; // type:function size:0x18C
fn_802608BC = .text:0x802608BC; // type:function size:0x1E8
fn_80260AA4 = .text:0x80260AA4; // type:function size:0x320
Expand Down Expand Up @@ -17787,7 +17787,7 @@ lbl_804233D0 = .data:0x804233D0; // type:object size:0x18
lbl_804233E8 = .data:0x804233E8; // type:object size:0x40
lbl_80423428 = .data:0x80423428; // type:object size:0x60
lbl_80423488 = .data:0x80423488; // type:object size:0x90
lbl_80423518 = .data:0x80423518; // type:object size:0xC
__vt__16gfJpegEncodeWork = .data:0x80423518; // type:object size:0xC
lbl_80423524 = .data:0x80423524; // type:object size:0x14
lbl_80423538 = .data:0x80423538; // type:object size:0x18
lbl_80423550 = .data:0x80423550; // type:object size:0x10
Expand Down Expand Up @@ -25367,7 +25367,7 @@ lbl_80454E98 = .data:0x80454E98; // type:object size:0x10
lbl_80454EA8 = .data:0x80454EA8; // type:object size:0x10
lbl_80454EB8 = .data:0x80454EB8; // type:object size:0x14 data:string
lbl_80454ECC = .data:0x80454ECC; // type:object size:0xC
lbl_80454ED8 = .data:0x80454ED8; // type:object size:0x10
__vt__21cmMenuFixedController = .data:0x80454ED8; // type:object size:0x10
lbl_80454EE8 = .data:0x80454EE8; // type:object size:0x18
lbl_80454F00 = .data:0x80454F00; // type:object size:0x10
lbl_80454F10 = .data:0x80454F10; // type:object size:0xC data:4byte
Expand Down Expand Up @@ -28489,7 +28489,7 @@ lbl_8059C690 = .sdata:0x8059C690; // type:object size:0x8 data:byte
lbl_8059C698 = .sdata:0x8059C698; // type:object size:0x8
lbl_8059C6A0 = .sdata:0x8059C6A0; // type:object size:0x8
lbl_8059C6A8 = .sdata:0x8059C6A8; // type:object size:0x8
lbl_8059C6B0 = .sdata:0x8059C6B0; // type:object size:0x8
__RTTI__16gfJpegEncodeWork = .sdata:0x8059C6B0; // type:object size:0x8
lbl_8059C6B8 = .sdata:0x8059C6B8; // type:object size:0x4
lbl_8059C6BC = .sdata:0x8059C6BC; // type:object size:0x4
lbl_8059C6C0 = .sdata:0x8059C6C0; // type:object size:0x4
Expand Down Expand Up @@ -29285,7 +29285,7 @@ lbl_8059DE98 = .sdata:0x8059DE98; // type:object size:0x8 data:4byte
lbl_8059DEA0 = .sdata:0x8059DEA0; // type:object size:0x8 data:4byte
lbl_8059DEA8 = .sdata:0x8059DEA8; // type:object size:0x8
lbl_8059DEB0 = .sdata:0x8059DEB0; // type:object size:0x8
lbl_8059DEB8 = .sdata:0x8059DEB8; // type:object size:0x8
__RTTI__21cmMenuFixedController = .sdata:0x8059DEB8; // type:object size:0x8
lbl_8059DEC0 = .sdata:0x8059DEC0; // type:object size:0x8
lbl_8059DEC8 = .sdata:0x8059DEC8; // type:object size:0x8
lbl_8059DED0 = .sdata:0x8059DED0; // type:object size:0x8
Expand Down
2 changes: 2 additions & 0 deletions configure.py
Original file line number Diff line number Diff line change
Expand Up @@ -304,6 +304,7 @@ def MatchingFor(*versions):
Object(NonMatching, "sora/gf/gf_task_scheduler.cpp"),
Object(Matching, "sora/gf/gf_thread.cpp"),
Object(Matching, "sora/gf/gf_system_callback.cpp"),
Object(Matching, "sora/gf/gf_capture_util.cpp"),
Object(Matching, "sora/gf/gf_monitor.cpp"),
Object(Matching, "sora/gf/gf_resource_loader.cpp"),
Object(Matching, "sora/mt/mt_prng.cpp", extra_cflags=["-RTTI off"]),
Expand All @@ -312,6 +313,7 @@ def MatchingFor(*versions):
Object(Matching, "sora/ef/ef_screen_handle.cpp"),
Object(Matching, "sora/snd/snd_init_thread.cpp"),
Object(Matching, "sora/cm/cm_controller_default.cpp", extra_cflags=["-RTTI off"]),
Object(NonMatching, "sora/cm/cm_controller_menu_fixed.cpp"),
Object(Matching, "sora/cm/cm_controller_melee_fixed.cpp"),
Object(Matching, "sora/cm/cm_stage_param.cpp"),
Object(NonMatching, "sora/ty/ty_fig_listmng.cpp"),
Expand Down
52 changes: 52 additions & 0 deletions src/sora/cm/cm_controller_menu_fixed.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
#include <StaticAssert.h>
#include <gf/gf_camera.h>
#include <gf/gf_camera_controller.h>
#include <types.h>

class cmMenuFixedController : public gfCameraController {
bool unk8 : 1;
float unkC;
Vec3f unk10;
float unk1C;
public:
cmMenuFixedController();
void storeDefault();
void init();
virtual void update(float);
};
static_assert(sizeof(cmMenuFixedController) == 0x20, "Class is wrong size!");

cmMenuFixedController::cmMenuFixedController() : gfCameraController() {
unkC = 68.0f;
unk1C = 0.69813f;
unk8 = false;
unk10.m_x = 0.0f;
unk10.m_y = 0.0f;
unk10.m_z = 0.0f;
}

void cmMenuFixedController::storeDefault() {
unkC = m_cameraManager->m_cameras[0].unkCC;
unk10.m_x = m_cameraManager->m_cameras[0].m_targetPos.m_x;
unk10.m_y = m_cameraManager->m_cameras[0].m_targetPos.m_y;
unk10.m_z = m_cameraManager->m_cameras[0].m_targetPos.m_z;
unk1C = m_cameraManager->m_cameras[0].unkD0;
unk8 = true;
}

// NONMATCHING
void cmMenuFixedController::init() {
m_cameraManager->m_cameras[0].unkCC = unkC;
m_cameraManager->m_cameras[0].unkFA.m_flag7 = true;
m_cameraManager->m_cameras[0].m_targetPos.m_x = unk10.m_x;
m_cameraManager->m_cameras[0].m_targetPos.m_y = unk10.m_y;
m_cameraManager->m_cameras[0].m_targetPos.m_z = unk10.m_z;
m_cameraManager->m_cameras[0].unkFA.m_flag1 = true;
m_cameraManager->m_cameras[0].unkD0 = unk1C;
m_cameraManager->m_cameras[0].m_rot.m_x = 0.0f;
m_cameraManager->m_cameras[0].m_rot.m_y = 0.0f;
m_cameraManager->m_cameras[0].m_rot.m_z = 0.0f;
m_cameraManager->m_cameras[0].unkFA.m_flag2 = true;
}

// TODO: cmMenuFixedController::update
19 changes: 19 additions & 0 deletions src/sora/gf/gf_capture_util.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#include <gf/gf_capture_util.h>
#include <gf/gf_heap_manager.h>
#include <revolution/TMCC_JPEG/encapi.h>
#include <sr/sr_common.h>

void gfJpegEncodeWork::run() {
void* r31 = gfHeapManager::alloc(unk340_2, 0x1C00);
unk340_1 = 1;
s32 local10;
do {
TMCCJPEGEncGetQFactor(r31, unk350, unk342, unk344, unk348, unk34C, &unk354, &local10);
if (unk354 > unk34C) {
unk34C -= 0x2800;
}
} while (unk354 > unk34C);
TMCCJPEGEncEncode(r31, unk350, unk342, unk344, unk348, local10, unk358, unk34C, &unk354);
gfHeapManager::free(r31);
unk340_1 = 2;
}
15 changes: 15 additions & 0 deletions src/sora/gf/gf_resource_loader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,21 @@
#include <sr/sr_common.h>
#include <types.h>

void* gfResourceLoader::load(HeapType heapTy, const char* path, gfArchive* archive, u32 size) {
m_allocSize = size;
m_rsrcPtr = gfHeapManager::alloc(heapTy, m_allocSize);
m_compressedRsrcPtr = static_cast<char*>(m_rsrcPtr) + m_allocSize - gfFileIO::getFileSize(path);
if (m_doCachedRead) {
readRequestCached(path, m_compressedRsrcPtr, 0, 0);
} else {
readRequest(path, m_compressedRsrcPtr, 0, 0);
}
m_heapTy = heapTy;
m_isLoaded = false;
m_archive = archive;
return m_rsrcPtr;
}

void* gfResourceLoader::loadResource(HeapType heapTy, const char* path, gfArchive* archive, u32 freeSpaceToLeave) {
return load(heapTy, path, archive, gfHeapManager::getMaxFreeSize(heapTy) - 0x800 - freeSpaceToLeave);
}
Expand Down