From eff23cecb699a864565d5cb1174d84244903fe6d Mon Sep 17 00:00:00 2001 From: Unnunu Date: Sat, 19 Nov 2022 20:24:16 +0300 Subject: [PATCH] matched 5 functions (#862) * matched one * btl_draw_upgrade_windows * 2 sprite funcs * rename * func_80242FE0 --- include/enums.h | 11 + src/16F740.c | 160 +++-- src/18C790.c | 35 +- src/actor_api.c | 26 +- src/sprite.c | 192 ++++-- .../asm/nonmatchings/16F740/func_80242FE0.s | 640 ------------------ .../18C790/btl_draw_upgrade_windows.s | 150 ---- .../nonmatchings/actor_api/func_8026E558.s | 216 ------ .../nonmatchings/sprite/spr_draw_npc_sprite.s | 140 ---- .../sprite/spr_draw_player_sprite.s | 185 ----- 10 files changed, 246 insertions(+), 1509 deletions(-) delete mode 100644 ver/us/asm/nonmatchings/16F740/func_80242FE0.s delete mode 100644 ver/us/asm/nonmatchings/18C790/btl_draw_upgrade_windows.s delete mode 100644 ver/us/asm/nonmatchings/actor_api/func_8026E558.s delete mode 100644 ver/us/asm/nonmatchings/sprite/spr_draw_npc_sprite.s delete mode 100644 ver/us/asm/nonmatchings/sprite/spr_draw_player_sprite.s diff --git a/include/enums.h b/include/enums.h index 7a3d6c3dd8..75ad77f2a9 100644 --- a/include/enums.h +++ b/include/enums.h @@ -4179,6 +4179,17 @@ enum BattleSubStatesPartner { BATTLE_SUB_STATE_PARTNER_INIT_MENU = 302, }; +enum BattleSubStatesState5 { + BATTLE_SUB_STATE_5_0 = 0, + BATTLE_SUB_STATE_5_1 = 1, + BATTLE_SUB_STATE_5_2 = 2, + BATTLE_SUB_STATE_5_3 = 3, + BATTLE_SUB_STATE_5_4 = 4, + BATTLE_SUB_STATE_5_5 = 5, + BATTLE_SUB_STATE_5_6 = 6, + BATTLE_SUB_STATE_5_7 = 7, +}; + enum DebuffTypes { DEBUFF_TYPE_SLEEP = 0x00001000, DEBUFF_TYPE_STATIC = 0x00002000, diff --git a/src/16F740.c b/src/16F740.c index 598d296368..5d85473d5b 100644 --- a/src/16F740.c +++ b/src/16F740.c @@ -1201,8 +1201,6 @@ void btl_state_update_switch_to_partner(void) { void btl_state_draw_switch_to_partner(void) { } -// some ordering / tail merging / go-to issues -#ifdef NON_MATCHING void func_80242FE0(void) { BattleStatus* battleStatus = &gBattleStatus; Actor* player = battleStatus->playerActor; @@ -1215,39 +1213,39 @@ void func_80242FE0(void) { s32 oldKoDuration; - if (gBattleSubState == 0) { - if (gBattleStatus.flags2 & 2) { + if (gBattleSubState == BATTLE_SUB_STATE_5_0) { + if (gBattleStatus.flags2 & BS_FLAGS2_2) { if (partner != NULL) { - if (!(gBattleStatus.flags2 & 4) && !(partner->flags & 0x200000)) { - btl_set_state(0xB); + if (!(gBattleStatus.flags2 & BS_FLAGS2_4) && !(partner->flags & ACTOR_FLAG_NO_ATTACK)) { + btl_set_state(BATTLE_STATE_SWITCH_TO_PARTNER); return; } } - player->flags &= 0xF7FFFFFF; - player->flags |= 0x04000000; + player->flags &= ~ACTOR_FLAG_8000000; + player->flags |= ACTOR_FLAG_4000000; if (partner != NULL) { - partner->flags &= 0xF7FFFFFF; - partner->flags |= 0x04000000; + partner->flags &= ~ACTOR_FLAG_8000000; + partner->flags |= ACTOR_FLAG_4000000; } - gBattleSubState = 1; + gBattleSubState = BATTLE_SUB_STATE_5_1; D_8029F258 = 0; - gBattleStatus.flags2 &= ~2; - gBattleStatus.flags2 &= ~4; - gBattleStatus.flags2 &= ~8; - gBattleStatus.flags2 &= ~0x10; + gBattleStatus.flags2 &= ~BS_FLAGS2_2; + gBattleStatus.flags2 &= ~BS_FLAGS2_4; + gBattleStatus.flags2 &= ~BS_FLAGS2_8; + gBattleStatus.flags2 &= ~BS_FLAGS2_10; } else { - btl_set_state(0xA); + btl_set_state(BATTLE_STATE_SWITCH_TO_PLAYER); return; } } - if (gBattleSubState == 1) { + if (gBattleSubState == BATTLE_SUB_STATE_5_1) { cond = FALSE; for (i = 0; i < ARRAY_COUNT(battleStatus->enemyActors); i++) { actor = battleStatus->enemyActors[i]; - if ((actor != NULL) && (actor->onHitScript != NULL)) { + if (actor != NULL && actor->onHitScript != NULL) { if (does_script_exist(actor->onHitID)) { cond = TRUE; } else { @@ -1262,25 +1260,25 @@ void func_80242FE0(void) { for (i = 0; i < ARRAY_COUNT(battleStatus->enemyActors); i++) { actor = battleStatus->enemyActors[i]; if (actor != NULL) { - actor->flags |= 0x0C000000; - actor->flags &= 0xFFFEFFFF; + actor->flags |= ACTOR_FLAG_4000000 | ACTOR_FLAG_8000000; + actor->flags &= ~ACTOR_FLAG_10000; - if (actor->debuff != 0) { - if (actor->debuff == 3 || - actor->debuff == 4 || - actor->debuff == 5 || - actor->debuff == 6 || - actor->debuff == 7 || - actor->debuff == 8) + if (actor->debuff != STATUS_END) { + if (actor->debuff == STATUS_FEAR || + actor->debuff == STATUS_DIZZY || + actor->debuff == STATUS_PARALYZE || + actor->debuff == STATUS_SLEEP || + actor->debuff == STATUS_FROZEN || + actor->debuff == STATUS_STOP) { - actor->flags |= 0x10000; + actor->flags |= ACTOR_FLAG_10000; } actor->debuffDuration--; if (actor->debuffDuration <= 0) { actor->debuff = 0; remove_status_debuff(actor->hudElementDataIndex); - dispatch_event_actor(actor, 0x31); - D_8029F258 = 0x14; + dispatch_event_actor(actor, EVENT_RECOVER_STATUS); + D_8029F258 = 20; } } @@ -1289,7 +1287,7 @@ void func_80242FE0(void) { if (actor->staticDuration <= 0) { actor->staticStatus = 0; remove_status_static(actor->hudElementDataIndex); - D_8029F258 = 0x14; + D_8029F258 = 20; } } @@ -1298,7 +1296,7 @@ void func_80242FE0(void) { if (actor->transparentDuration <= 0) { actor->transparentStatus = 0; remove_status_transparent(actor->hudElementDataIndex); - D_8029F258 = 0x14; + D_8029F258 = 20; } } @@ -1306,36 +1304,36 @@ void func_80242FE0(void) { actor->stoneDuration--; if (actor->stoneDuration <= 0) { actor->stoneStatus = 0; - D_8029F258 = 0x14; + D_8029F258 = 20; } } oldKoDuration = actor->koDuration; actor->koDuration = actor->debuffDuration; if (actor->koDuration > 0) { - actor->koStatus = 0xD; + actor->koStatus = STATUS_DAZE; actor->disableEffect->data.disableX->unk_3C = actor->koDuration; } else if (oldKoDuration != actor->koDuration) { actor->koStatus = 0; actor->disableEffect->data.disableX->unk_3C = 0; } - if (actor->debuff == 9) { + if (actor->debuff == STATUS_POISON) { gBattleStatus.flags1 |= BS_FLAGS1_SP_EVT_ACTIVE; - dispatch_damage_event_actor_0(actor, 1, 0xA); - D_8029F258 = 0x14; + dispatch_damage_event_actor_0(actor, 1, EVENT_HIT); + D_8029F258 = 20; } } } - gBattleSubState = 2; + gBattleSubState = BATTLE_SUB_STATE_5_2; } } - if (gBattleSubState == 2 && (player->onHitScript == NULL || !does_script_exist(player->onHitID))) { + if (gBattleSubState == BATTLE_SUB_STATE_5_2 && (player->onHitScript == NULL || !does_script_exist(player->onHitID))) { player->onHitScript = NULL; if (partner != NULL) { - if ((partner->onHitScript == NULL) || !does_script_exist(partner->onHitID)) { + if (partner->onHitScript == NULL || !does_script_exist(partner->onHitID)) { partner->onHitScript = NULL; - goto block_52; + goto block_52; // TODO find a way to remove } } else { block_52: @@ -1358,14 +1356,14 @@ block_52: btl_cam_use_preset(BTL_CAM_PRESET_C); if (partner == NULL || !(gBattleStatus.flags1 & BS_FLAGS1_100000)) { - gBattleSubState = 4; - } else if (gBattleStatus.flags2 & 0x40) { - gBattleSubState = 4; + gBattleSubState = BATTLE_SUB_STATE_5_4; + } else if (gBattleStatus.flags2 & BS_FLAGS2_40) { + gBattleSubState = BATTLE_SUB_STATE_5_4; } else { - player->flags &= 0xF7FFFFFF; - partner->flags &= 0xF7FFFFFF; - player->flags |= 0x04000000; - partner->flags |= 0x04000000; + player->flags &= ~ACTOR_FLAG_8000000; + partner->flags &= ~ACTOR_FLAG_8000000; + player->flags |= ACTOR_FLAG_4000000; + partner->flags |= ACTOR_FLAG_4000000; state = &partner->state; if (!battleStatus->outtaSightActive) { partner->state.currentPos.x = partner->homePos.x; @@ -1382,13 +1380,13 @@ block_52: } state->moveTime = 4; state->angle = 0.0f; - gBattleSubState = 3; + gBattleSubState = BATTLE_SUB_STATE_5_3; } } } } - if (gBattleSubState == 3) { + if (gBattleSubState == BATTLE_SUB_STATE_5_3) { if (partner->state.moveTime != 0) { partner->currentPos.x += (partner->state.goalPos.x - partner->currentPos.x) / partner->state.moveTime; partner->currentPos.z += (partner->state.goalPos.z - partner->currentPos.z) / partner->state.moveTime; @@ -1408,65 +1406,68 @@ block_52: partner->currentPos.z = partner->state.goalPos.z; player->currentPos.x = partner->state.currentPos.x; player->currentPos.z = partner->state.currentPos.z; - if (!battleStatus->outtaSightActive ) { + if (!battleStatus->outtaSightActive) { partner->homePos.x = partner->currentPos.x; partner->homePos.z = partner->currentPos.z; + player->homePos.x = player->currentPos.x; + player->homePos.z = player->currentPos.z; + } else { + player->homePos.x = player->currentPos.x; + player->homePos.z = player->currentPos.z; } - player->homePos.x = player->currentPos.x; - player->homePos.z = player->currentPos.z; - gBattleSubState = 4; - gBattleStatus.flags1 &= 0xFFEFFFFF; + gBattleSubState = BATTLE_SUB_STATE_5_4; + gBattleStatus.flags1 &= ~ACTOR_FLAG_100000; } } - if (gBattleSubState == 4) { + if (gBattleSubState == BATTLE_SUB_STATE_5_4) { if (D_8029F258 != 0) { D_8029F258--; } else { - if (battleStatus->nextMerleeSpellType == 2) { + if (battleStatus->nextMerleeSpellType == MERLEE_SPELL_2) { battleStatus->merleeDefenseBoost = 3; - battleStatus->nextMerleeSpellType = 0; + battleStatus->nextMerleeSpellType = MERLEE_SPELL_0; battleStatus->battlePhase = PHASE_MERLEE_DEFENSE_BONUS; - script = start_script(PlayerScriptDispatcher, 0xA, 0); + script = start_script(&PlayerScriptDispatcher, EVT_PRIORITY_A, 0); player->takeTurnScript = script; player->takeTurnID = script->id; script->owner1.actorID = ACTOR_PLAYER; } - gBattleStatus.flags1 &= ~2; - player->flags &= 0xF7FFFFFF; - player->flags |= 0x04000000; + gBattleStatus.flags1 &= ~BS_FLAGS1_2; + player->flags &= ~ACTOR_FLAG_8000000; + player->flags |= ACTOR_FLAG_4000000; if (partner != NULL) { - partner->flags &= 0xF7FFFFFF; - partner->flags |= 0x04000000; + partner->flags &= ~ACTOR_FLAG_8000000; + partner->flags |= ACTOR_FLAG_4000000; } - gBattleSubState = 5; - gBattleStatus.flags2 &= ~2; - gBattleStatus.flags2 &= ~4; - gBattleStatus.flags2 &= ~8; - gBattleStatus.flags2 &= ~0x10; + gBattleSubState = BATTLE_SUB_STATE_5_5; + gBattleStatus.flags2 &= ~BS_FLAGS2_2; + gBattleStatus.flags2 &= ~BS_FLAGS2_4; + gBattleStatus.flags2 &= ~BS_FLAGS2_8; + gBattleStatus.flags2 &= ~BS_FLAGS2_10; } } - if (gBattleSubState == 5) { - if ((player->takeTurnScript == NULL) || (does_script_exist(player->takeTurnID) == 0)) { + if (gBattleSubState == BATTLE_SUB_STATE_5_5) { + if (player->takeTurnScript == NULL || (does_script_exist(player->takeTurnID) == 0)) { player->takeTurnScript = NULL; for (i = 0; i < ARRAY_COUNT(battleStatus->enemyActors); i++) { actor = battleStatus->enemyActors[i]; if (actor != NULL && actor->onTurnChanceScriptSource != NULL) { battleStatus->battlePhase = PHASE_PLAYER_END; - script = start_script(actor->onTurnChanceScriptSource, 0xA, 0); + script = start_script(actor->onTurnChanceScriptSource, EVT_PRIORITY_A, 0); actor->onTurnChangeScript = script; actor->onTurnChangeID = script->id; - script->owner1.enemyID = i | 0x200; + script->owner1.enemyID = i | ACTOR_CLASS_ENEMY; } } - gBattleSubState = 6; + gBattleSubState = BATTLE_SUB_STATE_5_6; } } cond = FALSE; - if (gBattleSubState == 6) { + if (gBattleSubState == BATTLE_SUB_STATE_5_6) { for (i = 0; i < ARRAY_COUNT(battleStatus->enemyActors); i++) { actor = battleStatus->enemyActors[i]; if (actor != NULL && actor->onTurnChanceScriptSource != NULL && does_script_exist(actor->onTurnChangeID)) { @@ -1474,17 +1475,14 @@ block_52: } } if (!cond) { - gBattleSubState = 7; + gBattleSubState = BATTLE_SUB_STATE_5_7; } } - if (gBattleSubState == 7) { - btl_set_state(0x14); + if (gBattleSubState == BATTLE_SUB_STATE_5_7) { + btl_set_state(BATTLE_STATE_NEXT_ENEMY); } } -#else -INCLUDE_ASM(s32, "16F740", func_80242FE0); -#endif void func_80243910(void) { } diff --git a/src/18C790.c b/src/18C790.c index afb1abca9e..4d31263d99 100644 --- a/src/18C790.c +++ b/src/18C790.c @@ -1166,8 +1166,6 @@ void btl_state_update_celebration(void) { D_8029FB84 += 1; } -// d1, d2, d3 hell -#ifdef NON_MATCHING void btl_draw_upgrade_windows(s32 arg0) { BattleStatus* battleStatus = &gBattleStatus; s32 x; @@ -1177,25 +1175,31 @@ void btl_draw_upgrade_windows(s32 arg0) { s32 d3; switch (arg0) { + case 0: + d1 = 100; + d2 = 100; + d3 = 100; + break; case 1: - if (battleStatus->currentSubmenu != 0) { - if (battleStatus->currentSubmenu == arg0) { - d1 = 0; - d2 = 0; - d3 = 100; - } else { + switch (battleStatus->currentSubmenu) { + case 0: d1 = 0; d2 = 100; + d3 = 100; + break; + case 1: + d1 = 100; + d2 = 0; + d3 = 100; + break; + default: + d1 = 100; + d2 = 100; d3 = 0; - } - } else { - d1 = 0; - d2 = 100; - d3 = 100; + break; } break; default: - case 0: d1 = 100; d2 = 100; d3 = 100; @@ -1212,9 +1216,6 @@ void btl_draw_upgrade_windows(s32 arg0) { draw_box(0, 0xF, x - 22, y - 22, 0, 44, 44, 255, d3, 1.0f, 1.0f, 0.0f, 0.0f, 0.0f, NULL, NULL, NULL, SCREEN_WIDTH, SCREEN_HEIGHT, NULL); } -#else -INCLUDE_ASM(s32, "18C790", btl_draw_upgrade_windows); -#endif void btl_state_draw_celebration(void) { BattleStatus* battleStatus = &gBattleStatus; diff --git a/src/actor_api.c b/src/actor_api.c index a5b37b8116..b93cd973e4 100644 --- a/src/actor_api.c +++ b/src/actor_api.c @@ -2380,11 +2380,10 @@ ApiStatus ChooseNextTarget(Evt* script, s32 isInitialCall) { return ApiStatus_DONE2; } -#ifdef NON_MATCHING s32 func_8026E558(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; - s32 actorID; - s32 temp_s2; + SelectableTarget* target; + s32 mode; s32 outVar; Actor* actor; f32 x, y, z; @@ -2394,15 +2393,15 @@ s32 func_8026E558(Evt* script, s32 isInitialCall) { s32 layer; s32 i; - actorID = evt_get_variable(script, *args++); - temp_s2 = evt_get_variable(script, *args++); + i = evt_get_variable(script, *args++); + mode = evt_get_variable(script, *args++); outVar = *args++; - if (actorID == ACTOR_SELF) { - actorID = script->owner1.actorID; + if (i == ACTOR_SELF) { + i = script->owner1.actorID; } - actor = get_actor(actorID); + actor = get_actor(i); x = actor->currentPos.x; y = actor->currentPos.y; z = actor->currentPos.z; @@ -2435,10 +2434,10 @@ s32 func_8026E558(Evt* script, s32 isInitialCall) { layer = 1; } - switch (temp_s2) { + switch (mode) { case 0: for (i = 0; i < actor->targetListLength; i++) { - SelectableTarget* target = &actor->targetData[actor->targetIndexList[i]]; + target = &actor->targetData[actor->targetIndexList[i]]; if (target->homeCol == column && target->layer == layer && target->homeRow < row) { actor->targetActorID = target->actorID; @@ -2449,7 +2448,7 @@ s32 func_8026E558(Evt* script, s32 isInitialCall) { break; case 1: for (i = 0; i < actor->targetListLength; i++) { - SelectableTarget* target = &actor->targetData[actor->targetIndexList[i]]; + target = &actor->targetData[actor->targetIndexList[i]]; if (target->homeCol == column && target->layer == layer && target->homeRow < row) { actor->targetActorID = target->actorID; @@ -2460,7 +2459,7 @@ s32 func_8026E558(Evt* script, s32 isInitialCall) { break; case -1: for (i = 0; i < actor->targetListLength; i++) { - SelectableTarget* target = &actor->targetData[actor->targetIndexList[i]]; + target = &actor->targetData[actor->targetIndexList[i]]; if (target->homeCol == column && target->layer == layer && target->homeRow < row) { actor->targetActorID = target->actorID; @@ -2473,9 +2472,6 @@ s32 func_8026E558(Evt* script, s32 isInitialCall) { evt_set_variable(script, outVar, outVal); return ApiStatus_DONE2; } -#else -INCLUDE_ASM(s32, "actor_api", func_8026E558); -#endif ApiStatus GetTargetListLength(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; diff --git a/src/sprite.c b/src/sprite.c index 45b80e6511..d6d8a584e1 100644 --- a/src/sprite.c +++ b/src/sprite.c @@ -804,67 +804,61 @@ s32 func_802DDA84(void) { INCLUDE_ASM(void, "sprite", spr_update_player_sprite, s32 arg0, s32 arg1, f32 arg2); -#ifdef NON_EQUIVALENT s32 spr_draw_player_sprite(s32 spriteInstanceID, s32 yaw, s32 alphaIn, u16** paletteList, Matrix4f mtx) { - PlayerCurrentAnimInfo* animInfo; - SpriteComponent** compList; - SpriteAnimComponent** animList; - SpriteRasterCacheEntry** rasterList; - s32 spriteIndex; - s32 animIndex; - s32 spriteAnimIndex; - s32 animID; - s32 camRelativeYaw; - s32 alpha; + s32 i = spriteInstanceID & 0xFF; + s32 animID = spr_playerCurrentAnimInfo[i].animID; + SpriteRasterCacheEntry** rasters; + PAL_PTR* palettes; + SpriteAnimComponent** animComponents; + SpriteComponent** components; f32 zscale; - u32 animIdx; - PAL_PTR* drawPalettes; - SpriteAnimData* animData; + u32 alpha; + u32* spriteData; + s32 spriteId; + s32 spriteIdBackFacing; - camRelativeYaw = yaw; - spriteAnimIndex = spriteInstanceID & 0xFF; - - animID = spr_playerCurrentAnimInfo[spriteAnimIndex].animID; - - if (animID == -1) { - return 0; + if (animID == ANIM_LIST_END) { + return FALSE; } - spriteIndex = ((animID >> 0x10) & 0xFF) - 1; - D_802DF57C = spriteIndex; - animData = spr_playerSprites[spriteIndex]; - if (animData == NULL) { - return 0; + D_802DF57C = spriteId = ((animID >> 0x10) & 0xFF) - 1; + spriteData = (u32*)spr_playerSprites[spriteId]; + if (spriteData == NULL) { + return FALSE; } - animIdx = animID & 0xFF; - animIdx++; + // TODO: fake match or not? + rasters = (SpriteRasterCacheEntry**)*spriteData++; + palettes = (PAL_PTR*)*spriteData++; + spriteData++; + spriteData++; + animComponents = (SpriteAnimComponent**)spriteData[animID & 0xFF]; - rasterList = animData->rastersOffset; - animList = animData->animListStart[animIdx]; - drawPalettes = animData->palettesOffset; if (animID & SPRITE_ID_BACK_FACING) { - switch (spriteIndex) { + switch (spriteId) { case 0: case 5: case 9: - spriteIndex++; - D_802DF57C = spriteIndex; - rasterList = spr_playerSprites[D_802DF57C]->rastersOffset; + spriteIdBackFacing = spriteId + 1; + // TODO find better match + rasters = (SpriteRasterCacheEntry**)spr_playerSprites[spriteIdBackFacing]; + D_802DF57C = spriteIdBackFacing; + rasters = (SpriteRasterCacheEntry**)*rasters; break; } } if (!(spriteInstanceID & DRAW_SPRITE_OVERRIDE_YAW)) { - camRelativeYaw += (s32) -gCameras[gCurrentCamID].currentYaw; - if (camRelativeYaw > 360) { - camRelativeYaw -= 360; + yaw += (s32)-gCameras[gCurrentCamID].currentYaw; + if (yaw > 360) { + yaw -= 360; } - if (camRelativeYaw < -360) { - camRelativeYaw += 360; + if (yaw < -360) { + yaw += 360; } } - if ((camRelativeYaw - 91) < 180U || (camRelativeYaw + 270) < 180U) { + + if (yaw > 90 && yaw <= 270 || yaw >= -270 && yaw < -90) { zscale = -1.5f; } else { zscale = 1.5f; @@ -875,35 +869,33 @@ s32 spr_draw_player_sprite(s32 spriteInstanceID, s32 yaw, s32 alphaIn, u16** pal } D_802DFEA0[0] = 0; - D_802DFEA0[1] = camRelativeYaw; + D_802DFEA0[1] = yaw; D_802DFEA0[2] = 0; + if (spriteInstanceID & DRAW_SPRITE_OVERRIDE_ALPHA) { - if (alphaIn == 0) { - return 0; - } alpha = alphaIn & 0xFF; + if (alphaIn == 0) { + return FALSE; + } } else { alpha = 255; } - compList = spr_playerCurrentAnimInfo[spriteAnimIndex].componentList; + components = spr_playerCurrentAnimInfo[i].componentList; if (spriteInstanceID & DRAW_SPRITE_OVERRIDE_PALETTES) { - drawPalettes = paletteList; + palettes = paletteList; } - while (*compList != PTR_LIST_END) { - SpriteComponent* comp = *compList; - spr_draw_component(alpha | 0x08000000, comp, *animList, rasterList, drawPalettes, zscale, mtx); - compList++; - if (*animList != PTR_LIST_END) { - animList++; + + while (*components != PTR_LIST_END) { + spr_draw_component(alpha | 0x08000000, *components++, *animComponents, rasters, palettes, zscale, mtx); + if (*animComponents != PTR_LIST_END) { + animComponents++; } } - return 1; + + return TRUE; } -#else -INCLUDE_ASM(void, "sprite", spr_draw_player_sprite, s32 arg0, s32 arg1, s32 arg2, s32 arg3, s32 arg4); -#endif s32 func_802DDEC4(s32 arg0) { return spr_playerCurrentAnimInfo[arg0].notifyValue; @@ -1014,7 +1006,7 @@ s32 spr_load_npc_sprite(s32 animID, u32* extraAnimList) { // animList being odd #ifdef NON_MATCHING s32 spr_update_sprite(s32 spriteInstanceID, s32 animID, f32 timeScale) { - SpriteAnimData* animData; + u32* spriteData; SpriteComponent** compList; SpriteAnimComponent** animList; SpriteRasterCacheEntry** rasterList; @@ -1023,19 +1015,23 @@ s32 spr_update_sprite(s32 spriteInstanceID, s32 animID, f32 timeScale) { s32 i = spriteInstanceID & 0xFF; s32 animIndex = animID & 0xFF; - animData = SpriteInstances[i].spriteData; compList = SpriteInstances[i].componentList; - animList = &animData->animListStart[animIndex]; - rasterList = animData->rastersOffset; + spriteData = SpriteInstances[i].spriteData; + + rasterList = *spriteData++; + spriteData++; + spriteData++; + spriteData++; + animList = spriteData[animIndex]; palID = (animID >> 8) & 0xFF; spr_set_anim_timescale(timeScale); - if ((spriteInstanceID < 0) || ((SpriteInstances[i].currentAnimID & 0xFF) != animIndex)) { + if ((spriteInstanceID & DRAW_SPRITE_OVERRIDE_ALPHA) || ((SpriteInstances[i].currentAnimID & 0xFF) != animIndex)) { spr_init_anim_state(compList, animList); SpriteInstances[i].currentAnimID = (palID << 8) | animIndex; SpriteInstances[i].notifyValue = 0; } - if (!(spriteInstanceID & 0x40000000)) { + if (!(spriteInstanceID & DRAW_SPRITE_OVERRIDE_YAW)) { SpriteInstances[i].notifyValue = spr_component_update(SpriteInstances[i].notifyValue, compList, animList, rasterList, palID); } @@ -1045,7 +1041,73 @@ s32 spr_update_sprite(s32 spriteInstanceID, s32 animID, f32 timeScale) { INCLUDE_ASM(s32, "sprite", spr_update_sprite, s32 arg0, s32 arg1, f32 arg2); #endif -INCLUDE_ASM(void, "sprite", spr_draw_npc_sprite, s32 arg0, s32 arg1, s32 arg2, s32 arg3, Matrix4f* arg4); +s32 spr_draw_npc_sprite(s32 spriteInstanceID, s32 yaw, s32 arg2, PAL_PTR* paletteList, Matrix4f mtx) { + s32 i = spriteInstanceID & 0xFF; + s32 animID = SpriteInstances[i].currentAnimID; + SpriteRasterCacheEntry** rasters; + PAL_PTR* palettes; + SpriteAnimComponent** animComponents; + SpriteComponent** components; + f32 zscale; + u32 alpha; + u32* spriteData; + + if (animID == ANIM_LIST_END) { + return FALSE; + } + + spriteData = (u32*)SpriteInstances[i].spriteData; + + // TODO: fake match or not? + rasters = (SpriteRasterCacheEntry**)*spriteData++; + palettes = (PAL_PTR*)*spriteData++; + spriteData++; + spriteData++; + animComponents = (SpriteAnimComponent**)spriteData[animID & 0xFF]; + + D_802DFEA0[0] = 0; + D_802DFEA0[1] = yaw; + D_802DFEA0[2] = 0; + + if (!(spriteInstanceID & DRAW_SPRITE_OVERRIDE_YAW)) { + yaw += gCameras[gCurrentCamID].currentYaw; + if (yaw > 360) { + yaw -= 360; + } + if (yaw < -360) { + yaw += 360; + } + } + + if (yaw > 90 && yaw <= 270 || yaw >= -270 && yaw < -90) { + zscale = -1.5f; + } else { + zscale = 1.5f; + } + + if (spriteInstanceID & DRAW_SPRITE_OVERRIDE_ALPHA) { + alpha = arg2 & 0xFF; + if (arg2 == 0) { + return FALSE; + } + } else { + alpha = 255; + } + + components = SpriteInstances[i].componentList; + if (spriteInstanceID & DRAW_SPRITE_OVERRIDE_PALETTES) { + palettes = paletteList; + } + + while (*components != PTR_LIST_END) { + spr_draw_component(alpha, *components++, *animComponents, rasters, palettes, zscale, mtx); + if (*animComponents != PTR_LIST_END) { + animComponents++; + } + } + + return TRUE; +} s32 spr_get_notify_value(s32 spriteIndex) { return SpriteInstances[spriteIndex].notifyValue; @@ -1151,7 +1213,7 @@ s32 func_802DE8DC(s32 spriteIdx, s32 compListIdx, s32* outX, s32* outY, s32* out return 0xFF; } - animList = sprite->spriteData[animID].animListStart; + animList = sprite->spriteData->animListStart[animID]; compList = sprite->componentList; i = 0; while (*compList != PTR_LIST_END) { diff --git a/ver/us/asm/nonmatchings/16F740/func_80242FE0.s b/ver/us/asm/nonmatchings/16F740/func_80242FE0.s deleted file mode 100644 index 04e154d80c..0000000000 --- a/ver/us/asm/nonmatchings/16F740/func_80242FE0.s +++ /dev/null @@ -1,640 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_80242FE0 -/* 1718C0 80242FE0 27BDFFB8 */ addiu $sp, $sp, -0x48 -/* 1718C4 80242FE4 AFB60028 */ sw $s6, 0x28($sp) -/* 1718C8 80242FE8 3C16800E */ lui $s6, %hi(gBattleStatus) -/* 1718CC 80242FEC 26D6C070 */ addiu $s6, $s6, %lo(gBattleStatus) -/* 1718D0 80242FF0 AFBF002C */ sw $ra, 0x2c($sp) -/* 1718D4 80242FF4 AFB50024 */ sw $s5, 0x24($sp) -/* 1718D8 80242FF8 AFB40020 */ sw $s4, 0x20($sp) -/* 1718DC 80242FFC AFB3001C */ sw $s3, 0x1c($sp) -/* 1718E0 80243000 AFB20018 */ sw $s2, 0x18($sp) -/* 1718E4 80243004 AFB10014 */ sw $s1, 0x14($sp) -/* 1718E8 80243008 AFB00010 */ sw $s0, 0x10($sp) -/* 1718EC 8024300C F7B80040 */ sdc1 $f24, 0x40($sp) -/* 1718F0 80243010 F7B60038 */ sdc1 $f22, 0x38($sp) -/* 1718F4 80243014 F7B40030 */ sdc1 $f20, 0x30($sp) -/* 1718F8 80243018 8ED500D8 */ lw $s5, 0xd8($s6) -/* 1718FC 8024301C 3C02800E */ lui $v0, %hi(gBattleSubState) -/* 171900 80243020 8C42C4DC */ lw $v0, %lo(gBattleSubState)($v0) -/* 171904 80243024 1440002D */ bnez $v0, .L802430DC -/* 171908 80243028 8ED200DC */ lw $s2, 0xdc($s6) -/* 17190C 8024302C 8EC30004 */ lw $v1, 4($s6) -/* 171910 80243030 30620002 */ andi $v0, $v1, 2 -/* 171914 80243034 10400227 */ beqz $v0, .L802438D4 -/* 171918 80243038 2404000A */ addiu $a0, $zero, 0xa -/* 17191C 8024303C 1240000A */ beqz $s2, .L80243068 -/* 171920 80243040 30620004 */ andi $v0, $v1, 4 -/* 171924 80243044 14400009 */ bnez $v0, .L8024306C -/* 171928 80243048 3C03F7FF */ lui $v1, 0xf7ff -/* 17192C 8024304C 8E420000 */ lw $v0, ($s2) -/* 171930 80243050 3C030020 */ lui $v1, 0x20 -/* 171934 80243054 00431024 */ and $v0, $v0, $v1 -/* 171938 80243058 14400004 */ bnez $v0, .L8024306C -/* 17193C 8024305C 3C03F7FF */ lui $v1, 0xf7ff -/* 171940 80243060 08090E35 */ j .L802438D4 -/* 171944 80243064 2404000B */ addiu $a0, $zero, 0xb -.L80243068: -/* 171948 80243068 3C03F7FF */ lui $v1, 0xf7ff -.L8024306C: -/* 17194C 8024306C 3463FFFF */ ori $v1, $v1, 0xffff -/* 171950 80243070 8EA20000 */ lw $v0, ($s5) -/* 171954 80243074 3C040400 */ lui $a0, 0x400 -/* 171958 80243078 00431024 */ and $v0, $v0, $v1 -/* 17195C 8024307C 00441025 */ or $v0, $v0, $a0 -/* 171960 80243080 12400005 */ beqz $s2, .L80243098 -/* 171964 80243084 AEA20000 */ sw $v0, ($s5) -/* 171968 80243088 8E420000 */ lw $v0, ($s2) -/* 17196C 8024308C 00431024 */ and $v0, $v0, $v1 -/* 171970 80243090 00441025 */ or $v0, $v0, $a0 -/* 171974 80243094 AE420000 */ sw $v0, ($s2) -.L80243098: -/* 171978 80243098 24020001 */ addiu $v0, $zero, 1 -/* 17197C 8024309C 3C04800E */ lui $a0, %hi(gBattleStatus) -/* 171980 802430A0 2484C070 */ addiu $a0, $a0, %lo(gBattleStatus) -/* 171984 802430A4 3C01800E */ lui $at, %hi(gBattleSubState) -/* 171988 802430A8 AC22C4DC */ sw $v0, %lo(gBattleSubState)($at) -/* 17198C 802430AC 8C820004 */ lw $v0, 4($a0) -/* 171990 802430B0 2403FFFD */ addiu $v1, $zero, -3 -/* 171994 802430B4 3C01802A */ lui $at, %hi(D_8029F258) -/* 171998 802430B8 AC20F258 */ sw $zero, %lo(D_8029F258)($at) -/* 17199C 802430BC 00431024 */ and $v0, $v0, $v1 -/* 1719A0 802430C0 2403FFFB */ addiu $v1, $zero, -5 -/* 1719A4 802430C4 00431024 */ and $v0, $v0, $v1 -/* 1719A8 802430C8 2403FFF7 */ addiu $v1, $zero, -9 -/* 1719AC 802430CC 00431024 */ and $v0, $v0, $v1 -/* 1719B0 802430D0 2403FFEF */ addiu $v1, $zero, -0x11 -/* 1719B4 802430D4 00431024 */ and $v0, $v0, $v1 -/* 1719B8 802430D8 AC820004 */ sw $v0, 4($a0) -.L802430DC: -/* 1719BC 802430DC 3C03800E */ lui $v1, %hi(gBattleSubState) -/* 1719C0 802430E0 8C63C4DC */ lw $v1, %lo(gBattleSubState)($v1) -/* 1719C4 802430E4 24020001 */ addiu $v0, $zero, 1 -/* 1719C8 802430E8 14620091 */ bne $v1, $v0, .L80243330 -/* 1719CC 802430EC 24020002 */ addiu $v0, $zero, 2 -/* 1719D0 802430F0 0000A02D */ daddu $s4, $zero, $zero -/* 1719D4 802430F4 0280882D */ daddu $s1, $s4, $zero -/* 1719D8 802430F8 02C0982D */ daddu $s3, $s6, $zero -.L802430FC: -/* 1719DC 802430FC 8E7000E0 */ lw $s0, 0xe0($s3) -/* 1719E0 80243100 5200000B */ beql $s0, $zero, .L80243130 -/* 1719E4 80243104 26310001 */ addiu $s1, $s1, 1 -/* 1719E8 80243108 8E0201D8 */ lw $v0, 0x1d8($s0) -/* 1719EC 8024310C 50400008 */ beql $v0, $zero, .L80243130 -/* 1719F0 80243110 26310001 */ addiu $s1, $s1, 1 -/* 1719F4 80243114 8E0401E8 */ lw $a0, 0x1e8($s0) -/* 1719F8 80243118 0C0B1059 */ jal does_script_exist -/* 1719FC 8024311C 00000000 */ nop -/* 171A00 80243120 50400002 */ beql $v0, $zero, .L8024312C -/* 171A04 80243124 AE0001D8 */ sw $zero, 0x1d8($s0) -/* 171A08 80243128 24140001 */ addiu $s4, $zero, 1 -.L8024312C: -/* 171A0C 8024312C 26310001 */ addiu $s1, $s1, 1 -.L80243130: -/* 171A10 80243130 2A220018 */ slti $v0, $s1, 0x18 -/* 171A14 80243134 1440FFF1 */ bnez $v0, .L802430FC -/* 171A18 80243138 26730004 */ addiu $s3, $s3, 4 -/* 171A1C 8024313C 16800079 */ bnez $s4, .L80243324 -/* 171A20 80243140 00000000 */ nop -/* 171A24 80243144 0C098F18 */ jal reset_actor_turn_info -/* 171A28 80243148 0000882D */ daddu $s1, $zero, $zero -/* 171A2C 8024314C 24130014 */ addiu $s3, $zero, 0x14 -/* 171A30 80243150 3C14800E */ lui $s4, %hi(gBattleStatus) -/* 171A34 80243154 2694C070 */ addiu $s4, $s4, %lo(gBattleStatus) -/* 171A38 80243158 00111080 */ sll $v0, $s1, 2 -.L8024315C: -/* 171A3C 8024315C 02C21021 */ addu $v0, $s6, $v0 -/* 171A40 80243160 8C5000E0 */ lw $s0, 0xe0($v0) -/* 171A44 80243164 52000069 */ beql $s0, $zero, .L8024330C -/* 171A48 80243168 26310001 */ addiu $s1, $s1, 1 -/* 171A4C 8024316C 3C04FFFE */ lui $a0, 0xfffe -/* 171A50 80243170 3484FFFF */ ori $a0, $a0, 0xffff -/* 171A54 80243174 8E020000 */ lw $v0, ($s0) -/* 171A58 80243178 3C030C00 */ lui $v1, 0xc00 -/* 171A5C 8024317C 00431025 */ or $v0, $v0, $v1 -/* 171A60 80243180 00442024 */ and $a0, $v0, $a0 -/* 171A64 80243184 82020210 */ lb $v0, 0x210($s0) -/* 171A68 80243188 92030210 */ lbu $v1, 0x210($s0) -/* 171A6C 8024318C 10400015 */ beqz $v0, .L802431E4 -/* 171A70 80243190 AE040000 */ sw $a0, ($s0) -/* 171A74 80243194 2462FFFD */ addiu $v0, $v1, -3 -/* 171A78 80243198 2C420006 */ sltiu $v0, $v0, 6 -/* 171A7C 8024319C 10400003 */ beqz $v0, .L802431AC -/* 171A80 802431A0 3C020001 */ lui $v0, 1 -/* 171A84 802431A4 00821025 */ or $v0, $a0, $v0 -/* 171A88 802431A8 AE020000 */ sw $v0, ($s0) -.L802431AC: -/* 171A8C 802431AC 92020211 */ lbu $v0, 0x211($s0) -/* 171A90 802431B0 2442FFFF */ addiu $v0, $v0, -1 -/* 171A94 802431B4 A2020211 */ sb $v0, 0x211($s0) -/* 171A98 802431B8 00021600 */ sll $v0, $v0, 0x18 -/* 171A9C 802431BC 1C400009 */ bgtz $v0, .L802431E4 -/* 171AA0 802431C0 00000000 */ nop -/* 171AA4 802431C4 86040436 */ lh $a0, 0x436($s0) -/* 171AA8 802431C8 0C011E26 */ jal remove_status_debuff -/* 171AAC 802431CC A2000210 */ sb $zero, 0x210($s0) -/* 171AB0 802431D0 0200202D */ daddu $a0, $s0, $zero -/* 171AB4 802431D4 0C09DC58 */ jal dispatch_event_actor -/* 171AB8 802431D8 24050031 */ addiu $a1, $zero, 0x31 -/* 171ABC 802431DC 3C01802A */ lui $at, %hi(D_8029F258) -/* 171AC0 802431E0 AC33F258 */ sw $s3, %lo(D_8029F258)($at) -.L802431E4: -/* 171AC4 802431E4 82020212 */ lb $v0, 0x212($s0) -/* 171AC8 802431E8 1040000C */ beqz $v0, .L8024321C -/* 171ACC 802431EC 00000000 */ nop -/* 171AD0 802431F0 92020213 */ lbu $v0, 0x213($s0) -/* 171AD4 802431F4 2442FFFF */ addiu $v0, $v0, -1 -/* 171AD8 802431F8 A2020213 */ sb $v0, 0x213($s0) -/* 171ADC 802431FC 00021600 */ sll $v0, $v0, 0x18 -/* 171AE0 80243200 1C400006 */ bgtz $v0, .L8024321C -/* 171AE4 80243204 00000000 */ nop -/* 171AE8 80243208 86040436 */ lh $a0, 0x436($s0) -/* 171AEC 8024320C 0C011E68 */ jal remove_status_static -/* 171AF0 80243210 A2000212 */ sb $zero, 0x212($s0) -/* 171AF4 80243214 3C01802A */ lui $at, %hi(D_8029F258) -/* 171AF8 80243218 AC33F258 */ sw $s3, %lo(D_8029F258)($at) -.L8024321C: -/* 171AFC 8024321C 82020218 */ lb $v0, 0x218($s0) -/* 171B00 80243220 1040000C */ beqz $v0, .L80243254 -/* 171B04 80243224 00000000 */ nop -/* 171B08 80243228 92020219 */ lbu $v0, 0x219($s0) -/* 171B0C 8024322C 2442FFFF */ addiu $v0, $v0, -1 -/* 171B10 80243230 A2020219 */ sb $v0, 0x219($s0) -/* 171B14 80243234 00021600 */ sll $v0, $v0, 0x18 -/* 171B18 80243238 1C400006 */ bgtz $v0, .L80243254 -/* 171B1C 8024323C 00000000 */ nop -/* 171B20 80243240 86040436 */ lh $a0, 0x436($s0) -/* 171B24 80243244 0C011EAA */ jal remove_status_transparent -/* 171B28 80243248 A2000218 */ sb $zero, 0x218($s0) -/* 171B2C 8024324C 3C01802A */ lui $at, %hi(D_8029F258) -/* 171B30 80243250 AC33F258 */ sw $s3, %lo(D_8029F258)($at) -.L80243254: -/* 171B34 80243254 82020214 */ lb $v0, 0x214($s0) -/* 171B38 80243258 1040000A */ beqz $v0, .L80243284 -/* 171B3C 8024325C 00000000 */ nop -/* 171B40 80243260 92020215 */ lbu $v0, 0x215($s0) -/* 171B44 80243264 2442FFFF */ addiu $v0, $v0, -1 -/* 171B48 80243268 A2020215 */ sb $v0, 0x215($s0) -/* 171B4C 8024326C 00021600 */ sll $v0, $v0, 0x18 -/* 171B50 80243270 1C400004 */ bgtz $v0, .L80243284 -/* 171B54 80243274 00000000 */ nop -/* 171B58 80243278 A2000214 */ sb $zero, 0x214($s0) -/* 171B5C 8024327C 3C01802A */ lui $at, %hi(D_8029F258) -/* 171B60 80243280 AC33F258 */ sw $s3, %lo(D_8029F258)($at) -.L80243284: -/* 171B64 80243284 92020211 */ lbu $v0, 0x211($s0) -/* 171B68 80243288 82030217 */ lb $v1, 0x217($s0) -/* 171B6C 8024328C A2020217 */ sb $v0, 0x217($s0) -/* 171B70 80243290 00021600 */ sll $v0, $v0, 0x18 -/* 171B74 80243294 00021603 */ sra $v0, $v0, 0x18 -/* 171B78 80243298 18400008 */ blez $v0, .L802432BC -/* 171B7C 8024329C 00000000 */ nop -/* 171B80 802432A0 8E030440 */ lw $v1, 0x440($s0) -/* 171B84 802432A4 2402000D */ addiu $v0, $zero, 0xd -/* 171B88 802432A8 A2020216 */ sb $v0, 0x216($s0) -/* 171B8C 802432AC 82020217 */ lb $v0, 0x217($s0) -/* 171B90 802432B0 8C63000C */ lw $v1, 0xc($v1) -/* 171B94 802432B4 08090CB5 */ j .L802432D4 -/* 171B98 802432B8 AC62003C */ sw $v0, 0x3c($v1) -.L802432BC: -/* 171B9C 802432BC 10620005 */ beq $v1, $v0, .L802432D4 -/* 171BA0 802432C0 00000000 */ nop -/* 171BA4 802432C4 8E020440 */ lw $v0, 0x440($s0) -/* 171BA8 802432C8 A2000216 */ sb $zero, 0x216($s0) -/* 171BAC 802432CC 8C42000C */ lw $v0, 0xc($v0) -/* 171BB0 802432D0 AC40003C */ sw $zero, 0x3c($v0) -.L802432D4: -/* 171BB4 802432D4 82030210 */ lb $v1, 0x210($s0) -/* 171BB8 802432D8 24020009 */ addiu $v0, $zero, 9 -/* 171BBC 802432DC 5462000B */ bnel $v1, $v0, .L8024330C -/* 171BC0 802432E0 26310001 */ addiu $s1, $s1, 1 -/* 171BC4 802432E4 0200202D */ daddu $a0, $s0, $zero -/* 171BC8 802432E8 24050001 */ addiu $a1, $zero, 1 -/* 171BCC 802432EC 8E820000 */ lw $v0, ($s4) -/* 171BD0 802432F0 2406000A */ addiu $a2, $zero, 0xa -/* 171BD4 802432F4 34420020 */ ori $v0, $v0, 0x20 -/* 171BD8 802432F8 0C09E23E */ jal dispatch_damage_event_actor_0 -/* 171BDC 802432FC AE820000 */ sw $v0, ($s4) -/* 171BE0 80243300 3C01802A */ lui $at, %hi(D_8029F258) -/* 171BE4 80243304 AC33F258 */ sw $s3, %lo(D_8029F258)($at) -/* 171BE8 80243308 26310001 */ addiu $s1, $s1, 1 -.L8024330C: -/* 171BEC 8024330C 2A220018 */ slti $v0, $s1, 0x18 -/* 171BF0 80243310 1440FF92 */ bnez $v0, .L8024315C -/* 171BF4 80243314 00111080 */ sll $v0, $s1, 2 -/* 171BF8 80243318 24020002 */ addiu $v0, $zero, 2 -/* 171BFC 8024331C 3C01800E */ lui $at, %hi(gBattleSubState) -/* 171C00 80243320 AC22C4DC */ sw $v0, %lo(gBattleSubState)($at) -.L80243324: -/* 171C04 80243324 3C03800E */ lui $v1, %hi(gBattleSubState) -/* 171C08 80243328 8C63C4DC */ lw $v1, %lo(gBattleSubState)($v1) -/* 171C0C 8024332C 24020002 */ addiu $v0, $zero, 2 -.L80243330: -/* 171C10 80243330 14620070 */ bne $v1, $v0, .L802434F4 -/* 171C14 80243334 00000000 */ nop -/* 171C18 80243338 8EA201D8 */ lw $v0, 0x1d8($s5) -/* 171C1C 8024333C 10400005 */ beqz $v0, .L80243354 -/* 171C20 80243340 00000000 */ nop -/* 171C24 80243344 0C0B1059 */ jal does_script_exist -/* 171C28 80243348 8EA401E8 */ lw $a0, 0x1e8($s5) -/* 171C2C 8024334C 14400069 */ bnez $v0, .L802434F4 -/* 171C30 80243350 00000000 */ nop -.L80243354: -/* 171C34 80243354 1240000A */ beqz $s2, .L80243380 -/* 171C38 80243358 AEA001D8 */ sw $zero, 0x1d8($s5) -/* 171C3C 8024335C 8E4201D8 */ lw $v0, 0x1d8($s2) -/* 171C40 80243360 50400007 */ beql $v0, $zero, .L80243380 -/* 171C44 80243364 AE4001D8 */ sw $zero, 0x1d8($s2) -/* 171C48 80243368 8E4401E8 */ lw $a0, 0x1e8($s2) -/* 171C4C 8024336C 0C0B1059 */ jal does_script_exist -/* 171C50 80243370 00000000 */ nop -/* 171C54 80243374 1440005F */ bnez $v0, .L802434F4 -/* 171C58 80243378 00000000 */ nop -/* 171C5C 8024337C AE4001D8 */ sw $zero, 0x1d8($s2) -.L80243380: -/* 171C60 80243380 0000A02D */ daddu $s4, $zero, $zero -/* 171C64 80243384 0280882D */ daddu $s1, $s4, $zero -/* 171C68 80243388 02C0982D */ daddu $s3, $s6, $zero -.L8024338C: -/* 171C6C 8024338C 8E7000E0 */ lw $s0, 0xe0($s3) -/* 171C70 80243390 5200000B */ beql $s0, $zero, .L802433C0 -/* 171C74 80243394 26310001 */ addiu $s1, $s1, 1 -/* 171C78 80243398 8E0201D8 */ lw $v0, 0x1d8($s0) -/* 171C7C 8024339C 50400008 */ beql $v0, $zero, .L802433C0 -/* 171C80 802433A0 26310001 */ addiu $s1, $s1, 1 -/* 171C84 802433A4 8E0401E8 */ lw $a0, 0x1e8($s0) -/* 171C88 802433A8 0C0B1059 */ jal does_script_exist -/* 171C8C 802433AC 00000000 */ nop -/* 171C90 802433B0 50400002 */ beql $v0, $zero, .L802433BC -/* 171C94 802433B4 AE0001D8 */ sw $zero, 0x1d8($s0) -/* 171C98 802433B8 24140001 */ addiu $s4, $zero, 1 -.L802433BC: -/* 171C9C 802433BC 26310001 */ addiu $s1, $s1, 1 -.L802433C0: -/* 171CA0 802433C0 2A220018 */ slti $v0, $s1, 0x18 -/* 171CA4 802433C4 1440FFF1 */ bnez $v0, .L8024338C -/* 171CA8 802433C8 26730004 */ addiu $s3, $s3, 4 -/* 171CAC 802433CC 16800049 */ bnez $s4, .L802434F4 -/* 171CB0 802433D0 00000000 */ nop -/* 171CB4 802433D4 0C098D19 */ jal btl_check_player_defeated -/* 171CB8 802433D8 00000000 */ nop -/* 171CBC 802433DC 1440013F */ bnez $v0, .L802438DC -/* 171CC0 802433E0 00000000 */ nop -/* 171CC4 802433E4 0C098D0D */ jal btl_check_enemies_defeated -/* 171CC8 802433E8 00000000 */ nop -/* 171CCC 802433EC 1440013B */ bnez $v0, .L802438DC -/* 171CD0 802433F0 00000000 */ nop -/* 171CD4 802433F4 0C093903 */ jal btl_cam_use_preset -/* 171CD8 802433F8 24040002 */ addiu $a0, $zero, 2 -/* 171CDC 802433FC 12400007 */ beqz $s2, .L8024341C -/* 171CE0 80243400 3C030010 */ lui $v1, 0x10 -/* 171CE4 80243404 3C04800E */ lui $a0, %hi(gBattleStatus) -/* 171CE8 80243408 2484C070 */ addiu $a0, $a0, %lo(gBattleStatus) -/* 171CEC 8024340C 8C820000 */ lw $v0, ($a0) -/* 171CF0 80243410 00431024 */ and $v0, $v0, $v1 -/* 171CF4 80243414 14400003 */ bnez $v0, .L80243424 -/* 171CF8 80243418 00000000 */ nop -.L8024341C: -/* 171CFC 8024341C 08090D3B */ j .L802434EC -/* 171D00 80243420 24020004 */ addiu $v0, $zero, 4 -.L80243424: -/* 171D04 80243424 8C820004 */ lw $v0, 4($a0) -/* 171D08 80243428 30420040 */ andi $v0, $v0, 0x40 -/* 171D0C 8024342C 1440002F */ bnez $v0, .L802434EC -/* 171D10 80243430 24020004 */ addiu $v0, $zero, 4 -/* 171D14 80243434 3C03F7FF */ lui $v1, 0xf7ff -/* 171D18 80243438 8EA20000 */ lw $v0, ($s5) -/* 171D1C 8024343C 3463FFFF */ ori $v1, $v1, 0xffff -/* 171D20 80243440 00431024 */ and $v0, $v0, $v1 -/* 171D24 80243444 AEA20000 */ sw $v0, ($s5) -/* 171D28 80243448 8E420000 */ lw $v0, ($s2) -/* 171D2C 8024344C 00431024 */ and $v0, $v0, $v1 -/* 171D30 80243450 AE420000 */ sw $v0, ($s2) -/* 171D34 80243454 8EA20000 */ lw $v0, ($s5) -/* 171D38 80243458 3C030400 */ lui $v1, 0x400 -/* 171D3C 8024345C 00431025 */ or $v0, $v0, $v1 -/* 171D40 80243460 AEA20000 */ sw $v0, ($s5) -/* 171D44 80243464 8E420000 */ lw $v0, ($s2) -/* 171D48 80243468 00431025 */ or $v0, $v0, $v1 -/* 171D4C 8024346C AE420000 */ sw $v0, ($s2) -/* 171D50 80243470 82C2009A */ lb $v0, 0x9a($s6) -/* 171D54 80243474 1440000A */ bnez $v0, .L802434A0 -/* 171D58 80243478 2643000C */ addiu $v1, $s2, 0xc -/* 171D5C 8024347C C6400138 */ lwc1 $f0, 0x138($s2) -/* 171D60 80243480 C6420140 */ lwc1 $f2, 0x140($s2) -/* 171D64 80243484 E640000C */ swc1 $f0, 0xc($s2) -/* 171D68 80243488 E6420014 */ swc1 $f2, 0x14($s2) -/* 171D6C 8024348C C6A00138 */ lwc1 $f0, 0x138($s5) -/* 171D70 80243490 E6400018 */ swc1 $f0, 0x18($s2) -/* 171D74 80243494 C6A00140 */ lwc1 $f0, 0x140($s5) -/* 171D78 80243498 08090D37 */ j .L802434DC -/* 171D7C 8024349C E6400020 */ swc1 $f0, 0x20($s2) -.L802434A0: -/* 171D80 802434A0 C6400138 */ lwc1 $f0, 0x138($s2) -/* 171D84 802434A4 C6460140 */ lwc1 $f6, 0x140($s2) -/* 171D88 802434A8 3C0140A0 */ lui $at, 0x40a0 -/* 171D8C 802434AC 44811000 */ mtc1 $at, $f2 -/* 171D90 802434B0 C6440138 */ lwc1 $f4, 0x138($s2) -/* 171D94 802434B4 E640000C */ swc1 $f0, 0xc($s2) -/* 171D98 802434B8 46003006 */ mov.s $f0, $f6 -/* 171D9C 802434BC 46020000 */ add.s $f0, $f0, $f2 -/* 171DA0 802434C0 E6460014 */ swc1 $f6, 0x14($s2) -/* 171DA4 802434C4 E6440018 */ swc1 $f4, 0x18($s2) -/* 171DA8 802434C8 E6400020 */ swc1 $f0, 0x20($s2) -/* 171DAC 802434CC C6A00138 */ lwc1 $f0, 0x138($s5) -/* 171DB0 802434D0 E6400138 */ swc1 $f0, 0x138($s2) -/* 171DB4 802434D4 C6A00140 */ lwc1 $f0, 0x140($s5) -/* 171DB8 802434D8 E6400140 */ swc1 $f0, 0x140($s2) -.L802434DC: -/* 171DBC 802434DC 24020004 */ addiu $v0, $zero, 4 -/* 171DC0 802434E0 A4620064 */ sh $v0, 0x64($v1) -/* 171DC4 802434E4 24020003 */ addiu $v0, $zero, 3 -/* 171DC8 802434E8 AC600048 */ sw $zero, 0x48($v1) -.L802434EC: -/* 171DCC 802434EC 3C01800E */ lui $at, %hi(gBattleSubState) -/* 171DD0 802434F0 AC22C4DC */ sw $v0, %lo(gBattleSubState)($at) -.L802434F4: -/* 171DD4 802434F4 3C03800E */ lui $v1, %hi(gBattleSubState) -/* 171DD8 802434F8 8C63C4DC */ lw $v1, %lo(gBattleSubState)($v1) -/* 171DDC 802434FC 24020003 */ addiu $v0, $zero, 3 -/* 171DE0 80243500 1462006F */ bne $v1, $v0, .L802436C0 -/* 171DE4 80243504 00000000 */ nop -/* 171DE8 80243508 86420070 */ lh $v0, 0x70($s2) -/* 171DEC 8024350C 10400022 */ beqz $v0, .L80243598 -/* 171DF0 80243510 00000000 */ nop -/* 171DF4 80243514 C6400018 */ lwc1 $f0, 0x18($s2) -/* 171DF8 80243518 C6480144 */ lwc1 $f8, 0x144($s2) -/* 171DFC 8024351C C6420020 */ lwc1 $f2, 0x20($s2) -/* 171E00 80243520 46080001 */ sub.s $f0, $f0, $f8 -/* 171E04 80243524 C644014C */ lwc1 $f4, 0x14c($s2) -/* 171E08 80243528 46041081 */ sub.s $f2, $f2, $f4 -/* 171E0C 8024352C 44823000 */ mtc1 $v0, $f6 -/* 171E10 80243530 00000000 */ nop -/* 171E14 80243534 468031A0 */ cvt.s.w $f6, $f6 -/* 171E18 80243538 46060003 */ div.s $f0, $f0, $f6 -/* 171E1C 8024353C 46004200 */ add.s $f8, $f8, $f0 -/* 171E20 80243540 46003006 */ mov.s $f0, $f6 -/* 171E24 80243544 46061083 */ div.s $f2, $f2, $f6 -/* 171E28 80243548 C640000C */ lwc1 $f0, 0xc($s2) -/* 171E2C 8024354C 46022100 */ add.s $f4, $f4, $f2 -/* 171E30 80243550 E6480144 */ swc1 $f8, 0x144($s2) -/* 171E34 80243554 E644014C */ swc1 $f4, 0x14c($s2) -/* 171E38 80243558 C6A40144 */ lwc1 $f4, 0x144($s5) -/* 171E3C 8024355C 46040001 */ sub.s $f0, $f0, $f4 -/* 171E40 80243560 46003086 */ mov.s $f2, $f6 -/* 171E44 80243564 46060003 */ div.s $f0, $f0, $f6 -/* 171E48 80243568 46002100 */ add.s $f4, $f4, $f0 -/* 171E4C 8024356C E6A40144 */ swc1 $f4, 0x144($s5) -/* 171E50 80243570 C6400014 */ lwc1 $f0, 0x14($s2) -/* 171E54 80243574 C6A4014C */ lwc1 $f4, 0x14c($s5) -/* 171E58 80243578 86420070 */ lh $v0, 0x70($s2) -/* 171E5C 8024357C 46040001 */ sub.s $f0, $f0, $f4 -/* 171E60 80243580 44821000 */ mtc1 $v0, $f2 -/* 171E64 80243584 00000000 */ nop -/* 171E68 80243588 468010A0 */ cvt.s.w $f2, $f2 -/* 171E6C 8024358C 46020003 */ div.s $f0, $f0, $f2 -/* 171E70 80243590 46002100 */ add.s $f4, $f4, $f0 -/* 171E74 80243594 E6A4014C */ swc1 $f4, 0x14c($s5) -.L80243598: -/* 171E78 80243598 C64C0054 */ lwc1 $f12, 0x54($s2) -/* 171E7C 8024359C 3C0140C9 */ lui $at, 0x40c9 -/* 171E80 802435A0 34210FD0 */ ori $at, $at, 0xfd0 -/* 171E84 802435A4 4481B000 */ mtc1 $at, $f22 -/* 171E88 802435A8 00000000 */ nop -/* 171E8C 802435AC 46166302 */ mul.s $f12, $f12, $f22 -/* 171E90 802435B0 00000000 */ nop -/* 171E94 802435B4 3C0143B4 */ lui $at, 0x43b4 -/* 171E98 802435B8 4481C000 */ mtc1 $at, $f24 -/* 171E9C 802435BC 3C014180 */ lui $at, 0x4180 -/* 171EA0 802435C0 4481A000 */ mtc1 $at, $f20 -/* 171EA4 802435C4 0C00A85B */ jal sin_rad -/* 171EA8 802435C8 46186303 */ div.s $f12, $f12, $f24 -/* 171EAC 802435CC 46140002 */ mul.s $f0, $f0, $f20 -/* 171EB0 802435D0 00000000 */ nop -/* 171EB4 802435D4 C642014C */ lwc1 $f2, 0x14c($s2) -/* 171EB8 802435D8 46001081 */ sub.s $f2, $f2, $f0 -/* 171EBC 802435DC C64C0054 */ lwc1 $f12, 0x54($s2) -/* 171EC0 802435E0 0C00A6C9 */ jal clamp_angle -/* 171EC4 802435E4 E642014C */ swc1 $f2, 0x14c($s2) -/* 171EC8 802435E8 C64C0054 */ lwc1 $f12, 0x54($s2) -/* 171ECC 802435EC 46166302 */ mul.s $f12, $f12, $f22 -/* 171ED0 802435F0 00000000 */ nop -/* 171ED4 802435F4 E640018C */ swc1 $f0, 0x18c($s2) -/* 171ED8 802435F8 0C00A85B */ jal sin_rad -/* 171EDC 802435FC 46186303 */ div.s $f12, $f12, $f24 -/* 171EE0 80243600 46140002 */ mul.s $f0, $f0, $f20 -/* 171EE4 80243604 00000000 */ nop -/* 171EE8 80243608 C6A2014C */ lwc1 $f2, 0x14c($s5) -/* 171EEC 8024360C 46001080 */ add.s $f2, $f2, $f0 -/* 171EF0 80243610 E6A2014C */ swc1 $f2, 0x14c($s5) -/* 171EF4 80243614 0C00A6C9 */ jal clamp_angle -/* 171EF8 80243618 C64C0054 */ lwc1 $f12, 0x54($s2) -/* 171EFC 8024361C E6A0018C */ swc1 $f0, 0x18c($s5) -/* 171F00 80243620 C6400054 */ lwc1 $f0, 0x54($s2) -/* 171F04 80243624 3C0142B4 */ lui $at, 0x42b4 -/* 171F08 80243628 44811000 */ mtc1 $at, $f2 -/* 171F0C 8024362C 86420070 */ lh $v0, 0x70($s2) -/* 171F10 80243630 46020000 */ add.s $f0, $f0, $f2 -/* 171F14 80243634 96430070 */ lhu $v1, 0x70($s2) -/* 171F18 80243638 10400004 */ beqz $v0, .L8024364C -/* 171F1C 8024363C E6400054 */ swc1 $f0, 0x54($s2) -/* 171F20 80243640 2462FFFF */ addiu $v0, $v1, -1 -/* 171F24 80243644 08090DB0 */ j .L802436C0 -/* 171F28 80243648 A6420070 */ sh $v0, 0x70($s2) -.L8024364C: -/* 171F2C 8024364C C6400018 */ lwc1 $f0, 0x18($s2) -/* 171F30 80243650 C6420020 */ lwc1 $f2, 0x20($s2) -/* 171F34 80243654 C644000C */ lwc1 $f4, 0xc($s2) -/* 171F38 80243658 E6400144 */ swc1 $f0, 0x144($s2) -/* 171F3C 8024365C E642014C */ swc1 $f2, 0x14c($s2) -/* 171F40 80243660 E6A40144 */ swc1 $f4, 0x144($s5) -/* 171F44 80243664 C6400014 */ lwc1 $f0, 0x14($s2) -/* 171F48 80243668 E6A0014C */ swc1 $f0, 0x14c($s5) -/* 171F4C 8024366C 82C2009A */ lb $v0, 0x9a($s6) -/* 171F50 80243670 14400005 */ bnez $v0, .L80243688 -/* 171F54 80243674 00000000 */ nop -/* 171F58 80243678 C6400144 */ lwc1 $f0, 0x144($s2) -/* 171F5C 8024367C C642014C */ lwc1 $f2, 0x14c($s2) -/* 171F60 80243680 E6400138 */ swc1 $f0, 0x138($s2) -/* 171F64 80243684 E6420140 */ swc1 $f2, 0x140($s2) -.L80243688: -/* 171F68 80243688 C6A00144 */ lwc1 $f0, 0x144($s5) -/* 171F6C 8024368C C6A2014C */ lwc1 $f2, 0x14c($s5) -/* 171F70 80243690 E6A00138 */ swc1 $f0, 0x138($s5) -/* 171F74 80243694 E6A20140 */ swc1 $f2, 0x140($s5) -/* 171F78 80243698 3C05FFEF */ lui $a1, 0xffef -/* 171F7C 8024369C 34A5FFFF */ ori $a1, $a1, 0xffff -/* 171F80 802436A0 3C04800E */ lui $a0, %hi(gBattleStatus) -/* 171F84 802436A4 2484C070 */ addiu $a0, $a0, %lo(gBattleStatus) -/* 171F88 802436A8 8C820000 */ lw $v0, ($a0) -/* 171F8C 802436AC 24030004 */ addiu $v1, $zero, 4 -/* 171F90 802436B0 3C01800E */ lui $at, %hi(gBattleSubState) -/* 171F94 802436B4 AC23C4DC */ sw $v1, %lo(gBattleSubState)($at) -/* 171F98 802436B8 00451024 */ and $v0, $v0, $a1 -/* 171F9C 802436BC AC820000 */ sw $v0, ($a0) -.L802436C0: -/* 171FA0 802436C0 3C10800E */ lui $s0, %hi(gBattleSubState) -/* 171FA4 802436C4 2610C4DC */ addiu $s0, $s0, %lo(gBattleSubState) -/* 171FA8 802436C8 8E030000 */ lw $v1, ($s0) -/* 171FAC 802436CC 24020004 */ addiu $v0, $zero, 4 -/* 171FB0 802436D0 14620038 */ bne $v1, $v0, .L802437B4 -/* 171FB4 802436D4 00000000 */ nop -/* 171FB8 802436D8 3C03802A */ lui $v1, %hi(D_8029F258) -/* 171FBC 802436DC 2463F258 */ addiu $v1, $v1, %lo(D_8029F258) -/* 171FC0 802436E0 8C620000 */ lw $v0, ($v1) -/* 171FC4 802436E4 10400003 */ beqz $v0, .L802436F4 -/* 171FC8 802436E8 2442FFFF */ addiu $v0, $v0, -1 -/* 171FCC 802436EC 08090DED */ j .L802437B4 -/* 171FD0 802436F0 AC620000 */ sw $v0, ($v1) -.L802436F4: -/* 171FD4 802436F4 82C3008A */ lb $v1, 0x8a($s6) -/* 171FD8 802436F8 24020002 */ addiu $v0, $zero, 2 -/* 171FDC 802436FC 14620011 */ bne $v1, $v0, .L80243744 -/* 171FE0 80243700 3C04F7FF */ lui $a0, 0xf7ff -/* 171FE4 80243704 3C048028 */ lui $a0, %hi(PlayerScriptDispatcher) -/* 171FE8 80243708 24844EBC */ addiu $a0, $a0, %lo(PlayerScriptDispatcher) -/* 171FEC 8024370C 2405000A */ addiu $a1, $zero, 0xa -/* 171FF0 80243710 0000302D */ daddu $a2, $zero, $zero -/* 171FF4 80243714 24020003 */ addiu $v0, $zero, 3 -/* 171FF8 80243718 A2C200AD */ sb $v0, 0xad($s6) -/* 171FFC 8024371C 24020015 */ addiu $v0, $zero, 0x15 -/* 172000 80243720 A2C0008A */ sb $zero, 0x8a($s6) -/* 172004 80243724 0C0B0CF8 */ jal start_script -/* 172008 80243728 A2C201A7 */ sb $v0, 0x1a7($s6) -/* 17200C 8024372C 0040182D */ daddu $v1, $v0, $zero -/* 172010 80243730 AEA301D4 */ sw $v1, 0x1d4($s5) -/* 172014 80243734 8C620144 */ lw $v0, 0x144($v1) -/* 172018 80243738 AEA201E4 */ sw $v0, 0x1e4($s5) -/* 17201C 8024373C AC600148 */ sw $zero, 0x148($v1) -/* 172020 80243740 3C04F7FF */ lui $a0, 0xf7ff -.L80243744: -/* 172024 80243744 3C05800E */ lui $a1, %hi(gBattleStatus) -/* 172028 80243748 24A5C070 */ addiu $a1, $a1, %lo(gBattleStatus) -/* 17202C 8024374C 2406FFFD */ addiu $a2, $zero, -3 -/* 172030 80243750 8CA20000 */ lw $v0, ($a1) -/* 172034 80243754 3484FFFF */ ori $a0, $a0, 0xffff -/* 172038 80243758 00461024 */ and $v0, $v0, $a2 -/* 17203C 8024375C ACA20000 */ sw $v0, ($a1) -/* 172040 80243760 8EA20000 */ lw $v0, ($s5) -/* 172044 80243764 3C030400 */ lui $v1, 0x400 -/* 172048 80243768 00441024 */ and $v0, $v0, $a0 -/* 17204C 8024376C 00431025 */ or $v0, $v0, $v1 -/* 172050 80243770 12400005 */ beqz $s2, .L80243788 -/* 172054 80243774 AEA20000 */ sw $v0, ($s5) -/* 172058 80243778 8E420000 */ lw $v0, ($s2) -/* 17205C 8024377C 00441024 */ and $v0, $v0, $a0 -/* 172060 80243780 00431025 */ or $v0, $v0, $v1 -/* 172064 80243784 AE420000 */ sw $v0, ($s2) -.L80243788: -/* 172068 80243788 8CA20004 */ lw $v0, 4($a1) -/* 17206C 8024378C 24030005 */ addiu $v1, $zero, 5 -/* 172070 80243790 AE030000 */ sw $v1, ($s0) -/* 172074 80243794 2403FFFB */ addiu $v1, $zero, -5 -/* 172078 80243798 00461024 */ and $v0, $v0, $a2 -/* 17207C 8024379C 00431024 */ and $v0, $v0, $v1 -/* 172080 802437A0 2403FFF7 */ addiu $v1, $zero, -9 -/* 172084 802437A4 00431024 */ and $v0, $v0, $v1 -/* 172088 802437A8 2403FFEF */ addiu $v1, $zero, -0x11 -/* 17208C 802437AC 00431024 */ and $v0, $v0, $v1 -/* 172090 802437B0 ACA20004 */ sw $v0, 4($a1) -.L802437B4: -/* 172094 802437B4 3C03800E */ lui $v1, %hi(gBattleSubState) -/* 172098 802437B8 8C63C4DC */ lw $v1, %lo(gBattleSubState)($v1) -/* 17209C 802437BC 24020005 */ addiu $v0, $zero, 5 -/* 1720A0 802437C0 14620028 */ bne $v1, $v0, .L80243864 -/* 1720A4 802437C4 24020006 */ addiu $v0, $zero, 6 -/* 1720A8 802437C8 8EA201D4 */ lw $v0, 0x1d4($s5) -/* 1720AC 802437CC 50400007 */ beql $v0, $zero, .L802437EC -/* 1720B0 802437D0 AEA001D4 */ sw $zero, 0x1d4($s5) -/* 1720B4 802437D4 8EA401E4 */ lw $a0, 0x1e4($s5) -/* 1720B8 802437D8 0C0B1059 */ jal does_script_exist -/* 1720BC 802437DC 00000000 */ nop -/* 1720C0 802437E0 1440001D */ bnez $v0, .L80243858 -/* 1720C4 802437E4 00000000 */ nop -/* 1720C8 802437E8 AEA001D4 */ sw $zero, 0x1d4($s5) -.L802437EC: -/* 1720CC 802437EC 0000882D */ daddu $s1, $zero, $zero -/* 1720D0 802437F0 2413000D */ addiu $s3, $zero, 0xd -/* 1720D4 802437F4 02C0902D */ daddu $s2, $s6, $zero -.L802437F8: -/* 1720D8 802437F8 8E5000E0 */ lw $s0, 0xe0($s2) -/* 1720DC 802437FC 52000010 */ beql $s0, $zero, .L80243840 -/* 1720E0 80243800 26310001 */ addiu $s1, $s1, 1 -/* 1720E4 80243804 8E0201CC */ lw $v0, 0x1cc($s0) -/* 1720E8 80243808 5040000D */ beql $v0, $zero, .L80243840 -/* 1720EC 8024380C 26310001 */ addiu $s1, $s1, 1 -/* 1720F0 80243810 2405000A */ addiu $a1, $zero, 0xa -/* 1720F4 80243814 A2D301A7 */ sb $s3, 0x1a7($s6) -/* 1720F8 80243818 8E0401CC */ lw $a0, 0x1cc($s0) -/* 1720FC 8024381C 0C0B0CF8 */ jal start_script -/* 172100 80243820 0000302D */ daddu $a2, $zero, $zero -/* 172104 80243824 0040182D */ daddu $v1, $v0, $zero -/* 172108 80243828 AE0301DC */ sw $v1, 0x1dc($s0) -/* 17210C 8024382C 8C620144 */ lw $v0, 0x144($v1) -/* 172110 80243830 AE0201EC */ sw $v0, 0x1ec($s0) -/* 172114 80243834 36220200 */ ori $v0, $s1, 0x200 -/* 172118 80243838 AC620148 */ sw $v0, 0x148($v1) -/* 17211C 8024383C 26310001 */ addiu $s1, $s1, 1 -.L80243840: -/* 172120 80243840 2A220018 */ slti $v0, $s1, 0x18 -/* 172124 80243844 1440FFEC */ bnez $v0, .L802437F8 -/* 172128 80243848 26520004 */ addiu $s2, $s2, 4 -/* 17212C 8024384C 24020006 */ addiu $v0, $zero, 6 -/* 172130 80243850 3C01800E */ lui $at, %hi(gBattleSubState) -/* 172134 80243854 AC22C4DC */ sw $v0, %lo(gBattleSubState)($at) -.L80243858: -/* 172138 80243858 3C03800E */ lui $v1, %hi(gBattleSubState) -/* 17213C 8024385C 8C63C4DC */ lw $v1, %lo(gBattleSubState)($v1) -/* 172140 80243860 24020006 */ addiu $v0, $zero, 6 -.L80243864: -/* 172144 80243864 14620016 */ bne $v1, $v0, .L802438C0 -/* 172148 80243868 0000A02D */ daddu $s4, $zero, $zero -/* 17214C 8024386C 0280882D */ daddu $s1, $s4, $zero -/* 172150 80243870 02C0902D */ daddu $s2, $s6, $zero -.L80243874: -/* 172154 80243874 8E5000E0 */ lw $s0, 0xe0($s2) -/* 172158 80243878 5200000A */ beql $s0, $zero, .L802438A4 -/* 17215C 8024387C 26310001 */ addiu $s1, $s1, 1 -/* 172160 80243880 8E0201CC */ lw $v0, 0x1cc($s0) -/* 172164 80243884 50400007 */ beql $v0, $zero, .L802438A4 -/* 172168 80243888 26310001 */ addiu $s1, $s1, 1 -/* 17216C 8024388C 8E0401EC */ lw $a0, 0x1ec($s0) -/* 172170 80243890 0C0B1059 */ jal does_script_exist -/* 172174 80243894 00000000 */ nop -/* 172178 80243898 54400001 */ bnel $v0, $zero, .L802438A0 -/* 17217C 8024389C 24140001 */ addiu $s4, $zero, 1 -.L802438A0: -/* 172180 802438A0 26310001 */ addiu $s1, $s1, 1 -.L802438A4: -/* 172184 802438A4 2A220018 */ slti $v0, $s1, 0x18 -/* 172188 802438A8 1440FFF2 */ bnez $v0, .L80243874 -/* 17218C 802438AC 26520004 */ addiu $s2, $s2, 4 -/* 172190 802438B0 16800003 */ bnez $s4, .L802438C0 -/* 172194 802438B4 24020007 */ addiu $v0, $zero, 7 -/* 172198 802438B8 3C01800E */ lui $at, %hi(gBattleSubState) -/* 17219C 802438BC AC22C4DC */ sw $v0, %lo(gBattleSubState)($at) -.L802438C0: -/* 1721A0 802438C0 3C03800E */ lui $v1, %hi(gBattleSubState) -/* 1721A4 802438C4 8C63C4DC */ lw $v1, %lo(gBattleSubState)($v1) -/* 1721A8 802438C8 24020007 */ addiu $v0, $zero, 7 -/* 1721AC 802438CC 14620003 */ bne $v1, $v0, .L802438DC -/* 1721B0 802438D0 24040014 */ addiu $a0, $zero, 0x14 -.L802438D4: -/* 1721B4 802438D4 0C090464 */ jal btl_set_state -/* 1721B8 802438D8 00000000 */ nop -.L802438DC: -/* 1721BC 802438DC 8FBF002C */ lw $ra, 0x2c($sp) -/* 1721C0 802438E0 8FB60028 */ lw $s6, 0x28($sp) -/* 1721C4 802438E4 8FB50024 */ lw $s5, 0x24($sp) -/* 1721C8 802438E8 8FB40020 */ lw $s4, 0x20($sp) -/* 1721CC 802438EC 8FB3001C */ lw $s3, 0x1c($sp) -/* 1721D0 802438F0 8FB20018 */ lw $s2, 0x18($sp) -/* 1721D4 802438F4 8FB10014 */ lw $s1, 0x14($sp) -/* 1721D8 802438F8 8FB00010 */ lw $s0, 0x10($sp) -/* 1721DC 802438FC D7B80040 */ ldc1 $f24, 0x40($sp) -/* 1721E0 80243900 D7B60038 */ ldc1 $f22, 0x38($sp) -/* 1721E4 80243904 D7B40030 */ ldc1 $f20, 0x30($sp) -/* 1721E8 80243908 03E00008 */ jr $ra -/* 1721EC 8024390C 27BD0048 */ addiu $sp, $sp, 0x48 diff --git a/ver/us/asm/nonmatchings/18C790/btl_draw_upgrade_windows.s b/ver/us/asm/nonmatchings/18C790/btl_draw_upgrade_windows.s deleted file mode 100644 index be626f6bf8..0000000000 --- a/ver/us/asm/nonmatchings/18C790/btl_draw_upgrade_windows.s +++ /dev/null @@ -1,150 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel btl_draw_upgrade_windows -/* 18E86C 8025FF8C 27BDFF78 */ addiu $sp, $sp, -0x88 -/* 18E870 8025FF90 AFBF007C */ sw $ra, 0x7c($sp) -/* 18E874 8025FF94 AFBE0078 */ sw $fp, 0x78($sp) -/* 18E878 8025FF98 AFB70074 */ sw $s7, 0x74($sp) -/* 18E87C 8025FF9C AFB60070 */ sw $s6, 0x70($sp) -/* 18E880 8025FFA0 AFB5006C */ sw $s5, 0x6c($sp) -/* 18E884 8025FFA4 AFB40068 */ sw $s4, 0x68($sp) -/* 18E888 8025FFA8 AFB30064 */ sw $s3, 0x64($sp) -/* 18E88C 8025FFAC AFB20060 */ sw $s2, 0x60($sp) -/* 18E890 8025FFB0 AFB1005C */ sw $s1, 0x5c($sp) -/* 18E894 8025FFB4 AFB00058 */ sw $s0, 0x58($sp) -/* 18E898 8025FFB8 F7B40080 */ sdc1 $f20, 0x80($sp) -/* 18E89C 8025FFBC 10800014 */ beqz $a0, .L80260010 -/* 18E8A0 8025FFC0 24020001 */ addiu $v0, $zero, 1 -/* 18E8A4 8025FFC4 14820013 */ bne $a0, $v0, .L80260014 -/* 18E8A8 8025FFC8 24110064 */ addiu $s1, $zero, 0x64 -/* 18E8AC 8025FFCC 3C02800E */ lui $v0, %hi(gBattleStatus) -/* 18E8B0 8025FFD0 2442C070 */ addiu $v0, $v0, %lo(gBattleStatus) -/* 18E8B4 8025FFD4 80420048 */ lb $v0, 0x48($v0) -/* 18E8B8 8025FFD8 10400005 */ beqz $v0, .L8025FFF0 -/* 18E8BC 8025FFDC 0000882D */ daddu $s1, $zero, $zero -/* 18E8C0 8025FFE0 10440006 */ beq $v0, $a0, .L8025FFFC -/* 18E8C4 8025FFE4 24110064 */ addiu $s1, $zero, 0x64 -/* 18E8C8 8025FFE8 08098002 */ j .L80260008 -/* 18E8CC 8025FFEC 0220B82D */ daddu $s7, $s1, $zero -.L8025FFF0: -/* 18E8D0 8025FFF0 24170064 */ addiu $s7, $zero, 0x64 -/* 18E8D4 8025FFF4 08098007 */ j .L8026001C -/* 18E8D8 8025FFF8 241E0064 */ addiu $fp, $zero, 0x64 -.L8025FFFC: -/* 18E8DC 8025FFFC 0000B82D */ daddu $s7, $zero, $zero -/* 18E8E0 80260000 08098007 */ j .L8026001C -/* 18E8E4 80260004 241E0064 */ addiu $fp, $zero, 0x64 -.L80260008: -/* 18E8E8 80260008 08098007 */ j .L8026001C -/* 18E8EC 8026000C 0000F02D */ daddu $fp, $zero, $zero -.L80260010: -/* 18E8F0 80260010 24110064 */ addiu $s1, $zero, 0x64 -.L80260014: -/* 18E8F4 80260014 0220B82D */ daddu $s7, $s1, $zero -/* 18E8F8 80260018 0220F02D */ daddu $fp, $s1, $zero -.L8026001C: -/* 18E8FC 8026001C 27B60050 */ addiu $s6, $sp, 0x50 -/* 18E900 80260020 02C0282D */ daddu $a1, $s6, $zero -/* 18E904 80260024 3C15802A */ lui $s5, %hi(D_8029FA80) -/* 18E908 80260028 26B5FA80 */ addiu $s5, $s5, %lo(D_8029FA80) -/* 18E90C 8026002C 27B40054 */ addiu $s4, $sp, 0x54 -/* 18E910 80260030 8EA40000 */ lw $a0, ($s5) -/* 18E914 80260034 0C05126B */ jal hud_element_get_render_pos -/* 18E918 80260038 0280302D */ daddu $a2, $s4, $zero -/* 18E91C 8026003C 0000202D */ daddu $a0, $zero, $zero -/* 18E920 80260040 2405000F */ addiu $a1, $zero, 0xf -/* 18E924 80260044 2410002C */ addiu $s0, $zero, 0x2c -/* 18E928 80260048 241300FF */ addiu $s3, $zero, 0xff -/* 18E92C 8026004C 8FA60050 */ lw $a2, 0x50($sp) -/* 18E930 80260050 8FA70054 */ lw $a3, 0x54($sp) -/* 18E934 80260054 3C013F80 */ lui $at, 0x3f80 -/* 18E938 80260058 4481A000 */ mtc1 $at, $f20 -/* 18E93C 8026005C 24120140 */ addiu $s2, $zero, 0x140 -/* 18E940 80260060 AFB10020 */ sw $s1, 0x20($sp) -/* 18E944 80260064 241100F0 */ addiu $s1, $zero, 0xf0 -/* 18E948 80260068 AFA00010 */ sw $zero, 0x10($sp) -/* 18E94C 8026006C AFB00014 */ sw $s0, 0x14($sp) -/* 18E950 80260070 AFB00018 */ sw $s0, 0x18($sp) -/* 18E954 80260074 AFB3001C */ sw $s3, 0x1c($sp) -/* 18E958 80260078 AFA0002C */ sw $zero, 0x2c($sp) -/* 18E95C 8026007C AFA00030 */ sw $zero, 0x30($sp) -/* 18E960 80260080 AFA00034 */ sw $zero, 0x34($sp) -/* 18E964 80260084 AFA00038 */ sw $zero, 0x38($sp) -/* 18E968 80260088 AFA0003C */ sw $zero, 0x3c($sp) -/* 18E96C 8026008C AFA00040 */ sw $zero, 0x40($sp) -/* 18E970 80260090 AFB20044 */ sw $s2, 0x44($sp) -/* 18E974 80260094 AFB10048 */ sw $s1, 0x48($sp) -/* 18E978 80260098 AFA0004C */ sw $zero, 0x4c($sp) -/* 18E97C 8026009C 24C6FFEA */ addiu $a2, $a2, -0x16 -/* 18E980 802600A0 24E7FFEA */ addiu $a3, $a3, -0x16 -/* 18E984 802600A4 E7B40024 */ swc1 $f20, 0x24($sp) -/* 18E988 802600A8 0C03D4B8 */ jal draw_box -/* 18E98C 802600AC E7B40028 */ swc1 $f20, 0x28($sp) -/* 18E990 802600B0 02C0282D */ daddu $a1, $s6, $zero -/* 18E994 802600B4 8EA4000C */ lw $a0, 0xc($s5) -/* 18E998 802600B8 0C05126B */ jal hud_element_get_render_pos -/* 18E99C 802600BC 0280302D */ daddu $a2, $s4, $zero -/* 18E9A0 802600C0 0000202D */ daddu $a0, $zero, $zero -/* 18E9A4 802600C4 8FA60050 */ lw $a2, 0x50($sp) -/* 18E9A8 802600C8 8FA70054 */ lw $a3, 0x54($sp) -/* 18E9AC 802600CC 2405000F */ addiu $a1, $zero, 0xf -/* 18E9B0 802600D0 AFA00010 */ sw $zero, 0x10($sp) -/* 18E9B4 802600D4 AFB00014 */ sw $s0, 0x14($sp) -/* 18E9B8 802600D8 AFB00018 */ sw $s0, 0x18($sp) -/* 18E9BC 802600DC AFB3001C */ sw $s3, 0x1c($sp) -/* 18E9C0 802600E0 AFB70020 */ sw $s7, 0x20($sp) -/* 18E9C4 802600E4 E7B40024 */ swc1 $f20, 0x24($sp) -/* 18E9C8 802600E8 E7B40028 */ swc1 $f20, 0x28($sp) -/* 18E9CC 802600EC AFA0002C */ sw $zero, 0x2c($sp) -/* 18E9D0 802600F0 AFA00030 */ sw $zero, 0x30($sp) -/* 18E9D4 802600F4 AFA00034 */ sw $zero, 0x34($sp) -/* 18E9D8 802600F8 AFA00038 */ sw $zero, 0x38($sp) -/* 18E9DC 802600FC AFA0003C */ sw $zero, 0x3c($sp) -/* 18E9E0 80260100 AFA00040 */ sw $zero, 0x40($sp) -/* 18E9E4 80260104 AFB20044 */ sw $s2, 0x44($sp) -/* 18E9E8 80260108 AFB10048 */ sw $s1, 0x48($sp) -/* 18E9EC 8026010C AFA0004C */ sw $zero, 0x4c($sp) -/* 18E9F0 80260110 24C6FFEA */ addiu $a2, $a2, -0x16 -/* 18E9F4 80260114 0C03D4B8 */ jal draw_box -/* 18E9F8 80260118 24E7FFEA */ addiu $a3, $a3, -0x16 -/* 18E9FC 8026011C 02C0282D */ daddu $a1, $s6, $zero -/* 18EA00 80260120 8EA40008 */ lw $a0, 8($s5) -/* 18EA04 80260124 0C05126B */ jal hud_element_get_render_pos -/* 18EA08 80260128 0280302D */ daddu $a2, $s4, $zero -/* 18EA0C 8026012C 0000202D */ daddu $a0, $zero, $zero -/* 18EA10 80260130 8FA60050 */ lw $a2, 0x50($sp) -/* 18EA14 80260134 8FA70054 */ lw $a3, 0x54($sp) -/* 18EA18 80260138 2405000F */ addiu $a1, $zero, 0xf -/* 18EA1C 8026013C AFA00010 */ sw $zero, 0x10($sp) -/* 18EA20 80260140 AFB00014 */ sw $s0, 0x14($sp) -/* 18EA24 80260144 AFB00018 */ sw $s0, 0x18($sp) -/* 18EA28 80260148 AFB3001C */ sw $s3, 0x1c($sp) -/* 18EA2C 8026014C AFBE0020 */ sw $fp, 0x20($sp) -/* 18EA30 80260150 E7B40024 */ swc1 $f20, 0x24($sp) -/* 18EA34 80260154 E7B40028 */ swc1 $f20, 0x28($sp) -/* 18EA38 80260158 AFA0002C */ sw $zero, 0x2c($sp) -/* 18EA3C 8026015C AFA00030 */ sw $zero, 0x30($sp) -/* 18EA40 80260160 AFA00034 */ sw $zero, 0x34($sp) -/* 18EA44 80260164 AFA00038 */ sw $zero, 0x38($sp) -/* 18EA48 80260168 AFA0003C */ sw $zero, 0x3c($sp) -/* 18EA4C 8026016C AFA00040 */ sw $zero, 0x40($sp) -/* 18EA50 80260170 AFB20044 */ sw $s2, 0x44($sp) -/* 18EA54 80260174 AFB10048 */ sw $s1, 0x48($sp) -/* 18EA58 80260178 AFA0004C */ sw $zero, 0x4c($sp) -/* 18EA5C 8026017C 24C6FFEA */ addiu $a2, $a2, -0x16 -/* 18EA60 80260180 0C03D4B8 */ jal draw_box -/* 18EA64 80260184 24E7FFEA */ addiu $a3, $a3, -0x16 -/* 18EA68 80260188 8FBF007C */ lw $ra, 0x7c($sp) -/* 18EA6C 8026018C 8FBE0078 */ lw $fp, 0x78($sp) -/* 18EA70 80260190 8FB70074 */ lw $s7, 0x74($sp) -/* 18EA74 80260194 8FB60070 */ lw $s6, 0x70($sp) -/* 18EA78 80260198 8FB5006C */ lw $s5, 0x6c($sp) -/* 18EA7C 8026019C 8FB40068 */ lw $s4, 0x68($sp) -/* 18EA80 802601A0 8FB30064 */ lw $s3, 0x64($sp) -/* 18EA84 802601A4 8FB20060 */ lw $s2, 0x60($sp) -/* 18EA88 802601A8 8FB1005C */ lw $s1, 0x5c($sp) -/* 18EA8C 802601AC 8FB00058 */ lw $s0, 0x58($sp) -/* 18EA90 802601B0 D7B40080 */ ldc1 $f20, 0x80($sp) -/* 18EA94 802601B4 03E00008 */ jr $ra -/* 18EA98 802601B8 27BD0088 */ addiu $sp, $sp, 0x88 diff --git a/ver/us/asm/nonmatchings/actor_api/func_8026E558.s b/ver/us/asm/nonmatchings/actor_api/func_8026E558.s deleted file mode 100644 index 8cbdfb6db5..0000000000 --- a/ver/us/asm/nonmatchings/actor_api/func_8026E558.s +++ /dev/null @@ -1,216 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_8026E558 -/* 19CE38 8026E558 27BDFFD8 */ addiu $sp, $sp, -0x28 -/* 19CE3C 8026E55C AFB3001C */ sw $s3, 0x1c($sp) -/* 19CE40 8026E560 0080982D */ daddu $s3, $a0, $zero -/* 19CE44 8026E564 AFBF0020 */ sw $ra, 0x20($sp) -/* 19CE48 8026E568 AFB20018 */ sw $s2, 0x18($sp) -/* 19CE4C 8026E56C AFB10014 */ sw $s1, 0x14($sp) -/* 19CE50 8026E570 AFB00010 */ sw $s0, 0x10($sp) -/* 19CE54 8026E574 8E70000C */ lw $s0, 0xc($s3) -/* 19CE58 8026E578 8E050000 */ lw $a1, ($s0) -/* 19CE5C 8026E57C 0C0B1EAF */ jal evt_get_variable -/* 19CE60 8026E580 26100004 */ addiu $s0, $s0, 4 -/* 19CE64 8026E584 0040882D */ daddu $s1, $v0, $zero -/* 19CE68 8026E588 8E050000 */ lw $a1, ($s0) -/* 19CE6C 8026E58C 26100004 */ addiu $s0, $s0, 4 -/* 19CE70 8026E590 0C0B1EAF */ jal evt_get_variable -/* 19CE74 8026E594 0260202D */ daddu $a0, $s3, $zero -/* 19CE78 8026E598 0040902D */ daddu $s2, $v0, $zero -/* 19CE7C 8026E59C 2402FF81 */ addiu $v0, $zero, -0x7f -/* 19CE80 8026E5A0 16220002 */ bne $s1, $v0, .L8026E5AC -/* 19CE84 8026E5A4 8E100000 */ lw $s0, ($s0) -/* 19CE88 8026E5A8 8E710148 */ lw $s1, 0x148($s3) -.L8026E5AC: -/* 19CE8C 8026E5AC 0C09A75B */ jal get_actor -/* 19CE90 8026E5B0 0220202D */ daddu $a0, $s1, $zero -/* 19CE94 8026E5B4 0040202D */ daddu $a0, $v0, $zero -/* 19CE98 8026E5B8 C4820148 */ lwc1 $f2, 0x148($a0) -/* 19CE9C 8026E5BC 3C014220 */ lui $at, 0x4220 -/* 19CEA0 8026E5C0 44810000 */ mtc1 $at, $f0 -/* 19CEA4 8026E5C4 C4840144 */ lwc1 $f4, 0x144($a0) -/* 19CEA8 8026E5C8 C486014C */ lwc1 $f6, 0x14c($a0) -/* 19CEAC 8026E5CC 4600103C */ c.lt.s $f2, $f0 -/* 19CEB0 8026E5D0 00000000 */ nop -/* 19CEB4 8026E5D4 45000003 */ bc1f .L8026E5E4 -/* 19CEB8 8026E5D8 2406FFFF */ addiu $a2, $zero, -1 -/* 19CEBC 8026E5DC 0809B988 */ j .L8026E620 -/* 19CEC0 8026E5E0 0000402D */ daddu $t0, $zero, $zero -.L8026E5E4: -/* 19CEC4 8026E5E4 3C0142AA */ lui $at, 0x42aa -/* 19CEC8 8026E5E8 44810000 */ mtc1 $at, $f0 -/* 19CECC 8026E5EC 00000000 */ nop -/* 19CED0 8026E5F0 4600103C */ c.lt.s $f2, $f0 -/* 19CED4 8026E5F4 00000000 */ nop -/* 19CED8 8026E5F8 45010009 */ bc1t .L8026E620 -/* 19CEDC 8026E5FC 24080001 */ addiu $t0, $zero, 1 -/* 19CEE0 8026E600 3C0142C8 */ lui $at, 0x42c8 -/* 19CEE4 8026E604 44810000 */ mtc1 $at, $f0 -/* 19CEE8 8026E608 00000000 */ nop -/* 19CEEC 8026E60C 4600103C */ c.lt.s $f2, $f0 -/* 19CEF0 8026E610 00000000 */ nop -/* 19CEF4 8026E614 45000002 */ bc1f .L8026E620 -/* 19CEF8 8026E618 24080003 */ addiu $t0, $zero, 3 -/* 19CEFC 8026E61C 24080002 */ addiu $t0, $zero, 2 -.L8026E620: -/* 19CF00 8026E620 3C0141C8 */ lui $at, 0x41c8 -/* 19CF04 8026E624 44810000 */ mtc1 $at, $f0 -/* 19CF08 8026E628 00000000 */ nop -/* 19CF0C 8026E62C 4600203C */ c.lt.s $f4, $f0 -/* 19CF10 8026E630 00000000 */ nop -/* 19CF14 8026E634 45010010 */ bc1t .L8026E678 -/* 19CF18 8026E638 0000282D */ daddu $a1, $zero, $zero -/* 19CF1C 8026E63C 3C014282 */ lui $at, 0x4282 -/* 19CF20 8026E640 44810000 */ mtc1 $at, $f0 -/* 19CF24 8026E644 00000000 */ nop -/* 19CF28 8026E648 4600203C */ c.lt.s $f4, $f0 -/* 19CF2C 8026E64C 00000000 */ nop -/* 19CF30 8026E650 45010009 */ bc1t .L8026E678 -/* 19CF34 8026E654 24050001 */ addiu $a1, $zero, 1 -/* 19CF38 8026E658 3C0142D2 */ lui $at, 0x42d2 -/* 19CF3C 8026E65C 44810000 */ mtc1 $at, $f0 -/* 19CF40 8026E660 00000000 */ nop -/* 19CF44 8026E664 4600203C */ c.lt.s $f4, $f0 -/* 19CF48 8026E668 00000000 */ nop -/* 19CF4C 8026E66C 45000002 */ bc1f .L8026E678 -/* 19CF50 8026E670 24050003 */ addiu $a1, $zero, 3 -/* 19CF54 8026E674 24050002 */ addiu $a1, $zero, 2 -.L8026E678: -/* 19CF58 8026E678 3C01C1F0 */ lui $at, 0xc1f0 -/* 19CF5C 8026E67C 44810000 */ mtc1 $at, $f0 -/* 19CF60 8026E680 00000000 */ nop -/* 19CF64 8026E684 4600303C */ c.lt.s $f6, $f0 -/* 19CF68 8026E688 00000000 */ nop -/* 19CF6C 8026E68C 45000002 */ bc1f .L8026E698 -/* 19CF70 8026E690 24070001 */ addiu $a3, $zero, 1 -/* 19CF74 8026E694 0000382D */ daddu $a3, $zero, $zero -.L8026E698: -/* 19CF78 8026E698 1240000C */ beqz $s2, .L8026E6CC -/* 19CF7C 8026E69C 00000000 */ nop -/* 19CF80 8026E6A0 1E400006 */ bgtz $s2, .L8026E6BC -/* 19CF84 8026E6A4 24020001 */ addiu $v0, $zero, 1 -/* 19CF88 8026E6A8 2402FFFF */ addiu $v0, $zero, -1 -/* 19CF8C 8026E6AC 12420045 */ beq $s2, $v0, .L8026E7C4 -/* 19CF90 8026E6B0 00000000 */ nop -/* 19CF94 8026E6B4 0809BA0F */ j .L8026E83C -/* 19CF98 8026E6B8 0260202D */ daddu $a0, $s3, $zero -.L8026E6BC: -/* 19CF9C 8026E6BC 12420022 */ beq $s2, $v0, .L8026E748 -/* 19CFA0 8026E6C0 00000000 */ nop -/* 19CFA4 8026E6C4 0809BA0F */ j .L8026E83C -/* 19CFA8 8026E6C8 0260202D */ daddu $a0, $s3, $zero -.L8026E6CC: -/* 19CFAC 8026E6CC 8082040C */ lb $v0, 0x40c($a0) -/* 19CFB0 8026E6D0 18400059 */ blez $v0, .L8026E838 -/* 19CFB4 8026E6D4 0000882D */ daddu $s1, $zero, $zero -/* 19CFB8 8026E6D8 0040482D */ daddu $t1, $v0, $zero -/* 19CFBC 8026E6DC 00911021 */ addu $v0, $a0, $s1 -.L8026E6E0: -/* 19CFC0 8026E6E0 8043040D */ lb $v1, 0x40d($v0) -/* 19CFC4 8026E6E4 00031080 */ sll $v0, $v1, 2 -/* 19CFC8 8026E6E8 00431021 */ addu $v0, $v0, $v1 -/* 19CFCC 8026E6EC 00021080 */ sll $v0, $v0, 2 -/* 19CFD0 8026E6F0 2442022C */ addiu $v0, $v0, 0x22c -/* 19CFD4 8026E6F4 00821821 */ addu $v1, $a0, $v0 -/* 19CFD8 8026E6F8 80620011 */ lb $v0, 0x11($v1) -/* 19CFDC 8026E6FC 5445000D */ bnel $v0, $a1, .L8026E734 -/* 19CFE0 8026E700 26310001 */ addiu $s1, $s1, 1 -/* 19CFE4 8026E704 80620013 */ lb $v0, 0x13($v1) -/* 19CFE8 8026E708 1447000A */ bne $v0, $a3, .L8026E734 -/* 19CFEC 8026E70C 26310001 */ addiu $s1, $s1, 1 -/* 19CFF0 8026E710 80620012 */ lb $v0, 0x12($v1) -/* 19CFF4 8026E714 0048102A */ slt $v0, $v0, $t0 -/* 19CFF8 8026E718 10400006 */ beqz $v0, .L8026E734 -/* 19CFFC 8026E71C 00000000 */ nop -/* 19D000 8026E720 94620000 */ lhu $v0, ($v1) -/* 19D004 8026E724 A4820428 */ sh $v0, 0x428($a0) -/* 19D008 8026E728 90620003 */ lbu $v0, 3($v1) -/* 19D00C 8026E72C 0000302D */ daddu $a2, $zero, $zero -/* 19D010 8026E730 A0820426 */ sb $v0, 0x426($a0) -.L8026E734: -/* 19D014 8026E734 0229102A */ slt $v0, $s1, $t1 -/* 19D018 8026E738 1440FFE9 */ bnez $v0, .L8026E6E0 -/* 19D01C 8026E73C 00911021 */ addu $v0, $a0, $s1 -/* 19D020 8026E740 0809BA0F */ j .L8026E83C -/* 19D024 8026E744 0260202D */ daddu $a0, $s3, $zero -.L8026E748: -/* 19D028 8026E748 8082040C */ lb $v0, 0x40c($a0) -/* 19D02C 8026E74C 1840003A */ blez $v0, .L8026E838 -/* 19D030 8026E750 0000882D */ daddu $s1, $zero, $zero -/* 19D034 8026E754 0040482D */ daddu $t1, $v0, $zero -/* 19D038 8026E758 00911021 */ addu $v0, $a0, $s1 -.L8026E75C: -/* 19D03C 8026E75C 8043040D */ lb $v1, 0x40d($v0) -/* 19D040 8026E760 00031080 */ sll $v0, $v1, 2 -/* 19D044 8026E764 00431021 */ addu $v0, $v0, $v1 -/* 19D048 8026E768 00021080 */ sll $v0, $v0, 2 -/* 19D04C 8026E76C 2442022C */ addiu $v0, $v0, 0x22c -/* 19D050 8026E770 00821821 */ addu $v1, $a0, $v0 -/* 19D054 8026E774 80620011 */ lb $v0, 0x11($v1) -/* 19D058 8026E778 5445000D */ bnel $v0, $a1, .L8026E7B0 -/* 19D05C 8026E77C 26310001 */ addiu $s1, $s1, 1 -/* 19D060 8026E780 80620013 */ lb $v0, 0x13($v1) -/* 19D064 8026E784 1447000A */ bne $v0, $a3, .L8026E7B0 -/* 19D068 8026E788 26310001 */ addiu $s1, $s1, 1 -/* 19D06C 8026E78C 80620012 */ lb $v0, 0x12($v1) -/* 19D070 8026E790 0048102A */ slt $v0, $v0, $t0 -/* 19D074 8026E794 10400006 */ beqz $v0, .L8026E7B0 -/* 19D078 8026E798 00000000 */ nop -/* 19D07C 8026E79C 94620000 */ lhu $v0, ($v1) -/* 19D080 8026E7A0 A4820428 */ sh $v0, 0x428($a0) -/* 19D084 8026E7A4 90620003 */ lbu $v0, 3($v1) -/* 19D088 8026E7A8 0000302D */ daddu $a2, $zero, $zero -/* 19D08C 8026E7AC A0820426 */ sb $v0, 0x426($a0) -.L8026E7B0: -/* 19D090 8026E7B0 0229102A */ slt $v0, $s1, $t1 -/* 19D094 8026E7B4 1440FFE9 */ bnez $v0, .L8026E75C -/* 19D098 8026E7B8 00911021 */ addu $v0, $a0, $s1 -/* 19D09C 8026E7BC 0809BA0F */ j .L8026E83C -/* 19D0A0 8026E7C0 0260202D */ daddu $a0, $s3, $zero -.L8026E7C4: -/* 19D0A4 8026E7C4 8082040C */ lb $v0, 0x40c($a0) -/* 19D0A8 8026E7C8 1840001B */ blez $v0, .L8026E838 -/* 19D0AC 8026E7CC 0000882D */ daddu $s1, $zero, $zero -/* 19D0B0 8026E7D0 0040482D */ daddu $t1, $v0, $zero -/* 19D0B4 8026E7D4 00911021 */ addu $v0, $a0, $s1 -.L8026E7D8: -/* 19D0B8 8026E7D8 8043040D */ lb $v1, 0x40d($v0) -/* 19D0BC 8026E7DC 00031080 */ sll $v0, $v1, 2 -/* 19D0C0 8026E7E0 00431021 */ addu $v0, $v0, $v1 -/* 19D0C4 8026E7E4 00021080 */ sll $v0, $v0, 2 -/* 19D0C8 8026E7E8 2442022C */ addiu $v0, $v0, 0x22c -/* 19D0CC 8026E7EC 00821821 */ addu $v1, $a0, $v0 -/* 19D0D0 8026E7F0 80620011 */ lb $v0, 0x11($v1) -/* 19D0D4 8026E7F4 5445000D */ bnel $v0, $a1, .L8026E82C -/* 19D0D8 8026E7F8 26310001 */ addiu $s1, $s1, 1 -/* 19D0DC 8026E7FC 80620013 */ lb $v0, 0x13($v1) -/* 19D0E0 8026E800 1447000A */ bne $v0, $a3, .L8026E82C -/* 19D0E4 8026E804 26310001 */ addiu $s1, $s1, 1 -/* 19D0E8 8026E808 80620012 */ lb $v0, 0x12($v1) -/* 19D0EC 8026E80C 0048102A */ slt $v0, $v0, $t0 -/* 19D0F0 8026E810 10400006 */ beqz $v0, .L8026E82C -/* 19D0F4 8026E814 00000000 */ nop -/* 19D0F8 8026E818 94620000 */ lhu $v0, ($v1) -/* 19D0FC 8026E81C A4820428 */ sh $v0, 0x428($a0) -/* 19D100 8026E820 90620003 */ lbu $v0, 3($v1) -/* 19D104 8026E824 0000302D */ daddu $a2, $zero, $zero -/* 19D108 8026E828 A0820426 */ sb $v0, 0x426($a0) -.L8026E82C: -/* 19D10C 8026E82C 0229102A */ slt $v0, $s1, $t1 -/* 19D110 8026E830 1440FFE9 */ bnez $v0, .L8026E7D8 -/* 19D114 8026E834 00911021 */ addu $v0, $a0, $s1 -.L8026E838: -/* 19D118 8026E838 0260202D */ daddu $a0, $s3, $zero -.L8026E83C: -/* 19D11C 8026E83C 0C0B2026 */ jal evt_set_variable -/* 19D120 8026E840 0200282D */ daddu $a1, $s0, $zero -/* 19D124 8026E844 8FBF0020 */ lw $ra, 0x20($sp) -/* 19D128 8026E848 8FB3001C */ lw $s3, 0x1c($sp) -/* 19D12C 8026E84C 8FB20018 */ lw $s2, 0x18($sp) -/* 19D130 8026E850 8FB10014 */ lw $s1, 0x14($sp) -/* 19D134 8026E854 8FB00010 */ lw $s0, 0x10($sp) -/* 19D138 8026E858 24020002 */ addiu $v0, $zero, 2 -/* 19D13C 8026E85C 03E00008 */ jr $ra -/* 19D140 8026E860 27BD0028 */ addiu $sp, $sp, 0x28 diff --git a/ver/us/asm/nonmatchings/sprite/spr_draw_npc_sprite.s b/ver/us/asm/nonmatchings/sprite/spr_draw_npc_sprite.s deleted file mode 100644 index 1c5400a245..0000000000 --- a/ver/us/asm/nonmatchings/sprite/spr_draw_npc_sprite.s +++ /dev/null @@ -1,140 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel spr_draw_npc_sprite -/* 1014C8 802DE3D8 27BDFFB8 */ addiu $sp, $sp, -0x48 -/* 1014CC 802DE3DC 308900FF */ andi $t1, $a0, 0xff -/* 1014D0 802DE3E0 3C02802E */ lui $v0, %hi(SpriteInstances) -/* 1014D4 802DE3E4 2442FA48 */ addiu $v0, $v0, %lo(SpriteInstances) -/* 1014D8 802DE3E8 00091880 */ sll $v1, $t1, 2 -/* 1014DC 802DE3EC 00691821 */ addu $v1, $v1, $t1 -/* 1014E0 802DE3F0 00031880 */ sll $v1, $v1, 2 -/* 1014E4 802DE3F4 00621821 */ addu $v1, $v1, $v0 -/* 1014E8 802DE3F8 2402FFFF */ addiu $v0, $zero, -1 -/* 1014EC 802DE3FC AFBF003C */ sw $ra, 0x3c($sp) -/* 1014F0 802DE400 AFB60038 */ sw $s6, 0x38($sp) -/* 1014F4 802DE404 AFB50034 */ sw $s5, 0x34($sp) -/* 1014F8 802DE408 AFB40030 */ sw $s4, 0x30($sp) -/* 1014FC 802DE40C AFB3002C */ sw $s3, 0x2c($sp) -/* 101500 802DE410 AFB20028 */ sw $s2, 0x28($sp) -/* 101504 802DE414 AFB10024 */ sw $s1, 0x24($sp) -/* 101508 802DE418 AFB00020 */ sw $s0, 0x20($sp) -/* 10150C 802DE41C F7B40040 */ sdc1 $f20, 0x40($sp) -/* 101510 802DE420 8C68000C */ lw $t0, 0xc($v1) -/* 101514 802DE424 8FB60058 */ lw $s6, 0x58($sp) -/* 101518 802DE428 1102005C */ beq $t0, $v0, .L802DE59C -/* 10151C 802DE42C 0000102D */ daddu $v0, $zero, $zero -/* 101520 802DE430 8C620008 */ lw $v0, 8($v1) -/* 101524 802DE434 310300FF */ andi $v1, $t0, 0xff -/* 101528 802DE438 00031880 */ sll $v1, $v1, 2 -/* 10152C 802DE43C 8C550000 */ lw $s5, ($v0) -/* 101530 802DE440 24420004 */ addiu $v0, $v0, 4 -/* 101534 802DE444 8C540000 */ lw $s4, ($v0) -/* 101538 802DE448 00431021 */ addu $v0, $v0, $v1 -/* 10153C 802DE44C 8C51000C */ lw $s1, 0xc($v0) -/* 101540 802DE450 3C02802E */ lui $v0, %hi(D_802DFEA0) -/* 101544 802DE454 2442FEA0 */ addiu $v0, $v0, %lo(D_802DFEA0) -/* 101548 802DE458 AC400000 */ sw $zero, ($v0) -/* 10154C 802DE45C AC450004 */ sw $a1, 4($v0) -/* 101550 802DE460 AC400008 */ sw $zero, 8($v0) -/* 101554 802DE464 3C024000 */ lui $v0, 0x4000 -/* 101558 802DE468 00821024 */ and $v0, $a0, $v0 -/* 10155C 802DE46C 1440001B */ bnez $v0, .L802DE4DC -/* 101560 802DE470 24A2FFA5 */ addiu $v0, $a1, -0x5b -/* 101564 802DE474 3C03800A */ lui $v1, %hi(gCurrentCamID) -/* 101568 802DE478 8463A634 */ lh $v1, %lo(gCurrentCamID)($v1) -/* 10156C 802DE47C 00031080 */ sll $v0, $v1, 2 -/* 101570 802DE480 00431021 */ addu $v0, $v0, $v1 -/* 101574 802DE484 00021080 */ sll $v0, $v0, 2 -/* 101578 802DE488 00431023 */ subu $v0, $v0, $v1 -/* 10157C 802DE48C 000218C0 */ sll $v1, $v0, 3 -/* 101580 802DE490 00431021 */ addu $v0, $v0, $v1 -/* 101584 802DE494 000210C0 */ sll $v0, $v0, 3 -/* 101588 802DE498 3C01800B */ lui $at, %hi(gCameras+0x6C) -/* 10158C 802DE49C 00220821 */ addu $at, $at, $v0 -/* 101590 802DE4A0 C4221DEC */ lwc1 $f2, %lo(gCameras+0x6C)($at) -/* 101594 802DE4A4 44850000 */ mtc1 $a1, $f0 -/* 101598 802DE4A8 00000000 */ nop -/* 10159C 802DE4AC 46800020 */ cvt.s.w $f0, $f0 -/* 1015A0 802DE4B0 46020000 */ add.s $f0, $f0, $f2 -/* 1015A4 802DE4B4 4600010D */ trunc.w.s $f4, $f0 -/* 1015A8 802DE4B8 44052000 */ mfc1 $a1, $f4 -/* 1015AC 802DE4BC 00000000 */ nop -/* 1015B0 802DE4C0 28A20169 */ slti $v0, $a1, 0x169 -/* 1015B4 802DE4C4 50400001 */ beql $v0, $zero, .L802DE4CC -/* 1015B8 802DE4C8 24A5FE98 */ addiu $a1, $a1, -0x168 -.L802DE4CC: -/* 1015BC 802DE4CC 28A2FE98 */ slti $v0, $a1, -0x168 -/* 1015C0 802DE4D0 54400001 */ bnel $v0, $zero, .L802DE4D8 -/* 1015C4 802DE4D4 24A50168 */ addiu $a1, $a1, 0x168 -.L802DE4D8: -/* 1015C8 802DE4D8 24A2FFA5 */ addiu $v0, $a1, -0x5b -.L802DE4DC: -/* 1015CC 802DE4DC 2C4200B4 */ sltiu $v0, $v0, 0xb4 -/* 1015D0 802DE4E0 14400004 */ bnez $v0, .L802DE4F4 -/* 1015D4 802DE4E4 24A2010E */ addiu $v0, $a1, 0x10e -/* 1015D8 802DE4E8 2C4200B4 */ sltiu $v0, $v0, 0xb4 -/* 1015DC 802DE4EC 10400005 */ beqz $v0, .L802DE504 -/* 1015E0 802DE4F0 00000000 */ nop -.L802DE4F4: -/* 1015E4 802DE4F4 3C01BFC0 */ lui $at, 0xbfc0 -/* 1015E8 802DE4F8 4481A000 */ mtc1 $at, $f20 -/* 1015EC 802DE4FC 080B7943 */ j .L802DE50C -/* 1015F0 802DE500 00000000 */ nop -.L802DE504: -/* 1015F4 802DE504 3C013FC0 */ lui $at, 0x3fc0 -/* 1015F8 802DE508 4481A000 */ mtc1 $at, $f20 -.L802DE50C: -/* 1015FC 802DE50C 04810005 */ bgez $a0, .L802DE524 -/* 101600 802DE510 241300FF */ addiu $s3, $zero, 0xff -/* 101604 802DE514 14C00003 */ bnez $a2, .L802DE524 -/* 101608 802DE518 30D300FF */ andi $s3, $a2, 0xff -/* 10160C 802DE51C 080B7967 */ j .L802DE59C -/* 101610 802DE520 0000102D */ daddu $v0, $zero, $zero -.L802DE524: -/* 101614 802DE524 00091080 */ sll $v0, $t1, 2 -/* 101618 802DE528 00491021 */ addu $v0, $v0, $t1 -/* 10161C 802DE52C 00021080 */ sll $v0, $v0, 2 -/* 101620 802DE530 3C10802E */ lui $s0, %hi(SpriteInstances + 0x4) -/* 101624 802DE534 02028021 */ addu $s0, $s0, $v0 -/* 101628 802DE538 8E10FA4C */ lw $s0, %lo(SpriteInstances + 0x4)($s0) -/* 10162C 802DE53C 3C022000 */ lui $v0, 0x2000 -/* 101630 802DE540 00821024 */ and $v0, $a0, $v0 -/* 101634 802DE544 54400001 */ bnel $v0, $zero, .L802DE54C -/* 101638 802DE548 00E0A02D */ daddu $s4, $a3, $zero -.L802DE54C: -/* 10163C 802DE54C 8E030000 */ lw $v1, ($s0) -/* 101640 802DE550 2402FFFF */ addiu $v0, $zero, -1 -/* 101644 802DE554 10620010 */ beq $v1, $v0, .L802DE598 -/* 101648 802DE558 0040902D */ daddu $s2, $v0, $zero -.L802DE55C: -/* 10164C 802DE55C 8E050000 */ lw $a1, ($s0) -/* 101650 802DE560 0260202D */ daddu $a0, $s3, $zero -/* 101654 802DE564 AFB40010 */ sw $s4, 0x10($sp) -/* 101658 802DE568 E7B40014 */ swc1 $f20, 0x14($sp) -/* 10165C 802DE56C AFB60018 */ sw $s6, 0x18($sp) -/* 101660 802DE570 8E260000 */ lw $a2, ($s1) -/* 101664 802DE574 0C0B73B7 */ jal spr_draw_component -/* 101668 802DE578 02A0382D */ daddu $a3, $s5, $zero -/* 10166C 802DE57C 8E220000 */ lw $v0, ($s1) -/* 101670 802DE580 10520002 */ beq $v0, $s2, .L802DE58C -/* 101674 802DE584 26100004 */ addiu $s0, $s0, 4 -/* 101678 802DE588 26310004 */ addiu $s1, $s1, 4 -.L802DE58C: -/* 10167C 802DE58C 8E020000 */ lw $v0, ($s0) -/* 101680 802DE590 1452FFF2 */ bne $v0, $s2, .L802DE55C -/* 101684 802DE594 00000000 */ nop -.L802DE598: -/* 101688 802DE598 24020001 */ addiu $v0, $zero, 1 -.L802DE59C: -/* 10168C 802DE59C 8FBF003C */ lw $ra, 0x3c($sp) -/* 101690 802DE5A0 8FB60038 */ lw $s6, 0x38($sp) -/* 101694 802DE5A4 8FB50034 */ lw $s5, 0x34($sp) -/* 101698 802DE5A8 8FB40030 */ lw $s4, 0x30($sp) -/* 10169C 802DE5AC 8FB3002C */ lw $s3, 0x2c($sp) -/* 1016A0 802DE5B0 8FB20028 */ lw $s2, 0x28($sp) -/* 1016A4 802DE5B4 8FB10024 */ lw $s1, 0x24($sp) -/* 1016A8 802DE5B8 8FB00020 */ lw $s0, 0x20($sp) -/* 1016AC 802DE5BC D7B40040 */ ldc1 $f20, 0x40($sp) -/* 1016B0 802DE5C0 03E00008 */ jr $ra -/* 1016B4 802DE5C4 27BD0048 */ addiu $sp, $sp, 0x48 diff --git a/ver/us/asm/nonmatchings/sprite/spr_draw_player_sprite.s b/ver/us/asm/nonmatchings/sprite/spr_draw_player_sprite.s deleted file mode 100644 index fec96e7a8d..0000000000 --- a/ver/us/asm/nonmatchings/sprite/spr_draw_player_sprite.s +++ /dev/null @@ -1,185 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel spr_draw_player_sprite -/* 100D30 802DDC40 27BDFFB0 */ addiu $sp, $sp, -0x50 -/* 100D34 802DDC44 308A00FF */ andi $t2, $a0, 0xff -/* 100D38 802DDC48 000A1040 */ sll $v0, $t2, 1 -/* 100D3C 802DDC4C 004A1021 */ addu $v0, $v0, $t2 -/* 100D40 802DDC50 00021080 */ sll $v0, $v0, 2 -/* 100D44 802DDC54 2403FFFF */ addiu $v1, $zero, -1 -/* 100D48 802DDC58 AFBF0040 */ sw $ra, 0x40($sp) -/* 100D4C 802DDC5C AFB7003C */ sw $s7, 0x3c($sp) -/* 100D50 802DDC60 AFB60038 */ sw $s6, 0x38($sp) -/* 100D54 802DDC64 AFB50034 */ sw $s5, 0x34($sp) -/* 100D58 802DDC68 AFB40030 */ sw $s4, 0x30($sp) -/* 100D5C 802DDC6C AFB3002C */ sw $s3, 0x2c($sp) -/* 100D60 802DDC70 AFB20028 */ sw $s2, 0x28($sp) -/* 100D64 802DDC74 AFB10024 */ sw $s1, 0x24($sp) -/* 100D68 802DDC78 AFB00020 */ sw $s0, 0x20($sp) -/* 100D6C 802DDC7C F7B40048 */ sdc1 $f20, 0x48($sp) -/* 100D70 802DDC80 3C09802E */ lui $t1, %hi(spr_playerCurrentAnimInfo + 0x4) -/* 100D74 802DDC84 01224821 */ addu $t1, $t1, $v0 -/* 100D78 802DDC88 8D29F58C */ lw $t1, %lo(spr_playerCurrentAnimInfo + 0x4)($t1) -/* 100D7C 802DDC8C 8FB70060 */ lw $s7, 0x60($sp) -/* 100D80 802DDC90 11230080 */ beq $t1, $v1, .L802DDE94 -/* 100D84 802DDC94 0000102D */ daddu $v0, $zero, $zero -/* 100D88 802DDC98 00091403 */ sra $v0, $t1, 0x10 -/* 100D8C 802DDC9C 304200FF */ andi $v0, $v0, 0xff -/* 100D90 802DDCA0 2443FFFF */ addiu $v1, $v0, -1 -/* 100D94 802DDCA4 00031080 */ sll $v0, $v1, 2 -/* 100D98 802DDCA8 3C08802E */ lui $t0, %hi(spr_playerSprites) -/* 100D9C 802DDCAC 01024021 */ addu $t0, $t0, $v0 -/* 100DA0 802DDCB0 8D08F548 */ lw $t0, %lo(spr_playerSprites)($t0) -/* 100DA4 802DDCB4 3C01802E */ lui $at, %hi(D_802DF57C) -/* 100DA8 802DDCB8 AC23F57C */ sw $v1, %lo(D_802DF57C)($at) -/* 100DAC 802DDCBC 11000053 */ beqz $t0, .L802DDE0C -/* 100DB0 802DDCC0 312200FF */ andi $v0, $t1, 0xff -/* 100DB4 802DDCC4 8D140000 */ lw $s4, ($t0) -/* 100DB8 802DDCC8 25080004 */ addiu $t0, $t0, 4 -/* 100DBC 802DDCCC 00021080 */ sll $v0, $v0, 2 -/* 100DC0 802DDCD0 01021021 */ addu $v0, $t0, $v0 -/* 100DC4 802DDCD4 8C52000C */ lw $s2, 0xc($v0) -/* 100DC8 802DDCD8 3C020100 */ lui $v0, 0x100 -/* 100DCC 802DDCDC 01221024 */ and $v0, $t1, $v0 -/* 100DD0 802DDCE0 8D160000 */ lw $s6, ($t0) -/* 100DD4 802DDCE4 10400013 */ beqz $v0, .L802DDD34 -/* 100DD8 802DDCE8 24020005 */ addiu $v0, $zero, 5 -/* 100DDC 802DDCEC 10620009 */ beq $v1, $v0, .L802DDD14 -/* 100DE0 802DDCF0 28620006 */ slti $v0, $v1, 6 -/* 100DE4 802DDCF4 10400005 */ beqz $v0, .L802DDD0C -/* 100DE8 802DDCF8 24020009 */ addiu $v0, $zero, 9 -/* 100DEC 802DDCFC 10600005 */ beqz $v1, .L802DDD14 -/* 100DF0 802DDD00 3C024000 */ lui $v0, 0x4000 -/* 100DF4 802DDD04 080B774F */ j .L802DDD3C -/* 100DF8 802DDD08 00821024 */ and $v0, $a0, $v0 -.L802DDD0C: -/* 100DFC 802DDD0C 1462000A */ bne $v1, $v0, .L802DDD38 -/* 100E00 802DDD10 3C024000 */ lui $v0, 0x4000 -.L802DDD14: -/* 100E04 802DDD14 24630001 */ addiu $v1, $v1, 1 -/* 100E08 802DDD18 00031080 */ sll $v0, $v1, 2 -/* 100E0C 802DDD1C 3C14802E */ lui $s4, %hi(spr_playerSprites) -/* 100E10 802DDD20 0282A021 */ addu $s4, $s4, $v0 -/* 100E14 802DDD24 8E94F548 */ lw $s4, %lo(spr_playerSprites)($s4) -/* 100E18 802DDD28 3C01802E */ lui $at, %hi(D_802DF57C) -/* 100E1C 802DDD2C AC23F57C */ sw $v1, %lo(D_802DF57C)($at) -/* 100E20 802DDD30 8E940000 */ lw $s4, ($s4) -.L802DDD34: -/* 100E24 802DDD34 3C024000 */ lui $v0, 0x4000 -.L802DDD38: -/* 100E28 802DDD38 00821024 */ and $v0, $a0, $v0 -.L802DDD3C: -/* 100E2C 802DDD3C 14400019 */ bnez $v0, .L802DDDA4 -/* 100E30 802DDD40 24A2FFA5 */ addiu $v0, $a1, -0x5b -/* 100E34 802DDD44 3C03800A */ lui $v1, %hi(gCurrentCamID) -/* 100E38 802DDD48 8463A634 */ lh $v1, %lo(gCurrentCamID)($v1) -/* 100E3C 802DDD4C 00031080 */ sll $v0, $v1, 2 -/* 100E40 802DDD50 00431021 */ addu $v0, $v0, $v1 -/* 100E44 802DDD54 00021080 */ sll $v0, $v0, 2 -/* 100E48 802DDD58 00431023 */ subu $v0, $v0, $v1 -/* 100E4C 802DDD5C 000218C0 */ sll $v1, $v0, 3 -/* 100E50 802DDD60 00431021 */ addu $v0, $v0, $v1 -/* 100E54 802DDD64 000210C0 */ sll $v0, $v0, 3 -/* 100E58 802DDD68 3C01800B */ lui $at, %hi(gCameras+0x6C) -/* 100E5C 802DDD6C 00220821 */ addu $at, $at, $v0 -/* 100E60 802DDD70 C4201DEC */ lwc1 $f0, %lo(gCameras+0x6C)($at) -/* 100E64 802DDD74 46000007 */ neg.s $f0, $f0 -/* 100E68 802DDD78 4600008D */ trunc.w.s $f2, $f0 -/* 100E6C 802DDD7C 44021000 */ mfc1 $v0, $f2 -/* 100E70 802DDD80 00000000 */ nop -/* 100E74 802DDD84 00A22821 */ addu $a1, $a1, $v0 -/* 100E78 802DDD88 28A20169 */ slti $v0, $a1, 0x169 -/* 100E7C 802DDD8C 50400001 */ beql $v0, $zero, .L802DDD94 -/* 100E80 802DDD90 24A5FE98 */ addiu $a1, $a1, -0x168 -.L802DDD94: -/* 100E84 802DDD94 28A2FE98 */ slti $v0, $a1, -0x168 -/* 100E88 802DDD98 54400001 */ bnel $v0, $zero, .L802DDDA0 -/* 100E8C 802DDD9C 24A50168 */ addiu $a1, $a1, 0x168 -.L802DDDA0: -/* 100E90 802DDDA0 24A2FFA5 */ addiu $v0, $a1, -0x5b -.L802DDDA4: -/* 100E94 802DDDA4 2C4200B4 */ sltiu $v0, $v0, 0xb4 -/* 100E98 802DDDA8 14400004 */ bnez $v0, .L802DDDBC -/* 100E9C 802DDDAC 24A2010E */ addiu $v0, $a1, 0x10e -/* 100EA0 802DDDB0 2C4200B4 */ sltiu $v0, $v0, 0xb4 -/* 100EA4 802DDDB4 10400005 */ beqz $v0, .L802DDDCC -/* 100EA8 802DDDB8 3C021000 */ lui $v0, 0x1000 -.L802DDDBC: -/* 100EAC 802DDDBC 3C01BFC0 */ lui $at, 0xbfc0 -/* 100EB0 802DDDC0 4481A000 */ mtc1 $at, $f20 -/* 100EB4 802DDDC4 080B7775 */ j .L802DDDD4 -/* 100EB8 802DDDC8 3C021000 */ lui $v0, 0x1000 -.L802DDDCC: -/* 100EBC 802DDDCC 3C013FC0 */ lui $at, 0x3fc0 -/* 100EC0 802DDDD0 4481A000 */ mtc1 $at, $f20 -.L802DDDD4: -/* 100EC4 802DDDD4 00821024 */ and $v0, $a0, $v0 -/* 100EC8 802DDDD8 10400004 */ beqz $v0, .L802DDDEC -/* 100ECC 802DDDDC 00000000 */ nop -/* 100ED0 802DDDE0 44800000 */ mtc1 $zero, $f0 -/* 100ED4 802DDDE4 00000000 */ nop -/* 100ED8 802DDDE8 46140501 */ sub.s $f20, $f0, $f20 -.L802DDDEC: -/* 100EDC 802DDDEC 3C02802E */ lui $v0, %hi(D_802DFEA0) -/* 100EE0 802DDDF0 2442FEA0 */ addiu $v0, $v0, %lo(D_802DFEA0) -/* 100EE4 802DDDF4 AC400000 */ sw $zero, ($v0) -/* 100EE8 802DDDF8 AC450004 */ sw $a1, 4($v0) -/* 100EEC 802DDDFC 04810005 */ bgez $a0, .L802DDE14 -/* 100EF0 802DDE00 AC400008 */ sw $zero, 8($v0) -/* 100EF4 802DDE04 14C00004 */ bnez $a2, .L802DDE18 -/* 100EF8 802DDE08 30D300FF */ andi $s3, $a2, 0xff -.L802DDE0C: -/* 100EFC 802DDE0C 080B77A5 */ j .L802DDE94 -/* 100F00 802DDE10 0000102D */ daddu $v0, $zero, $zero -.L802DDE14: -/* 100F04 802DDE14 241300FF */ addiu $s3, $zero, 0xff -.L802DDE18: -/* 100F08 802DDE18 000A1040 */ sll $v0, $t2, 1 -/* 100F0C 802DDE1C 004A1021 */ addu $v0, $v0, $t2 -/* 100F10 802DDE20 00021080 */ sll $v0, $v0, 2 -/* 100F14 802DDE24 3C10802E */ lui $s0, %hi(spr_playerCurrentAnimInfo) -/* 100F18 802DDE28 02028021 */ addu $s0, $s0, $v0 -/* 100F1C 802DDE2C 8E10F588 */ lw $s0, %lo(spr_playerCurrentAnimInfo)($s0) -/* 100F20 802DDE30 3C022000 */ lui $v0, 0x2000 -/* 100F24 802DDE34 00821024 */ and $v0, $a0, $v0 -/* 100F28 802DDE38 54400001 */ bnel $v0, $zero, .L802DDE40 -/* 100F2C 802DDE3C 00E0B02D */ daddu $s6, $a3, $zero -.L802DDE40: -/* 100F30 802DDE40 8E030000 */ lw $v1, ($s0) -/* 100F34 802DDE44 2402FFFF */ addiu $v0, $zero, -1 -/* 100F38 802DDE48 10620011 */ beq $v1, $v0, .L802DDE90 -/* 100F3C 802DDE4C 3C150800 */ lui $s5, 0x800 -/* 100F40 802DDE50 0040882D */ daddu $s1, $v0, $zero -.L802DDE54: -/* 100F44 802DDE54 8E050000 */ lw $a1, ($s0) -/* 100F48 802DDE58 02752025 */ or $a0, $s3, $s5 -/* 100F4C 802DDE5C AFB60010 */ sw $s6, 0x10($sp) -/* 100F50 802DDE60 E7B40014 */ swc1 $f20, 0x14($sp) -/* 100F54 802DDE64 AFB70018 */ sw $s7, 0x18($sp) -/* 100F58 802DDE68 8E460000 */ lw $a2, ($s2) -/* 100F5C 802DDE6C 0C0B73B7 */ jal spr_draw_component -/* 100F60 802DDE70 0280382D */ daddu $a3, $s4, $zero -/* 100F64 802DDE74 8E420000 */ lw $v0, ($s2) -/* 100F68 802DDE78 10510002 */ beq $v0, $s1, .L802DDE84 -/* 100F6C 802DDE7C 26100004 */ addiu $s0, $s0, 4 -/* 100F70 802DDE80 26520004 */ addiu $s2, $s2, 4 -.L802DDE84: -/* 100F74 802DDE84 8E020000 */ lw $v0, ($s0) -/* 100F78 802DDE88 1451FFF2 */ bne $v0, $s1, .L802DDE54 -/* 100F7C 802DDE8C 00000000 */ nop -.L802DDE90: -/* 100F80 802DDE90 24020001 */ addiu $v0, $zero, 1 -.L802DDE94: -/* 100F84 802DDE94 8FBF0040 */ lw $ra, 0x40($sp) -/* 100F88 802DDE98 8FB7003C */ lw $s7, 0x3c($sp) -/* 100F8C 802DDE9C 8FB60038 */ lw $s6, 0x38($sp) -/* 100F90 802DDEA0 8FB50034 */ lw $s5, 0x34($sp) -/* 100F94 802DDEA4 8FB40030 */ lw $s4, 0x30($sp) -/* 100F98 802DDEA8 8FB3002C */ lw $s3, 0x2c($sp) -/* 100F9C 802DDEAC 8FB20028 */ lw $s2, 0x28($sp) -/* 100FA0 802DDEB0 8FB10024 */ lw $s1, 0x24($sp) -/* 100FA4 802DDEB4 8FB00020 */ lw $s0, 0x20($sp) -/* 100FA8 802DDEB8 D7B40048 */ ldc1 $f20, 0x48($sp) -/* 100FAC 802DDEBC 03E00008 */ jr $ra -/* 100FB0 802DDEC0 27BD0050 */ addiu $sp, $sp, 0x50