From ed9727a34e8a1533d7bd5cc01c2e71dbef2236a9 Mon Sep 17 00:00:00 2001 From: Ethan Roseman Date: Thu, 22 Jul 2021 14:48:30 -0400 Subject: [PATCH] Various decomp, use of SCREEN_WIDTH and SCREEN_HEIGHT, etc (#340) * Update symbol_addrs * effects.h and cleanup * effect code generation! * func_80024A784 * state_step_demo * meh * work on gfx_task_main and cleanup * state_step_intro * set_custom_gfx --- include/common_structs.h | 11 +- include/functions.h | 3 +- include/macros.h | 3 + include/si.h | 4 +- include/variables.h | 2 +- src/1370_len_7d0.c | 74 ++++ src/25AF0.c | 62 ++- src/77480.c | 2 +- src/7fd10_len_b40.c | 2 +- src/EA6FD0.c | 2 +- src/a5dd0_len_114e0.c | 5 +- src/ad90_len_2880.c | 78 +++- src/battle/move/mega_quake/756780.c | 4 +- src/curtains.c | 2 +- src/dc470_len_14c0.c | 2 +- src/fio.c | 9 +- src/input.c | 3 + src/intro_logos.c | 2 +- src/main_loop.c | 41 +- src/msg.c | 7 +- src/state_demo.c | 156 ++++++- src/state_intro.c | 311 +++++++------- src/state_title_screen.c | 2 +- src/world/area_arn/arn_02/events.c | 2 +- src/world/area_arn/arn_02/header.c | 2 +- src/world/area_arn/arn_03/events.c | 18 +- src/world/area_arn/arn_03/header.c | 2 +- src/world/area_arn/arn_04/events.c | 2 +- src/world/area_arn/arn_04/header.c | 2 +- src/world/area_arn/arn_05/events.c | 28 +- src/world/area_arn/arn_05/header.c | 2 +- src/world/area_arn/arn_07/BECDF0.c | 14 +- src/world/area_arn/arn_07/events.c | 22 +- src/world/area_arn/arn_07/header.c | 2 +- src/world/area_arn/arn_08/events.c | 22 +- src/world/area_arn/arn_08/header.c | 2 +- src/world/area_arn/arn_09/events.c | 6 +- src/world/area_arn/arn_09/header.c | 2 +- src/world/area_arn/arn_10/events.c | 8 +- src/world/area_arn/arn_10/header.c | 2 +- src/world/area_arn/arn_11/events.c | 8 +- src/world/area_arn/arn_11/header.c | 2 +- src/world/area_arn/arn_12/events.c | 8 +- src/world/area_arn/arn_12/header.c | 2 +- src/world/area_arn/arn_13/events.c | 8 +- src/world/area_arn/arn_13/header.c | 2 +- src/world/area_dgb/dgb_00/BFA0A0.c | 10 +- src/world/area_dgb/dgb_00/BFA100.c | 2 +- src/world/area_dgb/dgb_01/BFD9A0.c | 24 +- src/world/area_dgb/dgb_02/C2EBA0.c | 6 +- src/world/area_dgb/dgb_03/C31730.c | 6 +- src/world/area_dgb/dgb_04/C36530.c | 6 +- src/world/area_dgb/dgb_05/C3AA10.c | 6 +- src/world/area_dgb/dgb_06/C3D080.c | 6 +- src/world/area_dgb/dgb_07/C3DBF0.c | 6 +- src/world/area_dgb/dgb_08/C3FDB0.c | 12 +- src/world/area_dgb/dgb_09/C46BE0.c | 6 +- src/world/area_dgb/dgb_10/C4C390.c | 4 +- src/world/area_dgb/dgb_11/C4D3E0.c | 4 +- src/world/area_dgb/dgb_12/C4DEF0.c | 4 +- src/world/area_dgb/dgb_13/C4E960.c | 4 +- src/world/area_dgb/dgb_14/C4F030.c | 4 +- src/world/area_dgb/dgb_15/C4F510.c | 6 +- src/world/area_dgb/dgb_16/C52540.c | 6 +- src/world/area_dgb/dgb_17/C55A60.c | 4 +- src/world/area_dgb/dgb_18/C55F40.c | 10 +- src/world/area_dro/dro_01/95B7E0.c | 42 +- src/world/area_dro/dro_02/9694C0.c | 46 ++- src/world/area_flo/flo_00/C9DF60.c | 50 +-- src/world/area_flo/flo_03/CA72E0.c | 36 +- src/world/area_flo/flo_07/CAC5D0.c | 20 +- src/world/area_flo/flo_08/CAFAC0.c | 8 +- src/world/area_flo/flo_09/CB50E0.c | 6 +- src/world/area_flo/flo_10/CB9200.c | 2 +- src/world/area_flo/flo_10/CB9280.c | 18 +- src/world/area_flo/flo_10/CB96B0.c | 8 +- src/world/area_flo/flo_11/CBDCD0.c | 12 +- src/world/area_flo/flo_12/CC0E70.c | 12 +- src/world/area_flo/flo_13/CC3850.c | 26 +- src/world/area_flo/flo_14/CCB310.c | 6 +- src/world/area_flo/flo_15/CD06C0.c | 14 +- src/world/area_flo/flo_16/CD1F10.c | 6 +- src/world/area_flo/flo_17/CD7350.c | 6 +- src/world/area_flo/flo_18/CDC6A0.c | 28 +- src/world/area_flo/flo_19/CE36F0.c | 6 +- src/world/area_flo/flo_21/CE6700.c | 20 +- src/world/area_flo/flo_22/CEC240.c | 6 +- src/world/area_flo/flo_23/CEE2A0.c | 8 +- src/world/area_flo/flo_24/CF0980.c | 14 +- src/world/area_flo/flo_25/CF2C10.c | 8 +- src/world/area_hos/hos_03/A1BDB0.c | 2 +- src/world/area_jan/jan_02/B2C8A0.c | 2 +- src/world/area_jan/jan_03/B34BD0.c | 2 +- src/world/area_kmr/kmr_02/8B0070.c | 2 +- src/world/area_kmr/kmr_03/8C8140.c | 12 +- src/world/area_kmr/kmr_03/8C85E0.c | 2 +- src/world/area_kmr/kmr_12/events.c | 2 +- src/world/area_mac/mac_00/7EB340.c | 2 +- src/world/area_mac/mac_01/8017D0.c | 2 +- src/world/area_mac/mac_02/823BF0.c | 2 +- src/world/area_mac/mac_03/831B20.c | 2 +- src/world/area_mac/mac_04/843030.c | 2 +- src/world/area_mac/mac_05/852170.c | 2 +- src/world/area_nok/nok_01/9C53E0.c | 2 +- src/world/area_nok/nok_02/9D7AA0.c | 2 +- src/world/area_sam/sam_01/CF7E80.c | 2 +- src/world/area_sam/sam_02/D05F60.c | 2 +- src/world/area_sam/sam_11/D3ADA0.c | 2 +- src/world/area_sbk/sbk_00/929270.c | 4 +- src/world/area_sbk/sbk_01/929A90.c | 4 +- tools/asm_sizes.py | 2 +- tools/disasm_script.py | 18 +- tools/star_rod_idx_to_c.py | 4 +- .../asm/data/{52EE0.data.s => 52FF0.data.s} | 3 - ver/us/asm/nonmatchings/25AF0/func_8004A784.s | 243 ----------- .../a5dd0_len_114e0/set_custom_gfx.s | 11 - .../nonmatchings/state_demo/state_step_demo.s | 241 ----------- .../state_intro/state_step_intro.s | 386 ------------------ .../appendGfx_title_screen.s | 3 - ver/us/splat.yaml | 3 +- 120 files changed, 966 insertions(+), 1501 deletions(-) rename ver/us/asm/data/{52EE0.data.s => 52FF0.data.s} (85%) delete mode 100644 ver/us/asm/nonmatchings/25AF0/func_8004A784.s delete mode 100644 ver/us/asm/nonmatchings/a5dd0_len_114e0/set_custom_gfx.s delete mode 100644 ver/us/asm/nonmatchings/state_demo/state_step_demo.s delete mode 100644 ver/us/asm/nonmatchings/state_intro/state_step_intro.s diff --git a/include/common_structs.h b/include/common_structs.h index 14821f478e..742d3b4e00 100644 --- a/include/common_structs.h +++ b/include/common_structs.h @@ -528,7 +528,7 @@ typedef struct Camera { /* 0x002 */ s16 moveFlags; /* 0x004 */ s16 mode; /* 0x006 */ s16 unk_06; - /* 0x008 */ u16 unk_08; + /* 0x008 */ s16 unk_08; /* 0x00A */ s16 viewportW; /* 0x00C */ s16 viewportH; /* 0x00E */ s16 viewportStartX; @@ -700,7 +700,7 @@ typedef struct BattleStatus { /* 0x0C0 */ ScriptID controlScriptID; /* 0x0C4 */ struct ScriptInstance* camMovementScript; /* 0x0C8 */ ScriptID camMovementScriptID; - /* 0x0CC */ char unk_CC[12]; + /* 0x0CC */ Vec3f unk_CC; /* 0x0D8 */ struct Actor* playerActor; /* 0x0DC */ struct Actor* partnerActor; /* 0x0E0 */ struct Actor* enemyActors[24]; @@ -1246,7 +1246,7 @@ typedef struct GameStatus { /* 0x06C */ ScriptID mainScriptID; /* 0x070 */ s8 isBattle; /* 0x071 */ s8 demoState; /* (0 = not demo, 1 = map demo, 2 = demo map changing) */ - /* 0x072 */ u8 nextDemoScene; /* which part of the demo to play next */ + /* 0x072 */ s8 nextDemoScene; /* which part of the demo to play next */ /* 0x073 */ u8 contBitPattern; /* 0x074 */ s8 debugEnemyContact; /* 0x075 */ s8 debugQuizmo; @@ -1373,6 +1373,11 @@ typedef struct CustomModelGfxBuilder { /* 0x00 */ CustomModelGfxBuilderFunc post; } CustomModelGfxBuilder; // size = 0x8 +typedef struct CustomModelGfx { + /* 0x00 */ Gfx* pre; + /* 0x00 */ Gfx* post; +} CustomModelGfx; // size = 0x8 + typedef struct SelectableTarget { /* 0x00 */ s16 actorID; /* 0x02 */ s16 partID; /* sometimes loaded as byte from 0x3 */ diff --git a/include/functions.h b/include/functions.h index 2805acbaac..94690d9d1b 100644 --- a/include/functions.h +++ b/include/functions.h @@ -37,6 +37,7 @@ s16 get_game_mode(void); f32 integrate_gravity(void); f32 get_clamped_angle_diff(f32, f32); +s32 intro_logos_fade_out(s16 addAlpha); void _render_transition_stencil(s32, f32, s32); u32 get_entity_type(s32 arg0); @@ -426,7 +427,7 @@ f32 phys_get_spin_history(s32 lag, s32* x, s32* y, s32* z); void sfx_get_spatialized_sound_params(f32 arg0, f32 arg1, f32 arg2, s16* arg3, s16* arg4, s32 arg5); void sfx_play_sound_with_params(s32 arg0, u8 arg1, u8 arg2, s16 arg3); -void func_8004A784(Npc* npc, f32 arg1, f32* arg2, s32* arg3, s32* arg4, s32* arg5); +s32 func_8004A784(Npc* npc, f32 arg1, f32* arg2, f32* arg3, f32* arg4, f32* arg5); void base_UnkNpcAIFunc1(ScriptInstance* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory); s32* spr_get_npc_palettes(u16 arg0); diff --git a/include/macros.h b/include/macros.h index 3564708bc8..9f91391202 100644 --- a/include/macros.h +++ b/include/macros.h @@ -49,6 +49,9 @@ #define MAX_TEX_PANNERS 16 #define MAX_ITEM_ENTITIES 256 +#define SCREEN_WIDTH 320 +#define SCREEN_HEIGHT 240 + // Alternative to libultra's M_PI: non-float version; more digits cause issues #define PI 3.141592f #define PI_D 3.141592 diff --git a/include/si.h b/include/si.h index 59b45689e5..a0bdb7bb97 100644 --- a/include/si.h +++ b/include/si.h @@ -117,8 +117,8 @@ typedef enum ScriptOpcode { #define SI_LIMIT -250000000 // TODO better name #define MAKE_ENTITY_END 0x80000000 -#define STORY_PROGRESS SI_SAVE_VAR(0) -#define WORLD_LOCATION SI_SAVE_VAR(425) +#define SI_STORY_PROGRESS SI_SAVE_VAR(0) +#define SI_WORLD_LOCATION SI_SAVE_VAR(425) /* Return type of si_execute_next_command */ #define SI_CONTINUE 0 /* Continue to next command */ diff --git a/include/variables.h b/include/variables.h index 3619541228..d2a31f064f 100644 --- a/include/variables.h +++ b/include/variables.h @@ -58,7 +58,7 @@ extern ModelList* gCurrentModelListPtr; // TODO: potentially a display list, figure this out extern u32* gWorldModelSpecialDls[32]; extern u32* gBattleModelSpecialDls[32]; -extern u32** gCurrentModelSpecialDlsPtr[32]; +extern CustomModelGfx* gCurrentModelSpecialDlsPtr; extern EntityList gWorldEntityList; extern EntityList gBattleEntityList; diff --git a/src/1370_len_7d0.c b/src/1370_len_7d0.c index 24cda1959c..8f4b66af2d 100644 --- a/src/1370_len_7d0.c +++ b/src/1370_len_7d0.c @@ -80,7 +80,81 @@ void gfxRetrace_Callback(s32 arg0) { } } +//gfx stuff +#ifdef NON_MATCHING +void gfx_task_main(void) { + u16 t; + s32 temp_a0_3; + s32 temp_a1_3; + s32 temp_a2; + s32 temp_a3_2; + s32 temp_s0_3; + s32 temp_s1_2; + s32 temp_s3; + s32 temp_t7; + s16 i; + s16 j; + s32* temp; + + gMatrixListPos = 0; + gDisplayContext = &D_80164000[gCurrentDisplayContextIndex]; + gMasterGfxPos = gDisplayContext->mainGfx; + temp = D_80073E04; + gfx_init_state(); + + gDPSetDepthImage(gMasterGfxPos++, OS_K0_TO_PHYSICAL(nuGfxZBuffer)); + gDPSetColorImage(gMasterGfxPos++, G_IM_FMT_RGBA, G_IM_SIZ_16b, SCREEN_WIDTH, osVirtualToPhysical(temp)); + gDPSetScissor(gMasterGfxPos++, G_SC_NON_INTERLACE, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT); + gSPTexture(gMasterGfxPos++, -1, -1, 0, G_TX_RENDERTILE, G_ON); + gDPSetCycleType(gMasterGfxPos++, G_CYC_1CYCLE); + gDPSetTexturePersp(gMasterGfxPos++, G_TP_NONE); + gDPSetTextureLUT(gMasterGfxPos++, G_TT_NONE); + gDPSetRenderMode(gMasterGfxPos++, G_RM_OPA_SURF, G_RM_OPA_SURF2); + gDPSetTextureFilter(gMasterGfxPos++, G_TF_POINT); + gDPSetCombineLERP(gMasterGfxPos++, 0, 0, 0, 0, 0, 0, 0, TEXEL0, 0, 0, 0, 0, 0, 0, 0, TEXEL0); + gDPSetAlphaCompare(gMasterGfxPos++, G_AC_THRESHOLD); + gDPSetBlendColor(gMasterGfxPos++, 0, 0, 0, 127); + gDPSetTextureImage(gMasterGfxPos++, G_IM_FMT_I, G_IM_SIZ_8b, 64, &D_80073E10); + gDPSetTile(gMasterGfxPos++, G_IM_FMT_I, G_IM_SIZ_8b, 8, 0x0000, G_TX_LOADTILE, 0, G_TX_NOMIRROR | G_TX_WRAP, + G_TX_NOMASK, G_TX_NOLOD, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOLOD); + gDPLoadSync(gMasterGfxPos++); + gDPLoadTile(gMasterGfxPos++, G_TX_LOADTILE, 0, 0, 254, 28); + gDPPipeSync(gMasterGfxPos++); + gDPSetTile(gMasterGfxPos++, G_IM_FMT_I, G_IM_SIZ_4b, 8, 0x0000, G_TX_RENDERTILE, 0, G_TX_NOMIRROR | G_TX_WRAP, + G_TX_NOMASK, G_TX_NOLOD, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOLOD); + gDPSetTileSize(gMasterGfxPos++, G_TX_RENDERTILE, 0, 0, 508, 28); + + for (i = 0; i < 20; i++) { + temp_s3 = ((i * 8) + 168) * 4; + temp_s1_2 = ((i * 8) + 160) * 4; + temp_s0_3 = (160 - (i * 8)) * 4; + temp_t7 = (152 - (i * 8)) * 4; + + for (j = 0; j < 15; j++) { + t = (33 - ((i + 14) - j)) / 2 - (D_80074010 - 15); + if (t < 16 && t >= 0) { + temp_a0_3 = ((j * 8) + 8) * 4; + temp_a3_2 = ((j * 8) - 8) * 4; + temp_a1_3 = (SCREEN_HEIGHT - (j * 8)) * 4; + temp_a2 = (232 - (j * 8)) * 4; + + gSPTextureRectangle(gMasterGfxPos++, temp_s3, temp_a0_3, temp_s1_2, temp_a3_2, 4, -0x2000, t, 0x0400, 0x0400); + gSPTextureRectangle(gMasterGfxPos++, temp_s3, temp_a1_3, temp_s1_2, temp_a2, 4, -0x2000, t, 0x0400, -0x0400); + gSPTextureRectangle(gMasterGfxPos++, temp_s0_3, temp_a0_3, temp_t7, temp_a3_2, 4, -0x2000, t, -0x0400, 0x0400); + gSPTextureRectangle(gMasterGfxPos++, temp_s0_3, temp_a1_3, temp_t7, temp_a2, 4, -0x2000, t, -0x0400, -0x0400); + } + } + } + + D_80074010++; + gDPFullSync(gMasterGfxPos++); + gSPEndDisplayList(gMasterGfxPos++); + nuGfxTaskStart(gDisplayContext->mainGfx, (u32)(gMasterGfxPos - gDisplayContext->mainGfx) * 8, 0, 0x40000); + gCurrentDisplayContextIndex ^= 1; +} +#else INCLUDE_ASM(void, "1370_len_7d0", gfx_task_main); +#endif void gfxPreNMI_Callback(void) { D_80073E00 = 1; diff --git a/src/25AF0.c b/src/25AF0.c index 3bde30614b..c53853ce80 100644 --- a/src/25AF0.c +++ b/src/25AF0.c @@ -19,4 +19,64 @@ void func_8004A73C(ScriptInstance* script) { } } -INCLUDE_ASM(void, "25AF0", func_8004A784, Npc* npc, f32 arg1, f32* arg2, s32* arg3, s32* arg4, s32* arg5); +s32 func_8004A784(Npc* npc, f32 arg1, f32* outYaw, f32* outDist1, f32* outDist2, f32* outDist3) { + f32 x1, y1, z1; + f32 x2, y2, z2; + f32 x3, y3, z3; + f32 dist1 = -1.0f; + f32 dist2 = -1.0f; + f32 dist3 = -1.0f; + f32 yaw; + s32 ret; + + x1 = npc->pos.x; + y1 = npc->pos.y; + z1 = npc->pos.z; + yaw = *outYaw; + + ret = npc_test_move_simple_with_slipping(npc->unk_80, &x1, &y1, &z1, npc->moveSpeed * arg1, + yaw, npc->collisionHeight, npc->collisionRadius); + if (ret != 0) { + dist1 = dist2D(npc->pos.x, npc->pos.z, x1, z1); + + x2 = npc->pos.x; + y2 = npc->pos.y; + z2 = npc->pos.z; + if (npc_test_move_simple_with_slipping(npc->unk_80, &x2, &y2, &z2, npc->moveSpeed * arg1, + clamp_angle(yaw + 35.0f), npc->collisionHeight, + npc->collisionRadius) != 0) { + dist2 = dist2D(npc->pos.x, npc->pos.z, x2, z2); + } + + x3 = npc->pos.x; + y3 = npc->pos.y; + z3 = npc->pos.z; + if (npc_test_move_simple_with_slipping(npc->unk_80, &x3, &y3, &z3, npc->moveSpeed * arg1, + clamp_angle(yaw - 35.0f), npc->collisionHeight, npc->collisionRadius) + != 0) { + dist3 = dist2D(npc->pos.x, npc->pos.z, x3, z3); + } + + if ((dist2 < dist1 && dist3 < dist2) || (dist3 < dist1 && dist2 < dist3)) { + yaw = npc->yaw; + } else if ((dist1 < dist2 && dist3 < dist1) || (dist3 < dist2 && dist1 < dist3)) { + yaw = npc->yaw + 35.0f; + } else if ((dist1 < dist3 && dist2 < dist1) || (dist2 < dist3 && dist1 < dist2)) { + yaw = npc->yaw - 35.0f; + } + } + + if (outYaw != NULL) { + *outYaw = clamp_angle(yaw); + } + if (outDist1 != NULL) { + *outDist1 = dist1; + } + if (outDist2 != NULL) { + *outDist2 = dist2; + } + if (outDist3 != NULL) { + *outDist3 = dist3; + } + return ret; +} diff --git a/src/77480.c b/src/77480.c index b94528264a..5f3d924c06 100644 --- a/src/77480.c +++ b/src/77480.c @@ -687,7 +687,7 @@ block_9: guMtxCatF(sp20, spA0, sp20); guTranslateF(sp60, 0.0f, playerStatus->colliderHeight * 0.5f, 0.0f); guMtxCatF(sp20, sp60, sp20); - guScaleF(spE0, 0.71428573f, 0.71428573f, 0.71428573f); + guScaleF(spE0, SPRITE_WORLD_SCALE, SPRITE_WORLD_SCALE, SPRITE_WORLD_SCALE); guMtxCatF(sp20, spE0, sp20); guTranslateF(sp60, phi_f30, phi_f24, phi_f28); guMtxCatF(sp20, sp60, sp20); diff --git a/src/7fd10_len_b40.c b/src/7fd10_len_b40.c index 9438e59605..76a4b18eda 100644 --- a/src/7fd10_len_b40.c +++ b/src/7fd10_len_b40.c @@ -65,7 +65,7 @@ void check_input_status_menu(void) { PlayerStatus* playerStatus = &gPlayerStatus; s32 pressedButtons; - if (get_variable(NULL, STORY_PROGRESS) < STORY_EPILOGUE) { + if (get_variable(NULL, SI_STORY_PROGRESS) < STORY_EPILOGUE) { if (playerStatus->actionState != ACTION_STATE_RIDE) { pressedButtons = playerStatus->pressedButtons; } else { diff --git a/src/EA6FD0.c b/src/EA6FD0.c index c84a706a8b..5443506dcf 100644 --- a/src/EA6FD0.c +++ b/src/EA6FD0.c @@ -1,7 +1,7 @@ #include "common.h" s32 func_80240000_EA6FD0(void) { - s32 temp = dead_get_variable(NULL, SI_SAVE_VAR(0)); + s32 temp = dead_get_variable(NULL, SI_STORY_PROGRESS); if (temp <= 0x26) { return 0x19010F; diff --git a/src/a5dd0_len_114e0.c b/src/a5dd0_len_114e0.c index cf82f8a532..cdad21925a 100644 --- a/src/a5dd0_len_114e0.c +++ b/src/a5dd0_len_114e0.c @@ -1220,7 +1220,10 @@ void set_aux_pan_v(s32 texPannerID, s32 value) { INCLUDE_ASM(s32, "a5dd0_len_114e0", set_mdl_custom_gfx_set); -INCLUDE_ASM(s32, "a5dd0_len_114e0", set_custom_gfx); +void set_custom_gfx(s32 customGfxIndex, Gfx* pre, Gfx* post) { + gCurrentModelSpecialDlsPtr[customGfxIndex].pre = pre; + gCurrentModelSpecialDlsPtr[customGfxIndex].post = post; +} void set_custom_gfx_builders(s32 customGfxIndex, CustomModelGfxBuilderFunc pre, CustomModelGfxBuilderFunc post) { gCurrentCustomModelGfxBuilders[customGfxIndex].pre = pre; diff --git a/src/ad90_len_2880.c b/src/ad90_len_2880.c index cb7590aa15..5c1d801a93 100644 --- a/src/ad90_len_2880.c +++ b/src/ad90_len_2880.c @@ -1,3 +1,79 @@ #include "common.h" -INCLUDE_ASM(s32, "ad90_len_2880", update_camera_mode_6); +void update_camera_mode_6(Camera*); + +// types, floats, and other shtuff +#ifdef NON_MATCHING +void update_camera_mode_6(Camera* camera) { + f32 cosBoom; + f32 cosRotation; + f32 deltaX; + f32 temp_f24_2; + f32 deltaZ; + f32 boomYaw; + f32 rotation; + f32 sinBoom; + f32 sinRotation; + f32 temp_f30; + f32 deltaY; + s32 temp_lo; + + if (camera->unk_06 != 0 || camera->unk_08 != 0) { + camera->unk_06 = 0; + camera->unk_08 = 0; + camera->unk_1C = 0; + camera->unk_1E = 100; + camera->unk_20 = 100; + camera->unk_22 = 0; + camera->unk_24 = 0; + camera->unk_26 = 0; + camera->targetPos.x = 0.0f; + camera->targetPos.y = 0.0f; + camera->targetPos.z = 0.0f; + camera->lookAt_obj.x = camera->unk_54; + camera->lookAt_obj.y = camera->unk_58; + camera->lookAt_obj.z = camera->unk_5C; + } + + if (camera->unk_1C == 0) { + temp_lo = 10000 / camera->unk_20; + camera->trueRotation[0] = camera->unk_24; + camera->lookAt_obj.x = camera->unk_54 + camera->targetPos.x; + camera->currentBoomYaw = camera->unk_22; + camera->currentBoomLength = camera->unk_1E; + camera->lookAt_obj.z = camera->unk_5C + camera->targetPos.z; + camera->lookAt_obj.y = (camera->unk_58 + camera->targetPos.y) + (camera->unk_26 * 0.00390625); + + if (temp_lo < 0) { + temp_lo += 3; + } + camera->vfov = (f32) (temp_lo >> 2); + + boomYaw = (camera->currentBoomYaw * TAU) / 360.0f; + sinBoom = sin_rad(boomYaw); + cosBoom = cos_rad(boomYaw); + temp_f30 = (cosBoom * 0.0f) + (camera->currentBoomLength * sinBoom); + temp_f24_2 = (sinBoom * -0.0f) + (camera->currentBoomLength * cosBoom); + + rotation = (camera->trueRotation[0] * TAU) / 360.0f; + sinRotation = sin_rad(rotation); + cosRotation = cos_rad(rotation); + + camera->lookAt_eye.y = camera->lookAt_obj.y + temp_f30; + camera->lookAt_eye.x = camera->lookAt_obj.x + ((cosRotation * 0.0f) - (temp_f24_2 * sinRotation)); + camera->lookAt_eye.z = camera->lookAt_obj.z + ((sinRotation * 0.0f) + (temp_f24_2 * cosRotation)); + } + + camera->currentYaw = atan2(camera->lookAt_eye.x, camera->lookAt_eye.z, camera->lookAt_obj.x, camera->lookAt_obj.z); + deltaX = camera->lookAt_obj.x - camera->lookAt_eye.x; + deltaZ = camera->lookAt_obj.z - camera->lookAt_eye.z; + deltaY = camera->lookAt_obj.y - camera->lookAt_eye.y; + camera->currentBlendedYawNegated = -atan2(0.0f, 0.0f, deltaX, deltaZ); + camera->currentPitch = atan2(0.0f, 0.0f, deltaY, -sqrtf((deltaX * deltaX) + (deltaZ * deltaZ))); + gBattleStatus.unk_CC.x = camera->lookAt_obj.x; + gBattleStatus.unk_CC.y = camera->lookAt_obj.y; + gBattleStatus.unk_CC.z = camera->lookAt_obj.z; +} +#else +INCLUDE_ASM(void, "ad90_len_2880", update_camera_mode_6, Camera* camera); +#endif diff --git a/src/battle/move/mega_quake/756780.c b/src/battle/move/mega_quake/756780.c index 55b0763a7a..3643d5d1e3 100644 --- a/src/battle/move/mega_quake/756780.c +++ b/src/battle/move/mega_quake/756780.c @@ -21,7 +21,7 @@ ApiStatus func_802A10A4_756824(ScriptInstance* script, s32 isInitialCall) { } set_screen_overlay_center(1, 0, 0, 0); - set_screen_overlay_center(1, 1, 320, 240); + set_screen_overlay_center(1, 1, SCREEN_WIDTH, SCREEN_HEIGHT); set_screen_overlay_params_back(12, 160.0f); if (script->functionTemp[1] != 0) { @@ -29,7 +29,7 @@ ApiStatus func_802A10A4_756824(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_BLOCK; } else { set_screen_overlay_center(1, 0, 0, 0); - set_screen_overlay_center(1, 1, 320, 240); + set_screen_overlay_center(1, 1, SCREEN_WIDTH, SCREEN_HEIGHT); set_screen_overlay_params_back(12, 0.0f); return ApiStatus_DONE2; } diff --git a/src/curtains.c b/src/curtains.c index 333790be2d..b9f56cabb0 100644 --- a/src/curtains.c +++ b/src/curtains.c @@ -66,7 +66,7 @@ void render_curtains(void) { s8 rgb; gDPPipeSync(gMasterGfxPos++); - gDPSetColorImage(gMasterGfxPos++, G_IM_FMT_RGBA, G_IM_SIZ_16b, 320, osVirtualToPhysical(D_8009A64C)); + gDPSetColorImage(gMasterGfxPos++, G_IM_FMT_RGBA, G_IM_SIZ_16b, SCREEN_WIDTH, osVirtualToPhysical(D_8009A64C)); gSPDisplayList(gMasterGfxPos++, &D_800760C0); guFrustumF(m.m[0], -80.0f, 80.0f, -60.0f, 60.0f, 160.0f, 640.0f, 1.0f); diff --git a/src/dc470_len_14c0.c b/src/dc470_len_14c0.c index 88e3cb9e8f..304dd0d4c9 100644 --- a/src/dc470_len_14c0.c +++ b/src/dc470_len_14c0.c @@ -12,7 +12,7 @@ void load_map_bg(char* optAssetName) { u32 assetSize; char* assetName = optAssetName; - if (get_variable(0, STORY_PROGRESS) >= STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) { + if (get_variable(0, SI_STORY_PROGRESS) >= STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) { // Use sunny Flower Fields bg rather than cloudy if (!strcmp(assetName, gCloudyFlowerFieldsBg)) { assetName = gSunnyFlowerFieldsBg; diff --git a/src/fio.c b/src/fio.c index 07d34c933b..5d77d50359 100644 --- a/src/fio.c +++ b/src/fio.c @@ -1,11 +1,6 @@ #include "common.h" -u32 magicSaveString[] = { - ASCII_TO_U32('M','a','r','i'), - ASCII_TO_U32('o',' ','S','t'), - ASCII_TO_U32('o','r','y',' '), - ASCII_TO_U32('0','0','6',0), -}; // "Mario Story 006"; +char magicSaveString[] = "Mario Story 006"; extern s32 logicalSaveInfo[4][2]; // 0x8009BA30 extern s32 physicalSaveInfo[6][2]; // 0x8009BA50 @@ -15,7 +10,7 @@ extern s32 D_800D95E8[]; void fio_serialize_state(void); s32 get_spirits_rescued(void) { - s32 storyProgress = get_variable(NULL, STORY_PROGRESS); + s32 storyProgress = get_variable(NULL, SI_STORY_PROGRESS); s32 ret = 7; if (storyProgress < get_variable(NULL, STORY_CH1_STAR_SPIRIT_RESCUED)) { diff --git a/src/input.c b/src/input.c index 4d003ac239..87b7d7b25d 100644 --- a/src/input.c +++ b/src/input.c @@ -1,4 +1,7 @@ #include "common.h" +#include "nu/nusys.h" + +extern OSContPad D_8009A5B8; void func_800287F0(void) { gGameStatusPtr->currentButtons = 0; diff --git a/src/intro_logos.c b/src/intro_logos.c index fe176a1669..d1dc4e127e 100644 --- a/src/intro_logos.c +++ b/src/intro_logos.c @@ -22,7 +22,7 @@ s16 intro_logos_fade_in(s16 subtractAlpha) { return 0; } -s16 intro_logos_fade_out(s16 addAlpha) { +s32 intro_logos_fade_out(s16 addAlpha) { if (gGameStatusPtr->bootAlpha != 255) { gGameStatusPtr->bootAlpha += addAlpha; if (gGameStatusPtr->bootAlpha > 255) { diff --git a/src/main_loop.c b/src/main_loop.c index 7a180f7139..ba21355055 100644 --- a/src/main_loop.c +++ b/src/main_loop.c @@ -350,9 +350,6 @@ void gfx_init_state(void) { gSPDisplayList(gMasterGfxPos++, OS_K0_TO_PHYSICAL(D_80074210)); } -#define SCREEN_WIDTH 320 -#define SCREEN_HEIGHT 240 - s32 func_800271FC(const u16* framebuf1, const u16* framebuf2, s32 x, s32 y, u8* out) { s32 pixel = (x * SCREEN_WIDTH) + y; @@ -414,7 +411,7 @@ void func_80027BAC(s32 arg0, s32 arg1) { gDPPipeSync(gMasterGfxPos++); gSPTexture(gMasterGfxPos++, -1, -1, 0, G_TX_RENDERTILE, G_ON); - gDPSetColorImage(gMasterGfxPos++, G_IM_FMT_RGBA, G_IM_SIZ_16b, 320, arg1); + gDPSetColorImage(gMasterGfxPos++, G_IM_FMT_RGBA, G_IM_SIZ_16b, SCREEN_WIDTH, arg1); gDPSetCycleType(gMasterGfxPos++, G_CYC_COPY); gDPSetTexturePersp(gMasterGfxPos++, G_TP_NONE); gDPSetTextureLUT(gMasterGfxPos++, G_TT_NONE); @@ -422,7 +419,7 @@ void func_80027BAC(s32 arg0, s32 arg1) { gDPSetTextureFilter(gMasterGfxPos++, G_TF_POINT); for (i = 0; i < 40; i++) { - gDPSetTextureImage(gMasterGfxPos++, G_IM_FMT_RGBA, G_IM_SIZ_16b, 320, arg0 + (0xF00 * i)); + gDPSetTextureImage(gMasterGfxPos++, G_IM_FMT_RGBA, G_IM_SIZ_16b, SCREEN_WIDTH, arg0 + (0xF00 * i)); gDPSetTile(gMasterGfxPos++, G_IM_FMT_RGBA, G_IM_SIZ_16b, 80, 0x0000, G_TX_LOADTILE, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOLOD); @@ -449,7 +446,7 @@ void gfx_draw_background(void) { s32 i; s32 a = 0x18; - gDPSetScissor(gMasterGfxPos++, G_SC_NON_INTERLACE, 0, 0, 320, 240); + gDPSetScissor(gMasterGfxPos++, G_SC_NON_INTERLACE, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT); camera = &gCameras[gCurrentCameraID]; bgFlags = gGameStatusPtr->enableBackground & 0xF0; @@ -457,13 +454,13 @@ void gfx_draw_background(void) { switch (bgFlags) { case 0x10: gDPPipeSync(gMasterGfxPos++); - gDPSetColorImage(gMasterGfxPos++, G_IM_FMT_RGBA, G_IM_SIZ_16b, 320, D_8009A658[1]); + gDPSetColorImage(gMasterGfxPos++, G_IM_FMT_RGBA, G_IM_SIZ_16b, SCREEN_WIDTH, D_8009A658[1]); gDPSetCycleType(gMasterGfxPos++, G_CYC_1CYCLE); gDPSetBlendColor(gMasterGfxPos++, 0x80, 0x80, 0x80, 0xFF); gDPSetPrimDepth(gMasterGfxPos++, -1, -1); gDPSetDepthSource(gMasterGfxPos++, G_ZS_PRIM); gDPSetRenderMode(gMasterGfxPos++, G_RM_VISCVG, G_RM_VISCVG2); - gDPFillRectangle(gMasterGfxPos++, 0, 0, 320, 240); + gDPFillRectangle(gMasterGfxPos++, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT); gDPPipeSync(gMasterGfxPos++); gDPSetDepthSource(gMasterGfxPos++, G_ZS_PIXEL); gGameStatusPtr->enableBackground &= ~0xF0; @@ -481,10 +478,10 @@ void gfx_draw_background(void) { } gDPPipeSync(gMasterGfxPos++); - gDPSetScissor(gMasterGfxPos++, G_SC_NON_INTERLACE, 0, 0, 320, 240); + gDPSetScissor(gMasterGfxPos++, G_SC_NON_INTERLACE, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT); gDPSetCycleType(gMasterGfxPos++, G_CYC_FILL); gDPSetRenderMode(gMasterGfxPos++, G_RM_NOOP, G_RM_NOOP2); - gDPSetColorImage(gMasterGfxPos++, G_IM_FMT_RGBA, G_IM_SIZ_16b, 320, D_8009A64C); + gDPSetColorImage(gMasterGfxPos++, G_IM_FMT_RGBA, G_IM_SIZ_16b, SCREEN_WIDTH, D_8009A64C); gDPSetFillColor(gMasterGfxPos++, 0x00010001); gDPFillRectangle(gMasterGfxPos++, 0, 0, 319, 239); gDPSetCycleType(gMasterGfxPos++, G_CYC_1CYCLE); @@ -497,7 +494,7 @@ void gfx_draw_background(void) { gDPSetTextureFilter(gMasterGfxPos++, G_TF_POINT); for (i = 0; i < 40; i++) { - gDPSetTextureImage(gMasterGfxPos++, G_IM_FMT_RGBA, G_IM_SIZ_16b, 320, nuGfxZBuffer + (i * 0x780)); + gDPSetTextureImage(gMasterGfxPos++, G_IM_FMT_RGBA, G_IM_SIZ_16b, SCREEN_WIDTH, nuGfxZBuffer + (i * 0x780)); gDPSetTile(gMasterGfxPos++, G_IM_FMT_RGBA, G_IM_SIZ_16b, 80, 0x0000, G_TX_LOADTILE, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOLOD); @@ -515,18 +512,18 @@ void gfx_draw_background(void) { break; default: if (gOverrideFlags & 8) { - gDPSetColorImage(gMasterGfxPos++, G_IM_FMT_RGBA, G_IM_SIZ_16b, 320, osVirtualToPhysical(D_8009A64C)); + gDPSetColorImage(gMasterGfxPos++, G_IM_FMT_RGBA, G_IM_SIZ_16b, SCREEN_WIDTH, osVirtualToPhysical(D_8009A64C)); return; } gDPSetDepthImage(gMasterGfxPos++, OS_PHYSICAL_TO_K0(nuGfxZBuffer)); // TODO: or OS_K0_TO_PHYSICAL gDPSetCycleType(gMasterGfxPos++, G_CYC_FILL); gDPSetRenderMode(gMasterGfxPos++, G_RM_NOOP, G_RM_NOOP2); - gDPSetColorImage(gMasterGfxPos++, G_IM_FMT_RGBA, G_IM_SIZ_16b, 320, OS_PHYSICAL_TO_K0(nuGfxZBuffer)); + gDPSetColorImage(gMasterGfxPos++, G_IM_FMT_RGBA, G_IM_SIZ_16b, SCREEN_WIDTH, OS_PHYSICAL_TO_K0(nuGfxZBuffer)); gDPSetFillColor(gMasterGfxPos++, 0xFFFCFFFC); gDPFillRectangle(gMasterGfxPos++, 0, 0, 319, 239); gDPPipeSync(gMasterGfxPos++); - gDPSetColorImage(gMasterGfxPos++, G_IM_FMT_RGBA, G_IM_SIZ_16b, 320, osVirtualToPhysical(D_8009A64C)); + gDPSetColorImage(gMasterGfxPos++, G_IM_FMT_RGBA, G_IM_SIZ_16b, SCREEN_WIDTH, osVirtualToPhysical(D_8009A64C)); gDPSetFillColor(gMasterGfxPos++, PACK_FILL_COLOR(camera->bgColor[0], camera->bgColor[1], camera->bgColor[2], 1)); backgroundMinW = gGameStatusPtr->backgroundMinW; @@ -567,20 +564,20 @@ void gfx_draw_background(void) { backgroundSumH = 1; } - if (backgroundMinW > 319) { - backgroundMinW = 319; + if (backgroundMinW > SCREEN_WIDTH - 1) { + backgroundMinW = SCREEN_WIDTH - 1; } - if (backgroundMinH > 239) { - backgroundMinH = 239; + if (backgroundMinH > SCREEN_HEIGHT - 1) { + backgroundMinH = SCREEN_HEIGHT - 1; } - if (backgroundSumW > 320) { - backgroundSumW = 320; + if (backgroundSumW > SCREEN_WIDTH) { + backgroundSumW = SCREEN_WIDTH; } - if (backgroundSumH > 240) { - backgroundSumH = 240; + if (backgroundSumH > SCREEN_HEIGHT) { + backgroundSumH = SCREEN_HEIGHT; } if (!(gGameStatusPtr->enableBackground & 1)) { diff --git a/src/msg.c b/src/msg.c index 67969dc6e9..7255973531 100644 --- a/src/msg.c +++ b/src/msg.c @@ -777,8 +777,8 @@ void msg_printer_set_origin_pos(MessagePrintState* msgPrintState, s16 x, s16 y) if (msgPrintState->initOpenPos.x < 0) { msgPrintState->initOpenPos.x = 0; } - if (msgPrintState->initOpenPos.x > 320) { - msgPrintState->initOpenPos.x = 320; + if (msgPrintState->initOpenPos.x > SCREEN_WIDTH) { + msgPrintState->initOpenPos.x = SCREEN_WIDTH; } if (msgPrintState->initOpenPos.y < 0) { msgPrintState->initOpenPos.y = 0; @@ -1050,7 +1050,8 @@ void draw_message_window(MessagePrintState* printer) { printer->windowBasePos.x = 160 - (printer->windowSize.x / 2); printer->windowBasePos.y = 56; draw_box(1, 0, printer->windowBasePos.x, 56, 0, printer->windowSize.x, printer->windowSize.y, 255, 0, - scale, scale, 0.0f, 0.0f, rotZ, drawbox_message_delegate, printer, NULL, 320, 240, NULL); + scale, scale, 0.0f, 0.0f, rotZ, drawbox_message_delegate, printer, NULL, SCREEN_WIDTH, + SCREEN_HEIGHT, NULL); break; default: appendGfx_message(printer, printer->windowOffsetPos.x, printer->windowOffsetPos.y, printer->unk_46C, diff --git a/src/state_demo.c b/src/state_demo.c index 760848f0e3..d551c028ad 100644 --- a/src/state_demo.c +++ b/src/state_demo.c @@ -1,5 +1,46 @@ #include "common.h" +typedef struct DemoSceneData { + /* 0x0 */ s16 unk_0; + /* 0x2 */ u16 entryID; + /* 0x4 */ char unk_4; + /* 0x5 */ s8 partnerID; + /* 0x6 */ s8 unk_6; + /* 0x7 */ char unk_7; + /* 0x8 */ char* mapName; +} DemoSceneData; // size = 0xC; + +// rodata for below map names +// the compiler deduplicates the two identical map name strings, but it's removing the wrong one +const char D_800983F8[] = { + "end\0kkj_26\0\0arn_08\0\0kkj_11\0\0nok_02\0\0mac_03\0\0kzn_02\0\0mac_00\0\0jan_04\0\0trd_09\0\0tik_03\0\0isk_04\0\0nok_12\0\0" +}; + +DemoSceneData D_80077AE0[20] = { + { .unk_0 = 0, .entryID = 2, .unk_4 = 0, .partnerID = PARTNER_GOOMBARIO, .unk_6 = 0x9D, .mapName = &D_800983F8[0x5C] }, + { .unk_0 = 2, .entryID = 0, .unk_4 = 0, .partnerID = PARTNER_NONE, .unk_6 = 0 }, + { .unk_0 = 0, .entryID = 5, .unk_4 = 0, .partnerID = PARTNER_PARAKARRY, .unk_6 = 0x9D, .mapName = &D_800983F8[0x54] }, + { .unk_0 = 0, .entryID = 2, .unk_4 = 0, .partnerID = PARTNER_KOOPER, .unk_6 = 0x9D, .mapName = &D_800983F8[0x4C] }, + { .unk_0 = 0, .entryID = 2, .unk_4 = 0, .partnerID = PARTNER_PARAKARRY, .unk_6 = 0xB3, .mapName = &D_800983F8[0x44] }, + { .unk_0 = 0, .entryID = 4, .unk_4 = 0, .partnerID = PARTNER_SUSHIE, .unk_6 = 0x9D, .mapName = &D_800983F8[0x3C] }, + { .unk_0 = 2, .entryID = 1, .unk_4 = 0, .partnerID = PARTNER_NONE, .unk_6 = 0x00 }, + { .unk_0 = 0, .entryID = 6, .unk_4 = 0, .partnerID = PARTNER_BOMBETTE, .unk_6 = 0x9D, .mapName = &D_800983F8[0x34] }, + { .unk_0 = 0, .entryID = 2, .unk_4 = 0, .partnerID = PARTNER_KOOPER, .unk_6 = 0x1B, .mapName = &D_800983F8[0x2C] }, + { .unk_0 = 2, .entryID = 2, .unk_4 = 0, .partnerID = PARTNER_NONE, .unk_6 = 0x00 }, + { .unk_0 = 0, .entryID = 3, .unk_4 = 0, .partnerID = PARTNER_BOMBETTE, .unk_6 = 0x9D, .mapName = &D_800983F8[0x24] }, + { .unk_0 = 0, .entryID = 4, .unk_4 = 0, .partnerID = PARTNER_GOOMBARIO, .unk_6 = 0x9D, .mapName = &D_800983F8[0x1C] }, + { .unk_0 = 2, .entryID = 3, .unk_4 = 0, .partnerID = PARTNER_NONE, .unk_6 = 0x00 }, + { .unk_0 = 1, .entryID = 8, .unk_4 = 0, .partnerID = PARTNER_TWINK, .unk_6 = 0x26, .mapName = &D_800983F8[0x14] }, + { .unk_0 = 0, .entryID = 2, .unk_4 = 0, .partnerID = PARTNER_BOW, .unk_6 = 0xE8, .mapName = &D_800983F8[0xC] }, + { .unk_0 = 2, .entryID = 4, .unk_4 = 0, .partnerID = PARTNER_NONE, .unk_6 = 0x00 }, + { .unk_0 = 0, .entryID = 3, .unk_4 = 0, .partnerID = PARTNER_GOOMBARIO, .unk_6 = 0x9D, .mapName = &D_800983F8[0x5C] }, + { .unk_0 = 1, .entryID = 3, .unk_4 = 0, .partnerID = PARTNER_NONE, .unk_6 = 0x9D, .mapName = &D_800983F8[4] }, + { .unk_0 = 3, .entryID = 0, .unk_4 = 0, .partnerID = PARTNER_NONE, .unk_6 = 0x00, .mapName = &D_800983F8[0] }, + { .unk_0 = 0, .entryID = 0, .unk_4 = 0, .partnerID = PARTNER_NONE, .unk_6 = 0x00, }, +}; + +char versionString[] = "Prg Ver.00/12/05 16:54"; + void state_init_demo(void) { if (gGameStatusPtr->demoState == 0) { gGameStatusPtr->nextDemoScene = 0; @@ -17,8 +58,121 @@ void state_init_demo(void) { clear_script_list(); } -INCLUDE_ASM(void, "state_demo", state_step_demo, void); +void state_step_demo(void) { + PlayerData* playerData = &gPlayerData; + DemoSceneData* demoSceneData = &D_80077AE0[gGameStatusPtr->nextDemoScene]; + s16 mode = demoSceneData->unk_0; + s16 mapID; + s16 areaID; + + if (gGameStatusPtr->demoState == 4) { + mode = 3; + } + if (gGameStatusPtr->demoState == 5) { + mode = 4; + } + + switch (mode) { + case 3: + intro_logos_set_fade_alpha(255); + intro_logos_set_fade_color(224); + gGameStatusPtr->loadMenuState = 3; + gOverrideFlags |= 8; + intro_logos_update_fade(); + gGameStatusPtr->demoState = 5; + break; + case 4: + if (gGameStatusPtr->loadMenuState != 0) { + gGameStatusPtr->loadMenuState--; + } + + if (gGameStatusPtr->loadMenuState == 0) { + gGameStatusPtr->nextDemoScene = 0; + gGameStatusPtr->demoState = 0; + gGameStatusPtr->peachFlags = 0; + func_80056204(); + gGameStatusPtr->isBattle = 0; + gGameStatusPtr->unk_76 = 0; + gGameStatusPtr->disableScripts = 0; + gGameStatusPtr->unk_7D = 0; + gOverrideFlags &= -9; + general_heap_create(&gOverrideFlags); + clear_render_tasks(); + clear_generic_entity_list(); + clear_script_list(); + create_cameras_a(); + spr_init_sprites(0); + clear_entity_models(); + clear_animator_list(); + clear_model_data(); + clear_sprite_shading_data(); + reset_background_settings(); + clear_hud_element_cache(); + clear_trigger_data(); + clear_printers(); + clear_entity_data(0); + clear_screen_overlays(); + clear_player_status(); + clear_npcs(); + clear_player_data(); + reset_battle_status(); + init_encounter_status(); + clear_effect_data(); + clear_item_entity_data(); + clear_saved_variables(); + initialize_collision(); + set_game_mode(2); + } + return; + case 0: + get_map_IDs_by_name(demoSceneData->mapName, &areaID, &mapID); + gGameStatusPtr->areaID = areaID; + gGameStatusPtr->mapID = mapID; + gGameStatusPtr->entryID = demoSceneData->entryID; + gGameStatusPtr->peachFlags = 0; + playerData->currentPartner = demoSceneData->partnerID; + set_cam_viewport(0, 29, 20, -262, 177); + set_variable(NULL, SI_STORY_PROGRESS, demoSceneData->unk_6); + + if (gGameStatusPtr->nextDemoScene == 0) { + set_map_transition_effect(3); + } else { + set_map_transition_effect(2); + } + + set_game_mode(3); + break; + case 1: + get_map_IDs_by_name(demoSceneData->mapName, &areaID, &mapID); + gGameStatusPtr->areaID = areaID; + gGameStatusPtr->mapID = mapID; + gGameStatusPtr->entryID = demoSceneData->entryID; + gGameStatusPtr->peachFlags = 1; + playerData->currentPartner = demoSceneData->partnerID; + set_cam_viewport(0, 29, 20, -262, 177); + set_variable(NULL, SI_STORY_PROGRESS, demoSceneData->unk_6); + + if (gGameStatusPtr->nextDemoScene == 0) { + set_map_transition_effect(3); + } else { + set_map_transition_effect(2); + } + + set_game_mode(3); + break; + case 2: + load_demo_battle(demoSceneData->entryID); + break; + } + + gGameStatusPtr->nextDemoScene += 1; + if (gGameStatusPtr->nextDemoScene > 0x12) { + gGameStatusPtr->nextDemoScene = 0x12; + } +} void state_drawUI_demo(void) { } + +static const f32 pad[] = {0.0f, 0.0f}; diff --git a/src/state_intro.c b/src/state_intro.c index 7586e65238..ec4aabe558 100644 --- a/src/state_intro.c +++ b/src/state_intro.c @@ -70,184 +70,161 @@ void state_init_intro(void) { intro_logos_update_fade(); } -// WIP -#ifdef NON_MATCHING void state_step_intro(void) { PlayerData* playerData = &gPlayerData; - s32 loadMenuState; - s32 viewportMode; + u32 pressedButtons = gGameStatusPtr->pressedButtons; s32 i; if (gGameStatusPtr->creditsViewportMode != -1) { - if (D_800A0964 == 0 && gGameStatusPtr->pressedButtons & (BUTTON_A | BUTTON_B | BUTTON_START | BUTTON_Z)) { + if (D_800A0964 == 0 && pressedButtons & (BUTTON_A | BUTTON_B | BUTTON_START | BUTTON_Z)) { D_800A0964 = 1; } - if (D_800A0964 == 1) { - viewportMode = 100; - if (gGameStatusPtr->loadMenuState >= 2U) { - if (gGameStatusPtr->loadMenuState == 4) { -block_13: - gGameStatusPtr->creditsViewportMode = viewportMode; - state_init_intro(); - return; - } -block_9: - if ((D_800A0964 == 2) && ((gGameStatusPtr->loadMenuState < 2U) || (gGameStatusPtr->loadMenuState == 4))) { - viewportMode = gGameStatusPtr->creditsViewportMode + 1; - goto block_13; - } -block_14: - loadMenuState = gGameStatusPtr->loadMenuState; - - switch (gGameStatusPtr->loadMenuState) { - - case 0: - update_effects(); - update_cameras(); - if (gGameStatusPtr->creditsViewportMode == -1) { - set_curtain_fade_goal(0.0f); - if (intro_logos_fade_out(D_800A0956) != 0) { - gGameStatusPtr->loadMenuState = 1; - set_curtain_draw_callback(NULL); - } - } else { - D_800A0954 += D_800A0956; - if (D_800A0954 >= 0xFF) { - D_800A0954 = 0xFF; - gGameStatusPtr->loadMenuState = 1; - set_curtain_draw_callback(NULL); - } - } - break; - - case 21: - D_800A0950--; - if (D_800A0950 <= 0) { - gOverrideFlags &= -9; - gGameStatusPtr->loadMenuState = 2; - } - goto block_39; - - case 1: - D_800A0950 = 4; - gOverrideFlags |= 8; - if (D_800A0960 != 0xE) { - gGameStatusPtr->loadMenuState = 2; - } - goto block_39; - case 2: - set_curtain_draw_callback(NULL); - gGameStatusPtr->isBattle = 0; - gGameStatusPtr->unk_76 = 0; - gGameStatusPtr->disableScripts = 0; - gGameStatusPtr->unk_7D = 0; - if (gGameStatusPtr->creditsViewportMode == -1) { - general_heap_create(); - clear_render_tasks(); - clear_generic_entity_list(); - clear_script_list(); - create_cameras_a(); - spr_init_sprites(0); - clear_entity_models(); - clear_animator_list(); - clear_model_data(); - clear_sprite_shading_data(); - reset_background_settings(); - clear_hud_element_cache(); - clear_trigger_data(); - clear_printers(); - clear_entity_data(0); - clear_screen_overlays(); - clear_player_status(); - clear_npcs(); - clear_player_data(); - reset_battle_status(); - init_encounter_status(); - clear_effect_data(); - clear_item_entity_data(); - clear_saved_variables(); - initialize_collision(); - set_game_mode(2); - return; - } - playerData->curHP = 10; - playerData->curMaxHP = 10; - playerData->hardMaxHP = 10; - playerData->curFP = 5; - playerData->curMaxFP = 5; - playerData->hardMaxFP = 5; - playerData->maxBP = 2; - playerData->bootsLevel = 0; - playerData->hammerLevel = -1; - playerData->fortressKeyCount = 0; - playerData->level = 0; - - for (i = 0; i < ARRAY_COUNT(playerData->partners); i++) { - playerData->partners[i].enabled = 0; - } - - playerData->currentPartner = 0; - load_map_by_IDs(gGameStatusPtr->areaID, gGameStatusPtr->mapID, 0); - gGameStatusPtr->loadMenuState = 3; - disable_player_input(); - goto block_39; - case 3: - if (D_800A0960 == 0xE) { - D_800A0960 = 0xF; - } - D_800A0954 = 0xFF - D_800A0958; - gOverrideFlags &= ~0x8; - gCameras->flags &= ~0x2; - gOverrideFlags &= ~0x2; - update_player(&gOverrideFlags, -9, gCameras); - update_encounters(); - update_npcs(); - update_effects(); - update_cameras(); - if (!does_script_exist(gGameStatusPtr->mainScriptID)) { - gGameStatusPtr->loadMenuState = 4; - gGameStatusPtr->prevArea = gGameStatusPtr->areaID; - goto block_39; - } - // Duplicate return node #40. Try simplifying control flow for better match - return; - case 4: - update_effects(); - update_cameras(); - update_npcs(); - if (D_800A0954 == 0) { - set_screen_overlay_params_front(0xFF, -1.0f); - set_screen_overlay_params_back(0xFF, -1.0f); - } else { - D_800A0954 -= D_800A0958; - if (D_800A0954 & 0x8000) { - D_800A0954 = 0; - } - } - goto block_39; - default: - block_39: - set_screen_overlay_params_back(D_800A0963, D_800A0954); - set_screen_overlay_color(1, D_800A095B, D_800A095D, D_800A095F); - intro_logos_update_fade(); - return; - } - - - } else { - goto block_13; - } - } else { - goto block_9; + if (D_800A0964 == 1 && (gGameStatusPtr->loadMenuState == 0 || gGameStatusPtr->loadMenuState == 1 || + gGameStatusPtr->loadMenuState == 4)) { + gGameStatusPtr->creditsViewportMode = 100; + state_init_intro(); + return; + } + + if (D_800A0964 == 2 && (gGameStatusPtr->loadMenuState == 0 || gGameStatusPtr->loadMenuState == 1 || + gGameStatusPtr->loadMenuState == 4)) { + gGameStatusPtr->creditsViewportMode++; + state_init_intro(); + return; } - } else { - goto block_14; } + + switch (gGameStatusPtr->loadMenuState) { + case 0: + update_effects(); + update_cameras(); + if (gGameStatusPtr->creditsViewportMode == -1) { + set_curtain_fade_goal(0.0f); + if (intro_logos_fade_out(D_800A0956)) { + gGameStatusPtr->loadMenuState = 1; + set_curtain_draw_callback(NULL); + } + } else { + D_800A0954 += D_800A0956; + if (D_800A0954 >= 0xFF) { + D_800A0954 = 0xFF; + gGameStatusPtr->loadMenuState = 1; + set_curtain_draw_callback(NULL); + } + } + break; + case 1: + D_800A0950 = 4; + gOverrideFlags |= 8; + if (D_800A0960 != 0xE) { + gGameStatusPtr->loadMenuState = 2; + } + break; + case 21: + D_800A0950--; + if (D_800A0950 <= 0) { + gOverrideFlags &= -9; + gGameStatusPtr->loadMenuState = 2; + } + break; + case 2: + set_curtain_draw_callback(NULL); + gGameStatusPtr->isBattle = 0; + gGameStatusPtr->unk_76 = 0; + gGameStatusPtr->disableScripts = 0; + gGameStatusPtr->unk_7D = 0; + + if (gGameStatusPtr->creditsViewportMode == -1) { + general_heap_create(); + clear_render_tasks(); + clear_generic_entity_list(); + clear_script_list(); + create_cameras_a(); + spr_init_sprites(0); + clear_entity_models(); + clear_animator_list(); + clear_model_data(); + clear_sprite_shading_data(); + reset_background_settings(); + clear_hud_element_cache(); + clear_trigger_data(); + clear_printers(); + clear_entity_data(0); + clear_screen_overlays(); + clear_player_status(); + clear_npcs(); + clear_player_data(); + reset_battle_status(); + init_encounter_status(); + clear_effect_data(); + clear_item_entity_data(); + clear_saved_variables(); + initialize_collision(); + set_game_mode(2); + return; + } + + playerData->curHP = 10; + playerData->curMaxHP = 10; + playerData->hardMaxHP = 10; + playerData->curFP = 5; + playerData->curMaxFP = 5; + playerData->hardMaxFP = 5; + playerData->maxBP = 2; + playerData->bootsLevel = 0; + playerData->hammerLevel = -1; + playerData->fortressKeyCount = 0; + playerData->level = 0; + + for (i = 0; i < ARRAY_COUNT(playerData->partners); i++) { + playerData->partners[i].enabled = 0; + } + + playerData->currentPartner = 0; + load_map_by_IDs(gGameStatusPtr->areaID, gGameStatusPtr->mapID, 0); + gGameStatusPtr->loadMenuState = 3; + disable_player_input(); + break; + case 3: + if (D_800A0960 == 0xE) { + D_800A0960 = 0xF; + } + D_800A0954 = 0xFF - D_800A0958; + gOverrideFlags &= ~0x8; + gCameras->flags &= ~0x2; + gOverrideFlags &= ~0x2; + update_player(); + update_encounters(); + update_npcs(); + update_effects(); + update_cameras(); + if (!does_script_exist(gGameStatusPtr->mainScriptID)) { + gGameStatusPtr->prevArea = gGameStatusPtr->areaID; + gGameStatusPtr->loadMenuState = 4; + break; + } + return; + case 4: + update_effects(); + update_cameras(); + update_npcs(); + if (D_800A0954 == 0) { + set_screen_overlay_params_front(0xFF, -1.0f); + set_screen_overlay_params_back(0xFF, -1.0f); + } else { + D_800A0954 -= D_800A0958; + if (D_800A0954 < 0) { + D_800A0954 = 0; + } + } + break; + } + + set_screen_overlay_params_back(D_800A0963, D_800A0954); + set_screen_overlay_color(1, D_800A095B, D_800A095D, D_800A095F); + intro_logos_update_fade(); } -#else -INCLUDE_ASM(void, "state_intro", state_step_intro, void); -#endif void state_drawUI_intro(void) { } diff --git a/src/state_title_screen.c b/src/state_title_screen.c index 5739d8b4e6..71a48c3e23 100644 --- a/src/state_title_screen.c +++ b/src/state_title_screen.c @@ -38,7 +38,7 @@ Gfx D_80077A50[] = { gsDPSetCombineKey(G_CK_NONE), gsDPSetAlphaCompare(G_AC_NONE), gsDPNoOp(), - gsDPSetScissor(G_SC_NON_INTERLACE, 0, 0, 320, 240), + gsDPSetScissor(G_SC_NON_INTERLACE, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT), gsSPEndDisplayList(), }; diff --git a/src/world/area_arn/arn_02/events.c b/src/world/area_arn/arn_02/events.c index c0e54dae3c..37a7320d15 100644 --- a/src/world/area_arn/arn_02/events.c +++ b/src/world/area_arn/arn_02/events.c @@ -12,7 +12,7 @@ Script N(802411A8) = SCRIPT({ }); Script N(main) = SCRIPT({ - WORLD_LOCATION = LOCATION_GUSTY_GULCH; + SI_WORLD_LOCATION = LOCATION_GUSTY_GULCH; SetSpriteShading(-1); SetCamPerspective(0, 3, 25, 16, 4096); SetCamBGColor(0, 0, 0, 0); diff --git a/src/world/area_arn/arn_02/header.c b/src/world/area_arn/arn_02/header.c index 50443b8630..fd073d2f08 100644 --- a/src/world/area_arn/arn_02/header.c +++ b/src/world/area_arn/arn_02/header.c @@ -15,7 +15,7 @@ MapConfig N(config) = { }; Script N(80241040) = SCRIPT({ - match STORY_PROGRESS { + match SI_STORY_PROGRESS { < STORY_CH3_TUBBA_WOKE_UP { SetMusicTrack(0, SONG_GUSTY_GULCH, 0, 8); } diff --git a/src/world/area_arn/arn_03/events.c b/src/world/area_arn/arn_03/events.c index ae8d48ef8f..78dd1dc233 100644 --- a/src/world/area_arn/arn_03/events.c +++ b/src/world/area_arn/arn_03/events.c @@ -20,7 +20,7 @@ Script N(enterWalk_80241930) = SCRIPT({ spawn N(802418E8); return; } - if (STORY_PROGRESS < STORY_CH3_ARRIVED_AT_GHOST_TOWN) { + if (SI_STORY_PROGRESS < STORY_CH3_ARRIVED_AT_GHOST_TOWN) { SetPlayerPos(-175, 165, 160); InterpPlayerYaw(90, 0); SetNpcPos(NPC_PARTNER, -175, 165, 160); @@ -35,7 +35,7 @@ Script N(enterWalk_80241930) = SCRIPT({ }); Script N(main) = SCRIPT({ - WORLD_LOCATION = LOCATION_GUSTY_GULCH; + SI_WORLD_LOCATION = LOCATION_GUSTY_GULCH; SetSpriteShading(-1); SetCamPerspective(0, 3, 25, 16, 4096); SetCamBGColor(0, 0, 0, 0); @@ -43,7 +43,7 @@ Script N(main) = SCRIPT({ SI_AREA_FLAG(3) = 0; SI_AREA_FLAG(4) = 0; SI_AREA_FLAG(5) = 0; - if (STORY_PROGRESS < STORY_CH3_DEFEATED_TUBBA_BLUBBA) { + if (SI_STORY_PROGRESS < STORY_CH3_DEFEATED_TUBBA_BLUBBA) { MakeNpcs(0, N(npcGroupList_80244740)); } else { MakeNpcs(0, N(npcGroupList_80244788)); @@ -149,7 +149,7 @@ Script N(80241E68) = SCRIPT({ }); Script N(interact_80241EB0) = SCRIPT({ - match STORY_PROGRESS { + match SI_STORY_PROGRESS { < STORY_CH3_TUBBA_CHASED_MARIO_IN_FOYER { if (SI_AREA_FLAG(2) == 0) { SpeakToPlayer(NPC_SELF, NPC_ANIM(boo, Palette_01, Anim_4), NPC_ANIM(boo, Palette_01, Anim_1), 0, MESSAGE_ID(0x0E, @@ -235,7 +235,7 @@ Script N(idle_80242064) = SCRIPT({ } func_802CF56C(2); sleep 15; - STORY_PROGRESS = STORY_CH3_ARRIVED_AT_GHOST_TOWN; + SI_STORY_PROGRESS = STORY_CH3_ARRIVED_AT_GHOST_TOWN; DisablePlayerInput(FALSE); GetPlayerPos(SI_VAR(0), SI_VAR(1), SI_VAR(2)); UseSettingsFrom(0, SI_VAR(0), SI_VAR(1), SI_VAR(2)); @@ -246,7 +246,7 @@ Script N(idle_80242064) = SCRIPT({ }); Script N(init_802424E0) = SCRIPT({ - if (STORY_PROGRESS < STORY_CH3_ARRIVED_AT_GHOST_TOWN) { + if (SI_STORY_PROGRESS < STORY_CH3_ARRIVED_AT_GHOST_TOWN) { SetNpcPos(NPC_SELF, 175, 240, 145); BindNpcIdle(NPC_SELF, N(idle_80242064)); } @@ -272,7 +272,7 @@ Script N(interact_8024254C) = SCRIPT({ return; } } - match STORY_PROGRESS { + match SI_STORY_PROGRESS { < STORY_CH3_TUBBA_CHASED_MARIO_IN_FOYER { if (SI_AREA_FLAG(3) == 0) { SpeakToPlayer(NPC_SELF, NPC_ANIM(boo, Palette_01, Anim_4), NPC_ANIM(boo, Palette_01, Anim_1), 0, MESSAGE_ID(0x0E, @@ -410,7 +410,7 @@ Script N(80242C60) = SCRIPT({ }); Script N(interact_80242DC4) = SCRIPT({ - match STORY_PROGRESS { + match SI_STORY_PROGRESS { < STORY_CH3_TUBBA_CHASED_MARIO_IN_FOYER { if (SI_AREA_FLAG(4) == 0) { SpeakToPlayer(NPC_SELF, NPC_ANIM(boo, Palette_01, Anim_4), NPC_ANIM(boo, Palette_01, Anim_1), 0, MESSAGE_ID(0x0E, @@ -476,7 +476,7 @@ Script N(init_802431A4) = SCRIPT({ }); Script N(interact_802431C8) = SCRIPT({ - match STORY_PROGRESS { + match SI_STORY_PROGRESS { < STORY_CH3_TUBBA_CHASED_MARIO_IN_FOYER { if (SI_AREA_FLAG(5) == 0) { SpeakToPlayer(NPC_SELF, NPC_ANIM(boo, Palette_01, Anim_4), NPC_ANIM(boo, Palette_01, Anim_1), 0, MESSAGE_ID(0x0E, diff --git a/src/world/area_arn/arn_03/header.c b/src/world/area_arn/arn_03/header.c index fcfbab89b2..da165c8e6e 100644 --- a/src/world/area_arn/arn_03/header.c +++ b/src/world/area_arn/arn_03/header.c @@ -14,7 +14,7 @@ MapConfig N(config) = { }; Script N(80241780) = SCRIPT({ - match STORY_PROGRESS { + match SI_STORY_PROGRESS { < STORY_CH3_TUBBA_WOKE_UP { SetMusicTrack(0, SONG_GUSTY_GULCH, 0, 8); } diff --git a/src/world/area_arn/arn_04/events.c b/src/world/area_arn/arn_04/events.c index b61640d6e0..39ae035d88 100644 --- a/src/world/area_arn/arn_04/events.c +++ b/src/world/area_arn/arn_04/events.c @@ -13,7 +13,7 @@ Script N(80243538) = SCRIPT({ }); Script N(main) = SCRIPT({ - WORLD_LOCATION = LOCATION_GUSTY_GULCH; + SI_WORLD_LOCATION = LOCATION_GUSTY_GULCH; SetSpriteShading(-1); SetCamPerspective(0, 3, 25, 16, 4096); SetCamBGColor(0, 0, 0, 0); diff --git a/src/world/area_arn/arn_04/header.c b/src/world/area_arn/arn_04/header.c index ed8cbc03b6..9a7b2f5ce8 100644 --- a/src/world/area_arn/arn_04/header.c +++ b/src/world/area_arn/arn_04/header.c @@ -15,7 +15,7 @@ MapConfig N(config) = { }; Script N(802433D0) = SCRIPT({ - match STORY_PROGRESS { + match SI_STORY_PROGRESS { < STORY_CH3_TUBBA_WOKE_UP { SetMusicTrack(0, SONG_GUSTY_GULCH, 0, 8); } diff --git a/src/world/area_arn/arn_05/events.c b/src/world/area_arn/arn_05/events.c index 0ad63d297f..92ddd32f68 100644 --- a/src/world/area_arn/arn_05/events.c +++ b/src/world/area_arn/arn_05/events.c @@ -38,12 +38,12 @@ Script N(enterWalk_80241530) = SCRIPT({ }); Script N(main) = SCRIPT({ - WORLD_LOCATION = LOCATION_GUSTY_GULCH; + SI_WORLD_LOCATION = LOCATION_GUSTY_GULCH; SetSpriteShading(-1); SetCamPerspective(0, 3, 25, 16, 4096); SetCamBGColor(0, 0, 0, 0); SetCamEnabled(0, 1); - if (STORY_PROGRESS < STORY_CH3_DEFEATED_TUBBA_BLUBBA) { + if (SI_STORY_PROGRESS < STORY_CH3_DEFEATED_TUBBA_BLUBBA) { MakeNpcs(0, N(npcGroupList_80244FA4)); } else { MakeNpcs(0, N(npcGroupList_80244FC8)); @@ -100,7 +100,7 @@ Script N(idle_80241784) = SCRIPT({ }); Script N(interact_80241794) = SCRIPT({ - match STORY_PROGRESS { + match SI_STORY_PROGRESS { < STORY_CH3_TUBBA_CHASED_MARIO_IN_FOYER { if (SI_AREA_FLAG(6) == 0) { SpeakToPlayer(NPC_SELF, NPC_ANIM(boo, Palette_01, Anim_4), NPC_ANIM(boo, Palette_01, Anim_1), 0, MESSAGE_ID(0x0E, @@ -132,7 +132,7 @@ Script N(interact_802418F4) = SCRIPT({ }); Script N(interact_80241924) = SCRIPT({ - match STORY_PROGRESS { + match SI_STORY_PROGRESS { < STORY_CH3_TUBBA_CHASED_MARIO_IN_FOYER { if (SI_AREA_FLAG(7) == 0) { SpeakToPlayer(NPC_SELF, NPC_ANIM(boo, Palette_01, Anim_4), NPC_ANIM(boo, Palette_01, Anim_1), 0, MESSAGE_ID(0x0E, @@ -164,7 +164,7 @@ Script N(interact_80241A84) = SCRIPT({ }); Script N(interact_80241AB4) = SCRIPT({ - match STORY_PROGRESS { + match SI_STORY_PROGRESS { < STORY_CH3_TUBBA_CHASED_MARIO_IN_FOYER {} < STORY_CH3_DEFEATED_TUBBA_BLUBBA {} < STORY_CH3_BEGAN_PEACH_MISSION {} @@ -214,7 +214,7 @@ Script N(interact_80241AB4) = SCRIPT({ }); Script N(interact_80241D88) = SCRIPT({ - match STORY_PROGRESS { + match SI_STORY_PROGRESS { < STORY_CH3_TUBBA_CHASED_MARIO_IN_FOYER {} < STORY_CH3_DEFEATED_TUBBA_BLUBBA {} < STORY_CH3_BEGAN_PEACH_MISSION {} @@ -228,7 +228,7 @@ Script N(interact_80241D88) = SCRIPT({ }); Script N(interact_80241E28) = SCRIPT({ - match STORY_PROGRESS { + match SI_STORY_PROGRESS { < STORY_CH3_TUBBA_CHASED_MARIO_IN_FOYER { if (SI_AREA_FLAG(8) == 0) { SpeakToPlayer(NPC_SELF, NPC_ANIM(boo, Palette_01, Anim_4), NPC_ANIM(boo, Palette_01, Anim_1), 0, MESSAGE_ID(0x0E, @@ -260,7 +260,7 @@ Script N(interact_80241F88) = SCRIPT({ }); Script N(init_80241FB8) = SCRIPT({ - if (STORY_PROGRESS < STORY_CH3_SAW_TUBBA_EAT_BOO) { + if (SI_STORY_PROGRESS < STORY_CH3_SAW_TUBBA_EAT_BOO) { BindNpcIdle(NPC_SELF, N(idle_80241784)); } BindNpcInteract(NPC_SELF, N(interact_80241794)); @@ -272,7 +272,7 @@ Script N(init_80242008) = SCRIPT({ Script N(init_8024202C) = SCRIPT({ BindNpcInteract(NPC_SELF, N(interact_80241AB4)); - match STORY_PROGRESS { + match SI_STORY_PROGRESS { < STORY_CH3_SAW_TUBBA_EAT_BOO { SetNpcFlagBits(NPC_SELF, NPC_FLAG_100, TRUE); } @@ -295,7 +295,7 @@ Script N(init_8024202C) = SCRIPT({ Script N(init_8024212C) = SCRIPT({ BindNpcInteract(NPC_SELF, N(interact_80241D88)); - match STORY_PROGRESS { + match SI_STORY_PROGRESS { < STORY_CH3_SAW_TUBBA_EAT_BOO { RemoveNpc(NPC_SELF); } @@ -315,7 +315,7 @@ Script N(init_8024212C) = SCRIPT({ }); Script N(init_802421EC) = SCRIPT({ - if (STORY_PROGRESS < STORY_CH3_SAW_TUBBA_EAT_BOO) { + if (SI_STORY_PROGRESS < STORY_CH3_SAW_TUBBA_EAT_BOO) { BindNpcIdle(NPC_SELF, N(idle_80241784)); } BindNpcInteract(NPC_SELF, N(interact_80241E28)); @@ -747,7 +747,7 @@ Script N(80242C50) = SCRIPT({ }); Script N(802441FC) = SCRIPT({ - if (STORY_PROGRESS < STORY_CH3_SAW_TUBBA_EAT_BOO) { + if (SI_STORY_PROGRESS < STORY_CH3_SAW_TUBBA_EAT_BOO) { SetNpcPos(NPC_BOO2, 330, 184, 240); loop { SI_VAR(10) = 0; @@ -767,13 +767,13 @@ Script N(802441FC) = SCRIPT({ BindNpcInteract(NPC_BOO0, N(interact_802418F4)); BindNpcInteract(NPC_BOO1, N(interact_80241A84)); BindNpcInteract(NPC_BOO4, N(interact_80241F88)); - STORY_PROGRESS = STORY_CH3_SAW_TUBBA_EAT_BOO; + SI_STORY_PROGRESS = STORY_CH3_SAW_TUBBA_EAT_BOO; spawn N(80241360); } }); Script N(init_80244358) = SCRIPT({ - if (STORY_PROGRESS >= STORY_CH3_SAW_TUBBA_EAT_BOO) { + if (SI_STORY_PROGRESS >= STORY_CH3_SAW_TUBBA_EAT_BOO) { RemoveNpc(NPC_SELF); } }); diff --git a/src/world/area_arn/arn_05/header.c b/src/world/area_arn/arn_05/header.c index 4d53f84db1..37398b823d 100644 --- a/src/world/area_arn/arn_05/header.c +++ b/src/world/area_arn/arn_05/header.c @@ -15,7 +15,7 @@ MapConfig N(config) = { }; Script N(80241360) = SCRIPT({ - match STORY_PROGRESS { + match SI_STORY_PROGRESS { < STORY_CH3_SAW_TUBBA_EAT_BOO { SetMusicTrack(0, SONG_GUSTY_GULCH, 0, 8); } diff --git a/src/world/area_arn/arn_07/BECDF0.c b/src/world/area_arn/arn_07/BECDF0.c index 1a5e517e9e..2210f9205e 100644 --- a/src/world/area_arn/arn_07/BECDF0.c +++ b/src/world/area_arn/arn_07/BECDF0.c @@ -282,7 +282,7 @@ Script N(80242048) = SCRIPT({ N(func_802405BC_BED3AC)(3); PlaySoundAtPlayer(312, 0); DisablePlayerInput(TRUE); - STORY_PROGRESS = STORY_CH3_STAR_SPIRIT_RESCUED; + SI_STORY_PROGRESS = STORY_CH3_STAR_SPIRIT_RESCUED; GotoMapSpecial("kmr_23", 2, 14); sleep 100; }); @@ -348,7 +348,7 @@ Script N(80242498) = SCRIPT({ N(func_802405BC_BED3AC)(3); PlaySoundAtPlayer(312, 0); DisablePlayerInput(TRUE); - STORY_PROGRESS = STORY_CH3_STAR_SPIRIT_RESCUED; + SI_STORY_PROGRESS = STORY_CH3_STAR_SPIRIT_RESCUED; GotoMapSpecial("kmr_23", 2, 14); sleep 100; }); @@ -510,7 +510,7 @@ Script N(80242A30) = SCRIPT({ Script N(802433C8) = SCRIPT({ bind N(exitWalk_80242978) TRIGGER_FLOOR_ABOVE 5; bind N(exitWalk_802429D4) TRIGGER_FLOOR_ABOVE 1; - if (STORY_PROGRESS < STORY_CH3_UNLOCKED_WINDY_MILL) { + if (SI_STORY_PROGRESS < STORY_CH3_UNLOCKED_WINDY_MILL) { bind_padlock N(802439B0) TRIGGER_WALL_PRESS_A entity(0) N(itemList_80242040); } else { bind N(exitSingleDoor_802428D4) TRIGGER_WALL_PRESS_A 10; @@ -521,7 +521,7 @@ Script N(enterWalk_8024346C) = SCRIPT({ GetEntryID(SI_VAR(0)); match SI_VAR(0) { == 0 { - if (STORY_PROGRESS == STORY_CH3_HEART_ESCAPED_WINDY_MILL) { + if (SI_STORY_PROGRESS == STORY_CH3_HEART_ESCAPED_WINDY_MILL) { await N(80242A30); spawn N(802433C8); } else { @@ -549,14 +549,14 @@ Script N(enterWalk_8024346C) = SCRIPT({ }); Script N(main) = SCRIPT({ - WORLD_LOCATION = LOCATION_GUSTY_GULCH; + SI_WORLD_LOCATION = LOCATION_GUSTY_GULCH; SetSpriteShading(-1); SetCamPerspective(0, 3, 25, 16, 4096); SetCamBGColor(0, 0, 0, 0); SetCamLeadPlayer(0, 0); SetCamEnabled(0, 1); SI_SAVE_FLAG(1977) = 1; - match STORY_PROGRESS { + match SI_STORY_PROGRESS { < STORY_CH3_TUBBA_CHASED_MARIO_IN_FOYER { MakeNpcs(0, N(npcGroupList_802478B8)); } @@ -570,7 +570,7 @@ Script N(main) = SCRIPT({ } } await N(makeEntities); - if (STORY_PROGRESS == STORY_CH3_DEFEATED_TUBBA_BLUBBA) { + if (SI_STORY_PROGRESS == STORY_CH3_DEFEATED_TUBBA_BLUBBA) { spawn N(80242498); } spawn N(enterWalk_8024346C); diff --git a/src/world/area_arn/arn_07/events.c b/src/world/area_arn/arn_07/events.c index 191b812cb2..3824209fca 100644 --- a/src/world/area_arn/arn_07/events.c +++ b/src/world/area_arn/arn_07/events.c @@ -64,7 +64,7 @@ Script N(802439B0) = SCRIPT({ FindKeyItem(31, SI_VAR(0)); RemoveKeyItemAt(SI_VAR(0)); CloseChoicePopup(); - STORY_PROGRESS = STORY_CH3_UNLOCKED_WINDY_MILL; + SI_STORY_PROGRESS = STORY_CH3_UNLOCKED_WINDY_MILL; N(GetEntityPosition)(SI_MAP_VAR(0), SI_VAR(0), SI_VAR(1), SI_VAR(2)); PlaySoundAt(0x269, 0, SI_VAR(0), SI_VAR(1), SI_VAR(2)); SI_VAR(0) = SI_MAP_VAR(0); @@ -78,7 +78,7 @@ Script N(80243B28) = SCRIPT({ }); Script N(makeEntities) = SCRIPT({ - if (STORY_PROGRESS < STORY_CH3_UNLOCKED_WINDY_MILL) { + if (SI_STORY_PROGRESS < STORY_CH3_UNLOCKED_WINDY_MILL) { MakeEntity(0x802BCD68, 10, 30, -155, 0, MAKE_ENTITY_END); AssignScript(N(80243B28)); SI_MAP_VAR(0) = SI_VAR(0); @@ -265,7 +265,7 @@ Script N(80243FE8) = SCRIPT({ kill SI_VAR(10); SetNpcPos(NPC_SELF, 0, -1000, 0); EnableNpcShadow(NPC_SELF, FALSE); - STORY_PROGRESS = STORY_CH3_DEFEATED_TUBBA_BLUBBA; + SI_STORY_PROGRESS = STORY_CH3_DEFEATED_TUBBA_BLUBBA; SetMusicTrack(0, SONG_CHEERFUL_BOOS_MANSION, 0, 8); GetCurrentPartnerID(SI_VAR(6)); if (SI_VAR(6) == 9) { @@ -466,7 +466,7 @@ Script N(defeat_80244FB8) = SCRIPT({ }); Script N(init_80245058) = SCRIPT({ - if (STORY_PROGRESS != STORY_CH3_HEART_ESCAPED_WINDY_MILL) { + if (SI_STORY_PROGRESS != STORY_CH3_HEART_ESCAPED_WINDY_MILL) { RemoveNpc(NPC_SELF); } }); @@ -475,7 +475,7 @@ Script N(init_80245090) = SCRIPT({ SetSelfVar(0, 0); BindNpcIdle(NPC_SELF, N(idle_80244C54)); BindNpcDefeat(NPC_SELF, N(defeat_80244FB8)); - if (STORY_PROGRESS != STORY_CH3_HEART_ESCAPED_WINDY_MILL) { + if (SI_STORY_PROGRESS != STORY_CH3_HEART_ESCAPED_WINDY_MILL) { RemoveNpc(NPC_SELF); } }); @@ -483,19 +483,19 @@ Script N(init_80245090) = SCRIPT({ Script N(init_80245104) = SCRIPT({ SetSelfVar(0, 0); BindNpcIdle(NPC_SELF, N(idle_80244CC8)); - if (STORY_PROGRESS != STORY_CH3_HEART_ESCAPED_WINDY_MILL) { + if (SI_STORY_PROGRESS != STORY_CH3_HEART_ESCAPED_WINDY_MILL) { RemoveNpc(NPC_SELF); } }); Script N(init_80245164) = SCRIPT({ - if (STORY_PROGRESS != STORY_CH3_HEART_ESCAPED_WINDY_MILL) { + if (SI_STORY_PROGRESS != STORY_CH3_HEART_ESCAPED_WINDY_MILL) { RemoveNpc(NPC_SELF); } }); Script N(init_8024519C) = SCRIPT({ - if (STORY_PROGRESS != STORY_CH3_HEART_ESCAPED_WINDY_MILL) { + if (SI_STORY_PROGRESS != STORY_CH3_HEART_ESCAPED_WINDY_MILL) { RemoveNpc(NPC_SELF); } }); @@ -672,7 +672,7 @@ Script N(80245304) = SCRIPT({ ResetCam(0, 3); sleep 20; SetPlayerAnimation(ANIM_10002); - STORY_PROGRESS = STORY_CH3_STAR_SPRIT_DEPARTED; + SI_STORY_PROGRESS = STORY_CH3_STAR_SPRIT_DEPARTED; spawn N(80241F10); EnablePartnerAI(); DisablePlayerInput(FALSE); @@ -995,8 +995,8 @@ StaticNpc N(npcGroup_80246E7C) = { }; Script N(init_8024706C) = SCRIPT({ - if (STORY_PROGRESS >= STORY_CH3_TUBBA_CHASED_MARIO_IN_FOYER) { - if (STORY_PROGRESS < STORY_CH3_STAR_SPIRIT_RESCUED) { + if (SI_STORY_PROGRESS >= STORY_CH3_TUBBA_CHASED_MARIO_IN_FOYER) { + if (SI_STORY_PROGRESS < STORY_CH3_STAR_SPIRIT_RESCUED) { RemoveNpc(NPC_SELF); } } diff --git a/src/world/area_arn/arn_07/header.c b/src/world/area_arn/arn_07/header.c index cea49c2ef0..edee6d76ec 100644 --- a/src/world/area_arn/arn_07/header.c +++ b/src/world/area_arn/arn_07/header.c @@ -17,7 +17,7 @@ MapConfig N(config) = { }; Script N(80241F10) = SCRIPT({ - match STORY_PROGRESS { + match SI_STORY_PROGRESS { < STORY_CH3_TUBBA_WOKE_UP { SetMusicTrack(0, SONG_GUSTY_GULCH, 0, 8); PlayAmbientSounds(AMBIENT_WIND); diff --git a/src/world/area_arn/arn_08/events.c b/src/world/area_arn/arn_08/events.c index 8eb7a7a93d..c5431e8905 100644 --- a/src/world/area_arn/arn_08/events.c +++ b/src/world/area_arn/arn_08/events.c @@ -50,7 +50,7 @@ Script N(8024049C) = SCRIPT({ == 1 { DisablePlayerInput(TRUE); DisablePlayerPhysics(TRUE); - if (STORY_PROGRESS == STORY_CH3_HEART_ESCAPED_WELL) { + if (SI_STORY_PROGRESS == STORY_CH3_HEART_ESCAPED_WELL) { SetPlayerPos(1000, 1000, 0); SetNpcPos(NPC_PARTNER, 1000, 1000, 0); RotateModel(0, 80, 0, -1, 0); @@ -85,7 +85,7 @@ Script N(8024049C) = SCRIPT({ sleep 20; SetPlayerPos(0, 0, 0); SetNpcPos(NPC_PARTNER, 0, 0, 0); - STORY_PROGRESS = STORY_CH3_HEART_ESCAPED_WINDY_MILL; + SI_STORY_PROGRESS = STORY_CH3_HEART_ESCAPED_WINDY_MILL; } DisablePlayerPhysics(FALSE); SetPlayerJumpscale(2.0); @@ -97,14 +97,14 @@ Script N(8024049C) = SCRIPT({ }); Script N(main) = SCRIPT({ - WORLD_LOCATION = LOCATION_WINDY_MILL; + SI_WORLD_LOCATION = LOCATION_WINDY_MILL; SetSpriteShading(-1); SetCamPerspective(0, 3, 25, 16, 4096); SetCamBGColor(0, 0, 0, 0); SetCamLeadPlayer(0, 0); SetCamEnabled(0, 1); SI_SAVE_FLAG(1979) = 1; - if (STORY_PROGRESS >= STORY_CH4_FRYING_PAN_STOLEN) { + if (SI_STORY_PROGRESS >= STORY_CH4_FRYING_PAN_STOLEN) { SI_SAVE_FLAG(1016) = 0; SI_SAVE_FLAG(1017) = 0; SI_SAVE_FLAG(1018) = 0; @@ -128,7 +128,7 @@ static s32 N(pad_A6C) = { Script N(80240A70) = SCRIPT({ loop { - if (STORY_PROGRESS != STORY_CH3_HEART_ESCAPED_WELL) { + if (SI_STORY_PROGRESS != STORY_CH3_HEART_ESCAPED_WELL) { break loop; } sleep 1; @@ -138,8 +138,8 @@ Script N(80240A70) = SCRIPT({ DisablePlayerPhysics(TRUE); N(func_80240000_BF47A0)(); SI_AREA_FLAG(1) = 1; - if (STORY_PROGRESS < STORY_CH3_WENT_DOWN_THE_WELL) { - STORY_PROGRESS = STORY_CH3_WENT_DOWN_THE_WELL; + if (SI_STORY_PROGRESS < STORY_CH3_WENT_DOWN_THE_WELL) { + SI_STORY_PROGRESS = STORY_CH3_WENT_DOWN_THE_WELL; } GotoMap("arn_09", 1); sleep 100; @@ -305,7 +305,7 @@ Script N(idle_80241278) = SCRIPT({ }); Script N(init_80241288) = SCRIPT({ - if (STORY_PROGRESS != STORY_CH3_HEART_ESCAPED_WELL) { + if (SI_STORY_PROGRESS != STORY_CH3_HEART_ESCAPED_WELL) { SetNpcPos(NPC_SELF, 0, -1000, 0); } else { BindNpcIdle(NPC_SELF, N(idle_80241278)); @@ -313,7 +313,7 @@ Script N(init_80241288) = SCRIPT({ }); Script N(interact_802412E8) = SCRIPT({ - match STORY_PROGRESS { + match SI_STORY_PROGRESS { < STORY_CH5_WHALE_MOUTH_OPEN { SpeakToPlayer(NPC_SELF, NPC_ANIM(yakkey, Palette_00, Anim_2), NPC_ANIM(yakkey, Palette_00, Anim_1), 0, MESSAGE_ID(0x0E, 0x00BA)); } @@ -333,7 +333,7 @@ Script N(interact_802412E8) = SCRIPT({ }); Script N(init_802413E8) = SCRIPT({ - if (STORY_PROGRESS < STORY_CH4_FRYING_PAN_STOLEN) { + if (SI_STORY_PROGRESS < STORY_CH4_FRYING_PAN_STOLEN) { SetNpcPos(NPC_SELF, 0, -1000, 0); } else { BindNpcInteract(NPC_SELF, N(interact_802412E8)); @@ -412,7 +412,7 @@ static s32 N(pad_184C) = { }; Script N(makeEntities) = SCRIPT({ - if (STORY_PROGRESS < STORY_CH3_WENT_DOWN_THE_WELL) { + if (SI_STORY_PROGRESS < STORY_CH3_WENT_DOWN_THE_WELL) { MakeEntity(0x802BCE84, 0, 30, 0, 0, MAKE_ENTITY_END); } }); diff --git a/src/world/area_arn/arn_08/header.c b/src/world/area_arn/arn_08/header.c index e789b1527b..be1ce59af7 100644 --- a/src/world/area_arn/arn_08/header.c +++ b/src/world/area_arn/arn_08/header.c @@ -15,7 +15,7 @@ MapConfig N(config) = { }; Script N(80240300) = SCRIPT({ - match STORY_PROGRESS { + match SI_STORY_PROGRESS { < STORY_CH3_HEART_FLED_FIRST_TUNNEL { SetMusicTrack(0, SONG_TUBBA_ESCAPE, 0, 8); } diff --git a/src/world/area_arn/arn_09/events.c b/src/world/area_arn/arn_09/events.c index a8eeaca279..43fe44a135 100644 --- a/src/world/area_arn/arn_09/events.c +++ b/src/world/area_arn/arn_09/events.c @@ -38,7 +38,7 @@ Script N(80240220) = SCRIPT({ }); Script N(main) = SCRIPT({ - WORLD_LOCATION = LOCATION_WINDY_MILL; + SI_WORLD_LOCATION = LOCATION_WINDY_MILL; SetSpriteShading(524288); SetCamPerspective(0, 3, 25, 16, 4096); SetCamBGColor(0, 0, 0, 0); @@ -130,11 +130,11 @@ Script N(idle_802405FC) = SCRIPT({ PlaySoundAtNpc(NPC_SELF, 0x20C8, 0); NpcJump0(NPC_SELF, 0, 200, 0, 15); SetNpcPos(NPC_SELF, 0, -1000, 0); - STORY_PROGRESS = STORY_CH3_HEART_ESCAPED_WELL; + SI_STORY_PROGRESS = STORY_CH3_HEART_ESCAPED_WELL; }); Script N(init_80240730) = SCRIPT({ - if (STORY_PROGRESS != STORY_CH3_HEART_FLED_SECOND_TUNNEL) { + if (SI_STORY_PROGRESS != STORY_CH3_HEART_FLED_SECOND_TUNNEL) { RemoveNpc(NPC_SELF); } else { BindNpcIdle(NPC_SELF, N(idle_802405FC)); diff --git a/src/world/area_arn/arn_09/header.c b/src/world/area_arn/arn_09/header.c index 54c64fcde0..fda6312302 100644 --- a/src/world/area_arn/arn_09/header.c +++ b/src/world/area_arn/arn_09/header.c @@ -14,7 +14,7 @@ MapConfig N(config) = { }; Script N(802400A0) = SCRIPT({ - match STORY_PROGRESS { + match SI_STORY_PROGRESS { < STORY_CH3_HEART_FLED_FIRST_TUNNEL { SetMusicTrack(0, SONG_TUBBA_ESCAPE, 0, 8); } diff --git a/src/world/area_arn/arn_10/events.c b/src/world/area_arn/arn_10/events.c index 93959330af..5fc17ee392 100644 --- a/src/world/area_arn/arn_10/events.c +++ b/src/world/area_arn/arn_10/events.c @@ -52,7 +52,7 @@ Script N(enterSingleDoor_80240290) = SCRIPT({ }); Script N(main) = SCRIPT({ - WORLD_LOCATION = LOCATION_WINDY_MILL; + SI_WORLD_LOCATION = LOCATION_WINDY_MILL; SetSpriteShading(524289); SetCamPerspective(0, 3, 25, 16, 4096); SetCamBGColor(0, 0, 0, 0); @@ -134,7 +134,7 @@ Script N(idle_802404F8) = SCRIPT({ NpcJump0(NPC_SELF, SI_VAR(0), 0, SI_VAR(2), 12); EnableNpcShadow(NPC_SELF, FALSE); SetNpcPos(NPC_SELF, 0, -1000, 0); - STORY_PROGRESS = STORY_CH3_HEART_FLED_SECOND_TUNNEL; + SI_STORY_PROGRESS = STORY_CH3_HEART_FLED_SECOND_TUNNEL; }); Script N(defeat_802406F4) = SCRIPT({ @@ -144,13 +144,13 @@ Script N(defeat_802406F4) = SCRIPT({ Script N(init_80240720) = SCRIPT({ BindNpcIdle(NPC_SELF, N(idle_802404F8)); - if (STORY_PROGRESS != STORY_UNUSED_FFFFFFEC) { + if (SI_STORY_PROGRESS != STORY_UNUSED_FFFFFFEC) { RemoveNpc(NPC_SELF); } }); Script N(init_8024076C) = SCRIPT({ - if (STORY_PROGRESS < STORY_CH4_FRYING_PAN_STOLEN) { + if (SI_STORY_PROGRESS < STORY_CH4_FRYING_PAN_STOLEN) { if (SI_SAVE_FLAG(1016) == 1) { RemoveNpc(NPC_SELF); return; diff --git a/src/world/area_arn/arn_10/header.c b/src/world/area_arn/arn_10/header.c index 08ab250569..d8e564a85d 100644 --- a/src/world/area_arn/arn_10/header.c +++ b/src/world/area_arn/arn_10/header.c @@ -14,7 +14,7 @@ MapConfig N(config) = { }; Script N(80240060) = SCRIPT({ - match STORY_PROGRESS { + match SI_STORY_PROGRESS { < STORY_CH3_HEART_FLED_FIRST_TUNNEL { SetMusicTrack(0, SONG_TUBBA_ESCAPE, 0, 8); } diff --git a/src/world/area_arn/arn_11/events.c b/src/world/area_arn/arn_11/events.c index 9a1e28f210..b3e1a482cd 100644 --- a/src/world/area_arn/arn_11/events.c +++ b/src/world/area_arn/arn_11/events.c @@ -74,7 +74,7 @@ Script N(enterSingleDoor_802404F8) = SCRIPT({ SI_VAR(3) = -1; await EnterSingleDoor; spawn N(802404CC); - if (STORY_PROGRESS < STORY_CH3_HEART_FLED_FIRST_TUNNEL) { + if (SI_STORY_PROGRESS < STORY_CH3_HEART_FLED_FIRST_TUNNEL) { sleep 10; spawn N(802400F0); spawn N(802401BC); @@ -84,7 +84,7 @@ Script N(enterSingleDoor_802404F8) = SCRIPT({ }); Script N(main) = SCRIPT({ - WORLD_LOCATION = LOCATION_WINDY_MILL; + SI_WORLD_LOCATION = LOCATION_WINDY_MILL; SetSpriteShading(524290); SetCamPerspective(0, 3, 25, 16, 4096); SetCamBGColor(0, 0, 0, 0); @@ -234,11 +234,11 @@ Script N(defeat_802409DC) = SCRIPT({ PanToTarget(0, 0, 1); WaitForCam(0, 1.0); PanToTarget(0, 0, 0); - STORY_PROGRESS = STORY_CH3_HEART_FLED_FIRST_TUNNEL; + SI_STORY_PROGRESS = STORY_CH3_HEART_FLED_FIRST_TUNNEL; }); Script N(init_80240E70) = SCRIPT({ - if (STORY_PROGRESS >= STORY_CH3_HEART_FLED_FIRST_TUNNEL) { + if (SI_STORY_PROGRESS >= STORY_CH3_HEART_FLED_FIRST_TUNNEL) { RemoveNpc(NPC_SELF); } else { SetSelfVar(0, 0); diff --git a/src/world/area_arn/arn_11/header.c b/src/world/area_arn/arn_11/header.c index 69c72ab984..cd339d4c3b 100644 --- a/src/world/area_arn/arn_11/header.c +++ b/src/world/area_arn/arn_11/header.c @@ -13,7 +13,7 @@ MapConfig N(config) = { }; Script N(80240050) = SCRIPT({ - match STORY_PROGRESS { + match SI_STORY_PROGRESS { < STORY_CH3_WENT_DOWN_THE_WELL { SetMusicTrack(0, SONG_TUBBA_ESCAPE, 0, 8); } diff --git a/src/world/area_arn/arn_12/events.c b/src/world/area_arn/arn_12/events.c index 52ffaed548..99e3568f2f 100644 --- a/src/world/area_arn/arn_12/events.c +++ b/src/world/area_arn/arn_12/events.c @@ -52,7 +52,7 @@ Script N(enterSingleDoor_80240290) = SCRIPT({ }); Script N(main) = SCRIPT({ - WORLD_LOCATION = LOCATION_WINDY_MILL; + SI_WORLD_LOCATION = LOCATION_WINDY_MILL; SetSpriteShading(524291); SetCamPerspective(0, 3, 25, 16, 4096); SetCamBGColor(0, 0, 0, 0); @@ -133,7 +133,7 @@ Script N(idle_802404E8) = SCRIPT({ NpcJump0(NPC_SELF, SI_VAR(0), 0, SI_VAR(2), 12); EnableNpcShadow(NPC_SELF, FALSE); SetNpcPos(NPC_SELF, 0, -1000, 0); - STORY_PROGRESS = STORY_UNUSED_FFFFFFEC; + SI_STORY_PROGRESS = STORY_UNUSED_FFFFFFEC; }); Script N(defeat_802406E4) = SCRIPT({ @@ -143,13 +143,13 @@ Script N(defeat_802406E4) = SCRIPT({ Script N(init_80240710) = SCRIPT({ BindNpcIdle(NPC_SELF, N(idle_802404E8)); - if (STORY_PROGRESS != STORY_UNUSED_FFFFFFEB) { + if (SI_STORY_PROGRESS != STORY_UNUSED_FFFFFFEB) { RemoveNpc(NPC_SELF); } }); Script N(init_8024075C) = SCRIPT({ - if (STORY_PROGRESS < STORY_CH4_FRYING_PAN_STOLEN) { + if (SI_STORY_PROGRESS < STORY_CH4_FRYING_PAN_STOLEN) { if (SI_SAVE_FLAG(1017) == 1) { RemoveNpc(NPC_SELF); return; diff --git a/src/world/area_arn/arn_12/header.c b/src/world/area_arn/arn_12/header.c index 7270c17a34..a26bbfd663 100644 --- a/src/world/area_arn/arn_12/header.c +++ b/src/world/area_arn/arn_12/header.c @@ -14,7 +14,7 @@ MapConfig N(config) = { }; Script N(80240060) = SCRIPT({ - match STORY_PROGRESS { + match SI_STORY_PROGRESS { < STORY_CH3_HEART_FLED_FIRST_TUNNEL { SetMusicTrack(0, SONG_TUBBA_ESCAPE, 0, 8); } diff --git a/src/world/area_arn/arn_13/events.c b/src/world/area_arn/arn_13/events.c index 799bee657e..b087e4ffb0 100644 --- a/src/world/area_arn/arn_13/events.c +++ b/src/world/area_arn/arn_13/events.c @@ -52,7 +52,7 @@ Script N(enterSingleDoor_80240290) = SCRIPT({ }); Script N(main) = SCRIPT({ - WORLD_LOCATION = LOCATION_WINDY_MILL; + SI_WORLD_LOCATION = LOCATION_WINDY_MILL; SetSpriteShading(524292); SetCamPerspective(0, 3, 25, 16, 4096); SetCamBGColor(0, 0, 0, 0); @@ -134,7 +134,7 @@ Script N(idle_802404F8) = SCRIPT({ NpcJump0(NPC_SELF, SI_VAR(0), 0, SI_VAR(2), 12); EnableNpcShadow(NPC_SELF, FALSE); SetNpcPos(NPC_SELF, 0, -1000, 0); - STORY_PROGRESS = STORY_CH3_HEART_FLED_SECOND_TUNNEL; + SI_STORY_PROGRESS = STORY_CH3_HEART_FLED_SECOND_TUNNEL; }); Script N(defeat_802406F4) = SCRIPT({ @@ -144,13 +144,13 @@ Script N(defeat_802406F4) = SCRIPT({ Script N(init_80240720) = SCRIPT({ BindNpcIdle(NPC_SELF, N(idle_802404F8)); - if (STORY_PROGRESS != STORY_CH3_HEART_FLED_FIRST_TUNNEL) { + if (SI_STORY_PROGRESS != STORY_CH3_HEART_FLED_FIRST_TUNNEL) { RemoveNpc(NPC_SELF); } }); Script N(init_8024076C) = SCRIPT({ - if (STORY_PROGRESS < STORY_CH4_FRYING_PAN_STOLEN) { + if (SI_STORY_PROGRESS < STORY_CH4_FRYING_PAN_STOLEN) { if (SI_SAVE_FLAG(1018) == 1) { RemoveNpc(NPC_SELF); return; diff --git a/src/world/area_arn/arn_13/header.c b/src/world/area_arn/arn_13/header.c index 4f08d021ce..7e29fc2a01 100644 --- a/src/world/area_arn/arn_13/header.c +++ b/src/world/area_arn/arn_13/header.c @@ -14,7 +14,7 @@ MapConfig N(config) = { }; Script N(80240060) = SCRIPT({ - match STORY_PROGRESS { + match SI_STORY_PROGRESS { < STORY_CH3_HEART_FLED_FIRST_TUNNEL { SetMusicTrack(0, SONG_TUBBA_ESCAPE, 0, 8); } diff --git a/src/world/area_dgb/dgb_00/BFA0A0.c b/src/world/area_dgb/dgb_00/BFA0A0.c index f9dd29fb89..0a7a9567b6 100644 --- a/src/world/area_dgb/dgb_00/BFA0A0.c +++ b/src/world/area_dgb/dgb_00/BFA0A0.c @@ -22,7 +22,7 @@ MapConfig N(config) = { }; Script N(80240110) = SCRIPT({ - match STORY_PROGRESS { + match SI_STORY_PROGRESS { < STORY_CH3_TUBBA_WOKE_UP { SetMusicTrack(0, SONG_GUSTY_GULCH, 0, 8); } @@ -57,7 +57,7 @@ Script N(exitDoubleDoor_8024021C) = SCRIPT({ Script N(802402D0) = SCRIPT({ bind N(exitWalk_802401C0) TRIGGER_FLOOR_ABOVE 15; - match STORY_PROGRESS { + match SI_STORY_PROGRESS { < STORY_CH3_TUBBA_SMASHED_THE_BRIDGES { bind N(exitDoubleDoor_8024021C) TRIGGER_WALL_PRESS_A 18; } @@ -86,8 +86,8 @@ Script N(enterDoubleDoor_8024038C) = SCRIPT({ sleep 1; } == 1 { - if (STORY_PROGRESS >= STORY_CH3_TUBBA_SMASHED_THE_BRIDGES) { - if (STORY_PROGRESS < STORY_CH3_ESCAPED_TUBBAS_MANOR) { + if (SI_STORY_PROGRESS >= STORY_CH3_TUBBA_SMASHED_THE_BRIDGES) { + if (SI_STORY_PROGRESS < STORY_CH3_ESCAPED_TUBBAS_MANOR) { spawn N(802402D0); spawn { await N(8024103C); @@ -110,7 +110,7 @@ Script N(enterDoubleDoor_8024038C) = SCRIPT({ }); Script N(main) = SCRIPT({ - WORLD_LOCATION = LOCATION_TUBBAS_MANOR; + SI_WORLD_LOCATION = LOCATION_TUBBAS_MANOR; SI_SAVE_FLAG(1978) = 1; SetSpriteShading(-1); SetCamPerspective(0, 3, 25, 16, 4096); diff --git a/src/world/area_dgb/dgb_00/BFA100.c b/src/world/area_dgb/dgb_00/BFA100.c index 1615442bc1..8ac3d67090 100644 --- a/src/world/area_dgb/dgb_00/BFA100.c +++ b/src/world/area_dgb/dgb_00/BFA100.c @@ -319,7 +319,7 @@ Script N(802413F4) = SCRIPT({ SpeakToPlayer(NPC_BOO0, NPC_ANIM(boo, Palette_01, Anim_6), NPC_ANIM(boo, Palette_01, Anim_6), 5, MESSAGE_ID(0x0E, 0x00E8)); SetNpcAnimation(NPC_BOO0, NPC_ANIM(boo, Palette_01, Anim_6)); spawn N(80240F50); - STORY_PROGRESS = STORY_CH3_ESCAPED_TUBBAS_MANOR; + SI_STORY_PROGRESS = STORY_CH3_ESCAPED_TUBBAS_MANOR; DisablePlayerInput(FALSE); }); diff --git a/src/world/area_dgb/dgb_01/BFD9A0.c b/src/world/area_dgb/dgb_01/BFD9A0.c index 1fb758a314..7c4e314b28 100644 --- a/src/world/area_dgb/dgb_01/BFD9A0.c +++ b/src/world/area_dgb/dgb_01/BFD9A0.c @@ -21,7 +21,7 @@ MapConfig N(config) = { }; Script N(802434A0) = SCRIPT({ - match STORY_PROGRESS { + match SI_STORY_PROGRESS { < STORY_CH3_TUBBA_WOKE_UP { SetMusicTrack(0, SONG_TUBBAS_MANOR, 0, 8); } @@ -143,7 +143,7 @@ Script N(enterDoubleDoor_80243A3C) = SCRIPT({ == 0 { if (SI_SAVE_FLAG(1041) == 0) { SI_SAVE_FLAG(1041) = 1; - STORY_PROGRESS = STORY_CH3_ARRIVED_AT_TUBBAS_MANOR; + SI_STORY_PROGRESS = STORY_CH3_ARRIVED_AT_TUBBAS_MANOR; } SI_VAR(2) = 54; SI_VAR(3) = 57; @@ -188,7 +188,7 @@ s32 N(itemList_80243C40)[] = { }; Script N(main) = SCRIPT({ - WORLD_LOCATION = LOCATION_TUBBAS_MANOR; + SI_WORLD_LOCATION = LOCATION_TUBBAS_MANOR; SetSpriteShading(-1); SetCamPerspective(0, 3, 25, 16, 4096); SetCamBGColor(0, 0, 0, 0); @@ -209,7 +209,7 @@ Script N(main) = SCRIPT({ } else { bind N(exitDoubleDoor_802436B8) TRIGGER_WALL_PRESS_A 20; } - match STORY_PROGRESS { + match SI_STORY_PROGRESS { < STORY_CH3_TUBBA_WOKE_UP { MakeNpcs(1, N(npcGroupList_80246E50)); } @@ -376,7 +376,7 @@ Script N(80243EF0) = SCRIPT({ SetPanTarget(0, SI_VAR(0), SI_VAR(1), SI_VAR(2)); WaitForCam(0, 1.0); PanToTarget(0, 0, 0); - STORY_PROGRESS = STORY_CH3_TUBBA_SMASHED_THE_BRIDGES; + SI_STORY_PROGRESS = STORY_CH3_TUBBA_SMASHED_THE_BRIDGES; SetGroupEnabled(210, 1); DeleteAnimatedModel(0); spawn { @@ -404,7 +404,7 @@ Script N(80243EF0) = SCRIPT({ }); Script N(802449C4) = SCRIPT({ - match STORY_PROGRESS { + match SI_STORY_PROGRESS { < STORY_CH3_TUBBA_WOKE_UP { SetGroupEnabled(210, 0); ModifyColliderFlags(0, 50, 0x7FFFFE00); @@ -1356,7 +1356,7 @@ Script N(init_80245814) = SCRIPT({ SetNpcFlagBits(NPC_SELF, ((NPC_FLAG_4)), TRUE); return; } - if (STORY_PROGRESS >= STORY_CH3_TUBBA_CHASED_MARIO_IN_HALL) { + if (SI_STORY_PROGRESS >= STORY_CH3_TUBBA_CHASED_MARIO_IN_HALL) { SetNpcPos(NPC_SELF, 0, -1000, 0); SetNpcFlagBits(NPC_SELF, ((NPC_FLAG_4)), TRUE); return; @@ -1377,7 +1377,7 @@ Script N(init_80245814) = SCRIPT({ Script N(idle_8024598C) = SCRIPT({ AwaitPlayerApproach(0, 420, 400); SI_SAVE_VAR(203) = 1; - STORY_PROGRESS = STORY_CH3_TUBBA_CHASED_MARIO_IN_FOYER; + SI_STORY_PROGRESS = STORY_CH3_TUBBA_CHASED_MARIO_IN_FOYER; PlaySoundAtCollider(20, 455, 0); MakeLerp(0, 80, 10, 0); loop { @@ -1439,7 +1439,7 @@ Script N(init_80245CF0) = SCRIPT({ }); Script N(init_80245D80) = SCRIPT({ - SI_VAR(0) = STORY_PROGRESS; + SI_VAR(0) = SI_STORY_PROGRESS; if (SI_VAR(0) >= -29) { SetNpcFlagBits(NPC_SELF, ((NPC_FLAG_ENABLE_HIT_SCRIPT | 0x00000040)), TRUE); EnableNpcShadow(NPC_SELF, FALSE); @@ -1451,7 +1451,7 @@ Script N(init_80245D80) = SCRIPT({ }); Script N(init_80245E44) = SCRIPT({ - SI_VAR(0) = STORY_PROGRESS; + SI_VAR(0) = SI_STORY_PROGRESS; if (SI_VAR(0) >= -29) { SetNpcFlagBits(NPC_SELF, ((NPC_FLAG_ENABLE_HIT_SCRIPT | 0x00000040)), TRUE); EnableNpcShadow(NPC_SELF, FALSE); @@ -1463,7 +1463,7 @@ Script N(init_80245E44) = SCRIPT({ }); Script N(init_80245F08) = SCRIPT({ - SI_VAR(0) = STORY_PROGRESS; + SI_VAR(0) = SI_STORY_PROGRESS; if (SI_VAR(0) >= -29) { SetNpcFlagBits(NPC_SELF, ((NPC_FLAG_ENABLE_HIT_SCRIPT | 0x00000040)), TRUE); EnableNpcShadow(NPC_SELF, FALSE); @@ -1475,7 +1475,7 @@ Script N(init_80245F08) = SCRIPT({ }); Script N(init_80245FCC) = SCRIPT({ - SI_VAR(0) = STORY_PROGRESS; + SI_VAR(0) = SI_STORY_PROGRESS; if (SI_VAR(0) >= -29) { SetNpcFlagBits(NPC_SELF, ((NPC_FLAG_ENABLE_HIT_SCRIPT | 0x00000040)), TRUE); EnableNpcShadow(NPC_SELF, FALSE); diff --git a/src/world/area_dgb/dgb_02/C2EBA0.c b/src/world/area_dgb/dgb_02/C2EBA0.c index 7a9d8b1aab..55e60bf02f 100644 --- a/src/world/area_dgb/dgb_02/C2EBA0.c +++ b/src/world/area_dgb/dgb_02/C2EBA0.c @@ -27,7 +27,7 @@ MapConfig N(config) = { }; Script N(802414B0) = SCRIPT({ - match STORY_PROGRESS { + match SI_STORY_PROGRESS { < STORY_CH3_TUBBA_WOKE_UP { SetMusicTrack(0, SONG_TUBBAS_MANOR, 0, 8); } @@ -130,12 +130,12 @@ Script N(enterSingleDoor_80241820) = SCRIPT({ }); Script N(main) = SCRIPT({ - WORLD_LOCATION = LOCATION_TUBBAS_MANOR; + SI_WORLD_LOCATION = LOCATION_TUBBAS_MANOR; SetSpriteShading(-1); SetCamPerspective(0, 3, 25, 16, 4096); SetCamBGColor(0, 0, 0, 0); SetCamEnabled(0, 1); - if (STORY_PROGRESS < STORY_CH3_STAR_SPIRIT_RESCUED) { + if (SI_STORY_PROGRESS < STORY_CH3_STAR_SPIRIT_RESCUED) { MakeNpcs(1, N(npcGroupList_802425C8)); } bind N(exitDoubleDoor_80241550) TRIGGER_WALL_PRESS_A 5; diff --git a/src/world/area_dgb/dgb_03/C31730.c b/src/world/area_dgb/dgb_03/C31730.c index a924b87ea1..08e4b53812 100644 --- a/src/world/area_dgb/dgb_03/C31730.c +++ b/src/world/area_dgb/dgb_03/C31730.c @@ -31,7 +31,7 @@ MapConfig N(config) = { }; Script N(80242870) = SCRIPT({ - match STORY_PROGRESS { + match SI_STORY_PROGRESS { < STORY_CH3_TUBBA_WOKE_UP { SetMusicTrack(0, SONG_TUBBAS_MANOR, 0, 8); } @@ -175,12 +175,12 @@ s32 N(itemList_80242F28)[] = { }; Script N(main) = SCRIPT({ - WORLD_LOCATION = LOCATION_TUBBAS_MANOR; + SI_WORLD_LOCATION = LOCATION_TUBBAS_MANOR; SetSpriteShading(-1); SetCamPerspective(0, 3, 25, 16, 4096); SetCamBGColor(0, 0, 0, 0); SetCamEnabled(0, 1); - if (STORY_PROGRESS < STORY_CH3_STAR_SPIRIT_RESCUED) { + if (SI_STORY_PROGRESS < STORY_CH3_STAR_SPIRIT_RESCUED) { MakeNpcs(1, N(npcGroupList_80244988)); } await N(makeEntities); diff --git a/src/world/area_dgb/dgb_04/C36530.c b/src/world/area_dgb/dgb_04/C36530.c index 2c21d6caa0..797c570da8 100644 --- a/src/world/area_dgb/dgb_04/C36530.c +++ b/src/world/area_dgb/dgb_04/C36530.c @@ -23,7 +23,7 @@ MapConfig N(config) = { }; Script N(80243170) = SCRIPT({ - match STORY_PROGRESS { + match SI_STORY_PROGRESS { < STORY_CH3_TUBBA_WOKE_UP { SetMusicTrack(0, SONG_TUBBAS_MANOR, 0, 8); } @@ -86,13 +86,13 @@ Script N(enterSingleDoor_80243378) = SCRIPT({ }); Script N(main) = SCRIPT({ - WORLD_LOCATION = LOCATION_TUBBAS_MANOR; + SI_WORLD_LOCATION = LOCATION_TUBBAS_MANOR; SetSpriteShading(-1); SetCamPerspective(0, 3, 25, 16, 4096); SetCamBGColor(0, 0, 0, 0); SetCamLeadPlayer(0, 0); SetCamEnabled(0, 1); - if (STORY_PROGRESS < STORY_CH3_STAR_SPIRIT_RESCUED) { + if (SI_STORY_PROGRESS < STORY_CH3_STAR_SPIRIT_RESCUED) { MakeNpcs(1, N(npcGroupList_80243D18)); } await N(makeEntities); diff --git a/src/world/area_dgb/dgb_05/C3AA10.c b/src/world/area_dgb/dgb_05/C3AA10.c index 34a71d816f..62b9310b4e 100644 --- a/src/world/area_dgb/dgb_05/C3AA10.c +++ b/src/world/area_dgb/dgb_05/C3AA10.c @@ -24,7 +24,7 @@ MapConfig N(config) = { }; Script N(802414E0) = SCRIPT({ - match STORY_PROGRESS { + match SI_STORY_PROGRESS { < STORY_CH3_TUBBA_WOKE_UP { SetMusicTrack(0, SONG_TUBBAS_MANOR, 0, 8); } @@ -67,13 +67,13 @@ Script N(enterSingleDoor_80241634) = SCRIPT({ }); Script N(main) = SCRIPT({ - WORLD_LOCATION = LOCATION_TUBBAS_MANOR; + SI_WORLD_LOCATION = LOCATION_TUBBAS_MANOR; SetSpriteShading(-1); SetCamPerspective(0, 3, 25, 16, 4096); SetCamBGColor(0, 0, 0, 0); SetCamLeadPlayer(0, 0); SetCamEnabled(0, 1); - if (STORY_PROGRESS < STORY_CH3_STAR_SPIRIT_RESCUED) { + if (SI_STORY_PROGRESS < STORY_CH3_STAR_SPIRIT_RESCUED) { MakeNpcs(1, N(npcGroupList_8024230C)); } await N(makeEntities); diff --git a/src/world/area_dgb/dgb_06/C3D080.c b/src/world/area_dgb/dgb_06/C3D080.c index d91bce9a1b..1021804ea2 100644 --- a/src/world/area_dgb/dgb_06/C3D080.c +++ b/src/world/area_dgb/dgb_06/C3D080.c @@ -19,7 +19,7 @@ MapConfig N(config) = { }; Script N(80240320) = SCRIPT({ - match STORY_PROGRESS { + match SI_STORY_PROGRESS { < STORY_CH3_TUBBA_WOKE_UP { SetMusicTrack(0, SONG_TUBBAS_MANOR, 0, 8); } @@ -62,7 +62,7 @@ Script N(enterSingleDoor_80240474) = SCRIPT({ }); Script N(main) = SCRIPT({ - WORLD_LOCATION = LOCATION_TUBBAS_MANOR; + SI_WORLD_LOCATION = LOCATION_TUBBAS_MANOR; SetSpriteShading(589824); SetCamPerspective(0, 3, 25, 16, 4096); SetCamBGColor(0, 0, 0, 0); @@ -149,7 +149,7 @@ Script N(interact_8024086C) = SCRIPT({ }); Script N(init_802408FC) = SCRIPT({ - if (STORY_PROGRESS >= STORY_CH3_TUBBA_CHASED_MARIO_IN_FOYER) { + if (SI_STORY_PROGRESS >= STORY_CH3_TUBBA_CHASED_MARIO_IN_FOYER) { SetNpcPos(NPC_SELF, 0, -1000, 0); } BindNpcInteract(NPC_SELF, N(interact_8024086C)); diff --git a/src/world/area_dgb/dgb_07/C3DBF0.c b/src/world/area_dgb/dgb_07/C3DBF0.c index a0b00b5d81..51ffd1bc4f 100644 --- a/src/world/area_dgb/dgb_07/C3DBF0.c +++ b/src/world/area_dgb/dgb_07/C3DBF0.c @@ -23,7 +23,7 @@ MapConfig N(config) = { }; Script N(80241490) = SCRIPT({ - match STORY_PROGRESS { + match SI_STORY_PROGRESS { < STORY_CH3_TUBBA_WOKE_UP { SetMusicTrack(0, SONG_TUBBAS_MANOR, 0, 8); } @@ -66,13 +66,13 @@ Script N(enterSingleDoor_802415E4) = SCRIPT({ }); Script N(main) = SCRIPT({ - WORLD_LOCATION = LOCATION_TUBBAS_MANOR; + SI_WORLD_LOCATION = LOCATION_TUBBAS_MANOR; SetSpriteShading(-1); SetCamPerspective(0, 3, 25, 16, 4096); SetCamBGColor(0, 0, 0, 0); SetCamLeadPlayer(0, 0); SetCamEnabled(0, 1); - if (STORY_PROGRESS < STORY_CH3_STAR_SPIRIT_RESCUED) { + if (SI_STORY_PROGRESS < STORY_CH3_STAR_SPIRIT_RESCUED) { MakeNpcs(1, N(npcGroupList_80241E5C)); } await N(makeEntities); diff --git a/src/world/area_dgb/dgb_08/C3FDB0.c b/src/world/area_dgb/dgb_08/C3FDB0.c index 91de38601c..680593bc07 100644 --- a/src/world/area_dgb/dgb_08/C3FDB0.c +++ b/src/world/area_dgb/dgb_08/C3FDB0.c @@ -33,7 +33,7 @@ MapConfig N(config) = { }; Script N(80243CF0) = SCRIPT({ - match STORY_PROGRESS { + match SI_STORY_PROGRESS { < STORY_CH3_TUBBA_WOKE_UP { SetMusicTrack(0, SONG_TUBBAS_MANOR, 0, 8); } @@ -99,12 +99,12 @@ Script N(enterDoubleDoor_80243EF8) = SCRIPT({ }); Script N(main) = SCRIPT({ - WORLD_LOCATION = LOCATION_TUBBAS_MANOR; + SI_WORLD_LOCATION = LOCATION_TUBBAS_MANOR; SetSpriteShading(-1); SetCamPerspective(0, 3, 25, 16, 4096); SetCamBGColor(0, 0, 0, 0); SetCamEnabled(0, 1); - match STORY_PROGRESS { + match SI_STORY_PROGRESS { < STORY_CH3_TUBBA_SMASHED_THE_BRIDGES { MakeNpcs(1, N(npcGroupList_80246958)); } @@ -382,7 +382,7 @@ Script N(idle_80244A54) = SCRIPT({ sleep 1; } SI_SAVE_VAR(203) = 8; - STORY_PROGRESS = STORY_CH3_TUBBA_CHASED_MARIO_IN_HALL; + SI_STORY_PROGRESS = STORY_CH3_TUBBA_CHASED_MARIO_IN_HALL; PlaySoundAtCollider(18, 455, 0); MakeLerp(0, 80, 10, 0); loop { @@ -451,12 +451,12 @@ Script N(defeat_80244E58) = SCRIPT({ }); Script N(init_80244E94) = SCRIPT({ - if (STORY_PROGRESS < STORY_CH3_TUBBA_SMASHED_THE_BRIDGES) { + if (SI_STORY_PROGRESS < STORY_CH3_TUBBA_SMASHED_THE_BRIDGES) { SetNpcPos(NPC_SELF, 0, -1000, 0); SetNpcFlagBits(NPC_SELF, ((NPC_FLAG_4)), TRUE); return; } - if (STORY_PROGRESS >= STORY_CH3_TUBBA_CHASED_MARIO_IN_FOYER) { + if (SI_STORY_PROGRESS >= STORY_CH3_TUBBA_CHASED_MARIO_IN_FOYER) { SetNpcPos(NPC_SELF, 0, -1000, 0); SetNpcFlagBits(NPC_SELF, ((NPC_FLAG_4)), TRUE); return; diff --git a/src/world/area_dgb/dgb_09/C46BE0.c b/src/world/area_dgb/dgb_09/C46BE0.c index f3865816c7..55e6699645 100644 --- a/src/world/area_dgb/dgb_09/C46BE0.c +++ b/src/world/area_dgb/dgb_09/C46BE0.c @@ -29,7 +29,7 @@ MapConfig N(config) = { }; Script N(80243880) = SCRIPT({ - match STORY_PROGRESS { + match SI_STORY_PROGRESS { < STORY_CH3_TUBBA_WOKE_UP { SetMusicTrack(0, SONG_TUBBAS_MANOR, 0, 8); } @@ -126,12 +126,12 @@ Script N(enterWalk_80243BC4) = SCRIPT({ }); Script N(main) = SCRIPT({ - WORLD_LOCATION = LOCATION_TUBBAS_MANOR; + SI_WORLD_LOCATION = LOCATION_TUBBAS_MANOR; SetSpriteShading(-1); SetCamPerspective(0, 3, 25, 16, 4096); SetCamBGColor(0, 0, 0, 0); SetCamEnabled(0, 1); - if (STORY_PROGRESS < STORY_CH3_STAR_SPIRIT_RESCUED) { + if (SI_STORY_PROGRESS < STORY_CH3_STAR_SPIRIT_RESCUED) { MakeNpcs(1, N(npcGroupList_8024533C)); } spawn N(80243F6C); diff --git a/src/world/area_dgb/dgb_10/C4C390.c b/src/world/area_dgb/dgb_10/C4C390.c index f3c6c01b3b..bd558d8548 100644 --- a/src/world/area_dgb/dgb_10/C4C390.c +++ b/src/world/area_dgb/dgb_10/C4C390.c @@ -14,7 +14,7 @@ MapConfig N(config) = { }; Script N(80240250) = SCRIPT({ - match STORY_PROGRESS { + match SI_STORY_PROGRESS { < STORY_CH3_TUBBA_WOKE_UP { SetMusicTrack(0, SONG_TUBBAS_MANOR, 0, 8); } @@ -65,7 +65,7 @@ Script N(enterWalk_80240378) = SCRIPT({ }); Script N(main) = SCRIPT({ - WORLD_LOCATION = LOCATION_TUBBAS_MANOR; + SI_WORLD_LOCATION = LOCATION_TUBBAS_MANOR; SetSpriteShading(-1); SetCamPerspective(0, 3, 25, 16, 4096); SetCamBGColor(0, 0, 0, 0); diff --git a/src/world/area_dgb/dgb_11/C4D3E0.c b/src/world/area_dgb/dgb_11/C4D3E0.c index 9318c77fb9..ff1f339c1d 100644 --- a/src/world/area_dgb/dgb_11/C4D3E0.c +++ b/src/world/area_dgb/dgb_11/C4D3E0.c @@ -18,7 +18,7 @@ MapConfig N(config) = { }; Script N(802400D0) = SCRIPT({ - match STORY_PROGRESS { + match SI_STORY_PROGRESS { < STORY_CH3_TUBBA_WOKE_UP { SetMusicTrack(0, SONG_TUBBAS_MANOR, 0, 8); } @@ -92,7 +92,7 @@ Script N(enterSingleDoor_80240224) = SCRIPT({ }); Script N(main) = SCRIPT({ - WORLD_LOCATION = LOCATION_TUBBAS_MANOR; + SI_WORLD_LOCATION = LOCATION_TUBBAS_MANOR; SetSpriteShading(-1); SetCamPerspective(0, 3, 25, 16, 4096); SetCamBGColor(0, 0, 0, 0); diff --git a/src/world/area_dgb/dgb_12/C4DEF0.c b/src/world/area_dgb/dgb_12/C4DEF0.c index f53781c3a7..e1e5a74c9c 100644 --- a/src/world/area_dgb/dgb_12/C4DEF0.c +++ b/src/world/area_dgb/dgb_12/C4DEF0.c @@ -13,7 +13,7 @@ MapConfig N(config) = { }; Script N(80240310) = SCRIPT({ - match STORY_PROGRESS { + match SI_STORY_PROGRESS { < STORY_CH3_TUBBA_WOKE_UP { SetMusicTrack(0, SONG_TUBBAS_MANOR, 0, 8); } @@ -56,7 +56,7 @@ Script N(enterSingleDoor_80240464) = SCRIPT({ }); Script N(main) = SCRIPT({ - WORLD_LOCATION = LOCATION_TUBBAS_MANOR; + SI_WORLD_LOCATION = LOCATION_TUBBAS_MANOR; SetSpriteShading(-1); SetCamPerspective(0, 3, 25, 16, 4096); SetCamBGColor(0, 0, 0, 0); diff --git a/src/world/area_dgb/dgb_13/C4E960.c b/src/world/area_dgb/dgb_13/C4E960.c index 05c7888015..0f59ce565c 100644 --- a/src/world/area_dgb/dgb_13/C4E960.c +++ b/src/world/area_dgb/dgb_13/C4E960.c @@ -13,7 +13,7 @@ MapConfig N(config) = { }; Script N(80240050) = SCRIPT({ - match STORY_PROGRESS { + match SI_STORY_PROGRESS { < STORY_CH3_TUBBA_WOKE_UP { SetMusicTrack(0, SONG_TUBBAS_MANOR, 0, 8); } @@ -36,7 +36,7 @@ Script N(8024014C) = SCRIPT({ }); Script N(main) = SCRIPT({ - WORLD_LOCATION = LOCATION_TUBBAS_MANOR; + SI_WORLD_LOCATION = LOCATION_TUBBAS_MANOR; SetSpriteShading(-1); SetCamPerspective(0, 3, 25, 16, 4096); SetCamBGColor(0, 0, 0, 0); diff --git a/src/world/area_dgb/dgb_14/C4F030.c b/src/world/area_dgb/dgb_14/C4F030.c index 778012b1cd..93d6c7a182 100644 --- a/src/world/area_dgb/dgb_14/C4F030.c +++ b/src/world/area_dgb/dgb_14/C4F030.c @@ -14,7 +14,7 @@ MapConfig N(config) = { }; Script N(80240060) = SCRIPT({ - match STORY_PROGRESS { + match SI_STORY_PROGRESS { < STORY_CH3_TUBBA_WOKE_UP { SetMusicTrack(0, SONG_TUBBAS_MANOR, 0, 8); } @@ -84,7 +84,7 @@ Script N(enterDoubleDoor_80240268) = SCRIPT({ }); Script N(main) = SCRIPT({ - WORLD_LOCATION = LOCATION_TUBBAS_MANOR; + SI_WORLD_LOCATION = LOCATION_TUBBAS_MANOR; SetSpriteShading(-1); SetCamPerspective(0, 3, 25, 16, 4096); SetCamBGColor(0, 0, 0, 0); diff --git a/src/world/area_dgb/dgb_15/C4F510.c b/src/world/area_dgb/dgb_15/C4F510.c index 8112167292..797f1ee1bb 100644 --- a/src/world/area_dgb/dgb_15/C4F510.c +++ b/src/world/area_dgb/dgb_15/C4F510.c @@ -22,7 +22,7 @@ MapConfig N(config) = { }; Script N(802418E0) = SCRIPT({ - match STORY_PROGRESS { + match SI_STORY_PROGRESS { < STORY_CH3_TUBBA_WOKE_UP { if (SI_SAVE_VAR(203) == 15) { SetMusicTrack(0, SONG_TUBBA_BLUBBA_THEME, 0, 8); @@ -127,7 +127,7 @@ Script N(enterSingleDoor_80241C88) = SCRIPT({ }); Script N(main) = SCRIPT({ - WORLD_LOCATION = LOCATION_TUBBAS_MANOR; + SI_WORLD_LOCATION = LOCATION_TUBBAS_MANOR; SetSpriteShading(-1); SI_AREA_FLAG(1) = 0; SetCamPerspective(0, 3, 25, 16, 4096); @@ -339,7 +339,7 @@ Script N(defeat_802427B0) = SCRIPT({ }); Script N(init_802427EC) = SCRIPT({ - if (STORY_PROGRESS != STORY_CH3_ARRIVED_AT_TUBBAS_MANOR) { + if (SI_STORY_PROGRESS != STORY_CH3_ARRIVED_AT_TUBBAS_MANOR) { RemoveNpc(NPC_SELF); return; } diff --git a/src/world/area_dgb/dgb_16/C52540.c b/src/world/area_dgb/dgb_16/C52540.c index 1c325037e1..ca8d03b6a8 100644 --- a/src/world/area_dgb/dgb_16/C52540.c +++ b/src/world/area_dgb/dgb_16/C52540.c @@ -32,7 +32,7 @@ MapConfig N(config) = { }; Script N(80241480) = SCRIPT({ - match STORY_PROGRESS { + match SI_STORY_PROGRESS { < STORY_CH3_TUBBA_WOKE_UP { SetMusicTrack(0, SONG_TUBBAS_MANOR, 0, 8); } @@ -81,12 +81,12 @@ Script N(enterSingleDoor_802415D4) = SCRIPT({ }); Script N(main) = SCRIPT({ - WORLD_LOCATION = LOCATION_TUBBAS_MANOR; + SI_WORLD_LOCATION = LOCATION_TUBBAS_MANOR; SetSpriteShading(-1); SetCamPerspective(0, 3, 25, 16, 4096); SetCamBGColor(0, 0, 0, 0); SetCamEnabled(0, 1); - if (STORY_PROGRESS < STORY_CH3_STAR_SPIRIT_RESCUED) { + if (SI_STORY_PROGRESS < STORY_CH3_STAR_SPIRIT_RESCUED) { MakeNpcs(1, N(npcGroupList_8024318C)); } await N(80241780); diff --git a/src/world/area_dgb/dgb_17/C55A60.c b/src/world/area_dgb/dgb_17/C55A60.c index fdf0067911..91ccbf47e6 100644 --- a/src/world/area_dgb/dgb_17/C55A60.c +++ b/src/world/area_dgb/dgb_17/C55A60.c @@ -14,7 +14,7 @@ MapConfig N(config) = { }; Script N(80240060) = SCRIPT({ - match STORY_PROGRESS { + match SI_STORY_PROGRESS { < STORY_CH3_TUBBA_WOKE_UP { SetMusicTrack(0, SONG_TUBBAS_MANOR, 0, 8); } @@ -88,7 +88,7 @@ Script N(enterDoubleDoor_802402B0) = SCRIPT({ }); Script N(main) = SCRIPT({ - WORLD_LOCATION = LOCATION_TUBBAS_MANOR; + SI_WORLD_LOCATION = LOCATION_TUBBAS_MANOR; SetSpriteShading(-1); SetCamPerspective(0, 3, 25, 16, 4096); SetCamBGColor(0, 0, 0, 0); diff --git a/src/world/area_dgb/dgb_18/C55F40.c b/src/world/area_dgb/dgb_18/C55F40.c index 6167e06240..149f2b77fe 100644 --- a/src/world/area_dgb/dgb_18/C55F40.c +++ b/src/world/area_dgb/dgb_18/C55F40.c @@ -25,7 +25,7 @@ MapConfig N(config) = { }; Script N(802412C0) = SCRIPT({ - match STORY_PROGRESS { + match SI_STORY_PROGRESS { < STORY_CH3_TUBBA_WOKE_UP { SetMusicTrack(0, SONG_TUBBAS_MANOR, 0, 8); } @@ -68,7 +68,7 @@ Script N(enterDoubleDoor_80241414) = SCRIPT({ }); Script N(main) = SCRIPT({ - WORLD_LOCATION = LOCATION_TUBBAS_MANOR; + SI_WORLD_LOCATION = LOCATION_TUBBAS_MANOR; SetSpriteShading(-1); SetCamPerspective(0, 3, 25, 16, 4096); SetCamBGColor(0, 0, 0, 0); @@ -338,7 +338,7 @@ Script N(idle_80241654) = SCRIPT({ SetPanTarget(0, SI_VAR(0), SI_VAR(1), SI_VAR(2)); WaitForCam(0, 1.0); PanToTarget(0, 0, 0); - STORY_PROGRESS = STORY_CH3_TUBBA_BEGAN_NAPPING; + SI_STORY_PROGRESS = STORY_CH3_TUBBA_BEGAN_NAPPING; DisablePlayerInput(FALSE); }); @@ -424,7 +424,7 @@ const char N(pad_XXX)[] = { 0, 0 }; Script N(init_80242924) = SCRIPT({ SetNpcScale(NPC_SELF, 1.25, 1.25, 1.25); BindNpcDefeat(NPC_SELF, N(defeat_802428E8)); - match STORY_PROGRESS { + match SI_STORY_PROGRESS { < STORY_CH3_TUBBA_BEGAN_NAPPING { BindNpcIdle(NPC_SELF, N(idle_80241654)); } @@ -559,7 +559,7 @@ Script N(idle_80242A24) = SCRIPT({ SI_VAR(1) -= 10; NpcJump0(NPC_SELF, SI_VAR(0), SI_VAR(1), SI_VAR(2), 10); SetNpcPos(NPC_SELF, 0, -1000, 0); - STORY_PROGRESS = STORY_CH3_TUBBA_WOKE_UP; + SI_STORY_PROGRESS = STORY_CH3_TUBBA_WOKE_UP; DisablePlayerInput(FALSE); }); diff --git a/src/world/area_dro/dro_01/95B7E0.c b/src/world/area_dro/dro_01/95B7E0.c index fa0cd72bd6..8e685ec8a1 100644 --- a/src/world/area_dro/dro_01/95B7E0.c +++ b/src/world/area_dro/dro_01/95B7E0.c @@ -447,17 +447,17 @@ Script N(enterWalk_80244C14) = SCRIPT({ }); Script N(main) = SCRIPT({ - WORLD_LOCATION = LOCATION_DRY_DRY_OUTPOST; + SI_WORLD_LOCATION = LOCATION_DRY_DRY_OUTPOST; SetSpriteShading(-1); SetCamPerspective(0, 3, 25, 16, 4096); SetCamBGColor(0, 0, 0, 0); SetCamEnabled(0, 1); SetCamLeadPlayer(0, 0); SI_SAVE_FLAG(1973) = 1; - if (STORY_PROGRESS < STORY_CH2_ARRIVED_AT_DRY_DRY_OUTPOST) { - STORY_PROGRESS = STORY_CH2_ARRIVED_AT_DRY_DRY_OUTPOST; + if (SI_STORY_PROGRESS < STORY_CH2_ARRIVED_AT_DRY_DRY_OUTPOST) { + SI_STORY_PROGRESS = STORY_CH2_ARRIVED_AT_DRY_DRY_OUTPOST; } - match STORY_PROGRESS { + match SI_STORY_PROGRESS { -53 ... 6 { MakeNpcs(0, N(npcGroupList_8024B47C)); } else { @@ -1314,7 +1314,7 @@ Script N(80247D20) = SCRIPT({ Script N(80247D90) = SCRIPT({ SI_VAR(12) = 0; - if (STORY_PROGRESS < STORY_CH2_PARAKARRY_JOINED_PARTY) { + if (SI_STORY_PROGRESS < STORY_CH2_PARAKARRY_JOINED_PARTY) { return; } N(func_80243014_95E214)(); @@ -1373,7 +1373,7 @@ Script N(80248090) = SCRIPT({ }); Script N(interact_802480E0) = SCRIPT({ - if (STORY_PROGRESS >= STORY_CH2_STAR_SPRIT_DEPARTED) { + if (SI_STORY_PROGRESS >= STORY_CH2_STAR_SPRIT_DEPARTED) { SpeakToPlayer(NPC_SELF, NPC_ANIM(mouser, Palette_00, Anim_5), NPC_ANIM(mouser, Palette_00, Anim_1), 0, MESSAGE_ID(0x0D, 0x0062)); return; @@ -1399,9 +1399,9 @@ Script N(init_802481F8) = SCRIPT({ }); Script N(interact_8024821C) = SCRIPT({ - match STORY_PROGRESS { + match SI_STORY_PROGRESS { < STORY_CH2_STAR_SPRIT_DEPARTED { - if (STORY_PROGRESS >= STORY_CH2_BOUGHT_SECRET_ITEMS) { + if (SI_STORY_PROGRESS >= STORY_CH2_BOUGHT_SECRET_ITEMS) { if (SI_AREA_VAR(1) == 2) { SI_AREA_VAR(1) = 0; } @@ -1522,7 +1522,7 @@ Script N(interact_80248864) = SCRIPT({ } } } - match STORY_PROGRESS { + match SI_STORY_PROGRESS { < STORY_CH2_STAR_SPRIT_DEPARTED { if (SI_AREA_FLAG(1) == 0) { SpeakToPlayer(NPC_DRYITE2, NPC_ANIM(dryite, Palette_00, Anim_4), NPC_ANIM(dryite, Palette_00, Anim_1), 0, @@ -1616,7 +1616,7 @@ Script N(interact_80248D54) = SCRIPT({ return; } else { if (SI_SAVE_FLAG(755) == 0) { - if (STORY_PROGRESS < STORY_CH7_BEGAN_PEACH_MISSION) { + if (SI_STORY_PROGRESS < STORY_CH7_BEGAN_PEACH_MISSION) { SpeakToPlayer(NPC_SELF, NPC_ANIM(artist_toad, Palette_01, Anim_2), NPC_ANIM(artist_toad, Palette_01, Anim_1), 0, MESSAGE_ID(0x0D, 0x0085)); SetPlayerAnimation(ANIM_NOD_YES); @@ -1630,7 +1630,7 @@ Script N(interact_80248D54) = SCRIPT({ } } } - match STORY_PROGRESS { + match SI_STORY_PROGRESS { < STORY_CH2_STAR_SPRIT_DEPARTED { if (SI_AREA_FLAG(2) == 0) { SpeakToPlayer(NPC_SELF, NPC_ANIM(artist_toad, Palette_01, Anim_2), NPC_ANIM(artist_toad, Palette_01, Anim_1), 0, @@ -1693,7 +1693,7 @@ Script N(init_80249168) = SCRIPT({ }); Script N(idle_8024918C) = SCRIPT({ - match STORY_PROGRESS { + match SI_STORY_PROGRESS { < STORY_CH2_SHADY_MOUSE_LEFT_SHOP { N(func_80243350_95E550)(16, 190, -134, -131); DisablePlayerInput(TRUE); @@ -1740,7 +1740,7 @@ Script N(idle_8024918C) = SCRIPT({ WaitForCam(0, 1.0); PanToTarget(0, 0, 0); DisablePlayerInput(FALSE); - STORY_PROGRESS = STORY_CH2_SHADY_MOUSE_LEFT_SHOP; + SI_STORY_PROGRESS = STORY_CH2_SHADY_MOUSE_LEFT_SHOP; } < STORY_CH2_SPOKE_WITH_SHEEK {} < STORY_CH2_SHADY_MOUSE_ENTERED_SHOP { @@ -1758,7 +1758,7 @@ Script N(idle_8024918C) = SCRIPT({ SetNpcAnimation(NPC_SELF, NPC_ANIM(mouser, Palette_01, Anim_1)); await N(8024C4C8); EnableNpcBlur(-1, 0); - STORY_PROGRESS = STORY_CH2_SHADY_MOUSE_ENTERED_SHOP; + SI_STORY_PROGRESS = STORY_CH2_SHADY_MOUSE_ENTERED_SHOP; } else { SetNpcAnimation(NPC_SELF, NPC_ANIM(mouser, Palette_01, Anim_1)); SetNpcPos(NPC_SELF, 20, 0, -375); @@ -2314,7 +2314,7 @@ Script N(8024B6B4) = SCRIPT({ N(func_80243578_95E778)(); func_802D2C14(1); await N(8024B614); - if (STORY_PROGRESS < STORY_CH2_BOUGHT_SECRET_ITEMS) { + if (SI_STORY_PROGRESS < STORY_CH2_BOUGHT_SECRET_ITEMS) { SpeakToPlayer(NPC_MOUSER1, NPC_ANIM(mouser, Palette_01, Anim_5), NPC_ANIM(mouser, Palette_01, Anim_1), 0, MESSAGE_ID(0x0D, 0x0087)); SetPlayerAnimation(ANIM_10002); sleep 10; @@ -2322,7 +2322,7 @@ Script N(8024B6B4) = SCRIPT({ sleep 30; } SpeakToPlayer(NPC_MOUSER1, NPC_ANIM(mouser, Palette_01, Anim_5), NPC_ANIM(mouser, Palette_01, Anim_1), 0, MESSAGE_ID(0x0D, 0x0088)); - STORY_PROGRESS = STORY_CH2_BOUGHT_SECRET_ITEMS; + SI_STORY_PROGRESS = STORY_CH2_BOUGHT_SECRET_ITEMS; func_802D2C14(0); await N(8024B664); }); @@ -2331,7 +2331,7 @@ Script N(8024B6B4) = { SI_CMD(ScriptOpcode_CALL, N(func_80243578_95E778)), SI_CMD(ScriptOpcode_CALL, func_802D2C14, 1), SI_CMD(ScriptOpcode_AWAIT_SCRIPT, N(8024B614)), - SI_CMD(ScriptOpcode_IF_LT, SI_SAVE_VAR(0), -64), + SI_CMD(ScriptOpcode_IF_LT, SI_STORY_PROGRESS, -64), SI_CMD(ScriptOpcode_CALL, SpeakToPlayer, 6, 9699589, 9699585, 0, 852103), SI_CMD(ScriptOpcode_CALL, SetPlayerAnimation, 65538), SI_CMD(ScriptOpcode_SLEEP_FRAMES, 10), @@ -2339,7 +2339,7 @@ Script N(8024B6B4) = { SI_CMD(ScriptOpcode_SLEEP_FRAMES, 30), SI_CMD(ScriptOpcode_END_IF), SI_CMD(ScriptOpcode_CALL, SpeakToPlayer, 6, 9699589, 9699585, 0, 852104), - SI_CMD(ScriptOpcode_SET, SI_SAVE_VAR(0), -64), + SI_CMD(ScriptOpcode_SET, SI_STORY_PROGRESS, -64), SI_CMD(ScriptOpcode_CALL, func_802D2C14, 0), SI_CMD(ScriptOpcode_AWAIT_SCRIPT, N(8024B664)), SI_CMD(ScriptOpcode_END_IF), @@ -2391,7 +2391,7 @@ Script N(8024B894) = SCRIPT({ == 134 { SI_AREA_VAR(4) = 2; if (SI_VAR(2) == 1) { - if (STORY_PROGRESS < STORY_CH2_GOT_PULSE_STONE) { + if (SI_STORY_PROGRESS < STORY_CH2_GOT_PULSE_STONE) { await N(8024B6B4); SI_AREA_VAR(4) = 0; } @@ -2507,7 +2507,7 @@ Script N(toggleVis_8024BFDC) = SCRIPT({ Script N(toggleVis_8024C040) = SCRIPT({ match SI_VAR(0) { == 0 { - match STORY_PROGRESS { + match SI_STORY_PROGRESS { < STORY_CH2_SPOKE_WITH_SHEEK { ShowMessageAtScreenPos(MESSAGE_ID(0x1D, 0x017B), 160, 40); SI_VAR(0) = -1; @@ -3032,7 +3032,7 @@ ApiStatus N(func_802415AC_95C7AC)(ScriptInstance* script, s32 isInitialCall) { set_variable(script, SI_SAVE_FLAG(1768), phi_s0); set_variable(script, SI_SAVE_FLAG(1769), phi_s7); temp_s0_2 = get_variable(NULL, SI_SAVE_VAR(352)); - temp_v0 = get_variable(NULL, SI_SAVE_VAR(0)); + temp_v0 = get_variable(NULL, SI_STORY_PROGRESS); for (i = 0; i < 8; i++) { if (temp_v0 < (*(N(quizRequirements) + i)).unk_00) { diff --git a/src/world/area_dro/dro_02/9694C0.c b/src/world/area_dro/dro_02/9694C0.c index 9aa886c8ae..f043160172 100644 --- a/src/world/area_dro/dro_02/9694C0.c +++ b/src/world/area_dro/dro_02/9694C0.c @@ -179,7 +179,7 @@ Script N(80243D10) = SCRIPT({ }); Script N(main) = SCRIPT({ - WORLD_LOCATION = LOCATION_DRY_DRY_OUTPOST; + SI_WORLD_LOCATION = LOCATION_DRY_DRY_OUTPOST; SetSpriteShading(-1); SetCamPerspective(0, 3, 25, 16, 4096); SetCamBGColor(0, 0, 0, 0); @@ -422,12 +422,12 @@ s32 N(npcList_80244C70)[] = { Script N(80244C78) = SCRIPT({ spawn N(802441C0); ParentColliderToModel(8, 21); - if (STORY_PROGRESS >= STORY_CH2_BOUGHT_SECRET_ITEMS) { + if (SI_STORY_PROGRESS >= STORY_CH2_BOUGHT_SECRET_ITEMS) { RotateModel(21, 18, 0, 1, 0); UpdateColliderTransform(8); } MakeDoorAdvanced(4, N(openDoor_80244340), N(moveWalls_80244390), N(dropDoor_80244474), N(toggleVis_8024468C), 15, 16, 133, N(npcList_80244C64)); - if (STORY_PROGRESS >= STORY_CH2_BOUGHT_SECRET_ITEMS) { + if (SI_STORY_PROGRESS >= STORY_CH2_BOUGHT_SECRET_ITEMS) { bind N(8024486C) TRIGGER_WALL_PRESS_A 8; bind N(80244A68) TRIGGER_WALL_PRESS_A 10; } @@ -2137,7 +2137,7 @@ Script N(8024B530) = SCRIPT({ Script N(8024B5A0) = SCRIPT({ SI_VAR(12) = 0; - if (STORY_PROGRESS < STORY_CH2_PARAKARRY_JOINED_PARTY) { + if (SI_STORY_PROGRESS < STORY_CH2_PARAKARRY_JOINED_PARTY) { return; } N(func_802439FC_96CBBC)(); @@ -2195,7 +2195,7 @@ Script N(8024B8A0) = SCRIPT({ }); Script N(interact_8024B8F0) = SCRIPT({ - match STORY_PROGRESS { + match SI_STORY_PROGRESS { < STORY_CH2_STAR_SPRIT_DEPARTED { if (SI_SAVE_FLAG(787) == 1) { SpeakToPlayer(NPC_SELF, 0xB80004, 0xB80001, 0, MESSAGE_ID(0x0D, 0x00B2)); @@ -2223,13 +2223,13 @@ Script N(interact_8024B8F0) = SCRIPT({ Script N(init_8024BA50) = SCRIPT({ BindNpcInteract(NPC_SELF, N(interact_8024B8F0)); - if (STORY_PROGRESS >= STORY_UNUSED_FFFFFFCC) { + if (SI_STORY_PROGRESS >= STORY_UNUSED_FFFFFFCC) { RemoveNpc(NPC_SELF); } }); Script N(interact_8024BA9C) = SCRIPT({ - match STORY_PROGRESS { + match SI_STORY_PROGRESS { < STORY_CH2_STAR_SPRIT_DEPARTED { if (SI_SAVE_FLAG(747) == 0) { SpeakToPlayer(NPC_SELF, 0x930204, 0x930201, 0, MESSAGE_ID(0x0D, 0x0091)); @@ -2254,7 +2254,7 @@ Script N(init_8024BBAC) = SCRIPT({ }); Script N(interact_8024BBD0) = SCRIPT({ - match STORY_PROGRESS { + match SI_STORY_PROGRESS { < STORY_CH2_STAR_SPRIT_DEPARTED { if (SI_AREA_FLAG(3) == 0) { SpeakToPlayer(NPC_SELF, 0x930004, 0x930001, 0, MESSAGE_ID(0x0D, 0x00A1)); @@ -2285,7 +2285,7 @@ Script N(init_8024BD28) = SCRIPT({ }); Script N(interact_8024BD4C) = SCRIPT({ - match STORY_PROGRESS { + match SI_STORY_PROGRESS { < STORY_CH2_STAR_SPRIT_DEPARTED { if (SI_AREA_FLAG(4) == 0) { SpeakToPlayer(NPC_SELF, 0x940005, 0x940001, 0, MESSAGE_ID(0x0D, 0x00A5)); @@ -2320,7 +2320,7 @@ Script N(init_8024BF10) = SCRIPT({ }); Script N(interact_8024BF34) = SCRIPT({ - match STORY_PROGRESS { + match SI_STORY_PROGRESS { < STORY_CH2_STAR_SPRIT_DEPARTED { if (SI_AREA_FLAG(5) == 0) { SpeakToPlayer(NPC_SELF, 0x940005, 0x940001, 0, MESSAGE_ID(0x0D, 0x00AB)); @@ -2405,7 +2405,7 @@ Script N(8024C248) = SCRIPT({ }); Script N(idle_8024C450) = SCRIPT({ - match STORY_PROGRESS { + match SI_STORY_PROGRESS { < STORY_CH2_BOUGHT_SECRET_ITEMS {} < STORY_CH2_GOT_PULSE_STONE { SetNpcPos(NPC_SELF, -335, 163, -260); @@ -2422,7 +2422,7 @@ Script N(interact_8024C4EC) = SCRIPT({ SpeakToPlayer(NPC_MOUSTAFA, 0xBD0005, 0xBD0001, 0, MESSAGE_ID(0x0D, 0x00CF)); return; } - match STORY_PROGRESS { + match SI_STORY_PROGRESS { < STORY_CH2_BOUGHT_SECRET_ITEMS { SI_VAR(11) = 0; SpeakToPlayer(NPC_DISGUISED_MOUSTAFA, 0xBC0004, 0xBC0001, 0, MESSAGE_ID(0x0D, 0x00B4)); @@ -2565,18 +2565,18 @@ Script N(interact_8024C4EC) = SCRIPT({ SI_VAR(1) = 1; await N(80244DE4); AddKeyItem(ITEM_PULSE_STONE); - STORY_PROGRESS = STORY_CH2_GOT_PULSE_STONE; + SI_STORY_PROGRESS = STORY_CH2_GOT_PULSE_STONE; SpeakToPlayer(NPC_MOUSTAFA, 0xBD0005, 0xBD0001, 0, MESSAGE_ID(0x0D, 0x00CA)); kill SI_VAR(10); spawn N(80243AF0); } >= -63 { - match STORY_PROGRESS { + match SI_STORY_PROGRESS { < STORY_CH2_UNCOVERED_DRY_DRY_RUINS { SpeakToPlayer(NPC_MOUSTAFA, 0xBD0005, 0xBD0001, 0, MESSAGE_ID(0x0D, 0x00CB)); } >= STORY_CH2_UNCOVERED_DRY_DRY_RUINS { - if (STORY_PROGRESS >= STORY_CH2_DEFEATED_TUTANKOOPA) { + if (SI_STORY_PROGRESS >= STORY_CH2_DEFEATED_TUTANKOOPA) { if (SI_SAVE_FLAG(751) == 0) { SpeakToPlayer(NPC_MOUSTAFA, 0xBD0005, 0xBD0001, 0, MESSAGE_ID(0x0D, 0x00CD)); SetPlayerAnimation(ANIM_10002); @@ -2651,12 +2651,12 @@ Script N(idle_8024D154) = SCRIPT({ NpcMoveTo(NPC_SELF, -371, 5, 20); NpcMoveTo(NPC_SELF, -487, 5, 20); SetNpcPos(NPC_SELF, 0, -1000, 0); - STORY_PROGRESS = STORY_CH2_SPOKE_WITH_SHEEK; + SI_STORY_PROGRESS = STORY_CH2_SPOKE_WITH_SHEEK; }); Script N(init_8024D3E8) = SCRIPT({ BindNpcIdle(NPC_SELF, N(idle_8024D154)); - if (STORY_PROGRESS >= STORY_CH2_SPOKE_WITH_SHEEK) { + if (SI_STORY_PROGRESS >= STORY_CH2_SPOKE_WITH_SHEEK) { RemoveNpc(NPC_SELF); } }); @@ -3145,7 +3145,7 @@ ApiStatus N(func_8024043C_9695FC)(ScriptInstance* script, s32 isInitialCall) { set_variable(script, SI_SAVE_FLAG(1768), phi_s0); set_variable(script, SI_SAVE_FLAG(1769), phi_s7); temp_s0_2 = get_variable(NULL, SI_SAVE_VAR(352)); - temp_v0 = get_variable(NULL, SI_SAVE_VAR(0)); + temp_v0 = get_variable(NULL, SI_STORY_PROGRESS); for (i = 0; i < 8; i++) { if (temp_v0 < (*(N(quizRequirements) + i)).unk_00) { @@ -3562,8 +3562,9 @@ void N(func_80242214_96B3D4)(s32 arg0, f32* arg1, f32* arg2, f32* arg3, f32* arg Matrix4f sp60; Matrix4f spA0; - guPositionF(&spA0, 0.0f, -gCameras[gCurrentCameraID].currentYaw, 0.0f, 0.71428573f, get_variable(*CC_ptr, SI_ARRAY(4)), - get_variable(*CC_ptr, SI_ARRAY(5)), get_variable(*CC_ptr, SI_ARRAY(6))); + guPositionF(&spA0, 0.0f, -gCameras[gCurrentCameraID].currentYaw, 0.0f, SPRITE_WORLD_SCALE, + get_variable(*CC_ptr, SI_ARRAY(4)), get_variable(*CC_ptr, SI_ARRAY(5)), + get_variable(*CC_ptr, SI_ARRAY(6))); F010_ptr = ({ D_8024F010_Struct* a = &N(D_8024F010); &a[arg0]; }); guTranslateF(&sp60, F010_ptr->unk_04, F010_ptr->unk_08, F010_ptr->unk_0C); @@ -3898,8 +3899,9 @@ void N(func_80242EAC_96C06C)(ScriptInstance* script, s32 isInitialCall) { Matrix4f sp20; u32 temp_s1; - guPositionF(&sp20, 0.0f, -gCameras[gCurrentCameraID].currentYaw, 0.0f, 0.71428573f, get_variable(N(D_8024EFCC), - SI_ARRAY(4)), get_variable(N(D_8024EFCC), SI_ARRAY(5)), get_variable(N(D_8024EFCC), SI_ARRAY(6))); + guPositionF(&sp20, 0.0f, -gCameras[gCurrentCameraID].currentYaw, 0.0f, SPRITE_WORLD_SCALE, + get_variable(N(D_8024EFCC), SI_ARRAY(4)), get_variable(N(D_8024EFCC), SI_ARRAY(5)), + get_variable(N(D_8024EFCC), SI_ARRAY(6))); temp_s1 = N(func_8024190C_96AACC)(&N(D_8024F010)[0], &sp20); N(func_8024190C_96AACC)(&N(D_8024F010)[1], &sp20); diff --git a/src/world/area_flo/flo_00/C9DF60.c b/src/world/area_flo/flo_00/C9DF60.c index 8d67424a74..da593a3caa 100644 --- a/src/world/area_flo/flo_00/C9DF60.c +++ b/src/world/area_flo/flo_00/C9DF60.c @@ -59,7 +59,7 @@ Script N(802414D0) = SCRIPT({ spawn { loop { sleep 1; - if (STORY_PROGRESS >= STORY_CH6_STAR_SPRIT_DEPARTED) { + if (SI_STORY_PROGRESS >= STORY_CH6_STAR_SPRIT_DEPARTED) { break loop; } } @@ -69,7 +69,7 @@ Script N(802414D0) = SCRIPT({ == 11 { FadeInMusic(0, 49, 0, 3000, 0, 127); } else { - match STORY_PROGRESS { + match SI_STORY_PROGRESS { < STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE { SetMusicTrack(0, SONG_FLOWER_FIELDS_CLOUDY, 0, 8); } else { @@ -141,8 +141,8 @@ Script N(8024196C) = SCRIPT({ func_802D2C14(1); PlayerMoveTo(0, -310, 30); func_802D2C14(0); - if (STORY_PROGRESS == STORY_CH6_STAR_SPRIT_DEPARTED) { - STORY_PROGRESS = STORY_CH6_RETURNED_TO_TOAD_TOWN; + if (SI_STORY_PROGRESS == STORY_CH6_STAR_SPRIT_DEPARTED) { + SI_STORY_PROGRESS = STORY_CH6_RETURNED_TO_TOAD_TOWN; } MakeLerp(-100, 0, 30, 1); loop { @@ -262,14 +262,14 @@ Script N(enterWalk_8024205C) = SCRIPT({ }); Script N(main) = SCRIPT({ - WORLD_LOCATION = LOCATION_FLOWER_FIELDS; + SI_WORLD_LOCATION = LOCATION_FLOWER_FIELDS; SetSpriteShading(-1); SetCamLeadPlayer(0, 0); SetCamPerspective(0, 3, 25, 16, 4096); SetCamBGColor(0, 0, 0, 0); SetCamEnabled(0, 1); SI_SAVE_FLAG(1984) = 1; - if (STORY_PROGRESS < STORY_CH6_GREW_MAGIC_BEANSTALK) { + if (SI_STORY_PROGRESS < STORY_CH6_GREW_MAGIC_BEANSTALK) { ModifyColliderFlags(0, 48, 0x7FFFFE00); } SI_SAVE_FLAG(263) = 0; @@ -322,7 +322,7 @@ Script N(main) = SCRIPT({ } } await N(802414D0); - if (STORY_PROGRESS >= STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) { + if (SI_STORY_PROGRESS >= STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) { N(func_80240000_C9DF20)(); } spawn { @@ -485,7 +485,7 @@ Script N(80242AF0) = SCRIPT({ sleep 10; ShowMessageAtWorldPos(MESSAGE_ID(0x11, 0x0005), 0, 70, -200); ResetCam(0, 90.0); - STORY_PROGRESS = STORY_CH6_ARRIVED_AT_FLOWER_FIELDS; + SI_STORY_PROGRESS = STORY_CH6_ARRIVED_AT_FLOWER_FIELDS; func_802D2C14(0); DisablePlayerInput(FALSE); }); @@ -508,19 +508,19 @@ Script N(80242FCC) = SCRIPT({ DisablePlayerInput(FALSE); return; } - if (STORY_PROGRESS == STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) { + if (SI_STORY_PROGRESS == STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) { ShowMessageAtWorldPos(MESSAGE_ID(0x11, 0x0006), 0, 50, -200); - STORY_PROGRESS = STORY_CH6_WISTERWOOD_GAVE_HINT; + SI_STORY_PROGRESS = STORY_CH6_WISTERWOOD_GAVE_HINT; DisablePlayerInput(FALSE); return; } - if (STORY_PROGRESS < STORY_CH6_RETURNED_TO_TOAD_TOWN) { + if (SI_STORY_PROGRESS < STORY_CH6_RETURNED_TO_TOAD_TOWN) { ShowMessageAtWorldPos(MESSAGE_ID(0x11, 0x000D), 0, 50, -200); ShowChoice(MESSAGE_ID(0x1E, 0x001F)); sleep 10; match SI_VAR(0) { == 0 { - match STORY_PROGRESS { + match SI_STORY_PROGRESS { < STORY_CH6_GOT_MAGICAL_BEAN { SwitchMessage(MESSAGE_ID(0x11, 0x000E)); } @@ -594,13 +594,13 @@ Script N(init_80243474) = SCRIPT({ SetNpcPos(NPC_SELF, 50, 70, -230); SetNpcFlagBits(NPC_SELF, ((0x00000002)), TRUE); EnableNpcShadow(NPC_SELF, FALSE); - if (STORY_PROGRESS < STORY_CH6_ARRIVED_AT_FLOWER_FIELDS) { + if (SI_STORY_PROGRESS < STORY_CH6_ARRIVED_AT_FLOWER_FIELDS) { spawn N(80242AF0); } }); Script N(interact_8024352C) = SCRIPT({ - match STORY_PROGRESS { + match SI_STORY_PROGRESS { < STORY_CH6_GOT_MAGICAL_BEAN { SpeakToPlayer(NPC_SELF, NPC_ANIM(bubulb, Palette_00, Anim_3), NPC_ANIM(bubulb, Palette_00, Anim_2), 0, MESSAGE_ID(0x11, 0x0016)); } @@ -632,7 +632,7 @@ Script N(interact_8024352C) = SCRIPT({ }); Script N(interact_802436C0) = SCRIPT({ - match STORY_PROGRESS { + match SI_STORY_PROGRESS { < STORY_CH6_GOT_MAGICAL_BEAN { SpeakToPlayer(NPC_SELF, NPC_ANIM(bubulb, Palette_01, Anim_3), NPC_ANIM(bubulb, Palette_01, Anim_2), 0, MESSAGE_ID(0x11, 0x001D)); } @@ -664,7 +664,7 @@ Script N(interact_802436C0) = SCRIPT({ }); Script N(interact_80243854) = SCRIPT({ - match STORY_PROGRESS { + match SI_STORY_PROGRESS { < STORY_CH6_GOT_MAGICAL_BEAN { SpeakToPlayer(NPC_SELF, NPC_ANIM(bubulb, Palette_02, Anim_3), NPC_ANIM(bubulb, Palette_02, Anim_2), 0, MESSAGE_ID(0x11, 0x0024)); } @@ -696,7 +696,7 @@ Script N(interact_80243854) = SCRIPT({ }); Script N(interact_802439E8) = SCRIPT({ - match STORY_PROGRESS { + match SI_STORY_PROGRESS { < STORY_CH6_GOT_MAGICAL_BEAN { SpeakToPlayer(NPC_SELF, NPC_ANIM(bubulb, Palette_03, Anim_3), NPC_ANIM(bubulb, Palette_03, Anim_2), 0, MESSAGE_ID(0x11, 0x002B)); } @@ -752,7 +752,7 @@ Script N(interact_80243C4C) = SCRIPT({ AdjustCam(0, 4.0, -30, 300, 20.0, -9.5); SI_SAVE_FLAG(1373) = 1; } - match STORY_PROGRESS { + match SI_STORY_PROGRESS { < STORY_CH6_GOT_MAGICAL_BEAN { match SI_AREA_VAR(0) { == 0 { @@ -979,7 +979,7 @@ Script N(8024427C) = SCRIPT({ SetPlayerAnimation(0x1002A); sleep 110; SetPlayerAnimation(ANIM_10002); - STORY_PROGRESS = STORY_CH6_STAR_SPRIT_DEPARTED; + SI_STORY_PROGRESS = STORY_CH6_STAR_SPRIT_DEPARTED; await N(80243368); EnablePartnerAI(); DisablePlayerInput(FALSE); @@ -999,7 +999,7 @@ Script N(init_80244BF4) = SCRIPT({ }); Script N(interact_80244C98) = SCRIPT({ - if (STORY_PROGRESS <= STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) { + if (SI_STORY_PROGRESS <= STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) { SpeakToPlayer(NPC_LAKILULU, NPC_ANIM(lakilulu, Palette_00, Anim_4), NPC_ANIM(lakilulu, Palette_00, Anim_1), 0, MESSAGE_ID(0x11, 0x0032)); } else { @@ -1022,7 +1022,7 @@ Script N(interact_80244C98) = SCRIPT({ }); Script N(init_80244DD0) = SCRIPT({ - if (STORY_PROGRESS >= STORY_CH6_BEGAN_PEACH_MISSION) { + if (SI_STORY_PROGRESS >= STORY_CH6_BEGAN_PEACH_MISSION) { BindNpcInteract(NPC_SELF, N(interact_80244C98)); SetNpcCollisionSize(-1, 36, 28); SetNpcPos(NPC_SELF, -200, 15, -300); @@ -2017,10 +2017,10 @@ Script N(80248D3C) = SCRIPT({ }); Script N(80248E30) = SCRIPT({ - if (STORY_PROGRESS < STORY_CH6_GREW_MAGIC_BEANSTALK) { + if (SI_STORY_PROGRESS < STORY_CH6_GREW_MAGIC_BEANSTALK) { loop { sleep 1; - if (STORY_PROGRESS == STORY_CH6_WISTERWOOD_GAVE_HINT) { + if (SI_STORY_PROGRESS == STORY_CH6_WISTERWOOD_GAVE_HINT) { break; } } @@ -2040,7 +2040,7 @@ Script N(80248F48) = SCRIPT({ bind N(802477EC) TRIGGER_FLOOR_TOUCH 46; EnableGroup(121, 1); EnableGroup(80, 1); - match STORY_PROGRESS { + match SI_STORY_PROGRESS { == STORY_CH6_WISTERWOOD_GAVE_HINT { SI_VAR(0) = -700; spawn N(80246850); @@ -2076,7 +2076,7 @@ static s32 N(pad_9128)[] = { }; Script N(makeEntities) = SCRIPT({ - if (STORY_PROGRESS < STORY_EPILOGUE) { + if (SI_STORY_PROGRESS < STORY_EPILOGUE) { MakeEntity(0x802E9A18, 110, 60, -100, 0, MAKE_ENTITY_END); } }); diff --git a/src/world/area_flo/flo_03/CA72E0.c b/src/world/area_flo/flo_03/CA72E0.c index 761dc66beb..eb85f7619f 100644 --- a/src/world/area_flo/flo_03/CA72E0.c +++ b/src/world/area_flo/flo_03/CA72E0.c @@ -32,7 +32,7 @@ Script N(802406A0) = SCRIPT({ if (SI_VAR(0) == 2) { SetMusicTrack(0, SONG_SUNSHINE_RETURNS, 0, 8); } else { - match STORY_PROGRESS { + match SI_STORY_PROGRESS { <= STORY_CH6_ASKED_TO_DEFEAT_MONTY_MOLES { if (SI_SAVE_FLAG(1411) == 0) { SetMusicTrack(0, SONG_MONTY_MOLE_ASSAULT, 0, 8); @@ -50,7 +50,7 @@ Script N(802406A0) = SCRIPT({ }); Script N(802407C0) = SCRIPT({ - if (STORY_PROGRESS >= STORY_CH6_ASKED_TO_DEFEAT_MONTY_MOLES) { + if (SI_STORY_PROGRESS >= STORY_CH6_ASKED_TO_DEFEAT_MONTY_MOLES) { if (SI_SAVE_FLAG(1411) == 1) { PushSong(137, 0); } @@ -58,7 +58,7 @@ Script N(802407C0) = SCRIPT({ }); Script N(80240814) = SCRIPT({ - if (STORY_PROGRESS >= STORY_CH6_ASKED_TO_DEFEAT_MONTY_MOLES) { + if (SI_STORY_PROGRESS >= STORY_CH6_ASKED_TO_DEFEAT_MONTY_MOLES) { if (SI_SAVE_FLAG(1411) == 1) { FadeOutMusic(0, 250); sleep 10; @@ -116,7 +116,7 @@ Script N(80240BE4) = SCRIPT({ }); Script N(main) = SCRIPT({ - WORLD_LOCATION = LOCATION_FLOWER_FIELDS; + SI_WORLD_LOCATION = LOCATION_FLOWER_FIELDS; SetSpriteShading(-1); SetCamLeadPlayer(0, 0); SetCamPerspective(0, 3, 25, 16, 4096); @@ -152,7 +152,7 @@ Script N(main) = SCRIPT({ spawn EnterWalk; } await N(802406A0); - if (STORY_PROGRESS >= STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) { + if (SI_STORY_PROGRESS >= STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) { N(func_80240000_CA72A0)(); } }); @@ -254,7 +254,7 @@ Script N(8024122C) = SCRIPT({ Script N(interact_802412BC) = SCRIPT({ await N(802407C0); - match STORY_PROGRESS { + match SI_STORY_PROGRESS { < STORY_CH6_ASKED_TO_DEFEAT_MONTY_MOLES { SI_MAP_VAR(14) = 1; SI_VAR(4) = (int) 3.5; @@ -348,7 +348,7 @@ Script N(interact_802412BC) = SCRIPT({ BindNpcAI(NPC_DAYZEE, N(npcAI_8024119C)); SI_MAP_VAR(14) = 0; SI_MAP_VAR(15) = 60; - STORY_PROGRESS = STORY_CH6_ASKED_TO_DEFEAT_MONTY_MOLES; + SI_STORY_PROGRESS = STORY_CH6_ASKED_TO_DEFEAT_MONTY_MOLES; } == STORY_CH6_ASKED_TO_DEFEAT_MONTY_MOLES { if (SI_SAVE_FLAG(1411) == 0) { @@ -372,7 +372,7 @@ Script N(interact_802412BC) = SCRIPT({ SpeakToPlayer(NPC_SELF, NPC_ANIM(petunia, Palette_00, Anim_2), NPC_ANIM(petunia, Palette_00, Anim_1), 0, MESSAGE_ID(0x11, 0x005A)); EndSpeech(-1, NPC_ANIM(petunia, Palette_00, Anim_7), NPC_ANIM(petunia, Palette_00, Anim_6), 0); - STORY_PROGRESS = STORY_CH6_GOT_MAGICAL_BEAN; + SI_STORY_PROGRESS = STORY_CH6_GOT_MAGICAL_BEAN; } } < STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE { @@ -407,7 +407,7 @@ Script N(init_80241DA4) = SCRIPT({ Script N(init_80241E10) = SCRIPT({ BindNpcDefeat(NPC_SELF, N(defeat_802411B8)); EnableNpcShadow(NPC_DAYZEE, FALSE); - match STORY_PROGRESS { + match SI_STORY_PROGRESS { < STORY_CH6_ASKED_TO_DEFEAT_MONTY_MOLES { SetNpcPos(NPC_DAYZEE, 0, -1000, 0); } else { @@ -473,7 +473,7 @@ Script N(defeat_80241F64) = SCRIPT({ }); Script N(hit_80242138) = SCRIPT({ - if (STORY_PROGRESS == STORY_CH6_ASKED_TO_DEFEAT_MONTY_MOLES) { + if (SI_STORY_PROGRESS == STORY_CH6_ASKED_TO_DEFEAT_MONTY_MOLES) { GetOwnerEncounterTrigger(SI_VAR(0)); if (SI_VAR(0) != 1) { SetNpcAnimation(NPC_SELF, NPC_ANIM(monty_mole, Palette_01, Anim_5)); @@ -507,7 +507,7 @@ Script N(idle_8024219C) = SCRIPT({ sleep 1; SI_AREA_FLAG(23) = 1; if (SI_MAP_VAR(10) != 0) { - if (STORY_PROGRESS < STORY_CH6_ASKED_TO_DEFEAT_MONTY_MOLES) { + if (SI_STORY_PROGRESS < STORY_CH6_ASKED_TO_DEFEAT_MONTY_MOLES) { SI_VAR(1) = 4; } else { SI_VAR(1) = 10; @@ -583,7 +583,7 @@ Script N(idle_80242618) = SCRIPT({ sleep 1; SI_AREA_FLAG(24) = 1; if (SI_MAP_VAR(11) != 0) { - if (STORY_PROGRESS < STORY_CH6_ASKED_TO_DEFEAT_MONTY_MOLES) { + if (SI_STORY_PROGRESS < STORY_CH6_ASKED_TO_DEFEAT_MONTY_MOLES) { SI_VAR(1) = 4; } else { SI_VAR(1) = 10; @@ -659,7 +659,7 @@ Script N(idle_80242A94) = SCRIPT({ sleep 1; SI_AREA_FLAG(25) = 1; if (SI_MAP_VAR(12) != 0) { - if (STORY_PROGRESS < STORY_CH6_ASKED_TO_DEFEAT_MONTY_MOLES) { + if (SI_STORY_PROGRESS < STORY_CH6_ASKED_TO_DEFEAT_MONTY_MOLES) { SI_VAR(1) = 4; } else { SI_VAR(1) = 10; @@ -735,7 +735,7 @@ Script N(idle_80242F10) = SCRIPT({ sleep 1; SI_AREA_FLAG(26) = 1; if (SI_MAP_VAR(13) != 0) { - if (STORY_PROGRESS < STORY_CH6_ASKED_TO_DEFEAT_MONTY_MOLES) { + if (SI_STORY_PROGRESS < STORY_CH6_ASKED_TO_DEFEAT_MONTY_MOLES) { SI_VAR(1) = 4; } else { SI_VAR(1) = 10; @@ -789,7 +789,7 @@ Script N(init_8024338C) = SCRIPT({ BindNpcHit(-1, N(hit_80242138)); BindNpcDefeat(NPC_SELF, N(defeat_80241F64)); EnableNpcShadow(NPC_MONTY_MOLE0, FALSE); - match STORY_PROGRESS { + match SI_STORY_PROGRESS { < STORY_CH6_ASKED_TO_DEFEAT_MONTY_MOLES { BindNpcIdle(NPC_SELF, N(idle_8024219C)); SetNpcAnimation(NPC_MONTY_MOLE0, NPC_ANIM(monty_mole, Palette_01, Anim_10)); @@ -812,7 +812,7 @@ Script N(init_802434CC) = SCRIPT({ BindNpcHit(-1, N(hit_80242138)); BindNpcDefeat(NPC_SELF, N(defeat_80241F64)); EnableNpcShadow(NPC_MONTY_MOLE1, FALSE); - match STORY_PROGRESS { + match SI_STORY_PROGRESS { < STORY_CH6_ASKED_TO_DEFEAT_MONTY_MOLES { BindNpcIdle(NPC_SELF, N(idle_80242618)); SetNpcAnimation(NPC_MONTY_MOLE1, NPC_ANIM(monty_mole, Palette_01, Anim_10)); @@ -835,7 +835,7 @@ Script N(init_8024360C) = SCRIPT({ BindNpcHit(-1, N(hit_80242138)); BindNpcDefeat(NPC_SELF, N(defeat_80241F64)); EnableNpcShadow(NPC_MONTY_MOLE2, FALSE); - match STORY_PROGRESS { + match SI_STORY_PROGRESS { < STORY_CH6_ASKED_TO_DEFEAT_MONTY_MOLES { BindNpcIdle(NPC_SELF, N(idle_80242A94)); SetNpcAnimation(NPC_MONTY_MOLE2, NPC_ANIM(monty_mole, Palette_01, Anim_10)); @@ -858,7 +858,7 @@ Script N(init_8024374C) = SCRIPT({ BindNpcHit(-1, N(hit_80242138)); BindNpcDefeat(NPC_SELF, N(defeat_80241F64)); EnableNpcShadow(NPC_MONTY_MOLE3, FALSE); - match STORY_PROGRESS { + match SI_STORY_PROGRESS { < STORY_CH6_ASKED_TO_DEFEAT_MONTY_MOLES { BindNpcIdle(NPC_SELF, N(idle_80242F10)); SetNpcAnimation(NPC_MONTY_MOLE3, NPC_ANIM(monty_mole, Palette_01, Anim_10)); diff --git a/src/world/area_flo/flo_07/CAC5D0.c b/src/world/area_flo/flo_07/CAC5D0.c index 6676f1a421..21e5890963 100644 --- a/src/world/area_flo/flo_07/CAC5D0.c +++ b/src/world/area_flo/flo_07/CAC5D0.c @@ -24,7 +24,7 @@ Script N(802407A0) = SCRIPT({ if (SI_VAR(0) == 1) { SetMusicTrack(0, SONG_SUNSHINE_RETURNS, 0, 8); } else { - match STORY_PROGRESS { + match SI_STORY_PROGRESS { < STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE { SetMusicTrack(0, SONG_FLOWER_FIELDS_CLOUDY, 0, 8); } else { @@ -110,7 +110,7 @@ Script N(80240C74) = SCRIPT({ }); Script N(main) = SCRIPT({ - WORLD_LOCATION = LOCATION_FLOWER_FIELDS; + SI_WORLD_LOCATION = LOCATION_FLOWER_FIELDS; SetSpriteShading(-1); SetCamLeadPlayer(0, 0); SetCamPerspective(0, 3, 25, 16, 4096); @@ -195,7 +195,7 @@ Script N(main) = SCRIPT({ spawn N(802424F4); } await N(802407A0); - if (STORY_PROGRESS >= STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) { + if (SI_STORY_PROGRESS >= STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) { N(SpawnSunEffect)(); } N(func_80240344_CAC534)(); @@ -285,13 +285,13 @@ Script N(80241DBC) = SCRIPT({ SI_AREA_FLAG(6) = 1; sleep 20; SpeakToPlayer(NPC_POSIE, NPC_ANIM(posie, Palette_00, Anim_2), NPC_ANIM(posie, Palette_00, Anim_1), 0, MESSAGE_ID(0x11, 0x006A)); - STORY_PROGRESS = STORY_CH6_GOT_CRYSTAL_BERRY; + SI_STORY_PROGRESS = STORY_CH6_GOT_CRYSTAL_BERRY; }); Script N(interact_80242044) = SCRIPT({ await N(8024086C); NpcFacePlayer(NPC_SELF, 1); - match STORY_PROGRESS { + match SI_STORY_PROGRESS { < STORY_CH6_GOT_MAGICAL_BEAN { if (SI_AREA_FLAG(5) == 0) { SpeakToPlayer(NPC_SELF, NPC_ANIM(posie, Palette_00, Anim_2), NPC_ANIM(posie, Palette_00, Anim_1), 0, MESSAGE_ID(0x11, @@ -312,7 +312,7 @@ Script N(interact_80242044) = SCRIPT({ SI_VAR(1) = 1; await N(80241BB4); AddKeyItem(ITEM_FERTILE_SOIL); - STORY_PROGRESS = STORY_CH6_GOT_FERTILE_SOIL; + SI_STORY_PROGRESS = STORY_CH6_GOT_FERTILE_SOIL; SpeakToPlayer(NPC_SELF, NPC_ANIM(posie, Palette_00, Anim_2), NPC_ANIM(posie, Palette_00, Anim_1), 0, MESSAGE_ID(0x11, 0x0066)); if (SI_SAVE_FLAG(1379) == 1) { await N(80241DBC); @@ -339,7 +339,7 @@ Script N(interact_80242044) = SCRIPT({ SpeakToPlayer(NPC_SELF, NPC_ANIM(posie, Palette_00, Anim_2), NPC_ANIM(posie, Palette_00, Anim_1), 0, MESSAGE_ID(0x11, 0x0072)); } else { - if (STORY_PROGRESS < STORY_CH6_GOT_WATER_STONE) { + if (SI_STORY_PROGRESS < STORY_CH6_GOT_WATER_STONE) { SpeakToPlayer(NPC_SELF, NPC_ANIM(posie, Palette_00, Anim_2), NPC_ANIM(posie, Palette_00, Anim_1), 0, MESSAGE_ID(0x11, 0x0073)); } else { @@ -361,7 +361,7 @@ Script N(interact_80242044) = SCRIPT({ }); Script N(init_80242428) = SCRIPT({ - if (STORY_PROGRESS == STORY_CH6_GOT_CRYSTAL_BERRY) { + if (SI_STORY_PROGRESS == STORY_CH6_GOT_CRYSTAL_BERRY) { if (SI_SAVE_FLAG(1374) == 0) { if (SI_SAVE_FLAG(1396) == 0) { MakeItemEntity(ITEM_CRYSTAL_BERRY, -225, 0, -25, 17, SI_SAVE_FLAG(1374)); @@ -397,12 +397,12 @@ const char N(flo_25_name_hack)[]; Script N(tree1_Callback) = SCRIPT({ DisablePlayerInput(TRUE); - if (STORY_PROGRESS < STORY_CH6_GOT_CRYSTAL_BERRY) { + if (SI_STORY_PROGRESS < STORY_CH6_GOT_CRYSTAL_BERRY) { NpcFacePlayer(NPC_POSIE, 1); sleep 10; SpeakToPlayer(NPC_POSIE, NPC_ANIM(posie, Palette_00, Anim_4), NPC_ANIM(posie, Palette_00, Anim_1), 0, MESSAGE_ID(0x11, 0x0067)); - if (STORY_PROGRESS == STORY_CH6_GOT_FERTILE_SOIL) { + if (SI_STORY_PROGRESS == STORY_CH6_GOT_FERTILE_SOIL) { if (SI_SAVE_FLAG(1379) == 1) { UseSettingsFrom(0, -250, 0, 0); SetPanTarget(0, -250, 0, 0); diff --git a/src/world/area_flo/flo_08/CAFAC0.c b/src/world/area_flo/flo_08/CAFAC0.c index 425581c842..f950c6fd81 100644 --- a/src/world/area_flo/flo_08/CAFAC0.c +++ b/src/world/area_flo/flo_08/CAFAC0.c @@ -36,7 +36,7 @@ MapConfig N(config) = { }; Script N(80241F40) = SCRIPT({ - match STORY_PROGRESS { + match SI_STORY_PROGRESS { < STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE { SetMusicTrack(0, SONG_FLOWER_FIELDS_CLOUDY, 0, 8); } else { @@ -239,7 +239,7 @@ s32 N(lavaResetList_80242A2C)[] = { }; Script N(main) = SCRIPT({ - WORLD_LOCATION = LOCATION_FLOWER_FIELDS; + SI_WORLD_LOCATION = LOCATION_FLOWER_FIELDS; SetSpriteShading(-1); SetCamLeadPlayer(0, 0); SetCamPerspective(0, 3, 25, 16, 4096); @@ -300,7 +300,7 @@ Script N(main) = SCRIPT({ SI_VAR(0) = N(802429E4); spawn EnterWalk; await N(80241F40); - if (STORY_PROGRESS >= STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) { + if (SI_STORY_PROGRESS >= STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) { N(func_80240D40_CAFA80)(); } }); @@ -545,7 +545,7 @@ Script N(interact_80243214) = SCRIPT({ } sleep 10; } else { - if (STORY_PROGRESS < STORY_CH6_STAR_SPIRIT_RESCUED) { + if (SI_STORY_PROGRESS < STORY_CH6_STAR_SPIRIT_RESCUED) { SpeakToPlayer(NPC_SELF, NPC_ANIM(gate_flower, Palette_02, Anim_9), NPC_ANIM(gate_flower, Palette_02, Anim_8), 0, MESSAGE_ID(0x11, 0x0047)); } else { diff --git a/src/world/area_flo/flo_09/CB50E0.c b/src/world/area_flo/flo_09/CB50E0.c index 858b006af4..4dbb5330f6 100644 --- a/src/world/area_flo/flo_09/CB50E0.c +++ b/src/world/area_flo/flo_09/CB50E0.c @@ -24,7 +24,7 @@ MapConfig N(config) = { }; Script N(80241880) = SCRIPT({ - match STORY_PROGRESS { + match SI_STORY_PROGRESS { < STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE { SetMusicTrack(0, SONG_FLOWER_FIELDS_CLOUDY, 0, 8); } else { @@ -82,7 +82,7 @@ Script N(80241C54) = SCRIPT({ }); Script N(main) = SCRIPT({ - WORLD_LOCATION = LOCATION_FLOWER_FIELDS; + SI_WORLD_LOCATION = LOCATION_FLOWER_FIELDS; SetSpriteShading(-1); SetCamPerspective(0, 3, 25, 16, 4096); SetCamBGColor(0, 0, 0, 0); @@ -132,7 +132,7 @@ Script N(main) = SCRIPT({ SI_VAR(0) = N(80241C54); spawn EnterWalk; await N(80241880); - if (STORY_PROGRESS >= STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) { + if (SI_STORY_PROGRESS >= STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) { N(func_80240000_CB5000)(); } }); diff --git a/src/world/area_flo/flo_10/CB9200.c b/src/world/area_flo/flo_10/CB9200.c index a1e501ea8e..6f1828714d 100644 --- a/src/world/area_flo/flo_10/CB9200.c +++ b/src/world/area_flo/flo_10/CB9200.c @@ -1,7 +1,7 @@ #include "flo_10.h" s32 N(func_80240000_CB9200)(void) { - if (get_variable(NULL, SI_SAVE_VAR(0)) <= 0x30) { + if (get_variable(NULL, SI_STORY_PROGRESS) <= 0x30) { return MESSAGE_ID(0x19, 0x0119); } return MESSAGE_ID(0x19, 0x011A); diff --git a/src/world/area_flo/flo_10/CB9280.c b/src/world/area_flo/flo_10/CB9280.c index 8e90ad21e4..b03eb00d17 100644 --- a/src/world/area_flo/flo_10/CB9280.c +++ b/src/world/area_flo/flo_10/CB9280.c @@ -25,7 +25,7 @@ Script N(802414E0) = SCRIPT({ if (SI_VAR(0) == 1) { SetMusicTrack(0, SONG_SUNSHINE_RETURNS, 0, 8); } else { - match STORY_PROGRESS { + match SI_STORY_PROGRESS { < STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE { SetMusicTrack(0, SONG_FLOWER_FIELDS_CLOUDY, 0, 8); } else { @@ -33,7 +33,7 @@ Script N(802414E0) = SCRIPT({ } } } - if (STORY_PROGRESS >= STORY_CH6_FILLED_SPRING_WITH_WATER) { + if (SI_STORY_PROGRESS >= STORY_CH6_FILLED_SPRING_WITH_WATER) { PlaySound(0x80000022); } }); @@ -53,7 +53,7 @@ static s32 N(pad_1624)[] = { }; Script N(80241630) = SCRIPT({ - if (STORY_PROGRESS >= STORY_CH6_FILLED_SPRING_WITH_WATER) { + if (SI_STORY_PROGRESS >= STORY_CH6_FILLED_SPRING_WITH_WATER) { MakeItemEntity(ITEM_WATER_STONE, 0, -60, 6, 1, 0); } }); @@ -108,7 +108,7 @@ Script N(80241988) = SCRIPT({ }); Script N(main) = SCRIPT({ - WORLD_LOCATION = LOCATION_FLOWER_FIELDS; + SI_WORLD_LOCATION = LOCATION_FLOWER_FIELDS; SetSpriteShading(-1); SetCamLeadPlayer(0, 0); SetCamPerspective(0, 3, 25, 16, 4096); @@ -155,7 +155,7 @@ Script N(main) = SCRIPT({ } } await N(802414E0); - if (STORY_PROGRESS >= STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) { + if (SI_STORY_PROGRESS >= STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) { N(func_80240040_CB9240)(); } }); @@ -419,7 +419,7 @@ Script N(802427EC) = SCRIPT({ }); Script N(80242AE8) = SCRIPT({ - if (STORY_PROGRESS < STORY_CH6_FILLED_SPRING_WITH_WATER) { + if (SI_STORY_PROGRESS < STORY_CH6_FILLED_SPRING_WITH_WATER) { EnableGroup(52, 0); EnableGroup(61, 0); ModifyColliderFlags(0, 21, 0x7FFFFE00); @@ -534,7 +534,7 @@ Script N(80242AE8) = SCRIPT({ SI_VAR(12) = 0; spawn N(updateTexturePan_80241D14); } - if (STORY_PROGRESS >= STORY_CH6_FILLED_SPRING_WITH_WATER) { + if (SI_STORY_PROGRESS >= STORY_CH6_FILLED_SPRING_WITH_WATER) { spawn N(80241F20); } }); @@ -650,7 +650,7 @@ Script N(80243628) = SCRIPT({ Script N(interact_802437C8) = SCRIPT({ await N(802415C4); - match STORY_PROGRESS { + match SI_STORY_PROGRESS { < STORY_CH6_GOT_MAGICAL_BEAN { spawn N(80243628); GetNpcPos(NPC_SELF, SI_VAR(0), SI_VAR(1), SI_VAR(2)); @@ -736,7 +736,7 @@ Script N(interact_802437C8) = SCRIPT({ Script N(init_80243D78) = SCRIPT({ BindNpcInteract(NPC_SELF, N(interact_802437C8)); - match STORY_PROGRESS { + match SI_STORY_PROGRESS { < STORY_CH6_GOT_WATER_STONE { if (SI_SAVE_FLAG(1375) == 0) { SetNpcAnimation(NPC_SELF, NPC_ANIM(lily, Palette_00, Anim_8)); diff --git a/src/world/area_flo/flo_10/CB96B0.c b/src/world/area_flo/flo_10/CB96B0.c index 2f54fb71e1..08d22bd0fd 100644 --- a/src/world/area_flo/flo_10/CB96B0.c +++ b/src/world/area_flo/flo_10/CB96B0.c @@ -81,7 +81,7 @@ void N(func_802404B0_CB96B0)(s32 arg0, s32 arg1, s32 arg2, s32 arg3) { } gDPSetPrimColor(gMasterGfxPos++, 0, 0, 255, 255, 255, phi_a2); - gDPSetTextureImage(gMasterGfxPos++, G_IM_FMT_RGBA, G_IM_SIZ_16b, 320, osVirtualToPhysical(subroutine_arg6)); + gDPSetTextureImage(gMasterGfxPos++, G_IM_FMT_RGBA, G_IM_SIZ_16b, SCREEN_WIDTH, osVirtualToPhysical(subroutine_arg6)); gDPSetTile(gMasterGfxPos++, G_IM_FMT_RGBA, G_IM_SIZ_16b, 0, (phi_s4 - phi_s6) / 6, G_TX_LOADTILE, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOMIRROR | G_TX_WRAP, 9, G_TX_NOLOD); @@ -114,7 +114,7 @@ void N(func_802404B0_CB96B0)(s32 arg0, s32 arg1, s32 arg2, s32 arg3) { } gDPSetPrimColor(gMasterGfxPos++, 0, 0, 255, 255, 255, phi_a2); - gDPSetTextureImage(gMasterGfxPos++, G_IM_FMT_RGBA, G_IM_SIZ_16b, 320, osVirtualToPhysical(subroutine_arg6)); + gDPSetTextureImage(gMasterGfxPos++, G_IM_FMT_RGBA, G_IM_SIZ_16b, SCREEN_WIDTH, osVirtualToPhysical(subroutine_arg6)); gDPSetTile(gMasterGfxPos++, G_IM_FMT_RGBA, G_IM_SIZ_16b, 0, (phi_s4 - phi_s6) / 6, G_TX_LOADTILE, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOMIRROR | G_TX_WRAP, 9, G_TX_NOLOD); gDPLoadSync(gMasterGfxPos++); @@ -292,7 +292,7 @@ void N(func_80240A98_CB9C98)(void) { gDPSetCycleType(gMasterGfxPos++, G_CYC_1CYCLE); gDPSetRenderMode(gMasterGfxPos++, Z_CMP | CVG_DST_CLAMP | ZMODE_OPA | FORCE_BL | G_RM_PASS, Z_CMP | CVG_DST_CLAMP | ZMODE_OPA | FORCE_BL | GBL_c2(G_BL_CLR_IN, G_BL_0, G_BL_CLR_IN, G_BL_1)); - gDPSetColorImage(gMasterGfxPos++, G_IM_FMT_RGBA, G_IM_SIZ_16b, 320, osVirtualToPhysical(nuGfxZBuffer)); + gDPSetColorImage(gMasterGfxPos++, G_IM_FMT_RGBA, G_IM_SIZ_16b, SCREEN_WIDTH, osVirtualToPhysical(nuGfxZBuffer)); gDPSetCombineLERP(gMasterGfxPos++, 0, 0, 0, PRIMITIVE, 0, 0, 0, 0, 0, 0, 0, PRIMITIVE, 0, 0, 0, 0); gDPSetPrimColor(gMasterGfxPos++, 0, 0, 248, 240, 240, 0); gDPPipeSync(gMasterGfxPos++); @@ -300,7 +300,7 @@ void N(func_80240A98_CB9C98)(void) { gSPDisplayList(gMasterGfxPos++, model->modelNode->displayData->displayList); gDPPipeSync(gMasterGfxPos++); - gDPSetColorImage(gMasterGfxPos++, G_IM_FMT_RGBA, G_IM_SIZ_16b, 320, osVirtualToPhysical(D_8009A64C)); + gDPSetColorImage(gMasterGfxPos++, G_IM_FMT_RGBA, G_IM_SIZ_16b, SCREEN_WIDTH, osVirtualToPhysical(D_8009A64C)); gDPSetDepthSource(gMasterGfxPos++, G_ZS_PRIM); gDPSetPrimDepth(gMasterGfxPos++, 32734, 0); gDPSetRenderMode(gMasterGfxPos++, G_RM_ZB_XLU_DECAL, G_RM_ZB_XLU_DECAL2); diff --git a/src/world/area_flo/flo_11/CBDCD0.c b/src/world/area_flo/flo_11/CBDCD0.c index 31d027f5c8..9dcaaa53e9 100644 --- a/src/world/area_flo/flo_11/CBDCD0.c +++ b/src/world/area_flo/flo_11/CBDCD0.c @@ -27,7 +27,7 @@ MapConfig N(config) = { }; Script N(802403E0) = SCRIPT({ - match STORY_PROGRESS { + match SI_STORY_PROGRESS { < STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE { SetMusicTrack(0, SONG_FLOWER_FIELDS_CLOUDY, 0, 8); } else { @@ -379,7 +379,7 @@ Script N(80241698) = SCRIPT({ }); Script N(main) = SCRIPT({ - WORLD_LOCATION = LOCATION_FLOWER_FIELDS; + SI_WORLD_LOCATION = LOCATION_FLOWER_FIELDS; SetSpriteShading(-1); SetCamLeadPlayer(0, 0); SetCamPerspective(0, 3, 25, 16, 4096); @@ -402,7 +402,7 @@ Script N(main) = SCRIPT({ sleep 1; } await N(802403E0); - if (STORY_PROGRESS >= STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) { + if (SI_STORY_PROGRESS >= STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) { N(func_802402E0_CBDFB0)(); } ModifyColliderFlags(3, 9, 0x00000009); @@ -578,7 +578,7 @@ Script N(80242240) = SCRIPT({ if (SI_SAVE_FLAG(1377) == 1) { return; } - if (STORY_PROGRESS < STORY_CH6_GOT_MAGICAL_BEAN) { + if (SI_STORY_PROGRESS < STORY_CH6_GOT_MAGICAL_BEAN) { return; } if (SI_SAVE_FLAG(1375) == 0) { @@ -718,7 +718,7 @@ Script N(defeat_80242AC4) = SCRIPT({ Script N(init_80242B58) = SCRIPT({ SetNpcPos(NPC_LAKITU0, 0, -1000, 0); if (SI_SAVE_FLAG(1377) == 0) { - if (STORY_PROGRESS >= STORY_CH6_GOT_MAGICAL_BEAN) { + if (SI_STORY_PROGRESS >= STORY_CH6_GOT_MAGICAL_BEAN) { if (SI_SAVE_FLAG(1375) == 1) { SI_MAP_VAR(0) = 0; BindNpcIdle(NPC_SELF, N(idle_80242810)); @@ -733,7 +733,7 @@ Script N(init_80242B58) = SCRIPT({ Script N(init_80242C38) = SCRIPT({ SetNpcPos(NPC_LAKITU1, 0, -1000, 0); if (SI_SAVE_FLAG(1377) == 0) { - if (STORY_PROGRESS >= STORY_CH6_GOT_MAGICAL_BEAN) { + if (SI_STORY_PROGRESS >= STORY_CH6_GOT_MAGICAL_BEAN) { if (SI_SAVE_FLAG(1375) == 1) { BindNpcDefeat(NPC_SELF, N(defeat_80242AC4)); SetNpcPos(NPC_LAKITU1, 200, 110, 29); diff --git a/src/world/area_flo/flo_12/CC0E70.c b/src/world/area_flo/flo_12/CC0E70.c index 06754abb0a..fd3306bc38 100644 --- a/src/world/area_flo/flo_12/CC0E70.c +++ b/src/world/area_flo/flo_12/CC0E70.c @@ -27,7 +27,7 @@ Script N(80240750) = SCRIPT({ if (SI_VAR(0) == 1) { SetMusicTrack(0, SONG_SUNSHINE_RETURNS, 0, 8); } else { - match STORY_PROGRESS { + match SI_STORY_PROGRESS { < STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE { SetMusicTrack(0, SONG_FLOWER_FIELDS_CLOUDY, 0, 8); } else { @@ -97,7 +97,7 @@ Script N(80240B78) = SCRIPT({ }); Script N(main) = SCRIPT({ - WORLD_LOCATION = LOCATION_FLOWER_FIELDS; + SI_WORLD_LOCATION = LOCATION_FLOWER_FIELDS; SetSpriteShading(-1); SetCamLeadPlayer(0, 0); SetCamPerspective(0, 3, 25, 16, 4096); @@ -133,7 +133,7 @@ Script N(main) = SCRIPT({ spawn EnterWalk; } await N(80240750); - if (STORY_PROGRESS >= STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) { + if (SI_STORY_PROGRESS >= STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) { N(func_80240000_CC0E30)(); } }); @@ -250,7 +250,7 @@ Script N(80241BE4) = SCRIPT({ Script N(interact_80241C8C) = SCRIPT({ await N(8024080C); - match STORY_PROGRESS { + match SI_STORY_PROGRESS { < STORY_CH6_GOT_CRYSTAL_BERRY { match SI_SAVE_FLAG(1378) { == 0 { @@ -349,7 +349,7 @@ Script N(interact_80241C8C) = SCRIPT({ SpeakToPlayer(NPC_SELF, NPC_ANIM(rosie, Palette_00, Anim_4), NPC_ANIM(rosie, Palette_00, Anim_2), 5, MESSAGE_ID(0x11, 0x0096)); SI_AREA_FLAG(22) = 1; - STORY_PROGRESS = STORY_CH6_GOT_WATER_STONE; + SI_STORY_PROGRESS = STORY_CH6_GOT_WATER_STONE; } } } @@ -381,7 +381,7 @@ Script N(init_802423D0) = SCRIPT({ SetNpcPos(NPC_ROSIE1, SI_VAR(0), SI_VAR(1), SI_VAR(2)); SetNpcFlagBits(NPC_ROSIE1, ((0x00000002)), TRUE); SetNpcFlagBits(NPC_ROSIE1, ((NPC_FLAG_HAS_SHADOW)), TRUE); - match STORY_PROGRESS { + match SI_STORY_PROGRESS { < STORY_CH6_GOT_CRYSTAL_BERRY { if (SI_SAVE_FLAG(1378) == 1) { SetNpcFlagBits(NPC_ROSIE1, ((NPC_FLAG_100)), FALSE); diff --git a/src/world/area_flo/flo_13/CC3850.c b/src/world/area_flo/flo_13/CC3850.c index 88ebaac4ea..de75c2eb96 100644 --- a/src/world/area_flo/flo_13/CC3850.c +++ b/src/world/area_flo/flo_13/CC3850.c @@ -38,7 +38,7 @@ Script N(802436D0) = SCRIPT({ goto 10; } 0: - match STORY_PROGRESS { + match SI_STORY_PROGRESS { < STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE { SetMusicTrack(0, SONG_FLOWER_FIELDS_CLOUDY, 0, 8); } else { @@ -53,7 +53,7 @@ Script N(802436D0) = SCRIPT({ sleep 1; } 10: - match STORY_PROGRESS { + match SI_STORY_PROGRESS { < STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE { SetMusicTrack(0, SONG_SUN_TOWER_CLOUDY, 0, 8); } else { @@ -156,7 +156,7 @@ Script N(80243DA4) = SCRIPT({ }); Script N(main) = SCRIPT({ - WORLD_LOCATION = LOCATION_FLOWER_FIELDS; + SI_WORLD_LOCATION = LOCATION_FLOWER_FIELDS; SetSpriteShading(-1); SetCamLeadPlayer(0, 0); SetCamPerspective(0, 3, 25, 16, 4096); @@ -200,7 +200,7 @@ Script N(main) = SCRIPT({ SI_VAR(0) = N(80243DA4); spawn EnterWalk; await N(802438B0); - if (STORY_PROGRESS >= STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) { + if (SI_STORY_PROGRESS >= STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) { N(func_80240000_CC3810)(); } }); @@ -343,7 +343,7 @@ Script N(80244560) = SCRIPT({ SI_VAR(2) = SI_VAR(5); GetAngleBetweenNPCs(-4, 1, SI_VAR(10)); InterpNpcYaw(NPC_PARTNER, SI_VAR(10), 0); - if (STORY_PROGRESS < STORY_CH6_LAKILESTER_JOINED_PARTY) { + if (SI_STORY_PROGRESS < STORY_CH6_LAKILESTER_JOINED_PARTY) { GetAngleBetweenNPCs(0, 1, SI_VAR(11)); InterpNpcYaw(NPC_WORLD_LAKILESTER, SI_VAR(11), 0); } @@ -439,7 +439,7 @@ Script N(80244888) = SCRIPT({ }); Script N(idle_80244BF8) = SCRIPT({ - if (STORY_PROGRESS != STORY_CH6_SPOKE_WITH_THE_SUN) { + if (SI_STORY_PROGRESS != STORY_CH6_SPOKE_WITH_THE_SUN) { return; } AwaitPlayerApproach(200, 20, 275); @@ -716,7 +716,7 @@ Script N(80245444) = SCRIPT({ spawn N(802438F8); sleep 10; PanToTarget(0, 0, 0); - STORY_PROGRESS = STORY_CH6_LAKILESTER_JOINED_PARTY; + SI_STORY_PROGRESS = STORY_CH6_LAKILESTER_JOINED_PARTY; EnablePartnerAI(); DisablePlayerInput(FALSE); await N(80245014); @@ -748,7 +748,7 @@ Script N(defeat_80246038) = SCRIPT({ }); Script N(interact_802461C0) = SCRIPT({ - if (STORY_PROGRESS <= STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) { + if (SI_STORY_PROGRESS <= STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) { SpeakToPlayer(NPC_LAKILULU0, NPC_ANIM(lakilulu, Palette_00, Anim_4), NPC_ANIM(lakilulu, Palette_00, Anim_1), 0, MESSAGE_ID(0x11, 0x0032)); } else { @@ -764,17 +764,17 @@ Script N(interact_802461C0) = SCRIPT({ }); Script N(init_80246280) = SCRIPT({ - if (STORY_PROGRESS < STORY_CH6_LAKILESTER_JOINED_PARTY) { + if (SI_STORY_PROGRESS < STORY_CH6_LAKILESTER_JOINED_PARTY) { BindNpcIdle(NPC_SELF, N(idle_80244BF8)); BindNpcDefeat(NPC_SELF, N(defeat_80246038)); } }); Script N(init_802462D0) = SCRIPT({ - if (STORY_PROGRESS < STORY_CH6_BEGAN_PEACH_MISSION) { + if (SI_STORY_PROGRESS < STORY_CH6_BEGAN_PEACH_MISSION) { BindNpcInteract(NPC_SELF, N(interact_802461C0)); SetNpcCollisionSize(-1, 36, 28); - if (STORY_PROGRESS >= STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) { + if (SI_STORY_PROGRESS >= STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) { SetNpcPos(NPC_SELF, -50, 180, -50); } } else { @@ -788,13 +788,13 @@ Script N(init_80246370) = SCRIPT({ }); Script N(init_802463B0) = SCRIPT({ - if (STORY_PROGRESS == STORY_CH6_SPOKE_WITH_THE_SUN) { + if (SI_STORY_PROGRESS == STORY_CH6_SPOKE_WITH_THE_SUN) { RemoveNpc(NPC_SELF); } }); Script N(init_802463E8) = SCRIPT({ - if (STORY_PROGRESS == STORY_CH6_SPOKE_WITH_THE_SUN) { + if (SI_STORY_PROGRESS == STORY_CH6_SPOKE_WITH_THE_SUN) { RemoveNpc(NPC_SELF); } SetSelfVar(13, 1); diff --git a/src/world/area_flo/flo_14/CCB310.c b/src/world/area_flo/flo_14/CCB310.c index 191f0d95ab..49609340d3 100644 --- a/src/world/area_flo/flo_14/CCB310.c +++ b/src/world/area_flo/flo_14/CCB310.c @@ -15,7 +15,7 @@ MapConfig N(config) = { }; Script N(802423F0) = SCRIPT({ - match STORY_PROGRESS { + match SI_STORY_PROGRESS { < STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE { SetMusicTrack(0, SONG_FLOWER_FIELDS_CLOUDY, 0, 8); } else { @@ -58,7 +58,7 @@ s32 N(lavaResetList_802425FC)[] = { }; Script N(main) = SCRIPT({ - WORLD_LOCATION = LOCATION_FLOWER_FIELDS; + SI_WORLD_LOCATION = LOCATION_FLOWER_FIELDS; SetSpriteShading(-1); SetCamPerspective(0, 3, 25, 16, 4096); SetCamBGColor(0, 0, 0, 0); @@ -133,7 +133,7 @@ Script N(main) = SCRIPT({ SI_VAR(0) = N(802425B4); spawn EnterWalk; await N(802423F0); - if (STORY_PROGRESS >= STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) { + if (SI_STORY_PROGRESS >= STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) { N(func_8024030C_CCB61C)(); } }); diff --git a/src/world/area_flo/flo_15/CD06C0.c b/src/world/area_flo/flo_15/CD06C0.c index 5b976394d0..35d88331f8 100644 --- a/src/world/area_flo/flo_15/CD06C0.c +++ b/src/world/area_flo/flo_15/CD06C0.c @@ -25,7 +25,7 @@ Script N(80240060) = SCRIPT({ if (SI_VAR(0) == 1) { SetMusicTrack(0, SONG_SUNSHINE_RETURNS, 0, 8); } else { - match STORY_PROGRESS { + match SI_STORY_PROGRESS { < STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE { SetMusicTrack(0, SONG_SUN_TOWER_CLOUDY, 0, 8); } else { @@ -46,7 +46,7 @@ Script N(8024017C) = SCRIPT({ }); Script N(main) = SCRIPT({ - WORLD_LOCATION = LOCATION_FLOWER_FIELDS; + SI_WORLD_LOCATION = LOCATION_FLOWER_FIELDS; SetSpriteShading(-1); SetCamLeadPlayer(0, 0); SetCamPerspective(0, 3, 25, 16, 4096); @@ -78,7 +78,7 @@ NpcSettings N(npcSettings_80240300) = { }; Script N(8024032C) = SCRIPT({ - if (STORY_PROGRESS < STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) { + if (SI_STORY_PROGRESS < STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) { SI_VAR(3) = 7; SI_VAR(4) = 5; } else { @@ -203,7 +203,7 @@ Script N(8024094C) = SCRIPT({ }); Script N(interact_80240B28) = SCRIPT({ - match STORY_PROGRESS { + match SI_STORY_PROGRESS { < STORY_CH6_SPOKE_WITH_THE_SUN { SpeakToPlayer(NPC_SUN0, NPC_ANIM(sun, Palette_00, Anim_7), NPC_ANIM(sun, Palette_00, Anim_1), 517, MESSAGE_ID(0x11, 0x009A)); SetPlayerAnimation(ANIM_THINKING); @@ -212,7 +212,7 @@ Script N(interact_80240B28) = SCRIPT({ sleep 20; SetPlayerAnimation(ANIM_10002); SpeakToPlayer(NPC_SUN0, NPC_ANIM(sun, Palette_00, Anim_7), NPC_ANIM(sun, Palette_00, Anim_1), 517, MESSAGE_ID(0x11, 0x009B)); - STORY_PROGRESS = STORY_CH6_SPOKE_WITH_THE_SUN; + SI_STORY_PROGRESS = STORY_CH6_SPOKE_WITH_THE_SUN; } < STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE { SpeakToPlayer(NPC_SUN0, NPC_ANIM(sun, Palette_00, Anim_7), NPC_ANIM(sun, Palette_00, Anim_1), 517, MESSAGE_ID(0x11, 0x009C)); @@ -237,7 +237,7 @@ Script N(interact_80240B28) = SCRIPT({ Script N(init_80240CD0) = SCRIPT({ SetNpcCollisionSize(10, 64, 40); EnableNpcShadow(NPC_SUN0, FALSE); - if (STORY_PROGRESS < STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) { + if (SI_STORY_PROGRESS < STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) { SetNpcPos(NPC_SUN0, 0, 270, 0); BindNpcInteract(NPC_SELF, N(interact_80240B28)); spawn N(8024032C); @@ -256,7 +256,7 @@ Script N(init_80240DB4) = SCRIPT({ SetNpcPaletteSwapMode(11, 3); SetNpcPaletteSwapping(10, 0, 1, 5, 5, 13, 5, 0, 0); SetNpcPaletteSwapping(11, 0, 1, 5, 5, 13, 5, 0, 0); - if (STORY_PROGRESS < STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) { + if (SI_STORY_PROGRESS < STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) { SetNpcPos(NPC_SUN1, 0, 270, -5); } else { SetNpcPos(NPC_SUN1, 0, 450, -5); diff --git a/src/world/area_flo/flo_16/CD1F10.c b/src/world/area_flo/flo_16/CD1F10.c index b2a60542a4..dcc1385726 100644 --- a/src/world/area_flo/flo_16/CD1F10.c +++ b/src/world/area_flo/flo_16/CD1F10.c @@ -19,7 +19,7 @@ MapConfig N(config) = { }; Script N(802429D0) = SCRIPT({ - match STORY_PROGRESS { + match SI_STORY_PROGRESS { < STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE { SetMusicTrack(0, SONG_FLOWER_FIELDS_CLOUDY, 0, 8); } else { @@ -43,7 +43,7 @@ s32 N(lavaResetList_80242B40)[] = { }; Script N(main) = SCRIPT({ - WORLD_LOCATION = LOCATION_FLOWER_FIELDS; + SI_WORLD_LOCATION = LOCATION_FLOWER_FIELDS; SetSpriteShading(-1); SetCamPerspective(0, 3, 25, 16, 4096); SetCamBGColor(0, 0, 0, 0); @@ -88,7 +88,7 @@ Script N(main) = SCRIPT({ SI_VAR(0) = N(80242AF8); spawn EnterWalk; await N(802429D0); - if (STORY_PROGRESS >= STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) { + if (SI_STORY_PROGRESS >= STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) { N(func_80240000_CD1E30)(); } }); diff --git a/src/world/area_flo/flo_17/CD7350.c b/src/world/area_flo/flo_17/CD7350.c index caa244c308..dfea4d84c9 100644 --- a/src/world/area_flo/flo_17/CD7350.c +++ b/src/world/area_flo/flo_17/CD7350.c @@ -26,7 +26,7 @@ MapConfig N(config) = { }; Script N(80243280) = SCRIPT({ - match STORY_PROGRESS { + match SI_STORY_PROGRESS { < STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE { SetMusicTrack(0, SONG_FLOWER_FIELDS_CLOUDY, 0, 8); } else { @@ -97,7 +97,7 @@ s32 N(lavaResetList_8024369C)[] = { }; Script N(main) = SCRIPT({ - WORLD_LOCATION = LOCATION_FLOWER_FIELDS; + SI_WORLD_LOCATION = LOCATION_FLOWER_FIELDS; SetSpriteShading(-1); SetCamPerspective(0, 3, 25, 16, 4096); SetCamBGColor(0, 0, 0, 0); @@ -209,7 +209,7 @@ Script N(main) = SCRIPT({ SI_VAR(0) = N(80243654); spawn EnterWalk; await N(80243280); - if (STORY_PROGRESS >= STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) { + if (SI_STORY_PROGRESS >= STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) { N(func_80240000_CD72E0)(); } }); diff --git a/src/world/area_flo/flo_18/CDC6A0.c b/src/world/area_flo/flo_18/CDC6A0.c index 4f0b9c60a8..3e642259f6 100644 --- a/src/world/area_flo/flo_18/CDC6A0.c +++ b/src/world/area_flo/flo_18/CDC6A0.c @@ -27,7 +27,7 @@ MapConfig N(config) = { }; Script N(80240830) = SCRIPT({ - match STORY_PROGRESS { + match SI_STORY_PROGRESS { < STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE { SetMusicTrack(0, SONG_PUFF_PUFF_MACHINE, 0, 8); PlaySoundAtCollider(20, 0x80000025, 0); @@ -68,7 +68,7 @@ s32 N(lavaResetList_802409E4)[] = { }; Script N(main) = SCRIPT({ - WORLD_LOCATION = LOCATION_FLOWER_FIELDS; + SI_WORLD_LOCATION = LOCATION_FLOWER_FIELDS; SetSpriteShading(-1); SetCamLeadPlayer(0, 0); SetCamPerspective(0, 3, 25, 16, 4096); @@ -135,7 +135,7 @@ Script N(main) = SCRIPT({ spawn N(802409B8); } await N(80240830); - if (STORY_PROGRESS >= STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) { + if (SI_STORY_PROGRESS >= STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) { N(func_8024030C_CDC9AC)(); } }); @@ -691,7 +691,7 @@ Script N(80242E28) = SCRIPT({ PlaySound(0x1E5); await N(802413F0); SI_VAR(0) = SI_VAR(10); - if (STORY_PROGRESS < STORY_CH6_DEFEATED_PUFF_PUFF_GUARDS) { + if (SI_STORY_PROGRESS < STORY_CH6_DEFEATED_PUFF_PUFF_GUARDS) { SI_MAP_FLAG(1) = 1; return; } @@ -790,7 +790,7 @@ Script N(80242E28) = SCRIPT({ DisablePlayerPhysics(TRUE); sleep 30; await N(80242B18); - STORY_PROGRESS = STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE; + SI_STORY_PROGRESS = STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE; GotoMap("flo_15", 1); sleep 70; return; @@ -809,7 +809,7 @@ Vec4f N(triggerCoord_8024369C) = { 50.0f, 0.0f, -10.0, 0.0f }; Vec4f N(triggerCoord_802436AC) = { 105.0f, 0.0f, -10.0, 0.0f }; Script N(802436BC) = SCRIPT({ - if (STORY_PROGRESS >= STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) { + if (SI_STORY_PROGRESS >= STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) { EnableModel(49, 0); ModifyColliderFlags(0, 19, 0x7FFFFE00); EnableModel(31, 0); @@ -1114,7 +1114,7 @@ Script N(80244774) = SCRIPT({ sleep 20; PutPartnerAway(); ResetCam(0, 4.0); - STORY_PROGRESS = STORY_CH6_DEFEATED_PUFF_PUFF_GUARDS; + SI_STORY_PROGRESS = STORY_CH6_DEFEATED_PUFF_PUFF_GUARDS; DisablePlayerInput(FALSE); AwaitPlayerApproach(-250, 0, 50); DisablePlayerInput(TRUE); @@ -1245,7 +1245,7 @@ Script N(80245004) = SCRIPT({ }); Script N(80245108) = SCRIPT({ - if (STORY_PROGRESS >= STORY_CH6_DEFEATED_PUFF_PUFF_GUARDS) { + if (SI_STORY_PROGRESS >= STORY_CH6_DEFEATED_PUFF_PUFF_GUARDS) { return; } DisablePlayerInput(TRUE); @@ -1300,7 +1300,7 @@ Script N(80245324) = SCRIPT({ }); Script N(80245378) = SCRIPT({ - if (STORY_PROGRESS >= STORY_CH6_DEFEATED_PUFF_PUFF_GUARDS) { + if (SI_STORY_PROGRESS >= STORY_CH6_DEFEATED_PUFF_PUFF_GUARDS) { return; } DisablePlayerInput(TRUE); @@ -1430,7 +1430,7 @@ Script N(interact_802457D4) = SCRIPT({ }); Script N(init_80245AA8) = SCRIPT({ - if (STORY_PROGRESS < STORY_CH6_DEFEATED_PUFF_PUFF_GUARDS) { + if (SI_STORY_PROGRESS < STORY_CH6_DEFEATED_PUFF_PUFF_GUARDS) { BindNpcIdle(NPC_SELF, N(idle_80244B3C)); BindNpcInteract(NPC_SELF, N(interact_802457D4)); BindNpcDefeat(NPC_SELF, N(defeat_80244C84)); @@ -1440,7 +1440,7 @@ Script N(init_80245AA8) = SCRIPT({ }); Script N(init_80245B30) = SCRIPT({ - if (STORY_PROGRESS < STORY_CH6_DEFEATED_PUFF_PUFF_GUARDS) { + if (SI_STORY_PROGRESS < STORY_CH6_DEFEATED_PUFF_PUFF_GUARDS) { BindNpcDefeat(NPC_SELF, N(defeat_80244C84)); } else { SetNpcPos(NPC_SELF, 0, -1000, 0); @@ -1448,7 +1448,7 @@ Script N(init_80245B30) = SCRIPT({ }); Script N(init_80245B90) = SCRIPT({ - if (STORY_PROGRESS < STORY_CH6_DEFEATED_PUFF_PUFF_GUARDS) { + if (SI_STORY_PROGRESS < STORY_CH6_DEFEATED_PUFF_PUFF_GUARDS) { BindNpcInteract(NPC_SELF, N(interact_802457D4)); BindNpcDefeat(NPC_SELF, N(defeat_80244C84)); } else { @@ -1457,7 +1457,7 @@ Script N(init_80245B90) = SCRIPT({ }); Script N(init_80245C04) = SCRIPT({ - if (STORY_PROGRESS < STORY_CH6_DEFEATED_PUFF_PUFF_GUARDS) { + if (SI_STORY_PROGRESS < STORY_CH6_DEFEATED_PUFF_PUFF_GUARDS) { BindNpcInteract(NPC_SELF, N(interact_802457D4)); BindNpcDefeat(NPC_SELF, N(defeat_80244C84)); } else { @@ -1466,7 +1466,7 @@ Script N(init_80245C04) = SCRIPT({ }); Script N(init_80245C78) = SCRIPT({ - if (STORY_PROGRESS < STORY_CH6_DEFEATED_PUFF_PUFF_GUARDS) { + if (SI_STORY_PROGRESS < STORY_CH6_DEFEATED_PUFF_PUFF_GUARDS) { BindNpcInteract(NPC_SELF, N(interact_802457D4)); BindNpcDefeat(NPC_SELF, N(defeat_80244C84)); } else { diff --git a/src/world/area_flo/flo_19/CE36F0.c b/src/world/area_flo/flo_19/CE36F0.c index 6f1a3d1573..2a587582d3 100644 --- a/src/world/area_flo/flo_19/CE36F0.c +++ b/src/world/area_flo/flo_19/CE36F0.c @@ -92,7 +92,7 @@ Script N(80240BF8) = SCRIPT({ }); Script N(main) = SCRIPT({ - WORLD_LOCATION = LOCATION_CLOUDY_CLIMB; + SI_WORLD_LOCATION = LOCATION_CLOUDY_CLIMB; SetSpriteShading(-1); SetCamLeadPlayer(0, 0); SetCamPerspective(0, 3, 25, 16, 4096); @@ -162,7 +162,7 @@ Script N(main) = SCRIPT({ } } await N(802409C0); - if (STORY_PROGRESS >= STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) { + if (SI_STORY_PROGRESS >= STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) { N(func_8024030C_CE39FC)(); } }); @@ -650,7 +650,7 @@ Script N(80242A2C) = SCRIPT({ sleep 1; } sleep 15; - STORY_PROGRESS = STORY_CH6_GREW_MAGIC_BEANSTALK; + SI_STORY_PROGRESS = STORY_CH6_GREW_MAGIC_BEANSTALK; GotoMap("flo_00", 7); }); diff --git a/src/world/area_flo/flo_21/CE6700.c b/src/world/area_flo/flo_21/CE6700.c index 7f51bd04d3..180f589b8b 100644 --- a/src/world/area_flo/flo_21/CE6700.c +++ b/src/world/area_flo/flo_21/CE6700.c @@ -94,7 +94,7 @@ MapConfig N(config) = { }; Script N(80240D40) = SCRIPT({ - if (STORY_PROGRESS == STORY_CH6_DEFEATED_HUFF_N_PUFF) { + if (SI_STORY_PROGRESS == STORY_CH6_DEFEATED_HUFF_N_PUFF) { FadeOutMusic(0, 500); } else { SetMusicTrack(0, SONG_CLOUDY_CLIMB, 0, 8); @@ -296,13 +296,13 @@ Script N(80240DA0) = SCRIPT({ }); Script N(80240E3C) = SCRIPT({ - match STORY_PROGRESS { + match SI_STORY_PROGRESS { == STORY_CH6_GREW_MAGIC_BEANSTALK { SI_VAR(0) = 0; if (SI_MAP_VAR(10) == 0) { return; } - STORY_PROGRESS = STORY_CH6_DEFEATED_HUFF_N_PUFF; + SI_STORY_PROGRESS = STORY_CH6_DEFEATED_HUFF_N_PUFF; } == STORY_CH6_DEFEATED_HUFF_N_PUFF { SI_VAR(0) = 1; @@ -369,7 +369,7 @@ Script N(80240E3C) = SCRIPT({ N(func_802405BC_CE6CBC)(3); PlaySoundAtPlayer(312, 0); DisablePlayerInput(TRUE); - STORY_PROGRESS = STORY_CH6_STAR_SPIRIT_RESCUED; + SI_STORY_PROGRESS = STORY_CH6_STAR_SPIRIT_RESCUED; GotoMapSpecial("kmr_23", 5, 14); sleep 100; }); @@ -381,7 +381,7 @@ Script N(80241350) = SCRIPT({ }); Script N(main) = SCRIPT({ - WORLD_LOCATION = LOCATION_CLOUDY_CLIMB; + SI_WORLD_LOCATION = LOCATION_CLOUDY_CLIMB; SetSpriteShading(-1); SetCamLeadPlayer(0, 0); SetCamPerspective(0, 3, 25, 16, 4096); @@ -398,7 +398,7 @@ Script N(main) = SCRIPT({ SI_VAR(0) = N(80241350); spawn EnterWalk; await N(80240D40); - if (STORY_PROGRESS >= STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) { + if (SI_STORY_PROGRESS >= STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) { N(func_80240B00_CE7200)(); } spawn N(80240E3C); @@ -544,7 +544,7 @@ Script N(80241920) = SCRIPT({ }); Script N(80241B98) = SCRIPT({ - if (STORY_PROGRESS >= STORY_CH6_DEFEATED_HUFF_N_PUFF) { + if (SI_STORY_PROGRESS >= STORY_CH6_DEFEATED_HUFF_N_PUFF) { return; } AwaitPlayerApproach(650, 0, 30); @@ -966,7 +966,7 @@ Script N(defeat_802435D4) = SCRIPT({ }); Script N(init_802435E4) = SCRIPT({ - if (STORY_PROGRESS < STORY_CH6_DEFEATED_HUFF_N_PUFF) { + if (SI_STORY_PROGRESS < STORY_CH6_DEFEATED_HUFF_N_PUFF) { SetEnemyFlagBits(-1, 4194304, 1); BindNpcIdle(NPC_SELF, N(idle_80243428)); BindNpcDefeat(NPC_SELF, N(defeat_802434D8)); @@ -977,7 +977,7 @@ Script N(init_802435E4) = SCRIPT({ }); Script N(init_80243684) = SCRIPT({ - if (STORY_PROGRESS < STORY_CH6_DEFEATED_HUFF_N_PUFF) { + if (SI_STORY_PROGRESS < STORY_CH6_DEFEATED_HUFF_N_PUFF) { SetEnemyFlagBits(-1, 4194304, 1); BindNpcDefeat(NPC_SELF, N(defeat_802435D4)); SetNpcAnimation(NPC_SELF, NPC_ANIM(huff_n_puff, Palette_00, Anim_1)); @@ -988,7 +988,7 @@ Script N(init_80243684) = SCRIPT({ }); Script N(init_8024371C) = SCRIPT({ - if (STORY_PROGRESS < STORY_CH6_DEFEATED_HUFF_N_PUFF) { + if (SI_STORY_PROGRESS < STORY_CH6_DEFEATED_HUFF_N_PUFF) { SetEnemyFlagBits(-1, 4194304, 1); BindNpcDefeat(NPC_SELF, N(defeat_802435D4)); SetNpcAnimation(NPC_SELF, NPC_ANIM(huff_n_puff, Palette_00, Anim_19)); diff --git a/src/world/area_flo/flo_22/CEC240.c b/src/world/area_flo/flo_22/CEC240.c index 893555bee1..7250b99d1c 100644 --- a/src/world/area_flo/flo_22/CEC240.c +++ b/src/world/area_flo/flo_22/CEC240.c @@ -21,7 +21,7 @@ MapConfig N(config) = { }; Script N(802402E0) = SCRIPT({ - match STORY_PROGRESS { + match SI_STORY_PROGRESS { < STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE { SetMusicTrack(0, SONG_FLOWER_FIELDS_CLOUDY, 0, 8); } else { @@ -37,7 +37,7 @@ Script N(802403AC) = SCRIPT({ }); Script N(main) = SCRIPT({ - WORLD_LOCATION = LOCATION_FLOWER_FIELDS; + SI_WORLD_LOCATION = LOCATION_FLOWER_FIELDS; SetSpriteShading(-1); SetCamLeadPlayer(0, 0); SetCamPerspective(0, 3, 25, 16, 4096); @@ -52,7 +52,7 @@ Script N(main) = SCRIPT({ spawn EnterWalk; spawn N(80240E24); await N(802402E0); - if (STORY_PROGRESS >= STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) { + if (SI_STORY_PROGRESS >= STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) { N(func_80240000_CEC240)(); } }); diff --git a/src/world/area_flo/flo_23/CEE2A0.c b/src/world/area_flo/flo_23/CEE2A0.c index 6fabb18877..dfd4987765 100644 --- a/src/world/area_flo/flo_23/CEE2A0.c +++ b/src/world/area_flo/flo_23/CEE2A0.c @@ -28,7 +28,7 @@ MapConfig N(config) = { }; Script N(80240D30) = SCRIPT({ - match STORY_PROGRESS { + match SI_STORY_PROGRESS { < STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE { SetMusicTrack(0, SONG_FLOWER_FIELDS_CLOUDY, 0, 8); } else { @@ -86,7 +86,7 @@ Script N(80241104) = SCRIPT({ }); Script N(main) = SCRIPT({ - WORLD_LOCATION = LOCATION_FLOWER_FIELDS; + SI_WORLD_LOCATION = LOCATION_FLOWER_FIELDS; SetSpriteShading(-1); SetCamLeadPlayer(0, 0); SetCamPerspective(0, 3, 25, 16, 4096); @@ -105,7 +105,7 @@ Script N(main) = SCRIPT({ SI_VAR(0) = N(80241104); spawn EnterWalk; await N(80240D30); - if (STORY_PROGRESS >= STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) { + if (SI_STORY_PROGRESS >= STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) { N(func_80240000_CEE260)(); } }); @@ -315,7 +315,7 @@ Script N(interact_80241564) = SCRIPT({ } sleep 10; } else { - if (STORY_PROGRESS < STORY_CH6_STAR_SPIRIT_RESCUED) { + if (SI_STORY_PROGRESS < STORY_CH6_STAR_SPIRIT_RESCUED) { SpeakToPlayer(NPC_SELF, NPC_ANIM(gate_flower, Palette_00, Anim_9), NPC_ANIM(gate_flower, Palette_00, Anim_8), 0, MESSAGE_ID(0x11, 0x004E)); } else { diff --git a/src/world/area_flo/flo_24/CF0980.c b/src/world/area_flo/flo_24/CF0980.c index 528c1ac787..7e8e38d9bb 100644 --- a/src/world/area_flo/flo_24/CF0980.c +++ b/src/world/area_flo/flo_24/CF0980.c @@ -16,12 +16,12 @@ MapConfig N(config) = { }; Script N(80240600) = SCRIPT({ - if (STORY_PROGRESS < STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) { + if (SI_STORY_PROGRESS < STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) { SetMusicTrack(0, SONG_FLOWER_FIELDS_CLOUDY, 0, 8); } else { SetMusicTrack(0, SONG_FLOWER_FIELDS_SUNNY, 0, 8); } - if (STORY_PROGRESS >= STORY_CH6_FILLED_SPRING_WITH_WATER) { + if (SI_STORY_PROGRESS >= STORY_CH6_FILLED_SPRING_WITH_WATER) { PlaySound(0x80000022); } }); @@ -75,7 +75,7 @@ Script N(802409F4) = SCRIPT({ }); Script N(main) = SCRIPT({ - WORLD_LOCATION = LOCATION_FLOWER_FIELDS; + SI_WORLD_LOCATION = LOCATION_FLOWER_FIELDS; SetSpriteShading(-1); SetCamLeadPlayer(0, 0); SetCamPerspective(0, 3, 25, 16, 4096); @@ -116,7 +116,7 @@ Script N(main) = SCRIPT({ spawn EnterWalk; } await N(80240600); - if (STORY_PROGRESS >= STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) { + if (SI_STORY_PROGRESS >= STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) { N(func_80240000_CF0940)(); } }); @@ -223,7 +223,7 @@ Script N(8024183C) = SCRIPT({ } } sleep 30; - STORY_PROGRESS = STORY_CH6_FILLED_SPRING_WITH_WATER; + SI_STORY_PROGRESS = STORY_CH6_FILLED_SPRING_WITH_WATER; GotoMap("flo_10", 2); sleep 100; } @@ -263,7 +263,7 @@ Script N(8024183C) = { SI_CMD(ScriptOpcode_END_IF), SI_CMD(ScriptOpcode_END_LOOP), SI_CMD(ScriptOpcode_SLEEP_FRAMES, 30), - SI_CMD(ScriptOpcode_SET, STORY_PROGRESS, STORY_CH6_FILLED_SPRING_WITH_WATER), + SI_CMD(ScriptOpcode_SET, SI_STORY_PROGRESS, STORY_CH6_FILLED_SPRING_WITH_WATER), SI_CMD(ScriptOpcode_CALL, GotoMap, N(flo_10_name_hack), 2), SI_CMD(ScriptOpcode_SLEEP_FRAMES, 100), SI_CMD(ScriptOpcode_RETURN), @@ -272,7 +272,7 @@ Script N(8024183C) = { #endif Script N(80241ABC) = SCRIPT({ - if (STORY_PROGRESS < STORY_CH6_FILLED_SPRING_WITH_WATER) { + if (SI_STORY_PROGRESS < STORY_CH6_FILLED_SPRING_WITH_WATER) { EnableGroup(94, 0); ModifyColliderFlags(0, 30, 0x7FFFFE00); } else { diff --git a/src/world/area_flo/flo_25/CF2C10.c b/src/world/area_flo/flo_25/CF2C10.c index 550a37ec19..1032f3929c 100644 --- a/src/world/area_flo/flo_25/CF2C10.c +++ b/src/world/area_flo/flo_25/CF2C10.c @@ -29,7 +29,7 @@ MapConfig N(config) = { }; Script N(80242330) = SCRIPT({ - match STORY_PROGRESS { + match SI_STORY_PROGRESS { < STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE { SetMusicTrack(0, SONG_FLOWER_FIELDS_CLOUDY, 0, 8); } else { @@ -87,7 +87,7 @@ Script N(80242704) = SCRIPT({ }); Script N(main) = SCRIPT({ - WORLD_LOCATION = LOCATION_FLOWER_FIELDS; + SI_WORLD_LOCATION = LOCATION_FLOWER_FIELDS; SetSpriteShading(-1); SetCamLeadPlayer(0, 0); SetCamPerspective(0, 3, 25, 16, 4096); @@ -108,7 +108,7 @@ Script N(main) = SCRIPT({ SI_VAR(0) = N(80242704); spawn EnterWalk; await N(80242330); - if (STORY_PROGRESS >= STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) { + if (SI_STORY_PROGRESS >= STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE) { N(func_80240000_CF2BD0)(); } }); @@ -351,7 +351,7 @@ Script N(interact_80242C58) = SCRIPT({ } sleep 10; } else { - if (STORY_PROGRESS < STORY_CH6_STAR_SPIRIT_RESCUED) { + if (SI_STORY_PROGRESS < STORY_CH6_STAR_SPIRIT_RESCUED) { SpeakToPlayer(NPC_SELF, NPC_ANIM(gate_flower, Palette_01, Anim_9), NPC_ANIM(gate_flower, Palette_01, Anim_8), 0, MESSAGE_ID(0x11, 0x0040)); } else { diff --git a/src/world/area_hos/hos_03/A1BDB0.c b/src/world/area_hos/hos_03/A1BDB0.c index 8a891d2bc3..ae672f16b3 100644 --- a/src/world/area_hos/hos_03/A1BDB0.c +++ b/src/world/area_hos/hos_03/A1BDB0.c @@ -178,7 +178,7 @@ ApiStatus N(func_802425E0_A1D6E0)(ScriptInstance *script, s32 isInitialCall) { set_variable(script, SI_SAVE_FLAG(1768), phi_s0); set_variable(script, SI_SAVE_FLAG(1769), phi_s7); temp_s0_2 = get_variable(NULL, SI_SAVE_VAR(352)); - temp_v0 = get_variable(NULL, SI_SAVE_VAR(0)); + temp_v0 = get_variable(NULL, SI_STORY_PROGRESS); for (i = 0; i < 8; i++) { if (temp_v0 < (*(N(quizRequirements) + i)).unk_00) { diff --git a/src/world/area_jan/jan_02/B2C8A0.c b/src/world/area_jan/jan_02/B2C8A0.c index a4ab160290..3595c5dfc5 100644 --- a/src/world/area_jan/jan_02/B2C8A0.c +++ b/src/world/area_jan/jan_02/B2C8A0.c @@ -229,7 +229,7 @@ ApiStatus N(func_80241750_B2DBC0)(ScriptInstance *script, s32 isInitialCall) { set_variable(script, SI_SAVE_FLAG(1768), phi_s0); set_variable(script, SI_SAVE_FLAG(1769), phi_s7); temp_s0_2 = get_variable(NULL, SI_SAVE_VAR(352)); - temp_v0 = get_variable(NULL, SI_SAVE_VAR(0)); + temp_v0 = get_variable(NULL, SI_STORY_PROGRESS); for (i = 0; i < 8; i++) { if (temp_v0 < (*(N(quizRequirements) + i)).unk_00) { diff --git a/src/world/area_jan/jan_03/B34BD0.c b/src/world/area_jan/jan_03/B34BD0.c index cb200f0125..675d55048f 100644 --- a/src/world/area_jan/jan_03/B34BD0.c +++ b/src/world/area_jan/jan_03/B34BD0.c @@ -296,7 +296,7 @@ ApiStatus N(func_80241CD8_B368A8)(ScriptInstance *script, s32 isInitialCall) { set_variable(script, SI_SAVE_FLAG(1768), phi_s0); set_variable(script, SI_SAVE_FLAG(1769), phi_s7); temp_s0_2 = get_variable(NULL, SI_SAVE_VAR(352)); - temp_v0 = get_variable(NULL, SI_SAVE_VAR(0)); + temp_v0 = get_variable(NULL, SI_STORY_PROGRESS); for (i = 0; i < 8; i++) { if (temp_v0 < (*(N(quizRequirements) + i)).unk_00) { diff --git a/src/world/area_kmr/kmr_02/8B0070.c b/src/world/area_kmr/kmr_02/8B0070.c index f96c2b9a7d..8cd8ba522b 100644 --- a/src/world/area_kmr/kmr_02/8B0070.c +++ b/src/world/area_kmr/kmr_02/8B0070.c @@ -85,7 +85,7 @@ ApiStatus N(func_802404CC_8B053C)(ScriptInstance *script, s32 isInitialCall) { set_variable(script, SI_SAVE_FLAG(1768), phi_s0); set_variable(script, SI_SAVE_FLAG(1769), phi_s7); temp_s0_2 = get_variable(NULL, SI_SAVE_VAR(352)); - temp_v0 = get_variable(NULL, SI_SAVE_VAR(0)); + temp_v0 = get_variable(NULL, SI_STORY_PROGRESS); for (i = 0; i < 8; i++) { if (temp_v0 < (*(N(quizRequirements) + i)).unk_00) { diff --git a/src/world/area_kmr/kmr_03/8C8140.c b/src/world/area_kmr/kmr_03/8C8140.c index bea135ea74..ecbacc0dbb 100644 --- a/src/world/area_kmr/kmr_03/8C8140.c +++ b/src/world/area_kmr/kmr_03/8C8140.c @@ -24,7 +24,7 @@ Script N(802407A8) = SCRIPT({ }); Script N(main) = SCRIPT({ - WORLD_LOCATION = LOCATION_GOOMBA_VILLAGE; + SI_WORLD_LOCATION = LOCATION_GOOMBA_VILLAGE; SetSpriteShading(-1); SetCamPerspective(0, 3, 25, 16, 4096); SetCamBGColor(0, 0, 0, 0); @@ -89,7 +89,7 @@ Script N(8024097C) = SCRIPT({ Script N(npcAI_80240B50) = SCRIPT({ 1: - match STORY_PROGRESS { + match SI_STORY_PROGRESS { == STORY_CH0_FELL_OFF_CLIFF { 89: N(UnkPositionFunc)(-118, 86, -70, -15); @@ -129,7 +129,7 @@ Script N(npcAI_80240B50) = SCRIPT({ sleep 30; SpeakToPlayer(NPC_GOOMPA, NPC_ANIM(goompa, Palette_00, Anim_8), NPC_ANIM(goompa, Palette_00, Anim_1), 0, MESSAGE_ID(0x0B, 0x00A8)); N(UnkFunc41)(0, 5); - STORY_PROGRESS = STORY_CH0_GOOMPA_JOINED_PARTY; + SI_STORY_PROGRESS = STORY_CH0_GOOMPA_JOINED_PARTY; UseSettingsFrom(0, -220, 20, -72); GetPlayerPos(SI_VAR(0), SI_VAR(1), SI_VAR(2)); SetPanTarget(0, SI_VAR(0), SI_VAR(1), SI_VAR(2)); @@ -188,7 +188,7 @@ Script N(init_802411A8) = SCRIPT({ BindNpcIdle(NPC_SELF, N(npcAI_80240B50)); BindNpcAux(-1, N(8024097C)); BindNpcHit(-1, N(hit_80240F64)); - match STORY_PROGRESS { + match SI_STORY_PROGRESS { >= STORY_CH0_GOOMPA_JOINED_PARTY { SetNpcFlagBits(NPC_SELF, NPC_FLAG_GRAVITY, FALSE); SetNpcFlagBits(NPC_SELF, NPC_FLAG_ENABLE_HIT_SCRIPT, TRUE); @@ -239,7 +239,7 @@ static s32 N(pad_1468)[] = { Script N(80241470) = SCRIPT({ ModifyColliderFlags(0, 9, 0x7FFFFE00); - STORY_PROGRESS = STORY_CH0_LEFT_THE_PLAYGROUND; + SI_STORY_PROGRESS = STORY_CH0_LEFT_THE_PLAYGROUND; }); Script N(802414A8) = SCRIPT({ @@ -255,7 +255,7 @@ Script N(802414C8) = SCRIPT({ }); Script N(makeEntities) = SCRIPT({ - if (STORY_PROGRESS < STORY_CH0_LEFT_THE_PLAYGROUND) { + if (SI_STORY_PROGRESS < STORY_CH0_LEFT_THE_PLAYGROUND) { MakeEntity(0x802EA10C, 45, 0, 70, 15, MAKE_ENTITY_END); AssignScript(N(80241470)); } else { diff --git a/src/world/area_kmr/kmr_03/8C85E0.c b/src/world/area_kmr/kmr_03/8C85E0.c index 2ef930b3dd..150d1e472d 100644 --- a/src/world/area_kmr/kmr_03/8C85E0.c +++ b/src/world/area_kmr/kmr_03/8C85E0.c @@ -6,7 +6,7 @@ Script N(80242340) = SCRIPT({ SetCamDistance(0, 700.0); SetCamSpeed(0, 90.0); PanToTarget(0, 0, 1); - if (STORY_PROGRESS >= STORY_CH0_FOUND_HAMMER) { + if (SI_STORY_PROGRESS >= STORY_CH0_FOUND_HAMMER) { SetPlayerPos(0, -1000, 0); DisablePlayerInput(TRUE); SetPlayerPos(-224, 20, -80); diff --git a/src/world/area_kmr/kmr_12/events.c b/src/world/area_kmr/kmr_12/events.c index 04b0f46152..8de249afd0 100644 --- a/src/world/area_kmr/kmr_12/events.c +++ b/src/world/area_kmr/kmr_12/events.c @@ -11,7 +11,7 @@ Script N(BindExits) = SCRIPT({ }); Script N(main) = SCRIPT({ - WORLD_LOCATION = LOCATION_GOOMBA_ROAD; + SI_WORLD_LOCATION = LOCATION_GOOMBA_ROAD; SetSpriteShading(-1); SetCamPerspective(0, 3, 25, 16, 4096); SetCamBGColor(0, 0, 0, 0); diff --git a/src/world/area_mac/mac_00/7EB340.c b/src/world/area_mac/mac_00/7EB340.c index f456a7ac9e..a0aafbfd7e 100644 --- a/src/world/area_mac/mac_00/7EB340.c +++ b/src/world/area_mac/mac_00/7EB340.c @@ -64,7 +64,7 @@ ApiStatus N(func_8024076C_7EB47C)(ScriptInstance *script, s32 isInitialCall) { set_variable(script, SI_SAVE_FLAG(1768), phi_s0); set_variable(script, SI_SAVE_FLAG(1769), phi_s7); temp_s0_2 = get_variable(NULL, SI_SAVE_VAR(352)); - temp_v0 = get_variable(NULL, SI_SAVE_VAR(0)); + temp_v0 = get_variable(NULL, SI_STORY_PROGRESS); for (i = 0; i < 8; i++) { if (temp_v0 < (*(N(quizRequirements) + i)).unk_00) { diff --git a/src/world/area_mac/mac_01/8017D0.c b/src/world/area_mac/mac_01/8017D0.c index 9205ad9fc0..72579691f3 100644 --- a/src/world/area_mac/mac_01/8017D0.c +++ b/src/world/area_mac/mac_01/8017D0.c @@ -194,7 +194,7 @@ ApiStatus N(func_8024204C_8028CC)(ScriptInstance *script, s32 isInitialCall) { set_variable(script, SI_SAVE_FLAG(1768), phi_s0); set_variable(script, SI_SAVE_FLAG(1769), phi_s7); temp_s0_2 = get_variable(NULL, SI_SAVE_VAR(352)); - temp_v0 = get_variable(NULL, SI_SAVE_VAR(0)); + temp_v0 = get_variable(NULL, SI_STORY_PROGRESS); for (i = 0; i < 8; i++) { if (temp_v0 < (*(N(quizRequirements) + i)).unk_00) { diff --git a/src/world/area_mac/mac_02/823BF0.c b/src/world/area_mac/mac_02/823BF0.c index 46983c5f24..edb3503b98 100644 --- a/src/world/area_mac/mac_02/823BF0.c +++ b/src/world/area_mac/mac_02/823BF0.c @@ -173,7 +173,7 @@ ApiStatus N(func_802418FC_824BBC)(ScriptInstance *script, s32 isInitialCall) { set_variable(script, SI_SAVE_FLAG(1768), phi_s0); set_variable(script, SI_SAVE_FLAG(1769), phi_s7); temp_s0_2 = get_variable(NULL, SI_SAVE_VAR(352)); - temp_v0 = get_variable(NULL, SI_SAVE_VAR(0)); + temp_v0 = get_variable(NULL, SI_STORY_PROGRESS); for (i = 0; i < 8; i++) { if (temp_v0 < (*(N(quizRequirements) + i)).unk_00) { diff --git a/src/world/area_mac/mac_03/831B20.c b/src/world/area_mac/mac_03/831B20.c index 56714efa71..1779e4b4e9 100644 --- a/src/world/area_mac/mac_03/831B20.c +++ b/src/world/area_mac/mac_03/831B20.c @@ -66,7 +66,7 @@ ApiStatus N(func_802405EC_831DEC)(ScriptInstance *script, s32 isInitialCall) { set_variable(script, SI_SAVE_FLAG(1768), phi_s0); set_variable(script, SI_SAVE_FLAG(1769), phi_s7); temp_s0_2 = get_variable(NULL, SI_SAVE_VAR(352)); - temp_v0 = get_variable(NULL, SI_SAVE_VAR(0)); + temp_v0 = get_variable(NULL, SI_STORY_PROGRESS); for (i = 0; i < 8; i++) { if (temp_v0 < (*(N(quizRequirements) + i)).unk_00) { diff --git a/src/world/area_mac/mac_04/843030.c b/src/world/area_mac/mac_04/843030.c index 5112760c96..7f06ad6aa5 100644 --- a/src/world/area_mac/mac_04/843030.c +++ b/src/world/area_mac/mac_04/843030.c @@ -64,7 +64,7 @@ ApiStatus N(func_8024059C_84316C)(ScriptInstance *script, s32 isInitialCall) { set_variable(script, SI_SAVE_FLAG(1768), phi_s0); set_variable(script, SI_SAVE_FLAG(1769), phi_s7); temp_s0_2 = get_variable(NULL, SI_SAVE_VAR(352)); - temp_v0 = get_variable(NULL, SI_SAVE_VAR(0)); + temp_v0 = get_variable(NULL, SI_STORY_PROGRESS); for (i = 0; i < 8; i++) { if (temp_v0 < (*(N(quizRequirements) + i)).unk_00) { diff --git a/src/world/area_mac/mac_05/852170.c b/src/world/area_mac/mac_05/852170.c index 733fdb824a..aaf27d68ca 100644 --- a/src/world/area_mac/mac_05/852170.c +++ b/src/world/area_mac/mac_05/852170.c @@ -184,7 +184,7 @@ ApiStatus N(func_8024145C_8535CC)(ScriptInstance *script, s32 isInitialCall) { set_variable(script, SI_SAVE_FLAG(1768), phi_s0); set_variable(script, SI_SAVE_FLAG(1769), phi_s7); temp_s0_2 = get_variable(NULL, SI_SAVE_VAR(352)); - temp_v0 = get_variable(NULL, SI_SAVE_VAR(0)); + temp_v0 = get_variable(NULL, SI_STORY_PROGRESS); for (i = 0; i < 8; i++) { if (temp_v0 < (*(N(quizRequirements) + i)).unk_00) { diff --git a/src/world/area_nok/nok_01/9C53E0.c b/src/world/area_nok/nok_01/9C53E0.c index 55fd5fa3dc..f3edeb4e17 100644 --- a/src/world/area_nok/nok_01/9C53E0.c +++ b/src/world/area_nok/nok_01/9C53E0.c @@ -107,7 +107,7 @@ ApiStatus N(func_80240EA4_9C6284)(ScriptInstance *script, s32 isInitialCall) { set_variable(script, SI_SAVE_FLAG(1768), phi_s0); set_variable(script, SI_SAVE_FLAG(1769), phi_s7); temp_s0_2 = get_variable(NULL, SI_SAVE_VAR(352)); - temp_v0 = get_variable(NULL, SI_SAVE_VAR(0)); + temp_v0 = get_variable(NULL, SI_STORY_PROGRESS); for (i = 0; i < 8; i++) { if (temp_v0 < (*(N(quizRequirements) + i)).unk_00) { diff --git a/src/world/area_nok/nok_02/9D7AA0.c b/src/world/area_nok/nok_02/9D7AA0.c index f4cd83e1bd..99622861a5 100644 --- a/src/world/area_nok/nok_02/9D7AA0.c +++ b/src/world/area_nok/nok_02/9D7AA0.c @@ -176,7 +176,7 @@ ApiStatus N(func_80241A4C_9D8A6C)(ScriptInstance *script, s32 isInitialCall) { set_variable(script, SI_SAVE_FLAG(1768), phi_s0); set_variable(script, SI_SAVE_FLAG(1769), phi_s7); temp_s0_2 = get_variable(NULL, SI_SAVE_VAR(352)); - temp_v0 = get_variable(NULL, SI_SAVE_VAR(0)); + temp_v0 = get_variable(NULL, SI_STORY_PROGRESS); for (i = 0; i < 8; i++) { if (temp_v0 < (*(N(quizRequirements) + i)).unk_00) { diff --git a/src/world/area_sam/sam_01/CF7E80.c b/src/world/area_sam/sam_01/CF7E80.c index 1e253e0ab5..2a7128045b 100644 --- a/src/world/area_sam/sam_01/CF7E80.c +++ b/src/world/area_sam/sam_01/CF7E80.c @@ -142,7 +142,7 @@ ApiStatus N(func_8024083C_CF83AC)(ScriptInstance *script, s32 isInitialCall) { set_variable(script, SI_SAVE_FLAG(1768), phi_s0); set_variable(script, SI_SAVE_FLAG(1769), phi_s7); temp_s0_2 = get_variable(NULL, SI_SAVE_VAR(352)); - temp_v0 = get_variable(NULL, SI_SAVE_VAR(0)); + temp_v0 = get_variable(NULL, SI_STORY_PROGRESS); for (i = 0; i < 8; i++) { if (temp_v0 < (*(N(quizRequirements) + i)).unk_00) { diff --git a/src/world/area_sam/sam_02/D05F60.c b/src/world/area_sam/sam_02/D05F60.c index e0e14de4aa..28142a05b1 100644 --- a/src/world/area_sam/sam_02/D05F60.c +++ b/src/world/area_sam/sam_02/D05F60.c @@ -84,7 +84,7 @@ ApiStatus N(func_80240C68_D06398)(ScriptInstance *script, s32 isInitialCall) { set_variable(script, SI_SAVE_FLAG(1768), phi_s0); set_variable(script, SI_SAVE_FLAG(1769), phi_s7); temp_s0_2 = get_variable(NULL, SI_SAVE_VAR(352)); - temp_v0 = get_variable(NULL, SI_SAVE_VAR(0)); + temp_v0 = get_variable(NULL, SI_STORY_PROGRESS); for (i = 0; i < 8; i++) { if (temp_v0 < (*(N(quizRequirements) + i)).unk_00) { diff --git a/src/world/area_sam/sam_11/D3ADA0.c b/src/world/area_sam/sam_11/D3ADA0.c index 16da302222..2c575400c4 100644 --- a/src/world/area_sam/sam_11/D3ADA0.c +++ b/src/world/area_sam/sam_11/D3ADA0.c @@ -66,7 +66,7 @@ ApiStatus N(func_8024090C_D3AEDC)(ScriptInstance *script, s32 isInitialCall) { set_variable(script, SI_SAVE_FLAG(1768), phi_s0); set_variable(script, SI_SAVE_FLAG(1769), phi_s7); temp_s0_2 = get_variable(NULL, SI_SAVE_VAR(352)); - temp_v0 = get_variable(NULL, SI_SAVE_VAR(0)); + temp_v0 = get_variable(NULL, SI_STORY_PROGRESS); for (i = 0; i < 8; i++) { if (temp_v0 < (*(N(quizRequirements) + i)).unk_00) { diff --git a/src/world/area_sbk/sbk_00/929270.c b/src/world/area_sbk/sbk_00/929270.c index af57f7b21b..9564c7e3af 100644 --- a/src/world/area_sbk/sbk_00/929270.c +++ b/src/world/area_sbk/sbk_00/929270.c @@ -28,9 +28,9 @@ Script N(80240198) = SCRIPT({ }); Script N(main) = SCRIPT({ - WORLD_LOCATION = LOCATION_DRY_DRY_DESERT; + SI_WORLD_LOCATION = LOCATION_DRY_DRY_DESERT; SetSpriteShading(-1); - if (STORY_PROGRESS == STORY_CH2_GOT_PULSE_STONE) { + if (SI_STORY_PROGRESS == STORY_CH2_GOT_PULSE_STONE) { DisablePulseStone(0); } SetCamPerspective(0, 3, 25, 16, 4096); diff --git a/src/world/area_sbk/sbk_01/929A90.c b/src/world/area_sbk/sbk_01/929A90.c index 891d5a7629..df1c2cb1ad 100644 --- a/src/world/area_sbk/sbk_01/929A90.c +++ b/src/world/area_sbk/sbk_01/929A90.c @@ -34,9 +34,9 @@ Script N(802401F4) = SCRIPT({ }); Script N(main) = SCRIPT({ - WORLD_LOCATION = LOCATION_DRY_DRY_DESERT; + SI_WORLD_LOCATION = LOCATION_DRY_DRY_DESERT; SetSpriteShading(-1); - if (STORY_PROGRESS == STORY_CH2_GOT_PULSE_STONE) { + if (SI_STORY_PROGRESS == STORY_CH2_GOT_PULSE_STONE) { DisablePulseStone(0); } SetCamPerspective(0, 3, 25, 16, 4096); diff --git a/tools/asm_sizes.py b/tools/asm_sizes.py index 6d03f33c47..0047a9c2aa 100755 --- a/tools/asm_sizes.py +++ b/tools/asm_sizes.py @@ -44,7 +44,7 @@ asm_dir = script_dir + "/../ver/current/asm/nonmatchings" for root, dirs, files in os.walk(asm_dir): for asm_dir in dirs: - if "/os" not in root and "/world/" not in root and "/battle/" not in root: + if "/os" not in root and "/world/" not in root: do_dir(root, asm_dir) for thing in sorted(sizes.keys(), key=lambda x: sizes[x][4]): diff --git a/tools/disasm_script.py b/tools/disasm_script.py index d85bf0aaa4..57b3a4ae85 100755 --- a/tools/disasm_script.py +++ b/tools/disasm_script.py @@ -91,7 +91,7 @@ def get_constants(): CONSTANTS["NPC_SPRITE"] = {} CONSTANTS["MAP_NPCS"] = {} - [SAVE_VARS.add(x) for x in ["WORLD_LOCATION", "STORY_PROGRESS"]] + [SAVE_VARS.add(x) for x in ["SI_WORLD_LOCATION", "SI_STORY_PROGRESS"]] include_path = Path(Path(__file__).resolve().parent.parent / "include") enums = Path(include_path / "enums.h").read_text().splitlines() @@ -835,9 +835,9 @@ class ScriptDSLDisassembler(ScriptDisassembler): elif v <= -180000000: return f"SI_ARRAY({v + 190000000})" elif v <= -160000000: if v + 170000000 == 0: - self.save_variable = "STORY_PROGRESS" + self.save_variable = "SI_STORY_PROGRESS" elif v + 170000000 == 425: - self.save_variable = "WORLD_LOCATION" + self.save_variable = "SI_WORLD_LOCATION" else: self.save_variable = f"SI_SAVE_VAR({v + 170000000})" return self.save_variable @@ -891,12 +891,12 @@ class ScriptDSLDisassembler(ScriptDisassembler): return CONSTANTS["Events"][var] elif case and "takeTurn" in self.script_name and var in CONSTANTS["HitResults"]: return CONSTANTS["HitResults"][var] - elif (( case and self.case_variable == "STORY_PROGRESS") or - (not case and self.save_variable == "STORY_PROGRESS")): + elif (( case and self.case_variable == "SI_STORY_PROGRESS") or + (not case and self.save_variable == "SI_STORY_PROGRESS")): if var in CONSTANTS["StoryProgress"]: return CONSTANTS["StoryProgress"][var] - elif (( case and self.case_variable == "WORLD_LOCATION") or - (not case and self.save_variable == "WORLD_LOCATION")): + elif (( case and self.case_variable == "SI_WORLD_LOCATION") or + (not case and self.save_variable == "SI_WORLD_LOCATION")): if var in CONSTANTS["Locations"]: return CONSTANTS["Locations"][var] @@ -936,8 +936,8 @@ class ScriptDSLDisassembler(ScriptDisassembler): #print(f"Op 0x{opcode:2X} saved_var \"{self.save_variable}\" case_var \"{self.case_variable}\"") # case variables need to be saved ahead of time, since they span many instructions - if ((self.in_case and 0x16 <= opcode <= 0x1B and self.case_variable == "STORY_PROGRESS") or - (self.in_case and 0x16 <= opcode <= 0x1B and self.case_variable == "WORLD_LOCATION")): + if ((self.in_case and 0x16 <= opcode <= 0x1B and self.case_variable == "SI_STORY_PROGRESS") or + (self.in_case and 0x16 <= opcode <= 0x1B and self.case_variable == "SI_WORLD_LOCATION")): argv[0] = self.replace_enum(argv[0], case=True) if opcode == 0x01: diff --git a/tools/star_rod_idx_to_c.py b/tools/star_rod_idx_to_c.py index 0d9a29f2fc..e68c05b8cb 100755 --- a/tools/star_rod_idx_to_c.py +++ b/tools/star_rod_idx_to_c.py @@ -32,9 +32,9 @@ def get_flag_name(arg): elif v <= -180000000: return f"SI_ARRAY({v + 190000000})" elif v <= -160000000: if v + 170000000 == 0: - return "STORY_PROGRESS" + return "SI_STORY_PROGRESS" elif v + 170000000 == 425: - return "WORLD_LOCATION" + return "SI_WORLD_LOCATION" else: return f"SI_SAVE_VAR({v + 170000000})" elif v <= -140000000: return f"SI_AREA_VAR({v + 150000000})" diff --git a/ver/us/asm/data/52EE0.data.s b/ver/us/asm/data/52FF0.data.s similarity index 85% rename from ver/us/asm/data/52EE0.data.s rename to ver/us/asm/data/52FF0.data.s index 90550c950d..86f88c51cf 100644 --- a/ver/us/asm/data/52EE0.data.s +++ b/ver/us/asm/data/52FF0.data.s @@ -2,9 +2,6 @@ .section .data -glabel D_80077AE0 -.word 0x00000002, 0x00019D00, 0x80098454, 0x00020000, 0x00000000, 0x00000000, 0x00000005, 0x00049D00, 0x8009844C, 0x00000002, 0x00029D00, 0x80098444, 0x00000002, 0x0004B300, 0x8009843C, 0x00000004, 0x00079D00, 0x80098434, 0x00020001, 0x00000000, 0x00000000, 0x00000006, 0x00039D00, 0x8009842C, 0x00000002, 0x00021B00, 0x80098424, 0x00020002, 0x00000000, 0x00000000, 0x00000003, 0x00039D00, 0x8009841C, 0x00000004, 0x00019D00, 0x80098414, 0x00020003, 0x00000000, 0x00000000, 0x00010008, 0x000B2600, 0x8009840C, 0x00000002, 0x0009E800, 0x80098404, 0x00020004, 0x00000000, 0x00000000, 0x00000003, 0x00019D00, 0x80098454, 0x00010003, 0x00009D00, 0x800983FC, 0x00030000, 0x00000000, D_800983F8, 0x00000000, 0x00000000, 0x00000000, 0x50726720, 0x5665722E, 0x30302F31, 0x322F3035, 0x2031363A, 0x35340000, 0x00000000, 0x00000000 - glabel D_80077BF0 .byte 0x01, 0x02, 0x00, 0x34, 0x01, 0x04, 0x00, 0x36, 0x00, 0x36, 0x01, 0x02, 0x00, 0x1C, 0x01, 0x02, 0x00, 0x06, 0x01, 0x02, 0x00, 0x2C, 0x01, 0x02, 0x00, 0x2C, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00 diff --git a/ver/us/asm/nonmatchings/25AF0/func_8004A784.s b/ver/us/asm/nonmatchings/25AF0/func_8004A784.s deleted file mode 100644 index f2071f142e..0000000000 --- a/ver/us/asm/nonmatchings/25AF0/func_8004A784.s +++ /dev/null @@ -1,243 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_8004A784 -/* 25B84 8004A784 27BDFF68 */ addiu $sp, $sp, -0x98 -/* 25B88 8004A788 F7BC0088 */ sdc1 $f28, 0x88($sp) -/* 25B8C 8004A78C 4485E000 */ mtc1 $a1, $f28 -/* 25B90 8004A790 AFB40058 */ sw $s4, 0x58($sp) -/* 25B94 8004A794 8FB400A8 */ lw $s4, 0xa8($sp) -/* 25B98 8004A798 AFB00048 */ sw $s0, 0x48($sp) -/* 25B9C 8004A79C 0080802D */ daddu $s0, $a0, $zero -/* 25BA0 8004A7A0 AFB1004C */ sw $s1, 0x4c($sp) -/* 25BA4 8004A7A4 00C0882D */ daddu $s1, $a2, $zero -/* 25BA8 8004A7A8 AFB30054 */ sw $s3, 0x54($sp) -/* 25BAC 8004A7AC 00E0982D */ daddu $s3, $a3, $zero -/* 25BB0 8004A7B0 AFB5005C */ sw $s5, 0x5c($sp) -/* 25BB4 8004A7B4 8FB500AC */ lw $s5, 0xac($sp) -/* 25BB8 8004A7B8 27A50020 */ addiu $a1, $sp, 0x20 -/* 25BBC 8004A7BC AFBF0060 */ sw $ra, 0x60($sp) -/* 25BC0 8004A7C0 AFB20050 */ sw $s2, 0x50($sp) -/* 25BC4 8004A7C4 F7BE0090 */ sdc1 $f30, 0x90($sp) -/* 25BC8 8004A7C8 F7BA0080 */ sdc1 $f26, 0x80($sp) -/* 25BCC 8004A7CC F7B80078 */ sdc1 $f24, 0x78($sp) -/* 25BD0 8004A7D0 F7B60070 */ sdc1 $f22, 0x70($sp) -/* 25BD4 8004A7D4 F7B40068 */ sdc1 $f20, 0x68($sp) -/* 25BD8 8004A7D8 C6000038 */ lwc1 $f0, 0x38($s0) -/* 25BDC 8004A7DC C602003C */ lwc1 $f2, 0x3c($s0) -/* 25BE0 8004A7E0 27A60024 */ addiu $a2, $sp, 0x24 -/* 25BE4 8004A7E4 E7A00020 */ swc1 $f0, 0x20($sp) -/* 25BE8 8004A7E8 E7A20024 */ swc1 $f2, 0x24($sp) -/* 25BEC 8004A7EC C6000018 */ lwc1 $f0, 0x18($s0) -/* 25BF0 8004A7F0 C6020040 */ lwc1 $f2, 0x40($s0) -/* 25BF4 8004A7F4 461C0002 */ mul.s $f0, $f0, $f28 -/* 25BF8 8004A7F8 00000000 */ nop -/* 25BFC 8004A7FC E7A20028 */ swc1 $f2, 0x28($sp) -/* 25C00 8004A800 C63A0000 */ lwc1 $f26, ($s1) -/* 25C04 8004A804 27A70028 */ addiu $a3, $sp, 0x28 -/* 25C08 8004A808 E7BA0014 */ swc1 $f26, 0x14($sp) -/* 25C0C 8004A80C E7A00010 */ swc1 $f0, 0x10($sp) -/* 25C10 8004A810 860200A8 */ lh $v0, 0xa8($s0) -/* 25C14 8004A814 3C01BF80 */ lui $at, 0xbf80 -/* 25C18 8004A818 4481A000 */ mtc1 $at, $f20 -/* 25C1C 8004A81C 44820000 */ mtc1 $v0, $f0 -/* 25C20 8004A820 00000000 */ nop -/* 25C24 8004A824 46800020 */ cvt.s.w $f0, $f0 -/* 25C28 8004A828 E7A00018 */ swc1 $f0, 0x18($sp) -/* 25C2C 8004A82C 860200A6 */ lh $v0, 0xa6($s0) -/* 25C30 8004A830 4600A586 */ mov.s $f22, $f20 -/* 25C34 8004A834 44820000 */ mtc1 $v0, $f0 -/* 25C38 8004A838 00000000 */ nop -/* 25C3C 8004A83C 46800020 */ cvt.s.w $f0, $f0 -/* 25C40 8004A840 E7A0001C */ swc1 $f0, 0x1c($sp) -/* 25C44 8004A844 8E040080 */ lw $a0, 0x80($s0) -/* 25C48 8004A848 0C037711 */ jal npc_test_move_simple_with_slipping -/* 25C4C 8004A84C 4600A606 */ mov.s $f24, $f20 -/* 25C50 8004A850 0040902D */ daddu $s2, $v0, $zero -/* 25C54 8004A854 1240008D */ beqz $s2, .L8004AA8C -/* 25C58 8004A858 00000000 */ nop -/* 25C5C 8004A85C C60C0038 */ lwc1 $f12, 0x38($s0) -/* 25C60 8004A860 C60E0040 */ lwc1 $f14, 0x40($s0) -/* 25C64 8004A864 8FA60020 */ lw $a2, 0x20($sp) -/* 25C68 8004A868 0C00A7B5 */ jal dist2D -/* 25C6C 8004A86C 8FA70028 */ lw $a3, 0x28($sp) -/* 25C70 8004A870 46000586 */ mov.s $f22, $f0 -/* 25C74 8004A874 C6020038 */ lwc1 $f2, 0x38($s0) -/* 25C78 8004A878 C604003C */ lwc1 $f4, 0x3c($s0) -/* 25C7C 8004A87C 3C01420C */ lui $at, 0x420c -/* 25C80 8004A880 4481F000 */ mtc1 $at, $f30 -/* 25C84 8004A884 C6000040 */ lwc1 $f0, 0x40($s0) -/* 25C88 8004A888 461ED300 */ add.s $f12, $f26, $f30 -/* 25C8C 8004A88C E7A2002C */ swc1 $f2, 0x2c($sp) -/* 25C90 8004A890 E7A40030 */ swc1 $f4, 0x30($sp) -/* 25C94 8004A894 0C00A6C9 */ jal clamp_angle -/* 25C98 8004A898 E7A00034 */ swc1 $f0, 0x34($sp) -/* 25C9C 8004A89C C6020018 */ lwc1 $f2, 0x18($s0) -/* 25CA0 8004A8A0 461C1082 */ mul.s $f2, $f2, $f28 -/* 25CA4 8004A8A4 00000000 */ nop -/* 25CA8 8004A8A8 E7A00014 */ swc1 $f0, 0x14($sp) -/* 25CAC 8004A8AC E7A20010 */ swc1 $f2, 0x10($sp) -/* 25CB0 8004A8B0 860200A8 */ lh $v0, 0xa8($s0) -/* 25CB4 8004A8B4 27A5002C */ addiu $a1, $sp, 0x2c -/* 25CB8 8004A8B8 44820000 */ mtc1 $v0, $f0 -/* 25CBC 8004A8BC 00000000 */ nop -/* 25CC0 8004A8C0 46800020 */ cvt.s.w $f0, $f0 -/* 25CC4 8004A8C4 E7A00018 */ swc1 $f0, 0x18($sp) -/* 25CC8 8004A8C8 860200A6 */ lh $v0, 0xa6($s0) -/* 25CCC 8004A8CC 27A60030 */ addiu $a2, $sp, 0x30 -/* 25CD0 8004A8D0 44820000 */ mtc1 $v0, $f0 -/* 25CD4 8004A8D4 00000000 */ nop -/* 25CD8 8004A8D8 46800020 */ cvt.s.w $f0, $f0 -/* 25CDC 8004A8DC E7A0001C */ swc1 $f0, 0x1c($sp) -/* 25CE0 8004A8E0 8E040080 */ lw $a0, 0x80($s0) -/* 25CE4 8004A8E4 0C037711 */ jal npc_test_move_simple_with_slipping -/* 25CE8 8004A8E8 27A70034 */ addiu $a3, $sp, 0x34 -/* 25CEC 8004A8EC 10400007 */ beqz $v0, .L8004A90C -/* 25CF0 8004A8F0 00000000 */ nop -/* 25CF4 8004A8F4 C60C0038 */ lwc1 $f12, 0x38($s0) -/* 25CF8 8004A8F8 C60E0040 */ lwc1 $f14, 0x40($s0) -/* 25CFC 8004A8FC 8FA6002C */ lw $a2, 0x2c($sp) -/* 25D00 8004A900 0C00A7B5 */ jal dist2D -/* 25D04 8004A904 8FA70034 */ lw $a3, 0x34($sp) -/* 25D08 8004A908 46000506 */ mov.s $f20, $f0 -.L8004A90C: -/* 25D0C 8004A90C C6000038 */ lwc1 $f0, 0x38($s0) -/* 25D10 8004A910 C602003C */ lwc1 $f2, 0x3c($s0) -/* 25D14 8004A914 C6040040 */ lwc1 $f4, 0x40($s0) -/* 25D18 8004A918 461ED301 */ sub.s $f12, $f26, $f30 -/* 25D1C 8004A91C E7A00038 */ swc1 $f0, 0x38($sp) -/* 25D20 8004A920 E7A2003C */ swc1 $f2, 0x3c($sp) -/* 25D24 8004A924 0C00A6C9 */ jal clamp_angle -/* 25D28 8004A928 E7A40040 */ swc1 $f4, 0x40($sp) -/* 25D2C 8004A92C C6020018 */ lwc1 $f2, 0x18($s0) -/* 25D30 8004A930 461C1082 */ mul.s $f2, $f2, $f28 -/* 25D34 8004A934 00000000 */ nop -/* 25D38 8004A938 E7A00014 */ swc1 $f0, 0x14($sp) -/* 25D3C 8004A93C E7A20010 */ swc1 $f2, 0x10($sp) -/* 25D40 8004A940 860200A8 */ lh $v0, 0xa8($s0) -/* 25D44 8004A944 27A50038 */ addiu $a1, $sp, 0x38 -/* 25D48 8004A948 44820000 */ mtc1 $v0, $f0 -/* 25D4C 8004A94C 00000000 */ nop -/* 25D50 8004A950 46800020 */ cvt.s.w $f0, $f0 -/* 25D54 8004A954 E7A00018 */ swc1 $f0, 0x18($sp) -/* 25D58 8004A958 860200A6 */ lh $v0, 0xa6($s0) -/* 25D5C 8004A95C 27A6003C */ addiu $a2, $sp, 0x3c -/* 25D60 8004A960 44820000 */ mtc1 $v0, $f0 -/* 25D64 8004A964 00000000 */ nop -/* 25D68 8004A968 46800020 */ cvt.s.w $f0, $f0 -/* 25D6C 8004A96C E7A0001C */ swc1 $f0, 0x1c($sp) -/* 25D70 8004A970 8E040080 */ lw $a0, 0x80($s0) -/* 25D74 8004A974 0C037711 */ jal npc_test_move_simple_with_slipping -/* 25D78 8004A978 27A70040 */ addiu $a3, $sp, 0x40 -/* 25D7C 8004A97C 10400007 */ beqz $v0, .L8004A99C -/* 25D80 8004A980 00000000 */ nop -/* 25D84 8004A984 C60C0038 */ lwc1 $f12, 0x38($s0) -/* 25D88 8004A988 C60E0040 */ lwc1 $f14, 0x40($s0) -/* 25D8C 8004A98C 8FA60038 */ lw $a2, 0x38($sp) -/* 25D90 8004A990 0C00A7B5 */ jal dist2D -/* 25D94 8004A994 8FA70040 */ lw $a3, 0x40($sp) -/* 25D98 8004A998 46000606 */ mov.s $f24, $f0 -.L8004A99C: -/* 25D9C 8004A99C 4616A03C */ c.lt.s $f20, $f22 -/* 25DA0 8004A9A0 00000000 */ nop -/* 25DA4 8004A9A4 45000005 */ bc1f .L8004A9BC -/* 25DA8 8004A9A8 00000000 */ nop -/* 25DAC 8004A9AC 4614C03C */ c.lt.s $f24, $f20 -/* 25DB0 8004A9B0 00000000 */ nop -/* 25DB4 8004A9B4 45010009 */ bc1t .L8004A9DC -/* 25DB8 8004A9B8 00000000 */ nop -.L8004A9BC: -/* 25DBC 8004A9BC 4616C03C */ c.lt.s $f24, $f22 -/* 25DC0 8004A9C0 00000000 */ nop -/* 25DC4 8004A9C4 45000007 */ bc1f .L8004A9E4 -/* 25DC8 8004A9C8 00000000 */ nop -/* 25DCC 8004A9CC 4618A03C */ c.lt.s $f20, $f24 -/* 25DD0 8004A9D0 00000000 */ nop -/* 25DD4 8004A9D4 45000003 */ bc1f .L8004A9E4 -/* 25DD8 8004A9D8 00000000 */ nop -.L8004A9DC: -/* 25DDC 8004A9DC 08012AA3 */ j .L8004AA8C -/* 25DE0 8004A9E0 C61A000C */ lwc1 $f26, 0xc($s0) -.L8004A9E4: -/* 25DE4 8004A9E4 4614B03C */ c.lt.s $f22, $f20 -/* 25DE8 8004A9E8 00000000 */ nop -/* 25DEC 8004A9EC 45000005 */ bc1f .L8004AA04 -/* 25DF0 8004A9F0 00000000 */ nop -/* 25DF4 8004A9F4 4616C03C */ c.lt.s $f24, $f22 -/* 25DF8 8004A9F8 00000000 */ nop -/* 25DFC 8004A9FC 45010009 */ bc1t .L8004AA24 -/* 25E00 8004AA00 00000000 */ nop -.L8004AA04: -/* 25E04 8004AA04 4614C03C */ c.lt.s $f24, $f20 -/* 25E08 8004AA08 00000000 */ nop -/* 25E0C 8004AA0C 4500000A */ bc1f .L8004AA38 -/* 25E10 8004AA10 00000000 */ nop -/* 25E14 8004AA14 4618B03C */ c.lt.s $f22, $f24 -/* 25E18 8004AA18 00000000 */ nop -/* 25E1C 8004AA1C 45000008 */ bc1f .L8004AA40 -/* 25E20 8004AA20 00000000 */ nop -.L8004AA24: -/* 25E24 8004AA24 C602000C */ lwc1 $f2, 0xc($s0) -/* 25E28 8004AA28 3C01420C */ lui $at, 0x420c -/* 25E2C 8004AA2C 44810000 */ mtc1 $at, $f0 -/* 25E30 8004AA30 08012AA3 */ j .L8004AA8C -/* 25E34 8004AA34 46001680 */ add.s $f26, $f2, $f0 -.L8004AA38: -/* 25E38 8004AA38 4618B03C */ c.lt.s $f22, $f24 -/* 25E3C 8004AA3C 00000000 */ nop -.L8004AA40: -/* 25E40 8004AA40 45000005 */ bc1f .L8004AA58 -/* 25E44 8004AA44 00000000 */ nop -/* 25E48 8004AA48 4616A03C */ c.lt.s $f20, $f22 -/* 25E4C 8004AA4C 00000000 */ nop -/* 25E50 8004AA50 45010009 */ bc1t .L8004AA78 -/* 25E54 8004AA54 00000000 */ nop -.L8004AA58: -/* 25E58 8004AA58 4618A03C */ c.lt.s $f20, $f24 -/* 25E5C 8004AA5C 00000000 */ nop -/* 25E60 8004AA60 4500000A */ bc1f .L8004AA8C -/* 25E64 8004AA64 00000000 */ nop -/* 25E68 8004AA68 4614B03C */ c.lt.s $f22, $f20 -/* 25E6C 8004AA6C 00000000 */ nop -/* 25E70 8004AA70 45000006 */ bc1f .L8004AA8C -/* 25E74 8004AA74 00000000 */ nop -.L8004AA78: -/* 25E78 8004AA78 C602000C */ lwc1 $f2, 0xc($s0) -/* 25E7C 8004AA7C 3C01420C */ lui $at, 0x420c -/* 25E80 8004AA80 44810000 */ mtc1 $at, $f0 -/* 25E84 8004AA84 00000000 */ nop -/* 25E88 8004AA88 46001681 */ sub.s $f26, $f2, $f0 -.L8004AA8C: -/* 25E8C 8004AA8C 12200004 */ beqz $s1, .L8004AAA0 -/* 25E90 8004AA90 00000000 */ nop -/* 25E94 8004AA94 0C00A6C9 */ jal clamp_angle -/* 25E98 8004AA98 4600D306 */ mov.s $f12, $f26 -/* 25E9C 8004AA9C E6200000 */ swc1 $f0, ($s1) -.L8004AAA0: -/* 25EA0 8004AAA0 56600001 */ bnel $s3, $zero, .L8004AAA8 -/* 25EA4 8004AAA4 E6760000 */ swc1 $f22, ($s3) -.L8004AAA8: -/* 25EA8 8004AAA8 56800001 */ bnel $s4, $zero, .L8004AAB0 -/* 25EAC 8004AAAC E6940000 */ swc1 $f20, ($s4) -.L8004AAB0: -/* 25EB0 8004AAB0 56A00001 */ bnel $s5, $zero, .L8004AAB8 -/* 25EB4 8004AAB4 E6B80000 */ swc1 $f24, ($s5) -.L8004AAB8: -/* 25EB8 8004AAB8 0240102D */ daddu $v0, $s2, $zero -/* 25EBC 8004AABC 8FBF0060 */ lw $ra, 0x60($sp) -/* 25EC0 8004AAC0 8FB5005C */ lw $s5, 0x5c($sp) -/* 25EC4 8004AAC4 8FB40058 */ lw $s4, 0x58($sp) -/* 25EC8 8004AAC8 8FB30054 */ lw $s3, 0x54($sp) -/* 25ECC 8004AACC 8FB20050 */ lw $s2, 0x50($sp) -/* 25ED0 8004AAD0 8FB1004C */ lw $s1, 0x4c($sp) -/* 25ED4 8004AAD4 8FB00048 */ lw $s0, 0x48($sp) -/* 25ED8 8004AAD8 D7BE0090 */ ldc1 $f30, 0x90($sp) -/* 25EDC 8004AADC D7BC0088 */ ldc1 $f28, 0x88($sp) -/* 25EE0 8004AAE0 D7BA0080 */ ldc1 $f26, 0x80($sp) -/* 25EE4 8004AAE4 D7B80078 */ ldc1 $f24, 0x78($sp) -/* 25EE8 8004AAE8 D7B60070 */ ldc1 $f22, 0x70($sp) -/* 25EEC 8004AAEC D7B40068 */ ldc1 $f20, 0x68($sp) -/* 25EF0 8004AAF0 03E00008 */ jr $ra -/* 25EF4 8004AAF4 27BD0098 */ addiu $sp, $sp, 0x98 -/* 25EF8 8004AAF8 00000000 */ nop -/* 25EFC 8004AAFC 00000000 */ nop diff --git a/ver/us/asm/nonmatchings/a5dd0_len_114e0/set_custom_gfx.s b/ver/us/asm/nonmatchings/a5dd0_len_114e0/set_custom_gfx.s deleted file mode 100644 index 5f71504fb7..0000000000 --- a/ver/us/asm/nonmatchings/a5dd0_len_114e0/set_custom_gfx.s +++ /dev/null @@ -1,11 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel set_custom_gfx -/* B23B4 8011BCB4 3C028015 */ lui $v0, %hi(gCurrentModelSpecialDlsPtr) -/* B23B8 8011BCB8 8C4212E8 */ lw $v0, %lo(gCurrentModelSpecialDlsPtr)($v0) -/* B23BC 8011BCBC 000420C0 */ sll $a0, $a0, 3 -/* B23C0 8011BCC0 00822021 */ addu $a0, $a0, $v0 -/* B23C4 8011BCC4 AC850000 */ sw $a1, ($a0) -/* B23C8 8011BCC8 03E00008 */ jr $ra -/* B23CC 8011BCCC AC860004 */ sw $a2, 4($a0) diff --git a/ver/us/asm/nonmatchings/state_demo/state_step_demo.s b/ver/us/asm/nonmatchings/state_demo/state_step_demo.s deleted file mode 100644 index f64f0c7887..0000000000 --- a/ver/us/asm/nonmatchings/state_demo/state_step_demo.s +++ /dev/null @@ -1,241 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -.section .rodata - -glabel jtbl_80098460 -.word L80038320_13720, L8003836C_1376C, L8003840C_1380C, L8003817C_1357C, L800381C8_135C8, 0, 0, 0 - -.section .text - -glabel state_step_demo -/* 134F4 800380F4 27BDFFD0 */ addiu $sp, $sp, -0x30 -/* 134F8 800380F8 3C058007 */ lui $a1, %hi(gGameStatusPtr) -/* 134FC 800380FC 8CA5419C */ lw $a1, %lo(gGameStatusPtr)($a1) -/* 13500 80038100 3C048007 */ lui $a0, %hi(D_80077AE0) -/* 13504 80038104 24847AE0 */ addiu $a0, $a0, %lo(D_80077AE0) -/* 13508 80038108 AFBF002C */ sw $ra, 0x2c($sp) -/* 1350C 8003810C AFB20028 */ sw $s2, 0x28($sp) -/* 13510 80038110 AFB10024 */ sw $s1, 0x24($sp) -/* 13514 80038114 AFB00020 */ sw $s0, 0x20($sp) -/* 13518 80038118 80A30072 */ lb $v1, 0x72($a1) -/* 1351C 8003811C 3C128011 */ lui $s2, %hi(gPlayerData) -/* 13520 80038120 2652F290 */ addiu $s2, $s2, %lo(gPlayerData) -/* 13524 80038124 00031040 */ sll $v0, $v1, 1 -/* 13528 80038128 00431021 */ addu $v0, $v0, $v1 -/* 1352C 8003812C 00021080 */ sll $v0, $v0, 2 -/* 13530 80038130 00448821 */ addu $s1, $v0, $a0 -/* 13534 80038134 24020004 */ addiu $v0, $zero, 4 -/* 13538 80038138 80A40071 */ lb $a0, 0x71($a1) -/* 1353C 8003813C 96230000 */ lhu $v1, ($s1) -/* 13540 80038140 50820001 */ beql $a0, $v0, .L80038148 -/* 13544 80038144 24030003 */ addiu $v1, $zero, 3 -.L80038148: -/* 13548 80038148 24020005 */ addiu $v0, $zero, 5 -/* 1354C 8003814C 50820001 */ beql $a0, $v0, .L80038154 -/* 13550 80038150 24030004 */ addiu $v1, $zero, 4 -.L80038154: -/* 13554 80038154 00031400 */ sll $v0, $v1, 0x10 -/* 13558 80038158 00021C03 */ sra $v1, $v0, 0x10 -/* 1355C 8003815C 2C620005 */ sltiu $v0, $v1, 5 -/* 13560 80038160 104000AC */ beqz $v0, .L80038414 -/* 13564 80038164 00031080 */ sll $v0, $v1, 2 -/* 13568 80038168 3C01800A */ lui $at, %hi(jtbl_80098460) -/* 1356C 8003816C 00220821 */ addu $at, $at, $v0 -/* 13570 80038170 8C228460 */ lw $v0, %lo(jtbl_80098460)($at) -/* 13574 80038174 00400008 */ jr $v0 -/* 13578 80038178 00000000 */ nop -glabel L8003817C_1357C -/* 1357C 8003817C 0C00CDF4 */ jal intro_logos_set_fade_alpha -/* 13580 80038180 240400FF */ addiu $a0, $zero, 0xff -/* 13584 80038184 0C00CDF8 */ jal intro_logos_set_fade_color -/* 13588 80038188 240400E0 */ addiu $a0, $zero, 0xe0 -/* 1358C 8003818C 3C108007 */ lui $s0, %hi(gGameStatusPtr) -/* 13590 80038190 2610419C */ addiu $s0, $s0, %lo(gGameStatusPtr) -/* 13594 80038194 8E030000 */ lw $v1, ($s0) -/* 13598 80038198 24020003 */ addiu $v0, $zero, 3 -/* 1359C 8003819C A06200AC */ sb $v0, 0xac($v1) -/* 135A0 800381A0 3C03800A */ lui $v1, %hi(gOverrideFlags) -/* 135A4 800381A4 2463A650 */ addiu $v1, $v1, %lo(gOverrideFlags) -/* 135A8 800381A8 8C620000 */ lw $v0, ($v1) -/* 135AC 800381AC 34420008 */ ori $v0, $v0, 8 -/* 135B0 800381B0 0C00CE1D */ jal intro_logos_update_fade -/* 135B4 800381B4 AC620000 */ sw $v0, ($v1) -/* 135B8 800381B8 8E030000 */ lw $v1, ($s0) -/* 135BC 800381BC 24020005 */ addiu $v0, $zero, 5 -/* 135C0 800381C0 0800E105 */ j .L80038414 -/* 135C4 800381C4 A0620071 */ sb $v0, 0x71($v1) -glabel L800381C8_135C8 -/* 135C8 800381C8 3C108007 */ lui $s0, %hi(gGameStatusPtr) -/* 135CC 800381CC 2610419C */ addiu $s0, $s0, %lo(gGameStatusPtr) -/* 135D0 800381D0 8E040000 */ lw $a0, ($s0) -/* 135D4 800381D4 808200AC */ lb $v0, 0xac($a0) -/* 135D8 800381D8 908300AC */ lbu $v1, 0xac($a0) -/* 135DC 800381DC 10400006 */ beqz $v0, .L800381F8 -/* 135E0 800381E0 2462FFFF */ addiu $v0, $v1, -1 -/* 135E4 800381E4 A08200AC */ sb $v0, 0xac($a0) -/* 135E8 800381E8 8E020000 */ lw $v0, ($s0) -/* 135EC 800381EC 804200AC */ lb $v0, 0xac($v0) -/* 135F0 800381F0 14400094 */ bnez $v0, .L80038444 -/* 135F4 800381F4 00000000 */ nop -.L800381F8: -/* 135F8 800381F8 8E020000 */ lw $v0, ($s0) -/* 135FC 800381FC A0400072 */ sb $zero, 0x72($v0) -/* 13600 80038200 8E020000 */ lw $v0, ($s0) -/* 13604 80038204 A0400071 */ sb $zero, 0x71($v0) -/* 13608 80038208 8E020000 */ lw $v0, ($s0) -/* 1360C 8003820C 0C015881 */ jal func_80056204 -/* 13610 80038210 A040007E */ sb $zero, 0x7e($v0) -/* 13614 80038214 8E020000 */ lw $v0, ($s0) -/* 13618 80038218 A0400070 */ sb $zero, 0x70($v0) -/* 1361C 8003821C 8E020000 */ lw $v0, ($s0) -/* 13620 80038220 A0400076 */ sb $zero, 0x76($v0) -/* 13624 80038224 8E020000 */ lw $v0, ($s0) -/* 13628 80038228 A0400078 */ sb $zero, 0x78($v0) -/* 1362C 8003822C 8E020000 */ lw $v0, ($s0) -/* 13630 80038230 3C04800A */ lui $a0, %hi(gOverrideFlags) -/* 13634 80038234 2484A650 */ addiu $a0, $a0, %lo(gOverrideFlags) -/* 13638 80038238 A040007D */ sb $zero, 0x7d($v0) -/* 1363C 8003823C 8C820000 */ lw $v0, ($a0) -/* 13640 80038240 2403FFF7 */ addiu $v1, $zero, -9 -/* 13644 80038244 00431024 */ and $v0, $v0, $v1 -/* 13648 80038248 0C00AB00 */ jal general_heap_create -/* 1364C 8003824C AC820000 */ sw $v0, ($a0) -/* 13650 80038250 0C047624 */ jal clear_render_tasks -/* 13654 80038254 00000000 */ nop -/* 13658 80038258 0C048C2E */ jal clear_generic_entity_list -/* 1365C 8003825C 00000000 */ nop -/* 13660 80038260 0C0B0C77 */ jal clear_script_list -/* 13664 80038264 00000000 */ nop -/* 13668 80038268 0C00B7BD */ jal create_cameras_a -/* 1366C 8003826C 00000000 */ nop -/* 13670 80038270 0C0B763E */ jal spr_init_sprites -/* 13674 80038274 0000202D */ daddu $a0, $zero, $zero -/* 13678 80038278 0C0482EC */ jal clear_entity_models -/* 1367C 8003827C 00000000 */ nop -/* 13680 80038280 0C047889 */ jal clear_animator_list -/* 13684 80038284 00000000 */ nop -/* 13688 80038288 0C045751 */ jal clear_model_data -/* 1368C 8003828C 00000000 */ nop -/* 13690 80038290 0C052010 */ jal clear_sprite_shading_data -/* 13694 80038294 00000000 */ nop -/* 13698 80038298 0C05177E */ jal reset_background_settings -/* 1369C 8003829C 00000000 */ nop -/* 136A0 800382A0 0C050440 */ jal clear_hud_element_cache -/* 136A4 800382A4 00000000 */ nop -/* 136A8 800382A8 0C0515A0 */ jal clear_trigger_data -/* 136AC 800382AC 00000000 */ nop -/* 136B0 800382B0 0C048D9D */ jal clear_printers -/* 136B4 800382B4 00000000 */ nop -/* 136B8 800382B8 0C04432E */ jal clear_entity_data -/* 136BC 800382BC 0000202D */ daddu $a0, $zero, $zero -/* 136C0 800382C0 0C04E042 */ jal clear_screen_overlays -/* 136C4 800382C4 00000000 */ nop -/* 136C8 800382C8 0C037F14 */ jal clear_player_status -/* 136CC 800382CC 00000000 */ nop -/* 136D0 800382D0 0C00E12F */ jal clear_npcs -/* 136D4 800382D4 00000000 */ nop -/* 136D8 800382D8 0C039CE8 */ jal clear_player_data -/* 136DC 800382DC 00000000 */ nop -/* 136E0 800382E0 0C01CACC */ jal reset_battle_status -/* 136E4 800382E4 00000000 */ nop -/* 136E8 800382E8 0C00F8CE */ jal init_encounter_status -/* 136EC 800382EC 00000000 */ nop -/* 136F0 800382F0 0C016727 */ jal clear_effect_data -/* 136F4 800382F4 00000000 */ nop -/* 136F8 800382F8 0C04C3FC */ jal clear_item_entity_data -/* 136FC 800382FC 00000000 */ nop -/* 13700 80038300 0C0514C8 */ jal clear_saved_variables -/* 13704 80038304 00000000 */ nop -/* 13708 80038308 0C016BE5 */ jal initialize_collision -/* 1370C 8003830C 00000000 */ nop -/* 13710 80038310 0C00CD3C */ jal set_game_mode -/* 13714 80038314 24040002 */ addiu $a0, $zero, 2 -/* 13718 80038318 0800E111 */ j .L80038444 -/* 1371C 8003831C 00000000 */ nop -glabel L80038320_13720 -/* 13720 80038320 27A50018 */ addiu $a1, $sp, 0x18 -/* 13724 80038324 8E240008 */ lw $a0, 8($s1) -/* 13728 80038328 0C016AFE */ jal get_map_IDs_by_name -/* 1372C 8003832C 27A6001A */ addiu $a2, $sp, 0x1a -/* 13730 80038330 0000202D */ daddu $a0, $zero, $zero -/* 13734 80038334 2405001D */ addiu $a1, $zero, 0x1d -/* 13738 80038338 3C108007 */ lui $s0, %hi(gGameStatusPtr) -/* 1373C 8003833C 2610419C */ addiu $s0, $s0, %lo(gGameStatusPtr) -/* 13740 80038340 8E020000 */ lw $v0, ($s0) -/* 13744 80038344 97A30018 */ lhu $v1, 0x18($sp) -/* 13748 80038348 97A7001A */ lhu $a3, 0x1a($sp) -/* 1374C 8003834C 24060014 */ addiu $a2, $zero, 0x14 -/* 13750 80038350 A4430086 */ sh $v1, 0x86($v0) -/* 13754 80038354 A447008C */ sh $a3, 0x8c($v0) -/* 13758 80038358 96230002 */ lhu $v1, 2($s1) -/* 1375C 8003835C 2407FEFA */ addiu $a3, $zero, -0x106 -/* 13760 80038360 A040007E */ sb $zero, 0x7e($v0) -/* 13764 80038364 0800E0EE */ j .L800383B8 -/* 13768 80038368 A443008E */ sh $v1, 0x8e($v0) -glabel L8003836C_1376C -/* 1376C 8003836C 27A50018 */ addiu $a1, $sp, 0x18 -/* 13770 80038370 8E240008 */ lw $a0, 8($s1) -/* 13774 80038374 0C016AFE */ jal get_map_IDs_by_name -/* 13778 80038378 27A6001A */ addiu $a2, $sp, 0x1a -/* 1377C 8003837C 0000202D */ daddu $a0, $zero, $zero -/* 13780 80038380 2405001D */ addiu $a1, $zero, 0x1d -/* 13784 80038384 24060014 */ addiu $a2, $zero, 0x14 -/* 13788 80038388 3C108007 */ lui $s0, %hi(gGameStatusPtr) -/* 1378C 8003838C 2610419C */ addiu $s0, $s0, %lo(gGameStatusPtr) -/* 13790 80038390 8E030000 */ lw $v1, ($s0) -/* 13794 80038394 97A20018 */ lhu $v0, 0x18($sp) -/* 13798 80038398 97A8001A */ lhu $t0, 0x1a($sp) -/* 1379C 8003839C 2407FEFA */ addiu $a3, $zero, -0x106 -/* 137A0 800383A0 A4620086 */ sh $v0, 0x86($v1) -/* 137A4 800383A4 A468008C */ sh $t0, 0x8c($v1) -/* 137A8 800383A8 96280002 */ lhu $t0, 2($s1) -/* 137AC 800383AC 24020001 */ addiu $v0, $zero, 1 -/* 137B0 800383B0 A062007E */ sb $v0, 0x7e($v1) -/* 137B4 800383B4 A468008E */ sh $t0, 0x8e($v1) -.L800383B8: -/* 137B8 800383B8 92230005 */ lbu $v1, 5($s1) -/* 137BC 800383BC 240200B1 */ addiu $v0, $zero, 0xb1 -/* 137C0 800383C0 AFA20010 */ sw $v0, 0x10($sp) -/* 137C4 800383C4 0C00B8C5 */ jal set_cam_viewport -/* 137C8 800383C8 A2430012 */ sb $v1, 0x12($s2) -/* 137CC 800383CC 0000202D */ daddu $a0, $zero, $zero -/* 137D0 800383D0 3C05F5DE */ lui $a1, 0xf5de -/* 137D4 800383D4 82260006 */ lb $a2, 6($s1) -/* 137D8 800383D8 0C0B2026 */ jal set_variable -/* 137DC 800383DC 34A50180 */ ori $a1, $a1, 0x180 -/* 137E0 800383E0 8E020000 */ lw $v0, ($s0) -/* 137E4 800383E4 80420072 */ lb $v0, 0x72($v0) -/* 137E8 800383E8 14400002 */ bnez $v0, .L800383F4 -/* 137EC 800383EC 24040002 */ addiu $a0, $zero, 2 -/* 137F0 800383F0 24040003 */ addiu $a0, $zero, 3 -.L800383F4: -/* 137F4 800383F4 0C04E0A8 */ jal set_map_transition_effect -/* 137F8 800383F8 00000000 */ nop -/* 137FC 800383FC 0C00CD3C */ jal set_game_mode -/* 13800 80038400 24040003 */ addiu $a0, $zero, 3 -/* 13804 80038404 0800E105 */ j .L80038414 -/* 13808 80038408 00000000 */ nop -glabel L8003840C_1380C -/* 1380C 8003840C 0C01CB85 */ jal load_demo_battle -/* 13810 80038410 96240002 */ lhu $a0, 2($s1) -.L80038414: -/* 13814 80038414 3C048007 */ lui $a0, %hi(gGameStatusPtr) -/* 13818 80038418 2484419C */ addiu $a0, $a0, %lo(gGameStatusPtr) -/* 1381C 8003841C 8C830000 */ lw $v1, ($a0) -/* 13820 80038420 90620072 */ lbu $v0, 0x72($v1) -/* 13824 80038424 24420001 */ addiu $v0, $v0, 1 -/* 13828 80038428 A0620072 */ sb $v0, 0x72($v1) -/* 1382C 8003842C 8C840000 */ lw $a0, ($a0) -/* 13830 80038430 80820072 */ lb $v0, 0x72($a0) -/* 13834 80038434 28420013 */ slti $v0, $v0, 0x13 -/* 13838 80038438 14400002 */ bnez $v0, .L80038444 -/* 1383C 8003843C 24020012 */ addiu $v0, $zero, 0x12 -/* 13840 80038440 A0820072 */ sb $v0, 0x72($a0) -.L80038444: -/* 13844 80038444 8FBF002C */ lw $ra, 0x2c($sp) -/* 13848 80038448 8FB20028 */ lw $s2, 0x28($sp) -/* 1384C 8003844C 8FB10024 */ lw $s1, 0x24($sp) -/* 13850 80038450 8FB00020 */ lw $s0, 0x20($sp) -/* 13854 80038454 03E00008 */ jr $ra -/* 13858 80038458 27BD0030 */ addiu $sp, $sp, 0x30 diff --git a/ver/us/asm/nonmatchings/state_intro/state_step_intro.s b/ver/us/asm/nonmatchings/state_intro/state_step_intro.s deleted file mode 100644 index a40b7303e4..0000000000 --- a/ver/us/asm/nonmatchings/state_intro/state_step_intro.s +++ /dev/null @@ -1,386 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -.section .rodata - -glabel jtbl_80098338 -.word L8003696C_11D6C, L80036A20_11E20, L80036AA0_11EA0, L80036C40_12040, L80036D04_12104, L80036D78_12178, L80036D78_12178, L80036D78_12178, L80036D78_12178, L80036D78_12178, L80036D78_12178, L80036D78_12178, L80036D78_12178, L80036D78_12178, L80036D78_12178, L80036D78_12178, L80036D78_12178, L80036D78_12178, L80036D78_12178, L80036D78_12178, L80036D78_12178, L80036A5C_11E5C - -.section .text - -glabel state_step_intro -/* 11C54 80036854 27BDFFD8 */ addiu $sp, $sp, -0x28 -/* 11C58 80036858 AFB10014 */ sw $s1, 0x14($sp) -/* 11C5C 8003685C 3C118011 */ lui $s1, %hi(gPlayerData) -/* 11C60 80036860 2631F290 */ addiu $s1, $s1, %lo(gPlayerData) -/* 11C64 80036864 3C028007 */ lui $v0, %hi(gGameStatusPtr) -/* 11C68 80036868 8C42419C */ lw $v0, %lo(gGameStatusPtr)($v0) -/* 11C6C 8003686C 2404FFFF */ addiu $a0, $zero, -1 -/* 11C70 80036870 AFBF0018 */ sw $ra, 0x18($sp) -/* 11C74 80036874 AFB00010 */ sw $s0, 0x10($sp) -/* 11C78 80036878 F7B40020 */ sdc1 $f20, 0x20($sp) -/* 11C7C 8003687C 804300A8 */ lb $v1, 0xa8($v0) -/* 11C80 80036880 1064002F */ beq $v1, $a0, .L80036940 -/* 11C84 80036884 8C450010 */ lw $a1, 0x10($v0) -/* 11C88 80036888 3C03800A */ lui $v1, %hi(D_800A0964) -/* 11C8C 8003688C 24630964 */ addiu $v1, $v1, %lo(D_800A0964) -/* 11C90 80036890 8C620000 */ lw $v0, ($v1) -/* 11C94 80036894 14400004 */ bnez $v0, .L800368A8 -/* 11C98 80036898 30A2F000 */ andi $v0, $a1, 0xf000 -/* 11C9C 8003689C 10400002 */ beqz $v0, .L800368A8 -/* 11CA0 800368A0 24020001 */ addiu $v0, $zero, 1 -/* 11CA4 800368A4 AC620000 */ sw $v0, ($v1) -.L800368A8: -/* 11CA8 800368A8 3C03800A */ lui $v1, %hi(D_800A0964) -/* 11CAC 800368AC 8C630964 */ lw $v1, %lo(D_800A0964)($v1) -/* 11CB0 800368B0 24020001 */ addiu $v0, $zero, 1 -/* 11CB4 800368B4 14620010 */ bne $v1, $v0, .L800368F8 -/* 11CB8 800368B8 24020002 */ addiu $v0, $zero, 2 -/* 11CBC 800368BC 3C048007 */ lui $a0, %hi(gGameStatusPtr) -/* 11CC0 800368C0 8C84419C */ lw $a0, %lo(gGameStatusPtr)($a0) -/* 11CC4 800368C4 908300AC */ lbu $v1, 0xac($a0) -/* 11CC8 800368C8 2C620002 */ sltiu $v0, $v1, 2 -/* 11CCC 800368CC 14400018 */ bnez $v0, .L80036930 -/* 11CD0 800368D0 24020064 */ addiu $v0, $zero, 0x64 -/* 11CD4 800368D4 00031600 */ sll $v0, $v1, 0x18 -/* 11CD8 800368D8 00021603 */ sra $v0, $v0, 0x18 -/* 11CDC 800368DC 24030004 */ addiu $v1, $zero, 4 -/* 11CE0 800368E0 14430003 */ bne $v0, $v1, .L800368F0 -/* 11CE4 800368E4 24020002 */ addiu $v0, $zero, 2 -/* 11CE8 800368E8 0800DA4C */ j .L80036930 -/* 11CEC 800368EC 24020064 */ addiu $v0, $zero, 0x64 -.L800368F0: -/* 11CF0 800368F0 3C03800A */ lui $v1, %hi(D_800A0964) -/* 11CF4 800368F4 8C630964 */ lw $v1, %lo(D_800A0964)($v1) -.L800368F8: -/* 11CF8 800368F8 14620011 */ bne $v1, $v0, .L80036940 -/* 11CFC 800368FC 00000000 */ nop -/* 11D00 80036900 3C048007 */ lui $a0, %hi(gGameStatusPtr) -/* 11D04 80036904 8C84419C */ lw $a0, %lo(gGameStatusPtr)($a0) -/* 11D08 80036908 908300AC */ lbu $v1, 0xac($a0) -/* 11D0C 8003690C 2C620002 */ sltiu $v0, $v1, 2 -/* 11D10 80036910 14400005 */ bnez $v0, .L80036928 -/* 11D14 80036914 00031600 */ sll $v0, $v1, 0x18 -/* 11D18 80036918 00021603 */ sra $v0, $v0, 0x18 -/* 11D1C 8003691C 24030004 */ addiu $v1, $zero, 4 -/* 11D20 80036920 14430007 */ bne $v0, $v1, .L80036940 -/* 11D24 80036924 00000000 */ nop -.L80036928: -/* 11D28 80036928 908200A8 */ lbu $v0, 0xa8($a0) -/* 11D2C 8003692C 24420001 */ addiu $v0, $v0, 1 -.L80036930: -/* 11D30 80036930 0C00D994 */ jal state_init_intro -/* 11D34 80036934 A08200A8 */ sb $v0, 0xa8($a0) -/* 11D38 80036938 0800DB72 */ j .L80036DC8 -/* 11D3C 8003693C 00000000 */ nop -.L80036940: -/* 11D40 80036940 3C028007 */ lui $v0, %hi(gGameStatusPtr) -/* 11D44 80036944 8C42419C */ lw $v0, %lo(gGameStatusPtr)($v0) -/* 11D48 80036948 804300AC */ lb $v1, 0xac($v0) -/* 11D4C 8003694C 2C620016 */ sltiu $v0, $v1, 0x16 -/* 11D50 80036950 10400109 */ beqz $v0, L80036D78_12178 -/* 11D54 80036954 00031080 */ sll $v0, $v1, 2 -/* 11D58 80036958 3C01800A */ lui $at, %hi(jtbl_80098338) -/* 11D5C 8003695C 00220821 */ addu $at, $at, $v0 -/* 11D60 80036960 8C228338 */ lw $v0, %lo(jtbl_80098338)($at) -/* 11D64 80036964 00400008 */ jr $v0 -/* 11D68 80036968 00000000 */ nop -glabel L8003696C_11D6C -/* 11D6C 8003696C 0C016754 */ jal update_effects -/* 11D70 80036970 00000000 */ nop -/* 11D74 80036974 0C00B500 */ jal update_cameras -/* 11D78 80036978 00000000 */ nop -/* 11D7C 8003697C 3C108007 */ lui $s0, %hi(gGameStatusPtr) -/* 11D80 80036980 2610419C */ addiu $s0, $s0, %lo(gGameStatusPtr) -/* 11D84 80036984 8E060000 */ lw $a2, ($s0) -/* 11D88 80036988 80C300A8 */ lb $v1, 0xa8($a2) -/* 11D8C 8003698C 2402FFFF */ addiu $v0, $zero, -1 -/* 11D90 80036990 14620010 */ bne $v1, $v0, .L800369D4 -/* 11D94 80036994 00000000 */ nop -/* 11D98 80036998 44806000 */ mtc1 $zero, $f12 -/* 11D9C 8003699C 0C00AFC5 */ jal set_curtain_fade_goal -/* 11DA0 800369A0 00000000 */ nop -/* 11DA4 800369A4 3C04800A */ lui $a0, %hi(D_800A0956) -/* 11DA8 800369A8 84840956 */ lh $a0, %lo(D_800A0956)($a0) -/* 11DAC 800369AC 0C00CE0C */ jal intro_logos_fade_out -/* 11DB0 800369B0 00000000 */ nop -/* 11DB4 800369B4 104000F0 */ beqz $v0, L80036D78_12178 -/* 11DB8 800369B8 24020001 */ addiu $v0, $zero, 1 -/* 11DBC 800369BC 0000202D */ daddu $a0, $zero, $zero -/* 11DC0 800369C0 8E030000 */ lw $v1, ($s0) -/* 11DC4 800369C4 0C00AFC1 */ jal set_curtain_draw_callback -/* 11DC8 800369C8 A06200AC */ sb $v0, 0xac($v1) -/* 11DCC 800369CC 0800DB5E */ j L80036D78_12178 -/* 11DD0 800369D0 00000000 */ nop -.L800369D4: -/* 11DD4 800369D4 3C05800A */ lui $a1, %hi(D_800A0954) -/* 11DD8 800369D8 24A50954 */ addiu $a1, $a1, %lo(D_800A0954) -/* 11DDC 800369DC 94A20000 */ lhu $v0, ($a1) -/* 11DE0 800369E0 3C03800A */ lui $v1, %hi(D_800A0956) -/* 11DE4 800369E4 94630956 */ lhu $v1, %lo(D_800A0956)($v1) -/* 11DE8 800369E8 00431021 */ addu $v0, $v0, $v1 -/* 11DEC 800369EC A4A20000 */ sh $v0, ($a1) -/* 11DF0 800369F0 00021400 */ sll $v0, $v0, 0x10 -/* 11DF4 800369F4 00021403 */ sra $v0, $v0, 0x10 -/* 11DF8 800369F8 284200FF */ slti $v0, $v0, 0xff -/* 11DFC 800369FC 144000DE */ bnez $v0, L80036D78_12178 -/* 11E00 80036A00 240200FF */ addiu $v0, $zero, 0xff -/* 11E04 80036A04 0000202D */ daddu $a0, $zero, $zero -/* 11E08 80036A08 A4A20000 */ sh $v0, ($a1) -/* 11E0C 80036A0C 24020001 */ addiu $v0, $zero, 1 -/* 11E10 80036A10 0C00AFC1 */ jal set_curtain_draw_callback -/* 11E14 80036A14 A0C200AC */ sb $v0, 0xac($a2) -/* 11E18 80036A18 0800DB5E */ j L80036D78_12178 -/* 11E1C 80036A1C 00000000 */ nop -glabel L80036A20_11E20 -/* 11E20 80036A20 3C04800A */ lui $a0, %hi(gOverrideFlags) -/* 11E24 80036A24 2484A650 */ addiu $a0, $a0, %lo(gOverrideFlags) -/* 11E28 80036A28 8C820000 */ lw $v0, ($a0) -/* 11E2C 80036A2C 24030004 */ addiu $v1, $zero, 4 -/* 11E30 80036A30 3C01800A */ lui $at, %hi(D_800A0950) -/* 11E34 80036A34 AC230950 */ sw $v1, %lo(D_800A0950)($at) -/* 11E38 80036A38 34420008 */ ori $v0, $v0, 8 -/* 11E3C 80036A3C AC820000 */ sw $v0, ($a0) -/* 11E40 80036A40 3C03800A */ lui $v1, %hi(D_800A0960) -/* 11E44 80036A44 8C630960 */ lw $v1, %lo(D_800A0960)($v1) -/* 11E48 80036A48 2402000E */ addiu $v0, $zero, 0xe -/* 11E4C 80036A4C 106200CA */ beq $v1, $v0, L80036D78_12178 -/* 11E50 80036A50 00000000 */ nop -/* 11E54 80036A54 0800DAA3 */ j .L80036A8C -/* 11E58 80036A58 00000000 */ nop -glabel L80036A5C_11E5C -/* 11E5C 80036A5C 3C03800A */ lui $v1, %hi(D_800A0950) -/* 11E60 80036A60 24630950 */ addiu $v1, $v1, %lo(D_800A0950) -/* 11E64 80036A64 8C620000 */ lw $v0, ($v1) -/* 11E68 80036A68 2442FFFF */ addiu $v0, $v0, -1 -/* 11E6C 80036A6C 1C4000C2 */ bgtz $v0, L80036D78_12178 -/* 11E70 80036A70 AC620000 */ sw $v0, ($v1) -/* 11E74 80036A74 3C04800A */ lui $a0, %hi(gOverrideFlags) -/* 11E78 80036A78 2484A650 */ addiu $a0, $a0, %lo(gOverrideFlags) -/* 11E7C 80036A7C 8C820000 */ lw $v0, ($a0) -/* 11E80 80036A80 2403FFF7 */ addiu $v1, $zero, -9 -/* 11E84 80036A84 00431024 */ and $v0, $v0, $v1 -/* 11E88 80036A88 AC820000 */ sw $v0, ($a0) -.L80036A8C: -/* 11E8C 80036A8C 3C038007 */ lui $v1, %hi(gGameStatusPtr) -/* 11E90 80036A90 8C63419C */ lw $v1, %lo(gGameStatusPtr)($v1) -/* 11E94 80036A94 24020002 */ addiu $v0, $zero, 2 -/* 11E98 80036A98 0800DB5E */ j L80036D78_12178 -/* 11E9C 80036A9C A06200AC */ sb $v0, 0xac($v1) -glabel L80036AA0_11EA0 -/* 11EA0 80036AA0 0C00AFC1 */ jal set_curtain_draw_callback -/* 11EA4 80036AA4 0000202D */ daddu $a0, $zero, $zero -/* 11EA8 80036AA8 3C038007 */ lui $v1, %hi(gGameStatusPtr) -/* 11EAC 80036AAC 2463419C */ addiu $v1, $v1, %lo(gGameStatusPtr) -/* 11EB0 80036AB0 8C620000 */ lw $v0, ($v1) -/* 11EB4 80036AB4 A0400070 */ sb $zero, 0x70($v0) -/* 11EB8 80036AB8 8C620000 */ lw $v0, ($v1) -/* 11EBC 80036ABC A0400076 */ sb $zero, 0x76($v0) -/* 11EC0 80036AC0 8C620000 */ lw $v0, ($v1) -/* 11EC4 80036AC4 A0400078 */ sb $zero, 0x78($v0) -/* 11EC8 80036AC8 8C620000 */ lw $v0, ($v1) -/* 11ECC 80036ACC A040007D */ sb $zero, 0x7d($v0) -/* 11ED0 80036AD0 8C620000 */ lw $v0, ($v1) -/* 11ED4 80036AD4 804200A8 */ lb $v0, 0xa8($v0) -/* 11ED8 80036AD8 2405FFFF */ addiu $a1, $zero, -1 -/* 11EDC 80036ADC 14450037 */ bne $v0, $a1, .L80036BBC -/* 11EE0 80036AE0 2404000B */ addiu $a0, $zero, 0xb -/* 11EE4 80036AE4 0C00AB00 */ jal general_heap_create -/* 11EE8 80036AE8 00000000 */ nop -/* 11EEC 80036AEC 0C047624 */ jal clear_render_tasks -/* 11EF0 80036AF0 00000000 */ nop -/* 11EF4 80036AF4 0C048C2E */ jal clear_generic_entity_list -/* 11EF8 80036AF8 00000000 */ nop -/* 11EFC 80036AFC 0C0B0C77 */ jal clear_script_list -/* 11F00 80036B00 00000000 */ nop -/* 11F04 80036B04 0C00B7BD */ jal create_cameras_a -/* 11F08 80036B08 00000000 */ nop -/* 11F0C 80036B0C 0C0B763E */ jal spr_init_sprites -/* 11F10 80036B10 0000202D */ daddu $a0, $zero, $zero -/* 11F14 80036B14 0C0482EC */ jal clear_entity_models -/* 11F18 80036B18 00000000 */ nop -/* 11F1C 80036B1C 0C047889 */ jal clear_animator_list -/* 11F20 80036B20 00000000 */ nop -/* 11F24 80036B24 0C045751 */ jal clear_model_data -/* 11F28 80036B28 00000000 */ nop -/* 11F2C 80036B2C 0C052010 */ jal clear_sprite_shading_data -/* 11F30 80036B30 00000000 */ nop -/* 11F34 80036B34 0C05177E */ jal reset_background_settings -/* 11F38 80036B38 00000000 */ nop -/* 11F3C 80036B3C 0C050440 */ jal clear_hud_element_cache -/* 11F40 80036B40 00000000 */ nop -/* 11F44 80036B44 0C0515A0 */ jal clear_trigger_data -/* 11F48 80036B48 00000000 */ nop -/* 11F4C 80036B4C 0C048D9D */ jal clear_printers -/* 11F50 80036B50 00000000 */ nop -/* 11F54 80036B54 0C04432E */ jal clear_entity_data -/* 11F58 80036B58 0000202D */ daddu $a0, $zero, $zero -/* 11F5C 80036B5C 0C04E042 */ jal clear_screen_overlays -/* 11F60 80036B60 00000000 */ nop -/* 11F64 80036B64 0C037F14 */ jal clear_player_status -/* 11F68 80036B68 00000000 */ nop -/* 11F6C 80036B6C 0C00E12F */ jal clear_npcs -/* 11F70 80036B70 00000000 */ nop -/* 11F74 80036B74 0C039CE8 */ jal clear_player_data -/* 11F78 80036B78 00000000 */ nop -/* 11F7C 80036B7C 0C01CACC */ jal reset_battle_status -/* 11F80 80036B80 00000000 */ nop -/* 11F84 80036B84 0C00F8CE */ jal init_encounter_status -/* 11F88 80036B88 00000000 */ nop -/* 11F8C 80036B8C 0C016727 */ jal clear_effect_data -/* 11F90 80036B90 00000000 */ nop -/* 11F94 80036B94 0C04C3FC */ jal clear_item_entity_data -/* 11F98 80036B98 00000000 */ nop -/* 11F9C 80036B9C 0C0514C8 */ jal clear_saved_variables -/* 11FA0 80036BA0 00000000 */ nop -/* 11FA4 80036BA4 0C016BE5 */ jal initialize_collision -/* 11FA8 80036BA8 00000000 */ nop -/* 11FAC 80036BAC 0C00CD3C */ jal set_game_mode -/* 11FB0 80036BB0 24040002 */ addiu $a0, $zero, 2 -/* 11FB4 80036BB4 0800DB72 */ j .L80036DC8 -/* 11FB8 80036BB8 00000000 */ nop -.L80036BBC: -/* 11FBC 80036BBC 26230058 */ addiu $v1, $s1, 0x58 -/* 11FC0 80036BC0 2402000A */ addiu $v0, $zero, 0xa -/* 11FC4 80036BC4 A2220002 */ sb $v0, 2($s1) -/* 11FC8 80036BC8 A2220003 */ sb $v0, 3($s1) -/* 11FCC 80036BCC A2220004 */ sb $v0, 4($s1) -/* 11FD0 80036BD0 24020005 */ addiu $v0, $zero, 5 -/* 11FD4 80036BD4 A2220005 */ sb $v0, 5($s1) -/* 11FD8 80036BD8 A2220006 */ sb $v0, 6($s1) -/* 11FDC 80036BDC A2220007 */ sb $v0, 7($s1) -/* 11FE0 80036BE0 24020002 */ addiu $v0, $zero, 2 -/* 11FE4 80036BE4 A2220008 */ sb $v0, 8($s1) -/* 11FE8 80036BE8 A2200000 */ sb $zero, ($s1) -/* 11FEC 80036BEC A2250001 */ sb $a1, 1($s1) -/* 11FF0 80036BF0 A220000E */ sb $zero, 0xe($s1) -/* 11FF4 80036BF4 A2200009 */ sb $zero, 9($s1) -.L80036BF8: -/* 11FF8 80036BF8 A0600014 */ sb $zero, 0x14($v1) -/* 11FFC 80036BFC 2484FFFF */ addiu $a0, $a0, -1 -/* 12000 80036C00 0481FFFD */ bgez $a0, .L80036BF8 -/* 12004 80036C04 2463FFF8 */ addiu $v1, $v1, -8 -/* 12008 80036C08 3C108007 */ lui $s0, %hi(gGameStatusPtr) -/* 1200C 80036C0C 2610419C */ addiu $s0, $s0, %lo(gGameStatusPtr) -/* 12010 80036C10 8E020000 */ lw $v0, ($s0) -/* 12014 80036C14 A2200012 */ sb $zero, 0x12($s1) -/* 12018 80036C18 84440086 */ lh $a0, 0x86($v0) -/* 1201C 80036C1C 8445008C */ lh $a1, 0x8c($v0) -/* 12020 80036C20 0C0169BD */ jal load_map_by_IDs -/* 12024 80036C24 0000302D */ daddu $a2, $zero, $zero -/* 12028 80036C28 8E030000 */ lw $v1, ($s0) -/* 1202C 80036C2C 24020003 */ addiu $v0, $zero, 3 -/* 12030 80036C30 0C03805E */ jal disable_player_input -/* 12034 80036C34 A06200AC */ sb $v0, 0xac($v1) -/* 12038 80036C38 0800DB5E */ j L80036D78_12178 -/* 1203C 80036C3C 00000000 */ nop -glabel L80036C40_12040 -/* 12040 80036C40 3C04800A */ lui $a0, %hi(D_800A0960) -/* 12044 80036C44 24840960 */ addiu $a0, $a0, %lo(D_800A0960) -/* 12048 80036C48 8C830000 */ lw $v1, ($a0) -/* 1204C 80036C4C 2402000E */ addiu $v0, $zero, 0xe -/* 12050 80036C50 14620004 */ bne $v1, $v0, .L80036C64 -/* 12054 80036C54 240200FF */ addiu $v0, $zero, 0xff -/* 12058 80036C58 2402000F */ addiu $v0, $zero, 0xf -/* 1205C 80036C5C AC820000 */ sw $v0, ($a0) -/* 12060 80036C60 240200FF */ addiu $v0, $zero, 0xff -.L80036C64: -/* 12064 80036C64 3C04800A */ lui $a0, %hi(gOverrideFlags) -/* 12068 80036C68 2484A650 */ addiu $a0, $a0, %lo(gOverrideFlags) -/* 1206C 80036C6C 2405FFF7 */ addiu $a1, $zero, -9 -/* 12070 80036C70 3C03800A */ lui $v1, %hi(D_800A0958) -/* 12074 80036C74 94630958 */ lhu $v1, %lo(D_800A0958)($v1) -/* 12078 80036C78 3C06800B */ lui $a2, %hi(gCameras) -/* 1207C 80036C7C 24C61D80 */ addiu $a2, $a2, %lo(gCameras) -/* 12080 80036C80 00431023 */ subu $v0, $v0, $v1 -/* 12084 80036C84 3C01800A */ lui $at, %hi(D_800A0954) -/* 12088 80036C88 A4220954 */ sh $v0, %lo(D_800A0954)($at) -/* 1208C 80036C8C 8C830000 */ lw $v1, ($a0) -/* 12090 80036C90 94C20000 */ lhu $v0, ($a2) -/* 12094 80036C94 00651824 */ and $v1, $v1, $a1 -/* 12098 80036C98 3042FFFD */ andi $v0, $v0, 0xfffd -/* 1209C 80036C9C AC830000 */ sw $v1, ($a0) -/* 120A0 80036CA0 A4C20000 */ sh $v0, ($a2) -/* 120A4 80036CA4 2402FFFD */ addiu $v0, $zero, -3 -/* 120A8 80036CA8 00621824 */ and $v1, $v1, $v0 -/* 120AC 80036CAC 0C037DD0 */ jal update_player -/* 120B0 80036CB0 AC830000 */ sw $v1, ($a0) -/* 120B4 80036CB4 0C00F949 */ jal update_encounters -/* 120B8 80036CB8 00000000 */ nop -/* 120BC 80036CBC 0C00E64C */ jal update_npcs -/* 120C0 80036CC0 00000000 */ nop -/* 120C4 80036CC4 0C016754 */ jal update_effects -/* 120C8 80036CC8 00000000 */ nop -/* 120CC 80036CCC 0C00B500 */ jal update_cameras -/* 120D0 80036CD0 00000000 */ nop -/* 120D4 80036CD4 3C108007 */ lui $s0, %hi(gGameStatusPtr) -/* 120D8 80036CD8 2610419C */ addiu $s0, $s0, %lo(gGameStatusPtr) -/* 120DC 80036CDC 8E020000 */ lw $v0, ($s0) -/* 120E0 80036CE0 0C0B1059 */ jal does_script_exist -/* 120E4 80036CE4 8C44006C */ lw $a0, 0x6c($v0) -/* 120E8 80036CE8 14400037 */ bnez $v0, .L80036DC8 -/* 120EC 80036CEC 24030004 */ addiu $v1, $zero, 4 -/* 120F0 80036CF0 8E020000 */ lw $v0, ($s0) -/* 120F4 80036CF4 94440086 */ lhu $a0, 0x86($v0) -/* 120F8 80036CF8 A04300AC */ sb $v1, 0xac($v0) -/* 120FC 80036CFC 0800DB5E */ j L80036D78_12178 -/* 12100 80036D00 A4440088 */ sh $a0, 0x88($v0) -glabel L80036D04_12104 -/* 12104 80036D04 0C016754 */ jal update_effects -/* 12108 80036D08 00000000 */ nop -/* 1210C 80036D0C 0C00B500 */ jal update_cameras -/* 12110 80036D10 00000000 */ nop -/* 12114 80036D14 0C00E64C */ jal update_npcs -/* 12118 80036D18 00000000 */ nop -/* 1211C 80036D1C 3C04800A */ lui $a0, %hi(D_800A0954) -/* 12120 80036D20 24840954 */ addiu $a0, $a0, %lo(D_800A0954) -/* 12124 80036D24 84820000 */ lh $v0, ($a0) -/* 12128 80036D28 1440000C */ bnez $v0, .L80036D5C -/* 1212C 80036D2C 94830000 */ lhu $v1, ($a0) -/* 12130 80036D30 3C01BF80 */ lui $at, 0xbf80 -/* 12134 80036D34 4481A000 */ mtc1 $at, $f20 -/* 12138 80036D38 00000000 */ nop -/* 1213C 80036D3C 4405A000 */ mfc1 $a1, $f20 -/* 12140 80036D40 0C04DF62 */ jal set_screen_overlay_params_front -/* 12144 80036D44 240400FF */ addiu $a0, $zero, 0xff -/* 12148 80036D48 4405A000 */ mfc1 $a1, $f20 -/* 1214C 80036D4C 0C04DF69 */ jal set_screen_overlay_params_back -/* 12150 80036D50 240400FF */ addiu $a0, $zero, 0xff -/* 12154 80036D54 0800DB5E */ j L80036D78_12178 -/* 12158 80036D58 00000000 */ nop -.L80036D5C: -/* 1215C 80036D5C 3C02800A */ lui $v0, %hi(D_800A0958) -/* 12160 80036D60 94420958 */ lhu $v0, %lo(D_800A0958)($v0) -/* 12164 80036D64 00621023 */ subu $v0, $v1, $v0 -/* 12168 80036D68 A4820000 */ sh $v0, ($a0) -/* 1216C 80036D6C 00021400 */ sll $v0, $v0, 0x10 -/* 12170 80036D70 04420001 */ bltzl $v0, L80036D78_12178 -/* 12174 80036D74 A4800000 */ sh $zero, ($a0) -glabel L80036D78_12178 -/* 12178 80036D78 3C02800A */ lui $v0, %hi(D_800A0954) -/* 1217C 80036D7C 84420954 */ lh $v0, %lo(D_800A0954)($v0) -/* 12180 80036D80 3C04800A */ lui $a0, %hi(D_800A0963) -/* 12184 80036D84 90840963 */ lbu $a0, %lo(D_800A0963)($a0) -/* 12188 80036D88 44820000 */ mtc1 $v0, $f0 -/* 1218C 80036D8C 00000000 */ nop -/* 12190 80036D90 46800020 */ cvt.s.w $f0, $f0 -/* 12194 80036D94 44050000 */ mfc1 $a1, $f0 -/* 12198 80036D98 0C04DF69 */ jal set_screen_overlay_params_back -/* 1219C 80036D9C 00000000 */ nop -/* 121A0 80036DA0 3C05800A */ lui $a1, %hi(D_800A095B) -/* 121A4 80036DA4 90A5095B */ lbu $a1, %lo(D_800A095B)($a1) -/* 121A8 80036DA8 3C06800A */ lui $a2, %hi(D_800A095D) -/* 121AC 80036DAC 90C6095D */ lbu $a2, %lo(D_800A095D)($a2) -/* 121B0 80036DB0 3C07800A */ lui $a3, %hi(D_800A095F) -/* 121B4 80036DB4 90E7095F */ lbu $a3, %lo(D_800A095F)($a3) -/* 121B8 80036DB8 0C04DF84 */ jal set_screen_overlay_color -/* 121BC 80036DBC 24040001 */ addiu $a0, $zero, 1 -/* 121C0 80036DC0 0C00CE1D */ jal intro_logos_update_fade -/* 121C4 80036DC4 00000000 */ nop -.L80036DC8: -/* 121C8 80036DC8 8FBF0018 */ lw $ra, 0x18($sp) -/* 121CC 80036DCC 8FB10014 */ lw $s1, 0x14($sp) -/* 121D0 80036DD0 8FB00010 */ lw $s0, 0x10($sp) -/* 121D4 80036DD4 D7B40020 */ ldc1 $f20, 0x20($sp) -/* 121D8 80036DD8 03E00008 */ jr $ra -/* 121DC 80036DDC 27BD0028 */ addiu $sp, $sp, 0x28 diff --git a/ver/us/asm/nonmatchings/state_title_screen/appendGfx_title_screen.s b/ver/us/asm/nonmatchings/state_title_screen/appendGfx_title_screen.s index 3241c0e7cf..4dad028af2 100644 --- a/ver/us/asm/nonmatchings/state_title_screen/appendGfx_title_screen.s +++ b/ver/us/asm/nonmatchings/state_title_screen/appendGfx_title_screen.s @@ -6,9 +6,6 @@ glabel jtbl_800983E0 .word L80037718_12B18, L8003768C_12A8C, L800376BC_12ABC, L80037718_12B18, L800376C8_12AC8, L800376D4_12AD4 -glabel D_800983F8 -.word 0x656E6400, 0x6B6B6A5F, 0x32360000, 0x61726E5F, 0x30380000, 0x6B6B6A5F, 0x31310000, 0x6E6F6B5F, 0x30320000, 0x6D61635F, 0x30330000, 0x6B7A6E5F, 0x30320000, 0x6D61635F, 0x30300000, 0x6A616E5F, 0x30340000, 0x7472645F, 0x30390000, 0x74696B5F, 0x30330000, 0x69736B5F, 0x30340000, 0x6E6F6B5F, 0x31320000, 0 - .section .text glabel appendGfx_title_screen diff --git a/ver/us/splat.yaml b/ver/us/splat.yaml index 8e80bad4ce..678f0841b4 100644 --- a/ver/us/splat.yaml +++ b/ver/us/splat.yaml @@ -264,7 +264,8 @@ segments: - [0x52D50, .data, state_pause] - [0x52D80, .data, state_file_select] - [0x52DC0, .data, state_title_screen] - - [0x52EE0, data] # Start of 13480_len_3f0's data + - [0x52EE0, .data, state_demo] + - [0x52FF0, data] - [0x53570, .data, 25f00_len_940] - [0x53590, data, 26840_len_20d0] - [0x541B0, .data, 30450]