mirror of
https://github.com/zeldaret/tww.git
synced 2026-05-23 06:54:16 -04:00
some scene/overlap documentation and fixes
This commit is contained in:
@@ -505,6 +505,8 @@ enum {
|
||||
PROC_PB = 0x01F4,
|
||||
PROC_GAMEOVER = 0x01F5,
|
||||
PROC_COUNT_e,
|
||||
|
||||
PROC_INVALID_e = 0x7FFF,
|
||||
};
|
||||
|
||||
#endif /* D_PROCNAME_H */
|
||||
|
||||
@@ -13,7 +13,7 @@ void fopScnRq_ReRequest(void);
|
||||
class scene_request_class {
|
||||
public:
|
||||
node_create_request mCrtReq;
|
||||
u32 mFadeRequest; // TODO: type is wrong
|
||||
scene_request_class* mFadeRequest;
|
||||
request_of_phase_process_class mReqPhsProcCls;
|
||||
u8 field_0x70[4];
|
||||
};
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
+1
-1
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
+2
-2
@@ -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());
|
||||
}
|
||||
|
||||
+1
-1
@@ -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());
|
||||
|
||||
+1
-1
@@ -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());
|
||||
}
|
||||
|
||||
+15
-2
@@ -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);
|
||||
|
||||
+1
-1
@@ -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);
|
||||
}
|
||||
|
||||
+1
-1
@@ -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 */
|
||||
|
||||
@@ -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"
|
||||
}
|
||||
|
||||
|
||||
@@ -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() {
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user