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
2 changes: 1 addition & 1 deletion config/RSBE01_02/rels/sora_adv_menu_difficulty/symbols.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
fn_32_0 = .text:0x00000000; // type:function size:0x94
create__19muAdvDifficultyTaskFPC24muAdvDifficultyTaskParam = .text:0x00000000; // type:function size:0x94
fn_32_94 = .text:0x00000094; // type:function size:0x19C
fn_32_230 = .text:0x00000230; // type:function size:0x34
fn_32_264 = .text:0x00000264; // type:function size:0x40
Expand Down
5 changes: 5 additions & 0 deletions config/RSBE01_02/rels/sora_scene/splits.txt
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,11 @@ mo_scene/sora_scene/sc_adv_selchar.cpp:
.text start:0x0001BFDC end:0x0001C084
.data start:0x00005D50 end:0x00005DA0

mo_scene/sora_scene/sc_adv_diff.cpp:
.text start:0x0001C4A8 end:0x0001C668
.rodata start:0x000008C0 end:0x000008D0
.data start:0x00005E48 end:0x00005F50

mo_scene/mo_scene.cpp:
.text start:0x0003D4B8 end:0x0003D588
.data start:0x00009C30 end:0x00009C3D
Expand Down
15 changes: 8 additions & 7 deletions config/RSBE01_02/rels/sora_scene/symbols.txt
Original file line number Diff line number Diff line change
Expand Up @@ -370,11 +370,11 @@ fn_1_1C358 = .text:0x0001C358; // type:function size:0x4
fn_1_1C35C = .text:0x0001C35C; // type:function size:0xAC
fn_1_1C408 = .text:0x0001C408; // type:function size:0x58
fn_1_1C460 = .text:0x0001C460; // type:function size:0x48
fn_1_1C4A8 = .text:0x0001C4A8; // type:function size:0x50
fn_1_1C4F8 = .text:0x0001C4F8; // type:function size:0x10
fn_1_1C508 = .text:0x0001C508; // type:function size:0x60
fn_1_1C568 = .text:0x0001C568; // type:function size:0xA8
fn_1_1C610 = .text:0x0001C610; // type:function size:0x58
create__9scAdvDiffFv = .text:0x0001C4A8; // type:function size:0x50
setModule__9scAdvDiffFv = .text:0x0001C4F8; // type:function size:0x10
start__9scAdvDiffFv = .text:0x0001C508; // type:function size:0x60
process__9scAdvDiffFv = .text:0x0001C568; // type:function size:0xA8
exit__9scAdvDiffFv = .text:0x0001C610; // type:function size:0x58
fn_1_1C668 = .text:0x0001C668; // type:function size:0x60
fn_1_1C6C8 = .text:0x0001C6C8; // type:function size:0x4C
fn_1_1C714 = .text:0x0001C714; // type:function size:0xD4
Expand Down Expand Up @@ -1353,10 +1353,11 @@ lbl_1_data_5E80 = .data:0x00005E80; // type:object size:0x5 data:string
lbl_1_data_5E88 = .data:0x00005E88; // type:object size:0x7 data:string
lbl_1_data_5E90 = .data:0x00005E90; // type:object size:0x5 data:string
lbl_1_data_5E98 = .data:0x00005E98; // type:object size:0x58
lbl_1_data_5EF0 = .data:0x00005EF0; // type:object size:0x18
__vt__9scAdvDiff = .data:0x00005EF0; // type:object size:0x18
lbl_1_data_5F08 = .data:0x00005F08; // type:object size:0xA data:string
lbl_1_data_5F14 = .data:0x00005F14; // type:object size:0xC
lbl_1_data_5F20 = .data:0x00005F20; // type:object size:0x30
__RTTI__9scAdvDiff = .data:0x00005F20; // type:object size:0x8
lbl_1_data_5F28 = .data:0x00005F28; // type:object size:0x28
lbl_1_data_5F50 = .data:0x00005F50; // type:object size:0xA data:string
lbl_1_data_5F5C = .data:0x00005F5C; // type:object size:0x17 data:string
lbl_1_data_5F74 = .data:0x00005F74; // type:object size:0x1D data:string
Expand Down
1 change: 1 addition & 0 deletions configure.py
Original file line number Diff line number Diff line change
Expand Up @@ -981,6 +981,7 @@ def MatchingFor(*versions):
Object(Matching, "mo_scene/sora_scene/sc_seal_list.cpp"),
Object(Matching, "mo_scene/sora_scene/sc_net_time_result.cpp"),
Object(Matching, "mo_scene/sora_scene/sc_adv_selchar.cpp"),
Object(Matching, "mo_scene/sora_scene/sc_adv_diff.cpp"),
Object(Matching, "mo_scene/mo_scene.cpp"),
],
},
Expand Down
69 changes: 69 additions & 0 deletions src/mo_scene/sora_scene/sc_adv_diff.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
#include <gf/gf_application.h>
#include <gf/gf_scene.h>
#include <gf/gf_task.h>
#include <gm/gm_global.h>
#include <sc/sc_adv_diff.h>
#include <sr/sr_common.h>
#include <types.h>

scAdvDiff* scAdvDiff::create() {
return new (Heaps::GlobalMode) scAdvDiff("scAdvDiff");
}

void scAdvDiff::setModule() {
setLoadModule("sora_adv_menu_difficulty.rel", false);
}

#pragma push
#pragma section ".rodata" ".rodata"
__declspec(section ".rodata") static muAdvDifficultyTaskParam g_TaskParam = { 2, 0, 1 };
#pragma pop

void scAdvDiff::start() {
muAdvDifficultyTaskParam param = g_TaskParam;
m_task = muAdvDifficultyTask::create(&param);
g_gfApplication->unkD0.endKeepScreen();
}

static const char* g_DiffTable[] = {
"Very easy",
"Easy",
"Normal",
"Hard",
"Very hard",
};

s32 scAdvDiff::process() {
bool r5 = false;
if (m_task) {
switch (m_task->m_option) {
case 0:
break;
case 1:
OSReport("selected difficulty = %s\n", g_DiffTable[m_task->m_difficulty]);
r5 = true;
break;
case 2:
OSReport("difficulty select canceled\n");
r5 = true;
break;
default:
break;
}
if (r5) {
gfSceneManager* mgr = gfSceneManager::getInstance();
mgr->unk1 = 0;
mgr->processStep = 2;
}
}
return 0;
}

s32 scAdvDiff::exit() {
if (m_task) {
m_task->exit();
m_task = nullptr;
}
g_gfApplication->unkD0.startKeepScreen();
return 0;
}
Loading