From 59217b8cf861adf1f819a9ca22ba0afc54f1d9c5 Mon Sep 17 00:00:00 2001 From: Ethan Roseman Date: Thu, 6 Oct 2022 09:06:09 +0900 Subject: [PATCH] A few battle/partner funcs (#804) * 5 battle partner funcs * 3 battle funcs * rodata fix for the fish * PR comments --- .vscode/settings.json | 2 +- include/effects.h | 3 +- src/audio/2d9a0_len_890.c | 8 +- src/audio/2e230_len_2190.c | 12 +- src/battle/area_kzn2/59F4D0.c | 11 +- src/battle/area_tik2/608CB0.c | 32 +- src/battle/partner/lakilester.c | 458 +++++++++++++++++- src/battle/partner/sushie.c | 8 +- src/battle/partner/watt.c | 133 ++++- src/world/partner/sushie.c | 2 +- ver/us/asm/data/battle/partner/708B70.data.s | 6 - .../area_kzn2/59F4D0/func_80218DF0_59F4D0.s | 28 -- .../area_tik2/608CB0/func_80218258_608D08.s | 41 -- .../area_tik2/608CB0/func_80218404_608EB4.s | 60 --- .../partner/lakilester/func_80238B50_70C860.s | 60 --- .../partner/lakilester/func_80238D8C_70CA9C.s | 207 -------- .../partner/lakilester/func_8023906C_70CD7C.s | 60 --- .../partner/lakilester/func_80239F84_70DC94.s | 150 ------ .../partner/sushie/func_80238540_7081E0.s | 7 + .../partner/watt/func_80238C84_704774.s | 130 ----- ver/us/splat.yaml | 1 + 21 files changed, 650 insertions(+), 769 deletions(-) delete mode 100644 ver/us/asm/nonmatchings/battle/area_kzn2/59F4D0/func_80218DF0_59F4D0.s delete mode 100644 ver/us/asm/nonmatchings/battle/area_tik2/608CB0/func_80218258_608D08.s delete mode 100644 ver/us/asm/nonmatchings/battle/area_tik2/608CB0/func_80218404_608EB4.s delete mode 100644 ver/us/asm/nonmatchings/battle/partner/lakilester/func_80238B50_70C860.s delete mode 100644 ver/us/asm/nonmatchings/battle/partner/lakilester/func_80238D8C_70CA9C.s delete mode 100644 ver/us/asm/nonmatchings/battle/partner/lakilester/func_8023906C_70CD7C.s delete mode 100644 ver/us/asm/nonmatchings/battle/partner/lakilester/func_80239F84_70DC94.s delete mode 100644 ver/us/asm/nonmatchings/battle/partner/watt/func_80238C84_704774.s diff --git a/.vscode/settings.json b/.vscode/settings.json index 39db3d364d..f3f8717275 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -46,7 +46,7 @@ "ver/current": true, "expected": true, "**/*.i": true, - "docs/doxygen": true, + "docs/doxygen": true }, "C_Cpp.default.cStandard": "c89", } diff --git a/include/effects.h b/include/effects.h index dabbabb8d1..18f19e81fc 100644 --- a/include/effects.h +++ b/include/effects.h @@ -1277,7 +1277,8 @@ typedef struct StatChangeFXData { typedef struct SnakingStaticFXData { /* 0x00 */ char unk_00[4]; /* 0x04 */ Vec3f pos; - /* 0x10 */ char todo[0]; + /* 0x10 */ char unk_10[0x28]; + /* 0x38 */ f32 unk_38; } SnakingStaticFXData; // size = unknown typedef struct ThunderboltRingFXData { diff --git a/src/audio/2d9a0_len_890.c b/src/audio/2d9a0_len_890.c index 840e97f97f..57442ae7a4 100644 --- a/src/audio/2d9a0_len_890.c +++ b/src/audio/2d9a0_len_890.c @@ -67,7 +67,7 @@ void func_80052660(AuGlobals* globals) { voice->unk_3F = voice->unk_39; } voice->unk_3A = var_a0; - + voice->unk_28 = D_800785A0[voice->unk_3B]; voice->unk_24 = voice->unk_28; if (voice->unk_flags_3D & AU_VOICE_3D_FLAGS_VOL_CHANGED) { @@ -170,13 +170,13 @@ s32 func_80052BC0(s32 arg0) { void func_80052BF8(AlUnkVoice* voice, AlUnkInstrumentData* arg1) { s32 x; - + voice->unk_14.unk_00 = arg1->unk_00; voice->unk_1C = voice->unk_14.unk_00; voice->unk_14.unk_04 = arg1->unk_04; voice->unk_30 = 0x80; voice->unk_34 = 0; - + x = func_80052CFC(voice); voice->unk_flags_3D = 0; voice->unk_39 = 0; @@ -184,7 +184,7 @@ void func_80052BF8(AlUnkVoice* voice, AlUnkInstrumentData* arg1) { voice->unk_3B = x; voice->unk_24 = D_800785A0[x]; voice->unk_28 = voice->unk_24; - + voice->volume = (voice->unk_3A * voice->adjustedVolume * voice->unk_30) >> 14; voice->unk_08 = func_80052BC0(voice->unk_24); if (voice->unk_24 != 0) { diff --git a/src/audio/2e230_len_2190.c b/src/audio/2e230_len_2190.c index 94bec2a949..f8d50f86a7 100644 --- a/src/audio/2e230_len_2190.c +++ b/src/audio/2e230_len_2190.c @@ -220,7 +220,7 @@ void au_update_clients_2(void) { bgmPlayer->unk_5C = au_bgm_player_update_main(bgmPlayer); } } - + if (!PreventBGMPlayerUpdate) { if (globals->unk_80 != 0) { func_8004DFD4(globals); @@ -996,14 +996,14 @@ s32* func_80054AA0(s32* bkFileOffset, void* vaddr, s32 bankIndex, s32 bankGroup) fileData = vaddr; readState = BK_READ_FETCH_HEADER; keepReading = TRUE; - + while (keepReading) { switch (readState) { case BK_READ_DONE: keepReading = FALSE; break; case BK_READ_FETCH_HEADER: - au_read_rom(*bkFileOffset, &localHeader, 0x40U); + au_read_rom(*bkFileOffset, &localHeader, 0x40U); if ((header->signature == AL_HEADER_SIG_BK) && (header->size != 0) && (header->format == AL_HEADER_SIG_CR)) { readState = BK_READ_FETCH_DATA; } else { @@ -1015,10 +1015,10 @@ s32* func_80054AA0(s32* bkFileOffset, void* vaddr, s32 bankIndex, s32 bankGroup) fileData = alHeapAlloc(heap, 1, header->size); } au_read_rom(*bkFileOffset, fileData, header->size); - + instrCount = 0; instrumentGroup = (Instrument**)au_get_BK_instruments(bankGroup, bankIndex); - + for (i = 0; i < 16; i++) { if (header->instruments[i] != 0) { instrumentGroup[i] = header->instruments[i] + fileData; @@ -1027,7 +1027,7 @@ s32* func_80054AA0(s32* bkFileOffset, void* vaddr, s32 bankIndex, s32 bankGroup) instrumentGroup[i] = NULL; } } - + if (instrCount != 0) { readState = BK_READ_SWIZZLE; } else { diff --git a/src/battle/area_kzn2/59F4D0.c b/src/battle/area_kzn2/59F4D0.c index 20600675f3..140dd31ecf 100644 --- a/src/battle/area_kzn2/59F4D0.c +++ b/src/battle/area_kzn2/59F4D0.c @@ -1,3 +1,12 @@ #include "common.h" +#include "effects.h" -INCLUDE_ASM(s32, "battle/area_kzn2/59F4D0", func_80218DF0_59F4D0); +ApiStatus func_80218DF0_59F4D0(Evt* script, s32 isInitialCall) { + Bytecode* args = script->ptrReadPos; + FlameFXData* data = ((EffectInstance*) evt_get_variable(script, *args++))->data.flame; + f32 temp_f0 = evt_get_float_variable(script, *args++); + + data->unk_2C = temp_f0; + data->unk_30 = temp_f0; + return ApiStatus_DONE2; +} diff --git a/src/battle/area_tik2/608CB0.c b/src/battle/area_tik2/608CB0.c index a9451537b8..4faa19e2b4 100644 --- a/src/battle/area_tik2/608CB0.c +++ b/src/battle/area_tik2/608CB0.c @@ -1,4 +1,5 @@ #include "common.h" +#include "effects.h" #define NAMESPACE b_area_tik2 @@ -6,13 +7,39 @@ #include "common/StartRumbleWithParams.inc.c" #define NAMESPACE b_area_tik2 -INCLUDE_ASM(s32, "battle/area_tik2/608CB0", func_80218258_608D08); +// same as func_802186D8_609188 +ApiStatus func_80218258_608D08(Evt* script, s32 isInitialCall) { + Bytecode* args = script->ptrReadPos; + Bytecode arg0 = *args++; + f32 var0, var1; + + var1 = evt_get_float_variable(script, *args++); + do {} while(0); + var0 = evt_get_float_variable(script, arg0); + + evt_set_float_variable(script, arg0, var1 * sin_rad(DEG_TO_RAD(var0))); + + return ApiStatus_DONE2; +} #include "common/FadeBackgroundToBlack.inc.c" #include "common/UnfadeBackgroundToBlack.inc.c" -INCLUDE_ASM(s32, "battle/area_tik2/608CB0", func_80218404_608EB4); +ApiStatus func_80218404_608EB4(Evt* script, s32 isInitialCall) { + Bytecode* args = script->ptrReadPos; + EffectInstance* effect = (EffectInstance*) evt_get_variable(script, *args++); + f32 x = evt_get_variable(script, *args++); + f32 y = evt_get_variable(script, *args++); + f32 z = evt_get_variable(script, *args++); + f32 temp_f0 = evt_get_float_variable(script, *args++); + + effect->data.snakingStatic->pos.x = x; + effect->data.snakingStatic->pos.y = y; + effect->data.snakingStatic->pos.z = z; + effect->data.snakingStatic->unk_38 = temp_f0; + return ApiStatus_DONE2; +} #define NAMESPACE dup_b_area_tik2 #include "common/UnkWaterFountainFunc.inc.c" @@ -22,6 +49,7 @@ INCLUDE_ASM(s32, "battle/area_tik2/608CB0", func_80218404_608EB4); #include "common/StartRumbleWithParams.inc.c" #define NAMESPACE b_area_tik2 +// same as func_80218258_608D08 ApiStatus func_802186D8_609188(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; Bytecode arg0 = *args++; diff --git a/src/battle/partner/lakilester.c b/src/battle/partner/lakilester.c index 80f43bb283..79240ff50d 100644 --- a/src/battle/partner/lakilester.c +++ b/src/battle/partner/lakilester.c @@ -1,11 +1,36 @@ #include "common.h" #include "effects.h" +#include "battle/battle.h" +#include "hud_element.h" +extern s32 (*D_8023AB80_70E890)[0]; extern f32 D_8023D1E0; +extern s32 D_8023D288; +extern s32 D_8023D28C; +extern s32 D_8023D290; +extern s32 D_8023D294; +extern s32 D_8023D298; +extern s32 D_8023D29C; +extern f32 D_8023D2A0; +extern f32 D_8023D2A4; +extern f32 D_8023D2A8; +extern f32 D_8023D2AC; +extern f32 D_8023D2B0; +extern f32 D_8023D2B4; +extern s32 D_8023D2B8[1]; +extern s32 D_8023D2BC; +extern s32 D_8023D2C0; +extern s32 D_8023D2C4; extern s32 D_8023D2C8; +extern s32 D_8023D2D0[]; extern s32 D_8023D330; extern s32 D_8023D334; +extern HudScript HES_AimReticle; +extern HudScript HES_AimTarget; +extern HudScript HES_StickNeutral; +extern HudScript HES_StickTapRight; + ApiStatus func_80238000_70BD10(Evt* script, s32 isInitialCall) { if (isInitialCall) { D_8023D2C8 = 0; @@ -19,7 +44,242 @@ ApiStatus func_80238000_70BD10(Evt* script, s32 isInitialCall) { return ApiStatus_DONE2; } +ApiStatus func_8023803C_70BD4C(Evt* script, s32 isInitialCall); +// a few issues +#ifdef NON_MATCHING +ApiStatus func_8023803C_70BD4C(Evt* script, s32 isInitialCall) { + BattleStatus* battleStatus = &gBattleStatus; + s32 screenX, screenY, screenZ; + Actor* partner = battleStatus->partnerActor; + Actor* target; + ActorPart* part; + ActorState* playerState; + ActorState* partnerState; + f32 dpadX; + s32 dpadY; + s32 id; + s32 i; + + f32 temp_f0_5; + f32 theta; + f32 sinTheta; + f32 cosTheta; + f32 temp_f2; + f32 temp_f2_2; + f32 temp_f8; + s32 (**var_s3)[0]; + s32 (*temp_a0)[0]; + s32 temp_a0_2; + s32 temp_f10; + s32 temp_v0_4; + s32 temp_v1_2; + s32* var_s0; + + partnerState = &partner->state; + playerState = &battleStatus->playerActor->state; + + if (isInitialCall) { + script->functionTemp[0] = 0; + } + + switch (script->functionTemp[0]) { + case 0: + D_8023D288 = hud_element_create(HES_AimReticle); + hud_element_set_render_depth(D_8023D288, 0xA); + D_8023D28C = hud_element_create(HES_AimTarget); + hud_element_set_render_depth(D_8023D28C, 0xA); + var_s3 = &D_8023AB80_70E890; + hud_element_create_transform_A(D_8023D28C); + D_8023D2C0 = -48; + D_8023D2C4 = 70; + D_8023D2BC = id = hud_element_create(HES_StickNeutral); + hud_element_set_render_pos(id, D_8023D2C0, D_8023D2C4); + hud_element_set_render_depth(id, 0); + for (i = 0; i < 1; i++) { + temp_a0 = *var_s3; + var_s3++; + + D_8023D2B8[i] = temp_v0_4 = hud_element_create(temp_a0); + hud_element_set_render_depth(temp_v0_4, 0xA); + } + partnerState->currentPos.x = partner->currentPos.x + 33.0f; + partnerState->currentPos.y = partner->currentPos.y + 34.0f; + partnerState->currentPos.z = partner->currentPos.z + 15.0f; + partnerState->unk_18.x = partner->currentPos.x + 33.0f; + partnerState->unk_18.y = partner->currentPos.y + 34.0f; + partnerState->unk_18.z = partner->currentPos.z + 15.0f; + set_goal_pos_to_part(partnerState, partner->targetActorID, partner->targetPartIndex); + target = get_actor(partner->targetActorID); + part = get_actor_part(target, partner->targetPartIndex); + partnerState->goalPos.x += part->unk_75; + partnerState->goalPos.y += part->unk_76; + partnerState->distance = dist2D(partnerState->currentPos.x, + partnerState->currentPos.y, + partnerState->goalPos.x, + partnerState->goalPos.y); + partnerState->speed = 0.0f; + partnerState->unk_30.x = 0.0f; + partnerState->unk_30.y = 0.0f; + D_8023D290 = 0; + D_8023D294 = 0; + D_8023D298 = 30; + D_8023D2A0 = 0.0f; + D_8023D2A4 = 0.0f; + D_8023D2A8 = 0.0f; + D_8023D2AC = 0.0f; + D_8023D29C = 0; + D_8023D2B0 = 3.0f; + D_8023D2B4 = -1.0f; + partnerState->unk_24 = ((part->size.y + part->size.x) / 2) / 24.0; + hud_element_set_scale(D_8023D28C, partnerState->unk_24 * target->scalingFactor); + D_8023D2C8 = 1; + script->functionTemp[0] = 1; + break; + case 1: + if (battleStatus->stickX != 0 || battleStatus->stickY != 0) { + D_8023D298 = 0; + } + if (D_8023D298 != 0) { + D_8023D298--; + } else { + D_8023D298 = 0x50; + hud_element_set_script(D_8023D2BC, HES_StickTapRight); + sfx_play_sound_at_position(0x312, 0, 0.0f, 0.0f, 0.0f); + script->functionTemp[0] = 2; + } + break; + case 2: + dpadY = battleStatus->dpadY; + if (dpadY > 0x50) { + dpadY = 0x50; + } + dpadX = battleStatus->dpadX; + if (dpadY < 35) { + dpadY *= sin_rad(DEG_TO_RAD(dpadY * 2)); + } + temp_f8 = D_8023D2A0; + temp_f2 = temp_f8 + D_8023D2A4 + D_8023D2A8; + D_8023D2A0 = dpadY; + D_8023D2A8 = D_8023D2A4; + temp_f10 = D_8023D2A0 - (temp_f2 / 3.0f); + D_8023D2A4 = temp_f8; + if (temp_f10 > 0) { + D_8023D2AC = temp_f10; + if (partner->state.speed != 0.0f) { + partner->state.speed += (D_8023D2AC / 8.5) / 3.0; + } else { + partner->state.speed += (D_8023D2AC / 8.5) / 2.0; + } + D_8023D2B4 = dpadX; + } else { + D_8023D2AC = temp_f10; + } + if (!(dpadY < 31)) { + D_8023D2B4 = dpadX; + } + if (partnerState->speed > 6.7) { + partnerState->speed = 6.7f; + } + partnerState->speed = partnerState->speed - (f32) ((2.0 * (40 - dpadY)) / 40.0); + if (partnerState->speed <= 0.0f) { + partnerState->speed = 0.0f; + D_8023D2AC = 0.0f; + } + if (D_8023D2B4 >= 0.0f) { + theta = DEG_TO_RAD(D_8023D2B4); + sinTheta = sin_rad(theta); + cosTheta = cos_rad(theta); + partnerState->currentPos.x += partnerState->speed * sinTheta; + partnerState->currentPos.y += partnerState->speed * cosTheta; + } + if (partnerState->currentPos.x < -30.0f) { + partnerState->currentPos.x = -30.0f; + } + if (partnerState->currentPos.x > 170.0f) { + partnerState->currentPos.x = 170.0f; + } + if (partnerState->currentPos.y > 130.0f) { + partnerState->currentPos.y = 130.0f; + } + if (partnerState->currentPos.y < 0.0f) { + partnerState->currentPos.y = 0.0f; + } + if (battleStatus->currentButtonsPressed & 0x8000) { + D_8023D298 = 0; + } + if (D_8023D298 == 60) { + set_animation(0x100, 0, 0x100010); + } + if (D_8023D298 == 30) { + set_animation(0x100, 0, 0x100011); + } + if (D_8023D298 != 0) { + D_8023D298--; + break; + } + script->varTable[14] = 0; + script->varTable[15] = 0; + script->varTable[7] = partnerState->currentPos.x; + script->varTable[8] = partnerState->currentPos.y; + script->varTable[9] = partnerState->currentPos.z; + partnerState->distance = dist2D(partnerState->currentPos.x, partnerState->currentPos.y, partnerState->goalPos.x, partnerState->goalPos.y) / partnerState->unk_24; + if (partnerState->distance <= 12.0) { + script->varTable[15] = 1; + } + hud_element_free(D_8023D28C); + hud_element_free(D_8023D288); + hud_element_free(D_8023D2BC); + for (i = 0; i < 1; i++) { + id = D_8023D2B8[i]; + hud_element_free(id); + } + btl_set_popup_duration(0); + sfx_stop_sound(0x312); + return ApiStatus_DONE2; + } + + get_screen_coords(gCurrentCameraID, + partnerState->goalPos.x, partnerState->goalPos.y, partnerState->goalPos.z, + &screenX, &screenY, &screenZ); + id = D_8023D28C; + hud_element_set_render_pos(id, screenX, screenY); + hud_element_set_transform_rotation(id, 0.0f, 0.0f, D_8023D290); + D_8023D290 -= 10; + D_8023D290 = clamp_angle(D_8023D290); + get_screen_coords(gCurrentCameraID, + partnerState->currentPos.x, partnerState->currentPos.y, partnerState->currentPos.z, + &screenX, &screenY, &screenZ); + hud_element_set_render_pos(D_8023D288, screenX, screenY); + + temp_v1_2 = script->functionTemp[0]; + if (temp_v1_2 < 3 && temp_v1_2 > 0) { + D_8023D2C0 += 20; + if (D_8023D2C0 > 50) { + D_8023D2C0 = 50; + } + hud_element_set_render_pos(D_8023D2BC, D_8023D2C0, D_8023D2C4); + } + + temp_a0_2 = script->functionTemp[0]; + if (temp_a0_2 < 3) { + if (temp_a0_2 > 0) { + playerState->currentPos.x = partnerState->currentPos.x; + playerState->currentPos.y = partnerState->currentPos.y; + playerState->currentPos.z = partnerState->currentPos.z; + for (i = 0; i < 1; i++) { + get_screen_coords(gCurrentCameraID, playerState->currentPos.x, playerState->currentPos.y, playerState->currentPos.z, &screenX, &screenY, &screenZ); + id = D_8023D2B8[i]; + hud_element_set_render_pos(id, screenX, screenY); + } + } + } + + btl_set_popup_duration(99); + return ApiStatus_BLOCK; +} +#else INCLUDE_ASM(s32, "battle/partner/lakilester", func_8023803C_70BD4C); +#endif ApiStatus func_80238A6C_70C77C(Evt* script, s32 isInitialCall) { BattleStatus* battleStatus = &gBattleStatus; @@ -35,7 +295,50 @@ ApiStatus func_80238A6C_70C77C(Evt* script, s32 isInitialCall) { return ApiStatus_DONE2; } -INCLUDE_ASM(s32, "battle/partner/lakilester", func_80238B50_70C860); +ApiStatus func_80238B50_70C860(Evt* script, s32 isInitialCall) { + s32 partnerLevel = gBattleStatus.partnerActor->actorBlueprint->level; + s32 vt10 = script->varTable[10]; + s32 vt15 = 0; + + switch (partnerLevel) { + case 0: + if (vt10 < 100) { + vt15 = 1; + } else { + vt15 = 2; + } + break; + case 1: + if (vt10 <= 70) { + vt15 = 1; + } else if (vt10 < 100) { + vt15 = 2; + } else { + vt15 = 3; + } + break; + case 2: + if (vt10 <= 40) { + vt15 = 1; + } else if (vt10 <= 70) { + vt15 = 2; + } else if (vt10 < 100) { + vt15 = 3; + } else { + vt15 = 4; + } + break; + } + + if (vt10 >= 100) { + script->varTable[0] = TRUE; + } else { + script->varTable[0] = FALSE; + } + + script->varTable[15] = vt15; + return ApiStatus_DONE2; +} ApiStatus func_80238C14_70C924(Evt* script, s32 isInitialCall) { EffectInstance* effect = gBattleStatus.cloudNineEffect; @@ -85,16 +388,161 @@ ApiStatus func_80238D48_70CA58(Evt* script, s32 isInitialCall) { return ApiStatus_DONE2; } -INCLUDE_ASM(s32, "battle/partner/lakilester", func_80238D8C_70CA9C); +ApiStatus func_80238D8C_70CA9C(Evt* script, s32 isInitialCall) { + Actor* partner = gBattleStatus.partnerActor; + s32 totalSpookChance; + s32 spookableTargets; + s32 targetIdx; + SelectableTarget* target; + Actor* actor; + ActorPart* part; + s32 hpCalc; + s32 spookChance; + s32 avgSpookChance; + s32 i; -INCLUDE_ASM(s32, "battle/partner/lakilester", func_8023906C_70CD7C); + D_8023D330 = 0; + D_8023D334 = 0; + + for (i = 0; i < partner->targetListLength; i++) { + D_8023D2D0[i] = 0; + } + + totalSpookChance = 0; + spookableTargets = 0; + + for (i = 0; i < partner->targetListLength; i++) { + targetIdx = partner->targetIndexList[i]; + target = &partner->targetData[targetIdx]; + actor = get_actor(target->actorID); + part = get_actor_part(actor, target->partID); + hpCalc = 100 - ((actor->currentHP * 100) / actor->maxHP); + spookChance = actor->actorBlueprint->spookChance; + if (spookChance > 0) { + spookChance += spookChance * hpCalc / 100; + if (spookChance > 100) { + spookChance = 100; + } + if (actor->debuff != 0) { + spookChance = (spookChance * 150) / 100; + if (spookChance > 150) { + spookChance = 150; + } + } + if (actor->transparentStatus == STATUS_TRANSPARENT) { + spookChance = 0; + } + if (part->eventFlags & ACTOR_EVENT_FLAG_ILLUSORY) { + spookChance = 0; + } + spookableTargets++; + } + D_8023D2D0[targetIdx] = spookChance; + totalSpookChance += spookChance; + } + + if (spookableTargets != 0) { + avgSpookChance = totalSpookChance / spookableTargets; + } else { + avgSpookChance = 0; + } + script->varTable[0] = avgSpookChance; + + for (i = 0; i < partner->targetListLength; i++) { + targetIdx = partner->targetIndexList[i]; + target = &partner->targetData[targetIdx]; + actor = get_actor(target->actorID); + part = get_actor_part(actor, target->partID); + if (actor->transparentStatus == STATUS_TRANSPARENT || (part->eventFlags & ACTOR_EVENT_FLAG_ILLUSORY)) { + D_8023D2D0[targetIdx] = -1; + } else if (D_8023D2D0[targetIdx] != 0) { + D_8023D2D0[targetIdx] = avgSpookChance; + } + } + return ApiStatus_DONE2; +} + +ApiStatus func_8023906C_70CD7C(Evt* script, s32 isInitialCall) { + BattleStatus* battleStatus = &gBattleStatus; + Actor* partner = battleStatus->partnerActor; + s32 targetIdx = partner->targetIndexList[partner->selectedTargetIndex]; + s32* temp_s0 = &D_8023D2D0[targetIdx]; + SelectableTarget* target = &partner->targetData[targetIdx]; + + script->varTable[0] = *temp_s0; + + if (*temp_s0 == -1) { + return ApiStatus_DONE2; + } + + if (*temp_s0 == 0) { + return ApiStatus_DONE2; + } + + get_actor(target->actorID); + if (rand_int(99) < battleStatus->actionSuccess) { + *temp_s0 = -1; + script->varTable[0] = target->actorID; + } else { + *temp_s0 = 0; + script->varTable[0] = ACTOR_PLAYER; + } + return ApiStatus_DONE2; +} INCLUDE_ASM(s32, "battle/partner/lakilester", func_80239140_70CE50); -INCLUDE_ASM(s32, "battle/partner/lakilester", func_80239F84_70DC94); +ApiStatus func_80239F84_70DC94(Evt* script, s32 isInitialCall) { + BattleStatus* battleStatus = &gBattleStatus; + Actor* actor; + ActorState* state; + f64 temp_f20; + + if (isInitialCall) { + script->functionTempPtr[1] = get_actor(script->varTable[10]); + script->functionTemp[0] = 0; + } + + actor = script->functionTempPtr[1]; + state = &actor->state; + switch (script->functionTemp[0]) { + case 0: + actor->state.moveTime = 0; + actor->state.currentPos.x = actor->currentPos.x; + actor->state.currentPos.y = actor->currentPos.y; + actor->state.currentPos.z = actor->currentPos.z; + actor->state.speed = 5.5f; + D_8023D330 += 1; + battleStatus->currentAttackElement = 0; + dispatch_event_actor(actor, 0x16); + script->functionTemp[0] = 1; + break; + case 1: + actor->state.currentPos.x += actor->state.speed; + temp_f20 = actor->state.currentPos.y; + actor->state.currentPos.y = + temp_f20 + ((sin_rad(2.0f * sin_rad(DEG_TO_RAD(actor->state.moveTime)) * PI_S) * 1.4) + 0.5); + actor->state.moveTime += 6; + actor->state.moveTime = clamp_angle(actor->state.moveTime); + actor->yaw += 33.0f; + actor->yaw = clamp_angle(actor->yaw); + if (actor->state.currentPos.x > 240.0f) { + D_8023D330 -= 1; + return ApiStatus_DONE2; + } + break; + } + actor->currentPos.x = state->currentPos.x; + actor->currentPos.y = state->currentPos.y; + actor->currentPos.z = state->currentPos.z; + return ApiStatus_BLOCK; +} ApiStatus func_8023A19C_70DEAC(Evt* script, s32 isInitialCall) { - return (D_8023D330 == 0) * 2; + if (D_8023D330 == 0) { + return ApiStatus_DONE2; + } + return ApiStatus_BLOCK; } ApiStatus func_8023A1B0_70DEC0(Evt* script, s32 isInitialCall) { diff --git a/src/battle/partner/sushie.c b/src/battle/partner/sushie.c index feb6b45244..e0aa86e6dd 100644 --- a/src/battle/partner/sushie.c +++ b/src/battle/partner/sushie.c @@ -1,8 +1,8 @@ #include "common.h" #include "effects.h" +#include "battle/battle.h" -extern f64 D_8023C060_70BD00; -extern s32 D_8023C070; +extern EffectInstance* D_8023C070; ApiStatus func_80238000_707CA0(Evt* script, s32 isInitialCall) { ActorPart* targetPart; @@ -107,7 +107,7 @@ ApiStatus func_80238388_708028(Evt* script, s32 isInitialCall) { Actor* partnerActor = battleStatus->partnerActor; Actor* playerActor = battleStatus->playerActor; - D_8023C070 = fx_squirt(1, partnerActor->currentPos.x - 5.5, partnerActor->currentPos.y + 15.5, partnerActor->currentPos.z + 5, playerActor->currentPos.x, playerActor->currentPos.y, playerActor->currentPos.z, rand_int(10) * D_8023C060_70BD00 + 1, 30); + D_8023C070 = fx_squirt(1, partnerActor->currentPos.x - 5.5, partnerActor->currentPos.y + 15.5, partnerActor->currentPos.z + 5, playerActor->currentPos.x, playerActor->currentPos.y, playerActor->currentPos.z, (rand_int(10) * 0.1) + 1, 30); return ApiStatus_DONE2; } @@ -118,7 +118,7 @@ ApiStatus func_80238480_708120(Evt* script, s32 isInitialCall) { f32 posX = evt_get_float_variable(script, *args++); f32 posY = evt_get_float_variable(script, *args++); f32 posZ = evt_get_float_variable(script, *args++); - s32 effect = battleStatus->waterBlockEffect; + EffectInstance* effect = battleStatus->waterBlockEffect; if (effect != NULL) { remove_effect(effect); diff --git a/src/battle/partner/watt.c b/src/battle/partner/watt.c index cd30c0c3a8..a40489d398 100644 --- a/src/battle/partner/watt.c +++ b/src/battle/partner/watt.c @@ -3,15 +3,18 @@ #define NAMESPACE battle_partner_watt +extern EffectInstance* D_80239A0C_7054FC; +extern s32 D_8023B948_707438[]; + extern EffectInstance* D_8023C1B0; extern EffectInstance* D_8023C1B4; extern s32 D_8023C1B8; extern s32 D_8023C1BC; +extern s32 D_8023C1C0; extern s32 D_8023C1C4; extern s32 D_8023C1C8; extern EffectInstance* D_8023C1CC; extern EffectInstance* D_8023C1D0; -extern EffectInstance* D_80239A0C_7054FC; INCLUDE_ASM(s32, "battle/partner/watt", func_80238000_703AF0); @@ -132,7 +135,96 @@ ApiStatus func_80238784_704274(Evt* script, s32 isInitialCall) { return ApiStatus_DONE2; } +// float stuff +#ifdef NON_MATCHING +ApiStatus func_80238810_704300(Evt* script, s32 isInitialCall) { + Bytecode* args = script->ptrReadPos; + Actor* partner = gBattleStatus.partnerActor; + Actor* player = gBattleStatus.playerActor; + ActorState* partnerState = &partner->state; + f32 x; + f32 theta; + f32 sinTheta; + f32 cosTheta; + f32 distance; + f32 new_var; + f32 angle; + + if (isInitialCall) { + script->functionTemp[0] = 0; + } + + switch (script->functionTemp[0]) { + case 0: + script->functionTemp[2] = evt_get_variable(script, *args++); + partner->state.distance = dist2D(player->currentPos.x, player->currentPos.y, partner->currentPos.x, partner->currentPos.y); + partner->state.goalPos.x = player->currentPos.x; + partner->state.goalPos.y = player->currentPos.y + 36.0f; + partner->state.goalPos.z = player->currentPos.z; + partner->state.moveTime = 90; + partner->state.currentPos.x = partner->currentPos.x; + partner->state.currentPos.y = partner->currentPos.y; + partner->state.currentPos.z = partner->currentPos.z; + partner->state.angle = 90.0f; + partner->state.velocity = 5.0f; + partner->state.acceleration = 0.5f; + script->functionTemp[1] = 10; + script->functionTemp[0] = 1; + break; + case 1: + theta = DEG_TO_RAD(partner->state.angle); + sinTheta = sin_rad(theta); + cosTheta = cos_rad(theta); + distance = partner->state.distance; + partner->state.velocity += partner->state.acceleration; + angle = partner->state.angle + partner->state.velocity; + partner->state.angle = angle; + partner->state.currentPos.x = partner->state.goalPos.x + (distance * sinTheta); + partner->state.currentPos.y = partner->state.goalPos.y + (-distance * cosTheta); + partner->state.angle = clamp_angle(angle); + partner->state.moveTime--; + if (partner->state.moveTime == 0) { + script->functionTemp[0] = 2; + } + break; + case 2: + theta = DEG_TO_RAD(partner->state.angle); + sinTheta = sin_rad(theta); + cosTheta = cos_rad(theta); + distance = partner->state.distance; + angle = partner->state.angle + partner->state.velocity; + partner->state.angle = angle; + partner->state.currentPos.x = partner->state.goalPos.x + (distance * sinTheta); + partner->state.currentPos.y = partner->state.goalPos.y + (-distance * cosTheta); + partner->state.angle = clamp_angle(angle); + if (partner->state.angle < 45.0f) { + script->functionTemp[0] = 3; + break; + } + case 3: + player->yaw = 0.0f; + partner->yaw = 0.0f; + return ApiStatus_DONE2; + } + + if (partnerState->angle > 180.0f) { + partner->yaw = 0.0f; + } else { + partner->yaw = 180.0f; + } + + partner->currentPos.x = partnerState->currentPos.x; + partner->currentPos.y = partnerState->currentPos.y; + partner->currentPos.z = partnerState->currentPos.z; + if (script->functionTemp[2] == 0) { + player->yaw += script->functionTemp[1]; + script->functionTemp[1]++; + } + return ApiStatus_BLOCK; +} +#else INCLUDE_ASM(s32, "battle/partner/watt", func_80238810_704300); +#endif ApiStatus func_80238B3C_70462C(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; @@ -173,7 +265,44 @@ ApiStatus func_80238C08_7046F8(Evt* script, s32 isInitialCall) { return ApiStatus_DONE2; } -INCLUDE_ASM(s32, "battle/partner/watt", func_80238C84_704774); +ApiStatus func_80238C84_704774(Evt* script, s32 isInitialCall) { + Bytecode* args = script->ptrReadPos; + s32 t1; + s32 t2; + s32 t3; + + if (isInitialCall) { + script->functionTemp[0] = 0; + } + + switch (script->functionTemp[0]) { + case 0: + script->functionTemp[1] = evt_get_variable(script, *args++); + t1 = evt_get_variable(script, *args++); + t2 = evt_get_variable(script, *args++); + t3 = evt_get_variable(script, *args++); + script->functionTemp[2] = 20; + script->functionTemp[3] = 10; + D_8023C1B4 = fx_thunderbolt_ring(0, t1, t2, t3, 1.0f, script->functionTemp[2] + 10); + D_8023C1B4->data.thunderboltRing->unk_30 = 3; + script->functionTemp[1] = D_8023B948_707438[script->functionTemp[1] / 16]; + script->functionTemp[0] = 1; + break; + case 1: + D_8023C1B4->data.thunderboltRing->unk_30 = + ((script->functionTemp[3] * 3) + (script->functionTemp[1] * (10 - script->functionTemp[3]))) / 10; + if (script->functionTemp[3] != 0) { + script->functionTemp[3]--; + } + if (script->functionTemp[2] == 0) { + D_8023C1B4->flags |= 0x10; + return ApiStatus_DONE2; + } + script->functionTemp[2]--; + break; + } + return ApiStatus_BLOCK; +} ApiStatus N(AverageTargetParalyzeChance)(Evt* script, s32 isInitialCall) { BattleStatus* battleStatus = &gBattleStatus; diff --git a/src/world/partner/sushie.c b/src/world/partner/sushie.c index 6689c7d144..c2e0cc3711 100644 --- a/src/world/partner/sushie.c +++ b/src/world/partner/sushie.c @@ -1,5 +1,5 @@ #include "common.h" -#include "../src/world/partners.h" +#include "world/partners.h" #include "npc.h" #include "effects.h" #include "sprite/npc/WorldSushie.h" diff --git a/ver/us/asm/data/battle/partner/708B70.data.s b/ver/us/asm/data/battle/partner/708B70.data.s index 3bc24ae78d..a68a282076 100644 --- a/ver/us/asm/data/battle/partner/708B70.data.s +++ b/ver/us/asm/data/battle/partner/708B70.data.s @@ -70,9 +70,3 @@ dlabel D_8023B194_70AE34 dlabel D_8023B974_70B614 .word 0x00000043, 0x00000003, UseIdleAnimation, 0x00000100, 0x00000000, 0x00000043, 0x00000002, LoadActionCommand, 0x00000017, 0x00000043, 0x00000001, action_command_jump_CreateHudElements, 0x00000043, 0x00000007, SetupMashMeter, 0x00000005, 0x00000014, 0x0000001E, 0x0000003C, 0x00000050, 0x00000064, 0x00000043, 0x00000001, InitTargetIterator, 0x00000043, 0x00000002, UseBattleCamPreset, 0x00000013, 0x00000043, 0x00000004, SetBattleCamTarget, 0xFFFFFFBF, 0x00000035, 0x0000000A, 0x00000043, 0x00000002, SetBattleCamOffsetZ, 0x00000010, 0x00000043, 0x00000002, SetBattleCamZoom, 0x000000D6, 0x00000043, 0x00000002, MoveBattleCamOver, 0x00000014, 0x00000043, 0x00000004, SetAnimation, 0x00000100, 0xFFFFFFFF, 0x000F0003, 0x00000043, 0x00000003, SetActorJumpGravity, 0x00000100, 0xF24A7C80, 0x00000043, 0x00000005, GetActorPos, 0x00000100, 0xFE363C80, 0xFE363C81, 0xFE363C82, 0x00000043, 0x00000005, SetGoalPos, 0x00000100, 0xFE363C80, 0xFE363C81, 0xFE363C82, 0x00000043, 0x00000006, JumpToGoal, 0x00000100, 0x00000005, 0x00000000, 0x00000001, 0x00000000, 0x00000043, 0x00000003, SetActorJumpGravity, 0x00000100, 0xF24A7E80, 0x00000043, 0x00000005, AddGoalPos, 0x00000100, 0x0000001E, 0x00000028, 0x00000000, 0x00000043, 0x00000006, JumpToGoal, 0x00000100, 0x0000000F, 0x00000000, 0x00000001, 0x00000000, 0x00000043, 0x00000004, SetAnimation, 0x00000100, 0xFFFFFFFF, 0x000F0001, 0x00000043, 0x00000004, SetAnimation, 0x00000100, 0xFFFFFFFF, 0x000F000B, 0x00000043, 0x00000004, func_802A9138_42C828, 0x00000000, 0x00000064, 0x00000003, 0x00000043, 0x00000005, SetActorRotationOffset, 0x00000100, 0x00000000, 0x0000000C, 0x00000000, 0x00000056, 0x00000000, 0x00000008, 0x00000001, 0x00000036, 0x00000005, 0x00000001, 0x00000008, 0x00000043, 0x00000005, SetActorDispOffset, 0x00000100, 0x00000000, 0x00000000, 0x00000000, 0x00000008, 0x00000001, 0x00000001, 0x00000043, 0x00000005, SetActorDispOffset, 0x00000100, 0xFFFFFFFF, 0x00000000, 0x00000000, 0x00000008, 0x00000001, 0x00000001, 0x00000006, 0x00000000, 0x00000005, 0x00000001, 0x00000007, 0x00000043, 0x00000005, SetActorDispOffset, 0x00000100, 0x00000001, 0x00000000, 0x00000000, 0x00000008, 0x00000001, 0x00000001, 0x00000043, 0x00000005, SetActorDispOffset, 0x00000100, 0xFFFFFFFF, 0x00000000, 0x00000000, 0x00000008, 0x00000001, 0x00000001, 0x00000006, 0x00000000, 0x00000005, 0x00000001, 0x00000008, 0x00000043, 0x00000005, SetActorDispOffset, 0x00000100, 0x00000001, 0x00000000, 0x00000000, 0x00000008, 0x00000001, 0x00000001, 0x00000043, 0x00000005, SetActorDispOffset, 0x00000100, 0xFFFFFFFE, 0x00000000, 0x00000000, 0x00000008, 0x00000001, 0x00000001, 0x00000006, 0x00000000, 0x00000043, 0x00000005, SetActorDispOffset, 0x00000100, 0x00000000, 0x00000000, 0x00000000, 0x00000057, 0x00000000, 0x00000005, 0x00000001, 0x00000064, 0x00000043, 0x00000002, GetActionResult, 0xFE363C80, 0x00000043, 0x00000001, func_80238E30_708AD0, 0x00000008, 0x00000001, 0x00000001, 0x00000006, 0x00000000, 0x00000043, 0x00000002, UseBattleCamPreset, 0x00000002, 0x00000043, 0x00000002, MoveBattleCamOver, 0x00000005, 0x00000008, 0x00000001, 0x0000000A, 0x00000043, 0x00000003, EnableActorBlur, 0x00000100, 0x00000001, 0x00000043, 0x00000001, func_80238540_7081E0, 0x00000043, 0x00000005, SetActorPos, 0x00000100, 0xFFFFFF24, 0x00000000, 0x00000000, 0x00000043, 0x00000003, EnableActorBlur, 0x00000100, 0x00000000, 0x00000008, 0x00000001, 0x0000000F, 0x00000043, 0x00000002, UseBattleCamPreset, 0x00000003, 0x00000043, 0x00000002, MoveBattleCamOver, 0x00000014, 0x00000043, 0x00000002, GetActionSuccessCopy, 0xFE363C80, 0x00000024, 0x00000002, 0xFE363C8E, 0xFE363C80, 0x00000024, 0x00000002, 0xFE363C8F, 0xFE363C80, 0x00000043, 0x00000001, InitTargetIterator, 0x00000005, 0x00000001, 0x00000000, 0x00000043, 0x00000002, SetGoalToTarget, 0xFFFFFF81, 0x00000043, 0x00000007, PartnerTestEnemy, 0xFE363C80, 0x00000000, 0x00000014, 0x00000000, 0x00000002, 0x00000010, 0x0000000A, 0x00000002, 0xFE363C80, 0x00000006, 0x00000004, 0x00000001, 0x0000000A, 0x00000013, 0x00000000, 0x00000014, 0x00000001, 0xFE363C8E, 0x0000001B, 0x00000001, 0x00000006, 0x00000043, 0x00000007, PartnerDamageEnemy, 0xFE363C80, 0x30000004, 0x00000000, 0x00000000, 0xFE363C8F, 0x00000070, 0x0000001C, 0x00000000, 0x00000043, 0x00000007, PartnerDamageEnemy, 0xFE363C80, 0x30000004, 0x00000000, 0x00000000, 0xFE363C8F, 0x00000030, 0x00000023, 0x00000000, 0x00000008, 0x00000001, 0x00000005, 0x00000003, 0x00000001, 0x0000000A, 0x00000043, 0x00000003, ChooseNextTarget, 0x00000000, 0xFE363C80, 0x0000000A, 0x00000002, 0xFE363C80, 0xFFFFFFFF, 0x00000007, 0x00000000, 0x00000013, 0x00000000, 0x00000006, 0x00000000, 0x00000043, 0x00000001, func_80280818, 0x00000043, 0x00000002, SetGoalToHome, 0x00000100, 0x00000043, 0x00000005, AddGoalPos, 0x00000100, 0x00000000, 0x00000096, 0x00000000, 0x00000043, 0x00000005, GetGoalPos, 0x00000100, 0xFE363C80, 0xFE363C81, 0xFE363C82, 0x00000043, 0x00000005, SetActorPos, 0x00000100, 0xFE363C80, 0xFE363C81, 0xFE363C82, 0x00000043, 0x00000005, SetActorRotationOffset, 0x00000100, 0x00000000, 0x00000000, 0x00000000, 0x00000043, 0x00000003, SetActorJumpGravity, 0x00000100, 0xF24A7E80, 0x00000043, 0x00000002, SetGoalToHome, 0x00000100, 0x00000043, 0x00000004, SetAnimation, 0x00000100, 0xFFFFFFFF, 0x000F0001, 0x00000043, 0x00000006, JumpToGoal, 0x00000100, 0x00000028, 0x00000000, 0x00000001, 0x00000000, 0x00000043, 0x00000003, SetActorJumpGravity, 0x00000100, 0xF24A7D4D, 0x00000043, 0x00000006, JumpToGoal, 0x00000100, 0x00000014, 0x00000000, 0x00000001, 0x00000000, 0x00000043, 0x00000006, JumpToGoal, 0x00000100, 0x0000000A, 0x00000000, 0x00000001, 0x00000000, 0x00000002, 0x00000000, 0x00000001, 0x00000000, 0x00000000 - -dlabel D_8023C060_70BD00 -.double 0.1 - -dlabel D_8023C068_70BD08 -.double 0.06 diff --git a/ver/us/asm/nonmatchings/battle/area_kzn2/59F4D0/func_80218DF0_59F4D0.s b/ver/us/asm/nonmatchings/battle/area_kzn2/59F4D0/func_80218DF0_59F4D0.s deleted file mode 100644 index 6f50cccda0..0000000000 --- a/ver/us/asm/nonmatchings/battle/area_kzn2/59F4D0/func_80218DF0_59F4D0.s +++ /dev/null @@ -1,28 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_80218DF0_59F4D0 -/* 59F4D0 80218DF0 27BDFFE0 */ addiu $sp, $sp, -0x20 -/* 59F4D4 80218DF4 AFB10014 */ sw $s1, 0x14($sp) -/* 59F4D8 80218DF8 0080882D */ daddu $s1, $a0, $zero -/* 59F4DC 80218DFC AFBF0018 */ sw $ra, 0x18($sp) -/* 59F4E0 80218E00 AFB00010 */ sw $s0, 0x10($sp) -/* 59F4E4 80218E04 8E30000C */ lw $s0, 0xc($s1) -/* 59F4E8 80218E08 8E050000 */ lw $a1, ($s0) -/* 59F4EC 80218E0C 0C0B1EAF */ jal evt_get_variable -/* 59F4F0 80218E10 26100004 */ addiu $s0, $s0, 4 -/* 59F4F4 80218E14 8E050000 */ lw $a1, ($s0) -/* 59F4F8 80218E18 8C50000C */ lw $s0, 0xc($v0) -/* 59F4FC 80218E1C 0C0B210B */ jal evt_get_float_variable -/* 59F500 80218E20 0220202D */ daddu $a0, $s1, $zero -/* 59F504 80218E24 E600002C */ swc1 $f0, 0x2c($s0) -/* 59F508 80218E28 E6000030 */ swc1 $f0, 0x30($s0) -/* 59F50C 80218E2C 8FBF0018 */ lw $ra, 0x18($sp) -/* 59F510 80218E30 8FB10014 */ lw $s1, 0x14($sp) -/* 59F514 80218E34 8FB00010 */ lw $s0, 0x10($sp) -/* 59F518 80218E38 24020002 */ addiu $v0, $zero, 2 -/* 59F51C 80218E3C 03E00008 */ jr $ra -/* 59F520 80218E40 27BD0020 */ addiu $sp, $sp, 0x20 -/* 59F524 80218E44 00000000 */ nop -/* 59F528 80218E48 00000000 */ nop -/* 59F52C 80218E4C 00000000 */ nop diff --git a/ver/us/asm/nonmatchings/battle/area_tik2/608CB0/func_80218258_608D08.s b/ver/us/asm/nonmatchings/battle/area_tik2/608CB0/func_80218258_608D08.s deleted file mode 100644 index 76a072daaa..0000000000 --- a/ver/us/asm/nonmatchings/battle/area_tik2/608CB0/func_80218258_608D08.s +++ /dev/null @@ -1,41 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_80218258_608D08 -/* 608D08 80218258 27BDFFD8 */ addiu $sp, $sp, -0x28 -/* 608D0C 8021825C AFB00010 */ sw $s0, 0x10($sp) -/* 608D10 80218260 0080802D */ daddu $s0, $a0, $zero -/* 608D14 80218264 AFBF0018 */ sw $ra, 0x18($sp) -/* 608D18 80218268 AFB10014 */ sw $s1, 0x14($sp) -/* 608D1C 8021826C F7B40020 */ sdc1 $f20, 0x20($sp) -/* 608D20 80218270 8E02000C */ lw $v0, 0xc($s0) -/* 608D24 80218274 8C450004 */ lw $a1, 4($v0) -/* 608D28 80218278 0C0B210B */ jal evt_get_float_variable -/* 608D2C 8021827C 8C510000 */ lw $s1, ($v0) -/* 608D30 80218280 46000506 */ mov.s $f20, $f0 -/* 608D34 80218284 0200202D */ daddu $a0, $s0, $zero -/* 608D38 80218288 0C0B210B */ jal evt_get_float_variable -/* 608D3C 8021828C 0220282D */ daddu $a1, $s1, $zero -/* 608D40 80218290 3C0140C9 */ lui $at, 0x40c9 -/* 608D44 80218294 34210FD0 */ ori $at, $at, 0xfd0 -/* 608D48 80218298 44811000 */ mtc1 $at, $f2 -/* 608D4C 8021829C 00000000 */ nop -/* 608D50 802182A0 46020002 */ mul.s $f0, $f0, $f2 -/* 608D54 802182A4 00000000 */ nop -/* 608D58 802182A8 3C0143B4 */ lui $at, 0x43b4 -/* 608D5C 802182AC 44816000 */ mtc1 $at, $f12 -/* 608D60 802182B0 0C00A85B */ jal sin_rad -/* 608D64 802182B4 460C0303 */ div.s $f12, $f0, $f12 -/* 608D68 802182B8 4600A502 */ mul.s $f20, $f20, $f0 -/* 608D6C 802182BC 00000000 */ nop -/* 608D70 802182C0 0200202D */ daddu $a0, $s0, $zero -/* 608D74 802182C4 4406A000 */ mfc1 $a2, $f20 -/* 608D78 802182C8 0C0B2190 */ jal evt_set_float_variable -/* 608D7C 802182CC 0220282D */ daddu $a1, $s1, $zero -/* 608D80 802182D0 8FBF0018 */ lw $ra, 0x18($sp) -/* 608D84 802182D4 8FB10014 */ lw $s1, 0x14($sp) -/* 608D88 802182D8 8FB00010 */ lw $s0, 0x10($sp) -/* 608D8C 802182DC D7B40020 */ ldc1 $f20, 0x20($sp) -/* 608D90 802182E0 24020002 */ addiu $v0, $zero, 2 -/* 608D94 802182E4 03E00008 */ jr $ra -/* 608D98 802182E8 27BD0028 */ addiu $sp, $sp, 0x28 diff --git a/ver/us/asm/nonmatchings/battle/area_tik2/608CB0/func_80218404_608EB4.s b/ver/us/asm/nonmatchings/battle/area_tik2/608CB0/func_80218404_608EB4.s deleted file mode 100644 index 719a0259cb..0000000000 --- a/ver/us/asm/nonmatchings/battle/area_tik2/608CB0/func_80218404_608EB4.s +++ /dev/null @@ -1,60 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_80218404_608EB4 -/* 608EB4 80218404 27BDFFC8 */ addiu $sp, $sp, -0x38 -/* 608EB8 80218408 AFB10014 */ sw $s1, 0x14($sp) -/* 608EBC 8021840C 0080882D */ daddu $s1, $a0, $zero -/* 608EC0 80218410 AFBF001C */ sw $ra, 0x1c($sp) -/* 608EC4 80218414 AFB20018 */ sw $s2, 0x18($sp) -/* 608EC8 80218418 AFB00010 */ sw $s0, 0x10($sp) -/* 608ECC 8021841C F7B80030 */ sdc1 $f24, 0x30($sp) -/* 608ED0 80218420 F7B60028 */ sdc1 $f22, 0x28($sp) -/* 608ED4 80218424 F7B40020 */ sdc1 $f20, 0x20($sp) -/* 608ED8 80218428 8E30000C */ lw $s0, 0xc($s1) -/* 608EDC 8021842C 8E050000 */ lw $a1, ($s0) -/* 608EE0 80218430 0C0B1EAF */ jal evt_get_variable -/* 608EE4 80218434 26100004 */ addiu $s0, $s0, 4 -/* 608EE8 80218438 8E050000 */ lw $a1, ($s0) -/* 608EEC 8021843C 26100004 */ addiu $s0, $s0, 4 -/* 608EF0 80218440 0220202D */ daddu $a0, $s1, $zero -/* 608EF4 80218444 0C0B1EAF */ jal evt_get_variable -/* 608EF8 80218448 0040902D */ daddu $s2, $v0, $zero -/* 608EFC 8021844C 8E050000 */ lw $a1, ($s0) -/* 608F00 80218450 26100004 */ addiu $s0, $s0, 4 -/* 608F04 80218454 4482C000 */ mtc1 $v0, $f24 -/* 608F08 80218458 00000000 */ nop -/* 608F0C 8021845C 4680C620 */ cvt.s.w $f24, $f24 -/* 608F10 80218460 0C0B1EAF */ jal evt_get_variable -/* 608F14 80218464 0220202D */ daddu $a0, $s1, $zero -/* 608F18 80218468 8E050000 */ lw $a1, ($s0) -/* 608F1C 8021846C 26100004 */ addiu $s0, $s0, 4 -/* 608F20 80218470 4482B000 */ mtc1 $v0, $f22 -/* 608F24 80218474 00000000 */ nop -/* 608F28 80218478 4680B5A0 */ cvt.s.w $f22, $f22 -/* 608F2C 8021847C 0C0B1EAF */ jal evt_get_variable -/* 608F30 80218480 0220202D */ daddu $a0, $s1, $zero -/* 608F34 80218484 8E050000 */ lw $a1, ($s0) -/* 608F38 80218488 4482A000 */ mtc1 $v0, $f20 -/* 608F3C 8021848C 00000000 */ nop -/* 608F40 80218490 4680A520 */ cvt.s.w $f20, $f20 -/* 608F44 80218494 0C0B210B */ jal evt_get_float_variable -/* 608F48 80218498 0220202D */ daddu $a0, $s1, $zero -/* 608F4C 8021849C 8E42000C */ lw $v0, 0xc($s2) -/* 608F50 802184A0 E4580004 */ swc1 $f24, 4($v0) -/* 608F54 802184A4 8E42000C */ lw $v0, 0xc($s2) -/* 608F58 802184A8 E4560008 */ swc1 $f22, 8($v0) -/* 608F5C 802184AC 8E42000C */ lw $v0, 0xc($s2) -/* 608F60 802184B0 E454000C */ swc1 $f20, 0xc($v0) -/* 608F64 802184B4 8E43000C */ lw $v1, 0xc($s2) -/* 608F68 802184B8 E4600038 */ swc1 $f0, 0x38($v1) -/* 608F6C 802184BC 8FBF001C */ lw $ra, 0x1c($sp) -/* 608F70 802184C0 8FB20018 */ lw $s2, 0x18($sp) -/* 608F74 802184C4 8FB10014 */ lw $s1, 0x14($sp) -/* 608F78 802184C8 8FB00010 */ lw $s0, 0x10($sp) -/* 608F7C 802184CC D7B80030 */ ldc1 $f24, 0x30($sp) -/* 608F80 802184D0 D7B60028 */ ldc1 $f22, 0x28($sp) -/* 608F84 802184D4 D7B40020 */ ldc1 $f20, 0x20($sp) -/* 608F88 802184D8 24020002 */ addiu $v0, $zero, 2 -/* 608F8C 802184DC 03E00008 */ jr $ra -/* 608F90 802184E0 27BD0038 */ addiu $sp, $sp, 0x38 diff --git a/ver/us/asm/nonmatchings/battle/partner/lakilester/func_80238B50_70C860.s b/ver/us/asm/nonmatchings/battle/partner/lakilester/func_80238B50_70C860.s deleted file mode 100644 index 18ff5669ca..0000000000 --- a/ver/us/asm/nonmatchings/battle/partner/lakilester/func_80238B50_70C860.s +++ /dev/null @@ -1,60 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_80238B50_70C860 -/* 70C860 80238B50 3C02800E */ lui $v0, %hi(gBattleStatus+0xDC) -/* 70C864 80238B54 8C42C14C */ lw $v0, %lo(gBattleStatus+0xDC)($v0) -/* 70C868 80238B58 8C420008 */ lw $v0, 8($v0) -/* 70C86C 80238B5C 24030001 */ addiu $v1, $zero, 1 -/* 70C870 80238B60 90450006 */ lbu $a1, 6($v0) -/* 70C874 80238B64 8C8700AC */ lw $a3, 0xac($a0) -/* 70C878 80238B68 10A30010 */ beq $a1, $v1, .L80238BAC -/* 70C87C 80238B6C 0000302D */ daddu $a2, $zero, $zero -/* 70C880 80238B70 28A20002 */ slti $v0, $a1, 2 -/* 70C884 80238B74 10400005 */ beqz $v0, .L80238B8C -/* 70C888 80238B78 24020002 */ addiu $v0, $zero, 2 -/* 70C88C 80238B7C 10A00007 */ beqz $a1, .L80238B9C -/* 70C890 80238B80 28E20064 */ slti $v0, $a3, 0x64 -/* 70C894 80238B84 0808E2FE */ j .L80238BF8 -/* 70C898 80238B88 00000000 */ nop -.L80238B8C: -/* 70C89C 80238B8C 10A2000F */ beq $a1, $v0, .L80238BCC -/* 70C8A0 80238B90 28E20064 */ slti $v0, $a3, 0x64 -/* 70C8A4 80238B94 0808E2FE */ j .L80238BF8 -/* 70C8A8 80238B98 00000000 */ nop -.L80238B9C: -/* 70C8AC 80238B9C 10400015 */ beqz $v0, .L80238BF4 -/* 70C8B0 80238BA0 24060002 */ addiu $a2, $zero, 2 -/* 70C8B4 80238BA4 0808E2FD */ j .L80238BF4 -/* 70C8B8 80238BA8 24060001 */ addiu $a2, $zero, 1 -.L80238BAC: -/* 70C8BC 80238BAC 28E20047 */ slti $v0, $a3, 0x47 -/* 70C8C0 80238BB0 14400010 */ bnez $v0, .L80238BF4 -/* 70C8C4 80238BB4 24060001 */ addiu $a2, $zero, 1 -/* 70C8C8 80238BB8 28E20064 */ slti $v0, $a3, 0x64 -/* 70C8CC 80238BBC 1040000E */ beqz $v0, .L80238BF8 -/* 70C8D0 80238BC0 24060003 */ addiu $a2, $zero, 3 -/* 70C8D4 80238BC4 0808E2FE */ j .L80238BF8 -/* 70C8D8 80238BC8 24060002 */ addiu $a2, $zero, 2 -.L80238BCC: -/* 70C8DC 80238BCC 28E20029 */ slti $v0, $a3, 0x29 -/* 70C8E0 80238BD0 14400008 */ bnez $v0, .L80238BF4 -/* 70C8E4 80238BD4 24060001 */ addiu $a2, $zero, 1 -/* 70C8E8 80238BD8 28E20047 */ slti $v0, $a3, 0x47 -/* 70C8EC 80238BDC 14400005 */ bnez $v0, .L80238BF4 -/* 70C8F0 80238BE0 24060002 */ addiu $a2, $zero, 2 -/* 70C8F4 80238BE4 28E20064 */ slti $v0, $a3, 0x64 -/* 70C8F8 80238BE8 10400003 */ beqz $v0, .L80238BF8 -/* 70C8FC 80238BEC 24060004 */ addiu $a2, $zero, 4 -/* 70C900 80238BF0 24060003 */ addiu $a2, $zero, 3 -.L80238BF4: -/* 70C904 80238BF4 28E20064 */ slti $v0, $a3, 0x64 -.L80238BF8: -/* 70C908 80238BF8 54400003 */ bnel $v0, $zero, .L80238C08 -/* 70C90C 80238BFC AC800084 */ sw $zero, 0x84($a0) -/* 70C910 80238C00 24020001 */ addiu $v0, $zero, 1 -/* 70C914 80238C04 AC820084 */ sw $v0, 0x84($a0) -.L80238C08: -/* 70C918 80238C08 AC8600C0 */ sw $a2, 0xc0($a0) -/* 70C91C 80238C0C 03E00008 */ jr $ra -/* 70C920 80238C10 24020002 */ addiu $v0, $zero, 2 diff --git a/ver/us/asm/nonmatchings/battle/partner/lakilester/func_80238D8C_70CA9C.s b/ver/us/asm/nonmatchings/battle/partner/lakilester/func_80238D8C_70CA9C.s deleted file mode 100644 index 0a52b854f8..0000000000 --- a/ver/us/asm/nonmatchings/battle/partner/lakilester/func_80238D8C_70CA9C.s +++ /dev/null @@ -1,207 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_80238D8C_70CA9C -/* 70CA9C 80238D8C 27BDFFC8 */ addiu $sp, $sp, -0x38 -/* 70CAA0 80238D90 AFB50024 */ sw $s5, 0x24($sp) -/* 70CAA4 80238D94 3C15800E */ lui $s5, %hi(gBattleStatus+0xDC) -/* 70CAA8 80238D98 8EB5C14C */ lw $s5, %lo(gBattleStatus+0xDC)($s5) -/* 70CAAC 80238D9C AFBF0034 */ sw $ra, 0x34($sp) -/* 70CAB0 80238DA0 AFBE0030 */ sw $fp, 0x30($sp) -/* 70CAB4 80238DA4 AFB7002C */ sw $s7, 0x2c($sp) -/* 70CAB8 80238DA8 AFB60028 */ sw $s6, 0x28($sp) -/* 70CABC 80238DAC AFB40020 */ sw $s4, 0x20($sp) -/* 70CAC0 80238DB0 AFB3001C */ sw $s3, 0x1c($sp) -/* 70CAC4 80238DB4 AFB20018 */ sw $s2, 0x18($sp) -/* 70CAC8 80238DB8 AFB10014 */ sw $s1, 0x14($sp) -/* 70CACC 80238DBC AFB00010 */ sw $s0, 0x10($sp) -/* 70CAD0 80238DC0 AFA40038 */ sw $a0, 0x38($sp) -/* 70CAD4 80238DC4 3C018024 */ lui $at, %hi(D_8023D330) -/* 70CAD8 80238DC8 AC20D330 */ sw $zero, %lo(D_8023D330)($at) -/* 70CADC 80238DCC 3C018024 */ lui $at, %hi(D_8023D334) -/* 70CAE0 80238DD0 AC20D334 */ sw $zero, %lo(D_8023D334)($at) -/* 70CAE4 80238DD4 82A2040C */ lb $v0, 0x40c($s5) -/* 70CAE8 80238DD8 18400009 */ blez $v0, .L80238E00 -/* 70CAEC 80238DDC 0000982D */ daddu $s3, $zero, $zero -/* 70CAF0 80238DE0 3C038024 */ lui $v1, %hi(D_8023D2D0) -/* 70CAF4 80238DE4 2463D2D0 */ addiu $v1, $v1, %lo(D_8023D2D0) -.L80238DE8: -/* 70CAF8 80238DE8 AC600000 */ sw $zero, ($v1) -/* 70CAFC 80238DEC 82A2040C */ lb $v0, 0x40c($s5) -/* 70CB00 80238DF0 26730001 */ addiu $s3, $s3, 1 -/* 70CB04 80238DF4 0262102A */ slt $v0, $s3, $v0 -/* 70CB08 80238DF8 1440FFFB */ bnez $v0, .L80238DE8 -/* 70CB0C 80238DFC 24630004 */ addiu $v1, $v1, 4 -.L80238E00: -/* 70CB10 80238E00 0000B02D */ daddu $s6, $zero, $zero -/* 70CB14 80238E04 02C0902D */ daddu $s2, $s6, $zero -/* 70CB18 80238E08 82A2040C */ lb $v0, 0x40c($s5) -/* 70CB1C 80238E0C 18400056 */ blez $v0, .L80238F68 -/* 70CB20 80238E10 02C0982D */ daddu $s3, $s6, $zero -/* 70CB24 80238E14 3C1751EB */ lui $s7, 0x51eb -/* 70CB28 80238E18 36F7851F */ ori $s7, $s7, 0x851f -/* 70CB2C 80238E1C 3C1E8024 */ lui $fp, %hi(D_8023D2D0) -/* 70CB30 80238E20 27DED2D0 */ addiu $fp, $fp, %lo(D_8023D2D0) -.L80238E24: -/* 70CB34 80238E24 02B31021 */ addu $v0, $s5, $s3 -/* 70CB38 80238E28 8054040D */ lb $s4, 0x40d($v0) -/* 70CB3C 80238E2C 00141080 */ sll $v0, $s4, 2 -/* 70CB40 80238E30 00541021 */ addu $v0, $v0, $s4 -/* 70CB44 80238E34 00021080 */ sll $v0, $v0, 2 -/* 70CB48 80238E38 2442022C */ addiu $v0, $v0, 0x22c -/* 70CB4C 80238E3C 02A28021 */ addu $s0, $s5, $v0 -/* 70CB50 80238E40 0C09A75B */ jal get_actor -/* 70CB54 80238E44 86040000 */ lh $a0, ($s0) -/* 70CB58 80238E48 0040882D */ daddu $s1, $v0, $zero -/* 70CB5C 80238E4C 86050002 */ lh $a1, 2($s0) -/* 70CB60 80238E50 0C099117 */ jal get_actor_part -/* 70CB64 80238E54 0220202D */ daddu $a0, $s1, $zero -/* 70CB68 80238E58 822401B8 */ lb $a0, 0x1b8($s1) -/* 70CB6C 80238E5C 00041840 */ sll $v1, $a0, 1 -/* 70CB70 80238E60 00641821 */ addu $v1, $v1, $a0 -/* 70CB74 80238E64 000318C0 */ sll $v1, $v1, 3 -/* 70CB78 80238E68 00641821 */ addu $v1, $v1, $a0 -/* 70CB7C 80238E6C 822401B9 */ lb $a0, 0x1b9($s1) -/* 70CB80 80238E70 00031880 */ sll $v1, $v1, 2 -/* 70CB84 80238E74 14800002 */ bnez $a0, .L80238E80 -/* 70CB88 80238E78 0064001A */ div $zero, $v1, $a0 -/* 70CB8C 80238E7C 0007000D */ break 7 -.L80238E80: -/* 70CB90 80238E80 2401FFFF */ addiu $at, $zero, -1 -/* 70CB94 80238E84 14810004 */ bne $a0, $at, .L80238E98 -/* 70CB98 80238E88 3C018000 */ lui $at, 0x8000 -/* 70CB9C 80238E8C 14610002 */ bne $v1, $at, .L80238E98 -/* 70CBA0 80238E90 00000000 */ nop -/* 70CBA4 80238E94 0006000D */ break 6 -.L80238E98: -/* 70CBA8 80238E98 00001812 */ mflo $v1 -/* 70CBAC 80238E9C 0040282D */ daddu $a1, $v0, $zero -/* 70CBB0 80238EA0 8E240008 */ lw $a0, 8($s1) -/* 70CBB4 80238EA4 24020064 */ addiu $v0, $zero, 0x64 -/* 70CBB8 80238EA8 9084001A */ lbu $a0, 0x1a($a0) -/* 70CBBC 80238EAC 18800026 */ blez $a0, .L80238F48 -/* 70CBC0 80238EB0 00431023 */ subu $v0, $v0, $v1 -/* 70CBC4 80238EB4 00820018 */ mult $a0, $v0 -/* 70CBC8 80238EB8 00001812 */ mflo $v1 -/* 70CBCC 80238EBC 00000000 */ nop -/* 70CBD0 80238EC0 00000000 */ nop -/* 70CBD4 80238EC4 00770018 */ mult $v1, $s7 -/* 70CBD8 80238EC8 00031FC3 */ sra $v1, $v1, 0x1f -/* 70CBDC 80238ECC 00003810 */ mfhi $a3 -/* 70CBE0 80238ED0 00071143 */ sra $v0, $a3, 5 -/* 70CBE4 80238ED4 00431023 */ subu $v0, $v0, $v1 -/* 70CBE8 80238ED8 00822021 */ addu $a0, $a0, $v0 -/* 70CBEC 80238EDC 28820065 */ slti $v0, $a0, 0x65 -/* 70CBF0 80238EE0 50400001 */ beql $v0, $zero, .L80238EE8 -/* 70CBF4 80238EE4 24040064 */ addiu $a0, $zero, 0x64 -.L80238EE8: -/* 70CBF8 80238EE8 82220210 */ lb $v0, 0x210($s1) -/* 70CBFC 80238EEC 1040000D */ beqz $v0, .L80238F24 -/* 70CC00 80238EF0 00041880 */ sll $v1, $a0, 2 -/* 70CC04 80238EF4 00641821 */ addu $v1, $v1, $a0 -/* 70CC08 80238EF8 00031100 */ sll $v0, $v1, 4 -/* 70CC0C 80238EFC 00431023 */ subu $v0, $v0, $v1 -/* 70CC10 80238F00 00021040 */ sll $v0, $v0, 1 -/* 70CC14 80238F04 00570018 */ mult $v0, $s7 -/* 70CC18 80238F08 000217C3 */ sra $v0, $v0, 0x1f -/* 70CC1C 80238F0C 00003010 */ mfhi $a2 -/* 70CC20 80238F10 00061943 */ sra $v1, $a2, 5 -/* 70CC24 80238F14 00622023 */ subu $a0, $v1, $v0 -/* 70CC28 80238F18 28820097 */ slti $v0, $a0, 0x97 -/* 70CC2C 80238F1C 50400001 */ beql $v0, $zero, .L80238F24 -/* 70CC30 80238F20 24040096 */ addiu $a0, $zero, 0x96 -.L80238F24: -/* 70CC34 80238F24 82230218 */ lb $v1, 0x218($s1) -/* 70CC38 80238F28 2402000E */ addiu $v0, $zero, 0xe -/* 70CC3C 80238F2C 50620001 */ beql $v1, $v0, .L80238F34 -/* 70CC40 80238F30 0000202D */ daddu $a0, $zero, $zero -.L80238F34: -/* 70CC44 80238F34 8CA2007C */ lw $v0, 0x7c($a1) -/* 70CC48 80238F38 30420020 */ andi $v0, $v0, 0x20 -/* 70CC4C 80238F3C 54400001 */ bnel $v0, $zero, .L80238F44 -/* 70CC50 80238F40 0000202D */ daddu $a0, $zero, $zero -.L80238F44: -/* 70CC54 80238F44 26520001 */ addiu $s2, $s2, 1 -.L80238F48: -/* 70CC58 80238F48 00141080 */ sll $v0, $s4, 2 -/* 70CC5C 80238F4C 005E1021 */ addu $v0, $v0, $fp -/* 70CC60 80238F50 AC440000 */ sw $a0, ($v0) -/* 70CC64 80238F54 82A2040C */ lb $v0, 0x40c($s5) -/* 70CC68 80238F58 26730001 */ addiu $s3, $s3, 1 -/* 70CC6C 80238F5C 0262102A */ slt $v0, $s3, $v0 -/* 70CC70 80238F60 1440FFB0 */ bnez $v0, .L80238E24 -/* 70CC74 80238F64 02C4B021 */ addu $s6, $s6, $a0 -.L80238F68: -/* 70CC78 80238F68 5240000B */ beql $s2, $zero, .L80238F98 -/* 70CC7C 80238F6C 0000B02D */ daddu $s6, $zero, $zero -/* 70CC80 80238F70 16400002 */ bnez $s2, .L80238F7C -/* 70CC84 80238F74 02D2001A */ div $zero, $s6, $s2 -/* 70CC88 80238F78 0007000D */ break 7 -.L80238F7C: -/* 70CC8C 80238F7C 2401FFFF */ addiu $at, $zero, -1 -/* 70CC90 80238F80 16410004 */ bne $s2, $at, .L80238F94 -/* 70CC94 80238F84 3C018000 */ lui $at, 0x8000 -/* 70CC98 80238F88 16C10002 */ bne $s6, $at, .L80238F94 -/* 70CC9C 80238F8C 00000000 */ nop -/* 70CCA0 80238F90 0006000D */ break 6 -.L80238F94: -/* 70CCA4 80238F94 0000B012 */ mflo $s6 -.L80238F98: -/* 70CCA8 80238F98 8FA60038 */ lw $a2, 0x38($sp) -/* 70CCAC 80238F9C ACD60084 */ sw $s6, 0x84($a2) -/* 70CCB0 80238FA0 82A2040C */ lb $v0, 0x40c($s5) -/* 70CCB4 80238FA4 18400024 */ blez $v0, .L80239038 -/* 70CCB8 80238FA8 0000982D */ daddu $s3, $zero, $zero -/* 70CCBC 80238FAC 3C178024 */ lui $s7, %hi(D_8023D2D0) -/* 70CCC0 80238FB0 26F7D2D0 */ addiu $s7, $s7, %lo(D_8023D2D0) -/* 70CCC4 80238FB4 241EFFFF */ addiu $fp, $zero, -1 -/* 70CCC8 80238FB8 02B31021 */ addu $v0, $s5, $s3 -.L80238FBC: -/* 70CCCC 80238FBC 8054040D */ lb $s4, 0x40d($v0) -/* 70CCD0 80238FC0 00149080 */ sll $s2, $s4, 2 -/* 70CCD4 80238FC4 02541021 */ addu $v0, $s2, $s4 -/* 70CCD8 80238FC8 00021080 */ sll $v0, $v0, 2 -/* 70CCDC 80238FCC 2442022C */ addiu $v0, $v0, 0x22c -/* 70CCE0 80238FD0 02A28021 */ addu $s0, $s5, $v0 -/* 70CCE4 80238FD4 0C09A75B */ jal get_actor -/* 70CCE8 80238FD8 86040000 */ lh $a0, ($s0) -/* 70CCEC 80238FDC 0040882D */ daddu $s1, $v0, $zero -/* 70CCF0 80238FE0 86050002 */ lh $a1, 2($s0) -/* 70CCF4 80238FE4 0C099117 */ jal get_actor_part -/* 70CCF8 80238FE8 0220202D */ daddu $a0, $s1, $zero -/* 70CCFC 80238FEC 82230218 */ lb $v1, 0x218($s1) -/* 70CD00 80238FF0 2406000E */ addiu $a2, $zero, 0xe -/* 70CD04 80238FF4 10660005 */ beq $v1, $a2, .L8023900C -/* 70CD08 80238FF8 0040282D */ daddu $a1, $v0, $zero -/* 70CD0C 80238FFC 8CA2007C */ lw $v0, 0x7c($a1) -/* 70CD10 80239000 30420020 */ andi $v0, $v0, 0x20 -/* 70CD14 80239004 10400004 */ beqz $v0, .L80239018 -/* 70CD18 80239008 02571821 */ addu $v1, $s2, $s7 -.L8023900C: -/* 70CD1C 8023900C 02571021 */ addu $v0, $s2, $s7 -/* 70CD20 80239010 0808E409 */ j .L80239024 -/* 70CD24 80239014 AC5E0000 */ sw $fp, ($v0) -.L80239018: -/* 70CD28 80239018 8C620000 */ lw $v0, ($v1) -/* 70CD2C 8023901C 54400001 */ bnel $v0, $zero, .L80239024 -/* 70CD30 80239020 AC760000 */ sw $s6, ($v1) -.L80239024: -/* 70CD34 80239024 82A2040C */ lb $v0, 0x40c($s5) -/* 70CD38 80239028 26730001 */ addiu $s3, $s3, 1 -/* 70CD3C 8023902C 0262102A */ slt $v0, $s3, $v0 -/* 70CD40 80239030 1440FFE2 */ bnez $v0, .L80238FBC -/* 70CD44 80239034 02B31021 */ addu $v0, $s5, $s3 -.L80239038: -/* 70CD48 80239038 8FBF0034 */ lw $ra, 0x34($sp) -/* 70CD4C 8023903C 8FBE0030 */ lw $fp, 0x30($sp) -/* 70CD50 80239040 8FB7002C */ lw $s7, 0x2c($sp) -/* 70CD54 80239044 8FB60028 */ lw $s6, 0x28($sp) -/* 70CD58 80239048 8FB50024 */ lw $s5, 0x24($sp) -/* 70CD5C 8023904C 8FB40020 */ lw $s4, 0x20($sp) -/* 70CD60 80239050 8FB3001C */ lw $s3, 0x1c($sp) -/* 70CD64 80239054 8FB20018 */ lw $s2, 0x18($sp) -/* 70CD68 80239058 8FB10014 */ lw $s1, 0x14($sp) -/* 70CD6C 8023905C 8FB00010 */ lw $s0, 0x10($sp) -/* 70CD70 80239060 24020002 */ addiu $v0, $zero, 2 -/* 70CD74 80239064 03E00008 */ jr $ra -/* 70CD78 80239068 27BD0038 */ addiu $sp, $sp, 0x38 diff --git a/ver/us/asm/nonmatchings/battle/partner/lakilester/func_8023906C_70CD7C.s b/ver/us/asm/nonmatchings/battle/partner/lakilester/func_8023906C_70CD7C.s deleted file mode 100644 index d15824ee15..0000000000 --- a/ver/us/asm/nonmatchings/battle/partner/lakilester/func_8023906C_70CD7C.s +++ /dev/null @@ -1,60 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_8023906C_70CD7C -/* 70CD7C 8023906C 27BDFFD8 */ addiu $sp, $sp, -0x28 -/* 70CD80 80239070 AFB3001C */ sw $s3, 0x1c($sp) -/* 70CD84 80239074 0080982D */ daddu $s3, $a0, $zero -/* 70CD88 80239078 3C06800E */ lui $a2, %hi(gBattleStatus) -/* 70CD8C 8023907C 24C6C070 */ addiu $a2, $a2, %lo(gBattleStatus) -/* 70CD90 80239080 AFBF0024 */ sw $ra, 0x24($sp) -/* 70CD94 80239084 AFB40020 */ sw $s4, 0x20($sp) -/* 70CD98 80239088 AFB20018 */ sw $s2, 0x18($sp) -/* 70CD9C 8023908C AFB10014 */ sw $s1, 0x14($sp) -/* 70CDA0 80239090 AFB00010 */ sw $s0, 0x10($sp) -/* 70CDA4 80239094 8CC400DC */ lw $a0, 0xdc($a2) -/* 70CDA8 80239098 80820425 */ lb $v0, 0x425($a0) -/* 70CDAC 8023909C 3C038024 */ lui $v1, %hi(D_8023D2D0) -/* 70CDB0 802390A0 2463D2D0 */ addiu $v1, $v1, %lo(D_8023D2D0) -/* 70CDB4 802390A4 00821021 */ addu $v0, $a0, $v0 -/* 70CDB8 802390A8 8045040D */ lb $a1, 0x40d($v0) -/* 70CDBC 802390AC 00051080 */ sll $v0, $a1, 2 -/* 70CDC0 802390B0 00438021 */ addu $s0, $v0, $v1 -/* 70CDC4 802390B4 00451021 */ addu $v0, $v0, $a1 -/* 70CDC8 802390B8 00021080 */ sll $v0, $v0, 2 -/* 70CDCC 802390BC 2442022C */ addiu $v0, $v0, 0x22c -/* 70CDD0 802390C0 8E030000 */ lw $v1, ($s0) -/* 70CDD4 802390C4 00828821 */ addu $s1, $a0, $v0 -/* 70CDD8 802390C8 AE630084 */ sw $v1, 0x84($s3) -/* 70CDDC 802390CC 8E020000 */ lw $v0, ($s0) -/* 70CDE0 802390D0 2412FFFF */ addiu $s2, $zero, -1 -/* 70CDE4 802390D4 10520011 */ beq $v0, $s2, .L8023911C -/* 70CDE8 802390D8 00C0A02D */ daddu $s4, $a2, $zero -/* 70CDEC 802390DC 10400010 */ beqz $v0, .L80239120 -/* 70CDF0 802390E0 24020002 */ addiu $v0, $zero, 2 -/* 70CDF4 802390E4 86240000 */ lh $a0, ($s1) -/* 70CDF8 802390E8 0C09A75B */ jal get_actor -/* 70CDFC 802390EC 00000000 */ nop -/* 70CE00 802390F0 0C00A67F */ jal rand_int -/* 70CE04 802390F4 24040063 */ addiu $a0, $zero, 0x63 -/* 70CE08 802390F8 82830081 */ lb $v1, 0x81($s4) -/* 70CE0C 802390FC 0043102A */ slt $v0, $v0, $v1 -/* 70CE10 80239100 50400005 */ beql $v0, $zero, .L80239118 -/* 70CE14 80239104 AE000000 */ sw $zero, ($s0) -/* 70CE18 80239108 AE120000 */ sw $s2, ($s0) -/* 70CE1C 8023910C 86220000 */ lh $v0, ($s1) -/* 70CE20 80239110 0808E447 */ j .L8023911C -/* 70CE24 80239114 AE620084 */ sw $v0, 0x84($s3) -.L80239118: -/* 70CE28 80239118 AE600084 */ sw $zero, 0x84($s3) -.L8023911C: -/* 70CE2C 8023911C 24020002 */ addiu $v0, $zero, 2 -.L80239120: -/* 70CE30 80239120 8FBF0024 */ lw $ra, 0x24($sp) -/* 70CE34 80239124 8FB40020 */ lw $s4, 0x20($sp) -/* 70CE38 80239128 8FB3001C */ lw $s3, 0x1c($sp) -/* 70CE3C 8023912C 8FB20018 */ lw $s2, 0x18($sp) -/* 70CE40 80239130 8FB10014 */ lw $s1, 0x14($sp) -/* 70CE44 80239134 8FB00010 */ lw $s0, 0x10($sp) -/* 70CE48 80239138 03E00008 */ jr $ra -/* 70CE4C 8023913C 27BD0028 */ addiu $sp, $sp, 0x28 diff --git a/ver/us/asm/nonmatchings/battle/partner/lakilester/func_80239F84_70DC94.s b/ver/us/asm/nonmatchings/battle/partner/lakilester/func_80239F84_70DC94.s deleted file mode 100644 index cc31c6130f..0000000000 --- a/ver/us/asm/nonmatchings/battle/partner/lakilester/func_80239F84_70DC94.s +++ /dev/null @@ -1,150 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -.section .rodata - -dlabel D_8023D1D0_710EE0 -.double 1.4, 0.0 - -.section .text - -glabel func_80239F84_70DC94 -/* 70DC94 80239F84 27BDFFD8 */ addiu $sp, $sp, -0x28 -/* 70DC98 80239F88 AFB10014 */ sw $s1, 0x14($sp) -/* 70DC9C 80239F8C AFBF001C */ sw $ra, 0x1c($sp) -/* 70DCA0 80239F90 AFB20018 */ sw $s2, 0x18($sp) -/* 70DCA4 80239F94 AFB00010 */ sw $s0, 0x10($sp) -/* 70DCA8 80239F98 F7B40020 */ sdc1 $f20, 0x20($sp) -/* 70DCAC 80239F9C 10A00006 */ beqz $a1, .L80239FB8 -/* 70DCB0 80239FA0 0080882D */ daddu $s1, $a0, $zero -/* 70DCB4 80239FA4 8E2400AC */ lw $a0, 0xac($s1) -/* 70DCB8 80239FA8 0C09A75B */ jal get_actor -/* 70DCBC 80239FAC 00000000 */ nop -/* 70DCC0 80239FB0 AE220074 */ sw $v0, 0x74($s1) -/* 70DCC4 80239FB4 AE200070 */ sw $zero, 0x70($s1) -.L80239FB8: -/* 70DCC8 80239FB8 8E300074 */ lw $s0, 0x74($s1) -/* 70DCCC 80239FBC 8E230070 */ lw $v1, 0x70($s1) -/* 70DCD0 80239FC0 10600006 */ beqz $v1, .L80239FDC -/* 70DCD4 80239FC4 2612000C */ addiu $s2, $s0, 0xc -/* 70DCD8 80239FC8 24020001 */ addiu $v0, $zero, 1 -/* 70DCDC 80239FCC 1062001B */ beq $v1, $v0, .L8023A03C -/* 70DCE0 80239FD0 00000000 */ nop -/* 70DCE4 80239FD4 0808E859 */ j .L8023A164 -/* 70DCE8 80239FD8 00000000 */ nop -.L80239FDC: -/* 70DCEC 80239FDC 3C038024 */ lui $v1, %hi(D_8023D330) -/* 70DCF0 80239FE0 2463D330 */ addiu $v1, $v1, %lo(D_8023D330) -/* 70DCF4 80239FE4 0200202D */ daddu $a0, $s0, $zero -/* 70DCF8 80239FE8 C6000144 */ lwc1 $f0, 0x144($s0) -/* 70DCFC 80239FEC C6020148 */ lwc1 $f2, 0x148($s0) -/* 70DD00 80239FF0 C604014C */ lwc1 $f4, 0x14c($s0) -/* 70DD04 80239FF4 3C0140B0 */ lui $at, 0x40b0 -/* 70DD08 80239FF8 44813000 */ mtc1 $at, $f6 -/* 70DD0C 80239FFC 8C620000 */ lw $v0, ($v1) -/* 70DD10 8023A000 24050016 */ addiu $a1, $zero, 0x16 -/* 70DD14 8023A004 A6000070 */ sh $zero, 0x70($s0) -/* 70DD18 8023A008 24420001 */ addiu $v0, $v0, 1 -/* 70DD1C 8023A00C E600000C */ swc1 $f0, 0xc($s0) -/* 70DD20 8023A010 E6020010 */ swc1 $f2, 0x10($s0) -/* 70DD24 8023A014 E6040014 */ swc1 $f4, 0x14($s0) -/* 70DD28 8023A018 E606004C */ swc1 $f6, 0x4c($s0) -/* 70DD2C 8023A01C AC620000 */ sw $v0, ($v1) -/* 70DD30 8023A020 3C02800E */ lui $v0, %hi(gBattleStatus) -/* 70DD34 8023A024 2442C070 */ addiu $v0, $v0, %lo(gBattleStatus) -/* 70DD38 8023A028 0C09DC58 */ jal dispatch_event_actor -/* 70DD3C 8023A02C AC400188 */ sw $zero, 0x188($v0) -/* 70DD40 8023A030 24020001 */ addiu $v0, $zero, 1 -/* 70DD44 8023A034 0808E859 */ j .L8023A164 -/* 70DD48 8023A038 AE220070 */ sw $v0, 0x70($s1) -.L8023A03C: -/* 70DD4C 8023A03C C602000C */ lwc1 $f2, 0xc($s0) -/* 70DD50 8023A040 C600004C */ lwc1 $f0, 0x4c($s0) -/* 70DD54 8023A044 86020070 */ lh $v0, 0x70($s0) -/* 70DD58 8023A048 46001080 */ add.s $f2, $f2, $f0 -/* 70DD5C 8023A04C 3C0140C9 */ lui $at, 0x40c9 -/* 70DD60 8023A050 34210FD0 */ ori $at, $at, 0xfd0 -/* 70DD64 8023A054 44810000 */ mtc1 $at, $f0 -/* 70DD68 8023A058 44826000 */ mtc1 $v0, $f12 -/* 70DD6C 8023A05C 00000000 */ nop -/* 70DD70 8023A060 46806320 */ cvt.s.w $f12, $f12 -/* 70DD74 8023A064 46006302 */ mul.s $f12, $f12, $f0 -/* 70DD78 8023A068 00000000 */ nop -/* 70DD7C 8023A06C C6140010 */ lwc1 $f20, 0x10($s0) -/* 70DD80 8023A070 3C0143B4 */ lui $at, 0x43b4 -/* 70DD84 8023A074 44810000 */ mtc1 $at, $f0 -/* 70DD88 8023A078 4600A521 */ cvt.d.s $f20, $f20 -/* 70DD8C 8023A07C E602000C */ swc1 $f2, 0xc($s0) -/* 70DD90 8023A080 0C00A85B */ jal sin_rad -/* 70DD94 8023A084 46006303 */ div.s $f12, $f12, $f0 -/* 70DD98 8023A088 46000000 */ add.s $f0, $f0, $f0 -/* 70DD9C 8023A08C 3C014049 */ lui $at, 0x4049 -/* 70DDA0 8023A090 34210FD0 */ ori $at, $at, 0xfd0 -/* 70DDA4 8023A094 44816000 */ mtc1 $at, $f12 -/* 70DDA8 8023A098 00000000 */ nop -/* 70DDAC 8023A09C 460C0302 */ mul.s $f12, $f0, $f12 -/* 70DDB0 8023A0A0 0C00A85B */ jal sin_rad -/* 70DDB4 8023A0A4 00000000 */ nop -/* 70DDB8 8023A0A8 3C018024 */ lui $at, %hi(D_8023D1D0_710EE0) -/* 70DDBC 8023A0AC D422D1D0 */ ldc1 $f2, %lo(D_8023D1D0_710EE0)($at) -/* 70DDC0 8023A0B0 46000021 */ cvt.d.s $f0, $f0 -/* 70DDC4 8023A0B4 46220002 */ mul.d $f0, $f0, $f2 -/* 70DDC8 8023A0B8 00000000 */ nop -/* 70DDCC 8023A0BC 96030070 */ lhu $v1, 0x70($s0) -/* 70DDD0 8023A0C0 3C013FE0 */ lui $at, 0x3fe0 -/* 70DDD4 8023A0C4 44811800 */ mtc1 $at, $f3 -/* 70DDD8 8023A0C8 44801000 */ mtc1 $zero, $f2 -/* 70DDDC 8023A0CC 24630006 */ addiu $v1, $v1, 6 -/* 70DDE0 8023A0D0 46220000 */ add.d $f0, $f0, $f2 -/* 70DDE4 8023A0D4 00031400 */ sll $v0, $v1, 0x10 -/* 70DDE8 8023A0D8 00021403 */ sra $v0, $v0, 0x10 -/* 70DDEC 8023A0DC 4620A500 */ add.d $f20, $f20, $f0 -/* 70DDF0 8023A0E0 44826000 */ mtc1 $v0, $f12 -/* 70DDF4 8023A0E4 00000000 */ nop -/* 70DDF8 8023A0E8 46806320 */ cvt.s.w $f12, $f12 -/* 70DDFC 8023A0EC A6030070 */ sh $v1, 0x70($s0) -/* 70DE00 8023A0F0 4620A520 */ cvt.s.d $f20, $f20 -/* 70DE04 8023A0F4 0C00A6C9 */ jal clamp_angle -/* 70DE08 8023A0F8 E6140010 */ swc1 $f20, 0x10($s0) -/* 70DE0C 8023A0FC C60C018C */ lwc1 $f12, 0x18c($s0) -/* 70DE10 8023A100 3C014204 */ lui $at, 0x4204 -/* 70DE14 8023A104 44811000 */ mtc1 $at, $f2 -/* 70DE18 8023A108 00000000 */ nop -/* 70DE1C 8023A10C 46026300 */ add.s $f12, $f12, $f2 -/* 70DE20 8023A110 4600020D */ trunc.w.s $f8, $f0 -/* 70DE24 8023A114 44024000 */ mfc1 $v0, $f8 -/* 70DE28 8023A118 00000000 */ nop -/* 70DE2C 8023A11C A6020070 */ sh $v0, 0x70($s0) -/* 70DE30 8023A120 0C00A6C9 */ jal clamp_angle -/* 70DE34 8023A124 E60C018C */ swc1 $f12, 0x18c($s0) -/* 70DE38 8023A128 C604000C */ lwc1 $f4, 0xc($s0) -/* 70DE3C 8023A12C 3C014370 */ lui $at, 0x4370 -/* 70DE40 8023A130 44811000 */ mtc1 $at, $f2 -/* 70DE44 8023A134 00000000 */ nop -/* 70DE48 8023A138 4604103C */ c.lt.s $f2, $f4 -/* 70DE4C 8023A13C 00000000 */ nop -/* 70DE50 8023A140 45000008 */ bc1f .L8023A164 -/* 70DE54 8023A144 E600018C */ swc1 $f0, 0x18c($s0) -/* 70DE58 8023A148 3C048024 */ lui $a0, %hi(D_8023D330) -/* 70DE5C 8023A14C 2484D330 */ addiu $a0, $a0, %lo(D_8023D330) -/* 70DE60 8023A150 8C830000 */ lw $v1, ($a0) -/* 70DE64 8023A154 24020002 */ addiu $v0, $zero, 2 -/* 70DE68 8023A158 2463FFFF */ addiu $v1, $v1, -1 -/* 70DE6C 8023A15C 0808E860 */ j .L8023A180 -/* 70DE70 8023A160 AC830000 */ sw $v1, ($a0) -.L8023A164: -/* 70DE74 8023A164 C6400000 */ lwc1 $f0, ($s2) -/* 70DE78 8023A168 E6000144 */ swc1 $f0, 0x144($s0) -/* 70DE7C 8023A16C C6400004 */ lwc1 $f0, 4($s2) -/* 70DE80 8023A170 E6000148 */ swc1 $f0, 0x148($s0) -/* 70DE84 8023A174 C6400008 */ lwc1 $f0, 8($s2) -/* 70DE88 8023A178 0000102D */ daddu $v0, $zero, $zero -/* 70DE8C 8023A17C E600014C */ swc1 $f0, 0x14c($s0) -.L8023A180: -/* 70DE90 8023A180 8FBF001C */ lw $ra, 0x1c($sp) -/* 70DE94 8023A184 8FB20018 */ lw $s2, 0x18($sp) -/* 70DE98 8023A188 8FB10014 */ lw $s1, 0x14($sp) -/* 70DE9C 8023A18C 8FB00010 */ lw $s0, 0x10($sp) -/* 70DEA0 8023A190 D7B40020 */ ldc1 $f20, 0x20($sp) -/* 70DEA4 8023A194 03E00008 */ jr $ra -/* 70DEA8 8023A198 27BD0028 */ addiu $sp, $sp, 0x28 diff --git a/ver/us/asm/nonmatchings/battle/partner/sushie/func_80238540_7081E0.s b/ver/us/asm/nonmatchings/battle/partner/sushie/func_80238540_7081E0.s index 21749a94ec..56c14aeb84 100644 --- a/ver/us/asm/nonmatchings/battle/partner/sushie/func_80238540_7081E0.s +++ b/ver/us/asm/nonmatchings/battle/partner/sushie/func_80238540_7081E0.s @@ -1,6 +1,13 @@ .set noat # allow manual use of $at .set noreorder # don't insert nops after branches +.section .rodata + +dlabel D_8023C068_70BD08 +.double 0.06 + +.section .text + glabel func_80238540_7081E0 /* 7081E0 80238540 27BDFFC8 */ addiu $sp, $sp, -0x38 /* 7081E4 80238544 AFB10024 */ sw $s1, 0x24($sp) diff --git a/ver/us/asm/nonmatchings/battle/partner/watt/func_80238C84_704774.s b/ver/us/asm/nonmatchings/battle/partner/watt/func_80238C84_704774.s deleted file mode 100644 index cfab56ec1a..0000000000 --- a/ver/us/asm/nonmatchings/battle/partner/watt/func_80238C84_704774.s +++ /dev/null @@ -1,130 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_80238C84_704774 -/* 704774 80238C84 27BDFFD8 */ addiu $sp, $sp, -0x28 -/* 704778 80238C88 AFB20020 */ sw $s2, 0x20($sp) -/* 70477C 80238C8C 0080902D */ daddu $s2, $a0, $zero -/* 704780 80238C90 AFBF0024 */ sw $ra, 0x24($sp) -/* 704784 80238C94 AFB1001C */ sw $s1, 0x1c($sp) -/* 704788 80238C98 AFB00018 */ sw $s0, 0x18($sp) -/* 70478C 80238C9C 8E50000C */ lw $s0, 0xc($s2) -/* 704790 80238CA0 54A00001 */ bnel $a1, $zero, .L80238CA8 -/* 704794 80238CA4 AE400070 */ sw $zero, 0x70($s2) -.L80238CA8: -/* 704798 80238CA8 8E430070 */ lw $v1, 0x70($s2) -/* 70479C 80238CAC 10600005 */ beqz $v1, .L80238CC4 -/* 7047A0 80238CB0 24020001 */ addiu $v0, $zero, 1 -/* 7047A4 80238CB4 1062003F */ beq $v1, $v0, .L80238DB4 -/* 7047A8 80238CB8 0000102D */ daddu $v0, $zero, $zero -/* 7047AC 80238CBC 0808E391 */ j .L80238E44 -/* 7047B0 80238CC0 00000000 */ nop -.L80238CC4: -/* 7047B4 80238CC4 8E050000 */ lw $a1, ($s0) -/* 7047B8 80238CC8 26100004 */ addiu $s0, $s0, 4 -/* 7047BC 80238CCC 0C0B1EAF */ jal evt_get_variable -/* 7047C0 80238CD0 0240202D */ daddu $a0, $s2, $zero -/* 7047C4 80238CD4 AE420074 */ sw $v0, 0x74($s2) -/* 7047C8 80238CD8 8E050000 */ lw $a1, ($s0) -/* 7047CC 80238CDC 26100004 */ addiu $s0, $s0, 4 -/* 7047D0 80238CE0 0C0B1EAF */ jal evt_get_variable -/* 7047D4 80238CE4 0240202D */ daddu $a0, $s2, $zero -/* 7047D8 80238CE8 8E050000 */ lw $a1, ($s0) -/* 7047DC 80238CEC 26100004 */ addiu $s0, $s0, 4 -/* 7047E0 80238CF0 0240202D */ daddu $a0, $s2, $zero -/* 7047E4 80238CF4 0C0B1EAF */ jal evt_get_variable -/* 7047E8 80238CF8 0040882D */ daddu $s1, $v0, $zero -/* 7047EC 80238CFC 0240202D */ daddu $a0, $s2, $zero -/* 7047F0 80238D00 8E050000 */ lw $a1, ($s0) -/* 7047F4 80238D04 0C0B1EAF */ jal evt_get_variable -/* 7047F8 80238D08 0040802D */ daddu $s0, $v0, $zero -/* 7047FC 80238D0C 0000202D */ daddu $a0, $zero, $zero -/* 704800 80238D10 24030014 */ addiu $v1, $zero, 0x14 -/* 704804 80238D14 AE430078 */ sw $v1, 0x78($s2) -/* 704808 80238D18 2403000A */ addiu $v1, $zero, 0xa -/* 70480C 80238D1C 44911000 */ mtc1 $s1, $f2 -/* 704810 80238D20 00000000 */ nop -/* 704814 80238D24 468010A0 */ cvt.s.w $f2, $f2 -/* 704818 80238D28 44051000 */ mfc1 $a1, $f2 -/* 70481C 80238D2C 44901000 */ mtc1 $s0, $f2 -/* 704820 80238D30 00000000 */ nop -/* 704824 80238D34 468010A0 */ cvt.s.w $f2, $f2 -/* 704828 80238D38 3C013F80 */ lui $at, 0x3f80 -/* 70482C 80238D3C 44810000 */ mtc1 $at, $f0 -/* 704830 80238D40 44061000 */ mfc1 $a2, $f2 -/* 704834 80238D44 44821000 */ mtc1 $v0, $f2 -/* 704838 80238D48 00000000 */ nop -/* 70483C 80238D4C 468010A0 */ cvt.s.w $f2, $f2 -/* 704840 80238D50 AE43007C */ sw $v1, 0x7c($s2) -/* 704844 80238D54 E7A00010 */ swc1 $f0, 0x10($sp) -/* 704848 80238D58 8E430078 */ lw $v1, 0x78($s2) -/* 70484C 80238D5C 44071000 */ mfc1 $a3, $f2 -/* 704850 80238D60 2463000A */ addiu $v1, $v1, 0xa -/* 704854 80238D64 0C01C664 */ jal fx_thunderbolt_ring -/* 704858 80238D68 AFA30014 */ sw $v1, 0x14($sp) -/* 70485C 80238D6C 8C43000C */ lw $v1, 0xc($v0) -/* 704860 80238D70 3C018024 */ lui $at, %hi(D_8023C1B4) -/* 704864 80238D74 AC22C1B4 */ sw $v0, %lo(D_8023C1B4)($at) -/* 704868 80238D78 24020003 */ addiu $v0, $zero, 3 -/* 70486C 80238D7C AC620030 */ sw $v0, 0x30($v1) -/* 704870 80238D80 8E420074 */ lw $v0, 0x74($s2) -/* 704874 80238D84 04420001 */ bltzl $v0, .L80238D8C -/* 704878 80238D88 2442000F */ addiu $v0, $v0, 0xf -.L80238D8C: -/* 70487C 80238D8C 00021103 */ sra $v0, $v0, 4 -/* 704880 80238D90 00021080 */ sll $v0, $v0, 2 -/* 704884 80238D94 3C038024 */ lui $v1, %hi(D_8023B948_707438) -/* 704888 80238D98 2463B948 */ addiu $v1, $v1, %lo(D_8023B948_707438) -/* 70488C 80238D9C 00431021 */ addu $v0, $v0, $v1 -/* 704890 80238DA0 8C430000 */ lw $v1, ($v0) -/* 704894 80238DA4 24020001 */ addiu $v0, $zero, 1 -/* 704898 80238DA8 AE420070 */ sw $v0, 0x70($s2) -/* 70489C 80238DAC 0808E390 */ j .L80238E40 -/* 7048A0 80238DB0 AE430074 */ sw $v1, 0x74($s2) -.L80238DB4: -/* 7048A4 80238DB4 2402000A */ addiu $v0, $zero, 0xa -/* 7048A8 80238DB8 8E43007C */ lw $v1, 0x7c($s2) -/* 7048AC 80238DBC 8E440074 */ lw $a0, 0x74($s2) -/* 7048B0 80238DC0 00431023 */ subu $v0, $v0, $v1 -/* 7048B4 80238DC4 00820018 */ mult $a0, $v0 -/* 7048B8 80238DC8 3C046666 */ lui $a0, 0x6666 -/* 7048BC 80238DCC 34846667 */ ori $a0, $a0, 0x6667 -/* 7048C0 80238DD0 00031040 */ sll $v0, $v1, 1 -/* 7048C4 80238DD4 00004812 */ mflo $t1 -/* 7048C8 80238DD8 00431021 */ addu $v0, $v0, $v1 -/* 7048CC 80238DDC 00491021 */ addu $v0, $v0, $t1 -/* 7048D0 80238DE0 00440018 */ mult $v0, $a0 -/* 7048D4 80238DE4 3C058024 */ lui $a1, %hi(D_8023C1B4) -/* 7048D8 80238DE8 24A5C1B4 */ addiu $a1, $a1, %lo(D_8023C1B4) -/* 7048DC 80238DEC 8CA40000 */ lw $a0, ($a1) -/* 7048E0 80238DF0 000217C3 */ sra $v0, $v0, 0x1f -/* 7048E4 80238DF4 8C84000C */ lw $a0, 0xc($a0) -/* 7048E8 80238DF8 00001810 */ mfhi $v1 -/* 7048EC 80238DFC 00031883 */ sra $v1, $v1, 2 -/* 7048F0 80238E00 00621823 */ subu $v1, $v1, $v0 -/* 7048F4 80238E04 AC830030 */ sw $v1, 0x30($a0) -/* 7048F8 80238E08 8E42007C */ lw $v0, 0x7c($s2) -/* 7048FC 80238E0C 10400002 */ beqz $v0, .L80238E18 -/* 704900 80238E10 2442FFFF */ addiu $v0, $v0, -1 -/* 704904 80238E14 AE42007C */ sw $v0, 0x7c($s2) -.L80238E18: -/* 704908 80238E18 8E420078 */ lw $v0, 0x78($s2) -/* 70490C 80238E1C 14400007 */ bnez $v0, .L80238E3C -/* 704910 80238E20 2442FFFF */ addiu $v0, $v0, -1 -/* 704914 80238E24 8CA40000 */ lw $a0, ($a1) -/* 704918 80238E28 8C830000 */ lw $v1, ($a0) -/* 70491C 80238E2C 24020002 */ addiu $v0, $zero, 2 -/* 704920 80238E30 34630010 */ ori $v1, $v1, 0x10 -/* 704924 80238E34 0808E391 */ j .L80238E44 -/* 704928 80238E38 AC830000 */ sw $v1, ($a0) -.L80238E3C: -/* 70492C 80238E3C AE420078 */ sw $v0, 0x78($s2) -.L80238E40: -/* 704930 80238E40 0000102D */ daddu $v0, $zero, $zero -.L80238E44: -/* 704934 80238E44 8FBF0024 */ lw $ra, 0x24($sp) -/* 704938 80238E48 8FB20020 */ lw $s2, 0x20($sp) -/* 70493C 80238E4C 8FB1001C */ lw $s1, 0x1c($sp) -/* 704940 80238E50 8FB00018 */ lw $s0, 0x18($sp) -/* 704944 80238E54 03E00008 */ jr $ra -/* 704948 80238E58 27BD0028 */ addiu $sp, $sp, 0x28 diff --git a/ver/us/splat.yaml b/ver/us/splat.yaml index 23552cc3fa..54c309139a 100644 --- a/ver/us/splat.yaml +++ b/ver/us/splat.yaml @@ -6096,6 +6096,7 @@ segments: subsegments: - [0x707CA0, c, sushie] - [0x708B70, data] + - [0x70BD00] - name: battle_partner_lakilester dir: battle/partner type: code