From 8e4df57de795820add83e38f90b69e1bcdde8cb6 Mon Sep 17 00:00:00 2001 From: Ethan Roseman Date: Mon, 19 Apr 2021 02:25:32 +0900 Subject: [PATCH] 25.00% (#268) * 25.00% * remove __naked__ and name printContext->unk_4E8 * change rodata strings to [] --- include/common_structs.h | 4 +- include/functions.h | 1 + include/include_asm.h | 2 +- src/102610_len_2330.c | 2 +- src/104940_len_dc0.c | 21 +++- src/181810.c | 6 +- src/190B20.c | 2 +- src/19FAF0.c | 110 +++++++++++++++--- src/1AC760.c | 66 ++++++++++- src/EA0C10.c | 4 +- src/EB8E50.c | 14 +-- src/f4c60_len_4300.c | 85 +++++++++++++- .../104940_len_dc0/func_802E30C0.s | 66 ----------- .../19FAF0/DispatchDamagePlayerEvent.s | 28 ----- .../nonmatchings/19FAF0/EnablePlayerBlur.s | 31 ----- .../nonmatchings/19FAF0/GetMenuSelection.s | 36 ------ .../19FAF0/dispatch_event_player.s | 41 ------- .../dispatch_event_player_continue_turn.s | 33 ------ .../nonmatchings/f4c60_len_4300/ShowChoice.s | 41 ------- .../f4c60_len_4300/ShowMessageAtScreenPos.s | 56 --------- .../f4c60_len_4300/ShowMessageAtWorldPos.s | 85 -------------- 21 files changed, 275 insertions(+), 459 deletions(-) delete mode 100644 ver/us/asm/nonmatchings/104940_len_dc0/func_802E30C0.s delete mode 100644 ver/us/asm/nonmatchings/19FAF0/DispatchDamagePlayerEvent.s delete mode 100644 ver/us/asm/nonmatchings/19FAF0/EnablePlayerBlur.s delete mode 100644 ver/us/asm/nonmatchings/19FAF0/GetMenuSelection.s delete mode 100644 ver/us/asm/nonmatchings/19FAF0/dispatch_event_player.s delete mode 100644 ver/us/asm/nonmatchings/19FAF0/dispatch_event_player_continue_turn.s delete mode 100644 ver/us/asm/nonmatchings/f4c60_len_4300/ShowChoice.s delete mode 100644 ver/us/asm/nonmatchings/f4c60_len_4300/ShowMessageAtScreenPos.s delete mode 100644 ver/us/asm/nonmatchings/f4c60_len_4300/ShowMessageAtWorldPos.s diff --git a/include/common_structs.h b/include/common_structs.h index 4e007dd57e..148a8bf8ca 100644 --- a/include/common_structs.h +++ b/include/common_structs.h @@ -654,7 +654,7 @@ typedef struct BattleStatus { /* 0x170 */ char unk_170; /* 0x171 */ u8 numEnemyActors; /* 0x172 */ char unk_172[6]; - /* 0x178 */ u8 moveCategory; + /* 0x178 */ s8 moveCategory; /* 0x179 */ char unk_179; /* 0x17A */ s16 selectedItemID; /* 0x17C */ s16 selectedMoveID; @@ -939,7 +939,7 @@ typedef struct PrintContext { /* 0x487 */ u8 unkArraySize; /* 0x488 */ s16 unkArrayunkLength[4]; /* 0x490 */ char unk_490[0x58]; - /* 0x4E8 */ u8 unk_4E8; + /* 0x4E8 */ u8 currentOption; /* 0x4E9 */ char unk_4E9[19]; /* 0x4FC */ s32 stateFlags; /* 0x500 */ char unk_500[9]; diff --git a/include/functions.h b/include/functions.h index 9d51fc2227..794504672c 100644 --- a/include/functions.h +++ b/include/functions.h @@ -41,6 +41,7 @@ Entity* get_entity_by_index(s32 index); s32 create_entity(StaticEntityData*, s32, s32, s32, s32, s32); void func_80070550(s32, f32, f32, f32, f32, f32, s32, s32); void func_802E263C(Entity* entity); +void func_802666E4(Actor* actor, f32 arg1, f32 arg2, f32 arg3, s16); void step_game_loop(void); s32 resume_all_group(s32 groupFlags); diff --git a/include/include_asm.h b/include/include_asm.h index 7c0d4e23f1..1f8357181d 100644 --- a/include/include_asm.h +++ b/include/include_asm.h @@ -8,7 +8,7 @@ #ifndef INCLUDE_ASM #define INCLUDE_ASM(TYPE, FOLDER, NAME, ARGS...) \ TYPE NAME(ARGS); \ - TYPE __attribute__((naked)) NAME(ARGS) { __asm__( ".include \"ver/"STRINGIFY(VERSION)"/asm/nonmatchings/"FOLDER"/"#NAME".s\"\n.set reorder\n.set at"); } + TYPE __attribute__((naked)) NAME(ARGS) { __asm__( ".section .text\n.include \"ver/"STRINGIFY(VERSION)"/asm/nonmatchings/"FOLDER"/"#NAME".s\"\n.set reorder\n.set at"); } #endif __asm__(".include \"include/macro.inc\"\n"); #ifdef MOVE_ADDU diff --git a/src/102610_len_2330.c b/src/102610_len_2330.c index d14388a438..b6a6a17cd7 100644 --- a/src/102610_len_2330.c +++ b/src/102610_len_2330.c @@ -94,7 +94,7 @@ void func_802E1328(Entity* entity) { void func_802E1350(Entity* entity) { s32* temp = &D_802EB390; if (*temp != 0) { - if (D_802EB398->unk_4E8 == 1) { + if (D_802EB398->currentOption == 1) { set_entity_updatecmd(entity, &D_802E99DC); } else { exec_entity_updatecmd(entity); diff --git a/src/104940_len_dc0.c b/src/104940_len_dc0.c index 08b15423ea..7c086095d0 100644 --- a/src/104940_len_dc0.c +++ b/src/104940_len_dc0.c @@ -1,14 +1,28 @@ #include "common.h" -//display list func -INCLUDE_ASM(s32, "104940_len_dc0", func_802E30C0); +void func_802E30C0(s32 entityIndex) { + Gfx* gfx = gMasterGfxPos; + Entity* entity = get_entity_by_index(entityIndex); + + gDPSetTextureLUT(gfx++, G_TT_NONE); + gSPTexture(gfx++, -1, -1, 0, G_TX_RENDERTILE, G_ON); + + if (entity->alpha >= 255) { + gDPSetRenderMode(gfx++, G_RM_AA_ZB_OPA_SURF, G_RM_AA_ZB_OPA_SURF2); + gDPSetCombineMode(gfx++, G_CC_MODULATEIA, G_CC_MODULATEIA); + } else { + gDPSetCombineLERP(gfx++, 0, 0, 0, TEXEL0, PRIMITIVE, 0, TEXEL0, 0, 0, 0, 0, TEXEL0, TEXEL0, 0, PRIMITIVE, 0); + gDPSetPrimColor(gfx++, 0, 0, 0, 0, 0, entity->alpha); + } + + gMasterGfxPos = gfx; +} void func_802E31B0(Entity* entity) { func_80072230(0, entity->position.x, entity->position.y, entity->position.z, 1.0f, 0x3C); } f32 func_802E31EC(Entity* entity) { - if ((get_entity_type(entity->listIndex) - 24) < 3) { entity->scale.y = 0.23f; entity->scale.x = 1.04f; @@ -23,7 +37,6 @@ f32 func_802E31EC(Entity* entity) { } void func_802E328C(Entity* entity) { - if ((get_entity_type(entity->listIndex) - 24) < 3) { entity->scale.x -= 0.09; entity->scale.z -= 0.09; diff --git a/src/181810.c b/src/181810.c index da8ce59dae..ba1a722773 100644 --- a/src/181810.c +++ b/src/181810.c @@ -121,10 +121,10 @@ ApiStatus ShowBattleChoice(ScriptInstance* script, s32 isInitialCall) { } if (script->functionTemp[1].s == 1) { - u8 unk_4E8 = D_8029FA64->unk_4E8; + u8 currentOption = D_8029FA64->currentOption; - gSpeakingActorPrintCtx->unk_4E8 = D_8029FA64->unk_4E8; - script->varTable[0] = unk_4E8; + gSpeakingActorPrintCtx->currentOption = D_8029FA64->currentOption; + script->varTable[0] = currentOption; return ApiStatus_DONE1; } diff --git a/src/190B20.c b/src/190B20.c index 0c87a939cd..a716c9cf8e 100644 --- a/src/190B20.c +++ b/src/190B20.c @@ -1286,7 +1286,7 @@ INCLUDE_ASM(void, "190B20", show_damage_popup, f32 x, f32 y, f32 z, s32 damageAm INCLUDE_ASM(s32, "190B20", func_80266684); -INCLUDE_ASM(s32, "190B20", func_802666E4); +INCLUDE_ASM(void, "190B20", func_802666E4, Actor* actor, f32 arg1, f32 arg2, f32 arg3, s16 arg4); INCLUDE_ASM(s32, "190B20", func_802667F0); diff --git a/src/19FAF0.c b/src/19FAF0.c index 5fca391db1..679ed9d438 100644 --- a/src/19FAF0.c +++ b/src/19FAF0.c @@ -1,5 +1,6 @@ #include "common.h" #include "battle/battle.h" +#include "script_api/battle.h" ApiStatus func_80271210(ScriptInstance* script, s32 isInitialCall) { func_80070AF0(0, script->varTable[0], script->varTable[1], script->varTable[2]); @@ -26,9 +27,52 @@ INCLUDE_ASM(s32, "19FAF0", func_80271484); INCLUDE_ASM(s32, "19FAF0", func_80271588); -INCLUDE_ASM(s32, "19FAF0", dispatch_event_player); +void dispatch_event_player(s32 eventType) { + Actor* player = gBattleStatus.playerActor; + ScriptInstance* oldOnHitScript; + s32 oldOnHitID; + ScriptInstance* eventScript; -INCLUDE_ASM(s32, "19FAF0", dispatch_event_player_continue_turn); + player->lastEventType = eventType; + + oldOnHitScript = player->onHitScript; + oldOnHitID = player->onHitID; + + eventScript = start_script(HandleEvent_Player, 10, 0x20); + player->onHitScript = eventScript; + player->onHitID = eventScript->id; + eventScript->owner1.actor = NULL; + + if (player->takeTurnScript != NULL) { + kill_script_by_ID(player->takeTurnID); + player->takeTurnScript = NULL; + } + + if (oldOnHitScript != NULL) { + kill_script_by_ID(oldOnHitID); + } +} + +void dispatch_event_player_continue_turn(s32 eventType) { + Actor* player = gBattleStatus.playerActor; + ScriptInstance* oldOnHitScript; + s32 oldOnHitID; + ScriptInstance* eventScript; + + player->lastEventType = eventType; + + oldOnHitScript = player->onHitScript; + oldOnHitID = player->onHitID; + + eventScript = start_script(HandleEvent_Player, 10, 0x20); + player->onHitScript = eventScript; + player->onHitID = eventScript->id; + eventScript->owner1.actor = NULL; + + if (oldOnHitScript != NULL) { + kill_script_by_ID(oldOnHitID); + } +} INCLUDE_ASM(s32, "19FAF0", calc_player_test_enemy); @@ -36,44 +80,80 @@ INCLUDE_ASM(s32, "19FAF0", calc_player_damage_enemy); INCLUDE_ASM(s32, "19FAF0", dispatch_damage_event_player); -void dispatch_damage_event_player_0(s32 damageAmount, Event event) { +s32 dispatch_damage_event_player_0(s32 damageAmount, Event event) { BattleStatus* battleStatus = &gBattleStatus; battleStatus->currentAttackElement = ELEMENT_END; battleStatus->unk_19A = 0; - dispatch_damage_event_player(damageAmount, event, FALSE); + return dispatch_damage_event_player(damageAmount, event, FALSE); } void dispatch_damage_event_player_1(s32 damageAmount, Event event) { dispatch_damage_event_player(damageAmount, event, TRUE); } -INCLUDE_ASM(s32, "19FAF0", GetMenuSelection); +ApiStatus GetMenuSelection(ScriptInstance* script, s32 isInitialCall) { + BattleStatus* battleStatus = &gBattleStatus; + Bytecode* args = script->ptrReadPos; + s32 outVar1 = *args++; + s32 outVar2 = *args++; + s32 outVar3 = *args++; + + set_variable(script, outVar1, battleStatus->moveCategory); + set_variable(script, outVar2, battleStatus->selectedItemID); + set_variable(script, outVar3, battleStatus->selectedMoveID); + + return ApiStatus_DONE2; +} INCLUDE_ASM(s32, "19FAF0", func_80273444); -INCLUDE_ASM(s32, "19FAF0", PlayerFallToGoal); +INCLUDE_ASM(s32, "19FAF0", PlayerFallToGoal, ScriptInstance* script, s32 isInitialCall); -INCLUDE_ASM(s32, "19FAF0", PlayerLandJump); +INCLUDE_ASM(s32, "19FAF0", PlayerLandJump, ScriptInstance* script, s32 isInitialCall); -INCLUDE_ASM(s32, "19FAF0", PlayerRunToGoal); +INCLUDE_ASM(s32, "19FAF0", PlayerRunToGoal, ScriptInstance* script, s32 isInitialCall); -INCLUDE_ASM(s32, "19FAF0", CancelablePlayerRunToGoal); +INCLUDE_ASM(s32, "19FAF0", CancelablePlayerRunToGoal, ScriptInstance* script, s32 isInitialCall); ApiStatus GetPlayerHP(ScriptInstance* script, s32 isInitialCall) { set_variable(script, *script->ptrReadPos, gPlayerData.curHP); return ApiStatus_DONE2; } -INCLUDE_ASM(s32, "19FAF0", PlayerDamageEnemy); +INCLUDE_ASM(s32, "19FAF0", PlayerDamageEnemy, ScriptInstance* script, s32 isInitialCall); -INCLUDE_ASM(s32, "19FAF0", PlayerPowerBounceEnemy); +INCLUDE_ASM(s32, "19FAF0", PlayerPowerBounceEnemy, ScriptInstance* script, s32 isInitialCall); -INCLUDE_ASM(s32, "19FAF0", PlayerTestEnemy); +INCLUDE_ASM(s32, "19FAF0", PlayerTestEnemy, ScriptInstance* script, s32 isInitialCall); -INCLUDE_ASM(s32, "19FAF0", DispatchDamagePlayerEvent); +ApiStatus DispatchDamagePlayerEvent(ScriptInstance* script, s32 isInitialCall) { + Bytecode* args = script->ptrReadPos; -INCLUDE_ASM(s32, "19FAF0", EnablePlayerBlur); + if (dispatch_damage_event_player_0(get_variable(script, *args++), *args++) < 0) { + return ApiStatus_BLOCK; + } + + if (does_script_exist_by_ref(script)) { + return ApiStatus_DONE2; + } + + return ApiStatus_BLOCK; +} + +ApiStatus EnablePlayerBlur(ScriptInstance* script, s32 isInitialCall) { + s32 setting = get_variable(script, *script->ptrReadPos); + + if (setting == 0) { + disable_player_blur(); + } else if (setting == 1) { + enable_player_blur(); + } else { + func_80254950(); + } + + return ApiStatus_DONE2; +} ApiStatus func_802749D8(ScriptInstance* script, s32 isInitialCall) { func_802549A0(); @@ -91,7 +171,7 @@ INCLUDE_ASM(s32, "19FAF0", func_802752AC); INCLUDE_ASM(s32, "19FAF0", func_80275F00); -INCLUDE_ASM(s32, "19FAF0", DidActionSucceed); +INCLUDE_ASM(s32, "19FAF0", DidActionSucceed, ScriptInstance* script, s32 isInitialCall); ApiStatus func_80276EFC(ScriptInstance* script, s32 isInitialCall) { gBattleStatus.flags1 |= 0x200000; diff --git a/src/1AC760.c b/src/1AC760.c index 6219daf011..53759ce31d 100644 --- a/src/1AC760.c +++ b/src/1AC760.c @@ -1,7 +1,7 @@ #include "common.h" #include "battle/battle.h" -void dispatch_event_partner(s8 lastEventType) { +void dispatch_event_partner(s32 lastEventType) { BattleStatus* battleStatus = &gBattleStatus; Actor* partnerActor = battleStatus->partnerActor; ScriptInstance* onHitScript = partnerActor->onHitScript; @@ -46,7 +46,71 @@ INCLUDE_ASM(s32, "1AC760", calc_partner_test_enemy); INCLUDE_ASM(s32, "1AC760", calc_partner_damage_enemy); +//Some slight stack / ordering issues at the beginning +#ifdef NON_MATCHING +s32 dispatch_damage_event_partner(s32 damageAmount, s32 event, s32 stopMotion) { + BattleStatus* battleStatus = &gBattleStatus; + Actor* partner = battleStatus->partnerActor; + ActorMovement* walkMovement = &partner->walk; + s32 flagCheck; + s32 temp_a1; + + damageAmount = (s16)damageAmount; + battleStatus->currentAttackDamage = damageAmount; + partner->currentHP = 127; + temp_a1 = (s16)(partner->hpChangeCounter + damageAmount); + partner->hpChangeCounter += damageAmount; + partner->hpChangeCounter -= temp_a1; + partner->damageCounter += temp_a1; + battleStatus->lastAttackDamage = 0; + partner->currentHP -= temp_a1; + + if (partner->currentHP <= 0) { + battleStatus->lastAttackDamage += partner->currentHP; + partner->currentHP = 0; + event = 0x20; + } + + battleStatus->lastAttackDamage += temp_a1; + partner->lastDamageTaken = battleStatus->lastAttackDamage; + battleStatus->unk_19A = 0; + + if (battleStatus->flags1 & 0x20) { + if (event == 0x9) { + event = 0xA; + } + if (event == 0x17) { + event = 0x19; + } + } + + if (battleStatus->lastAttackDamage > 0) { + BattleStatus* battleStatus2 = &gBattleStatus; // TODO macro for setting flags of battleStatus + battleStatus2->flags1 |= 0x20; + + inflict_status(partner, 0xD, battleStatus->lastAttackDamage); + } + + if (stopMotion == 0) { + set_goal_pos_to_part(walkMovement, 0x100, 0); + } + + show_damage_popup(walkMovement->goalPos.x, walkMovement->goalPos.y, walkMovement->goalPos.z, battleStatus->lastAttackDamage, 1); + func_802666E4(partner, walkMovement->goalPos.x, walkMovement->goalPos.y, walkMovement->goalPos.z, battleStatus->lastAttackDamage); + + if (battleStatus->lastAttackDamage > 0) { + func_80267018(partner, 1); + } + + partner->flags |= 0x80000; + + flagCheck = (gBattleStatus.flags1 & 0x240) != 0; + dispatch_event_partner(event); + return flagCheck; +} +#else INCLUDE_ASM(s32, "1AC760", dispatch_damage_event_partner); +#endif s32 dispatch_damage_event_partner_0(s32 damageAmount, s32 event, s32 stopMotion) { return dispatch_damage_event_partner(damageAmount, event, FALSE); diff --git a/src/EA0C10.c b/src/EA0C10.c index fb2850b686..626a9b9533 100644 --- a/src/EA0C10.c +++ b/src/EA0C10.c @@ -1,7 +1,7 @@ #include "common.h" -const char* ascii_EA6D70 = "kzn_11"; -const char* ascii_EA6D78 = "kzn_18"; +const char ascii_EA6D70[] = "kzn_11"; +const char ascii_EA6D78[] = "kzn_18"; INCLUDE_ASM(s32, "EA0C10", func_80240310_EA0C10); diff --git a/src/EB8E50.c b/src/EB8E50.c index 93eba41201..93d89d22b5 100644 --- a/src/EB8E50.c +++ b/src/EB8E50.c @@ -1,12 +1,12 @@ #include "common.h" -const char* ascii_EC2000 = "mac_01"; -const char* ascii_EC2008 = "flo_14"; -const char* ascii_EC2010 = "flo_23"; -const char* ascii_EC2018 = "flo_25"; -const char* ascii_EC2020 = "flo_16"; -const char* ascii_EC2028 = "flo_09"; -const char* ascii_EC2030 = "flo_08"; +const char ascii_EC2000[] = "mac_01"; +const char ascii_EC2008[] = "flo_14"; +const char ascii_EC2010[] = "flo_23"; +const char ascii_EC2018[] = "flo_25"; +const char ascii_EC2020[] = "flo_16"; +const char ascii_EC2028[] = "flo_09"; +const char ascii_EC2030[] = "flo_08"; static const f64 rodata_alignment = 0.0; INCLUDE_ASM(s32, "EB8E50", func_80240000_EB8E50); diff --git a/src/f4c60_len_4300.c b/src/f4c60_len_4300.c index 4cd65c4432..0eac2245c0 100644 --- a/src/f4c60_len_4300.c +++ b/src/f4c60_len_4300.c @@ -20,9 +20,65 @@ ApiStatus SpeakToNpc(ScriptInstance* script, s32 isInitialCall) { INCLUDE_ASM(ApiStatus, "f4c60_len_4300", _show_message, ScriptInstance* script, s32 isInitialCall, s32 arg2); -INCLUDE_ASM(s32, "f4c60_len_4300", ShowMessageAtScreenPos, ScriptInstance* script, s32 isInitialCall); +ApiStatus ShowMessageAtScreenPos(ScriptInstance *script, s32 isInitialCall) { + Bytecode* args = script->ptrReadPos; -INCLUDE_ASM(s32, "f4c60_len_4300", ShowMessageAtWorldPos, ScriptInstance* script, s32 isInitialCall); + if (isInitialCall) { + s32 stringID = get_variable(script, *args++); + s32 x = get_variable(script, *args++); + s32 y = get_variable(script, *args++); + s32* temp802DB264 = &D_802DB264; + + *temp802DB264 = 0; + gCurrentPrintContext = load_string(stringID, temp802DB264); + clamp_printer_coords(gCurrentPrintContext, x, y); + } + + if (gCurrentPrintContext->stateFlags & 0x40) { + return ApiStatus_DONE1; + } + + if (D_802DB264 != 1) { + return ApiStatus_BLOCK; + } + + script->varTable[0] = gCurrentPrintContext->currentOption; + return ApiStatus_DONE1; +} + +ApiStatus ShowMessageAtWorldPos(ScriptInstance *script, s32 isInitialCall) { + Bytecode* args = script->ptrReadPos; + PrintContext** currentPrintContext; + s32* currentCameraID = &gCurrentCameraID; + + if (isInitialCall) { + s32 stringID = get_variable(script, *args++); + s32 x = get_variable(script, *args++); + s32 y = get_variable(script, *args++); + s32 z = get_variable(script, *args++); + s32 x2; + s32 y2; + s32 z2; + s32* temp802DB264 = &D_802DB264; + + *temp802DB264 = 0; + currentPrintContext = &gCurrentPrintContext; + *currentPrintContext = load_string(stringID, temp802DB264); + get_screen_coords(*currentCameraID, x, y, z, &x2, &y2, &z2); + clamp_printer_coords(*currentPrintContext, x2, y2); + } + + if (gCurrentPrintContext->stateFlags & 0x40) { + return ApiStatus_DONE1; + } + + if (D_802DB264 != 1) { + return ApiStatus_BLOCK; + } + + script->varTable[0] = gCurrentPrintContext->currentOption; + return ApiStatus_DONE1; +} ApiStatus CloseMessage(ScriptInstance* script, s32 isInitialCall) { if (isInitialCall) { @@ -34,7 +90,7 @@ ApiStatus CloseMessage(ScriptInstance* script, s32 isInitialCall) { } else if (D_802DB264 != 1) { return ApiStatus_BLOCK; } else { - script->varTable[0] = gCurrentPrintContext->unk_4E8; + script->varTable[0] = gCurrentPrintContext->currentOption; return ApiStatus_DONE1; } } @@ -51,12 +107,31 @@ ApiStatus SwitchMessage(ScriptInstance* script, s32 isInitialCall) { } else if (D_802DB264 != 1) { return ApiStatus_BLOCK; } else { - script->varTable[0] = gCurrentPrintContext->unk_4E8; + script->varTable[0] = gCurrentPrintContext->currentOption; return ApiStatus_DONE1; } } -INCLUDE_ASM(s32, "f4c60_len_4300", ShowChoice, ScriptInstance* script, s32 isInitialCall); +ApiStatus ShowChoice(ScriptInstance *script, s32 isInitialCall) { + Bytecode* args = script->ptrReadPos; + PrintContext** temp802DB268; + + if (isInitialCall) { + s32 stringID = get_variable(script, *args++); + + script->functionTemp[1].s = 0; + D_802DB268 = load_string(stringID, &script->functionTemp[1]); + } + + temp802DB268 = &D_802DB268; + script->varTable[0] = gCurrentPrintContext->currentOption = (*temp802DB268)->currentOption; + + if ((*temp802DB268)->stateFlags & 0x40) { + return ApiStatus_DONE1; + } + + return script->functionTemp[1].s == 1; +} ApiStatus CloseChoice(ScriptInstance* script, s32 isInitialCall) { close_message(D_802DB268); diff --git a/ver/us/asm/nonmatchings/104940_len_dc0/func_802E30C0.s b/ver/us/asm/nonmatchings/104940_len_dc0/func_802E30C0.s deleted file mode 100644 index b278b9f0b3..0000000000 --- a/ver/us/asm/nonmatchings/104940_len_dc0/func_802E30C0.s +++ /dev/null @@ -1,66 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_802E30C0 -/* 104940 802E30C0 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* 104944 802E30C4 AFB00010 */ sw $s0, 0x10($sp) -/* 104948 802E30C8 3C10800A */ lui $s0, %hi(gMasterGfxPos) -/* 10494C 802E30CC 8E10A66C */ lw $s0, %lo(gMasterGfxPos)($s0) -/* 104950 802E30D0 AFBF0014 */ sw $ra, 0x14($sp) -/* 104954 802E30D4 0C04417A */ jal get_entity_by_index -/* 104958 802E30D8 00000000 */ nop -/* 10495C 802E30DC 3C04E300 */ lui $a0, 0xe300 -/* 104960 802E30E0 34841001 */ ori $a0, $a0, 0x1001 -/* 104964 802E30E4 3C05D700 */ lui $a1, 0xd700 -/* 104968 802E30E8 34A50002 */ ori $a1, $a1, 2 -/* 10496C 802E30EC 0200182D */ daddu $v1, $s0, $zero -/* 104970 802E30F0 26100008 */ addiu $s0, $s0, 8 -/* 104974 802E30F4 AC640000 */ sw $a0, ($v1) -/* 104978 802E30F8 0200202D */ daddu $a0, $s0, $zero -/* 10497C 802E30FC AC600004 */ sw $zero, 4($v1) -/* 104980 802E3100 2403FFFF */ addiu $v1, $zero, -1 -/* 104984 802E3104 AC850000 */ sw $a1, ($a0) -/* 104988 802E3108 0040282D */ daddu $a1, $v0, $zero -/* 10498C 802E310C AC830004 */ sw $v1, 4($a0) -/* 104990 802E3110 90A2000B */ lbu $v0, 0xb($a1) -/* 104994 802E3114 2C4200FF */ sltiu $v0, $v0, 0xff -/* 104998 802E3118 14400011 */ bnez $v0, .L802E3160 -/* 10499C 802E311C 26100008 */ addiu $s0, $s0, 8 -/* 1049A0 802E3120 0200282D */ daddu $a1, $s0, $zero -/* 1049A4 802E3124 26100008 */ addiu $s0, $s0, 8 -/* 1049A8 802E3128 3C07E200 */ lui $a3, 0xe200 -/* 1049AC 802E312C 34E7001C */ ori $a3, $a3, 0x1c -/* 1049B0 802E3130 3C060055 */ lui $a2, 0x55 -/* 1049B4 802E3134 34C62078 */ ori $a2, $a2, 0x2078 -/* 1049B8 802E3138 0200182D */ daddu $v1, $s0, $zero -/* 1049BC 802E313C 26100008 */ addiu $s0, $s0, 8 -/* 1049C0 802E3140 3C04FC12 */ lui $a0, 0xfc12 -/* 1049C4 802E3144 34841824 */ ori $a0, $a0, 0x1824 -/* 1049C8 802E3148 3C02FF33 */ lui $v0, 0xff33 -/* 1049CC 802E314C 3442FFFF */ ori $v0, $v0, 0xffff -/* 1049D0 802E3150 ACA70000 */ sw $a3, ($a1) -/* 1049D4 802E3154 ACA60004 */ sw $a2, 4($a1) -/* 1049D8 802E3158 080B8C65 */ j .L802E3194 -/* 1049DC 802E315C AC640000 */ sw $a0, ($v1) -.L802E3160: -/* 1049E0 802E3160 0200202D */ daddu $a0, $s0, $zero -/* 1049E4 802E3164 26100008 */ addiu $s0, $s0, 8 -/* 1049E8 802E3168 3C03FCFF */ lui $v1, 0xfcff -/* 1049EC 802E316C 3463B3FF */ ori $v1, $v1, 0xb3ff -/* 1049F0 802E3170 3C02FF2C */ lui $v0, 0xff2c -/* 1049F4 802E3174 3442FE7F */ ori $v0, $v0, 0xfe7f -/* 1049F8 802E3178 AC830000 */ sw $v1, ($a0) -/* 1049FC 802E317C 0200182D */ daddu $v1, $s0, $zero -/* 104A00 802E3180 AC820004 */ sw $v0, 4($a0) -/* 104A04 802E3184 3C02FA00 */ lui $v0, 0xfa00 -/* 104A08 802E3188 AC620000 */ sw $v0, ($v1) -/* 104A0C 802E318C 90A2000B */ lbu $v0, 0xb($a1) -/* 104A10 802E3190 26100008 */ addiu $s0, $s0, 8 -.L802E3194: -/* 104A14 802E3194 AC620004 */ sw $v0, 4($v1) -/* 104A18 802E3198 8FBF0014 */ lw $ra, 0x14($sp) -/* 104A1C 802E319C 3C01800A */ lui $at, %hi(gMasterGfxPos) -/* 104A20 802E31A0 AC30A66C */ sw $s0, %lo(gMasterGfxPos)($at) -/* 104A24 802E31A4 8FB00010 */ lw $s0, 0x10($sp) -/* 104A28 802E31A8 03E00008 */ jr $ra -/* 104A2C 802E31AC 27BD0018 */ addiu $sp, $sp, 0x18 diff --git a/ver/us/asm/nonmatchings/19FAF0/DispatchDamagePlayerEvent.s b/ver/us/asm/nonmatchings/19FAF0/DispatchDamagePlayerEvent.s deleted file mode 100644 index 2bea07d889..0000000000 --- a/ver/us/asm/nonmatchings/19FAF0/DispatchDamagePlayerEvent.s +++ /dev/null @@ -1,28 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel DispatchDamagePlayerEvent -/* 1A31FC 8027491C 27BDFFE0 */ addiu $sp, $sp, -0x20 -/* 1A3200 80274920 AFB10014 */ sw $s1, 0x14($sp) -/* 1A3204 80274924 0080882D */ daddu $s1, $a0, $zero -/* 1A3208 80274928 AFBF0018 */ sw $ra, 0x18($sp) -/* 1A320C 8027492C AFB00010 */ sw $s0, 0x10($sp) -/* 1A3210 80274930 8E30000C */ lw $s0, 0xc($s1) -/* 1A3214 80274934 8E050000 */ lw $a1, ($s0) -/* 1A3218 80274938 0C0B1EAF */ jal get_variable -/* 1A321C 8027493C 26100004 */ addiu $s0, $s0, 4 -/* 1A3220 80274940 8E050000 */ lw $a1, ($s0) -/* 1A3224 80274944 0C09CCDF */ jal dispatch_damage_event_player_0 -/* 1A3228 80274948 0040202D */ daddu $a0, $v0, $zero -/* 1A322C 8027494C 04420005 */ bltzl $v0, .L80274964 -/* 1A3230 80274950 0000102D */ daddu $v0, $zero, $zero -/* 1A3234 80274954 0C0B1069 */ jal does_script_exist_by_ref -/* 1A3238 80274958 0220202D */ daddu $a0, $s1, $zero -/* 1A323C 8027495C 0002102B */ sltu $v0, $zero, $v0 -/* 1A3240 80274960 00021040 */ sll $v0, $v0, 1 -.L80274964: -/* 1A3244 80274964 8FBF0018 */ lw $ra, 0x18($sp) -/* 1A3248 80274968 8FB10014 */ lw $s1, 0x14($sp) -/* 1A324C 8027496C 8FB00010 */ lw $s0, 0x10($sp) -/* 1A3250 80274970 03E00008 */ jr $ra -/* 1A3254 80274974 27BD0020 */ addiu $sp, $sp, 0x20 diff --git a/ver/us/asm/nonmatchings/19FAF0/EnablePlayerBlur.s b/ver/us/asm/nonmatchings/19FAF0/EnablePlayerBlur.s deleted file mode 100644 index 313ba7fc13..0000000000 --- a/ver/us/asm/nonmatchings/19FAF0/EnablePlayerBlur.s +++ /dev/null @@ -1,31 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel EnablePlayerBlur -/* 1A3258 80274978 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* 1A325C 8027497C AFBF0010 */ sw $ra, 0x10($sp) -/* 1A3260 80274980 8C82000C */ lw $v0, 0xc($a0) -/* 1A3264 80274984 0C0B1EAF */ jal get_variable -/* 1A3268 80274988 8C450000 */ lw $a1, ($v0) -/* 1A326C 8027498C 0040182D */ daddu $v1, $v0, $zero -/* 1A3270 80274990 14600005 */ bnez $v1, .L802749A8 -/* 1A3274 80274994 24020001 */ addiu $v0, $zero, 1 -/* 1A3278 80274998 0C095245 */ jal disable_player_blur -/* 1A327C 8027499C 00000000 */ nop -/* 1A3280 802749A0 0809D272 */ j .L802749C8 -/* 1A3284 802749A4 00000000 */ nop -.L802749A8: -/* 1A3288 802749A8 14620005 */ bne $v1, $v0, .L802749C0 -/* 1A328C 802749AC 00000000 */ nop -/* 1A3290 802749B0 0C0951B5 */ jal enable_player_blur -/* 1A3294 802749B4 00000000 */ nop -/* 1A3298 802749B8 0809D272 */ j .L802749C8 -/* 1A329C 802749BC 00000000 */ nop -.L802749C0: -/* 1A32A0 802749C0 0C095254 */ jal func_80254950 -/* 1A32A4 802749C4 00000000 */ nop -.L802749C8: -/* 1A32A8 802749C8 8FBF0010 */ lw $ra, 0x10($sp) -/* 1A32AC 802749CC 24020002 */ addiu $v0, $zero, 2 -/* 1A32B0 802749D0 03E00008 */ jr $ra -/* 1A32B4 802749D4 27BD0018 */ addiu $sp, $sp, 0x18 diff --git a/ver/us/asm/nonmatchings/19FAF0/GetMenuSelection.s b/ver/us/asm/nonmatchings/19FAF0/GetMenuSelection.s deleted file mode 100644 index d9a43acc30..0000000000 --- a/ver/us/asm/nonmatchings/19FAF0/GetMenuSelection.s +++ /dev/null @@ -1,36 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel GetMenuSelection -/* 1A1CA4 802733C4 27BDFFD8 */ addiu $sp, $sp, -0x28 -/* 1A1CA8 802733C8 AFB00010 */ sw $s0, 0x10($sp) -/* 1A1CAC 802733CC 0080802D */ daddu $s0, $a0, $zero -/* 1A1CB0 802733D0 AFB10014 */ sw $s1, 0x14($sp) -/* 1A1CB4 802733D4 3C11800E */ lui $s1, %hi(gBattleStatus) -/* 1A1CB8 802733D8 2631C070 */ addiu $s1, $s1, %lo(gBattleStatus) -/* 1A1CBC 802733DC AFBF0020 */ sw $ra, 0x20($sp) -/* 1A1CC0 802733E0 AFB3001C */ sw $s3, 0x1c($sp) -/* 1A1CC4 802733E4 AFB20018 */ sw $s2, 0x18($sp) -/* 1A1CC8 802733E8 8E02000C */ lw $v0, 0xc($s0) -/* 1A1CCC 802733EC 82260178 */ lb $a2, 0x178($s1) -/* 1A1CD0 802733F0 8C450000 */ lw $a1, ($v0) -/* 1A1CD4 802733F4 24420004 */ addiu $v0, $v0, 4 -/* 1A1CD8 802733F8 8C520000 */ lw $s2, ($v0) -/* 1A1CDC 802733FC 0C0B2026 */ jal set_variable -/* 1A1CE0 80273400 8C530004 */ lw $s3, 4($v0) -/* 1A1CE4 80273404 0200202D */ daddu $a0, $s0, $zero -/* 1A1CE8 80273408 8626017A */ lh $a2, 0x17a($s1) -/* 1A1CEC 8027340C 0C0B2026 */ jal set_variable -/* 1A1CF0 80273410 0240282D */ daddu $a1, $s2, $zero -/* 1A1CF4 80273414 0200202D */ daddu $a0, $s0, $zero -/* 1A1CF8 80273418 8626017C */ lh $a2, 0x17c($s1) -/* 1A1CFC 8027341C 0C0B2026 */ jal set_variable -/* 1A1D00 80273420 0260282D */ daddu $a1, $s3, $zero -/* 1A1D04 80273424 8FBF0020 */ lw $ra, 0x20($sp) -/* 1A1D08 80273428 8FB3001C */ lw $s3, 0x1c($sp) -/* 1A1D0C 8027342C 8FB20018 */ lw $s2, 0x18($sp) -/* 1A1D10 80273430 8FB10014 */ lw $s1, 0x14($sp) -/* 1A1D14 80273434 8FB00010 */ lw $s0, 0x10($sp) -/* 1A1D18 80273438 24020002 */ addiu $v0, $zero, 2 -/* 1A1D1C 8027343C 03E00008 */ jr $ra -/* 1A1D20 80273440 27BD0028 */ addiu $sp, $sp, 0x28 diff --git a/ver/us/asm/nonmatchings/19FAF0/dispatch_event_player.s b/ver/us/asm/nonmatchings/19FAF0/dispatch_event_player.s deleted file mode 100644 index 22e6468c67..0000000000 --- a/ver/us/asm/nonmatchings/19FAF0/dispatch_event_player.s +++ /dev/null @@ -1,41 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel dispatch_event_player -/* 19FF38 80271658 27BDFFE0 */ addiu $sp, $sp, -0x20 -/* 19FF3C 8027165C 2405000A */ addiu $a1, $zero, 0xa -/* 19FF40 80271660 AFB00010 */ sw $s0, 0x10($sp) -/* 19FF44 80271664 3C10800E */ lui $s0, %hi(gBattleStatus+0xD8) -/* 19FF48 80271668 8E10C148 */ lw $s0, %lo(gBattleStatus+0xD8)($s0) -/* 19FF4C 8027166C AFBF001C */ sw $ra, 0x1c($sp) -/* 19FF50 80271670 AFB20018 */ sw $s2, 0x18($sp) -/* 19FF54 80271674 AFB10014 */ sw $s1, 0x14($sp) -/* 19FF58 80271678 A20401F0 */ sb $a0, 0x1f0($s0) -/* 19FF5C 8027167C 3C048028 */ lui $a0, %hi(HandleEvent_Player) -/* 19FF60 80271680 248452D4 */ addiu $a0, $a0, %lo(HandleEvent_Player) -/* 19FF64 80271684 8E1101D8 */ lw $s1, 0x1d8($s0) -/* 19FF68 80271688 8E1201E8 */ lw $s2, 0x1e8($s0) -/* 19FF6C 8027168C 0C0B0CF8 */ jal start_script -/* 19FF70 80271690 24060020 */ addiu $a2, $zero, 0x20 -/* 19FF74 80271694 AE0201D8 */ sw $v0, 0x1d8($s0) -/* 19FF78 80271698 8C430144 */ lw $v1, 0x144($v0) -/* 19FF7C 8027169C AE0301E8 */ sw $v1, 0x1e8($s0) -/* 19FF80 802716A0 AC400148 */ sw $zero, 0x148($v0) -/* 19FF84 802716A4 8E0201D4 */ lw $v0, 0x1d4($s0) -/* 19FF88 802716A8 10400004 */ beqz $v0, .L802716BC -/* 19FF8C 802716AC 00000000 */ nop -/* 19FF90 802716B0 0C0B102B */ jal kill_script_by_ID -/* 19FF94 802716B4 8E0401E4 */ lw $a0, 0x1e4($s0) -/* 19FF98 802716B8 AE0001D4 */ sw $zero, 0x1d4($s0) -.L802716BC: -/* 19FF9C 802716BC 12200003 */ beqz $s1, .L802716CC -/* 19FFA0 802716C0 00000000 */ nop -/* 19FFA4 802716C4 0C0B102B */ jal kill_script_by_ID -/* 19FFA8 802716C8 0240202D */ daddu $a0, $s2, $zero -.L802716CC: -/* 19FFAC 802716CC 8FBF001C */ lw $ra, 0x1c($sp) -/* 19FFB0 802716D0 8FB20018 */ lw $s2, 0x18($sp) -/* 19FFB4 802716D4 8FB10014 */ lw $s1, 0x14($sp) -/* 19FFB8 802716D8 8FB00010 */ lw $s0, 0x10($sp) -/* 19FFBC 802716DC 03E00008 */ jr $ra -/* 19FFC0 802716E0 27BD0020 */ addiu $sp, $sp, 0x20 diff --git a/ver/us/asm/nonmatchings/19FAF0/dispatch_event_player_continue_turn.s b/ver/us/asm/nonmatchings/19FAF0/dispatch_event_player_continue_turn.s deleted file mode 100644 index d74d48fa64..0000000000 --- a/ver/us/asm/nonmatchings/19FAF0/dispatch_event_player_continue_turn.s +++ /dev/null @@ -1,33 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel dispatch_event_player_continue_turn -/* 19FFC4 802716E4 27BDFFE0 */ addiu $sp, $sp, -0x20 -/* 19FFC8 802716E8 2405000A */ addiu $a1, $zero, 0xa -/* 19FFCC 802716EC AFB00010 */ sw $s0, 0x10($sp) -/* 19FFD0 802716F0 3C10800E */ lui $s0, %hi(gBattleStatus+0xD8) -/* 19FFD4 802716F4 8E10C148 */ lw $s0, %lo(gBattleStatus+0xD8)($s0) -/* 19FFD8 802716F8 AFBF001C */ sw $ra, 0x1c($sp) -/* 19FFDC 802716FC AFB20018 */ sw $s2, 0x18($sp) -/* 19FFE0 80271700 AFB10014 */ sw $s1, 0x14($sp) -/* 19FFE4 80271704 A20401F0 */ sb $a0, 0x1f0($s0) -/* 19FFE8 80271708 3C048028 */ lui $a0, %hi(HandleEvent_Player) -/* 19FFEC 8027170C 248452D4 */ addiu $a0, $a0, %lo(HandleEvent_Player) -/* 19FFF0 80271710 8E1101D8 */ lw $s1, 0x1d8($s0) -/* 19FFF4 80271714 8E1201E8 */ lw $s2, 0x1e8($s0) -/* 19FFF8 80271718 0C0B0CF8 */ jal start_script -/* 19FFFC 8027171C 24060020 */ addiu $a2, $zero, 0x20 -/* 1A0000 80271720 AE0201D8 */ sw $v0, 0x1d8($s0) -/* 1A0004 80271724 8C430144 */ lw $v1, 0x144($v0) -/* 1A0008 80271728 AE0301E8 */ sw $v1, 0x1e8($s0) -/* 1A000C 8027172C 12200003 */ beqz $s1, .L8027173C -/* 1A0010 80271730 AC400148 */ sw $zero, 0x148($v0) -/* 1A0014 80271734 0C0B102B */ jal kill_script_by_ID -/* 1A0018 80271738 0240202D */ daddu $a0, $s2, $zero -.L8027173C: -/* 1A001C 8027173C 8FBF001C */ lw $ra, 0x1c($sp) -/* 1A0020 80271740 8FB20018 */ lw $s2, 0x18($sp) -/* 1A0024 80271744 8FB10014 */ lw $s1, 0x14($sp) -/* 1A0028 80271748 8FB00010 */ lw $s0, 0x10($sp) -/* 1A002C 8027174C 03E00008 */ jr $ra -/* 1A0030 80271750 27BD0020 */ addiu $sp, $sp, 0x20 diff --git a/ver/us/asm/nonmatchings/f4c60_len_4300/ShowChoice.s b/ver/us/asm/nonmatchings/f4c60_len_4300/ShowChoice.s deleted file mode 100644 index 9fe9ddfa1f..0000000000 --- a/ver/us/asm/nonmatchings/f4c60_len_4300/ShowChoice.s +++ /dev/null @@ -1,41 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel ShowChoice -/* F551C 802D0B6C 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* F5520 802D0B70 AFB00010 */ sw $s0, 0x10($sp) -/* F5524 802D0B74 0080802D */ daddu $s0, $a0, $zero -/* F5528 802D0B78 AFBF0014 */ sw $ra, 0x14($sp) -/* F552C 802D0B7C 10A00009 */ beqz $a1, .L802D0BA4 -/* F5530 802D0B80 8E02000C */ lw $v0, 0xc($s0) -/* F5534 802D0B84 0C0B1EAF */ jal get_variable -/* F5538 802D0B88 8C450000 */ lw $a1, ($v0) -/* F553C 802D0B8C 0040202D */ daddu $a0, $v0, $zero -/* F5540 802D0B90 26050074 */ addiu $a1, $s0, 0x74 -/* F5544 802D0B94 0C049640 */ jal load_string -/* F5548 802D0B98 AE000074 */ sw $zero, 0x74($s0) -/* F554C 802D0B9C 3C01802E */ lui $at, %hi(D_802DB268) -/* F5550 802D0BA0 AC22B268 */ sw $v0, %lo(D_802DB268)($at) -.L802D0BA4: -/* F5554 802D0BA4 3C04802E */ lui $a0, %hi(D_802DB268) -/* F5558 802D0BA8 2484B268 */ addiu $a0, $a0, %lo(D_802DB268) -/* F555C 802D0BAC 8C820000 */ lw $v0, ($a0) -/* F5560 802D0BB0 3C03802E */ lui $v1, %hi(gCurrentPrintContext) -/* F5564 802D0BB4 8C63B260 */ lw $v1, %lo(gCurrentPrintContext)($v1) -/* F5568 802D0BB8 904204E8 */ lbu $v0, 0x4e8($v0) -/* F556C 802D0BBC A06204E8 */ sb $v0, 0x4e8($v1) -/* F5570 802D0BC0 8C830000 */ lw $v1, ($a0) -/* F5574 802D0BC4 304200FF */ andi $v0, $v0, 0xff -/* F5578 802D0BC8 AE020084 */ sw $v0, 0x84($s0) -/* F557C 802D0BCC 8C6204FC */ lw $v0, 0x4fc($v1) -/* F5580 802D0BD0 30420040 */ andi $v0, $v0, 0x40 -/* F5584 802D0BD4 54400004 */ bnel $v0, $zero, .L802D0BE8 -/* F5588 802D0BD8 24020001 */ addiu $v0, $zero, 1 -/* F558C 802D0BDC 8E020074 */ lw $v0, 0x74($s0) -/* F5590 802D0BE0 38420001 */ xori $v0, $v0, 1 -/* F5594 802D0BE4 2C420001 */ sltiu $v0, $v0, 1 -.L802D0BE8: -/* F5598 802D0BE8 8FBF0014 */ lw $ra, 0x14($sp) -/* F559C 802D0BEC 8FB00010 */ lw $s0, 0x10($sp) -/* F55A0 802D0BF0 03E00008 */ jr $ra -/* F55A4 802D0BF4 27BD0018 */ addiu $sp, $sp, 0x18 diff --git a/ver/us/asm/nonmatchings/f4c60_len_4300/ShowMessageAtScreenPos.s b/ver/us/asm/nonmatchings/f4c60_len_4300/ShowMessageAtScreenPos.s deleted file mode 100644 index f68e150cf0..0000000000 --- a/ver/us/asm/nonmatchings/f4c60_len_4300/ShowMessageAtScreenPos.s +++ /dev/null @@ -1,56 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel ShowMessageAtScreenPos -/* F5244 802D0894 27BDFFE0 */ addiu $sp, $sp, -0x20 -/* F5248 802D0898 AFB20018 */ sw $s2, 0x18($sp) -/* F524C 802D089C 0080902D */ daddu $s2, $a0, $zero -/* F5250 802D08A0 AFBF001C */ sw $ra, 0x1c($sp) -/* F5254 802D08A4 AFB10014 */ sw $s1, 0x14($sp) -/* F5258 802D08A8 AFB00010 */ sw $s0, 0x10($sp) -/* F525C 802D08AC 10A00019 */ beqz $a1, .L802D0914 -/* F5260 802D08B0 8E51000C */ lw $s1, 0xc($s2) -/* F5264 802D08B4 8E250000 */ lw $a1, ($s1) -/* F5268 802D08B8 0C0B1EAF */ jal get_variable -/* F526C 802D08BC 26310004 */ addiu $s1, $s1, 4 -/* F5270 802D08C0 8E250000 */ lw $a1, ($s1) -/* F5274 802D08C4 26310004 */ addiu $s1, $s1, 4 -/* F5278 802D08C8 0240202D */ daddu $a0, $s2, $zero -/* F527C 802D08CC 0C0B1EAF */ jal get_variable -/* F5280 802D08D0 0040802D */ daddu $s0, $v0, $zero -/* F5284 802D08D4 0240202D */ daddu $a0, $s2, $zero -/* F5288 802D08D8 8E250000 */ lw $a1, ($s1) -/* F528C 802D08DC 0C0B1EAF */ jal get_variable -/* F5290 802D08E0 0040882D */ daddu $s1, $v0, $zero -/* F5294 802D08E4 0200202D */ daddu $a0, $s0, $zero -/* F5298 802D08E8 3C05802E */ lui $a1, %hi(D_802DB264) -/* F529C 802D08EC 24A5B264 */ addiu $a1, $a1, %lo(D_802DB264) -/* F52A0 802D08F0 0040802D */ daddu $s0, $v0, $zero -/* F52A4 802D08F4 0C049640 */ jal load_string -/* F52A8 802D08F8 ACA00000 */ sw $zero, ($a1) -/* F52AC 802D08FC 0040202D */ daddu $a0, $v0, $zero -/* F52B0 802D0900 0220282D */ daddu $a1, $s1, $zero -/* F52B4 802D0904 3C01802E */ lui $at, %hi(gCurrentPrintContext) -/* F52B8 802D0908 AC24B260 */ sw $a0, %lo(gCurrentPrintContext)($at) -/* F52BC 802D090C 0C0496AE */ jal clamp_printer_coords -/* F52C0 802D0910 0200302D */ daddu $a2, $s0, $zero -.L802D0914: -/* F52C4 802D0914 3C04802E */ lui $a0, %hi(gCurrentPrintContext) -/* F52C8 802D0918 8C84B260 */ lw $a0, %lo(gCurrentPrintContext)($a0) -/* F52CC 802D091C 8C8204FC */ lw $v0, 0x4fc($a0) -/* F52D0 802D0920 30420040 */ andi $v0, $v0, 0x40 -/* F52D4 802D0924 14400007 */ bnez $v0, .L802D0944 -/* F52D8 802D0928 24020001 */ addiu $v0, $zero, 1 -/* F52DC 802D092C 3C03802E */ lui $v1, %hi(D_802DB264) -/* F52E0 802D0930 8C63B264 */ lw $v1, %lo(D_802DB264)($v1) -/* F52E4 802D0934 54620003 */ bnel $v1, $v0, .L802D0944 -/* F52E8 802D0938 0000102D */ daddu $v0, $zero, $zero -/* F52EC 802D093C 908304E8 */ lbu $v1, 0x4e8($a0) -/* F52F0 802D0940 AE430084 */ sw $v1, 0x84($s2) -.L802D0944: -/* F52F4 802D0944 8FBF001C */ lw $ra, 0x1c($sp) -/* F52F8 802D0948 8FB20018 */ lw $s2, 0x18($sp) -/* F52FC 802D094C 8FB10014 */ lw $s1, 0x14($sp) -/* F5300 802D0950 8FB00010 */ lw $s0, 0x10($sp) -/* F5304 802D0954 03E00008 */ jr $ra -/* F5308 802D0958 27BD0020 */ addiu $sp, $sp, 0x20 diff --git a/ver/us/asm/nonmatchings/f4c60_len_4300/ShowMessageAtWorldPos.s b/ver/us/asm/nonmatchings/f4c60_len_4300/ShowMessageAtWorldPos.s deleted file mode 100644 index 74152a8e89..0000000000 --- a/ver/us/asm/nonmatchings/f4c60_len_4300/ShowMessageAtWorldPos.s +++ /dev/null @@ -1,85 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel ShowMessageAtWorldPos -/* F530C 802D095C 27BDFFB8 */ addiu $sp, $sp, -0x48 -/* F5310 802D0960 AFB3003C */ sw $s3, 0x3c($sp) -/* F5314 802D0964 0080982D */ daddu $s3, $a0, $zero -/* F5318 802D0968 AFBF0040 */ sw $ra, 0x40($sp) -/* F531C 802D096C AFB20038 */ sw $s2, 0x38($sp) -/* F5320 802D0970 AFB10034 */ sw $s1, 0x34($sp) -/* F5324 802D0974 AFB00030 */ sw $s0, 0x30($sp) -/* F5328 802D0978 10A00034 */ beqz $a1, .L802D0A4C -/* F532C 802D097C 8E70000C */ lw $s0, 0xc($s3) -/* F5330 802D0980 8E050000 */ lw $a1, ($s0) -/* F5334 802D0984 0C0B1EAF */ jal get_variable -/* F5338 802D0988 26100004 */ addiu $s0, $s0, 4 -/* F533C 802D098C 8E050000 */ lw $a1, ($s0) -/* F5340 802D0990 26100004 */ addiu $s0, $s0, 4 -/* F5344 802D0994 0260202D */ daddu $a0, $s3, $zero -/* F5348 802D0998 0C0B1EAF */ jal get_variable -/* F534C 802D099C 0040882D */ daddu $s1, $v0, $zero -/* F5350 802D09A0 8E050000 */ lw $a1, ($s0) -/* F5354 802D09A4 26100004 */ addiu $s0, $s0, 4 -/* F5358 802D09A8 0260202D */ daddu $a0, $s3, $zero -/* F535C 802D09AC 0C0B1EAF */ jal get_variable -/* F5360 802D09B0 0040902D */ daddu $s2, $v0, $zero -/* F5364 802D09B4 0260202D */ daddu $a0, $s3, $zero -/* F5368 802D09B8 8E050000 */ lw $a1, ($s0) -/* F536C 802D09BC 0C0B1EAF */ jal get_variable -/* F5370 802D09C0 0040802D */ daddu $s0, $v0, $zero -/* F5374 802D09C4 0220202D */ daddu $a0, $s1, $zero -/* F5378 802D09C8 3C05802E */ lui $a1, %hi(D_802DB264) -/* F537C 802D09CC 24A5B264 */ addiu $a1, $a1, %lo(D_802DB264) -/* F5380 802D09D0 0040882D */ daddu $s1, $v0, $zero -/* F5384 802D09D4 0C049640 */ jal load_string -/* F5388 802D09D8 ACA00000 */ sw $zero, ($a1) -/* F538C 802D09DC 44920000 */ mtc1 $s2, $f0 -/* F5390 802D09E0 00000000 */ nop -/* F5394 802D09E4 46800020 */ cvt.s.w $f0, $f0 -/* F5398 802D09E8 44050000 */ mfc1 $a1, $f0 -/* F539C 802D09EC 44900000 */ mtc1 $s0, $f0 -/* F53A0 802D09F0 00000000 */ nop -/* F53A4 802D09F4 46800020 */ cvt.s.w $f0, $f0 -/* F53A8 802D09F8 44060000 */ mfc1 $a2, $f0 -/* F53AC 802D09FC 44910000 */ mtc1 $s1, $f0 -/* F53B0 802D0A00 00000000 */ nop -/* F53B4 802D0A04 46800020 */ cvt.s.w $f0, $f0 -/* F53B8 802D0A08 3C048007 */ lui $a0, %hi(gCurrentCameraID) -/* F53BC 802D0A0C 8C847410 */ lw $a0, %lo(gCurrentCameraID)($a0) -/* F53C0 802D0A10 44070000 */ mfc1 $a3, $f0 -/* F53C4 802D0A14 3C10802E */ lui $s0, %hi(gCurrentPrintContext) -/* F53C8 802D0A18 2610B260 */ addiu $s0, $s0, %lo(gCurrentPrintContext) -/* F53CC 802D0A1C AE020000 */ sw $v0, ($s0) -/* F53D0 802D0A20 27A20020 */ addiu $v0, $sp, 0x20 -/* F53D4 802D0A24 AFA20010 */ sw $v0, 0x10($sp) -/* F53D8 802D0A28 27A20024 */ addiu $v0, $sp, 0x24 -/* F53DC 802D0A2C AFA20014 */ sw $v0, 0x14($sp) -/* F53E0 802D0A30 27A20028 */ addiu $v0, $sp, 0x28 -/* F53E4 802D0A34 0C00B94E */ jal get_screen_coords -/* F53E8 802D0A38 AFA20018 */ sw $v0, 0x18($sp) -/* F53EC 802D0A3C 8E040000 */ lw $a0, ($s0) -/* F53F0 802D0A40 8FA50020 */ lw $a1, 0x20($sp) -/* F53F4 802D0A44 0C0496AE */ jal clamp_printer_coords -/* F53F8 802D0A48 8FA60024 */ lw $a2, 0x24($sp) -.L802D0A4C: -/* F53FC 802D0A4C 3C04802E */ lui $a0, %hi(gCurrentPrintContext) -/* F5400 802D0A50 8C84B260 */ lw $a0, %lo(gCurrentPrintContext)($a0) -/* F5404 802D0A54 8C8204FC */ lw $v0, 0x4fc($a0) -/* F5408 802D0A58 30420040 */ andi $v0, $v0, 0x40 -/* F540C 802D0A5C 14400007 */ bnez $v0, .L802D0A7C -/* F5410 802D0A60 24020001 */ addiu $v0, $zero, 1 -/* F5414 802D0A64 3C03802E */ lui $v1, %hi(D_802DB264) -/* F5418 802D0A68 8C63B264 */ lw $v1, %lo(D_802DB264)($v1) -/* F541C 802D0A6C 54620003 */ bnel $v1, $v0, .L802D0A7C -/* F5420 802D0A70 0000102D */ daddu $v0, $zero, $zero -/* F5424 802D0A74 908304E8 */ lbu $v1, 0x4e8($a0) -/* F5428 802D0A78 AE630084 */ sw $v1, 0x84($s3) -.L802D0A7C: -/* F542C 802D0A7C 8FBF0040 */ lw $ra, 0x40($sp) -/* F5430 802D0A80 8FB3003C */ lw $s3, 0x3c($sp) -/* F5434 802D0A84 8FB20038 */ lw $s2, 0x38($sp) -/* F5438 802D0A88 8FB10034 */ lw $s1, 0x34($sp) -/* F543C 802D0A8C 8FB00030 */ lw $s0, 0x30($sp) -/* F5440 802D0A90 03E00008 */ jr $ra -/* F5444 802D0A94 27BD0048 */ addiu $sp, $sp, 0x48