mirror of
https://github.com/ACreTeam/ac-decomp
synced 2026-05-23 14:41:38 -04:00
m_play: cleanup & bugfix, add some definitions for submenu & fbdemo
This commit is contained in:
+49
-31
@@ -22,6 +22,55 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
enum {
|
||||
FADE_TYPE_NONE,
|
||||
FADE_TYPE_IN,
|
||||
FADE_TYPE_OUT,
|
||||
FADE_TYPE_OUT_START_EMU,
|
||||
FADE_TYPE_OUT_RETURN_TITLE,
|
||||
FADE_TYPE_OUT_GAME_END_TRAIN,
|
||||
FADE_TYPE_OUT_GAME_END,
|
||||
FADE_TYPE_LOCK,
|
||||
FADE_TYPE_SELECT,
|
||||
FADE_TYPE_DEMO,
|
||||
FADE_TYPE_SELECT_END,
|
||||
FADE_TYPE_EVENT,
|
||||
FADE_TYPE_OTHER_ROOM,
|
||||
FADE_TYPE_OUT_NO_RESTART,
|
||||
|
||||
FADE_TYPE_NUM
|
||||
};
|
||||
|
||||
enum {
|
||||
WIPE_TYPE_NORMAL,
|
||||
WIPE_TYPE_TRIFORCE,
|
||||
WIPE_TYPE_FADE_WHITE,
|
||||
WIPE_TYPE_FADE_BLACK,
|
||||
WIPE_TYPE_CIRCLE_LEFT,
|
||||
WIPE_TYPE_CIRCLE_RIGHT,
|
||||
WIPE_TYPE_EVENT,
|
||||
|
||||
WIPE_TYPE_NUM
|
||||
};
|
||||
|
||||
enum {
|
||||
WIPE_MODE_NONE,
|
||||
WIPE_MODE_CREATE,
|
||||
WIPE_MODE_INIT,
|
||||
WIPE_MODE_MOVE,
|
||||
|
||||
WIPE_MODE_NUM
|
||||
};
|
||||
|
||||
enum {
|
||||
FBDEMO_MODE_NONE,
|
||||
FBDEMO_MODE_CREATE,
|
||||
FBDEMO_MODE_INIT,
|
||||
FBDEMO_MODE_MOVE,
|
||||
|
||||
FBDEMO_MODE_NUM
|
||||
};
|
||||
|
||||
typedef int (*DRAW_CHK_PROC)(ACTOR*, GAME_PLAY*);
|
||||
typedef void (*PLAY_WIPE_PROC)(GAME_PLAY*);
|
||||
|
||||
@@ -75,40 +124,9 @@ struct game_play_s {
|
||||
/* 0x2404 */ u8 _2400[0x2600 - 0x2404];
|
||||
};
|
||||
|
||||
extern fbdemo_c fbdemo;
|
||||
|
||||
extern void Game_play_Reset_destiny();
|
||||
extern void event_title_flag_on();
|
||||
extern void event_title_flag_off();
|
||||
extern void Game_play_camera_proc(GAME_PLAY*);
|
||||
extern void Game_play_fbdemo_wipe_destroy(GAME_PLAY*);
|
||||
extern void Game_play_fbdemo_wipe_create_sub(GAME_PLAY*);
|
||||
extern void Game_play_fbdemo_wipe_create(GAME_PLAY*);
|
||||
extern void Game_play_fbdemo_wipe_init(GAME_PLAY*);
|
||||
extern void Game_play_fbdemo_fade_in_move_end(GAME_PLAY*);
|
||||
extern void Game_play_fbdemo_fade_out_start_emu_move_end(GAME_PLAY*);
|
||||
extern void Game_play_fbdemo_fade_out_game_end_move_end(GAME_PLAY*);
|
||||
extern void Game_play_change_scene_move_end(GAME_PLAY*);
|
||||
extern void Game_play_fbdemo_wipe_move(GAME_PLAY*);
|
||||
extern void Game_play_fbdemo_wipe_proc(GAME_PLAY*);
|
||||
extern Gfx* game_play_set_fog(GAME_PLAY*, Gfx*);
|
||||
extern void Game_play_fbdemo_proc(GAME_PLAY*);
|
||||
extern void play_cleanup(GAME*);
|
||||
extern void VR_Box_ct(GAME_PLAY*);
|
||||
extern void play_init(GAME*);
|
||||
extern void Game_play_move_fbdemo_not_move(GAME_PLAY*);
|
||||
extern void Game_play_move(GAME_PLAY*);
|
||||
extern void setupFog(GAME_PLAY*, GRAPH*);
|
||||
extern void setupViewer(GAME_PLAY*);
|
||||
extern void setupViewMatrix(GAME_PLAY*, GRAPH*, GRAPH*);
|
||||
extern void copy_efb_to_texture(Gfx**, void*);
|
||||
extern int makeBumpTexture(GAME_PLAY*, GRAPH*, GRAPH*);
|
||||
extern void draw_version(GRAPH*);
|
||||
extern void Game_play_draw(GAME*);
|
||||
extern void play_main(GAME*);
|
||||
extern void Gameplay_Scene_Init(GAME_PLAY*);
|
||||
extern u8 mPl_SceneNo2SoundRoomType(int);
|
||||
extern void Gameplay_Scene_Read(GAME_PLAY*, s16);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
||||
@@ -18,6 +18,16 @@ typedef struct submenu_s Submenu;
|
||||
#define mSM_INV_BUTTON_0 BUTTON_START
|
||||
#define mSM_INV_BUTTON_1 BUTTON_Y
|
||||
|
||||
enum {
|
||||
mSM_MODE_IDLE,
|
||||
mSM_MODE_PRERENDER_INIT,
|
||||
mSM_MODE_PRERENDER_WAIT,
|
||||
mSM_MODE_PRERENDER_DONE,
|
||||
mSM_MODE_OTHER,
|
||||
|
||||
mSM_MODE_NUM
|
||||
};
|
||||
|
||||
enum {
|
||||
mSM_PROCESS_WAIT,
|
||||
mSM_PROCESS_PREWAIT,
|
||||
|
||||
@@ -126,9 +126,9 @@ static void aAL_actor_dt(ACTOR* actor, GAME* game) {
|
||||
static void aAL_title_game_data_init_start_select(ANIMAL_LOGO_ACTOR* actor, GAME* game) {
|
||||
GAME_PLAY* play = (GAME_PLAY*)game;
|
||||
|
||||
play->fb_fade_type = 8;
|
||||
play->fb_wipe_type = 3;
|
||||
Common_Set(transition.wipe_type, 3);
|
||||
play->fb_fade_type = FADE_TYPE_SELECT;
|
||||
play->fb_wipe_type = WIPE_TYPE_FADE_BLACK;
|
||||
Common_Set(transition.wipe_type, WIPE_TYPE_FADE_BLACK);
|
||||
mBGMPsComp_make_ps_wipe(0x1168);
|
||||
}
|
||||
|
||||
@@ -237,7 +237,7 @@ static void aAL_game_start_wait(ANIMAL_LOGO_ACTOR* actor, GAME* game) {
|
||||
actor->press_start_opacity = start_opacity;
|
||||
actor->start_opacity_timer = new_opacity_timer;
|
||||
|
||||
if (play->fb_fade_type == 10) {
|
||||
if (play->fb_fade_type == FADE_TYPE_SELECT_END) {
|
||||
aAL_setupAction(actor, game, aAL_ACTION_6);
|
||||
}
|
||||
else if (
|
||||
|
||||
@@ -331,7 +331,7 @@ static void aBC_actor_move(ACTOR* actorx, GAME* game) {
|
||||
}
|
||||
|
||||
/* Only refresh the list when transitioning between acres or transitioning between scenes */
|
||||
if (mFI_CheckPlayerWade(mFI_WADE_NONE) == TRUE && play->fb_fade_type == 0) {
|
||||
if (mFI_CheckPlayerWade(mFI_WADE_NONE) == TRUE && play->fb_fade_type == FADE_TYPE_NONE) {
|
||||
birth_control->move_actor_list_exists_flag = FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -83,7 +83,7 @@ static void aBRS_set_bgOffset(STRUCTURE_ACTOR* windmill, int idx) {
|
||||
static void aBRS_rewrite_out_data(ACTOR* actor, GAME_PLAY* play) {
|
||||
Door_data_c* door_data = Common_GetPointer(structure_exit_door_data);
|
||||
|
||||
if (play->fb_wipe_mode == 0) {
|
||||
if (play->fb_wipe_mode == WIPE_MODE_NONE) {
|
||||
xyz_t pos;
|
||||
|
||||
door_data->next_scene_id = Save_Get(scene_no);
|
||||
@@ -101,7 +101,7 @@ static void aBRS_rewrite_out_data(ACTOR* actor, GAME_PLAY* play) {
|
||||
|
||||
door_data->door_actor_name = BROKER_TENT;
|
||||
|
||||
door_data->wipe_type = 1;
|
||||
door_data->wipe_type = WIPE_TYPE_TRIFORCE;
|
||||
mBGMPsComp_make_ps_wipe(0x2168);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -100,7 +100,7 @@ static void aBGY_rewrite_out_data(ACTOR* actor, GAME_PLAY* play) {
|
||||
xyz_t pos;
|
||||
|
||||
door_data = Common_GetPointer(structure_exit_door_data);
|
||||
if (play->fb_wipe_mode != 0) {
|
||||
if (play->fb_wipe_mode != WIPE_MODE_NONE) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -119,7 +119,7 @@ static void aBGY_rewrite_out_data(ACTOR* actor, GAME_PLAY* play) {
|
||||
|
||||
door_data->door_actor_name = FORTUNE_TENT;
|
||||
|
||||
door_data->wipe_type = 1;
|
||||
door_data->wipe_type = WIPE_TYPE_TRIFORCE;
|
||||
|
||||
mBGMPsComp_make_ps_wipe(0x2168);
|
||||
}
|
||||
|
||||
@@ -22,7 +22,7 @@ static void aCNV_rewrite_out_data(CONVENI_ACTOR* conveni, GAME_PLAY* play) {
|
||||
Door_data_c* out_data_p = Common_GetPointer(structure_exit_door_data);
|
||||
xyz_t pos;
|
||||
|
||||
if (play->fb_wipe_mode == 0) {
|
||||
if (play->fb_wipe_mode == WIPE_MODE_NONE) {
|
||||
out_data_p->next_scene_id = Save_Get(scene_no);
|
||||
out_data_p->exit_orientation = mSc_DIRECT_SOUTH_WEST;
|
||||
out_data_p->exit_type = 0;
|
||||
@@ -36,7 +36,7 @@ static void aCNV_rewrite_out_data(CONVENI_ACTOR* conveni, GAME_PLAY* play) {
|
||||
out_data_p->exit_position.y = (s16)pos.y;
|
||||
out_data_p->exit_position.z = (s16)pos.z;
|
||||
out_data_p->door_actor_name = SHOP1;
|
||||
out_data_p->wipe_type = 1;
|
||||
out_data_p->wipe_type = WIPE_TYPE_TRIFORCE;
|
||||
mBGMPsComp_make_ps_wipe(0x2168);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -521,7 +521,7 @@ static void Cottage_my_rewrite_door(ACTOR* actor, GAME_PLAY* play) {
|
||||
xyz_t pos;
|
||||
|
||||
door_data = Common_GetPointer(structure_exit_door_data);
|
||||
if (play->fb_wipe_mode != 0) {
|
||||
if (play->fb_wipe_mode != WIPE_MODE_NONE) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -540,7 +540,7 @@ static void Cottage_my_rewrite_door(ACTOR* actor, GAME_PLAY* play) {
|
||||
|
||||
door_data->door_actor_name = actor->npc_id;
|
||||
|
||||
door_data->wipe_type = 1;
|
||||
door_data->wipe_type = WIPE_TYPE_TRIFORCE;
|
||||
|
||||
Common_Get(house_owner_name) = 0;
|
||||
}
|
||||
@@ -550,7 +550,7 @@ static void Cottage_npc_rewrite_door(ACTOR* actor, GAME_PLAY* play) {
|
||||
xyz_t pos;
|
||||
|
||||
door_data = Common_GetPointer(structure_exit_door_data);
|
||||
if (play->fb_wipe_mode != 0) {
|
||||
if (play->fb_wipe_mode != WIPE_MODE_NONE) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -569,7 +569,7 @@ static void Cottage_npc_rewrite_door(ACTOR* actor, GAME_PLAY* play) {
|
||||
|
||||
door_data->door_actor_name = actor->npc_id;
|
||||
|
||||
door_data->wipe_type = 1;
|
||||
door_data->wipe_type = WIPE_TYPE_TRIFORCE;
|
||||
|
||||
Common_Get(house_owner_name) = 0;
|
||||
}
|
||||
@@ -778,7 +778,7 @@ static void Cottage_move_open_in(STRUCTURE_ACTOR* cottage, GAME_PLAY* play) {
|
||||
|
||||
goto_other_scene(play, cottage_data->door_data, FALSE);
|
||||
|
||||
play->fb_fade_type = 9;
|
||||
play->fb_fade_type = FADE_TYPE_DEMO;
|
||||
mDemo_End(&cottage->actor_class);
|
||||
|
||||
Cottage_move_next_init(cottage);
|
||||
|
||||
@@ -22,7 +22,7 @@ static void aDPT_rewrite_out_data(DEPART_ACTOR* depart, GAME_PLAY* play) {
|
||||
Door_data_c* out_data_p = Common_GetPointer(structure_exit_door_data);
|
||||
xyz_t pos;
|
||||
|
||||
if (play->fb_wipe_mode == 0) {
|
||||
if (play->fb_wipe_mode == WIPE_MODE_NONE) {
|
||||
out_data_p->next_scene_id = Save_Get(scene_no);
|
||||
out_data_p->exit_orientation = mSc_DIRECT_SOUTH_WEST;
|
||||
out_data_p->exit_type = 0;
|
||||
@@ -36,7 +36,7 @@ static void aDPT_rewrite_out_data(DEPART_ACTOR* depart, GAME_PLAY* play) {
|
||||
out_data_p->exit_position.y = (s16)pos.y;
|
||||
out_data_p->exit_position.z = (s16)pos.z;
|
||||
out_data_p->door_actor_name = SHOP3;
|
||||
out_data_p->wipe_type = 1;
|
||||
out_data_p->wipe_type = WIPE_TYPE_TRIFORCE;
|
||||
mBGMPsComp_make_ps_wipe(0x2168);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2110,7 +2110,7 @@ static int title_fade(EVENT_MANAGER_ACTOR* evmgr, int type, int title_type, u32
|
||||
}
|
||||
|
||||
door_data.door_actor_name = EMPTY_NO;
|
||||
door_data.wipe_type = 6;
|
||||
door_data.wipe_type = WIPE_TYPE_EVENT;
|
||||
exit_drt = Common_Get(door_data).exit_orientation;
|
||||
pos_s.x = Common_Get(door_data).exit_position.x;
|
||||
pos_s.y = Common_Get(door_data).exit_position.y;
|
||||
@@ -2133,13 +2133,13 @@ static int title_fade(EVENT_MANAGER_ACTOR* evmgr, int type, int title_type, u32
|
||||
Common_Get(event_door_data).exit_position.y = pos_s.y;
|
||||
Common_Get(event_door_data).exit_position.z = pos_s.z;
|
||||
Common_Get(event_door_data).door_actor_name = RSV_NO;
|
||||
Common_Get(event_door_data).wipe_type = 6;
|
||||
Common_Get(event_door_data).wipe_type = WIPE_TYPE_EVENT;
|
||||
Common_Set(event_id, type);
|
||||
Common_Set(event_title_flags, title_type);
|
||||
Common_Set(event_title_fade_in_progress, 0);
|
||||
play->fb_wipe_type = 6;
|
||||
play->fb_fade_type = 11;
|
||||
Common_Get(transition).wipe_type = 6;
|
||||
play->fb_wipe_type = WIPE_TYPE_EVENT;
|
||||
play->fb_fade_type = FADE_TYPE_EVENT;
|
||||
Common_Get(transition).wipe_type = WIPE_TYPE_EVENT;
|
||||
aMR_SaveWaltzTempo2();
|
||||
mPlib_request_player_warp_forEvent();
|
||||
mBGMForce_inform_start();
|
||||
@@ -4329,7 +4329,7 @@ static int event_at_wade(EVENT_MANAGER_ACTOR* evmgr, aEvMgr_event_ctrl_c* ctrl)
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (mFI_CheckPlayerWade(mFI_WADE_NONE) == TRUE && ((GAME_PLAY*)gamePT)->fb_fade_type == 0) {
|
||||
if (mFI_CheckPlayerWade(mFI_WADE_NONE) == TRUE && ((GAME_PLAY*)gamePT)->fb_fade_type == FADE_TYPE_NONE) {
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
@@ -4674,7 +4674,7 @@ static void schedule_main(ACTOR* actorx) {
|
||||
mFI_CheckPlayerWade(mFI_WADE_START) == TRUE ||
|
||||
mFI_CheckPlayerWade(mFI_WADE_INPROGRESS) == TRUE ||
|
||||
mFI_CheckPlayerWade(mFI_WADE_END) == TRUE ||
|
||||
play->fb_fade_type != 0 ||
|
||||
play->fb_fade_type != FADE_TYPE_NONE ||
|
||||
mEv_someone_died() != FALSE
|
||||
// clang-format on
|
||||
) {
|
||||
|
||||
@@ -204,7 +204,7 @@ static void aHUS_rewrite_out_data(HOUSE_ACTOR* house, GAME_PLAY* play) {
|
||||
mActor_name_t name;
|
||||
xyz_t pos;
|
||||
|
||||
if (play->fb_wipe_mode == 0) {
|
||||
if (play->fb_wipe_mode == WIPE_MODE_NONE) {
|
||||
name = NPC_START + (house->actor_class.npc_id - NPC_HOUSE_START);
|
||||
if (mNpc_SearchAnimalinfo(Save_Get(animals), name, ANIMAL_NUM_MAX) == -1) {
|
||||
name = RSV_NO;
|
||||
@@ -224,7 +224,7 @@ static void aHUS_rewrite_out_data(HOUSE_ACTOR* house, GAME_PLAY* play) {
|
||||
out_data_p->exit_position.y = (s16)pos.y;
|
||||
out_data_p->exit_position.z = (s16)pos.z;
|
||||
out_data_p->door_actor_name = house->actor_class.npc_id;
|
||||
out_data_p->wipe_type = 1;
|
||||
out_data_p->wipe_type = WIPE_TYPE_TRIFORCE;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -433,7 +433,7 @@ static void aHUS_open_door(HOUSE_ACTOR* house, GAME_PLAY* play) {
|
||||
case 3:
|
||||
aHUS_rewrite_out_data(house, play);
|
||||
goto_other_scene(play, &aHUS_npc_house_door_data, FALSE);
|
||||
play->fb_fade_type = 9;
|
||||
play->fb_fade_type = FADE_TYPE_DEMO;
|
||||
next_act = aHUS_ACTION_NEXT_SCENE_WAIT;
|
||||
mDemo_End((ACTOR*)house);
|
||||
break;
|
||||
|
||||
@@ -97,7 +97,7 @@ static void aKKR_rewrite_out_data(ACTOR* actor, GAME_PLAY* play) {
|
||||
xyz_t pos;
|
||||
|
||||
door_data = Common_GetPointer(structure_exit_door_data);
|
||||
if (play->fb_wipe_mode == 0) {
|
||||
if (play->fb_wipe_mode == WIPE_MODE_NONE) {
|
||||
door_data->next_scene_id = Save_Get(scene_no);
|
||||
door_data->exit_orientation = mSc_DIRECT_SOUTH;
|
||||
door_data->exit_type = 0;
|
||||
@@ -113,7 +113,7 @@ static void aKKR_rewrite_out_data(ACTOR* actor, GAME_PLAY* play) {
|
||||
|
||||
door_data->door_actor_name = KAMAKURA;
|
||||
|
||||
door_data->wipe_type = 1;
|
||||
door_data->wipe_type = WIPE_TYPE_TRIFORCE;
|
||||
|
||||
mBGMPsComp_make_ps_wipe(0x2168);
|
||||
}
|
||||
|
||||
@@ -153,7 +153,7 @@ static void aMsm_rewrite_out_data(ACTOR* actor, GAME_PLAY* play) {
|
||||
xyz_t pos;
|
||||
|
||||
door_data = Common_GetPointer(structure_exit_door_data);
|
||||
if (play->fb_wipe_mode != 0) {
|
||||
if (play->fb_wipe_mode != WIPE_MODE_NONE) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -172,7 +172,7 @@ static void aMsm_rewrite_out_data(ACTOR* actor, GAME_PLAY* play) {
|
||||
|
||||
door_data->door_actor_name = MUSEUM;
|
||||
|
||||
door_data->wipe_type = 1;
|
||||
door_data->wipe_type = WIPE_TYPE_TRIFORCE;
|
||||
|
||||
mBGMPsComp_make_ps_wipe(0x2168);
|
||||
}
|
||||
|
||||
@@ -60,10 +60,10 @@ static void aMHS_goto_next_pl_scene(GAME_PLAY* play, STRUCTURE_ACTOR* my_house)
|
||||
door_data.exit_position.y = 0;
|
||||
door_data.exit_position.z = startZ[my_house->arg0];
|
||||
door_data.door_actor_name = EMPTY_NO;
|
||||
door_data.wipe_type = 1;
|
||||
door_data.wipe_type = WIPE_TYPE_TRIFORCE;
|
||||
|
||||
goto_other_scene(play, &door_data, 0);
|
||||
play->fb_fade_type = 9;
|
||||
play->fb_fade_type = FADE_TYPE_DEMO;
|
||||
}
|
||||
|
||||
// In
|
||||
@@ -131,7 +131,7 @@ static void aMHS_rewrite_pl_out_data(GAME_PLAY* play, STRUCTURE_ACTOR* my_house)
|
||||
Door_data_c* exit_data = Common_GetPointer(structure_exit_door_data);
|
||||
int direct = my_house->action & 1;
|
||||
|
||||
if (play->fb_wipe_mode == 0) {
|
||||
if (play->fb_wipe_mode == WIPE_MODE_NONE) {
|
||||
xyz_t exit_pos;
|
||||
s_xyz* exit_pos_p = &exit_data->exit_position;
|
||||
|
||||
@@ -148,7 +148,7 @@ static void aMHS_rewrite_pl_out_data(GAME_PLAY* play, STRUCTURE_ACTOR* my_house)
|
||||
exit_pos_p->y = exit_pos.y;
|
||||
exit_pos_p->z = exit_pos.z;
|
||||
exit_data->door_actor_name = my_house->actor_class.npc_id;
|
||||
exit_data->wipe_type = 1;
|
||||
exit_data->wipe_type = WIPE_TYPE_TRIFORCE;
|
||||
|
||||
Common_Set(house_owner_name, my_house->action);
|
||||
}
|
||||
@@ -469,7 +469,7 @@ static void aMHS_actor_move(ACTOR* actorx, GAME* game) {
|
||||
if (my_house->actor_class.world.angle.z > 0) {
|
||||
goto_other_scene(play, &door_data, 1);
|
||||
Common_Get(transition).wipe_type = 3;
|
||||
play->fb_fade_type = 9;
|
||||
play->fb_fade_type = FADE_TYPE_DEMO;
|
||||
my_house->actor_class.world.angle.z = -1;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -51,7 +51,7 @@ static void aNW_rewrite_out_data(STRUCTURE_ACTOR* shop, GAME_PLAY* play) {
|
||||
xyz_t pos;
|
||||
|
||||
door_data = Common_GetPointer(structure_exit_door_data);
|
||||
if (play->fb_wipe_mode == 0) {
|
||||
if (play->fb_wipe_mode == WIPE_MODE_NONE) {
|
||||
door_data->next_scene_id = Save_Get(scene_no);
|
||||
door_data->exit_orientation = mSc_DIRECT_SOUTH_WEST;
|
||||
door_data->exit_type = 0;
|
||||
@@ -67,7 +67,7 @@ static void aNW_rewrite_out_data(STRUCTURE_ACTOR* shop, GAME_PLAY* play) {
|
||||
|
||||
door_data->door_actor_name = NEEDLEWORK_SHOP;
|
||||
|
||||
door_data->wipe_type = 1;
|
||||
door_data->wipe_type = WIPE_TYPE_TRIFORCE;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -44,7 +44,7 @@ static void aPBOX_rewrite_out_data(STRUCTURE_ACTOR* shop, GAME_PLAY* play) {
|
||||
xyz_t pos;
|
||||
|
||||
door_data = Common_GetPointer(structure_exit_door_data);
|
||||
if (play->fb_wipe_mode == 0) {
|
||||
if (play->fb_wipe_mode == WIPE_MODE_NONE) {
|
||||
door_data->next_scene_id = Save_Get(scene_no);
|
||||
door_data->exit_orientation = mSc_DIRECT_SOUTH_EAST;
|
||||
door_data->exit_type = 0;
|
||||
@@ -60,7 +60,7 @@ static void aPBOX_rewrite_out_data(STRUCTURE_ACTOR* shop, GAME_PLAY* play) {
|
||||
|
||||
door_data->door_actor_name = POLICE_STATION;
|
||||
|
||||
door_data->wipe_type = 1;
|
||||
door_data->wipe_type = WIPE_TYPE_TRIFORCE;
|
||||
|
||||
mBGMPsComp_make_ps_wipe(0x2168);
|
||||
}
|
||||
|
||||
@@ -51,7 +51,7 @@ static void aPOFF_rewrite_out_data(STRUCTURE_ACTOR* office, GAME_PLAY* play) {
|
||||
xyz_t pos;
|
||||
|
||||
door_data = Common_GetPointer(structure_exit_door_data);
|
||||
if (play->fb_wipe_mode == 0) {
|
||||
if (play->fb_wipe_mode == WIPE_MODE_NONE) {
|
||||
door_data->next_scene_id = Save_Get(scene_no);
|
||||
door_data->exit_orientation = mSc_DIRECT_SOUTH_WEST;
|
||||
door_data->exit_type = 0;
|
||||
@@ -67,7 +67,7 @@ static void aPOFF_rewrite_out_data(STRUCTURE_ACTOR* office, GAME_PLAY* play) {
|
||||
|
||||
door_data->door_actor_name = POST_OFFICE;
|
||||
|
||||
door_data->wipe_type = 1;
|
||||
door_data->wipe_type = WIPE_TYPE_TRIFORCE;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -75,7 +75,7 @@ static void aSNMgr_actor_ct(ACTOR* actorx, GAME* game) {
|
||||
|
||||
bzero(manager->npc_info.timer, sizeof(manager->npc_info.timer));
|
||||
|
||||
if (play->fb_wipe_type == 6) {
|
||||
if (play->fb_wipe_type == WIPE_TYPE_EVENT) {
|
||||
aSNMgr_move_event_set(manager);
|
||||
aSNMgr_force_go_home_event_start(manager);
|
||||
}
|
||||
@@ -1264,7 +1264,7 @@ static void aSNMgr_actor_move(ACTOR* actorx, GAME* game) {
|
||||
aSNMgr_setup_set_proc(manager, aSNMgr_SET_MODE_GUEST);
|
||||
break;
|
||||
case mFI_WADE_NONE:
|
||||
if (play->fb_fade_type == 0) {
|
||||
if (play->fb_fade_type == FADE_TYPE_NONE) {
|
||||
aSNMgr_clear_make_npc(manager->npc_info.make, aSNMgr_EVENT_NORMAL_NPC_NUM);
|
||||
if (!aSNMgr_chk_arbeit_and_demo_and_halloween()) {
|
||||
aSNMgr_force_go_home(manager);
|
||||
|
||||
@@ -66,7 +66,7 @@ static void aSHOP_rewrite_out_data(ACTOR* actor, GAME_PLAY* play) {
|
||||
xyz_t pos;
|
||||
|
||||
door_data = Common_GetPointer(structure_exit_door_data);
|
||||
if (play->fb_wipe_mode != 0) {
|
||||
if (play->fb_wipe_mode != WIPE_MODE_NONE) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -85,7 +85,7 @@ static void aSHOP_rewrite_out_data(ACTOR* actor, GAME_PLAY* play) {
|
||||
|
||||
door_data->door_actor_name = SHOP0;
|
||||
|
||||
door_data->wipe_type = 1;
|
||||
door_data->wipe_type = WIPE_TYPE_TRIFORCE;
|
||||
|
||||
mBGMPsComp_make_ps_wipe(0x2168);
|
||||
}
|
||||
|
||||
@@ -22,7 +22,7 @@ static void aSPR_rewrite_out_data(SUPER_ACTOR* super, GAME_PLAY* play) {
|
||||
Door_data_c* out_data_p = Common_GetPointer(structure_exit_door_data);
|
||||
xyz_t pos;
|
||||
|
||||
if (play->fb_wipe_mode == 0) {
|
||||
if (play->fb_wipe_mode == WIPE_MODE_NONE) {
|
||||
out_data_p->next_scene_id = Save_Get(scene_no);
|
||||
out_data_p->exit_orientation = mSc_DIRECT_SOUTH_WEST;
|
||||
out_data_p->exit_type = 0;
|
||||
@@ -36,7 +36,7 @@ static void aSPR_rewrite_out_data(SUPER_ACTOR* super, GAME_PLAY* play) {
|
||||
out_data_p->exit_position.y = (s16)pos.y;
|
||||
out_data_p->exit_position.z = (s16)pos.z;
|
||||
out_data_p->door_actor_name = SHOP2;
|
||||
out_data_p->wipe_type = 1;
|
||||
out_data_p->wipe_type = WIPE_TYPE_TRIFORCE;
|
||||
mBGMPsComp_make_ps_wipe(0x2168);
|
||||
}
|
||||
}
|
||||
|
||||
+2
-2
@@ -122,7 +122,7 @@ static void aTnt_SetBgOffset(ACTOR* actor, int type) {
|
||||
static void aTnt_rewrite_out_data(ACTOR* actor, GAME_PLAY* play) {
|
||||
Door_data_c* door_data = Common_GetPointer(structure_exit_door_data);
|
||||
|
||||
if (play->fb_wipe_mode == 0) {
|
||||
if (play->fb_wipe_mode == WIPE_MODE_NONE) {
|
||||
xyz_t pos;
|
||||
|
||||
door_data->next_scene_id = Save_Get(scene_no);
|
||||
@@ -140,7 +140,7 @@ static void aTnt_rewrite_out_data(ACTOR* actor, GAME_PLAY* play) {
|
||||
|
||||
door_data->door_actor_name = TENT;
|
||||
|
||||
door_data->wipe_type = 1;
|
||||
door_data->wipe_type = WIPE_TYPE_TRIFORCE;
|
||||
mBGMPsComp_make_ps_wipe(0x2168);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,7 +4,7 @@ static void aTOU_rewrite_door(ACTOR* actor, GAME_PLAY* play){
|
||||
xyz_t pos;
|
||||
Door_data_c* door_data = Common_GetPointer(structure_exit_door_data);
|
||||
|
||||
if(play->fb_wipe_mode == 0){
|
||||
if(play->fb_wipe_mode == WIPE_MODE_NONE){
|
||||
door_data->next_scene_id = Save_Get(scene_no);
|
||||
door_data->exit_orientation = 4;
|
||||
door_data->exit_type = 0;
|
||||
@@ -17,7 +17,7 @@ static void aTOU_rewrite_door(ACTOR* actor, GAME_PLAY* play){
|
||||
door_data->exit_position.y = pos.y;
|
||||
door_data->exit_position.z = pos.z;
|
||||
door_data->door_actor_name = light->actor_class.npc_id;
|
||||
door_data->wipe_type = 1;
|
||||
door_data->wipe_type = WIPE_TYPE_TRIFORCE;
|
||||
mBGMPsComp_make_ps_wipe(0x2168);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -437,12 +437,12 @@ static void Weather_Actor_ct(ACTOR* actor, GAME* game) {
|
||||
} else if (((Common_Get(last_scene_no) == SCENE_MY_ROOM_BASEMENT_S) ||
|
||||
((Common_Get(last_scene_no) - SCENE_MY_ROOM_BASEMENT_M) <= 1U) ||
|
||||
(Common_Get(last_scene_no) == SCENE_MY_ROOM_BASEMENT_LL1)) &&
|
||||
(play->fb_wipe_type == 6)) {
|
||||
(play->fb_wipe_type == WIPE_TYPE_EVENT)) {
|
||||
weather->basement_event = 2;
|
||||
} else {
|
||||
weather->basement_event = 0;
|
||||
}
|
||||
if ((play->fb_wipe_type == 6) && (aWeather_IsLand_Event_Check() == 0) &&
|
||||
if ((play->fb_wipe_type == WIPE_TYPE_EVENT) && (aWeather_IsLand_Event_Check() == 0) &&
|
||||
(aWeather_Basement_Event_Check(actor) == 0)) {
|
||||
weather->current_sound_effect = Common_Get(current_sound_effect);
|
||||
} else {
|
||||
|
||||
@@ -24,7 +24,7 @@ static void aNPC_act_leave_house_wait(NPC_ACTOR* nactorx, GAME_PLAY* play) {
|
||||
|
||||
if (ctrl->door_exit_actor == NULL && ctrl->door_exit_timer == 0) {
|
||||
if (!aNPC_check_entrance_humanoid(nactorx, play)) {
|
||||
if (play->fb_wipe_mode == 0 && play->fb_fade_type == 0) {
|
||||
if (play->fb_wipe_mode == WIPE_MODE_NONE && play->fb_fade_type == FADE_TYPE_NONE) {
|
||||
if (aNPC_request_house(nactorx, play, 2) == TRUE) {
|
||||
aNPC_act_leave_house_chg_step(nactorx, aNPC_ACT_LEAVE_HOUSE_STEP_OUT_OF_DOOR);
|
||||
nactorx->npc_info.animal->is_home = FALSE;
|
||||
|
||||
@@ -718,8 +718,8 @@ static void aNG2_last_talk_end_wait_init(NPC_GUIDE2_ACTOR* guide2, GAME_PLAY* pl
|
||||
static void aNG2_scene_change_wait_init(NPC_GUIDE2_ACTOR* guide2, GAME_PLAY* play) {
|
||||
/* Init next scene transition */
|
||||
goto_next_scene(play, 0, 1);
|
||||
play->fb_wipe_type = 3;
|
||||
Common_Get(transition).wipe_type = 4;
|
||||
play->fb_wipe_type = WIPE_TYPE_FADE_BLACK;
|
||||
Common_Get(transition).wipe_type = WIPE_TYPE_CIRCLE_LEFT;
|
||||
|
||||
mEv_SetFirstJob();
|
||||
mEv_SetFirstIntro();
|
||||
|
||||
@@ -745,8 +745,8 @@ static void aNGD_scene_change_wait_init(NPC_GUIDE_ACTOR* guide, GAME_PLAY* play)
|
||||
|
||||
/* Init next scene transition */
|
||||
goto_next_scene(play, 0, 1);
|
||||
play->fb_wipe_type = 3;
|
||||
Common_Get(transition).wipe_type = 4;
|
||||
play->fb_wipe_type = WIPE_TYPE_FADE_BLACK;
|
||||
Common_Get(transition).wipe_type = WIPE_TYPE_CIRCLE_LEFT;
|
||||
|
||||
/* Clear plant growth renew time */
|
||||
Save_Set(all_grow_renew_time, mTM_rtcTime_clear_code);
|
||||
|
||||
@@ -737,8 +737,8 @@ static void aNM2_talk_end_wait_init() {
|
||||
|
||||
static void aNM2_scene_change_wait_init(NPC_MASK_CAT2_ACTOR* actorx, GAME_PLAY* play) {
|
||||
goto_next_scene(play, 0, TRUE);
|
||||
play->fb_wipe_type = 3;
|
||||
Common_Set(transition.wipe_type, 4);
|
||||
play->fb_wipe_type = WIPE_TYPE_FADE_BLACK;
|
||||
Common_Set(transition.wipe_type, WIPE_TYPE_CIRCLE_LEFT);
|
||||
Common_Set(submenu_disabled, TRUE);
|
||||
mBGMPsComp_make_ps_wipe(0x41c2);
|
||||
mBGMPsComp_scene_mode(18);
|
||||
|
||||
@@ -948,7 +948,7 @@ static void aNNW_talk_exit(NPC_NEEDLEWORK_ACTOR* actor, GAME_PLAY* play) {
|
||||
|
||||
if (mMsg_Check_main_wait(msg_p) == TRUE) {
|
||||
goto_other_scene(play, Common_GetPointer(structure_exit_door_data), TRUE);
|
||||
if (play->fb_wipe_mode == 0) {
|
||||
if (play->fb_wipe_mode == WIPE_MODE_NONE) {
|
||||
mBGMPsComp_scene_mode(14);
|
||||
mBGMPsComp_volume_talk_end();
|
||||
mBGMPsComp_make_ps_wipe(0x195);
|
||||
|
||||
@@ -500,7 +500,7 @@ static void aNPS2_make_door_data(Door_data_c* door_data, int type, NPC_P_SEL2_AC
|
||||
door_data->exit_position.y = 0;
|
||||
door_data->exit_position.z = data_p->pos_z;
|
||||
door_data->door_actor_name = EMPTY_NO;
|
||||
door_data->wipe_type = 3;
|
||||
door_data->wipe_type = WIPE_TYPE_FADE_BLACK;
|
||||
|
||||
if (type == aNPS2_DOOR_EXIT_TYPE_HOME) {
|
||||
int arrange_idx = mHS_get_arrange_idx(p_sel2->player_no);
|
||||
@@ -510,7 +510,7 @@ static void aNPS2_make_door_data(Door_data_c* door_data, int type, NPC_P_SEL2_AC
|
||||
door_data->exit_position.z = homeZ[arrange_idx];
|
||||
door_data->exit_orientation = drt[arrange_idx];
|
||||
door_data->door_actor_name = HOUSE0 + arrange_idx;
|
||||
Common_Get(transition).wipe_type = 1;
|
||||
Common_Get(transition).wipe_type = WIPE_TYPE_TRIFORCE;
|
||||
Now_Private->birthday_present_npc = EMPTY_NO;
|
||||
|
||||
if ((Now_Private->state_flags & mPr_FLAG_BIRTHDAY_ACTIVE) != 0) {
|
||||
@@ -531,7 +531,7 @@ static void aNPS2_make_door_data(Door_data_c* door_data, int type, NPC_P_SEL2_AC
|
||||
}
|
||||
}
|
||||
} else if (type == aNPS2_DOOR_EXIT_TYPE_DEMO2) {
|
||||
Common_Get(transition).wipe_type = 3;
|
||||
Common_Get(transition).wipe_type = WIPE_TYPE_FADE_BLACK;
|
||||
mGH_animal_return_init();
|
||||
} else {
|
||||
Common_Set(demo_profiles[0], mAc_PROFILE_RIDE_OFF_DEMO);
|
||||
@@ -539,7 +539,7 @@ static void aNPS2_make_door_data(Door_data_c* door_data, int type, NPC_P_SEL2_AC
|
||||
Common_Set(demo_profiles[1], mAc_PROFILE_RESET_DEMO);
|
||||
}
|
||||
|
||||
Common_Get(transition).wipe_type = 4;
|
||||
Common_Get(transition).wipe_type = WIPE_TYPE_CIRCLE_LEFT;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1232,7 +1232,7 @@ static void aNPS2_game_start_wait(NPC_P_SEL2_ACTOR* p_sel2, GAME_PLAY* play) {
|
||||
|
||||
static void aNPS2_return_title(NPC_P_SEL2_ACTOR* p_sel2, GAME_PLAY* play) {
|
||||
if (mDemo_Check(mDemo_TYPE_SPEAK, (ACTOR*)p_sel2) == FALSE) {
|
||||
play->fb_fade_type = 4;
|
||||
play->fb_fade_type = FADE_TYPE_OUT_RETURN_TITLE;
|
||||
mPlib_request_main_invade_type1((GAME*)play);
|
||||
Actor_info_save_actor(play);
|
||||
aNPS2_change_talk_proc(p_sel2, play, aNPS2_TALK_WAIT);
|
||||
|
||||
@@ -7,7 +7,7 @@ static int aNPS_setup_game_start(GAME_PLAY* play) {
|
||||
|
||||
if (mCD_InitGameStart_bg(0, -1, 0, &chan) == 0) {
|
||||
goto_other_scene(play, &door_data, TRUE);
|
||||
Common_Set(transition.wipe_type, 3);
|
||||
Common_Set(transition.wipe_type, WIPE_TYPE_FADE_BLACK);
|
||||
Common_Set(map_flag, FALSE);
|
||||
res = TRUE;
|
||||
}
|
||||
|
||||
@@ -12,7 +12,7 @@ static void aNRG2_set_exit_info(ACTOR* actorx) {
|
||||
static void aNRG2_exit_check(ACTOR* actorx, GAME_PLAY* play) {
|
||||
PLAYER_ACTOR* player = GET_PLAYER_ACTOR(play);
|
||||
|
||||
if (player != NULL && player->item_in_front == EXIT_DOOR1 && play->fb_wipe_mode == 0) {
|
||||
if (player != NULL && player->item_in_front == EXIT_DOOR1 && play->fb_wipe_mode == WIPE_MODE_NONE) {
|
||||
mDemo_Request(mDemo_TYPE_EXITSCENE, actorx, &aNRG2_set_exit_info);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -189,7 +189,7 @@ static void aNRG2_job_start_wait(NPC_RCN_GUIDE2_ACTOR* rcn_guide2, GAME_PLAY* pl
|
||||
}
|
||||
|
||||
static void aNRG2_all_job_end(NPC_RCN_GUIDE2_ACTOR* rcn_guide2, GAME_PLAY* play) {
|
||||
if (play->fb_wipe_mode == 0) {
|
||||
if (play->fb_wipe_mode == WIPE_MODE_NONE) {
|
||||
rcn_guide2->counter++;
|
||||
|
||||
if (rcn_guide2->counter > 60) {
|
||||
|
||||
@@ -3,8 +3,8 @@ static void aNRST_think_start(NPC_RESTART_ACTOR* actor, GAME_PLAY* play) {
|
||||
}
|
||||
|
||||
static void aNRST_think_title(NPC_RESTART_ACTOR* actor, GAME_PLAY* play) {
|
||||
play->fb_wipe_type = 3;
|
||||
play->fb_fade_type = 4;
|
||||
play->fb_wipe_type = WIPE_TYPE_FADE_BLACK;
|
||||
play->fb_fade_type = FADE_TYPE_OUT_RETURN_TITLE;
|
||||
mPlib_request_main_invade_type1((GAME*)play);
|
||||
Actor_info_save_actor(play);
|
||||
actor->think_idx = aNRST_THINK_WAIT;
|
||||
@@ -24,7 +24,7 @@ static void aNRST_think_door(NPC_RESTART_ACTOR* actor, GAME_PLAY* play) {
|
||||
door_data.extra_data = 1;
|
||||
door_data.exit_position.y = 0;
|
||||
door_data.door_actor_name = EMPTY_NO;
|
||||
door_data.wipe_type = 3;
|
||||
door_data.wipe_type = WIPE_TYPE_FADE_BLACK;
|
||||
|
||||
// set with real data?
|
||||
// this is strange and I suspect this was toggled on/off for debugging
|
||||
@@ -34,8 +34,8 @@ static void aNRST_think_door(NPC_RESTART_ACTOR* actor, GAME_PLAY* play) {
|
||||
door_data.door_actor_name = HOUSE0 + arrange_idx;
|
||||
|
||||
goto_other_scene(play, &door_data, TRUE);
|
||||
Common_Get(transition).wipe_type = 1;
|
||||
play->fb_fade_type = 9;
|
||||
Common_Get(transition).wipe_type = WIPE_TYPE_TRIFORCE;
|
||||
play->fb_fade_type = FADE_TYPE_DEMO;
|
||||
mBGMPsComp_make_ps_wipe(0x31C2);
|
||||
}
|
||||
|
||||
|
||||
@@ -15,8 +15,8 @@ static void aNRTC_think_start(NPC_ACTOR* actor, GAME_PLAY* play) {
|
||||
static void aNRTC_think_title(NPC_ACTOR* actor, GAME_PLAY* play) {
|
||||
NPC_RTC_ACTOR* rtc = (NPC_RTC_ACTOR*)actor;
|
||||
|
||||
play->fb_wipe_type = 3;
|
||||
play->fb_fade_type = 4;
|
||||
play->fb_wipe_type = WIPE_TYPE_FADE_BLACK;
|
||||
play->fb_fade_type = FADE_TYPE_OUT_RETURN_TITLE;
|
||||
mPlib_request_main_invade_type1((GAME*)play);
|
||||
Actor_info_save_actor(play);
|
||||
rtc->think_idx = aNRTC_THINK_WAIT;
|
||||
@@ -38,7 +38,7 @@ static Door_data_c door_data = {
|
||||
static void aNRTC_think_door(NPC_ACTOR* actor, GAME_PLAY* play) {
|
||||
if (sAdo_BgmFadeoutCheck() != 0) {
|
||||
goto_other_scene(play, &door_data, 1);
|
||||
Common_Set(transition.wipe_type, 3);
|
||||
Common_Set(transition.wipe_type, WIPE_TYPE_FADE_BLACK);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -47,7 +47,7 @@ static void aNRTC_think_check(NPC_ACTOR* actor, GAME_PLAY* play) {
|
||||
if (sAdo_BgmFadeoutCheck() != 0) {
|
||||
goto_other_scene(play, &door_data, 1);
|
||||
mCD_ReCheckLoadLand(play);
|
||||
Common_Set(transition.wipe_type, 3);
|
||||
Common_Set(transition.wipe_type, WIPE_TYPE_FADE_BLACK);
|
||||
rtc->think_idx = aNRTC_THINK_WAIT;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2880,8 +2880,8 @@ static void aNSC_exit_wait(NPC_SHOP_COMMON_ACTOR* shop_common, GAME_PLAY* play)
|
||||
|
||||
if (mMsg_Check_main_wait(mMsg_Get_base_window_p()) == TRUE) {
|
||||
goto_other_scene(play, &stairs, TRUE);
|
||||
if (play->fb_wipe_mode == 0) {
|
||||
play->fb_fade_type = 12;
|
||||
if (play->fb_wipe_mode == WIPE_MODE_NONE) {
|
||||
play->fb_fade_type = FADE_TYPE_OTHER_ROOM;
|
||||
mBGMPsComp_volume_talk_end();
|
||||
mBGMPsComp_make_ps_wipe(0x195);
|
||||
}
|
||||
@@ -2891,7 +2891,7 @@ static void aNSC_exit_wait(NPC_SHOP_COMMON_ACTOR* shop_common, GAME_PLAY* play)
|
||||
|
||||
if (mMsg_Check_main_wait(mMsg_Get_base_window_p()) == TRUE) {
|
||||
goto_other_scene(play, Common_GetPointer(structure_exit_door_data), TRUE);
|
||||
if (play->fb_wipe_mode == 0) {
|
||||
if (play->fb_wipe_mode == WIPE_MODE_NONE) {
|
||||
mBGMPsComp_scene_mode(0xe);
|
||||
mBGMPsComp_volume_talk_end();
|
||||
mBGMPsComp_make_ps_wipe(0x195);
|
||||
|
||||
@@ -288,7 +288,7 @@ static void aSHM_exit_wait(NPC_SHOP_MASTERSP_ACTOR* shop_mastersp, GAME_PLAY* pl
|
||||
if (mMsg_CHECK_MAIN_WAIT() == TRUE) {
|
||||
goto_other_scene(play, Common_GetPointer(structure_exit_door_data), TRUE);
|
||||
|
||||
if (play->fb_wipe_mode == 0) {
|
||||
if (play->fb_wipe_mode == WIPE_MODE_NONE) {
|
||||
mBGMPsComp_scene_mode(14);
|
||||
mBGMPsComp_volume_talk_end();
|
||||
mBGMPsComp_make_ps_wipe(0x195);
|
||||
|
||||
@@ -29,8 +29,8 @@ static void aNPS2_make_door_data(Door_data_c* door_data) {
|
||||
door_data->exit_position.y = 0;
|
||||
door_data->exit_position.z = demo2_data.pos_z;
|
||||
door_data->door_actor_name = EMPTY_NO;
|
||||
door_data->wipe_type = 5;
|
||||
Common_Get(transition).wipe_type = 3;
|
||||
door_data->wipe_type = WIPE_TYPE_CIRCLE_RIGHT;
|
||||
Common_Get(transition).wipe_type = WIPE_TYPE_FADE_BLACK;
|
||||
}
|
||||
|
||||
static int aNPS2_setup_game_start(GAME_PLAY* play) {
|
||||
@@ -358,8 +358,8 @@ static void aSTM_game_end_init(NPC_STATION_MASTER_ACTOR* actor, GAME_PLAY* play)
|
||||
aNPS2_setup_game_start(play);
|
||||
} else {
|
||||
mBGMPsComp_make_ps_wipe(0x328A);
|
||||
play->fb_fade_type = 5;
|
||||
play->fb_wipe_type = 5;
|
||||
play->fb_fade_type = FADE_TYPE_OUT_GAME_END_TRAIN;
|
||||
play->fb_wipe_type = WIPE_TYPE_CIRCLE_RIGHT;
|
||||
mPlib_request_main_invade_type1((GAME*)play);
|
||||
}
|
||||
|
||||
|
||||
@@ -506,7 +506,7 @@ static void aEBR2_say_goodbye(EV_BROKER2_ACTOR* broker2, GAME_PLAY* play) {
|
||||
static void aEBR2_exit_wait(EV_BROKER2_ACTOR* broker2, GAME_PLAY* play) {
|
||||
if (mMsg_CHECK_MAIN_WAIT() == TRUE) {
|
||||
goto_other_scene(play, Common_GetPointer(structure_exit_door_data), TRUE);
|
||||
if (play->fb_wipe_mode == 0) {
|
||||
if (play->fb_wipe_mode == WIPE_MODE_NONE) {
|
||||
mBGMPsComp_scene_mode(14);
|
||||
mBGMPsComp_make_ps_wipe(0x195);
|
||||
mBGMPsComp_volume_talk_end();
|
||||
|
||||
+2
-2
@@ -679,7 +679,7 @@ static int wait_emsg_end() {
|
||||
if (demo->data.emsg.scene_delay_timer <= 0 || demo->state == mDemo_STATE_STOP) {
|
||||
if (goto_other_scene(play, &demo->data.emsg.door_data, FALSE)) {
|
||||
play->fb_wipe_type = demo->data.emsg.door_data.wipe_type;
|
||||
play->fb_fade_type = 11;
|
||||
play->fb_fade_type = FADE_TYPE_EVENT;
|
||||
Common_Set(transition.wipe_type, demo->data.emsg.door_data.wipe_type);
|
||||
mBGMForce_inform_end();
|
||||
|
||||
@@ -715,7 +715,7 @@ static int wait_emsg2_end() {
|
||||
|
||||
if (goto_other_scene(play, Common_GetPointer(event_door_data), FALSE)) {
|
||||
play->fb_wipe_type = Common_Get(event_door_data).wipe_type;
|
||||
play->fb_fade_type = 11;
|
||||
play->fb_fade_type = FADE_TYPE_EVENT;
|
||||
Common_Set(transition.wipe_type, Common_Get(event_door_data).wipe_type);
|
||||
mBGMForce_inform_end();
|
||||
memset(&demo->request_save, 0, sizeof(mDemo_Request_c));
|
||||
|
||||
+11
-10
@@ -6,7 +6,7 @@
|
||||
#include "m_play.h"
|
||||
#include "libultra/libultra.h"
|
||||
|
||||
Gfx fbdemo_gfx_init[] = {
|
||||
static Gfx fbdemo_gfx_init[] = {
|
||||
gsDPPipeSync(),
|
||||
gsSPTexture(0x8000, 0x8000, 0, G_TX_RENDERTILE, G_ON),
|
||||
gsSPClearGeometryMode(G_ZBUFFER | G_SHADE | G_CULL_BOTH | G_FOG | G_LIGHTING | G_TEXTURE_GEN |
|
||||
@@ -32,7 +32,7 @@ extern void fbdemo_init_gfx(fbdemo_c* this) {
|
||||
|
||||
guMtxIdent(&this->modelView1);
|
||||
guMtxIdent(&this->modelView2);
|
||||
guOrtho(&this->projection, 0.0f, 320, 240, 0.0f, -1000.0f, 1000.0f, 1.0f);
|
||||
guOrtho(&this->projection, 0.0f, N64_SCREEN_WIDTH, N64_SCREEN_HEIGHT, 0.0f, -1000.0f, 1000.0f, 1.0f);
|
||||
|
||||
for (frame = 0; frame < 2; frame++) {
|
||||
this->frame = frame;
|
||||
@@ -57,7 +57,7 @@ extern void fbdemo_init_gfx(fbdemo_c* this) {
|
||||
|
||||
gfx = this->gfx;
|
||||
for (rowTex = 0, row = 0; row < this->rows; rowTex += 0x20, row++) {
|
||||
gSPVertex(gfx++, SEGMENT_ADDR(0xA, (u32)row * (this->cols + 1) * sizeof(Vtx)), 2 * (this->cols + 1), 0);
|
||||
gSPVertex(gfx++, anime_3_txt + (u32)row * (this->cols + 1) * sizeof(Vtx), 2 * (this->cols + 1), 0);
|
||||
|
||||
colTex = 0;
|
||||
col = 0;
|
||||
@@ -65,9 +65,10 @@ extern void fbdemo_init_gfx(fbdemo_c* this) {
|
||||
while (col < this->cols) {
|
||||
gDPPipeSync(gfx++);
|
||||
|
||||
gDPLoadTextureTile(gfx++, SEGMENT_ADDR(0xB, 0), G_IM_FMT_RGBA, G_IM_SIZ_16b, 320, 240, colTex, rowTex,
|
||||
colTex + 0x20, rowTex + 0x20, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP,
|
||||
G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD);
|
||||
gDPLoadTextureTile(gfx++, anime_4_txt, G_IM_FMT_RGBA, G_IM_SIZ_16b, N64_SCREEN_WIDTH,
|
||||
N64_SCREEN_HEIGHT, colTex, rowTex, colTex + 0x20, rowTex + 0x20, 0,
|
||||
G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK,
|
||||
G_TX_NOLOD, G_TX_NOLOD);
|
||||
|
||||
gSP1Quadrangle(gfx++, col2, col2 + 1, +(this->cols) + 2 + col2, this->cols + 1 + col2, 0);
|
||||
|
||||
@@ -117,7 +118,7 @@ extern void fbdemo_cleanup(fbdemo_c* this) {
|
||||
extern fbdemo_c* fbdemo_init(fbdemo_c* this, int cols, int rows) {
|
||||
s32 gridsize;
|
||||
|
||||
bzero(this, sizeof(fbdemo));
|
||||
bzero(this, sizeof(fbdemo_c));
|
||||
|
||||
this->cols = cols;
|
||||
this->rows = rows;
|
||||
@@ -177,15 +178,15 @@ extern void fbdemo_update(fbdemo_c* this) {
|
||||
}
|
||||
}
|
||||
|
||||
void fbdemo_draw(fbdemo_c* this, Gfx** gfxP) {
|
||||
extern void fbdemo_draw(fbdemo_c* this, Gfx** gfxP) {
|
||||
Gfx* gfx = *gfxP;
|
||||
|
||||
gSPDisplayList(gfx++, fbdemo_gfx_init);
|
||||
fbdemo_update(this);
|
||||
gSPMatrix(gfx++, &this->projection, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_PROJECTION);
|
||||
gSPMatrix(gfx++, &this->modelView1, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
gSPSegment(gfx++, 0xA, this->frame == 0 ? this->vtxFrame1 : this->vtxFrame2);
|
||||
gSPSegment(gfx++, 0xB, this->zBuffer);
|
||||
gSPSegment(gfx++, ANIME_3_TXT_SEG, this->frame == 0 ? this->vtxFrame1 : this->vtxFrame2);
|
||||
gSPSegment(gfx++, ANIME_4_TXT_SEG, this->zBuffer);
|
||||
gSPDisplayList(gfx++, fbdemo_gfx_init);
|
||||
gSPDisplayList(gfx++, this->gfx);
|
||||
gDPPipeSync(gfx++);
|
||||
|
||||
@@ -1414,7 +1414,7 @@ extern void mFM_FieldInit(GAME_PLAY* play) {
|
||||
Common_Set(floor_idx, mRmTp_GetFloorIdx());
|
||||
Common_Set(make_npc2_actor, FALSE);
|
||||
|
||||
if (play->fb_wipe_type == 6) {
|
||||
if (play->fb_wipe_type == WIPE_TYPE_EVENT) {
|
||||
if (scene == SCENE_MUSEUM_ENTRANCE) {
|
||||
mBGMPsComp_museum_status(1);
|
||||
}
|
||||
|
||||
+193
-200
@@ -37,14 +37,21 @@
|
||||
#include "m_scene_table.h"
|
||||
#include "m_player_lib.h"
|
||||
#include "m_skin_matrix.h"
|
||||
#include "padmgr.h"
|
||||
|
||||
u16 S_back_title_timer;
|
||||
u16 S_se_endcheck_timeout;
|
||||
fbdemo_c fbdemo;
|
||||
u8 gxbuf[0x140] ATTRIBUTE_ALIGN(32);
|
||||
u8 prbuf[0x12c000] ATTRIBUTE_ALIGN(32);
|
||||
#define Game_play_HYRAL_SIZE 0x3E800 // 256,000 bytes
|
||||
#define Game_play_IS_PAUSED(play) (ZURUMODE2_ENABLED() ? (!Pause_proc(&(play)->pause, &(play)->game.pads[PAD1])) : FALSE)
|
||||
|
||||
void Game_play_Reset_destiny() {
|
||||
static fbdemo_c fbdemo;
|
||||
static u16 S_back_title_timer = 0;
|
||||
static u16 S_se_endcheck_timeout = 0;
|
||||
static u8 gxbuf[0x140] ATTRIBUTE_ALIGN(32);
|
||||
static u8 prbuf[(2*SCREEN_WIDTH) * (2*SCREEN_HEIGHT) * sizeof(u32)] ATTRIBUTE_ALIGN(32); // 0x12C000
|
||||
|
||||
static void Game_play_fbdemo_wipe_init(GAME_PLAY* play);
|
||||
static void Gameplay_Scene_Read(GAME_PLAY* play, s16 scene_no);
|
||||
|
||||
static void Game_play_Reset_destiny() {
|
||||
lbRTC_time_c* rtc_time = Common_GetPointer(time.rtc_time);
|
||||
mPr_destiny_c* destiny = &Common_Get(now_private)->destiny;
|
||||
|
||||
@@ -54,39 +61,35 @@ void Game_play_Reset_destiny() {
|
||||
|
||||
if ((rtc_time->year != destiny->received_time.year) || (rtc_time->month != destiny->received_time.month) ||
|
||||
(rtc_time->day != destiny->received_time.day)) {
|
||||
|
||||
Common_Set(now_private->destiny.type, mPr_DESTINY_NORMAL);
|
||||
}
|
||||
}
|
||||
|
||||
void event_title_flag_on() {
|
||||
static void event_title_flag_on() {
|
||||
if (Common_Get(event_title_flags) != 0) {
|
||||
Common_Set(event_notification_active, 1);
|
||||
}
|
||||
}
|
||||
|
||||
void event_title_flag_off() {
|
||||
|
||||
static void event_title_flag_off() {
|
||||
if (Common_Get(event_title_flags) == 2) {
|
||||
Common_Set(event_title_flags, 0);
|
||||
Common_Set(event_notification_active, 0);
|
||||
}
|
||||
}
|
||||
|
||||
void Game_play_camera_proc(GAME_PLAY* play) {
|
||||
|
||||
static void Game_play_camera_proc(GAME_PLAY* play) {
|
||||
Camera2_ClearActorTalking_Cull(play);
|
||||
Camera2_process(play);
|
||||
}
|
||||
|
||||
void Game_play_fbdemo_wipe_destroy(GAME_PLAY* play) {
|
||||
|
||||
static void Game_play_fbdemo_wipe_destroy(GAME_PLAY* play) {
|
||||
play->fbdemo_wipe.wipe_procs.cleanup_proc(&play->fbdemo_wipe.wipe_data);
|
||||
play->fb_wipe_mode = 0;
|
||||
play->fb_wipe_mode = WIPE_MODE_NONE;
|
||||
play->fbdemo_wipe.wipe_type = -1;
|
||||
}
|
||||
|
||||
void Game_play_fbdemo_wipe_create_sub(GAME_PLAY* play) {
|
||||
static void Game_play_fbdemo_wipe_create_sub(GAME_PLAY* play) {
|
||||
static void* wipe_normal_proc[] = {
|
||||
fbdemo_wipe1_init,
|
||||
none_proc1,
|
||||
@@ -147,13 +150,12 @@ void Game_play_fbdemo_wipe_create_sub(GAME_PLAY* play) {
|
||||
play->fbdemo_wipe.wipe_procs.isfinished_proc = cur->isfinished_proc;
|
||||
}
|
||||
|
||||
void Game_play_fbdemo_wipe_create(GAME_PLAY* play) {
|
||||
|
||||
static void Game_play_fbdemo_wipe_create(GAME_PLAY* play) {
|
||||
Game_play_fbdemo_wipe_create_sub(play);
|
||||
Game_play_fbdemo_wipe_init(play);
|
||||
}
|
||||
|
||||
void Game_play_fbdemo_wipe_init(GAME_PLAY* play) {
|
||||
static void Game_play_fbdemo_wipe_init(GAME_PLAY* play) {
|
||||
fbdemo_wipe* wipe = &play->fbdemo_wipe;
|
||||
u8 type;
|
||||
|
||||
@@ -166,54 +168,51 @@ void Game_play_fbdemo_wipe_init(GAME_PLAY* play) {
|
||||
|
||||
type = play->fb_fade_type;
|
||||
|
||||
if (wipe->wipe_type == 4) {
|
||||
if (wipe->wipe_type == WIPE_TYPE_CIRCLE_LEFT) {
|
||||
type |= 0x80;
|
||||
} else if (wipe->wipe_type == 5) {
|
||||
} else if (wipe->wipe_type == WIPE_TYPE_CIRCLE_RIGHT) {
|
||||
type |= 0x40;
|
||||
}
|
||||
wipe->wipe_procs.settype_proc(&wipe->wipe_data, type);
|
||||
wipe->wipe_procs.startup_proc(&wipe->wipe_data);
|
||||
|
||||
play->fb_wipe_mode = 3;
|
||||
play->fb_wipe_mode = WIPE_MODE_MOVE;
|
||||
|
||||
S_back_title_timer = 120;
|
||||
S_se_endcheck_timeout = 120;
|
||||
}
|
||||
|
||||
void Game_play_fbdemo_fade_in_move_end(GAME_PLAY* play) {
|
||||
static void Game_play_fbdemo_fade_in_move_end(GAME_PLAY* play) {
|
||||
Game_play_fbdemo_wipe_destroy(play);
|
||||
|
||||
if (play->fb_mode == 3) {
|
||||
if (play->fb_mode == FBDEMO_MODE_MOVE) {
|
||||
fbdemo_cleanup(&fbdemo);
|
||||
play->fb_mode = 0;
|
||||
play->fb_mode = FBDEMO_MODE_NONE;
|
||||
SetGameFrame(3);
|
||||
}
|
||||
}
|
||||
|
||||
void Game_play_fbdemo_fade_out_start_emu_move_end(GAME_PLAY* play) {
|
||||
|
||||
static void Game_play_fbdemo_fade_out_start_emu_move_end(GAME_PLAY* play) {
|
||||
GAME_GOTO_NEXT(&play->game, famicom_emu, FAMICOM_EMU);
|
||||
}
|
||||
|
||||
void Game_play_fbdemo_fade_out_game_end_move_end(GAME_PLAY* play) {
|
||||
|
||||
static void Game_play_fbdemo_fade_out_game_end_move_end(GAME_PLAY* play) {
|
||||
GAME_GOTO_NEXT(&play->game, trademark, TRADEMARK);
|
||||
}
|
||||
|
||||
void Game_play_change_scene_move_end(GAME_PLAY* play) {
|
||||
|
||||
static void Game_play_change_scene_move_end(GAME_PLAY* play) {
|
||||
game_goto_next_game_play(&play->game);
|
||||
Common_Set(last_scene_no, Save_Get(scene_no));
|
||||
Save_Set(scene_no, play->next_scene_no);
|
||||
}
|
||||
|
||||
void Game_play_fbdemo_wipe_move(GAME_PLAY* play) {
|
||||
static void Game_play_fbdemo_wipe_move(GAME_PLAY* play) {
|
||||
fbdemo_wipe* wipe = &play->fbdemo_wipe;
|
||||
s16 wipet = FALSE;
|
||||
int isDone = TRUE;
|
||||
|
||||
if (wipe->wipe_procs.isfinished_proc(&wipe->wipe_data) != 0) {
|
||||
if ((play->fb_fade_type != 1) && (play->fb_fade_type != 11)) {
|
||||
if ((play->fb_fade_type != FADE_TYPE_IN) && (play->fb_fade_type != FADE_TYPE_EVENT)) {
|
||||
if (S_se_endcheck_timeout != 0) {
|
||||
S_se_endcheck_timeout--;
|
||||
}
|
||||
@@ -224,17 +223,17 @@ void Game_play_fbdemo_wipe_move(GAME_PLAY* play) {
|
||||
sAdo_Set_ongenpos_refuse_fg(1);
|
||||
}
|
||||
}
|
||||
if (play->fb_fade_type == 11) {
|
||||
if (play->fb_fade_type == FADE_TYPE_EVENT) {
|
||||
sAdo_Set_ongenpos_refuse_fg(2);
|
||||
}
|
||||
|
||||
if (isDone == TRUE) {
|
||||
switch (play->fb_fade_type) {
|
||||
case 1:
|
||||
case FADE_TYPE_IN:
|
||||
Game_play_fbdemo_fade_in_move_end(play);
|
||||
break;
|
||||
|
||||
case 3:
|
||||
case FADE_TYPE_OUT_START_EMU:
|
||||
if (S_back_title_timer != 0) {
|
||||
S_back_title_timer--;
|
||||
}
|
||||
@@ -246,13 +245,13 @@ void Game_play_fbdemo_wipe_move(GAME_PLAY* play) {
|
||||
}
|
||||
break;
|
||||
|
||||
case 4:
|
||||
case 6:
|
||||
case FADE_TYPE_OUT_RETURN_TITLE:
|
||||
case FADE_TYPE_OUT_GAME_END:
|
||||
if (S_back_title_timer == 120) {
|
||||
mBGMPsComp_make_ps_wipe(360);
|
||||
}
|
||||
case 5:
|
||||
case 10:
|
||||
case FADE_TYPE_OUT_GAME_END_TRAIN:
|
||||
case FADE_TYPE_SELECT_END:
|
||||
if (S_back_title_timer != 0) {
|
||||
S_back_title_timer--;
|
||||
}
|
||||
@@ -264,7 +263,7 @@ void Game_play_fbdemo_wipe_move(GAME_PLAY* play) {
|
||||
}
|
||||
break;
|
||||
|
||||
case 8:
|
||||
case FADE_TYPE_SELECT:
|
||||
if (S_back_title_timer != 0) {
|
||||
S_back_title_timer--;
|
||||
}
|
||||
@@ -280,7 +279,7 @@ void Game_play_fbdemo_wipe_move(GAME_PLAY* play) {
|
||||
}
|
||||
break;
|
||||
|
||||
case 9:
|
||||
case FADE_TYPE_DEMO:
|
||||
if (S_back_title_timer != 0) {
|
||||
S_back_title_timer--;
|
||||
}
|
||||
@@ -292,8 +291,8 @@ void Game_play_fbdemo_wipe_move(GAME_PLAY* play) {
|
||||
}
|
||||
break;
|
||||
|
||||
case 11:
|
||||
case 12:
|
||||
case FADE_TYPE_EVENT:
|
||||
case FADE_TYPE_OTHER_ROOM:
|
||||
Game_play_change_scene_move_end(play);
|
||||
break;
|
||||
|
||||
@@ -310,7 +309,7 @@ void Game_play_fbdemo_wipe_move(GAME_PLAY* play) {
|
||||
break;
|
||||
}
|
||||
if (!wipet) {
|
||||
play->fb_fade_type = 0;
|
||||
play->fb_fade_type = FADE_TYPE_NONE;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
@@ -318,60 +317,58 @@ void Game_play_fbdemo_wipe_move(GAME_PLAY* play) {
|
||||
}
|
||||
}
|
||||
|
||||
void Game_play_fbdemo_wipe_proc(GAME_PLAY* play) {
|
||||
static void Game_play_fbdemo_wipe_proc(GAME_PLAY* play) {
|
||||
static PLAY_WIPE_PROC wipe_proc[] = { (PLAY_WIPE_PROC)none_proc1, Game_play_fbdemo_wipe_create,
|
||||
Game_play_fbdemo_wipe_init, Game_play_fbdemo_wipe_move };
|
||||
|
||||
if ((play->fb_wipe_mode == 0) && (play->fb_fade_type != 0)) {
|
||||
play->fb_wipe_mode = 1;
|
||||
if ((play->fb_wipe_mode == WIPE_MODE_NONE) && (play->fb_fade_type != 0)) {
|
||||
play->fb_wipe_mode = WIPE_MODE_CREATE;
|
||||
}
|
||||
|
||||
wipe_proc[play->fb_wipe_mode](play);
|
||||
}
|
||||
|
||||
Gfx* game_play_set_fog(GAME_PLAY* play, Gfx* gfx) {
|
||||
|
||||
static Gfx* game_play_set_fog(GAME_PLAY* play, Gfx* gfx) {
|
||||
return gfx_set_fog_nosync(gfx, play->global_light.fogColor[0], play->global_light.fogColor[1],
|
||||
play->global_light.fogColor[2], 0, play->global_light.fogNear, play->global_light.fogFar);
|
||||
}
|
||||
|
||||
void Game_play_fbdemo_proc(GAME_PLAY* play) {
|
||||
|
||||
static void Game_play_fbdemo_proc(GAME_PLAY* play) {
|
||||
switch (play->fb_mode) {
|
||||
case 2:
|
||||
case FBDEMO_MODE_INIT:
|
||||
if (fbdemo_init(&fbdemo, 10, 7) == 0) {
|
||||
play->fb_mode = 0;
|
||||
play->fb_mode = FBDEMO_MODE_NONE;
|
||||
} else {
|
||||
play->fb_mode = 3;
|
||||
play->fb_mode = FBDEMO_MODE_MOVE;
|
||||
SetGameFrame(1);
|
||||
}
|
||||
break;
|
||||
|
||||
case 3:
|
||||
case FBDEMO_MODE_MOVE:
|
||||
fbdemo_move(&fbdemo);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void play_cleanup(GAME* game) {
|
||||
extern void play_cleanup(GAME* game) {
|
||||
GAME_PLAY* play = (GAME_PLAY*)game;
|
||||
|
||||
mMsg_dt(game);
|
||||
banti_dt();
|
||||
|
||||
play->game.graph->taskEndCallback = NULL;
|
||||
play->game.graph->taskEndData = NULL;
|
||||
play->submenu.mode = 0;
|
||||
game->graph->taskEndCallback = NULL;
|
||||
game->graph->taskEndData = NULL;
|
||||
play->submenu.mode = mSM_MODE_IDLE;
|
||||
|
||||
PreRender_cleanup(&play->prerender);
|
||||
CollisionCheck_dt(&play->game, &play->collision_check);
|
||||
CollisionCheck_dt(game, &play->collision_check);
|
||||
|
||||
if (play->fb_mode == 3) {
|
||||
if (play->fb_mode == FBDEMO_MODE_MOVE) {
|
||||
fbdemo_cleanup(&fbdemo);
|
||||
play->fb_mode = 0;
|
||||
play->fb_mode = FBDEMO_MODE_NONE;
|
||||
}
|
||||
|
||||
if (play->fb_wipe_mode == 3) {
|
||||
if (play->fb_wipe_mode == WIPE_MODE_MOVE) {
|
||||
Game_play_fbdemo_wipe_destroy(play);
|
||||
}
|
||||
|
||||
@@ -398,14 +395,13 @@ void play_cleanup(GAME* game) {
|
||||
zelda_CleanupArena();
|
||||
}
|
||||
|
||||
void VR_Box_ct(GAME_PLAY* play) {
|
||||
static void VR_Box_ct(GAME_PLAY* play) {
|
||||
Global_kankyo_ct((GAME*)play, &play->kankyo);
|
||||
}
|
||||
|
||||
void play_init(GAME* game) {
|
||||
extern void play_init(GAME* game) {
|
||||
GAME_PLAY* play = (GAME_PLAY*)game;
|
||||
|
||||
GRAPH* graph = play->game.graph;
|
||||
GRAPH* graph = game->graph;
|
||||
int type;
|
||||
fbdemo_fade* fade;
|
||||
int freebytes;
|
||||
@@ -413,7 +409,7 @@ void play_init(GAME* game) {
|
||||
u32 aligned;
|
||||
u32 size;
|
||||
|
||||
game_resize_hyral(&play->game, 0xFFFC1800);
|
||||
game_resize_hyral(game, -Game_play_HYRAL_SIZE); // reserve bytes from gamealloc
|
||||
Common_Set(rhythym_updated, 0);
|
||||
|
||||
mFI_ChangeClimate_ForEventNotice();
|
||||
@@ -430,7 +426,7 @@ void play_init(GAME* game) {
|
||||
|
||||
initView(&play->view, graph);
|
||||
Init_Camera2(play);
|
||||
CollisionCheck_ct(&play->game, &play->collision_check);
|
||||
CollisionCheck_ct(game, &play->collision_check);
|
||||
|
||||
mCoBG_InitMoveBgData();
|
||||
mCoBG_InitBlockBgCheckMode();
|
||||
@@ -441,17 +437,17 @@ void play_init(GAME* game) {
|
||||
Gameplay_Scene_Read(play, Save_Get(scene_no));
|
||||
|
||||
mSM_submenu_ct(&play->submenu);
|
||||
play->submenu.mode = 0;
|
||||
play->submenu.mode = mSM_MODE_IDLE;
|
||||
|
||||
PreRender_init(&play->prerender);
|
||||
PreRender_setup_savebuf(&play->prerender, SCREEN_WIDTH * 2, SCREEN_HEIGHT * 2, NULL, NULL, NULL);
|
||||
PreRender_setup_renderbuf(&play->prerender, SCREEN_WIDTH * 2, SCREEN_HEIGHT * 2, NULL, NULL);
|
||||
|
||||
play->fb_mode = 0;
|
||||
type = 1;
|
||||
play->fb_mode = FBDEMO_MODE_NONE;
|
||||
type = WIPE_TYPE_TRIFORCE;
|
||||
|
||||
play->fb_wipe_mode = 0;
|
||||
play->fb_fade_type = 1;
|
||||
play->fb_wipe_mode = WIPE_MODE_NONE;
|
||||
play->fb_fade_type = FADE_TYPE_IN;
|
||||
|
||||
if (Common_Get(transition.wipe_type) != 0xFF) {
|
||||
type = Common_Get(transition.wipe_type);
|
||||
@@ -461,12 +457,12 @@ void play_init(GAME* game) {
|
||||
play->fb_wipe_type = type;
|
||||
|
||||
Pause_ct(&play->pause);
|
||||
new_Matrix(&play->game);
|
||||
new_Matrix(game);
|
||||
|
||||
fade = &play->color_fade;
|
||||
|
||||
play->game.exec = play_main;
|
||||
play->game.cleanup = play_cleanup;
|
||||
game->exec = play_main;
|
||||
game->cleanup = play_cleanup;
|
||||
fbdemo_fade_init(fade);
|
||||
fbdemo_fade_settype(fade, 7);
|
||||
fbdemo_fade_setcolor_rgba8888(fade, 0xA0A0A0FF);
|
||||
@@ -474,8 +470,8 @@ void play_init(GAME* game) {
|
||||
|
||||
play->fade_color_value.rgba8888 = 0;
|
||||
|
||||
freebytes = game_getFreeBytes(&play->game);
|
||||
alloc = (u32)THA_alloc16(&play->game.tha, freebytes);
|
||||
freebytes = game_getFreeBytes(game);
|
||||
alloc = (u32)THA_alloc16(&game->tha, freebytes);
|
||||
aligned = ALIGN_NEXT(alloc, 16);
|
||||
size = aligned - alloc;
|
||||
|
||||
@@ -488,7 +484,7 @@ void play_init(GAME* game) {
|
||||
mFM_FieldInit(play);
|
||||
VR_Box_ct(play);
|
||||
mMmd_MakeMuseumDisplayData();
|
||||
Actor_info_ct(&play->game, &play->actor_info, play->player_data);
|
||||
Actor_info_ct(game, &play->actor_info, play->player_data);
|
||||
play->draw_chk_proc = none_proc1;
|
||||
mMsg_ct(game);
|
||||
mEv_2nd_init(&play->event);
|
||||
@@ -501,47 +497,46 @@ void play_init(GAME* game) {
|
||||
mEA_GetCardDLProgram();
|
||||
}
|
||||
|
||||
void Game_play_move_fbdemo_not_move(GAME_PLAY* play) {
|
||||
static void Game_play_move_fbdemo_not_move(GAME* game) {
|
||||
GAME_PLAY* play = (GAME_PLAY*)game;
|
||||
|
||||
play->game.doing_point = 0;
|
||||
play->game.doing_point_specific = 0x8F;
|
||||
play->game.doing_point = 1;
|
||||
game->doing_point = 0;
|
||||
game->doing_point_specific = 0x8F;
|
||||
game->doing_point = 1;
|
||||
|
||||
mSM_submenu_ctrl(play);
|
||||
|
||||
if (play->submenu.process_status == 0) {
|
||||
|
||||
play->game.doing_point = 2;
|
||||
if (play->submenu.process_status == mSM_PROCESS_WAIT) {
|
||||
game->doing_point = 2;
|
||||
mDemo_Main(play);
|
||||
play->game.doing_point = 3;
|
||||
game->doing_point = 3;
|
||||
mEv_run(&play->event);
|
||||
}
|
||||
|
||||
play->game.doing_point = 4;
|
||||
game->doing_point = 4;
|
||||
mDemo_stock_clear();
|
||||
play->game.doing_point = 5;
|
||||
game->doing_point = 5;
|
||||
mSc_dmacopy_data_bank(&play->object_exchange);
|
||||
play->game.doing_point = 6;
|
||||
game->doing_point = 6;
|
||||
mSM_submenu_move(&play->submenu);
|
||||
|
||||
if (play->submenu.process_status == 0) {
|
||||
|
||||
if (play->submenu.process_status == mSM_PROCESS_WAIT) {
|
||||
play->game_frame++;
|
||||
mVibctl_clr_force_stop(2);
|
||||
play->game.doing_point = 7;
|
||||
CollisionCheck_OC(&play->game, &play->collision_check);
|
||||
play->game.doing_point = 8;
|
||||
CollisionCheck_clear(&play->game, &play->collision_check);
|
||||
play->game.doing_point = 9;
|
||||
play->game.doing_point = 0;
|
||||
play->game.doing_point_specific = 0x90;
|
||||
game->doing_point = 7;
|
||||
CollisionCheck_OC(game, &play->collision_check);
|
||||
game->doing_point = 8;
|
||||
CollisionCheck_clear(game, &play->collision_check);
|
||||
game->doing_point = 9;
|
||||
game->doing_point = 0;
|
||||
game->doing_point_specific = 0x90;
|
||||
Actor_info_call_actor(play, &play->actor_info);
|
||||
play->game.doing_point = 0;
|
||||
play->game.doing_point_specific = 0x91;
|
||||
play->game.doing_point = 1;
|
||||
game->doing_point = 0;
|
||||
game->doing_point_specific = 0x91;
|
||||
game->doing_point = 1;
|
||||
mCoBG_CalcTimerDecalCircle();
|
||||
play->game.doing_point = 2;
|
||||
mMsg_Main((GAME*)play);
|
||||
game->doing_point = 2;
|
||||
mMsg_Main(game);
|
||||
} else {
|
||||
mVibctl_set_force_stop(2);
|
||||
}
|
||||
@@ -549,83 +544,90 @@ void Game_play_move_fbdemo_not_move(GAME_PLAY* play) {
|
||||
fbdemo_fade_move(&play->color_fade, game_GameFrame);
|
||||
}
|
||||
|
||||
void Game_play_move(GAME_PLAY* play) {
|
||||
static void Game_play_move(GAME* game) {
|
||||
GAME_PLAY* play = (GAME_PLAY*)game;
|
||||
int pause;
|
||||
|
||||
int debug;
|
||||
|
||||
play->game.doing_point = 0;
|
||||
play->game.doing_point_specific = 0x8D;
|
||||
play->game.doing_point = 1;
|
||||
game->doing_point = 0;
|
||||
game->doing_point_specific = 0x8D;
|
||||
game->doing_point = 1;
|
||||
Game_play_Reset_destiny();
|
||||
play->game.doing_point = 2;
|
||||
game->doing_point = 2;
|
||||
|
||||
debug = (zurumode_flag >= 2) ? (Pause_proc(&play->pause, &play->game.pads[1]) == 0) : 0;
|
||||
if (ZURUMODE2_ENABLED()) {
|
||||
pause = !Pause_proc(&play->pause, &game->pads[PAD1]);
|
||||
} else {
|
||||
pause = FALSE;
|
||||
}
|
||||
|
||||
play->game.doing_point = 0;
|
||||
play->game.doing_point_specific = 0x8E;
|
||||
game->doing_point = 0;
|
||||
game->doing_point_specific = 0x8E;
|
||||
|
||||
if (debug == 0) {
|
||||
|
||||
play->game.doing_point = 1;
|
||||
if (!pause) {
|
||||
game->doing_point = 1;
|
||||
Game_play_fbdemo_wipe_proc(play);
|
||||
play->game.doing_point = 2;
|
||||
game->doing_point = 2;
|
||||
Game_play_fbdemo_proc(play);
|
||||
play->game.doing_point = 3;
|
||||
game->doing_point = 3;
|
||||
|
||||
if (play->fb_mode != 3) {
|
||||
Game_play_move_fbdemo_not_move(play);
|
||||
if (play->fb_mode != FBDEMO_MODE_MOVE) {
|
||||
Game_play_move_fbdemo_not_move(game);
|
||||
}
|
||||
}
|
||||
|
||||
if (play->submenu.process_status == 0) {
|
||||
|
||||
play->game.doing_point = 0;
|
||||
play->game.doing_point_specific = 0x92;
|
||||
play->game.doing_point = 1;
|
||||
if (play->submenu.process_status == mSM_PROCESS_WAIT) {
|
||||
game->doing_point = 0;
|
||||
game->doing_point_specific = 0x92;
|
||||
game->doing_point = 1;
|
||||
Game_play_camera_proc(play);
|
||||
play->game.doing_point = 2;
|
||||
game->doing_point = 2;
|
||||
mPO_business_proc(play);
|
||||
play->game.doing_point = 3;
|
||||
mTRC_move(&play->game);
|
||||
play->game.doing_point = 4;
|
||||
game->doing_point = 3;
|
||||
mTRC_move(game);
|
||||
game->doing_point = 4;
|
||||
Balloon_move(play);
|
||||
mEnv_ManagePointLight(play, &play->kankyo, &play->global_light);
|
||||
}
|
||||
|
||||
play->game.doing_point = 0;
|
||||
play->game.doing_point_specific = 0x93;
|
||||
play->game.doing_point = 1;
|
||||
game->doing_point = 0;
|
||||
game->doing_point_specific = 0x93;
|
||||
game->doing_point = 1;
|
||||
Global_kankyo_set(play, &play->kankyo, &play->global_light);
|
||||
play->game.doing_point = 2;
|
||||
game->doing_point = 2;
|
||||
mEnv_WindMove();
|
||||
play->game.doing_point = 3;
|
||||
game->doing_point = 3;
|
||||
watch_my_step_move(play);
|
||||
play->game.doing_point = 4;
|
||||
game->doing_point = 4;
|
||||
banti_move(play);
|
||||
play->game.doing_point = 5;
|
||||
game->doing_point = 5;
|
||||
title_demo_move(play);
|
||||
play->game.doing_point = 0;
|
||||
play->game.doing_point_specific = 0x95;
|
||||
game->doing_point = 0;
|
||||
game->doing_point_specific = 0x95;
|
||||
}
|
||||
|
||||
void setupFog(GAME_PLAY* play, GRAPH* graph) {
|
||||
|
||||
// @BUG - this function works properly in N64, but not in GC.
|
||||
// The devs moved blocks (acres) to new display list buffers in GC,
|
||||
// but forgot to apply fog to those new display list buffers.
|
||||
static void setupFog(GAME_PLAY* play, GRAPH* graph) {
|
||||
OPEN_DISP(graph);
|
||||
|
||||
SET_POLY_OPA_DISP(game_play_set_fog(play, NOW_POLY_OPA_DISP));
|
||||
SET_POLY_XLU_DISP(game_play_set_fog(play, NOW_POLY_XLU_DISP));
|
||||
|
||||
#ifdef BUGFIXES
|
||||
// Apply fog to blocks
|
||||
SET_BG_OPA_DISP(game_play_set_fog(play, NOW_BG_OPA_DISP));
|
||||
SET_BG_XLU_DISP(game_play_set_fog(play, NOW_BG_XLU_DISP));
|
||||
#endif
|
||||
|
||||
CLOSE_DISP(graph);
|
||||
}
|
||||
|
||||
void setupViewer(GAME_PLAY* play) {
|
||||
|
||||
showView(&play->view, 0xF);
|
||||
static void setupViewer(GAME_PLAY* play) {
|
||||
showView(&play->view, VIEW_UPDATE_ALL);
|
||||
}
|
||||
|
||||
void setupViewMatrix(GAME_PLAY* play, GRAPH* graph1, GRAPH* graph2) {
|
||||
Mtx* t;
|
||||
|
||||
static void setupViewMatrix(GAME_PLAY* play, GRAPH* graph1, GRAPH* graph2) {
|
||||
OPEN_DISP(graph1);
|
||||
|
||||
Matrix_MtxtoMtxF(&play->view.mtx_viewing, &play->billboard_matrix);
|
||||
@@ -640,17 +642,14 @@ void setupViewMatrix(GAME_PLAY* play, GRAPH* graph1, GRAPH* graph2) {
|
||||
play->billboard_matrix.mf[3][2] = 0.0f;
|
||||
|
||||
Matrix_reverse(&play->billboard_matrix);
|
||||
|
||||
t = _MtxF_to_Mtx(&play->billboard_matrix, GRAPH_ALLOC(graph2, sizeof(MtxF) * 1));
|
||||
play->billboard_mtx_p = t;
|
||||
|
||||
play->billboard_mtx_p = _MtxF_to_Mtx(&play->billboard_matrix, GRAPH_ALLOC_TYPE(graph2, MtxF, 1));
|
||||
gSPSegment(NEXT_BG_OPA_DISP, 7, play->billboard_mtx_p);
|
||||
gSPSegment(NEXT_POLY_OPA_DISP, 7, play->billboard_mtx_p);
|
||||
|
||||
CLOSE_DISP(graph1);
|
||||
}
|
||||
|
||||
void copy_efb_to_texture(Gfx** graph, void* buf) {
|
||||
static void copy_efb_to_texture(Gfx** graph, void* buf) {
|
||||
u32 dl;
|
||||
|
||||
GXBeginDisplayList(gxbuf, sizeof(gxbuf));
|
||||
@@ -662,38 +661,35 @@ void copy_efb_to_texture(Gfx** graph, void* buf) {
|
||||
gGXCallDisplayList((*graph)++, gxbuf, dl);
|
||||
}
|
||||
|
||||
int makeBumpTexture(GAME_PLAY* play, GRAPH* graph1, GRAPH* graph2) {
|
||||
|
||||
static int makeBumpTexture(GAME_PLAY* play, GRAPH* graph1, GRAPH* graph2) {
|
||||
Gfx* newdisp;
|
||||
Gfx* polydisp;
|
||||
Gfx* rect_disp;
|
||||
View* v;
|
||||
Gfx* fbdemo_disp;
|
||||
Gfx* fb_disp;
|
||||
Gfx* old_fb;
|
||||
Gfx* poly;
|
||||
View view;
|
||||
rect rect;
|
||||
|
||||
|
||||
OPEN_DISP(graph1);
|
||||
|
||||
if ((GETREG(HREG, 80) != 10) || (GETREG(HREG, 92) != 0)) {
|
||||
|
||||
newdisp = NOW_POLY_OPA_DISP;
|
||||
polydisp = gfxopen(newdisp);
|
||||
|
||||
gSPDisplayList(NEXT_OVERLAY_DISP, polydisp);
|
||||
|
||||
if (play->fb_wipe_mode == 3) {
|
||||
v = &view;
|
||||
initView(v, graph2);
|
||||
v->flag = 10;
|
||||
if (play->fb_wipe_mode == WIPE_MODE_MOVE) {
|
||||
View view;
|
||||
rect rect;
|
||||
|
||||
initView(&view, graph2);
|
||||
view.flag = VIEW_UPDATE_ORTHOGRAPHIC | VIEW_UPDATE_SCISSOR;
|
||||
rect.top = 0;
|
||||
rect.bottom = SCREEN_HEIGHT;
|
||||
rect.l = 0;
|
||||
rect.r = SCREEN_WIDTH;
|
||||
setScissorView(v, &rect);
|
||||
showView1(v, 15, &polydisp);
|
||||
setScissorView(&view, &rect);
|
||||
showView1(&view, VIEW_UPDATE_ALL, &polydisp);
|
||||
play->fbdemo_wipe.wipe_procs.draw_proc(&play->fbdemo_wipe.wipe_data, &polydisp);
|
||||
}
|
||||
|
||||
@@ -707,21 +703,21 @@ int makeBumpTexture(GAME_PLAY* play, GRAPH* graph1, GRAPH* graph2) {
|
||||
SET_POLY_OPA_DISP(polydisp);
|
||||
}
|
||||
|
||||
if (play->fb_mode == 3) {
|
||||
if (play->fb_mode == FBDEMO_MODE_MOVE) {
|
||||
fbdemo_disp = NOW_POLY_OPA_DISP;
|
||||
fbdemo_draw(&fbdemo, &fbdemo_disp);
|
||||
SET_POLY_OPA_DISP(fbdemo_disp);
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (play->submenu.mode == 2) {
|
||||
play->submenu.mode = 3;
|
||||
if (play->submenu.mode == mSM_MODE_PRERENDER_WAIT) {
|
||||
play->submenu.mode = mSM_MODE_PRERENDER_DONE;
|
||||
SETREG(SREG, 3, -(GETREG(SREG, 3)));
|
||||
} else if (play->submenu.mode >= 5) {
|
||||
play->submenu.mode = 0;
|
||||
} else if (play->submenu.mode >= mSM_MODE_NUM) {
|
||||
play->submenu.mode = mSM_MODE_IDLE;
|
||||
}
|
||||
|
||||
if (play->submenu.mode == 3) {
|
||||
if (play->submenu.mode == mSM_MODE_PRERENDER_DONE) {
|
||||
poly = NOW_POLY_OPA_DISP;
|
||||
|
||||
gDPPipeSync(poly++);
|
||||
@@ -730,10 +726,10 @@ int makeBumpTexture(GAME_PLAY* play, GRAPH* graph1, GRAPH* graph2) {
|
||||
G_AD_PATTERN | G_CD_MAGICSQ | G_CK_NONE | G_TC_CONV | G_TF_POINT | G_TT_NONE | G_TL_TILE |
|
||||
G_TD_CLAMP | G_TP_NONE | G_CYC_COPY | G_PM_NPRIMITIVE,
|
||||
G_AC_NONE | G_ZS_PIXEL | G_RM_NOOP | G_RM_NOOP2);
|
||||
gDPSetTextureImage_Dolphin(rect_disp++, G_IM_FMT_I, G_IM_SIZ_16b, 480, 640, prbuf);
|
||||
gDPSetTextureImage_Dolphin(rect_disp++, G_IM_FMT_I, G_IM_SIZ_16b, (2*SCREEN_HEIGHT), (2*SCREEN_WIDTH), prbuf);
|
||||
gDPSetTile_Dolphin(rect_disp++, G_DOLPHIN_TLUT_DEFAULT_MODE, 0, 0, 0, 0, 0, 0);
|
||||
gSPTextureRectangle(rect_disp++, 0, 0, (640 - 1) << 2, (480 - 1) << 2, G_TX_RENDERTILE, 0, 0, (256) << 2,
|
||||
(256) << 2);
|
||||
gSPTextureRectangle(rect_disp++, 0, 0, ((2*SCREEN_WIDTH) - 1) << 2, ((2*SCREEN_HEIGHT) - 1) << 2, G_TX_RENDERTILE, 0, 0, (256) << G_TEXTURE_IMAGE_FRAC,
|
||||
(256) << G_TEXTURE_IMAGE_FRAC);
|
||||
|
||||
SET_POLY_OPA_DISP(rect_disp);
|
||||
return 1;
|
||||
@@ -749,8 +745,7 @@ int makeBumpTexture(GAME_PLAY* play, GRAPH* graph1, GRAPH* graph2) {
|
||||
Debug_Display_output(play);
|
||||
}
|
||||
|
||||
if ((play->submenu.mode == 1) || (play->fb_mode == 1)) {
|
||||
|
||||
if ((play->submenu.mode == mSM_MODE_PRERENDER_INIT) || (play->fb_mode == FBDEMO_MODE_CREATE)) {
|
||||
old_fb = NOW_POLY_OPA_DISP;
|
||||
fb_disp = gfxopen(old_fb);
|
||||
|
||||
@@ -762,38 +757,37 @@ int makeBumpTexture(GAME_PLAY* play, GRAPH* graph1, GRAPH* graph2) {
|
||||
|
||||
SET_POLY_OPA_DISP(fb_disp);
|
||||
|
||||
if (play->submenu.mode == 1) {
|
||||
play->submenu.mode = 2;
|
||||
if (play->submenu.mode == mSM_MODE_PRERENDER_INIT) {
|
||||
play->submenu.mode = mSM_MODE_PRERENDER_WAIT;
|
||||
SETREG(SREG, 3, -(GETREG(SREG, 3)));
|
||||
} else {
|
||||
play->fb_mode = 2;
|
||||
play->fb_mode = FBDEMO_MODE_INIT;
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
return 1;
|
||||
|
||||
CLOSE_DISP(graph1);
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
void draw_version(GRAPH* graph) {
|
||||
static void draw_version(GRAPH* graph) {
|
||||
JW_JUTReport(0x82, 0x172, 1, "[CopyDate:%.19s]", boot_copyDate);
|
||||
JW_JUTReport(0x82, 0x180, 1, "[Date:%s]", &__DateTime__);
|
||||
JW_JUTReport(0x82, 0x18E, 1, "[Creator:%s]", &__Creator__);
|
||||
}
|
||||
|
||||
void Game_play_draw(GAME* game) {
|
||||
GRAPH* graph = game->graph;
|
||||
GAME_PLAY* play = (GAME_PLAY*)game;
|
||||
static void Game_play_draw(GAME_PLAY* play) {
|
||||
GRAPH* graph = play->game.graph;
|
||||
|
||||
DisplayList_initialize(graph, 0, 0, 0, &play->game);
|
||||
|
||||
if ((GETREG(HREG, 80) != 10) || (GETREG(HREG, 82) != 0)) {
|
||||
|
||||
setupFog(play, graph);
|
||||
setupViewer(play);
|
||||
setupViewMatrix(play, graph, graph);
|
||||
|
||||
if ((makeBumpTexture(play, graph, graph) == 1) && ((GETREG(HREG, 80) != 10) || (GETREG(HREG, 89) != 0))) {
|
||||
|
||||
watch_my_step_draw(play);
|
||||
banti_draw(play);
|
||||
mSM_submenu_draw(&play->submenu, (GAME*)play);
|
||||
@@ -813,11 +807,9 @@ void Game_play_draw(GAME* game) {
|
||||
}
|
||||
}
|
||||
|
||||
void play_main(GAME* game) {
|
||||
extern void play_main(GAME* game) {
|
||||
GAME_PLAY* play = (GAME_PLAY*)game;
|
||||
|
||||
GRAPH* graph;
|
||||
|
||||
game->doing_point = 0;
|
||||
game->doing_point_specific = 0x6E;
|
||||
fqrand();
|
||||
@@ -849,25 +841,26 @@ void play_main(GAME* game) {
|
||||
game->doing_point_specific = 0x8C;
|
||||
|
||||
if ((GETREG(HREG, 80) != 10) || (GETREG(HREG, 81) != 0)) {
|
||||
Game_play_move(play);
|
||||
Game_play_move(game);
|
||||
}
|
||||
game->doing_point = 0;
|
||||
game->doing_point_specific = 0xAA;
|
||||
Game_play_draw(game);
|
||||
Game_play_draw(play);
|
||||
|
||||
game->doing_point = 0;
|
||||
game->doing_point_specific = 0xB4;
|
||||
|
||||
graph = game->graph;
|
||||
game_debug_draw_last(game, graph);
|
||||
game_draw_last(graph);
|
||||
{
|
||||
GRAPH* graph = game->graph;
|
||||
game_debug_draw_last(game, graph);
|
||||
game_draw_last(graph);
|
||||
}
|
||||
|
||||
game->doing_point = 0;
|
||||
game->doing_point_specific = 0XBe;
|
||||
}
|
||||
|
||||
void Gameplay_Scene_Init(GAME_PLAY* play) {
|
||||
|
||||
static void Gameplay_Scene_Init(GAME_PLAY* play) {
|
||||
play->player_data = NULL;
|
||||
play->actor_data_num = 0;
|
||||
play->ctrl_actor_data_num = 0;
|
||||
@@ -882,7 +875,7 @@ void Gameplay_Scene_Init(GAME_PLAY* play) {
|
||||
mSc_decide_exchange_bank(&play->object_exchange);
|
||||
}
|
||||
|
||||
u8 mPl_SceneNo2SoundRoomType(int scene) {
|
||||
static u8 mPl_SceneNo2SoundRoomType(int scene) {
|
||||
switch (scene) {
|
||||
case SCENE_MY_ROOM_S:
|
||||
return 1;
|
||||
@@ -913,7 +906,7 @@ u8 mPl_SceneNo2SoundRoomType(int scene) {
|
||||
}
|
||||
}
|
||||
|
||||
void Gameplay_Scene_Read(GAME_PLAY* play, s16 idx) {
|
||||
static void Gameplay_Scene_Read(GAME_PLAY* play, s16 idx) {
|
||||
static Scene_Word_u* scene_word_data[SCENE_NUM] = {
|
||||
test01_info,
|
||||
test02_info,
|
||||
|
||||
@@ -145,7 +145,7 @@ static void Player_actor_set_nextgoto_info_type1(ACTOR* actor) {
|
||||
|
||||
if (scene == SCENE_DEPART_2 || scene == SCENE_MUSEUM_ENTRANCE || scene == SCENE_MUSEUM_ROOM_PAINTING ||
|
||||
scene == SCENE_MUSEUM_ROOM_FOSSIL || scene == SCENE_MUSEUM_ROOM_INSECT || scene == SCENE_MUSEUM_ROOM_FISH) {
|
||||
play->fb_fade_type = 12;
|
||||
play->fb_fade_type = FADE_TYPE_OTHER_ROOM;
|
||||
mBGMForce_room_nonstop_start();
|
||||
} else {
|
||||
mBGMPsComp_make_ps_wipe(0x249);
|
||||
@@ -176,7 +176,7 @@ static void Player_actor_check_nextgoto(ACTOR* actor, GAME* game) {
|
||||
mActor_name_t door = player->item_in_front;
|
||||
|
||||
if (ITEM_NAME_GET_TYPE(door) == NAME_TYPE_WARP && Player_actor_check_bg_for_next_goto(actor, door) != FALSE &&
|
||||
mEv_CheckTitleDemo() <= 0 && play->fb_wipe_mode == 0) {
|
||||
mEv_CheckTitleDemo() <= 0 && play->fb_wipe_mode == WIPE_MODE_NONE) {
|
||||
if (door >= EXIT_DOOR && door < EXIT_DOOR1) {
|
||||
mDemo_Request(mDemo_TYPE_EXITSCENE, actor, Player_actor_set_nextgoto_info_type0);
|
||||
|
||||
|
||||
+6
-6
@@ -493,11 +493,11 @@ extern int goto_other_scene(GAME_PLAY* play, Door_data_c* door_data, int update_
|
||||
int res = 0; // failed
|
||||
|
||||
if (player != NULL) {
|
||||
if (play->fb_wipe_mode == 0) {
|
||||
play->fb_fade_type = 2;
|
||||
if (play->fb_wipe_mode == WIPE_MODE_NONE) {
|
||||
play->fb_fade_type = FADE_TYPE_OUT;
|
||||
|
||||
if (door_data->wipe_type == 0) {
|
||||
play->fb_wipe_type = 3;
|
||||
if (door_data->wipe_type == WIPE_TYPE_NORMAL) {
|
||||
play->fb_wipe_type = WIPE_TYPE_FADE_BLACK;
|
||||
} else {
|
||||
play->fb_wipe_type = door_data->wipe_type;
|
||||
}
|
||||
@@ -543,8 +543,8 @@ extern int goto_emu_game(GAME* game, s16 famicom_rom_id) {
|
||||
if (player != NULL) {
|
||||
Door_data_c* door_data;
|
||||
|
||||
play->fb_fade_type = 3;
|
||||
play->fb_wipe_type = 3;
|
||||
play->fb_fade_type = FADE_TYPE_OUT_START_EMU;
|
||||
play->fb_wipe_type = WIPE_TYPE_FADE_BLACK;
|
||||
res = TRUE;
|
||||
|
||||
door_data = Common_GetPointer(famicom_emu_exit_door_data);
|
||||
|
||||
@@ -254,11 +254,11 @@ extern void mSM_submenu_ctrl(GAME_PLAY* play) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (play->fb_fade_type != 0) {
|
||||
if (play->fb_fade_type != FADE_TYPE_NONE) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (play->fb_wipe_mode != 0) {
|
||||
if (play->fb_wipe_mode != WIPE_MODE_NONE) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -309,7 +309,7 @@ extern void mSM_submenu_ctrl(GAME_PLAY* play) {
|
||||
|
||||
if (submenu->menu_type != mSM_OVL_NONE) {
|
||||
submenu->process_status = mSM_PROCESS_PREWAIT;
|
||||
submenu->mode = 1;
|
||||
submenu->mode = mSM_MODE_PRERENDER_INIT;
|
||||
SetGameFrame(1);
|
||||
}
|
||||
}
|
||||
@@ -325,7 +325,7 @@ static void mSM_move_Wait(Submenu* submenu) {
|
||||
}
|
||||
|
||||
static void mSM_move_PREWait(Submenu* submenu) {
|
||||
if (submenu->mode >= 3) {
|
||||
if (submenu->mode >= mSM_MODE_PRERENDER_DONE) {
|
||||
submenu->process_status = mSM_PROCESS_LINKWAIT;
|
||||
}
|
||||
}
|
||||
@@ -358,7 +358,7 @@ static void mSM_move_LINKWait(Submenu* submenu) {
|
||||
item++;
|
||||
}
|
||||
|
||||
if (submenu->mode != 4) {
|
||||
if (submenu->mode != mSM_MODE_OTHER) {
|
||||
if ((submenu->menu_type == mSM_OVL_LEDIT && submenu->param0 == 0) ||
|
||||
Common_Get(now_private)->gender == mPr_SEX_MALE) {
|
||||
sAdo_SpecChange(5);
|
||||
@@ -386,9 +386,9 @@ static void mSM_move_End(Submenu* submenu) {
|
||||
submenu->open_flag = FALSE;
|
||||
SetGameFrame(1);
|
||||
|
||||
if (submenu->mode != 4) {
|
||||
if (submenu->mode != mSM_MODE_OTHER) {
|
||||
mMsg_Window_c* msg_win = mMsg_Get_base_window_p();
|
||||
submenu->mode = 0;
|
||||
submenu->mode = mSM_MODE_IDLE;
|
||||
mSc_dmacopy_all_exchange_bank(&play->object_exchange);
|
||||
SubmenuArea_DoUnlink(dlftbl, submenu);
|
||||
load_player(submenu);
|
||||
@@ -413,7 +413,7 @@ extern void mSM_submenu_move(Submenu* submenu) {
|
||||
}
|
||||
|
||||
extern void mSM_submenu_draw(Submenu* submenu, GAME* game) {
|
||||
if (submenu->mode >= 3 && submenu->process_status == mSM_PROCESS_PLAY &&
|
||||
if (submenu->mode >= mSM_MODE_PRERENDER_DONE && submenu->process_status == mSM_PROCESS_PLAY &&
|
||||
SubmenuArea_visit == &SubmenuArea_dlftbl[mSM_DLF_SUBMENU_OVL]) {
|
||||
(*submenu->draw_proc)(submenu, game);
|
||||
}
|
||||
|
||||
@@ -59,7 +59,7 @@ static void mSM_setup_view(Submenu* submenu, GRAPH* graph, int init_flag) {
|
||||
if (init_flag == FALSE) {
|
||||
View* view;
|
||||
|
||||
if (submenu->mode != 4) {
|
||||
if (submenu->mode != mSM_MODE_OTHER) {
|
||||
view = &((GAME_PLAY*)gamePT)->view;
|
||||
} else {
|
||||
view = &((GAME_TRADEMARK*)gamePT)->view; // I'm not sure this is the correct game subclass
|
||||
|
||||
@@ -123,8 +123,8 @@ static void set_player_demo_keydata(int frame) {
|
||||
}
|
||||
|
||||
static void mTD_game_end_init(GAME_PLAY* play) {
|
||||
play->fb_fade_type = 10; // TODO: enum/define
|
||||
play->fb_wipe_type = 3; // TODO: enum/define
|
||||
play->fb_fade_type = FADE_TYPE_SELECT_END;
|
||||
play->fb_wipe_type = WIPE_TYPE_FADE_BLACK;
|
||||
|
||||
mPlib_request_main_invade_type1((GAME*)play);
|
||||
mBGMPsComp_make_ps_wipe(0x521C); // TODO: enum/define
|
||||
|
||||
@@ -141,7 +141,7 @@ static void trademark_goto_demo_scene(GAME_TRADEMARK* trademark) {
|
||||
mTM_demotime_set(demo_no); // set demo date, time, and weather
|
||||
mPr_RandomSetPlayerData_title_demo(); // randomize player data
|
||||
set_npc_4_title_demo(trademark); // set animals in the demo
|
||||
Common_Set(transition.wipe_type, 3);
|
||||
Common_Set(transition.wipe_type, WIPE_TYPE_FADE_BLACK);
|
||||
}
|
||||
|
||||
Save_Set(scene_no, SCENE_TITLE_DEMO);
|
||||
|
||||
@@ -295,7 +295,7 @@ static void navigate_camera_move(GAME_PLAY* play) {
|
||||
|
||||
switch (S_navigate.mode) {
|
||||
case 0: {
|
||||
if (mPlib_check_able_change_camera_normal_index() != 0 && play->fb_fade_type == 0) {
|
||||
if (mPlib_check_able_change_camera_normal_index() != 0 && play->fb_fade_type == FADE_TYPE_NONE) {
|
||||
S_navigate.timer = 150;
|
||||
S_navigate.mode++;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user