diff --git a/include/common_structs.h b/include/common_structs.h index c2a8e4539f..1e5289fdf4 100644 --- a/include/common_structs.h +++ b/include/common_structs.h @@ -1401,7 +1401,9 @@ typedef struct GameStatus { /* 0x0AC */ s8 introState; /* 0x0AD */ s8 introCounter; /* 0x0AE */ s8 bSkipIntro; - /* 0x0AF */ char unk_AF[0x7]; + /* 0x0AF */ s8 unk_AF; + /* 0x0B0 */ s8 unk_B0; + /* 0x0B1 */ char unk_B1[0x5]; /* 0x0B6 */ s16 bootAlpha; /* 0x0B8 */ s16 bootBlue; /* 0x0BA */ s16 bootGreen; diff --git a/include/enums.h b/include/enums.h index 8d384df3ff..8a86305639 100644 --- a/include/enums.h +++ b/include/enums.h @@ -508,6 +508,7 @@ enum SoundIDs { SOUND_MENU_NEXT = 0x000000C9, SOUND_MENU_BACK = 0x000000CA, SOUND_D4 = 0x000000D4, + SOUND_D5 = 0x000000D5, SOUND_HIT_PLAYER_NORMAL = 0x000000E1, SOUND_HIT_PLAYER_FIRE = 0x000000E2, SOUND_HIT_PLAYER_ICE = 0x000000E3, @@ -2333,6 +2334,31 @@ enum GameModeIDs { GAME_MODE_DEMO = 0x00000011, }; +enum IntroStates { + INTRO_STATE_0 = 0x00000000, + INTRO_STATE_1 = 0x00000001, + INTRO_STATE_2 = 0x00000002, + INTRO_STATE_3 = 0x00000003, + INTRO_STATE_4 = 0x00000004, + INTRO_STATE_5 = 0x00000005, + INTRO_STATE_6 = 0x00000006, + INTRO_STATE_7 = 0x00000007, + INTRO_STATE_8 = 0x00000008, + INTRO_STATE_9 = 0x00000009, + INTRO_STATE_A = 0x0000000A, + INTRO_STATE_B = 0x0000000B, + INTRO_STATE_C = 0x0000000C, + INTRO_STATE_D = 0x0000000D, + INTRO_STATE_E = 0x0000000E, + INTRO_STATE_F = 0x0000000F, + INTRO_STATE_10 = 0x00000010, + INTRO_STATE_11 = 0x00000011, + INTRO_STATE_12 = 0x00000012, + INTRO_STATE_13 = 0x00000013, + INTRO_STATE_14 = 0x00000014, + INTRO_STATE_15 = 0x00000015, +}; + enum BattleStatusFlags1 { BS_FLAGS1_0 = 0x00000000, BS_FLAGS1_1 = 0x00000001, // show actors @@ -2425,10 +2451,21 @@ enum DebuffTypes { enum GlobalOverrides { GLOBAL_OVERRIDES_DISABLE_RENDER_WORLD = 0x00000002, + GLOBAL_OVERRIDES_8 = 0x00000008, + GLOBAL_OVERRIDES_10 = 0x00000010, GLOBAL_OVERRIDES_ENABLE_TRANSITION_STENCIL = 0x00000020, GLOBAL_OVERRIDES_40 = 0x00000040, + GLOBAL_OVERRIDES_80 = 0x00000080, GLOBAL_OVERRIDES_DISABLE_BATTLES = 0x00000100, + GLOBAL_OVERRIDES_200 = 0x00000200, + GLOBAL_OVERRIDES_400 = 0x00000400, + GLOBAL_OVERRIDES_800 = 0x00000800, + GLOBAL_OVERRIDES_1000 = 0x00001000, + GLOBAL_OVERRIDES_2000 = 0x00002000, + GLOBAL_OVERRIDES_4000 = 0x00004000, + GLOBAL_OVERRIDES_8000 = 0x00008000, GLOBAL_OVERRIDES_WINDOWS_IN_FRONT_OF_CURTAINS = 0x00010000, + GLOBAL_OVERRIDES_20000 = 0x00020000, GLOBAL_OVERRIDES_DISABLE_MENUS = 0x00040000, GLOBAL_OVERRIDES_MESSAGES_IN_FRONT_OF_CURTAINS = 0x00100000, GLOBAL_OVERRIDES_CANT_PICK_UP_ITEMS = 0x00200000, diff --git a/include/functions.h b/include/functions.h index daaa71c27d..be6dea040a 100644 --- a/include/functions.h +++ b/include/functions.h @@ -43,7 +43,9 @@ s32 is_picking_up_item(void); f32 integrate_gravity(void); void gravity_use_fall_parms(void); f32 get_clamped_angle_diff(f32, f32); +s32 intro_logos_fade_in(s16 subtractAlpha); s32 intro_logos_fade_out(s16 addAlpha); +void intro_logos_update_fade(void); u32 get_entity_type(s32 arg0); Entity* get_entity_by_index(s32 index); @@ -74,6 +76,8 @@ void setup_pause_menu_tab(MenuWindowBP* bpArray, s32 arraySize); s32 draw_ci_image_with_clipping(s32* raster, s32 width, s32 height, s32 fmt, s32 bitDepth, s32* palette, s16 posX, s16 posY, u16 clipULx, u16 clipULy, u16 clipLRx, u16 clipRLy, u8 opacity); +void render_frame(s32 flag); +void clear_windows(void); void update_window_hierarchy(s32 windowIndex, u8 arg1); void get_msg_properties(s32 msgID, s32* height, s32* width, s32* maxLineChars, s32* numLines, s32* maxLinesPerPage, s32* arg6, s32 charset); @@ -817,6 +821,7 @@ void update_encounters_neutral(void); void update_encounters_pre_battle(void); void update_encounters_conversation(void); void update_encounters_post_battle(void); +void load_map_bg(char* optAssetName); void reset_background_settings(void); void func_80138188(void); void func_80266970(Actor*); diff --git a/include/script_api/macros.h b/include/script_api/macros.h index d7be08190c..bece5d84c4 100644 --- a/include/script_api/macros.h +++ b/include/script_api/macros.h @@ -130,6 +130,7 @@ /// This macro expands to the given opcode and argv, with argc calculated automatically. #ifndef PERMUTER +#ifndef M2CTX #define EVT_CMD(opcode, argv...) \ opcode, \ (sizeof((Bytecode[]){argv})/sizeof(Bytecode)), \ @@ -141,6 +142,13 @@ 0, \ ##argv #endif +#else +// This definition that passes in 0 for the number of args is used for pycparser since it can't handle varargs +#define EVT_CMD(opcode, argv...) \ + opcode, \ + 0, \ + ##argv +#endif /// Signals the end of EVT script data. A script missing this will likely crash on load. #define EVT_END EVT_CMD(EVT_OP_END), diff --git a/include/variables.h b/include/variables.h index 93e6862caf..069df7364f 100644 --- a/include/variables.h +++ b/include/variables.h @@ -194,6 +194,7 @@ extern s16 gCurrentDoorSoundsSet; extern s32 D_800D9620; extern UNK_TYPE D_800E92D8; extern UNK_TYPE D_80147574; +extern s8 D_8014C248[]; extern UNK_FUN_PTR(D_8010C920); extern UNK_FUN_PTR(D_8010C940); diff --git a/src/111f0_len_860.c b/src/111f0_len_860.c index ad17d844be..a3e1974ad1 100644 --- a/src/111f0_len_860.c +++ b/src/111f0_len_860.c @@ -26,7 +26,7 @@ void init_enter_world_shared(void) { nuContRmbForceStopEnd(); update_exit_map_screen_overlay(&gMapTransitionAlpha); - gOverrideFlags |= 0x8; + gOverrideFlags |= GLOBAL_OVERRIDES_8; evt_set_variable(NULL, EVT_SAVE_VAR(1), gGameStatusPtr->unk_A9); timeFreezeMode = 0; @@ -66,7 +66,7 @@ void state_step_enter_world(void) { if (D_800A0946 != 0) { D_800A0946--; } else if (!does_script_exist(gGameStatusPtr->mainScriptID)) { - gOverrideFlags &= ~0x8; + gOverrideFlags &= ~GLOBAL_OVERRIDES_8; D_800A0944++; } break; @@ -81,14 +81,14 @@ void state_step_enter_world(void) { enable_player_input(); } set_screen_overlay_params_front(255, -1.0f); - set_game_mode(4); + set_game_mode(GAME_MODE_CHANGE_MAP); } break; } } void state_drawUI_enter_world(void) { - if (gGameStatusPtr->introState == 2) { + if (gGameStatusPtr->introState == INTRO_STATE_2) { draw_status_ui(); } } @@ -119,7 +119,7 @@ void state_step_change_map(void) { } break; case 1: - gOverrideFlags |= 8; + gOverrideFlags |= GLOBAL_OVERRIDES_8; nuContRmbForceStop(); D_800A0946 = 4; D_800A0944++; @@ -154,7 +154,7 @@ void state_step_change_map(void) { if (D_800A0946 != 0) { D_800A0946--; } else if (!does_script_exist(gGameStatusPtr->mainScriptID)) { - gOverrideFlags &= ~0x8; + gOverrideFlags &= ~GLOBAL_OVERRIDES_8; D_800A0944++; } break; @@ -169,7 +169,7 @@ void state_step_change_map(void) { enable_player_input(); } set_screen_overlay_params_front(255, -1.0f); - set_game_mode(4); + set_game_mode(GAME_MODE_CHANGE_MAP); } break; } @@ -191,7 +191,7 @@ void func_80036430(void) { void func_8003646C(void) { switch (D_800A0944) { case 1: - gOverrideFlags |= 8; + gOverrideFlags |= GLOBAL_OVERRIDES_8; nuContRmbForceStop(); D_800A0946 = 4; D_800A0944++; @@ -211,7 +211,7 @@ void func_8003646C(void) { update_encounters(); update_npcs(); if (!does_script_exist(gGameStatusPtr->mainScriptID)) { - gOverrideFlags &= ~0x8; + gOverrideFlags &= ~GLOBAL_OVERRIDES_8; D_800A0944++; break; } @@ -222,7 +222,7 @@ void func_8003646C(void) { gMapTransitionAlpha = 0; D_800A0944++; set_screen_overlay_params_front(255, -1.0f); - set_game_mode(4); + set_game_mode(GAME_MODE_CHANGE_MAP); } update_npcs(); update_player(); diff --git a/src/16c8e0.c b/src/16c8e0.c index a2822a2a2c..89370f2fc6 100644 --- a/src/16c8e0.c +++ b/src/16c8e0.c @@ -150,9 +150,9 @@ void initialize_battle(void) { gBattleStatus.flags2 = 0; gBattleStatus.flags1 = 0; D_8029DA34 = gOverrideFlags; - gOverrideFlags &= ~0x80; + gOverrideFlags &= ~GLOBAL_OVERRIDES_80; gBattleStatus.inputBitmask = -1; - gOverrideFlags &= ~0x80; + gOverrideFlags &= ~GLOBAL_OVERRIDES_80; for (i = 0; i < 16; i++) { battleStatus->pushInputBuffer[i] = 0; // @bug? why just 16 @@ -612,15 +612,15 @@ void btl_restore_world_cameras(void) { gCameras[i] = D_8029DA50[i]; } - gCurrentCameraID = 0; + gCurrentCameraID = CAM_DEFAULT; playerStatus->position.x = D_8029EFB0; playerStatus->position.y = D_8029EFB4; playerStatus->position.z = D_8029EFB8; if (D_8029DA34 & 0x80) { - gOverrideFlags |= 0x80; + gOverrideFlags |= GLOBAL_OVERRIDES_80; } else { - gOverrideFlags &= ~0x80; + gOverrideFlags &= ~GLOBAL_OVERRIDES_80; } if (gBattleStatus.flags2 & 0x40) { diff --git a/src/1776B0.c b/src/1776B0.c index a38421feb2..804d8b22d3 100644 --- a/src/1776B0.c +++ b/src/1776B0.c @@ -152,7 +152,7 @@ INCLUDE_ASM(s32, "1776B0", func_8024A990); INCLUDE_ASM(s32, "1776B0", func_8024AFE4); ApiStatus func_8024B5FC(Evt* script, s32 isInitialCall) { - Camera* camera = &gCameras[1]; + Camera* camera = &gCameras[CAM_BATTLE]; f32 x, y, z; f32 invAngle; f32 angle; @@ -200,7 +200,7 @@ ApiStatus func_8024B5FC(Evt* script, s32 isInitialCall) { } ApiStatus func_8024B9A0(Evt* script, s32 isInitialCall) { - Camera* camera = &gCameras[1]; + Camera* camera = &gCameras[CAM_BATTLE]; f32 x, y, z; f32 invAngle; f32 angle; @@ -263,7 +263,7 @@ ApiStatus func_8024B9A0(Evt* script, s32 isInitialCall) { } ApiStatus func_8024BDA4(Evt* script, s32 isInitialCall) { - Camera* camera = &gCameras[1]; + Camera* camera = &gCameras[CAM_BATTLE]; f32 x, y, z; f32 invAngle; f32 angle; @@ -316,7 +316,7 @@ ApiStatus func_8024BDA4(Evt* script, s32 isInitialCall) { } ApiStatus func_8024C180(Evt* script, s32 isInitialCall) { - Camera* camera = &gCameras[1]; + Camera* camera = &gCameras[CAM_BATTLE]; f32 x, y, z; f32 invAngle; f32 angle; @@ -372,7 +372,7 @@ ApiStatus func_8024C180(Evt* script, s32 isInitialCall) { } ApiStatus func_8024C570(Evt* script, s32 isInitialCall) { - Camera* camera = &gCameras[1]; + Camera* camera = &gCameras[CAM_BATTLE]; f32 x, y, z; f32 invAngle; f32 angle; @@ -425,7 +425,7 @@ ApiStatus func_8024C570(Evt* script, s32 isInitialCall) { } ApiStatus func_8024C944(Evt* script, s32 isInitialCall) { - Camera* camera = &gCameras[1]; + Camera* camera = &gCameras[CAM_BATTLE]; BattleStatus* battleStatus = &gBattleStatus; PlayerStatus* playerStatus = &gPlayerStatus; s32 screenX, screenY, screenZ; @@ -491,7 +491,7 @@ ApiStatus func_8024C944(Evt* script, s32 isInitialCall) { } ApiStatus func_8024CB68(Evt* script, s32 isInitialCall) { - Camera* camera = &gCameras[1]; + Camera* camera = &gCameras[CAM_BATTLE]; BattleStatus* battleStatus = &gBattleStatus; PlayerStatus* playerStatus = &gPlayerStatus; s32 actorClass = D_8029F27C & ACTOR_CLASS_MASK; @@ -587,7 +587,7 @@ ApiStatus func_8024CB68(Evt* script, s32 isInitialCall) { } ApiStatus func_8024CE9C(Evt* script, s32 isInitialCall) { - Camera* camera = &gCameras[1]; + Camera* camera = &gCameras[CAM_BATTLE]; D_8029F284 = 8; camera->unk_24 = 0; @@ -1364,7 +1364,7 @@ void func_8024E45C(s32 actorID, s32 arg1) { } void func_8024E484(s16 arg0, s16 arg1, s16 arg2, s16 arg3, s32 arg4, s32 arg5, s32 arg6, s32 zoomPercent) { - Camera* camera = &gCameras[1]; + Camera* camera = &gCameras[CAM_BATTLE]; if (D_80280CE0 == 0) { camera->unk_1C = arg0; @@ -1398,7 +1398,7 @@ void btl_cam_set_target_pos(f32 x, f32 y, f32 z) { } void func_8024E554(f32 arg0, f32 arg1, f32 arg2) { - Camera* camera = &gCameras[1]; + Camera* camera = &gCameras[CAM_BATTLE]; if (D_80280CE0 == 0) { camera->unk_54 = arg0; @@ -1493,7 +1493,7 @@ ApiStatus func_8024E6B4(Evt* script, s32 isInitialCall) { } ApiStatus func_8024E748(Evt* script, s32 isInitialCall) { - Camera* camera = &gCameras[1]; + Camera* camera = &gCameras[CAM_BATTLE]; Bytecode* args = script->ptrReadPos; s32 mode; s32 val; @@ -1536,7 +1536,7 @@ ApiStatus func_8024E748(Evt* script, s32 isInitialCall) { ApiStatus func_8024E820(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; - Camera* camera = &gCameras[1]; + Camera* camera = &gCameras[CAM_BATTLE]; if (D_80280CE0 != 0) { return ApiStatus_DONE2; @@ -1569,7 +1569,7 @@ ApiStatus SetBattleCamTarget(Evt* script, s32 isInitialCall) { ApiStatus func_8024E9B0(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; - Camera* camera = &gCameras[1]; + Camera* camera = &gCameras[CAM_BATTLE]; if (D_80280CE0 != 0) { return ApiStatus_DONE2; diff --git a/src/181810.c b/src/181810.c index c6b040e2a0..2027d4e4b5 100644 --- a/src/181810.c +++ b/src/181810.c @@ -56,7 +56,7 @@ ApiStatus ActorSpeak(Evt* script, s32 isInitialCall) { msg_printer_set_origin_pos(gSpeakingActorPrintCtx, screenX, screenY); script->functionTemp[0] = 0; - gOverrideFlags |= 0x10; + gOverrideFlags |= GLOBAL_OVERRIDES_10; if (gSpeakingActorTalkAnim >= 0) { func_80263E08(actor, part, gSpeakingActorTalkAnim); } @@ -97,7 +97,7 @@ ApiStatus ActorSpeak(Evt* script, s32 isInitialCall) { if (gSpeakingActorPrintIsDone == TRUE) { decrement_status_menu_disabled(); - gOverrideFlags &= ~0x10; + gOverrideFlags &= ~GLOBAL_OVERRIDES_10; return ApiStatus_DONE1; } } @@ -163,7 +163,7 @@ ApiStatus EndActorSpeech(Evt* script, s32 isInitialCall) { if (gSpeakingActorPrintIsDone == TRUE) { decrement_status_menu_disabled(); - gOverrideFlags &= ~0x10; + gOverrideFlags &= ~GLOBAL_OVERRIDES_10; return ApiStatus_DONE1; } } @@ -228,10 +228,10 @@ ApiStatus func_802536A8(Evt* script, s32 isInitialCall) { if (evt_get_variable(script, *script->ptrReadPos) != 0) { battleStatus->unk_92 |= 1; - gOverrideFlags |= 0x80; + gOverrideFlags |= GLOBAL_OVERRIDES_80; } else { battleStatus->unk_92 &= ~1; - gOverrideFlags &= ~0x80; + gOverrideFlags &= ~GLOBAL_OVERRIDES_80; } return ApiStatus_DONE2; diff --git a/src/182B30.c b/src/182B30.c index 6a10839318..dc60f58873 100644 --- a/src/182B30.c +++ b/src/182B30.c @@ -541,7 +541,7 @@ void func_8025599C(void* data) { } void update_actor_shadow(s32 arg0, Actor* actor) { - Camera* camera = &gCameras[1]; + Camera* camera = &gCameras[CAM_BATTLE]; ActorPart* actorPart; Shadow* shadow; s32 numParts; diff --git a/src/3251D0.c b/src/3251D0.c index 49464fae07..915348dc37 100644 --- a/src/3251D0.c +++ b/src/3251D0.c @@ -70,13 +70,13 @@ ApiStatus func_802C0288(Evt* script, s32 isInitialCall) { ApiStatus func_802C02E4(Evt* script, s32 isInitialCall) { set_time_freeze_mode(TIME_FREEZE_FULL); - gOverrideFlags |= 0x200000; + gOverrideFlags |= GLOBAL_OVERRIDES_CANT_PICK_UP_ITEMS; return ApiStatus_DONE2; } ApiStatus func_802C031C(Evt* script, s32 isInitialCall) { set_time_freeze_mode(TIME_FREEZE_NORMAL); - gOverrideFlags &= ~0x200000; + gOverrideFlags &= ~GLOBAL_OVERRIDES_CANT_PICK_UP_ITEMS; return ApiStatus_DONE2; } diff --git a/src/77480.c b/src/77480.c index 92b6646eb1..4b2ac99299 100644 --- a/src/77480.c +++ b/src/77480.c @@ -775,7 +775,7 @@ void phys_update_lava_reset(void) { collision_lava_reset_check_additional_overlaps(); if (!(gPlayerStatusPtr->flags & PLAYER_STATUS_FLAGS_CAMERA_DOESNT_FOLLOW)) { - Camera* camera = &gCameras[0]; + Camera* camera = &gCameras[CAM_DEFAULT]; camera->targetPos.x = gPlayerStatusPtr->position.x; camera->targetPos.y = gPlayerStatusPtr->position.y; diff --git a/src/7B440.c b/src/7B440.c index 05eb1e3c36..3327b44c14 100644 --- a/src/7B440.c +++ b/src/7B440.c @@ -148,7 +148,7 @@ void player_input_to_move_vector(f32* angle, f32* magnitude) { mag = magMax; } - ang = clamp_angle(atan2(0.0f, 0.0f, stickAxisX, stickAxisY) + gCameras[0].currentYaw); + ang = clamp_angle(atan2(0.0f, 0.0f, stickAxisX, stickAxisY) + gCameras[CAM_DEFAULT].currentYaw); if (mag == 0.0f) { ang = playerStatus->targetYaw; } @@ -170,7 +170,7 @@ void game_input_to_move_vector(f32* arg0, f32* arg1) { temp1 = tempMax; } - temp2 = clamp_angle(atan2(0.0f, 0.0f, stickX, stickY) + gCameras[0].currentYaw); + temp2 = clamp_angle(atan2(0.0f, 0.0f, stickX, stickY) + gCameras[CAM_DEFAULT].currentYaw); if (temp1 == 0.0f) { temp2 = playerStatus->targetYaw; } @@ -183,7 +183,7 @@ void game_input_to_move_vector(f32* arg0, f32* arg1) { #ifdef NON_EQUIVALENT void func_800E24F8(void) { Shadow* playerShadow = get_shadow_by_index(gPlayerStatus.shadowID); - Camera* camera = &gCameras[0]; + Camera* camera = &gCameras[CAM_DEFAULT]; f32 x = playerShadow->rotation.x + 180.0; f32 z = playerShadow->rotation.z + 180.0; diff --git a/src/7bb60_len_41b0.c b/src/7bb60_len_41b0.c index 3c920e1834..f5989d0226 100644 --- a/src/7bb60_len_41b0.c +++ b/src/7bb60_len_41b0.c @@ -423,7 +423,7 @@ void player_get_camera_facing_angle(void) { angle = 180.0f; } - angle = angle + gCameras[0].currentYaw + 90.0f; + angle = angle + gCameras[CAM_DEFAULT].currentYaw + 90.0f; clamp_angle(angle); } diff --git a/src/C50A0.c b/src/C50A0.c index f282ea4914..ab9501e884 100644 --- a/src/C50A0.c +++ b/src/C50A0.c @@ -386,7 +386,7 @@ void clear_item_entity_flags(s32 index, s32 flags) { void func_801341B0(s32 index) { ItemEntity* itemEntity = D_801565A0[index]; - gOverrideFlags |= 0x40; + gOverrideFlags |= GLOBAL_OVERRIDES_40; itemEntity->flags |= ENTITY_FLAGS_100; } @@ -448,7 +448,7 @@ void update_item_entity_static(ItemEntity* itemEntity) { itemEntity->type = 28; itemEntity->state = 0; D_801565A8 = 0; - gOverrideFlags |= 0x40; + gOverrideFlags |= GLOBAL_OVERRIDES_40; } } diff --git a/src/battle/battle.c b/src/battle/battle.c index c101ead78f..2248405d08 100644 --- a/src/battle/battle.c +++ b/src/battle/battle.c @@ -323,7 +323,7 @@ void load_battle_section(void) { void load_battle(s32 arg0) { D_800DC4E8 = arg0; - set_game_mode(8); + set_game_mode(GAME_MODE_BATTLE); gBattleState = 0; D_800DC4D0 = 0; gBattleState2 = 0; @@ -506,7 +506,7 @@ void load_demo_battle(u32 index) { gCurrentEncounter.unk_10 = 0; set_battle_stage(-1); gGameStatusPtr->demoFlags |= 1; - gOverrideFlags &= ~0x8; + gOverrideFlags &= ~GLOBAL_OVERRIDES_8; load_battle(battleID); } diff --git a/src/battle/item/dizzy_dial.c b/src/battle/item/dizzy_dial.c index 2715464d00..a6dc295dbe 100644 --- a/src/battle/item/dizzy_dial.c +++ b/src/battle/item/dizzy_dial.c @@ -10,7 +10,7 @@ void func_802A123C_727B4C(void) { } ApiStatus N(func_802A1270_727B80)(Evt* script, s32 isInitialCall) { - Camera* camera = &gCameras[1]; + Camera* camera = &gCameras[CAM_BATTLE]; f32 a; if (isInitialCall) { diff --git a/src/camera.c b/src/camera.c index fc2b96c1d4..2f86b68bbc 100644 --- a/src/camera.c +++ b/src/camera.c @@ -1,6 +1,6 @@ #include "common.h" -s32 gCurrentCameraID = 0; +s32 gCurrentCameraID = CAM_DEFAULT; s32 func_800328A4(Camera* camera, f32 arg1, f32 arg2); s32 func_80032970(Camera* camera, f32 arg1); diff --git a/src/common/UnkEffect0FFuncs.inc.c b/src/common/UnkEffect0FFuncs.inc.c index 7abdc02808..91850cde73 100644 --- a/src/common/UnkEffect0FFuncs.inc.c +++ b/src/common/UnkEffect0FFuncs.inc.c @@ -18,7 +18,7 @@ ApiStatus N(UnkEffect0FFunc2)(Evt* script, s32 isInitialCall) { ApiStatus N(UnkEffect0FFunc)(Evt* script, s32 isInitialCall) { PlayerStatus* playerStatus = &gPlayerStatus; - f32 yaw = gCameras[0].currentYaw / 180.0f * PI; + f32 yaw = gCameras[CAM_DEFAULT].currentYaw / 180.0f * PI; f32 yawPlus = yaw + 1.570796; f32 yawMinus = yaw - 1.570796; f32 temp_f30; @@ -49,7 +49,7 @@ ApiStatus N(UnkEffect0FFunc)(Evt* script, s32 isInitialCall) { ApiStatus N(UnkEffect0FFunc3)(Evt* script, s32 isInitialCall) { PlayerStatus* playerStatus = &gPlayerStatus; - f32 yaw = gCameras[0].currentYaw / 180.0f * PI; + f32 yaw = gCameras[CAM_DEFAULT].currentYaw / 180.0f * PI; f32 yawPlus = yaw + 1.570796; f32 yawMinus = yaw - 1.570796; f32 temp_f30; @@ -83,7 +83,7 @@ ApiStatus N(UnkEffect0FFunc3)(Evt* script, s32 isInitialCall) { ApiStatus N(UnkEffect0FFunc4)(Evt* script, s32 isInitialCall) { PlayerStatus* playerStatus = &gPlayerStatus; - f32 yaw = gCameras[0].currentYaw / 180.0f * PI; + f32 yaw = gCameras[CAM_DEFAULT].currentYaw / 180.0f * PI; f32 yawPlus = yaw + 1.570796; f32 yawMinus = yaw - 1.570796; f32 temp_f30; diff --git a/src/common/UnkFogFunc2.inc.c b/src/common/UnkFogFunc2.inc.c index 0875120911..1d5d5ebc62 100644 --- a/src/common/UnkFogFunc2.inc.c +++ b/src/common/UnkFogFunc2.inc.c @@ -4,9 +4,9 @@ ApiStatus N(UnkFogFunc2)(Evt* script, s32 isInitialCall) { enable_world_fog(); set_world_fog_dist(950, 1000); set_world_fog_color(16, 16, 16, 255); - gCameras[1].bgColor[0] = 20; - gCameras[1].bgColor[1] = 20; - gCameras[1].bgColor[2] = 28; + gCameras[CAM_BATTLE].bgColor[0] = 20; + gCameras[CAM_BATTLE].bgColor[1] = 20; + gCameras[CAM_BATTLE].bgColor[2] = 28; return ApiStatus_DONE2; } diff --git a/src/e0b30_len_b80.c b/src/e0b30_len_b80.c index 91302725e6..7b28ab5017 100644 --- a/src/e0b30_len_b80.c +++ b/src/e0b30_len_b80.c @@ -412,8 +412,8 @@ void bgm_pop_battle_song(void) { MusicSettings* musicSetting = &gMusicSettings[0]; if (gGameStatusPtr->demoState == 0) { - if (gOverrideFlags & 0x20000) { - gOverrideFlags &= ~0x20000; + if (gOverrideFlags & GLOBAL_OVERRIDES_20000) { + gOverrideFlags &= ~GLOBAL_OVERRIDES_20000; } else { musicSetting->flags |= MUSIC_SETTINGS_FLAGS_8; _bgm_set_song(0, musicSetting->unk_24, musicSetting->unk_28, 0, 8); @@ -425,7 +425,7 @@ void bgm_pop_battle_song(void) { void bgm_push_battle_song(void) { MusicSettings* musicSetting = &gMusicSettings[0]; - if (gGameStatusPtr->demoState == 0 && !(gOverrideFlags & 0x20000)) { + if (gGameStatusPtr->demoState == 0 && !(gOverrideFlags & GLOBAL_OVERRIDES_20000)) { func_8005553C(0, 250); musicSetting->unk_24 = musicSetting->songID; musicSetting->unk_28 = musicSetting->variation; diff --git a/src/effects.c b/src/effects.c index f3f8f892c8..c000452f3f 100644 --- a/src/effects.c +++ b/src/effects.c @@ -204,7 +204,7 @@ void func_80059D48(void) { } void update_effects(void) { - if (!(gOverrideFlags & 0xC00)) { + if (!(gOverrideFlags & (GLOBAL_OVERRIDES_800 | GLOBAL_OVERRIDES_400))) { EffectGraphics* effectGraphics; s32 i; diff --git a/src/entity/HeartBlock.c b/src/entity/HeartBlock.c index 019cbb6ad3..e7fa44e086 100644 --- a/src/entity/HeartBlock.c +++ b/src/entity/HeartBlock.c @@ -104,7 +104,7 @@ void entity_HeartBlockContent_anim_idle(Entity* entity, s32 arg1) { gPlayerStatus.currentSpeed = 0; gPlayerStatus.animFlags |= 0x200; set_time_freeze_mode(1); - gOverrideFlags |= 0x40; + gOverrideFlags |= GLOBAL_OVERRIDES_40; } } @@ -223,7 +223,7 @@ void entity_HeartBlockContent__anim_heal(Entity* entity, s32 arg1) { playerStatus->animFlags &= ~0x200; enable_player_input(); set_time_freeze_mode(0); - gOverrideFlags &= ~0x40; + gOverrideFlags &= ~GLOBAL_OVERRIDES_40; exec_entity_commandlist(entity); break; } @@ -263,7 +263,7 @@ void entity_HeartBlock_show_tutorial_message(Entity* entity) { *ptr = 0; msg_get_printer_for_msg(0x1D0001, ptr); set_time_freeze_mode(TIME_FREEZE_PARTIAL); - gOverrideFlags |= 0x40; + gOverrideFlags |= GLOBAL_OVERRIDES_40; disable_player_input(); set_global_flag(EVT_SAVE_FLAG(96)); return; @@ -275,7 +275,7 @@ void entity_HeartBlock_wait_for_close_tutorial(Entity* entity) { if (D_802EB3C0) { exec_entity_commandlist(entity); set_time_freeze_mode(TIME_FREEZE_NORMAL); - gOverrideFlags &= ~0x40; + gOverrideFlags &= ~GLOBAL_OVERRIDES_40; enable_player_input(); } } diff --git a/src/entity/jan_iwa/E2E5F0.c b/src/entity/jan_iwa/E2E5F0.c index e9727d48d2..bfb0a863d6 100644 --- a/src/entity/jan_iwa/E2E5F0.c +++ b/src/entity/jan_iwa/E2E5F0.c @@ -71,9 +71,9 @@ void func_802BC0F0_E2EA20(Entity* entity) { void func_802BC17C_E2EAAC(Entity* entity) { structE2E5F0* data = (structE2E5F0*)entity->dataBuf.unk; - gCameras[0].targetPos.x = gPlayerStatus.position.x; - gCameras[0].targetPos.y = gPlayerStatus.position.y; - gCameras[0].targetPos.z = gPlayerStatus.position.z; + gCameras[CAM_DEFAULT].targetPos.x = gPlayerStatus.position.x; + gCameras[CAM_DEFAULT].targetPos.y = gPlayerStatus.position.y; + gCameras[CAM_DEFAULT].targetPos.z = gPlayerStatus.position.z; add_vec2D_polar(&gPlayerStatus.position.x, &gPlayerStatus.position.z, data->unk_18, data->unk_14); } diff --git a/src/evt/cam_api.c b/src/evt/cam_api.c index 84bc3a7764..3e4440ce20 100644 --- a/src/evt/cam_api.c +++ b/src/evt/cam_api.c @@ -253,9 +253,34 @@ ApiStatus PanToTarget(Evt* script, s32 isInitialCall) { return ApiStatus_DONE2; } -INCLUDE_ASM(s32, "evt/cam_api", UseSettingsFrom, Evt* script, s32 isInitialCall); +ApiStatus UseSettingsFrom(Evt* script, s32 isInitialCall) { + Bytecode* args = script->ptrReadPos; + s32 id = evt_get_variable(script, *args++); + Camera* camera = &gCameras[id]; + f32 startX = evt_get_float_variable(script, *args++); + f32 startY = evt_get_float_variable(script, *args++); + f32 startZ = evt_get_float_variable(script, *args++); + f32 hitX, hitY, hitZ; + f32 hitDepth = 32767.0f; + f32 nx, ny, nz; + s32 hitID = test_ray_zones(startX, startY + 10.0f, startZ, 0.0f, -1.0f, 0.0f, &hitX, &hitY, &hitZ, &hitDepth, + &nx, &ny, &nz); -INCLUDE_ASM(s32, "evt/cam_api", LoadSettings, Evt* script, s32 isInitialCall); + if (hitID >= 0) { + camera->controlSettings = *D_800D91D4[hitID].unk_10; + } + return ApiStatus_DONE2; +} + +ApiStatus LoadSettings(Evt* script, s32 isInitialCall) { + Bytecode* args = script->ptrReadPos; + s32 id = evt_get_variable(script, *args++); + Camera* camera = &gCameras[id]; + CameraControlSettings* settings = evt_get_variable(script, *args++); + + camera->controlSettings = *settings; + return ApiStatus_DONE2; +} ApiStatus SetCamType(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; @@ -452,4 +477,46 @@ INCLUDE_ASM(s32, "evt/cam_api", SetCamProperties, Evt* script, s32 isInitialCall INCLUDE_ASM(s32, "evt/cam_api", AdjustCam, Evt* script, s32 isInitialCall); -INCLUDE_ASM(s32, "evt/cam_api", ResetCam, Evt* script, s32 isInitialCall); +ApiStatus ResetCam(Evt* script, s32 isInitialCall) { + Bytecode* args = script->ptrReadPos; + s32 id = evt_get_variable(script, *args++); + Camera* camera = &gCameras[id]; + f32 moveSpeed = evt_get_float_variable(script, *args++); + PlayerStatus* playerStatus = &gPlayerStatus; + + if (isInitialCall) { + f32 x = playerStatus->position.x; + f32 y = playerStatus->position.y; + f32 z = playerStatus->position.z; + f32 hitX, hitY, hitZ; + f32 hitDepth = 32767.0f; + f32 nx, ny, nz; + s32 hitID; + + hitID = test_ray_zones(x, y + 10.0f, z, 0.0f, -1.0f, 0.0f, &hitX, &hitY, &hitZ, &hitDepth, + &nx, &ny, &nz); + + if (hitID >= 0) { + camera->controlSettings = *D_800D91D4[hitID].unk_10; + } + + camera->movePos.x = x; + camera->movePos.y = y; + camera->movePos.z = z; + camera->moveSpeed = moveSpeed; + camera->unk_506 = 1; + camera->followPlayer = TRUE; + camera->panPhase = 0.0f; + return ApiStatus_BLOCK; + } + + if (camera->interpAlpha >= 1.0f) { + camera->unk_506 = 1; + camera->followPlayer = FALSE; + camera->moveSpeed = 1.0f; + camera->panPhase = 0.0f; + return ApiStatus_DONE2; + } + + return ApiStatus_BLOCK; +} diff --git a/src/evt/fa4c0_len_3bf0.c b/src/evt/fa4c0_len_3bf0.c index 5c6ac2b6be..2086ae5c8c 100644 --- a/src/evt/fa4c0_len_3bf0.c +++ b/src/evt/fa4c0_len_3bf0.c @@ -244,7 +244,7 @@ ApiStatus CloseChoicePopup(Evt* script, s32 isInitialCall) { enable_player_input(); enable_player_static_collisions(); partner_enable_input(); - gOverrideFlags &= ~0x40; + gOverrideFlags &= ~GLOBAL_OVERRIDES_40; return ApiStatus_DONE2; } diff --git a/src/evt/map_api.c b/src/evt/map_api.c index 9e8e5e5e48..69fb33418f 100644 --- a/src/evt/map_api.c +++ b/src/evt/map_api.c @@ -660,7 +660,7 @@ void goto_map(Evt* script, s32 mode) { } set_map_transition_effect(mapTransitionEffect); - set_game_mode(5); + set_game_mode(GAME_MODE_UNUSED); } ApiStatus GotoMap(Evt* script, s32 isInitialCall) { diff --git a/src/evt/msg_api.c b/src/evt/msg_api.c index 01a4c1023e..2fd78ed6ee 100644 --- a/src/evt/msg_api.c +++ b/src/evt/msg_api.c @@ -156,9 +156,9 @@ ApiStatus SetMessageImages(Evt* script, s32 isInitialCall) { ApiStatus func_802D0C94(Evt* script, s32 initialCall) { if (evt_get_variable(script, *script->ptrReadPos) == 0) { - gOverrideFlags |= 0x10; + gOverrideFlags |= GLOBAL_OVERRIDES_10; } else { - gOverrideFlags &= ~0x10; + gOverrideFlags &= ~GLOBAL_OVERRIDES_10; } return ApiStatus_DONE2; } diff --git a/src/evt/player_api.c b/src/evt/player_api.c index 91f081c1df..8c9a0227c8 100644 --- a/src/evt/player_api.c +++ b/src/evt/player_api.c @@ -49,12 +49,12 @@ ApiStatus DisablePlayerInput(Evt* script, s32 isInitialCall) { if (playerStatus->actionState == ACTION_STATE_SPIN) { playerStatus->animFlags |= 0x40000; } - gOverrideFlags |= 0x40; + gOverrideFlags |= GLOBAL_OVERRIDES_40; } else { enable_player_input(); partner_enable_input(); func_800E01DC(); - gOverrideFlags &= ~0x40; + gOverrideFlags &= ~GLOBAL_OVERRIDES_40; func_800E983C(); } return ApiStatus_DONE2; diff --git a/src/hud_element.c b/src/hud_element.c index c3e8459c9e..6c3ea9f7e8 100644 --- a/src/hud_element.c +++ b/src/hud_element.c @@ -128,22 +128,22 @@ void init_hud_element_list(void) { void func_801413F8(void) { set_cam_viewport(3, 0, 0, 0x13F, 0xEF); - gCameras[3].updateMode = 2; - gCameras[3].unk_06 = 1; - gCameras[3].unk_20 = 0x3CBF; - gCameras[3].nearClip = 0x10; - gCameras[3].unk_1C = 0; - gCameras[3].unk_1E = 0; - gCameras[3].unk_22 = 0; - gCameras[3].unk_5C = 0; - gCameras[3].farClip = 0x4000; - gCameras[3].bgColor[0] = 0; - gCameras[3].bgColor[1] = 0; - gCameras[3].bgColor[2] = 0; - gCameras[3].unk_54 = 160.0f; - gCameras[3].unk_58 = -120.0f; - gCameras[3].vfov = 1.0f; - gCameras[3].flags &= ~0x6; + gCameras[CAM_CAM3].updateMode = 2; + gCameras[CAM_CAM3].unk_06 = 1; + gCameras[CAM_CAM3].unk_20 = 0x3CBF; + gCameras[CAM_CAM3].nearClip = 0x10; + gCameras[CAM_CAM3].unk_1C = 0; + gCameras[CAM_CAM3].unk_1E = 0; + gCameras[CAM_CAM3].unk_22 = 0; + gCameras[CAM_CAM3].unk_5C = 0; + gCameras[CAM_CAM3].farClip = 0x4000; + gCameras[CAM_CAM3].bgColor[0] = 0; + gCameras[CAM_CAM3].bgColor[1] = 0; + gCameras[CAM_CAM3].bgColor[2] = 0; + gCameras[CAM_CAM3].unk_54 = 160.0f; + gCameras[CAM_CAM3].unk_58 = -120.0f; + gCameras[CAM_CAM3].vfov = 1.0f; + gCameras[CAM_CAM3].flags &= ~0x6; } s32 create_hud_element(const HudScript* anim) { diff --git a/src/intro_logos.c b/src/intro_logos.c index d1dc4e127e..e016a09915 100644 --- a/src/intro_logos.c +++ b/src/intro_logos.c @@ -10,16 +10,16 @@ void intro_logos_set_fade_color(s16 color) { gGameStatusPtr->bootBlue = color; } -s16 intro_logos_fade_in(s16 subtractAlpha) { +s32 intro_logos_fade_in(s16 subtractAlpha) { if (gGameStatusPtr->bootAlpha != 0) { gGameStatusPtr->bootAlpha -= subtractAlpha; if (gGameStatusPtr->bootAlpha << 16 < 0) { gGameStatusPtr->bootAlpha = 0; } } else { - return 1; + return TRUE; } - return 0; + return FALSE; } s32 intro_logos_fade_out(s16 addAlpha) { @@ -29,9 +29,9 @@ s32 intro_logos_fade_out(s16 addAlpha) { gGameStatusPtr->bootAlpha = 255; } } else { - return 1; + return TRUE; } - return 0; + return FALSE; } void intro_logos_update_fade(void) { diff --git a/src/main_loop.c b/src/main_loop.c index 17a43e65c7..9966d93213 100644 --- a/src/main_loop.c +++ b/src/main_loop.c @@ -88,10 +88,10 @@ void step_game_loop(void) { update_windows(); update_curtains(); - if (gOverrideFlags & 0x20) { + if (gOverrideFlags & GLOBAL_OVERRIDES_ENABLE_TRANSITION_STENCIL) { switch (D_800741A2) { case 0: - gOverrideFlags |= 0x200; + gOverrideFlags |= GLOBAL_OVERRIDES_200; disable_player_input(); if (D_800741A0 == 255) { @@ -105,12 +105,12 @@ void step_game_loop(void) { } break; case 1: - gOverrideFlags |= 0x8; + gOverrideFlags |= GLOBAL_OVERRIDES_8; D_8009A690--; if (D_8009A690 == 0) { sfx_stop_env_sounds(); - set_game_mode(0); - gOverrideFlags &= ~0x20; + set_game_mode(GAME_MODE_STARTUP); + gOverrideFlags &= ~GLOBAL_OVERRIDES_ENABLE_TRANSITION_STENCIL; } break; } @@ -119,28 +119,28 @@ void step_game_loop(void) { D_800741A2 = 0; } - if (gOverrideFlags & 0x100) { - gOverrideFlags |= 0x1000; + if (gOverrideFlags & GLOBAL_OVERRIDES_DISABLE_BATTLES) { + gOverrideFlags |= GLOBAL_OVERRIDES_1000; } else { - gOverrideFlags &= ~0x1000; + gOverrideFlags &= ~GLOBAL_OVERRIDES_1000; } - if (gOverrideFlags & 0x200) { - gOverrideFlags |= 0x2000; + if (gOverrideFlags & GLOBAL_OVERRIDES_200) { + gOverrideFlags |= GLOBAL_OVERRIDES_2000; } else { - gOverrideFlags &= ~0x2000; + gOverrideFlags &= ~GLOBAL_OVERRIDES_2000; } - if (gOverrideFlags & 0x400) { - gOverrideFlags |= 0x4000; + if (gOverrideFlags & GLOBAL_OVERRIDES_400) { + gOverrideFlags |= GLOBAL_OVERRIDES_4000; } else { - gOverrideFlags &= ~0x4000; + gOverrideFlags &= ~GLOBAL_OVERRIDES_4000; } - if (gOverrideFlags & 0x800) { - gOverrideFlags |= 0x8000; + if (gOverrideFlags & GLOBAL_OVERRIDES_800) { + gOverrideFlags |= GLOBAL_OVERRIDES_8000; } else { - gOverrideFlags &= ~0x8000; + gOverrideFlags &= ~GLOBAL_OVERRIDES_8000; } rand_int(1); @@ -168,7 +168,7 @@ void gfx_draw_frame(void) { gMatrixListPos = 0; gMasterGfxPos = &gDisplayContext->mainGfx[0]; - if (gOverrideFlags & 8) { + if (gOverrideFlags & GLOBAL_OVERRIDES_8) { gCurrentDisplayContextIndex = gCurrentDisplayContextIndex ^ 1; return; } @@ -177,7 +177,7 @@ void gfx_draw_frame(void) { spr_render_init(); - if (!(gOverrideFlags & 2)) { + if (!(gOverrideFlags & GLOBAL_OVERRIDES_DISABLE_RENDER_WORLD)) { render_frame(0); } @@ -189,14 +189,15 @@ void gfx_draw_frame(void) { render_effects_UI(); state_render_backUI(); - if (!(gOverrideFlags & 0x10000)) { + if (!(gOverrideFlags & GLOBAL_OVERRIDES_WINDOWS_IN_FRONT_OF_CURTAINS)) { render_window_root(); } - if (!(gOverrideFlags & 2) && gGameStatusPtr->disableScripts == 0) { + + if (!(gOverrideFlags & GLOBAL_OVERRIDES_DISABLE_RENDER_WORLD) && !gGameStatusPtr->disableScripts) { render_frame(1); } - if (!(gOverrideFlags & 0x100010)) { + if (!(gOverrideFlags & (GLOBAL_OVERRIDES_MESSAGES_IN_FRONT_OF_CURTAINS | GLOBAL_OVERRIDES_10))) { render_messages(); } @@ -204,22 +205,22 @@ void gfx_draw_frame(void) { render_hud_elements_frontUI(); render_screen_overlay_frontUI(); - if ((gOverrideFlags & 0x100010) == 0x10) { + if ((gOverrideFlags & (GLOBAL_OVERRIDES_MESSAGES_IN_FRONT_OF_CURTAINS | GLOBAL_OVERRIDES_10)) == GLOBAL_OVERRIDES_10) { render_messages(); } render_curtains(); - if (gOverrideFlags & 0x100000) { + if (gOverrideFlags & GLOBAL_OVERRIDES_MESSAGES_IN_FRONT_OF_CURTAINS) { render_messages(); } - if (gOverrideFlags & 0x10000) { + if (gOverrideFlags & GLOBAL_OVERRIDES_WINDOWS_IN_FRONT_OF_CURTAINS) { render_window_root(); } state_render_frontUI(); - if (gOverrideFlags & 0x20) { + if (gOverrideFlags & GLOBAL_OVERRIDES_ENABLE_TRANSITION_STENCIL) { switch (D_800741A2) { case 0: case 1: @@ -302,8 +303,8 @@ void load_engine_data(void) { gGameStatusPtr->unk_48[i] = 12; } - gOverrideFlags |= 0x8; - set_game_mode(0); + gOverrideFlags |= GLOBAL_OVERRIDES_8; + set_game_mode(GAME_MODE_STARTUP); } /// Time freeze modes: @@ -316,30 +317,30 @@ void set_time_freeze_mode(s32 mode) { switch (mode) { case 0: timeFreezeMode = mode; - gOverrideFlags &= ~0xF00; + gOverrideFlags &= ~(GLOBAL_OVERRIDES_800 | GLOBAL_OVERRIDES_400 | GLOBAL_OVERRIDES_200 | GLOBAL_OVERRIDES_DISABLE_BATTLES); resume_all_group(3); break; case 1: timeFreezeMode = mode; - gOverrideFlags &= ~0xE00; - gOverrideFlags |= 0x100; + gOverrideFlags &= ~(GLOBAL_OVERRIDES_800 | GLOBAL_OVERRIDES_400 | GLOBAL_OVERRIDES_200); + gOverrideFlags |= GLOBAL_OVERRIDES_DISABLE_BATTLES; suspend_all_group(1); break; case 2: timeFreezeMode = mode; - gOverrideFlags &= ~0xC00; - gOverrideFlags |= 0x300; + gOverrideFlags &= ~(GLOBAL_OVERRIDES_400 | GLOBAL_OVERRIDES_800); + gOverrideFlags |= GLOBAL_OVERRIDES_200 | GLOBAL_OVERRIDES_DISABLE_BATTLES; suspend_all_group(2); break; case 3: timeFreezeMode = mode; - gOverrideFlags &= ~0x800; - gOverrideFlags |= 0x700; + gOverrideFlags &= ~GLOBAL_OVERRIDES_800; + gOverrideFlags |= GLOBAL_OVERRIDES_400 | GLOBAL_OVERRIDES_200 | GLOBAL_OVERRIDES_DISABLE_BATTLES; suspend_all_group(2); break; case 4: timeFreezeMode = mode; - gOverrideFlags |= 0xF00; + gOverrideFlags |= GLOBAL_OVERRIDES_800 | GLOBAL_OVERRIDES_400 | GLOBAL_OVERRIDES_200 | GLOBAL_OVERRIDES_DISABLE_BATTLES; break; } } @@ -489,7 +490,7 @@ void gfx_draw_background(void) { } break; default: - if (gOverrideFlags & 8) { + if (gOverrideFlags & GLOBAL_OVERRIDES_8) { gDPSetColorImage(gMasterGfxPos++, G_IM_FMT_RGBA, G_IM_SIZ_16b, SCREEN_WIDTH, osVirtualToPhysical(nuGfxCfb_ptr)); return; } diff --git a/src/state_battle.c b/src/state_battle.c index 5b243bf715..497b49be93 100644 --- a/src/state_battle.c +++ b/src/state_battle.c @@ -52,7 +52,7 @@ void state_step_battle(void) { return; } D_800A0900--; - gOverrideFlags |= 0x8; + gOverrideFlags |= GLOBAL_OVERRIDES_8; nuContRmbForceStop(); } @@ -104,7 +104,7 @@ void state_step_battle(void) { gPlayerStatusPtr->animFlags &= ~PLAYER_STATUS_ANIM_FLAGS_40; D_800A0908 = get_time_freeze_mode(); set_time_freeze_mode(TIME_FREEZE_NORMAL); - gOverrideFlags &= ~0x8; + gOverrideFlags &= ~GLOBAL_OVERRIDES_8; if (D_800A0900 >= 0) { return; @@ -129,7 +129,7 @@ void state_drawUI_battle(void) { } void state_init_end_battle(void) { - gOverrideFlags |= 0x8; + gOverrideFlags |= GLOBAL_OVERRIDES_8; nuContRmbForceStop(); D_800A0900 = 5; } @@ -146,7 +146,7 @@ void state_step_end_battle(void) { D_800A0900 = -1; nuGfxSetCfb(D_800778A0, 3); - gOverrideFlags &= ~0x8; + gOverrideFlags &= ~GLOBAL_OVERRIDES_8; nuContRmbForceStopEnd(); sfx_stop_env_sounds(); mapConfig = get_current_map_header(); @@ -175,7 +175,7 @@ void state_step_end_battle(void) { if (gGameStatusPtr->demoFlags & 1) { npc_reload_all(); playerStatus->animFlags = D_800A0904; - set_game_mode(17); + set_game_mode(GAME_MODE_DEMO); } else { void* mapShape; u32 sizeTemp; @@ -207,7 +207,7 @@ void state_step_end_battle(void) { if (D_800A0908 != 0) { set_time_freeze_mode(D_800A0908); } - set_game_mode(4); + set_game_mode(GAME_MODE_CHANGE_MAP); } } } diff --git a/src/state_demo.c b/src/state_demo.c index 3fbd4277ab..baa5590546 100644 --- a/src/state_demo.c +++ b/src/state_demo.c @@ -78,26 +78,26 @@ void state_step_demo(void) { case 3: intro_logos_set_fade_alpha(255); intro_logos_set_fade_color(224); - gGameStatusPtr->introState = 3; - gOverrideFlags |= 8; + gGameStatusPtr->introState = INTRO_STATE_3; + gOverrideFlags |= GLOBAL_OVERRIDES_8; intro_logos_update_fade(); gGameStatusPtr->demoState = 5; break; case 4: - if (gGameStatusPtr->introState != 0) { + if (gGameStatusPtr->introState != INTRO_STATE_0) { gGameStatusPtr->introState--; } - if (gGameStatusPtr->introState == 0) { + if (gGameStatusPtr->introState == INTRO_STATE_0) { gGameStatusPtr->nextDemoScene = 0; gGameStatusPtr->demoState = 0; gGameStatusPtr->peachFlags = 0; func_80056204(); gGameStatusPtr->isBattle = FALSE; gGameStatusPtr->unk_76 = 0; - gGameStatusPtr->disableScripts = 0; - gGameStatusPtr->keepUsingPartnerOnMapChange = 0; - gOverrideFlags &= ~0x8; + gGameStatusPtr->disableScripts = FALSE; + gGameStatusPtr->keepUsingPartnerOnMapChange = FALSE; + gOverrideFlags &= ~GLOBAL_OVERRIDES_8; general_heap_create(); clear_render_tasks(); clear_generic_entity_list(); @@ -123,7 +123,7 @@ void state_step_demo(void) { clear_item_entity_data(); clear_saved_variables(); initialize_collision(); - set_game_mode(2); + set_game_mode(GAME_MODE_TITLE_SCREEN); } return; case 0: @@ -142,7 +142,7 @@ void state_step_demo(void) { set_map_transition_effect(2); } - set_game_mode(3); + set_game_mode(GAME_MODE_ENTER_DEMO_WORLD); break; case 1: get_map_IDs_by_name(demoSceneData->mapName, &areaID, &mapID); @@ -160,7 +160,7 @@ void state_step_demo(void) { set_map_transition_effect(2); } - set_game_mode(3); + set_game_mode(GAME_MODE_ENTER_DEMO_WORLD); break; case 2: load_demo_battle(demoSceneData->entryID); diff --git a/src/state_file_select.c b/src/state_file_select.c index 8d9d787f9e..445e9177b1 100644 --- a/src/state_file_select.c +++ b/src/state_file_select.c @@ -40,31 +40,31 @@ void state_init_file_select(void) { set_hud_element_nonworld_cache(0, 0); clear_hud_element_cache(); load_model_textures(0, 0, 0); - gCameras[0].updateMode = 6; - gCameras[0].unk_06 = 1; - gCameras[0].nearClip = 16; - gCameras[0].farClip = 4096; - gCameras[0].flags |= CAM_FLAG_ENABLED; - gCurrentCameraID = 0; - gCameras[1].flags |= CAM_FLAG_ENABLED; - gCameras[2].flags |= CAM_FLAG_ENABLED; - gCameras[3].flags |= CAM_FLAG_ENABLED; - gCameras[0].vfov = 25.0f; + gCameras[CAM_DEFAULT].updateMode = 6; + gCameras[CAM_DEFAULT].unk_06 = 1; + gCameras[CAM_DEFAULT].nearClip = 16; + gCameras[CAM_DEFAULT].farClip = 4096; + gCameras[CAM_DEFAULT].flags |= CAM_FLAG_ENABLED; + gCurrentCameraID = CAM_DEFAULT; + gCameras[CAM_BATTLE].flags |= CAM_FLAG_ENABLED; + gCameras[CAM_TATTLE].flags |= CAM_FLAG_ENABLED; + gCameras[CAM_CAM3].flags |= CAM_FLAG_ENABLED; + gCameras[CAM_DEFAULT].vfov = 25.0f; set_cam_viewport(0, 12, 28, 296, 184); - gCameras[0].unk_1E = 40; - gCameras[0].lookAt_eye.x = 500.0f; - gCameras[0].lookAt_eye.y = 1000.0f; - gCameras[0].lookAt_eye.z = 1500.0f; - gCameras[0].unk_5C = 150.0f; - gCameras[0].bgColor[0] = 0; - gCameras[0].bgColor[1] = 0; - gCameras[0].bgColor[2] = 0; - gCameras[0].unk_54 = 25.0f; - gCameras[0].unk_58 = 25.0f; - gCameras[0].unk_1C = 0; - gCameras[0].unk_20 = 100; - gCameras[0].unk_22 = 0; - gOverrideFlags |= 0x10000; + gCameras[CAM_DEFAULT].unk_1E = 40; + gCameras[CAM_DEFAULT].lookAt_eye.x = 500.0f; + gCameras[CAM_DEFAULT].lookAt_eye.y = 1000.0f; + gCameras[CAM_DEFAULT].lookAt_eye.z = 1500.0f; + gCameras[CAM_DEFAULT].unk_5C = 150.0f; + gCameras[CAM_DEFAULT].bgColor[0] = 0; + gCameras[CAM_DEFAULT].bgColor[1] = 0; + gCameras[CAM_DEFAULT].bgColor[2] = 0; + gCameras[CAM_DEFAULT].unk_54 = 25.0f; + gCameras[CAM_DEFAULT].unk_58 = 25.0f; + gCameras[CAM_DEFAULT].unk_1C = 0; + gCameras[CAM_DEFAULT].unk_20 = 100; + gCameras[CAM_DEFAULT].unk_22 = 0; + gOverrideFlags |= GLOBAL_OVERRIDES_WINDOWS_IN_FRONT_OF_CURTAINS; } void state_step_language_select(void) { @@ -93,16 +93,16 @@ void state_step_language_select(void) { case 1: D_800A0930 = 5; D_800A0931 = 2; - gOverrideFlags |= 8; + gOverrideFlags |= GLOBAL_OVERRIDES_8; break; case 2: D_800A0930--; if (D_800A0930 == 0) { nuGfxSetCfb(D_80077980, 2); if (nuGfxCfb[2] == nuGfxCfb_ptr) { - gOverrideFlags &= ~0x8; + gOverrideFlags &= ~GLOBAL_OVERRIDES_8; } else { - gOverrideFlags |= 8; + gOverrideFlags |= GLOBAL_OVERRIDES_8; set_windows_visible(WINDOW_GROUP_FILE_MENU); D_800A0930 = 1; D_800A0931 = 3; @@ -137,7 +137,7 @@ void state_step_language_select(void) { clear_trigger_data(); nuPiReadRomOverlay(&D_8007798C); filemenu_init(1); - gOverrideFlags &= ~0x8; + gOverrideFlags &= ~GLOBAL_OVERRIDES_8; set_screen_overlay_params_front(255, 255.0f); } if (D_800A0930 >= 0) { @@ -201,7 +201,7 @@ void state_init_exit_language_select(void) { set_screen_overlay_params_front(0, D_800A0932[0]); } D_800A0930 = 1; - gOverrideFlags &= ~0x40; + gOverrideFlags &= ~GLOBAL_OVERRIDES_40; } void state_init_exit_file_select(void) { @@ -213,10 +213,10 @@ void state_init_exit_file_select(void) { set_map_transition_effect(7); } else { set_map_transition_effect(8); - gOverrideFlags &= ~0x0010000; + gOverrideFlags &= ~GLOBAL_OVERRIDES_WINDOWS_IN_FRONT_OF_CURTAINS; bgm_set_song(0, -1, 0, 1000, 8); } - gOverrideFlags &= ~0x40; + gOverrideFlags &= ~GLOBAL_OVERRIDES_40; } void state_step_exit_language_select(void) { @@ -251,7 +251,7 @@ void state_step_exit_language_select(void) { break; case 2: if (D_800A0930 == 3) { - gOverrideFlags |= 8; + gOverrideFlags |= GLOBAL_OVERRIDES_8; } if (D_800A0930 >= 0) { @@ -266,7 +266,7 @@ void state_step_exit_language_select(void) { D_800A0930 = -1; nuGfxSetCfb(D_80077980, ARRAY_COUNT(D_80077980)); filemenu_cleanup(); - gOverrideFlags &= ~0x8; + gOverrideFlags &= ~GLOBAL_OVERRIDES_8; mapConfig = get_current_map_header(); map = &gAreas[gGameStatusPtr->areaID].maps[gGameStatusPtr->mapID]; gGameStatusPtr->isBattle = FALSE; @@ -347,7 +347,7 @@ void state_step_exit_language_select(void) { update_encounters(); update_effects(); enable_player_input(); - set_game_mode(4); + set_game_mode(GAME_MODE_CHANGE_MAP); set_screen_overlay_params_front(255, -1.0f); break; } @@ -386,8 +386,8 @@ void state_step_exit_file_select(void) { case 3: set_time_freeze_mode(0); if (temp_s0 == 0) { - set_game_mode(2); - gOverrideFlags &= ~0x10000; + set_game_mode(GAME_MODE_TITLE_SCREEN); + gOverrideFlags &= ~GLOBAL_OVERRIDES_WINDOWS_IN_FRONT_OF_CURTAINS; } else { D_800A0930 = 10; D_800A0931 = 4; @@ -410,7 +410,7 @@ void state_step_exit_file_select(void) { } break; case 6: - set_game_mode(7); + set_game_mode(GAME_MODE_WORLD); break; } } diff --git a/src/state_intro.c b/src/state_intro.c index 9ac1855a15..ecc8e5eb6a 100644 --- a/src/state_intro.c +++ b/src/state_intro.c @@ -7,7 +7,7 @@ extern s32 D_800A0950; void state_init_intro(void) { s8 unk_A8; - gGameStatusPtr->introState = 0; + gGameStatusPtr->introState = INTRO_STATE_0; set_curtain_scale_goal(1.0f); set_curtain_fade_goal(0.3f); @@ -82,15 +82,19 @@ void state_step_intro(void) { D_800A0964 = 1; } - if (D_800A0964 == 1 && (gGameStatusPtr->introState == 0 || gGameStatusPtr->introState == 1 || - gGameStatusPtr->introState == 4)) { + if (D_800A0964 == 1 && (gGameStatusPtr->introState == INTRO_STATE_0 || + gGameStatusPtr->introState == INTRO_STATE_1 || + gGameStatusPtr->introState == INTRO_STATE_4)) + { gGameStatusPtr->creditsViewportMode = 100; state_init_intro(); return; } - if (D_800A0964 == 2 && (gGameStatusPtr->introState == 0 || gGameStatusPtr->introState == 1 || - gGameStatusPtr->introState == 4)) { + if (D_800A0964 == 2 && (gGameStatusPtr->introState == INTRO_STATE_0 || + gGameStatusPtr->introState == INTRO_STATE_1 || + gGameStatusPtr->introState == INTRO_STATE_4)) + { gGameStatusPtr->creditsViewportMode++; state_init_intro(); return; @@ -98,44 +102,44 @@ void state_step_intro(void) { } switch (gGameStatusPtr->introState) { - case 0: + case INTRO_STATE_0: update_effects(); update_cameras(); if (gGameStatusPtr->creditsViewportMode == -1) { set_curtain_fade_goal(0.0f); if (intro_logos_fade_out(D_800A0956)) { - gGameStatusPtr->introState = 1; + gGameStatusPtr->introState = INTRO_STATE_1; set_curtain_draw_callback(NULL); } } else { D_800A0954 += D_800A0956; if (D_800A0954 >= 0xFF) { D_800A0954 = 0xFF; - gGameStatusPtr->introState = 1; + gGameStatusPtr->introState = INTRO_STATE_1; set_curtain_draw_callback(NULL); } } break; - case 1: + case INTRO_STATE_1: D_800A0950 = 4; - gOverrideFlags |= 8; + gOverrideFlags |= GLOBAL_OVERRIDES_8; if (D_800A0960 != 0xE) { - gGameStatusPtr->introState = 2; + gGameStatusPtr->introState = INTRO_STATE_2; } break; - case 21: + case INTRO_STATE_15: D_800A0950--; if (D_800A0950 <= 0) { - gOverrideFlags &= -9; - gGameStatusPtr->introState = 2; + gOverrideFlags &= ~GLOBAL_OVERRIDES_8; + gGameStatusPtr->introState = INTRO_STATE_2; } break; - case 2: + case INTRO_STATE_2: set_curtain_draw_callback(NULL); - gGameStatusPtr->isBattle = 0; + gGameStatusPtr->isBattle = FALSE; gGameStatusPtr->unk_76 = 0; - gGameStatusPtr->disableScripts = 0; - gGameStatusPtr->keepUsingPartnerOnMapChange = 0; + gGameStatusPtr->disableScripts = FALSE; + gGameStatusPtr->keepUsingPartnerOnMapChange = FALSE; if (gGameStatusPtr->creditsViewportMode == -1) { general_heap_create(); @@ -163,7 +167,7 @@ void state_step_intro(void) { clear_item_entity_data(); clear_saved_variables(); initialize_collision(); - set_game_mode(2); + set_game_mode(GAME_MODE_TITLE_SCREEN); return; } @@ -183,19 +187,19 @@ void state_step_intro(void) { playerData->partners[i].enabled = 0; } - playerData->currentPartner = 0; + playerData->currentPartner = PARTNER_NONE; load_map_by_IDs(gGameStatusPtr->areaID, gGameStatusPtr->mapID, 0); - gGameStatusPtr->introState = 3; + gGameStatusPtr->introState = INTRO_STATE_3; disable_player_input(); break; - case 3: + case INTRO_STATE_3: if (D_800A0960 == 0xE) { D_800A0960 = 0xF; } - D_800A0954 = 0xFF - D_800A0958; - gOverrideFlags &= ~0x8; + D_800A0954 = 255 - D_800A0958; + gOverrideFlags &= ~GLOBAL_OVERRIDES_8; gCameras->flags &= ~0x2; - gOverrideFlags &= ~0x2; + gOverrideFlags &= ~GLOBAL_OVERRIDES_DISABLE_RENDER_WORLD; update_player(); update_encounters(); update_npcs(); @@ -203,17 +207,17 @@ void state_step_intro(void) { update_cameras(); if (!does_script_exist(gGameStatusPtr->mainScriptID)) { gGameStatusPtr->prevArea = gGameStatusPtr->areaID; - gGameStatusPtr->introState = 4; + gGameStatusPtr->introState = INTRO_STATE_4; break; } return; - case 4: + case INTRO_STATE_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); + set_screen_overlay_params_front(255, -1.0f); + set_screen_overlay_params_back(255, -1.0f); } else { D_800A0954 -= D_800A0958; if (D_800A0954 < 0) { diff --git a/src/state_logos.c b/src/state_logos.c index 9143f4de02..c0f1e1fa61 100644 --- a/src/state_logos.c +++ b/src/state_logos.c @@ -16,7 +16,7 @@ void state_init_logos(void) { s32* temp_800A0910; general_heap_create(); - gGameStatusPtr->introState = 0; + gGameStatusPtr->introState = INTRO_STATE_0; gGameStatusPtr->introCounter = 0; gGameStatusPtr->bSkipIntro = FALSE; intro_logos_set_fade_alpha(255); @@ -38,30 +38,30 @@ void state_init_logos(void) { nuContRmbForceStop(); create_cameras_a(); - gCameras[0].updateMode = 6; - gCameras[0].unk_06 = 1; - gCameras[0].nearClip = 0x10; - gCameras[0].farClip = 0x1000; - gCurrentCameraID = 0; - gCameras[0].vfov = 25.0f; - gCameras[0].flags |= CAM_FLAG_ENABLED; - gCameras[1].flags |= CAM_FLAG_ENABLED; - gCameras[2].flags |= CAM_FLAG_ENABLED; - gCameras[3].flags |= CAM_FLAG_ENABLED; + gCameras[CAM_DEFAULT].updateMode = 6; + gCameras[CAM_DEFAULT].unk_06 = 1; + gCameras[CAM_DEFAULT].nearClip = 0x10; + gCameras[CAM_DEFAULT].farClip = 0x1000; + gCurrentCameraID = CAM_DEFAULT; + gCameras[CAM_DEFAULT].vfov = 25.0f; + gCameras[CAM_DEFAULT].flags |= CAM_FLAG_ENABLED; + gCameras[CAM_BATTLE].flags |= CAM_FLAG_ENABLED; + gCameras[CAM_TATTLE].flags |= CAM_FLAG_ENABLED; + gCameras[CAM_CAM3].flags |= CAM_FLAG_ENABLED; set_cam_viewport(0, 12, 28, 296, 184); - gCameras[0].unk_1E = 0x28; - gCameras[0].bgColor[0] = 0; - gCameras[0].bgColor[1] = 0; - gCameras[0].bgColor[2] = 0; - gCameras[0].unk_54 = 25.0f; - gCameras[0].unk_58 = 25.0f; - gCameras[0].unk_1C = 0; - gCameras[0].unk_20 = 100; - gCameras[0].unk_22 = 0; - gCameras[0].lookAt_eye.x = 500.0f; - gCameras[0].lookAt_eye.y = 1000.0f; - gCameras[0].lookAt_eye.z = 1500.0f; - gCameras[0].unk_5C = 150.0f; + gCameras[CAM_DEFAULT].unk_1E = 0x28; + gCameras[CAM_DEFAULT].bgColor[0] = 0; + gCameras[CAM_DEFAULT].bgColor[1] = 0; + gCameras[CAM_DEFAULT].bgColor[2] = 0; + gCameras[CAM_DEFAULT].unk_54 = 25.0f; + gCameras[CAM_DEFAULT].unk_58 = 25.0f; + gCameras[CAM_DEFAULT].unk_1C = 0; + gCameras[CAM_DEFAULT].unk_20 = 100; + gCameras[CAM_DEFAULT].unk_22 = 0; + gCameras[CAM_DEFAULT].lookAt_eye.x = 500.0f; + gCameras[CAM_DEFAULT].lookAt_eye.y = 1000.0f; + gCameras[CAM_DEFAULT].lookAt_eye.z = 1500.0f; + gCameras[CAM_DEFAULT].unk_5C = 150.0f; clear_script_list(); clear_generic_entity_list(); clear_render_tasks(); @@ -73,7 +73,7 @@ void state_init_logos(void) { reset_background_settings(); clear_entity_data(1); clear_effect_data(); - gOverrideFlags |= 0x2; + gOverrideFlags |= GLOBAL_OVERRIDES_DISABLE_RENDER_WORLD; intro_logos_update_fade(); gGameStatusPtr->backgroundFlags = FALSE; } @@ -83,48 +83,48 @@ void state_step_logos(void) { if (intro_logos_fade_out(0xA) != 0) { set_curtain_scale(1.0f); set_curtain_fade(0.0f); - set_game_mode(2); + set_game_mode(GAME_MODE_TITLE_SCREEN); } } else { switch (gGameStatusPtr->introState) { - case 1: + case INTRO_STATE_1: if (gGameStatusPtr->introCounter == 0) { intro_logos_set_fade_color(208); gGameStatusPtr->introState++; } gGameStatusPtr->introCounter--; break; - case 2: - if (intro_logos_fade_out(0xA) != 0) { + case INTRO_STATE_2: + if (intro_logos_fade_out(0xA)) { gGameStatusPtr->introState++; } break; - case 3: - if (intro_logos_fade_in(0xA) != 0) { + case INTRO_STATE_3: + if (intro_logos_fade_in(0xA)) { gGameStatusPtr->introState++; gGameStatusPtr->introCounter = 40; } break; - case 4: + case INTRO_STATE_4: if (gGameStatusPtr->introCounter == 0) { gGameStatusPtr->introState++; intro_logos_set_fade_color(208); } gGameStatusPtr->introCounter--; break; - case 5: - if (intro_logos_fade_out(0xA) != 0) { + case INTRO_STATE_5: + if (intro_logos_fade_out(0xA)) { gGameStatusPtr->introState++; } break; - case 0: - case 6: - if (intro_logos_fade_in(0xA) != 0) { + case INTRO_STATE_0: + case INTRO_STATE_6: + if (intro_logos_fade_in(0xA)) { gGameStatusPtr->introState++; gGameStatusPtr->introCounter = 30; } break; - case 7: + case INTRO_STATE_7: if (gGameStatusPtr->introCounter == 0) { gGameStatusPtr->introState++; intro_logos_set_fade_color(208); @@ -132,7 +132,7 @@ void state_step_logos(void) { } gGameStatusPtr->introCounter--; break; - case 8: + case INTRO_STATE_8: if (gGameStatusPtr->introCounter == 0) { gGameStatusPtr->introState++; set_curtain_scale_goal(1.0f); @@ -142,26 +142,26 @@ void state_step_logos(void) { gGameStatusPtr->introCounter--; } break; - case 9: + case INTRO_STATE_9: if (intro_logos_fade_out(0xA) != 0) { gGameStatusPtr->introCounter = 15; gGameStatusPtr->introState++; } break; - case 10: + case INTRO_STATE_A: if (gGameStatusPtr->introCounter == 0) { gGameStatusPtr->introState++; } else { gGameStatusPtr->introCounter--; } break; - case 11: + case INTRO_STATE_B: heap_free(D_800A0910); D_800A0910 = 0; intro_logos_set_fade_alpha(255); gGameStatusPtr->creditsViewportMode = 0; - set_game_mode(16); + set_game_mode(GAME_MODE_INTRO); break; } } diff --git a/src/state_pause.c b/src/state_pause.c index c718d5d7df..ce7b30b850 100644 --- a/src/state_pause.c +++ b/src/state_pause.c @@ -39,7 +39,7 @@ void state_step_pause(void) { if (nuGfxCfb[1] == nuGfxCfb_ptr) { D_800A0920 = 4; D_800A0921 = 2; - gOverrideFlags |= 0x8; + gOverrideFlags |= GLOBAL_OVERRIDES_8; gGameStatusPtr->backgroundFlags &= ~0xF0; gGameStatusPtr->backgroundFlags |= 0x10; @@ -82,7 +82,7 @@ void state_step_pause(void) { bgm_quiet_max_volume(); nuPiReadRomOverlay(&D_8007795C); pause_init(); - gOverrideFlags &= ~0x8; + gOverrideFlags &= ~GLOBAL_OVERRIDES_8; } if (D_800A0920 >= 0) { @@ -118,7 +118,7 @@ void state_step_unpause(void) { case 0: case 1: if (D_800A0920 == 4) { - gOverrideFlags |= 0x8; + gOverrideFlags |= GLOBAL_OVERRIDES_8; } if (D_800A0920 >= 0) { @@ -136,7 +136,7 @@ void state_step_unpause(void) { D_800A0920 = -1; nuGfxSetCfb(&D_80077950, ARRAY_COUNT(D_80077950)); pause_cleanup(); - gOverrideFlags &= ~0x8; + gOverrideFlags &= ~GLOBAL_OVERRIDES_8; mapConfig = get_current_map_header(); map = &gAreas[gGameStatusPtr->areaID].maps[gGameStatusPtr->mapID]; gGameStatusPtr->isBattle = FALSE; @@ -223,7 +223,7 @@ void state_step_unpause(void) { update_player(); update_effects(); enable_player_input(); - set_game_mode(4); + set_game_mode(GAME_MODE_CHANGE_MAP); break; } } diff --git a/src/state_startup.c b/src/state_startup.c index 70f60b485b..a0bdfd2957 100644 --- a/src/state_startup.c +++ b/src/state_startup.c @@ -4,15 +4,15 @@ #include "sprite.h" void state_init_startup(void) { - gOverrideFlags |= 0x8; - gGameStatusPtr->introState = 3; + gOverrideFlags |= GLOBAL_OVERRIDES_8; + gGameStatusPtr->introState = INTRO_STATE_3; } void state_step_startup(void) { GameStatus* gameStatus = gGameStatusPtr; s32 i; - if (gameStatus->introState != 0) { + if (gameStatus->introState != INTRO_STATE_0) { gameStatus->introState--; return; } @@ -79,8 +79,8 @@ void state_step_startup(void) { audio_set_mono(); } - gOverrideFlags &= ~0x8; - set_game_mode(1); + gOverrideFlags &= ~GLOBAL_OVERRIDES_8; + set_game_mode(GAME_MODE_LOGOS); } void state_drawUI_startup(void) { diff --git a/src/state_title_screen.c b/src/state_title_screen.c index 4bac4886ff..88d47a0b39 100644 --- a/src/state_title_screen.c +++ b/src/state_title_screen.c @@ -1,10 +1,20 @@ #include "common.h" +#include "nu/nusys.h" +#include "hud_element.h" +#include "sprite.h" -void title_screen_draw_copyright(f32); +// Properties of the title screen Paper Mario logo +#define TITLE_WIDTH 200 // Width of the texture +#define TITLE_HEIGHT 112 // Height of the texture +#define TITLE_TILE_HEIGHT 2 // Height of an individually loaded tile in the texture +#define TITLE_NUM_TILES (TITLE_HEIGHT / TITLE_TILE_HEIGHT) // Number of tiles in the texture +#define TITLE_TILE_PIXELS (TITLE_WIDTH * TITLE_TILE_HEIGHT) // Number of pixels in a single tile of the texture +#define TITLE_POS_LEFT ((SCREEN_WIDTH - TITLE_WIDTH) / 2) // Left edge of the texture on screen +#define TITLE_POS_TOP 15 // Top edge of the texture on screen (with no offset) -s16 D_800779C0[] = {0, 0}; +s16 D_800779C0[2] = {0, 0}; s32 D_800779C4 = 0; -s8 D_800779C8[] = {0, 0}; +s8 D_800779C8[2] = {0, 0}; s8 D_800779CA = 0; s8 D_800779CB = 0x45; s32 D_800779CC = 0x52524F52; @@ -15,12 +25,29 @@ s32 D_800779D8[] = { 0x00000000, 0x00000000, 0x00000045, 0x52524F52, 0xF7F7F700, 0xF7F7F700, 0x00000000, 0x00000000, }; s32 D_80077A24 = 0x01010101; - s32 D_80077A28 = 0; s32 D_80077A2C = 0; s32 D_80077A30 = 0; -s32 D_80077A34[] = {0x00000000, 0xFFFFFF00, 0xFFFFFF00}; -s32 D_80077A40[] = {0, 0, 0, 0}; +s32 D_80077A34[1] = {0}; + +Lights1 D_80077A38 = { + .a = { + .l = { + .col = {255, 255, 255}, + .colc = {255, 255, 255}, + }, + }, + .l = { + { + .l = { + .col = {0, 0, 0}, + .colc = {0, 0, 0}, + .dir = {0, 0, 0}, + } + } + } +}; + Gfx D_80077A50[] = { gsDPPipeSync(), gsDPSetCycleType(G_CYC_1CYCLE), @@ -42,49 +69,346 @@ Gfx D_80077A50[] = { gsSPEndDisplayList(), }; -extern s32 D_80077A2B; +typedef struct TitleDataStruct { + /* 0x0 */ s32 unk_00; + /* 0x4 */ s32 unk_04; + /* 0x8 */ s32 unk_08; +} TitleDataStruct; // size = 0xC + +extern s16 D_800A0970; +extern TitleDataStruct* D_800A0974; extern s32* D_800A0978; extern s32* D_800A097C; -extern s32 D_800A0980; +extern s32* D_800A0980; +extern s16 D_800A0988; -INCLUDE_ASM(void, "state_title_screen", state_init_title_screen, void); +void appendGfx_title_screen(void); +void draw_title_screen_NOP(void); +void title_screen_draw_images(f32, f32); +void title_screen_draw_logo(f32); +void title_screen_draw_press_start(void); +void title_screen_draw_copyright(f32); -INCLUDE_ASM(void, "state_title_screen", state_step_title_screen, void); +void state_init_title_screen(void) { + s32 titleDataSize; + void* titleDataDst; + void* titleData; + + gOverrideFlags = 0; + timeFreezeMode = 0; + D_8014C248[0] = 1; + general_heap_create(); + clear_printers(); + func_801497FC(0); + gGameStatusPtr->introState = INTRO_STATE_0; + gGameStatusPtr->introCounter = 0; + gGameStatusPtr->isBattle = FALSE; + gGameStatusPtr->creditsViewportMode = -1; + intro_logos_update_fade(); + titleData = load_asset_by_name("title_data", &titleDataSize); + titleDataDst = D_800A0974 = heap_malloc(titleDataSize); + decode_yay0(titleData, titleDataDst); + general_heap_free(titleData); + + D_800A0978 = (s32*)(D_800A0974->unk_00 + (s32) D_800A0974); + D_800A097C = (s32*)(D_800A0974->unk_04 + (s32) D_800A0974); + D_800A0980 = (s32*)(D_800A0974->unk_08 + (s32) D_800A0974); + + create_cameras_a(); + gCameras[CAM_DEFAULT].updateMode = 6; + gCameras[CAM_DEFAULT].unk_06 = 1; + gCameras[CAM_DEFAULT].nearClip = 0x10; + gCameras[CAM_DEFAULT].farClip = 0x1000; + gCurrentCameraID = CAM_DEFAULT; + gCameras[CAM_DEFAULT].vfov = 25.0f; + gCameras[CAM_DEFAULT].flags |= CAMERA_FLAGS_2; + gCameras[CAM_BATTLE].flags |= CAMERA_FLAGS_2; + gCameras[CAM_TATTLE].flags |= CAMERA_FLAGS_2; + gCameras[CAM_CAM3].flags |= CAMERA_FLAGS_2; + set_cam_viewport(0, 12, 28, 296, 184); + gCameras[CAM_DEFAULT].unk_1E = 40; + gCameras[CAM_DEFAULT].bgColor[0] = 0; + gCameras[CAM_DEFAULT].bgColor[1] = 0; + gCameras[CAM_DEFAULT].bgColor[2] = 0; + gCameras[CAM_DEFAULT].unk_54 = 25.0f; + gCameras[CAM_DEFAULT].unk_58 = 25.0f; + gCameras[CAM_DEFAULT].unk_1C = 0; + gCameras[CAM_DEFAULT].unk_20 = 100; + gCameras[CAM_DEFAULT].unk_22 = 0; + gCameras[CAM_DEFAULT].lookAt_eye.x = 500.0f; + gCameras[CAM_DEFAULT].lookAt_eye.y = 1000.0f; + gCameras[CAM_DEFAULT].lookAt_eye.z = 1500.0f; + gCameras[CAM_DEFAULT].unk_5C = 150.0f; + clear_script_list(); + clear_generic_entity_list(); + clear_render_tasks(); + spr_init_sprites(0); + clear_animator_list(); + clear_entity_models(); + clear_npcs(); + clear_hud_element_cache(); + reset_background_settings(); + clear_entity_data(1); + clear_effect_data(); + gOverrideFlags |= GLOBAL_OVERRIDES_DISABLE_RENDER_WORLD; + clear_player_data(); + gOverrideFlags &= ~GLOBAL_OVERRIDES_8; + game_mode_set_fpDrawAuxUI(0, appendGfx_title_screen); + load_map_bg("title_bg"); + read_background_size(&gBackgroundImage); + bgm_set_song(0, SONG_MAIN_THEME, 0, 500, 8); + D_800A0988 = 480; +} + +void state_step_title_screen(void) { + s16* temp; + u32 pressedButtons = gGameStatusPtr->pressedButtons; + + set_curtain_scale(1.0f); + set_curtain_fade(0.0f); + + if (D_800A0988 > 0) { + D_800A0988--; + } + + switch (gGameStatusPtr->introState) { + case INTRO_STATE_0: + D_800A0970 = 3; + gOverrideFlags |= GLOBAL_OVERRIDES_8; + gGameStatusPtr->unk_B0 = 20; + gGameStatusPtr->unk_AF = gGameStatusPtr->unk_B0; + gGameStatusPtr->introState++; + break; + case INTRO_STATE_1: + if (D_800A0970 != 0) { + D_800A0970--; + } else { + if (gGameStatusPtr->unk_AF != 0) { + gGameStatusPtr->unk_AF--; + } + gOverrideFlags &= ~GLOBAL_OVERRIDES_8; + if (intro_logos_fade_in(6) != 0) { + if (gGameStatusPtr->unk_AF == 0) { + gGameStatusPtr->introState = INTRO_STATE_2; + } + } + intro_logos_update_fade(); + } + break; + case INTRO_STATE_2: + if (D_80077A34[0] != NULL && D_800A0988 == 120) { + bgm_set_song(0, -1, 0, 3900, 8); + } + if (D_800A0988 == 0) { + gGameStatusPtr->introState = INTRO_STATE_4; + if (D_80077A34[0] == NULL) { + *D_800779C0 = 10; + } else { + *D_800779C0 = 9; + } + D_80077A34[0] ^= 1; + return; + } + if (pressedButtons & (BUTTON_A | BUTTON_START)) { + gGameStatusPtr->introState = INTRO_STATE_4; + *D_800779C0 = 5; + sfx_play_sound(SOUND_D5); + bgm_set_song(0, SONG_FILE_SELECT, 0, 500, 8); + return; + } + break; + case INTRO_STATE_4: + gGameStatusPtr->introState = INTRO_STATE_5; + intro_logos_set_fade_color(0xD0); + if (*D_800779C0 == 9 || *D_800779C0 == 10) { + gGameStatusPtr->unk_B0 = 20; + } else { + gGameStatusPtr->unk_B0 = 10; + } + gGameStatusPtr->unk_AF = gGameStatusPtr->unk_B0; + break; + case INTRO_STATE_5: + if (*D_800779C0 == 9 || *D_800779C0 == 10) { + if (gGameStatusPtr->unk_AF != 0) { + gGameStatusPtr->unk_AF--; + } + if (intro_logos_fade_out(0xA) != 0) { + if (gGameStatusPtr->unk_AF == 0) { + gGameStatusPtr->unk_AF = 3; + gOverrideFlags |= GLOBAL_OVERRIDES_8; + gGameStatusPtr->introState = INTRO_STATE_6; + } + } + intro_logos_update_fade(); + } else if (*D_800779C0 == 5) { + if (gGameStatusPtr->unk_AF == 0) { + gGameStatusPtr->unk_AF = 3; + gOverrideFlags |= GLOBAL_OVERRIDES_8; + gGameStatusPtr->introState = INTRO_STATE_6; + } else { + gGameStatusPtr->unk_AF--; + } + } else { + gGameStatusPtr->unk_AF = 3; + gOverrideFlags |= GLOBAL_OVERRIDES_8; + gGameStatusPtr->introState = INTRO_STATE_6; + } + break; + case INTRO_STATE_6: + if (gGameStatusPtr->unk_AF != 0) { + gGameStatusPtr->unk_AF--; + break; + } + general_heap_create(); + clear_render_tasks(); + create_cameras_a(); + clear_entity_models(); + clear_animator_list(); + clear_npcs(); + clear_hud_element_cache(); + spr_init_sprites(0); + clear_entity_data(1); + clear_windows(); + gOverrideFlags &= ~GLOBAL_OVERRIDES_8; + gOverrideFlags &= ~GLOBAL_OVERRIDES_DISABLE_RENDER_WORLD; + temp = D_800779C0; + gGameStatusPtr->entryID = 0; + + switch (temp[0]) { + case 9: + gGameStatusPtr->creditsViewportMode = 0; + set_game_mode(GAME_MODE_INTRO); + break; + case 10: + set_game_mode(GAME_MODE_DEMO); + break; + case 5: + gGameStatusPtr->areaID = 0; + gGameStatusPtr->mapID = 0xB; + gGameStatusPtr->entryID = 0; + set_game_mode(GAME_MODE_FILE_SELECT); + break; + } + return; + } + + if (!(gOverrideFlags & GLOBAL_OVERRIDES_8)) { + update_npcs(); + update_cameras(); + } +} void state_drawUI_title_screen(void) { switch (gGameStatusPtr->introState) { - case 0: + case INTRO_STATE_0: D_80077A28 = 0; D_80077A2C = 0; D_80077A30 = 0; draw_title_screen_NOP(); break; - case 2: + case INTRO_STATE_2: draw_title_screen_NOP(); if (gGameStatusPtr->contBitPattern & 1) { title_screen_draw_press_start(); } - default: + case INTRO_STATE_3: break; - case 1: - case 4: - case 5: + case INTRO_STATE_1: + case INTRO_STATE_4: + case INTRO_STATE_5: draw_title_screen_NOP(); break; } } -INCLUDE_ASM(void, "state_title_screen", appendGfx_title_screen); +void appendGfx_title_screen(void) { + f32 phi_f12; + s32 temp; + + switch (gGameStatusPtr->introState) { + case INTRO_STATE_0: + case INTRO_STATE_3: + break; + case INTRO_STATE_1: + phi_f12 = gGameStatusPtr->unk_AF; + phi_f12 /= gGameStatusPtr->unk_B0; + phi_f12 = SQ(phi_f12); + title_screen_draw_images(phi_f12, phi_f12); + break; + case INTRO_STATE_2: + title_screen_draw_images(0.0f, 0.0f); + break; + case INTRO_STATE_4: + title_screen_draw_images(0.0f, 0.0f); + break; + case INTRO_STATE_5: + temp = gGameStatusPtr->unk_AF - 1; + phi_f12 = gGameStatusPtr->unk_B0 - temp; + phi_f12 /= gGameStatusPtr->unk_B0; + phi_f12 = SQ(phi_f12); + title_screen_draw_images(phi_f12, phi_f12); + break; + } + + gDPPipeSync(gMasterGfxPos++); + gDPSetColorImage(gMasterGfxPos++, G_IM_FMT_RGBA, G_IM_SIZ_16b, SCREEN_WIDTH, osVirtualToPhysical(nuGfxCfb_ptr)); + gDPSetScissor(gMasterGfxPos++, G_SC_NON_INTERLACE, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT); + gDPSetCycleType(gMasterGfxPos++, G_CYC_1CYCLE); + gDPPipeSync(gMasterGfxPos++); + gSPClearGeometryMode(gMasterGfxPos++, G_ZBUFFER | G_SHADE | G_CULL_BOTH | G_FOG | G_LIGHTING | + G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR | G_LOD | G_SHADING_SMOOTH); + gSPSetGeometryMode(gMasterGfxPos++, G_ZBUFFER | G_SHADE | G_LIGHTING | G_SHADING_SMOOTH); + gSPSetLights1(gMasterGfxPos++, D_80077A38); + + gSPTexture(gMasterGfxPos++, -1, -1, 0, G_TX_RENDERTILE, G_ON); + gDPSetTextureLOD(gMasterGfxPos++, G_TL_TILE); + gDPSetTexturePersp(gMasterGfxPos++, G_TP_PERSP); + gDPSetTextureFilter(gMasterGfxPos++, G_TF_BILERP); + gDPSetColorDither(gMasterGfxPos++, G_CD_DISABLE); + gDPSetTextureDetail(gMasterGfxPos++, G_TD_CLAMP); + gDPSetTextureConvert(gMasterGfxPos++, G_TC_FILT); + gDPSetCombineKey(gMasterGfxPos++, G_CK_NONE); + gDPSetAlphaCompare(gMasterGfxPos++, G_AC_NONE); + render_frame(0); + render_frame(1); +} void draw_title_screen_NOP(void) { } void title_screen_draw_images(f32 arg0, f32 arg1) { - title_screen_draw_logo(); + title_screen_draw_logo(arg0); title_screen_draw_copyright(arg1); } -INCLUDE_ASM(void, "state_title_screen", title_screen_draw_logo); +void title_screen_draw_logo(f32 arg0) { + s32 yOffset; + s32 i; + + gSPDisplayList(gMasterGfxPos++, D_80077A50); + gDPPipeSync(gMasterGfxPos++); + yOffset = -100 * arg0; + + for (i = 0; i < TITLE_NUM_TILES; i++) { + // Load a tile from the logo texture + gDPLoadTextureTile(gMasterGfxPos++, &D_800A0978[i * TITLE_TILE_PIXELS], G_IM_FMT_RGBA, G_IM_SIZ_32b, + TITLE_WIDTH, TITLE_TILE_HEIGHT, // width, height + 0, 0, (TITLE_WIDTH - 1), (TITLE_TILE_HEIGHT - 1), // uls, ult, lrs, lrt + 0, // pal + G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, // cms, cmt + G_TX_NOMASK, G_TX_NOMASK, // masks, maskt + G_TX_NOLOD, G_TX_NOLOD); // shifts, shiftt + // Draw a scissored texture rectangle with the loaded tile + gSPScisTextureRectangle(gMasterGfxPos++, + (TITLE_POS_LEFT) << 2, // ulx + (TITLE_POS_TOP + TITLE_TILE_HEIGHT * i + yOffset) << 2, // uly + (TITLE_POS_LEFT + TITLE_WIDTH) << 2, // lrx + (TITLE_POS_TOP + TITLE_TILE_HEIGHT + TITLE_TILE_HEIGHT * i + yOffset) << 2, // lry + G_TX_RENDERTILE, 0, 0, 1 << 10, 1 << 10); + } + + gDPPipeSync(gMasterGfxPos++); +} void title_screen_draw_press_start(void) { switch (D_80077A2C) { @@ -115,11 +439,11 @@ void title_screen_draw_press_start(void) { gSPDisplayList(gMasterGfxPos++, D_80077A50); gDPSetCombineMode(gMasterGfxPos++, G_CC_MODULATEIA_PRIM, G_CC_MODULATEIA_PRIM); - gDPSetPrimColor(gMasterGfxPos++, 0, 0, 0xF8, 0xF0, 0x98, D_80077A28); + gDPSetPrimColor(gMasterGfxPos++, 0, 0, 248, 240, 152, D_80077A28); gDPPipeSync(gMasterGfxPos++); gDPLoadTextureBlock(gMasterGfxPos++, D_800A0980, G_IM_FMT_IA, G_IM_SIZ_8b, 128, 32, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD); - gSPTextureRectangle(gMasterGfxPos++, 0x0180, 0x0224, 0x0380, 0x02A4, G_TX_RENDERTILE, 0, 0, 0x0400, 0x0400); + gSPTextureRectangle(gMasterGfxPos++, 384, 548, 896, 676, G_TX_RENDERTILE, 0, 0, 0x0400, 0x0400); gDPPipeSync(gMasterGfxPos++); } @@ -131,7 +455,7 @@ void title_screen_draw_copyright(f32 arg0) { gDPPipeSync(gMasterGfxPos++); alpha = 255.0f - (arg0 * 255.0f); - if (alpha < 0xFF) { + if (alpha < 255) { if (alpha < 0) { alpha = 0; } @@ -145,7 +469,7 @@ void title_screen_draw_copyright(f32 arg0) { gDPLoadTextureTile(gMasterGfxPos++, &D_800A097C[0x240 * i], G_IM_FMT_IA, G_IM_SIZ_8b, 144, 32, 0, 0, 143, 15, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD); - gSPTextureRectangle(gMasterGfxPos++, 0x0164, 0x2FC + (0x40 * i), 0x03A4, 0x33C + (0x40 * i), G_TX_RENDERTILE, + gSPTextureRectangle(gMasterGfxPos++, 356, 764 + (0x40 * i), 932, 828 + (0x40 * i), G_TX_RENDERTILE, 0, 0, 0x0400, 0x0400); } gDPPipeSync(gMasterGfxPos++); diff --git a/src/world/action/16.c b/src/world/action/16.c index 8a87334fef..2da7dfad59 100644 --- a/src/world/action/16.c +++ b/src/world/action/16.c @@ -20,7 +20,7 @@ void func_802B6000_E287F0(void) { playerStatus->gravityIntegrator[2] = 0.8059f; playerStatus->gravityIntegrator[3] = -0.0987f; - gCameras[0].moveFlags |= 1; + gCameras[CAM_DEFAULT].moveFlags |= 1; D_802B6240 = atan2(playerStatus->position.x, playerStatus->position.z, playerStatus->lastGoodPosition.x, playerStatus->lastGoodPosition.z); diff --git a/src/world/action/hit_fire.c b/src/world/action/hit_fire.c index 2779b28261..8c9bc75800 100644 --- a/src/world/action/hit_fire.c +++ b/src/world/action/hit_fire.c @@ -23,7 +23,7 @@ void func_802B6000_E27C90(void) { playerStatus->currentSpeed = get_xz_dist_to_player(playerStatus->lastGoodPosition.x, playerStatus->lastGoodPosition.z) / 18.0f; subtract_hp(1); open_status_menu_long(); - gOverrideFlags |= 0x40; + gOverrideFlags |= GLOBAL_OVERRIDES_40; } sin_cos_rad(D_802B62B0 * TAU / 360.0f, &sinTheta, &cosTheta); @@ -53,7 +53,7 @@ void func_802B6000_E27C90(void) { playerStatus->unk_10 = 60; playerStatus->unk_BF = 0; playerStatus->flags &= ~0x800; - gOverrideFlags &= ~0x40; + gOverrideFlags &= ~GLOBAL_OVERRIDES_40; } } } diff --git a/src/world/action/hit_lava.c b/src/world/action/hit_lava.c index 3f3707b1d7..4d12dc74d3 100644 --- a/src/world/action/hit_lava.c +++ b/src/world/action/hit_lava.c @@ -33,11 +33,11 @@ void func_802B6000_E27F40(void) { playerStatus->currentSpeed = 0.0f; D_802B68B0 = 0.0f; - gCameras[0].moveFlags |= 3; + gCameras[CAM_DEFAULT].moveFlags |= 3; D_802B68B4 = 90.0f; subtract_hp(1); open_status_menu_long(); - gOverrideFlags |= 0x40; + gOverrideFlags |= GLOBAL_OVERRIDES_40; sfx_play_sound_at_player(0xE8, 0); } @@ -164,7 +164,7 @@ void func_802B6000_E27F40(void) { exec_ShakeCamX(0, 2, 1, 0.8f); start_rumble(0x100, 0x32); phys_adjust_cam_on_landing(); - gCameras[0].moveFlags &= ~2; + gCameras[CAM_DEFAULT].moveFlags &= ~2; sfx_play_sound_at_player(0x3FB, 0); suggest_player_anim_setUnkFlag(0x8001A); playerStatus->flags &= ~0x800; @@ -188,7 +188,7 @@ void func_802B6000_E27F40(void) { if (--playerStatus->framesOnGround << 16 <= 0) { set_action_state(ACTION_STATE_LAND); playerStatus->flags &= ~0x800000; - gOverrideFlags &= ~0x40; + gOverrideFlags &= ~GLOBAL_OVERRIDES_40; } break; } diff --git a/src/world/action/jump.c b/src/world/action/jump.c index 00ec468fdd..231164114d 100644 --- a/src/world/action/jump.c +++ b/src/world/action/jump.c @@ -46,7 +46,7 @@ void func_802B60B4_E240F4(void) { if (playerStatus->actionState == ACTION_STATE_LAUNCH) { phys_adjust_cam_on_landing(); } else { - gCameras[0].moveFlags |= 1; + gCameras[CAM_DEFAULT].moveFlags |= 1; } if (playerStatus->actionState == ACTION_STATE_JUMP) { @@ -108,7 +108,7 @@ void func_802B6198_E241D8(void) { temp_s1 = phi_a0; suggest_player_anim_clearUnkFlag(temp_s1); - gCameras[0].moveFlags |= 1; + gCameras[CAM_DEFAULT].moveFlags |= 1; } playerStatus->fallState++; @@ -136,7 +136,7 @@ void func_802B6294_E242D4(void) { phi_a0 = 0x6000A; } suggest_player_anim_clearUnkFlag(phi_a0); - gCameras[0].moveFlags |= 1; + gCameras[CAM_DEFAULT].moveFlags |= 1; } playerStatus->decorationList++; } @@ -160,7 +160,7 @@ void func_802B6348_E24388(void) { if (playerStatus->flags < 0) { playerStatus->flags &= 0x7FFFFFF5; playerStatus->flags |= 4; - gCameras[0].moveFlags |= 1; + gCameras[CAM_DEFAULT].moveFlags |= 1; } playerStatus->decorationList++; @@ -195,7 +195,7 @@ void func_802B647C_E244BC(void) { } suggest_player_anim_clearUnkFlag(temp_v1); - gCameras[0].moveFlags |= 1; + gCameras[CAM_DEFAULT].moveFlags |= 1; } playerStatus->decorationList++; } @@ -207,7 +207,7 @@ void func_802B6508_E24548(void) { playerStatus->flags &= ~0x80000000; playerStatus->flags &= ~0xA; playerStatus->flags |= 4; - gCameras[0].moveFlags |= 1; + gCameras[CAM_DEFAULT].moveFlags |= 1; if (playerStatus->animFlags & PLAYER_STATUS_ANIM_FLAGS_USING_PEACH_PHYSICS) { suggest_player_anim_clearUnkFlag(0xA0006); diff --git a/src/world/action/slide.c b/src/world/action/slide.c index e251d8d28f..cc848c159d 100644 --- a/src/world/action/slide.c +++ b/src/world/action/slide.c @@ -53,7 +53,7 @@ void func_802B6060_E27570(void) { D_802B679C = 0; suggest_player_anim_clearUnkFlag(0x1000A); sfx_play_sound_at_player(SOUND_167, 0); - gCameras[0].moveFlags |= 1; + gCameras[CAM_DEFAULT].moveFlags |= 1; } tempCurrentSpeed = playerStatus->currentSpeed; sp28 = playerStatus->position.x; diff --git a/src/world/action/super_boots.c b/src/world/action/super_boots.c index f6681429b1..9df3a27359 100644 --- a/src/world/action/super_boots.c +++ b/src/world/action/super_boots.c @@ -26,7 +26,7 @@ void func_802B6000_E26DE0(void) { suggest_player_anim_clearUnkFlag(0x1000A); disable_player_input(); playerStatus->flags |= 0x200; - gCameras[0].moveFlags |= 1; + gCameras[CAM_DEFAULT].moveFlags |= 1; sfx_play_sound_at_player(0x146, 0); } diff --git a/src/world/action/ultra_boots.c b/src/world/action/ultra_boots.c index 93a1e57eec..ece23bae45 100644 --- a/src/world/action/ultra_boots.c +++ b/src/world/action/ultra_boots.c @@ -32,7 +32,7 @@ void func_802B6000_E26710(void) { suggest_player_anim_setUnkFlag(0x80000); disable_player_input(); playerStatus->flags |= 0x200; - gCameras[0].moveFlags |= 1; + gCameras[CAM_DEFAULT].moveFlags |= 1; temp_f0 = clamp_angle(playerStatus->targetYaw - gCameras[gCurrentCameraID].currentYaw); phi_f4 = -60.0f; if (temp_f0 <= 180.0f) { diff --git a/src/world/action/use_munchlesia.c b/src/world/action/use_munchlesia.c index f6e2650d45..c58300a540 100644 --- a/src/world/action/use_munchlesia.c +++ b/src/world/action/use_munchlesia.c @@ -14,7 +14,7 @@ void func_802B6000_E291A0(void) { if (playerStatus->flags & (1 << 31)) { playerStatus->flags &= ~0x80000000; playerStatus->fallState = 0; - gOverrideFlags |= 0x40; + gOverrideFlags |= GLOBAL_OVERRIDES_40; disable_player_static_collisions(); disable_player_input(); } @@ -34,9 +34,9 @@ void func_802B6000_E291A0(void) { playerStatus->position.y += D_802B62D0; D_802B62D0 -= D_802B62D8; add_vec2D_polar(&playerStatus->position, &playerStatus->position.z, D_802B62D4, D_802B62DC); - gCameras[0].targetPos.x = playerStatus->position.x; - gCameras[0].targetPos.y = playerStatus->position.y; - gCameras[0].targetPos.z = playerStatus->position.z; + gCameras[CAM_DEFAULT].targetPos.x = playerStatus->position.x; + gCameras[CAM_DEFAULT].targetPos.y = playerStatus->position.y; + gCameras[CAM_DEFAULT].targetPos.z = playerStatus->position.z; if (D_802B62D0 <= 0.0f) { playerStatus->fallState++; } @@ -45,9 +45,9 @@ void func_802B6000_E291A0(void) { playerStatus->position.y += D_802B62D0; D_802B62D0 -= D_802B62D8; add_vec2D_polar(&playerStatus->position, &playerStatus->position.z, D_802B62D4, D_802B62DC); - gCameras[0].targetPos.x = playerStatus->position.x; - gCameras[0].targetPos.y = playerStatus->position.y; - gCameras[0].targetPos.z = playerStatus->position.z; + gCameras[CAM_DEFAULT].targetPos.x = playerStatus->position.x; + gCameras[CAM_DEFAULT].targetPos.y = playerStatus->position.y; + gCameras[CAM_DEFAULT].targetPos.z = playerStatus->position.z; tempCollision = player_check_collision_below(D_802B62D0, &sp10); if (sp10 >= 0) { sfx_play_sound_at_player(SOUND_162, 0); @@ -73,7 +73,7 @@ void func_802B6000_E291A0(void) { enable_player_static_collisions(); enable_player_input(); set_action_state(ACTION_STATE_IDLE); - gOverrideFlags &= ~0x40; + gOverrideFlags &= ~GLOBAL_OVERRIDES_40; break; } } diff --git a/src/world/action/use_spinning_flower.c b/src/world/action/use_spinning_flower.c index d76d1e6b0b..6c8ada3c03 100644 --- a/src/world/action/use_spinning_flower.c +++ b/src/world/action/use_spinning_flower.c @@ -46,7 +46,7 @@ void func_802B60A4_E29514(void) { if (playerStatus->flags & (1 << 31)) { playerStatus->flags &= ~0x80000000; - gOverrideFlags |= 0x40; + gOverrideFlags |= GLOBAL_OVERRIDES_40; func_800EF300(); playerStatus->fallState = 1; playerStatus->framesOnGround = 0; @@ -75,7 +75,7 @@ void func_802B60A4_E29514(void) { } switch(playerStatus->fallState) { case 1: - gOverrideFlags |= 0x40; + gOverrideFlags |= GLOBAL_OVERRIDES_40; if (++D_802B6EE4 >= 20.0f) { D_802B6EE4 = 20.0f; } @@ -132,7 +132,7 @@ void func_802B60A4_E29514(void) { } break; case 2: - gOverrideFlags |= 0x40; + gOverrideFlags |= GLOBAL_OVERRIDES_40; if (--D_802B6EE4 < 0.0f) { D_802B6EE4 = 0.0f; playerStatus->flags &= ~0x100000; @@ -156,7 +156,7 @@ void func_802B60A4_E29514(void) { enable_player_static_collisions(); set_action_state(ACTION_STATE_LAND); enable_partner_ai(); - gOverrideFlags &= ~0x40; + gOverrideFlags &= ~GLOBAL_OVERRIDES_40; return; } } @@ -273,7 +273,7 @@ void func_802B60A4_E29514(void) { playerStatus->flags |= 0x800000; start_falling(); enable_partner_ai(); - gOverrideFlags &= ~0x40; + gOverrideFlags &= ~GLOBAL_OVERRIDES_40; break; } } diff --git a/src/world/area_end/end_01/E05370.c b/src/world/area_end/end_01/E05370.c index 76898423e4..8e6d27fe4b 100644 --- a/src/world/area_end/end_01/E05370.c +++ b/src/world/area_end/end_01/E05370.c @@ -1,6 +1,6 @@ #include "end_01.h" ApiStatus func_80240010_E05370(void) { - gCameras[0].vfov = 35.0f; + gCameras[CAM_DEFAULT].vfov = 35.0f; return ApiStatus_DONE2; } diff --git a/src/world/area_gv/gv_01/E1E460.c b/src/world/area_gv/gv_01/E1E460.c index 22d6f3cdaa..3a2ace6cd0 100644 --- a/src/world/area_gv/gv_01/E1E460.c +++ b/src/world/area_gv/gv_01/E1E460.c @@ -40,7 +40,7 @@ ApiStatus func_80240688_E1EAE8(Evt* script, s32 isInitialCall) { gGameStatusPtr->unk_76 = 0; gGameStatusPtr->disableScripts = 0; gGameStatusPtr->keepUsingPartnerOnMapChange = 0; - gOverrideFlags &= ~0x8; + gOverrideFlags &= ~GLOBAL_OVERRIDES_8; general_heap_create(); clear_render_tasks(); clear_generic_entity_list(); @@ -68,6 +68,6 @@ ApiStatus func_80240688_E1EAE8(Evt* script, s32 isInitialCall) { initialize_collision(); intro_logos_set_fade_alpha(255); intro_logos_set_fade_color(208); - set_game_mode(2); + set_game_mode(GAME_MODE_TITLE_SCREEN); return ApiStatus_FINISH; } diff --git a/src/world/area_pra/pra_01/D4D060.c b/src/world/area_pra/pra_01/D4D060.c index 5b7c77eb51..e11b112527 100644 --- a/src/world/area_pra/pra_01/D4D060.c +++ b/src/world/area_pra/pra_01/D4D060.c @@ -5,7 +5,7 @@ #include "common/UnkFogFunc.inc.c" ApiStatus func_80240F60_D4DFA0(Evt* script, s32 isInitialCall) { - gOverrideFlags &= ~0x80; + gOverrideFlags &= ~GLOBAL_OVERRIDES_80; return ApiStatus_DONE2; } diff --git a/src/world/common/SetCamera0Flag1000.inc.c b/src/world/common/SetCamera0Flag1000.inc.c index 9aca7d6aca..3cc46a4f42 100644 --- a/src/world/common/SetCamera0Flag1000.inc.c +++ b/src/world/common/SetCamera0Flag1000.inc.c @@ -3,7 +3,7 @@ #include "camera.h" ApiStatus N(SetCamera0Flag1000)(Evt* script, s32 isInitialCall) { - Camera* camera = &gCameras[0]; + Camera* camera = &gCameras[CAM_DEFAULT]; camera->flags |= 0x1000; return ApiStatus_DONE2; diff --git a/src/world/common/SetCamera0MoveFlag1.inc.c b/src/world/common/SetCamera0MoveFlag1.inc.c index f7b0c1bbf2..1b183774cb 100644 --- a/src/world/common/SetCamera0MoveFlag1.inc.c +++ b/src/world/common/SetCamera0MoveFlag1.inc.c @@ -2,7 +2,7 @@ #include "npc.h" ApiStatus N(SetCamera0MoveFlag1)(Evt* script, s32 isInitialCall) { - Camera* camera = &gCameras[0]; + Camera* camera = &gCameras[CAM_DEFAULT]; camera->moveFlags |= 1; return ApiStatus_DONE2; diff --git a/src/world/common/SetOverrideFlags_40.inc.c b/src/world/common/SetOverrideFlags_40.inc.c index 88e00b5bf1..d66f2dcb4e 100644 --- a/src/world/common/SetOverrideFlags_40.inc.c +++ b/src/world/common/SetOverrideFlags_40.inc.c @@ -2,6 +2,6 @@ #include "npc.h" ApiStatus N(SetOverrideFlags_40)(Evt* script, s32 isInitialCall) { - gOverrideFlags |= 0x40; + gOverrideFlags |= GLOBAL_OVERRIDES_40; return ApiStatus_DONE2; } diff --git a/src/world/common/UnkFunc17.inc.c b/src/world/common/UnkFunc17.inc.c index 09d533db15..4ee30e5fd1 100644 --- a/src/world/common/UnkFunc17.inc.c +++ b/src/world/common/UnkFunc17.inc.c @@ -2,6 +2,6 @@ #include "npc.h" ApiStatus N(UnkFunc17)(Evt* script, s32 isInitialCall) { - gOverrideFlags &= ~0x40; + gOverrideFlags &= ~GLOBAL_OVERRIDES_40; return ApiStatus_DONE2; } diff --git a/src/world/common/UnsetCamera0Flag1000.inc.c b/src/world/common/UnsetCamera0Flag1000.inc.c index 91a3aa9944..32e794db8e 100644 --- a/src/world/common/UnsetCamera0Flag1000.inc.c +++ b/src/world/common/UnsetCamera0Flag1000.inc.c @@ -3,7 +3,7 @@ #include "camera.h" ApiStatus N(UnsetCamera0Flag1000)(Evt* script, s32 isInitialCall) { - Camera* camera = &gCameras[0]; + Camera* camera = &gCameras[CAM_DEFAULT]; camera->flags &= ~CAM_FLAG_1000; return ApiStatus_DONE2; diff --git a/src/world/common/UnsetCamera0MoveFlag1.inc.c b/src/world/common/UnsetCamera0MoveFlag1.inc.c index 54206cd766..a2bfffadf0 100644 --- a/src/world/common/UnsetCamera0MoveFlag1.inc.c +++ b/src/world/common/UnsetCamera0MoveFlag1.inc.c @@ -2,7 +2,7 @@ #include "npc.h" ApiStatus N(UnsetCamera0MoveFlag1)(Evt* script, s32 isInitialCall) { - Camera* camera = &gCameras[0]; + Camera* camera = &gCameras[CAM_DEFAULT]; camera->moveFlags &= ~1; return ApiStatus_DONE2; diff --git a/src/world/common/reflection.inc.c b/src/world/common/reflection.inc.c index 9ca401eb8e..f03a0a6c27 100644 --- a/src/world/common/reflection.inc.c +++ b/src/world/common/reflection.inc.c @@ -144,7 +144,7 @@ ApiStatus N(ReflectFloor)(Evt* script, s32 isInitialCall) { case REFLECTION_FLOOR_WALL: case REFLECTION_FLOOR: script->array[0] = create_generic_entity_world(NULL, N(reflection_setup_floor)); - gOverrideFlags |= 0x80; + gOverrideFlags |= GLOBAL_OVERRIDES_80; break; case REFLECTION_WALL: break; diff --git a/src/world/partner/lakilester.c b/src/world/partner/lakilester.c index 7aaf872a84..614b72d868 100644 --- a/src/world/partner/lakilester.c +++ b/src/world/partner/lakilester.c @@ -558,7 +558,7 @@ EvtScript world_lakilester_use_ability = { ApiStatus func_802BF4F0_323040(Evt* script, s32 isInitialCall) { PlayerStatus* playerStatus = &gPlayerStatus; PartnerActionStatus* partnerActionStatus = &gPartnerActionStatus; - Camera* cam = &gCameras[0]; + Camera* cam = &gCameras[CAM_DEFAULT]; Npc* lakilester = script->owner2.npc; f32 sp20, sp24, sp28, sp2C; f32 yaw; diff --git a/src/world/partner/sushie.c b/src/world/partner/sushie.c index 2925a0277b..8147ed784b 100644 --- a/src/world/partner/sushie.c +++ b/src/world/partner/sushie.c @@ -31,7 +31,7 @@ f32 D_802BFDBC_320B2C = 0.0f; void func_802BD100_31DE70(void) { Npc* partnerNPC = get_npc_unsafe(NPC_PARTNER); PlayerStatus* playerStatus = &gPlayerStatus; - Camera* cam = &gCameras[0]; + Camera* cam = &gCameras[CAM_DEFAULT]; s32 phi_v1; playerStatus->position.x = partnerNPC->pos.x; diff --git a/src/world/script_api/7E2AA0.c b/src/world/script_api/7E2AA0.c index 3019cf0b11..e3f7806c00 100644 --- a/src/world/script_api/7E2AA0.c +++ b/src/world/script_api/7E2AA0.c @@ -70,7 +70,7 @@ ApiStatus func_80282594(Evt* script, s32 isInitialCall) { f32 temp_f0; temp_f0 = evt_get_float_variable(script, *script->ptrReadPos); - camera = &gCameras[0]; + camera = &gCameras[CAM_DEFAULT]; if (temp_f0 >= 0.0f) { D_80286540 = camera->moveSpeed; diff --git a/src/world/world.c b/src/world/world.c index 5448c2dcf5..ca4907a8c3 100644 --- a/src/world/world.c +++ b/src/world/world.c @@ -48,8 +48,8 @@ void load_map_by_IDs(s16 areaID, s16 mapID, s16 loadType) { s32 decompressedSize; sfx_stop_env_sounds(); - gOverrideFlags &= ~0x40; - gOverrideFlags &= ~0x80; + gOverrideFlags &= ~GLOBAL_OVERRIDES_40; + gOverrideFlags &= ~GLOBAL_OVERRIDES_80; gGameStatusPtr->playerSpriteSet = 0; func_8002D160(); @@ -170,11 +170,11 @@ void load_map_by_IDs(s16 areaID, s16 mapID, s16 loadType) { set_background_size(296, 200, 12, 20); } - gCurrentCameraID = 0; - gCameras[0].flags |= CAM_FLAG_ENABLED; - gCameras[1].flags |= CAM_FLAG_ENABLED; - gCameras[2].flags |= CAM_FLAG_ENABLED; - gCameras[3].flags |= CAM_FLAG_ENABLED; + gCurrentCameraID = CAM_DEFAULT; + gCameras[CAM_DEFAULT].flags |= CAM_FLAG_ENABLED; + gCameras[CAM_BATTLE].flags |= CAM_FLAG_ENABLED; + gCameras[CAM_TATTLE].flags |= CAM_FLAG_ENABLED; + gCameras[CAM_CAM3].flags |= CAM_FLAG_ENABLED; if (gGameStatusPtr->creditsViewportMode == -1) { set_cam_viewport(0, 12, 20, 296, 200); diff --git a/ver/us/asm/nonmatchings/evt/cam_api/LoadSettings.s b/ver/us/asm/nonmatchings/evt/cam_api/LoadSettings.s deleted file mode 100644 index 978923b7ab..0000000000 --- a/ver/us/asm/nonmatchings/evt/cam_api/LoadSettings.s +++ /dev/null @@ -1,52 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel LoadSettings -/* F03A8 802CB9F8 27BDFFE0 */ addiu $sp, $sp, -0x20 -/* F03AC 802CB9FC AFB10014 */ sw $s1, 0x14($sp) -/* F03B0 802CBA00 0080882D */ daddu $s1, $a0, $zero -/* F03B4 802CBA04 AFBF0018 */ sw $ra, 0x18($sp) -/* F03B8 802CBA08 AFB00010 */ sw $s0, 0x10($sp) -/* F03BC 802CBA0C 8E30000C */ lw $s0, 0xc($s1) -/* F03C0 802CBA10 8E050000 */ lw $a1, ($s0) -/* F03C4 802CBA14 0C0B1EAF */ jal evt_get_variable -/* F03C8 802CBA18 26100004 */ addiu $s0, $s0, 4 -/* F03CC 802CBA1C 0220202D */ daddu $a0, $s1, $zero -/* F03D0 802CBA20 3C03800B */ lui $v1, %hi(gCameras) -/* F03D4 802CBA24 24631D80 */ addiu $v1, $v1, %lo(gCameras) -/* F03D8 802CBA28 8E050000 */ lw $a1, ($s0) -/* F03DC 802CBA2C 00028080 */ sll $s0, $v0, 2 -/* F03E0 802CBA30 02028021 */ addu $s0, $s0, $v0 -/* F03E4 802CBA34 00108080 */ sll $s0, $s0, 2 -/* F03E8 802CBA38 02028023 */ subu $s0, $s0, $v0 -/* F03EC 802CBA3C 001010C0 */ sll $v0, $s0, 3 -/* F03F0 802CBA40 02028021 */ addu $s0, $s0, $v0 -/* F03F4 802CBA44 001080C0 */ sll $s0, $s0, 3 -/* F03F8 802CBA48 0C0B1EAF */ jal evt_get_variable -/* F03FC 802CBA4C 02038021 */ addu $s0, $s0, $v1 -/* F0400 802CBA50 261004D8 */ addiu $s0, $s0, 0x4d8 -/* F0404 802CBA54 24430020 */ addiu $v1, $v0, 0x20 -.L802CBA58: -/* F0408 802CBA58 8C460000 */ lw $a2, ($v0) -/* F040C 802CBA5C 8C470004 */ lw $a3, 4($v0) -/* F0410 802CBA60 8C480008 */ lw $t0, 8($v0) -/* F0414 802CBA64 8C49000C */ lw $t1, 0xc($v0) -/* F0418 802CBA68 AE060000 */ sw $a2, ($s0) -/* F041C 802CBA6C AE070004 */ sw $a3, 4($s0) -/* F0420 802CBA70 AE080008 */ sw $t0, 8($s0) -/* F0424 802CBA74 AE09000C */ sw $t1, 0xc($s0) -/* F0428 802CBA78 24420010 */ addiu $v0, $v0, 0x10 -/* F042C 802CBA7C 1443FFF6 */ bne $v0, $v1, .L802CBA58 -/* F0430 802CBA80 26100010 */ addiu $s0, $s0, 0x10 -/* F0434 802CBA84 8C460000 */ lw $a2, ($v0) -/* F0438 802CBA88 8C470004 */ lw $a3, 4($v0) -/* F043C 802CBA8C 8C480008 */ lw $t0, 8($v0) -/* F0440 802CBA90 AE060000 */ sw $a2, ($s0) -/* F0444 802CBA94 AE070004 */ sw $a3, 4($s0) -/* F0448 802CBA98 AE080008 */ sw $t0, 8($s0) -/* F044C 802CBA9C 8FBF0018 */ lw $ra, 0x18($sp) -/* F0450 802CBAA0 8FB10014 */ lw $s1, 0x14($sp) -/* F0454 802CBAA4 8FB00010 */ lw $s0, 0x10($sp) -/* F0458 802CBAA8 24020002 */ addiu $v0, $zero, 2 -/* F045C 802CBAAC 03E00008 */ jr $ra -/* F0460 802CBAB0 27BD0020 */ addiu $sp, $sp, 0x20 diff --git a/ver/us/asm/nonmatchings/evt/cam_api/ResetCam.s b/ver/us/asm/nonmatchings/evt/cam_api/ResetCam.s deleted file mode 100644 index 5c09e61a36..0000000000 --- a/ver/us/asm/nonmatchings/evt/cam_api/ResetCam.s +++ /dev/null @@ -1,135 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel ResetCam -/* F1278 802CC8C8 27BDFF78 */ addiu $sp, $sp, -0x88 -/* F127C 802CC8CC AFB1005C */ sw $s1, 0x5c($sp) -/* F1280 802CC8D0 0080882D */ daddu $s1, $a0, $zero -/* F1284 802CC8D4 AFB20060 */ sw $s2, 0x60($sp) -/* F1288 802CC8D8 00A0902D */ daddu $s2, $a1, $zero -/* F128C 802CC8DC AFBF0064 */ sw $ra, 0x64($sp) -/* F1290 802CC8E0 AFB00058 */ sw $s0, 0x58($sp) -/* F1294 802CC8E4 F7BA0080 */ sdc1 $f26, 0x80($sp) -/* F1298 802CC8E8 F7B80078 */ sdc1 $f24, 0x78($sp) -/* F129C 802CC8EC F7B60070 */ sdc1 $f22, 0x70($sp) -/* F12A0 802CC8F0 F7B40068 */ sdc1 $f20, 0x68($sp) -/* F12A4 802CC8F4 8E30000C */ lw $s0, 0xc($s1) -/* F12A8 802CC8F8 8E050000 */ lw $a1, ($s0) -/* F12AC 802CC8FC 0C0B1EAF */ jal evt_get_variable -/* F12B0 802CC900 26100004 */ addiu $s0, $s0, 4 -/* F12B4 802CC904 0220202D */ daddu $a0, $s1, $zero -/* F12B8 802CC908 3C06800B */ lui $a2, %hi(gCameras) -/* F12BC 802CC90C 24C61D80 */ addiu $a2, $a2, %lo(gCameras) -/* F12C0 802CC910 00021880 */ sll $v1, $v0, 2 -/* F12C4 802CC914 00621821 */ addu $v1, $v1, $v0 -/* F12C8 802CC918 00031880 */ sll $v1, $v1, 2 -/* F12CC 802CC91C 00621823 */ subu $v1, $v1, $v0 -/* F12D0 802CC920 000310C0 */ sll $v0, $v1, 3 -/* F12D4 802CC924 00621821 */ addu $v1, $v1, $v0 -/* F12D8 802CC928 000318C0 */ sll $v1, $v1, 3 -/* F12DC 802CC92C 8E050000 */ lw $a1, ($s0) -/* F12E0 802CC930 0C0B210B */ jal evt_get_float_variable -/* F12E4 802CC934 00668021 */ addu $s0, $v1, $a2 -/* F12E8 802CC938 3C038011 */ lui $v1, %hi(gPlayerStatus) -/* F12EC 802CC93C 2463EFC8 */ addiu $v1, $v1, %lo(gPlayerStatus) -/* F12F0 802CC940 12400047 */ beqz $s2, .L802CCA60 -/* F12F4 802CC944 46000686 */ mov.s $f26, $f0 -/* F12F8 802CC948 3C0146FF */ lui $at, 0x46ff -/* F12FC 802CC94C 3421FE00 */ ori $at, $at, 0xfe00 -/* F1300 802CC950 44811000 */ mtc1 $at, $f2 -/* F1304 802CC954 44802000 */ mtc1 $zero, $f4 -/* F1308 802CC958 3C01BF80 */ lui $at, 0xbf80 -/* F130C 802CC95C 44810000 */ mtc1 $at, $f0 -/* F1310 802CC960 3C014120 */ lui $at, 0x4120 -/* F1314 802CC964 44817000 */ mtc1 $at, $f14 -/* F1318 802CC968 27A20038 */ addiu $v0, $sp, 0x38 -/* F131C 802CC96C E7A20044 */ swc1 $f2, 0x44($sp) -/* F1320 802CC970 AFA20018 */ sw $v0, 0x18($sp) -/* F1324 802CC974 27A2003C */ addiu $v0, $sp, 0x3c -/* F1328 802CC978 AFA2001C */ sw $v0, 0x1c($sp) -/* F132C 802CC97C 27A20040 */ addiu $v0, $sp, 0x40 -/* F1330 802CC980 AFA20020 */ sw $v0, 0x20($sp) -/* F1334 802CC984 27A20044 */ addiu $v0, $sp, 0x44 -/* F1338 802CC988 AFA20024 */ sw $v0, 0x24($sp) -/* F133C 802CC98C 27A20048 */ addiu $v0, $sp, 0x48 -/* F1340 802CC990 AFA20028 */ sw $v0, 0x28($sp) -/* F1344 802CC994 27A2004C */ addiu $v0, $sp, 0x4c -/* F1348 802CC998 E7A00010 */ swc1 $f0, 0x10($sp) -/* F134C 802CC99C E7A40014 */ swc1 $f4, 0x14($sp) -/* F1350 802CC9A0 AFA2002C */ sw $v0, 0x2c($sp) -/* F1354 802CC9A4 C478002C */ lwc1 $f24, 0x2c($v1) -/* F1358 802CC9A8 27A20050 */ addiu $v0, $sp, 0x50 -/* F135C 802CC9AC AFA20030 */ sw $v0, 0x30($sp) -/* F1360 802CC9B0 C4760030 */ lwc1 $f22, 0x30($v1) -/* F1364 802CC9B4 C4740028 */ lwc1 $f20, 0x28($v1) -/* F1368 802CC9B8 44072000 */ mfc1 $a3, $f4 -/* F136C 802CC9BC 460EC380 */ add.s $f14, $f24, $f14 -/* F1370 802CC9C0 4406B000 */ mfc1 $a2, $f22 -/* F1374 802CC9C4 0C017449 */ jal test_ray_zones -/* F1378 802CC9C8 4600A306 */ mov.s $f12, $f20 -/* F137C 802CC9CC 0040182D */ daddu $v1, $v0, $zero -/* F1380 802CC9D0 0460001A */ bltz $v1, .L802CCA3C -/* F1384 802CC9D4 000310C0 */ sll $v0, $v1, 3 -/* F1388 802CC9D8 00431023 */ subu $v0, $v0, $v1 -/* F138C 802CC9DC 3C03800E */ lui $v1, %hi(D_800D91D4) -/* F1390 802CC9E0 8C6391D4 */ lw $v1, %lo(D_800D91D4)($v1) -/* F1394 802CC9E4 00021080 */ sll $v0, $v0, 2 -/* F1398 802CC9E8 00431021 */ addu $v0, $v0, $v1 -/* F139C 802CC9EC 8C420010 */ lw $v0, 0x10($v0) -/* F13A0 802CC9F0 260304D8 */ addiu $v1, $s0, 0x4d8 -/* F13A4 802CC9F4 24440020 */ addiu $a0, $v0, 0x20 -.L802CC9F8: -/* F13A8 802CC9F8 8C480000 */ lw $t0, ($v0) -/* F13AC 802CC9FC 8C490004 */ lw $t1, 4($v0) -/* F13B0 802CCA00 8C4A0008 */ lw $t2, 8($v0) -/* F13B4 802CCA04 8C4B000C */ lw $t3, 0xc($v0) -/* F13B8 802CCA08 AC680000 */ sw $t0, ($v1) -/* F13BC 802CCA0C AC690004 */ sw $t1, 4($v1) -/* F13C0 802CCA10 AC6A0008 */ sw $t2, 8($v1) -/* F13C4 802CCA14 AC6B000C */ sw $t3, 0xc($v1) -/* F13C8 802CCA18 24420010 */ addiu $v0, $v0, 0x10 -/* F13CC 802CCA1C 1444FFF6 */ bne $v0, $a0, .L802CC9F8 -/* F13D0 802CCA20 24630010 */ addiu $v1, $v1, 0x10 -/* F13D4 802CCA24 8C480000 */ lw $t0, ($v0) -/* F13D8 802CCA28 8C490004 */ lw $t1, 4($v0) -/* F13DC 802CCA2C 8C4A0008 */ lw $t2, 8($v0) -/* F13E0 802CCA30 AC680000 */ sw $t0, ($v1) -/* F13E4 802CCA34 AC690004 */ sw $t1, 4($v1) -/* F13E8 802CCA38 AC6A0008 */ sw $t2, 8($v1) -.L802CCA3C: -/* F13EC 802CCA3C 0000102D */ daddu $v0, $zero, $zero -/* F13F0 802CCA40 24030001 */ addiu $v1, $zero, 1 -/* F13F4 802CCA44 E61404B0 */ swc1 $f20, 0x4b0($s0) -/* F13F8 802CCA48 E61804B4 */ swc1 $f24, 0x4b4($s0) -/* F13FC 802CCA4C E61604B8 */ swc1 $f22, 0x4b8($s0) -/* F1400 802CCA50 E61A0490 */ swc1 $f26, 0x490($s0) -/* F1404 802CCA54 A6030506 */ sh $v1, 0x506($s0) -/* F1408 802CCA58 080B32A5 */ j .L802CCA94 -/* F140C 802CCA5C A6030504 */ sh $v1, 0x504($s0) -.L802CCA60: -/* F1410 802CCA60 C6000484 */ lwc1 $f0, 0x484($s0) -/* F1414 802CCA64 3C013F80 */ lui $at, 0x3f80 -/* F1418 802CCA68 44811000 */ mtc1 $at, $f2 -/* F141C 802CCA6C 00000000 */ nop -/* F1420 802CCA70 4600103E */ c.le.s $f2, $f0 -/* F1424 802CCA74 00000000 */ nop -/* F1428 802CCA78 45000007 */ bc1f .L802CCA98 -/* F142C 802CCA7C 0000102D */ daddu $v0, $zero, $zero -/* F1430 802CCA80 24020002 */ addiu $v0, $zero, 2 -/* F1434 802CCA84 24030001 */ addiu $v1, $zero, 1 -/* F1438 802CCA88 A6030506 */ sh $v1, 0x506($s0) -/* F143C 802CCA8C A6000504 */ sh $zero, 0x504($s0) -/* F1440 802CCA90 E6020490 */ swc1 $f2, 0x490($s0) -.L802CCA94: -/* F1444 802CCA94 AE000508 */ sw $zero, 0x508($s0) -.L802CCA98: -/* F1448 802CCA98 8FBF0064 */ lw $ra, 0x64($sp) -/* F144C 802CCA9C 8FB20060 */ lw $s2, 0x60($sp) -/* F1450 802CCAA0 8FB1005C */ lw $s1, 0x5c($sp) -/* F1454 802CCAA4 8FB00058 */ lw $s0, 0x58($sp) -/* F1458 802CCAA8 D7BA0080 */ ldc1 $f26, 0x80($sp) -/* F145C 802CCAAC D7B80078 */ ldc1 $f24, 0x78($sp) -/* F1460 802CCAB0 D7B60070 */ ldc1 $f22, 0x70($sp) -/* F1464 802CCAB4 D7B40068 */ ldc1 $f20, 0x68($sp) -/* F1468 802CCAB8 03E00008 */ jr $ra -/* F146C 802CCABC 27BD0088 */ addiu $sp, $sp, 0x88 diff --git a/ver/us/asm/nonmatchings/evt/cam_api/UseSettingsFrom.s b/ver/us/asm/nonmatchings/evt/cam_api/UseSettingsFrom.s deleted file mode 100644 index f6eed3cdf2..0000000000 --- a/ver/us/asm/nonmatchings/evt/cam_api/UseSettingsFrom.s +++ /dev/null @@ -1,108 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel UseSettingsFrom -/* F0210 802CB860 27BDFF88 */ addiu $sp, $sp, -0x78 -/* F0214 802CB864 AFB1005C */ sw $s1, 0x5c($sp) -/* F0218 802CB868 0080882D */ daddu $s1, $a0, $zero -/* F021C 802CB86C AFBF0064 */ sw $ra, 0x64($sp) -/* F0220 802CB870 AFB20060 */ sw $s2, 0x60($sp) -/* F0224 802CB874 AFB00058 */ sw $s0, 0x58($sp) -/* F0228 802CB878 F7B60070 */ sdc1 $f22, 0x70($sp) -/* F022C 802CB87C F7B40068 */ sdc1 $f20, 0x68($sp) -/* F0230 802CB880 8E30000C */ lw $s0, 0xc($s1) -/* F0234 802CB884 8E050000 */ lw $a1, ($s0) -/* F0238 802CB888 0C0B1EAF */ jal evt_get_variable -/* F023C 802CB88C 26100004 */ addiu $s0, $s0, 4 -/* F0240 802CB890 8E050000 */ lw $a1, ($s0) -/* F0244 802CB894 26100004 */ addiu $s0, $s0, 4 -/* F0248 802CB898 0220202D */ daddu $a0, $s1, $zero -/* F024C 802CB89C 3C06800B */ lui $a2, %hi(gCameras) -/* F0250 802CB8A0 24C61D80 */ addiu $a2, $a2, %lo(gCameras) -/* F0254 802CB8A4 00021880 */ sll $v1, $v0, 2 -/* F0258 802CB8A8 00621821 */ addu $v1, $v1, $v0 -/* F025C 802CB8AC 00031880 */ sll $v1, $v1, 2 -/* F0260 802CB8B0 00621823 */ subu $v1, $v1, $v0 -/* F0264 802CB8B4 000310C0 */ sll $v0, $v1, 3 -/* F0268 802CB8B8 00621821 */ addu $v1, $v1, $v0 -/* F026C 802CB8BC 000318C0 */ sll $v1, $v1, 3 -/* F0270 802CB8C0 0C0B210B */ jal evt_get_float_variable -/* F0274 802CB8C4 00669021 */ addu $s2, $v1, $a2 -/* F0278 802CB8C8 8E050000 */ lw $a1, ($s0) -/* F027C 802CB8CC 26100004 */ addiu $s0, $s0, 4 -/* F0280 802CB8D0 0220202D */ daddu $a0, $s1, $zero -/* F0284 802CB8D4 0C0B210B */ jal evt_get_float_variable -/* F0288 802CB8D8 46000586 */ mov.s $f22, $f0 -/* F028C 802CB8DC 0220202D */ daddu $a0, $s1, $zero -/* F0290 802CB8E0 8E050000 */ lw $a1, ($s0) -/* F0294 802CB8E4 0C0B210B */ jal evt_get_float_variable -/* F0298 802CB8E8 46000506 */ mov.s $f20, $f0 -/* F029C 802CB8EC 27A20038 */ addiu $v0, $sp, 0x38 -/* F02A0 802CB8F0 3C0146FF */ lui $at, 0x46ff -/* F02A4 802CB8F4 3421FE00 */ ori $at, $at, 0xfe00 -/* F02A8 802CB8F8 44812000 */ mtc1 $at, $f4 -/* F02AC 802CB8FC 44803000 */ mtc1 $zero, $f6 -/* F02B0 802CB900 3C01BF80 */ lui $at, 0xbf80 -/* F02B4 802CB904 44811000 */ mtc1 $at, $f2 -/* F02B8 802CB908 3C014120 */ lui $at, 0x4120 -/* F02BC 802CB90C 44817000 */ mtc1 $at, $f14 -/* F02C0 802CB910 44060000 */ mfc1 $a2, $f0 -/* F02C4 802CB914 4600B306 */ mov.s $f12, $f22 -/* F02C8 802CB918 E7A40044 */ swc1 $f4, 0x44($sp) -/* F02CC 802CB91C AFA20018 */ sw $v0, 0x18($sp) -/* F02D0 802CB920 27A2003C */ addiu $v0, $sp, 0x3c -/* F02D4 802CB924 AFA2001C */ sw $v0, 0x1c($sp) -/* F02D8 802CB928 27A20040 */ addiu $v0, $sp, 0x40 -/* F02DC 802CB92C AFA20020 */ sw $v0, 0x20($sp) -/* F02E0 802CB930 27A20044 */ addiu $v0, $sp, 0x44 -/* F02E4 802CB934 AFA20024 */ sw $v0, 0x24($sp) -/* F02E8 802CB938 27A20048 */ addiu $v0, $sp, 0x48 -/* F02EC 802CB93C AFA20028 */ sw $v0, 0x28($sp) -/* F02F0 802CB940 27A2004C */ addiu $v0, $sp, 0x4c -/* F02F4 802CB944 AFA2002C */ sw $v0, 0x2c($sp) -/* F02F8 802CB948 27A20050 */ addiu $v0, $sp, 0x50 -/* F02FC 802CB94C 44073000 */ mfc1 $a3, $f6 -/* F0300 802CB950 460EA380 */ add.s $f14, $f20, $f14 -/* F0304 802CB954 E7A20010 */ swc1 $f2, 0x10($sp) -/* F0308 802CB958 E7A60014 */ swc1 $f6, 0x14($sp) -/* F030C 802CB95C 0C017449 */ jal test_ray_zones -/* F0310 802CB960 AFA20030 */ sw $v0, 0x30($sp) -/* F0314 802CB964 0040182D */ daddu $v1, $v0, $zero -/* F0318 802CB968 0460001A */ bltz $v1, .L802CB9D4 -/* F031C 802CB96C 000310C0 */ sll $v0, $v1, 3 -/* F0320 802CB970 00431023 */ subu $v0, $v0, $v1 -/* F0324 802CB974 3C03800E */ lui $v1, %hi(D_800D91D4) -/* F0328 802CB978 8C6391D4 */ lw $v1, %lo(D_800D91D4)($v1) -/* F032C 802CB97C 00021080 */ sll $v0, $v0, 2 -/* F0330 802CB980 00431021 */ addu $v0, $v0, $v1 -/* F0334 802CB984 8C420010 */ lw $v0, 0x10($v0) -/* F0338 802CB988 264304D8 */ addiu $v1, $s2, 0x4d8 -/* F033C 802CB98C 24440020 */ addiu $a0, $v0, 0x20 -.L802CB990: -/* F0340 802CB990 8C480000 */ lw $t0, ($v0) -/* F0344 802CB994 8C490004 */ lw $t1, 4($v0) -/* F0348 802CB998 8C4A0008 */ lw $t2, 8($v0) -/* F034C 802CB99C 8C4B000C */ lw $t3, 0xc($v0) -/* F0350 802CB9A0 AC680000 */ sw $t0, ($v1) -/* F0354 802CB9A4 AC690004 */ sw $t1, 4($v1) -/* F0358 802CB9A8 AC6A0008 */ sw $t2, 8($v1) -/* F035C 802CB9AC AC6B000C */ sw $t3, 0xc($v1) -/* F0360 802CB9B0 24420010 */ addiu $v0, $v0, 0x10 -/* F0364 802CB9B4 1444FFF6 */ bne $v0, $a0, .L802CB990 -/* F0368 802CB9B8 24630010 */ addiu $v1, $v1, 0x10 -/* F036C 802CB9BC 8C480000 */ lw $t0, ($v0) -/* F0370 802CB9C0 8C490004 */ lw $t1, 4($v0) -/* F0374 802CB9C4 8C4A0008 */ lw $t2, 8($v0) -/* F0378 802CB9C8 AC680000 */ sw $t0, ($v1) -/* F037C 802CB9CC AC690004 */ sw $t1, 4($v1) -/* F0380 802CB9D0 AC6A0008 */ sw $t2, 8($v1) -.L802CB9D4: -/* F0384 802CB9D4 8FBF0064 */ lw $ra, 0x64($sp) -/* F0388 802CB9D8 8FB20060 */ lw $s2, 0x60($sp) -/* F038C 802CB9DC 8FB1005C */ lw $s1, 0x5c($sp) -/* F0390 802CB9E0 8FB00058 */ lw $s0, 0x58($sp) -/* F0394 802CB9E4 D7B60070 */ ldc1 $f22, 0x70($sp) -/* F0398 802CB9E8 D7B40068 */ ldc1 $f20, 0x68($sp) -/* F039C 802CB9EC 24020002 */ addiu $v0, $zero, 2 -/* F03A0 802CB9F0 03E00008 */ jr $ra -/* F03A4 802CB9F4 27BD0078 */ addiu $sp, $sp, 0x78 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 deleted file mode 100644 index eca8ee3433..0000000000 --- a/ver/us/asm/nonmatchings/state_title_screen/appendGfx_title_screen.s +++ /dev/null @@ -1,220 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -.section .rodata - -dlabel jtbl_800983E0 -.word .L80037718_12B18, .L8003768C_12A8C, .L800376BC_12ABC, .L80037718_12B18, .L800376C8_12AC8, .L800376D4_12AD4 - -.section .text - -glabel appendGfx_title_screen -/* 12A38 80037638 3C028007 */ lui $v0, %hi(gGameStatusPtr) -/* 12A3C 8003763C 8C42419C */ lw $v0, %lo(gGameStatusPtr)($v0) -/* 12A40 80037640 27BDFFC8 */ addiu $sp, $sp, -0x38 -/* 12A44 80037644 AFBF0030 */ sw $ra, 0x30($sp) -/* 12A48 80037648 AFB7002C */ sw $s7, 0x2c($sp) -/* 12A4C 8003764C AFB60028 */ sw $s6, 0x28($sp) -/* 12A50 80037650 AFB50024 */ sw $s5, 0x24($sp) -/* 12A54 80037654 AFB40020 */ sw $s4, 0x20($sp) -/* 12A58 80037658 AFB3001C */ sw $s3, 0x1c($sp) -/* 12A5C 8003765C AFB20018 */ sw $s2, 0x18($sp) -/* 12A60 80037660 AFB10014 */ sw $s1, 0x14($sp) -/* 12A64 80037664 AFB00010 */ sw $s0, 0x10($sp) -/* 12A68 80037668 804300AC */ lb $v1, 0xac($v0) -/* 12A6C 8003766C 2C620006 */ sltiu $v0, $v1, 6 -/* 12A70 80037670 10400029 */ beqz $v0, .L80037718_12B18 -/* 12A74 80037674 00031080 */ sll $v0, $v1, 2 -/* 12A78 80037678 3C01800A */ lui $at, %hi(jtbl_800983E0) -/* 12A7C 8003767C 00220821 */ addu $at, $at, $v0 -/* 12A80 80037680 8C2283E0 */ lw $v0, %lo(jtbl_800983E0)($at) -/* 12A84 80037684 00400008 */ jr $v0 -/* 12A88 80037688 00000000 */ nop -.L8003768C_12A8C: -/* 12A8C 8003768C 3C028007 */ lui $v0, %hi(gGameStatusPtr) -/* 12A90 80037690 8C42419C */ lw $v0, %lo(gGameStatusPtr)($v0) -/* 12A94 80037694 804300AF */ lb $v1, 0xaf($v0) -/* 12A98 80037698 804200B0 */ lb $v0, 0xb0($v0) -/* 12A9C 8003769C 44836000 */ mtc1 $v1, $f12 -/* 12AA0 800376A0 00000000 */ nop -/* 12AA4 800376A4 46806320 */ cvt.s.w $f12, $f12 -/* 12AA8 800376A8 44820000 */ mtc1 $v0, $f0 -/* 12AAC 800376AC 00000000 */ nop -/* 12AB0 800376B0 46800020 */ cvt.s.w $f0, $f0 -/* 12AB4 800376B4 0800DDC2 */ j .L80037708 -/* 12AB8 800376B8 46006303 */ div.s $f12, $f12, $f0 -.L800376BC_12ABC: -/* 12ABC 800376BC 44806000 */ mtc1 $zero, $f12 -/* 12AC0 800376C0 0800DDC4 */ j .L80037710 -/* 12AC4 800376C4 00000000 */ nop -.L800376C8_12AC8: -/* 12AC8 800376C8 44806000 */ mtc1 $zero, $f12 -/* 12ACC 800376CC 0800DDC4 */ j .L80037710 -/* 12AD0 800376D0 00000000 */ nop -.L800376D4_12AD4: -/* 12AD4 800376D4 3C038007 */ lui $v1, %hi(gGameStatusPtr) -/* 12AD8 800376D8 8C63419C */ lw $v1, %lo(gGameStatusPtr)($v1) -/* 12ADC 800376DC 806200AF */ lb $v0, 0xaf($v1) -/* 12AE0 800376E0 806300B0 */ lb $v1, 0xb0($v1) -/* 12AE4 800376E4 2442FFFF */ addiu $v0, $v0, -1 -/* 12AE8 800376E8 00621023 */ subu $v0, $v1, $v0 -/* 12AEC 800376EC 44826000 */ mtc1 $v0, $f12 -/* 12AF0 800376F0 00000000 */ nop -/* 12AF4 800376F4 46806320 */ cvt.s.w $f12, $f12 -/* 12AF8 800376F8 44830000 */ mtc1 $v1, $f0 -/* 12AFC 800376FC 00000000 */ nop -/* 12B00 80037700 46800020 */ cvt.s.w $f0, $f0 -/* 12B04 80037704 46006303 */ div.s $f12, $f12, $f0 -.L80037708: -/* 12B08 80037708 460C6302 */ mul.s $f12, $f12, $f12 -/* 12B0C 8003770C 00000000 */ nop -.L80037710: -/* 12B10 80037710 0C00DE5A */ jal title_screen_draw_images -/* 12B14 80037714 46006386 */ mov.s $f14, $f12 -.L80037718_12B18: -/* 12B18 80037718 3C03FF10 */ lui $v1, 0xff10 -/* 12B1C 8003771C 3463013F */ ori $v1, $v1, 0x13f -/* 12B20 80037720 3C10800A */ lui $s0, %hi(gMasterGfxPos) -/* 12B24 80037724 2610A66C */ addiu $s0, $s0, %lo(gMasterGfxPos) -/* 12B28 80037728 3C12E700 */ lui $s2, 0xe700 -/* 12B2C 8003772C 8E110000 */ lw $s1, ($s0) -/* 12B30 80037730 3C04800A */ lui $a0, %hi(nuGfxCfb_ptr) -/* 12B34 80037734 8C84A64C */ lw $a0, %lo(nuGfxCfb_ptr)($a0) -/* 12B38 80037738 0220102D */ daddu $v0, $s1, $zero -/* 12B3C 8003773C 26310008 */ addiu $s1, $s1, 8 -/* 12B40 80037740 AE110000 */ sw $s1, ($s0) -/* 12B44 80037744 AC520000 */ sw $s2, ($v0) -/* 12B48 80037748 AC400004 */ sw $zero, 4($v0) -/* 12B4C 8003774C 26220008 */ addiu $v0, $s1, 8 -/* 12B50 80037750 AE020000 */ sw $v0, ($s0) -/* 12B54 80037754 0C0187A4 */ jal osVirtualToPhysical -/* 12B58 80037758 AE230000 */ sw $v1, ($s1) -/* 12B5C 8003775C 3C060050 */ lui $a2, 0x50 -/* 12B60 80037760 34C603C0 */ ori $a2, $a2, 0x3c0 -/* 12B64 80037764 3C07E300 */ lui $a3, 0xe300 -/* 12B68 80037768 34E70A01 */ ori $a3, $a3, 0xa01 -/* 12B6C 8003776C 3C08D9C0 */ lui $t0, 0xd9c0 -/* 12B70 80037770 3508F9FA */ ori $t0, $t0, 0xf9fa -/* 12B74 80037774 3C0AD9FF */ lui $t2, 0xd9ff -/* 12B78 80037778 354AFFFF */ ori $t2, $t2, 0xffff -/* 12B7C 8003777C 3C090022 */ lui $t1, 0x22 -/* 12B80 80037780 35290005 */ ori $t1, $t1, 5 -/* 12B84 80037784 3C0BDC08 */ lui $t3, 0xdc08 -/* 12B88 80037788 356B060A */ ori $t3, $t3, 0x60a -/* 12B8C 8003778C 3C0CDC08 */ lui $t4, 0xdc08 -/* 12B90 80037790 358C090A */ ori $t4, $t4, 0x90a -/* 12B94 80037794 3C0DD700 */ lui $t5, 0xd700 -/* 12B98 80037798 35AD0002 */ ori $t5, $t5, 2 -/* 12B9C 8003779C 3C0EE300 */ lui $t6, 0xe300 -/* 12BA0 800377A0 35CE0F00 */ ori $t6, $t6, 0xf00 -/* 12BA4 800377A4 3C0FE300 */ lui $t7, 0xe300 -/* 12BA8 800377A8 35EF0C00 */ ori $t7, $t7, 0xc00 -/* 12BAC 800377AC 3C13E300 */ lui $s3, 0xe300 -/* 12BB0 800377B0 36731201 */ ori $s3, $s3, 0x1201 -/* 12BB4 800377B4 3C14E300 */ lui $s4, 0xe300 -/* 12BB8 800377B8 36941801 */ ori $s4, $s4, 0x1801 -/* 12BBC 800377BC 3C15E300 */ lui $s5, 0xe300 -/* 12BC0 800377C0 36B50D01 */ ori $s5, $s5, 0xd01 -/* 12BC4 800377C4 3C16E300 */ lui $s6, 0xe300 -/* 12BC8 800377C8 36D61402 */ ori $s6, $s6, 0x1402 -/* 12BCC 800377CC 3C17E300 */ lui $s7, 0xe300 -/* 12BD0 800377D0 36F71700 */ ori $s7, $s7, 0x1700 -/* 12BD4 800377D4 3C18E200 */ lui $t8, 0xe200 -/* 12BD8 800377D8 37181E01 */ ori $t8, $t8, 0x1e01 -/* 12BDC 800377DC 8E030000 */ lw $v1, ($s0) -/* 12BE0 800377E0 0000202D */ daddu $a0, $zero, $zero -/* 12BE4 800377E4 AE220004 */ sw $v0, 4($s1) -/* 12BE8 800377E8 3C02ED00 */ lui $v0, 0xed00 -/* 12BEC 800377EC 0060282D */ daddu $a1, $v1, $zero -/* 12BF0 800377F0 24630008 */ addiu $v1, $v1, 8 -/* 12BF4 800377F4 AE030000 */ sw $v1, ($s0) -/* 12BF8 800377F8 ACA20000 */ sw $v0, ($a1) -/* 12BFC 800377FC 24620008 */ addiu $v0, $v1, 8 -/* 12C00 80037800 ACA60004 */ sw $a2, 4($a1) -/* 12C04 80037804 AE020000 */ sw $v0, ($s0) -/* 12C08 80037808 24620010 */ addiu $v0, $v1, 0x10 -/* 12C0C 8003780C AC670000 */ sw $a3, ($v1) -/* 12C10 80037810 AC600004 */ sw $zero, 4($v1) -/* 12C14 80037814 AE020000 */ sw $v0, ($s0) -/* 12C18 80037818 24620018 */ addiu $v0, $v1, 0x18 -/* 12C1C 8003781C AC720008 */ sw $s2, 8($v1) -/* 12C20 80037820 AC60000C */ sw $zero, 0xc($v1) -/* 12C24 80037824 AE020000 */ sw $v0, ($s0) -/* 12C28 80037828 24620020 */ addiu $v0, $v1, 0x20 -/* 12C2C 8003782C AC680010 */ sw $t0, 0x10($v1) -/* 12C30 80037830 AC600014 */ sw $zero, 0x14($v1) -/* 12C34 80037834 AE020000 */ sw $v0, ($s0) -/* 12C38 80037838 24620028 */ addiu $v0, $v1, 0x28 -/* 12C3C 8003783C AC6A0018 */ sw $t2, 0x18($v1) -/* 12C40 80037840 AC69001C */ sw $t1, 0x1c($v1) -/* 12C44 80037844 AE020000 */ sw $v0, ($s0) -/* 12C48 80037848 3C02DB02 */ lui $v0, 0xdb02 -/* 12C4C 8003784C AC620020 */ sw $v0, 0x20($v1) -/* 12C50 80037850 24020018 */ addiu $v0, $zero, 0x18 -/* 12C54 80037854 AC620024 */ sw $v0, 0x24($v1) -/* 12C58 80037858 24620030 */ addiu $v0, $v1, 0x30 -/* 12C5C 8003785C 3C058007 */ lui $a1, %hi(D_80077A40) -/* 12C60 80037860 24A57A40 */ addiu $a1, $a1, %lo(D_80077A40) -/* 12C64 80037864 AE020000 */ sw $v0, ($s0) -/* 12C68 80037868 24620038 */ addiu $v0, $v1, 0x38 -/* 12C6C 8003786C AC65002C */ sw $a1, 0x2c($v1) -/* 12C70 80037870 24A5FFF8 */ addiu $a1, $a1, -8 -/* 12C74 80037874 AC6B0028 */ sw $t3, 0x28($v1) -/* 12C78 80037878 AE020000 */ sw $v0, ($s0) -/* 12C7C 8003787C 24620040 */ addiu $v0, $v1, 0x40 -/* 12C80 80037880 AC6C0030 */ sw $t4, 0x30($v1) -/* 12C84 80037884 AC650034 */ sw $a1, 0x34($v1) -/* 12C88 80037888 AE020000 */ sw $v0, ($s0) -/* 12C8C 8003788C 2402FFFF */ addiu $v0, $zero, -1 -/* 12C90 80037890 AC62003C */ sw $v0, 0x3c($v1) -/* 12C94 80037894 24620048 */ addiu $v0, $v1, 0x48 -/* 12C98 80037898 AC6D0038 */ sw $t5, 0x38($v1) -/* 12C9C 8003789C AE020000 */ sw $v0, ($s0) -/* 12CA0 800378A0 24620050 */ addiu $v0, $v1, 0x50 -/* 12CA4 800378A4 AC6E0040 */ sw $t6, 0x40($v1) -/* 12CA8 800378A8 AC600044 */ sw $zero, 0x44($v1) -/* 12CAC 800378AC AE020000 */ sw $v0, ($s0) -/* 12CB0 800378B0 3C020008 */ lui $v0, 8 -/* 12CB4 800378B4 AC6F0048 */ sw $t7, 0x48($v1) -/* 12CB8 800378B8 AC62004C */ sw $v0, 0x4c($v1) -/* 12CBC 800378BC 24620058 */ addiu $v0, $v1, 0x58 -/* 12CC0 800378C0 AE020000 */ sw $v0, ($s0) -/* 12CC4 800378C4 24022000 */ addiu $v0, $zero, 0x2000 -/* 12CC8 800378C8 AC620054 */ sw $v0, 0x54($v1) -/* 12CCC 800378CC 24620060 */ addiu $v0, $v1, 0x60 -/* 12CD0 800378D0 AC730050 */ sw $s3, 0x50($v1) -/* 12CD4 800378D4 AE020000 */ sw $v0, ($s0) -/* 12CD8 800378D8 240200C0 */ addiu $v0, $zero, 0xc0 -/* 12CDC 800378DC AC62005C */ sw $v0, 0x5c($v1) -/* 12CE0 800378E0 24620068 */ addiu $v0, $v1, 0x68 -/* 12CE4 800378E4 AC740058 */ sw $s4, 0x58($v1) -/* 12CE8 800378E8 AE020000 */ sw $v0, ($s0) -/* 12CEC 800378EC 24620070 */ addiu $v0, $v1, 0x70 -/* 12CF0 800378F0 AC750060 */ sw $s5, 0x60($v1) -/* 12CF4 800378F4 AC600064 */ sw $zero, 0x64($v1) -/* 12CF8 800378F8 AE020000 */ sw $v0, ($s0) -/* 12CFC 800378FC 24020C00 */ addiu $v0, $zero, 0xc00 -/* 12D00 80037900 AC62006C */ sw $v0, 0x6c($v1) -/* 12D04 80037904 24620078 */ addiu $v0, $v1, 0x78 -/* 12D08 80037908 AC760068 */ sw $s6, 0x68($v1) -/* 12D0C 8003790C AE020000 */ sw $v0, ($s0) -/* 12D10 80037910 24620080 */ addiu $v0, $v1, 0x80 -/* 12D14 80037914 AC770070 */ sw $s7, 0x70($v1) -/* 12D18 80037918 AC600074 */ sw $zero, 0x74($v1) -/* 12D1C 8003791C AE020000 */ sw $v0, ($s0) -/* 12D20 80037920 AC780078 */ sw $t8, 0x78($v1) -/* 12D24 80037924 0C00B5CF */ jal render_frame -/* 12D28 80037928 AC60007C */ sw $zero, 0x7c($v1) -/* 12D2C 8003792C 0C00B5CF */ jal render_frame -/* 12D30 80037930 24040001 */ addiu $a0, $zero, 1 -/* 12D34 80037934 8FBF0030 */ lw $ra, 0x30($sp) -/* 12D38 80037938 8FB7002C */ lw $s7, 0x2c($sp) -/* 12D3C 8003793C 8FB60028 */ lw $s6, 0x28($sp) -/* 12D40 80037940 8FB50024 */ lw $s5, 0x24($sp) -/* 12D44 80037944 8FB40020 */ lw $s4, 0x20($sp) -/* 12D48 80037948 8FB3001C */ lw $s3, 0x1c($sp) -/* 12D4C 8003794C 8FB20018 */ lw $s2, 0x18($sp) -/* 12D50 80037950 8FB10014 */ lw $s1, 0x14($sp) -/* 12D54 80037954 8FB00010 */ lw $s0, 0x10($sp) -/* 12D58 80037958 03E00008 */ jr $ra -/* 12D5C 8003795C 27BD0038 */ addiu $sp, $sp, 0x38 diff --git a/ver/us/asm/nonmatchings/state_title_screen/state_init_title_screen.s b/ver/us/asm/nonmatchings/state_title_screen/state_init_title_screen.s deleted file mode 100644 index 78adc11eb6..0000000000 --- a/ver/us/asm/nonmatchings/state_title_screen/state_init_title_screen.s +++ /dev/null @@ -1,191 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -.section .rodata - -dlabel D_80098390 -.ascii "title_data\0\0" - -dlabel D_8009839C -.ascii "title_bg\0\0\0\0" - -.section .text - -glabel state_init_title_screen -/* 121F0 80036DF0 27BDFFC8 */ addiu $sp, $sp, -0x38 -/* 121F4 80036DF4 AFB20028 */ sw $s2, 0x28($sp) -/* 121F8 80036DF8 3C12800A */ lui $s2, %hi(gOverrideFlags) -/* 121FC 80036DFC 2652A650 */ addiu $s2, $s2, %lo(gOverrideFlags) -/* 12200 80036E00 24020001 */ addiu $v0, $zero, 1 -/* 12204 80036E04 AFBF002C */ sw $ra, 0x2c($sp) -/* 12208 80036E08 AFB10024 */ sw $s1, 0x24($sp) -/* 1220C 80036E0C AFB00020 */ sw $s0, 0x20($sp) -/* 12210 80036E10 F7B40030 */ sdc1 $f20, 0x30($sp) -/* 12214 80036E14 AE400000 */ sw $zero, ($s2) -/* 12218 80036E18 3C01800A */ lui $at, %hi(timeFreezeMode) -/* 1221C 80036E1C AC20A5D8 */ sw $zero, %lo(timeFreezeMode)($at) -/* 12220 80036E20 3C018015 */ lui $at, %hi(D_8014C248) -/* 12224 80036E24 A022C248 */ sb $v0, %lo(D_8014C248)($at) -/* 12228 80036E28 0C00AB00 */ jal general_heap_create -/* 1222C 80036E2C 00000000 */ nop -/* 12230 80036E30 0C048D9D */ jal clear_printers -/* 12234 80036E34 00000000 */ nop -/* 12238 80036E38 0C0525FF */ jal func_801497FC -/* 1223C 80036E3C 0000202D */ daddu $a0, $zero, $zero -/* 12240 80036E40 3C038007 */ lui $v1, %hi(gGameStatusPtr) -/* 12244 80036E44 2463419C */ addiu $v1, $v1, %lo(gGameStatusPtr) -/* 12248 80036E48 8C620000 */ lw $v0, ($v1) -/* 1224C 80036E4C A04000AC */ sb $zero, 0xac($v0) -/* 12250 80036E50 8C620000 */ lw $v0, ($v1) -/* 12254 80036E54 A04000AD */ sb $zero, 0xad($v0) -/* 12258 80036E58 8C620000 */ lw $v0, ($v1) -/* 1225C 80036E5C A0400070 */ sb $zero, 0x70($v0) -/* 12260 80036E60 8C630000 */ lw $v1, ($v1) -/* 12264 80036E64 2402FFFF */ addiu $v0, $zero, -1 -/* 12268 80036E68 0C00CE1D */ jal intro_logos_update_fade -/* 1226C 80036E6C A06200A8 */ sb $v0, 0xa8($v1) -/* 12270 80036E70 3C04800A */ lui $a0, %hi(D_80098390) -/* 12274 80036E74 24848390 */ addiu $a0, $a0, %lo(D_80098390) -/* 12278 80036E78 0C016B3A */ jal load_asset_by_name -/* 1227C 80036E7C 27A50018 */ addiu $a1, $sp, 0x18 -/* 12280 80036E80 8FA40018 */ lw $a0, 0x18($sp) -/* 12284 80036E84 0C00AB39 */ jal heap_malloc -/* 12288 80036E88 0040882D */ daddu $s1, $v0, $zero -/* 1228C 80036E8C 0220202D */ daddu $a0, $s1, $zero -/* 12290 80036E90 0040282D */ daddu $a1, $v0, $zero -/* 12294 80036E94 3C10800A */ lui $s0, %hi(D_800A0974) -/* 12298 80036E98 26100974 */ addiu $s0, $s0, %lo(D_800A0974) -/* 1229C 80036E9C 0C01BB7C */ jal decode_yay0 -/* 122A0 80036EA0 AE050000 */ sw $a1, ($s0) -/* 122A4 80036EA4 0C00AB1E */ jal general_heap_free -/* 122A8 80036EA8 0220202D */ daddu $a0, $s1, $zero -/* 122AC 80036EAC 8E040000 */ lw $a0, ($s0) -/* 122B0 80036EB0 8C820000 */ lw $v0, ($a0) -/* 122B4 80036EB4 8C830008 */ lw $v1, 8($a0) -/* 122B8 80036EB8 00441021 */ addu $v0, $v0, $a0 -/* 122BC 80036EBC 3C01800A */ lui $at, %hi(D_800A0978) -/* 122C0 80036EC0 AC220978 */ sw $v0, %lo(D_800A0978)($at) -/* 122C4 80036EC4 8C820004 */ lw $v0, 4($a0) -/* 122C8 80036EC8 00641821 */ addu $v1, $v1, $a0 -/* 122CC 80036ECC 3C01800A */ lui $at, %hi(D_800A0980) -/* 122D0 80036ED0 AC230980 */ sw $v1, %lo(D_800A0980)($at) -/* 122D4 80036ED4 00441021 */ addu $v0, $v0, $a0 -/* 122D8 80036ED8 3C01800A */ lui $at, %hi(D_800A097C) -/* 122DC 80036EDC AC22097C */ sw $v0, %lo(D_800A097C)($at) -/* 122E0 80036EE0 0C00B7BD */ jal create_cameras_a -/* 122E4 80036EE4 00000000 */ nop -/* 122E8 80036EE8 0000202D */ daddu $a0, $zero, $zero -/* 122EC 80036EEC 2405000C */ addiu $a1, $zero, 0xc -/* 122F0 80036EF0 2406001C */ addiu $a2, $zero, 0x1c -/* 122F4 80036EF4 24070128 */ addiu $a3, $zero, 0x128 -/* 122F8 80036EF8 3C10800B */ lui $s0, %hi(gCameras) -/* 122FC 80036EFC 26101D80 */ addiu $s0, $s0, %lo(gCameras) -/* 12300 80036F00 3C0141C8 */ lui $at, 0x41c8 -/* 12304 80036F04 4481A000 */ mtc1 $at, $f20 -/* 12308 80036F08 24020006 */ addiu $v0, $zero, 6 -/* 1230C 80036F0C A6020004 */ sh $v0, 4($s0) -/* 12310 80036F10 24020001 */ addiu $v0, $zero, 1 -/* 12314 80036F14 A6020006 */ sh $v0, 6($s0) -/* 12318 80036F18 24020010 */ addiu $v0, $zero, 0x10 -/* 1231C 80036F1C A6020012 */ sh $v0, 0x12($s0) -/* 12320 80036F20 24021000 */ addiu $v0, $zero, 0x1000 -/* 12324 80036F24 A6020014 */ sh $v0, 0x14($s0) -/* 12328 80036F28 240200B8 */ addiu $v0, $zero, 0xb8 -/* 1232C 80036F2C 3C018007 */ lui $at, %hi(gCurrentCameraID) -/* 12330 80036F30 AC207410 */ sw $zero, %lo(gCurrentCameraID)($at) -/* 12334 80036F34 E6140018 */ swc1 $f20, 0x18($s0) -/* 12338 80036F38 AFA20010 */ sw $v0, 0x10($sp) -/* 1233C 80036F3C 96020000 */ lhu $v0, ($s0) -/* 12340 80036F40 96030558 */ lhu $v1, 0x558($s0) -/* 12344 80036F44 34420002 */ ori $v0, $v0, 2 -/* 12348 80036F48 A6020000 */ sh $v0, ($s0) -/* 1234C 80036F4C 96020AB0 */ lhu $v0, 0xab0($s0) -/* 12350 80036F50 34630002 */ ori $v1, $v1, 2 -/* 12354 80036F54 A6030558 */ sh $v1, 0x558($s0) -/* 12358 80036F58 96031008 */ lhu $v1, 0x1008($s0) -/* 1235C 80036F5C 34420002 */ ori $v0, $v0, 2 -/* 12360 80036F60 34630002 */ ori $v1, $v1, 2 -/* 12364 80036F64 A6020AB0 */ sh $v0, 0xab0($s0) -/* 12368 80036F68 0C00B8C5 */ jal set_cam_viewport -/* 1236C 80036F6C A6031008 */ sh $v1, 0x1008($s0) -/* 12370 80036F70 3C0143FA */ lui $at, 0x43fa -/* 12374 80036F74 44810000 */ mtc1 $at, $f0 -/* 12378 80036F78 3C01447A */ lui $at, 0x447a -/* 1237C 80036F7C 44811000 */ mtc1 $at, $f2 -/* 12380 80036F80 3C0144BB */ lui $at, 0x44bb -/* 12384 80036F84 34218000 */ ori $at, $at, 0x8000 -/* 12388 80036F88 44812000 */ mtc1 $at, $f4 -/* 1238C 80036F8C 3C014316 */ lui $at, 0x4316 -/* 12390 80036F90 44813000 */ mtc1 $at, $f6 -/* 12394 80036F94 24020028 */ addiu $v0, $zero, 0x28 -/* 12398 80036F98 A602001E */ sh $v0, 0x1e($s0) -/* 1239C 80036F9C 24020064 */ addiu $v0, $zero, 0x64 -/* 123A0 80036FA0 A600002C */ sh $zero, 0x2c($s0) -/* 123A4 80036FA4 A600002E */ sh $zero, 0x2e($s0) -/* 123A8 80036FA8 A6000030 */ sh $zero, 0x30($s0) -/* 123AC 80036FAC E6140054 */ swc1 $f20, 0x54($s0) -/* 123B0 80036FB0 E6140058 */ swc1 $f20, 0x58($s0) -/* 123B4 80036FB4 A600001C */ sh $zero, 0x1c($s0) -/* 123B8 80036FB8 A6020020 */ sh $v0, 0x20($s0) -/* 123BC 80036FBC A6000022 */ sh $zero, 0x22($s0) -/* 123C0 80036FC0 E600003C */ swc1 $f0, 0x3c($s0) -/* 123C4 80036FC4 E6020040 */ swc1 $f2, 0x40($s0) -/* 123C8 80036FC8 E6040044 */ swc1 $f4, 0x44($s0) -/* 123CC 80036FCC 0C0B0C77 */ jal clear_script_list -/* 123D0 80036FD0 E606005C */ swc1 $f6, 0x5c($s0) -/* 123D4 80036FD4 0C048C2E */ jal clear_generic_entity_list -/* 123D8 80036FD8 00000000 */ nop -/* 123DC 80036FDC 0C047624 */ jal clear_render_tasks -/* 123E0 80036FE0 00000000 */ nop -/* 123E4 80036FE4 0C0B763E */ jal spr_init_sprites -/* 123E8 80036FE8 0000202D */ daddu $a0, $zero, $zero -/* 123EC 80036FEC 0C047889 */ jal clear_animator_list -/* 123F0 80036FF0 00000000 */ nop -/* 123F4 80036FF4 0C0482EC */ jal clear_entity_models -/* 123F8 80036FF8 00000000 */ nop -/* 123FC 80036FFC 0C00E12F */ jal clear_npcs -/* 12400 80037000 00000000 */ nop -/* 12404 80037004 0C050440 */ jal clear_hud_element_cache -/* 12408 80037008 00000000 */ nop -/* 1240C 8003700C 0C05177E */ jal reset_background_settings -/* 12410 80037010 00000000 */ nop -/* 12414 80037014 0C04432E */ jal clear_entity_data -/* 12418 80037018 24040001 */ addiu $a0, $zero, 1 -/* 1241C 8003701C 0C016727 */ jal clear_effect_data -/* 12420 80037020 00000000 */ nop -/* 12424 80037024 8E420000 */ lw $v0, ($s2) -/* 12428 80037028 34420002 */ ori $v0, $v0, 2 -/* 1242C 8003702C 0C039CE8 */ jal clear_player_data -/* 12430 80037030 AE420000 */ sw $v0, ($s2) -/* 12434 80037034 0000202D */ daddu $a0, $zero, $zero -/* 12438 80037038 3C058003 */ lui $a1, %hi(appendGfx_title_screen) -/* 1243C 8003703C 24A57638 */ addiu $a1, $a1, %lo(appendGfx_title_screen) -/* 12440 80037040 8E420000 */ lw $v0, ($s2) -/* 12444 80037044 2403FFF7 */ addiu $v1, $zero, -9 -/* 12448 80037048 00431024 */ and $v0, $v0, $v1 -/* 1244C 8003704C 0C044B61 */ jal game_mode_set_fpDrawAuxUI -/* 12450 80037050 AE420000 */ sw $v0, ($s2) -/* 12454 80037054 3C04800A */ lui $a0, %hi(D_8009839C) -/* 12458 80037058 0C05175C */ jal load_map_bg -/* 1245C 8003705C 2484839C */ addiu $a0, $a0, %lo(D_8009839C) -/* 12460 80037060 3C048020 */ lui $a0, %hi(func_80200000) -/* 12464 80037064 24840000 */ addiu $a0, $a0, %lo(func_80200000) -/* 12468 80037068 0C05178A */ jal read_background_size -/* 1246C 8003706C 00000000 */ nop -/* 12470 80037070 0000202D */ daddu $a0, $zero, $zero -/* 12474 80037074 2405006A */ addiu $a1, $zero, 0x6a -/* 12478 80037078 0080302D */ daddu $a2, $a0, $zero -/* 1247C 8003707C 240701F4 */ addiu $a3, $zero, 0x1f4 -/* 12480 80037080 24020008 */ addiu $v0, $zero, 8 -/* 12484 80037084 0C052A46 */ jal bgm_set_song -/* 12488 80037088 AFA20010 */ sw $v0, 0x10($sp) -/* 1248C 8003708C 8FBF002C */ lw $ra, 0x2c($sp) -/* 12490 80037090 8FB20028 */ lw $s2, 0x28($sp) -/* 12494 80037094 8FB10024 */ lw $s1, 0x24($sp) -/* 12498 80037098 8FB00020 */ lw $s0, 0x20($sp) -/* 1249C 8003709C D7B40030 */ ldc1 $f20, 0x30($sp) -/* 124A0 800370A0 240201E0 */ addiu $v0, $zero, 0x1e0 -/* 124A4 800370A4 3C01800A */ lui $at, %hi(D_800A0988) -/* 124A8 800370A8 A4220988 */ sh $v0, %lo(D_800A0988)($at) -/* 124AC 800370AC 03E00008 */ jr $ra -/* 124B0 800370B0 27BD0038 */ addiu $sp, $sp, 0x38 diff --git a/ver/us/asm/nonmatchings/state_title_screen/state_step_title_screen.s b/ver/us/asm/nonmatchings/state_title_screen/state_step_title_screen.s deleted file mode 100644 index 770b8ca42d..0000000000 --- a/ver/us/asm/nonmatchings/state_title_screen/state_step_title_screen.s +++ /dev/null @@ -1,354 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -.section .rodata - -dlabel jtbl_800983A8 -.word .L80037130_12530, .L80037184_12584, .L80037204_12604, .L8003756C_1296C, .L800372DC_126DC, .L8003733C_1273C, .L80037450_12850, 0 - -.section .text - -glabel state_step_title_screen -/* 124B4 800370B4 27BDFFD8 */ addiu $sp, $sp, -0x28 -/* 124B8 800370B8 AFB00018 */ sw $s0, 0x18($sp) -/* 124BC 800370BC 3C108007 */ lui $s0, %hi(gGameStatusPtr) -/* 124C0 800370C0 2610419C */ addiu $s0, $s0, %lo(gGameStatusPtr) -/* 124C4 800370C4 AFBF0020 */ sw $ra, 0x20($sp) -/* 124C8 800370C8 AFB1001C */ sw $s1, 0x1c($sp) -/* 124CC 800370CC 8E020000 */ lw $v0, ($s0) -/* 124D0 800370D0 3C013F80 */ lui $at, 0x3f80 -/* 124D4 800370D4 44816000 */ mtc1 $at, $f12 -/* 124D8 800370D8 0C00AFBB */ jal set_curtain_scale -/* 124DC 800370DC 8C510010 */ lw $s1, 0x10($v0) -/* 124E0 800370E0 44806000 */ mtc1 $zero, $f12 -/* 124E4 800370E4 0C00AFC9 */ jal set_curtain_fade -/* 124E8 800370E8 00000000 */ nop -/* 124EC 800370EC 3C04800A */ lui $a0, %hi(D_800A0988) -/* 124F0 800370F0 24840988 */ addiu $a0, $a0, %lo(D_800A0988) -/* 124F4 800370F4 84820000 */ lh $v0, ($a0) -/* 124F8 800370F8 94830000 */ lhu $v1, ($a0) -/* 124FC 800370FC 18400002 */ blez $v0, .L80037108 -/* 12500 80037100 2462FFFF */ addiu $v0, $v1, -1 -/* 12504 80037104 A4820000 */ sh $v0, ($a0) -.L80037108: -/* 12508 80037108 8E020000 */ lw $v0, ($s0) -/* 1250C 8003710C 804300AC */ lb $v1, 0xac($v0) -/* 12510 80037110 2C620007 */ sltiu $v0, $v1, 7 -/* 12514 80037114 10400115 */ beqz $v0, .L8003756C_1296C -/* 12518 80037118 00031080 */ sll $v0, $v1, 2 -/* 1251C 8003711C 3C01800A */ lui $at, %hi(jtbl_800983A8) -/* 12520 80037120 00220821 */ addu $at, $at, $v0 -/* 12524 80037124 8C2283A8 */ lw $v0, %lo(jtbl_800983A8)($at) -/* 12528 80037128 00400008 */ jr $v0 -/* 1252C 8003712C 00000000 */ nop -.L80037130_12530: -/* 12530 80037130 3C04800A */ lui $a0, %hi(gOverrideFlags) -/* 12534 80037134 2484A650 */ addiu $a0, $a0, %lo(gOverrideFlags) -/* 12538 80037138 8C820000 */ lw $v0, ($a0) -/* 1253C 8003713C 24030003 */ addiu $v1, $zero, 3 -/* 12540 80037140 3C01800A */ lui $at, %hi(D_800A0970) -/* 12544 80037144 A4230970 */ sh $v1, %lo(D_800A0970)($at) -/* 12548 80037148 34420008 */ ori $v0, $v0, 8 -/* 1254C 8003714C AC820000 */ sw $v0, ($a0) -/* 12550 80037150 3C048007 */ lui $a0, %hi(gGameStatusPtr) -/* 12554 80037154 2484419C */ addiu $a0, $a0, %lo(gGameStatusPtr) -/* 12558 80037158 8C830000 */ lw $v1, ($a0) -/* 1255C 8003715C 24020014 */ addiu $v0, $zero, 0x14 -/* 12560 80037160 A06200B0 */ sb $v0, 0xb0($v1) -/* 12564 80037164 8C830000 */ lw $v1, ($a0) -/* 12568 80037168 906200B0 */ lbu $v0, 0xb0($v1) -/* 1256C 8003716C A06200AF */ sb $v0, 0xaf($v1) -/* 12570 80037170 8C830000 */ lw $v1, ($a0) -/* 12574 80037174 906200AC */ lbu $v0, 0xac($v1) -/* 12578 80037178 24420001 */ addiu $v0, $v0, 1 -/* 1257C 8003717C 0800DD5B */ j .L8003756C_1296C -/* 12580 80037180 A06200AC */ sb $v0, 0xac($v1) -.L80037184_12584: -/* 12584 80037184 3C04800A */ lui $a0, %hi(D_800A0970) -/* 12588 80037188 24840970 */ addiu $a0, $a0, %lo(D_800A0970) -/* 1258C 8003718C 84820000 */ lh $v0, ($a0) -/* 12590 80037190 94830000 */ lhu $v1, ($a0) -/* 12594 80037194 10400003 */ beqz $v0, .L800371A4 -/* 12598 80037198 2462FFFF */ addiu $v0, $v1, -1 -/* 1259C 8003719C 0800DD5B */ j .L8003756C_1296C -/* 125A0 800371A0 A4820000 */ sh $v0, ($a0) -.L800371A4: -/* 125A4 800371A4 3C108007 */ lui $s0, %hi(gGameStatusPtr) -/* 125A8 800371A8 2610419C */ addiu $s0, $s0, %lo(gGameStatusPtr) -/* 125AC 800371AC 8E040000 */ lw $a0, ($s0) -/* 125B0 800371B0 808200AF */ lb $v0, 0xaf($a0) -/* 125B4 800371B4 908300AF */ lbu $v1, 0xaf($a0) -/* 125B8 800371B8 10400002 */ beqz $v0, .L800371C4 -/* 125BC 800371BC 2462FFFF */ addiu $v0, $v1, -1 -/* 125C0 800371C0 A08200AF */ sb $v0, 0xaf($a0) -.L800371C4: -/* 125C4 800371C4 24040006 */ addiu $a0, $zero, 6 -/* 125C8 800371C8 3C02800A */ lui $v0, %hi(gOverrideFlags) -/* 125CC 800371CC 2442A650 */ addiu $v0, $v0, %lo(gOverrideFlags) -/* 125D0 800371D0 8C430000 */ lw $v1, ($v0) -/* 125D4 800371D4 2405FFF7 */ addiu $a1, $zero, -9 -/* 125D8 800371D8 00651824 */ and $v1, $v1, $a1 -/* 125DC 800371DC 0C00CDFE */ jal intro_logos_fade_in -/* 125E0 800371E0 AC430000 */ sw $v1, ($v0) -/* 125E4 800371E4 10400074 */ beqz $v0, .L800373B8 -/* 125E8 800371E8 00000000 */ nop -/* 125EC 800371EC 8E030000 */ lw $v1, ($s0) -/* 125F0 800371F0 806200AF */ lb $v0, 0xaf($v1) -/* 125F4 800371F4 14400070 */ bnez $v0, .L800373B8 -/* 125F8 800371F8 24020002 */ addiu $v0, $zero, 2 -/* 125FC 800371FC 0800DCEE */ j .L800373B8 -/* 12600 80037200 A06200AC */ sb $v0, 0xac($v1) -.L80037204_12604: -/* 12604 80037204 3C028007 */ lui $v0, %hi(D_80077A34) -/* 12608 80037208 8C427A34 */ lw $v0, %lo(D_80077A34)($v0) -/* 1260C 8003720C 1040000B */ beqz $v0, .L8003723C -/* 12610 80037210 24020078 */ addiu $v0, $zero, 0x78 -/* 12614 80037214 3C03800A */ lui $v1, %hi(D_800A0988) -/* 12618 80037218 84630988 */ lh $v1, %lo(D_800A0988)($v1) -/* 1261C 8003721C 14620007 */ bne $v1, $v0, .L8003723C -/* 12620 80037220 24020008 */ addiu $v0, $zero, 8 -/* 12624 80037224 AFA20010 */ sw $v0, 0x10($sp) -/* 12628 80037228 0000202D */ daddu $a0, $zero, $zero -/* 1262C 8003722C 2405FFFF */ addiu $a1, $zero, -1 -/* 12630 80037230 0080302D */ daddu $a2, $a0, $zero -/* 12634 80037234 0C052A46 */ jal bgm_set_song -/* 12638 80037238 24070F3C */ addiu $a3, $zero, 0xf3c -.L8003723C: -/* 1263C 8003723C 3C02800A */ lui $v0, %hi(D_800A0988) -/* 12640 80037240 84420988 */ lh $v0, %lo(D_800A0988)($v0) -/* 12644 80037244 14400012 */ bnez $v0, .L80037290 -/* 12648 80037248 32229000 */ andi $v0, $s1, 0x9000 -/* 1264C 8003724C 3C028007 */ lui $v0, %hi(gGameStatusPtr) -/* 12650 80037250 8C42419C */ lw $v0, %lo(gGameStatusPtr)($v0) -/* 12654 80037254 24030004 */ addiu $v1, $zero, 4 -/* 12658 80037258 A04300AC */ sb $v1, 0xac($v0) -/* 1265C 8003725C 3C028007 */ lui $v0, %hi(D_80077A34) -/* 12660 80037260 8C427A34 */ lw $v0, %lo(D_80077A34)($v0) -/* 12664 80037264 14400002 */ bnez $v0, .L80037270 -/* 12668 80037268 24020009 */ addiu $v0, $zero, 9 -/* 1266C 8003726C 2402000A */ addiu $v0, $zero, 0xa -.L80037270: -/* 12670 80037270 3C018007 */ lui $at, %hi(D_800779C0) -/* 12674 80037274 A42279C0 */ sh $v0, %lo(D_800779C0)($at) -/* 12678 80037278 3C038007 */ lui $v1, %hi(D_80077A34) -/* 1267C 8003727C 24637A34 */ addiu $v1, $v1, %lo(D_80077A34) -/* 12680 80037280 8C620000 */ lw $v0, ($v1) -/* 12684 80037284 38420001 */ xori $v0, $v0, 1 -/* 12688 80037288 0800DD64 */ j .L80037590 -/* 1268C 8003728C AC620000 */ sw $v0, ($v1) -.L80037290: -/* 12690 80037290 104000B6 */ beqz $v0, .L8003756C_1296C -/* 12694 80037294 24020004 */ addiu $v0, $zero, 4 -/* 12698 80037298 3C038007 */ lui $v1, %hi(gGameStatusPtr) -/* 1269C 8003729C 8C63419C */ lw $v1, %lo(gGameStatusPtr)($v1) -/* 126A0 800372A0 A06200AC */ sb $v0, 0xac($v1) -/* 126A4 800372A4 24020005 */ addiu $v0, $zero, 5 -/* 126A8 800372A8 3C018007 */ lui $at, %hi(D_800779C0) -/* 126AC 800372AC A42279C0 */ sh $v0, %lo(D_800779C0)($at) -/* 126B0 800372B0 0C05272D */ jal sfx_play_sound -/* 126B4 800372B4 240400D5 */ addiu $a0, $zero, 0xd5 -/* 126B8 800372B8 0000202D */ daddu $a0, $zero, $zero -/* 126BC 800372BC 24050069 */ addiu $a1, $zero, 0x69 -/* 126C0 800372C0 0080302D */ daddu $a2, $a0, $zero -/* 126C4 800372C4 240701F4 */ addiu $a3, $zero, 0x1f4 -/* 126C8 800372C8 24020008 */ addiu $v0, $zero, 8 -/* 126CC 800372CC 0C052A46 */ jal bgm_set_song -/* 126D0 800372D0 AFA20010 */ sw $v0, 0x10($sp) -/* 126D4 800372D4 0800DD64 */ j .L80037590 -/* 126D8 800372D8 00000000 */ nop -.L800372DC_126DC: -/* 126DC 800372DC 240400D0 */ addiu $a0, $zero, 0xd0 -/* 126E0 800372E0 3C108007 */ lui $s0, %hi(gGameStatusPtr) -/* 126E4 800372E4 2610419C */ addiu $s0, $s0, %lo(gGameStatusPtr) -/* 126E8 800372E8 8E030000 */ lw $v1, ($s0) -/* 126EC 800372EC 24020005 */ addiu $v0, $zero, 5 -/* 126F0 800372F0 0C00CDF8 */ jal intro_logos_set_fade_color -/* 126F4 800372F4 A06200AC */ sb $v0, 0xac($v1) -/* 126F8 800372F8 3C028007 */ lui $v0, %hi(D_800779C0) -/* 126FC 800372FC 944279C0 */ lhu $v0, %lo(D_800779C0)($v0) -/* 12700 80037300 2442FFF7 */ addiu $v0, $v0, -9 -/* 12704 80037304 2C420002 */ sltiu $v0, $v0, 2 -/* 12708 80037308 10400004 */ beqz $v0, .L8003731C -/* 1270C 8003730C 24020014 */ addiu $v0, $zero, 0x14 -/* 12710 80037310 8E030000 */ lw $v1, ($s0) -/* 12714 80037314 0800DCCA */ j .L80037328 -/* 12718 80037318 A06200B0 */ sb $v0, 0xb0($v1) -.L8003731C: -/* 1271C 8003731C 8E030000 */ lw $v1, ($s0) -/* 12720 80037320 2402000A */ addiu $v0, $zero, 0xa -/* 12724 80037324 A06200B0 */ sb $v0, 0xb0($v1) -.L80037328: -/* 12728 80037328 3C038007 */ lui $v1, %hi(gGameStatusPtr) -/* 1272C 8003732C 8C63419C */ lw $v1, %lo(gGameStatusPtr)($v1) -/* 12730 80037330 906200B0 */ lbu $v0, 0xb0($v1) -/* 12734 80037334 0800DD5B */ j .L8003756C_1296C -/* 12738 80037338 A06200AF */ sb $v0, 0xaf($v1) -.L8003733C_1273C: -/* 1273C 8003733C 3C038007 */ lui $v1, %hi(D_800779C0) -/* 12740 80037340 946379C0 */ lhu $v1, %lo(D_800779C0)($v1) -/* 12744 80037344 2462FFF7 */ addiu $v0, $v1, -9 -/* 12748 80037348 2C420002 */ sltiu $v0, $v0, 2 -/* 1274C 8003734C 1040001E */ beqz $v0, .L800373C8 -/* 12750 80037350 00031400 */ sll $v0, $v1, 0x10 -/* 12754 80037354 3C108007 */ lui $s0, %hi(gGameStatusPtr) -/* 12758 80037358 2610419C */ addiu $s0, $s0, %lo(gGameStatusPtr) -/* 1275C 8003735C 8E040000 */ lw $a0, ($s0) -/* 12760 80037360 808200AF */ lb $v0, 0xaf($a0) -/* 12764 80037364 908300AF */ lbu $v1, 0xaf($a0) -/* 12768 80037368 10400002 */ beqz $v0, .L80037374 -/* 1276C 8003736C 2462FFFF */ addiu $v0, $v1, -1 -/* 12770 80037370 A08200AF */ sb $v0, 0xaf($a0) -.L80037374: -/* 12774 80037374 0C00CE0C */ jal intro_logos_fade_out -/* 12778 80037378 2404000A */ addiu $a0, $zero, 0xa -/* 1277C 8003737C 1040000E */ beqz $v0, .L800373B8 -/* 12780 80037380 00000000 */ nop -/* 12784 80037384 8E030000 */ lw $v1, ($s0) -/* 12788 80037388 806200AF */ lb $v0, 0xaf($v1) -/* 1278C 8003738C 1440000A */ bnez $v0, .L800373B8 -/* 12790 80037390 24020003 */ addiu $v0, $zero, 3 -/* 12794 80037394 A06200AF */ sb $v0, 0xaf($v1) -/* 12798 80037398 3C03800A */ lui $v1, %hi(gOverrideFlags) -/* 1279C 8003739C 2463A650 */ addiu $v1, $v1, %lo(gOverrideFlags) -/* 127A0 800373A0 8C620000 */ lw $v0, ($v1) -/* 127A4 800373A4 34420008 */ ori $v0, $v0, 8 -/* 127A8 800373A8 AC620000 */ sw $v0, ($v1) -/* 127AC 800373AC 8E030000 */ lw $v1, ($s0) -/* 127B0 800373B0 24020006 */ addiu $v0, $zero, 6 -/* 127B4 800373B4 A06200AC */ sb $v0, 0xac($v1) -.L800373B8: -/* 127B8 800373B8 0C00CE1D */ jal intro_logos_update_fade -/* 127BC 800373BC 00000000 */ nop -/* 127C0 800373C0 0800DD5B */ j .L8003756C_1296C -/* 127C4 800373C4 00000000 */ nop -.L800373C8: -/* 127C8 800373C8 00021403 */ sra $v0, $v0, 0x10 -/* 127CC 800373CC 24030005 */ addiu $v1, $zero, 5 -/* 127D0 800373D0 14430012 */ bne $v0, $v1, .L8003741C -/* 127D4 800373D4 24020003 */ addiu $v0, $zero, 3 -/* 127D8 800373D8 3C058007 */ lui $a1, %hi(gGameStatusPtr) -/* 127DC 800373DC 24A5419C */ addiu $a1, $a1, %lo(gGameStatusPtr) -/* 127E0 800373E0 8CA40000 */ lw $a0, ($a1) -/* 127E4 800373E4 808200AF */ lb $v0, 0xaf($a0) -/* 127E8 800373E8 908300AF */ lbu $v1, 0xaf($a0) -/* 127EC 800373EC 1440001F */ bnez $v0, .L8003746C -/* 127F0 800373F0 2462FFFF */ addiu $v0, $v1, -1 -/* 127F4 800373F4 24020003 */ addiu $v0, $zero, 3 -/* 127F8 800373F8 3C03800A */ lui $v1, %hi(gOverrideFlags) -/* 127FC 800373FC 2463A650 */ addiu $v1, $v1, %lo(gOverrideFlags) -/* 12800 80037400 A08200AF */ sb $v0, 0xaf($a0) -/* 12804 80037404 8C620000 */ lw $v0, ($v1) -/* 12808 80037408 34420008 */ ori $v0, $v0, 8 -/* 1280C 8003740C AC620000 */ sw $v0, ($v1) -/* 12810 80037410 8CA30000 */ lw $v1, ($a1) -/* 12814 80037414 0800DD12 */ j .L80037448 -/* 12818 80037418 24020006 */ addiu $v0, $zero, 6 -.L8003741C: -/* 1281C 8003741C 3C048007 */ lui $a0, %hi(gGameStatusPtr) -/* 12820 80037420 2484419C */ addiu $a0, $a0, %lo(gGameStatusPtr) -/* 12824 80037424 8C830000 */ lw $v1, ($a0) -/* 12828 80037428 A06200AF */ sb $v0, 0xaf($v1) -/* 1282C 8003742C 3C03800A */ lui $v1, %hi(gOverrideFlags) -/* 12830 80037430 2463A650 */ addiu $v1, $v1, %lo(gOverrideFlags) -/* 12834 80037434 8C620000 */ lw $v0, ($v1) -/* 12838 80037438 34420008 */ ori $v0, $v0, 8 -/* 1283C 8003743C AC620000 */ sw $v0, ($v1) -/* 12840 80037440 8C830000 */ lw $v1, ($a0) -/* 12844 80037444 24020006 */ addiu $v0, $zero, 6 -.L80037448: -/* 12848 80037448 0800DD5B */ j .L8003756C_1296C -/* 1284C 8003744C A06200AC */ sb $v0, 0xac($v1) -.L80037450_12850: -/* 12850 80037450 3C108007 */ lui $s0, %hi(gGameStatusPtr) -/* 12854 80037454 2610419C */ addiu $s0, $s0, %lo(gGameStatusPtr) -/* 12858 80037458 8E040000 */ lw $a0, ($s0) -/* 1285C 8003745C 808200AF */ lb $v0, 0xaf($a0) -/* 12860 80037460 908300AF */ lbu $v1, 0xaf($a0) -/* 12864 80037464 10400003 */ beqz $v0, .L80037474 -/* 12868 80037468 2462FFFF */ addiu $v0, $v1, -1 -.L8003746C: -/* 1286C 8003746C 0800DD5B */ j .L8003756C_1296C -/* 12870 80037470 A08200AF */ sb $v0, 0xaf($a0) -.L80037474: -/* 12874 80037474 0C00AB00 */ jal general_heap_create -/* 12878 80037478 00000000 */ nop -/* 1287C 8003747C 0C047624 */ jal clear_render_tasks -/* 12880 80037480 00000000 */ nop -/* 12884 80037484 0C00B7BD */ jal create_cameras_a -/* 12888 80037488 00000000 */ nop -/* 1288C 8003748C 0C0482EC */ jal clear_entity_models -/* 12890 80037490 00000000 */ nop -/* 12894 80037494 0C047889 */ jal clear_animator_list -/* 12898 80037498 00000000 */ nop -/* 1289C 8003749C 0C00E12F */ jal clear_npcs -/* 128A0 800374A0 00000000 */ nop -/* 128A4 800374A4 0C050440 */ jal clear_hud_element_cache -/* 128A8 800374A8 00000000 */ nop -/* 128AC 800374AC 0C0B763E */ jal spr_init_sprites -/* 128B0 800374B0 0000202D */ daddu $a0, $zero, $zero -/* 128B4 800374B4 0C04432E */ jal clear_entity_data -/* 128B8 800374B8 24040001 */ addiu $a0, $zero, 1 -/* 128BC 800374BC 0C051CFC */ jal clear_windows -/* 128C0 800374C0 00000000 */ nop -/* 128C4 800374C4 3C04800A */ lui $a0, %hi(gOverrideFlags) -/* 128C8 800374C8 2484A650 */ addiu $a0, $a0, %lo(gOverrideFlags) -/* 128CC 800374CC 2403FFF7 */ addiu $v1, $zero, -9 -/* 128D0 800374D0 8C820000 */ lw $v0, ($a0) -/* 128D4 800374D4 8E050000 */ lw $a1, ($s0) -/* 128D8 800374D8 00431024 */ and $v0, $v0, $v1 -/* 128DC 800374DC 2403FFFD */ addiu $v1, $zero, -3 -/* 128E0 800374E0 00431024 */ and $v0, $v0, $v1 -/* 128E4 800374E4 AC820000 */ sw $v0, ($a0) -/* 128E8 800374E8 3C038007 */ lui $v1, %hi(D_800779C0) -/* 128EC 800374EC 846379C0 */ lh $v1, %lo(D_800779C0)($v1) -/* 128F0 800374F0 24020009 */ addiu $v0, $zero, 9 -/* 128F4 800374F4 1062000D */ beq $v1, $v0, .L8003752C -/* 128F8 800374F8 A4A0008E */ sh $zero, 0x8e($a1) -/* 128FC 800374FC 2862000A */ slti $v0, $v1, 0xa -/* 12900 80037500 10400005 */ beqz $v0, .L80037518 -/* 12904 80037504 24020005 */ addiu $v0, $zero, 5 -/* 12908 80037508 10620011 */ beq $v1, $v0, .L80037550 -/* 1290C 8003750C 2404000E */ addiu $a0, $zero, 0xe -/* 12910 80037510 0800DD64 */ j .L80037590 -/* 12914 80037514 00000000 */ nop -.L80037518: -/* 12918 80037518 2402000A */ addiu $v0, $zero, 0xa -/* 1291C 8003751C 10620008 */ beq $v1, $v0, .L80037540 -/* 12920 80037520 00000000 */ nop -/* 12924 80037524 0800DD64 */ j .L80037590 -/* 12928 80037528 00000000 */ nop -.L8003752C: -/* 1292C 8003752C A0A000A8 */ sb $zero, 0xa8($a1) -/* 12930 80037530 0C00CD3C */ jal set_game_mode -/* 12934 80037534 24040010 */ addiu $a0, $zero, 0x10 -/* 12938 80037538 0800DD64 */ j .L80037590 -/* 1293C 8003753C 00000000 */ nop -.L80037540: -/* 12940 80037540 0C00CD3C */ jal set_game_mode -/* 12944 80037544 24040011 */ addiu $a0, $zero, 0x11 -/* 12948 80037548 0800DD64 */ j .L80037590 -/* 1294C 8003754C 00000000 */ nop -.L80037550: -/* 12950 80037550 2402000B */ addiu $v0, $zero, 0xb -/* 12954 80037554 A4A00086 */ sh $zero, 0x86($a1) -/* 12958 80037558 A4A2008C */ sh $v0, 0x8c($a1) -/* 1295C 8003755C 0C00CD3C */ jal set_game_mode -/* 12960 80037560 A4A0008E */ sh $zero, 0x8e($a1) -/* 12964 80037564 0800DD64 */ j .L80037590 -/* 12968 80037568 00000000 */ nop -.L8003756C_1296C: -/* 1296C 8003756C 3C02800A */ lui $v0, %hi(gOverrideFlags) -/* 12970 80037570 8C42A650 */ lw $v0, %lo(gOverrideFlags)($v0) -/* 12974 80037574 30420008 */ andi $v0, $v0, 8 -/* 12978 80037578 14400005 */ bnez $v0, .L80037590 -/* 1297C 8003757C 00000000 */ nop -/* 12980 80037580 0C00E64C */ jal update_npcs -/* 12984 80037584 00000000 */ nop -/* 12988 80037588 0C00B500 */ jal update_cameras -/* 1298C 8003758C 00000000 */ nop -.L80037590: -/* 12990 80037590 8FBF0020 */ lw $ra, 0x20($sp) -/* 12994 80037594 8FB1001C */ lw $s1, 0x1c($sp) -/* 12998 80037598 8FB00018 */ lw $s0, 0x18($sp) -/* 1299C 8003759C 03E00008 */ jr $ra -/* 129A0 800375A0 27BD0028 */ addiu $sp, $sp, 0x28 diff --git a/ver/us/asm/nonmatchings/state_title_screen/title_screen_draw_logo.s b/ver/us/asm/nonmatchings/state_title_screen/title_screen_draw_logo.s deleted file mode 100644 index ab68b9e73c..0000000000 --- a/ver/us/asm/nonmatchings/state_title_screen/title_screen_draw_logo.s +++ /dev/null @@ -1,152 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel title_screen_draw_logo -/* 12D94 80037994 27BDFFF8 */ addiu $sp, $sp, -8 -/* 12D98 80037998 0000602D */ daddu $t4, $zero, $zero -/* 12D9C 8003799C 3C02800A */ lui $v0, %hi(gMasterGfxPos) -/* 12DA0 800379A0 2442A66C */ addiu $v0, $v0, %lo(gMasterGfxPos) -/* 12DA4 800379A4 0040402D */ daddu $t0, $v0, $zero -/* 12DA8 800379A8 3C19800A */ lui $t9, %hi(D_800A0978) -/* 12DAC 800379AC 27390978 */ addiu $t9, $t9, %lo(D_800A0978) -/* 12DB0 800379B0 3C0DF518 */ lui $t5, 0xf518 -/* 12DB4 800379B4 35AD6400 */ ori $t5, $t5, 0x6400 -/* 12DB8 800379B8 3C18E441 */ lui $t8, 0xe441 -/* 12DBC 800379BC 3C0F000F */ lui $t7, 0xf -/* 12DC0 800379C0 0180582D */ daddu $t3, $t4, $zero -/* 12DC4 800379C4 0180502D */ daddu $t2, $t4, $zero -/* 12DC8 800379C8 3C02DE00 */ lui $v0, 0xde00 -/* 12DCC 800379CC AFB00000 */ sw $s0, ($sp) -/* 12DD0 800379D0 8D030000 */ lw $v1, ($t0) -/* 12DD4 800379D4 3C01C2C8 */ lui $at, 0xc2c8 -/* 12DD8 800379D8 44810000 */ mtc1 $at, $f0 -/* 12DDC 800379DC 0060202D */ daddu $a0, $v1, $zero -/* 12DE0 800379E0 24630008 */ addiu $v1, $v1, 8 -/* 12DE4 800379E4 AD030000 */ sw $v1, ($t0) -/* 12DE8 800379E8 AC820000 */ sw $v0, ($a0) -/* 12DEC 800379EC 3C028007 */ lui $v0, %hi(D_80077A50) -/* 12DF0 800379F0 24427A50 */ addiu $v0, $v0, %lo(D_80077A50) -/* 12DF4 800379F4 AC820004 */ sw $v0, 4($a0) -/* 12DF8 800379F8 24620008 */ addiu $v0, $v1, 8 -/* 12DFC 800379FC 46006302 */ mul.s $f12, $f12, $f0 -/* 12E00 80037A00 00000000 */ nop -/* 12E04 80037A04 AD020000 */ sw $v0, ($t0) -/* 12E08 80037A08 3C02E700 */ lui $v0, 0xe700 -/* 12E0C 80037A0C AC620000 */ sw $v0, ($v1) -/* 12E10 80037A10 AC600004 */ sw $zero, 4($v1) -/* 12E14 80037A14 4600608D */ trunc.w.s $f2, $f12 -/* 12E18 80037A18 440E1000 */ mfc1 $t6, $f2 -/* 12E1C 80037A1C 00000000 */ nop -/* 12E20 80037A20 25C9000F */ addiu $t1, $t6, 0xf -.L80037A24: -/* 12E24 80037A24 3C04FD18 */ lui $a0, 0xfd18 -/* 12E28 80037A28 348400C7 */ ori $a0, $a0, 0xc7 -/* 12E2C 80037A2C 3C050731 */ lui $a1, 0x731 -/* 12E30 80037A30 34A5C004 */ ori $a1, $a1, 0xc004 -/* 12E34 80037A34 3C060031 */ lui $a2, 0x31 -/* 12E38 80037A38 34C6C004 */ ori $a2, $a2, 0xc004 -/* 12E3C 80037A3C 8D070000 */ lw $a3, ($t0) -/* 12E40 80037A40 8F220000 */ lw $v0, ($t9) -/* 12E44 80037A44 00E0182D */ daddu $v1, $a3, $zero -/* 12E48 80037A48 24E70008 */ addiu $a3, $a3, 8 -/* 12E4C 80037A4C 004A1021 */ addu $v0, $v0, $t2 -/* 12E50 80037A50 AD070000 */ sw $a3, ($t0) -/* 12E54 80037A54 AC620004 */ sw $v0, 4($v1) -/* 12E58 80037A58 24E20008 */ addiu $v0, $a3, 8 -/* 12E5C 80037A5C AC640000 */ sw $a0, ($v1) -/* 12E60 80037A60 AD020000 */ sw $v0, ($t0) -/* 12E64 80037A64 3C020700 */ lui $v0, 0x700 -/* 12E68 80037A68 ACE20004 */ sw $v0, 4($a3) -/* 12E6C 80037A6C 24E20010 */ addiu $v0, $a3, 0x10 -/* 12E70 80037A70 ACED0000 */ sw $t5, ($a3) -/* 12E74 80037A74 AD020000 */ sw $v0, ($t0) -/* 12E78 80037A78 3C02E600 */ lui $v0, 0xe600 -/* 12E7C 80037A7C ACE20008 */ sw $v0, 8($a3) -/* 12E80 80037A80 24E20018 */ addiu $v0, $a3, 0x18 -/* 12E84 80037A84 ACE0000C */ sw $zero, 0xc($a3) -/* 12E88 80037A88 AD020000 */ sw $v0, ($t0) -/* 12E8C 80037A8C 3C02F400 */ lui $v0, 0xf400 -/* 12E90 80037A90 ACE20010 */ sw $v0, 0x10($a3) -/* 12E94 80037A94 24E20020 */ addiu $v0, $a3, 0x20 -/* 12E98 80037A98 ACE50014 */ sw $a1, 0x14($a3) -/* 12E9C 80037A9C AD020000 */ sw $v0, ($t0) -/* 12EA0 80037AA0 3C02E700 */ lui $v0, 0xe700 -/* 12EA4 80037AA4 ACE20018 */ sw $v0, 0x18($a3) -/* 12EA8 80037AA8 24E20028 */ addiu $v0, $a3, 0x28 -/* 12EAC 80037AAC 24E30030 */ addiu $v1, $a3, 0x30 -/* 12EB0 80037AB0 ACE0001C */ sw $zero, 0x1c($a3) -/* 12EB4 80037AB4 AD020000 */ sw $v0, ($t0) -/* 12EB8 80037AB8 3C02F200 */ lui $v0, 0xf200 -/* 12EBC 80037ABC ACED0020 */ sw $t5, 0x20($a3) -/* 12EC0 80037AC0 ACE00024 */ sw $zero, 0x24($a3) -/* 12EC4 80037AC4 AD030000 */ sw $v1, ($t0) -/* 12EC8 80037AC8 ACE20028 */ sw $v0, 0x28($a3) -/* 12ECC 80037ACC 24E20038 */ addiu $v0, $a3, 0x38 -/* 12ED0 80037AD0 ACE6002C */ sw $a2, 0x2c($a3) -/* 12ED4 80037AD4 AD020000 */ sw $v0, ($t0) -/* 12ED8 80037AD8 25C20011 */ addiu $v0, $t6, 0x11 -/* 12EDC 80037ADC 01621021 */ addu $v0, $t3, $v0 -/* 12EE0 80037AE0 00021480 */ sll $v0, $v0, 0x12 -/* 12EE4 80037AE4 00021403 */ sra $v0, $v0, 0x10 -/* 12EE8 80037AE8 18400004 */ blez $v0, .L80037AFC -/* 12EEC 80037AEC 30420FFF */ andi $v0, $v0, 0xfff -/* 12EF0 80037AF0 00581025 */ or $v0, $v0, $t8 -/* 12EF4 80037AF4 0800DEC0 */ j .L80037B00 -/* 12EF8 80037AF8 ACE20030 */ sw $v0, 0x30($a3) -.L80037AFC: -/* 12EFC 80037AFC ACF80030 */ sw $t8, 0x30($a3) -.L80037B00: -/* 12F00 80037B00 00091480 */ sll $v0, $t1, 0x12 -/* 12F04 80037B04 00021403 */ sra $v0, $v0, 0x10 -/* 12F08 80037B08 18400004 */ blez $v0, .L80037B1C -/* 12F0C 80037B0C 30420FFF */ andi $v0, $v0, 0xfff -/* 12F10 80037B10 004F1025 */ or $v0, $v0, $t7 -/* 12F14 80037B14 0800DEC8 */ j .L80037B20 -/* 12F18 80037B18 AC620004 */ sw $v0, 4($v1) -.L80037B1C: -/* 12F1C 80037B1C AC6F0004 */ sw $t7, 4($v1) -.L80037B20: -/* 12F20 80037B20 8D030000 */ lw $v1, ($t0) -/* 12F24 80037B24 24620008 */ addiu $v0, $v1, 8 -/* 12F28 80037B28 AD020000 */ sw $v0, ($t0) -/* 12F2C 80037B2C 3C02E100 */ lui $v0, 0xe100 -/* 12F30 80037B30 AC620000 */ sw $v0, ($v1) -/* 12F34 80037B34 00091080 */ sll $v0, $t1, 2 -/* 12F38 80037B38 04430008 */ bgezl $v0, .L80037B5C -/* 12F3C 80037B3C AC600004 */ sw $zero, 4($v1) -/* 12F40 80037B40 00091480 */ sll $v0, $t1, 0x12 -/* 12F44 80037B44 00021343 */ sra $v0, $v0, 0xd -/* 12F48 80037B48 5C400001 */ bgtzl $v0, .L80037B50 -/* 12F4C 80037B4C 0000102D */ daddu $v0, $zero, $zero -.L80037B50: -/* 12F50 80037B50 00021023 */ negu $v0, $v0 -/* 12F54 80037B54 3042FFFF */ andi $v0, $v0, 0xffff -/* 12F58 80037B58 AC620004 */ sw $v0, 4($v1) -.L80037B5C: -/* 12F5C 80037B5C 3C040400 */ lui $a0, 0x400 -/* 12F60 80037B60 34840400 */ ori $a0, $a0, 0x400 -/* 12F64 80037B64 25290002 */ addiu $t1, $t1, 2 -/* 12F68 80037B68 256B0002 */ addiu $t3, $t3, 2 -/* 12F6C 80037B6C 254A0640 */ addiu $t2, $t2, 0x640 -/* 12F70 80037B70 8D020000 */ lw $v0, ($t0) -/* 12F74 80037B74 258C0001 */ addiu $t4, $t4, 1 -/* 12F78 80037B78 0040182D */ daddu $v1, $v0, $zero -/* 12F7C 80037B7C 24420008 */ addiu $v0, $v0, 8 -/* 12F80 80037B80 AD020000 */ sw $v0, ($t0) -/* 12F84 80037B84 3C02F100 */ lui $v0, 0xf100 -/* 12F88 80037B88 AC620000 */ sw $v0, ($v1) -/* 12F8C 80037B8C 29820038 */ slti $v0, $t4, 0x38 -/* 12F90 80037B90 1440FFA4 */ bnez $v0, .L80037A24 -/* 12F94 80037B94 AC640004 */ sw $a0, 4($v1) -/* 12F98 80037B98 3C03800A */ lui $v1, %hi(gMasterGfxPos) -/* 12F9C 80037B9C 2463A66C */ addiu $v1, $v1, %lo(gMasterGfxPos) -/* 12FA0 80037BA0 8C620000 */ lw $v0, ($v1) -/* 12FA4 80037BA4 0040202D */ daddu $a0, $v0, $zero -/* 12FA8 80037BA8 24420008 */ addiu $v0, $v0, 8 -/* 12FAC 80037BAC AC620000 */ sw $v0, ($v1) -/* 12FB0 80037BB0 3C02E700 */ lui $v0, 0xe700 -/* 12FB4 80037BB4 AC820000 */ sw $v0, ($a0) -/* 12FB8 80037BB8 AC800004 */ sw $zero, 4($a0) -/* 12FBC 80037BBC 8FB00000 */ lw $s0, ($sp) -/* 12FC0 80037BC0 03E00008 */ jr $ra -/* 12FC4 80037BC4 27BD0008 */ addiu $sp, $sp, 8 diff --git a/ver/us/undefined_syms.txt b/ver/us/undefined_syms.txt index cfe29424f5..a30311d243 100644 --- a/ver/us/undefined_syms.txt +++ b/ver/us/undefined_syms.txt @@ -1131,3 +1131,5 @@ gSpriteHeapPtr = 0x8034F800; heap_battleHead = 0x803DA800; D_80248380_kzn_19 = 0x80248380; D_8024854C_kzn_19 = 0x8024854C; + +D_80077A40 = 0x80077A40;