mirror of
https://github.com/zeldaret/tp
synced 2026-06-28 19:20:51 -04:00
various fixes / matches (#2052)
* some fixes in d/s, d_item, d_shop * fix for dKankyo_DayProc weak generation * d_cc_uty fix * some d_name / d_com_inf_game / f_op_actor_mng matches * fix some player inline virtuals * remove asm
This commit is contained in:
+58
-79
@@ -1,46 +1,22 @@
|
||||
//
|
||||
// Translation Unit: d/s/d_s_logo
|
||||
//
|
||||
/**
|
||||
* d_s_logo.cpp
|
||||
* Game Boot Logo's Display
|
||||
*/
|
||||
|
||||
#include "d/s/d_s_logo.h"
|
||||
#include "JSystem/JKernel/JKRAram.h"
|
||||
#include "JSystem/JKernel/JKRExpHeap.h"
|
||||
#include "c/c_dylink.h"
|
||||
#include "d/com/d_com_inf_game.h"
|
||||
#include "d/d_item.h"
|
||||
#include "d/d_procname.h"
|
||||
#include "d/map/d_map_path_dmap.h"
|
||||
#include "dolphin/vi.h"
|
||||
#include "m_Do/m_Do_Reset.h"
|
||||
#include "m_Do/m_Do_controller_pad.h"
|
||||
#include "m_Do/m_Do_graphic.h"
|
||||
#include "m_Do/m_Do_machine.h"
|
||||
#include "dolphin/os/OSRtc.h"
|
||||
#include "dolphin/vi.h"
|
||||
|
||||
//
|
||||
// Types:
|
||||
//
|
||||
|
||||
class dEnemyItem_c {
|
||||
public:
|
||||
static void setItemData(u8* data) { mData = data; }
|
||||
|
||||
static u8* mData;
|
||||
};
|
||||
|
||||
//
|
||||
// Forward References:
|
||||
//
|
||||
|
||||
//
|
||||
// External References:
|
||||
//
|
||||
|
||||
|
||||
//
|
||||
// Declarations:
|
||||
//
|
||||
|
||||
/* ############################################################################################## */
|
||||
/* 803C2E38-803C2E44 01FF58 000C+00 1/1 0/0 0/0 .data cNullVec__6Z2Calc */
|
||||
static u8 cNullVec__6Z2Calc[12] = {
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
@@ -75,7 +51,6 @@ void dScnLogo_c::preLoad_dyl_remove() {
|
||||
delete[] m_preLoad_dylPhase;
|
||||
}
|
||||
|
||||
/* ############################################################################################## */
|
||||
/* 80399FE0-80399FFC 026640 001C+00 1/1 0/0 0/0 .rodata l_preLoad_dylKeyTbl */
|
||||
static s16 const l_preLoad_dylKeyTbl[14] = {
|
||||
0x02DC, 0x02CE, 0x0221, 0x00F2, 0x021B, 0x02F4, 0x0139,
|
||||
@@ -84,13 +59,13 @@ static s16 const l_preLoad_dylKeyTbl[14] = {
|
||||
|
||||
/* 8025611C-80256198 250A5C 007C+00 2/2 0/0 0/0 .text preLoad_dyl__10dScnLogo_cFv */
|
||||
bool dScnLogo_c::preLoad_dyl() {
|
||||
bool ret = 1;
|
||||
bool ret = true;
|
||||
|
||||
for (int i = 0; i < 14; i++) {
|
||||
int link = cDylPhs::Link(&m_preLoad_dylPhase[i], l_preLoad_dylKeyTbl[i]);
|
||||
int phase_state = cDylPhs::Link(&m_preLoad_dylPhase[i], l_preLoad_dylKeyTbl[i]);
|
||||
|
||||
if (link != 4) {
|
||||
ret = 0;
|
||||
if (phase_state != cPhs_COMPLEATE_e) {
|
||||
ret = false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -100,7 +75,7 @@ bool dScnLogo_c::preLoad_dyl() {
|
||||
/* 80256198-80256210 250AD8 0078+00 1/1 0/0 0/0 .text checkProgSelect__10dScnLogo_cFv */
|
||||
void dScnLogo_c::checkProgSelect() {
|
||||
if (mDoRst::getProgSeqFlag() == 0 && VIGetDTVStatus() != 0) {
|
||||
if (isProgressiveMode() || mDoCPd_c::getHoldB(0)) {
|
||||
if (isProgressiveMode() || mDoCPd_c::getHoldB(PAD_1)) {
|
||||
field_0x20a = 1;
|
||||
field_0x209 = 0;
|
||||
}
|
||||
@@ -138,7 +113,7 @@ void dScnLogo_c::progSelDraw() {
|
||||
|
||||
if (field_0x20b == 0) {
|
||||
if (field_0x209 == 0) {
|
||||
if (mDoCPd_c::getHoldRight(0) || mDoCPd_c::getStickX(0) > 0.5f) {
|
||||
if (mDoCPd_c::getHoldRight(PAD_1) || mDoCPd_c::getStickX(PAD_1) > 0.5f) {
|
||||
mDoAud_seStart(Z2SE_SY_MENU_CURSOR_COMMON, NULL, 0, 0);
|
||||
field_0x209 = 1;
|
||||
field_0x20e = 30;
|
||||
@@ -146,7 +121,7 @@ void dScnLogo_c::progSelDraw() {
|
||||
field_0x212 = 0;
|
||||
}
|
||||
} else {
|
||||
if (mDoCPd_c::getHoldLeft(0) || mDoCPd_c::getStickX(0) < -0.5f) {
|
||||
if (mDoCPd_c::getHoldLeft(PAD_1) || mDoCPd_c::getStickX(PAD_1) < -0.5f) {
|
||||
mDoAud_seStart(Z2SE_SY_MENU_CURSOR_COMMON, NULL, 0, 0);
|
||||
field_0x209 = 0;
|
||||
field_0x20e = 30;
|
||||
@@ -326,10 +301,11 @@ void dScnLogo_c::warningDispDraw() {
|
||||
field_0x210--;
|
||||
}
|
||||
|
||||
if (mTimer == 0 ||
|
||||
mDoCPd_c::getTrig(PAD_1) & (CButton::A | CButton::B | CButton::X | CButton::Y | CButton::START |
|
||||
CButton::Z | CButton::L | CButton::R | CButton::DPAD_LEFT |
|
||||
CButton::DPAD_RIGHT | CButton::DPAD_DOWN | CButton::DPAD_UP)) {
|
||||
if (mTimer == 0 || mDoCPd_c::getTrig(PAD_1) &
|
||||
(CButton::A | CButton::B | CButton::X | CButton::Y | CButton::START |
|
||||
CButton::Z | CButton::L | CButton::R | CButton::DPAD_LEFT |
|
||||
CButton::DPAD_RIGHT | CButton::DPAD_DOWN | CButton::DPAD_UP))
|
||||
{
|
||||
mExecCommand = EXEC_WARNING_OUT;
|
||||
mTimer = 30;
|
||||
mDoGph_gInf_c::startFadeOut(30);
|
||||
@@ -394,10 +370,9 @@ void dScnLogo_c::dolbyOutDraw() {
|
||||
|
||||
/* 80257058-80257070 251998 0018+00 1/0 0/0 0/0 .text dolbyOutDraw2__10dScnLogo_cFv */
|
||||
void dScnLogo_c::dolbyOutDraw2() {
|
||||
if (mTimer != 0) {
|
||||
return;
|
||||
if (mTimer == 0) {
|
||||
mExecCommand = EXEC_DVD_WAIT;
|
||||
}
|
||||
mExecCommand = EXEC_DVD_WAIT;
|
||||
}
|
||||
|
||||
/* 80257070-80257284 2519B0 0214+00 1/0 0/0 0/0 .text dvdWaitDraw__10dScnLogo_cFv */
|
||||
@@ -412,7 +387,8 @@ void dScnLogo_c::dvdWaitDraw() {
|
||||
mpMsgResCommand[3]->sync() && mpMsgResCommand[4]->sync() &&
|
||||
mpMsgResCommand[5]->sync() && mpMsgResCommand[6]->sync() && mpFontResCommand->sync() &&
|
||||
mpMain2DCommand->sync() && mpRubyResCommand->sync() && mParticleCommand->sync() &&
|
||||
mItemTableCommand->sync() && mEnemyItemCommand->sync() && preLoad_dyl()) {
|
||||
mItemTableCommand->sync() && mEnemyItemCommand->sync() && preLoad_dyl())
|
||||
{
|
||||
mDoRst::setLogoScnFlag(0);
|
||||
mDoRst::setProgChgFlag(0);
|
||||
mExecCommand = EXEC_SCENE_CHANGE;
|
||||
@@ -515,53 +491,56 @@ dScnLogo_c::~dScnLogo_c() {
|
||||
}
|
||||
|
||||
/* 80257910-802579BC 252250 00AC+00 1/0 0/0 0/0 .text phase_0__FP10dScnLogo_c */
|
||||
static int phase_0(dScnLogo_c* logo) {
|
||||
static int phase_0(dScnLogo_c* i_this) {
|
||||
mDoGph_gInf_c::setFadeColor(*(JUtility::TColor*)&g_blackColor);
|
||||
dComIfGp_particle_create();
|
||||
|
||||
logo->buffer = mDoExt_getGameHeap()->alloc(0x340000, -0x10);
|
||||
logo->field_0x1d0 = JKRExpHeap::create(logo->buffer, 0x340000, NULL, false);
|
||||
logo->field_0x1d4 = JKRExpHeap::create(0x130000, logo->field_0x1d0, false);
|
||||
i_this->buffer = mDoExt_getGameHeap()->alloc(0x340000, -0x10);
|
||||
i_this->field_0x1d0 = JKRExpHeap::create(i_this->buffer, 0x340000, NULL, false);
|
||||
i_this->field_0x1d4 = JKRExpHeap::create(0x130000, i_this->field_0x1d0, false);
|
||||
|
||||
return 2;
|
||||
return cPhs_NEXT_e;
|
||||
}
|
||||
|
||||
/* 802579BC-80257A70 2522FC 00B4+00 1/0 0/0 0/0 .text phase_1__FP10dScnLogo_c */
|
||||
static int phase_1(dScnLogo_c* logo) {
|
||||
static int phase_1(dScnLogo_c* i_this) {
|
||||
if (!cDyl_InitAsyncIsDone()) {
|
||||
return 0;
|
||||
return cPhs_INIT_e;
|
||||
}
|
||||
|
||||
if (!mDoAud_zelAudio_c::isInitFlag() ||
|
||||
Z2AudioMgr::getInterface()->checkFirstWaves()) {
|
||||
return 0;
|
||||
if (!mDoAud_zelAudio_c::isInitFlag() || Z2AudioMgr::getInterface()->checkFirstWaves()) {
|
||||
return cPhs_INIT_e;
|
||||
}
|
||||
|
||||
dComIfG_setObjectRes("LogoUs", (u8)0, logo->field_0x1d0);
|
||||
dComIfG_setObjectRes("LogoUs", (u8)0, i_this->field_0x1d0);
|
||||
mDoRst::setLogoScnFlag(1);
|
||||
archiveHeap->dump_sort();
|
||||
return 2;
|
||||
return cPhs_NEXT_e;
|
||||
}
|
||||
|
||||
/* 80257A70-80257AB4 2523B0 0044+00 1/0 0/0 0/0 .text phase_2__FP10dScnLogo_c */
|
||||
static int phase_2(dScnLogo_c* param_0) {
|
||||
return dComIfG_syncAllObjectRes() ? 0 : 4;
|
||||
static int phase_2(dScnLogo_c* i_this) {
|
||||
if (dComIfG_syncAllObjectRes()) {
|
||||
return cPhs_INIT_e;
|
||||
} else {
|
||||
return cPhs_COMPLEATE_e;
|
||||
}
|
||||
}
|
||||
|
||||
/* 80257AB4-80257AE0 2523F4 002C+00 1/1 0/0 0/0 .text
|
||||
* resLoad__FP30request_of_phase_process_classP10dScnLogo_c */
|
||||
static int resLoad(request_of_phase_process_class* i_phase, dScnLogo_c* param_1) {
|
||||
static int resLoad(request_of_phase_process_class* i_phase, dScnLogo_c* i_this) {
|
||||
static int (*l_method[3])(void*) = {(int (*)(void*))phase_0, (int (*)(void*))phase_1,
|
||||
(int (*)(void*))phase_2};
|
||||
|
||||
return dComLbG_PhaseHandler(i_phase, l_method, param_1);
|
||||
return dComLbG_PhaseHandler(i_phase, l_method, i_this);
|
||||
}
|
||||
|
||||
/* 80257AE0-80257C64 252420 0184+00 1/1 0/0 0/0 .text create__10dScnLogo_cFv */
|
||||
int dScnLogo_c::create() {
|
||||
int stat = resLoad(&field_0x1c4, this);
|
||||
if (stat != 4) {
|
||||
return stat;
|
||||
int phase_state = resLoad(&field_0x1c4, this);
|
||||
if (phase_state != cPhs_COMPLEATE_e) {
|
||||
return phase_state;
|
||||
}
|
||||
|
||||
mpHeap = mDoExt_setCurrentHeap(field_0x1d4);
|
||||
@@ -596,7 +575,7 @@ int dScnLogo_c::create() {
|
||||
mDoRst::offReset();
|
||||
mDoRst::offResetPrepare();
|
||||
|
||||
return stat;
|
||||
return phase_state;
|
||||
}
|
||||
|
||||
/* 80257C64-80257FEC 2525A4 0388+00 1/1 0/0 0/0 .text logoInitGC__10dScnLogo_cFv */
|
||||
@@ -693,33 +672,33 @@ void dScnLogo_c::dvdDataLoad() {
|
||||
}
|
||||
|
||||
/* 80258420-80258444 252D60 0024+00 1/0 0/0 0/0 .text dScnLogo_Create__FP11scene_class */
|
||||
static int dScnLogo_Create(scene_class* scn) {
|
||||
return (new (scn) dScnLogo_c())->create();
|
||||
static int dScnLogo_Create(scene_class* i_this) {
|
||||
return (new (i_this) dScnLogo_c())->create();
|
||||
}
|
||||
|
||||
/* 80258444-80258484 252D84 0040+00 1/0 0/0 0/0 .text dScnLogo_Execute__FP10dScnLogo_c */
|
||||
static int dScnLogo_Execute(dScnLogo_c* logo) {
|
||||
static int dScnLogo_Execute(dScnLogo_c* i_this) {
|
||||
if (mDoRst::isReset()) {
|
||||
fopScnM_ChangeReq(logo, 9, 0, 5);
|
||||
fopScnM_ChangeReq(i_this, PROC_LOGO_SCENE, 0, 5);
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* 80258484-802584A8 252DC4 0024+00 1/0 0/0 0/0 .text dScnLogo_Draw__FP10dScnLogo_c */
|
||||
static int dScnLogo_Draw(dScnLogo_c* logo) {
|
||||
logo->draw();
|
||||
static int dScnLogo_Draw(dScnLogo_c* i_this) {
|
||||
i_this->draw();
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* 802584A8-802584D0 252DE8 0028+00 1/0 0/0 0/0 .text dScnLogo_Delete__FP10dScnLogo_c */
|
||||
static int dScnLogo_Delete(dScnLogo_c* logo) {
|
||||
logo->~dScnLogo_c();
|
||||
static int dScnLogo_Delete(dScnLogo_c* i_this) {
|
||||
i_this->~dScnLogo_c();
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* 802584D0-802584D8 252E10 0008+00 1/0 0/0 0/0 .text dScnLogo_IsDelete__FP10dScnLogo_c
|
||||
*/
|
||||
static int dScnLogo_IsDelete(dScnLogo_c* logo) {
|
||||
static int dScnLogo_IsDelete(dScnLogo_c* i_this) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -751,8 +730,10 @@ dLog_HIO_c::~dLog_HIO_c() {}
|
||||
|
||||
/* 803C2FD0-803C2FE4 -00001 0014+00 1/0 0/0 0/0 .data l_dScnLogo_Method */
|
||||
static dScnLogo_Method l_dScnLogo_Method[5] = {
|
||||
(dScnLogo_Method) dScnLogo_Create, dScnLogo_Delete,
|
||||
dScnLogo_Execute, dScnLogo_IsDelete,
|
||||
(dScnLogo_Method)dScnLogo_Create,
|
||||
dScnLogo_Delete,
|
||||
dScnLogo_Execute,
|
||||
dScnLogo_IsDelete,
|
||||
dScnLogo_Draw,
|
||||
};
|
||||
|
||||
@@ -770,5 +751,3 @@ extern scene_process_profile_definition g_profile_LOGO_SCENE = {
|
||||
(process_method_class*)&l_dScnLogo_Method,
|
||||
NULL,
|
||||
};
|
||||
|
||||
/* 80399FFC-80399FFC 02665C 0000+00 0/0 0/0 0/0 .rodata @stringBase0 */
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/**
|
||||
* d_s_menu.cpp
|
||||
* dolzel2 - Scene Menu
|
||||
* Debug Level Select Menu
|
||||
*/
|
||||
|
||||
#include "d/s/d_s_menu.h"
|
||||
@@ -8,8 +8,6 @@
|
||||
#include "f_pc/f_pc_leaf.h"
|
||||
#include "f_op/f_op_scene.h"
|
||||
|
||||
|
||||
/* ############################################################################################## */
|
||||
/* 803C3018-803C3040 -00001 0028+00 0/0 0/0 1/0 .data g_profile_MENU_SCENE */
|
||||
extern scene_process_profile_definition g_profile_MENU_SCENE = {
|
||||
fpcLy_ROOT_e, // mLayerID
|
||||
|
||||
+24
-115
@@ -1,6 +1,7 @@
|
||||
//
|
||||
// Translation Unit: d/s/d_s_name
|
||||
//
|
||||
/**
|
||||
* d_s_name.cpp
|
||||
* File Select Scene
|
||||
*/
|
||||
|
||||
#include "d/s/d_s_name.h"
|
||||
#include "JSystem/JKernel/JKRExpHeap.h"
|
||||
@@ -15,95 +16,6 @@
|
||||
#include "m_Do/m_Do_mtx.h"
|
||||
#include "f_op/f_op_overlap_mng.h"
|
||||
|
||||
|
||||
//
|
||||
// Forward References:
|
||||
//
|
||||
|
||||
extern "C" void __ct__9dSn_HIO_cFv();
|
||||
extern "C" static void phase_1__FPc();
|
||||
extern "C" static void phase_2__FPc();
|
||||
extern "C" static void resLoad__FP30request_of_phase_process_classPc();
|
||||
extern "C" void create__10dScnName_cFv();
|
||||
extern "C" void setView__10dScnName_cFv();
|
||||
extern "C" void execute__10dScnName_cFv();
|
||||
extern "C" void draw__10dScnName_cFv();
|
||||
extern "C" void __dt__10dScnName_cFv();
|
||||
extern "C" void FileSelectOpen__10dScnName_cFv();
|
||||
extern "C" void FileSelectMain__10dScnName_cFv();
|
||||
extern "C" void FileSelectMainNormal__10dScnName_cFv();
|
||||
extern "C" void FileSelectClose__10dScnName_cFv();
|
||||
extern "C" void brightCheckOpen__10dScnName_cFv();
|
||||
extern "C" void brightCheck__10dScnName_cFv();
|
||||
extern "C" void changeGameScene__10dScnName_cFv();
|
||||
extern "C" static void dScnName_Draw__FP10dScnName_c();
|
||||
extern "C" static void dScnName_Execute__FP10dScnName_c();
|
||||
extern "C" static void dScnName_IsDelete__FP10dScnName_c();
|
||||
extern "C" static void dScnName_Delete__FP10dScnName_c();
|
||||
extern "C" static void dScnName_Create__FP11scene_class();
|
||||
extern "C" void __dt__17dScnName_camera_cFv();
|
||||
extern "C" void __dt__9dSn_HIO_cFv();
|
||||
extern "C" void __sinit_d_s_name_cpp();
|
||||
extern "C" extern char const* const d_s_d_s_name__stringBase0;
|
||||
|
||||
//
|
||||
// External References:
|
||||
//
|
||||
|
||||
extern "C" void mDoMtx_lookAt__FPA4_fPC3VecPC3Vecs();
|
||||
extern "C" void mDoMtx_concatProjView__FPA4_CfPA4_CfPA4_f();
|
||||
extern "C" void mDoExt_getGameHeap__Fv();
|
||||
extern "C" void mDoExt_setCurrentHeap__FP7JKRHeap();
|
||||
extern "C" void fopOvlpM_IsPeek__Fv();
|
||||
extern "C" void fopScnM_ChangeReq__FP11scene_classssUs();
|
||||
extern "C" void dComIfG_resetToOpening__FP11scene_class();
|
||||
extern "C" void dComIfGp_setNextStage__FPCcsScSc();
|
||||
extern "C" void dComIfGs_gameStart__Fv();
|
||||
extern "C" void dComLbG_PhaseHandler__FP30request_of_phase_process_classPPFPv_iPv();
|
||||
extern "C" void offFirstBit__21dSv_player_get_item_cFUc();
|
||||
extern "C" void setRes__14dRes_control_cFPCcP11dRes_info_ciPCcUcP7JKRHeap();
|
||||
extern "C" void syncRes__14dRes_control_cFPCcP11dRes_info_ci();
|
||||
extern "C" void deleteRes__14dRes_control_cFPCcP11dRes_info_ci();
|
||||
extern "C" void getResInfo__14dRes_control_cFPCcP11dRes_info_ci();
|
||||
extern "C" void cleanup__13dPa_control_cFv();
|
||||
extern "C" void setViewPort__14dDlst_window_cFffffff();
|
||||
extern "C" void setScissor__14dDlst_window_cFffff();
|
||||
extern "C" void Run__12dVibration_cFv();
|
||||
extern "C" void Init__12dVibration_cFv();
|
||||
extern "C" void __ct__14dFile_select_cFP10JKRArchive();
|
||||
extern "C" void _create__14dFile_select_cFv();
|
||||
extern "C" void _move__14dFile_select_cFv();
|
||||
extern "C" void _draw__14dFile_select_cFv();
|
||||
extern "C" void __ct__14dBrightCheck_cFP10JKRArchive();
|
||||
extern "C" void _move__14dBrightCheck_cFv();
|
||||
extern "C" void _draw__14dBrightCheck_cFv();
|
||||
extern "C" void dKy_clear_game_init__Fv();
|
||||
extern "C" void dKy_setLight_init__Fv();
|
||||
extern "C" void changeWater__13dMeter2Info_cFUc();
|
||||
extern "C" void bgmStart__8Z2SeqMgrFUlUll();
|
||||
extern "C" void bgmStop__8Z2SeqMgrFUll();
|
||||
extern "C" void bgmStreamPrepare__8Z2SeqMgrFUl();
|
||||
extern "C" void bgmStreamPlay__8Z2SeqMgrFv();
|
||||
extern "C" void becomeCurrentHeap__7JKRHeapFv();
|
||||
extern "C" void destroy__7JKRHeapFv();
|
||||
extern "C" void* __nw__FUl();
|
||||
extern "C" void __dl__FPv();
|
||||
extern "C" void create__10JKRExpHeapFUlP7JKRHeapb();
|
||||
extern "C" void __register_global_object();
|
||||
extern "C" void __ptmf_scall();
|
||||
extern "C" void _savegpr_28();
|
||||
extern "C" void _restgpr_28();
|
||||
extern "C" void* mRenderModeObj__15mDoMch_render_c[1 + 1 /* padding */];
|
||||
extern "C" u8 mFader__13mDoGph_gInf_c[4];
|
||||
extern "C" u8 mResetData__6mDoRst[4 + 4 /* padding */];
|
||||
extern "C" u8 sManager__10JFWDisplay[4];
|
||||
extern "C" u8 mAudioMgrPtr__10Z2AudioMgr[4 + 4 /* padding */];
|
||||
|
||||
//
|
||||
// Declarations:
|
||||
//
|
||||
|
||||
/* ############################################################################################## */
|
||||
/* 803C3040-803C304C 020160 000C+00 1/1 0/0 0/0 .data cNullVec__6Z2Calc */
|
||||
static u8 cNullVec__6Z2Calc[12] = {
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
@@ -128,10 +40,10 @@ dSn_HIO_c::dSn_HIO_c() {
|
||||
static s32 phase_1(char* resName) {
|
||||
mDoAud_bgmStart(-1);
|
||||
if (dComIfG_setObjectRes(resName, (u8)0, NULL) == 0) {
|
||||
return 5;
|
||||
return cPhs_ERROR_e;
|
||||
}
|
||||
|
||||
return 2;
|
||||
return cPhs_NEXT_e;
|
||||
}
|
||||
|
||||
/* 80258820-80258878 253160 0058+00 1/0 0/0 0/0 .text phase_2__FPc */
|
||||
@@ -139,25 +51,27 @@ static s32 phase_2(char* resName) {
|
||||
int syncStatus = dComIfG_syncObjectRes(resName);
|
||||
|
||||
if (syncStatus < 0) {
|
||||
return 5;
|
||||
return cPhs_ERROR_e;
|
||||
}
|
||||
|
||||
if (syncStatus > 0) {
|
||||
return cPhs_INIT_e;
|
||||
} else {
|
||||
return syncStatus > 0 ? 0 : 4;
|
||||
return cPhs_COMPLEATE_e;
|
||||
}
|
||||
}
|
||||
|
||||
/* 80258878-802588A0 2531B8 0028+00 1/1 0/0 0/0 .text
|
||||
* resLoad__FP30request_of_phase_process_classPc */
|
||||
static s32 resLoad(request_of_phase_process_class* i_phase, char* param_1) {
|
||||
static s32 resLoad(request_of_phase_process_class* i_phase, char* i_resName) {
|
||||
static request_of_phase_process_fn l_method[2] = {
|
||||
(request_of_phase_process_fn)phase_1,
|
||||
(request_of_phase_process_fn)phase_2
|
||||
};
|
||||
|
||||
return dComLbG_PhaseHandler(i_phase, l_method, param_1);
|
||||
return dComLbG_PhaseHandler(i_phase, l_method, i_resName);
|
||||
}
|
||||
|
||||
/* ############################################################################################## */
|
||||
|
||||
s32 dScnName_c::create() {
|
||||
int phase_state = resLoad(&field_0x1c4, "fileSel");
|
||||
if (phase_state == cPhs_COMPLEATE_e) {
|
||||
@@ -349,8 +263,6 @@ void dScnName_c::brightCheck() {
|
||||
}
|
||||
}
|
||||
|
||||
/* ############################################################################################## */
|
||||
|
||||
/* 802590F8-802591C0 253A38 00C8+00 1/0 0/0 0/0 .text changeGameScene__10dScnName_cFv */
|
||||
void dScnName_c::changeGameScene() {
|
||||
if (!mDoRst::isReset() && !fopOvlpM_IsPeek()) {
|
||||
@@ -369,37 +281,34 @@ void dScnName_c::changeGameScene() {
|
||||
}
|
||||
|
||||
/* 802591C0-802591E0 253B00 0020+00 1/0 0/0 0/0 .text dScnName_Draw__FP10dScnName_c */
|
||||
static void dScnName_Draw(dScnName_c* scn) {
|
||||
scn->draw();
|
||||
static int dScnName_Draw(dScnName_c* i_this) {
|
||||
return i_this->draw();
|
||||
}
|
||||
|
||||
/* 802591E0-80259200 253B20 0020+00 1/0 0/0 0/0 .text dScnName_Execute__FP10dScnName_c */
|
||||
static void dScnName_Execute(dScnName_c* scn) {
|
||||
scn->execute();
|
||||
static int dScnName_Execute(dScnName_c* i_this) {
|
||||
return i_this->execute();
|
||||
}
|
||||
|
||||
/* 80259200-80259230 253B40 0030+00 1/0 0/0 0/0 .text dScnName_IsDelete__FP10dScnName_c
|
||||
*/
|
||||
static s32 dScnName_IsDelete(dScnName_c*) {
|
||||
static int dScnName_IsDelete(dScnName_c*) {
|
||||
dComIfGp_particle_cleanup();
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* 80259230-80259258 253B70 0028+00 1/0 0/0 0/0 .text dScnName_Delete__FP10dScnName_c */
|
||||
static s32 dScnName_Delete(dScnName_c* scn) {
|
||||
scn->~dScnName_c();
|
||||
static int dScnName_Delete(dScnName_c* i_this) {
|
||||
i_this->~dScnName_c();
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* 80259258-80259294 253B98 003C+00 1/0 0/0 0/0 .text dScnName_Create__FP11scene_class */
|
||||
static void dScnName_Create(scene_class* scn) {
|
||||
new (scn) dScnName_c();
|
||||
static_cast<dScnName_c*>(scn)->create();
|
||||
static int dScnName_Create(scene_class* i_this) {
|
||||
new (i_this) dScnName_c();
|
||||
return static_cast<dScnName_c*>(i_this)->create();
|
||||
}
|
||||
|
||||
/* 8039A2A8-8039A2A8 026908 0000+00 0/0 0/0 0/0 .rodata @stringBase0 */
|
||||
|
||||
|
||||
/* 803C30DC-803C30F0 -00001 0014+00 2/0 0/0 0/0 .data l_dScnName_Method */
|
||||
static leafdraw_method_class l_dScnName_Method = {
|
||||
(process_method_func)dScnName_Create, (process_method_func)dScnName_Delete,
|
||||
|
||||
+176
-148
@@ -1,8 +1,10 @@
|
||||
//
|
||||
// d/s/d_s_play
|
||||
//
|
||||
/**
|
||||
* d_s_play.cpp
|
||||
* Main Gameplay Scene
|
||||
*/
|
||||
|
||||
#include "d/s/d_s_play.h"
|
||||
#include "JSystem/JKernel/JKRHeap.h"
|
||||
#include "JSystem/JUtility/JUTConsole.h"
|
||||
#include "JSystem/JUtility/JUTGamePad.h"
|
||||
#include "SSystem/SComponent/c_counter.h"
|
||||
@@ -21,17 +23,12 @@
|
||||
#include "f_op/f_op_msg_mng.h"
|
||||
#include "f_op/f_op_overlap_mng.h"
|
||||
#include "f_op/f_op_scene_mng.h"
|
||||
#include "JSystem/JKernel/JKRHeap.h"
|
||||
#include "m_Do/m_Do_Reset.h"
|
||||
#include "m_Do/m_Do_audio.h"
|
||||
#include "m_Do/m_Do_graphic.h"
|
||||
#include "rel/d/a/d_a_suspend/d_a_suspend.h"
|
||||
#include "rel/d/a/d_a_ykgr/d_a_ykgr.h"
|
||||
|
||||
//
|
||||
// Declarations:
|
||||
//
|
||||
|
||||
static void dScnPly_Create(scene_class*);
|
||||
static int dScnPly_Delete(dScnPly_c*);
|
||||
static int dScnPly_IsDelete(dScnPly_c);
|
||||
@@ -52,7 +49,6 @@ static int phase_compleate(void*);
|
||||
|
||||
extern "C" s8 func_80252E70(s8*);
|
||||
|
||||
/* ############################################################################################## */
|
||||
/* 804510F8-80451100 0005F8 0008+00 2/2 0/0 0/0 .sbss resPhase */
|
||||
static request_of_phase_process_class resPhase[1];
|
||||
|
||||
@@ -71,11 +67,10 @@ static OSTime resPreLoadTime1;
|
||||
/* 80451120-80451124 000620 0004+00 1/1 0/0 0/0 .sbss g_preLoadHIO */
|
||||
static dScnPly_preLoad_HIO_c g_preLoadHIO;
|
||||
|
||||
/* 80451124-80451128 -00001 0004+00 3/3 7/7 38/38 .sbss None */
|
||||
/* 80451124 0001+00 data_80451124 None */
|
||||
/* 80451125 0003+00 nextPauseTimer__9dScnPly_c None */
|
||||
s8 dScnPly_c::pauseTimer;
|
||||
|
||||
/* 80451125 0003+00 nextPauseTimer__9dScnPly_c None */
|
||||
s8 dScnPly_c::nextPauseTimer;
|
||||
|
||||
/* 80259400-80259440 253D40 0040+00 1/1 0/0 0/0 .text calcPauseTimer__9dScnPly_cFv */
|
||||
@@ -89,66 +84,6 @@ s8 dScnPly_c::calcPauseTimer() {
|
||||
}
|
||||
}
|
||||
|
||||
/* ############################################################################################## */
|
||||
/* 803C3158-803C3188 020278 002E+02 1/1 0/0 0/0 .data l_wipeType$4081 */
|
||||
static s16 l_wipeType[23] = {
|
||||
0x0000, 0x0000, 0x0011, 0x0002, 0x0002, 0x0001, 0x0003, 0x0001, 0x0004, 0x0004, 0x0005, 0x0005,
|
||||
0x0006, 0x0007, 0x0000, 0x0000, 0x0002, 0x0002, 0x0002, 0x0002, 0x0002, 0x0008, 0x0008,
|
||||
};
|
||||
|
||||
/* 803C3188-803C3194 0202A8 000A+02 1/1 0/0 0/0 .data camparamarc$4608 */
|
||||
static char camparamarc[10] = "CamParam";
|
||||
|
||||
/* 803C3194-803C31C0 -00001 002C+00 1/1 0/0 0/0 .data l_method$4860 */
|
||||
static request_of_phase_process_fn l_method[11] = {
|
||||
(request_of_phase_process_fn)phase_00,
|
||||
(request_of_phase_process_fn)phase_1,
|
||||
(request_of_phase_process_fn)phase_1_0,
|
||||
(request_of_phase_process_fn)phase_01,
|
||||
(request_of_phase_process_fn)phase_0,
|
||||
(request_of_phase_process_fn)phase_2,
|
||||
(request_of_phase_process_fn)phase_3,
|
||||
(request_of_phase_process_fn)phase_4,
|
||||
(request_of_phase_process_fn)phase_5,
|
||||
(request_of_phase_process_fn)phase_6,
|
||||
(request_of_phase_process_fn)phase_compleate,
|
||||
};
|
||||
|
||||
/* 803C31C0-803C31D4 -00001 0014+00 2/0 0/0 0/0 .data l_dScnPly_Method */
|
||||
static leafdraw_method_class l_dScnPly_Method = {
|
||||
(process_method_func)dScnPly_Create, (process_method_func)dScnPly_Delete,
|
||||
(process_method_func)dScnPly_Execute, (process_method_func)dScnPly_IsDelete,
|
||||
(process_method_func)dScnPly_Draw,
|
||||
};
|
||||
|
||||
/* 803C31D4-803C31FC -00001 0028+00 0/0 0/0 1/0 .data g_profile_PLAY_SCENE */
|
||||
scene_process_profile_definition g_profile_PLAY_SCENE = {
|
||||
fpcLy_ROOT_e, // mLayerID
|
||||
1, // mListID
|
||||
fpcPi_CURRENT_e, // mListPrio
|
||||
PROC_PLAY_SCENE, // mProcName
|
||||
&g_fpcNd_Method.mBase, // mSubMtd
|
||||
sizeof(dScnPly_c), // mSize
|
||||
0, // mSizeOther
|
||||
0, // mParameters
|
||||
&g_fopScn_Method.mBase, // mSubMtd
|
||||
(process_method_class*)&l_dScnPly_Method, // mpMtd
|
||||
};
|
||||
|
||||
/* 803C31FC-803C3224 -00001 0028+00 0/0 0/0 1/0 .data g_profile_OPENING_SCENE */
|
||||
scene_process_profile_definition g_profile_OPENING_SCENE = {
|
||||
fpcLy_ROOT_e, // mLayerID
|
||||
1, // mListID
|
||||
fpcPi_CURRENT_e, // mListPrio
|
||||
PROC_OPENING_SCENE, // mProcName
|
||||
&g_fpcNd_Method.mBase, // mSubMtd
|
||||
sizeof(dScnPly_c), // mSize
|
||||
0, // mSizeOther
|
||||
0, // mParameters
|
||||
&g_fopScn_Method.mBase, // mSubMtd
|
||||
(process_method_class*)&l_dScnPly_Method, // mpMtd
|
||||
};
|
||||
|
||||
/* 80454F18-80454F1C 003518 0002+02 1/0 0/0 0/0 .sdata2 T_JOINT_dylKeyTbl */
|
||||
static const s16 T_JOINT_dylKeyTbl[1] = {
|
||||
0x0106,
|
||||
@@ -170,15 +105,20 @@ dScnPly_env_debugHIO_c::dScnPly_env_debugHIO_c() {
|
||||
}
|
||||
|
||||
/* 802594AC-802597B8 253DEC 030C+00 1/0 0/0 0/0 .text dScnPly_Draw__FP9dScnPly_c */
|
||||
static int dScnPly_Draw(dScnPly_c* scn) {
|
||||
static int dScnPly_Draw(dScnPly_c* i_this) {
|
||||
static s16 l_wipeType[] = {
|
||||
0x0000, 0x0000, 0x0011, 0x0002, 0x0002, 0x0001, 0x0003, 0x0001, 0x0004, 0x0004, 0x0005, 0x0005,
|
||||
0x0006, 0x0007, 0x0000, 0x0000, 0x0002, 0x0002, 0x0002, 0x0002, 0x0002, 0x0008, 0x0008,
|
||||
};
|
||||
|
||||
dComIfG_Ccsp()->Move();
|
||||
dComIfG_Bgsp().ClrMoveFlag();
|
||||
|
||||
u8 useWhiteColor;
|
||||
if (!fopOvlpM_IsPeek() && !dComIfG_resetToOpening(scn)) {
|
||||
if (!fopOvlpM_IsPeek() && !dComIfG_resetToOpening(i_this)) {
|
||||
if (dComIfGp_isEnableNextStage()) {
|
||||
u8 wipe = dComIfGp_getNextStageWipe();
|
||||
fopScnM_ChangeReq(scn, 11, l_wipeType[wipe], 5);
|
||||
fopScnM_ChangeReq(i_this, PROC_PLAY_SCENE, l_wipeType[wipe], 5);
|
||||
|
||||
int hour = dKy_getdaytime_hour();
|
||||
useWhiteColor = hour >= 6 && hour < 18 ? true : false;
|
||||
@@ -186,7 +126,8 @@ static int dScnPly_Draw(dScnPly_c* scn) {
|
||||
|
||||
if (wipe == 1 || wipe == 2 || wipe == 7 || wipe == 17 || wipe == 21 ||
|
||||
((wipe == 8 || wipe == 10 || wipe == 18) && tmp) ||
|
||||
((wipe == 9 || wipe == 11 || wipe == 19) && !tmp)) {
|
||||
((wipe == 9 || wipe == 11 || wipe == 19) && !tmp))
|
||||
{
|
||||
mDoGph_gInf_c::setFadeColor(*(JUtility::TColor*)&g_saftyWhiteColor);
|
||||
} else if (wipe == 14 || wipe == 20) {
|
||||
GXColor color = {0x2A, 0x1E, 0x46, 0xFF};
|
||||
@@ -204,7 +145,7 @@ static int dScnPly_Draw(dScnPly_c* scn) {
|
||||
dMdl_mng_c::reset();
|
||||
|
||||
if (!dComIfGp_isPauseFlag() && dScnPly_c::pauseTimer == 0) {
|
||||
if (fpcM_GetName(scn) == PROC_PLAY_SCENE) {
|
||||
if (fpcM_GetName(i_this) == PROC_PLAY_SCENE) {
|
||||
dComIfGp_getVibration().Run();
|
||||
}
|
||||
daSus_c::execute();
|
||||
@@ -236,8 +177,8 @@ static int dScnPly_Draw(dScnPly_c* scn) {
|
||||
}
|
||||
|
||||
/* 802597B8-8025987C 2540F8 00C4+00 1/0 0/0 0/0 .text dScnPly_Execute__FP9dScnPly_c */
|
||||
static int dScnPly_Execute(dScnPly_c* scnPly) {
|
||||
scnPly->offReset();
|
||||
static int dScnPly_Execute(dScnPly_c* i_this) {
|
||||
i_this->offReset();
|
||||
dStage_roomControl_c::offNoChangeRoom();
|
||||
dStage_roomControl_c::setRoomReadId(0xFF);
|
||||
|
||||
@@ -248,7 +189,7 @@ static int dScnPly_Execute(dScnPly_c* scnPly) {
|
||||
mDoAud_zelAudio_c::offBgmSet();
|
||||
}
|
||||
|
||||
if (scnPly->calcPauseTimer() != 0) {
|
||||
if (i_this->calcPauseTimer() != 0) {
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
@@ -263,24 +204,24 @@ static int dScnPly_Execute(dScnPly_c* scnPly) {
|
||||
}
|
||||
|
||||
/* 8025987C-802598AC 2541BC 0030+00 1/0 0/0 0/0 .text dScnPly_IsDelete__F9dScnPly_c */
|
||||
static int dScnPly_IsDelete(dScnPly_c scnPly) {
|
||||
static int dScnPly_IsDelete(dScnPly_c i_this) {
|
||||
dComIfGp_particle_cleanup();
|
||||
return 1;
|
||||
}
|
||||
|
||||
struct ProLoadInfoStruct {
|
||||
const char* field_0x0;
|
||||
const s16* field_0x4;
|
||||
const char** field_0x8;
|
||||
u8 field_0xc;
|
||||
u8 field_0xd;
|
||||
struct PreLoadInfo {
|
||||
const char* stageName;
|
||||
const s16* profNameTbl;
|
||||
const char** resNameTbl;
|
||||
u8 dylKeyTblNum;
|
||||
u8 resNameNum;
|
||||
};
|
||||
|
||||
/* 80450760-80450764 -00001 0004+00 1/0 0/0 0/0 .sdata T_JOINT_resName */
|
||||
static const char* T_JOINT_resName[1] = {"Always"};
|
||||
|
||||
/* 8039A2C8-8039A2D8 -00001 0010+00 4/4 0/0 0/0 .rodata PreLoadInfoT */
|
||||
static ProLoadInfoStruct const PreLoadInfoT[1] = {
|
||||
static PreLoadInfo const PreLoadInfoT[1] = {
|
||||
{
|
||||
"T_JOINT",
|
||||
T_JOINT_dylKeyTbl,
|
||||
@@ -296,46 +237,59 @@ static s8 preLoadNo = -1;
|
||||
static u8 doPreLoad = 1;
|
||||
|
||||
/* 802598AC-80259AC4 2541EC 0218+00 1/0 0/0 0/0 .text dScnPly_Delete__FP9dScnPly_c */
|
||||
static int dScnPly_Delete(dScnPly_c* param_0) {
|
||||
static int dScnPly_Delete(dScnPly_c* i_this) {
|
||||
daSus_c::reset();
|
||||
dMpath_c::remove();
|
||||
dTres_c::remove();
|
||||
|
||||
dComIfGp_getAttention().~dAttention_c();
|
||||
dComIfGp_getVibration().Remove();
|
||||
|
||||
dComIfG_Bgsp().Dt();
|
||||
dComIfG_Ccsp()->Dt();
|
||||
dStage_Delete();
|
||||
|
||||
i_dComIfGp_event_remove();
|
||||
|
||||
dComIfGp_particle_removeScene(0);
|
||||
|
||||
dComIfGp_getMsgDtArchive(1)->removeResourceAll();
|
||||
JKRUnmountArchive(dComIfGp_getMsgDtArchive(1));
|
||||
|
||||
dDemo_c::remove();
|
||||
|
||||
fopMsgM_destroyExpHeap(dComIfGp_getExpHeap2D());
|
||||
dComIfGp_setExpHeap2D(NULL);
|
||||
fopMsgM_destroyExpHeap(dComIfGp_getMsgExpHeap());
|
||||
dComIfGp_setMsgExpHeap(NULL);
|
||||
|
||||
dComIfGp_deleteSimpleModel();
|
||||
dMdl_mng_c::remove();
|
||||
|
||||
mDoGph_gInf_c::getBloom()->remove();
|
||||
|
||||
dComIfGs_offPlayerFieldLastStayFieldDataExistFlag();
|
||||
dComIfGp_setWindowNum(0);
|
||||
dComIfGd_setView(NULL);
|
||||
|
||||
if (preLoadNo >= 0) {
|
||||
const char** piVar4 = PreLoadInfoT[preLoadNo].field_0x8;
|
||||
int bVar1 = PreLoadInfoT[preLoadNo].field_0xd;
|
||||
if (piVar4 != NULL && (*piVar4 != NULL)) {
|
||||
for (int iVar3 = 0; iVar3 < bVar1; iVar3++) {
|
||||
dComIfG_resDelete(&resPhase[iVar3], piVar4[iVar3]);
|
||||
const char** resname_table = PreLoadInfoT[preLoadNo].resNameTbl;
|
||||
int res_num = PreLoadInfoT[preLoadNo].resNameNum;
|
||||
if (resname_table != NULL && (*resname_table != NULL)) {
|
||||
for (int i = 0; i < res_num; i++) {
|
||||
dComIfG_resDelete(&resPhase[i], resname_table[i]);
|
||||
}
|
||||
}
|
||||
const s16* psVar5 = PreLoadInfoT[preLoadNo].field_0x4;
|
||||
int bVar2 = PreLoadInfoT[preLoadNo].field_0xc;
|
||||
if (psVar5 != NULL && *psVar5 != 0) {
|
||||
for (int iVar3 = 0; iVar3 < bVar2; iVar3++) {
|
||||
cDylPhs::Unlink(&dylPhase[iVar3], psVar5[iVar3]);
|
||||
|
||||
const s16* profname_table = PreLoadInfoT[preLoadNo].profNameTbl;
|
||||
int prof_num = PreLoadInfoT[preLoadNo].dylKeyTblNum;
|
||||
if (profname_table != NULL && *profname_table != 0) {
|
||||
for (int i = 0; i < prof_num; i++) {
|
||||
cDylPhs::Unlink(&dylPhase[i], profname_table[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
dComIfGp_init();
|
||||
JUTAssertion::setMessageCount(0);
|
||||
return 1;
|
||||
@@ -359,7 +313,8 @@ bool dScnPly_c::resetGame() {
|
||||
if (dComIfGp_getNextStagePoint() == -4 || (dComIfGs_getLastSceneMode() & 0xF) == 0xC ||
|
||||
!strcmp(dComIfGp_getNextStageName(), "F_SP109") ||
|
||||
(!strcmp(dComIfGp_getNextStageName(), "F_SP116") &&
|
||||
dComIfGp_getNextStageRoomNo() == 1 && dComIfGp_getNextStageLayer() == 9)) {
|
||||
dComIfGp_getNextStageRoomNo() == 1 && dComIfGp_getNextStageLayer() == 9))
|
||||
{
|
||||
if (!dStage_roomControl_c::resetArchiveBank(0)) {
|
||||
return false;
|
||||
}
|
||||
@@ -384,8 +339,8 @@ void dScnPly_c::offReset() {
|
||||
}
|
||||
|
||||
/* 80259C70-80259CAC 2545B0 003C+00 1/0 0/0 0/0 .text phase_00__FP9dScnPly_c */
|
||||
static int phase_00(dScnPly_c* scn) {
|
||||
if (!scn->resetGame()) {
|
||||
static int phase_00(dScnPly_c* i_this) {
|
||||
if (!i_this->resetGame()) {
|
||||
return cPhs_INIT_e;
|
||||
} else {
|
||||
mDoGph_gInf_c::offBlure();
|
||||
@@ -394,7 +349,7 @@ static int phase_00(dScnPly_c* scn) {
|
||||
}
|
||||
|
||||
/* 80259CAC-80259D7C 2545EC 00D0+00 1/0 0/0 0/0 .text phase_01__FP9dScnPly_c */
|
||||
static int phase_01(dScnPly_c* scn) {
|
||||
static int phase_01(dScnPly_c* i_this) {
|
||||
mDoAud_setHour(dKy_getdaytime_hour());
|
||||
mDoAud_setMinute(dKy_getdaytime_minute());
|
||||
mDoAud_setWeekday(dKy_get_dayofweek());
|
||||
@@ -419,13 +374,13 @@ static int phase_01(dScnPly_c* scn) {
|
||||
}
|
||||
|
||||
/* 80259D7C-80259D84 2546BC 0008+00 1/0 0/0 0/0 .text phase_0__FP9dScnPly_c */
|
||||
static int phase_0(dScnPly_c* param_0) {
|
||||
static int phase_0(dScnPly_c* i_this) {
|
||||
return cPhs_NEXT_e;
|
||||
}
|
||||
|
||||
/* 80259D84-8025A438 2546C4 06B4+00 1/0 0/0 0/0 .text phase_1__FP9dScnPly_c */
|
||||
static int phase_1(dScnPly_c* scn) {
|
||||
u32 id = fopScnM_GetID(scn);
|
||||
static int phase_1(dScnPly_c* i_this) {
|
||||
u32 id = fopScnM_GetID(i_this);
|
||||
dStage_roomControl_c::setProcID(id);
|
||||
|
||||
dComIfGp_setStartStage(dComIfGp_getNextStartStage());
|
||||
@@ -442,38 +397,45 @@ static int phase_1(dScnPly_c* scn) {
|
||||
|
||||
// Stage: Faron Woods, Room: Faron Spring
|
||||
if (!strcmp(dComIfGp_getStartStageName(), "F_SP108") && dComIfGp_getStartStageRoomNo() == 1 &&
|
||||
dComIfGp_getStartStagePoint() == 3) {
|
||||
dComIfGp_getStartStagePoint() == 3)
|
||||
{
|
||||
dComIfGs_onDarkClearLV(0);
|
||||
execItemGet(WEAR_KOKIRI);
|
||||
}
|
||||
// Stage: Kakariko Village, Room: Kakariko Village
|
||||
else if (!strcmp(dComIfGp_getStartStageName(), "F_SP109") &&
|
||||
dComIfGp_getStartStageRoomNo() == 0 && dComIfGp_getStartStagePoint() == 30) {
|
||||
dComIfGp_getStartStageRoomNo() == 0 && dComIfGp_getStartStagePoint() == 30)
|
||||
{
|
||||
dComIfGs_onDarkClearLV(1);
|
||||
}
|
||||
// Stage: Lake Hylia, Room: Fountain
|
||||
else if (!strcmp(dComIfGp_getStartStageName(), "F_SP115") &&
|
||||
dComIfGp_getStartStageRoomNo() == 1 && dComIfGp_getStartStagePoint() == 20) {
|
||||
dComIfGp_getStartStageRoomNo() == 1 && dComIfGp_getStartStagePoint() == 20)
|
||||
{
|
||||
dComIfGs_onDarkClearLV(2);
|
||||
}
|
||||
// Stage: Sacred Grove, Room: Lost Woods
|
||||
else if (!strcmp(dComIfGp_getStartStageName(), "F_SP117") &&
|
||||
dComIfGp_getStartStageRoomNo() == 1 && dComIfGp_getStartStagePoint() == 99) {
|
||||
dComIfGp_getStartStageRoomNo() == 1 && dComIfGp_getStartStagePoint() == 99)
|
||||
{
|
||||
dComIfGs_onDarkClearLV(3);
|
||||
}
|
||||
|
||||
// Stage: Ordon Spring, Room: Ordon Spring
|
||||
if (!strcmp(dComIfGp_getStartStageName(), "F_SP104") && dComIfGp_getStartStageRoomNo() == 1 &&
|
||||
dComIfGp_getStartStagePoint() == 23 && dComIfGp_getStartStageLayer() == 12) {
|
||||
dComIfGp_getStartStagePoint() == 23 && dComIfGp_getStartStageLayer() == 12)
|
||||
{
|
||||
dComIfGs_onItemFirstBit(HORSE_FLUTE);
|
||||
dComIfGs_setItem(SLOT_21, HORSE_FLUTE);
|
||||
}
|
||||
|
||||
if ((u8)dKy_darkworld_stage_check(dComIfGp_getStartStageName(),
|
||||
dComIfGp_getStartStageRoomNo()) == true) {
|
||||
dComIfGp_getStartStageRoomNo()) == true)
|
||||
{
|
||||
dComIfGp_world_dark_set(1);
|
||||
} else if ((u8)dKy_darkworld_spot_check(dComIfGp_getStartStageName(),
|
||||
dComIfGp_getStartStageRoomNo()) == true) {
|
||||
dComIfGp_getStartStageRoomNo()) == true)
|
||||
{
|
||||
dComIfGp_world_dark_set(2);
|
||||
} else {
|
||||
dComIfGp_world_dark_set(0);
|
||||
@@ -481,7 +443,8 @@ static int phase_1(dScnPly_c* scn) {
|
||||
|
||||
// Stage: Lake Hylia, Room: Fountain
|
||||
if (!strcmp(dComIfGp_getStartStageName(), "F_SP115") && dComIfGp_getStartStageRoomNo() == 1 &&
|
||||
dComIfGp_getStartStageLayer() < 0) {
|
||||
dComIfGp_getStartStageLayer() < 0)
|
||||
{
|
||||
const char* stage = dComIfGp_getStartStageName();
|
||||
s8 room = dComIfGp_getStartStageRoomNo();
|
||||
s8 layer = dComIfGp_getStartStageLayer();
|
||||
@@ -502,13 +465,15 @@ static int phase_1(dScnPly_c* scn) {
|
||||
(!strcmp(dComIfGp_getStartStageName(), "F_SP115") && dComIfGp_getStartStageRoomNo() == 1 &&
|
||||
dComIfGp_getStartStageLayer() == 8) ||
|
||||
(!strcmp(dComIfGp_getStartStageName(), "F_SP115") && dComIfGp_getStartStageRoomNo() == 1 &&
|
||||
dComIfGp_getStartStageLayer() == 9)) {
|
||||
dComIfGp_getStartStageLayer() == 9))
|
||||
{
|
||||
dComIfGp_world_dark_set(1);
|
||||
}
|
||||
|
||||
// Stage: Zant Boss Fight, Room: Throne Room
|
||||
if (!strcmp(dComIfGp_getStartStageName(), "D_MN08D") && dComIfGp_getStartStageRoomNo() == 50 &&
|
||||
dComIfGp_getStartStagePoint() == 20) {
|
||||
dComIfGp_getStartStagePoint() == 20)
|
||||
{
|
||||
dComIfGs_onSaveDunSwitch(30);
|
||||
}
|
||||
|
||||
@@ -516,29 +481,34 @@ static int phase_1(dScnPly_c* scn) {
|
||||
|
||||
// Stage: Hyrule Castle Sewers, Room: Prison Cell
|
||||
if (!strcmp(dComIfGp_getStartStageName(), "R_SP107") && dComIfGp_getStartStageRoomNo() == 0 &&
|
||||
(dComIfGp_getStartStagePoint() == 24 || dComIfGp_getStartStagePoint() == 0)) {
|
||||
(dComIfGp_getStartStagePoint() == 24 || dComIfGp_getStartStagePoint() == 0))
|
||||
{
|
||||
dComIfGs_onTransformLV(0);
|
||||
}
|
||||
// Stage: Hyrule Field, Room: Eldin Gorge south entrance
|
||||
else if (!strcmp(dComIfGp_getStartStageName(), "F_SP121") &&
|
||||
dComIfGp_getStartStageRoomNo() == 2 && dComIfGp_getStartStagePoint() == 10) {
|
||||
dComIfGp_getStartStageRoomNo() == 2 && dComIfGp_getStartStagePoint() == 10)
|
||||
{
|
||||
dComIfGs_onTransformLV(1);
|
||||
}
|
||||
// Stage: Hyrule Field, Room: Lanayru Field north entrance
|
||||
else if (!strcmp(dComIfGp_getStartStageName(), "F_SP121") &&
|
||||
dComIfGp_getStartStageRoomNo() == 9 && dComIfGp_getStartStagePoint() == 10) {
|
||||
dComIfGp_getStartStageRoomNo() == 9 && dComIfGp_getStartStagePoint() == 10)
|
||||
{
|
||||
dComIfGs_onTransformLV(2);
|
||||
}
|
||||
// Stage: Hyrule Field, Room: Lanayru Field
|
||||
else if (!strcmp(dComIfGp_getStartStageName(), "F_SP121") &&
|
||||
dComIfGp_getStartStageRoomNo() == 10 &&
|
||||
(dComIfGp_getStartStagePoint() == 23 || dComIfGp_getStartStagePoint() == 20)) {
|
||||
(dComIfGp_getStartStagePoint() == 23 || dComIfGp_getStartStagePoint() == 20))
|
||||
{
|
||||
dComIfGs_onTransformLV(3);
|
||||
}
|
||||
|
||||
// Stage: Fishing Pond, Room: Fishing Pond
|
||||
if (!strcmp(dComIfGp_getStartStageName(), "F_SP127") && dComIfGp_getStartStageRoomNo() == 0 &&
|
||||
dComIfGp_getStartStagePoint() == 2) {
|
||||
dComIfGp_getStartStagePoint() == 2)
|
||||
{
|
||||
g_env_light.mPondSeason++;
|
||||
|
||||
if (g_env_light.mPondSeason > 4) {
|
||||
@@ -559,7 +529,9 @@ static int phase_1(dScnPly_c* scn) {
|
||||
}
|
||||
|
||||
/* 8025A438-8025A4F8 254D78 00C0+00 1/0 0/0 0/0 .text phase_1_0__FP9dScnPly_c */
|
||||
static int phase_1_0(dScnPly_c* param_0) {
|
||||
static int phase_1_0(dScnPly_c* i_this) {
|
||||
static char camparamarc[10] = "CamParam";
|
||||
|
||||
if (dComIfG_syncStageRes("Stg_00")) {
|
||||
return cPhs_INIT_e;
|
||||
} else {
|
||||
@@ -572,29 +544,33 @@ static int phase_1_0(dScnPly_c* param_0) {
|
||||
}
|
||||
|
||||
/* 8025A4F8-8025A5D4 254E38 00DC+00 1/0 0/0 0/0 .text phase_2__FP9dScnPly_c */
|
||||
static int phase_2(dScnPly_c* scn) {
|
||||
static int phase_2(dScnPly_c* i_this) {
|
||||
int tmp = dComIfG_syncAllObjectRes();
|
||||
if (tmp >= 0 && tmp != 0) {
|
||||
return cPhs_INIT_e;
|
||||
}
|
||||
u8 particle_no = dStage_stagInfo_GetParticleNo(i_dComIfGp_getStage()->getStagInfo(), dComIfG_play_c::getLayerNo(0));
|
||||
|
||||
u8 particle_no = dStage_stagInfo_GetParticleNo(i_dComIfGp_getStage()->getStagInfo(),
|
||||
dComIfG_play_c::getLayerNo(0));
|
||||
if (particle_no == 255) {
|
||||
particle_no = dStage_stagInfo_GetParticleNo(i_dComIfGp_getStage()->getStagInfo());
|
||||
}
|
||||
|
||||
dComIfGp_particle_readScene(particle_no, &scn->sceneCommand);
|
||||
dMsgObject_readMessageGroup(&scn->field_0x1d0);
|
||||
dComIfGp_particle_readScene(particle_no, &i_this->sceneCommand);
|
||||
dMsgObject_readMessageGroup(&i_this->field_0x1d0);
|
||||
return cPhs_NEXT_e;
|
||||
}
|
||||
|
||||
/* 8025A5D4-8025A654 254F14 0080+00 1/0 0/0 0/0 .text phase_3__FP9dScnPly_c */
|
||||
static int phase_3(dScnPly_c* scn) {
|
||||
if ((scn->sceneCommand != NULL && !scn->sceneCommand->sync()) || mDoAud_check1stDynamicWave()) {
|
||||
static int phase_3(dScnPly_c* i_this) {
|
||||
if ((i_this->sceneCommand != NULL && !i_this->sceneCommand->sync()) || mDoAud_check1stDynamicWave()) {
|
||||
return cPhs_INIT_e;
|
||||
}
|
||||
if (!scn->field_0x1d0 == NULL && !scn->field_0x1d0->sync()) {
|
||||
}
|
||||
|
||||
if (!i_this->field_0x1d0 == NULL && !i_this->field_0x1d0->sync()) {
|
||||
return cPhs_INIT_e;
|
||||
}
|
||||
}
|
||||
|
||||
return cPhs_NEXT_e;
|
||||
}
|
||||
|
||||
@@ -664,7 +640,7 @@ static int phase_4(dScnPly_c* i_this) {
|
||||
new (&dComIfGp_getAttention()) dAttention_c(dComIfGp_getPlayer(0), 0);
|
||||
dComIfGp_getVibration().Init();
|
||||
daYkgr_c::init();
|
||||
|
||||
|
||||
dComIfG_setBrightness(255);
|
||||
mDoGph_gInf_c::offFade();
|
||||
mDoAud_zelAudio_c::onBgmSet();
|
||||
@@ -676,7 +652,7 @@ static int phase_4(dScnPly_c* i_this) {
|
||||
const char* stageName = dComIfGp_getStartStageName();
|
||||
OS_REPORT("stageName=%s\n", stageName);
|
||||
for (u32 i = 0; i < 1; i++) {
|
||||
if (strcmp(stageName, PreLoadInfoT[i].field_0x0) == 0) {
|
||||
if (strcmp(stageName, PreLoadInfoT[i].stageName) == 0) {
|
||||
preLoadNo = i;
|
||||
}
|
||||
}
|
||||
@@ -691,11 +667,12 @@ static int phase_4(dScnPly_c* i_this) {
|
||||
}
|
||||
|
||||
/* 8025A9F4-8025AAC0 255334 00CC+00 1/0 0/0 0/0 .text phase_5__FP9dScnPly_c */
|
||||
static int phase_5(dScnPly_c* param_0) {
|
||||
static int phase_5(dScnPly_c* i_this) {
|
||||
if (preLoadNo >= 0) {
|
||||
int rv = 2;
|
||||
const char** resNames = PreLoadInfoT[preLoadNo].field_0x8;
|
||||
s32 resNameNum = PreLoadInfoT[preLoadNo].field_0xd;
|
||||
int phase_state = cPhs_NEXT_e;
|
||||
|
||||
const char** resNames = PreLoadInfoT[preLoadNo].resNameTbl;
|
||||
s32 resNameNum = PreLoadInfoT[preLoadNo].resNameNum;
|
||||
if (resNames != NULL && *resNames != NULL) {
|
||||
JUT_ASSERT(2830, resNameNum <= (sizeof(resPhase) / sizeof(resPhase[0])));
|
||||
int goodLoads = 0;
|
||||
@@ -704,52 +681,103 @@ static int phase_5(dScnPly_c* param_0) {
|
||||
if (dComIfG_resLoad(&resPhase[i], resNames[i]) == 4) {
|
||||
goodLoads++;
|
||||
} else {
|
||||
rv = 0;
|
||||
phase_state = cPhs_INIT_e;
|
||||
}
|
||||
loadNum++;
|
||||
}
|
||||
}
|
||||
if (rv == 4) {
|
||||
|
||||
if (phase_state == cPhs_COMPLEATE_e) {
|
||||
resPreLoadTime1 = OSGetTime();
|
||||
}
|
||||
return rv;
|
||||
|
||||
return phase_state;
|
||||
}
|
||||
|
||||
return cPhs_NEXT_e;
|
||||
}
|
||||
|
||||
/* 8025AAC0-8025AB8C 255400 00CC+00 1/0 0/0 0/0 .text phase_6__FP9dScnPly_c */
|
||||
static int phase_6(dScnPly_c* param_0) {
|
||||
static int phase_6(dScnPly_c* i_this) {
|
||||
if (preLoadNo >= 0) {
|
||||
int rv = 2;
|
||||
const s16* dylKeyTbl = PreLoadInfoT[preLoadNo].field_0x4;
|
||||
s32 dylKeyTblNum = PreLoadInfoT[preLoadNo].field_0xc;
|
||||
int phase_state = cPhs_NEXT_e;
|
||||
|
||||
const s16* dylKeyTbl = PreLoadInfoT[preLoadNo].profNameTbl;
|
||||
s32 dylKeyTblNum = PreLoadInfoT[preLoadNo].dylKeyTblNum;
|
||||
if (dylKeyTbl != NULL && *dylKeyTbl != 0) {
|
||||
JUT_ASSERT(2864, dylKeyTblNum <= (sizeof(dylPhase) / sizeof(dylPhase[0])));
|
||||
int goodLoads = 0;
|
||||
int loadNum = 0;
|
||||
for (int i = 0; i < dylKeyTblNum; i++) {
|
||||
if (cDylPhs::Link(&dylPhase[i], dylKeyTbl[i]) == 4) {
|
||||
if (cDylPhs::Link(&dylPhase[i], dylKeyTbl[i]) == cPhs_COMPLEATE_e) {
|
||||
goodLoads++;
|
||||
} else {
|
||||
rv = 0;
|
||||
phase_state = cPhs_INIT_e;
|
||||
}
|
||||
loadNum++;
|
||||
}
|
||||
}
|
||||
if (rv == 4) {
|
||||
|
||||
if (phase_state == cPhs_COMPLEATE_e) {
|
||||
dylPreLoadTime1 = OSGetTime();
|
||||
}
|
||||
return rv;
|
||||
|
||||
return phase_state;
|
||||
}
|
||||
|
||||
return cPhs_NEXT_e;
|
||||
}
|
||||
|
||||
/* 8025AB8C-8025AB94 2554CC 0008+00 1/0 0/0 0/0 .text phase_compleate__FPv */
|
||||
static int phase_compleate(void* param_0) {
|
||||
static int phase_compleate(void* i_this) {
|
||||
return cPhs_COMPLEATE_e;
|
||||
}
|
||||
|
||||
/* 8025AB94-8025ABC4 2554D4 0030+00 1/0 0/0 0/0 .text dScnPly_Create__FP11scene_class */
|
||||
static void dScnPly_Create(scene_class* i_this) {
|
||||
static request_of_phase_process_fn l_method[] = {
|
||||
(request_of_phase_process_fn)phase_00, (request_of_phase_process_fn)phase_1,
|
||||
(request_of_phase_process_fn)phase_1_0, (request_of_phase_process_fn)phase_01,
|
||||
(request_of_phase_process_fn)phase_0, (request_of_phase_process_fn)phase_2,
|
||||
(request_of_phase_process_fn)phase_3, (request_of_phase_process_fn)phase_4,
|
||||
(request_of_phase_process_fn)phase_5, (request_of_phase_process_fn)phase_6,
|
||||
(request_of_phase_process_fn)phase_compleate,
|
||||
};
|
||||
|
||||
dComLbG_PhaseHandler(&static_cast<dScnPly_c*>(i_this)->field_0x1c4, l_method, i_this);
|
||||
}
|
||||
|
||||
/* 803C31C0-803C31D4 -00001 0014+00 2/0 0/0 0/0 .data l_dScnPly_Method */
|
||||
static leafdraw_method_class l_dScnPly_Method = {
|
||||
(process_method_func)dScnPly_Create, (process_method_func)dScnPly_Delete,
|
||||
(process_method_func)dScnPly_Execute, (process_method_func)dScnPly_IsDelete,
|
||||
(process_method_func)dScnPly_Draw,
|
||||
};
|
||||
|
||||
/* 803C31D4-803C31FC -00001 0028+00 0/0 0/0 1/0 .data g_profile_PLAY_SCENE */
|
||||
scene_process_profile_definition g_profile_PLAY_SCENE = {
|
||||
fpcLy_ROOT_e, // mLayerID
|
||||
1, // mListID
|
||||
fpcPi_CURRENT_e, // mListPrio
|
||||
PROC_PLAY_SCENE, // mProcName
|
||||
&g_fpcNd_Method.mBase, // mSubMtd
|
||||
sizeof(dScnPly_c), // mSize
|
||||
0, // mSizeOther
|
||||
0, // mParameters
|
||||
&g_fopScn_Method.mBase, // mSubMtd
|
||||
(process_method_class*)&l_dScnPly_Method, // mpMtd
|
||||
};
|
||||
|
||||
/* 803C31FC-803C3224 -00001 0028+00 0/0 0/0 1/0 .data g_profile_OPENING_SCENE */
|
||||
scene_process_profile_definition g_profile_OPENING_SCENE = {
|
||||
fpcLy_ROOT_e, // mLayerID
|
||||
1, // mListID
|
||||
fpcPi_CURRENT_e, // mListPrio
|
||||
PROC_OPENING_SCENE, // mProcName
|
||||
&g_fpcNd_Method.mBase, // mSubMtd
|
||||
sizeof(dScnPly_c), // mSize
|
||||
0, // mSizeOther
|
||||
0, // mParameters
|
||||
&g_fopScn_Method.mBase, // mSubMtd
|
||||
(process_method_class*)&l_dScnPly_Method, // mpMtd
|
||||
};
|
||||
+64
-38
@@ -1,16 +1,16 @@
|
||||
//
|
||||
// d_s_room
|
||||
//
|
||||
/**
|
||||
* d_s_room.cpp
|
||||
* Gameplay Room Scene
|
||||
*/
|
||||
|
||||
#include "d/s/d_s_room.h"
|
||||
#include "JSystem/JKernel/JKRExpHeap.h"
|
||||
#include "stdio.h"
|
||||
#include "d/com/d_com_inf_game.h"
|
||||
#include "d/d_procname.h"
|
||||
#include "d/s/d_s_play.h"
|
||||
#include "dolphin/os.h"
|
||||
#include "f_op/f_op_actor_mng.h"
|
||||
#include "m_Do/m_Do_Reset.h"
|
||||
#include "stdio.h"
|
||||
|
||||
/* 8025AE1C-8025AE24 25575C 0008+00 1/0 0/0 0/0 .text dScnRoom_Draw__FP19room_of_scene_class */
|
||||
static int dScnRoom_Draw(room_of_scene_class* i_this) {
|
||||
@@ -21,6 +21,7 @@ static int dScnRoom_Draw(room_of_scene_class* i_this) {
|
||||
static int getResetArchiveBank(int param_1, u8 const** param_2) {
|
||||
dStage_roomControl_c::nameData* arcBankName = dStage_roomControl_c::getArcBankName();
|
||||
int local_30 = 0;
|
||||
|
||||
*param_2 = NULL;
|
||||
if (arcBankName != NULL) {
|
||||
dStage_roomControl_c::bankData* arcBankData = dStage_roomControl_c::getArcBankData();
|
||||
@@ -35,19 +36,23 @@ static int getResetArchiveBank(int param_1, u8 const** param_2) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
u8 const* pbVar1 = *param_2;
|
||||
for (int i = 0; i < local_30; pbVar1++, i++) {
|
||||
char* arcBank = dStage_roomControl_c::getArcBank(i);
|
||||
char* name = "";
|
||||
|
||||
int id = *pbVar1;
|
||||
if (id != 0xff) {
|
||||
JUT_ASSERT(160, 0 <= id && id < arcBankName->m_num);
|
||||
name = arcBankName->m_names[id];
|
||||
}
|
||||
|
||||
if (strcmp(arcBank, name) != 0) {
|
||||
return i;
|
||||
}
|
||||
}
|
||||
|
||||
return local_30;
|
||||
}
|
||||
|
||||
@@ -60,24 +65,26 @@ static bool resetArchiveBank(int param_0) {
|
||||
/* 8025AF4C-8025B0F0 25588C 01A4+00 1/1 0/0 0/0 .text setArchiveBank__Fi */
|
||||
static bool setArchiveBank(int param_0) {
|
||||
u8* arr[4];
|
||||
int iVar1 = getResetArchiveBank(param_0, (u8 const**)&arr);
|
||||
int bank_no = getResetArchiveBank(param_0, (u8 const**)&arr);
|
||||
if (arr[0] == NULL) {
|
||||
return true;
|
||||
}
|
||||
|
||||
dStage_roomControl_c::nameData* arcBankName = dStage_roomControl_c::getArcBankName();
|
||||
for (; (int)iVar1 < 0x20; iVar1++) {
|
||||
for (; (int)bank_no < 0x20; bank_no++) {
|
||||
const char* name = "";
|
||||
int id = arr[0][iVar1];
|
||||
int id = arr[0][bank_no];
|
||||
if (id != 0xff) {
|
||||
JUT_ASSERT(216, 0 <= id && id < arcBankName->m_num);
|
||||
name = arcBankName->m_names[id];
|
||||
}
|
||||
|
||||
if (strcmp(name, "") != 0) {
|
||||
if (strnicmp(name, "pack", 4) == 0) {
|
||||
int syncres = dComIfG_syncObjectRes(name);
|
||||
if (syncres < 0) {
|
||||
if (!dComIfG_setObjectRes(name, 0, mDoExt_getArchiveHeap())) {
|
||||
OSReport_Error("Bank[%d] : %s.arc Read Error !!\n", iVar1, name);
|
||||
OSReport_Error("Bank[%d] : %s.arc Read Error !!\n", bank_no, name);
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
@@ -86,12 +93,14 @@ static bool setArchiveBank(int param_0) {
|
||||
}
|
||||
} else {
|
||||
if (!dComIfG_setObjectRes(name, 0, mDoExt_getArchiveHeap())) {
|
||||
OSReport_Error("Bank[%d] : %s.arc Read Error !!\n", iVar1, name);
|
||||
OSReport_Error("Bank[%d] : %s.arc Read Error !!\n", bank_no, name);
|
||||
}
|
||||
}
|
||||
}
|
||||
dStage_roomControl_c::setArcBank(iVar1, name);
|
||||
|
||||
dStage_roomControl_c::setArcBank(bank_no, name);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -131,24 +140,31 @@ static bool isCreating(unsigned int param_0) {
|
||||
static int loadDemoArchive(int room_no) {
|
||||
if (*dStage_roomControl_c::getDemoArcName() == 0) {
|
||||
dStage_Lbnk_c* lbnk = dComIfGp_roomControl_getStatusRoomDt(room_no)->mRoomDt.getLbnk();
|
||||
|
||||
if (lbnk != NULL) {
|
||||
dStage_Lbnk_dt_c* entries = lbnk->entries;
|
||||
|
||||
if (entries != NULL) {
|
||||
int bank = entries[dComIfG_play_c::getLayerNo(room_no)].bank;
|
||||
|
||||
if (bank != 0xff) {
|
||||
JUT_ASSERT(350, 0 <= bank && bank < 100);
|
||||
u8 bank2 = entries[dComIfG_play_c::getLayerNo(room_no)].bank2;
|
||||
JUT_ASSERT(353, 0 <= bank2 && bank2 < 100);
|
||||
|
||||
sprintf(dStage_roomControl_c::getDemoArcName(), "Demo%02d_%02d", bank, bank2);
|
||||
if (!dComIfG_setObjectRes(dStage_roomControl_c::getDemoArcName(), 0, (JKRHeap*)NULL)) {
|
||||
if (!dComIfG_setObjectRes(dStage_roomControl_c::getDemoArcName(), 0,
|
||||
(JKRHeap*)NULL))
|
||||
{
|
||||
*dStage_roomControl_c::getDemoArcName() = 0;
|
||||
} else {
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -224,7 +240,8 @@ static int dScnRoom_Execute(room_of_scene_class* i_this) {
|
||||
fopScnM_DeleteReq(i_this);
|
||||
} else if (i_this->field_0x1d4 < 0 && i_this->field_0x1d5 != 0 &&
|
||||
!i_dComIfGp_event_runCheck() &&
|
||||
(int)fopScnM_GetParam(i_this) == dComIfGp_roomControl_getStayNo()) {
|
||||
(int)fopScnM_GetParam(i_this) == dComIfGp_roomControl_getStayNo())
|
||||
{
|
||||
if (isCreating(fpcM_LayerID(i_this))) {
|
||||
dScnPly_c::nextPauseTimer = 2;
|
||||
} else {
|
||||
@@ -259,7 +276,8 @@ static bool isReadRoom(int param_0) {
|
||||
|
||||
for (int i = 0; i < roomData->field_0x0; i++) {
|
||||
if (dStage_roomRead_dt_c_ChkBg(*tmp) &&
|
||||
param_0 == dStage_roomRead_dt_c_GetLoadRoomIndex(*tmp)) {
|
||||
param_0 == dStage_roomRead_dt_c_GetLoadRoomIndex(*tmp))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
tmp++;
|
||||
@@ -280,7 +298,8 @@ static int dScnRoom_Delete(room_of_scene_class* i_this) {
|
||||
|
||||
if (mDoRst::isReset() || !dComIfGp_isEnableNextStage() ||
|
||||
strcmp(dComIfGp_getNextStageName(), dComIfGp_getStartStageName()) ||
|
||||
(roomNo != dComIfGp_getNextStageRoomNo() && !isReadRoom(roomNo))) {
|
||||
(roomNo != dComIfGp_getNextStageRoomNo() && !isReadRoom(roomNo)))
|
||||
{
|
||||
dComIfG_deleteStageRes(setArcName(i_this));
|
||||
|
||||
JKRExpHeap* heap = dStage_roomControl_c::getMemoryBlock(roomNo);
|
||||
@@ -298,7 +317,7 @@ static int dScnRoom_Delete(room_of_scene_class* i_this) {
|
||||
static int phase_0(room_of_scene_class* i_this) {
|
||||
int roomNo = fopScnM_GetParam(i_this);
|
||||
dStage_roomControl_c::setStatusProcID(roomNo, fopScnM_GetID(i_this));
|
||||
return 2;
|
||||
return cPhs_NEXT_e;
|
||||
}
|
||||
|
||||
/* 8025B8A4-8025B980 2561E4 00DC+00 1/0 0/0 0/0 .text phase_1__FP19room_of_scene_class */
|
||||
@@ -313,7 +332,7 @@ static int phase_1(room_of_scene_class* i_this) {
|
||||
|
||||
if (heap != NULL) {
|
||||
if (heap->getTotalUsedSize() != 0) {
|
||||
return 0;
|
||||
return cPhs_INIT_e;
|
||||
}
|
||||
} else {
|
||||
stage_stag_info_class* stagInfo = i_dComIfGp_getStage()->getStagInfo();
|
||||
@@ -328,7 +347,7 @@ static int phase_1(room_of_scene_class* i_this) {
|
||||
}
|
||||
}
|
||||
|
||||
return 2;
|
||||
return cPhs_NEXT_e;
|
||||
}
|
||||
|
||||
/* 8025B980-8025BAAC 2562C0 012C+00 1/0 0/0 0/0 .text phase_2__FP19room_of_scene_class */
|
||||
@@ -341,7 +360,7 @@ static int phase_2(room_of_scene_class* i_this) {
|
||||
}
|
||||
|
||||
if (phase != 0) {
|
||||
return 0;
|
||||
return cPhs_INIT_e;
|
||||
}
|
||||
|
||||
int roomNo = fopScnM_GetParam(i_this);
|
||||
@@ -368,7 +387,7 @@ static int phase_2(room_of_scene_class* i_this) {
|
||||
mDoExt_setCurrentHeap(old_heap);
|
||||
}
|
||||
|
||||
return 2;
|
||||
return cPhs_NEXT_e;
|
||||
}
|
||||
|
||||
/* 8025BAAC-8025BAC4 2563EC 0018+00 1/1 0/0 0/0 .text setZoneNo__20dStage_roomControl_cFii */
|
||||
@@ -378,16 +397,24 @@ void dStage_roomControl_c::setZoneNo(int i_roomNo, int i_zoneNo) {
|
||||
|
||||
/* 8025BAC4-8025BAF8 256404 0034+00 1/0 0/0 0/0 .text phase_3__FP19room_of_scene_class */
|
||||
static int phase_3(room_of_scene_class* i_this) {
|
||||
return objectSetCheck(i_this) ? 2 : 0;
|
||||
if (objectSetCheck(i_this)) {
|
||||
return cPhs_NEXT_e;
|
||||
} else {
|
||||
return cPhs_INIT_e;
|
||||
}
|
||||
}
|
||||
|
||||
/* 8025BAF8-8025BB48 256438 0050+00 1/0 0/0 0/0 .text phase_4__FP19room_of_scene_class */
|
||||
static int phase_4(room_of_scene_class* i_this) {
|
||||
if (dComIfGp_getPlayer(0) == NULL) {
|
||||
return 0;
|
||||
return cPhs_INIT_e;
|
||||
}
|
||||
|
||||
return objectSetCheck(i_this) ? cPhs_COMPLEATE_e : 0;
|
||||
if (objectSetCheck(i_this)) {
|
||||
return cPhs_COMPLEATE_e;
|
||||
} else {
|
||||
return cPhs_INIT_e;
|
||||
}
|
||||
}
|
||||
|
||||
/* 8025BB48-8025BB78 256488 0030+00 1/0 0/0 0/0 .text dScnRoom_Create__FP11scene_class */
|
||||
@@ -401,24 +428,23 @@ static int dScnRoom_Create(scene_class* i_this) {
|
||||
return dComLbG_PhaseHandler(&room->field_0x1c4, l_method, i_this);
|
||||
}
|
||||
|
||||
/* ############################################################################################## */
|
||||
/* 803C3274-803C3288 -00001 0014+00 1/0 0/0 0/0 .data l_dScnRoom_Method */
|
||||
static leafdraw_method_class l_dScnRoom_Method = {
|
||||
(process_method_func)dScnRoom_Create, (process_method_func)dScnRoom_Delete, (process_method_func)dScnRoom_Execute,
|
||||
(process_method_func)dScnRoom_IsDelete, (process_method_func)dScnRoom_Draw,
|
||||
(process_method_func)dScnRoom_Create, (process_method_func)dScnRoom_Delete,
|
||||
(process_method_func)dScnRoom_Execute, (process_method_func)dScnRoom_IsDelete,
|
||||
(process_method_func)dScnRoom_Draw,
|
||||
};
|
||||
|
||||
/* 803C3288-803C32B0 -00001 0028+00 0/0 0/0 1/0 .data g_profile_ROOM_SCENE */
|
||||
scene_process_profile_definition g_profile_ROOM_SCENE = {
|
||||
fpcLy_CURRENT_e, // mLayerID
|
||||
0, // mListID
|
||||
fpcPi_CURRENT_e, // mListPrio
|
||||
PROC_ROOM_SCENE, // mProcName
|
||||
&g_fpcNd_Method.mBase, // mSubMtd
|
||||
sizeof(room_of_scene_class), // mSize
|
||||
0, // mSizeOther
|
||||
0, // mParameters
|
||||
&g_fopScn_Method.mBase, // mSubMtd
|
||||
(process_method_class*)&l_dScnRoom_Method, // mpMtd
|
||||
fpcLy_CURRENT_e, // mLayerID
|
||||
0, // mListID
|
||||
fpcPi_CURRENT_e, // mListPrio
|
||||
PROC_ROOM_SCENE, // mProcName
|
||||
&g_fpcNd_Method.mBase, // mSubMtd
|
||||
sizeof(room_of_scene_class), // mSize
|
||||
0, // mSizeOther
|
||||
0, // mParameters
|
||||
&g_fopScn_Method.mBase, // mSubMtd
|
||||
(process_method_class*)&l_dScnRoom_Method, // mpMtd
|
||||
};
|
||||
/* 8039A388-8039A388 0269E8 0000+00 0/0 0/0 0/0 .rodata @stringBase0 */
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/**
|
||||
* d_s_title.cpp
|
||||
* dolzel2 - Scene Title
|
||||
* Title Screen Scene
|
||||
*/
|
||||
|
||||
#include "d/s/d_s_title.h"
|
||||
@@ -8,7 +8,6 @@
|
||||
#include "f_pc/f_pc_leaf.h"
|
||||
#include "d/d_procname.h"
|
||||
|
||||
/* ############################################################################################## */
|
||||
/* 803C32B0-803C32D8 -00001 0028+00 0/0 0/0 1/0 .data g_profile_WARNING_SCENE */
|
||||
extern scene_process_profile_definition g_profile_WARNING_SCENE = {
|
||||
fpcLy_ROOT_e, // mLayerID
|
||||
|
||||
Reference in New Issue
Block a user