summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJasper St. Pierre <jstpierre@mecheye.net>2024-07-13 09:47:17 -0700
committerJasper St. Pierre <jstpierre@mecheye.net>2024-07-13 09:47:17 -0700
commitd4a36b32e4ffd2184336bea077e1a94e4abed174 (patch)
tree40b6e7ee99d64a3a6448fbca6de02e62a0a5c11b /src
parent597c49efb7fa9c050b08a4087f2114a820cf2aaf (diff)
some scene/overlap documentation and fixes
Diffstat (limited to 'src')
-rw-r--r--src/d/d_com_inf_game.cpp3
-rw-r--r--src/d/d_s_logo.cpp2
-rw-r--r--src/d/d_s_menu.cpp4
-rw-r--r--src/d/d_s_name.cpp2
-rw-r--r--src/d/d_s_open.cpp2
-rw-r--r--src/d/d_s_play.cpp17
-rw-r--r--src/d/d_s_title.cpp2
-rw-r--r--src/d/d_stage.cpp2
-rw-r--r--src/f_ap/f_ap_game.cpp8
-rw-r--r--src/f_op/f_op_scene_mng.cpp15
-rw-r--r--src/f_op/f_op_scene_req.cpp14
11 files changed, 43 insertions, 28 deletions
diff --git a/src/d/d_com_inf_game.cpp b/src/d/d_com_inf_game.cpp
index 10a51417..d093a02f 100644
--- a/src/d/d_com_inf_game.cpp
+++ b/src/d/d_com_inf_game.cpp
@@ -15,6 +15,7 @@
#include "d/d_item_data.h"
#include "d/d_magma.h"
#include "d/d_particle.h"
+#include "d/d_procname.h"
#include "d/d_tree.h"
#include "d/d_wood.h"
#include "f_op/f_op_scene_mng.h"
@@ -487,7 +488,7 @@ int dComIfG_changeOpeningScene(scene_class* i_scene, s16 i_procName) {
dComIfGp_getNextStageLayer());
dComIfGs_setRestartRoomParam(0);
- fopScnM_ChangeReq(i_scene, i_procName, 0, 30);
+ fopScnM_ChangeReq(i_scene, i_procName, PROC_OVERLAP0, 30);
fopScnM_ReRequest(i_procName, 0);
return 1;
}
diff --git a/src/d/d_s_logo.cpp b/src/d/d_s_logo.cpp
index 64ad87c5..4a3e5610 100644
--- a/src/d/d_s_logo.cpp
+++ b/src/d/d_s_logo.cpp
@@ -482,7 +482,7 @@ static BOOL dScnLogo_Draw(dScnLogo_c* i_this) {
/* 8022D1DC-8022D21C .text dScnLogo_Execute__FP10dScnLogo_c */
static BOOL dScnLogo_Execute(dScnLogo_c* i_this) {
if (mDoRst::isReset())
- fopScnM_ChangeReq(i_this, PROC_LOGO_SCENE, 0, 5);
+ fopScnM_ChangeReq(i_this, PROC_LOGO_SCENE, PROC_OVERLAP0, 5);
return TRUE;
}
diff --git a/src/d/d_s_menu.cpp b/src/d/d_s_menu.cpp
index 6360d78c..d07a6cf7 100644
--- a/src/d/d_s_menu.cpp
+++ b/src/d/d_s_menu.cpp
@@ -145,10 +145,10 @@ static BOOL dScnMenu_Execute(menu_of_scene_class* i_this) {
s16 startCode = (i_this->startCode != 0) ? i_this->startCode - 1 : room->startCode;
dComIfGp_setNextStage(room->stageName, startCode, room->roomNo, room->layerNo);
if (strcmp(dComIfGp_getNextStageName(), "ENDING") == 0) {
- fopScnM_ChangeReq(i_this, PROC_ENDING_SCENE, 0, 5);
+ fopScnM_ChangeReq(i_this, PROC_ENDING_SCENE, PROC_OVERLAP0, 5);
mDoAud_bgmStop(0x1E);
} else {
- fopScnM_ChangeReq(i_this, PROC_PLAY_SCENE, 0, 5);
+ fopScnM_ChangeReq(i_this, PROC_PLAY_SCENE, PROC_OVERLAP0, 5);
dComIfGs_setRestartRoomParam(0);
mDoAud_setSceneName(dComIfGp_getNextStageName(), dComIfGp_getNextStageRoomNo(), dComIfGp_getNextStageLayer());
}
diff --git a/src/d/d_s_name.cpp b/src/d/d_s_name.cpp
index a537bb82..c51b8d24 100644
--- a/src/d/d_s_name.cpp
+++ b/src/d/d_s_name.cpp
@@ -911,7 +911,7 @@ void dScnName_c::changeGameScene() {
dComIfGs_gameStart();
u32 procName = field_0x55f ? PROC_OPEN_SCENE : PROC_PLAY_SCENE;
- if (fopScnM_ChangeReq(this, procName, 0, 5)) {
+ if (fopScnM_ChangeReq(this, procName, PROC_OVERLAP0, 5)) {
g_dComIfG_gameInfo.save.getDan().mStageNo = -1;
dComIfGs_setRestartRoomParam(0);
mDoAud_setSceneName(dComIfGp_getNextStageName(), dComIfGp_getNextStageRoomNo(), dComIfGp_getNextStageLayer());
diff --git a/src/d/d_s_open.cpp b/src/d/d_s_open.cpp
index c561a07d..260a08e6 100644
--- a/src/d/d_s_open.cpp
+++ b/src/d/d_s_open.cpp
@@ -89,7 +89,7 @@ void dScnOpen_c::changeGameScene() {
if (fpcM_GetName(this) == PROC_OPEN2_SCENE) {
dComIfG_changeOpeningScene(this, PROC_OPENING2_SCENE);
} else {
- if (fopScnM_ChangeReq(this, PROC_PLAY_SCENE, 0, 5)) {
+ if (fopScnM_ChangeReq(this, PROC_PLAY_SCENE, PROC_OVERLAP0, 5)) {
dComIfGs_setRestartRoomParam(0);
mDoAud_setSceneName(dComIfGp_getNextStageName(), dComIfGp_getNextStageRoomNo(), dComIfGp_getNextStageLayer());
}
diff --git a/src/d/d_s_play.cpp b/src/d/d_s_play.cpp
index de6d17fd..e941cffc 100644
--- a/src/d/d_s_play.cpp
+++ b/src/d/d_s_play.cpp
@@ -291,13 +291,26 @@ static int dScnPly_Draw(dScnPly_ply_c* i_this) {
if (!fopOvlpM_IsPeek() && !dComIfG_resetToOpening(i_this) && fpcM_GetName(i_this) == PROC_PLAY_SCENE) {
if (dComIfGp_isEnableNextStage()) {
- static s16 l_wipeType[] = {0, 0, 16, 17, 18, 1, 2, 1, 3, 3, 4, 4};
+ static s16 l_wipeType[] = {
+ PROC_OVERLAP0,
+ PROC_OVERLAP0,
+ PROC_OVERLAP2,
+ PROC_OVERLAP3,
+ PROC_OVERLAP4,
+ PROC_OVERLAP1,
+ PROC_OVERLAP6,
+ PROC_OVERLAP1,
+ PROC_OVERLAP7,
+ PROC_OVERLAP7,
+ PROC_OVERLAP8,
+ PROC_OVERLAP8,
+ };
JUT_ASSERT(VERSION_SELECT(997, 1001, 1001),
dComIfGp_getNextStageWipe() < ARRAY_SIZE(l_wipeType));
if (strcmp(dComIfGp_getNextStageName(), "ENDING") == 0) {
- fopScnM_ChangeReq(i_this, PROC_ENDING_SCENE, 0, 5);
+ fopScnM_ChangeReq(i_this, PROC_ENDING_SCENE, PROC_OVERLAP0, 5);
mDoAud_bgmStop(30);
} else {
fopScnM_ChangeReq(i_this, PROC_PLAY_SCENE, l_wipeType[dComIfGp_getNextStageWipe()], 5);
diff --git a/src/d/d_s_title.cpp b/src/d/d_s_title.cpp
index 1e5af478..321b27aa 100644
--- a/src/d/d_s_title.cpp
+++ b/src/d/d_s_title.cpp
@@ -72,7 +72,7 @@ static BOOL dScnTitle_Execute(title_of_scene_class* i_this) {
if (fpcM_GetName(i_this) == PROC_ENDING_SCENE) {
if (movie->mpCallBack1() == 0) {
if (dComIfGs_getClearCount() == 0) {
- fopScnM_ChangeReq(i_this, PROC_NAMEEX_SCENE, 0, 5);
+ fopScnM_ChangeReq(i_this, PROC_NAMEEX_SCENE, PROC_OVERLAP0, 5);
} else {
dComIfG_changeOpeningScene(i_this, PROC_OPENING_SCENE);
}
diff --git a/src/d/d_stage.cpp b/src/d/d_stage.cpp
index 2eb1ba7e..ff9746be 100644
--- a/src/d/d_stage.cpp
+++ b/src/d/d_stage.cpp
@@ -201,7 +201,7 @@ int createRoomScene(int param_0) {
}
*ptr = param_0;
- return fopScnM_CreateReq(PROC_ROOM_SCENE, 0x7FFF, 0, (u32)ptr);
+ return fopScnM_CreateReq(PROC_ROOM_SCENE, PROC_INVALID_e, 0, (u32)ptr);
}
/* 80040E38-80040E6C .text checkRoomDisp__20dStage_roomControl_cCFi */
diff --git a/src/f_ap/f_ap_game.cpp b/src/f_ap/f_ap_game.cpp
index 70ee71ac..cdedc6bc 100644
--- a/src/f_ap/f_ap_game.cpp
+++ b/src/f_ap/f_ap_game.cpp
@@ -9,9 +9,9 @@
#include "f_op/f_op_camera_mng.h"
#include "f_op/f_op_draw_tag.h"
#include "f_pc/f_pc_manager.h"
-#include "SSystem/SComponent/c_counter.h"
+#include "d/d_procname.h"
#include "m_Do/m_Do_main.h"
-#include "dolphin/types.h"
+#include "SSystem/SComponent/c_counter.h"
fapGm_HIO_c g_HIO;
@@ -96,8 +96,8 @@ void fapGm_Create() {
fopOvlpM_Init();
fopCamM_Init();
fopDwTg_CreateQueue();
- fopScnM_CreateReq(5, 0x7FFF, 0, 0);
-
+ fopScnM_CreateReq(PROC_LOGO_SCENE, PROC_INVALID_e, 0, 0);
+
g_HIO.mChildID = mDoHIO_root.mDoHIO_createChild("ゲームシステム", &g_HIO); // "Game System"
}
diff --git a/src/f_op/f_op_scene_mng.cpp b/src/f_op/f_op_scene_mng.cpp
index 638efe5a..bbf91d18 100644
--- a/src/f_op/f_op_scene_mng.cpp
+++ b/src/f_op/f_op_scene_mng.cpp
@@ -7,6 +7,7 @@
#include "f_op/f_op_scene_iter.h"
#include "f_op/f_op_scene_req.h"
#include "f_pc/f_pc_searcher.h"
+#include "d/d_procname.h"
#include "JSystem/JUtility/JUTAssert.h"
scene_class* fopScnM_SearchByID(fpc_ProcID id) {
@@ -15,8 +16,8 @@ scene_class* fopScnM_SearchByID(fpc_ProcID id) {
static uint l_scnRqID = -1;
-int fopScnM_ChangeReq(scene_class* i_scene, s16 procName, s16 fadeTime, u16 param_4) {
- uint sceneRequestID = fopScnRq_Request(2, i_scene, procName, 0, fadeTime, param_4);
+int fopScnM_ChangeReq(scene_class* i_scene, s16 procName, s16 fadeProcName, u16 fadePeekTime) {
+ uint sceneRequestID = fopScnRq_Request(2, i_scene, procName, 0, fadeProcName, fadePeekTime);
if (sceneRequestID == -1) {
return 0;
@@ -27,21 +28,21 @@ int fopScnM_ChangeReq(scene_class* i_scene, s16 procName, s16 fadeTime, u16 para
}
BOOL fopScnM_DeleteReq(scene_class* i_scene) {
- uint sceneRequestID = fopScnRq_Request(1, i_scene, 0x7FFF, 0, 0x7FFF, 0);
+ uint sceneRequestID = fopScnRq_Request(1, i_scene, PROC_INVALID_e, 0, PROC_INVALID_e, 0);
return sceneRequestID != -1;
}
-BOOL fopScnM_CreateReq(s16 param_1, s16 param_2, u16 param_3, u32 param_4) {
- uint sceneRequestID = fopScnRq_Request(0, 0, param_1, (void*)param_4, param_2, param_3);
+BOOL fopScnM_CreateReq(s16 procName, s16 fadeProcName, u16 fadePeekTime, u32 user) {
+ uint sceneRequestID = fopScnRq_Request(0, 0, procName, (void*)user, fadeProcName, fadePeekTime);
return sceneRequestID != -1;
}
-u32 fopScnM_ReRequest(s16 param_1, u32 param_2) {
+u32 fopScnM_ReRequest(s16 procName, u32 user) {
if (l_scnRqID == -1) {
return 0;
}
- return fopScnRq_ReRequest(l_scnRqID, param_1, (void*)param_2);
+ return fopScnRq_ReRequest(l_scnRqID, procName, (void*)user);
}
void fopScnM_Management() {
diff --git a/src/f_op/f_op_scene_req.cpp b/src/f_op/f_op_scene_req.cpp
index ebd83ec2..19d84e34 100644
--- a/src/f_op/f_op_scene_req.cpp
+++ b/src/f_op/f_op_scene_req.cpp
@@ -81,7 +81,7 @@ static scene_request_class* fopScnRq_FadeRequest(s16 procName, u16 peekTime) {
return (scene_request_class*)req;
}
-uint fopScnRq_Request(int param_1, scene_class* i_scene, s16 param_3, void* param_4, s16 param_5, u16 param_6) {
+uint fopScnRq_Request(int reqType, scene_class* i_scene, s16 procName, void* user, s16 fadeProcName, u16 fadePeekTime) {
static node_create_request_method_class submethod = {
(process_method_func)fopScnRq_Execute,
(process_method_func)fopScnRq_Cancel,
@@ -112,25 +112,25 @@ uint fopScnRq_Request(int param_1, scene_class* i_scene, s16 param_3, void* para
};
uint ret;
- int tmp = 0;
+ scene_request_class* fade = NULL;
cPhs__Handler* phase_handler_table;
phase_handler_table = noFadeFase;
scene_request_class* pScnReq = (scene_request_class*)fpcNdRq_Request(
- sizeof(scene_request_class), param_1, (process_node_class*)i_scene, param_3, param_4,
+ sizeof(scene_request_class), reqType, (process_node_class*)i_scene, procName, user,
&submethod);
if (!pScnReq) {
ret = -1;
} else {
- if (param_5 != 0x7fff) {
+ if (fadeProcName != 0x7fff) {
phase_handler_table = fadeFase;
- tmp = (int)fopScnRq_FadeRequest(param_5, param_6);
- if (!tmp) {
+ fade = fopScnRq_FadeRequest(fadeProcName, fadePeekTime);
+ if (!fade) {
fpcNdRq_Delete(&pScnReq->mCrtReq);
return -1;
}
}
- pScnReq->mFadeRequest = tmp;
+ pScnReq->mFadeRequest = fade;
cPhs_Set(&pScnReq->mReqPhsProcCls, phase_handler_table);
ret = pScnReq->mCrtReq.mRequestId;
}