File menu & more (#658)

This commit is contained in:
Ethan Roseman 2022-03-10 04:55:38 -05:00 committed by GitHub
parent 395ca16da6
commit 9cd911765d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
54 changed files with 1631 additions and 2112 deletions

View File

@ -45,5 +45,6 @@
"**/.splat_cache": true,
".ninja*": true,
"ver/current": true
}
},
"C_Cpp.default.cStandard": "c89",
}

View File

@ -874,7 +874,7 @@ typedef struct BattleStatus {
/* 0x074 */ s32 unk_74;
/* 0x078 */ s8 totalStarPoints;
/* 0x079 */ s8 pendingStarPoints; /* how many to add */
/* 0x07A */ u8 incrementStarPointDelay; /* related to star points, set to 0x28 when they are dropped */
/* 0x07A */ s8 incrementStarPointDelay; /* related to star points, set to 0x28 when they are dropped */
/* 0x07B */ u8 damageTaken;
/* 0x07C */ s8 changePartnerAllowed;
/* 0x07D */ s8 menuStatus[4]; ///< -1 = automatically pick the first move, 0 = disabled, 1 = enabled
@ -1849,7 +1849,7 @@ typedef struct Actor {
/* 0x1B8 */ s8 currentHP;
/* 0x1B9 */ s8 maxHP;
/* 0x1BA */ char unk_1BA[2];
/* 0x1BC */ u8 hpFraction; /* used to render HP bar */
/* 0x1BC */ s8 hpFraction; /* used to render HP bar */
/* 0x1BD */ char unk_1BD[3];
/* 0x1C0 */ EvtScript* idleScriptSource;
/* 0x1C4 */ EvtScript* takeTurnScriptSource;
@ -1917,7 +1917,7 @@ typedef struct Actor {
/* 0x434 */ s16 renderMode; /* initially 0xD, set to 0x22 if any part is transparent */
/* 0x436 */ s16 hudElementDataIndex;
/* 0x438 */ s32 unk_438[2]; /* ??? see FUN_80253974 */
/* 0x440 */ struct HudElement* ptrDefuffIcon;
/* 0x440 */ struct HudElement* debuffIcon;
} Actor; // size = 0x444
typedef struct BackgroundHeader {
@ -2322,6 +2322,16 @@ typedef struct ActionCommandStatus {
/* 0x80 */ s8 mashMeterIntervals;
} ActionCommandStatus;
typedef struct Message {
/* 0x00 */ s32 unk_00;
/* 0x04 */ char unk_04[0x1C];
/* 0x20 */ s32 unk_20;
/* 0x24 */ s32 unk_24;
/* 0x28 */ char unk_28[0x1C];
/* 0x44 */ s32 unk_44;
/* 0x48 */ char unk_48[0x4];
} Message; // size = 0x4C
struct PopupMessage;
typedef void (*PopupMessageCallback)(struct PopupMessage* popup);
typedef struct PopupMessage {
@ -2334,7 +2344,7 @@ typedef struct PopupMessage {
/* 0x14 */ s16 duration;
/* 0x16 */ s8 unk_16;
/* 0x17 */ s8 unk_17;
/* 0x18 */ s32* message;
/* 0x18 */ Message* message;
} PopupMessage; // size = 0x1C
typedef struct unkPartnerStruct {

View File

@ -509,6 +509,7 @@ enum SoundIDs {
SOUND_MENU_BACK = 0x000000CA,
SOUND_D4 = 0x000000D4,
SOUND_D5 = 0x000000D5,
SOUND_D6 = 0x000000D6,
SOUND_HIT_PLAYER_NORMAL = 0x000000E1,
SOUND_HIT_PLAYER_FIRE = 0x000000E2,
SOUND_HIT_PLAYER_ICE = 0x000000E3,
@ -636,6 +637,7 @@ enum SoundIDs {
SOUND_SPELL_CAST4 = 0x000020D7,
SOUND_SPELL_CAST5 = 0x000020D8,
SOUND_20F6 = 0x000020F6,
SOUND_2101 = 0x00002101,
SOUND_2106 = 0x00002106,
SOUND_2107 = 0x00002107,
SOUND_2111 = 0x00002111,
@ -2415,27 +2417,67 @@ enum BattleStatusFlags2 {
BS_FLAGS2_8000000 = 0x08000000,
};
enum BattleStates {
BATTLE_STATE_NEGATIVE_1 = -1,
BATTLE_STATE_0 = 0,
BATTLE_STATE_NORMAL_START = 1,
BATTLE_STATE_FIRST_STRIKE = 2,
BATTLE_STATE_PARTNER_FIRST_STRIKE = 3,
BATTLE_STATE_ENEMY_FIRST_STRIKE = 4,
BATTLE_STATE_BEGIN_TURN = 5,
BATTLE_STATE_END_TURN = 6,
BATTLE_STATE_BEGIN_PLAYER_TURN = 7,
BATTLE_STATE_BEGIN_PARTNER_TURN = 8,
BATTLE_STATE_9 = 9,
BATTLE_STATE_SWITCH_TO_PLAYER = 10,
BATTLE_STATE_SWITCH_TO_PARTNER = 11,
BATTLE_STATE_PREPARE_MENU = 12,
BATTLE_STATE_PLAYER_MENU = 13,
BATTLE_STATE_PARTNER_MENU = 14,
BATTLE_STATE_PEACH_MENU = 15,
BATTLE_STATE_TWINK_MENU = 16,
BATTLE_STATE_SELECT_TARGET = 17,
BATTLE_STATE_PLAYER_MOVE = 18,
BATTLE_STATE_PARTNER_MOVE = 19,
BATTLE_STATE_NEXT_ENEMY = 20,
BATTLE_STATE_ENEMY_MOVE = 21,
BATTLE_STATE_END_PLAYER_TURN = 22,
BATTLE_STATE_END_PARTNER_TURN = 23,
BATTLE_STATE_RUN_AWAY = 24,
BATTLE_STATE_DEFEND = 25,
BATTLE_STATE_VICTORY = 26,
BATTLE_STATE_DEFEAT = 27,
BATTLE_STATE_28 = 28,
BATTLE_STATE_CHANGE_PARTNER = 29,
BATTLE_STATE_END_TRAINING_BATTLE = 30,
BATTLE_STATE_31 = 31,
BATTLE_STATE_END_BATTLE = 32,
BATTLE_STATE_CELEBRATION = 33,
BATTLE_STATE_34 = 34,
BATTLE_STATE_END_DEMO_BATTLE = 35,
};
enum BattleStates2 {
BATTLE_STATES2_UNK_0 = 0x00000000,
BATTLE_STATES2_UNK_1 = 0x00000001,
BATTLE_STATES2_UNK_2 = 0x00000002,
BATTLE_STATES2_UNK_3 = 0x00000003,
BATTLE_STATES2_UNK_4 = 0x00000004,
BATTLE_STATES2_UNK_5 = 0x00000005,
BATTLE_STATES2_UNK_6 = 0x00000006,
BATTLE_STATES2_UNK_7 = 0x00000007,
BATTLE_STATES2_UNK_8 = 0x00000008,
BATTLE_STATES2_UNK_9 = 0x00000009,
BATTLE_STATES2_PLAYER_DEFEATED = 0x0000000A,
BATTLE_STATES2_UNK_B = 0x0000000B,
BATTLE_STATES2_UNK_C = 0x0000000C,
BATTLE_STATES2_UNK_F = 0x0000000F,
BATTLE_STATES2_UNK_10 = 0x00000010,
BATTLE_STATES2_UNK_14 = 0x00000014,
BATTLE_STATES2_UNK_15 = 0x00000015,
BATTLE_STATES2_UNK_16 = 0x00000016,
BATTLE_STATES2_UNK_1E = 0x0000001E,
BATTLE_STATES2_UNK_46 = 0x00000046,
BATTLE_STATE2_UNK_0 = 0x00000000,
BATTLE_STATE2_UNK_1 = 0x00000001,
BATTLE_STATE2_UNK_2 = 0x00000002,
BATTLE_STATE2_UNK_3 = 0x00000003,
BATTLE_STATE2_UNK_4 = 0x00000004,
BATTLE_STATE2_UNK_5 = 0x00000005,
BATTLE_STATE2_UNK_6 = 0x00000006,
BATTLE_STATE2_UNK_7 = 0x00000007,
BATTLE_STATE2_UNK_8 = 0x00000008,
BATTLE_STATE2_UNK_9 = 0x00000009,
BATTLE_STATE2_PLAYER_DEFEATED = 0x0000000A,
BATTLE_STATE2_UNK_B = 0x0000000B,
BATTLE_STATE2_UNK_C = 0x0000000C,
BATTLE_STATE2_UNK_F = 0x0000000F,
BATTLE_STATE2_UNK_10 = 0x00000010,
BATTLE_STATE2_UNK_14 = 0x00000014,
BATTLE_STATE2_UNK_15 = 0x00000015,
BATTLE_STATE2_UNK_16 = 0x00000016,
BATTLE_STATE2_UNK_1E = 0x0000001E,
BATTLE_STATE2_UNK_46 = 0x00000046,
};
enum DebuffTypes {

View File

@ -11,10 +11,38 @@ extern BSS s32 filemenu_8024C088;
extern BSS s32 filemenu_heldButtons;
extern BSS s32 filemenu_8024C090;
extern BSS s32 filemenu_loadedFileIdx;
extern BSS s32 filemenu_8024C098[2];
extern BSS s8 filemenu_8024C098;
extern BSS s32 filemenu_8024C09C;
extern BSS s32 filemenu_cursorHudElemID[1];
extern BSS s32 filemenu_8024C0A4[3];
extern BSS s32 filemenu_hudElemIDs[20];
extern BSS s32 filemenu_8024C100[8];
extern BSS s32 filemenu_8024C100[4];
extern BSS u8 filemenu_8024C110[8];
#define WINDOW_UPDATE_FUNC(name) void (name)( \
s32 windowIdx,\
s32* flags,\
s32* posX, s32* posY, s32* posZ,\
f32* scaleX, f32* scaleY,\
f32* rotX, f32* rotY, f32* rotZ,\
s32* darkening,\
s32* opacity);\
WINDOW_UPDATE_FUNC(filemenu_update_show_name_input);
WINDOW_UPDATE_FUNC(filemenu_update_show_options_left);
WINDOW_UPDATE_FUNC(filemenu_update_show_options_right);
WINDOW_UPDATE_FUNC(filemenu_update_show_options_bottom);
WINDOW_UPDATE_FUNC(filemenu_update_hidden_options_left);
WINDOW_UPDATE_FUNC(filemenu_update_hidden_options_right);
WINDOW_UPDATE_FUNC(filemenu_update_hidden_title);
WINDOW_UPDATE_FUNC(filemenu_update_hidden_options_bottom);
WINDOW_UPDATE_FUNC(filemenu_update_hidden_with_rotation);
WINDOW_UPDATE_FUNC(filemenu_update_select_file);
WINDOW_UPDATE_FUNC(filemenu_update_show_name_confirm);
WINDOW_UPDATE_FUNC(main_menu_window_update);
#endif

View File

@ -90,9 +90,11 @@ void pause_handle_input(s32 buttonsPressed, s32 buttonsHeld);
void pause_cleanup(void);
// file menu stuff
void filemenu_set_selected(MenuPanel* menu, s32 col, s32 row);
void filemenu_set_cursor_alpha(s32 arg0);
void filemenu_set_cursor_goal_pos(s32 windowIndex, s32 posX, s32 posY);
s8* filemenu_get_menu_message(s32 idx);
void filemenu_draw_message(s8*, s32 posX, s32 posY, s32 alpha, s32 color, s32 flags);
Message* filemenu_get_menu_message(s32 idx);
void filemenu_draw_message(Message*, s32 posX, s32 posY, s32 alpha, s32 color, s32 flags);
void update_enemy_shadows(void);
void update_hero_shadows(void);
@ -188,6 +190,8 @@ s32 disable_player_input(void);
void func_80027088(s32);
void set_time_freeze_mode(s32);
s32 get_map_IDs_by_name(const char* mapName, s16* areaID, s16* mapID);
void get_dpad_input_radial(f32* angle, f32* magnitude);
@ -306,6 +310,7 @@ void btl_state_update_player_move(void);
void btl_state_draw_player_move(void);
void btl_state_update_end_player_turn(void);
void btl_state_update_partner_move(void);
void btl_state_draw_end_player_turn(void);
void btl_state_draw_partner_move(void);
void btl_state_update_end_partner_turn(void);
void btl_state_draw_end_partner_turn(void);
@ -500,6 +505,7 @@ s32 get_collider_type_by_id(s32 colliderID);
void suggest_player_anim_setUnkFlag(s32 arg0);
void suggest_player_anim_clearUnkFlag(s32 arg0);
void subtract_hp(s32 amt);
void draw_status_ui(void);
void open_status_menu_long(void);
void suspend_all_group(s32 groupFlags);
@ -519,6 +525,7 @@ void play_movement_dust_effects(s32 var0, f32 xPos, f32 yPos, f32 zPos, f32 angl
void func_80138D88(s32, s32, s32, s32, f32);
void func_8013A4D0(void);
void btl_draw_popup_messages(void);
void btl_cam_set_target_pos(f32, f32, f32);
void btl_cam_unfreeze(void);
@ -531,6 +538,7 @@ s32 btl_check_player_defeated(void);
void btl_show_battle_message(s32, s32);
void btl_update_ko_status(void);
void reset_actor_turn_info(void);
void btl_draw_prim_quad(u8 r, u8 g, u8 b, u8 a, u16 left, u16 top, u16 arg6, u16 arg7);
void reset_all_actor_sounds(Actor*);
void decrement_status_menu_disabled(void);
void increment_status_menu_disabled(void);
@ -696,6 +704,7 @@ void enable_player_shadow(void);
s32 get_msg_lines(s32 messageID);
void set_window_properties(s32 panelID, s32 posX, s32 posY, s32 width, s32 height, u8, void* drawContents, void* drawContentsArg, s8 parent);
void set_window_update(s32 panelID, WindowUpdateFunc);
void set_windows_visible(s32 groupIdx);
void snd_stop_sound(s32 soundID);
void snd_start_sound_with_shift(s32 soundID, u8 volume, u8 pan, s16 pitchShift);
void snd_adjust_sound_with_shift(s32 soundID, u8 volume, u8 pan, s16 pitchShift);
@ -838,6 +847,7 @@ void func_80266AF8(Actor*);
void func_80266E14(ActorPart*);
void func_80268770(s32, s32, s32);
void func_80268C9C(void);
void func_80268E88(void);
s32 check_block_input(s32 buttonMask);
void func_802B6CF0_E2B3A0(void);
void func_80269160(void);

View File

@ -90,6 +90,7 @@ extern s16 D_8010CD10;
extern s16 D_8010CD12;
extern s32 D_8010CD20;
extern s32 D_801595A0;
extern BackgroundHeader gBackgroundImage;
extern MessagePrintState* gCurrentPrintContext;
@ -181,6 +182,8 @@ extern u8 D_802D9D71; // player alpha2 copy?
extern DisplayContext D_80164000[];
extern WindowStyle gWindowStyles[];
extern MessagePrintState gMessagePrinters[3];
extern f32 gCurtainScale;

View File

@ -2,14 +2,6 @@
#include "filemenu.h"
#include "hud_element.h"
extern s32 D_80241ECC;
extern MenuPanel D_8024A098;
extern MenuPanel D_8024A114;
extern MenuPanel D_8024A158;
extern MenuPanel D_8024A1D8;
extern s32 D_8024BA60;
extern s32 D_8024BA98;
void filemenu_draw_cursor(MenuPanel* menu, s32 baseX, s32 baseY, s32 width, s32 height, s32 opacity, s32 darkening);
void filemenu_draw_contents_copy_arrow(
MenuPanel* menu,
@ -18,6 +10,14 @@ void filemenu_draw_contents_copy_arrow(
s32 opacity, s32 darkening
);
extern s32 D_80241ECC;
extern MenuPanel D_8024A098;
extern MenuPanel D_8024A114;
extern MenuPanel D_8024A158;
extern MenuPanel D_8024A1D8;
extern s32 D_8024BA60;
extern s32 D_8024BA98;
s32* D_80249B80[] = { &D_80241ECC };
MenuPanel* filemenu_menus[4] = { &D_8024A098, &D_8024A114, &D_8024A158, &D_8024A1D8 };
s32 D_80249B94 = 160;
@ -42,8 +42,8 @@ s16 D_80249CB8[10] = { -2, -8, -18, -30, -42, -55, -70, -85, -100, -115 };
s16 D_80249CCC[10] = { -1, -3, -7, -12, -17, -22, -27, -32, -37, -42 };
s16 D_80249CE0[10] = { -1, -3, -7, -12, -17, -22, -27, -32, -37, -42 };
s16 D_80249CF4[16] = { 180, 173, 161, 148, 134, 120, 105, 91, 77, 62, 48, 34, 21, 9, 2, 0 };
s16 D_80249D14[] = { 0, 2, 9, 21, 34, 48, 62, 77, 91, 105, 120, 134, 148, 161, 173, 180 };
s16 D_80249D34[] = { 185, 160, 135, 110, 85, 60, 37, 17, 5, 0 };
s16 D_80249D14[16] = { 0, 2, 9, 21, 34, 48, 62, 77, 91, 105, 120, 134, 148, 161, 173, 180 };
s16 D_80249D34[10] = { 185, 160, 135, 110, 85, 60, 37, 17, 5, 0 };
s16 D_80249D48[10] = { 0, 5, 17, 37, 60, 85, 110, 135, 160, 185};
s32 D_80249D4C = 0; // padding?
s32 D_80249D60[] = { 0x028001E0, 0x01FF0000, 0x028001E0, 0x01FF0000, };
@ -61,11 +61,15 @@ BSS s32 filemenu_8024C088;
BSS s32 filemenu_heldButtons;
BSS s32 filemenu_8024C090;
BSS s32 filemenu_loadedFileIdx;
BSS s32 filemenu_8024C098[2];
BSS s8 filemenu_8024C098;
BSS s32 filemenu_8024C09C;
BSS s32 filemenu_cursorHudElemID[1];
BSS s32 filemenu_8024C0A4[3];
BSS s32 filemenu_hudElemIDs[20];
BSS s32 filemenu_8024C100[8];
BSS s32 filemenu_8024C100[4];
BSS u8 filemenu_8024C110[8];
s32 func_80244BC4(void);
INCLUDE_ASM(s32, "163400", mainmenu_draw_rect);
@ -179,7 +183,53 @@ void filemenu_update_cursor(void) {
filemenu_cursorGoalAlpha2 = 0xFF;
}
// problem with second loop declaration
#ifdef NON_MATCHING
void filemenu_update(void) {
MenuPanel* menu = filemenu_menus[filemenu_8024C098];
s32 i;
for (i = 0x2C; i < ARRAY_COUNT(gWindows); i++) {
if ((gWindows[i].parent == -1 || gWindows[i].parent == 0x2C) &&
(gWindows[i].flags & WINDOW_FLAGS_INITIAL_ANIMATION))
{
break;
}
}
if (i >= ARRAY_COUNT(gWindows)) {
filemenu_heldButtons = gGameStatusPtr->heldButtons;
filemenu_pressedButtons = gGameStatusPtr->pressedButtons;
} else {
filemenu_heldButtons = 0;
filemenu_pressedButtons = 0;
}
if (filemenu_pressedButtons & BUTTON_B) {
filemenu_pressedButtons &= ~BUTTON_A;
}
if (filemenu_heldButtons & BUTTON_B) {
filemenu_heldButtons &= ~BUTTON_A;
}
if (menu->initialized) {
if (menu->fpHandleInput != NULL) {
menu->fpHandleInput(menu);
}
}
for (i = 0; i < ARRAY_COUNT(filemenu_menus); i++) {
menu = filemenu_menus[i];
if (menu->initialized) {
if (menu->fpUpdate != NULL) {
menu->fpUpdate(menu);
}
}
}
}
#else
INCLUDE_ASM(s32, "163400", filemenu_update);
#endif
void func_8024330C(
s32 windowIdx,
@ -498,11 +548,98 @@ void filemenu_update_hidden_with_rotation(
}
}
INCLUDE_ASM(s32, "163400", filemenu_update_select_file);
void filemenu_update_select_file(
s32 windowIdx,
s32* flags,
s32* posX, s32* posY, s32* posZ,
f32* scaleX, f32* scaleY,
f32* rotX, f32* rotY, f32* rotZ,
s32* darkening,
s32* opacity
) {
Window* window = &gWindows[windowIdx];
Window* parent = &gWindows[window->parent];
s32 updateCounter = window->updateCounter;
f32 temp_f4 = updateCounter / 16.0f;
s32 widthDelta = (parent->width / 2) - (window->width / 2);
s32 heightDelta = (parent->height / 2) - (window->height / 2) - 34;
INCLUDE_ASM(s32, "163400", filemenu_update_deselect_file);
if (updateCounter < 16) {
*posX += -window->pos.x + (((f32) (widthDelta - window->pos.x) * temp_f4) + window->pos.x);
*posY += -window->pos.y + (((f32) (heightDelta - window->pos.y) * temp_f4) + window->pos.y);
} else {
*posX += -window->pos.x + ((f32) (widthDelta - window->pos.x) + window->pos.x);
*posY += -window->pos.y + ((f32) (heightDelta - window->pos.y) + window->pos.y);
window->flags &= ~WINDOW_FLAGS_INITIAL_ANIMATION;
}
}
INCLUDE_ASM(s32, "163400", filemenu_update_show_name_confirm);
void filemenu_update_deselect_file(
s32 windowIdx,
s32* flags,
s32* posX, s32* posY, s32* posZ,
f32* scaleX, f32* scaleY,
f32* rotX, f32* rotY, f32* rotZ,
s32* darkening,
s32* opacity
) {
Window* window = &gWindows[windowIdx];
s32 updateCounter = window->updateCounter;
f32 temp_f4 = 1.0f - (updateCounter / 16.0f);
if (updateCounter < 16) {
*posX += -window->pos.x + (((80 - window->pos.x) * temp_f4) + window->pos.x);
*posY += -window->pos.y + (((36 - window->pos.y) * temp_f4) + window->pos.y);
} else {
*posX += -window->pos.x + ((80 - window->pos.x) * 0.0f + window->pos.x);
*posY += -window->pos.y + ((36 - window->pos.y) * 0.0f + window->pos.y);
window->flags &= ~WINDOW_FLAGS_INITIAL_ANIMATION;
}
}
void filemenu_update_show_name_confirm(
s32 windowIdx,
s32* flags,
s32* posX, s32* posY, s32* posZ,
f32* scaleX, f32* scaleY,
f32* rotX, f32* rotY, f32* rotZ,
s32* darkening,
s32* opacity
) {
Window* window = &gWindows[windowIdx];
s32 updateCounter = window->updateCounter;
s32 temp_s1;
s32 temp_s2;
s32 temp_s3;
u32 temp_v1;
gDPPipeSync(gMasterGfxPos++);
gDPSetCycleType(gMasterGfxPos++, G_CYC_1CYCLE);
gDPSetCombineMode(gMasterGfxPos++, G_CC_PRIMITIVE, G_CC_PRIMITIVE);
gDPSetRenderMode(gMasterGfxPos++, G_RM_CLD_SURF, G_RM_CLD_SURF2);
gDPSetPrimColor(gMasterGfxPos++, 0, 0, 0, 0, 0, 140);
if (updateCounter < 10) {
temp_s2 = updateCounter * 48;
temp_s3 = updateCounter * 12;
mainmenu_draw_rect(0, 0, 1280, temp_s2, 0, 0, 0, 0, 0);
temp_s1 = (SCREEN_HEIGHT - temp_s3) * 4;
mainmenu_draw_rect(0, temp_s1, 1280, 960, 0, 0, 0, 0, 0);
mainmenu_draw_rect(0, temp_s2, updateCounter * 64, temp_s1, 0, 0, 0, 0, 0);
mainmenu_draw_rect((SCREEN_WIDTH - (updateCounter * 16)) * 4, temp_s2, 1280, temp_s1, 0, 0, 0, 0, 0);
} else {
mainmenu_draw_rect(0, 0, 1280, 960, 0, 0, 0, 0, 0);
}
temp_v1 = updateCounter - 10;
if (temp_v1 < 10) {
window->flags &= ~WINDOW_FLAGS_HIDDEN;
*posY -= D_80249D34[temp_v1];
}
if (updateCounter >= 20) {
window->flags &= ~WINDOW_FLAGS_INITIAL_ANIMATION;
}
}
void filemenu_update_hidden_name_confirm(
s32 windowIdx,
@ -559,13 +696,12 @@ void filemenu_cleanup(void) {
}
panelIt = filemenu_menus;
for (i = 0; i < ARRAY_COUNT(filemenu_menus); i++) {
for (i = 0; i < ARRAY_COUNT(filemenu_menus); i++, panelIt++) {
if ((*panelIt)->initialized) {
if ((*panelIt)->fpCleanup != NULL) {
(*panelIt)->fpCleanup(*panelIt);
}
}
panelIt++;
}
for (i = 0x2C; i < ARRAY_COUNT(gWindows); i++) {
@ -577,4 +713,12 @@ void filemenu_cleanup(void) {
func_80244BC4();
}
INCLUDE_ASM(s32, "163400", func_80244BC4);
s32 func_80244BC4() {
if (filemenu_menus[0]->page == 0 && filemenu_8024C098 == 1 && filemenu_menus[1]->selected == 0) {
return 2;
} else if (filemenu_menus[0]->page == 0 && filemenu_menus[0]->selected < 4) {
return 1;
} else {
return 0;
}
}

View File

@ -1,12 +1,14 @@
#include "common.h"
#include "filemenu.h"
#include "hud_element.h"
#include "audio.h"
extern SaveMetadata D_800779C4[4];
extern u8 D_80077A24[4];
extern s8* D_80249E20[14];
extern HudScript* D_80249E20[14];
extern MenuWindowBP D_80249EA0[14];
extern s8 D_8024C098;
extern s8 D_8024C090;
void filemenu_draw_contents_title(
MenuPanel* menu,
@ -143,8 +145,68 @@ void filemenu_draw_contents_option_right(
}
}
void filemenu_draw_contents_file_info(s32 arg0,
MenuPanel* menu,
s32 baseX, s32 baseY,
s32 width, s32 height,
s32 opacity, s32 darkening
) {
SaveMetadata* save;
s32 temp_s0;
s32 temp_s0_3;
s32 temp_s1_2;
s32 temp_s3_2;
s32 temp_s3;
s32 id;
s32 i;
INCLUDE_ASM(s32, "165490", filemenu_draw_contents_file_info);
if (D_80077A24[arg0] == 0) {
filemenu_draw_message(filemenu_get_menu_message(6), baseX + 50, baseY + 20, 0xFF, 0xA, 0);
return;
}
save = &D_800779C4[arg0];
if (save->unk_00 == 0) {
filemenu_draw_message(filemenu_get_menu_message(0xC), baseX + 30, baseY + 20, 0xFF, 0xA, 0);
return;
}
filemenu_draw_message(filemenu_get_menu_message(7), baseX + 0x22, baseY + 10, 0xFF, 0xA, 1);
temp_s3_2 = save->unk_06;
temp_s3 = temp_s3_2;
temp_s0 = temp_s3 / 10;
draw_number(temp_s0, baseX + 79, baseY + 10, 1, 0xA, 0xFF, 2);
draw_number(temp_s3 - (temp_s0 * 10), baseX + 88, baseY + 10, 1, 0xA, 0xFF, 2);
filemenu_draw_message(filemenu_get_menu_message(8), baseX + 11, baseY + 24, 0xFF, 0xA, 1);
temp_s3_2 = save->unk_00;
if (temp_s3_2 > 21599999) {
temp_s3_2 = 21599999;
}
draw_number((temp_s3_2 / 2160000) % 10, baseX + 76, baseY + 24, 1, 0xA, 0xFF, 2);
temp_s1_2 = temp_s3_2 / 216000;
draw_number(temp_s1_2 - ((temp_s3_2 / 2160000) * 10), baseX + 85, baseY + 24, 1, 0xA, 0xFF, 2);
filemenu_draw_message(filemenu_get_menu_message(0xD), baseX + 95, baseY + 23, 0xFF, 0xA, 1);
filemenu_draw_message(filemenu_get_menu_message(0xD), baseX + 95, baseY + 18, 0xFF, 0xA, 1);
temp_s0_3 = temp_s3_2 / 36000;
draw_number(temp_s0_3 - (temp_s1_2 * 6), baseX + 100, baseY + 24, 1, 0xA, 0xFF, 2);
draw_number((temp_s3_2 / 3600) - (temp_s0_3 * 10), baseX + 109, baseY + 24, 1, 0xA, 0xFF, 2);
for (i = 0; i < 7; i++) {
if (i < D_800779C4[arg0].unk_04) {
id = filemenu_hudElemIDs[i];
} else {
id = filemenu_hudElemIDs[i + 7];
}
set_hud_element_render_pos(id, baseX + 17 + (i * 16), baseY + 44);
if (i == 0) {
draw_hud_element_3(id);
} else {
draw_hud_element_2(id);
}
}
}
void filemenu_draw_contents_file_title(
s32 fileIdx,
@ -153,7 +215,7 @@ void filemenu_draw_contents_file_title(
s32 width, s32 height,
s32 opacity, s32 darkening)
{
if (D_8024C098 == 0 && menu->selected == fileIdx) {
if (filemenu_8024C098 == 0 && menu->selected == fileIdx) {
filemenu_set_cursor_goal_pos(fileIdx + 60, baseX - 3, baseY + 8);
}
@ -300,9 +362,486 @@ void filemenu_main_init(MenuPanel* menu) {
static const f32 padding[] = { 0.0f }; // TODO remove when the following func is matched
void filemenu_main_handle_input(MenuPanel* menu);
INCLUDE_ASM(s32, "165490", filemenu_main_handle_input);
// tons of issues
#ifdef NON_EQUIVALENT
void filemenu_main_handle_input(MenuPanel* menu) {
s32 originalSelected = menu->selected;
s16* posPtr;
s32 x, y;
s32 i;
extern s32 gWindowStyles[];
MenuPanel* temp_a0;
s32 temp_a1_2;
s32 phi_v1_2;
s32 temp;
if (filemenu_heldButtons & BUTTON_STICK_LEFT) {
loop_1:
menu->col--;
if (menu->col >= 0) {
if (menu->selected == MENU_PANEL_SELECTED_GRID_DATA(menu)) {
goto loop_1;
}
} else {
menu->col = 0;
}
}
if (filemenu_heldButtons & BUTTON_STICK_RIGHT) {
loop_7:
menu->col++;
if (menu->col < menu->numCols) {
if (menu->selected == MENU_PANEL_SELECTED_GRID_DATA(menu)) {
goto loop_7;
}
} else {
menu->col = menu->numCols - 1;
}
}
if (filemenu_heldButtons & BUTTON_STICK_UP) {
menu->row--;
if (menu->row < 0) {
menu->row = 0;
}
}
if (filemenu_heldButtons & BUTTON_STICK_DOWN) {
menu->row++;
if (menu->row >= menu->numRows) {
menu->row = menu->numRows - 1;
}
}
switch (menu->page) {
case 0:
if (menu->col == 1 && (u8) menu->row < 2) {
menu->col = 0;
}
break;
case 1: // TODO required to duplicate cases 1-4 instead of using fallthrough
if (menu->col == 1 && (u8) menu->row < 2) {
menu->col = 0;
}
if (menu->row == 2) {
menu->col = 1;
}
break;
case 2:
if (menu->col == 1 && (u8) menu->row < 2) {
menu->col = 0;
}
if (menu->row == 2) {
menu->col = 1;
}
break;
case 3:
if (menu->col == 1 && (u8) menu->row < 2) {
menu->col = 0;
}
if (menu->row == 2) {
menu->col = 1;
}
break;
case 4:
if (menu->col == 1 && (u8) menu->row < 2) {
menu->col = 0;
}
if (menu->row == 2) {
menu->col = 1;
}
break;
}
menu->selected = MENU_PANEL_SELECTED_GRID_DATA(menu);
if (originalSelected != menu->selected) {
sfx_play_sound(SOUND_2101);
}
if (menu->page == 0) {
s32 originalOutputMode = gGameStatusPtr->soundOutputMode;
if (filemenu_pressedButtons & BUTTON_Z) {
gGameStatusPtr->soundOutputMode = SOUND_OUT_STEREO;
}
if (filemenu_pressedButtons & BUTTON_R) {
gGameStatusPtr->soundOutputMode = SOUND_OUT_MONO;
}
if (originalOutputMode != gGameStatusPtr->soundOutputMode) {
sfx_play_sound(SOUND_MENU_CHANGE_TAB);
if (gGameStatusPtr->soundOutputMode != SOUND_OUT_MONO) {
audio_set_stereo();
} else {
audio_set_mono();
}
}
}
if ((filemenu_pressedButtons & 0x1000) && menu->page == 0 && menu->selected < 4) {
filemenu_pressedButtons = 0x8000;
}
if (filemenu_pressedButtons & 0x8000) {
s32 cond = FALSE;
switch (menu->page) {
case 0:
if (menu->selected < 4 && D_80077A24[menu->selected] == 0) {
cond = TRUE;
}
if (cond) {
for (i = 0; i < ARRAY_COUNT(filemenu_8024C110); i++) {
filemenu_8024C110[i] = 0xF7;
}
D_8024C090 = 0;
set_window_update(0x30, filemenu_update_show_name_input);
set_window_update(0x31, filemenu_update_show_name_input);
set_window_update(0x2D, filemenu_update_hidden_with_rotation);
set_window_update(0x33, filemenu_update_hidden_with_rotation);
set_window_update(0x34, filemenu_update_hidden_with_rotation);
set_window_update(0x35, filemenu_update_hidden_with_rotation);
set_window_update(0x36, filemenu_update_hidden_with_rotation);
set_window_update(0x37, filemenu_update_hidden_with_rotation);
set_window_update(0x35, filemenu_update_hidden_with_rotation);
set_window_update(0x38, filemenu_update_hidden_with_rotation);
set_window_update(0x39, filemenu_update_hidden_with_rotation);
set_window_update(0x3A, filemenu_update_hidden_with_rotation);
set_window_update(0x3B, filemenu_update_hidden_with_rotation);
sfx_play_sound(SOUND_MENU_NEXT);
filemenu_8024C098 = 3;
temp_a0 = filemenu_menus[filemenu_8024C098];
temp_a0->page = 0;
filemenu_set_selected(temp_a0, 0, 0);
break;
}
if (menu->selected == 6) {
set_window_update(0x33, filemenu_update_hidden_options_left);
set_window_update(0x34, filemenu_update_hidden_options_right);
set_window_update(0x35, filemenu_update_hidden_options_bottom);
set_window_update(0x36, filemenu_update_hidden_options_bottom);
set_window_update(0x37, filemenu_update_hidden_options_bottom);
set_window_update(0x38, filemenu_update_hidden_options_left);
set_window_update(0x39, filemenu_update_hidden_options_right);
set_window_update(0x3A, filemenu_update_hidden_options_left);
set_window_update(0x3B, filemenu_update_hidden_options_right);
set_window_update(0x2D, filemenu_update_hidden_title);
sfx_play_sound(SOUND_D6);
set_game_mode(0xF);
} else if (menu->selected == 4) {
sfx_play_sound(SOUND_MENU_NEXT);
menu->page = 1;
filemenu_set_selected(menu, 1, 2);
set_window_update(0x33, filemenu_update_hidden_options_left);
set_window_update(0x34, filemenu_update_hidden_options_right);
set_window_update(0x35, filemenu_update_hidden_options_bottom);
set_window_update(0x37, filemenu_update_hidden_options_bottom);
} else if (menu->selected == 5) {
sfx_play_sound(SOUND_MENU_NEXT);
menu->page = 3;
filemenu_set_selected(menu, 1, 2);
set_window_update(0x33, filemenu_update_hidden_options_left);
set_window_update(0x34, filemenu_update_hidden_options_right);
set_window_update(0x35, filemenu_update_hidden_options_bottom);
set_window_update(0x37, filemenu_update_hidden_options_bottom);
} else {
sfx_play_sound(SOUND_MENU_NEXT);
set_window_update(0x2D, filemenu_update_hidden_with_rotation);
set_window_update(0x33, filemenu_update_hidden_with_rotation);
set_window_update(0x34, filemenu_update_hidden_with_rotation);
set_window_update(0x35, filemenu_update_hidden_with_rotation);
set_window_update(0x36, filemenu_update_hidden_with_rotation);
set_window_update(0x37, filemenu_update_hidden_with_rotation);
set_window_update(0x35, filemenu_update_hidden_with_rotation);
set_window_update(0x38, filemenu_update_hidden_with_rotation);
set_window_update(0x39, filemenu_update_hidden_with_rotation);
set_window_update(0x3A, filemenu_update_hidden_with_rotation);
set_window_update(0x3B, filemenu_update_hidden_with_rotation);
set_window_update(menu->selected + 56, filemenu_update_select_file);
sfx_play_sound(SOUND_MENU_NEXT);
set_window_update(0x32, 1);
gWindows[50].pos.y = 143;
gWindows[50].width = 69;
gWindows[50].height = 44;
posPtr = &gWindows[50].pos.x;
if (gWindows[50].parent != -1) {
x = (gWindows[gWindows[50].parent].width / 2) - 34;
} else {
x = 126;
}
*posPtr = x;
gWindows[46].pos.y = -29;
gWindows[46].width = 192;
gWindows[46].height = 25;
posPtr = &gWindows[46].pos.x;
if (gWindows[46].parent != -1) {
x = (gWindows[gWindows[46].parent].width / 2) - 96;
} else {
x = 64;
}
*posPtr = x;
filemenu_8024C098 = 1;
temp_a0 = filemenu_menus[filemenu_8024C098];
temp_a0->page = 4;
filemenu_set_selected(temp_a0, 0, 0);
}
break;
case 1:
if (menu->selected == 6) {
sfx_play_sound(SOUND_MENU_NEXT);
menu->page = 0;
set_window_update(0x33, filemenu_update_show_options_left);
set_window_update(0x34, filemenu_update_show_options_right);
set_window_update(0x35, filemenu_update_show_options_bottom);
set_window_update(0x37, filemenu_update_show_options_bottom);
filemenu_set_selected(menu, 0, 2);
} else if (menu->selected < 4) {
if (D_80077A24[menu->selected] != 0) {
sfx_play_sound(SOUND_MENU_NEXT);
set_window_update(0x32, filemenu_update_show_name_confirm);
gWindows[50].pos.y = 121;
gWindows[50].width = 69;
gWindows[50].height = 44;
posPtr = &gWindows[50].pos.x;
if (gWindows[50].parent != -1) {
x = (gWindows[gWindows[50].parent].width / 2) - 34;
} else {
x = 126;
}
*posPtr = x;
gWindows[46].pos.y = -29;
gWindows[46].width = 118;
gWindows[46].height = 25;
posPtr = &gWindows[46].pos.x;
if (gWindows[46].parent != -1) {
x = (gWindows[gWindows[46].parent].width / 2) - 59;
} else {
x = 101;
}
*posPtr = x;
filemenu_8024C098 = 1;
temp_a0 = filemenu_menus[filemenu_8024C098];
temp_a0->page = 0;
filemenu_set_selected(temp_a0, 0, 1);
} else {
sfx_play_sound(SOUND_MENU_ERROR);
}
}
break;
case 3:
if (menu->selected == 6) {
sfx_play_sound(SOUND_MENU_NEXT);
menu->page = 0;
set_window_update(0x33, filemenu_update_show_options_left);
set_window_update(0x34, filemenu_update_show_options_right);
set_window_update(0x35, filemenu_update_show_options_bottom);
set_window_update(0x37, filemenu_update_show_options_bottom);
filemenu_set_selected(menu, 0, 1);
} else if (menu->selected < 4) {
if (D_80077A24[menu->selected] != 0) {
sfx_play_sound(SOUND_MENU_NEXT);
menu->page = 4;
filemenu_loadedFileIdx = menu->selected;
} else {
sfx_play_sound(SOUND_MENU_ERROR);
}
}
break;
case 4:
if (menu->selected == 6) {
sfx_play_sound(SOUND_MENU_NEXT);
menu->page = 3;
filemenu_set_selected(menu, 0, 2);
} else if (menu->selected < 4) {
if (filemenu_loadedFileIdx == menu->selected) {
sfx_play_sound(SOUND_MENU_ERROR);
} else {
filemenu_iterFileIdx = menu->selected;
if (D_80077A24[menu->selected] == 0) {
sfx_play_sound(SOUND_MENU_NEXT);
filemenu_8024C098 = 2;
filemenu_menus[filemenu_8024C098]->page = 2;
gWindows[47].width = 154;
gWindows[47].height = 39;
posPtr = &gWindows[47].pos.x;
if (gWindows[47].parent != -1) {
x = (gWindows[gWindows[47].parent].width / 2) - 77;
} else {
x = 83;
}
*posPtr = x;
temp_a1_2 = gWindows[47].height / 2;
posPtr = &gWindows[47].pos.y;
if (gWindows[47].parent != -1) {
y = (gWindows[gWindows[47].parent].height / 2) - temp_a1_2;
} else {
y = 120 - temp_a1_2;
}
*posPtr = y;
set_window_update(0x2F, 1);
set_window_update(0x32, 2);
fio_load_game(filemenu_loadedFileIdx);
D_800779C4[filemenu_iterFileIdx] = D_800779C4[filemenu_loadedFileIdx];
fio_save_game(filemenu_iterFileIdx, filemenu_loadedFileIdx, D_800779C4);
D_80077A24[filemenu_iterFileIdx] = 1;
} else {
sfx_play_sound(SOUND_MENU_NEXT);
set_window_update(0x32, filemenu_update_show_name_confirm);
gWindows[50].pos.y = 121;
gWindows[50].width = 69;
gWindows[50].height = 44;
posPtr = &gWindows[50].pos.x;
if (gWindows[50].parent != -1) {
x = (gWindows[gWindows[50].parent].width / 2) - 34;
} else {
x = 126;
}
*posPtr = x;
gWindows[46].pos.y = -43;
gWindows[46].width = 182;
gWindows[46].height = 39;
posPtr = &gWindows[46].pos.x;
if (gWindows[46].parent != -1) {
x = (gWindows[gWindows[46].parent].width / 2) - 91;
} else {
x = 69;
}
*posPtr = x;
filemenu_8024C098 = 1;
temp_a0 = filemenu_menus[filemenu_8024C098];
temp_a0->page = 3;
filemenu_set_selected(temp_a0, 0, 1);
}
}
}
break;
case 2:
if (menu->selected == 6) {
sfx_play_sound(SOUND_MENU_NEXT);
set_game_mode(0xD);
} else if (menu->selected < 4) {
if (D_80077A24[menu->selected] == 0) {
sfx_play_sound(SOUND_MENU_NEXT);
filemenu_8024C098 = 2;
filemenu_menus[filemenu_8024C098]->page = 1;
set_window_update(0x2C, main_menu_window_update);
set_window_update(0x2F, 1);
set_window_update(0x32, 2);
fio_save_game(menu->selected);
D_80077A24[menu->selected] = 1;
} else {
sfx_play_sound(SOUND_MENU_NEXT);
set_window_update(0x32, filemenu_update_show_name_confirm);
gWindows[50].pos.y = 127;
gWindows[50].width = 69;
gWindows[50].height = 44;
posPtr = &gWindows[50].pos.x;
if (gWindows[50].parent != -1) {
x = (gWindows[gWindows[50].parent].width / 2) - 34;
} else {
x = 126;
}
*posPtr = x;
gWindows[46].pos.y = -50;
gWindows[46].width = 148;
gWindows[46].height = 38;
posPtr = &gWindows[46].pos.x;
if (gWindows[46].parent != -1) {
x = (gWindows[gWindows[46].parent].width / 2) - 74;
} else {
x = 86;
}
*posPtr = x;
filemenu_8024C098 = 1;
temp_a0 = filemenu_menus[filemenu_8024C098];
temp_a0->page = 1;
filemenu_set_selected(temp_a0, 0, 1);
}
}
break;
}
}
if (filemenu_pressedButtons & 0x4000) {
switch (menu->page) {
case 0:
filemenu_set_selected(menu, 2, 2);
break;
case 1:
filemenu_set_selected(menu, 1, 2);
break;
case 2:
filemenu_set_selected(menu, 1, 2);
break;
case 3:
filemenu_set_selected(menu, 1, 2);
break;
case 4:
filemenu_set_selected(menu, 1, 2);
break;
}
switch (menu->page) {
case 0:
set_window_update(0x33, filemenu_update_hidden_options_left);
set_window_update(0x34, filemenu_update_hidden_options_right);
set_window_update(0x35, filemenu_update_hidden_options_bottom);
set_window_update(0x36, filemenu_update_hidden_options_bottom);
set_window_update(0x37, filemenu_update_hidden_options_bottom);
set_window_update(0x38, filemenu_update_hidden_options_left);
set_window_update(0x39, filemenu_update_hidden_options_right);
set_window_update(0x3A, filemenu_update_hidden_options_left);
set_window_update(0x3B, filemenu_update_hidden_options_right);
set_window_update(0x2D, filemenu_update_hidden_title);
sfx_play_sound(SOUND_D6);
set_game_mode(0xF);
break;
case 1:
menu->page = 0;
filemenu_set_selected(menu, 0, 2);
set_window_update(0x33, filemenu_update_show_options_left);
set_window_update(0x34, filemenu_update_show_options_right);
set_window_update(0x35, filemenu_update_show_options_bottom);
set_window_update(0x37, filemenu_update_show_options_bottom);
sfx_play_sound(SOUND_MENU_BACK);
break;
case 3:
menu->page = 0;
filemenu_set_selected(menu, 1, 2);
set_window_update(0x33, filemenu_update_show_options_left);
set_window_update(0x34, filemenu_update_show_options_right);
set_window_update(0x35, filemenu_update_show_options_bottom);
set_window_update(0x37, filemenu_update_show_options_bottom);
sfx_play_sound(SOUND_MENU_BACK);
break;
case 4:
menu->page = 3;
filemenu_set_selected(menu, (filemenu_loadedFileIdx % 2) * 2, filemenu_loadedFileIdx / 2);
sfx_play_sound(SOUND_MENU_BACK);
break;
case 2:
sfx_play_sound(SOUND_MENU_BACK);
set_game_mode(0xD);
break;
}
}
}
#else
INCLUDE_ASM(s32, "165490", filemenu_main_handle_input);
#endif
INCLUDE_ASM(s32, "165490", filemenu_main_update);

View File

@ -3,9 +3,106 @@
extern MenuWindowBP D_8024A0CC[2];
INCLUDE_ASM(s32, "167570", filemenu_yesno_draw_options_contents);
void filemenu_yesno_draw_options_contents(MenuPanel* tab, s32 posX, s32 posY) {
s32 xOffset1;
s32 yOffset1;
s32 xOffset2;
s32 yOffset2;
s32 cursorGoalXOffset;
s32 cursorGoalYOffset;
INCLUDE_ASM(s32, "167570", filemenu_yesno_draw_prompt_contents);
switch (tab->page) {
case 0:
xOffset1 = 28;
yOffset1 = 4;
xOffset2 = 28;
yOffset2 = 21;
break;
case 1:
xOffset1 = 28;
yOffset1 = 4;
xOffset2 = 28;
yOffset2 = 21;
break;
case 2:
xOffset1 = 28;
yOffset1 = 4;
xOffset2 = 28;
yOffset2 = 21;
break;
case 3:
xOffset1 = 28;
yOffset1 = 4;
xOffset2 = 28;
yOffset2 = 21;
break;
case 4:
xOffset1 = 28;
yOffset1 = 4;
xOffset2 = 28;
yOffset2 = 21;
break;
}
filemenu_draw_message(filemenu_get_menu_message(0xE), posX + xOffset1, posY + yOffset1, 0xFF, 0, 0);
filemenu_draw_message(filemenu_get_menu_message(0xF), posX + xOffset2, posY + yOffset2, 0xFF, 0, 0);
if (filemenu_8024C098 == 1) {
if (tab->selected == 0) {
cursorGoalXOffset = xOffset1 - 10;
cursorGoalYOffset = yOffset1 + 8;
} else {
cursorGoalXOffset = xOffset2 - 10;
cursorGoalYOffset = yOffset2 + 8;
}
filemenu_set_cursor_goal_pos(0x32, posX + cursorGoalXOffset, posY + cursorGoalYOffset);
}
}
void filemenu_yesno_draw_prompt_contents(MenuPanel* tab, s32 posX, s32 posY) {
s32 xOffset;
s32 i;
switch (tab->page) {
case 0:
filemenu_draw_message(filemenu_get_menu_message(0x10), posX + 10, posY + 4, 0xFF, 0, 0);
filemenu_draw_message(filemenu_get_menu_message(0x16), posX + 60, posY + 4, 0xFF, 0, 0);
draw_number(filemenu_menus[0]->selected + 1, posX + 98, posY + 6, 0, 0, 0xFF, 3);
filemenu_draw_message(filemenu_get_menu_message(0x21), posX + 99, posY + 4, 0xFF, 0, 0);
break;
case 3:
filemenu_draw_message(filemenu_get_menu_message(0x16), posX + 10, posY + 4, 0xFF, 0, 0);
draw_number(filemenu_menus[0]->selected + 1, posX + 48, posY + 6, 0, 0, 0xFF, 3);
filemenu_draw_message(filemenu_get_menu_message(0x17), posX + 49, posY + 4, 0xFF, 0, 0);
filemenu_draw_message(filemenu_get_menu_message(0x18), posX + 10, posY + 18, 0xFF, 0, 0);
break;
case 1:
filemenu_draw_message(filemenu_get_menu_message(0x11), posX + 10, posY + 4, 0xFF, 0, 0);
filemenu_draw_message(filemenu_get_menu_message(0x12), posX + 10, posY + 18, 0xFF, 0, 0);
break;
case 2:
filemenu_draw_message(filemenu_get_menu_message(0x13), posX + 10, posY + 6, 0xFF, 0, 0);
for (i = ARRAY_COUNT(filemenu_8024C110) - 1; i >= 0; i--) {
if (filemenu_8024C110[i] != 0xF7) {
break;
}
}
xOffset = (147 - (i * 11)) / 2;
filemenu_draw_file_name(&filemenu_8024C110, i + 1, posX + xOffset, posY + 22, 0xFF, 0, 8, 0xB);
xOffset += (i + 1) * 11;
filemenu_draw_message(filemenu_get_menu_message(0x14), posX + xOffset, posY + 22, 0xFF, 0, 0);
filemenu_draw_message(filemenu_get_menu_message(0x15), posX + 70, posY + 38, 0xFF, 0, 0);
break;
case 4:
filemenu_draw_message(filemenu_get_menu_message(0x19), posX + 10, posY + 4, 0xFF, 0, 0);
filemenu_draw_message(filemenu_get_menu_message(0x16), posX + 127, posY + 4, 0xFF, 0, 0);
draw_number(filemenu_menus[0]->selected + 1, posX + 165, posY + 6, 0, 0, 0xFF, 3);
filemenu_draw_message(filemenu_get_menu_message(0x21), posX + 162, posY + 4, 0xFF, 0, 0);
break;
}
}
void filemenu_yesno_init(MenuPanel* tab) {
s32 i;
@ -18,6 +115,8 @@ void filemenu_yesno_init(MenuPanel* tab) {
tab->initialized = TRUE;
}
static const f32 padding = 0.0f;
INCLUDE_ASM(s32, "167570", filemenu_yesno_handle_input);
void filemenu_yesno_update(void) {

View File

@ -4,13 +4,8 @@
extern MenuWindowBP D_8024A134[1];
extern s32 filemenu_iterFileIdx;
extern s32 filemenu_pressedButtons;
extern s8 D_8024C090;
extern s32 filemenu_loadedFileIdx;
extern s8 D_8024C098;
extern s32 D_8024C100_C09980[3];
extern s32 D_8024C110;
void filemenu_update_show_options_left(s32 windowIndex, s32* flags, s32* posX, s32* posY, s32* posZ, f32* scaleX,
f32* scaleY, f32* rotX, f32* rotY, f32* rotZ, s32* darkening, s32* opacity);
@ -49,15 +44,15 @@ void filemenu_info_draw_message_contents(MenuPanel* menu, s32 baseX, s32 baseY)
filemenu_set_cursor_alpha(0);
}
void filemenu_info_init(s8* tab) {
void filemenu_info_init(MenuPanel* tab) {
s32 i;
for (i = 0; i < ARRAY_COUNT(D_8024A134); i++) {
D_8024A134[i].tab = tab;
}
setup_pause_menu_tab(D_8024A134, 1);
*tab = 1;
setup_pause_menu_tab(D_8024A134, ARRAY_COUNT(D_8024A134));
tab->initialized = TRUE;
}
void filemenu_info_handle_input(void) {
@ -65,7 +60,7 @@ void filemenu_info_handle_input(void) {
MenuPanel* menu = filemenu_menus[0];
s32 page;
D_8024C098 = 0;
filemenu_8024C098 = 0;
page = menu->page;
switch(page) {
@ -116,7 +111,7 @@ void filemenu_draw_contents_file_create_header(MenuPanel* menu, s32 baseX, s32 b
s32 tempAmt;
filemenu_draw_message(filemenu_get_menu_message(0x20), baseX + 10, baseY + 6, 255, 0, 0);
filemenu_draw_file_name(&D_8024C110, 8, baseX + 36, baseY + 22, 255, 0, 0, 0xB);
filemenu_draw_file_name(filemenu_8024C110, 8, baseX + 36, baseY + 22, 255, 0, 0, 0xB);
xOffset = 41;
for (i = 0; i < 8; i++) {
@ -129,7 +124,7 @@ void filemenu_draw_contents_file_create_header(MenuPanel* menu, s32 baseX, s32 b
}
tempAmt = 8;
if (D_8024C098 == 3) {
if (filemenu_8024C098 == 3) {
s32 phi_v0 = 122;
if (D_8024C090 != tempAmt) {

View File

@ -1,9 +1,28 @@
#include "common.h"
extern Message* gFileMenuMessages[35];
INCLUDE_ASM(s32, "169BE0", filemenu_draw_char);
INCLUDE_ASM(s32, "169BE0", filemenu_draw_message);
// data migration
#ifdef NON_MATCHING
Message* filemenu_get_menu_message(s32 idx) {
return gFileMenuMessages[idx];
}
#else
INCLUDE_ASM(s32, "169BE0", filemenu_get_menu_message);
#endif
INCLUDE_ASM(s32, "169BE0", filemenu_draw_file_name);
void filemenu_draw_file_name(u8* arg0, s32 arg1, s32 arg2, s32 arg3, s32 arg4, s32 arg5, s32 arg6, s32 arg7) {
s32 i;
for (i = 0; i < arg1; i++) {
u32 temp = arg0[i];
if (temp != 0xF7) {
filemenu_draw_message(temp, arg2 + (i * arg7), arg3, arg4, arg5, arg6);
}
}
}

View File

@ -70,7 +70,7 @@ void btl_set_state(s32 battleState) {
s32 flags = gBattleStatus.flags2;
gBattleState = battleState;
D_800DC4E0 = 1;
gBattleState2 = BATTLE_STATES2_UNK_0;
gBattleState2 = BATTLE_STATE2_UNK_0;
flags &= BS_FLAGS2_40;
if (flags) {
@ -119,7 +119,7 @@ void btl_state_update_switch_to_player(void) {
Actor* partner = gBattleStatus.partnerActor;
s32 i;
if (gBattleState2 == BATTLE_STATES2_UNK_0) {
if (gBattleState2 == BATTLE_STATE2_UNK_0) {
gBattleStatus.flags1 &= ~BS_FLAGS1_80000;
reset_actor_turn_info();
gBattleStatus.selectedMoveID = MOVE_NONE;
@ -156,7 +156,7 @@ void btl_state_update_switch_to_partner(void) {
Actor* partner = gBattleStatus.partnerActor;
s32 i;
if (gBattleState2 == BATTLE_STATES2_UNK_0) {
if (gBattleState2 == BATTLE_STATE2_UNK_0) {
reset_actor_turn_info();
gBattleStatus.flags1 |= BS_FLAGS1_80000;
gBattleStatus.selectedMoveID = MOVE_NONE;
@ -205,9 +205,9 @@ void btl_state_update_prepare_menu(void) {
if (battleStatus->flags1 & BS_FLAGS1_80000) {
btl_set_state(14);
} else if (gBattleState2 == BATTLE_STATES2_UNK_46) {
} else if (gBattleState2 == BATTLE_STATE2_UNK_46) {
btl_set_state(13);
gBattleState2 = BATTLE_STATES2_UNK_46;
gBattleState2 = BATTLE_STATE2_UNK_46;
} else {
btl_set_state(13);
}
@ -238,7 +238,7 @@ void btl_state_update_victory(void) {
Evt* script;
switch (gBattleState2) {
case BATTLE_STATES2_UNK_0:
case BATTLE_STATE2_UNK_0:
player->flags &= ~(ACTOR_FLAG_8000000 | ACTOR_FLAG_4000000);
if (partner != NULL) {
partner->flags &= ~(ACTOR_FLAG_8000000 | ACTOR_FLAG_4000000);
@ -246,7 +246,7 @@ void btl_state_update_victory(void) {
battleStatus->unk_8C = 0;
if (battleStatus->outtaSightActive == 0) {
gBattleState2 = BATTLE_STATES2_UNK_5;
gBattleState2 = BATTLE_STATE2_UNK_5;
} else {
if (battleStatus->outtaSightActive > 0) {
D_8029F254 = 1;
@ -256,25 +256,25 @@ void btl_state_update_victory(void) {
partner->onTurnChangeScript = script;
partner->onTurnChangeID = script->id;
script->owner1.enemyID = 0x100;
gBattleState2 = BATTLE_STATES2_UNK_1;
gBattleState2 = BATTLE_STATE2_UNK_1;
}
break;
case BATTLE_STATES2_UNK_1:
case BATTLE_STATE2_UNK_1:
if (!does_script_exist(partner->onTurnChangeID)) {
battleStatus->outtaSightActive = 0;
gBattleState2 = BATTLE_STATES2_UNK_5;
gBattleState2 = BATTLE_STATE2_UNK_5;
}
break;
}
switch (gBattleState2) {
case BATTLE_STATES2_UNK_5:
case BATTLE_STATE2_UNK_5:
player->flags &= ~(ACTOR_FLAG_8000000 | ACTOR_FLAG_4000000);
if (partner != NULL) {
partner->flags &= ~(ACTOR_FLAG_8000000 | ACTOR_FLAG_4000000);
}
gBattleState2 = BATTLE_STATES2_UNK_B;
gBattleState2 = BATTLE_STATE2_UNK_B;
gBattleStatus.flags2 &= ~BS_FLAGS2_2;
gBattleStatus.flags2 &= ~BS_FLAGS2_4;
gBattleStatus.flags2 &= ~BS_FLAGS2_8;
@ -283,7 +283,7 @@ void btl_state_update_victory(void) {
gBattleStatus.flags1 &= ~BS_FLAGS1_8;
if (player->koStatus == 0xD) {
dispatch_event_player(EVENT_34);
gBattleState2 = BATTLE_STATES2_PLAYER_DEFEATED;
gBattleState2 = BATTLE_STATE2_PLAYER_DEFEATED;
}
player->debuff = 0;
player->staticStatus = 0;
@ -291,12 +291,12 @@ void btl_state_update_victory(void) {
player->transStatus = 0;
player->koStatus = 0;
player->koDuration = 0;
player->ptrDefuffIcon->ptrPropertyList[15] = 0;
player->debuffIcon->ptrPropertyList[15] = 0;
if (partner != NULL) {
if (partner->koStatus == 0xD) {
dispatch_event_partner(EVENT_34);
gBattleState2 = BATTLE_STATES2_PLAYER_DEFEATED;
gBattleState2 = BATTLE_STATE2_PLAYER_DEFEATED;
}
partner->debuff = 0;
partner->staticStatus = 0;
@ -304,10 +304,10 @@ void btl_state_update_victory(void) {
partner->transStatus = 0;
partner->koStatus = 0;
partner->koDuration = 0;
partner->ptrDefuffIcon->ptrPropertyList[15] = 0;
partner->debuffIcon->ptrPropertyList[15] = 0;
}
break;
case BATTLE_STATES2_PLAYER_DEFEATED:
case BATTLE_STATE2_PLAYER_DEFEATED:
if (player->onHitScript == NULL || !does_script_exist(player->onHitID)) {
player->onHitScript = NULL;
if (partner != NULL) {
@ -317,14 +317,14 @@ void btl_state_update_victory(void) {
break;
}
}
gBattleState2 = BATTLE_STATES2_UNK_B;
gBattleState2 = BATTLE_STATE2_UNK_B;
}
break;
}
if (gBattleState2 == BATTLE_STATES2_UNK_B) {
if (gBattleState2 == BATTLE_STATE2_UNK_B) {
if (partner == NULL || !(gBattleStatus.flags1 & BS_FLAGS1_100000)) {
gBattleState2 = BATTLE_STATES2_UNK_2;
gBattleState2 = BATTLE_STATE2_UNK_2;
} else {
partner->state.currentPos.x = partner->currentPos.x;
partner->state.currentPos.z = partner->currentPos.z;
@ -332,11 +332,11 @@ void btl_state_update_victory(void) {
partner->state.goalPos.z = player->currentPos.z;
partner->state.moveTime = 4;
partner->state.angle = 0.0f;
gBattleState2 = BATTLE_STATES2_UNK_C;
gBattleState2 = BATTLE_STATE2_UNK_C;
}
}
if (gBattleState2 == BATTLE_STATES2_UNK_C) {
if (gBattleState2 == BATTLE_STATE2_UNK_C) {
if (partner->state.moveTime != 0) {
partner->currentPos.x += (partner->state.goalPos.x - partner->currentPos.x)
/ partner->state.moveTime;
@ -364,12 +364,12 @@ void btl_state_update_victory(void) {
partner->homePos.z = partner->currentPos.z;
player->homePos.x = player->currentPos.x;
player->homePos.z = player->currentPos.z;
gBattleState2 = BATTLE_STATES2_UNK_2;
gBattleState2 = BATTLE_STATE2_UNK_2;
gBattleStatus.flags1 &= ~BS_FLAGS1_100000;
}
}
if (gBattleState2 == BATTLE_STATES2_UNK_2) {
if (gBattleState2 == BATTLE_STATE2_UNK_2) {
func_8024E40C(2);
if (battleStatus->nextMerleeSpellType == 3) {
if ((s8) battleStatus->totalStarPoints == 0) {
@ -384,29 +384,29 @@ void btl_state_update_victory(void) {
script->owner1.enemyID = 0;
}
}
gBattleState2 = BATTLE_STATES2_UNK_3;
gBattleState2 = BATTLE_STATE2_UNK_3;
D_8029F248 = 0;
gBattleStatus.flags1 &= ~BS_FLAGS1_2;
}
if (gBattleState2 == BATTLE_STATES2_UNK_3) {
if (gBattleState2 == BATTLE_STATE2_UNK_3) {
if (D_8029F248 != 0) {
D_8029F248--;
} else if (player->takeTurnScript == NULL || !does_script_exist(player->takeTurnID)) {
player->takeTurnScript = NULL;
if (battleStatus->nextMerleeSpellType != 3) {
gBattleState2 = BATTLE_STATES2_UNK_4;
gBattleState2 = BATTLE_STATE2_UNK_4;
} else {
battleStatus->incrementStarPointDelay = 0x14;
battleStatus->nextMerleeSpellType = 0;
gBattleState2 = BATTLE_STATES2_UNK_4;
gBattleState2 = BATTLE_STATE2_UNK_4;
battleStatus->pendingStarPoints = battleStatus->totalStarPoints
+ battleStatus->pendingStarPoints + battleStatus->pendingStarPoints;
}
}
}
if (gBattleState2 == BATTLE_STATES2_UNK_4 && (s8) battleStatus->pendingStarPoints <= 0) {
if (gBattleState2 == BATTLE_STATE2_UNK_4 && (s8) battleStatus->pendingStarPoints <= 0) {
if (gBattleStatus.flags1 & BS_FLAGS1_1000000) {
gBattleStatus.flags1 &= ~BS_FLAGS1_40000;
}
@ -446,15 +446,15 @@ void btl_state_update_defend(void) {
Evt* script;
switch (gBattleState2) {
case BATTLE_STATES2_UNK_0:
case BATTLE_STATE2_UNK_0:
gBattleStatus.unk_8C = 0;
gBattleStatus.battlePhase = PHASE_USE_DEFEND;
player->takeTurnScript = script = start_script(PlayerScriptDispatcher, 10, 0);
player->takeTurnID = script->id;
gBattleState2 = BATTLE_STATES2_UNK_1;
gBattleState2 = BATTLE_STATE2_UNK_1;
script->owner1.enemyID = 0;
break;
case BATTLE_STATES2_UNK_1:
case BATTLE_STATE2_UNK_1:
if (!does_script_exist(player->takeTurnID) && gBattleStatus.unk_8C == 0) {
btl_set_state(0x16);
}
@ -478,7 +478,7 @@ void btl_state_update_defeat(void) {
Evt* script;
switch (gBattleState2) {
case BATTLE_STATES2_UNK_0:
case BATTLE_STATE2_UNK_0:
battleStatus->flags1 &= ~BS_FLAGS1_8;
battleStatus->unk_8C = 0;
battleStatus->flags2 &= ~BS_FLAGS2_2;
@ -497,7 +497,7 @@ void btl_state_update_defeat(void) {
remove_status_debuff(player->hudElementDataIndex);
player->koStatus = 0;
player->koDuration = 0;
player->ptrDefuffIcon->ptrPropertyList[15] = 0;
player->debuffIcon->ptrPropertyList[15] = 0;
}
func_8024E40C(0x19);
@ -514,9 +514,9 @@ void btl_state_update_defeat(void) {
partner->takeTurnID = script->id;
script->owner1.enemyID = 0x100;
}
gBattleState2 = BATTLE_STATES2_UNK_1;
gBattleState2 = BATTLE_STATE2_UNK_1;
break;
case BATTLE_STATES2_UNK_1:
case BATTLE_STATE2_UNK_1:
if (!does_script_exist(player->takeTurnID) && battleStatus->unk_8C == 0) {
if (find_item(ITEM_LIFE_SHROOM) >= 0) {
battleStatus->battlePhase = PHASE_USE_LIFE_SHROOM;
@ -524,20 +524,20 @@ void btl_state_update_defeat(void) {
player->takeTurnScript = script;
player->takeTurnID = script->id;
script->owner1.enemyID = 0;
gBattleState2 = BATTLE_STATES2_UNK_2;
gBattleState2 = BATTLE_STATE2_UNK_2;
} else {
gBattleState2 = BATTLE_STATES2_PLAYER_DEFEATED;
gBattleState2 = BATTLE_STATE2_PLAYER_DEFEATED;
}
}
break;
case BATTLE_STATES2_UNK_2:
case BATTLE_STATE2_UNK_2:
if (!does_script_exist(player->takeTurnID) && battleStatus->unk_8C == 0) {
gBattleState2 = BATTLE_STATES2_PLAYER_DEFEATED;
gBattleState2 = BATTLE_STATE2_PLAYER_DEFEATED;
}
break;
}
if (gBattleState2 == BATTLE_STATES2_PLAYER_DEFEATED) {
if (gBattleState2 == BATTLE_STATE2_PLAYER_DEFEATED) {
currentEncounter->battleOutcome = OUTCOME_PLAYER_LOST;
if (!(gBattleStatus.flags2 & BS_FLAGS2_2000000)) {
bgm_set_song(0, -1, 0, 0x5DC, 8);
@ -570,7 +570,7 @@ void btl_state_update_change_partner(void) {
s32 i;
switch (gBattleState2) {
case BATTLE_STATES2_UNK_0:
case BATTLE_STATE2_UNK_0:
player->flags &= ~ACTOR_FLAG_8000000;
partner->flags &= ~ACTOR_FLAG_8000000;
battleStatus->unk_8C = 0;
@ -591,9 +591,9 @@ void btl_state_update_change_partner(void) {
battleStatus->unk_5C[0] = -1;
D_8029F248 = 0xA;
gBattleState2 = BATTLE_STATES2_UNK_2;
gBattleState2 = BATTLE_STATE2_UNK_2;
case BATTLE_STATES2_UNK_2:
case BATTLE_STATE2_UNK_2:
if (D_8029F248 != 0) {
D_8029F248--;
break;
@ -606,9 +606,9 @@ void btl_state_update_change_partner(void) {
state->unk_18.x = partner->currentPos.x;
state->unk_18.y = 0.0f;
state->unk_18.z = partner->currentPos.z;
gBattleState2 = BATTLE_STATES2_UNK_3;
gBattleState2 = BATTLE_STATE2_UNK_3;
break;
case BATTLE_STATES2_UNK_3:
case BATTLE_STATE2_UNK_3:
if (!does_script_exist(battleStatus->controlScriptID)) {
btl_delete_actor(partner);
playerData->currentPartner = battleStatus->unk_1AA[2];
@ -623,10 +623,10 @@ void btl_state_update_change_partner(void) {
partner->currentPos.x = player->currentPos.x;
partner->currentPos.y = player->currentPos.y + 25.0f;
partner->currentPos.z = player->currentPos.z;
gBattleState2 = BATTLE_STATES2_UNK_4;
gBattleState2 = BATTLE_STATE2_UNK_4;
}
break;
case BATTLE_STATES2_UNK_4:
case BATTLE_STATE2_UNK_4:
partner = battleStatus->partnerActor;
if (partner != NULL) {
if (!does_script_exist(partner->takeTurnID)) {
@ -640,9 +640,9 @@ void btl_state_update_change_partner(void) {
battleStatus->controlScript = script;
battleStatus->controlScriptID = script->id;
script->owner1.enemyID = 0x100;
gBattleState2 = BATTLE_STATES2_UNK_5;
gBattleState2 = BATTLE_STATE2_UNK_5;
break;
case BATTLE_STATES2_UNK_5:
case BATTLE_STATE2_UNK_5:
if (!does_script_exist(battleStatus->controlScriptID)) {
partner = battleStatus->partnerActor;
if (partner != NULL) {
@ -654,18 +654,18 @@ void btl_state_update_change_partner(void) {
script->owner1.enemyID = 0x100;
}
}
gBattleState2 = BATTLE_STATES2_UNK_6;
gBattleState2 = BATTLE_STATE2_UNK_6;
}
break;
case BATTLE_STATES2_UNK_6:
case BATTLE_STATE2_UNK_6:
partner = battleStatus->partnerActor;
if (partner == NULL || partner->onTurnChanceScriptSource == NULL
|| !does_script_exist(partner->onTurnChangeID)) {
func_8024E40C(2);
gBattleState2 = BATTLE_STATES2_UNK_7;
gBattleState2 = BATTLE_STATE2_UNK_7;
}
break;
case BATTLE_STATES2_UNK_7:
case BATTLE_STATE2_UNK_7:
if (battleStatus->unk_8C == 0) {
gBattleStatus.flags2 &= ~BS_FLAGS2_10;
if (!(gBattleStatus.flags1 & BS_FLAGS1_80000)) {
@ -696,7 +696,7 @@ void btl_state_draw_player_move(void) {
INCLUDE_ASM(s32, "16F740", btl_state_update_end_player_turn);
void filemenu_main_update_code(void) {
void btl_state_draw_end_player_turn(void) {
}
@ -713,7 +713,7 @@ void btl_state_update_partner_move(void) {
s32 i;
switch (gBattleState2) {
case BATTLE_STATES2_UNK_0:
case BATTLE_STATE2_UNK_0:
if (partner == NULL) {
btl_set_state(9);
} else {
@ -739,10 +739,10 @@ void btl_state_update_partner_move(void) {
}
}
func_8024E40C(2);
gBattleState2 = BATTLE_STATES2_UNK_2;
gBattleState2 = BATTLE_STATE2_UNK_2;
}
break;
case BATTLE_STATES2_UNK_2:
case BATTLE_STATE2_UNK_2:
for (i = 0; i < ARRAY_COUNT(battleStatus->enemyActors); i++) {
enemyActor = battleStatus->enemyActors[i];
if (enemyActor != NULL) {
@ -760,9 +760,9 @@ void btl_state_update_partner_move(void) {
partner->takeTurnScript = script;
partner->takeTurnID = script->id;
script->owner1.enemyID = 0x100;
gBattleState2 = BATTLE_STATES2_UNK_3;
gBattleState2 = BATTLE_STATE2_UNK_3;
break;
case BATTLE_STATES2_UNK_3:
case BATTLE_STATE2_UNK_3:
if (!(gBattleStatus.flags1 & BS_FLAGS1_200000)) {
if (partner->takeTurnScript == NULL || !does_script_exist(partner->takeTurnID)) {
partner->takeTurnScript = NULL;
@ -835,10 +835,10 @@ void btl_state_update_partner_move(void) {
btl_show_battle_message(0x23, 0x3C);
partner->status = 0;
partner->unk_21D = 0;
gBattleState2 = BATTLE_STATES2_UNK_B;
gBattleState2 = BATTLE_STATE2_UNK_B;
partner->flags |= ACTOR_FLAG_8000000;
} else {
gBattleState2 = BATTLE_STATES2_UNK_14;
gBattleState2 = BATTLE_STATE2_UNK_14;
}
} else {
return;
@ -848,25 +848,25 @@ void btl_state_update_partner_move(void) {
}
}
break;
case BATTLE_STATES2_UNK_B:
case BATTLE_STATE2_UNK_B:
if (btl_is_popup_displayed() == FALSE) {
func_8024E40C(2);
btl_cam_move(0xF);
D_8029F248 = 0xA;
gBattleState2 = BATTLE_STATES2_UNK_C;
gBattleState2 = BATTLE_STATE2_UNK_C;
}
break;
case BATTLE_STATES2_UNK_C:
case BATTLE_STATE2_UNK_C:
if (D_8029F248 != 0) {
D_8029F248--;
} else {
gBattleState2 = BATTLE_STATES2_UNK_14;
gBattleState2 = BATTLE_STATE2_UNK_14;
}
break;
}
switch (gBattleState2) {
case BATTLE_STATES2_UNK_14:
case BATTLE_STATE2_UNK_14:
for (phi_s3 = FALSE, i = 0; i < ARRAY_COUNT(battleStatus->enemyActors); i++) {
enemyActor = battleStatus->enemyActors[i];
if (enemyActor != NULL) {
@ -878,7 +878,7 @@ void btl_state_update_partner_move(void) {
}
if (phi_s3 == FALSE) {
gBattleState2 = BATTLE_STATES2_UNK_1E;
gBattleState2 = BATTLE_STATE2_UNK_1E;
} else {
func_8024E40C(3);
switchCondition = enemyActor->status - 4;
@ -909,7 +909,7 @@ void btl_state_update_partner_move(void) {
break;
default:
phi_s0 = 0;
gBattleState2 = BATTLE_STATES2_UNK_14;
gBattleState2 = BATTLE_STATE2_UNK_14;
break;
}
@ -922,27 +922,27 @@ void btl_state_update_partner_move(void) {
enemyActor->status = 0;
}
}
gBattleState2 = BATTLE_STATES2_UNK_15;
gBattleState2 = BATTLE_STATE2_UNK_15;
}
break;
case BATTLE_STATES2_UNK_15:
case BATTLE_STATE2_UNK_15:
if (btl_is_popup_displayed() == FALSE) {
func_8024E40C(2);
btl_cam_move(0xF);
D_8029F248 = 0xA;
gBattleState2 = BATTLE_STATES2_UNK_16;
gBattleState2 = BATTLE_STATE2_UNK_16;
}
break;
case BATTLE_STATES2_UNK_16:
case BATTLE_STATE2_UNK_16:
if (D_8029F248 != 0) {
D_8029F248--;
} else {
gBattleState2 = BATTLE_STATES2_UNK_1E;
gBattleState2 = BATTLE_STATE2_UNK_1E;
}
break;
}
if (gBattleState2 == BATTLE_STATES2_UNK_1E && (partner->takeTurnScript == NULL ||
if (gBattleState2 == BATTLE_STATE2_UNK_1E && (partner->takeTurnScript == NULL ||
!does_script_exist(partner->takeTurnID))) {
partner->takeTurnScript = NULL;
btl_set_state(0x17);
@ -955,7 +955,7 @@ void btl_state_draw_partner_move(void) {
void btl_state_update_end_partner_turn(void) {
BattleStatus* battleStatus = &gBattleStatus;
if (gBattleState2 == BATTLE_STATES2_UNK_0) {
if (gBattleState2 == BATTLE_STATE2_UNK_0) {
battleStatus->flags2 |= BS_FLAGS2_4;
if (!btl_check_enemies_defeated()) {
battleStatus->flags1 &= ~BS_FLAGS1_80000;

View File

@ -23,28 +23,14 @@ extern HudScript HudScript_HPDigit7;
extern HudScript HudScript_HPDigit8;
extern HudScript HudScript_HPDigit9;
void* bHPDigitHudScripts[] = {
HudScript_HPDigit0, HudScript_HPDigit1, HudScript_HPDigit2, HudScript_HPDigit3, HudScript_HPDigit4, HudScript_HPDigit5, HudScript_HPDigit6, HudScript_HPDigit7, HudScript_HPDigit8, HudScript_HPDigit9, NULL, NULL, NULL,
HudScript* bHPDigitHudScripts[] = {
&HudScript_HPDigit0, &HudScript_HPDigit1, &HudScript_HPDigit2, &HudScript_HPDigit3, &HudScript_HPDigit4,
&HudScript_HPDigit5, &HudScript_HPDigit6, &HudScript_HPDigit7, &HudScript_HPDigit8, &HudScript_HPDigit9,
NULL, NULL, NULL,
};
s32 D_80280A30 = 0xFF;
extern s32 D_8029DA30;
extern s8 D_8029DA33;
extern s32 D_8029DA34;
extern Camera D_8029DA50[ARRAY_COUNT(gCameras)];
extern f32 D_8029EFB0;
extern f32 D_8029EFB4;
extern f32 D_8029EFB8;
extern s32 D_8029EFBC;
extern s32 D_8029EFC0[10];
extern s32 D_8029EFE8[10];
extern s32 D_8029F010[10];
extern HudScript HudScript_HPBar;
extern HudScript HudScript_Item_SmallStarPoint;
extern HudScript HudScript_Item_StarPoint;
extern HudScript HudScript_StatusSPShine;
EvtScript BtlPutPartnerAway = {
EVT_CALL(DispatchEvent, 256, 62)
EVT_CHILD_THREAD
@ -91,9 +77,32 @@ EvtScript BtlBringPartnerOut = {
EVT_END
};
extern s32 D_8029DA30;
extern s8 D_8029DA33;
extern s32 D_8029DA34;
extern s32 D_8029DA40;
extern s32 D_8029DA44;
extern s32 D_8029DA48;
extern s32 D_8029DA4C;
extern Camera D_8029DA50[ARRAY_COUNT(gCameras)];
extern f32 D_8029EFB0;
extern f32 D_8029EFB4;
extern f32 D_8029EFB8;
extern s32 D_8029EFBC;
extern s32 D_8029EFC0[10];
extern s32 D_8029EFE8[10];
extern s32 D_8029F010[10];
extern HudScript HudScript_HPBar;
extern HudScript HudScript_Item_SmallStarPoint;
extern HudScript HudScript_Item_StarPoint;
extern HudScript HudScript_StatusSPShine;
void func_8023ED5C(void);
void func_8023F088(Camera*);
void func_8023FF84(Camera*);
void btl_draw_enemy_health_bars(void);
void btl_update_starpoints_display(void);
void get_dpad_input_radial(f32* angle, f32* magnitude) {
BattleStatus* battleStatus = &gBattleStatus;
@ -189,23 +198,23 @@ void initialize_battle(void) {
func_8024EDC0();
func_80268E88();
set_windows_visible(WINDOW_GROUP_1);
D_8029EFBC = create_hud_element(HudScript_HPBar);
D_8029EFBC = create_hud_element(&HudScript_HPBar);
set_hud_element_flags(D_8029EFBC, 0x80);
for (i = 0; i < ARRAY_COUNT(D_8029EFC0); i++) {
hudElemID = D_8029EFC0[i] = create_hud_element(HudScript_Item_StarPoint);
hudElemID = D_8029EFC0[i] = create_hud_element(&HudScript_Item_StarPoint);
set_hud_element_flags(hudElemID, 0x80 | 0x2);
set_hud_element_render_depth(hudElemID, 20);
}
for (i = 0; i < ARRAY_COUNT(D_8029EFE8); i++) {
hudElemID = D_8029EFE8[i] = create_hud_element(HudScript_StatusSPShine);
hudElemID = D_8029EFE8[i] = create_hud_element(&HudScript_StatusSPShine);
set_hud_element_flags(hudElemID, 0x80 | 0x2);
set_hud_element_render_depth(hudElemID, 20);
}
for (i = 0; i < ARRAY_COUNT(D_8029F010); i++) {
hudElemID = D_8029F010[i] = create_hud_element(HudScript_Item_SmallStarPoint);
hudElemID = D_8029F010[i] = create_hud_element(&HudScript_Item_SmallStarPoint);
set_hud_element_flags(hudElemID, 0x80 | 0x2);
set_hud_element_render_depth(hudElemID, 20);
}
@ -447,8 +456,8 @@ void btl_update(void) {
}
}
} else if (D_802809F6 == 0xFF) {
if (gBattleState != 0x23) {
btl_set_state(0x23);
if (gBattleState != BATTLE_STATE_END_DEMO_BATTLE) {
btl_set_state(BATTLE_STATE_END_DEMO_BATTLE);
}
} else {
D_802809F6 += 10;
@ -465,7 +474,140 @@ void btl_update(void) {
}
}
INCLUDE_ASM(s32, "16c8e0", btl_draw_ui);
void btl_draw_ui(void) {
s32 cond = FALSE;
s32 state;
do { } while (0); // TODO required to match (probably can be removed with some sort of control flow inversion)
state = gBattleState;
if (gBattleState != D_800DC4D0) {
state = D_800DC4D0;
D_800DC4D0 = gBattleState;
cond = TRUE;
} else {
if (gBattleState == BATTLE_STATE_NEGATIVE_1) {
btl_update_starpoints_display();
btl_draw_enemy_health_bars();
draw_status_ui();
return;
} else if (gBattleState == BATTLE_STATE_0) {
return;
}
}
btl_update_starpoints_display();
btl_draw_enemy_health_bars();
if (!cond) {
switch (state) {
case BATTLE_STATE_NORMAL_START:
btl_state_draw_normal_start();
break;
case BATTLE_STATE_BEGIN_PLAYER_TURN:
btl_state_draw_begin_player_turn();
break;
case BATTLE_STATE_BEGIN_PARTNER_TURN:
btl_state_draw_begin_partner_turn();
break;
case BATTLE_STATE_9:
func_80243910();
break;
case BATTLE_STATE_BEGIN_TURN:
btl_state_draw_begin_turn();
break;
case BATTLE_STATE_END_TURN:
btl_state_draw_end_turn();
break;
case BATTLE_STATE_SWITCH_TO_PLAYER:
btl_state_draw_switch_to_player();
break;
case BATTLE_STATE_SWITCH_TO_PARTNER:
btl_state_draw_switch_to_partner();
break;
case BATTLE_STATE_PREPARE_MENU:
btl_state_draw_prepare_menu();
break;
case BATTLE_STATE_PLAYER_MENU:
btl_state_draw_player_menu();
break;
case BATTLE_STATE_PARTNER_MENU:
btl_state_draw_partner_menu();
break;
case BATTLE_STATE_TWINK_MENU:
btl_state_draw_twink_menu();
break;
case BATTLE_STATE_PEACH_MENU:
btl_state_draw_peach_menu();
break;
case BATTLE_STATE_SELECT_TARGET:
btl_state_draw_select_target();
break;
case BATTLE_STATE_PLAYER_MOVE:
btl_state_draw_player_move();
break;
case BATTLE_STATE_FIRST_STRIKE:
btl_state_draw_first_stike();
break;
case BATTLE_STATE_END_PLAYER_TURN:
btl_state_draw_end_player_turn();
break;
case BATTLE_STATE_END_PARTNER_TURN:
btl_state_draw_end_partner_turn();
break;
case BATTLE_STATE_PARTNER_FIRST_STRIKE:
btl_state_draw_partner_striking_first();
break;
case BATTLE_STATE_ENEMY_MOVE:
btl_state_draw_enemy_move();
break;
case BATTLE_STATE_NEXT_ENEMY:
btl_state_draw_next_enemy();
break;
case BATTLE_STATE_PARTNER_MOVE:
btl_state_draw_partner_move();
break;
case BATTLE_STATE_VICTORY:
btl_state_draw_victory();
break;
case BATTLE_STATE_END_BATTLE:
btl_state_draw_end_battle();
break;
case BATTLE_STATE_CHANGE_PARTNER:
btl_state_draw_change_partner();
break;
case BATTLE_STATE_RUN_AWAY:
btl_state_draw_run_away();
break;
case BATTLE_STATE_DEFEND:
btl_state_draw_defend();
break;
case BATTLE_STATE_DEFEAT:
btl_state_draw_defeat();
break;
case BATTLE_STATE_28:
btl_state_draw_1C();
break;
case BATTLE_STATE_END_TRAINING_BATTLE:
btl_state_draw_end_training_battle();
break;
case BATTLE_STATE_ENEMY_FIRST_STRIKE:
btl_state_draw_enemy_striking_first();
break;
case BATTLE_STATE_34:
btl_state_draw_22();
break;
case BATTLE_STATE_CELEBRATION:
btl_state_draw_celebration();
break;
case BATTLE_STATE_END_DEMO_BATTLE:
btl_state_draw_end_demo_battle();
break;
}
}
btl_draw_popup_messages();
draw_status_ui();
}
void func_8023ED5C(void) {
BattleStatus* battleStatus = &gBattleStatus;
@ -474,15 +616,15 @@ void func_8023ED5C(void) {
Actor* actor;
s32 i;
if (gBattleState != 0) {
if (gBattleState != BATTLE_STATE_0) {
func_8024EEA8();
if (battleStatus->initBattleCallback != NULL) {
battleStatus->initBattleCallback();
}
if (battleStatus->flags1 & 1) {
if (battleStatus->flags1 & BS_FLAGS1_1) {
func_80255FD8();
if (gCurrentCamID == 1 || gCurrentCamID == 2) {
if (gCurrentCamID == CAM_BATTLE || gCurrentCamID == CAM_TATTLE) {
for (i = 0; i < ARRAY_COUNT(battleStatus->enemyActors); i++) {
actor = battleStatus->enemyActors[i];
@ -497,7 +639,7 @@ void func_8023ED5C(void) {
renderTaskPtr->appendGfxArg = actor;
renderTaskPtr->appendGfx = func_8025595C;
renderTaskPtr->distance = actor->currentPos.z;
renderTaskPtr->renderMode = 0x22;
renderTaskPtr->renderMode = RENDER_MODE_SURFACE_XLU_LAYER3;
queue_render_task(renderTaskPtr);
}
@ -523,7 +665,7 @@ void func_8023ED5C(void) {
renderTaskPtr->appendGfxArg = actor;
renderTaskPtr->appendGfx = func_8025599C;
renderTaskPtr->distance = actor->currentPos.z;
renderTaskPtr->renderMode = 0x22;
renderTaskPtr->renderMode = RENDER_MODE_SURFACE_XLU_LAYER3;
queue_render_task(renderTaskPtr);
}
@ -548,7 +690,7 @@ void func_8023ED5C(void) {
renderTaskPtr->appendGfxArg = actor;
renderTaskPtr->appendGfx = func_80254C50;
renderTaskPtr->distance = actor->currentPos.z;
renderTaskPtr->renderMode = 0x22;
renderTaskPtr->renderMode = RENDER_MODE_SURFACE_XLU_LAYER3;
queue_render_task(renderTaskPtr);
}
@ -567,14 +709,12 @@ void func_8023ED5C(void) {
u16 func_8023F060(u16 arg0, s32 arg1, s32 arg2) {
s32 temp_lo;
s32 phi_v0;
temp_lo = (arg1 - (arg0)) * arg2;
phi_v0 = temp_lo;
temp_lo = (arg1 - arg0) * arg2;
if (temp_lo < 0) {
phi_v0 = temp_lo + 0xFF;
temp_lo += 0xFF;
}
return (arg0 + (phi_v0 >> 8));
return (arg0 + (temp_lo >> 8));
}
INCLUDE_ASM(s32, "16c8e0", func_8023F088);
@ -583,9 +723,217 @@ void func_8023FF84(Camera* camera) {
show_foreground_models_unchecked();
}
INCLUDE_ASM(s32, "16c8e0", btl_draw_enemy_health_bars);
void btl_draw_enemy_health_bars(void) {
BattleStatus* battleStatus = &gBattleStatus;
if (gGameStatusPtr->unk_7C != 0) {
if (gBattleStatus.flags1 & BS_FLAGS1_1) {
s32 i;
for (i = 0; i < ARRAY_COUNT(battleStatus->enemyActors); i++) {
Actor* enemy = battleStatus->enemyActors[i];
if (enemy != NULL) {
s32 currentHP;
s32 temp;
s32 ones;
currentHP = enemy->currentHP;
temp = (currentHP * 25) / enemy->maxHP;
if (temp < enemy->hpFraction) {
enemy->hpFraction -= 2;
if (enemy->hpFraction < temp) {
enemy->hpFraction = temp;
}
}
if (enemy->hpFraction < temp) {
enemy->hpFraction += 2;
if (enemy->hpFraction > temp) {
enemy->hpFraction = temp;
}
}
if (!(enemy->flags & (ACTOR_FLAG_40000 | ACTOR_FLAG_TARGET_ONLY)) &&
((gBattleStatus.flags1 & 2) || (enemy->flags & ENEMY_FLAGS_80000)) &&
is_actor_hp_bar_visible(enemy))
{
f32 x = enemy->healthBarPosition.x;
f32 y = enemy->healthBarPosition.y;
f32 z = enemy->healthBarPosition.z;
if (enemy->healthBarPosition.y >= -500) {
s32 screenX, screenY, screenZ;
s32 id;
get_screen_coords(1, x, y, z, &screenX, &screenY, &screenZ);
screenY += 16;
id = D_8029EFBC;
set_hud_element_render_depth(id, 10);
set_hud_element_anim(id, &HudScript_HPBar);
set_hud_element_render_pos(id, screenX, screenY);
draw_hud_element_clipped(id);
temp = currentHP / 10;
ones = currentHP % 10;
// tens digit
if (temp > 0) {
id = D_8029EFBC;
set_hud_element_render_depth(id, 10);
set_hud_element_anim(id, bHPDigitHudScripts[temp]);
btl_draw_prim_quad(0, 0, 0, 0, screenX, screenY + 2, 8, 8);
set_hud_element_render_pos(id, screenX + 4, screenY + 6);
draw_hud_element_2(id);
}
// ones digit
id = D_8029EFBC;
set_hud_element_render_depth(id, 10);
set_hud_element_anim(id, bHPDigitHudScripts[ones]);
btl_draw_prim_quad(0, 0, 0, 0, screenX + 6, screenY + 2, 8, 8);
set_hud_element_render_pos(id, screenX + 10, screenY + 6);
draw_hud_element_2(id);
temp = enemy->hpFraction;
temp = 25 - temp;
btl_draw_prim_quad(168, 0, 0, 255, screenX + 11 - temp, screenY - 7, temp, 1);
btl_draw_prim_quad(255, 0, 0, 255, screenX + 11 - temp, screenY - 6, temp, 4);
}
}
}
}
}
}
}
// needs insane amount of data migration (1AF2D0.c)
#ifdef NON_MATCHING
void btl_update_starpoints_display(void) {
BattleStatus* battleStatus = &gBattleStatus;
s32 cond;
s32 i;
if (gBattleStatus.flags1 & BS_FLAGS1_1) {
if (!(gBattleStatus.flags2 & BS_FLAGS2_1)) {
D_8029DA40 = 292;
D_8029DA44 = 196;
D_8029DA48 = 6;
D_8029DA4C = battleStatus->totalStarPoints % 10;
} else {
D_8029DA40 += (202 - D_8029DA40) / D_8029DA48;
D_8029DA44 += (120 - D_8029DA44) / D_8029DA48;
D_8029DA48--;
if (D_8029DA48 < 1) {
D_8029DA48 = 1;
}
}
cond = TRUE;
if (D_802809F4 != 0) {
if (D_802809F5 > 8) {
if (D_802809F5 <= 12) {
cond = FALSE;
} else {
D_802809F5 = 0;
}
}
D_802809F5++;
}
if (cond) {
s32 posX, posY;
s32 tens, ones;
s32 id;
f32 one = 1.0f;
battleStatus->incrementStarPointDelay--;
D_802809F0 -= 1.0;
if (D_802809F0 <= 0.0f) {
s32 pendingStarPoints;
if (battleStatus->pendingStarPoints > 0) {
battleStatus->totalStarPoints++;
if (battleStatus->totalStarPoints > 100) {
battleStatus->totalStarPoints = 100;
}
battleStatus->pendingStarPoints--;
}
pendingStarPoints = battleStatus->pendingStarPoints;
if (pendingStarPoints < 1) {
pendingStarPoints = 1;
}
D_802809F0 = (f32) battleStatus->incrementStarPointDelay / pendingStarPoints;
if (D_802809F0 < 1.0) {
D_802809F0 = 1.0f;
}
if (D_802809F0 > 6.0) {
D_802809F0 = 6.0f;
}
}
posX = D_8029DA40;
posY = D_8029DA44;
tens = battleStatus->totalStarPoints / 10;
ones = battleStatus->totalStarPoints % 10;
for (i = 0; i < tens; i++) {
id = D_8029EFC0[i];
if (get_hud_element_anim(id) != HudScript_Item_StarPoint) {
set_hud_element_anim(id, HudScript_Item_StarPoint);
}
clear_hud_element_flags(id, 2);
set_hud_element_render_pos(id, posX, posY);
draw_hud_element_clipped(id);
id = D_8029EFE8[i];
if (get_hud_element_anim(id) != HudScript_StatusSPShine) {
set_hud_element_anim(id, HudScript_StatusSPShine);
}
clear_hud_element_flags(id, 2);
set_hud_element_render_pos(id, posX, posY - 5);
draw_hud_element_clipped(id);
posX -= (one * 20.0f);
}
for (; i < ARRAY_COUNT(D_8029EFC0); i++) {
set_hud_element_flags(D_8029EFC0[i], 2);
set_hud_element_flags(D_8029EFE8[i], 2);
}
posX = D_8029DA40;
posY = D_8029DA44 + (one * 14.0f);
if (gBattleStatus.flags2 & 1) {
if (ones != 0) {
draw_box(0, 4, posX - 100, posY - 5, 0, 110, 12, 120, 0, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, NULL, NULL,
NULL, SCREEN_WIDTH, SCREEN_HEIGHT, NULL);
}
}
for (i = 0; i < ones; i++) {
id = D_8029F010[i];
if (get_hud_element_anim(id) != HudScript_Item_SmallStarPoint) {
set_hud_element_anim(id, HudScript_Item_SmallStarPoint);
}
clear_hud_element_flags(id, 2);
set_hud_element_render_pos(id, posX, posY);
draw_hud_element_clipped(id);
posX -= one * 10.0f;
}
for (; i < ARRAY_COUNT(D_8029F010); i++) {
set_hud_element_flags(D_8029F010[i], 2);
}
}
}
}
#else
INCLUDE_ASM(s32, "16c8e0", btl_update_starpoints_display);
#endif
void btl_save_world_cameras(void) {
PlayerStatus* playerStatus = &gPlayerStatus;
@ -676,7 +1024,7 @@ void btl_delete_actor(Actor* actor) {
delete_shadow(actor->shadow.id);
remove_all_status_icons(actor->hudElementDataIndex);
remove_effect(actor->ptrDefuffIcon); // ???
remove_effect(actor->debuffIcon); // ???
if (actor->unk_200 != NULL) {
actor->unk_200[3][9] = 0;
@ -719,7 +1067,7 @@ void btl_delete_player_actor(Actor* player) {
delete_shadow(player->shadow.id);
remove_all_status_icons(player->hudElementDataIndex);
remove_effect(player->ptrDefuffIcon);
remove_effect(player->debuffIcon); // ???
if (player->unk_200 != NULL) {
player->unk_200[3][9] = 0;

View File

@ -100,7 +100,26 @@ INCLUDE_ASM(s32, "17D6A0", func_8024F5AC);
INCLUDE_ASM(s32, "17D6A0", func_8024F768);
INCLUDE_ASM(s32, "17D6A0", func_8024F7C8);
void func_8024F7C8(void) {
s32 i;
for (i = 0; i < ARRAY_COUNT(popupMessages); i++) {
PopupMessage* popup = &popupMessages[i];
if (popup->active && (popup->active & 0x10)) {
Message* message = popup->message;
s32 j;
for (j = 0; j < popup->messageIndex; j++, message++) {
if (message->unk_00 != 0) {
message->unk_24 = 0;
message->unk_20 = 1;
message->unk_44 = 20;
}
}
}
}
}
ApiStatus func_8024F84C(Evt* script, s32 isInitialCall) {
Bytecode* args = script->ptrReadPos;
@ -255,4 +274,26 @@ ApiStatus func_80251454(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2;
}
INCLUDE_ASM(s32, "17D6A0", func_80251474);
void func_80251474(Actor* actor) {
ActorPart* part = actor->partsTable;
while (part != NULL) {
if (!(part->flags & ACTOR_PART_FLAG_INVISIBLE) &&
part->idleAnimations != NULL &&
!(part->flags & ACTOR_PART_FLAG_40000000))
{
f32 x = part->currentPos.x;
f32 y = part->currentPos.y + (actor->size.y / 10);
f32 z = part->currentPos.z;
s32 f1 = (part->size.x + (part->size.x / 4)) * actor->scalingFactor;
s32 f2 = (part->size.y - 2) * actor->scalingFactor;
if (actor->flags & 0x8000) {
y -= actor->size.y / 2;
}
fx_flashing_box_shockwave(0, x, y, z, f1, f2);
}
part = part->nextPart;
}
}

View File

@ -157,7 +157,7 @@ void btl_state_update_celebration(void) {
HudScript* new_var;
switch (gBattleState2) {
case BATTLE_STATES2_UNK_0:
case BATTLE_STATE2_UNK_0:
if (battleStatus->pendingStarPoints <= 0) {
player->flags &= ~0x8000000;
D_8029FB6C = battleStatus->totalStarPoints * 100;
@ -179,11 +179,11 @@ void btl_state_update_celebration(void) {
func_8024E40C(0x17);
D_8029FB54 = 0;
D_8029FB4C = 1;
gBattleState2 = BATTLE_STATES2_UNK_1;
gBattleState2 = BATTLE_STATE2_UNK_1;
gBattleStatus.flags2 |= BS_FLAGS2_1;
}
break;
case BATTLE_STATES2_UNK_1:
case BATTLE_STATE2_UNK_1:
if (D_8029FB4C != 0) {
D_8029FB4C--;
} else if (func_8024E584() != 0) {
@ -196,10 +196,10 @@ void btl_state_update_celebration(void) {
D_8029FB4C = 1;
player->takeTurnID = script->id;
script->owner1.enemyID = 0;
gBattleState2 = BATTLE_STATES2_UNK_2;
gBattleState2 = BATTLE_STATE2_UNK_2;
}
break;
case BATTLE_STATES2_UNK_2:
case BATTLE_STATE2_UNK_2:
if (D_8029FB4C == 0) {
if (battleStatus->totalStarPoints != 0) {
D_8029FB6C -= D_8029FB70;
@ -245,7 +245,7 @@ void btl_state_update_celebration(void) {
takeTurnScript->owner1.actorID = ACTOR_PARTNER;
}
D_8029FB4C = 40;
gBattleState2 = BATTLE_STATES2_UNK_3;
gBattleState2 = BATTLE_STATE2_UNK_3;
} else {
D_8029FB54--;
}
@ -254,18 +254,18 @@ void btl_state_update_celebration(void) {
D_8029FB4C--;
}
break;
case BATTLE_STATES2_UNK_3:
case BATTLE_STATE2_UNK_3:
if (D_8029FB4C == 0) {
if (D_8029FB74 == 0) {
gBattleState2 = BATTLE_STATES2_UNK_14;
gBattleState2 = BATTLE_STATE2_UNK_14;
} else {
gBattleState2 = BATTLE_STATES2_UNK_4;
gBattleState2 = BATTLE_STATE2_UNK_4;
}
break;
}
D_8029FB4C--;
break;
case BATTLE_STATES2_UNK_4:
case BATTLE_STATE2_UNK_4:
if (D_8029FB84 >= 99) {
playerData->level++;
func_8024E40C(2);
@ -273,19 +273,19 @@ void btl_state_update_celebration(void) {
dma_copy(_79EF40_ROM_START, _79EF40_ROM_END, _79EF40_VRAM);
sfx_play_sound(0x80000008);
D_8029FB84 = 0;
gBattleState2 = BATTLE_STATES2_UNK_5;
gBattleState2 = BATTLE_STATE2_UNK_5;
}
break;
case BATTLE_STATES2_UNK_5:
case BATTLE_STATE2_UNK_5:
D_8029FB7C = start_script(D_80284880, 0xA, 0);
D_8029FB4C = 25;
gBattleState2 = BATTLE_STATES2_UNK_6;
gBattleState2 = BATTLE_STATE2_UNK_6;
D_8029FB80 = D_8029FB7C->id;
mdl_set_all_fog_mode(1);
*D_801512F0 = 1;
set_background_color_blend(0, 0, 0, 0);
break;
case BATTLE_STATES2_UNK_6:
case BATTLE_STATE2_UNK_6:
if (D_8029FB4C == 18) {
playerData->curHP = playerData->curMaxHP;
playerData->curFP = playerData->curMaxFP;
@ -582,10 +582,10 @@ void btl_state_update_celebration(void) {
set_hud_element_flags(id, 0x80);
battleStatus->currentSubmenu = 1;
D_8029FB4C = 10;
gBattleState2 = BATTLE_STATES2_UNK_7;
gBattleState2 = BATTLE_STATE2_UNK_7;
}
break;
case BATTLE_STATES2_UNK_7:
case BATTLE_STATE2_UNK_7:
id = D_8029FA80[0];
get_hud_element_render_pos(id, &x, &y);
x -= 20;
@ -634,18 +634,18 @@ void btl_state_update_celebration(void) {
y = 186;
set_window_properties(8, 20, 186, 280, 32, 20, func_80260948, NULL, -1);
set_window_update(8, WINDOW_UPDATE_SHOW);
gBattleState2 = BATTLE_STATES2_UNK_8;
gBattleState2 = BATTLE_STATE2_UNK_8;
}
break;
case BATTLE_STATES2_UNK_8:
case BATTLE_STATE2_UNK_8:
if (battleStatus->currentButtonsPressed & 0x8000) {
if (D_8029FB60[battleStatus->currentSubmenu] == 0) {
sfx_play_sound(SOUND_MENU_NEXT);
sfx_play_sound(SOUND_749);
gBattleState2 = BATTLE_STATES2_UNK_9;
gBattleState2 = BATTLE_STATE2_UNK_9;
} else {
sfx_play_sound(0x21D);
gBattleState2 = BATTLE_STATES2_UNK_F;
gBattleState2 = BATTLE_STATE2_UNK_F;
}
break;
}
@ -674,7 +674,7 @@ void btl_state_update_celebration(void) {
D_8029FB84 = 0;
}
break;
case BATTLE_STATES2_UNK_9:
case BATTLE_STATE2_UNK_9:
free_hud_element(D_8029FAE8);
set_window_update(8, WINDOW_UPDATE_HIDE);
@ -723,9 +723,9 @@ void btl_state_update_celebration(void) {
bgm_set_song(0, -1, 0, 2000, 8);
}
D_80284150 = 0;
gBattleState2 = BATTLE_STATES2_PLAYER_DEFEATED;
gBattleState2 = BATTLE_STATE2_PLAYER_DEFEATED;
break;
case BATTLE_STATES2_PLAYER_DEFEATED:
case BATTLE_STATE2_PLAYER_DEFEATED:
if ((gGameStatusPtr->frameCounter % 2) != 0) {
switch (battleStatus->currentSubmenu) {
case 0:
@ -754,7 +754,7 @@ void btl_state_update_celebration(void) {
}
}
if (D_80284150 == 0xFF) {
gBattleState2 = BATTLE_STATES2_UNK_B;
gBattleState2 = BATTLE_STATE2_UNK_B;
break;
}
D_80284150 += 10;
@ -762,7 +762,7 @@ void btl_state_update_celebration(void) {
D_80284150 = 255;
}
break;
case BATTLE_STATES2_UNK_B:
case BATTLE_STATE2_UNK_B:
free_hud_element(D_8029FA80[0]);
free_hud_element(D_8029FA80[1]);
free_hud_element(D_8029FA80[3]);
@ -777,18 +777,18 @@ void btl_state_update_celebration(void) {
free_hud_element(D_8029FB48);
set_background_color_blend(0, 0, 0, 0);
btl_set_state(0x20);
gBattleState2 = BATTLE_STATES2_UNK_2;
gBattleState2 = BATTLE_STATE2_UNK_2;
break;
case BATTLE_STATES2_UNK_F:
case BATTLE_STATE2_UNK_F:
width = get_msg_width(0x1D00AB, 0) + 31;
x = 160 - (width / 2);
y = 80;
set_window_properties(9, x, y, width, 28, 10, func_80260A20, NULL, -1);
set_window_update(9, WINDOW_UPDATE_SHOW);
D_8029FB4C = 60;
gBattleState2 = BATTLE_STATES2_UNK_10;
gBattleState2 = BATTLE_STATE2_UNK_10;
break;
case BATTLE_STATES2_UNK_10:
case BATTLE_STATE2_UNK_10:
if (gGameStatusPtr->pressedButtons & (BUTTON_A | BUTTON_B)) {
D_8029FB4C = 0;
}
@ -797,9 +797,9 @@ void btl_state_update_celebration(void) {
break;
}
set_window_update(9, WINDOW_UPDATE_HIDE);
gBattleState2 = BATTLE_STATES2_UNK_8;
gBattleState2 = BATTLE_STATE2_UNK_8;
break;
case BATTLE_STATES2_UNK_14:
case BATTLE_STATE2_UNK_14:
if (battleStatus->currentButtonsPressed & (BUTTON_A | BUTTON_B)) {
D_8029FB84 = 99;
}
@ -814,11 +814,11 @@ void btl_state_update_celebration(void) {
set_animation(ACTOR_PARTNER, 0, D_80284154[playerData->currentPartner]);
}
D_8029FB4C = 6;
gBattleState2 = BATTLE_STATES2_UNK_15;
gBattleState2 = BATTLE_STATE2_UNK_15;
break;
}
break;
case BATTLE_STATES2_UNK_15:
case BATTLE_STATE2_UNK_15:
if (D_8029FB4C != 0) {
D_8029FB4C--;
if (D_8029FB4C == 0) {
@ -836,7 +836,7 @@ void btl_state_update_celebration(void) {
}
}
if (D_80284150 == 0xFF) {
gBattleState2 = BATTLE_STATES2_UNK_16;
gBattleState2 = BATTLE_STATE2_UNK_16;
break;
}
D_80284150 += 20;
@ -844,7 +844,7 @@ void btl_state_update_celebration(void) {
D_80284150 = 255;
}
break;
case BATTLE_STATES2_UNK_16:
case BATTLE_STATE2_UNK_16:
if (does_script_exist(player->takeTurnID)) {
kill_script_by_ID(player->takeTurnID);
}
@ -852,7 +852,7 @@ void btl_state_update_celebration(void) {
kill_script_by_ID(partner->takeTurnID);
}
btl_set_state(0x20);
gBattleState2 = BATTLE_STATES2_UNK_2;
gBattleState2 = BATTLE_STATE2_UNK_2;
break;
}
D_8029FB84 += 1;
@ -919,7 +919,7 @@ void btl_state_draw_celebration(void) {
s32 j;
switch (gBattleState2) {
case BATTLE_STATES2_UNK_7:
case BATTLE_STATE2_UNK_7:
btl_draw_upgrade_windows(0);
id = D_8029FA80[0];
set_hud_element_tint(id, 128, 128, 128);
@ -943,9 +943,9 @@ void btl_state_draw_celebration(void) {
}
}
break;
case BATTLE_STATES2_UNK_8:
case BATTLE_STATES2_UNK_F:
case BATTLE_STATES2_UNK_10:
case BATTLE_STATE2_UNK_8:
case BATTLE_STATE2_UNK_F:
case BATTLE_STATE2_UNK_10:
switch (battleStatus->currentSubmenu) {
case 0:
rotZ = 152;
@ -1059,8 +1059,8 @@ void btl_state_draw_celebration(void) {
set_hud_element_transform_rotation(id, 0.0f, 0.0f, rotZ);
func_80144238(id);
break;
case BATTLE_STATES2_UNK_9:
case BATTLE_STATES2_PLAYER_DEFEATED:
case BATTLE_STATE2_UNK_9:
case BATTLE_STATE2_PLAYER_DEFEATED:
btl_draw_upgrade_windows(1);
draw_hud_element_clipped(D_8029FA80[0]);
draw_hud_element_clipped(D_8029FA80[3]);
@ -1075,10 +1075,10 @@ void btl_state_draw_celebration(void) {
set_screen_overlay_params_front(0, D_80284150);
break;
case BATTLE_STATES2_UNK_B:
case BATTLE_STATE2_UNK_B:
set_screen_overlay_params_front(0, D_80284150);
break;
case BATTLE_STATES2_UNK_15:
case BATTLE_STATE2_UNK_15:
if (D_80284150 != 0) {
set_screen_overlay_params_front(0, D_80284150);
}
@ -1086,9 +1086,9 @@ void btl_state_draw_celebration(void) {
}
switch (gBattleState2) {
case BATTLE_STATES2_UNK_7:
case BATTLE_STATES2_UNK_8:
case BATTLE_STATES2_UNK_9:
case BATTLE_STATE2_UNK_7:
case BATTLE_STATE2_UNK_8:
case BATTLE_STATE2_UNK_9:
D_8029FB8C += 2;
D_8029FB88 += D_8029FB8C;
if (D_8029FB88 > 200) {
@ -1099,7 +1099,7 @@ void btl_state_draw_celebration(void) {
set_hud_element_render_pos(id, D_8029FB88 - 43, 176);
draw_hud_element_clipped(id);
break;
case BATTLE_STATES2_PLAYER_DEFEATED:
case BATTLE_STATE2_PLAYER_DEFEATED:
D_8029FB8C += 4;
D_8029FB88 += D_8029FB8C;
if (D_8029FB88 > 500) {
@ -1118,9 +1118,9 @@ void func_80260948(s32 arg0, s32 posX, s32 posY) {
s32 msgID;
switch (gBattleState2) {
case BATTLE_STATES2_UNK_8:
case BATTLE_STATES2_UNK_F:
case BATTLE_STATES2_UNK_10:
case BATTLE_STATE2_UNK_8:
case BATTLE_STATE2_UNK_F:
case BATTLE_STATE2_UNK_10:
switch (battleStatus->currentSubmenu) {
case 0:
if (D_8029FB60[0] == 0) {

View File

@ -2064,7 +2064,7 @@ void load_player_actor(void) {
player->shadow.id = create_shadow_type(0, player->currentPos.x, player->currentPos.y, player->currentPos.z);
player->shadowScale = player->size.x / 24.0;
player->hudElementDataIndex = create_status_icon_set();
player->ptrDefuffIcon = fx_disable_x(0, -142.0f, 34.0f, 1.0f, 0);
player->debuffIcon = fx_disable_x(0, -142.0f, 34.0f, 1.0f, 0);
player->unk_228 = NULL;
if (is_ability_active(ABILITY_ZAP_TAP)) {
@ -2318,7 +2318,7 @@ void load_partner_actor(void) {
partnerActor->shadow.id = create_shadow_type(0, partnerActor->currentPos.x, partnerActor->currentPos.y, partnerActor->currentPos.z);
partnerActor->shadowScale = partnerActor->size.x / 24.0;
partnerActor->hudElementDataIndex = create_status_icon_set();
partnerActor->ptrDefuffIcon = fx_disable_x(0, -142.0f, 34.0f, 1.0f, 0);
partnerActor->debuffIcon = fx_disable_x(0, -142.0f, 34.0f, 1.0f, 0);
partnerActor->unk_228 = NULL;
takeTurnScript = start_script(partnerActor->takeTurnScriptSource, 10, 0);
@ -2589,7 +2589,7 @@ Actor* create_actor(Formation formation) {
takeTurnScript->owner1.enemyID = actor->enemyIndex | 0x200;
actor->shadow.id = create_shadow_type(0, actor->currentPos.x, actor->currentPos.y, actor->currentPos.z);
actor->shadowScale = actor->size.x / 24.0;
actor->ptrDefuffIcon = fx_disable_x(0, -142.0f, 34.0f, 1.0f, 0);
actor->debuffIcon = fx_disable_x(0, -142.0f, 34.0f, 1.0f, 0);
actor->unk_228 = NULL;
actor->hudElementDataIndex = create_status_icon_set();
return actor;
@ -2754,7 +2754,7 @@ s32 inflict_status(Actor* target, s32 statusTypeKey, s32 duration) {
if (target->debuff != statusTypeKey) {
target->status = statusTypeKey;
}
target->ptrDefuffIcon->ptrPropertyList[15] = 0;
target->debuffIcon->ptrPropertyList[15] = 0;
target->debuff = statusTypeKey;
target->debuffDuration = duration;
if ((s8)duration > 9) {
@ -3502,7 +3502,7 @@ void btl_update_ko_status(void) {
player->koDuration = player->debuffDuration;
if (player->koDuration > 0) {
player->koStatus = STATUS_DAZE;
player->ptrDefuffIcon->ptrPropertyList[15] = player->koDuration;
player->debuffIcon->ptrPropertyList[15] = player->koDuration;
if (koDuration == 0) {
sfx_play_sound(SOUND_2107);
@ -3517,7 +3517,7 @@ void btl_update_ko_status(void) {
if (partner->koDuration > 0) {
partner->koStatus = STATUS_DAZE;
partner->ptrDefuffIcon->ptrPropertyList[15] = partner->koDuration;
partner->debuffIcon->ptrPropertyList[15] = partner->koDuration;
}
}
@ -3528,7 +3528,7 @@ void btl_update_ko_status(void) {
enemy->koDuration = enemy->debuffDuration;
if (enemy->koDuration > 0) {
enemy->koStatus = STATUS_DAZE;
enemy->ptrDefuffIcon->ptrPropertyList[15] = enemy->koDuration;
enemy->debuffIcon->ptrPropertyList[15] = enemy->koDuration;
}
}
}
@ -3554,7 +3554,7 @@ void btl_appendGfx_prim_quad(u8 r, u8 g, u8 b, u8 a, u16 left, u16 top, u16 righ
gDPSetCombineMode(gMasterGfxPos++, G_CC_DECALRGBA, G_CC_DECALRGBA);
}
void btl_draw_prim_quad(s32 r, s32 g, s32 b, s32 a, s32 left, s32 top, s32 arg6, s32 arg7) {
void btl_draw_prim_quad(u8 r, u8 g, u8 b, u8 a, u16 left, u16 top, u16 arg6, u16 arg7) {
u16 right = left + arg6;
u16 bottom = top + arg7;

View File

@ -1997,7 +1997,7 @@ ApiStatus ClearStatusEffects(Evt* script, s32 isInitialCall) {
actor->koStatus = 0;
actor->koDuration = 0;
actor->ptrDefuffIcon->ptrPropertyList[15] = 0;
actor->debuffIcon->ptrPropertyList[15] = 0;
actor->attackBoost = 0;
actor->defenseBoost = 0;
actor->isGlowing = 0;

View File

@ -1,10 +1,13 @@
#include "common.h"
#include "camera.h"
void update_camera_mode_4(Camera* camera);
INCLUDE_ASM(void, "9d10_len_1080", update_camera_mode_4, Camera* camera);
void update_camera_mode_2(Camera* camera);
INCLUDE_ASM(void, "9d10_len_1080", update_camera_mode_2, Camera* camera);
void update_camera_mode_2(Camera* camera);
INCLUDE_ASM(void, "9d10_len_1080", update_camera_mode_1, Camera* camera);
void update_camera_mode_0(Camera* camera) {

View File

@ -2231,12 +2231,12 @@ ApiStatus SetBattleState(Evt* script, s32 isInitialCall) {
}
ApiStatus WaitForState(Evt* script, s32 isInitialCall) {
Bytecode* args = script->ptrReadPos;
BattleStatus* battleStatus = &gBattleStatus;
s32* ptrReadPos = script->ptrReadPos;
s32 temp_v0;
if (isInitialCall) {
temp_v0 = evt_get_variable(script, *ptrReadPos);
temp_v0 = evt_get_variable(script, *args++);
if (!temp_v0) {
battleStatus->unk_95 = 0;
return ApiStatus_DONE2;
@ -2246,7 +2246,7 @@ ApiStatus WaitForState(Evt* script, s32 isInitialCall) {
temp_v0 = battleStatus->unk_95;
if (temp_v0) {
return (gBattleState == temp_v0) * 2;
return (gBattleState == temp_v0) * ApiStatus_DONE2;
}
return ApiStatus_DONE2;

View File

@ -280,9 +280,9 @@ BattleArea gBattleAreas[0x30] = {
void reset_battle_status(void) {
gGameStatusPtr->demoFlags = 0;
gBattleState = 0;
gBattleState = BATTLE_STATE_0;
D_800DC4E0 = 1;
gBattleState2 = 0;
gBattleState2 = BATTLE_STATE2_UNK_0;
D_800DC4D0 = 0;
D_800DC4F0 = 0;
D_800DC4D4 = 0;

View File

@ -31,11 +31,11 @@ ApiStatus N(func_802A12EC_7333BC)(Evt* script, s32 isInitialCall) {
partner->koDuration = 0;
}
if (partner->koDuration > 0) {
partner->ptrDefuffIcon->ptrPropertyList[0xF] = partner->koDuration;
partner->debuffIcon->ptrPropertyList[0xF] = partner->koDuration;
} else {
partner->koStatus = 0;
dispatch_event_partner(0x34);
partner->ptrDefuffIcon->ptrPropertyList[0xF] = 0;
partner->debuffIcon->ptrPropertyList[0xF] = 0;
}
return ApiStatus_DONE2;

View File

@ -31,11 +31,11 @@ ApiStatus N(func_802A12EC_72E81C)(Evt* script, s32 isInitialCall) {
partner->koDuration = 0;
}
if (partner->koDuration > 0) {
partner->ptrDefuffIcon->ptrPropertyList[0xF] = partner->koDuration;
partner->debuffIcon->ptrPropertyList[0xF] = partner->koDuration;
} else {
partner->koStatus = 0;
dispatch_event_partner(0x34);
partner->ptrDefuffIcon->ptrPropertyList[0xF] = 0;
partner->debuffIcon->ptrPropertyList[0xF] = 0;
}
return ApiStatus_DONE2;

View File

@ -31,11 +31,11 @@ ApiStatus N(func_802A12EC_715B3C)(Evt* script, s32 isInitialCall) {
partner->koDuration = 0;
}
if (partner->koDuration > 0) {
partner->ptrDefuffIcon->ptrPropertyList[0xF] = partner->koDuration;
partner->debuffIcon->ptrPropertyList[0xF] = partner->koDuration;
} else {
partner->koStatus = 0;
dispatch_event_partner(0x34);
partner->ptrDefuffIcon->ptrPropertyList[0xF] = 0;
partner->debuffIcon->ptrPropertyList[0xF] = 0;
}
return ApiStatus_DONE2;

View File

@ -31,11 +31,11 @@ ApiStatus N(func_802A12EC_724FCC)(Evt* script, s32 isInitialCall) {
partner->koDuration = 0;
}
if (partner->koDuration > 0) {
partner->ptrDefuffIcon->ptrPropertyList[0xF] = partner->koDuration;
partner->debuffIcon->ptrPropertyList[0xF] = partner->koDuration;
} else {
partner->koStatus = 0;
dispatch_event_partner(0x34);
partner->ptrDefuffIcon->ptrPropertyList[0xF] = 0;
partner->debuffIcon->ptrPropertyList[0xF] = 0;
}
return ApiStatus_DONE2;
@ -64,7 +64,7 @@ ApiStatus N(func_802A1378_725058)(Evt* script, s32 isInitialCall) {
break;
}
actor->ptrDefuffIcon->ptrPropertyList[15] = 0;
actor->debuffIcon->ptrPropertyList[15] = 0;
}
btl_update_ko_status();

View File

@ -23,7 +23,7 @@ ApiStatus N(func_802A123C_72223C)(Evt* script, s32 isInitialCall) {
case ACTOR_CLASS_PARTNER:
dispatch_event_partner(0x31);
}
actor->ptrDefuffIcon->ptrPropertyList[15] = 0;
actor->debuffIcon->ptrPropertyList[15] = 0;
}
return ApiStatus_DONE2;

View File

@ -22,7 +22,7 @@ ApiStatus func_802A17D4_78BDD4(Evt* script, s32 isInitialCall) {
if (actor->koStatus != 0) {
actor->koDuration = 0;
actor->koStatus = 0;
actor->ptrDefuffIcon->ptrPropertyList[15] = 0;
actor->debuffIcon->ptrPropertyList[15] = 0;
}
btl_update_ko_status();

View File

@ -31,7 +31,7 @@ MenuWindowBP gPauseTabsWindowBPs[] = {
.width = 43,
.height = 15,
.priority = 64,
.fpDrawContents = &pause_tabs_draw_stats,
.fpDrawContents = pause_tabs_draw_stats,
.tab = NULL,
.parentID = WINDOW_ID_PAUSE_MAIN,
.fpUpdate = { WINDOW_UPDATE_SHOW },
@ -45,10 +45,10 @@ MenuWindowBP gPauseTabsWindowBPs[] = {
.width = 43,
.height = 15,
.priority = 0,
.fpDrawContents = &pause_tabs_draw_badges,
.fpDrawContents = pause_tabs_draw_badges,
.tab = NULL,
.parentID = WINDOW_ID_PAUSE_MAIN,
.fpUpdate = { .func = &pause_update_tab_default },
.fpUpdate = { .func = pause_update_tab_default },
.extraFlags = 0,
.style = { .customStyle = &gPauseWS_4 }
},
@ -59,10 +59,10 @@ MenuWindowBP gPauseTabsWindowBPs[] = {
.width = 43,
.height = 15,
.priority = 0,
.fpDrawContents = &pause_tabs_draw_items,
.fpDrawContents = pause_tabs_draw_items,
.tab = NULL,
.parentID = WINDOW_ID_PAUSE_MAIN,
.fpUpdate = { .func = &pause_update_tab_default },
.fpUpdate = { .func = pause_update_tab_default },
.extraFlags = 0,
.style = { .customStyle = &gPauseWS_5 }
},
@ -73,10 +73,10 @@ MenuWindowBP gPauseTabsWindowBPs[] = {
.width = 43,
.height = 15,
.priority = 0,
.fpDrawContents = &pause_tabs_draw_party,
.fpDrawContents = pause_tabs_draw_party,
.tab = NULL,
.parentID = WINDOW_ID_PAUSE_MAIN,
.fpUpdate = { .func = &pause_update_tab_default },
.fpUpdate = { .func = pause_update_tab_default },
.extraFlags = 0,
.style = { .customStyle = &gPauseWS_6 }
},
@ -87,10 +87,10 @@ MenuWindowBP gPauseTabsWindowBPs[] = {
.width = 43,
.height = 15,
.priority = 0,
.fpDrawContents = &pause_tabs_draw_spirits,
.fpDrawContents = pause_tabs_draw_spirits,
.tab = NULL,
.parentID = WINDOW_ID_PAUSE_MAIN,
.fpUpdate = { .func = &pause_update_tab_default },
.fpUpdate = { .func = pause_update_tab_default },
.extraFlags = 0,
.style = { .customStyle = &gPauseWS_7 }
},
@ -101,10 +101,10 @@ MenuWindowBP gPauseTabsWindowBPs[] = {
.width = 43,
.height = 15,
.priority = 0,
.fpDrawContents = &pause_tabs_draw_map,
.fpDrawContents = pause_tabs_draw_map,
.tab = NULL,
.parentID = WINDOW_ID_PAUSE_MAIN,
.fpUpdate = { .func = &pause_update_tab_default },
.fpUpdate = { .func = pause_update_tab_default },
.extraFlags = 0,
.style = { .customStyle = &gPauseWS_8 }
},
@ -115,7 +115,7 @@ MenuWindowBP gPauseTabsWindowBPs[] = {
.width = 16,
.height = 16,
.priority = 64,
.fpDrawContents = &pause_tabs_draw_invis,
.fpDrawContents = pause_tabs_draw_invis,
.tab = NULL,
.parentID = WINDOW_ID_NONE,
.fpUpdate = { WINDOW_UPDATE_SHOW },
@ -137,10 +137,10 @@ MenuPanel gPausePanelTabs = {
.numRows = 1,
.numPages = 0,
.gridData = gPauseTabsGridData,
.fpInit = &pause_tabs_init,
.fpHandleInput = &pause_tabs_handle_input,
.fpUpdate = &pause_tabs_update,
.fpCleanup = &pause_tabs_cleanup
.fpInit = pause_tabs_init,
.fpHandleInput = pause_tabs_handle_input,
.fpUpdate = pause_tabs_update,
.fpCleanup = pause_tabs_cleanup
};
void pause_tabs_draw_invis(MenuPanel* menu, s32 baseX, s32 baseY, s32 width, s32 height, s32 opacity, s32 darkening) {
@ -352,11 +352,11 @@ void pause_tabs_update(MenuPanel* tab) {
gPauseTabsHorizScrollPos += delta;
if ((gPauseTabsPreviousTab != 0 || tab->col != 5) && (gPauseTabsPreviousTab < tab->col || gPauseTabsPreviousTab == 5 && tab->col == 0)) {
fpUpdateActive = &pause_update_page_active_1;
fpUpdateInactive = &pause_update_page_inactive_1;
fpUpdateActive = pause_update_page_active_1;
fpUpdateInactive = pause_update_page_inactive_1;
} else {
fpUpdateActive = &pause_update_page_active_2;
fpUpdateInactive = &pause_update_page_inactive_2;
fpUpdateActive = pause_update_page_active_2;
fpUpdateInactive = pause_update_page_inactive_2;
}
flag = FALSE;

View File

@ -429,7 +429,7 @@ void replace_window_update(s32 windowID, s8 priority, WindowUpdateFunc pendingFu
void set_window_update(s32 windowID, WindowUpdateFunc func) {
if (gWindows[windowID].flags & WINDOW_FLAGS_INITIALIZED) {
if (func.i == gWindows[windowID].fpUpdate.i) {
if (func.func == gWindows[windowID].fpUpdate.func) {
gWindows[windowID].flags &= ~WINDOW_FLAGS_FPUPDATE_CHANGED;
} else {
gWindows[windowID].flags |= WINDOW_FLAGS_FPUPDATE_CHANGED | WINDOW_FLAGS_INITIAL_ANIMATION;
@ -459,7 +459,8 @@ void setup_pause_menu_tab(MenuWindowBP* bp, s32 count) {
s32 i;
for (i = 0; i < count; i++, bp++) {
set_window_properties(bp->windowID, bp->pos.x, bp->pos.y, bp->width, bp->height, bp->priority, bp->fpDrawContents, bp->tab, bp->parentID);
set_window_properties(bp->windowID, bp->pos.x, bp->pos.y, bp->width, bp->height, bp->priority,
bp->fpDrawContents, bp->tab, bp->parentID);
if (bp->style.defaultStyleID != -1) {
gWindowStyles[bp->windowID] = bp->style;
}

View File

@ -13,7 +13,6 @@ extern s32 D_80286530;
extern s32 D_80286534;
extern Evt* D_8028652C;
extern HudScript* HudScript_Item_Coin;
extern s32 gWindowStyles[64];
ApiStatus func_802803C8(Evt* script, s32 isInitialCall);
ApiStatus func_80280410(Evt* script, s32 isInitialCall);

View File

@ -207,9 +207,9 @@ D_8024BEA0 = 0x8024BEA0;
D_8024C068 = 0x8024C068;
D_8024C088 = 0x8024C088;
D_8024C090 = 0x8024C090;
D_8024C098 = 0x8024C098;
filemenu_8024C098 = 0x8024C098;
D_8024C108 = 0x8024C108;
D_8024C110 = 0x8024C110;
filemenu_8024C110 = 0x8024C110;
D_8024C117 = 0x8024C117;
D_8024C1D8 = 0x8024C1D8;
D_8024C5E0 = 0x8024C5E0;

View File

@ -212,7 +212,7 @@ dlabel D_8024B9C8
dlabel D_8024B9CC
.word 0x0EFD0000
dlabel D_8024B9D0
dlabel gFileMenuMessages
.word 0x00000000, D_8024B7D8, D_8024B7F0, D_8024B808, D_8024B81C, D_8024B830, D_8024B844, D_8024B848, D_8024B850, D_8024B85C, D_8024B868, D_8024B870, D_8024B87C, D_8024B888, D_8024B88C, D_8024B890, D_8024B894, D_8024B89C, D_8024B8B4, D_8024B8C0, D_8024B8D0, D_8024B8D4, D_8024B8D8, D_8024B8E0, D_8024B8F4, D_8024B910, D_8024B920, D_8024B928, D_8024B93C, D_8024B940, D_8024B94C, D_8024B950, D_8024B964, D_8024B9C8, D_8024B9CC, 0x00000000
dlabel D_8024BA60

View File

@ -34,8 +34,8 @@ glabel filemenu_draw_contents_copy_arrow
/* 164990 80244130 8C63C094 */ lw $v1, %lo(filemenu_loadedFileIdx)($v1)
/* 164994 80244134 104301D8 */ beq $v0, $v1, .L80244898
/* 164998 80244138 24040002 */ addiu $a0, $zero, 2
/* 16499C 8024413C 3C028025 */ lui $v0, %hi(D_8024C098)
/* 1649A0 80244140 8042C098 */ lb $v0, %lo(D_8024C098)($v0)
/* 16499C 8024413C 3C028025 */ lui $v0, %hi(filemenu_8024C098)
/* 1649A0 80244140 8042C098 */ lb $v0, %lo(filemenu_8024C098)($v0)
/* 1649A4 80244144 104401D4 */ beq $v0, $a0, .L80244898
/* 1649A8 80244148 24020001 */ addiu $v0, $zero, 1
/* 1649AC 8024414C 10620011 */ beq $v1, $v0, .L80244194

View File

@ -51,8 +51,8 @@ glabel filemenu_init
/* 1651F0 80244990 24050003 */ addiu $a1, $zero, 3
/* 1651F4 80244994 3C138025 */ lui $s3, %hi(filemenu_menus)
/* 1651F8 80244998 8E739B84 */ lw $s3, %lo(filemenu_menus)($s3)
/* 1651FC 8024499C 3C018025 */ lui $at, %hi(D_8024C098)
/* 165200 802449A0 A020C098 */ sb $zero, %lo(D_8024C098)($at)
/* 1651FC 8024499C 3C018025 */ lui $at, %hi(filemenu_8024C098)
/* 165200 802449A0 A020C098 */ sb $zero, %lo(filemenu_8024C098)($at)
/* 165204 802449A4 16800003 */ bnez $s4, .L802449B4
/* 165208 802449A8 24020002 */ addiu $v0, $zero, 2
/* 16520C 802449AC 0809126E */ j .L802449B8

View File

@ -7,8 +7,8 @@ glabel filemenu_update
/* 163A08 802431A8 2410002C */ addiu $s0, $zero, 0x2c
/* 163A0C 802431AC 2406FFFF */ addiu $a2, $zero, -1
/* 163A10 802431B0 0200282D */ daddu $a1, $s0, $zero
/* 163A14 802431B4 3C028025 */ lui $v0, %hi(D_8024C098)
/* 163A18 802431B8 8042C098 */ lb $v0, %lo(D_8024C098)($v0)
/* 163A14 802431B4 3C028025 */ lui $v0, %hi(filemenu_8024C098)
/* 163A18 802431B8 8042C098 */ lb $v0, %lo(filemenu_8024C098)($v0)
/* 163A1C 802431BC 3C038016 */ lui $v1, %hi(D_8015A2D0)
/* 163A20 802431C0 2463A2D0 */ addiu $v1, $v1, %lo(D_8015A2D0)
/* 163A24 802431C4 AFBF0018 */ sw $ra, 0x18($sp)

View File

@ -1,116 +0,0 @@
.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel filemenu_update_deselect_file
/* 164370 80243B10 3C028016 */ lui $v0, %hi(gWindows)
/* 164374 80243B14 24429D50 */ addiu $v0, $v0, %lo(gWindows)
/* 164378 80243B18 00042140 */ sll $a0, $a0, 5
/* 16437C 80243B1C 00822021 */ addu $a0, $a0, $v0
/* 164380 80243B20 9082001C */ lbu $v0, 0x1c($a0)
/* 164384 80243B24 3C013D80 */ lui $at, 0x3d80
/* 164388 80243B28 44811000 */ mtc1 $at, $f2
/* 16438C 80243B2C 44820000 */ mtc1 $v0, $f0
/* 164390 80243B30 00000000 */ nop
/* 164394 80243B34 46800020 */ cvt.s.w $f0, $f0
/* 164398 80243B38 46020002 */ mul.s $f0, $f0, $f2
/* 16439C 80243B3C 00000000 */ nop
/* 1643A0 80243B40 3C013F80 */ lui $at, 0x3f80
/* 1643A4 80243B44 44811000 */ mtc1 $at, $f2
/* 1643A8 80243B48 28420010 */ slti $v0, $v0, 0x10
/* 1643AC 80243B4C 1040002E */ beqz $v0, .L80243C08
/* 1643B0 80243B50 46001101 */ sub.s $f4, $f2, $f0
/* 1643B4 80243B54 8483000C */ lh $v1, 0xc($a0)
/* 1643B8 80243B58 24020050 */ addiu $v0, $zero, 0x50
/* 1643BC 80243B5C 00431023 */ subu $v0, $v0, $v1
/* 1643C0 80243B60 44820000 */ mtc1 $v0, $f0
/* 1643C4 80243B64 00000000 */ nop
/* 1643C8 80243B68 46800020 */ cvt.s.w $f0, $f0
/* 1643CC 80243B6C 46040002 */ mul.s $f0, $f0, $f4
/* 1643D0 80243B70 00000000 */ nop
/* 1643D4 80243B74 44831000 */ mtc1 $v1, $f2
/* 1643D8 80243B78 00000000 */ nop
/* 1643DC 80243B7C 468010A0 */ cvt.s.w $f2, $f2
/* 1643E0 80243B80 46020000 */ add.s $f0, $f0, $f2
/* 1643E4 80243B84 00031823 */ negu $v1, $v1
/* 1643E8 80243B88 44831000 */ mtc1 $v1, $f2
/* 1643EC 80243B8C 00000000 */ nop
/* 1643F0 80243B90 468010A0 */ cvt.s.w $f2, $f2
/* 1643F4 80243B94 46001080 */ add.s $f2, $f2, $f0
/* 1643F8 80243B98 C4C00000 */ lwc1 $f0, ($a2)
/* 1643FC 80243B9C 46800020 */ cvt.s.w $f0, $f0
/* 164400 80243BA0 46020000 */ add.s $f0, $f0, $f2
/* 164404 80243BA4 4600018D */ trunc.w.s $f6, $f0
/* 164408 80243BA8 E4C60000 */ swc1 $f6, ($a2)
/* 16440C 80243BAC 8483000E */ lh $v1, 0xe($a0)
/* 164410 80243BB0 24020024 */ addiu $v0, $zero, 0x24
/* 164414 80243BB4 00431023 */ subu $v0, $v0, $v1
/* 164418 80243BB8 44820000 */ mtc1 $v0, $f0
/* 16441C 80243BBC 00000000 */ nop
/* 164420 80243BC0 46800020 */ cvt.s.w $f0, $f0
/* 164424 80243BC4 46040002 */ mul.s $f0, $f0, $f4
/* 164428 80243BC8 00000000 */ nop
/* 16442C 80243BCC 44831000 */ mtc1 $v1, $f2
/* 164430 80243BD0 00000000 */ nop
/* 164434 80243BD4 468010A0 */ cvt.s.w $f2, $f2
/* 164438 80243BD8 46020000 */ add.s $f0, $f0, $f2
/* 16443C 80243BDC 00031823 */ negu $v1, $v1
/* 164440 80243BE0 44831000 */ mtc1 $v1, $f2
/* 164444 80243BE4 00000000 */ nop
/* 164448 80243BE8 468010A0 */ cvt.s.w $f2, $f2
/* 16444C 80243BEC 46001080 */ add.s $f2, $f2, $f0
/* 164450 80243BF0 C4E00000 */ lwc1 $f0, ($a3)
/* 164454 80243BF4 46800020 */ cvt.s.w $f0, $f0
/* 164458 80243BF8 46020000 */ add.s $f0, $f0, $f2
/* 16445C 80243BFC 4600018D */ trunc.w.s $f6, $f0
/* 164460 80243C00 03E00008 */ jr $ra
/* 164464 80243C04 E4E60000 */ swc1 $f6, ($a3)
.L80243C08:
/* 164468 80243C08 24020050 */ addiu $v0, $zero, 0x50
/* 16446C 80243C0C 8483000C */ lh $v1, 0xc($a0)
/* 164470 80243C10 44802000 */ mtc1 $zero, $f4
/* 164474 80243C14 00431023 */ subu $v0, $v0, $v1
/* 164478 80243C18 44820000 */ mtc1 $v0, $f0
/* 16447C 80243C1C 00000000 */ nop
/* 164480 80243C20 46800020 */ cvt.s.w $f0, $f0
/* 164484 80243C24 46040002 */ mul.s $f0, $f0, $f4
/* 164488 80243C28 00000000 */ nop
/* 16448C 80243C2C 44831000 */ mtc1 $v1, $f2
/* 164490 80243C30 00000000 */ nop
/* 164494 80243C34 468010A0 */ cvt.s.w $f2, $f2
/* 164498 80243C38 46020000 */ add.s $f0, $f0, $f2
/* 16449C 80243C3C 00031823 */ negu $v1, $v1
/* 1644A0 80243C40 44831000 */ mtc1 $v1, $f2
/* 1644A4 80243C44 00000000 */ nop
/* 1644A8 80243C48 468010A0 */ cvt.s.w $f2, $f2
/* 1644AC 80243C4C 46001080 */ add.s $f2, $f2, $f0
/* 1644B0 80243C50 C4C00000 */ lwc1 $f0, ($a2)
/* 1644B4 80243C54 46800020 */ cvt.s.w $f0, $f0
/* 1644B8 80243C58 46020000 */ add.s $f0, $f0, $f2
/* 1644BC 80243C5C 4600018D */ trunc.w.s $f6, $f0
/* 1644C0 80243C60 E4C60000 */ swc1 $f6, ($a2)
/* 1644C4 80243C64 8483000E */ lh $v1, 0xe($a0)
/* 1644C8 80243C68 24020024 */ addiu $v0, $zero, 0x24
/* 1644CC 80243C6C 00431023 */ subu $v0, $v0, $v1
/* 1644D0 80243C70 44820000 */ mtc1 $v0, $f0
/* 1644D4 80243C74 00000000 */ nop
/* 1644D8 80243C78 46800020 */ cvt.s.w $f0, $f0
/* 1644DC 80243C7C 46040002 */ mul.s $f0, $f0, $f4
/* 1644E0 80243C80 00000000 */ nop
/* 1644E4 80243C84 44831000 */ mtc1 $v1, $f2
/* 1644E8 80243C88 00000000 */ nop
/* 1644EC 80243C8C 468010A0 */ cvt.s.w $f2, $f2
/* 1644F0 80243C90 46020000 */ add.s $f0, $f0, $f2
/* 1644F4 80243C94 00031823 */ negu $v1, $v1
/* 1644F8 80243C98 44831000 */ mtc1 $v1, $f2
/* 1644FC 80243C9C 00000000 */ nop
/* 164500 80243CA0 468010A0 */ cvt.s.w $f2, $f2
/* 164504 80243CA4 46001080 */ add.s $f2, $f2, $f0
/* 164508 80243CA8 C4E00000 */ lwc1 $f0, ($a3)
/* 16450C 80243CAC 46800020 */ cvt.s.w $f0, $f0
/* 164510 80243CB0 46020000 */ add.s $f0, $f0, $f2
/* 164514 80243CB4 4600018D */ trunc.w.s $f6, $f0
/* 164518 80243CB8 E4E60000 */ swc1 $f6, ($a3)
/* 16451C 80243CBC 90820000 */ lbu $v0, ($a0)
/* 164520 80243CC0 304200F7 */ andi $v0, $v0, 0xf7
/* 164524 80243CC4 03E00008 */ jr $ra
/* 164528 80243CC8 A0820000 */ sb $v0, ($a0)

View File

@ -1,135 +0,0 @@
.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel filemenu_update_select_file
/* 164168 80243908 00C0482D */ daddu $t1, $a2, $zero
/* 16416C 8024390C 3C028016 */ lui $v0, %hi(gWindows)
/* 164170 80243910 24429D50 */ addiu $v0, $v0, %lo(gWindows)
/* 164174 80243914 00042140 */ sll $a0, $a0, 5
/* 164178 80243918 00824021 */ addu $t0, $a0, $v0
/* 16417C 8024391C 81050003 */ lb $a1, 3($t0)
/* 164180 80243920 9106001C */ lbu $a2, 0x1c($t0)
/* 164184 80243924 3C013D80 */ lui $at, 0x3d80
/* 164188 80243928 44810000 */ mtc1 $at, $f0
/* 16418C 8024392C 00052940 */ sll $a1, $a1, 5
/* 164190 80243930 00A22821 */ addu $a1, $a1, $v0
/* 164194 80243934 44861000 */ mtc1 $a2, $f2
/* 164198 80243938 00000000 */ nop
/* 16419C 8024393C 468010A0 */ cvt.s.w $f2, $f2
/* 1641A0 80243940 28C60010 */ slti $a2, $a2, 0x10
/* 1641A4 80243944 94A20010 */ lhu $v0, 0x10($a1)
/* 1641A8 80243948 46001102 */ mul.s $f4, $f2, $f0
/* 1641AC 8024394C 00000000 */ nop
/* 1641B0 80243950 00021400 */ sll $v0, $v0, 0x10
/* 1641B4 80243954 00022403 */ sra $a0, $v0, 0x10
/* 1641B8 80243958 000217C2 */ srl $v0, $v0, 0x1f
/* 1641BC 8024395C 00822021 */ addu $a0, $a0, $v0
/* 1641C0 80243960 95020010 */ lhu $v0, 0x10($t0)
/* 1641C4 80243964 00042043 */ sra $a0, $a0, 1
/* 1641C8 80243968 00021400 */ sll $v0, $v0, 0x10
/* 1641CC 8024396C 00021C03 */ sra $v1, $v0, 0x10
/* 1641D0 80243970 000217C2 */ srl $v0, $v0, 0x1f
/* 1641D4 80243974 00621821 */ addu $v1, $v1, $v0
/* 1641D8 80243978 00031843 */ sra $v1, $v1, 1
/* 1641DC 8024397C 94A20012 */ lhu $v0, 0x12($a1)
/* 1641E0 80243980 00832823 */ subu $a1, $a0, $v1
/* 1641E4 80243984 95030012 */ lhu $v1, 0x12($t0)
/* 1641E8 80243988 00021400 */ sll $v0, $v0, 0x10
/* 1641EC 8024398C 00022403 */ sra $a0, $v0, 0x10
/* 1641F0 80243990 000217C2 */ srl $v0, $v0, 0x1f
/* 1641F4 80243994 00822021 */ addu $a0, $a0, $v0
/* 1641F8 80243998 00042043 */ sra $a0, $a0, 1
/* 1641FC 8024399C 00031C00 */ sll $v1, $v1, 0x10
/* 164200 802439A0 00031403 */ sra $v0, $v1, 0x10
/* 164204 802439A4 00031FC2 */ srl $v1, $v1, 0x1f
/* 164208 802439A8 00431021 */ addu $v0, $v0, $v1
/* 16420C 802439AC 00021043 */ sra $v0, $v0, 1
/* 164210 802439B0 00822023 */ subu $a0, $a0, $v0
/* 164214 802439B4 10C0002C */ beqz $a2, .L80243A68
/* 164218 802439B8 2484FFDE */ addiu $a0, $a0, -0x22
/* 16421C 802439BC 8503000C */ lh $v1, 0xc($t0)
/* 164220 802439C0 00A31023 */ subu $v0, $a1, $v1
/* 164224 802439C4 44820000 */ mtc1 $v0, $f0
/* 164228 802439C8 00000000 */ nop
/* 16422C 802439CC 46800020 */ cvt.s.w $f0, $f0
/* 164230 802439D0 46040002 */ mul.s $f0, $f0, $f4
/* 164234 802439D4 00000000 */ nop
/* 164238 802439D8 44831000 */ mtc1 $v1, $f2
/* 16423C 802439DC 00000000 */ nop
/* 164240 802439E0 468010A0 */ cvt.s.w $f2, $f2
/* 164244 802439E4 46020000 */ add.s $f0, $f0, $f2
/* 164248 802439E8 00031823 */ negu $v1, $v1
/* 16424C 802439EC 44831000 */ mtc1 $v1, $f2
/* 164250 802439F0 00000000 */ nop
/* 164254 802439F4 468010A0 */ cvt.s.w $f2, $f2
/* 164258 802439F8 46001080 */ add.s $f2, $f2, $f0
/* 16425C 802439FC C5200000 */ lwc1 $f0, ($t1)
/* 164260 80243A00 46800020 */ cvt.s.w $f0, $f0
/* 164264 80243A04 46020000 */ add.s $f0, $f0, $f2
/* 164268 80243A08 4600018D */ trunc.w.s $f6, $f0
/* 16426C 80243A0C E5260000 */ swc1 $f6, ($t1)
/* 164270 80243A10 8503000E */ lh $v1, 0xe($t0)
/* 164274 80243A14 00831023 */ subu $v0, $a0, $v1
/* 164278 80243A18 44820000 */ mtc1 $v0, $f0
/* 16427C 80243A1C 00000000 */ nop
/* 164280 80243A20 46800020 */ cvt.s.w $f0, $f0
/* 164284 80243A24 46040002 */ mul.s $f0, $f0, $f4
/* 164288 80243A28 00000000 */ nop
/* 16428C 80243A2C 44831000 */ mtc1 $v1, $f2
/* 164290 80243A30 00000000 */ nop
/* 164294 80243A34 468010A0 */ cvt.s.w $f2, $f2
/* 164298 80243A38 46020000 */ add.s $f0, $f0, $f2
/* 16429C 80243A3C 00031823 */ negu $v1, $v1
/* 1642A0 80243A40 44831000 */ mtc1 $v1, $f2
/* 1642A4 80243A44 00000000 */ nop
/* 1642A8 80243A48 468010A0 */ cvt.s.w $f2, $f2
/* 1642AC 80243A4C 46001080 */ add.s $f2, $f2, $f0
/* 1642B0 80243A50 C4E00000 */ lwc1 $f0, ($a3)
/* 1642B4 80243A54 46800020 */ cvt.s.w $f0, $f0
/* 1642B8 80243A58 46020000 */ add.s $f0, $f0, $f2
/* 1642BC 80243A5C 4600018D */ trunc.w.s $f6, $f0
/* 1642C0 80243A60 03E00008 */ jr $ra
/* 1642C4 80243A64 E4E60000 */ swc1 $f6, ($a3)
.L80243A68:
/* 1642C8 80243A68 8502000C */ lh $v0, 0xc($t0)
/* 1642CC 80243A6C 00A21823 */ subu $v1, $a1, $v0
/* 1642D0 80243A70 44832000 */ mtc1 $v1, $f4
/* 1642D4 80243A74 00000000 */ nop
/* 1642D8 80243A78 46802120 */ cvt.s.w $f4, $f4
/* 1642DC 80243A7C 44820000 */ mtc1 $v0, $f0
/* 1642E0 80243A80 00000000 */ nop
/* 1642E4 80243A84 46800020 */ cvt.s.w $f0, $f0
/* 1642E8 80243A88 46002100 */ add.s $f4, $f4, $f0
/* 1642EC 80243A8C 00021023 */ negu $v0, $v0
/* 1642F0 80243A90 44821000 */ mtc1 $v0, $f2
/* 1642F4 80243A94 00000000 */ nop
/* 1642F8 80243A98 468010A0 */ cvt.s.w $f2, $f2
/* 1642FC 80243A9C 46041080 */ add.s $f2, $f2, $f4
/* 164300 80243AA0 C5200000 */ lwc1 $f0, ($t1)
/* 164304 80243AA4 46800020 */ cvt.s.w $f0, $f0
/* 164308 80243AA8 46020000 */ add.s $f0, $f0, $f2
/* 16430C 80243AAC 4600018D */ trunc.w.s $f6, $f0
/* 164310 80243AB0 E5260000 */ swc1 $f6, ($t1)
/* 164314 80243AB4 8502000E */ lh $v0, 0xe($t0)
/* 164318 80243AB8 00821823 */ subu $v1, $a0, $v0
/* 16431C 80243ABC 44832000 */ mtc1 $v1, $f4
/* 164320 80243AC0 00000000 */ nop
/* 164324 80243AC4 46802120 */ cvt.s.w $f4, $f4
/* 164328 80243AC8 44820000 */ mtc1 $v0, $f0
/* 16432C 80243ACC 00000000 */ nop
/* 164330 80243AD0 46800020 */ cvt.s.w $f0, $f0
/* 164334 80243AD4 46002100 */ add.s $f4, $f4, $f0
/* 164338 80243AD8 00021023 */ negu $v0, $v0
/* 16433C 80243ADC 44821000 */ mtc1 $v0, $f2
/* 164340 80243AE0 00000000 */ nop
/* 164344 80243AE4 468010A0 */ cvt.s.w $f2, $f2
/* 164348 80243AE8 46041080 */ add.s $f2, $f2, $f4
/* 16434C 80243AEC C4E00000 */ lwc1 $f0, ($a3)
/* 164350 80243AF0 46800020 */ cvt.s.w $f0, $f0
/* 164354 80243AF4 46020000 */ add.s $f0, $f0, $f2
/* 164358 80243AF8 4600018D */ trunc.w.s $f6, $f0
/* 16435C 80243AFC E4E60000 */ swc1 $f6, ($a3)
/* 164360 80243B00 91020000 */ lbu $v0, ($t0)
/* 164364 80243B04 304200F7 */ andi $v0, $v0, 0xf7
/* 164368 80243B08 03E00008 */ jr $ra
/* 16436C 80243B0C A1020000 */ sb $v0, ($t0)

View File

@ -1,144 +0,0 @@
.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel filemenu_update_show_name_confirm
/* 16452C 80243CCC 27BDFFB8 */ addiu $sp, $sp, -0x48
/* 164530 80243CD0 AFB5003C */ sw $s5, 0x3c($sp)
/* 164534 80243CD4 00E0A82D */ daddu $s5, $a3, $zero
/* 164538 80243CD8 3C06E300 */ lui $a2, 0xe300
/* 16453C 80243CDC 34C60A01 */ ori $a2, $a2, 0xa01
/* 164540 80243CE0 3C09FCFF */ lui $t1, 0xfcff
/* 164544 80243CE4 3529FFFF */ ori $t1, $t1, 0xffff
/* 164548 80243CE8 3C07FFFD */ lui $a3, 0xfffd
/* 16454C 80243CEC 34E7F6FB */ ori $a3, $a3, 0xf6fb
/* 164550 80243CF0 3C0AE200 */ lui $t2, 0xe200
/* 164554 80243CF4 354A001C */ ori $t2, $t2, 0x1c
/* 164558 80243CF8 3C080050 */ lui $t0, 0x50
/* 16455C 80243CFC 35084340 */ ori $t0, $t0, 0x4340
/* 164560 80243D00 3C05800A */ lui $a1, %hi(gMasterGfxPos)
/* 164564 80243D04 24A5A66C */ addiu $a1, $a1, %lo(gMasterGfxPos)
/* 164568 80243D08 3C038016 */ lui $v1, %hi(gWindows)
/* 16456C 80243D0C 24639D50 */ addiu $v1, $v1, %lo(gWindows)
/* 164570 80243D10 00042140 */ sll $a0, $a0, 5
/* 164574 80243D14 AFB40038 */ sw $s4, 0x38($sp)
/* 164578 80243D18 0083A021 */ addu $s4, $a0, $v1
/* 16457C 80243D1C 3C03E700 */ lui $v1, 0xe700
/* 164580 80243D20 AFBF0040 */ sw $ra, 0x40($sp)
/* 164584 80243D24 AFB30034 */ sw $s3, 0x34($sp)
/* 164588 80243D28 AFB20030 */ sw $s2, 0x30($sp)
/* 16458C 80243D2C AFB1002C */ sw $s1, 0x2c($sp)
/* 164590 80243D30 AFB00028 */ sw $s0, 0x28($sp)
/* 164594 80243D34 8CA20000 */ lw $v0, ($a1)
/* 164598 80243D38 9293001C */ lbu $s3, 0x1c($s4)
/* 16459C 80243D3C 0040202D */ daddu $a0, $v0, $zero
/* 1645A0 80243D40 24420008 */ addiu $v0, $v0, 8
/* 1645A4 80243D44 ACA20000 */ sw $v0, ($a1)
/* 1645A8 80243D48 AC830000 */ sw $v1, ($a0)
/* 1645AC 80243D4C 24430008 */ addiu $v1, $v0, 8
/* 1645B0 80243D50 AC800004 */ sw $zero, 4($a0)
/* 1645B4 80243D54 ACA30000 */ sw $v1, ($a1)
/* 1645B8 80243D58 24430010 */ addiu $v1, $v0, 0x10
/* 1645BC 80243D5C AC460000 */ sw $a2, ($v0)
/* 1645C0 80243D60 AC400004 */ sw $zero, 4($v0)
/* 1645C4 80243D64 ACA30000 */ sw $v1, ($a1)
/* 1645C8 80243D68 24430018 */ addiu $v1, $v0, 0x18
/* 1645CC 80243D6C AC490008 */ sw $t1, 8($v0)
/* 1645D0 80243D70 AC47000C */ sw $a3, 0xc($v0)
/* 1645D4 80243D74 ACA30000 */ sw $v1, ($a1)
/* 1645D8 80243D78 24430020 */ addiu $v1, $v0, 0x20
/* 1645DC 80243D7C AC4A0010 */ sw $t2, 0x10($v0)
/* 1645E0 80243D80 AC480014 */ sw $t0, 0x14($v0)
/* 1645E4 80243D84 ACA30000 */ sw $v1, ($a1)
/* 1645E8 80243D88 3C03FA00 */ lui $v1, 0xfa00
/* 1645EC 80243D8C AC430018 */ sw $v1, 0x18($v0)
/* 1645F0 80243D90 2403008C */ addiu $v1, $zero, 0x8c
/* 1645F4 80243D94 AC43001C */ sw $v1, 0x1c($v0)
/* 1645F8 80243D98 2A62000A */ slti $v0, $s3, 0xa
/* 1645FC 80243D9C 1040002D */ beqz $v0, .L80243E54
/* 164600 80243DA0 0000202D */ daddu $a0, $zero, $zero
/* 164604 80243DA4 0080282D */ daddu $a1, $a0, $zero
/* 164608 80243DA8 24060500 */ addiu $a2, $zero, 0x500
/* 16460C 80243DAC 00138040 */ sll $s0, $s3, 1
/* 164610 80243DB0 02138021 */ addu $s0, $s0, $s3
/* 164614 80243DB4 00109100 */ sll $s2, $s0, 4
/* 164618 80243DB8 0240382D */ daddu $a3, $s2, $zero
/* 16461C 80243DBC 00108080 */ sll $s0, $s0, 2
/* 164620 80243DC0 AFA00010 */ sw $zero, 0x10($sp)
/* 164624 80243DC4 AFA00014 */ sw $zero, 0x14($sp)
/* 164628 80243DC8 AFA00018 */ sw $zero, 0x18($sp)
/* 16462C 80243DCC AFA0001C */ sw $zero, 0x1c($sp)
/* 164630 80243DD0 0C090AE8 */ jal mainmenu_draw_rect
/* 164634 80243DD4 AFA00020 */ sw $zero, 0x20($sp)
/* 164638 80243DD8 0000202D */ daddu $a0, $zero, $zero
/* 16463C 80243DDC 241100F0 */ addiu $s1, $zero, 0xf0
/* 164640 80243DE0 02308823 */ subu $s1, $s1, $s0
/* 164644 80243DE4 00118880 */ sll $s1, $s1, 2
/* 164648 80243DE8 0220282D */ daddu $a1, $s1, $zero
/* 16464C 80243DEC 24060500 */ addiu $a2, $zero, 0x500
/* 164650 80243DF0 240703C0 */ addiu $a3, $zero, 0x3c0
/* 164654 80243DF4 AFA00010 */ sw $zero, 0x10($sp)
/* 164658 80243DF8 AFA00014 */ sw $zero, 0x14($sp)
/* 16465C 80243DFC AFA00018 */ sw $zero, 0x18($sp)
/* 164660 80243E00 AFA0001C */ sw $zero, 0x1c($sp)
/* 164664 80243E04 0C090AE8 */ jal mainmenu_draw_rect
/* 164668 80243E08 AFA00020 */ sw $zero, 0x20($sp)
/* 16466C 80243E0C 0000202D */ daddu $a0, $zero, $zero
/* 164670 80243E10 0240282D */ daddu $a1, $s2, $zero
/* 164674 80243E14 00133180 */ sll $a2, $s3, 6
/* 164678 80243E18 0220382D */ daddu $a3, $s1, $zero
/* 16467C 80243E1C AFA00010 */ sw $zero, 0x10($sp)
/* 164680 80243E20 AFA00014 */ sw $zero, 0x14($sp)
/* 164684 80243E24 AFA00018 */ sw $zero, 0x18($sp)
/* 164688 80243E28 AFA0001C */ sw $zero, 0x1c($sp)
/* 16468C 80243E2C 0C090AE8 */ jal mainmenu_draw_rect
/* 164690 80243E30 AFA00020 */ sw $zero, 0x20($sp)
/* 164694 80243E34 00131100 */ sll $v0, $s3, 4
/* 164698 80243E38 24040140 */ addiu $a0, $zero, 0x140
/* 16469C 80243E3C 00822023 */ subu $a0, $a0, $v0
/* 1646A0 80243E40 00042080 */ sll $a0, $a0, 2
/* 1646A4 80243E44 0240282D */ daddu $a1, $s2, $zero
/* 1646A8 80243E48 24060500 */ addiu $a2, $zero, 0x500
/* 1646AC 80243E4C 08090F98 */ j .L80243E60
/* 1646B0 80243E50 0220382D */ daddu $a3, $s1, $zero
.L80243E54:
/* 1646B4 80243E54 0080282D */ daddu $a1, $a0, $zero
/* 1646B8 80243E58 24060500 */ addiu $a2, $zero, 0x500
/* 1646BC 80243E5C 240703C0 */ addiu $a3, $zero, 0x3c0
.L80243E60:
/* 1646C0 80243E60 AFA00010 */ sw $zero, 0x10($sp)
/* 1646C4 80243E64 AFA00014 */ sw $zero, 0x14($sp)
/* 1646C8 80243E68 AFA00018 */ sw $zero, 0x18($sp)
/* 1646CC 80243E6C AFA0001C */ sw $zero, 0x1c($sp)
/* 1646D0 80243E70 0C090AE8 */ jal mainmenu_draw_rect
/* 1646D4 80243E74 AFA00020 */ sw $zero, 0x20($sp)
/* 1646D8 80243E78 2663FFF6 */ addiu $v1, $s3, -0xa
/* 1646DC 80243E7C 2C62000A */ sltiu $v0, $v1, 0xa
/* 1646E0 80243E80 1040000C */ beqz $v0, .L80243EB4
/* 1646E4 80243E84 2A620014 */ slti $v0, $s3, 0x14
/* 1646E8 80243E88 92820000 */ lbu $v0, ($s4)
/* 1646EC 80243E8C 304200FB */ andi $v0, $v0, 0xfb
/* 1646F0 80243E90 A2820000 */ sb $v0, ($s4)
/* 1646F4 80243E94 00031040 */ sll $v0, $v1, 1
/* 1646F8 80243E98 3C038025 */ lui $v1, %hi(D_80249D34)
/* 1646FC 80243E9C 00621821 */ addu $v1, $v1, $v0
/* 164700 80243EA0 84639D34 */ lh $v1, %lo(D_80249D34)($v1)
/* 164704 80243EA4 8EA20000 */ lw $v0, ($s5)
/* 164708 80243EA8 00431023 */ subu $v0, $v0, $v1
/* 16470C 80243EAC AEA20000 */ sw $v0, ($s5)
/* 164710 80243EB0 2A620014 */ slti $v0, $s3, 0x14
.L80243EB4:
/* 164714 80243EB4 14400004 */ bnez $v0, .L80243EC8
/* 164718 80243EB8 00000000 */ nop
/* 16471C 80243EBC 92820000 */ lbu $v0, ($s4)
/* 164720 80243EC0 304200F7 */ andi $v0, $v0, 0xf7
/* 164724 80243EC4 A2820000 */ sb $v0, ($s4)
.L80243EC8:
/* 164728 80243EC8 8FBF0040 */ lw $ra, 0x40($sp)
/* 16472C 80243ECC 8FB5003C */ lw $s5, 0x3c($sp)
/* 164730 80243ED0 8FB40038 */ lw $s4, 0x38($sp)
/* 164734 80243ED4 8FB30034 */ lw $s3, 0x34($sp)
/* 164738 80243ED8 8FB20030 */ lw $s2, 0x30($sp)
/* 16473C 80243EDC 8FB1002C */ lw $s1, 0x2c($sp)
/* 164740 80243EE0 8FB00028 */ lw $s0, 0x28($sp)
/* 164744 80243EE4 03E00008 */ jr $ra
/* 164748 80243EE8 27BD0048 */ addiu $sp, $sp, 0x48

View File

@ -1,33 +0,0 @@
.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel func_80244BC4
/* 165424 80244BC4 3C048025 */ lui $a0, %hi(filemenu_menus)
/* 165428 80244BC8 24849B84 */ addiu $a0, $a0, %lo(filemenu_menus)
/* 16542C 80244BCC 8C820000 */ lw $v0, ($a0)
/* 165430 80244BD0 80420004 */ lb $v0, 4($v0)
/* 165434 80244BD4 14400009 */ bnez $v0, .L80244BFC
/* 165438 80244BD8 24020001 */ addiu $v0, $zero, 1
/* 16543C 80244BDC 3C038025 */ lui $v1, %hi(D_8024C098)
/* 165440 80244BE0 8063C098 */ lb $v1, %lo(D_8024C098)($v1)
/* 165444 80244BE4 14620005 */ bne $v1, $v0, .L80244BFC
/* 165448 80244BE8 00000000 */ nop
/* 16544C 80244BEC 8C820004 */ lw $v0, 4($a0)
/* 165450 80244BF0 90420003 */ lbu $v0, 3($v0)
/* 165454 80244BF4 1040000B */ beqz $v0, .L80244C24
/* 165458 80244BF8 24020002 */ addiu $v0, $zero, 2
.L80244BFC:
/* 16545C 80244BFC 3C038025 */ lui $v1, %hi(filemenu_menus)
/* 165460 80244C00 8C639B84 */ lw $v1, %lo(filemenu_menus)($v1)
/* 165464 80244C04 80620004 */ lb $v0, 4($v1)
/* 165468 80244C08 14400006 */ bnez $v0, .L80244C24
/* 16546C 80244C0C 0000102D */ daddu $v0, $zero, $zero
/* 165470 80244C10 90630003 */ lbu $v1, 3($v1)
/* 165474 80244C14 2C630004 */ sltiu $v1, $v1, 4
/* 165478 80244C18 14600002 */ bnez $v1, .L80244C24
/* 16547C 80244C1C 24020001 */ addiu $v0, $zero, 1
/* 165480 80244C20 0000102D */ daddu $v0, $zero, $zero
.L80244C24:
/* 165484 80244C24 03E00008 */ jr $ra
/* 165488 80244C28 00000000 */ nop
/* 16548C 80244C2C 00000000 */ nop

View File

@ -1,300 +0,0 @@
.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel filemenu_draw_contents_file_info
/* 165834 80244FD4 27BDFFB0 */ addiu $sp, $sp, -0x50
/* 165838 80244FD8 AFBF004C */ sw $ra, 0x4c($sp)
/* 16583C 80244FDC AFBE0048 */ sw $fp, 0x48($sp)
/* 165840 80244FE0 AFB70044 */ sw $s7, 0x44($sp)
/* 165844 80244FE4 AFB60040 */ sw $s6, 0x40($sp)
/* 165848 80244FE8 AFB5003C */ sw $s5, 0x3c($sp)
/* 16584C 80244FEC AFB40038 */ sw $s4, 0x38($sp)
/* 165850 80244FF0 AFB30034 */ sw $s3, 0x34($sp)
/* 165854 80244FF4 AFB20030 */ sw $s2, 0x30($sp)
/* 165858 80244FF8 AFB1002C */ sw $s1, 0x2c($sp)
/* 16585C 80244FFC AFB00028 */ sw $s0, 0x28($sp)
/* 165860 80245000 AFA60058 */ sw $a2, 0x58($sp)
/* 165864 80245004 AFA7005C */ sw $a3, 0x5c($sp)
/* 165868 80245008 3C028007 */ lui $v0, %hi(D_80077A24)
/* 16586C 8024500C 00441021 */ addu $v0, $v0, $a0
/* 165870 80245010 90427A24 */ lbu $v0, %lo(D_80077A24)($v0)
/* 165874 80245014 14400008 */ bnez $v0, .L80245038
/* 165878 80245018 00041840 */ sll $v1, $a0, 1
/* 16587C 8024501C 0C0926A9 */ jal filemenu_get_menu_message
/* 165880 80245020 24040006 */ addiu $a0, $zero, 6
/* 165884 80245024 0040202D */ daddu $a0, $v0, $zero
/* 165888 80245028 8FA80058 */ lw $t0, 0x58($sp)
/* 16588C 8024502C 240700FF */ addiu $a3, $zero, 0xff
/* 165890 80245030 0809141C */ j .L80245070
/* 165894 80245034 25050032 */ addiu $a1, $t0, 0x32
.L80245038:
/* 165898 80245038 3C028007 */ lui $v0, %hi(D_800779C4)
/* 16589C 8024503C 244279C4 */ addiu $v0, $v0, %lo(D_800779C4)
/* 1658A0 80245040 00641821 */ addu $v1, $v1, $a0
/* 1658A4 80245044 000318C0 */ sll $v1, $v1, 3
/* 1658A8 80245048 00629021 */ addu $s2, $v1, $v0
/* 1658AC 8024504C 8E420000 */ lw $v0, ($s2)
/* 1658B0 80245050 1440000F */ bnez $v0, .L80245090
/* 1658B4 80245054 00000000 */ nop
/* 1658B8 80245058 0C0926A9 */ jal filemenu_get_menu_message
/* 1658BC 8024505C 2404000C */ addiu $a0, $zero, 0xc
/* 1658C0 80245060 0040202D */ daddu $a0, $v0, $zero
/* 1658C4 80245064 8FA80058 */ lw $t0, 0x58($sp)
/* 1658C8 80245068 240700FF */ addiu $a3, $zero, 0xff
/* 1658CC 8024506C 2505001E */ addiu $a1, $t0, 0x1e
.L80245070:
/* 1658D0 80245070 8FA8005C */ lw $t0, 0x5c($sp)
/* 1658D4 80245074 2402000A */ addiu $v0, $zero, 0xa
/* 1658D8 80245078 AFA20010 */ sw $v0, 0x10($sp)
/* 1658DC 8024507C AFA00014 */ sw $zero, 0x14($sp)
/* 1658E0 80245080 0C09265F */ jal filemenu_draw_message
/* 1658E4 80245084 25060014 */ addiu $a2, $t0, 0x14
/* 1658E8 80245088 08091507 */ j .L8024541C
/* 1658EC 8024508C 00000000 */ nop
.L80245090:
/* 1658F0 80245090 0C0926A9 */ jal filemenu_get_menu_message
/* 1658F4 80245094 24040007 */ addiu $a0, $zero, 7
/* 1658F8 80245098 8FA80058 */ lw $t0, 0x58($sp)
/* 1658FC 8024509C 0040202D */ daddu $a0, $v0, $zero
/* 165900 802450A0 25050022 */ addiu $a1, $t0, 0x22
/* 165904 802450A4 8FA8005C */ lw $t0, 0x5c($sp)
/* 165908 802450A8 240700FF */ addiu $a3, $zero, 0xff
/* 16590C 802450AC 2511000A */ addiu $s1, $t0, 0xa
/* 165910 802450B0 0220302D */ daddu $a2, $s1, $zero
/* 165914 802450B4 2408000A */ addiu $t0, $zero, 0xa
/* 165918 802450B8 AFA80010 */ sw $t0, 0x10($sp)
/* 16591C 802450BC 24080001 */ addiu $t0, $zero, 1
/* 165920 802450C0 0C09265F */ jal filemenu_draw_message
/* 165924 802450C4 AFA80014 */ sw $t0, 0x14($sp)
/* 165928 802450C8 3C156666 */ lui $s5, 0x6666
/* 16592C 802450CC 36B56667 */ ori $s5, $s5, 0x6667
/* 165930 802450D0 0220302D */ daddu $a2, $s1, $zero
/* 165934 802450D4 24070001 */ addiu $a3, $zero, 1
/* 165938 802450D8 8FA80058 */ lw $t0, 0x58($sp)
/* 16593C 802450DC 92420006 */ lbu $v0, 6($s2)
/* 165940 802450E0 2505004F */ addiu $a1, $t0, 0x4f
/* 165944 802450E4 2408000A */ addiu $t0, $zero, 0xa
/* 165948 802450E8 00021600 */ sll $v0, $v0, 0x18
/* 16594C 802450EC 00029E03 */ sra $s3, $v0, 0x18
/* 165950 802450F0 AFA80010 */ sw $t0, 0x10($sp)
/* 165954 802450F4 240800FF */ addiu $t0, $zero, 0xff
/* 165958 802450F8 02750018 */ mult $s3, $s5
/* 16595C 802450FC AFA80014 */ sw $t0, 0x14($sp)
/* 165960 80245100 24080002 */ addiu $t0, $zero, 2
/* 165964 80245104 000217C3 */ sra $v0, $v0, 0x1f
/* 165968 80245108 AFA80018 */ sw $t0, 0x18($sp)
/* 16596C 8024510C 00004010 */ mfhi $t0
/* 165970 80245110 00088083 */ sra $s0, $t0, 2
/* 165974 80245114 02028023 */ subu $s0, $s0, $v0
/* 165978 80245118 0C049DA7 */ jal draw_number
/* 16597C 8024511C 0200202D */ daddu $a0, $s0, $zero
/* 165980 80245120 00102080 */ sll $a0, $s0, 2
/* 165984 80245124 00902021 */ addu $a0, $a0, $s0
/* 165988 80245128 00042040 */ sll $a0, $a0, 1
/* 16598C 8024512C 02642023 */ subu $a0, $s3, $a0
/* 165990 80245130 0220302D */ daddu $a2, $s1, $zero
/* 165994 80245134 8FA80058 */ lw $t0, 0x58($sp)
/* 165998 80245138 24070001 */ addiu $a3, $zero, 1
/* 16599C 8024513C 25050058 */ addiu $a1, $t0, 0x58
/* 1659A0 80245140 2408000A */ addiu $t0, $zero, 0xa
/* 1659A4 80245144 AFA80010 */ sw $t0, 0x10($sp)
/* 1659A8 80245148 240800FF */ addiu $t0, $zero, 0xff
/* 1659AC 8024514C AFA80014 */ sw $t0, 0x14($sp)
/* 1659B0 80245150 24080002 */ addiu $t0, $zero, 2
/* 1659B4 80245154 0C049DA7 */ jal draw_number
/* 1659B8 80245158 AFA80018 */ sw $t0, 0x18($sp)
/* 1659BC 8024515C 0C0926A9 */ jal filemenu_get_menu_message
/* 1659C0 80245160 24040008 */ addiu $a0, $zero, 8
/* 1659C4 80245164 8FA80058 */ lw $t0, 0x58($sp)
/* 1659C8 80245168 0040202D */ daddu $a0, $v0, $zero
/* 1659CC 8024516C 2505000B */ addiu $a1, $t0, 0xb
/* 1659D0 80245170 8FA8005C */ lw $t0, 0x5c($sp)
/* 1659D4 80245174 240700FF */ addiu $a3, $zero, 0xff
/* 1659D8 80245178 251E0018 */ addiu $fp, $t0, 0x18
/* 1659DC 8024517C 03C0302D */ daddu $a2, $fp, $zero
/* 1659E0 80245180 2408000A */ addiu $t0, $zero, 0xa
/* 1659E4 80245184 AFA80010 */ sw $t0, 0x10($sp)
/* 1659E8 80245188 24080001 */ addiu $t0, $zero, 1
/* 1659EC 8024518C 0C09265F */ jal filemenu_draw_message
/* 1659F0 80245190 AFA80014 */ sw $t0, 0x14($sp)
/* 1659F4 80245194 3C020149 */ lui $v0, 0x149
/* 1659F8 80245198 8E530000 */ lw $s3, ($s2)
/* 1659FC 8024519C 344296FF */ ori $v0, $v0, 0x96ff
/* 165A00 802451A0 0053102A */ slt $v0, $v0, $s3
/* 165A04 802451A4 10400003 */ beqz $v0, .L802451B4
/* 165A08 802451A8 3C021F11 */ lui $v0, 0x1f11
/* 165A0C 802451AC 3C130149 */ lui $s3, 0x149
/* 165A10 802451B0 367396FF */ ori $s3, $s3, 0x96ff
.L802451B4:
/* 165A14 802451B4 3442A4A5 */ ori $v0, $v0, 0xa4a5
/* 165A18 802451B8 03C0302D */ daddu $a2, $fp, $zero
/* 165A1C 802451BC 24070001 */ addiu $a3, $zero, 1
/* 165A20 802451C0 0000A02D */ daddu $s4, $zero, $zero
/* 165A24 802451C4 24170011 */ addiu $s7, $zero, 0x11
/* 165A28 802451C8 02620018 */ mult $s3, $v0
/* 165A2C 802451CC 8FA80058 */ lw $t0, 0x58($sp)
/* 165A30 802451D0 2416001C */ addiu $s6, $zero, 0x1c
/* 165A34 802451D4 AFB20020 */ sw $s2, 0x20($sp)
/* 165A38 802451D8 001397C3 */ sra $s2, $s3, 0x1f
/* 165A3C 802451DC 2505004C */ addiu $a1, $t0, 0x4c
/* 165A40 802451E0 00004010 */ mfhi $t0
/* 165A44 802451E4 00088483 */ sra $s0, $t0, 0x12
/* 165A48 802451E8 02128023 */ subu $s0, $s0, $s2
/* 165A4C 802451EC 02150018 */ mult $s0, $s5
/* 165A50 802451F0 3C158025 */ lui $s5, %hi(filemenu_hudElemIDs)
/* 165A54 802451F4 26B5C0B0 */ addiu $s5, $s5, %lo(filemenu_hudElemIDs)
/* 165A58 802451F8 2408000A */ addiu $t0, $zero, 0xa
/* 165A5C 802451FC AFA80010 */ sw $t0, 0x10($sp)
/* 165A60 80245200 240800FF */ addiu $t0, $zero, 0xff
/* 165A64 80245204 AFA80014 */ sw $t0, 0x14($sp)
/* 165A68 80245208 24080002 */ addiu $t0, $zero, 2
/* 165A6C 8024520C 00101FC3 */ sra $v1, $s0, 0x1f
/* 165A70 80245210 AFA80018 */ sw $t0, 0x18($sp)
/* 165A74 80245214 00004010 */ mfhi $t0
/* 165A78 80245218 00081083 */ sra $v0, $t0, 2
/* 165A7C 8024521C 00431023 */ subu $v0, $v0, $v1
/* 165A80 80245220 00022080 */ sll $a0, $v0, 2
/* 165A84 80245224 00822021 */ addu $a0, $a0, $v0
/* 165A88 80245228 00E42004 */ sllv $a0, $a0, $a3
/* 165A8C 8024522C 0C049DA7 */ jal draw_number
/* 165A90 80245230 02042023 */ subu $a0, $s0, $a0
/* 165A94 80245234 3C029B58 */ lui $v0, 0x9b58
/* 165A98 80245238 34423739 */ ori $v0, $v0, 0x3739
/* 165A9C 8024523C 03C0302D */ daddu $a2, $fp, $zero
/* 165AA0 80245240 24070001 */ addiu $a3, $zero, 1
/* 165AA4 80245244 00102080 */ sll $a0, $s0, 2
/* 165AA8 80245248 00902021 */ addu $a0, $a0, $s0
/* 165AAC 8024524C 00E42004 */ sllv $a0, $a0, $a3
/* 165AB0 80245250 8FA80058 */ lw $t0, 0x58($sp)
/* 165AB4 80245254 02620018 */ mult $s3, $v0
/* 165AB8 80245258 25050055 */ addiu $a1, $t0, 0x55
/* 165ABC 8024525C 2408000A */ addiu $t0, $zero, 0xa
/* 165AC0 80245260 AFA80010 */ sw $t0, 0x10($sp)
/* 165AC4 80245264 240800FF */ addiu $t0, $zero, 0xff
/* 165AC8 80245268 AFA80014 */ sw $t0, 0x14($sp)
/* 165ACC 8024526C 24080002 */ addiu $t0, $zero, 2
/* 165AD0 80245270 AFA80018 */ sw $t0, 0x18($sp)
/* 165AD4 80245274 00004010 */ mfhi $t0
/* 165AD8 80245278 01138821 */ addu $s1, $t0, $s3
/* 165ADC 8024527C 02F18807 */ srav $s1, $s1, $s7
/* 165AE0 80245280 02328823 */ subu $s1, $s1, $s2
/* 165AE4 80245284 0C049DA7 */ jal draw_number
/* 165AE8 80245288 02242023 */ subu $a0, $s1, $a0
/* 165AEC 8024528C 0C0926A9 */ jal filemenu_get_menu_message
/* 165AF0 80245290 2404000D */ addiu $a0, $zero, 0xd
/* 165AF4 80245294 0040202D */ daddu $a0, $v0, $zero
/* 165AF8 80245298 8FA80058 */ lw $t0, 0x58($sp)
/* 165AFC 8024529C 240700FF */ addiu $a3, $zero, 0xff
/* 165B00 802452A0 2510005F */ addiu $s0, $t0, 0x5f
/* 165B04 802452A4 8FA8005C */ lw $t0, 0x5c($sp)
/* 165B08 802452A8 0200282D */ daddu $a1, $s0, $zero
/* 165B0C 802452AC 25060017 */ addiu $a2, $t0, 0x17
/* 165B10 802452B0 2408000A */ addiu $t0, $zero, 0xa
/* 165B14 802452B4 AFA80010 */ sw $t0, 0x10($sp)
/* 165B18 802452B8 24080001 */ addiu $t0, $zero, 1
/* 165B1C 802452BC 0C09265F */ jal filemenu_draw_message
/* 165B20 802452C0 AFA80014 */ sw $t0, 0x14($sp)
/* 165B24 802452C4 0C0926A9 */ jal filemenu_get_menu_message
/* 165B28 802452C8 2404000D */ addiu $a0, $zero, 0xd
/* 165B2C 802452CC 0040202D */ daddu $a0, $v0, $zero
/* 165B30 802452D0 0200282D */ daddu $a1, $s0, $zero
/* 165B34 802452D4 8FA8005C */ lw $t0, 0x5c($sp)
/* 165B38 802452D8 240700FF */ addiu $a3, $zero, 0xff
/* 165B3C 802452DC 25060012 */ addiu $a2, $t0, 0x12
/* 165B40 802452E0 2408000A */ addiu $t0, $zero, 0xa
/* 165B44 802452E4 AFA80010 */ sw $t0, 0x10($sp)
/* 165B48 802452E8 24080001 */ addiu $t0, $zero, 1
/* 165B4C 802452EC 0C09265F */ jal filemenu_draw_message
/* 165B50 802452F0 AFA80014 */ sw $t0, 0x14($sp)
/* 165B54 802452F4 3C027482 */ lui $v0, 0x7482
/* 165B58 802452F8 3442296B */ ori $v0, $v0, 0x296b
/* 165B5C 802452FC 03C0302D */ daddu $a2, $fp, $zero
/* 165B60 80245300 24070001 */ addiu $a3, $zero, 1
/* 165B64 80245304 00F12004 */ sllv $a0, $s1, $a3
/* 165B68 80245308 00912021 */ addu $a0, $a0, $s1
/* 165B6C 8024530C 00E42004 */ sllv $a0, $a0, $a3
/* 165B70 80245310 8FA80058 */ lw $t0, 0x58($sp)
/* 165B74 80245314 02620018 */ mult $s3, $v0
/* 165B78 80245318 25050064 */ addiu $a1, $t0, 0x64
/* 165B7C 8024531C 2408000A */ addiu $t0, $zero, 0xa
/* 165B80 80245320 AFA80010 */ sw $t0, 0x10($sp)
/* 165B84 80245324 240800FF */ addiu $t0, $zero, 0xff
/* 165B88 80245328 AFA80014 */ sw $t0, 0x14($sp)
/* 165B8C 8024532C 24080002 */ addiu $t0, $zero, 2
/* 165B90 80245330 AFA80018 */ sw $t0, 0x18($sp)
/* 165B94 80245334 00004010 */ mfhi $t0
/* 165B98 80245338 00088383 */ sra $s0, $t0, 0xe
/* 165B9C 8024533C 02128023 */ subu $s0, $s0, $s2
/* 165BA0 80245340 0C049DA7 */ jal draw_number
/* 165BA4 80245344 02042023 */ subu $a0, $s0, $a0
/* 165BA8 80245348 3C0291A2 */ lui $v0, 0x91a2
/* 165BAC 8024534C 3442B3C5 */ ori $v0, $v0, 0xb3c5
/* 165BB0 80245350 03C0302D */ daddu $a2, $fp, $zero
/* 165BB4 80245354 24070001 */ addiu $a3, $zero, 1
/* 165BB8 80245358 00102080 */ sll $a0, $s0, 2
/* 165BBC 8024535C 00902021 */ addu $a0, $a0, $s0
/* 165BC0 80245360 00E42004 */ sllv $a0, $a0, $a3
/* 165BC4 80245364 8FA80058 */ lw $t0, 0x58($sp)
/* 165BC8 80245368 02620018 */ mult $s3, $v0
/* 165BCC 8024536C 2505006D */ addiu $a1, $t0, 0x6d
/* 165BD0 80245370 2408000A */ addiu $t0, $zero, 0xa
/* 165BD4 80245374 AFA80010 */ sw $t0, 0x10($sp)
/* 165BD8 80245378 240800FF */ addiu $t0, $zero, 0xff
/* 165BDC 8024537C AFA80014 */ sw $t0, 0x14($sp)
/* 165BE0 80245380 24080002 */ addiu $t0, $zero, 2
/* 165BE4 80245384 AFA80018 */ sw $t0, 0x18($sp)
/* 165BE8 80245388 00004010 */ mfhi $t0
/* 165BEC 8024538C 01131021 */ addu $v0, $t0, $s3
/* 165BF0 80245390 000212C3 */ sra $v0, $v0, 0xb
/* 165BF4 80245394 00521023 */ subu $v0, $v0, $s2
/* 165BF8 80245398 0C049DA7 */ jal draw_number
/* 165BFC 8024539C 00442023 */ subu $a0, $v0, $a0
.L802453A0:
/* 165C00 802453A0 8FA80020 */ lw $t0, 0x20($sp)
/* 165C04 802453A4 91020004 */ lbu $v0, 4($t0)
/* 165C08 802453A8 0282102A */ slt $v0, $s4, $v0
/* 165C0C 802453AC 10400003 */ beqz $v0, .L802453BC
/* 165C10 802453B0 00000000 */ nop
/* 165C14 802453B4 080914F3 */ j .L802453CC
/* 165C18 802453B8 8EB00000 */ lw $s0, ($s5)
.L802453BC:
/* 165C1C 802453BC 3C088025 */ lui $t0, %hi(filemenu_hudElemIDs)
/* 165C20 802453C0 2508C0B0 */ addiu $t0, $t0, %lo(filemenu_hudElemIDs)
/* 165C24 802453C4 02C81021 */ addu $v0, $s6, $t0
/* 165C28 802453C8 8C500000 */ lw $s0, ($v0)
.L802453CC:
/* 165C2C 802453CC 8FA80058 */ lw $t0, 0x58($sp)
/* 165C30 802453D0 01172821 */ addu $a1, $t0, $s7
/* 165C34 802453D4 8FA8005C */ lw $t0, 0x5c($sp)
/* 165C38 802453D8 0200202D */ daddu $a0, $s0, $zero
/* 165C3C 802453DC 0C051261 */ jal set_hud_element_render_pos
/* 165C40 802453E0 2506002C */ addiu $a2, $t0, 0x2c
/* 165C44 802453E4 16800005 */ bnez $s4, .L802453FC
/* 165C48 802453E8 00000000 */ nop
/* 165C4C 802453EC 0C0511F8 */ jal draw_hud_element_3
/* 165C50 802453F0 0200202D */ daddu $a0, $s0, $zero
/* 165C54 802453F4 08091502 */ j .L80245408
/* 165C58 802453F8 26F70010 */ addiu $s7, $s7, 0x10
.L802453FC:
/* 165C5C 802453FC 0C0511F1 */ jal draw_hud_element_2
/* 165C60 80245400 0200202D */ daddu $a0, $s0, $zero
/* 165C64 80245404 26F70010 */ addiu $s7, $s7, 0x10
.L80245408:
/* 165C68 80245408 26D60004 */ addiu $s6, $s6, 4
/* 165C6C 8024540C 26940001 */ addiu $s4, $s4, 1
/* 165C70 80245410 2A820007 */ slti $v0, $s4, 7
/* 165C74 80245414 1440FFE2 */ bnez $v0, .L802453A0
/* 165C78 80245418 26B50004 */ addiu $s5, $s5, 4
.L8024541C:
/* 165C7C 8024541C 8FBF004C */ lw $ra, 0x4c($sp)
/* 165C80 80245420 8FBE0048 */ lw $fp, 0x48($sp)
/* 165C84 80245424 8FB70044 */ lw $s7, 0x44($sp)
/* 165C88 80245428 8FB60040 */ lw $s6, 0x40($sp)
/* 165C8C 8024542C 8FB5003C */ lw $s5, 0x3c($sp)
/* 165C90 80245430 8FB40038 */ lw $s4, 0x38($sp)
/* 165C94 80245434 8FB30034 */ lw $s3, 0x34($sp)
/* 165C98 80245438 8FB20030 */ lw $s2, 0x30($sp)
/* 165C9C 8024543C 8FB1002C */ lw $s1, 0x2c($sp)
/* 165CA0 80245440 8FB00028 */ lw $s0, 0x28($sp)
/* 165CA4 80245444 03E00008 */ jr $ra
/* 165CA8 80245448 27BD0050 */ addiu $sp, $sp, 0x50

View File

@ -337,8 +337,8 @@ glabel filemenu_main_handle_input
/* 166740 80245EE0 3C048025 */ lui $a0, %hi(filemenu_menus + 0xC)
/* 166744 80245EE4 8C849B90 */ lw $a0, %lo(filemenu_menus + 0xC)($a0)
/* 166748 80245EE8 24020003 */ addiu $v0, $zero, 3
/* 16674C 80245EEC 3C018025 */ lui $at, %hi(D_8024C098)
/* 166750 80245EF0 A022C098 */ sb $v0, %lo(D_8024C098)($at)
/* 16674C 80245EEC 3C018025 */ lui $at, %hi(filemenu_8024C098)
/* 166750 80245EF0 A022C098 */ sb $v0, %lo(filemenu_8024C098)($at)
/* 166754 80245EF4 08091A38 */ j .L802468E0
/* 166758 80245EF8 A0800004 */ sb $zero, 4($a0)
.L80245EFC:
@ -533,8 +533,8 @@ glabel filemenu_main_handle_input
/* 166A2C 802461CC 3C048025 */ lui $a0, %hi(filemenu_menus + 0x4)
/* 166A30 802461D0 8C849B88 */ lw $a0, %lo(filemenu_menus + 0x4)($a0)
/* 166A34 802461D4 24020001 */ addiu $v0, $zero, 1
/* 166A38 802461D8 3C018025 */ lui $at, %hi(D_8024C098)
/* 166A3C 802461DC A022C098 */ sb $v0, %lo(D_8024C098)($at)
/* 166A38 802461D8 3C018025 */ lui $at, %hi(filemenu_8024C098)
/* 166A3C 802461DC A022C098 */ sb $v0, %lo(filemenu_8024C098)($at)
/* 166A40 802461E0 08091A37 */ j .L802468DC
/* 166A44 802461E4 24020004 */ addiu $v0, $zero, 4
.L802461E8_166A48:
@ -637,8 +637,8 @@ glabel filemenu_main_handle_input
/* 166BB4 80246354 3C048025 */ lui $a0, %hi(filemenu_menus + 0x4)
/* 166BB8 80246358 8C849B88 */ lw $a0, %lo(filemenu_menus + 0x4)($a0)
/* 166BBC 8024635C 00C0102D */ daddu $v0, $a2, $zero
/* 166BC0 80246360 3C018025 */ lui $at, %hi(D_8024C098)
/* 166BC4 80246364 A022C098 */ sb $v0, %lo(D_8024C098)($at)
/* 166BC0 80246360 3C018025 */ lui $at, %hi(filemenu_8024C098)
/* 166BC4 80246364 A022C098 */ sb $v0, %lo(filemenu_8024C098)($at)
/* 166BC8 80246368 08091A38 */ j .L802468E0
/* 166BCC 8024636C A0800004 */ sb $zero, 4($a0)
.L80246370_166BD0:
@ -725,8 +725,8 @@ glabel filemenu_main_handle_input
/* 166CFC 8024649C 0C05272D */ jal sfx_play_sound
/* 166D00 802464A0 240400C9 */ addiu $a0, $zero, 0xc9
/* 166D04 802464A4 24020002 */ addiu $v0, $zero, 2
/* 166D08 802464A8 3C018025 */ lui $at, %hi(D_8024C098)
/* 166D0C 802464AC A022C098 */ sb $v0, %lo(D_8024C098)($at)
/* 166D08 802464A8 3C018025 */ lui $at, %hi(filemenu_8024C098)
/* 166D0C 802464AC A022C098 */ sb $v0, %lo(filemenu_8024C098)($at)
/* 166D10 802464B0 24020002 */ addiu $v0, $zero, 2
/* 166D14 802464B4 3C048016 */ lui $a0, %hi(gWindows)
/* 166D18 802464B8 24849D50 */ addiu $a0, $a0, %lo(gWindows)
@ -891,8 +891,8 @@ glabel filemenu_main_handle_input
/* 166F70 80246710 3C048025 */ lui $a0, %hi(filemenu_menus + 0x4)
/* 166F74 80246714 8C849B88 */ lw $a0, %lo(filemenu_menus + 0x4)($a0)
/* 166F78 80246718 00C0102D */ daddu $v0, $a2, $zero
/* 166F7C 8024671C 3C018025 */ lui $at, %hi(D_8024C098)
/* 166F80 80246720 A022C098 */ sb $v0, %lo(D_8024C098)($at)
/* 166F7C 8024671C 3C018025 */ lui $at, %hi(filemenu_8024C098)
/* 166F80 80246720 A022C098 */ sb $v0, %lo(filemenu_8024C098)($at)
/* 166F84 80246724 08091A37 */ j .L802468DC
/* 166F88 80246728 24020003 */ addiu $v0, $zero, 3
.L8024672C_166F8C:
@ -923,8 +923,8 @@ glabel filemenu_main_handle_input
/* 166FE8 80246788 3C058014 */ lui $a1, %hi(main_menu_window_update)
/* 166FEC 8024678C 24A57650 */ addiu $a1, $a1, %lo(main_menu_window_update)
/* 166FF0 80246790 24020002 */ addiu $v0, $zero, 2
/* 166FF4 80246794 3C018025 */ lui $at, %hi(D_8024C098)
/* 166FF8 80246798 A022C098 */ sb $v0, %lo(D_8024C098)($at)
/* 166FF4 80246794 3C018025 */ lui $at, %hi(filemenu_8024C098)
/* 166FF8 80246798 A022C098 */ sb $v0, %lo(filemenu_8024C098)($at)
/* 166FFC 8024679C 3C028025 */ lui $v0, %hi(filemenu_menus + 0x8)
/* 167000 802467A0 8C429B8C */ lw $v0, %lo(filemenu_menus + 0x8)($v0)
/* 167004 802467A4 24100001 */ addiu $s0, $zero, 1
@ -1007,8 +1007,8 @@ glabel filemenu_main_handle_input
/* 167124 802468C4 3C048025 */ lui $a0, %hi(filemenu_menus + 0x4)
/* 167128 802468C8 8C849B88 */ lw $a0, %lo(filemenu_menus + 0x4)($a0)
/* 16712C 802468CC 00C0102D */ daddu $v0, $a2, $zero
/* 167130 802468D0 3C018025 */ lui $at, %hi(D_8024C098)
/* 167134 802468D4 A022C098 */ sb $v0, %lo(D_8024C098)($at)
/* 167130 802468D0 3C018025 */ lui $at, %hi(filemenu_8024C098)
/* 167134 802468D4 A022C098 */ sb $v0, %lo(filemenu_8024C098)($at)
/* 167138 802468D8 00C0102D */ daddu $v0, $a2, $zero
.L802468DC:
/* 16713C 802468DC A0820004 */ sb $v0, 4($a0)

View File

@ -1,85 +0,0 @@
.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
.section .rodata
dlabel jtbl_8024BFE8
.word .L80246D64_1675C4, .L80246D64_1675C4, .L80246D64_1675C4, .L80246D64_1675C4, .L80246D64_1675C4, 0
.section .text
glabel filemenu_yesno_draw_options_contents
/* 167570 80246D10 27BDFFC8 */ addiu $sp, $sp, -0x38
/* 167574 80246D14 AFB60030 */ sw $s6, 0x30($sp)
/* 167578 80246D18 0080B02D */ daddu $s6, $a0, $zero
/* 16757C 80246D1C AFB40028 */ sw $s4, 0x28($sp)
/* 167580 80246D20 00A0A02D */ daddu $s4, $a1, $zero
/* 167584 80246D24 AFBF0034 */ sw $ra, 0x34($sp)
/* 167588 80246D28 AFB5002C */ sw $s5, 0x2c($sp)
/* 16758C 80246D2C AFB30024 */ sw $s3, 0x24($sp)
/* 167590 80246D30 AFB20020 */ sw $s2, 0x20($sp)
/* 167594 80246D34 AFB1001C */ sw $s1, 0x1c($sp)
/* 167598 80246D38 AFB00018 */ sw $s0, 0x18($sp)
/* 16759C 80246D3C 82C30004 */ lb $v1, 4($s6)
/* 1675A0 80246D40 2C620005 */ sltiu $v0, $v1, 5
/* 1675A4 80246D44 1040000B */ beqz $v0, .L80246D74
/* 1675A8 80246D48 00C0A82D */ daddu $s5, $a2, $zero
/* 1675AC 80246D4C 00031080 */ sll $v0, $v1, 2
/* 1675B0 80246D50 3C018025 */ lui $at, %hi(jtbl_8024BFE8)
/* 1675B4 80246D54 00220821 */ addu $at, $at, $v0
/* 1675B8 80246D58 8C22BFE8 */ lw $v0, %lo(jtbl_8024BFE8)($at)
/* 1675BC 80246D5C 00400008 */ jr $v0
/* 1675C0 80246D60 00000000 */ nop
.L80246D64_1675C4:
/* 1675C4 80246D64 2413001C */ addiu $s3, $zero, 0x1c
/* 1675C8 80246D68 24120004 */ addiu $s2, $zero, 4
/* 1675CC 80246D6C 0260882D */ daddu $s1, $s3, $zero
/* 1675D0 80246D70 24100015 */ addiu $s0, $zero, 0x15
.L80246D74:
/* 1675D4 80246D74 0C0926A9 */ jal filemenu_get_menu_message
/* 1675D8 80246D78 2404000E */ addiu $a0, $zero, 0xe
/* 1675DC 80246D7C 0040202D */ daddu $a0, $v0, $zero
/* 1675E0 80246D80 02932821 */ addu $a1, $s4, $s3
/* 1675E4 80246D84 02B23021 */ addu $a2, $s5, $s2
/* 1675E8 80246D88 240700FF */ addiu $a3, $zero, 0xff
/* 1675EC 80246D8C AFA00010 */ sw $zero, 0x10($sp)
/* 1675F0 80246D90 0C09265F */ jal filemenu_draw_message
/* 1675F4 80246D94 AFA00014 */ sw $zero, 0x14($sp)
/* 1675F8 80246D98 0C0926A9 */ jal filemenu_get_menu_message
/* 1675FC 80246D9C 2404000F */ addiu $a0, $zero, 0xf
/* 167600 80246DA0 0040202D */ daddu $a0, $v0, $zero
/* 167604 80246DA4 02912821 */ addu $a1, $s4, $s1
/* 167608 80246DA8 02B03021 */ addu $a2, $s5, $s0
/* 16760C 80246DAC 240700FF */ addiu $a3, $zero, 0xff
/* 167610 80246DB0 AFA00010 */ sw $zero, 0x10($sp)
/* 167614 80246DB4 0C09265F */ jal filemenu_draw_message
/* 167618 80246DB8 AFA00014 */ sw $zero, 0x14($sp)
/* 16761C 80246DBC 3C038025 */ lui $v1, %hi(D_8024C098)
/* 167620 80246DC0 8063C098 */ lb $v1, %lo(D_8024C098)($v1)
/* 167624 80246DC4 24020001 */ addiu $v0, $zero, 1
/* 167628 80246DC8 1462000C */ bne $v1, $v0, .L80246DFC
/* 16762C 80246DCC 00000000 */ nop
/* 167630 80246DD0 92C20003 */ lbu $v0, 3($s6)
/* 167634 80246DD4 14400004 */ bnez $v0, .L80246DE8
/* 167638 80246DD8 2623FFF6 */ addiu $v1, $s1, -0xa
/* 16763C 80246DDC 2663FFF6 */ addiu $v1, $s3, -0xa
/* 167640 80246DE0 08091B7B */ j .L80246DEC
/* 167644 80246DE4 26420008 */ addiu $v0, $s2, 8
.L80246DE8:
/* 167648 80246DE8 26020008 */ addiu $v0, $s0, 8
.L80246DEC:
/* 16764C 80246DEC 24040032 */ addiu $a0, $zero, 0x32
/* 167650 80246DF0 02832821 */ addu $a1, $s4, $v1
/* 167654 80246DF4 0C090B80 */ jal filemenu_set_cursor_goal_pos
/* 167658 80246DF8 02A23021 */ addu $a2, $s5, $v0
.L80246DFC:
/* 16765C 80246DFC 8FBF0034 */ lw $ra, 0x34($sp)
/* 167660 80246E00 8FB60030 */ lw $s6, 0x30($sp)
/* 167664 80246E04 8FB5002C */ lw $s5, 0x2c($sp)
/* 167668 80246E08 8FB40028 */ lw $s4, 0x28($sp)
/* 16766C 80246E0C 8FB30024 */ lw $s3, 0x24($sp)
/* 167670 80246E10 8FB20020 */ lw $s2, 0x20($sp)
/* 167674 80246E14 8FB1001C */ lw $s1, 0x1c($sp)
/* 167678 80246E18 8FB00018 */ lw $s0, 0x18($sp)
/* 16767C 80246E1C 03E00008 */ jr $ra
/* 167680 80246E20 27BD0038 */ addiu $sp, $sp, 0x38

View File

@ -1,242 +0,0 @@
.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
.section .rodata
dlabel jtbl_8024C000
.word .L80246E6C_1676CC, .L80246F9C_1677FC, .L80246FDC_16783C, .L80246F00_167760, .L802470D4_167934, 0
.section .text
glabel filemenu_yesno_draw_prompt_contents
/* 167684 80246E24 27BDFFC8 */ addiu $sp, $sp, -0x38
/* 167688 80246E28 AFB3002C */ sw $s3, 0x2c($sp)
/* 16768C 80246E2C 00A0982D */ daddu $s3, $a1, $zero
/* 167690 80246E30 AFBF0034 */ sw $ra, 0x34($sp)
/* 167694 80246E34 AFB40030 */ sw $s4, 0x30($sp)
/* 167698 80246E38 AFB20028 */ sw $s2, 0x28($sp)
/* 16769C 80246E3C AFB10024 */ sw $s1, 0x24($sp)
/* 1676A0 80246E40 AFB00020 */ sw $s0, 0x20($sp)
/* 1676A4 80246E44 80830004 */ lb $v1, 4($a0)
/* 1676A8 80246E48 2C620005 */ sltiu $v0, $v1, 5
/* 1676AC 80246E4C 104000CA */ beqz $v0, .L80247178
/* 1676B0 80246E50 00C0A02D */ daddu $s4, $a2, $zero
/* 1676B4 80246E54 00031080 */ sll $v0, $v1, 2
/* 1676B8 80246E58 3C018025 */ lui $at, %hi(jtbl_8024C000)
/* 1676BC 80246E5C 00220821 */ addu $at, $at, $v0
/* 1676C0 80246E60 8C22C000 */ lw $v0, %lo(jtbl_8024C000)($at)
/* 1676C4 80246E64 00400008 */ jr $v0
/* 1676C8 80246E68 00000000 */ nop
.L80246E6C_1676CC:
/* 1676CC 80246E6C 0C0926A9 */ jal filemenu_get_menu_message
/* 1676D0 80246E70 24040010 */ addiu $a0, $zero, 0x10
/* 1676D4 80246E74 0040202D */ daddu $a0, $v0, $zero
/* 1676D8 80246E78 2665000A */ addiu $a1, $s3, 0xa
/* 1676DC 80246E7C 26900004 */ addiu $s0, $s4, 4
/* 1676E0 80246E80 0200302D */ daddu $a2, $s0, $zero
/* 1676E4 80246E84 240700FF */ addiu $a3, $zero, 0xff
/* 1676E8 80246E88 AFA00010 */ sw $zero, 0x10($sp)
/* 1676EC 80246E8C 0C09265F */ jal filemenu_draw_message
/* 1676F0 80246E90 AFA00014 */ sw $zero, 0x14($sp)
/* 1676F4 80246E94 0C0926A9 */ jal filemenu_get_menu_message
/* 1676F8 80246E98 24040016 */ addiu $a0, $zero, 0x16
/* 1676FC 80246E9C 0040202D */ daddu $a0, $v0, $zero
/* 167700 80246EA0 2665003C */ addiu $a1, $s3, 0x3c
/* 167704 80246EA4 0200302D */ daddu $a2, $s0, $zero
/* 167708 80246EA8 240700FF */ addiu $a3, $zero, 0xff
/* 16770C 80246EAC AFA00010 */ sw $zero, 0x10($sp)
/* 167710 80246EB0 0C09265F */ jal filemenu_draw_message
/* 167714 80246EB4 AFA00014 */ sw $zero, 0x14($sp)
/* 167718 80246EB8 26650062 */ addiu $a1, $s3, 0x62
/* 16771C 80246EBC 26860006 */ addiu $a2, $s4, 6
/* 167720 80246EC0 3C028025 */ lui $v0, %hi(filemenu_menus)
/* 167724 80246EC4 8C429B84 */ lw $v0, %lo(filemenu_menus)($v0)
/* 167728 80246EC8 0000382D */ daddu $a3, $zero, $zero
/* 16772C 80246ECC 90440003 */ lbu $a0, 3($v0)
/* 167730 80246ED0 240200FF */ addiu $v0, $zero, 0xff
/* 167734 80246ED4 AFA20014 */ sw $v0, 0x14($sp)
/* 167738 80246ED8 24020003 */ addiu $v0, $zero, 3
/* 16773C 80246EDC AFA00010 */ sw $zero, 0x10($sp)
/* 167740 80246EE0 AFA20018 */ sw $v0, 0x18($sp)
/* 167744 80246EE4 0C049DA7 */ jal draw_number
/* 167748 80246EE8 24840001 */ addiu $a0, $a0, 1
/* 16774C 80246EEC 0C0926A9 */ jal filemenu_get_menu_message
/* 167750 80246EF0 24040021 */ addiu $a0, $zero, 0x21
/* 167754 80246EF4 0040202D */ daddu $a0, $v0, $zero
/* 167758 80246EF8 08091C59 */ j .L80247164
/* 16775C 80246EFC 26650063 */ addiu $a1, $s3, 0x63
.L80246F00_167760:
/* 167760 80246F00 0C0926A9 */ jal filemenu_get_menu_message
/* 167764 80246F04 24040016 */ addiu $a0, $zero, 0x16
/* 167768 80246F08 0040202D */ daddu $a0, $v0, $zero
/* 16776C 80246F0C 2671000A */ addiu $s1, $s3, 0xa
/* 167770 80246F10 0220282D */ daddu $a1, $s1, $zero
/* 167774 80246F14 26900004 */ addiu $s0, $s4, 4
/* 167778 80246F18 0200302D */ daddu $a2, $s0, $zero
/* 16777C 80246F1C 240700FF */ addiu $a3, $zero, 0xff
/* 167780 80246F20 AFA00010 */ sw $zero, 0x10($sp)
/* 167784 80246F24 0C09265F */ jal filemenu_draw_message
/* 167788 80246F28 AFA00014 */ sw $zero, 0x14($sp)
/* 16778C 80246F2C 26650030 */ addiu $a1, $s3, 0x30
/* 167790 80246F30 26860006 */ addiu $a2, $s4, 6
/* 167794 80246F34 3C028025 */ lui $v0, %hi(filemenu_menus)
/* 167798 80246F38 8C429B84 */ lw $v0, %lo(filemenu_menus)($v0)
/* 16779C 80246F3C 0000382D */ daddu $a3, $zero, $zero
/* 1677A0 80246F40 90440003 */ lbu $a0, 3($v0)
/* 1677A4 80246F44 240200FF */ addiu $v0, $zero, 0xff
/* 1677A8 80246F48 AFA20014 */ sw $v0, 0x14($sp)
/* 1677AC 80246F4C 24020003 */ addiu $v0, $zero, 3
/* 1677B0 80246F50 AFA00010 */ sw $zero, 0x10($sp)
/* 1677B4 80246F54 AFA20018 */ sw $v0, 0x18($sp)
/* 1677B8 80246F58 0C049DA7 */ jal draw_number
/* 1677BC 80246F5C 24840001 */ addiu $a0, $a0, 1
/* 1677C0 80246F60 0C0926A9 */ jal filemenu_get_menu_message
/* 1677C4 80246F64 24040017 */ addiu $a0, $zero, 0x17
/* 1677C8 80246F68 0040202D */ daddu $a0, $v0, $zero
/* 1677CC 80246F6C 26650031 */ addiu $a1, $s3, 0x31
/* 1677D0 80246F70 0200302D */ daddu $a2, $s0, $zero
/* 1677D4 80246F74 240700FF */ addiu $a3, $zero, 0xff
/* 1677D8 80246F78 AFA00010 */ sw $zero, 0x10($sp)
/* 1677DC 80246F7C 0C09265F */ jal filemenu_draw_message
/* 1677E0 80246F80 AFA00014 */ sw $zero, 0x14($sp)
/* 1677E4 80246F84 0C0926A9 */ jal filemenu_get_menu_message
/* 1677E8 80246F88 24040018 */ addiu $a0, $zero, 0x18
/* 1677EC 80246F8C 0040202D */ daddu $a0, $v0, $zero
/* 1677F0 80246F90 0220282D */ daddu $a1, $s1, $zero
/* 1677F4 80246F94 08091C5A */ j .L80247168
/* 1677F8 80246F98 26860012 */ addiu $a2, $s4, 0x12
.L80246F9C_1677FC:
/* 1677FC 80246F9C 0C0926A9 */ jal filemenu_get_menu_message
/* 167800 80246FA0 24040011 */ addiu $a0, $zero, 0x11
/* 167804 80246FA4 0040202D */ daddu $a0, $v0, $zero
/* 167808 80246FA8 2670000A */ addiu $s0, $s3, 0xa
/* 16780C 80246FAC 0200282D */ daddu $a1, $s0, $zero
/* 167810 80246FB0 26860004 */ addiu $a2, $s4, 4
/* 167814 80246FB4 240700FF */ addiu $a3, $zero, 0xff
/* 167818 80246FB8 AFA00010 */ sw $zero, 0x10($sp)
/* 16781C 80246FBC 0C09265F */ jal filemenu_draw_message
/* 167820 80246FC0 AFA00014 */ sw $zero, 0x14($sp)
/* 167824 80246FC4 0C0926A9 */ jal filemenu_get_menu_message
/* 167828 80246FC8 24040012 */ addiu $a0, $zero, 0x12
/* 16782C 80246FCC 0040202D */ daddu $a0, $v0, $zero
/* 167830 80246FD0 0200282D */ daddu $a1, $s0, $zero
/* 167834 80246FD4 08091C5A */ j .L80247168
/* 167838 80246FD8 26860012 */ addiu $a2, $s4, 0x12
.L80246FDC_16783C:
/* 16783C 80246FDC 0C0926A9 */ jal filemenu_get_menu_message
/* 167840 80246FE0 24040013 */ addiu $a0, $zero, 0x13
/* 167844 80246FE4 0040202D */ daddu $a0, $v0, $zero
/* 167848 80246FE8 2665000A */ addiu $a1, $s3, 0xa
/* 16784C 80246FEC 26860006 */ addiu $a2, $s4, 6
/* 167850 80246FF0 240700FF */ addiu $a3, $zero, 0xff
/* 167854 80246FF4 AFA00010 */ sw $zero, 0x10($sp)
/* 167858 80246FF8 0C09265F */ jal filemenu_draw_message
/* 16785C 80246FFC AFA00014 */ sw $zero, 0x14($sp)
/* 167860 80247000 24110007 */ addiu $s1, $zero, 7
/* 167864 80247004 3C048025 */ lui $a0, %hi(D_8024C110)
/* 167868 80247008 2484C110 */ addiu $a0, $a0, %lo(D_8024C110)
/* 16786C 8024700C 240300F7 */ addiu $v1, $zero, 0xf7
/* 167870 80247010 02241021 */ addu $v0, $s1, $a0
.L80247014:
/* 167874 80247014 90420000 */ lbu $v0, ($v0)
/* 167878 80247018 14430005 */ bne $v0, $v1, .L80247030
/* 16787C 8024701C 00111040 */ sll $v0, $s1, 1
/* 167880 80247020 2631FFFF */ addiu $s1, $s1, -1
/* 167884 80247024 0621FFFB */ bgez $s1, .L80247014
/* 167888 80247028 02241021 */ addu $v0, $s1, $a0
/* 16788C 8024702C 00111040 */ sll $v0, $s1, 1
.L80247030:
/* 167890 80247030 00511021 */ addu $v0, $v0, $s1
/* 167894 80247034 00021080 */ sll $v0, $v0, 2
/* 167898 80247038 00511023 */ subu $v0, $v0, $s1
/* 16789C 8024703C 24100093 */ addiu $s0, $zero, 0x93
/* 1678A0 80247040 02028023 */ subu $s0, $s0, $v0
/* 1678A4 80247044 001017C2 */ srl $v0, $s0, 0x1f
/* 1678A8 80247048 02028021 */ addu $s0, $s0, $v0
/* 1678AC 8024704C 00108043 */ sra $s0, $s0, 1
/* 1678B0 80247050 26310001 */ addiu $s1, $s1, 1
/* 1678B4 80247054 0220282D */ daddu $a1, $s1, $zero
/* 1678B8 80247058 02703021 */ addu $a2, $s3, $s0
/* 1678BC 8024705C 26920016 */ addiu $s2, $s4, 0x16
/* 1678C0 80247060 0240382D */ daddu $a3, $s2, $zero
/* 1678C4 80247064 240200FF */ addiu $v0, $zero, 0xff
/* 1678C8 80247068 AFA20010 */ sw $v0, 0x10($sp)
/* 1678CC 8024706C 24020008 */ addiu $v0, $zero, 8
/* 1678D0 80247070 AFA20018 */ sw $v0, 0x18($sp)
/* 1678D4 80247074 2402000B */ addiu $v0, $zero, 0xb
/* 1678D8 80247078 AFA00014 */ sw $zero, 0x14($sp)
/* 1678DC 8024707C 0C0926AE */ jal filemenu_draw_file_name
/* 1678E0 80247080 AFA2001C */ sw $v0, 0x1c($sp)
/* 1678E4 80247084 00111040 */ sll $v0, $s1, 1
/* 1678E8 80247088 00511021 */ addu $v0, $v0, $s1
/* 1678EC 8024708C 00021080 */ sll $v0, $v0, 2
/* 1678F0 80247090 00511023 */ subu $v0, $v0, $s1
/* 1678F4 80247094 02028021 */ addu $s0, $s0, $v0
/* 1678F8 80247098 0C0926A9 */ jal filemenu_get_menu_message
/* 1678FC 8024709C 24040014 */ addiu $a0, $zero, 0x14
/* 167900 802470A0 0040202D */ daddu $a0, $v0, $zero
/* 167904 802470A4 02702821 */ addu $a1, $s3, $s0
/* 167908 802470A8 0240302D */ daddu $a2, $s2, $zero
/* 16790C 802470AC 240700FF */ addiu $a3, $zero, 0xff
/* 167910 802470B0 AFA00010 */ sw $zero, 0x10($sp)
/* 167914 802470B4 0C09265F */ jal filemenu_draw_message
/* 167918 802470B8 AFA00014 */ sw $zero, 0x14($sp)
/* 16791C 802470BC 0C0926A9 */ jal filemenu_get_menu_message
/* 167920 802470C0 24040015 */ addiu $a0, $zero, 0x15
/* 167924 802470C4 0040202D */ daddu $a0, $v0, $zero
/* 167928 802470C8 26650046 */ addiu $a1, $s3, 0x46
/* 16792C 802470CC 08091C5A */ j .L80247168
/* 167930 802470D0 26860026 */ addiu $a2, $s4, 0x26
.L802470D4_167934:
/* 167934 802470D4 0C0926A9 */ jal filemenu_get_menu_message
/* 167938 802470D8 24040019 */ addiu $a0, $zero, 0x19
/* 16793C 802470DC 0040202D */ daddu $a0, $v0, $zero
/* 167940 802470E0 2665000A */ addiu $a1, $s3, 0xa
/* 167944 802470E4 26900004 */ addiu $s0, $s4, 4
/* 167948 802470E8 0200302D */ daddu $a2, $s0, $zero
/* 16794C 802470EC 240700FF */ addiu $a3, $zero, 0xff
/* 167950 802470F0 AFA00010 */ sw $zero, 0x10($sp)
/* 167954 802470F4 0C09265F */ jal filemenu_draw_message
/* 167958 802470F8 AFA00014 */ sw $zero, 0x14($sp)
/* 16795C 802470FC 0C0926A9 */ jal filemenu_get_menu_message
/* 167960 80247100 24040016 */ addiu $a0, $zero, 0x16
/* 167964 80247104 0040202D */ daddu $a0, $v0, $zero
/* 167968 80247108 2665007F */ addiu $a1, $s3, 0x7f
/* 16796C 8024710C 0200302D */ daddu $a2, $s0, $zero
/* 167970 80247110 240700FF */ addiu $a3, $zero, 0xff
/* 167974 80247114 AFA00010 */ sw $zero, 0x10($sp)
/* 167978 80247118 0C09265F */ jal filemenu_draw_message
/* 16797C 8024711C AFA00014 */ sw $zero, 0x14($sp)
/* 167980 80247120 266500A5 */ addiu $a1, $s3, 0xa5
/* 167984 80247124 26860006 */ addiu $a2, $s4, 6
/* 167988 80247128 3C028025 */ lui $v0, %hi(filemenu_menus)
/* 16798C 8024712C 8C429B84 */ lw $v0, %lo(filemenu_menus)($v0)
/* 167990 80247130 0000382D */ daddu $a3, $zero, $zero
/* 167994 80247134 90440003 */ lbu $a0, 3($v0)
/* 167998 80247138 240200FF */ addiu $v0, $zero, 0xff
/* 16799C 8024713C AFA20014 */ sw $v0, 0x14($sp)
/* 1679A0 80247140 24020003 */ addiu $v0, $zero, 3
/* 1679A4 80247144 AFA00010 */ sw $zero, 0x10($sp)
/* 1679A8 80247148 AFA20018 */ sw $v0, 0x18($sp)
/* 1679AC 8024714C 0C049DA7 */ jal draw_number
/* 1679B0 80247150 24840001 */ addiu $a0, $a0, 1
/* 1679B4 80247154 0C0926A9 */ jal filemenu_get_menu_message
/* 1679B8 80247158 24040021 */ addiu $a0, $zero, 0x21
/* 1679BC 8024715C 0040202D */ daddu $a0, $v0, $zero
/* 1679C0 80247160 266500A2 */ addiu $a1, $s3, 0xa2
.L80247164:
/* 1679C4 80247164 0200302D */ daddu $a2, $s0, $zero
.L80247168:
/* 1679C8 80247168 240700FF */ addiu $a3, $zero, 0xff
/* 1679CC 8024716C AFA00010 */ sw $zero, 0x10($sp)
/* 1679D0 80247170 0C09265F */ jal filemenu_draw_message
/* 1679D4 80247174 AFA00014 */ sw $zero, 0x14($sp)
.L80247178:
/* 1679D8 80247178 8FBF0034 */ lw $ra, 0x34($sp)
/* 1679DC 8024717C 8FB40030 */ lw $s4, 0x30($sp)
/* 1679E0 80247180 8FB3002C */ lw $s3, 0x2c($sp)
/* 1679E4 80247184 8FB20028 */ lw $s2, 0x28($sp)
/* 1679E8 80247188 8FB10024 */ lw $s1, 0x24($sp)
/* 1679EC 8024718C 8FB00020 */ lw $s0, 0x20($sp)
/* 1679F0 80247190 03E00008 */ jr $ra
/* 1679F4 80247194 27BD0038 */ addiu $sp, $sp, 0x38

View File

@ -123,8 +123,8 @@ glabel filemenu_yesno_handle_input
/* 167BD8 80247378 8C639B8C */ lw $v1, %lo(filemenu_menus + 0x8)($v1)
/* 167BDC 8024737C 3C048016 */ lui $a0, %hi(gWindows)
/* 167BE0 80247380 24849D50 */ addiu $a0, $a0, %lo(gWindows)
/* 167BE4 80247384 3C018025 */ lui $at, %hi(D_8024C098)
/* 167BE8 80247388 A022C098 */ sb $v0, %lo(D_8024C098)($at)
/* 167BE4 80247384 3C018025 */ lui $at, %hi(filemenu_8024C098)
/* 167BE8 80247388 A022C098 */ sb $v0, %lo(filemenu_8024C098)($at)
/* 167BEC 8024738C 240200B6 */ addiu $v0, $zero, 0xb6
/* 167BF0 80247390 A0600004 */ sb $zero, 4($v1)
/* 167BF4 80247394 808305E3 */ lb $v1, 0x5e3($a0)
@ -218,8 +218,8 @@ glabel filemenu_yesno_handle_input
/* 167D40 802474E0 00000000 */ nop
.L802474E4_167D44:
/* 167D44 802474E4 24020002 */ addiu $v0, $zero, 2
/* 167D48 802474E8 3C018025 */ lui $at, %hi(D_8024C098)
/* 167D4C 802474EC A022C098 */ sb $v0, %lo(D_8024C098)($at)
/* 167D48 802474E8 3C018025 */ lui $at, %hi(filemenu_8024C098)
/* 167D4C 802474EC A022C098 */ sb $v0, %lo(filemenu_8024C098)($at)
/* 167D50 802474F0 24020002 */ addiu $v0, $zero, 2
/* 167D54 802474F4 3C048016 */ lui $a0, %hi(gWindows)
/* 167D58 802474F8 24849D50 */ addiu $a0, $a0, %lo(gWindows)
@ -319,8 +319,8 @@ glabel filemenu_yesno_handle_input
/* 167EC0 80247660 24020001 */ addiu $v0, $zero, 1
.L80247664_167EC4:
/* 167EC4 80247664 24020002 */ addiu $v0, $zero, 2
/* 167EC8 80247668 3C018025 */ lui $at, %hi(D_8024C098)
/* 167ECC 8024766C A022C098 */ sb $v0, %lo(D_8024C098)($at)
/* 167EC8 80247668 3C018025 */ lui $at, %hi(filemenu_8024C098)
/* 167ECC 8024766C A022C098 */ sb $v0, %lo(filemenu_8024C098)($at)
/* 167ED0 80247670 24020001 */ addiu $v0, $zero, 1
/* 167ED4 80247674 3C048016 */ lui $a0, %hi(gWindows)
/* 167ED8 80247678 24849D50 */ addiu $a0, $a0, %lo(gWindows)
@ -446,8 +446,8 @@ glabel filemenu_yesno_handle_input
/* 1680A0 80247840 3C078007 */ lui $a3, %hi(D_800779C4)
/* 1680A4 80247844 24E779C4 */ addiu $a3, $a3, %lo(D_800779C4)
/* 1680A8 80247848 90510003 */ lbu $s1, 3($v0)
/* 1680AC 8024784C 3C068025 */ lui $a2, %hi(D_8024C110)
/* 1680B0 80247850 24C6C110 */ addiu $a2, $a2, %lo(D_8024C110)
/* 1680AC 8024784C 3C068025 */ lui $a2, %hi(filemenu_8024C110)
/* 1680B0 80247850 24C6C110 */ addiu $a2, $a2, %lo(filemenu_8024C110)
/* 1680B4 80247854 00111040 */ sll $v0, $s1, 1
/* 1680B8 80247858 00511021 */ addu $v0, $v0, $s1
/* 1680BC 8024785C 000228C0 */ sll $a1, $v0, 3
@ -515,8 +515,8 @@ glabel filemenu_yesno_handle_input
/* 1681B0 80247950 0C051F9F */ jal set_window_update
/* 1681B4 80247954 24040032 */ addiu $a0, $zero, 0x32
/* 1681B8 80247958 24020002 */ addiu $v0, $zero, 2
/* 1681BC 8024795C 3C018025 */ lui $at, %hi(D_8024C098)
/* 1681C0 80247960 A022C098 */ sb $v0, %lo(D_8024C098)($at)
/* 1681BC 8024795C 3C018025 */ lui $at, %hi(filemenu_8024C098)
/* 1681C0 80247960 A022C098 */ sb $v0, %lo(filemenu_8024C098)($at)
/* 1681C4 80247964 24020003 */ addiu $v0, $zero, 3
/* 1681C8 80247968 3C048016 */ lui $a0, %hi(gWindows)
/* 1681CC 8024796C 24849D50 */ addiu $a0, $a0, %lo(gWindows)
@ -614,16 +614,16 @@ glabel filemenu_yesno_handle_input
/* 16831C 80247ABC 00400008 */ jr $v0
/* 168320 80247AC0 00000000 */ nop
.L80247AC4_168324:
/* 168324 80247AC4 3C018025 */ lui $at, %hi(D_8024C098)
/* 168328 80247AC8 A020C098 */ sb $zero, %lo(D_8024C098)($at)
/* 168324 80247AC4 3C018025 */ lui $at, %hi(filemenu_8024C098)
/* 168328 80247AC8 A020C098 */ sb $zero, %lo(filemenu_8024C098)($at)
/* 16832C 80247ACC 3C058024 */ lui $a1, %hi(filemenu_update_hidden_name_confirm)
/* 168330 80247AD0 24A53EEC */ addiu $a1, $a1, %lo(filemenu_update_hidden_name_confirm)
/* 168334 80247AD4 08091EEC */ j .L80247BB0
/* 168338 80247AD8 24040032 */ addiu $a0, $zero, 0x32
.L80247ADC_16833C:
/* 16833C 80247ADC 24020003 */ addiu $v0, $zero, 3
/* 168340 80247AE0 3C018025 */ lui $at, %hi(D_8024C098)
/* 168344 80247AE4 A022C098 */ sb $v0, %lo(D_8024C098)($at)
/* 168340 80247AE0 3C018025 */ lui $at, %hi(filemenu_8024C098)
/* 168344 80247AE4 A022C098 */ sb $v0, %lo(filemenu_8024C098)($at)
/* 168348 80247AE8 3C058024 */ lui $a1, %hi(filemenu_update_hidden_name_confirm)
/* 16834C 80247AEC 24A53EEC */ addiu $a1, $a1, %lo(filemenu_update_hidden_name_confirm)
/* 168350 80247AF0 08091EEC */ j .L80247BB0
@ -634,8 +634,8 @@ glabel filemenu_yesno_handle_input
/* 168360 80247B00 2610381C */ addiu $s0, $s0, %lo(filemenu_update_show_with_rotation)
/* 168364 80247B04 3C028025 */ lui $v0, %hi(filemenu_menus)
/* 168368 80247B08 8C429B84 */ lw $v0, %lo(filemenu_menus)($v0)
/* 16836C 80247B0C 3C018025 */ lui $at, %hi(D_8024C098)
/* 168370 80247B10 A020C098 */ sb $zero, %lo(D_8024C098)($at)
/* 16836C 80247B0C 3C018025 */ lui $at, %hi(filemenu_8024C098)
/* 168370 80247B10 A020C098 */ sb $zero, %lo(filemenu_8024C098)($at)
/* 168374 80247B14 90510003 */ lbu $s1, 3($v0)
/* 168378 80247B18 0C051F9F */ jal set_window_update
/* 16837C 80247B1C 0200282D */ daddu $a1, $s0, $zero
@ -700,16 +700,16 @@ glabel filemenu_yesno_handle_input
/* 168460 80247C00 00400008 */ jr $v0
/* 168464 80247C04 00000000 */ nop
.L80247C08_168468:
/* 168468 80247C08 3C018025 */ lui $at, %hi(D_8024C098)
/* 16846C 80247C0C A020C098 */ sb $zero, %lo(D_8024C098)($at)
/* 168468 80247C08 3C018025 */ lui $at, %hi(filemenu_8024C098)
/* 16846C 80247C0C A020C098 */ sb $zero, %lo(filemenu_8024C098)($at)
/* 168470 80247C10 3C058024 */ lui $a1, %hi(filemenu_update_hidden_name_confirm)
/* 168474 80247C14 24A53EEC */ addiu $a1, $a1, %lo(filemenu_update_hidden_name_confirm)
/* 168478 80247C18 08091F3D */ j .L80247CF4
/* 16847C 80247C1C 24040032 */ addiu $a0, $zero, 0x32
.L80247C20_168480:
/* 168480 80247C20 24020003 */ addiu $v0, $zero, 3
/* 168484 80247C24 3C018025 */ lui $at, %hi(D_8024C098)
/* 168488 80247C28 A022C098 */ sb $v0, %lo(D_8024C098)($at)
/* 168484 80247C24 3C018025 */ lui $at, %hi(filemenu_8024C098)
/* 168488 80247C28 A022C098 */ sb $v0, %lo(filemenu_8024C098)($at)
/* 16848C 80247C2C 3C058024 */ lui $a1, %hi(filemenu_update_hidden_name_confirm)
/* 168490 80247C30 24A53EEC */ addiu $a1, $a1, %lo(filemenu_update_hidden_name_confirm)
/* 168494 80247C34 08091F3D */ j .L80247CF4
@ -720,8 +720,8 @@ glabel filemenu_yesno_handle_input
/* 1684A4 80247C44 2610381C */ addiu $s0, $s0, %lo(filemenu_update_show_with_rotation)
/* 1684A8 80247C48 3C028025 */ lui $v0, %hi(filemenu_menus)
/* 1684AC 80247C4C 8C429B84 */ lw $v0, %lo(filemenu_menus)($v0)
/* 1684B0 80247C50 3C018025 */ lui $at, %hi(D_8024C098)
/* 1684B4 80247C54 A020C098 */ sb $zero, %lo(D_8024C098)($at)
/* 1684B0 80247C50 3C018025 */ lui $at, %hi(filemenu_8024C098)
/* 1684B4 80247C54 A020C098 */ sb $zero, %lo(filemenu_8024C098)($at)
/* 1684B8 80247C58 90510003 */ lbu $s1, 3($v0)
/* 1684BC 80247C5C 0C051F9F */ jal set_window_update
/* 1684C0 80247C60 0200282D */ daddu $a1, $s0, $zero

View File

@ -211,8 +211,8 @@ glabel filemenu_choose_name_handle_input
/* 169730 80248ED0 00000000 */ nop
.L80248ED4_169734:
/* 169734 80248ED4 0000182D */ daddu $v1, $zero, $zero
/* 169738 80248ED8 3C058025 */ lui $a1, %hi(D_8024C110)
/* 16973C 80248EDC 24A5C110 */ addiu $a1, $a1, %lo(D_8024C110)
/* 169738 80248ED8 3C058025 */ lui $a1, %hi(filemenu_8024C110)
/* 16973C 80248EDC 24A5C110 */ addiu $a1, $a1, %lo(filemenu_8024C110)
/* 169740 80248EE0 240400F7 */ addiu $a0, $zero, 0xf7
/* 169744 80248EE4 00651021 */ addu $v0, $v1, $a1
.L80248EE8:
@ -295,9 +295,9 @@ glabel filemenu_choose_name_handle_input
.L80249004:
/* 169864 80249004 92020003 */ lbu $v0, 3($s0)
.L80249008:
/* 169868 80249008 3C018025 */ lui $at, %hi(D_8024C110)
/* 169868 80249008 3C018025 */ lui $at, %hi(filemenu_8024C110)
/* 16986C 8024900C 00230821 */ addu $at, $at, $v1
/* 169870 80249010 A022C110 */ sb $v0, %lo(D_8024C110)($at)
/* 169870 80249010 A022C110 */ sb $v0, %lo(filemenu_8024C110)($at)
/* 169874 80249014 90820000 */ lbu $v0, ($a0)
/* 169878 80249018 24420001 */ addiu $v0, $v0, 1
/* 16987C 8024901C A0820000 */ sb $v0, ($a0)
@ -389,16 +389,16 @@ glabel filemenu_choose_name_handle_input
/* 1699C8 80249168 2404003B */ addiu $a0, $zero, 0x3b
/* 1699CC 8024916C 0C051F9F */ jal set_window_update
/* 1699D0 80249170 0200282D */ daddu $a1, $s0, $zero
/* 1699D4 80249174 3C018025 */ lui $at, %hi(D_8024C098)
/* 1699D8 80249178 A020C098 */ sb $zero, %lo(D_8024C098)($at)
/* 1699D4 80249174 3C018025 */ lui $at, %hi(filemenu_8024C098)
/* 1699D8 80249178 A020C098 */ sb $zero, %lo(filemenu_8024C098)($at)
/* 1699DC 8024917C 080924C4 */ j .L80249310
/* 1699E0 80249180 00000000 */ nop
.L80249184:
/* 1699E4 80249184 28620008 */ slti $v0, $v1, 8
/* 1699E8 80249188 1040000A */ beqz $v0, .L802491B4
/* 1699EC 8024918C 00000000 */ nop
/* 1699F0 80249190 3C058025 */ lui $a1, %hi(D_8024C110)
/* 1699F4 80249194 24A5C110 */ addiu $a1, $a1, %lo(D_8024C110)
/* 1699F0 80249190 3C058025 */ lui $a1, %hi(filemenu_8024C110)
/* 1699F4 80249194 24A5C110 */ addiu $a1, $a1, %lo(filemenu_8024C110)
/* 1699F8 80249198 240400F7 */ addiu $a0, $zero, 0xf7
/* 1699FC 8024919C 00651021 */ addu $v0, $v1, $a1
.L802491A0:
@ -413,8 +413,8 @@ glabel filemenu_choose_name_handle_input
/* 169A1C 802491BC 30421000 */ andi $v0, $v0, 0x1000
/* 169A20 802491C0 10400053 */ beqz $v0, .L80249310
/* 169A24 802491C4 0000182D */ daddu $v1, $zero, $zero
/* 169A28 802491C8 3C058025 */ lui $a1, %hi(D_8024C110)
/* 169A2C 802491CC 24A5C110 */ addiu $a1, $a1, %lo(D_8024C110)
/* 169A28 802491C8 3C058025 */ lui $a1, %hi(filemenu_8024C110)
/* 169A2C 802491CC 24A5C110 */ addiu $a1, $a1, %lo(filemenu_8024C110)
/* 169A30 802491D0 240400F7 */ addiu $a0, $zero, 0xf7
/* 169A34 802491D4 00651021 */ addu $v0, $v1, $a1
.L802491D8:
@ -498,8 +498,8 @@ glabel filemenu_choose_name_handle_input
/* 169B50 802492F0 3C048025 */ lui $a0, %hi(filemenu_menus + 0x4)
/* 169B54 802492F4 8C849B88 */ lw $a0, %lo(filemenu_menus + 0x4)($a0)
/* 169B58 802492F8 24020001 */ addiu $v0, $zero, 1
/* 169B5C 802492FC 3C018025 */ lui $at, %hi(D_8024C098)
/* 169B60 80249300 A022C098 */ sb $v0, %lo(D_8024C098)($at)
/* 169B5C 802492FC 3C018025 */ lui $at, %hi(filemenu_8024C098)
/* 169B60 80249300 A022C098 */ sb $v0, %lo(filemenu_8024C098)($at)
/* 169B64 80249304 24020002 */ addiu $v0, $zero, 2
/* 169B68 80249308 0C090B65 */ jal filemenu_set_selected
/* 169B6C 8024930C A0820004 */ sb $v0, 4($a0)

View File

@ -466,8 +466,8 @@ glabel filemenu_draw_contents_choose_name
/* 169220 802489C0 1440FF9A */ bnez $v0, .L8024882C
/* 169224 802489C4 00000000 */ nop
.L802489C8:
/* 169228 802489C8 3C038025 */ lui $v1, %hi(D_8024C098)
/* 16922C 802489CC 8063C098 */ lb $v1, %lo(D_8024C098)($v1)
/* 169228 802489C8 3C038025 */ lui $v1, %hi(filemenu_8024C098)
/* 16922C 802489CC 8063C098 */ lb $v1, %lo(filemenu_8024C098)($v1)
/* 169230 802489D0 24020003 */ addiu $v0, $zero, 3
/* 169234 802489D4 1462001D */ bne $v1, $v0, .L80248A4C
/* 169238 802489D8 00000000 */ nop

View File

@ -1,57 +0,0 @@
.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel filemenu_draw_file_name
/* 16A318 80249AB8 27BDFFC0 */ addiu $sp, $sp, -0x40
/* 16A31C 80249ABC AFB70034 */ sw $s7, 0x34($sp)
/* 16A320 80249AC0 8FB70050 */ lw $s7, 0x50($sp)
/* 16A324 80249AC4 AFB60030 */ sw $s6, 0x30($sp)
/* 16A328 80249AC8 8FB60054 */ lw $s6, 0x54($sp)
/* 16A32C 80249ACC AFB5002C */ sw $s5, 0x2c($sp)
/* 16A330 80249AD0 8FB50058 */ lw $s5, 0x58($sp)
/* 16A334 80249AD4 AFBE0038 */ sw $fp, 0x38($sp)
/* 16A338 80249AD8 0080F02D */ daddu $fp, $a0, $zero
/* 16A33C 80249ADC AFB20020 */ sw $s2, 0x20($sp)
/* 16A340 80249AE0 00A0902D */ daddu $s2, $a1, $zero
/* 16A344 80249AE4 AFB40028 */ sw $s4, 0x28($sp)
/* 16A348 80249AE8 8FB4005C */ lw $s4, 0x5c($sp)
/* 16A34C 80249AEC 00C0282D */ daddu $a1, $a2, $zero
/* 16A350 80249AF0 AFB00018 */ sw $s0, 0x18($sp)
/* 16A354 80249AF4 0000802D */ daddu $s0, $zero, $zero
/* 16A358 80249AF8 AFBF003C */ sw $ra, 0x3c($sp)
/* 16A35C 80249AFC AFB30024 */ sw $s3, 0x24($sp)
/* 16A360 80249B00 AFB1001C */ sw $s1, 0x1c($sp)
/* 16A364 80249B04 1A400010 */ blez $s2, .L80249B48
/* 16A368 80249B08 AFA7004C */ sw $a3, 0x4c($sp)
/* 16A36C 80249B0C 241300F7 */ addiu $s3, $zero, 0xf7
/* 16A370 80249B10 00A0882D */ daddu $s1, $a1, $zero
.L80249B14:
/* 16A374 80249B14 03D01021 */ addu $v0, $fp, $s0
/* 16A378 80249B18 90440000 */ lbu $a0, ($v0)
/* 16A37C 80249B1C 10930006 */ beq $a0, $s3, .L80249B38
/* 16A380 80249B20 0220282D */ daddu $a1, $s1, $zero
/* 16A384 80249B24 8FA6004C */ lw $a2, 0x4c($sp)
/* 16A388 80249B28 02E0382D */ daddu $a3, $s7, $zero
/* 16A38C 80249B2C AFB60010 */ sw $s6, 0x10($sp)
/* 16A390 80249B30 0C09265F */ jal filemenu_draw_message
/* 16A394 80249B34 AFB50014 */ sw $s5, 0x14($sp)
.L80249B38:
/* 16A398 80249B38 26100001 */ addiu $s0, $s0, 1
/* 16A39C 80249B3C 0212102A */ slt $v0, $s0, $s2
/* 16A3A0 80249B40 1440FFF4 */ bnez $v0, .L80249B14
/* 16A3A4 80249B44 02348821 */ addu $s1, $s1, $s4
.L80249B48:
/* 16A3A8 80249B48 8FBF003C */ lw $ra, 0x3c($sp)
/* 16A3AC 80249B4C 8FBE0038 */ lw $fp, 0x38($sp)
/* 16A3B0 80249B50 8FB70034 */ lw $s7, 0x34($sp)
/* 16A3B4 80249B54 8FB60030 */ lw $s6, 0x30($sp)
/* 16A3B8 80249B58 8FB5002C */ lw $s5, 0x2c($sp)
/* 16A3BC 80249B5C 8FB40028 */ lw $s4, 0x28($sp)
/* 16A3C0 80249B60 8FB30024 */ lw $s3, 0x24($sp)
/* 16A3C4 80249B64 8FB20020 */ lw $s2, 0x20($sp)
/* 16A3C8 80249B68 8FB1001C */ lw $s1, 0x1c($sp)
/* 16A3CC 80249B6C 8FB00018 */ lw $s0, 0x18($sp)
/* 16A3D0 80249B70 03E00008 */ jr $ra
/* 16A3D4 80249B74 27BD0040 */ addiu $sp, $sp, 0x40
/* 16A3D8 80249B78 00000000 */ nop
/* 16A3DC 80249B7C 00000000 */ nop

View File

@ -3,7 +3,7 @@
glabel filemenu_get_menu_message
/* 16A304 80249AA4 00042080 */ sll $a0, $a0, 2
/* 16A308 80249AA8 3C028025 */ lui $v0, %hi(D_8024B9D0)
/* 16A308 80249AA8 3C028025 */ lui $v0, %hi(gFileMenuMessages)
/* 16A30C 80249AAC 00441021 */ addu $v0, $v0, $a0
/* 16A310 80249AB0 03E00008 */ jr $ra
/* 16A314 80249AB4 8C42B9D0 */ lw $v0, %lo(D_8024B9D0)($v0)
/* 16A314 80249AB4 8C42B9D0 */ lw $v0, %lo(gFileMenuMessages)($v0)

View File

@ -1,277 +0,0 @@
.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel btl_draw_enemy_health_bars
/* 16E880 8023FFA0 3C028007 */ lui $v0, %hi(gGameStatusPtr)
/* 16E884 8023FFA4 8C42419C */ lw $v0, %lo(gGameStatusPtr)($v0)
/* 16E888 8023FFA8 27BDFFA8 */ addiu $sp, $sp, -0x58
/* 16E88C 8023FFAC AFBF0054 */ sw $ra, 0x54($sp)
/* 16E890 8023FFB0 AFBE0050 */ sw $fp, 0x50($sp)
/* 16E894 8023FFB4 AFB7004C */ sw $s7, 0x4c($sp)
/* 16E898 8023FFB8 AFB60048 */ sw $s6, 0x48($sp)
/* 16E89C 8023FFBC AFB50044 */ sw $s5, 0x44($sp)
/* 16E8A0 8023FFC0 AFB40040 */ sw $s4, 0x40($sp)
/* 16E8A4 8023FFC4 AFB3003C */ sw $s3, 0x3c($sp)
/* 16E8A8 8023FFC8 AFB20038 */ sw $s2, 0x38($sp)
/* 16E8AC 8023FFCC AFB10034 */ sw $s1, 0x34($sp)
/* 16E8B0 8023FFD0 AFB00030 */ sw $s0, 0x30($sp)
/* 16E8B4 8023FFD4 8042007C */ lb $v0, 0x7c($v0)
/* 16E8B8 8023FFD8 104000EC */ beqz $v0, .L8024038C
/* 16E8BC 8023FFDC 00000000 */ nop
/* 16E8C0 8023FFE0 3C02800E */ lui $v0, %hi(gBattleStatus)
/* 16E8C4 8023FFE4 8C42C070 */ lw $v0, %lo(gBattleStatus)($v0)
/* 16E8C8 8023FFE8 30420001 */ andi $v0, $v0, 1
/* 16E8CC 8023FFEC 104000E7 */ beqz $v0, .L8024038C
/* 16E8D0 8023FFF0 0000B82D */ daddu $s7, $zero, $zero
/* 16E8D4 8023FFF4 27B60020 */ addiu $s6, $sp, 0x20
/* 16E8D8 8023FFF8 27B50024 */ addiu $s5, $sp, 0x24
/* 16E8DC 8023FFFC 241E0008 */ addiu $fp, $zero, 8
/* 16E8E0 80240000 00171080 */ sll $v0, $s7, 2
.L80240004:
/* 16E8E4 80240004 3C08800E */ lui $t0, %hi(gBattleStatus)
/* 16E8E8 80240008 2508C070 */ addiu $t0, $t0, %lo(gBattleStatus)
/* 16E8EC 8024000C 01021021 */ addu $v0, $t0, $v0
/* 16E8F0 80240010 8C5300E0 */ lw $s3, 0xe0($v0)
/* 16E8F4 80240014 526000DA */ beql $s3, $zero, .L80240380
/* 16E8F8 80240018 26F70001 */ addiu $s7, $s7, 1
/* 16E8FC 8024001C 827401B8 */ lb $s4, 0x1b8($s3)
/* 16E900 80240020 826301B9 */ lb $v1, 0x1b9($s3)
/* 16E904 80240024 00141040 */ sll $v0, $s4, 1
/* 16E908 80240028 00541021 */ addu $v0, $v0, $s4
/* 16E90C 8024002C 000210C0 */ sll $v0, $v0, 3
/* 16E910 80240030 00541021 */ addu $v0, $v0, $s4
/* 16E914 80240034 14600002 */ bnez $v1, .L80240040
/* 16E918 80240038 0043001A */ div $zero, $v0, $v1
/* 16E91C 8024003C 0007000D */ break 7
.L80240040:
/* 16E920 80240040 2401FFFF */ addiu $at, $zero, -1
/* 16E924 80240044 14610004 */ bne $v1, $at, .L80240058
/* 16E928 80240048 3C018000 */ lui $at, 0x8000
/* 16E92C 8024004C 14410002 */ bne $v0, $at, .L80240058
/* 16E930 80240050 00000000 */ nop
/* 16E934 80240054 0006000D */ break 6
.L80240058:
/* 16E938 80240058 00008812 */ mflo $s1
/* 16E93C 8024005C 826201BC */ lb $v0, 0x1bc($s3)
/* 16E940 80240060 926301BC */ lbu $v1, 0x1bc($s3)
/* 16E944 80240064 0222102A */ slt $v0, $s1, $v0
/* 16E948 80240068 10400008 */ beqz $v0, .L8024008C
/* 16E94C 8024006C 2462FFFE */ addiu $v0, $v1, -2
/* 16E950 80240070 A26201BC */ sb $v0, 0x1bc($s3)
/* 16E954 80240074 00021600 */ sll $v0, $v0, 0x18
/* 16E958 80240078 00021603 */ sra $v0, $v0, 0x18
/* 16E95C 8024007C 0051102A */ slt $v0, $v0, $s1
/* 16E960 80240080 1040000E */ beqz $v0, .L802400BC
/* 16E964 80240084 3C020004 */ lui $v0, 4
/* 16E968 80240088 A27101BC */ sb $s1, 0x1bc($s3)
.L8024008C:
/* 16E96C 8024008C 826201BC */ lb $v0, 0x1bc($s3)
/* 16E970 80240090 926301BC */ lbu $v1, 0x1bc($s3)
/* 16E974 80240094 0051102A */ slt $v0, $v0, $s1
/* 16E978 80240098 10400007 */ beqz $v0, .L802400B8
/* 16E97C 8024009C 24620002 */ addiu $v0, $v1, 2
/* 16E980 802400A0 A26201BC */ sb $v0, 0x1bc($s3)
/* 16E984 802400A4 00021600 */ sll $v0, $v0, 0x18
/* 16E988 802400A8 00021603 */ sra $v0, $v0, 0x18
/* 16E98C 802400AC 0222102A */ slt $v0, $s1, $v0
/* 16E990 802400B0 54400001 */ bnel $v0, $zero, .L802400B8
/* 16E994 802400B4 A27101BC */ sb $s1, 0x1bc($s3)
.L802400B8:
/* 16E998 802400B8 3C020004 */ lui $v0, 4
.L802400BC:
/* 16E99C 802400BC 8E630000 */ lw $v1, ($s3)
/* 16E9A0 802400C0 34424000 */ ori $v0, $v0, 0x4000
/* 16E9A4 802400C4 00621024 */ and $v0, $v1, $v0
/* 16E9A8 802400C8 544000AD */ bnel $v0, $zero, .L80240380
/* 16E9AC 802400CC 26F70001 */ addiu $s7, $s7, 1
/* 16E9B0 802400D0 3C02800E */ lui $v0, %hi(gBattleStatus)
/* 16E9B4 802400D4 8C42C070 */ lw $v0, %lo(gBattleStatus)($v0)
/* 16E9B8 802400D8 30420002 */ andi $v0, $v0, 2
/* 16E9BC 802400DC 14400004 */ bnez $v0, .L802400F0
/* 16E9C0 802400E0 3C020008 */ lui $v0, 8
/* 16E9C4 802400E4 00621024 */ and $v0, $v1, $v0
/* 16E9C8 802400E8 504000A5 */ beql $v0, $zero, .L80240380
/* 16E9CC 802400EC 26F70001 */ addiu $s7, $s7, 1
.L802400F0:
/* 16E9D0 802400F0 0C094F08 */ jal is_actor_hp_bar_visible
/* 16E9D4 802400F4 0260202D */ daddu $a0, $s3, $zero
/* 16E9D8 802400F8 504000A1 */ beql $v0, $zero, .L80240380
/* 16E9DC 802400FC 26F70001 */ addiu $s7, $s7, 1
/* 16E9E0 80240100 86620156 */ lh $v0, 0x156($s3)
/* 16E9E4 80240104 8663015A */ lh $v1, 0x15a($s3)
/* 16E9E8 80240108 44822000 */ mtc1 $v0, $f4
/* 16E9EC 8024010C 00000000 */ nop
/* 16E9F0 80240110 46802120 */ cvt.s.w $f4, $f4
/* 16E9F4 80240114 86620158 */ lh $v0, 0x158($s3)
/* 16E9F8 80240118 44831000 */ mtc1 $v1, $f2
/* 16E9FC 8024011C 00000000 */ nop
/* 16EA00 80240120 468010A0 */ cvt.s.w $f2, $f2
/* 16EA04 80240124 44820000 */ mtc1 $v0, $f0
/* 16EA08 80240128 00000000 */ nop
/* 16EA0C 8024012C 46800020 */ cvt.s.w $f0, $f0
/* 16EA10 80240130 2842FE0C */ slti $v0, $v0, -0x1f4
/* 16EA14 80240134 54400092 */ bnel $v0, $zero, .L80240380
/* 16EA18 80240138 26F70001 */ addiu $s7, $s7, 1
/* 16EA1C 8024013C 24040001 */ addiu $a0, $zero, 1
/* 16EA20 80240140 44052000 */ mfc1 $a1, $f4
/* 16EA24 80240144 44060000 */ mfc1 $a2, $f0
/* 16EA28 80240148 44071000 */ mfc1 $a3, $f2
/* 16EA2C 8024014C 27A20028 */ addiu $v0, $sp, 0x28
/* 16EA30 80240150 AFB60010 */ sw $s6, 0x10($sp)
/* 16EA34 80240154 AFB50014 */ sw $s5, 0x14($sp)
/* 16EA38 80240158 0C00B94E */ jal get_screen_coords
/* 16EA3C 8024015C AFA20018 */ sw $v0, 0x18($sp)
/* 16EA40 80240160 2405000A */ addiu $a1, $zero, 0xa
/* 16EA44 80240164 3C10802A */ lui $s0, %hi(D_8029EFBC)
/* 16EA48 80240168 8E10EFBC */ lw $s0, %lo(D_8029EFBC)($s0)
/* 16EA4C 8024016C 8FA20024 */ lw $v0, 0x24($sp)
/* 16EA50 80240170 0200202D */ daddu $a0, $s0, $zero
/* 16EA54 80240174 24420010 */ addiu $v0, $v0, 0x10
/* 16EA58 80240178 0C051277 */ jal set_hud_element_render_depth
/* 16EA5C 8024017C AFA20024 */ sw $v0, 0x24($sp)
/* 16EA60 80240180 3C058029 */ lui $a1, %hi(HudScript_HPBar)
/* 16EA64 80240184 24A51F80 */ addiu $a1, $a1, %lo(HudScript_HPBar)
/* 16EA68 80240188 0C0511FF */ jal set_hud_element_anim
/* 16EA6C 8024018C 0200202D */ daddu $a0, $s0, $zero
/* 16EA70 80240190 8FA50020 */ lw $a1, 0x20($sp)
/* 16EA74 80240194 8FA60024 */ lw $a2, 0x24($sp)
/* 16EA78 80240198 0C051261 */ jal set_hud_element_render_pos
/* 16EA7C 8024019C 0200202D */ daddu $a0, $s0, $zero
/* 16EA80 802401A0 0C0511EA */ jal draw_hud_element_clipped
/* 16EA84 802401A4 0200202D */ daddu $a0, $s0, $zero
/* 16EA88 802401A8 3C026666 */ lui $v0, 0x6666
/* 16EA8C 802401AC 34426667 */ ori $v0, $v0, 0x6667
/* 16EA90 802401B0 02820018 */ mult $s4, $v0
/* 16EA94 802401B4 001417C3 */ sra $v0, $s4, 0x1f
/* 16EA98 802401B8 00004010 */ mfhi $t0
/* 16EA9C 802401BC 00081883 */ sra $v1, $t0, 2
/* 16EAA0 802401C0 00628823 */ subu $s1, $v1, $v0
/* 16EAA4 802401C4 00119080 */ sll $s2, $s1, 2
/* 16EAA8 802401C8 02511021 */ addu $v0, $s2, $s1
/* 16EAAC 802401CC 00021040 */ sll $v0, $v0, 1
/* 16EAB0 802401D0 1A200021 */ blez $s1, .L80240258
/* 16EAB4 802401D4 0282A023 */ subu $s4, $s4, $v0
/* 16EAB8 802401D8 3C10802A */ lui $s0, %hi(D_8029EFBC)
/* 16EABC 802401DC 8E10EFBC */ lw $s0, %lo(D_8029EFBC)($s0)
/* 16EAC0 802401E0 2405000A */ addiu $a1, $zero, 0xa
/* 16EAC4 802401E4 0C051277 */ jal set_hud_element_render_depth
/* 16EAC8 802401E8 0200202D */ daddu $a0, $s0, $zero
/* 16EACC 802401EC 3C088028 */ lui $t0, %hi(bHPDigitHudScripts)
/* 16EAD0 802401F0 250809FC */ addiu $t0, $t0, %lo(bHPDigitHudScripts)
/* 16EAD4 802401F4 02481021 */ addu $v0, $s2, $t0
/* 16EAD8 802401F8 8C450000 */ lw $a1, ($v0)
/* 16EADC 802401FC 0C0511FF */ jal set_hud_element_anim
/* 16EAE0 80240200 0200202D */ daddu $a0, $s0, $zero
/* 16EAE4 80240204 0000202D */ daddu $a0, $zero, $zero
/* 16EAE8 80240208 0080282D */ daddu $a1, $a0, $zero
/* 16EAEC 8024020C 96C20002 */ lhu $v0, 2($s6)
/* 16EAF0 80240210 0080302D */ daddu $a2, $a0, $zero
/* 16EAF4 80240214 AFA20010 */ sw $v0, 0x10($sp)
/* 16EAF8 80240218 96A20002 */ lhu $v0, 2($s5)
/* 16EAFC 8024021C 0080382D */ daddu $a3, $a0, $zero
/* 16EB00 80240220 AFBE0018 */ sw $fp, 0x18($sp)
/* 16EB04 80240224 AFBE001C */ sw $fp, 0x1c($sp)
/* 16EB08 80240228 24420002 */ addiu $v0, $v0, 2
/* 16EB0C 8024022C 3042FFFF */ andi $v0, $v0, 0xffff
/* 16EB10 80240230 0C099E8F */ jal btl_draw_prim_quad
/* 16EB14 80240234 AFA20014 */ sw $v0, 0x14($sp)
/* 16EB18 80240238 0200202D */ daddu $a0, $s0, $zero
/* 16EB1C 8024023C 8FA50020 */ lw $a1, 0x20($sp)
/* 16EB20 80240240 8FA60024 */ lw $a2, 0x24($sp)
/* 16EB24 80240244 24A50004 */ addiu $a1, $a1, 4
/* 16EB28 80240248 0C051261 */ jal set_hud_element_render_pos
/* 16EB2C 8024024C 24C60006 */ addiu $a2, $a2, 6
/* 16EB30 80240250 0C0511F1 */ jal draw_hud_element_2
/* 16EB34 80240254 0200202D */ daddu $a0, $s0, $zero
.L80240258:
/* 16EB38 80240258 3C10802A */ lui $s0, %hi(D_8029EFBC)
/* 16EB3C 8024025C 8E10EFBC */ lw $s0, %lo(D_8029EFBC)($s0)
/* 16EB40 80240260 2405000A */ addiu $a1, $zero, 0xa
/* 16EB44 80240264 0C051277 */ jal set_hud_element_render_depth
/* 16EB48 80240268 0200202D */ daddu $a0, $s0, $zero
/* 16EB4C 8024026C 00141080 */ sll $v0, $s4, 2
/* 16EB50 80240270 3C088028 */ lui $t0, %hi(bHPDigitHudScripts)
/* 16EB54 80240274 250809FC */ addiu $t0, $t0, %lo(bHPDigitHudScripts)
/* 16EB58 80240278 00481021 */ addu $v0, $v0, $t0
/* 16EB5C 8024027C 8C450000 */ lw $a1, ($v0)
/* 16EB60 80240280 0C0511FF */ jal set_hud_element_anim
/* 16EB64 80240284 0200202D */ daddu $a0, $s0, $zero
/* 16EB68 80240288 0000202D */ daddu $a0, $zero, $zero
/* 16EB6C 8024028C 0080282D */ daddu $a1, $a0, $zero
/* 16EB70 80240290 96C20002 */ lhu $v0, 2($s6)
/* 16EB74 80240294 0080302D */ daddu $a2, $a0, $zero
/* 16EB78 80240298 24420006 */ addiu $v0, $v0, 6
/* 16EB7C 8024029C 3042FFFF */ andi $v0, $v0, 0xffff
/* 16EB80 802402A0 AFA20010 */ sw $v0, 0x10($sp)
/* 16EB84 802402A4 96A20002 */ lhu $v0, 2($s5)
/* 16EB88 802402A8 0080382D */ daddu $a3, $a0, $zero
/* 16EB8C 802402AC AFBE0018 */ sw $fp, 0x18($sp)
/* 16EB90 802402B0 AFBE001C */ sw $fp, 0x1c($sp)
/* 16EB94 802402B4 24420002 */ addiu $v0, $v0, 2
/* 16EB98 802402B8 3042FFFF */ andi $v0, $v0, 0xffff
/* 16EB9C 802402BC 0C099E8F */ jal btl_draw_prim_quad
/* 16EBA0 802402C0 AFA20014 */ sw $v0, 0x14($sp)
/* 16EBA4 802402C4 0200202D */ daddu $a0, $s0, $zero
/* 16EBA8 802402C8 8FA50020 */ lw $a1, 0x20($sp)
/* 16EBAC 802402CC 8FA60024 */ lw $a2, 0x24($sp)
/* 16EBB0 802402D0 24A5000A */ addiu $a1, $a1, 0xa
/* 16EBB4 802402D4 0C051261 */ jal set_hud_element_render_pos
/* 16EBB8 802402D8 24C60006 */ addiu $a2, $a2, 6
/* 16EBBC 802402DC 0C0511F1 */ jal draw_hud_element_2
/* 16EBC0 802402E0 0200202D */ daddu $a0, $s0, $zero
/* 16EBC4 802402E4 240400A8 */ addiu $a0, $zero, 0xa8
/* 16EBC8 802402E8 0000282D */ daddu $a1, $zero, $zero
/* 16EBCC 802402EC 00A0302D */ daddu $a2, $a1, $zero
/* 16EBD0 802402F0 240700FF */ addiu $a3, $zero, 0xff
/* 16EBD4 802402F4 24030019 */ addiu $v1, $zero, 0x19
/* 16EBD8 802402F8 827101BC */ lb $s1, 0x1bc($s3)
/* 16EBDC 802402FC 96C20002 */ lhu $v0, 2($s6)
/* 16EBE0 80240300 00718823 */ subu $s1, $v1, $s1
/* 16EBE4 80240304 2442000B */ addiu $v0, $v0, 0xb
/* 16EBE8 80240308 00511023 */ subu $v0, $v0, $s1
/* 16EBEC 8024030C 3042FFFF */ andi $v0, $v0, 0xffff
/* 16EBF0 80240310 3230FFFF */ andi $s0, $s1, 0xffff
/* 16EBF4 80240314 AFA20010 */ sw $v0, 0x10($sp)
/* 16EBF8 80240318 96A30002 */ lhu $v1, 2($s5)
/* 16EBFC 8024031C 24020001 */ addiu $v0, $zero, 1
/* 16EC00 80240320 AFB00018 */ sw $s0, 0x18($sp)
/* 16EC04 80240324 AFA2001C */ sw $v0, 0x1c($sp)
/* 16EC08 80240328 2463FFF9 */ addiu $v1, $v1, -7
/* 16EC0C 8024032C 3063FFFF */ andi $v1, $v1, 0xffff
/* 16EC10 80240330 0C099E8F */ jal btl_draw_prim_quad
/* 16EC14 80240334 AFA30014 */ sw $v1, 0x14($sp)
/* 16EC18 80240338 240400FF */ addiu $a0, $zero, 0xff
/* 16EC1C 8024033C 0000282D */ daddu $a1, $zero, $zero
/* 16EC20 80240340 00A0302D */ daddu $a2, $a1, $zero
/* 16EC24 80240344 96C20002 */ lhu $v0, 2($s6)
/* 16EC28 80240348 0080382D */ daddu $a3, $a0, $zero
/* 16EC2C 8024034C 2442000B */ addiu $v0, $v0, 0xb
/* 16EC30 80240350 00511023 */ subu $v0, $v0, $s1
/* 16EC34 80240354 3042FFFF */ andi $v0, $v0, 0xffff
/* 16EC38 80240358 AFA20010 */ sw $v0, 0x10($sp)
/* 16EC3C 8024035C 96A30002 */ lhu $v1, 2($s5)
/* 16EC40 80240360 24020004 */ addiu $v0, $zero, 4
/* 16EC44 80240364 AFB00018 */ sw $s0, 0x18($sp)
/* 16EC48 80240368 AFA2001C */ sw $v0, 0x1c($sp)
/* 16EC4C 8024036C 2463FFFA */ addiu $v1, $v1, -6
/* 16EC50 80240370 3063FFFF */ andi $v1, $v1, 0xffff
/* 16EC54 80240374 0C099E8F */ jal btl_draw_prim_quad
/* 16EC58 80240378 AFA30014 */ sw $v1, 0x14($sp)
/* 16EC5C 8024037C 26F70001 */ addiu $s7, $s7, 1
.L80240380:
/* 16EC60 80240380 2AE20018 */ slti $v0, $s7, 0x18
/* 16EC64 80240384 1440FF1F */ bnez $v0, .L80240004
/* 16EC68 80240388 00171080 */ sll $v0, $s7, 2
.L8024038C:
/* 16EC6C 8024038C 8FBF0054 */ lw $ra, 0x54($sp)
/* 16EC70 80240390 8FBE0050 */ lw $fp, 0x50($sp)
/* 16EC74 80240394 8FB7004C */ lw $s7, 0x4c($sp)
/* 16EC78 80240398 8FB60048 */ lw $s6, 0x48($sp)
/* 16EC7C 8024039C 8FB50044 */ lw $s5, 0x44($sp)
/* 16EC80 802403A0 8FB40040 */ lw $s4, 0x40($sp)
/* 16EC84 802403A4 8FB3003C */ lw $s3, 0x3c($sp)
/* 16EC88 802403A8 8FB20038 */ lw $s2, 0x38($sp)
/* 16EC8C 802403AC 8FB10034 */ lw $s1, 0x34($sp)
/* 16EC90 802403B0 8FB00030 */ lw $s0, 0x30($sp)
/* 16EC94 802403B4 03E00008 */ jr $ra
/* 16EC98 802403B8 27BD0058 */ addiu $sp, $sp, 0x58

View File

@ -1,236 +0,0 @@
.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
.section .rodata
.balign 8
dlabel jtbl_8029C9F8
.word .L8023EB20_16D400, .L8023EC10_16D4F0, .L8023EC40_16D520, .L8023ED00_16D5E0, .L8023EB60_16D440, .L8023EB70_16D450, .L8023EB30_16D410, .L8023EB40_16D420, .L8023EB50_16D430, .L8023EB80_16D460, .L8023EB90_16D470, .L8023EBA0_16D480, .L8023EBB0_16D490, .L8023EBC0_16D4A0, .L8023EBE0_16D4C0, .L8023EBD0_16D4B0, .L8023EBF0_16D4D0, .L8023EC00_16D4E0, .L8023EC70_16D550, .L8023EC60_16D540, .L8023EC50_16D530, .L8023EC20_16D500, .L8023EC30_16D510, .L8023ECB0_16D590, .L8023ECC0_16D5A0, .L8023EC80_16D560, .L8023ECD0_16D5B0, .L8023ECE0_16D5C0, .L8023ECA0_16D580, .L8023ECF0_16D5D0, .L8023ED38_16D618, .L8023EC90_16D570, .L8023ED20_16D600, .L8023ED10_16D5F0, .L8023ED30_16D610, 0
.section .text
glabel btl_draw_ui
/* 16D35C 8023EA7C 27BDFFE0 */ addiu $sp, $sp, -0x20
/* 16D360 8023EA80 AFB10014 */ sw $s1, 0x14($sp)
/* 16D364 8023EA84 0000882D */ daddu $s1, $zero, $zero
/* 16D368 8023EA88 AFBF0018 */ sw $ra, 0x18($sp)
/* 16D36C 8023EA8C AFB00010 */ sw $s0, 0x10($sp)
/* 16D370 8023EA90 3C10800E */ lui $s0, %hi(gBattleState)
/* 16D374 8023EA94 8E10C068 */ lw $s0, %lo(gBattleState)($s0)
/* 16D378 8023EA98 3C04800E */ lui $a0, %hi(D_800DC4D0)
/* 16D37C 8023EA9C 2484C4D0 */ addiu $a0, $a0, %lo(D_800DC4D0)
/* 16D380 8023EAA0 8C820000 */ lw $v0, ($a0)
/* 16D384 8023EAA4 12020005 */ beq $s0, $v0, .L8023EABC
/* 16D388 8023EAA8 0200182D */ daddu $v1, $s0, $zero
/* 16D38C 8023EAAC 0040802D */ daddu $s0, $v0, $zero
/* 16D390 8023EAB0 AC830000 */ sw $v1, ($a0)
/* 16D394 8023EAB4 0808FABA */ j .L8023EAE8
/* 16D398 8023EAB8 24110001 */ addiu $s1, $zero, 1
.L8023EABC:
/* 16D39C 8023EABC 2402FFFF */ addiu $v0, $zero, -1
/* 16D3A0 8023EAC0 16020007 */ bne $s0, $v0, .L8023EAE0
/* 16D3A4 8023EAC4 00000000 */ nop
/* 16D3A8 8023EAC8 0C0900EF */ jal btl_update_starpoints_display
/* 16D3AC 8023EACC 00000000 */ nop
/* 16D3B0 8023EAD0 0C08FFE8 */ jal btl_draw_enemy_health_bars
/* 16D3B4 8023EAD4 00000000 */ nop
/* 16D3B8 8023EAD8 0808FB50 */ j .L8023ED40
/* 16D3BC 8023EADC 00000000 */ nop
.L8023EAE0:
/* 16D3C0 8023EAE0 12000099 */ beqz $s0, .L8023ED48
/* 16D3C4 8023EAE4 00000000 */ nop
.L8023EAE8:
/* 16D3C8 8023EAE8 0C0900EF */ jal btl_update_starpoints_display
/* 16D3CC 8023EAEC 00000000 */ nop
/* 16D3D0 8023EAF0 0C08FFE8 */ jal btl_draw_enemy_health_bars
/* 16D3D4 8023EAF4 00000000 */ nop
/* 16D3D8 8023EAF8 1620008F */ bnez $s1, .L8023ED38_16D618
/* 16D3DC 8023EAFC 2603FFFF */ addiu $v1, $s0, -1
/* 16D3E0 8023EB00 2C620023 */ sltiu $v0, $v1, 0x23
/* 16D3E4 8023EB04 1040008C */ beqz $v0, .L8023ED38_16D618
/* 16D3E8 8023EB08 00031080 */ sll $v0, $v1, 2
/* 16D3EC 8023EB0C 3C01802A */ lui $at, %hi(jtbl_8029C9F8)
/* 16D3F0 8023EB10 00220821 */ addu $at, $at, $v0
/* 16D3F4 8023EB14 8C22C9F8 */ lw $v0, %lo(jtbl_8029C9F8)($at)
/* 16D3F8 8023EB18 00400008 */ jr $v0
/* 16D3FC 8023EB1C 00000000 */ nop
.L8023EB20_16D400:
/* 16D400 8023EB20 0C0906AE */ jal btl_state_draw_normal_start
/* 16D404 8023EB24 00000000 */ nop
/* 16D408 8023EB28 0808FB4E */ j .L8023ED38_16D618
/* 16D40C 8023EB2C 00000000 */ nop
.L8023EB30_16D410:
/* 16D410 8023EB30 0C090AB0 */ jal btl_state_draw_begin_player_turn
/* 16D414 8023EB34 00000000 */ nop
/* 16D418 8023EB38 0808FB4E */ j .L8023ED38_16D618
/* 16D41C 8023EB3C 00000000 */ nop
.L8023EB40_16D420:
/* 16D420 8023EB40 0C090BBE */ jal btl_state_draw_begin_partner_turn
/* 16D424 8023EB44 00000000 */ nop
/* 16D428 8023EB48 0808FB4E */ j .L8023ED38_16D618
/* 16D42C 8023EB4C 00000000 */ nop
.L8023EB50_16D430:
/* 16D430 8023EB50 0C090E44 */ jal func_80243910
/* 16D434 8023EB54 00000000 */ nop
/* 16D438 8023EB58 0808FB4E */ j .L8023ED38_16D618
/* 16D43C 8023EB5C 00000000 */ nop
.L8023EB60_16D440:
/* 16D440 8023EB60 0C090807 */ jal btl_state_draw_begin_turn
/* 16D444 8023EB64 00000000 */ nop
/* 16D448 8023EB68 0808FB4E */ j .L8023ED38_16D618
/* 16D44C 8023EB6C 00000000 */ nop
.L8023EB70_16D450:
/* 16D450 8023EB70 0C090FF5 */ jal btl_state_draw_end_turn
/* 16D454 8023EB74 00000000 */ nop
/* 16D458 8023EB78 0808FB4E */ j .L8023ED38_16D618
/* 16D45C 8023EB7C 00000000 */ nop
.L8023EB80_16D460:
/* 16D460 8023EB80 0C090AEA */ jal btl_state_draw_switch_to_player
/* 16D464 8023EB84 00000000 */ nop
/* 16D468 8023EB88 0808FB4E */ j .L8023ED38_16D618
/* 16D46C 8023EB8C 00000000 */ nop
.L8023EB90_16D470:
/* 16D470 8023EB90 0C090BF6 */ jal btl_state_draw_switch_to_partner
/* 16D474 8023EB94 00000000 */ nop
/* 16D478 8023EB98 0808FB4E */ j .L8023ED38_16D618
/* 16D47C 8023EB9C 00000000 */ nop
.L8023EBA0_16D480:
/* 16D480 8023EBA0 0C090E74 */ jal btl_state_draw_prepare_menu
/* 16D484 8023EBA4 00000000 */ nop
/* 16D488 8023EBA8 0808FB4E */ j .L8023ED38_16D618
/* 16D48C 8023EBAC 00000000 */ nop
.L8023EBB0_16D490:
/* 16D490 8023EBB0 0C0AA060 */ jal btl_state_draw_player_menu
/* 16D494 8023EBB4 00000000 */ nop
/* 16D498 8023EBB8 0808FB4E */ j .L8023ED38_16D618
/* 16D49C 8023EBBC 00000000 */ nop
.L8023EBC0_16D4A0:
/* 16D4A0 8023EBC0 0C0AA6BA */ jal btl_state_draw_partner_menu
/* 16D4A4 8023EBC4 00000000 */ nop
/* 16D4A8 8023EBC8 0808FB4E */ j .L8023ED38_16D618
/* 16D4AC 8023EBCC 00000000 */ nop
.L8023EBD0_16D4B0:
/* 16D4B0 8023EBD0 0C0AA990 */ jal btl_state_draw_twink_menu
/* 16D4B4 8023EBD4 00000000 */ nop
/* 16D4B8 8023EBD8 0808FB4E */ j .L8023ED38_16D618
/* 16D4BC 8023EBDC 00000000 */ nop
.L8023EBE0_16D4C0:
/* 16D4C0 8023EBE0 0C0AA817 */ jal btl_state_draw_peach_menu
/* 16D4C4 8023EBE4 00000000 */ nop
/* 16D4C8 8023EBE8 0808FB4E */ j .L8023ED38_16D618
/* 16D4CC 8023EBEC 00000000 */ nop
.L8023EBF0_16D4D0:
/* 16D4D0 8023EBF0 0C0AAB36 */ jal btl_state_draw_select_target
/* 16D4D4 8023EBF4 00000000 */ nop
/* 16D4D8 8023EBF8 0808FB4E */ j .L8023ED38_16D618
/* 16D4DC 8023EBFC 00000000 */ nop
.L8023EC00_16D4E0:
/* 16D4E0 8023EC00 0C091912 */ jal btl_state_draw_player_move
/* 16D4E4 8023EC04 00000000 */ nop
/* 16D4E8 8023EC08 0808FB4E */ j .L8023ED38_16D618
/* 16D4EC 8023EC0C 00000000 */ nop
.L8023EC10_16D4F0:
/* 16D4F0 8023EC10 0C09203C */ jal btl_state_draw_first_stike
/* 16D4F4 8023EC14 00000000 */ nop
/* 16D4F8 8023EC18 0808FB4E */ j .L8023ED38_16D618
/* 16D4FC 8023EC1C 00000000 */ nop
.L8023EC20_16D500:
/* 16D500 8023EC20 0C091ACB */ jal filemenu_main_update_code
/* 16D504 8023EC24 00000000 */ nop
/* 16D508 8023EC28 0808FB4E */ j .L8023ED38_16D618
/* 16D50C 8023EC2C 00000000 */ nop
.L8023EC30_16D510:
/* 16D510 8023EC30 0C091CA9 */ jal btl_state_draw_end_partner_turn
/* 16D514 8023EC34 00000000 */ nop
/* 16D518 8023EC38 0808FB4E */ j .L8023ED38_16D618
/* 16D51C 8023EC3C 00000000 */ nop
.L8023EC40_16D520:
/* 16D520 8023EC40 0C09217F */ jal btl_state_draw_partner_striking_first
/* 16D524 8023EC44 00000000 */ nop
/* 16D528 8023EC48 0808FB4E */ j .L8023ED38_16D618
/* 16D52C 8023EC4C 00000000 */ nop
.L8023EC50_16D530:
/* 16D530 8023EC50 0C091EBF */ jal btl_state_draw_enemy_move
/* 16D534 8023EC54 00000000 */ nop
/* 16D538 8023EC58 0808FB4E */ j .L8023ED38_16D618
/* 16D53C 8023EC5C 00000000 */ nop
.L8023EC60_16D540:
/* 16D540 8023EC60 0C091D5A */ jal btl_state_draw_next_enemy
/* 16D544 8023EC64 00000000 */ nop
/* 16D548 8023EC68 0808FB4E */ j .L8023ED38_16D618
/* 16D54C 8023EC6C 00000000 */ nop
.L8023EC70_16D550:
/* 16D550 8023EC70 0C091C85 */ jal btl_state_draw_partner_move
/* 16D554 8023EC74 00000000 */ nop
/* 16D558 8023EC78 0808FB4E */ j .L8023ED38_16D618
/* 16D55C 8023EC7C 00000000 */ nop
.L8023EC80_16D560:
/* 16D560 8023EC80 0C0911C2 */ jal btl_state_draw_victory
/* 16D564 8023EC84 00000000 */ nop
/* 16D568 8023EC88 0808FB4E */ j .L8023ED38_16D618
/* 16D56C 8023EC8C 00000000 */ nop
.L8023EC90_16D570:
/* 16D570 8023EC90 0C091364 */ jal btl_state_draw_end_battle
/* 16D574 8023EC94 00000000 */ nop
/* 16D578 8023EC98 0808FB4E */ j .L8023ED38_16D618
/* 16D57C 8023EC9C 00000000 */ nop
.L8023ECA0_16D580:
/* 16D580 8023ECA0 0C0916B2 */ jal btl_state_draw_change_partner
/* 16D584 8023ECA4 00000000 */ nop
/* 16D588 8023ECA8 0808FB4E */ j .L8023ED38_16D618
/* 16D58C 8023ECAC 00000000 */ nop
.L8023ECB0_16D590:
/* 16D590 8023ECB0 0C09150E */ jal btl_state_draw_run_away
/* 16D594 8023ECB4 00000000 */ nop
/* 16D598 8023ECB8 0808FB4E */ j .L8023ED38_16D618
/* 16D59C 8023ECBC 00000000 */ nop
.L8023ECC0_16D5A0:
/* 16D5A0 8023ECC0 0C0913BE */ jal btl_state_draw_defend
/* 16D5A4 8023ECC4 00000000 */ nop
/* 16D5A8 8023ECC8 0808FB4E */ j .L8023ED38_16D618
/* 16D5AC 8023ECCC 00000000 */ nop
.L8023ECD0_16D5B0:
/* 16D5B0 8023ECD0 0C0915AC */ jal btl_state_draw_defeat
/* 16D5B4 8023ECD4 00000000 */ nop
/* 16D5B8 8023ECD8 0808FB4E */ j .L8023ED38_16D618
/* 16D5BC 8023ECDC 00000000 */ nop
.L8023ECE0_16D5C0:
/* 16D5C0 8023ECE0 0C091000 */ jal btl_state_draw_1C
/* 16D5C4 8023ECE4 00000000 */ nop
/* 16D5C8 8023ECE8 0808FB4E */ j .L8023ED38_16D618
/* 16D5CC 8023ECEC 00000000 */ nop
.L8023ECF0_16D5D0:
/* 16D5D0 8023ECF0 0C091292 */ jal btl_state_draw_end_training_battle
/* 16D5D4 8023ECF4 00000000 */ nop
/* 16D5D8 8023ECF8 0808FB4E */ j .L8023ED38_16D618
/* 16D5DC 8023ECFC 00000000 */ nop
.L8023ED00_16D5E0:
/* 16D5E0 8023ED00 0C0922A9 */ jal btl_state_draw_enemy_striking_first
/* 16D5E4 8023ED04 00000000 */ nop
/* 16D5E8 8023ED08 0808FB4E */ j .L8023ED38_16D618
/* 16D5EC 8023ED0C 00000000 */ nop
.L8023ED10_16D5F0:
/* 16D5F0 8023ED10 0C0AACCE */ jal btl_state_draw_22
/* 16D5F4 8023ED14 00000000 */ nop
/* 16D5F8 8023ED18 0808FB4E */ j .L8023ED38_16D618
/* 16D5FC 8023ED1C 00000000 */ nop
.L8023ED20_16D600:
/* 16D600 8023ED20 0C09806F */ jal btl_state_draw_celebration
/* 16D604 8023ED24 00000000 */ nop
/* 16D608 8023ED28 0808FB4E */ j .L8023ED38_16D618
/* 16D60C 8023ED2C 00000000 */ nop
.L8023ED30_16D610:
/* 16D610 8023ED30 0C09235E */ jal btl_state_draw_end_demo_battle
/* 16D614 8023ED34 00000000 */ nop
.L8023ED38_16D618:
/* 16D618 8023ED38 0C093BC2 */ jal btl_draw_popup_messages
/* 16D61C 8023ED3C 00000000 */ nop
.L8023ED40:
/* 16D620 8023ED40 0C03A5CF */ jal draw_status_ui
/* 16D624 8023ED44 00000000 */ nop
.L8023ED48:
/* 16D628 8023ED48 8FBF0018 */ lw $ra, 0x18($sp)
/* 16D62C 8023ED4C 8FB10014 */ lw $s1, 0x14($sp)
/* 16D630 8023ED50 8FB00010 */ lw $s0, 0x10($sp)
/* 16D634 8023ED54 03E00008 */ jr $ra
/* 16D638 8023ED58 27BD0020 */ addiu $sp, $sp, 0x20

View File

@ -1,42 +0,0 @@
.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel func_8024F7C8
/* 17E0A8 8024F7C8 0000382D */ daddu $a3, $zero, $zero
/* 17E0AC 8024F7CC 24090001 */ addiu $t1, $zero, 1
/* 17E0B0 8024F7D0 24080014 */ addiu $t0, $zero, 0x14
/* 17E0B4 8024F7D4 3C06802A */ lui $a2, %hi(popupMessages)
/* 17E0B8 8024F7D8 24C6F2C0 */ addiu $a2, $a2, %lo(popupMessages)
.L8024F7DC:
/* 17E0BC 8024F7DC 84C20010 */ lh $v0, 0x10($a2)
/* 17E0C0 8024F7E0 94C30010 */ lhu $v1, 0x10($a2)
/* 17E0C4 8024F7E4 10400013 */ beqz $v0, .L8024F834
/* 17E0C8 8024F7E8 30620010 */ andi $v0, $v1, 0x10
/* 17E0CC 8024F7EC 50400012 */ beql $v0, $zero, .L8024F838
/* 17E0D0 8024F7F0 24E70001 */ addiu $a3, $a3, 1
/* 17E0D4 8024F7F4 84C20012 */ lh $v0, 0x12($a2)
/* 17E0D8 8024F7F8 8CC40018 */ lw $a0, 0x18($a2)
/* 17E0DC 8024F7FC 1840000D */ blez $v0, .L8024F834
/* 17E0E0 8024F800 0000282D */ daddu $a1, $zero, $zero
/* 17E0E4 8024F804 24830044 */ addiu $v1, $a0, 0x44
.L8024F808:
/* 17E0E8 8024F808 8C820000 */ lw $v0, ($a0)
/* 17E0EC 8024F80C 10400004 */ beqz $v0, .L8024F820
/* 17E0F0 8024F810 24A50001 */ addiu $a1, $a1, 1
/* 17E0F4 8024F814 AC60FFE0 */ sw $zero, -0x20($v1)
/* 17E0F8 8024F818 AC69FFDC */ sw $t1, -0x24($v1)
/* 17E0FC 8024F81C AC680000 */ sw $t0, ($v1)
.L8024F820:
/* 17E100 8024F820 2463004C */ addiu $v1, $v1, 0x4c
/* 17E104 8024F824 84C20012 */ lh $v0, 0x12($a2)
/* 17E108 8024F828 00A2102A */ slt $v0, $a1, $v0
/* 17E10C 8024F82C 1440FFF6 */ bnez $v0, .L8024F808
/* 17E110 8024F830 2484004C */ addiu $a0, $a0, 0x4c
.L8024F834:
/* 17E114 8024F834 24E70001 */ addiu $a3, $a3, 1
.L8024F838:
/* 17E118 8024F838 28E20020 */ slti $v0, $a3, 0x20
/* 17E11C 8024F83C 1440FFE7 */ bnez $v0, .L8024F7DC
/* 17E120 8024F840 24C6001C */ addiu $a2, $a2, 0x1c
/* 17E124 8024F844 03E00008 */ jr $ra
/* 17E128 8024F848 00000000 */ nop

View File

@ -1,95 +0,0 @@
.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel func_80251474
/* 17FD54 80251474 27BDFFD0 */ addiu $sp, $sp, -0x30
/* 17FD58 80251478 AFB1001C */ sw $s1, 0x1c($sp)
/* 17FD5C 8025147C 0080882D */ daddu $s1, $a0, $zero
/* 17FD60 80251480 AFBF0028 */ sw $ra, 0x28($sp)
/* 17FD64 80251484 AFB30024 */ sw $s3, 0x24($sp)
/* 17FD68 80251488 AFB20020 */ sw $s2, 0x20($sp)
/* 17FD6C 8025148C AFB00018 */ sw $s0, 0x18($sp)
/* 17FD70 80251490 8E3001F4 */ lw $s0, 0x1f4($s1)
/* 17FD74 80251494 12000044 */ beqz $s0, .L802515A8
/* 17FD78 80251498 3C134000 */ lui $s3, 0x4000
/* 17FD7C 8025149C 3C12CCCC */ lui $s2, 0xcccc
/* 17FD80 802514A0 3652CCCD */ ori $s2, $s2, 0xcccd
.L802514A4:
/* 17FD84 802514A4 8E030000 */ lw $v1, ($s0)
/* 17FD88 802514A8 30620001 */ andi $v0, $v1, 1
/* 17FD8C 802514AC 1440003B */ bnez $v0, .L8025159C
/* 17FD90 802514B0 00000000 */ nop
/* 17FD94 802514B4 8E020094 */ lw $v0, 0x94($s0)
/* 17FD98 802514B8 10400038 */ beqz $v0, .L8025159C
/* 17FD9C 802514BC 00731024 */ and $v0, $v1, $s3
/* 17FDA0 802514C0 14400036 */ bnez $v0, .L8025159C
/* 17FDA4 802514C4 00000000 */ nop
/* 17FDA8 802514C8 92250191 */ lbu $a1, 0x191($s1)
/* 17FDAC 802514CC 92030072 */ lbu $v1, 0x72($s0)
/* 17FDB0 802514D0 00B20019 */ multu $a1, $s2
/* 17FDB4 802514D4 C6200188 */ lwc1 $f0, 0x188($s1)
/* 17FDB8 802514D8 00031082 */ srl $v0, $v1, 2
/* 17FDBC 802514DC 00621821 */ addu $v1, $v1, $v0
/* 17FDC0 802514E0 44833000 */ mtc1 $v1, $f6
/* 17FDC4 802514E4 00000000 */ nop
/* 17FDC8 802514E8 468031A0 */ cvt.s.w $f6, $f6
/* 17FDCC 802514EC 46003182 */ mul.s $f6, $f6, $f0
/* 17FDD0 802514F0 00000000 */ nop
/* 17FDD4 802514F4 92020073 */ lbu $v0, 0x73($s0)
/* 17FDD8 802514F8 2442FFFE */ addiu $v0, $v0, -2
/* 17FDDC 802514FC 44822000 */ mtc1 $v0, $f4
/* 17FDE0 80251500 00000000 */ nop
/* 17FDE4 80251504 46802120 */ cvt.s.w $f4, $f4
/* 17FDE8 80251508 46002102 */ mul.s $f4, $f4, $f0
/* 17FDEC 8025150C 00000000 */ nop
/* 17FDF0 80251510 C602005C */ lwc1 $f2, 0x5c($s0)
/* 17FDF4 80251514 00004010 */ mfhi $t0
/* 17FDF8 80251518 000810C2 */ srl $v0, $t0, 3
/* 17FDFC 8025151C 304200FF */ andi $v0, $v0, 0xff
/* 17FE00 80251520 44820000 */ mtc1 $v0, $f0
/* 17FE04 80251524 00000000 */ nop
/* 17FE08 80251528 46800020 */ cvt.s.w $f0, $f0
/* 17FE0C 8025152C 4600320D */ trunc.w.s $f8, $f6
/* 17FE10 80251530 44034000 */ mfc1 $v1, $f8
/* 17FE14 80251534 8E220000 */ lw $v0, ($s1)
/* 17FE18 80251538 C6060060 */ lwc1 $f6, 0x60($s0)
/* 17FE1C 8025153C 4600220D */ trunc.w.s $f8, $f4
/* 17FE20 80251540 44044000 */ mfc1 $a0, $f8
/* 17FE24 80251544 30428000 */ andi $v0, $v0, 0x8000
/* 17FE28 80251548 C6040058 */ lwc1 $f4, 0x58($s0)
/* 17FE2C 8025154C 10400006 */ beqz $v0, .L80251568
/* 17FE30 80251550 46001080 */ add.s $f2, $f2, $f0
/* 17FE34 80251554 00051042 */ srl $v0, $a1, 1
/* 17FE38 80251558 44820000 */ mtc1 $v0, $f0
/* 17FE3C 8025155C 00000000 */ nop
/* 17FE40 80251560 46800020 */ cvt.s.w $f0, $f0
/* 17FE44 80251564 46001081 */ sub.s $f2, $f2, $f0
.L80251568:
/* 17FE48 80251568 44830000 */ mtc1 $v1, $f0
/* 17FE4C 8025156C 00000000 */ nop
/* 17FE50 80251570 46800020 */ cvt.s.w $f0, $f0
/* 17FE54 80251574 E7A00010 */ swc1 $f0, 0x10($sp)
/* 17FE58 80251578 44840000 */ mtc1 $a0, $f0
/* 17FE5C 8025157C 00000000 */ nop
/* 17FE60 80251580 46800020 */ cvt.s.w $f0, $f0
/* 17FE64 80251584 44052000 */ mfc1 $a1, $f4
/* 17FE68 80251588 44061000 */ mfc1 $a2, $f2
/* 17FE6C 8025158C 44073000 */ mfc1 $a3, $f6
/* 17FE70 80251590 0000202D */ daddu $a0, $zero, $zero
/* 17FE74 80251594 0C01C514 */ jal fx_flashing_box_shockwave
/* 17FE78 80251598 E7A00014 */ swc1 $f0, 0x14($sp)
.L8025159C:
/* 17FE7C 8025159C 8E10000C */ lw $s0, 0xc($s0)
/* 17FE80 802515A0 1600FFC0 */ bnez $s0, .L802514A4
/* 17FE84 802515A4 00000000 */ nop
.L802515A8:
/* 17FE88 802515A8 8FBF0028 */ lw $ra, 0x28($sp)
/* 17FE8C 802515AC 8FB30024 */ lw $s3, 0x24($sp)
/* 17FE90 802515B0 8FB20020 */ lw $s2, 0x20($sp)
/* 17FE94 802515B4 8FB1001C */ lw $s1, 0x1c($sp)
/* 17FE98 802515B8 8FB00018 */ lw $s0, 0x18($sp)
/* 17FE9C 802515BC 03E00008 */ jr $ra
/* 17FEA0 802515C0 27BD0030 */ addiu $sp, $sp, 0x30
/* 17FEA4 802515C4 00000000 */ nop
/* 17FEA8 802515C8 00000000 */ nop
/* 17FEAC 802515CC 00000000 */ nop

View File

@ -12,8 +12,8 @@ glabel func_802421E8_E07548
/* E07564 80242204 2631A66C */ addiu $s1, $s1, %lo(gMasterGfxPos)
/* E07568 80242208 AFB3002C */ sw $s3, 0x2c($sp)
/* E0756C 8024220C 24130004 */ addiu $s3, $zero, 4
/* E07570 80242210 3C028025 */ lui $v0, %hi(D_8024B9D0)
/* E07574 80242214 2442B9D0 */ addiu $v0, $v0, %lo(D_8024B9D0)
/* E07570 80242210 3C028025 */ lui $v0, %hi(gFileMenuMessages)
/* E07574 80242214 2442B9D0 */ addiu $v0, $v0, %lo(gFileMenuMessages)
/* E07578 80242218 AFBF0038 */ sw $ra, 0x38($sp)
/* E0757C 8024221C AFB50034 */ sw $s5, 0x34($sp)
/* E07580 80242220 AFB20028 */ sw $s2, 0x28($sp)

View File

@ -4807,7 +4807,7 @@ btl_state_draw_change_partner = 0x80245AC8; // type:func rom:0x1743A8
btl_state_update_player_move = 0x80245AD0; // type:func rom:0x1743B0
btl_state_draw_player_move = 0x80246448; // type:func rom:0x174D28
btl_state_update_end_player_turn = 0x80246450; // type:func rom:0x174D30
filemenu_main_update_code = 0x80246B2C; // type:func rom:0x17540C
btl_state_draw_end_player_turn = 0x80246B2C; // type:func rom:0x17540C
btl_state_update_partner_move = 0x80246B34; // type:func rom:0x175414
btl_state_draw_partner_move = 0x80247214; // type:func rom:0x175AF4
btl_state_update_end_partner_turn = 0x8024721C; // type:func rom:0x175AFC
@ -20231,10 +20231,10 @@ D_8024C068 = 0x8024C068; // type:data
filemenu_iterFileIdx = 0x8024C080; // type:data
D_8024C088 = 0x8024C088; // type:data
D_8024C090 = 0x8024C090; // type:data
D_8024C098 = 0x8024C098; // type:data
filemenu_8024C098 = 0x8024C098; // type:data
D_8024C100 = 0x8024C100; // type:data
D_8024C108 = 0x8024C108; // type:data
D_8024C110 = 0x8024C110; // type:data
filemenu_8024C110 = 0x8024C110; // type:data
D_8024C117 = 0x8024C117; // type:data
D_8024C1D8 = 0x8024C1D8; // type:data
D_8024C5E0 = 0x8024C5E0; // type:data

View File

@ -555,7 +555,6 @@ D_8024BEA0 = 0x8024BEA0;
D_8024C068 = 0x8024C068;
D_8024C088 = 0x8024C088;
D_8024C090 = 0x8024C090;
D_8024C098 = 0x8024C098;
D_8024C108 = 0x8024C108;
D_8024C110 = 0x8024C110;
D_8024C117 = 0x8024C117;