diff --git a/include/common_structs.h b/include/common_structs.h index c76e2b9091..16e6815bad 100644 --- a/include/common_structs.h +++ b/include/common_structs.h @@ -743,7 +743,7 @@ typedef struct Camera { /* 0x002 */ s16 moveFlags; /* 0x004 */ s16 updateMode; /* 0x006 */ s16 unk_06; - /* 0x008 */ s16 changingMap; + /* 0x008 */ s16 isChangingMap; /* 0x00A */ s16 viewportW; /* 0x00C */ s16 viewportH; /* 0x00E */ s16 viewportStartX; diff --git a/include/model.h b/include/model.h index 68124bc275..ad66d456c1 100644 --- a/include/model.h +++ b/include/model.h @@ -49,7 +49,7 @@ typedef struct Model { /* 0x04 */ Mtx* currentMatrix; /* 0x08 */ ModelNode* modelNode; /* 0x0C */ ModelGroupData* groupData; - /* 0x10 */ s32* currentSpecialMatrix; + /* 0x10 */ Mtx* currentSpecialMatrix; /* 0x14 */ char unk_14[4]; /* 0x18 */ Mtx specialMatrix; /* 0x58 */ Matrix4f transformMatrix; @@ -57,7 +57,7 @@ typedef struct Model { /* 0xA4 */ u8 texPannerID; /* 0xA5 */ u8 customGfxIndex; /* 0xA6 */ s8 renderMode; - /* 0xA7 */ s8 matrixMode; + /* 0xA7 */ u8 matrixMode; /* 0xA8 */ u8 textureID; /* 0xA9 */ s8 textureVariation; /* 0xAA */ char unk_AA[6]; @@ -68,14 +68,14 @@ typedef struct ModelTransformGroup { /* 0x02 */ u16 groupModelID; /* 0x04 */ Mtx* matrixRDP_N; /* 0x08 */ ModelNode* modelNode; - /* 0x0C */ Matrix4s* transformMtx; + /* 0x0C */ Mtx* transformMtx; /* 0x10 */ Mtx matrixA; /* 0x50 */ Matrix4f matrixB; /* 0x90 */ Vec3f center; /* 0x9C */ u8 minChildModelIndex; /* 0x9D */ u8 maxChildModelIndex; /* 0x9E */ u8 renderMode; - /* 0x9F */ s8 matrixMode; + /* 0x9F */ u8 matrixMode; } ModelTransformGroup; // size = 0xA0 typedef Model* ModelList[MAX_MODELS]; diff --git a/include/npc.h b/include/npc.h index 4f4f021aa2..ec6214fe2e 100644 --- a/include/npc.h +++ b/include/npc.h @@ -172,7 +172,7 @@ typedef struct StatDrop { typedef struct EnemyDrops { /* 0x00 */ u8 dropFlags; - /* 0x01 */ s8 itemDropChance; // % + /* 0x01 */ u8 itemDropChance; // % /* 0x02 */ ItemDrop itemDrops[8]; /* 0x32 */ StatDrop heartDrops[8]; /* 0x72 */ StatDrop flowerDrops[8]; @@ -181,6 +181,18 @@ typedef struct EnemyDrops { /* 0xB6 */ char unk_DE[2]; } EnemyDrops; // size = 0xB8 +// TODO unify this with EnemyDrops (union? requires changing tons of data) +typedef struct EnemyDropsFlat { + /* 0x00 */ u8 dropFlags; + /* 0x01 */ u8 itemDropChance; + /* 0x02 */ s16 itemDrops[8 * 3]; + /* 0x32 */ s16 heartDrops[8 * 4]; + /* 0x72 */ s16 flowerDrops[8 * 4]; + /* 0xB2 */ s16 minCoinBonus; + /* 0xB4 */ s16 maxCoinBonus; + /* 0xB6 */ char unk_DE[2]; +} EnemyDropsFlat; // size = 0xB8 + enum TerritoryShape { SHAPE_CYLINDER, SHAPE_RECT }; typedef struct { @@ -461,7 +473,7 @@ void disable_npc_shadow(Npc* npc); void update_npc_blur(Npc* npc); -void appendGfx_npc_blur(void* appendData); +void appendGfx_npc_blur(void* npc); void npc_enable_collisions(void); diff --git a/src/182B30.c b/src/182B30.c index 31be6f9017..02b5832fb7 100644 --- a/src/182B30.c +++ b/src/182B30.c @@ -1529,7 +1529,7 @@ void appendGfx_player_actor(void* arg0) { (player->stoneStatus != STATUS_STONE) && ((battleStatus->outtaSightActive > 0) || (gBattleStatus.flags2 & BS_FLAGS2_2))) { - if (is_ability_active(0x15)) { + if (is_ability_active(ABILITY_BERSERKER)) { playerParts->currentAnimation = func_80265D44(0x13); } else if (player->debuff == 6) { playerParts->currentAnimation = func_80265D44(0x15); @@ -1693,7 +1693,7 @@ void appendGfx_player_actor(void* arg0) { if (!cond1) { playerParts->currentAnimation = func_80265D44(1); } - } while(0); // needed to match + } while (0); // needed to match } if (!(gBattleStatus.flags1 & BS_FLAGS1_4) && (player->flags & ACTOR_FLAG_8000000)) { diff --git a/src/18F340.c b/src/18F340.c index ba6fa4bf88..d06a5869d0 100644 --- a/src/18F340.c +++ b/src/18F340.c @@ -226,7 +226,7 @@ ApiStatus func_802610CC(Evt* script, s32 isInitialCall) { set_background_color_blend(0, 0, 0, ((20 - script->functionTemp[0]) * 12) & 0xFC); script->functionTemp[0] -= 1; - do {} while(0); // TODO required to match + do {} while (0); // TODO required to match return (script->functionTemp[0] == 0) * ApiStatus_DONE2; } diff --git a/src/190B20.c b/src/190B20.c index c854d79688..238999c361 100644 --- a/src/190B20.c +++ b/src/190B20.c @@ -1994,12 +1994,16 @@ void func_802666E4(Actor* actor, f32 x, f32 y, f32 z, s32 damage) { } while (0); // required to match } -// Weird float load issue at the top -#ifdef NON_MATCHING +// grossness void func_802667F0(s32 arg0, Actor* actor, f32 x, f32 y, f32 z) { - Actor* player = gBattleStatus.playerActor; + BattleStatus* battleStatus = &gBattleStatus; + Actor* player; + s32 new_var; // TODO required to match s32 type; + actor->attackResultEffect = actor->attackResultEffect; // TODO required to match + player = battleStatus->playerActor; + if (actor->attackResultEffect == NULL) { type = 0; switch (arg0) { @@ -2033,10 +2037,12 @@ void func_802667F0(s32 arg0, Actor* actor, f32 x, f32 y, f32 z) { } actor->attackResultEffect = fx_attack_result_text(type, x, y, z - 10.0f, 12.0f, 90); actor->unk_205 = 80; + new_var = 2; // TODO required to match } else { actor->attackResultEffect->data.attackResultText->unk_18 = 0; type = actor->unk_204; - switch (arg0) { + new_var = arg0; // TODO required to match + switch (new_var) { // TODO required to match case 0: actor->unk_204++; if (actor->unk_204 > 2) { @@ -2067,9 +2073,6 @@ void func_802667F0(s32 arg0, Actor* actor, f32 x, f32 y, f32 z) { actor->unk_205 = 80; } } -#else -INCLUDE_ASM(void, "190B20", func_802667F0, s32 arg0, Actor* arg1, f32 arg2, f32 arg3, f32 arg4); -#endif void func_80266970(Actor* target) { target->unk_204 = 0; diff --git a/src/23680.c b/src/23680.c index cd8cf5f271..b5a97f3780 100644 --- a/src/23680.c +++ b/src/23680.c @@ -4,7 +4,300 @@ extern s32 D_8014B7F0; -INCLUDE_ASM(s32, "23680", spawn_drops); +void spawn_drops(Enemy* enemy) { + PlayerData* playerData = &gPlayerData; + EncounterStatus* encounter = &gCurrentEncounter; + EnemyDropsFlat* drops = (EnemyDropsFlat*) enemy->drops; // TODO: unify EnemyDrops / EnemyDropsFlat + Npc* npc = get_npc_unsafe(enemy->npcID); + Camera* camera = &gCameras[gCurrentCameraID]; + s32 pickupDelay; + s32 sp28; + s32 numShadowSpaces; + s32 itemToDrop; + f32 x, y, z; + f32 temp_f20; + f32 chance; + f32 attempts; + f32 temp_f24; + s32 maxCoinBonus; + s32 minCoinBonus; + s32 tempMax; + s32 var_fp; + s32 var_s1; + s32 totalWeight; + s32 facingAngleSign; + s32 angleMult; + s32 i, j; + s32 flags; + + numShadowSpaces = 0; + for (i = 0; i < MAX_SHADOWS; i++) { + if (get_shadow_by_index(i) == NULL) { + numShadowSpaces++; + } + } + + var_fp = 0; + sp28 = 246 - D_8014B7F0; + facingAngleSign = clamp_angle(camera->currentYaw + 90.0f); + x = npc->pos.x; + y = npc->pos.y + (npc->collisionHeight / 2); + z = npc->pos.z; + + angleMult = 0; + pickupDelay = 0; + + var_s1 = drops->itemDropChance; + if (drops->itemDropChance > rand_int(100)) { + tempMax = 0; + + for (i = 0; i < 8; i++) { + if (drops->itemDrops[3 * i] != 0) { + tempMax += drops->itemDrops[3 * i + 1]; + } else { + break; + } + } + + totalWeight = 0; + var_s1 = rand_int(tempMax); + itemToDrop = ITEM_NONE; + + for (i = 0; i < 8; i++) { + if (drops->itemDrops[3 * i] == 0) { + break; + } + + totalWeight += drops->itemDrops[3 * i + 1]; + if (drops->itemDrops[3 * i + 2] > 0) { + if (get_global_flag(drops->itemDrops[3 * i + 2] + 0x714) != 0) { + continue; + } + } + + if (totalWeight >= var_s1) { + itemToDrop = drops->itemDrops[3 * i]; + do { } while (0); // TODO required to match + break; + } + } + + // TODO this bullshit is required to match + flags = enemy->flags; + if (flags) { + flags = 0; + } + + if (itemToDrop != ITEM_NONE) { + make_item_entity(itemToDrop, x, y, z, 4, pickupDelay, facingAngleSign + angleMult * 360, 0); + var_fp++; + pickupDelay += 2; + facingAngleSign += 30.0; + if (var_fp >= 12) { + angleMult++; + facingAngleSign = angleMult * 8; + var_fp = 0; + } + + if (drops->itemDrops[3 * i + 2] >= 0) { + set_global_flag(drops->itemDrops[3 * i + 2] + 0x715); + } + } + } + + if (encounter->dropWhackaBump) { + encounter->dropWhackaBump = FALSE; + make_item_entity(ITEM_WHACKAS_BUMP, x, y, z, 4, pickupDelay, facingAngleSign + angleMult * 360, 0); + var_fp++; + pickupDelay += 2; + facingAngleSign += 30.0; + if (var_fp >= 12) { + angleMult++; + facingAngleSign = angleMult * 8; + var_fp = 0; + } + } + + var_s1 = 0; + temp_f24 = playerData->curHP / (f32) playerData->curMaxHP; + itemToDrop = ITEM_NONE; + + for (i = 0; i < 8; i++) { + attempts = drops->heartDrops[4 * i]; + temp_f20 = drops->heartDrops[4 * i + 1]; + attempts /= 32767.0f; + temp_f20 /= 32767.0f; + + if (temp_f24 <= attempts && + rand_int(100) <= temp_f20 * 100.0f) + { + attempts = drops->heartDrops[4 * i + 2]; + chance = drops->heartDrops[4 * i + 3]; + chance /= 32767.0f; + for (j = 0; j < attempts; j++) { + if (rand_int(100) <= chance * 100.0f) { + var_s1++; + } + } + break; + } + } + + if (is_ability_active(ABILITY_HEART_FINDER) != 0) { + s32 temp = var_s1 + 1; + var_s1 = temp + rand_int(2); + } + if (enemy->flags & ENEMY_FLAGS_800000) { + var_s1 = 0; + } + if (var_s1 != 0) { + itemToDrop = ITEM_HEART; + } + if (var_s1 * 2 > sp28) { + var_s1 = sp28 / 2; + } + sp28 -= 2 * var_s1; + if (var_s1 > numShadowSpaces) { + var_s1 = numShadowSpaces; + } + + numShadowSpaces -= var_s1; + + for (i = 0; i < var_s1; i++) { + make_item_entity(itemToDrop, x, y, z, 4, pickupDelay, facingAngleSign + (angleMult * 360), 0); + var_fp++; + pickupDelay += 2; + facingAngleSign += 30.0; + if (var_fp >= 12) { + var_fp = 0; + angleMult++; + facingAngleSign = angleMult * 8; + } + } + + var_s1 = 0; + itemToDrop = ITEM_NONE; + temp_f24 = playerData->curFP / (f32) playerData->curMaxFP; + + for (i = 0; i < 8; i++) { + attempts = drops->flowerDrops[4 * i + 0]; + temp_f20 = drops->flowerDrops[4 * i + 1]; + attempts /= 32767.0f; + temp_f20 /= 32767.0f; + + if (temp_f24 <= attempts && + rand_int(100) <= temp_f20 * 100.0f) + { + attempts = drops->flowerDrops[4 * i + 2]; + chance = drops->flowerDrops[4 * i + 3]; + chance /= 32767.0f; + for (j = 0; j < attempts; j++) { + if (rand_int(100) <= chance * 100.0f) { + var_s1++; + } + } + break; + } + } + + if (is_ability_active(ABILITY_FLOWER_FINDER) != 0) { + s32 temp = var_s1 + 1; + var_s1 = temp + rand_int(2); + } + if (enemy->flags & ENEMY_FLAGS_800000) { + var_s1 = 0; + } + if (var_s1 != 0) { + itemToDrop = ITEM_FLOWER_POINT; + } + if (var_s1 * 2 > sp28) { + var_s1 = sp28 / 2; + } + sp28 -= 2 * var_s1; + if (var_s1 > numShadowSpaces) { + var_s1 = numShadowSpaces; + } + + numShadowSpaces -= var_s1; + + for (i = 0; i < var_s1; i++) { + make_item_entity(itemToDrop, x, y, z, 4, pickupDelay, facingAngleSign + (angleMult * 360), 0); + var_fp++; + pickupDelay += 2; + facingAngleSign += 30.0; + if (var_fp >= 12) { + var_fp = 0; + angleMult++; + facingAngleSign = angleMult * 8; + } + } + + itemToDrop = ITEM_COIN; + do {} while (0); + minCoinBonus = drops->minCoinBonus; + tempMax = drops->maxCoinBonus; + + if (drops->maxCoinBonus < drops->minCoinBonus) { + var_s1 = minCoinBonus; + minCoinBonus = tempMax; + tempMax = var_s1; + } + + if (minCoinBonus < 0) { + var_s1 = rand_int(tempMax - minCoinBonus) + minCoinBonus; + } else { + var_s1 = tempMax - minCoinBonus; + if (var_s1 != 0) { + var_s1 = rand_int(var_s1) + minCoinBonus; + } else { + var_s1 = minCoinBonus; + } + } + + if (var_s1 < 0) { + var_s1 = 0; + } + var_s1 = var_s1 + encounter->coinsEarned; + + + if (is_ability_active(ABILITY_PAY_OFF) != 0) { + var_s1 += encounter->damageTaken / 2; + encounter->damageTaken = 0; + } + if (encounter->merleeCoinBonus != 0) { + encounter->merleeCoinBonus = 0; + var_s1 *= 3; + } + if (is_ability_active(ABILITY_MONEY_MONEY) != 0) { + var_s1 *= 2; + } + if (var_s1 > 20) { + var_s1 = 20; + } + if (enemy->flags & ENEMY_FLAGS_800000) { + var_s1 = 0; + } + if (var_s1 * 2 > sp28) { + var_s1 = sp28 / 2; + } + sp28 -= 2 * var_s1; + + if (var_s1 > numShadowSpaces) { + var_s1 = numShadowSpaces; + } + + for (i = 0; i < var_s1; i++) { + make_item_entity(itemToDrop, x, y, z, 4, pickupDelay, facingAngleSign + (angleMult * 360), 0); + var_fp++; + pickupDelay += 2; + facingAngleSign = facingAngleSign + 30.0; + if (var_fp >= 12) { + var_fp = 0; + angleMult++; + facingAngleSign = angleMult * 8; + } + } +} s32 get_coin_drop_amount(Enemy* enemy) { EncounterStatus* currentEncounter = &gCurrentEncounter; diff --git a/src/80850_len_3060.c b/src/80850_len_3060.c index 9043b7c58e..5dfdca20ab 100644 --- a/src/80850_len_3060.c +++ b/src/80850_len_3060.c @@ -512,23 +512,24 @@ void update_status_menu(void) { UiStatus* uiStatus = &gUIStatus; PlayerData* playerData = &gPlayerData; PlayerStatus* playerStatus = &gPlayerStatus; + s8 new_var; s32 s0; s32 s02; s32 fp; s32 s5; s32 s6; - s32 s2; + s32 id; s32 s4; s32 s7; s32 s1; - s32 s66; s32 v0; s32 temp; - +s32 new_var2; s32 sp50; s32 sp54; s32 sp5C; s32 sp60; + s32 something; if (gGameStatusPtr->creditsViewportMode >= 0 || gGameStatusPtr->demoState != 0 || @@ -641,6 +642,8 @@ void update_status_menu(void) { uiStatus->unk_3B[0] = 0; } + something = 174; + switch (uiStatus->hidden) { case 0: uiStatus->drawPosY += 10; @@ -668,6 +671,7 @@ void update_status_menu(void) { uiStatus->drawPosY -= 5; if (uiStatus->drawPosY < -100) { uiStatus->drawPosY = -100; + if (!uiStatus->ignoreChanges) { if (playerStatus->actionState != ACTION_STATE_IDLE) { uiStatus->showTimer = 0; @@ -691,8 +695,8 @@ void update_status_menu(void) { gDPSetScissor(gMasterGfxPos++, G_SC_NON_INTERLACE, 12, 20, SCREEN_WIDTH - 12, SCREEN_HEIGHT - 20); fp = uiStatus->drawPosX; s5 = uiStatus->drawPosY; - draw_box(0, WINDOW_STYLE_5, fp, s5, 0, 174, 35, 255, 0, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, NULL, NULL, NULL, 320, 240, NULL); - draw_box(0, WINDOW_STYLE_6, fp + 174, s5, 0, 122, 25, 255, 0, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, NULL, NULL, NULL, 320, 240, NULL); + draw_box(0, WINDOW_STYLE_5, fp, s5, 0, 174, 35, 255, 0, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, NULL, NULL, NULL, SCREEN_WIDTH, SCREEN_HEIGHT, NULL); + draw_box(0, WINDOW_STYLE_6, fp + 174, s5, 0, 122, 25, 255, 0, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, NULL, NULL, NULL, SCREEN_WIDTH, SCREEN_HEIGHT, NULL); if (uiStatus->hpBlinkTimer > 0) { uiStatus->hpBlinkTimer--; @@ -714,13 +718,13 @@ void update_status_menu(void) { } if (s6) { - s2 = uiStatus->hpIconIndices[0]; - hud_element_set_render_pos(s2, uiStatus->drawPosX + 22, uiStatus->drawPosY + 13); - hud_element_draw_next(s2); + id = uiStatus->hpIconIndices[0]; + hud_element_set_render_pos(id, uiStatus->drawPosX + 22, uiStatus->drawPosY + 13); + hud_element_draw_next(id); - s2 = uiStatus->hpIconIndices[1]; - hud_element_set_render_pos(s2, uiStatus->drawPosX + 37, uiStatus->drawPosY + 13); - hud_element_draw_next(s2); + id = uiStatus->hpIconIndices[1]; + hud_element_set_render_pos(id, uiStatus->drawPosX + 37, uiStatus->drawPosY + 13); + hud_element_draw_next(id); status_menu_draw_stat(uiStatus->iconIndex8, uiStatus->drawPosX + 48, uiStatus->drawPosY + 8, uiStatus->displayHP, playerData->curMaxHP); } @@ -745,13 +749,13 @@ void update_status_menu(void) { } if (s6) { - s2 = uiStatus->fpIconIndices[0]; - hud_element_set_render_pos(s2, uiStatus->drawPosX + 110, uiStatus->drawPosY + 13); - hud_element_draw_next(s2); + id = uiStatus->fpIconIndices[0]; + hud_element_set_render_pos(id, uiStatus->drawPosX + 110, uiStatus->drawPosY + 13); + hud_element_draw_next(id); - s2 = uiStatus->fpIconIndices[1]; - hud_element_set_render_pos(s2, uiStatus->drawPosX + 125, uiStatus->drawPosY + 13); - hud_element_draw_next(s2); + id = uiStatus->fpIconIndices[1]; + hud_element_set_render_pos(id, uiStatus->drawPosX + 125, uiStatus->drawPosY + 13); + hud_element_draw_next(id); status_menu_draw_stat(uiStatus->iconIndex9, uiStatus->drawPosX + 136, uiStatus->drawPosY + 8, uiStatus->displayFP, playerData->curMaxFP); } @@ -773,13 +777,13 @@ void update_status_menu(void) { } if (s6) { - s2 = uiStatus->starpointsIconIndex; - hud_element_set_render_pos(s2, uiStatus->drawPosX + 195, uiStatus->drawPosY + 14); - hud_element_draw_next(s2); + id = uiStatus->starpointsIconIndex; + hud_element_set_render_pos(id, uiStatus->drawPosX + 195, uiStatus->drawPosY + 14); + hud_element_draw_next(id); - s2 = uiStatus->starpointsShineIconIndex; - hud_element_set_render_pos(s2, uiStatus->drawPosX + 195, uiStatus->drawPosY + 9); - hud_element_draw_next(s2); + id = uiStatus->starpointsShineIconIndex; + hud_element_set_render_pos(id, uiStatus->drawPosX + 195, uiStatus->drawPosY + 9); + hud_element_draw_next(id); status_menu_draw_number(uiStatus->iconIndexA, uiStatus->drawPosX + 200, uiStatus->drawPosY + 8, playerData->starPoints, 2); } @@ -804,18 +808,18 @@ void update_status_menu(void) { } if (s6) { - s2 = uiStatus->coinIconIndex; - hud_element_set_render_pos(s2, uiStatus->drawPosX + 244, uiStatus->drawPosY + 14); - hud_element_draw_next(s2); + id = uiStatus->coinIconIndex; + hud_element_set_render_pos(id, uiStatus->drawPosX + 244, uiStatus->drawPosY + 14); + hud_element_draw_next(id); - s2 = uiStatus->coinSparkleIconIndex; - hud_element_set_render_pos(s2, uiStatus->drawPosX + 244, uiStatus->drawPosY + 14); - hud_element_draw_next(s2); + id = uiStatus->coinSparkleIconIndex; + hud_element_set_render_pos(id, uiStatus->drawPosX + 244, uiStatus->drawPosY + 14); + hud_element_draw_next(id); status_menu_draw_number(uiStatus->iconIndexB, uiStatus->drawPosX + 247, uiStatus->drawPosY + 8, uiStatus->displayCoins, 3); } - s2 = uiStatus->starIconIndex; + id = uiStatus->starIconIndex; s6 = 1; if (uiStatus->spBlinking) { @@ -891,85 +895,87 @@ void update_status_menu(void) { break; } s02++; - hud_element_set_script(s2, SPIncrementHudScripts[sp50]); - hud_element_set_render_pos(s2, fp + sp50 * 20 + D_800F7FE8[0], s5 - 2); - hud_element_draw_next(s2); + hud_element_set_script(id, SPIncrementHudScripts[sp50]); + hud_element_set_render_pos(id, fp + sp50 * 20 + D_800F7FE8[0], s5 - 2); + hud_element_draw_next(id); s1++; if (s02 >= s4 || s02 >= s7 && sp54 == 0) { break; } s02++; - hud_element_set_script(s2, SPIncrementHudScripts[sp50]); - hud_element_set_render_pos(s2, fp + sp50 * 20 + D_800F7FE8[1], s5 - 2); - hud_element_draw_next(s2); + hud_element_set_script(id, SPIncrementHudScripts[sp50]); + hud_element_set_render_pos(id, fp + sp50 * 20 + D_800F7FE8[1], s5 - 2); + hud_element_draw_next(id); s1++; if (s02 >= s4 || s02 >= s7 && sp54 == 0) { break; } s02++; - hud_element_set_script(s2, SPIncrementHudScripts[sp50]); - hud_element_set_render_pos(s2, fp + sp50 * 20 + D_800F7FE8[2], s5 - 2); - hud_element_draw_next(s2); + hud_element_set_script(id, SPIncrementHudScripts[sp50]); + hud_element_set_render_pos(id, fp + sp50 * 20 + D_800F7FE8[2], s5 - 2); + hud_element_draw_next(id); s1++; if (s02 >= s4 || s02 >= s7 && sp54 == 0) { break; } s02++; - hud_element_set_script(s2, SPIncrementHudScripts[sp50]); - hud_element_set_render_pos(s2, fp + sp50 * 20 + D_800F7FE8[3], s5 - 2); - hud_element_draw_next(s2); + hud_element_set_script(id, SPIncrementHudScripts[sp50]); + hud_element_set_render_pos(id, fp + sp50 * 20 + D_800F7FE8[3], s5 - 2); + hud_element_draw_next(id); s1++; if (s02 >= s4 || s02 >= s7 && sp54 == 0) { break; } s02++; - hud_element_set_script(s2, SPIncrementHudScripts[sp50]); - hud_element_set_render_pos(s2, fp + sp50 * 20 + D_800F7FE8[4], s5 - 2); - hud_element_draw_next(s2); + hud_element_set_script(id, SPIncrementHudScripts[sp50]); + hud_element_set_render_pos(id, fp + sp50 * 20 + D_800F7FE8[4], s5 - 2); + hud_element_draw_next(id); s1++; if (s02 >= s4 || s02 >= s7 && sp54 == 0) { break; } s02++; - hud_element_set_script(s2, SPIncrementHudScripts[sp50]); - hud_element_set_render_pos(s2, fp + sp50 * 20 + D_800F7FE8[5], s5 - 2); - hud_element_draw_next(s2); + hud_element_set_script(id, SPIncrementHudScripts[sp50]); + hud_element_set_render_pos(id, fp + sp50 * 20 + D_800F7FE8[5], s5 - 2); + hud_element_draw_next(id); s1++; if (s02 >= s4 || s02 >= s7 && sp54 == 0) { break; } s02++; - hud_element_set_script(s2, SPIncrementHudScripts[sp50]); - hud_element_set_render_pos(s2, fp + sp50 * 20 + D_800F7FE8[6], s5 - 2); - hud_element_draw_next(s2); + hud_element_set_script(id, SPIncrementHudScripts[sp50]); + hud_element_set_render_pos(id, fp + sp50 * 20 + D_800F7FE8[6], s5 - 2); + hud_element_draw_next(id); s1++; if (s02 >= s4 || s02 >= s7 && sp54 == 0) { break; } s02++; - hud_element_set_script(s2, SPStarHudScripts[sp50]); - hud_element_set_render_pos(s2, fp + 12 + sp50 * 20, s5); - hud_element_draw_next(s2); + hud_element_set_script(id, SPStarHudScripts[sp50]); + hud_element_set_render_pos(id, fp + 12 + sp50 * 20, s5); + hud_element_draw_next(id); s1 = 0; sp50++; if (s02 >= s4 || s02 >= s7 && sp54 == 0) { break; } } + new_var2 = s5; - s4 = playerData->maxStarPower * 8; + temp = playerData->maxStarPower; + s4 = temp * 8; while (TRUE) { if (s02 >= s4) { break; } if (s1 == 0) { s02++; - hud_element_set_script(s2, &HES_StatusSPEmptyIncrement); - hud_element_set_render_pos(s2, fp + sp50 * 20 + D_800F7FE8[s1], s5 - 2); - hud_element_draw_next(s2); + hud_element_set_script(id, &HES_StatusSPEmptyIncrement); + hud_element_set_render_pos(id, fp + sp50 * 20 + D_800F7FE8[s1], new_var2 - 2); + hud_element_draw_next(id); if (s02 >= s4) { break; } @@ -977,9 +983,9 @@ void update_status_menu(void) { } if (s1 == 1) { s02++; - hud_element_set_script(s2, &HES_StatusSPEmptyIncrement); - hud_element_set_render_pos(s2, fp + sp50 * 20 + D_800F7FE8[s1], s5 - 2); - hud_element_draw_next(s2); + hud_element_set_script(id, &HES_StatusSPEmptyIncrement); + hud_element_set_render_pos(id, fp + sp50 * 20 + D_800F7FE8[s1], new_var2 - 2); + hud_element_draw_next(id); if (s02 >= s4) { break; } @@ -987,9 +993,9 @@ void update_status_menu(void) { } if (s1 == 2) { s02++; - hud_element_set_script(s2, &HES_StatusSPEmptyIncrement); - hud_element_set_render_pos(s2, fp + sp50 * 20 + D_800F7FE8[s1], s5 - 2); - hud_element_draw_next(s2); + hud_element_set_script(id, &HES_StatusSPEmptyIncrement); + hud_element_set_render_pos(id, fp + sp50 * 20 + D_800F7FE8[s1], new_var2 - 2); + hud_element_draw_next(id); if (s02 >= s4) { break; } @@ -997,9 +1003,9 @@ void update_status_menu(void) { } if (s1 == 3) { s02++; - hud_element_set_script(s2, &HES_StatusSPEmptyIncrement); - hud_element_set_render_pos(s2, fp + sp50 * 20 + D_800F7FE8[s1], s5 - 2); - hud_element_draw_next(s2); + hud_element_set_script(id, &HES_StatusSPEmptyIncrement); + hud_element_set_render_pos(id, fp + sp50 * 20 + D_800F7FE8[s1], new_var2 - 2); + hud_element_draw_next(id); if (s02 >= s4) { break; } @@ -1007,9 +1013,9 @@ void update_status_menu(void) { } if (s1 == 4) { s02++; - hud_element_set_script(s2, &HES_StatusSPEmptyIncrement); - hud_element_set_render_pos(s2, fp + sp50 * 20 + D_800F7FE8[s1], s5 - 2); - hud_element_draw_next(s2); + hud_element_set_script(id, &HES_StatusSPEmptyIncrement); + hud_element_set_render_pos(id, fp + sp50 * 20 + D_800F7FE8[s1], new_var2 - 2); + hud_element_draw_next(id); if (s02 >= s4) { break; } @@ -1017,9 +1023,9 @@ void update_status_menu(void) { } if (s1 == 5) { s02++; - hud_element_set_script(s2, &HES_StatusSPEmptyIncrement); - hud_element_set_render_pos(s2, fp + sp50 * 20 + D_800F7FE8[s1], s5 - 2); - hud_element_draw_next(s2); + hud_element_set_script(id, &HES_StatusSPEmptyIncrement); + hud_element_set_render_pos(id, fp + sp50 * 20 + D_800F7FE8[s1], new_var2 - 2); + hud_element_draw_next(id); if (s02 >= s4) { break; } @@ -1027,9 +1033,9 @@ void update_status_menu(void) { } if (s1 == 6) { s02++; - hud_element_set_script(s2, &HES_StatusSPEmptyIncrement); - hud_element_set_render_pos(s2, fp + sp50 * 20 + D_800F7FE8[s1], s5 - 2); - hud_element_draw_next(s2); + hud_element_set_script(id, &HES_StatusSPEmptyIncrement); + hud_element_set_render_pos(id, fp + sp50 * 20 + D_800F7FE8[s1], new_var2 - 2); + hud_element_draw_next(id); if (s02 >= s4) { break; } @@ -1038,9 +1044,9 @@ void update_status_menu(void) { if (s1 == 7) { s02++; - hud_element_set_script(s2, &HES_StatusStarEmpty); - hud_element_set_render_pos(s2, fp + 12 + sp50 * 20, s5); - hud_element_draw_next(s2); + hud_element_set_script(id, &HES_StatusStarEmpty); + hud_element_set_render_pos(id, fp + 12 + sp50 * 20, new_var2); + hud_element_draw_next(id); if (s02 >= s4) { break; } @@ -1469,11 +1475,11 @@ void reset_status_menu(void) { uiStatus->displaySP = playerData->specialBarsFilled; uiStatus->unk_3B[1] = 0; - for (i = 0; i < 2; i++) { + for (i = 0; i < ARRAY_COUNT(uiStatus->hpIconIndices); i++) { copy_world_hud_element_ref_to_battle(uiStatus->hpIconIndices[i], uiStatus->hpIconIndices[i]); } - for (i = 0; i < 2; i++) { + for (i = 0; i < ARRAY_COUNT(uiStatus->fpIconIndices); i++) { copy_world_hud_element_ref_to_battle(uiStatus->fpIconIndices[i], uiStatus->fpIconIndices[i]); } @@ -1488,17 +1494,14 @@ void reset_status_menu(void) { copy_world_hud_element_ref_to_battle(uiStatus->starIconIndex, uiStatus->starIconIndex); } -// Weird order of loading stuff -#ifdef NON_EQUIVALENT s32 is_ability_active(s32 ability) { PlayerData* playerData = &gPlayerData; s32 attackFXArray[6]; - s32 abilityMoveID; s32 ret; s32 attackFXIndex; - s32 i; s32 badgeMoveID; u8* moveID; + s32 i; ret = 0; attackFXIndex = 0; @@ -1521,204 +1524,304 @@ s32 is_ability_active(s32 ability) { switch (ability) { case ABILITY_DODGE_MASTER: - abilityMoveID = 0x4c; + if (badgeMoveID == MOVE_DODGE_MASTER) { + ret++; + } break; case ABILITY_SPIKE_SHIELD: - abilityMoveID = 0x40; + if (badgeMoveID == MOVE_SPIKE_SHIELD) { + ret++; + } break; case ABILITY_FIRST_ATTACK: - abilityMoveID = 0x4d; + if (badgeMoveID == MOVE_FIRST_ATTACK) { + ret++; + } break; case ABILITY_HP_PLUS: - abilityMoveID = 0x52; + if (badgeMoveID == MOVE_HP_PLUS) { + ret++; + } break; case ABILITY_DOUBLE_DIP: - abilityMoveID = 0x35; + if (badgeMoveID == MOVE_DOUBLE_DIP) { + ret++; + } break; case ABILITY_MYSTERY_SCROLL: - if (badgeMoveID == 0x53) { + if (badgeMoveID == MOVE_MYSTERY_SCROLL) { ret++; } if (playerData->hasActionCommands) { ret++; } - continue; + break; case ABILITY_FIRE_SHIELD: - abilityMoveID = 0x41; + if (badgeMoveID == MOVE_FIRE_SHIELD) { + ret++; + } break; case ABILITY_PRETTY_LUCKY: - abilityMoveID = 0x42; + if (badgeMoveID == MOVE_PRETTY_LUCKY) { + ret++; + } break; case ABILITY_HP_DRAIN: - abilityMoveID = 0x5a; + if (badgeMoveID == MOVE_HP_DRAIN) { + ret++; + } break; case ABILITY_ALL_OR_NOTHING: - abilityMoveID = 0x3c; + if (badgeMoveID == MOVE_ALLOR_NOTHING) { + ret++; + } break; case ABILITY_SLOW_GO: - abilityMoveID = 0x4e; + if (badgeMoveID == MOVE_SLOW_GO) { + ret++; + } break; case ABILITY_FP_PLUS: - abilityMoveID = 0x5b; + if (badgeMoveID == MOVE_FP_PLUS) { + ret++; + } break; case ABILITY_ICE_POWER: - abilityMoveID = 0x3d; + if (badgeMoveID == MOVE_ICE_POWER) { + ret++; + } break; case ABILITY_FEELING_FINE: - abilityMoveID = 0x43; + if (badgeMoveID == MOVE_FEELING_FINE) { + ret++; + } break; case ABILITY_ATTACK_FX: - if (badgeMoveID == 0x54) { + if (badgeMoveID == MOVE_ATTACK_FX_A) { attackFXArray[attackFXIndex++] = 1; ret = -1; } - if (badgeMoveID == 0x55) { + if (badgeMoveID == MOVE_ATTACK_FX_D) { attackFXArray[attackFXIndex++] = 2; ret = -1; } - if (badgeMoveID == 0x56) { + if (badgeMoveID == MOVE_ATTACK_FX_B) { attackFXArray[attackFXIndex++] = 3; ret = -1; } - if (badgeMoveID == 0x57) { + if (badgeMoveID == MOVE_ATTACK_FX_E) { attackFXArray[attackFXIndex++] = 4; ret = -1; } - if (badgeMoveID == 0x58) { + if (badgeMoveID == MOVE_ATTACK_FX_C) { attackFXArray[attackFXIndex++] = 5; ret = -1; } - if (badgeMoveID == 0x59) { + if (badgeMoveID == MOVE_ATTACK_FX_F) { attackFXArray[attackFXIndex++] = 6; ret = -1; } - continue; + break; case ABILITY_MONEY_MONEY: - abilityMoveID = 0x5c; + if (badgeMoveID == MOVE_MONEY_MONEY) { + ret++; + } break; case ABILITY_CHILL_OUT: - abilityMoveID = 0x5d; + if (badgeMoveID == MOVE_CHILL_OUT_BADGE) { + ret++; + } break; case ABILITY_HAPPY_HEART: - abilityMoveID = 0x5e; + if (badgeMoveID == MOVE_HAPPY_HEART) { + ret++; + } break; case ABILITY_ZAP_TAP: - abilityMoveID = 0x44; + if (badgeMoveID == MOVE_ZAP_TAP) { + ret++; + } break; case ABILITY_MEGA_RUSH: - abilityMoveID = 0x5f; + if (badgeMoveID == MOVE_MEGA_RUSH) { + ret++; + } break; case ABILITY_BERSERKER: - abilityMoveID = 0x60; + if (badgeMoveID == MOVE_BERSERKER) { + ret++; + } break; case ABILITY_RIGHT_ON: - abilityMoveID = 0x4f; + if (badgeMoveID == MOVE_RIGHT_ON) { + ret++; + } break; case ABILITY_RUNAWAY_PAY: - abilityMoveID = 0x61; + if (badgeMoveID == MOVE_RUNAWAY_PAY) { + ret++; + } break; case ABILITY_FLOWER_SAVER: - abilityMoveID = 0x62; + if (badgeMoveID == MOVE_FLOWER_SAVER) { + ret++; + } break; case ABILITY_PAY_OFF: - abilityMoveID = 99; + if (badgeMoveID == MOVE_PAY_OFF) { + ret++; + } break; case ABILITY_DEFEND_PLUS: - abilityMoveID = 0x45; + if (badgeMoveID == MOVE_DEFEND_PLUS) { + ret++; + } break; case ABILITY_POWER_PLUS: - abilityMoveID = 0x3b; + if (badgeMoveID == MOVE_POWER_PLUS) { + ret++; + } break; case ABILITY_REFUND: - abilityMoveID = 0x6e; + if (badgeMoveID == MOVE_REFUND) { + ret++; + } break; case ABILITY_POWER_RUSH: - abilityMoveID = 100; + if (badgeMoveID == MOVE_POWER_RUSH) { + ret++; + } break; case ABILITY_CRAZY_HEART: - abilityMoveID = 0x65; + if (badgeMoveID == MOVE_CRAZY_HEART) { + ret++; + } break; case ABILITY_LAST_STAND: - abilityMoveID = 0x46; + if (badgeMoveID == MOVE_LAST_STAND) { + ret++; + } break; case ABILITY_CLOSE_CALL: - abilityMoveID = 0x47; + if (badgeMoveID == MOVE_CLOSE_CALL) { + ret++; + } break; case ABILITY_P_UP_D_DOWN: - abilityMoveID = 0x3e; + if (badgeMoveID == MOVE_P_UP_D_DOWN) { + ret++; + } break; case ABILITY_LUCKY_DAY: - abilityMoveID = 0x48; + if (badgeMoveID == MOVE_LUCKY_DAY) { + ret++; + } break; case ABILITY_MEGA_HP_DRAIN: - abilityMoveID = 0x66; + if (badgeMoveID == MOVE_MEGA_HP_DRAIN) { + ret++; + } break; case ABILITY_P_DOWN_D_UP: - abilityMoveID = 0x49; + if (badgeMoveID == MOVE_P_DOWN_D_UP) { + ret++; + } break; case ABILITY_FLOWER_FANATIC: - abilityMoveID = 0x67; + if (badgeMoveID == MOVE_FLOWER_FANATIC) { + ret++; + } break; case ABILITY_SPEEDY_SPIN: - abilityMoveID = 0x6d; + if (badgeMoveID == MOVE_SPEEDY_SPIN) { + ret++; + } break; case ABILITY_SPIN_ATTACK: - abilityMoveID = 0x6a; + if (badgeMoveID == MOVE_SPIN_ATTACK) { + ret++; + } break; case ABILITY_I_SPY: - abilityMoveID = 0x6c; + if (badgeMoveID == MOVE_I_SPY) { + ret++; + } break; case ABILITY_BUMP_ATTACK: - abilityMoveID = 0x50; + if (badgeMoveID == MOVE_BUMP_ATTACK) { + ret++; + } break; case ABILITY_QUICK_CHANGE: - abilityMoveID = 0x38; + if (badgeMoveID == MOVE_QUICK_CHANGE) { + ret++; + } break; case ABILITY_HEART_FINDER: - abilityMoveID = 0x68; + if (badgeMoveID == MOVE_HEART_FINDER) { + ret++; + } break; case ABILITY_FLOWER_FINDER: - abilityMoveID = 0x69; + if (badgeMoveID == MOVE_FLOWER_FINDER) { + ret++; + } break; case ABILITY_DIZZY_ATTACK: - abilityMoveID = 0x6b; + if (badgeMoveID == MOVE_DIZZY_ATTACK) { + ret++; + } break; case ABILITY_FINAL_GOOMPA: - abilityMoveID = 0x6f; + if (badgeMoveID == MOVE_UNUSED_FINAL_GOOMPA) { + ret++; + } break; case ABILITY_FINAL_BOMBOMB: - abilityMoveID = 0x70; + if (badgeMoveID == MOVE_UNUSED_FINAL_BOMBOMB) { + ret++; + } break; case ABILITY_DEEP_FOCUS: - abilityMoveID = 0x71; + if (badgeMoveID == MOVE_DEEP_FOCUS) { + ret++; + } break; case ABILITY_SUPER_FOCUS: - abilityMoveID = 0x72; + if (badgeMoveID == MOVE_SUPER_FOCUS) { + ret++; + } break; case ABILITY_KAIDEN: - abilityMoveID = 0x73; + if (badgeMoveID == MOVE_KAIDEN) { + ret++; + } break; case ABILITY_DAMAGE_DODGE: - abilityMoveID = 0x33; + if (badgeMoveID == MOVE_DAMAGE_DODGE) { + ret++; + } break; case ABILITY_HAPPY_FLOWER: - abilityMoveID = 0x74; + if (badgeMoveID == MOVE_HAPPY_FLOWER) { + ret++; + } break; case ABILITY_GROUP_FOCUS: - abilityMoveID = 0x75; + if (badgeMoveID == MOVE_GROUP_FOCUS) { + ret++; + } break; case ABILITY_PEEKABOO: - abilityMoveID = 0x76; + if (badgeMoveID == MOVE_PEEKABOO) { + ret++; + } break; case ABILITY_HEALTHY_HEALTHY: - abilityMoveID = 0x4a; + if (badgeMoveID == MOVE_HEALTHY_HEALTHY) { + ret++; + } break; - default: - do { } while (0); - continue; - } - if (badgeMoveID == abilityMoveID) { - ret++; } } @@ -1727,9 +1830,6 @@ s32 is_ability_active(s32 ability) { } return ret; } -#else -INCLUDE_ASM(s32, "80850_len_3060", is_ability_active); -#endif s32 is_partner_ability_active(s32 ability) { return 0; diff --git a/src/8a860_len_3f30.c b/src/8a860_len_3f30.c index 1d7d2f0be5..a2b48c8f71 100644 --- a/src/8a860_len_3f30.c +++ b/src/8a860_len_3f30.c @@ -1001,7 +1001,442 @@ s32 popup_menu_update(void) { return 0; } +#ifdef WIP +void popup_menu_draw_menu_contents(s32* userData, s32 baseX, s32 baseY, s32 width, s32 height, s32 opacity, s32 darkening) { + s32 x; + s32 xOffset; + s32 sp28; + Gfx* temp_a3; + Gfx* var_a1; + Gfx* var_a1_6; + f32 temp_f2; + s16 temp_s1; + s16 var_t0; + + s32 temp_a0; + s32 temp_a0_3; + + s32 temp_s1_2; + s32 temp_s3; + s32 temp_s3_2; + s32 temp_s3_3; + s32 temp_t1; + + s32 temp_v1; + s32 temp_v1_5; + + s32 var_a0; + s32 var_a1_3; + s32 var_a1_5; + + s32 var_s1; + s32 var_s1_2; + s32 var_s1_3; + s32 var_s1_4; + s32 var_s1_5; + + s32 i; + + s32 j; + s32 var_s6; + s32 var_s7; + + s32 var_t0_2; + + s32 id; + + s32 s0; + + s32 tmp; + s32 tmp2; + + if (D_8010D640 != 0xA) { + if (D_8010D640 < 0xB) { + if (D_8010D640 < 0) { + if (D_8010D640 < -2) { + if (D_8010D640 < -5) { + if (D_8010D640 >= -8) { + goto block_14; + } + } + } else { + goto block_14; + } + } else { + if (D_8010D640 != 1) { + return; + } + goto block_14; + } + } else { + if (D_8010D640 < 0x20) { + if ((D_8010D640 < 0x1E) && (D_8010D640 != 0x14)) { + return; + } + goto block_14; + } + if (D_8010D640 < 0x6A) { + if (D_8010D640 >= 0x64) { + goto block_14; + } + } + } + } + return; + +block_14: + temp_s1 = D_8010D654 * -0xD; + var_a0 = temp_s1 - D_8010D658; + baseX += 2; + baseY += 0xF; + if (var_a0 < 130) { + var_a0 = (s32) (var_a0 * 0.5); + } else { + var_a0 = (var_a0 * 100) / 150; + } + var_t0 = D_8010D658 + var_a0; + if (var_a0 == 0) { + var_t0 = temp_s1; + } + D_8010D658 = var_t0; + sp28 = -var_t0 / 13; + x = baseX; + tmp2 = (D_8010D656 * 0xD) + 4; + switch (gPopupMenu->popupType) { + case 0: + case 3: + case 5: + case 6: + case 7: + case 8: + case 9: + case 10: + case 11: + case 12: + case 13: + gDPSetScissor(gMasterGfxPos++, G_SC_NON_INTERLACE, x, baseY, x + 0x70, baseY + tmp2); + break; + case 1: + case 4: + gDPSetScissor(gMasterGfxPos++, G_SC_NON_INTERLACE, x, baseY, x + 0x5A, baseY + tmp2); + break; + case 2: + gDPSetScissor(gMasterGfxPos++, G_SC_NON_INTERLACE, x, baseY, x + 0xA0, baseY + tmp2); + break; + } + temp_v1 = baseY + D_8010D658; + var_s1 = temp_v1 + 8; + if (gPopupMenu->popupType == 2) { + var_s1 = temp_v1 + 0x15; + } + id = D_8010D65C; + hud_element_set_render_pos(id, baseX + 0x49, var_s1 - 3); + hud_element_set_alpha(id, D_8010D650); + if (D_8010D68F < gPopupMenu->numEntries) { + hud_element_draw_without_clipping(id); + } + var_s1_2 = baseY + 2; + x = baseX; + var_t0_2 = var_s1_2 + (D_8010D656 * 0xD); + if ((gPopupMenu->popupType == 2) && (D_8010D654 < 2)) { + var_s1_2 = baseY; + var_t0_2 += 1; + } + temp_a3 = gMasterGfxPos; + temp_a3->words.w0 = (((s32) ((f32) x * 4.0f) & 0xFFF) << 0xC) | (((s32) ((f32) var_s1_2 * 4.0f) & 0xFFF) | 0xED000000); + xOffset = 0; + temp_f2 = (f32) (x + D_801098BC[gPopupMenu->popupType]) * 4.0f; + gMasterGfxPos += 8; + temp_t1 = baseY + D_8010D658; + x = baseX + 0x20; + temp_a3->words.w1 = (((s32) temp_f2 & 0xFFF) << 0xC) | ((s32) ((f32) var_t0_2 * 4.0f) & 0xFFF); + var_s1_3 = temp_t1 + 2; + if (gPopupMenu->popupType == 2) { + var_s1_3 = temp_t1; + xOffset = 2; + } + + for (i = 0; i < gPopupMenu->numEntries; i++) { + if ((i < (sp28 - 1)) || ((sp28 + D_8010D656) < i)) { + var_s1_3 += 0xD; + if (i == 0) { + var_s1_3 += xOffset; + } + } else { + s0 = D_8010D690; + if (gPopupMenu->popupType == 1) { + s0 = 10; + } + if (gPopupMenu->enabled[i] == 0) { + s0 = 11; + } + switch (gPopupMenu->popupType) { + case 0: + case 2: + case 3: + case 5: + case 6: + case 7: + case 9: + case 12: + case 13: + draw_msg(gPopupMenu->nameMsg[i], x, var_s1_3, D_8010D650, s0, 1); + break; + case 1: + case 4: + draw_msg(gPopupMenu->nameMsg[i], x, var_s1_3, D_8010D650, s0, 1); + break; + case 8: + if (gPopupMenu->enabled[i] == 2) { + + } + draw_msg(gPopupMenu->nameMsg[i], x, var_s1_3, D_8010D650, s0, 1); + break; + case 10: + if (gPopupMenu->value[i] != 0) { + + } + set_message_value(gPopupMenu->userIndex[i] + 1, 0); + draw_msg(0x1D00CD, x + 8, var_s1_3, D_8010D650, s0, 1); + break; + case 11: + if (gPopupMenu->value[i] != 0) { + + } + draw_msg(gPopupMenu->nameMsg[i], x, var_s1_3, D_8010D650, s0, 1); + break; + } + + switch (gPopupMenu->popupType) { + case 1: + case 4: + var_s7 = 0x5B; + var_s6 = 0x55; + for (j = 0; j < 2; j++) { + id = D_8010D668; + if (gPopupMenu->enabled[i]) { + hud_element_set_script(id, D_80109890[j]); + } else { + hud_element_set_script(id, D_80109898[j]); + } + if (gPopupMenu->popupType == 1) { + hud_element_set_render_pos(id, x + var_s6, var_s1_3 + 0xA); + } else { + hud_element_set_render_pos(id, x + var_s7, var_s1_3 + 0xA); + } + if (j < gPopupMenu->value[i]) { + hud_element_draw_next(id); + } + var_s7 += 0xD; + var_s6 += 0xD; + } + var_s1_3 += 0xD; + break; + case 3: + var_a1_3 = x + 0x73; + block_79: + draw_number(gPopupMenu->value[i], var_a1_3, var_s1_3, 1, 0, D_8010D650, 0); // two zeros at the end + var_s1_3 += 0xD; + break; + case 5: + var_a1_3 = x + 0x79; + goto block_79; + default: + var_s1_3 += 0xD; + } + + if (i == 0) { + var_s1_3 += xOffset; + } + } + } + + xOffset = 0; + temp_a0_3 = baseY + D_8010D658; + x = baseX + 0x18; + var_s1_4 = temp_a0_3 + 8; + if (gPopupMenu->popupType == 2) { + var_s1_4 = temp_a0_3 + 6; + xOffset = 2; + } + + switch (gPopupMenu->popupType) { + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + case 9: + case 12: + case 13: + i = 0; + if (gPopupMenu->numEntries > 0) { + temp_s3 = sp28 - 1; + do { + if ((temp_s3 > i) || ((sp28 + D_8010D656) < i)) { + var_s1_4 += 0xD; + if (i == 0) { + var_s1_4 += xOffset; + } + } else { + id = D_8010D678; + hud_element_set_script(id, gPopupMenu->ptrIcon[i]); + hud_element_set_render_pos(id, x, var_s1_4); + var_s1_4 += 0xD; + hud_element_set_alpha(id, D_8010D650); + hud_element_set_scale(id, 0.45f); + hud_element_draw_without_clipping(id); + if (i == 0) { + var_s1_4 += xOffset; + } + } + i += 1; + } while (i < gPopupMenu->numEntries); + } + break; + case 10: + i = 0; + if (gPopupMenu->numEntries > 0) { + temp_s3_2 = sp28 - 1; + do { + if ((temp_s3_2 > i) || ((sp28 + D_8010D656) < i)) { + var_s1_4 += 0xD; + if (i == 0) { + var_s1_4 += xOffset; + } + } else { + id = D_8010D678; + hud_element_set_script(id, gPopupMenu->ptrIcon[i]); + hud_element_set_render_pos(id, x, var_s1_4); + var_s1_4 += 0xD; + hud_element_set_alpha(id, D_8010D650); + hud_element_set_scale(id, 0.45f); + hud_element_draw_without_clipping(id); + if (i == 0) { + var_s1_4 += xOffset; + } + } + i += 1; + } while (i < gPopupMenu->numEntries); + } + break; + case 11: + i = 0; + if (gPopupMenu->numEntries > 0) { + temp_s3_3 = sp28 - 1; + do { + if ((temp_s3_3 > i) || ((sp28 + D_8010D656) < i)) { + var_s1_4 += 0xD; + if (i == 0) { + var_s1_4 += xOffset; + } + } else { + id = D_8010D678; + hud_element_set_script(id, gPopupMenu->ptrIcon[i]); + hud_element_set_render_pos(id, x, var_s1_4); + var_s1_4 += 0xD; + hud_element_set_alpha(id, D_8010D650); + hud_element_set_scale(id, 0.45f); + hud_element_draw_without_clipping(id); + if (i == 0) { + var_s1_4 += xOffset; + } + } + i += 1; + } while (i < gPopupMenu->numEntries); + } + break; + } + id = D_8010D66C; + var_s1_5 = baseY + (((D_8010D648 - D_8010D654) * 0xD) + 9); + x = baseX + 8; + if ((gPopupMenu->popupType == 2) && (D_8010D648 == 0)) { + var_s1_5 -= 2; + } + hud_element_set_render_pos(id, x, var_s1_5); + hud_element_set_alpha(id, D_8010D650); + hud_element_draw_without_clipping(id); + tmp = (D_8010D656 * 13) + 0x10; + temp_s1_2 = baseY - 6; + x = baseX; + switch (gPopupMenu->popupType) { + case 0: + case 2: + case 3: + case 5: + case 6: + case 7: + case 8: + case 9: + case 10: + case 11: + case 12: + case 13: + gDPSetScissor(gMasterGfxPos++, G_SC_NON_INTERLACE, x, temp_s1_2, x + 0x70, temp_s1_2 + tmp); + break; + case 1: + case 4: + gDPSetScissor(gMasterGfxPos++, G_SC_NON_INTERLACE, x, temp_s1_2, x + 0x64, temp_s1_2 + tmp); + break; + } + + switch (gPopupMenu->popupType) { + case 1: + xOffset = 35; + break; + case 2: + case 4: + xOffset = 35; + break; + case 5: + xOffset = 31; + break; + case 6: + xOffset = 31; + break; + case 7: + case 8: + case 9: + xOffset = 31; + break; + default: + xOffset = 37; + break; + case 10: + xOffset = 29; + break; + case 11: + xOffset = 21; + break; + case 3: + case 13: + xOffset = 30; + break; + } + + if (D_8010D654 > 0) { + id = D_8010D670; + x = baseX + xOffset; + hud_element_set_render_pos(id, x + 35, baseY - 1); + hud_element_set_alpha(id, D_8010D650); + hud_element_draw_without_clipping(id); + } + + if (D_8010D655 < gPopupMenu->numEntries) { + id = D_8010D674; + x = baseX + xOffset; + hud_element_set_render_pos(id, x + 35, baseY + (D_8010D68F * 0xD) + 5); + hud_element_set_alpha(id, D_8010D650); + hud_element_draw_without_clipping(id); + } +} +#else INCLUDE_ASM(s32, "8a860_len_3f30", popup_menu_draw_menu_contents); +#endif void popup_menu_draw_title_contents( s32* userData, s32 baseX, s32 baseY, s32 width, s32 height, s32 opacity, s32 darkening) diff --git a/src/B0E0.c b/src/B0E0.c index 8ae272a7bb..ccc92311ae 100644 --- a/src/B0E0.c +++ b/src/B0E0.c @@ -745,7 +745,7 @@ void update_camera_zone_interp(Camera* camera) { targetZ = camera->targetPos.z; changingZone = FALSE; - if (camera->changingMap) { + if (camera->isChangingMap) { camera->currentController = NULL; camera->prevController = NULL; camera->linearInterp = 0.0f; @@ -797,7 +797,7 @@ void update_camera_zone_interp(Camera* camera) { temp2 = targetZ; if (camera->panActive || camera->unk_4A4 != targetX || camera->unk_4A8 != targetY || - camera->unk_4AC != targetZ || camera->changingMap) { + camera->unk_4AC != targetZ || camera->isChangingMap) { if (camera->followPlayer) { cs = &camera->controlSettings; @@ -903,11 +903,11 @@ void update_camera_zone_interp(Camera* camera) { update_camera_from_controller(camera, &camera->oldCameraSettings, &camera->prevController, &camera->newCameraSettings, &camera->currentController, posX, posY, posZ, tX, tY, tZ, - camera->changingMap, &camera->interpAlpha, changingZone); + camera->isChangingMap, &camera->interpAlpha, changingZone); - if (camera->changingMap) { + if (camera->isChangingMap) { camera->oldCameraSettings = camera->newCameraSettings; - camera->changingMap = FALSE; + camera->isChangingMap = FALSE; camera->interpAlpha = 1.0f; } diff --git a/src/C50A0.c b/src/C50A0.c index 5c01df714d..be5b60e007 100644 --- a/src/C50A0.c +++ b/src/C50A0.c @@ -762,6 +762,8 @@ void init_item_entity_list(void) { ItemEntityAlternatingSpawn = 0; } +extern s32* gItemEntityScripts[]; + void item_entity_load(ItemEntity* item); INCLUDE_ASM(s32, "C50A0", item_entity_load); diff --git a/src/a5dd0_len_114e0.c b/src/a5dd0_len_114e0.c index 51f2780497..23102bb610 100644 --- a/src/a5dd0_len_114e0.c +++ b/src/a5dd0_len_114e0.c @@ -1119,6 +1119,7 @@ void render_transform_group(void* group); void func_801180E8(TextureHeader*, Gfx**, IMG_PTR raster, PAL_PTR palette, IMG_PTR auxRaster, PAL_PTR auxPalette, u8, u8, u16, u16); void load_model_transforms(ModelNode* model, ModelNode* parent, Matrix4f mdlTxMtx, s32 treeDepth); s32 is_identity_fixed_mtx(Mtx* mtx); +void build_custom_gfx(void); void update_entities(void) { s32 i; @@ -3280,7 +3281,7 @@ void mdl_create_model(ModelBlueprint* bp, s32 arg1) { } else { model->currentMatrix = NULL; guMtxIdent(&model->specialMatrix); - model->flags |= 0x2000; + model->flags |= MODEL_FLAGS_FLAG_2000; } guMtxIdentF(model->transformMatrix); @@ -3333,8 +3334,99 @@ void func_80116674(void) { INCLUDE_ASM(s32, "a5dd0_len_114e0", func_80116674); #endif -INCLUDE_ASM(s32, "a5dd0_len_114e0", func_80116698); +void func_80116698(void) { + Matrix4f sp20; + Matrix4f sp60; + f32 mX, mY, mZ; + f32 mtgX, mtgY, mtgZ; + Model* model; + Mtx* mtx; + ModelBoundingBox* bb; + ModelTransformGroup* mtg; + s32 i; + for (i = 0; i < ARRAY_COUNT(*gCurrentModels); i++) { + model = (*gCurrentModels)[i]; + if (model != NULL && (model->flags != 0) && !(model->flags & 4)) { + if (!(model->flags & MODEL_FLAGS_USES_TRANSFORM_MATRIX)) { + if (model->matrixMode != 0) { + model->matrixMode--; + if (model->matrixMode <= 0) { + model->specialMatrix = *model->currentSpecialMatrix; + } + mtx = model->currentSpecialMatrix; + model->currentSpecialMatrix = &gDisplayContext->matrixStack[gMatrixListPos++]; + *model->currentSpecialMatrix = *mtx; + } else { + model->currentSpecialMatrix = &model->specialMatrix; + } + } else { + model->flags &= ~MODEL_FLAGS_USES_TRANSFORM_MATRIX; + model->matrixMode = 2; + mtx = &gDisplayContext->matrixStack[gMatrixListPos++]; + if (model->currentMatrix == NULL || (model->flags & 8)) { + guMtxF2L(model->transformMatrix, mtx); + } else { + guMtxL2F(sp20, model->currentMatrix); + guMtxCatF(model->transformMatrix, sp20, sp20); + guMtxF2L(sp20, mtx); + } + model->flags &= ~MODEL_FLAGS_FLAG_2000; + bb = (ModelBoundingBox*) get_model_property(model->modelNode, MODEL_PROP_KEY_BOUNDING_BOX); + mX = (bb->minX + bb->maxX) * 0.5f; + mY = (bb->minY + bb->maxY) * 0.5f; + mZ = (bb->minZ + bb->maxZ) * 0.5f; + guMtxXFML(mtx, mX, mY, mZ, &mX, &mY, &mZ); + model->currentSpecialMatrix = mtx; + model->center.x = mX; + model->center.y = mY; + model->center.z = mZ; + model->flags &= ~MODEL_FLAGS_FLAG_200; + } + } + } + + for (i = 0; i < ARRAY_COUNT((*gCurrentTransformGroups)); i++) { + mtg = (*gCurrentTransformGroups)[i]; + if (mtg != NULL && mtg->flags != 0 && !(mtg->flags & MODEL_TRANSFORM_GROUP_FLAGS_4)) { + if (!(mtg->flags & MODEL_TRANSFORM_GROUP_FLAGS_1000)) { + if (mtg->matrixMode != 0) { + mtg->matrixMode--; + if (!(mtg->matrixMode & 0xFF)) { + mtg->matrixA = *mtg->transformMtx; + } + mtx = mtg->transformMtx; + mtg->transformMtx = &gDisplayContext->matrixStack[gMatrixListPos++]; + *mtg->transformMtx = *mtx; + } else { + mtg->transformMtx = &mtg->matrixA; + } + } else { + mtg->flags &= ~MODEL_TRANSFORM_GROUP_FLAGS_1000; + mtg->matrixMode = 2; + mtx = &gDisplayContext->matrixStack[gMatrixListPos++]; + if (mtg->matrixRDP_N == NULL) { + guMtxF2L(mtg->matrixB, mtx); + } else { + guMtxL2F(sp60, mtg->matrixRDP_N); + guMtxCatF(mtg->matrixB, sp60, sp60); + guMtxF2L(sp60, mtx); + } + mtg->flags &= ~MODEL_TRANSFORM_GROUP_FLAGS_2000; + bb = (ModelBoundingBox*) get_model_property(mtg->modelNode, MODEL_PROP_KEY_BOUNDING_BOX); + mtgX = (bb->minX + bb->maxX) * 0.5f; + mtgY = (bb->minY + bb->maxY) * 0.5f; + mtgZ = (bb->minZ + bb->maxZ) * 0.5f; + guMtxXFML(mtx, mtgX, mtgY, mtgZ, &mtgX, &mtgY, &mtgZ); + mtg->transformMtx = mtx; + mtg->center.x = mtgX; + mtg->center.y = mtgY; + mtg->center.z = mtgZ; + } + } + } + build_custom_gfx(); +} void render_models(void) { RenderTask rt; diff --git a/src/ad90_len_2880.c b/src/ad90_len_2880.c index 258e51ec36..5b0012b725 100644 --- a/src/ad90_len_2880.c +++ b/src/ad90_len_2880.c @@ -1,73 +1,67 @@ #include "common.h" +void update_camera_mode_6(Camera* camera); // types, floats, and other shtuff #ifdef NON_EQUIVALENT void update_camera_mode_6(Camera* camera) { - f32 cosBoom; - f32 cosRotation; - f32 deltaX; - f32 temp_f24_2; - f32 deltaZ; + f32 xDiff, yDiff, zDiff; f32 boomYaw; - f32 rotation; - f32 sinBoom; - f32 sinRotation; + f32 sinBoomYaw; + f32 cosBoomYaw; + f32 trueRotX; + f32 sinRotX; + f32 cosRotX; + f32 temp_f24_2; f32 temp_f30; - f32 deltaY; - s32 temp_lo; + s32 var_v1; - if (camera->unk_06 != 0 || camera->unk_08 != 0) { + if (camera->unk_06 != 0 || camera->changingMap) { camera->unk_06 = 0; - camera->unk_08 = 0; - camera->unk_1C = 0; - camera->unk_1E = 100; - camera->unk_20 = 100; - camera->unk_22 = 0; - camera->unk_24 = 0; - camera->unk_26 = 0; + camera->changingMap = 0; + camera->auxPitch = 0; + camera->auxBoomLength = 100; + camera->lookAt_dist = 100; + camera->auxBoomPitch = 0; + camera->auxBoomYaw = 0; + camera->auxBoomZOffset = 0; camera->targetPos.x = 0.0f; camera->targetPos.y = 0.0f; camera->targetPos.z = 0.0f; - camera->lookAt_obj.x = camera->unk_54; - camera->lookAt_obj.y = camera->unk_58; - camera->lookAt_obj.z = camera->unk_5C; + camera->lookAt_obj.x = camera->lookAt_obj_target.x; + camera->lookAt_obj.y = camera->lookAt_obj_target.y; + camera->lookAt_obj.z = camera->lookAt_obj_target.z; } - if (camera->unk_1C == 0) { - temp_lo = 10000 / camera->unk_20; - camera->trueRotation.x = camera->unk_24; - camera->lookAt_obj.x = camera->unk_54 + camera->targetPos.x; - camera->currentBoomYaw = camera->unk_22; - camera->currentBoomLength = camera->unk_1E; - camera->lookAt_obj.z = camera->unk_5C + camera->targetPos.z; - camera->lookAt_obj.y = (camera->unk_58 + camera->targetPos.y) + (camera->unk_26 * 0.00390625); - - if (temp_lo < 0) { - temp_lo += 3; + if (camera->auxPitch == 0) { + var_v1 = 10000 / camera->lookAt_dist; + camera->trueRotation.x = camera->auxBoomYaw; + camera->currentBoomYaw = camera->auxBoomPitch; + camera->currentBoomLength = camera->auxBoomLength; + camera->lookAt_obj.x = camera->lookAt_obj_target.x + camera->targetPos.x; + camera->lookAt_obj.y = (camera->lookAt_obj_target.y + camera->targetPos.y) + (camera->auxBoomZOffset * 0.00390625); + camera->lookAt_obj.z = camera->lookAt_obj_target.z + camera->targetPos.z; + if (var_v1 < 0) { + var_v1 += 3; } - camera->vfov = (f32) (temp_lo >> 2); - + camera->vfov = (var_v1 >> 2); boomYaw = DEG_TO_RAD(camera->currentBoomYaw); - sinBoom = sin_rad(boomYaw); - cosBoom = cos_rad(boomYaw); - temp_f30 = (cosBoom * 0.0f) + (camera->currentBoomLength * sinBoom); - temp_f24_2 = (sinBoom * -0.0f) + (camera->currentBoomLength * cosBoom); - - rotation = DEG_TO_RAD(camera->trueRotation.x); - sinRotation = sin_rad(rotation); - cosRotation = cos_rad(rotation); - + sinBoomYaw = sin_rad(boomYaw); + cosBoomYaw = cos_rad(boomYaw); + temp_f30 = (cosBoomYaw * 0.0f) + (camera->currentBoomLength * sinBoomYaw); + temp_f24_2 = (sinBoomYaw * -0.0f) + (camera->currentBoomLength * cosBoomYaw); + trueRotX = DEG_TO_RAD(camera->trueRotation.x); + sinRotX = sin_rad(trueRotX); + cosRotX = cos_rad(trueRotX); + camera->lookAt_eye.x = camera->lookAt_obj.x + ((cosRotX * 0.0f) - (temp_f24_2 * sinRotX)); camera->lookAt_eye.y = camera->lookAt_obj.y + temp_f30; - camera->lookAt_eye.x = camera->lookAt_obj.x + ((cosRotation * 0.0f) - (temp_f24_2 * sinRotation)); - camera->lookAt_eye.z = camera->lookAt_obj.z + ((sinRotation * 0.0f) + (temp_f24_2 * cosRotation)); + camera->lookAt_eye.z = camera->lookAt_obj.z + ((sinRotX * 0.0f) + (temp_f24_2 * cosRotX)); } - camera->currentYaw = atan2(camera->lookAt_eye.x, camera->lookAt_eye.z, camera->lookAt_obj.x, camera->lookAt_obj.z); - deltaX = camera->lookAt_obj.x - camera->lookAt_eye.x; - deltaZ = camera->lookAt_obj.z - camera->lookAt_eye.z; - deltaY = camera->lookAt_obj.y - camera->lookAt_eye.y; - camera->currentBlendedYawNegated = -atan2(0.0f, 0.0f, deltaX, deltaZ); - camera->currentPitch = atan2(0.0f, 0.0f, deltaY, -sqrtf((deltaX * deltaX) + (deltaZ * deltaZ))); + xDiff = camera->lookAt_obj.x - camera->lookAt_eye.x; + yDiff = camera->lookAt_obj.y - camera->lookAt_eye.y; + zDiff = camera->lookAt_obj.z - camera->lookAt_eye.z; + camera->currentBlendedYawNegated = -atan2(0.0f, 0.0f, xDiff, zDiff); + camera->currentPitch = atan2(0.0f, 0.0f, yDiff, -sqrtf((xDiff * xDiff) + (zDiff * zDiff))); gBattleStatus.camLookatObjPos.x = camera->lookAt_obj.x; gBattleStatus.camLookatObjPos.y = camera->lookAt_obj.y; gBattleStatus.camLookatObjPos.z = camera->lookAt_obj.z; diff --git a/src/audio/30450.c b/src/audio/30450.c index 077b24106f..821436461f 100644 --- a/src/audio/30450.c +++ b/src/audio/30450.c @@ -28,7 +28,7 @@ u8 D_80078DCC[] = { 2, 95, 0 }; -u8 D_80078DD0[] = { +u8 D_80078DD0[] = { 5, 70, 6, 90, 7, 90, @@ -36,7 +36,7 @@ u8 D_80078DD0[] = { 0 }; // used in kpa_60-63 -u8 TrackVols_KPA_Outside[] = { +u8 TrackVols_KPA_Outside[] = { 5, 0, 6, 0, 7, 0, @@ -762,7 +762,7 @@ static AuResult snd_song_change_track_volume(s32 songName, u32 trackIdx, u32 vol BGMPlayer* bgmPlayer; BGMHeader* bgmFile; AuResult status; - + status = snd_song_get_playing_info(songName, &bgmFile, &bgmPlayer); if (status == AU_RESULT_OK) { if (volume > 0x7F) { @@ -824,10 +824,10 @@ void bgm_clear_music_events(void) { AuGlobals* globals = gSoundGlobals; s32* buf = globals->musicEventQueue; s32 i = 15; - + do { *buf++ = 0; - } while(i-- != 0); + } while (i-- != 0); globals->musicEventQueueCount = 0; globals->flushMusicEventQueue = FALSE; diff --git a/src/battle/action_cmd/hurricane.c b/src/battle/action_cmd/hurricane.c index 371829f3a5..0e5c442f58 100644 --- a/src/battle/action_cmd/hurricane.c +++ b/src/battle/action_cmd/hurricane.c @@ -191,7 +191,7 @@ void N(update)(void) { buttonsPushed = 0; frameCount = 1; - while(frameCount >= 0) { + while (frameCount >= 0) { if (bufferPos >= ARRAY_COUNT(battleStatus->pushInputBuffer)) { bufferPos -= ARRAY_COUNT(battleStatus->pushInputBuffer); } diff --git a/src/battle/action_cmd/mega_shock.c b/src/battle/action_cmd/mega_shock.c index 1d4eafb9bc..17226d779d 100644 --- a/src/battle/action_cmd/mega_shock.c +++ b/src/battle/action_cmd/mega_shock.c @@ -196,7 +196,7 @@ void N(update)(void) { buttonsPushed = 0; frameCount = 1; - while(frameCount >= 0) { + while (frameCount >= 0) { if (bufferPos >= ARRAY_COUNT(battleStatus->pushInputBuffer)) { bufferPos -= ARRAY_COUNT(battleStatus->pushInputBuffer); } diff --git a/src/battle/area_tik2/actor/electro_blooper.c b/src/battle/area_tik2/actor/electro_blooper.c index 7ec4be2a20..51407beeb7 100644 --- a/src/battle/area_tik2/actor/electro_blooper.c +++ b/src/battle/area_tik2/actor/electro_blooper.c @@ -243,7 +243,7 @@ ApiStatus N(unused_func)(Evt* script, s32 isInitialCall) { f32 var0, var1; var1 = evt_get_float_variable(script, *args++); - do {} while(0); + do {} while (0); var0 = evt_get_float_variable(script, arg0); evt_set_float_variable(script, arg0, var1 * sin_rad(DEG_TO_RAD(var0))); diff --git a/src/battle/area_tik2/actor/super_blooper.c b/src/battle/area_tik2/actor/super_blooper.c index 654f3dc6ba..60545e2d1e 100644 --- a/src/battle/area_tik2/actor/super_blooper.c +++ b/src/battle/area_tik2/actor/super_blooper.c @@ -247,7 +247,7 @@ ApiStatus N(unused_func)(Evt* script, s32 isInitialCall) { f32 var0, var1; var1 = evt_get_float_variable(script, *args++); - do {} while(0); + do {} while (0); var0 = evt_get_float_variable(script, arg0); evt_set_float_variable(script, arg0, var1 * sin_rad(DEG_TO_RAD(var0))); diff --git a/src/effects/lightning_bolt.c b/src/effects/lightning_bolt.c index 251cff436b..d424a2b9df 100644 --- a/src/effects/lightning_bolt.c +++ b/src/effects/lightning_bolt.c @@ -1,11 +1,42 @@ #include "common.h" #include "effects_internal.h" -s32 D_E00BCC30[] = { 0x05050505, 0x05050505, 0x05050505, 0x0A090301, 0x00000000, 0x00000000, 0x05050505, 0x05050505, 0x05050505, 0x08070605, 0x04030201, 0x00000000, 0x23051905, 0x00192305, 0x0F000000, 0x0A0D0F0C, 0x0B0D0A0C, 0x05010000, 0x2D0F230F, 0x00232D37, 0x19050200, 0x0D0A0C0A, 0x0D0A0D0A, 0x0C090501, 0x0F0F0F0F, 0x0F0F000F, 0x0F050200, 0x0E0A0F0A, 0x0D1E201E, 0x1832283C, 0x01050F0F, 0x232D2823, 0x19050200, 0x04060A05, 0x080E060A, 0x0E233232, 0x010F190F, 0x19232D28, 0x230F0500, 0x0202170C, 0x080F0F05, 0x0612263C, 0x1E190F05, 0x0F0F191E, 0x23190500, 0x0303030B, 0x030C0405, 0x020C2A32, 0x2121140C, 0x19110F14, 0x16140500, 0x03030302, 0x0A02020C, 0x02020214, 0x1E1E1919, 0x23140F0A, 0x0F0F0500, 0x02020202, 0x02020602, 0x02020605, 0x1B1B1616, 0x20110C07, 0x0C0C0200, 0x02020202, 0x02020202, 0x02020200 }; +typedef struct UnkStruct { + /* 0x00 */ u8 unk_00[0xC]; + /* 0x0C */ u8 unk_0C[0xC]; +} UnkStruct; // size = 0x18 -s32 D_E00BCD38[] = { 0x19191905, 0x19051919, 0x05191919, 0x04030201, 0x00000000, 0x00000000, 0x0F0F0F19, 0x0F0F0519, 0x190F1919, 0x04040404, 0x04030201, 0x00000000, 0x19191905, 0x0F190505, 0x0F050500, 0x04040404, 0x04040604, 0x04040000, 0x19191905, 0x19051919, 0x050F0500, 0x04040404, 0x04040604, 0x04040605, 0x0F0F0F2D, 0x232D2323, 0x19230F00, 0x04040404, 0x04040604, 0x04040605, 0x2D372319, 0x370F2D19, 0x2D230F00, 0x04040404, 0x04040604, 0x04040605, 0x55190F4B, 0x1941232D, 0x4B550F00, 0x04040404, 0x04040604, 0x04040605, 0x550F2337, 0x412D194B, 0x232D2328, 0x04040404, 0x04040604, 0x04040605, 0x550F2337, 0x412D194B, 0x232D2328, 0x04040404, 0x04040604, 0x04040605, 0x550F2337, 0x412D194B, 0x232D2328, 0x04040404, 0x04040604, 0x04040605, 0x1E1E1919, 0x23140F0A, 0x0F0F0500, 0x04040404, 0x04040404, 0x04040200 }; +UnkStruct D_E00BCC30[] = { + {{5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5}, {10, 9, 3, 1, 0, 0, 0, 0, 0, 0, 0, 0}}, + {{5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5}, {8, 7, 6, 5, 4, 3, 2, 1, 0, 0, 0, 0}}, + {{35, 5, 25, 5, 0, 25, 35, 5, 15, 0, 0, 0}, {10, 13, 15, 12, 11, 13, 10, 12, 5, 1, 0, 0}}, + {{45, 15, 35, 15, 0, 35, 45, 55, 25, 5, 2, 0}, {13, 10, 12, 10, 13, 10, 13, 10, 12, 9, 5, 1}}, + {{15, 15, 15, 15, 15, 15, 0, 15, 15, 5, 2, 0}, {14, 10, 15, 10, 13, 30, 32, 30, 24, 50, 40, 60}}, + {{1, 5, 15, 15, 35, 45, 40, 35, 25, 5, 2, 0}, {4, 6, 10, 5, 8, 14, 6, 10, 14, 35, 50, 50}}, + {{1, 15, 25, 15, 25, 35, 45, 40, 35, 15, 5, 0}, {2, 2, 23, 12, 8, 15, 15, 5, 6, 18, 38, 60}}, + {{30, 25, 15, 5, 15, 15, 25, 30, 35, 25, 5, 0}, {3, 3, 3, 11, 3, 12, 4, 5, 2, 12, 42, 50}}, + {{33, 33, 20, 12, 25, 17, 15, 20, 22, 20, 5, 0}, {3, 3, 3, 2, 10, 2, 2, 12, 2, 2, 2, 20}}, + {{30, 30, 25, 25, 35, 20, 15, 10, 15, 15, 5, 0}, {2, 2, 2, 2, 2, 2, 6, 2, 2, 2, 6, 5}}, + {{27, 27, 22, 22, 32, 17, 12, 7, 12, 12, 2, 0}, {2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0}}, +}; -s32* D_E00BCE40[] = { D_E00BCC30, D_E00BCD38 }; +UnkStruct D_E00BCD38[] = { + {{25, 25, 25, 5, 25, 5, 25, 25, 5, 25, 25, 25}, {4, 3, 2, 1, 0, 0, 0, 0, 0, 0, 0, 0}}, + {{15, 15, 15, 25, 15, 15, 5, 25, 25, 15, 25, 25}, {4, 4, 4, 4, 4, 3, 2, 1, 0, 0, 0, 0}}, + {{25, 25, 25, 5, 15, 25, 5, 5, 15, 5, 5, 0}, {4, 4, 4, 4, 4, 4, 6, 4, 4, 4, 0, 0}}, + {{25, 25, 25, 5, 25, 5, 25, 25, 5, 15, 5, 0}, {4, 4, 4, 4, 4, 4, 6, 4, 4, 4, 6, 5}}, + {{15, 15, 15, 45, 35, 45, 35, 35, 25, 35, 15, 0}, {4, 4, 4, 4, 4, 4, 6, 4, 4, 4, 6, 5}}, + {{45, 55, 35, 25, 55, 15, 45, 25, 45, 35, 15, 0}, {4, 4, 4, 4, 4, 4, 6, 4, 4, 4, 6, 5}}, + {{85, 25, 15, 75, 25, 65, 35, 45, 75, 85, 15, 0}, {4, 4, 4, 4, 4, 4, 6, 4, 4, 4, 6, 5}}, + {{85, 15, 35, 55, 65, 45, 25, 75, 35, 45, 35, 40}, {4, 4, 4, 4, 4, 4, 6, 4, 4, 4, 6, 5}}, + {{85, 15, 35, 55, 65, 45, 25, 75, 35, 45, 35, 40}, {4, 4, 4, 4, 4, 4, 6, 4, 4, 4, 6, 5}}, + {{85, 15, 35, 55, 65, 45, 25, 75, 35, 45, 35, 40}, {4, 4, 4, 4, 4, 4, 6, 4, 4, 4, 6, 5}}, + {{30, 30, 25, 25, 35, 20, 15, 10, 15, 15, 5, 0}, {4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 2, 0}}, +}; + +UnkStruct* D_E00BCE40[] = { D_E00BCC30, D_E00BCD38 }; + +extern Gfx D_09001000_3BBEA0[]; void lightning_bolt_init(EffectInstance* effect); void lightning_bolt_update(EffectInstance* effect); @@ -138,4 +169,151 @@ void lightning_bolt_render(EffectInstance *effect) { void func_E00BC36C(void) { } +// float +#ifdef NON_MATCHING +void lightning_bolt_appendGfx(void* effect) { + Vtx_t* sp90; + f32 sp94; + f32 temp_f0; + f32 temp_f0_2; + f32 temp_f20; + f32 temp_f20_2; + f32 temp_f22; + f32 temp_f24; + f32 temp_f26; + f32 temp_f28; + f32 var_f20; + f32 var_f22; + f32 var_f2; + s16 temp_s0_2; + s32 temp_a0; + s32 temp_s3; + s32 temp_s6; + s32 temp_s7; + s32 temp_t3; + UnkStruct* var_s2; + Vtx_t* vtx; + f32 zero; + f32 t1, t2, t3, t4; + LightningBoltFXData* data = ((EffectInstance*)effect)->data.lightningBolt; + Matrix4f sp10; + Matrix4f unused; + s32 i; + f32 temp_fs2; + + temp_s7 = data->lifetime; + temp_s3 = data->outerColor.a; + temp_s6 = data->type; + sp94 = data->unk_4C; + + gDPPipeSync(gMasterGfxPos++); + gSPSegment(gMasterGfxPos++, 0x09, VIRTUAL_TO_PHYSICAL(((EffectInstance*)effect)->graphics->data)); + + shim_guScaleF(sp10, 0.1f, 0.1f, 0.1f); + shim_guMtxF2L(sp10, &gDisplayContext->matrixStack[gMatrixListPos]); + + gSPMatrix(gMasterGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_LOAD | G_MTX_MODELVIEW); + gDPSetPrimColor(gMasterGfxPos++, 0, 0, data->outerColor.r, data->outerColor.g, data->outerColor.b, temp_s3); + gDPSetEnvColor(gMasterGfxPos++, data->innerColor.r, data->innerColor.g, data->innerColor.b, 0x80); + gSPDisplayList(gMasterGfxPos++, D_09001000_3BBEA0); + + temp_a0 = temp_s7 - 1; + if (temp_s6 != 2) { + if (temp_a0 < 0xB) { + var_s2 = &D_E00BCE40[temp_s6][temp_a0]; + } else { + var_s2 = &D_E00BCE40[temp_s6][10]; + } + } else if (temp_a0 < 8) { + var_s2 = &D_E00BCE40[0][temp_a0]; + } else if (temp_a0 < 0x24) { + var_s2 = &D_E00BCE40[0][temp_a0 % 6 + 2]; + } else { + var_s2 = &D_E00BCE40[0][10]; + } + + for (i = 0; i < 12; i++) { + temp_f24 = (data->endPos.x - data->startPos.x) * (1 / 11.0f); + temp_f22 = (data->endPos.y - data->startPos.y) * (1 / 11.0f); + temp_f28 = (data->unk_110 + (i - temp_s7) * 0xA) % 120 - 0x3C; + temp_f26 = var_s2->unk_00[i]; + + temp_f20 = shim_sin_deg(temp_f28) * temp_f26 * 0.04; + temp_f0 = shim_cos_deg(temp_f28) * temp_f26 * 0.04; + + t1 = (temp_f24 * temp_f0 - temp_f22 * temp_f20); + t2 = (temp_f24 * temp_f20 + temp_f22 * temp_f0); + t3 = 0.0f; + + data->unk_50[i] = data->startPos.x + (data->endPos.x - data->startPos.x) * i * (1 / 11.0f) + t1; + data->unk_80[i] = data->startPos.y + (data->endPos.y - data->startPos.y) * i * (1 / 11.0f) + t2; + data->unk_B0[i] = data->startPos.z + (data->endPos.z - data->startPos.z) * i * (1 / 11.0f) + t3; + data->unk_E0[i] = (f32) var_s2->unk_0C[i] * 0.1; + } + + sp90 = (Vtx_t*) (gMasterGfxPos + 1); + vtx = (Vtx_t*) (gMasterGfxPos + 1); + gSPBranchList(gMasterGfxPos, gMasterGfxPos + 0x31); + gMasterGfxPos += 0x31; + + for (i = 0; i < 12; i++) { //s2: i + if (i == 0) { + temp_fs2 = 8.0f; + var_f22 = -shim_atan2(data->unk_80[1], -data->unk_50[1], data->unk_80[0], -data->unk_50[0]); + } else { + temp_fs2 = 8.0f; + if (i == 0xB) { + var_f22 = -90.0f; + } else { + var_f20 = -shim_atan2(data->unk_80[i + 1], -data->unk_50[i + 1], data->unk_80[i], -data->unk_50[i]); + var_f2 = -shim_atan2(data->unk_80[i], -data->unk_50[i], data->unk_80[i - 1], -data->unk_50[i - 1]); + if (var_f2 - var_f20 > 180.0f) { + var_f20 += 360.0f; + } else if (var_f2 - var_f20 < -180.0f) { + var_f2 += 360.0f; + } + var_f22 = (var_f20 + var_f2) * 0.5; + } + } + + temp_fs2 *= (sp94 * data->unk_E0[i]); + temp_s0_2 = (128 - i * 12) * 32; + temp_f20_2 = temp_fs2 * shim_sin_deg(var_f22); + temp_f0_2 = temp_fs2 * shim_cos_deg(var_f22); + zero = 0.0f; + + vtx->ob[0] = (data->unk_50[i] + temp_f20_2) * 10.0f; + vtx->ob[1] = (data->unk_80[i] + temp_f0_2) * 10.0f; + vtx->ob[2] = (data->unk_B0[i] + zero) * 10.0f; // 0.0f: fs4 (fs5) + vtx->tc[0] = temp_s0_2; + vtx->tc[1] = 0; + vtx->cn[0] = i * 50; //s6 + vtx->cn[1] = i * 120; //s7 + vtx->cn[2] = i * 30; //s8 + vtx++; + + vtx->ob[0] = (data->unk_50[i] - temp_f20_2) * 10.0f; + vtx->ob[1] = (data->unk_80[i] - temp_f0_2) * 10.0f; + vtx->ob[2] = (data->unk_B0[i] + zero) * 10.0f; + vtx->tc[0] = temp_s0_2; + vtx->tc[1] = 0x400; + vtx->cn[0] = i * 50; + vtx->cn[1] = i * 120; + vtx->cn[2] = i * 30; + vtx++; + } + + temp_t3 = i; + + gSPVertex(gMasterGfxPos++, sp90, i * 2, 0); + gSPClearGeometryMode(gMasterGfxPos++, G_SHADING_SMOOTH); + + for (i = 0; i < temp_t3 - 1; i++) { + gSP2Triangles(gMasterGfxPos++, i * 2 + 1, i * 2, i * 2 + 2, 0, i * 2 + 1, i * 2 + 2, i * 2 + 3, 0); + } + + gSPPopMatrix(gMasterGfxPos++, G_MTX_MODELVIEW); +} +#else INCLUDE_ASM(s32, "effects/lightning_bolt", lightning_bolt_appendGfx); +#endif diff --git a/src/encounter.c b/src/encounter.c index 8db28c32aa..ce8aa9aff6 100644 --- a/src/encounter.c +++ b/src/encounter.c @@ -2427,7 +2427,7 @@ void create_encounters(void) { e = 0; totalNpcCount = 0; - while(TRUE) { + while (TRUE) { if (groupList->npcCount == 0) { break; } diff --git a/src/evt/cam_api.c b/src/evt/cam_api.c index d27bea5cf4..5a83102b8a 100644 --- a/src/evt/cam_api.c +++ b/src/evt/cam_api.c @@ -53,7 +53,7 @@ ApiStatus SetCamPerspective(Evt* script, s32 isInitialCall) { camera->farClip = farClip; camera->updateMode = mode; camera->unk_06 = TRUE; - camera->changingMap = TRUE; + camera->isChangingMap = TRUE; camera->vfov = vfov; camera->nearClip = nearClip; return ApiStatus_DONE2; @@ -194,7 +194,7 @@ ApiStatus InterpCamTargetPos(Evt* script, s32 isInitialCall) { /* 0x08 */ Vec3f vel; /* 0x14 */ s32 time; } CamInterpData; // size = 0x18 - + Bytecode* args = script->ptrReadPos; CamInterpData* data; Camera* cam; @@ -206,14 +206,14 @@ ApiStatus InterpCamTargetPos(Evt* script, s32 isInitialCall) { s32 posY = evt_get_variable(script, *args++); s32 posZ = evt_get_variable(script, *args++); s32 time = evt_get_variable(script, *args++); - + data = heap_malloc(sizeof(*data)); script->userData = data; cam = &gCameras[camID]; data->cam = cam; data->useTarget = useTarget; data->time = time; - + switch (data->useTarget) { case 0: data->vel.x = (posX - cam->lookAt_obj_target.x) / data->time; @@ -227,7 +227,7 @@ ApiStatus InterpCamTargetPos(Evt* script, s32 isInitialCall) { break; } } - + data = script->userData; cam = data->cam; switch (data->useTarget) { @@ -242,7 +242,7 @@ ApiStatus InterpCamTargetPos(Evt* script, s32 isInitialCall) { cam->targetPos.z += data->vel.z; break; } - + data->time--; if (data->time == 0) { heap_free(script->userData); diff --git a/src/filemenu/filemenu_main.c b/src/filemenu/filemenu_main.c index 5afeb133c2..68050a6ef9 100644 --- a/src/filemenu/filemenu_main.c +++ b/src/filemenu/filemenu_main.c @@ -609,7 +609,7 @@ void filemenu_main_handle_input(MenuPanel* menu) { s32 i; if (filemenu_heldButtons & BUTTON_STICK_LEFT) { - while(TRUE) { + while (TRUE) { menu->col--; if (menu->col < 0) { menu->col = 0; diff --git a/src/hud_element.c b/src/hud_element.c index 8d1190df2c..39a33daf77 100644 --- a/src/hud_element.c +++ b/src/hud_element.c @@ -1639,7 +1639,7 @@ void render_hud_elements_world(void) { el1 = sortedElements[i]; el2 = sortedElements[j]; tempOffsetZ = (*gHudElements)[el1]->worldPosOffset.z; - do {} while(0); + do {} while (0); if (tempOffsetZ < (*gHudElements)[el2]->worldPosOffset.z) { sortedElements[i] = el2; sortedElements[j] = el1; @@ -1687,7 +1687,7 @@ void render_hud_elements_world(void) { el1 = sortedElements[i]; el2 = sortedElements[j]; tempOffsetZ = (*gHudElements)[el1]->worldPosOffset.z; - do {} while(0); + do {} while (0); if ((*gHudElements)[el1]->worldPosOffset.z < (*gHudElements)[el2]->worldPosOffset.z) { sortedElements[i] = el2; sortedElements[j] = el1; diff --git a/src/npc.c b/src/npc.c index 58029a2fe1..adb0a6b2c9 100644 --- a/src/npc.c +++ b/src/npc.c @@ -887,7 +887,7 @@ void render_npcs(void) { if ((npc->flags & NPC_FLAG_MOTION_BLUR) != 0) { renderTaskPtr->distance = -phi_f20; - renderTaskPtr->appendGfx = (void (*))appendGfx_npc_blur; + renderTaskPtr->appendGfx = appendGfx_npc_blur; renderTaskPtr->appendGfxArg = npc; renderTaskPtr->renderMode = RENDER_MODE_SURFACE_XLU_LAYER1; queue_render_task(renderTaskPtr); @@ -1025,8 +1025,8 @@ void update_npc_blur(Npc* npc) { motionBlur->index = index; } -void appendGfx_npc_blur(void* appendData) { - Npc* npc = (Npc*) appendData; +void appendGfx_npc_blur(void* data) { + Npc* npc = (Npc*) data; Matrix4f sp20, sp60; f32 x, y, z; f32 yaw; diff --git a/src/os/nusys/nugfxretracewait.c b/src/os/nusys/nugfxretracewait.c index 1c5ca660c6..4fe0717b39 100644 --- a/src/os/nusys/nugfxretracewait.c +++ b/src/os/nusys/nugfxretracewait.c @@ -10,7 +10,7 @@ void nuGfxRetraceWait(u32 retrace_num) { nuScAddClient(&client, &mesgQ , NU_SC_RETRACE_MSG); - while(retrace_num) { + while (retrace_num > 0) { osRecvMesg(&mesgQ, NULL, OS_MESG_BLOCK); retrace_num--; } diff --git a/src/os/nusys/nusched.c b/src/os/nusys/nusched.c index 326fe72165..d6df5c8707 100644 --- a/src/os/nusys/nusched.c +++ b/src/os/nusys/nusched.c @@ -73,7 +73,7 @@ void nuScExecuteAudio(void) { OSMesg msg; u32 yieldFlag; - while(1) { + while (TRUE) { osRecvMesg(&nusched.audioRequestMQ, (OSMesg *) &audioTask, OS_MESG_BLOCK); if (nuScPreNMIFlag & NU_SC_BEFORE_RESET) { osSendMesg(audioTask->msgQ, audioTask->msg, OS_MESG_BLOCK); @@ -324,7 +324,7 @@ void nuScWaitTaskReady(NUScTask* task) { return; } - while(osViGetCurrentFramebuffer() == fb || osViGetNextFramebuffer() == fb) { + while (osViGetCurrentFramebuffer() == fb || osViGetNextFramebuffer() == fb) { nuScAddClient_inline(&client, &nusched.waitMQ, NU_SC_RETRACE_MSG); osRecvMesg(&nusched.waitMQ, NULL, OS_MESG_BLOCK); nuScRemoveClient_inline(&client); diff --git a/src/pause/pause_stats.c b/src/pause/pause_stats.c index 8c6186db2a..3229c56eb7 100644 --- a/src/pause/pause_stats.c +++ b/src/pause/pause_stats.c @@ -92,97 +92,84 @@ MenuPanel gPausePanelStats = { .fpCleanup = &pause_stats_cleanup }; -// needs a lot of work with the loops -#ifdef NON_EQUIVALENT void pause_stats_draw_contents(MenuPanel* menu, s32 baseX, s32 baseY, s32 width, s32 height, s32 opacity, s32 darkening) { StatsEntryData* statsEntryData; - s16 temp_v0_4; - s16 temp_v1; + PlayerData* playerData; s16 bootsLevel; s16 hammerLevel; - s16 var_v0_2; s32 icon10; - s32 limit; - s32 temp_v0_3; - s32 var_s0; s32 var_s2_2; s32 var_s3_2; s32 cond; s32 elemIdx; - s32 var_s5_2; s32 boxWidth; s16 level; s32 frameCounter; + s32 maxStarPower; hud_element_set_render_pos(gPauseStatsIconIDs[3], baseX + 143, baseY + 109); hud_element_draw_without_clipping(gPauseStatsIconIDs[3]); - draw_msg(pause_get_menu_msg(0x32), baseX + 155, baseY + 101, 255, MSG_PAL_STANDARD, DRAW_MSG_STYLE_MENU); - draw_number(gPlayerData.coins, baseX + 281, baseY + 101, DRAW_NUMBER_CHARSET_THIN, MSG_PAL_STANDARD, 255, DRAW_NUMBER_STYLE_MONOSPACE | DRAW_NUMBER_STYLE_ALIGN_RIGHT); + draw_msg(pause_get_menu_msg(0x32), baseX + 155, baseY + 101, 255, 0xA, 1); + draw_number(gPlayerData.coins, baseX + 281, baseY + 101, 1, 0xA, 255, 3); hud_element_set_render_pos(gPauseStatsIconIDs[11], baseX + 248, baseY + 108); hud_element_draw_without_clipping(gPauseStatsIconIDs[11]); hud_element_set_render_pos(gPauseStatsIconIDs[4], baseX + 143, baseY + 0x5E); hud_element_draw_without_clipping(gPauseStatsIconIDs[4]); - draw_msg(pause_get_menu_msg(51), baseX + 155, baseY + 86, 255, MSG_PAL_STANDARD, DRAW_MSG_STYLE_MENU); - draw_number(gPlayerData.starPoints, baseX + 281, baseY + 86, DRAW_NUMBER_CHARSET_THIN, MSG_PAL_STANDARD, 255, DRAW_NUMBER_STYLE_MONOSPACE | DRAW_NUMBER_STYLE_ALIGN_RIGHT); + draw_msg(pause_get_menu_msg(51), baseX + 155, baseY + 86, 255, 0xA, 1); + draw_number(gPlayerData.starPoints, baseX + 281, baseY + 86, 1, 0xA, 255, 3); hud_element_set_render_pos(gPauseStatsIconIDs[11], baseX + 248, baseY + 93); hud_element_draw_without_clipping(gPauseStatsIconIDs[11]); hud_element_set_render_pos(gPauseStatsIconIDs[5], baseX + 143, baseY + 123); hud_element_draw_without_clipping(gPauseStatsIconIDs[5]); - draw_msg(pause_get_menu_msg(0x34), baseX + 155, baseY + 116, 255, MSG_PAL_STANDARD, DRAW_MSG_STYLE_MENU); - draw_number(gPlayerData.starPieces, baseX + 281, baseY + 116, DRAW_NUMBER_CHARSET_THIN, MSG_PAL_STANDARD, 255, DRAW_NUMBER_STYLE_MONOSPACE | DRAW_NUMBER_STYLE_ALIGN_RIGHT); + draw_msg(pause_get_menu_msg(0x34), baseX + 155, baseY + 116, 255, 0xA, 1); + draw_number(gPlayerData.starPieces, baseX + 281, baseY + 116, 1, 0xA, 255, 3); hud_element_set_render_pos(gPauseStatsIconIDs[11], baseX + 248, baseY + 123); hud_element_draw_without_clipping(gPauseStatsIconIDs[11]); pause_draw_menu_label(0, baseX + 21, baseY + 35); hud_element_set_render_pos(gPauseStatsIconIDs[7], baseX + 52, baseY + 57); hud_element_draw_without_clipping(gPauseStatsIconIDs[7]); - draw_msg(pause_get_menu_msg(0x36), baseX + 25, baseY + 51, 255, MSG_PAL_WHITE, DRAW_MSG_STYLE_MENU); - draw_number(gPlayerData.curHP, baseX + 78, baseY + 51, DRAW_NUMBER_CHARSET_THIN, MSG_PAL_WHITE, 255, DRAW_NUMBER_STYLE_MONOSPACE | DRAW_NUMBER_STYLE_ALIGN_RIGHT); - draw_msg(pause_get_menu_msg(0x39), baseX + 78, baseY + 51, 255, MSG_PAL_WHITE, DRAW_MSG_STYLE_MENU); - draw_number(gPlayerData.curMaxHP, baseX + 105, baseY + 51, DRAW_NUMBER_CHARSET_THIN, MSG_PAL_WHITE, 255, DRAW_NUMBER_STYLE_MONOSPACE | DRAW_NUMBER_STYLE_ALIGN_RIGHT); + draw_msg(pause_get_menu_msg(0x36), baseX + 25, baseY + 51, 255, 0, 1); + draw_number(gPlayerData.curHP, baseX + 78, baseY + 51, 1, 0, 255, 3); + draw_msg(pause_get_menu_msg(0x39), baseX + 78, baseY + 51, 255, 0, 1); + draw_number(gPlayerData.curMaxHP, baseX + 105, baseY + 51, 1, 0, 255, 3); pause_draw_menu_label(1, baseX + 21, baseY + 69); hud_element_set_render_pos(gPauseStatsIconIDs[8], baseX + 52, baseY + 92); hud_element_draw_without_clipping(gPauseStatsIconIDs[8]); - draw_msg(pause_get_menu_msg(0x37), baseX + 25, baseY + 85, 255, MSG_PAL_WHITE, DRAW_MSG_STYLE_MENU); - draw_number(gPlayerData.curFP, baseX + 78, baseY + 85, DRAW_NUMBER_CHARSET_THIN, MSG_PAL_WHITE, 255, DRAW_NUMBER_STYLE_MONOSPACE | DRAW_NUMBER_STYLE_ALIGN_RIGHT); - draw_msg(pause_get_menu_msg(0x39), baseX + 78, baseY + 85, 255, MSG_PAL_WHITE, DRAW_MSG_STYLE_MENU); - draw_number(gPlayerData.curMaxFP, baseX + 105, baseY + 85, DRAW_NUMBER_CHARSET_THIN, MSG_PAL_WHITE, 255, DRAW_NUMBER_STYLE_MONOSPACE | DRAW_NUMBER_STYLE_ALIGN_RIGHT); + draw_msg(pause_get_menu_msg(0x37), baseX + 25, baseY + 85, 255, 0, 1); + draw_number(gPlayerData.curFP, baseX + 78, baseY + 85, 1, 0, 255, 3); + draw_msg(pause_get_menu_msg(0x39), baseX + 78, baseY + 85, 255, 0, 1); + draw_number(gPlayerData.curMaxFP, baseX + 105, baseY + 85, 1, 0, 255, 3); pause_draw_menu_label(2, baseX + 21, baseY + 103); hud_element_set_render_pos(gPauseStatsIconIDs[9], baseX + 52, baseY + 126); hud_element_draw_without_clipping(gPauseStatsIconIDs[9]); - draw_msg(pause_get_menu_msg(0x38), baseX + 25, baseY + 119, 255, MSG_PAL_WHITE, DRAW_MSG_STYLE_MENU); - draw_number(gPlayerData.maxBP, baseX + 78, baseY + 119, DRAW_NUMBER_CHARSET_THIN, MSG_PAL_WHITE, 255, DRAW_NUMBER_STYLE_MONOSPACE | DRAW_NUMBER_STYLE_ALIGN_RIGHT); + draw_msg(pause_get_menu_msg(0x38), baseX + 25, baseY + 119, 255, 0, 1); + draw_number(gPlayerData.maxBP, baseX + 78, baseY + 119, 1, 0, 255, 3); hud_element_set_render_pos(gPauseStatsIconIDs[6], baseX + 143, baseY + 140); hud_element_draw_without_clipping(gPauseStatsIconIDs[6]); - draw_msg(pause_get_menu_msg(0x35), baseX + 155, baseY + 133, 255, MSG_PAL_STANDARD, DRAW_MSG_STYLE_MENU); + draw_msg(pause_get_menu_msg(0x35), baseX + 155, baseY + 133, 255, 0xA, 1); frameCounter = gPlayerData.frameCounter; if (frameCounter > 21599999) { frameCounter = 21599999; } - draw_number((frameCounter / 2160000) % 10, baseX + 237, baseY + 133, DRAW_NUMBER_CHARSET_THIN, MSG_PAL_STANDARD, 255, DRAW_NUMBER_STYLE_MONOSPACE); - draw_number((frameCounter / 216000) - ((frameCounter / 2160000) * 10), baseX + 246, baseY + 133, DRAW_NUMBER_CHARSET_THIN, MSG_PAL_STANDARD, 255, DRAW_NUMBER_STYLE_MONOSPACE); - draw_msg(pause_get_menu_msg(0x3A), baseX + 257, baseY + 132, 255, MSG_PAL_STANDARD, DRAW_MSG_STYLE_MENU); - draw_msg(pause_get_menu_msg(0x3A), baseX + 257, baseY + 127, 255, MSG_PAL_STANDARD, DRAW_MSG_STYLE_MENU); - draw_number((frameCounter / 36000) - ((frameCounter / 216000) * 6), baseX + 264, baseY + 133, DRAW_NUMBER_CHARSET_THIN, MSG_PAL_STANDARD, 255, DRAW_NUMBER_STYLE_MONOSPACE); - draw_number((frameCounter / 3600) - ((frameCounter / 36000) * 10), baseX + 273, baseY + 133, DRAW_NUMBER_CHARSET_THIN, MSG_PAL_STANDARD, 255, DRAW_NUMBER_STYLE_MONOSPACE); + draw_number((frameCounter / 2160000) % 10, baseX + 237, baseY + 133, 1, 0xA, 255, 2); + draw_number((frameCounter / 216000) - ((frameCounter / 2160000) * 10), baseX + 246, baseY + 133, 1, 0xA, 255, 2); + draw_msg(pause_get_menu_msg(0x3A), baseX + 257, baseY + 132, 255, 0xA, 1); + draw_msg(pause_get_menu_msg(0x3A), baseX + 257, baseY + 127, 255, 0xA, 1); + draw_number((frameCounter / 36000) - ((frameCounter / 216000) * 6), baseX + 264, baseY + 133, 1, 0xA, 255, 2); + draw_number((frameCounter / 3600) - ((frameCounter / 36000) * 10), baseX + 273, baseY + 133, 1, 0xA, 255, 2); bootsLevel = gPlayerData.bootsLevel; hammerLevel = gPlayerData.hammerLevel; level = gPlayerData.level; - if (level >= 10) { - boxWidth = 0x79; - draw_box(4, &gPauseWS_10, baseX + 7, baseY + 12, 0, boxWidth, 17, 255, 0, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, NULL, NULL, NULL, SCREEN_WIDTH, SCREEN_HEIGHT, NULL); - } else { - boxWidth = 0x71; - draw_box(4, &gPauseWS_10, baseX + 7, baseY + 12, 0, boxWidth, 17, 255, 0, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, NULL, NULL, NULL, SCREEN_WIDTH, SCREEN_HEIGHT, NULL); - } + draw_box(4, &gPauseWS_10, baseX + 7, baseY + 12, 0, level >= 10 ? 0x79 : 0x71, 17, 255, 0, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, NULL, NULL, NULL, SCREEN_WIDTH, SCREEN_HEIGHT, NULL); hud_element_set_render_pos(gPauseStatsIconIDs[0], baseX + 61, baseY + 21); hud_element_draw_without_clipping(gPauseStatsIconIDs[0]); - draw_msg(pause_get_menu_msg(0x43), baseX + 16, baseY + 14, 255, MSG_PAL_WHITE, DRAW_MSG_STYLE_MENU); - draw_msg(pause_get_menu_msg(0x44), baseX + 67, baseY + 14, 255, MSG_PAL_WHITE, DRAW_MSG_STYLE_MENU); - draw_number(level, baseX + 106, baseY + 14, DRAW_NUMBER_CHARSET_THIN, MSG_PAL_WHITE, 255, DRAW_NUMBER_STYLE_MONOSPACE); + draw_msg(pause_get_menu_msg(0x43), baseX + 16, baseY + 14, 255, 0, 1); + draw_msg(pause_get_menu_msg(0x44), baseX + 67, baseY + 14, 255, 0, 1); + draw_number(level, baseX + 106, baseY + 14, 1, 0, 255, 2); bootsLevel++; if (bootsLevel < 0) { @@ -202,282 +189,293 @@ void pause_stats_draw_contents(MenuPanel* menu, s32 baseX, s32 baseY, s32 width, pause_draw_menu_label(3, baseX + 137, baseY + 10); pause_draw_menu_label(4, baseX + 137, baseY + 35); - cond = TRUE; + hud_element_set_script(gPauseStatsIconIDs[1], gStatsBootsElements[bootsLevel]); hud_element_set_render_pos(gPauseStatsIconIDs[1], baseX + 163, baseY + 29); hud_element_draw_without_clipping(gPauseStatsIconIDs[1]); - draw_msg(pause_get_menu_msg(gPauseStatsBootsMessages[bootsLevel]), baseX + 176, baseY + 23, 255, MSG_PAL_WHITE, DRAW_MSG_STYLE_MENU); - var_s3_2 = 0; + draw_msg(pause_get_menu_msg(gPauseStatsBootsMessages[bootsLevel]), baseX + 176, baseY + 23, 255, 0, 1); hud_element_set_script(gPauseStatsIconIDs[2], gStatsHammerElements[hammerLevel]); hud_element_set_render_pos(gPauseStatsIconIDs[2], baseX + 163, baseY + 54); - elemIdx = 0; hud_element_draw_without_clipping(gPauseStatsIconIDs[2]); - draw_msg(pause_get_menu_msg(gPauseStatsHammerMessages[hammerLevel]), baseX + 176, baseY + 48, 255, MSG_PAL_WHITE, DRAW_MSG_STYLE_MENU); + draw_msg(pause_get_menu_msg(gPauseStatsHammerMessages[hammerLevel]), baseX + 176, baseY + 48, 255, 0, 1); pause_draw_menu_label(6, baseX + 130, baseY + 69); pause_draw_menu_label(5, baseX + 138, baseY + 60); + cond = TRUE; + var_s3_2 = 0; + elemIdx = 0; var_s2_2 = 0; - icon10 = gPauseStatsIconIDs[10]; - temp_v1 = gPlayerData.specialBarsFilled; - var_v0_2 = temp_v1; - if (temp_v1 < 0) { - var_v0_2 = temp_v1 + 255; - } - temp_v0_3 = var_v0_2 >> 8; - temp_v0_4 = temp_v1 - (temp_v0_3 << 8); - if (temp_v0_4 < 0) { - temp_v0_4 = temp_v0_4 + 0x1F; - } - limit = (temp_v0_4 >> 5) + (temp_v0_3 * 8); + playerData = &gPlayerData; + maxStarPower = playerData->specialBarsFilled / 256; + limit = playerData->specialBarsFilled % 256; + limit /= 32; + limit += maxStarPower * 8; - if (limit > 0) { -loop_18: + while (TRUE) { + + if (var_s3_2 >= limit) { + break; + } var_s3_2++; hud_element_set_script(icon10, gPauseStatsSPIncElements[elemIdx]); - hud_element_set_render_pos(icon10, baseX + ((elemIdx * 20) + 140) + D_8024F46C[0], baseY + 75); + hud_element_set_render_pos(icon10, baseX + 140 + (elemIdx * 20) + D_8024F46C[0], baseY + 75); if (cond) { hud_element_draw_without_clipping(icon10); cond = FALSE; } else { hud_element_draw_next(icon10); } - var_s2_2 = 1; - if (var_s3_2 < limit) { - var_s3_2++; - hud_element_set_script(icon10, gPauseStatsSPIncElements[elemIdx]); - hud_element_set_render_pos(icon10, baseX + ((elemIdx * 20) + 140) + D_8024F46C[1], baseY + 75); - if (cond) { - hud_element_draw_without_clipping(icon10); - cond = FALSE; - } else { - hud_element_draw_next(icon10); - } - var_s2_2 = 2; - if (var_s3_2 < limit) { - var_s3_2++; - hud_element_set_script(icon10, gPauseStatsSPIncElements[elemIdx]); - hud_element_set_render_pos(icon10, baseX + ((elemIdx * 20) + 140) + D_8024F46C[2], baseY + 75); - if (cond) { - hud_element_draw_without_clipping(icon10); - cond = FALSE; - } else { - hud_element_draw_next(icon10); - } - var_s2_2 = 3; - if (var_s3_2 < limit) { - var_s3_2++; - hud_element_set_script(icon10, gPauseStatsSPIncElements[elemIdx]); - hud_element_set_render_pos(icon10, baseX + ((elemIdx * 20) + 140) + D_8024F46C[3], baseY + 75); - if (cond) { - hud_element_draw_without_clipping(icon10); - cond = FALSE; - } else { - hud_element_draw_next(icon10); - } - var_s2_2 = 4; - if (var_s3_2 < limit) { - var_s3_2++; - hud_element_set_script(icon10, gPauseStatsSPIncElements[elemIdx]); - hud_element_set_render_pos(icon10, baseX + ((elemIdx * 20) + 140) + D_8024F46C[4], baseY + 75); - if (cond) { - hud_element_draw_without_clipping(icon10); - cond = FALSE; - } else { - hud_element_draw_next(icon10); - } - var_s2_2 = 5; - if (var_s3_2 < limit) { - var_s3_2++; - hud_element_set_script(icon10, gPauseStatsSPIncElements[elemIdx]); - hud_element_set_render_pos(icon10, baseX + ((elemIdx * 20) + 140) + D_8024F46C[5], baseY + 75); - if (cond) { - hud_element_draw_without_clipping(icon10); - cond = FALSE; - } else { - hud_element_draw_next(icon10); - } - var_s2_2 = 6; - if (var_s3_2 < limit) { - var_s3_2++; - hud_element_set_script(icon10, gPauseStatsSPIncElements[elemIdx]); - hud_element_set_render_pos(icon10, baseX + ((elemIdx * 20) + 140) + D_8024F46C[6], baseY + 75); - if (cond) { - hud_element_draw_without_clipping(icon10); - cond = FALSE; - } else { - hud_element_draw_next(icon10); - } - var_s2_2 = 7; - if (var_s3_2 < limit) { - var_s3_2++; - hud_element_set_script(icon10, gPauseStatsStarElements[elemIdx]); - hud_element_set_render_pos(icon10, baseX + ((elemIdx * 20) + 0x98), baseY + 0x4D); - if (cond) { - hud_element_draw_without_clipping(icon10); - cond = FALSE; - } else { - hud_element_draw_next(icon10); - } - var_s2_2 = 0; - elemIdx += 1; - if (var_s3_2 < limit) { - goto loop_18; - } - } - } - } - } - } - } + var_s2_2++; + + if (var_s3_2 >= limit) { + break; + } + var_s3_2++; + hud_element_set_script(icon10, gPauseStatsSPIncElements[elemIdx]); + hud_element_set_render_pos(icon10, baseX + 140 + (elemIdx * 20) + D_8024F46C[1], baseY + 75); + if (cond) { + hud_element_draw_without_clipping(icon10); + cond = FALSE; + } else { + hud_element_draw_next(icon10); + } + var_s2_2++; + + if (var_s3_2 >= limit) { + break; + } + + var_s3_2++; + hud_element_set_script(icon10, gPauseStatsSPIncElements[elemIdx]); + hud_element_set_render_pos(icon10, baseX + 140 + (elemIdx * 20) + D_8024F46C[2], baseY + 75); + if (cond) { + hud_element_draw_without_clipping(icon10); + cond = FALSE; + } else { + hud_element_draw_next(icon10); + } + var_s2_2++; + + if (var_s3_2 >= limit) { + break; + } + + var_s3_2++; + hud_element_set_script(icon10, gPauseStatsSPIncElements[elemIdx]); + hud_element_set_render_pos(icon10, baseX + 140 + (elemIdx * 20) + D_8024F46C[3], baseY + 75); + if (cond) { + hud_element_draw_without_clipping(icon10); + cond = FALSE; + } else { + hud_element_draw_next(icon10); + } + var_s2_2++; + + if (var_s3_2 >= limit) { + break; + } + + var_s3_2++; + hud_element_set_script(icon10, gPauseStatsSPIncElements[elemIdx]); + hud_element_set_render_pos(icon10, baseX + 140 + (elemIdx * 20) + D_8024F46C[4], baseY + 75); + if (cond) { + hud_element_draw_without_clipping(icon10); + cond = FALSE; + } else { + hud_element_draw_next(icon10); + } + var_s2_2++; + + if (var_s3_2 >= limit) { + break; + } + var_s3_2++; + hud_element_set_script(icon10, gPauseStatsSPIncElements[elemIdx]); + hud_element_set_render_pos(icon10, baseX + 140 + (elemIdx * 20) + D_8024F46C[5], baseY + 75); + if (cond) { + hud_element_draw_without_clipping(icon10); + cond = FALSE; + } else { + hud_element_draw_next(icon10); + } + var_s2_2++; + if (var_s3_2 >= limit) { + break; + } + var_s3_2++; + hud_element_set_script(icon10, gPauseStatsSPIncElements[elemIdx]); + hud_element_set_render_pos(icon10, baseX + 140 + (elemIdx * 20) + D_8024F46C[6], baseY + 75); + if (cond) { + hud_element_draw_without_clipping(icon10); + cond = FALSE; + } else { + hud_element_draw_next(icon10); + } + var_s2_2++; + + if (var_s3_2 >= limit) { + break; + } + + var_s3_2++; + hud_element_set_script(icon10, gPauseStatsStarElements[elemIdx]); + hud_element_set_render_pos(icon10, baseX + 0x98 + (elemIdx * 20), baseY + 0x4D); + if (cond) { + hud_element_draw_without_clipping(icon10); + cond = FALSE; + } else { + hud_element_draw_next(icon10); + } + var_s2_2 = 0; + elemIdx += 1; + if (var_s3_2 >= limit) { + break; } } - var_s5_2 = (elemIdx * 20) + 152; - var_s0 = (elemIdx * 20) + 140; - limit = gPlayerData.maxStarPower * 8; -loop_51: - if (var_s3_2 < limit) { + maxStarPower = playerData->maxStarPower; + limit = 8 * maxStarPower; + while (TRUE) { + if (var_s3_2 >= limit) { + break; + } + if (var_s2_2 == 0) { var_s3_2++; - hud_element_set_script(icon10, HES_StatusSPEmptyIncrement); - hud_element_set_render_pos(icon10, baseX + var_s0 + D_8024F46C[0], baseY + 75); + hud_element_set_script(icon10, &HES_StatusSPEmptyIncrement); + hud_element_set_render_pos(icon10, baseX + 140 + (elemIdx * 20) + D_8024F46C[0], baseY + 75); if (cond) { hud_element_draw_without_clipping(icon10); cond = FALSE; } else { hud_element_draw_next(icon10); } + if (var_s3_2 >= limit) { + break; + } var_s2_2++; - if (var_s3_2 < limit) { - goto block_58; - } - } else { -block_58: - if (var_s2_2 == 1) { - var_s3_2++; - hud_element_set_script(icon10, HES_StatusSPEmptyIncrement); - hud_element_set_render_pos(icon10, baseX + var_s0 + D_8024F46C[1], baseY + 75); - if (cond) { - hud_element_draw_without_clipping(icon10); - cond = FALSE; - } else { - hud_element_draw_next(icon10); - } - var_s2_2++; - if (var_s3_2 < limit) { - goto block_63; - } - } else { -block_63: - if (var_s2_2 == 2) { - var_s3_2++; - hud_element_set_script(icon10, HES_StatusSPEmptyIncrement); - hud_element_set_render_pos(icon10, baseX + var_s0 + D_8024F46C[2], baseY + 75); - if (cond) { - hud_element_draw_without_clipping(icon10); - cond = FALSE; - } else { - hud_element_draw_next(icon10); - } - var_s2_2++; - if (var_s3_2 < limit) { - goto block_69; - } - } else { -block_69: - if (var_s2_2 == 3) { - var_s3_2++; - hud_element_set_script(icon10, HES_StatusSPEmptyIncrement); - hud_element_set_render_pos(icon10, baseX + var_s0 + D_8024F46C[3], baseY + 75); - if (cond) { - hud_element_draw_without_clipping(icon10); - cond = FALSE; - } else { - hud_element_draw_next(icon10); - } - var_s2_2++; - if (var_s3_2 < limit) { - goto block_75; - } - } else { -block_75: - if (var_s2_2 == 4) { - var_s3_2++; - hud_element_set_script(icon10, HES_StatusSPEmptyIncrement); - hud_element_set_render_pos(icon10, baseX + var_s0 + D_8024F46C[4], baseY + 75); - if (cond) { - hud_element_draw_without_clipping(icon10); - cond = FALSE; - } else { - hud_element_draw_next(icon10); - } - var_s2_2++; - if (var_s3_2 < limit) { - goto block_81; - } - } else { -block_81: - if (var_s2_2 == 5) { - var_s3_2++; - hud_element_set_script(icon10, HES_StatusSPEmptyIncrement); - hud_element_set_render_pos(icon10, baseX + var_s0 + D_8024F46C[5], baseY + 75); - if (cond) { - hud_element_draw_without_clipping(icon10); - cond = FALSE; - } else { - hud_element_draw_next(icon10); - } - var_s2_2++; - if (var_s3_2 < limit) { - goto block_87; - } - } else { -block_87: - if (var_s2_2 == 6) { - var_s3_2++; - hud_element_set_script(icon10, HES_StatusSPEmptyIncrement); - hud_element_set_render_pos(icon10, baseX + var_s0 + D_8024F46C[6], baseY + 75); - if (cond) { - hud_element_draw_without_clipping(icon10); - cond = FALSE; - } else { - hud_element_draw_next(icon10); - } - var_s2_2++; - if (var_s3_2 < limit) { - goto block_93; - } - } else { -block_93: - if (var_s2_2 == 7) { - var_s3_2++; - hud_element_set_script(icon10, HES_StatusStarEmpty); - hud_element_set_render_pos(icon10, baseX + var_s5_2, baseY + 0x4D); - if (cond) { - hud_element_draw_without_clipping(icon10); - cond = FALSE; - } else { - hud_element_draw_next(icon10); - } - var_s2_2 = 0; - if (var_s3_2 < limit) { - goto block_98; - } - } else { -block_98: - var_s2_2 = 0; - var_s5_2 += 20; - var_s0 += 20; - goto loop_51; - } - } - } - } - } - } - } } + + if (var_s2_2 == 1) { + var_s3_2++; + hud_element_set_script(icon10, &HES_StatusSPEmptyIncrement); + hud_element_set_render_pos(icon10, baseX + 140 + (elemIdx * 20) + D_8024F46C[1], baseY + 75); + if (cond) { + hud_element_draw_without_clipping(icon10); + cond = FALSE; + } else { + hud_element_draw_next(icon10); + } + if (var_s3_2 >= limit) { + break; + } + var_s2_2++; + } + + + if (var_s2_2 == 2) { + var_s3_2++; + hud_element_set_script(icon10, &HES_StatusSPEmptyIncrement); + hud_element_set_render_pos(icon10, baseX + 140 + (elemIdx * 20) + D_8024F46C[2], baseY + 75); + if (cond) { + hud_element_draw_without_clipping(icon10); + cond = FALSE; + } else { + hud_element_draw_next(icon10); + } + if (var_s3_2 >= limit) { + break; + } + var_s2_2++; + } + + + if (var_s2_2 == 3) { + var_s3_2++; + hud_element_set_script(icon10, &HES_StatusSPEmptyIncrement); + hud_element_set_render_pos(icon10, baseX + 140 + (elemIdx * 20) + D_8024F46C[3], baseY + 75); + if (cond) { + hud_element_draw_without_clipping(icon10); + cond = FALSE; + } else { + hud_element_draw_next(icon10); + } + if (var_s3_2 >= limit) { + break; + } + var_s2_2++; + } + + + if (var_s2_2 == 4) { + var_s3_2++; + hud_element_set_script(icon10, &HES_StatusSPEmptyIncrement); + hud_element_set_render_pos(icon10, baseX + 140 + (elemIdx * 20) + D_8024F46C[4], baseY + 75); + if (cond) { + hud_element_draw_without_clipping(icon10); + cond = FALSE; + } else { + hud_element_draw_next(icon10); + } + if (var_s3_2 >= limit) { + break; + } + var_s2_2++; + } + + + if (var_s2_2 == 5) { + var_s3_2++; + hud_element_set_script(icon10, &HES_StatusSPEmptyIncrement); + hud_element_set_render_pos(icon10, baseX + 140 + (elemIdx * 20) + D_8024F46C[5], baseY + 75); + if (cond) { + hud_element_draw_without_clipping(icon10); + cond = FALSE; + } else { + hud_element_draw_next(icon10); + } + if (var_s3_2 >= limit) { + break; + } + + var_s2_2++; + } + + + if (var_s2_2 == 6) { + var_s3_2++; + hud_element_set_script(icon10, &HES_StatusSPEmptyIncrement); + hud_element_set_render_pos(icon10, baseX + 140 + (elemIdx * 20) + D_8024F46C[6], baseY + 75); + if (cond) { + hud_element_draw_without_clipping(icon10); + cond = FALSE; + } else { + hud_element_draw_next(icon10); + } + if (var_s3_2 >= limit) { + break; + } + var_s2_2++; + } + + if (var_s2_2 == 7) { + var_s3_2++; + hud_element_set_script(icon10, &HES_StatusStarEmpty); + hud_element_set_render_pos(icon10, baseX + 152 + (elemIdx * 20), baseY + 0x4D); + if (cond) { + hud_element_draw_without_clipping(icon10); + cond = FALSE; + } else { + hud_element_draw_next(icon10); + } + if (var_s3_2 >= limit) { + break; + } + var_s2_2 = 0; + } + var_s2_2 = 0; + elemIdx++; } if (gPauseMenuCurrentTab == 1) { @@ -486,9 +484,6 @@ block_98: pause_set_cursor_pos(0x1F, baseX + entry->cursorX, baseY + entry->cursorY); } } -#else -INCLUDE_ASM(s32, "pause/138CC0", pause_stats_draw_contents); -#endif void pause_stats_init(MenuPanel* panel) { s32 i; diff --git a/src/world/common/atomic/PushBlockGravity.inc.c b/src/world/common/atomic/PushBlockGravity.inc.c index 2a2b40547b..31c639ff18 100644 --- a/src/world/common/atomic/PushBlockGravity.inc.c +++ b/src/world/common/atomic/PushBlockGravity.inc.c @@ -2,26 +2,26 @@ #include "entity.h" f32 N(PushBlockFallCurve)[] = { - 0.02, 0.02, 0.04, 0.08, 0.11, 0.2, 0.3, 0.31, - 0.42, 0.46, 0.5, 0.53, 0.56, 0.59, 0.62, 0.65, - 0.68, 0.71, 0.74, 0.77, 0.8, 0.83, 0.86, 0.89, - 0.92, 0.95, 0.98, 1.0, + 0.02, 0.02, 0.04, 0.08, 0.11, 0.2, 0.3, 0.31, + 0.42, 0.46, 0.5, 0.53, 0.56, 0.59, 0.62, 0.65, + 0.68, 0.71, 0.74, 0.77, 0.8, 0.83, 0.86, 0.89, + 0.92, 0.95, 0.98, 1.0, }; s32 N(push_block_handle_fall)(Entity* block, Evt* source) { - + block->position.y = source->varTable[0] - (N(PushBlockFallCurve)[source->functionTemp[0]] * BLOCK_GRID_SIZE); if (source->functionTemp[0] == 0) { sfx_play_sound_at_position(SOUND_1DA, 0, block->position.x, block->position.y, block->position.z); } - + if ((source->functionTemp[0] > 4) && (source->functionTemp[0] & 1)) { fx_smoke_burst(1, block->position.x, block->position.y, block->position.z, 1.0f, 20); } do { source->functionTemp[0]++; - } while(0); // required to match + } while (0); // required to match return source->functionTemp[0] == ARRAY_COUNT(N(PushBlockFallCurve)); } diff --git a/src/world/common/enemy/ai/FlyingMagikoopaAI.inc.c b/src/world/common/enemy/ai/FlyingMagikoopaAI.inc.c index 2934a1aa71..6bf79ece88 100644 --- a/src/world/common/enemy/ai/FlyingMagikoopaAI.inc.c +++ b/src/world/common/enemy/ai/FlyingMagikoopaAI.inc.c @@ -6,20 +6,20 @@ void N(FlyingMagikoopaAI_10)(Evt* script, MobileAISettings* arg1, EnemyDetectVolume* arg2) { Enemy* enemy = script->owner1.enemy; Npc* npc = get_npc_unsafe(enemy->npcID); - + npc->duration = 30; script->AI_TEMP_STATE = 11; } void N(FlyingMagikoopaAI_11)(Evt* script, MobileAISettings* aiSettings, EnemyDetectVolume* volume) { Enemy* enemy = script->owner1.enemy; - Npc* npc = get_npc_unsafe(enemy->npcID); + Npc* npc = get_npc_unsafe(enemy->npcID); f32 basePosY = (f32)enemy->varTable[1] / 100.0; s32 emoteTemp; - + npc->pos.y = basePosY + sin_deg(enemy->varTable[0]) * 6.0; enemy->varTable[0] = clamp_angle(enemy->varTable[0] + 10); - + if (N(MagikoopaAI_CanShootSpell)(script, aiSettings->chaseRadius, aiSettings->chaseOffsetDist, volume) == 1) { fx_emote(0, npc, 0.0f, npc->collisionHeight, 1.0f, 2.0f, -20.0f, 15, &emoteTemp); ai_enemy_play_sound(npc, SOUND_2F4, 0x200000); @@ -49,13 +49,13 @@ void N(FlyingMagikoopaAI_15)(Evt* arg0, MobileAISettings* arg1, EnemyDetectVolum s32 isCCW; f32 moveDist; s32 angleAdjust; - + Enemy* enemy = arg0->owner1.enemy; Npc* npc = get_npc_unsafe(enemy->npcID); f32 posX, posY, posZ; s32 result = RESULT_SEARCHING; s32 iterations = 0; - + npc->duration--; if (npc->duration <= 0) { randomDist = rand_int(30) + 180.0; @@ -74,7 +74,7 @@ void N(FlyingMagikoopaAI_15)(Evt* arg0, MobileAISettings* arg1, EnemyDetectVolum baseYaw = (rand_int(10) + 270.0) - 5.0; } angleAdjust = iterations * 5; - while(1) { + while (TRUE) { if (isCCW) { npc->yaw = baseYaw + angleAdjust; } else { @@ -111,7 +111,7 @@ void N(FlyingMagikoopaAI_15)(Evt* arg0, MobileAISettings* arg1, EnemyDetectVolum if (iterations >= 7) { result = RESULT_NONE_FOUND; - } + } } } posX = npc->pos.x; @@ -135,10 +135,10 @@ void N(FlyingMagikoopaAI_16)(Evt* script, MobileAISettings* aiSettings, EnemyDet Enemy* enemy = script->owner1.enemy; Npc* npc = get_npc_unsafe(enemy->npcID); f32 basePosY = (f32)enemy->varTable[1] / 100.0; - + enemy->varTable[0] = clamp_angle(enemy->varTable[0] + 10); npc->pos.y = basePosY + sin_deg(enemy->varTable[0]) * 6.0; - + if (npc->turnAroundYawAdjustment == 0) { enemy->varTable[5] = npc->pos.y * 100.0; script->functionTemp[0] = 17; @@ -158,7 +158,7 @@ void N(FlyingMagikoopaAI_17)(Evt* script, MobileAISettings* aiSettings, EnemyDet npc->pos.x = lerpX; npc->pos.z = lerpZ; npc->pos.y = basePosY + sin_deg((s32)(npc->duration * (180.0 / (f32)enemy->varTable[3])) + 180) * 25.0; - + npc->duration++; if (npc->duration == (enemy->varTable[3] - 8)) { npc->yaw = atan2(npc->pos.x, npc->pos.z, gPlayerStatusPtr->position.x, gPlayerStatusPtr->position.z); @@ -190,7 +190,7 @@ void N(FlyingMagikoopaAI_21)(Evt* script, MobileAISettings* aiSettings, EnemyDet Npc* npc = get_npc_unsafe(enemy->npcID); f32 posX, posY, posZ; s32 emoteTemp; - + npc->duration--; if (npc->duration == 0) { npc->currentAnim = enemy->animList[0]; @@ -228,7 +228,7 @@ void N(FlyingMagikoopaAI_23)(Evt* script, MobileAISettings* aiSettings, EnemyDet Npc* npc = get_npc_unsafe(enemy->npcID); s32 temp_s1; s32 emoteTemp; - + npc->duration--; if (npc->duration <= 0) { temp_s1 = N(MagikoopaAI_CanShootSpell)(script, aiSettings->chaseRadius, aiSettings->chaseOffsetDist, territory); @@ -253,7 +253,7 @@ void N(FlyingMagikoopaAI_24)(Evt* script, MobileAISettings* aiSettings, EnemyDet npc->pos.y = basePosY + sin_deg(enemy->varTable[0]) * 6.0; enemy->varTable[0] = clamp_angle(enemy->varTable[0] + 10); - + npc->duration--; if (npc->duration <= 0) { npc->currentAnim = enemy->animList[0]; @@ -266,7 +266,7 @@ void N(FlyingMagikoopaAI_50)(Evt* script, MobileAISettings* aiSettings, EnemyDet Enemy* enemy = script->owner1.enemy; Npc* npc = get_npc_unsafe(enemy->npcID); f32 basePosY = (f32)enemy->varTable[1] / 100.0; - + npc->pos.y = basePosY + sin_deg(enemy->varTable[0]) * 6.0; enemy->varTable[0] = clamp_angle(enemy->varTable[0] + 10); @@ -283,7 +283,7 @@ ApiStatus N(FlyingMagikoopaAI_Main)(Evt* script, s32 isInitialCall) { EnemyDetectVolume territory; EnemyDetectVolume* territoryPtr = &territory; MobileAISettings* aiSettings = (MobileAISettings*)evt_get_variable(script, *args++); - + territory.skipPlayerDetectChance = 0; territory.shape = enemy->territory->wander.detectShape; territory.pointX = enemy->territory->wander.detectPos.x; @@ -292,7 +292,7 @@ ApiStatus N(FlyingMagikoopaAI_Main)(Evt* script, s32 isInitialCall) { territory.sizeZ = enemy->territory->wander.detectSize.z; territory.halfHeight = 120.0f; territory.detectFlags = 0; - + if (isInitialCall) { npc->flags &= ~NPC_FLAG_GRAVITY; npc->flags |= NPC_FLAG_ENABLE_HIT_SCRIPT; @@ -313,7 +313,7 @@ ApiStatus N(FlyingMagikoopaAI_Main)(Evt* script, s32 isInitialCall) { } enemy->aiFlags &= ~ENEMY_AI_FLAGS_4; } - + switch (script->AI_TEMP_STATE) { case 10: N(FlyingMagikoopaAI_10)(script, aiSettings, territoryPtr); diff --git a/src/world/script_api/7E4690.c b/src/world/script_api/7E4690.c index 31c8ab0e79..0ed73cdf0e 100644 --- a/src/world/script_api/7E4690.c +++ b/src/world/script_api/7E4690.c @@ -62,7 +62,7 @@ ApiStatus SetPlayerPositionFromSaveData(Evt* script, s32 isInitialCall) { enable_partner_ai(); } - camera->changingMap = TRUE; + camera->isChangingMap = TRUE; return ApiStatus_DONE2; } diff --git a/ver/us/asm/nonmatchings/190B20/func_802667F0.s b/ver/us/asm/nonmatchings/190B20/func_802667F0.s deleted file mode 100644 index 35db50fc21..0000000000 --- a/ver/us/asm/nonmatchings/190B20/func_802667F0.s +++ /dev/null @@ -1,123 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -.section .rodata - -dlabel jtbl_8029D640 -.word .L80266844_195124, .L80266854_195134, .L80266860_195140, .L8026686C_19514C, .L80266878_195158, .L802668F8_1951D8 - -dlabel jtbl_8029D658 -.word .L802668B0_195190, .L802668D8_1951B8, .L802668E0_1951C0, .L802668E8_1951C8, .L802668F0_1951D0, .L802668F8_1951D8 - -.section .text - -glabel func_802667F0 -/* 1950D0 802667F0 27BDFFE0 */ addiu $sp, $sp, -0x20 -/* 1950D4 802667F4 44860000 */ mtc1 $a2, $f0 -/* 1950D8 802667F8 44871000 */ mtc1 $a3, $f2 -/* 1950DC 802667FC AFB00018 */ sw $s0, 0x18($sp) -/* 1950E0 80266800 00A0802D */ daddu $s0, $a1, $zero -/* 1950E4 80266804 AFBF001C */ sw $ra, 0x1c($sp) -/* 1950E8 80266808 8E020200 */ lw $v0, 0x200($s0) -/* 1950EC 8026680C C7A40030 */ lwc1 $f4, 0x30($sp) -/* 1950F0 80266810 3C05800E */ lui $a1, %hi(gBattleStatus+0xD8) -/* 1950F4 80266814 8CA5C148 */ lw $a1, %lo(gBattleStatus+0xD8)($a1) -/* 1950F8 80266818 1440001A */ bnez $v0, .L80266884 -/* 1950FC 8026681C 0080182D */ daddu $v1, $a0, $zero -/* 195100 80266820 2C620006 */ sltiu $v0, $v1, 6 -/* 195104 80266824 1040003E */ beqz $v0, .L80266920 -/* 195108 80266828 0000202D */ daddu $a0, $zero, $zero -/* 19510C 8026682C 00031080 */ sll $v0, $v1, 2 -/* 195110 80266830 3C01802A */ lui $at, %hi(jtbl_8029D640) -/* 195114 80266834 00220821 */ addu $at, $at, $v0 -/* 195118 80266838 8C22D640 */ lw $v0, %lo(jtbl_8029D640)($at) -/* 19511C 8026683C 00400008 */ jr $v0 -/* 195120 80266840 00000000 */ nop -.L80266844_195124: -/* 195124 80266844 0000202D */ daddu $a0, $zero, $zero -/* 195128 80266848 24020001 */ addiu $v0, $zero, 1 -/* 19512C 8026684C 08099A48 */ j .L80266920 -/* 195130 80266850 A2020204 */ sb $v0, 0x204($s0) -.L80266854_195134: -/* 195134 80266854 24040004 */ addiu $a0, $zero, 4 -/* 195138 80266858 08099A48 */ j .L80266920 -/* 19513C 8026685C A2000204 */ sb $zero, 0x204($s0) -.L80266860_195140: -/* 195140 80266860 24040003 */ addiu $a0, $zero, 3 -/* 195144 80266864 08099A48 */ j .L80266920 -/* 195148 80266868 A2000204 */ sb $zero, 0x204($s0) -.L8026686C_19514C: -/* 19514C 8026686C 24040002 */ addiu $a0, $zero, 2 -/* 195150 80266870 08099A48 */ j .L80266920 -/* 195154 80266874 A2040204 */ sb $a0, 0x204($s0) -.L80266878_195158: -/* 195158 80266878 0000202D */ daddu $a0, $zero, $zero -/* 19515C 8026687C 08099A48 */ j .L80266920 -/* 195160 80266880 A2000204 */ sb $zero, 0x204($s0) -.L80266884: -/* 195164 80266884 8C42000C */ lw $v0, 0xc($v0) -/* 195168 80266888 AC400018 */ sw $zero, 0x18($v0) -/* 19516C 8026688C 2C620006 */ sltiu $v0, $v1, 6 -/* 195170 80266890 82040204 */ lb $a0, 0x204($s0) -/* 195174 80266894 10400022 */ beqz $v0, .L80266920 -/* 195178 80266898 00031080 */ sll $v0, $v1, 2 -/* 19517C 8026689C 3C01802A */ lui $at, %hi(jtbl_8029D658) -/* 195180 802668A0 00220821 */ addu $at, $at, $v0 -/* 195184 802668A4 8C22D658 */ lw $v0, %lo(jtbl_8029D658)($at) -/* 195188 802668A8 00400008 */ jr $v0 -/* 19518C 802668AC 00000000 */ nop -.L802668B0_195190: -/* 195190 802668B0 92020204 */ lbu $v0, 0x204($s0) -/* 195194 802668B4 24420001 */ addiu $v0, $v0, 1 -/* 195198 802668B8 A2020204 */ sb $v0, 0x204($s0) -/* 19519C 802668BC 00021600 */ sll $v0, $v0, 0x18 -/* 1951A0 802668C0 00021603 */ sra $v0, $v0, 0x18 -/* 1951A4 802668C4 28420003 */ slti $v0, $v0, 3 -/* 1951A8 802668C8 14400015 */ bnez $v0, .L80266920 -/* 1951AC 802668CC 24020002 */ addiu $v0, $zero, 2 -/* 1951B0 802668D0 08099A48 */ j .L80266920 -/* 1951B4 802668D4 A2020204 */ sb $v0, 0x204($s0) -.L802668D8_1951B8: -/* 1951B8 802668D8 08099A48 */ j .L80266920 -/* 1951BC 802668DC 24040004 */ addiu $a0, $zero, 4 -.L802668E0_1951C0: -/* 1951C0 802668E0 08099A48 */ j .L80266920 -/* 1951C4 802668E4 24040003 */ addiu $a0, $zero, 3 -.L802668E8_1951C8: -/* 1951C8 802668E8 08099A48 */ j .L80266920 -/* 1951CC 802668EC 24040002 */ addiu $a0, $zero, 2 -.L802668F0_1951D0: -/* 1951D0 802668F0 08099A48 */ j .L80266920 -/* 1951D4 802668F4 0000202D */ daddu $a0, $zero, $zero -.L802668F8_1951D8: -/* 1951D8 802668F8 90A20204 */ lbu $v0, 0x204($a1) -/* 1951DC 802668FC 80A40204 */ lb $a0, 0x204($a1) -/* 1951E0 80266900 24420001 */ addiu $v0, $v0, 1 -/* 1951E4 80266904 A0A20204 */ sb $v0, 0x204($a1) -/* 1951E8 80266908 00021600 */ sll $v0, $v0, 0x18 -/* 1951EC 8026690C 00021603 */ sra $v0, $v0, 0x18 -/* 1951F0 80266910 28420003 */ slti $v0, $v0, 3 -/* 1951F4 80266914 14400002 */ bnez $v0, .L80266920 -/* 1951F8 80266918 24020002 */ addiu $v0, $zero, 2 -/* 1951FC 8026691C A0A20204 */ sb $v0, 0x204($a1) -.L80266920: -/* 195200 80266920 44050000 */ mfc1 $a1, $f0 -/* 195204 80266924 3C014120 */ lui $at, 0x4120 -/* 195208 80266928 44810000 */ mtc1 $at, $f0 -/* 19520C 8026692C 00000000 */ nop -/* 195210 80266930 46002101 */ sub.s $f4, $f4, $f0 -/* 195214 80266934 44061000 */ mfc1 $a2, $f2 -/* 195218 80266938 3C014140 */ lui $at, 0x4140 -/* 19521C 8026693C 44810000 */ mtc1 $at, $f0 -/* 195220 80266940 44072000 */ mfc1 $a3, $f4 -/* 195224 80266944 2402005A */ addiu $v0, $zero, 0x5a -/* 195228 80266948 AFA20014 */ sw $v0, 0x14($sp) -/* 19522C 8026694C 0C01C4E4 */ jal fx_attack_result_text -/* 195230 80266950 E7A00010 */ swc1 $f0, 0x10($sp) -/* 195234 80266954 AE020200 */ sw $v0, 0x200($s0) -/* 195238 80266958 24020050 */ addiu $v0, $zero, 0x50 -/* 19523C 8026695C A2020205 */ sb $v0, 0x205($s0) -/* 195240 80266960 8FBF001C */ lw $ra, 0x1c($sp) -/* 195244 80266964 8FB00018 */ lw $s0, 0x18($sp) -/* 195248 80266968 03E00008 */ jr $ra -/* 19524C 8026696C 27BD0020 */ addiu $sp, $sp, 0x20 diff --git a/ver/us/asm/nonmatchings/23680/spawn_drops.s b/ver/us/asm/nonmatchings/23680/spawn_drops.s deleted file mode 100644 index 6c6865cc64..0000000000 --- a/ver/us/asm/nonmatchings/23680/spawn_drops.s +++ /dev/null @@ -1,752 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel spawn_drops -/* 23680 80048280 27BDFF68 */ addiu $sp, $sp, -0x98 -/* 23684 80048284 AFA40098 */ sw $a0, 0x98($sp) -/* 23688 80048288 8FA80098 */ lw $t0, 0x98($sp) -/* 2368C 8004828C AFBF0064 */ sw $ra, 0x64($sp) -/* 23690 80048290 AFBE0060 */ sw $fp, 0x60($sp) -/* 23694 80048294 AFB7005C */ sw $s7, 0x5c($sp) -/* 23698 80048298 AFB60058 */ sw $s6, 0x58($sp) -/* 2369C 8004829C AFB50054 */ sw $s5, 0x54($sp) -/* 236A0 800482A0 AFB40050 */ sw $s4, 0x50($sp) -/* 236A4 800482A4 AFB3004C */ sw $s3, 0x4c($sp) -/* 236A8 800482A8 AFB20048 */ sw $s2, 0x48($sp) -/* 236AC 800482AC AFB10044 */ sw $s1, 0x44($sp) -/* 236B0 800482B0 AFB00040 */ sw $s0, 0x40($sp) -/* 236B4 800482B4 F7BE0090 */ sdc1 $f30, 0x90($sp) -/* 236B8 800482B8 F7BC0088 */ sdc1 $f28, 0x88($sp) -/* 236BC 800482BC F7BA0080 */ sdc1 $f26, 0x80($sp) -/* 236C0 800482C0 F7B80078 */ sdc1 $f24, 0x78($sp) -/* 236C4 800482C4 F7B60070 */ sdc1 $f22, 0x70($sp) -/* 236C8 800482C8 F7B40068 */ sdc1 $f20, 0x68($sp) -/* 236CC 800482CC AFA0002C */ sw $zero, 0x2c($sp) -/* 236D0 800482D0 84840008 */ lh $a0, 8($a0) -/* 236D4 800482D4 8D0800D4 */ lw $t0, 0xd4($t0) -/* 236D8 800482D8 0000902D */ daddu $s2, $zero, $zero -/* 236DC 800482DC 0C00EABB */ jal get_npc_unsafe -/* 236E0 800482E0 AFA80020 */ sw $t0, 0x20($sp) -/* 236E4 800482E4 0040802D */ daddu $s0, $v0, $zero -/* 236E8 800482E8 3C038007 */ lui $v1, %hi(gCurrentCameraID) -/* 236EC 800482EC 8C637410 */ lw $v1, %lo(gCurrentCameraID)($v1) -/* 236F0 800482F0 3C04800B */ lui $a0, %hi(gCameras) -/* 236F4 800482F4 24841D80 */ addiu $a0, $a0, %lo(gCameras) -/* 236F8 800482F8 00031080 */ sll $v0, $v1, 2 -/* 236FC 800482FC 00431021 */ addu $v0, $v0, $v1 -/* 23700 80048300 00021080 */ sll $v0, $v0, 2 -/* 23704 80048304 00431023 */ subu $v0, $v0, $v1 -/* 23708 80048308 000218C0 */ sll $v1, $v0, 3 -/* 2370C 8004830C 00431021 */ addu $v0, $v0, $v1 -/* 23710 80048310 000210C0 */ sll $v0, $v0, 3 -/* 23714 80048314 00448821 */ addu $s1, $v0, $a0 -.L80048318: -/* 23718 80048318 0C044181 */ jal get_shadow_by_index -/* 2371C 8004831C 0240202D */ daddu $a0, $s2, $zero -/* 23720 80048320 14400004 */ bnez $v0, .L80048334 -/* 23724 80048324 26520001 */ addiu $s2, $s2, 1 -/* 23728 80048328 8FA8002C */ lw $t0, 0x2c($sp) -/* 2372C 8004832C 25080001 */ addiu $t0, $t0, 1 -/* 23730 80048330 AFA8002C */ sw $t0, 0x2c($sp) -.L80048334: -/* 23734 80048334 2A42003C */ slti $v0, $s2, 0x3c -/* 23738 80048338 1440FFF7 */ bnez $v0, .L80048318 -/* 2373C 8004833C 0000F02D */ daddu $fp, $zero, $zero -/* 23740 80048340 C620006C */ lwc1 $f0, 0x6c($s1) -/* 23744 80048344 3C0142B4 */ lui $at, 0x42b4 -/* 23748 80048348 44816000 */ mtc1 $at, $f12 -/* 2374C 8004834C 3C038015 */ lui $v1, %hi(D_8014B7F0) -/* 23750 80048350 8C63B7F0 */ lw $v1, %lo(D_8014B7F0)($v1) -/* 23754 80048354 240200F6 */ addiu $v0, $zero, 0xf6 -/* 23758 80048358 AFA00024 */ sw $zero, 0x24($sp) -/* 2375C 8004835C 460C0300 */ add.s $f12, $f0, $f12 -/* 23760 80048360 00431023 */ subu $v0, $v0, $v1 -/* 23764 80048364 0C00A6C9 */ jal clamp_angle -/* 23768 80048368 AFA20028 */ sw $v0, 0x28($sp) -/* 2376C 8004836C 4600010D */ trunc.w.s $f4, $f0 -/* 23770 80048370 44162000 */ mfc1 $s6, $f4 -/* 23774 80048374 960200A8 */ lhu $v0, 0xa8($s0) -/* 23778 80048378 8FA80020 */ lw $t0, 0x20($sp) -/* 2377C 8004837C C602003C */ lwc1 $f2, 0x3c($s0) -/* 23780 80048380 00021400 */ sll $v0, $v0, 0x10 -/* 23784 80048384 00021C03 */ sra $v1, $v0, 0x10 -/* 23788 80048388 000217C2 */ srl $v0, $v0, 0x1f -/* 2378C 8004838C 00621821 */ addu $v1, $v1, $v0 -/* 23790 80048390 00031843 */ sra $v1, $v1, 1 -/* 23794 80048394 44830000 */ mtc1 $v1, $f0 -/* 23798 80048398 00000000 */ nop -/* 2379C 8004839C 46800020 */ cvt.s.w $f0, $f0 -/* 237A0 800483A0 46001080 */ add.s $f2, $f2, $f0 -/* 237A4 800483A4 91110001 */ lbu $s1, 1($t0) -/* 237A8 800483A8 03C0B82D */ daddu $s7, $fp, $zero -/* 237AC 800483AC E7A20038 */ swc1 $f2, 0x38($sp) -/* 237B0 800483B0 C6040038 */ lwc1 $f4, 0x38($s0) -/* 237B4 800483B4 E7A40034 */ swc1 $f4, 0x34($sp) -/* 237B8 800483B8 C61E0040 */ lwc1 $f30, 0x40($s0) -/* 237BC 800483BC 0C00A67F */ jal rand_int -/* 237C0 800483C0 24040064 */ addiu $a0, $zero, 0x64 -/* 237C4 800483C4 0051102A */ slt $v0, $v0, $s1 -/* 237C8 800483C8 10400061 */ beqz $v0, .L80048550 -/* 237CC 800483CC 03C0902D */ daddu $s2, $fp, $zero -/* 237D0 800483D0 03C0202D */ daddu $a0, $fp, $zero -/* 237D4 800483D4 24050002 */ addiu $a1, $zero, 2 -/* 237D8 800483D8 8FA30020 */ lw $v1, 0x20($sp) -.L800483DC: -/* 237DC 800483DC 84620002 */ lh $v0, 2($v1) -/* 237E0 800483E0 10400009 */ beqz $v0, .L80048408 -/* 237E4 800483E4 24630006 */ addiu $v1, $v1, 6 -/* 237E8 800483E8 8FA80020 */ lw $t0, 0x20($sp) -/* 237EC 800483EC 26520001 */ addiu $s2, $s2, 1 -/* 237F0 800483F0 01051021 */ addu $v0, $t0, $a1 -/* 237F4 800483F4 84420002 */ lh $v0, 2($v0) -/* 237F8 800483F8 00822021 */ addu $a0, $a0, $v0 -/* 237FC 800483FC 2A420008 */ slti $v0, $s2, 8 -/* 23800 80048400 1440FFF6 */ bnez $v0, .L800483DC -/* 23804 80048404 24A50006 */ addiu $a1, $a1, 6 -.L80048408: -/* 23808 80048408 0C00A67F */ jal rand_int -/* 2380C 8004840C 0000A82D */ daddu $s5, $zero, $zero -/* 23810 80048410 0040882D */ daddu $s1, $v0, $zero -/* 23814 80048414 02A0902D */ daddu $s2, $s5, $zero -/* 23818 80048418 24140004 */ addiu $s4, $zero, 4 -/* 2381C 8004841C 8FB00020 */ lw $s0, 0x20($sp) -/* 23820 80048420 24130002 */ addiu $s3, $zero, 2 -/* 23824 80048424 AFA00030 */ sw $zero, 0x30($sp) -.L80048428: -/* 23828 80048428 86020002 */ lh $v0, 2($s0) -/* 2382C 8004842C 10400017 */ beqz $v0, .L8004848C -/* 23830 80048430 00000000 */ nop -/* 23834 80048434 8FA80020 */ lw $t0, 0x20($sp) -/* 23838 80048438 01131021 */ addu $v0, $t0, $s3 -/* 2383C 8004843C 01141821 */ addu $v1, $t0, $s4 -/* 23840 80048440 84420002 */ lh $v0, 2($v0) -/* 23844 80048444 84640002 */ lh $a0, 2($v1) -/* 23848 80048448 18800005 */ blez $a0, .L80048460 -/* 2384C 8004844C 02A2A821 */ addu $s5, $s5, $v0 -/* 23850 80048450 0C05152F */ jal get_global_flag -/* 23854 80048454 24840714 */ addiu $a0, $a0, 0x714 -/* 23858 80048458 54400007 */ bnel $v0, $zero, .L80048478 -/* 2385C 8004845C 26940006 */ addiu $s4, $s4, 6 -.L80048460: -/* 23860 80048460 02B1102A */ slt $v0, $s5, $s1 -/* 23864 80048464 54400004 */ bnel $v0, $zero, .L80048478 -/* 23868 80048468 26940006 */ addiu $s4, $s4, 6 -/* 2386C 8004846C 86100002 */ lh $s0, 2($s0) -/* 23870 80048470 08012123 */ j .L8004848C -/* 23874 80048474 AFB00030 */ sw $s0, 0x30($sp) -.L80048478: -/* 23878 80048478 26730006 */ addiu $s3, $s3, 6 -/* 2387C 8004847C 26520001 */ addiu $s2, $s2, 1 -/* 23880 80048480 2A420008 */ slti $v0, $s2, 8 -/* 23884 80048484 1440FFE8 */ bnez $v0, .L80048428 -/* 23888 80048488 26100006 */ addiu $s0, $s0, 6 -.L8004848C: -/* 2388C 8004848C 8FA80098 */ lw $t0, 0x98($sp) -/* 23890 80048490 8FA80030 */ lw $t0, 0x30($sp) -/* 23894 80048494 1100002E */ beqz $t0, .L80048550 -/* 23898 80048498 24020004 */ addiu $v0, $zero, 4 -/* 2389C 8004849C 0100202D */ daddu $a0, $t0, $zero -/* 238A0 800484A0 00171840 */ sll $v1, $s7, 1 -/* 238A4 800484A4 00771821 */ addu $v1, $v1, $s7 -/* 238A8 800484A8 AFA20010 */ sw $v0, 0x10($sp) -/* 238AC 800484AC 00431004 */ sllv $v0, $v1, $v0 -/* 238B0 800484B0 00431023 */ subu $v0, $v0, $v1 -/* 238B4 800484B4 000210C0 */ sll $v0, $v0, 3 -/* 238B8 800484B8 8FA50034 */ lw $a1, 0x34($sp) -/* 238BC 800484BC 8FA60038 */ lw $a2, 0x38($sp) -/* 238C0 800484C0 4407F000 */ mfc1 $a3, $f30 -/* 238C4 800484C4 8FA80024 */ lw $t0, 0x24($sp) -/* 238C8 800484C8 02C21021 */ addu $v0, $s6, $v0 -/* 238CC 800484CC AFA20018 */ sw $v0, 0x18($sp) -/* 238D0 800484D0 AFA0001C */ sw $zero, 0x1c($sp) -/* 238D4 800484D4 0C04C4FD */ jal make_item_entity -/* 238D8 800484D8 AFA80014 */ sw $t0, 0x14($sp) -/* 238DC 800484DC 44960000 */ mtc1 $s6, $f0 -/* 238E0 800484E0 00000000 */ nop -/* 238E4 800484E4 46800021 */ cvt.d.w $f0, $f0 -/* 238E8 800484E8 27DE0001 */ addiu $fp, $fp, 1 -/* 238EC 800484EC 2BC2000C */ slti $v0, $fp, 0xc -/* 238F0 800484F0 3C01403E */ lui $at, 0x403e -/* 238F4 800484F4 44811800 */ mtc1 $at, $f3 -/* 238F8 800484F8 44801000 */ mtc1 $zero, $f2 -/* 238FC 800484FC 8FA80024 */ lw $t0, 0x24($sp) -/* 23900 80048500 46220000 */ add.d $f0, $f0, $f2 -/* 23904 80048504 25080002 */ addiu $t0, $t0, 2 -/* 23908 80048508 AFA80024 */ sw $t0, 0x24($sp) -/* 2390C 8004850C 4620010D */ trunc.w.d $f4, $f0 -/* 23910 80048510 44162000 */ mfc1 $s6, $f4 -/* 23914 80048514 14400004 */ bnez $v0, .L80048528 -/* 23918 80048518 00121040 */ sll $v0, $s2, 1 -/* 2391C 8004851C 26F70001 */ addiu $s7, $s7, 1 -/* 23920 80048520 0017B0C0 */ sll $s6, $s7, 3 -/* 23924 80048524 0000F02D */ daddu $fp, $zero, $zero -.L80048528: -/* 23928 80048528 00521021 */ addu $v0, $v0, $s2 -/* 2392C 8004852C 24420002 */ addiu $v0, $v0, 2 -/* 23930 80048530 8FA80020 */ lw $t0, 0x20($sp) -/* 23934 80048534 00021040 */ sll $v0, $v0, 1 -/* 23938 80048538 01021021 */ addu $v0, $t0, $v0 -/* 2393C 8004853C 84440002 */ lh $a0, 2($v0) -/* 23940 80048540 04800003 */ bltz $a0, .L80048550 -/* 23944 80048544 00000000 */ nop -/* 23948 80048548 0C051514 */ jal set_global_flag -/* 2394C 8004854C 24840715 */ addiu $a0, $a0, 0x715 -.L80048550: -/* 23950 80048550 3C02800B */ lui $v0, %hi(gCurrentEncounter+0x13) -/* 23954 80048554 80420F23 */ lb $v0, %lo(gCurrentEncounter+0x13)($v0) -/* 23958 80048558 10400026 */ beqz $v0, .L800485F4 -/* 2395C 8004855C 24040093 */ addiu $a0, $zero, 0x93 -/* 23960 80048560 24020004 */ addiu $v0, $zero, 4 -/* 23964 80048564 00171840 */ sll $v1, $s7, 1 -/* 23968 80048568 00771821 */ addu $v1, $v1, $s7 -/* 2396C 8004856C AFA20010 */ sw $v0, 0x10($sp) -/* 23970 80048570 00431004 */ sllv $v0, $v1, $v0 -/* 23974 80048574 00431023 */ subu $v0, $v0, $v1 -/* 23978 80048578 000210C0 */ sll $v0, $v0, 3 -/* 2397C 8004857C 8FA50034 */ lw $a1, 0x34($sp) -/* 23980 80048580 8FA60038 */ lw $a2, 0x38($sp) -/* 23984 80048584 4407F000 */ mfc1 $a3, $f30 -/* 23988 80048588 8FA80024 */ lw $t0, 0x24($sp) -/* 2398C 8004858C 02C21021 */ addu $v0, $s6, $v0 -/* 23990 80048590 3C01800B */ lui $at, %hi(gCurrentEncounter+0x13) -/* 23994 80048594 A0200F23 */ sb $zero, %lo(gCurrentEncounter+0x13)($at) -/* 23998 80048598 AFA20018 */ sw $v0, 0x18($sp) -/* 2399C 8004859C AFA0001C */ sw $zero, 0x1c($sp) -/* 239A0 800485A0 0C04C4FD */ jal make_item_entity -/* 239A4 800485A4 AFA80014 */ sw $t0, 0x14($sp) -/* 239A8 800485A8 44960000 */ mtc1 $s6, $f0 -/* 239AC 800485AC 00000000 */ nop -/* 239B0 800485B0 46800021 */ cvt.d.w $f0, $f0 -/* 239B4 800485B4 27DE0001 */ addiu $fp, $fp, 1 -/* 239B8 800485B8 2BC2000C */ slti $v0, $fp, 0xc -/* 239BC 800485BC 3C01403E */ lui $at, 0x403e -/* 239C0 800485C0 44811800 */ mtc1 $at, $f3 -/* 239C4 800485C4 44801000 */ mtc1 $zero, $f2 -/* 239C8 800485C8 8FA80024 */ lw $t0, 0x24($sp) -/* 239CC 800485CC 46220000 */ add.d $f0, $f0, $f2 -/* 239D0 800485D0 25080002 */ addiu $t0, $t0, 2 -/* 239D4 800485D4 AFA80024 */ sw $t0, 0x24($sp) -/* 239D8 800485D8 4620010D */ trunc.w.d $f4, $f0 -/* 239DC 800485DC 44162000 */ mfc1 $s6, $f4 -/* 239E0 800485E0 14400005 */ bnez $v0, .L800485F8 -/* 239E4 800485E4 0000882D */ daddu $s1, $zero, $zero -/* 239E8 800485E8 26F70001 */ addiu $s7, $s7, 1 -/* 239EC 800485EC 0017B0C0 */ sll $s6, $s7, 3 -/* 239F0 800485F0 0000F02D */ daddu $fp, $zero, $zero -.L800485F4: -/* 239F4 800485F4 0000882D */ daddu $s1, $zero, $zero -.L800485F8: -/* 239F8 800485F8 0220902D */ daddu $s2, $s1, $zero -/* 239FC 800485FC 24150006 */ addiu $s5, $zero, 6 -/* 23A00 80048600 24140004 */ addiu $s4, $zero, 4 -/* 23A04 80048604 8FB00020 */ lw $s0, 0x20($sp) -/* 23A08 80048608 3C0146FF */ lui $at, 0x46ff -/* 23A0C 8004860C 3421FE00 */ ori $at, $at, 0xfe00 -/* 23A10 80048610 4481D000 */ mtc1 $at, $f26 -/* 23A14 80048614 3C0142C8 */ lui $at, 0x42c8 -/* 23A18 80048618 4481E000 */ mtc1 $at, $f28 -/* 23A1C 8004861C 3C028011 */ lui $v0, %hi(gPlayerData+0x2) -/* 23A20 80048620 8042F292 */ lb $v0, %lo(gPlayerData+0x2)($v0) -/* 23A24 80048624 3C038011 */ lui $v1, %hi(gPlayerData+0x3) -/* 23A28 80048628 8063F293 */ lb $v1, %lo(gPlayerData+0x3)($v1) -/* 23A2C 8004862C 24130002 */ addiu $s3, $zero, 2 -/* 23A30 80048630 AFA00030 */ sw $zero, 0x30($sp) -/* 23A34 80048634 44821000 */ mtc1 $v0, $f2 -/* 23A38 80048638 00000000 */ nop -/* 23A3C 8004863C 468010A0 */ cvt.s.w $f2, $f2 -/* 23A40 80048640 44830000 */ mtc1 $v1, $f0 -/* 23A44 80048644 00000000 */ nop -/* 23A48 80048648 46800020 */ cvt.s.w $f0, $f0 -/* 23A4C 8004864C 46001603 */ div.s $f24, $f2, $f0 -.L80048650: -/* 23A50 80048650 8FA80020 */ lw $t0, 0x20($sp) -/* 23A54 80048654 86030032 */ lh $v1, 0x32($s0) -/* 23A58 80048658 01131021 */ addu $v0, $t0, $s3 -/* 23A5C 8004865C 4483B000 */ mtc1 $v1, $f22 -/* 23A60 80048660 00000000 */ nop -/* 23A64 80048664 4680B5A0 */ cvt.s.w $f22, $f22 -/* 23A68 80048668 461AB583 */ div.s $f22, $f22, $f26 -/* 23A6C 8004866C 84420032 */ lh $v0, 0x32($v0) -/* 23A70 80048670 4616C03E */ c.le.s $f24, $f22 -/* 23A74 80048674 4482A000 */ mtc1 $v0, $f20 -/* 23A78 80048678 00000000 */ nop -/* 23A7C 8004867C 4680A520 */ cvt.s.w $f20, $f20 -/* 23A80 80048680 45000034 */ bc1f .L80048754 -/* 23A84 80048684 461AA503 */ div.s $f20, $f20, $f26 -/* 23A88 80048688 0C00A67F */ jal rand_int -/* 23A8C 8004868C 24040064 */ addiu $a0, $zero, 0x64 -/* 23A90 80048690 461CA082 */ mul.s $f2, $f20, $f28 -/* 23A94 80048694 00000000 */ nop -/* 23A98 80048698 44820000 */ mtc1 $v0, $f0 -/* 23A9C 8004869C 00000000 */ nop -/* 23AA0 800486A0 46800020 */ cvt.s.w $f0, $f0 -/* 23AA4 800486A4 4602003E */ c.le.s $f0, $f2 -/* 23AA8 800486A8 00000000 */ nop -/* 23AAC 800486AC 4502002A */ bc1fl .L80048758 -/* 23AB0 800486B0 26B50008 */ addiu $s5, $s5, 8 -/* 23AB4 800486B4 0000802D */ daddu $s0, $zero, $zero -/* 23AB8 800486B8 8FA80020 */ lw $t0, 0x20($sp) -/* 23ABC 800486BC 44900000 */ mtc1 $s0, $f0 -/* 23AC0 800486C0 00000000 */ nop -/* 23AC4 800486C4 46800020 */ cvt.s.w $f0, $f0 -/* 23AC8 800486C8 01141021 */ addu $v0, $t0, $s4 -/* 23ACC 800486CC 01151821 */ addu $v1, $t0, $s5 -/* 23AD0 800486D0 84420032 */ lh $v0, 0x32($v0) -/* 23AD4 800486D4 84630032 */ lh $v1, 0x32($v1) -/* 23AD8 800486D8 4482B000 */ mtc1 $v0, $f22 -/* 23ADC 800486DC 00000000 */ nop -/* 23AE0 800486E0 4680B5A0 */ cvt.s.w $f22, $f22 -/* 23AE4 800486E4 4483A000 */ mtc1 $v1, $f20 -/* 23AE8 800486E8 00000000 */ nop -/* 23AEC 800486EC 4680A520 */ cvt.s.w $f20, $f20 -/* 23AF0 800486F0 4616003C */ c.lt.s $f0, $f22 -/* 23AF4 800486F4 00000000 */ nop -/* 23AF8 800486F8 4500001D */ bc1f .L80048770 -/* 23AFC 800486FC 461AA503 */ div.s $f20, $f20, $f26 -.L80048700: -/* 23B00 80048700 0C00A67F */ jal rand_int -/* 23B04 80048704 24040064 */ addiu $a0, $zero, 0x64 -/* 23B08 80048708 461CA082 */ mul.s $f2, $f20, $f28 -/* 23B0C 8004870C 00000000 */ nop -/* 23B10 80048710 44820000 */ mtc1 $v0, $f0 -/* 23B14 80048714 00000000 */ nop -/* 23B18 80048718 46800020 */ cvt.s.w $f0, $f0 -/* 23B1C 8004871C 4602003E */ c.le.s $f0, $f2 -/* 23B20 80048720 00000000 */ nop -/* 23B24 80048724 45030001 */ bc1tl .L8004872C -/* 23B28 80048728 26310001 */ addiu $s1, $s1, 1 -.L8004872C: -/* 23B2C 8004872C 26100001 */ addiu $s0, $s0, 1 -/* 23B30 80048730 44900000 */ mtc1 $s0, $f0 -/* 23B34 80048734 00000000 */ nop -/* 23B38 80048738 46800020 */ cvt.s.w $f0, $f0 -/* 23B3C 8004873C 4616003C */ c.lt.s $f0, $f22 -/* 23B40 80048740 00000000 */ nop -/* 23B44 80048744 4500000A */ bc1f .L80048770 -/* 23B48 80048748 00000000 */ nop -/* 23B4C 8004874C 080121C0 */ j .L80048700 -/* 23B50 80048750 00000000 */ nop -.L80048754: -/* 23B54 80048754 26B50008 */ addiu $s5, $s5, 8 -.L80048758: -/* 23B58 80048758 26940008 */ addiu $s4, $s4, 8 -/* 23B5C 8004875C 26730008 */ addiu $s3, $s3, 8 -/* 23B60 80048760 26520001 */ addiu $s2, $s2, 1 -/* 23B64 80048764 2A420008 */ slti $v0, $s2, 8 -/* 23B68 80048768 1440FFB9 */ bnez $v0, .L80048650 -/* 23B6C 8004876C 26100008 */ addiu $s0, $s0, 8 -.L80048770: -/* 23B70 80048770 0C03A752 */ jal is_ability_active -/* 23B74 80048774 2404002B */ addiu $a0, $zero, 0x2b -/* 23B78 80048778 10400005 */ beqz $v0, .L80048790 -/* 23B7C 8004877C 00000000 */ nop -/* 23B80 80048780 0C00A67F */ jal rand_int -/* 23B84 80048784 24040002 */ addiu $a0, $zero, 2 -/* 23B88 80048788 26230001 */ addiu $v1, $s1, 1 -/* 23B8C 8004878C 00628821 */ addu $s1, $v1, $v0 -.L80048790: -/* 23B90 80048790 8FA80098 */ lw $t0, 0x98($sp) -/* 23B94 80048794 8D020000 */ lw $v0, ($t0) -/* 23B98 80048798 3C030080 */ lui $v1, 0x80 -/* 23B9C 8004879C 00431024 */ and $v0, $v0, $v1 -/* 23BA0 800487A0 54400001 */ bnel $v0, $zero, .L800487A8 -/* 23BA4 800487A4 0000882D */ daddu $s1, $zero, $zero -.L800487A8: -/* 23BA8 800487A8 12200002 */ beqz $s1, .L800487B4 -/* 23BAC 800487AC 24080156 */ addiu $t0, $zero, 0x156 -/* 23BB0 800487B0 AFA80030 */ sw $t0, 0x30($sp) -.L800487B4: -/* 23BB4 800487B4 8FA80028 */ lw $t0, 0x28($sp) -/* 23BB8 800487B8 00111040 */ sll $v0, $s1, 1 -/* 23BBC 800487BC 0102102A */ slt $v0, $t0, $v0 -/* 23BC0 800487C0 10400004 */ beqz $v0, .L800487D4 -/* 23BC4 800487C4 000817C2 */ srl $v0, $t0, 0x1f -/* 23BC8 800487C8 01021021 */ addu $v0, $t0, $v0 -/* 23BCC 800487CC 00028843 */ sra $s1, $v0, 1 -/* 23BD0 800487D0 8FA80028 */ lw $t0, 0x28($sp) -.L800487D4: -/* 23BD4 800487D4 00111040 */ sll $v0, $s1, 1 -/* 23BD8 800487D8 01024023 */ subu $t0, $t0, $v0 -/* 23BDC 800487DC AFA80028 */ sw $t0, 0x28($sp) -/* 23BE0 800487E0 8FA8002C */ lw $t0, 0x2c($sp) -/* 23BE4 800487E4 0111102A */ slt $v0, $t0, $s1 -/* 23BE8 800487E8 54400002 */ bnel $v0, $zero, .L800487F4 -/* 23BEC 800487EC 0100882D */ daddu $s1, $t0, $zero -/* 23BF0 800487F0 8FA8002C */ lw $t0, 0x2c($sp) -.L800487F4: -/* 23BF4 800487F4 0000902D */ daddu $s2, $zero, $zero -/* 23BF8 800487F8 01114023 */ subu $t0, $t0, $s1 -/* 23BFC 800487FC 1A200029 */ blez $s1, .L800488A4 -/* 23C00 80048800 AFA8002C */ sw $t0, 0x2c($sp) -/* 23C04 80048804 24130004 */ addiu $s3, $zero, 4 -/* 23C08 80048808 3C01403E */ lui $at, 0x403e -/* 23C0C 8004880C 4481A800 */ mtc1 $at, $f21 -/* 23C10 80048810 4480A000 */ mtc1 $zero, $f20 -/* 23C14 80048814 00171840 */ sll $v1, $s7, 1 -/* 23C18 80048818 00771821 */ addu $v1, $v1, $s7 -/* 23C1C 8004881C 02631004 */ sllv $v0, $v1, $s3 -/* 23C20 80048820 00431023 */ subu $v0, $v0, $v1 -/* 23C24 80048824 000280C0 */ sll $s0, $v0, 3 -.L80048828: -/* 23C28 80048828 8FA50034 */ lw $a1, 0x34($sp) -/* 23C2C 8004882C 8FA60038 */ lw $a2, 0x38($sp) -/* 23C30 80048830 4407F000 */ mfc1 $a3, $f30 -/* 23C34 80048834 8FA40030 */ lw $a0, 0x30($sp) -/* 23C38 80048838 8FA80024 */ lw $t0, 0x24($sp) -/* 23C3C 8004883C 02D01021 */ addu $v0, $s6, $s0 -/* 23C40 80048840 AFB30010 */ sw $s3, 0x10($sp) -/* 23C44 80048844 AFA20018 */ sw $v0, 0x18($sp) -/* 23C48 80048848 AFA0001C */ sw $zero, 0x1c($sp) -/* 23C4C 8004884C 0C04C4FD */ jal make_item_entity -/* 23C50 80048850 AFA80014 */ sw $t0, 0x14($sp) -/* 23C54 80048854 44960000 */ mtc1 $s6, $f0 -/* 23C58 80048858 00000000 */ nop -/* 23C5C 8004885C 46800021 */ cvt.d.w $f0, $f0 -/* 23C60 80048860 27DE0001 */ addiu $fp, $fp, 1 -/* 23C64 80048864 2BC2000C */ slti $v0, $fp, 0xc -/* 23C68 80048868 8FA80024 */ lw $t0, 0x24($sp) -/* 23C6C 8004886C 46340000 */ add.d $f0, $f0, $f20 -/* 23C70 80048870 25080002 */ addiu $t0, $t0, 2 -/* 23C74 80048874 AFA80024 */ sw $t0, 0x24($sp) -/* 23C78 80048878 4620010D */ trunc.w.d $f4, $f0 -/* 23C7C 8004887C 44162000 */ mfc1 $s6, $f4 -/* 23C80 80048880 14400005 */ bnez $v0, .L80048898 -/* 23C84 80048884 26520001 */ addiu $s2, $s2, 1 -/* 23C88 80048888 0000F02D */ daddu $fp, $zero, $zero -/* 23C8C 8004888C 26100168 */ addiu $s0, $s0, 0x168 -/* 23C90 80048890 26F70001 */ addiu $s7, $s7, 1 -/* 23C94 80048894 0017B0C0 */ sll $s6, $s7, 3 -.L80048898: -/* 23C98 80048898 0251102A */ slt $v0, $s2, $s1 -/* 23C9C 8004889C 1440FFE2 */ bnez $v0, .L80048828 -/* 23CA0 800488A0 00000000 */ nop -.L800488A4: -/* 23CA4 800488A4 0000882D */ daddu $s1, $zero, $zero -/* 23CA8 800488A8 0220902D */ daddu $s2, $s1, $zero -/* 23CAC 800488AC 24150006 */ addiu $s5, $zero, 6 -/* 23CB0 800488B0 24140004 */ addiu $s4, $zero, 4 -/* 23CB4 800488B4 8FB00020 */ lw $s0, 0x20($sp) -/* 23CB8 800488B8 3C0146FF */ lui $at, 0x46ff -/* 23CBC 800488BC 3421FE00 */ ori $at, $at, 0xfe00 -/* 23CC0 800488C0 4481D000 */ mtc1 $at, $f26 -/* 23CC4 800488C4 3C0142C8 */ lui $at, 0x42c8 -/* 23CC8 800488C8 4481E000 */ mtc1 $at, $f28 -/* 23CCC 800488CC 3C028011 */ lui $v0, %hi(gPlayerData+0x5) -/* 23CD0 800488D0 8042F295 */ lb $v0, %lo(gPlayerData+0x5)($v0) -/* 23CD4 800488D4 3C038011 */ lui $v1, %hi(gPlayerData+0x6) -/* 23CD8 800488D8 8063F296 */ lb $v1, %lo(gPlayerData+0x6)($v1) -/* 23CDC 800488DC 24130002 */ addiu $s3, $zero, 2 -/* 23CE0 800488E0 AFA00030 */ sw $zero, 0x30($sp) -/* 23CE4 800488E4 44821000 */ mtc1 $v0, $f2 -/* 23CE8 800488E8 00000000 */ nop -/* 23CEC 800488EC 468010A0 */ cvt.s.w $f2, $f2 -/* 23CF0 800488F0 44830000 */ mtc1 $v1, $f0 -/* 23CF4 800488F4 00000000 */ nop -/* 23CF8 800488F8 46800020 */ cvt.s.w $f0, $f0 -/* 23CFC 800488FC 46001603 */ div.s $f24, $f2, $f0 -.L80048900: -/* 23D00 80048900 8FA80020 */ lw $t0, 0x20($sp) -/* 23D04 80048904 86030072 */ lh $v1, 0x72($s0) -/* 23D08 80048908 01131021 */ addu $v0, $t0, $s3 -/* 23D0C 8004890C 4483B000 */ mtc1 $v1, $f22 -/* 23D10 80048910 00000000 */ nop -/* 23D14 80048914 4680B5A0 */ cvt.s.w $f22, $f22 -/* 23D18 80048918 461AB583 */ div.s $f22, $f22, $f26 -/* 23D1C 8004891C 84420072 */ lh $v0, 0x72($v0) -/* 23D20 80048920 4616C03E */ c.le.s $f24, $f22 -/* 23D24 80048924 4482A000 */ mtc1 $v0, $f20 -/* 23D28 80048928 00000000 */ nop -/* 23D2C 8004892C 4680A520 */ cvt.s.w $f20, $f20 -/* 23D30 80048930 45000034 */ bc1f .L80048A04 -/* 23D34 80048934 461AA503 */ div.s $f20, $f20, $f26 -/* 23D38 80048938 0C00A67F */ jal rand_int -/* 23D3C 8004893C 24040064 */ addiu $a0, $zero, 0x64 -/* 23D40 80048940 461CA082 */ mul.s $f2, $f20, $f28 -/* 23D44 80048944 00000000 */ nop -/* 23D48 80048948 44820000 */ mtc1 $v0, $f0 -/* 23D4C 8004894C 00000000 */ nop -/* 23D50 80048950 46800020 */ cvt.s.w $f0, $f0 -/* 23D54 80048954 4602003E */ c.le.s $f0, $f2 -/* 23D58 80048958 00000000 */ nop -/* 23D5C 8004895C 4502002A */ bc1fl .L80048A08 -/* 23D60 80048960 26B50008 */ addiu $s5, $s5, 8 -/* 23D64 80048964 0000802D */ daddu $s0, $zero, $zero -/* 23D68 80048968 8FA80020 */ lw $t0, 0x20($sp) -/* 23D6C 8004896C 44900000 */ mtc1 $s0, $f0 -/* 23D70 80048970 00000000 */ nop -/* 23D74 80048974 46800020 */ cvt.s.w $f0, $f0 -/* 23D78 80048978 01141021 */ addu $v0, $t0, $s4 -/* 23D7C 8004897C 01151821 */ addu $v1, $t0, $s5 -/* 23D80 80048980 84420072 */ lh $v0, 0x72($v0) -/* 23D84 80048984 84630072 */ lh $v1, 0x72($v1) -/* 23D88 80048988 4482B000 */ mtc1 $v0, $f22 -/* 23D8C 8004898C 00000000 */ nop -/* 23D90 80048990 4680B5A0 */ cvt.s.w $f22, $f22 -/* 23D94 80048994 4483A000 */ mtc1 $v1, $f20 -/* 23D98 80048998 00000000 */ nop -/* 23D9C 8004899C 4680A520 */ cvt.s.w $f20, $f20 -/* 23DA0 800489A0 4616003C */ c.lt.s $f0, $f22 -/* 23DA4 800489A4 00000000 */ nop -/* 23DA8 800489A8 4500001D */ bc1f .L80048A20 -/* 23DAC 800489AC 461AA503 */ div.s $f20, $f20, $f26 -.L800489B0: -/* 23DB0 800489B0 0C00A67F */ jal rand_int -/* 23DB4 800489B4 24040064 */ addiu $a0, $zero, 0x64 -/* 23DB8 800489B8 461CA082 */ mul.s $f2, $f20, $f28 -/* 23DBC 800489BC 00000000 */ nop -/* 23DC0 800489C0 44820000 */ mtc1 $v0, $f0 -/* 23DC4 800489C4 00000000 */ nop -/* 23DC8 800489C8 46800020 */ cvt.s.w $f0, $f0 -/* 23DCC 800489CC 4602003E */ c.le.s $f0, $f2 -/* 23DD0 800489D0 00000000 */ nop -/* 23DD4 800489D4 45030001 */ bc1tl .L800489DC -/* 23DD8 800489D8 26310001 */ addiu $s1, $s1, 1 -.L800489DC: -/* 23DDC 800489DC 26100001 */ addiu $s0, $s0, 1 -/* 23DE0 800489E0 44900000 */ mtc1 $s0, $f0 -/* 23DE4 800489E4 00000000 */ nop -/* 23DE8 800489E8 46800020 */ cvt.s.w $f0, $f0 -/* 23DEC 800489EC 4616003C */ c.lt.s $f0, $f22 -/* 23DF0 800489F0 00000000 */ nop -/* 23DF4 800489F4 4500000A */ bc1f .L80048A20 -/* 23DF8 800489F8 00000000 */ nop -/* 23DFC 800489FC 0801226C */ j .L800489B0 -/* 23E00 80048A00 00000000 */ nop -.L80048A04: -/* 23E04 80048A04 26B50008 */ addiu $s5, $s5, 8 -.L80048A08: -/* 23E08 80048A08 26940008 */ addiu $s4, $s4, 8 -/* 23E0C 80048A0C 26730008 */ addiu $s3, $s3, 8 -/* 23E10 80048A10 26520001 */ addiu $s2, $s2, 1 -/* 23E14 80048A14 2A420008 */ slti $v0, $s2, 8 -/* 23E18 80048A18 1440FFB9 */ bnez $v0, .L80048900 -/* 23E1C 80048A1C 26100008 */ addiu $s0, $s0, 8 -.L80048A20: -/* 23E20 80048A20 0C03A752 */ jal is_ability_active -/* 23E24 80048A24 2404002C */ addiu $a0, $zero, 0x2c -/* 23E28 80048A28 10400005 */ beqz $v0, .L80048A40 -/* 23E2C 80048A2C 00000000 */ nop -/* 23E30 80048A30 0C00A67F */ jal rand_int -/* 23E34 80048A34 24040002 */ addiu $a0, $zero, 2 -/* 23E38 80048A38 26230001 */ addiu $v1, $s1, 1 -/* 23E3C 80048A3C 00628821 */ addu $s1, $v1, $v0 -.L80048A40: -/* 23E40 80048A40 8FA80098 */ lw $t0, 0x98($sp) -/* 23E44 80048A44 8D020000 */ lw $v0, ($t0) -/* 23E48 80048A48 3C030080 */ lui $v1, 0x80 -/* 23E4C 80048A4C 00431024 */ and $v0, $v0, $v1 -/* 23E50 80048A50 54400001 */ bnel $v0, $zero, .L80048A58 -/* 23E54 80048A54 0000882D */ daddu $s1, $zero, $zero -.L80048A58: -/* 23E58 80048A58 12200002 */ beqz $s1, .L80048A64 -/* 23E5C 80048A5C 2408015B */ addiu $t0, $zero, 0x15b -/* 23E60 80048A60 AFA80030 */ sw $t0, 0x30($sp) -.L80048A64: -/* 23E64 80048A64 8FA80028 */ lw $t0, 0x28($sp) -/* 23E68 80048A68 00111040 */ sll $v0, $s1, 1 -/* 23E6C 80048A6C 0102102A */ slt $v0, $t0, $v0 -/* 23E70 80048A70 10400004 */ beqz $v0, .L80048A84 -/* 23E74 80048A74 000817C2 */ srl $v0, $t0, 0x1f -/* 23E78 80048A78 01021021 */ addu $v0, $t0, $v0 -/* 23E7C 80048A7C 00028843 */ sra $s1, $v0, 1 -/* 23E80 80048A80 8FA80028 */ lw $t0, 0x28($sp) -.L80048A84: -/* 23E84 80048A84 00111040 */ sll $v0, $s1, 1 -/* 23E88 80048A88 01024023 */ subu $t0, $t0, $v0 -/* 23E8C 80048A8C AFA80028 */ sw $t0, 0x28($sp) -/* 23E90 80048A90 8FA8002C */ lw $t0, 0x2c($sp) -/* 23E94 80048A94 0111102A */ slt $v0, $t0, $s1 -/* 23E98 80048A98 54400002 */ bnel $v0, $zero, .L80048AA4 -/* 23E9C 80048A9C 0100882D */ daddu $s1, $t0, $zero -/* 23EA0 80048AA0 8FA8002C */ lw $t0, 0x2c($sp) -.L80048AA4: -/* 23EA4 80048AA4 0000902D */ daddu $s2, $zero, $zero -/* 23EA8 80048AA8 01114023 */ subu $t0, $t0, $s1 -/* 23EAC 80048AAC 1A200029 */ blez $s1, .L80048B54 -/* 23EB0 80048AB0 AFA8002C */ sw $t0, 0x2c($sp) -/* 23EB4 80048AB4 24130004 */ addiu $s3, $zero, 4 -/* 23EB8 80048AB8 3C01403E */ lui $at, 0x403e -/* 23EBC 80048ABC 4481A800 */ mtc1 $at, $f21 -/* 23EC0 80048AC0 4480A000 */ mtc1 $zero, $f20 -/* 23EC4 80048AC4 00171840 */ sll $v1, $s7, 1 -/* 23EC8 80048AC8 00771821 */ addu $v1, $v1, $s7 -/* 23ECC 80048ACC 02631004 */ sllv $v0, $v1, $s3 -/* 23ED0 80048AD0 00431023 */ subu $v0, $v0, $v1 -/* 23ED4 80048AD4 000280C0 */ sll $s0, $v0, 3 -.L80048AD8: -/* 23ED8 80048AD8 8FA50034 */ lw $a1, 0x34($sp) -/* 23EDC 80048ADC 8FA60038 */ lw $a2, 0x38($sp) -/* 23EE0 80048AE0 4407F000 */ mfc1 $a3, $f30 -/* 23EE4 80048AE4 8FA40030 */ lw $a0, 0x30($sp) -/* 23EE8 80048AE8 8FA80024 */ lw $t0, 0x24($sp) -/* 23EEC 80048AEC 02D01021 */ addu $v0, $s6, $s0 -/* 23EF0 80048AF0 AFB30010 */ sw $s3, 0x10($sp) -/* 23EF4 80048AF4 AFA20018 */ sw $v0, 0x18($sp) -/* 23EF8 80048AF8 AFA0001C */ sw $zero, 0x1c($sp) -/* 23EFC 80048AFC 0C04C4FD */ jal make_item_entity -/* 23F00 80048B00 AFA80014 */ sw $t0, 0x14($sp) -/* 23F04 80048B04 44960000 */ mtc1 $s6, $f0 -/* 23F08 80048B08 00000000 */ nop -/* 23F0C 80048B0C 46800021 */ cvt.d.w $f0, $f0 -/* 23F10 80048B10 27DE0001 */ addiu $fp, $fp, 1 -/* 23F14 80048B14 2BC2000C */ slti $v0, $fp, 0xc -/* 23F18 80048B18 8FA80024 */ lw $t0, 0x24($sp) -/* 23F1C 80048B1C 46340000 */ add.d $f0, $f0, $f20 -/* 23F20 80048B20 25080002 */ addiu $t0, $t0, 2 -/* 23F24 80048B24 AFA80024 */ sw $t0, 0x24($sp) -/* 23F28 80048B28 4620010D */ trunc.w.d $f4, $f0 -/* 23F2C 80048B2C 44162000 */ mfc1 $s6, $f4 -/* 23F30 80048B30 14400005 */ bnez $v0, .L80048B48 -/* 23F34 80048B34 26520001 */ addiu $s2, $s2, 1 -/* 23F38 80048B38 0000F02D */ daddu $fp, $zero, $zero -/* 23F3C 80048B3C 26100168 */ addiu $s0, $s0, 0x168 -/* 23F40 80048B40 26F70001 */ addiu $s7, $s7, 1 -/* 23F44 80048B44 0017B0C0 */ sll $s6, $s7, 3 -.L80048B48: -/* 23F48 80048B48 0251102A */ slt $v0, $s2, $s1 -/* 23F4C 80048B4C 1440FFE2 */ bnez $v0, .L80048AD8 -/* 23F50 80048B50 00000000 */ nop -.L80048B54: -/* 23F54 80048B54 24080157 */ addiu $t0, $zero, 0x157 -/* 23F58 80048B58 AFA80030 */ sw $t0, 0x30($sp) -/* 23F5C 80048B5C 8FA80020 */ lw $t0, 0x20($sp) -/* 23F60 80048B60 851000B2 */ lh $s0, 0xb2($t0) -/* 23F64 80048B64 850400B4 */ lh $a0, 0xb4($t0) -/* 23F68 80048B68 0090102A */ slt $v0, $a0, $s0 -/* 23F6C 80048B6C 10400003 */ beqz $v0, .L80048B7C -/* 23F70 80048B70 0200882D */ daddu $s1, $s0, $zero -/* 23F74 80048B74 0080802D */ daddu $s0, $a0, $zero -/* 23F78 80048B78 0220202D */ daddu $a0, $s1, $zero -.L80048B7C: -/* 23F7C 80048B7C 06010003 */ bgez $s0, .L80048B8C -/* 23F80 80048B80 00908823 */ subu $s1, $a0, $s0 -/* 23F84 80048B84 080122E5 */ j .L80048B94 -/* 23F88 80048B88 00902023 */ subu $a0, $a0, $s0 -.L80048B8C: -/* 23F8C 80048B8C 12200005 */ beqz $s1, .L80048BA4 -/* 23F90 80048B90 0220202D */ daddu $a0, $s1, $zero -.L80048B94: -/* 23F94 80048B94 0C00A67F */ jal rand_int -/* 23F98 80048B98 00000000 */ nop -/* 23F9C 80048B9C 080122EA */ j .L80048BA8 -/* 23FA0 80048BA0 00508821 */ addu $s1, $v0, $s0 -.L80048BA4: -/* 23FA4 80048BA4 0200882D */ daddu $s1, $s0, $zero -.L80048BA8: -/* 23FA8 80048BA8 06220001 */ bltzl $s1, .L80048BB0 -/* 23FAC 80048BAC 0000882D */ daddu $s1, $zero, $zero -.L80048BB0: -/* 23FB0 80048BB0 3C02800B */ lui $v0, %hi(gCurrentEncounter+0xE) -/* 23FB4 80048BB4 84420F1E */ lh $v0, %lo(gCurrentEncounter+0xE)($v0) -/* 23FB8 80048BB8 24040019 */ addiu $a0, $zero, 0x19 -/* 23FBC 80048BBC 0C03A752 */ jal is_ability_active -/* 23FC0 80048BC0 02228821 */ addu $s1, $s1, $v0 -/* 23FC4 80048BC4 10400007 */ beqz $v0, .L80048BE4 -/* 23FC8 80048BC8 00000000 */ nop -/* 23FCC 80048BCC 3C02800B */ lui $v0, %hi(gCurrentEncounter+0xC) -/* 23FD0 80048BD0 90420F1C */ lbu $v0, %lo(gCurrentEncounter+0xC)($v0) -/* 23FD4 80048BD4 3C01800B */ lui $at, %hi(gCurrentEncounter+0xC) -/* 23FD8 80048BD8 A0200F1C */ sb $zero, %lo(gCurrentEncounter+0xC)($at) -/* 23FDC 80048BDC 00021042 */ srl $v0, $v0, 1 -/* 23FE0 80048BE0 02228821 */ addu $s1, $s1, $v0 -.L80048BE4: -/* 23FE4 80048BE4 3C02800B */ lui $v0, %hi(gCurrentEncounter+0xB) -/* 23FE8 80048BE8 80420F1B */ lb $v0, %lo(gCurrentEncounter+0xB)($v0) -/* 23FEC 80048BEC 10400004 */ beqz $v0, .L80048C00 -/* 23FF0 80048BF0 00111040 */ sll $v0, $s1, 1 -/* 23FF4 80048BF4 3C01800B */ lui $at, %hi(gCurrentEncounter+0xB) -/* 23FF8 80048BF8 A0200F1B */ sb $zero, %lo(gCurrentEncounter+0xB)($at) -/* 23FFC 80048BFC 02228821 */ addu $s1, $s1, $v0 -.L80048C00: -/* 24000 80048C00 0C03A752 */ jal is_ability_active -/* 24004 80048C04 24040010 */ addiu $a0, $zero, 0x10 -/* 24008 80048C08 54400001 */ bnel $v0, $zero, .L80048C10 -/* 2400C 80048C0C 00118840 */ sll $s1, $s1, 1 -.L80048C10: -/* 24010 80048C10 2A220015 */ slti $v0, $s1, 0x15 -/* 24014 80048C14 50400001 */ beql $v0, $zero, .L80048C1C -/* 24018 80048C18 24110014 */ addiu $s1, $zero, 0x14 -.L80048C1C: -/* 2401C 80048C1C 8FA80098 */ lw $t0, 0x98($sp) -/* 24020 80048C20 8D020000 */ lw $v0, ($t0) -/* 24024 80048C24 3C030080 */ lui $v1, 0x80 -/* 24028 80048C28 00431024 */ and $v0, $v0, $v1 -/* 2402C 80048C2C 54400001 */ bnel $v0, $zero, .L80048C34 -/* 24030 80048C30 0000882D */ daddu $s1, $zero, $zero -.L80048C34: -/* 24034 80048C34 8FA80028 */ lw $t0, 0x28($sp) -/* 24038 80048C38 00111040 */ sll $v0, $s1, 1 -/* 2403C 80048C3C 0102102A */ slt $v0, $t0, $v0 -/* 24040 80048C40 10400003 */ beqz $v0, .L80048C50 -/* 24044 80048C44 000817C2 */ srl $v0, $t0, 0x1f -/* 24048 80048C48 01021021 */ addu $v0, $t0, $v0 -/* 2404C 80048C4C 00028843 */ sra $s1, $v0, 1 -.L80048C50: -/* 24050 80048C50 8FA8002C */ lw $t0, 0x2c($sp) -/* 24054 80048C54 0111102A */ slt $v0, $t0, $s1 -/* 24058 80048C58 54400001 */ bnel $v0, $zero, .L80048C60 -/* 2405C 80048C5C 0100882D */ daddu $s1, $t0, $zero -.L80048C60: -/* 24060 80048C60 1A200029 */ blez $s1, .L80048D08 -/* 24064 80048C64 0000902D */ daddu $s2, $zero, $zero -/* 24068 80048C68 24130004 */ addiu $s3, $zero, 4 -/* 2406C 80048C6C 3C01403E */ lui $at, 0x403e -/* 24070 80048C70 4481A800 */ mtc1 $at, $f21 -/* 24074 80048C74 4480A000 */ mtc1 $zero, $f20 -/* 24078 80048C78 00171840 */ sll $v1, $s7, 1 -/* 2407C 80048C7C 00771821 */ addu $v1, $v1, $s7 -/* 24080 80048C80 02631004 */ sllv $v0, $v1, $s3 -/* 24084 80048C84 00431023 */ subu $v0, $v0, $v1 -/* 24088 80048C88 000280C0 */ sll $s0, $v0, 3 -.L80048C8C: -/* 2408C 80048C8C 8FA50034 */ lw $a1, 0x34($sp) -/* 24090 80048C90 8FA60038 */ lw $a2, 0x38($sp) -/* 24094 80048C94 4407F000 */ mfc1 $a3, $f30 -/* 24098 80048C98 8FA40030 */ lw $a0, 0x30($sp) -/* 2409C 80048C9C 8FA80024 */ lw $t0, 0x24($sp) -/* 240A0 80048CA0 02D01021 */ addu $v0, $s6, $s0 -/* 240A4 80048CA4 AFB30010 */ sw $s3, 0x10($sp) -/* 240A8 80048CA8 AFA20018 */ sw $v0, 0x18($sp) -/* 240AC 80048CAC AFA0001C */ sw $zero, 0x1c($sp) -/* 240B0 80048CB0 0C04C4FD */ jal make_item_entity -/* 240B4 80048CB4 AFA80014 */ sw $t0, 0x14($sp) -/* 240B8 80048CB8 44960000 */ mtc1 $s6, $f0 -/* 240BC 80048CBC 00000000 */ nop -/* 240C0 80048CC0 46800021 */ cvt.d.w $f0, $f0 -/* 240C4 80048CC4 27DE0001 */ addiu $fp, $fp, 1 -/* 240C8 80048CC8 2BC2000C */ slti $v0, $fp, 0xc -/* 240CC 80048CCC 8FA80024 */ lw $t0, 0x24($sp) -/* 240D0 80048CD0 46340000 */ add.d $f0, $f0, $f20 -/* 240D4 80048CD4 25080002 */ addiu $t0, $t0, 2 -/* 240D8 80048CD8 AFA80024 */ sw $t0, 0x24($sp) -/* 240DC 80048CDC 4620010D */ trunc.w.d $f4, $f0 -/* 240E0 80048CE0 44162000 */ mfc1 $s6, $f4 -/* 240E4 80048CE4 14400005 */ bnez $v0, .L80048CFC -/* 240E8 80048CE8 26520001 */ addiu $s2, $s2, 1 -/* 240EC 80048CEC 0000F02D */ daddu $fp, $zero, $zero -/* 240F0 80048CF0 26100168 */ addiu $s0, $s0, 0x168 -/* 240F4 80048CF4 26F70001 */ addiu $s7, $s7, 1 -/* 240F8 80048CF8 0017B0C0 */ sll $s6, $s7, 3 -.L80048CFC: -/* 240FC 80048CFC 0251102A */ slt $v0, $s2, $s1 -/* 24100 80048D00 1440FFE2 */ bnez $v0, .L80048C8C -/* 24104 80048D04 00000000 */ nop -.L80048D08: -/* 24108 80048D08 8FBF0064 */ lw $ra, 0x64($sp) -/* 2410C 80048D0C 8FBE0060 */ lw $fp, 0x60($sp) -/* 24110 80048D10 8FB7005C */ lw $s7, 0x5c($sp) -/* 24114 80048D14 8FB60058 */ lw $s6, 0x58($sp) -/* 24118 80048D18 8FB50054 */ lw $s5, 0x54($sp) -/* 2411C 80048D1C 8FB40050 */ lw $s4, 0x50($sp) -/* 24120 80048D20 8FB3004C */ lw $s3, 0x4c($sp) -/* 24124 80048D24 8FB20048 */ lw $s2, 0x48($sp) -/* 24128 80048D28 8FB10044 */ lw $s1, 0x44($sp) -/* 2412C 80048D2C 8FB00040 */ lw $s0, 0x40($sp) -/* 24130 80048D30 D7BE0090 */ ldc1 $f30, 0x90($sp) -/* 24134 80048D34 D7BC0088 */ ldc1 $f28, 0x88($sp) -/* 24138 80048D38 D7BA0080 */ ldc1 $f26, 0x80($sp) -/* 2413C 80048D3C D7B80078 */ ldc1 $f24, 0x78($sp) -/* 24140 80048D40 D7B60070 */ ldc1 $f22, 0x70($sp) -/* 24144 80048D44 D7B40068 */ ldc1 $f20, 0x68($sp) -/* 24148 80048D48 03E00008 */ jr $ra -/* 2414C 80048D4C 27BD0098 */ addiu $sp, $sp, 0x98 diff --git a/ver/us/asm/nonmatchings/80850_len_3060/is_ability_active.s b/ver/us/asm/nonmatchings/80850_len_3060/is_ability_active.s deleted file mode 100644 index 221d54ccb2..0000000000 --- a/ver/us/asm/nonmatchings/80850_len_3060/is_ability_active.s +++ /dev/null @@ -1,299 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -.section .rodata - -dlabel jtbl_8010BF60 -.word .L800E9DEC, .L800EA07C, .L800E9DF4, .L800E9DFC, .L800E9E04, .L800E9E0C, .L800E9E14, .L800E9E34, .L800E9E3C, .L800E9E44, .L800E9E4C, .L800E9E54, .L800E9E5C, .L800E9E64, .L800E9E6C, .L800E9E74, .L800E9F38, .L800E9F40, .L800E9F48, .L800E9F50, .L800E9F58, .L800E9F60, .L800E9F68, .L800E9F70, .L800E9F78, .L800E9F80, .L800EA008, .L800E9F88, .L800E9F90, .L800E9F98, .L800E9FA0, .L800E9FA8, .L800E9FB0, .L800E9FB8, .L800E9FC0, .L800E9FC8, .L800E9FD0, .L800E9FD8, .L800E9FE0, .L800E9FE8, .L800E9FF0, .L800E9FF8, .L800EA000, .L800EA010, .L800EA018, .L800EA020, .L800EA028, .L800EA030, .L800EA038, .L800EA040, .L800EA048, .L800EA050, .L800EA058, .L800EA060, .L800EA068, .L800EA070 - -.section .text - -glabel is_ability_active -/* 831F8 800E9D48 27BDFFD0 */ addiu $sp, $sp, -0x30 -/* 831FC 800E9D4C AFBF0028 */ sw $ra, 0x28($sp) -/* 83200 800E9D50 0080482D */ daddu $t1, $a0, $zero -/* 83204 800E9D54 3C088011 */ lui $t0, %hi(gPlayerData) -/* 83208 800E9D58 2508F290 */ addiu $t0, $t0, %lo(gPlayerData) -/* 8320C 800E9D5C 0000282D */ daddu $a1, $zero, $zero -/* 83210 800E9D60 00A0202D */ daddu $a0, $a1, $zero -/* 83214 800E9D64 24070005 */ addiu $a3, $zero, 5 -/* 83218 800E9D68 27A20024 */ addiu $v0, $sp, 0x24 -.L800E9D6C: -/* 8321C 800E9D6C AC400000 */ sw $zero, ($v0) -/* 83220 800E9D70 24E7FFFF */ addiu $a3, $a3, -1 -/* 83224 800E9D74 04E1FFFD */ bgez $a3, .L800E9D6C -/* 83228 800E9D78 2442FFFC */ addiu $v0, $v0, -4 -/* 8322C 800E9D7C 3C028007 */ lui $v0, %hi(gGameStatusPtr) -/* 83230 800E9D80 8C42419C */ lw $v0, %lo(gGameStatusPtr)($v0) -/* 83234 800E9D84 9042007E */ lbu $v0, 0x7e($v0) -/* 83238 800E9D88 30420001 */ andi $v0, $v0, 1 -/* 8323C 800E9D8C 144000C7 */ bnez $v0, .L800EA0AC -/* 83240 800E9D90 0000102D */ daddu $v0, $zero, $zero -/* 83244 800E9D94 0000382D */ daddu $a3, $zero, $zero -/* 83248 800E9D98 3C038011 */ lui $v1, %hi(jtbl_8010BF60) -/* 8324C 800E9D9C 2463BF60 */ addiu $v1, $v1, %lo(jtbl_8010BF60) -/* 83250 800E9DA0 00091080 */ sll $v0, $t1, 2 -/* 83254 800E9DA4 00435021 */ addu $t2, $v0, $v1 -/* 83258 800E9DA8 27A30010 */ addiu $v1, $sp, 0x10 -/* 8325C 800E9DAC 00041080 */ sll $v0, $a0, 2 -/* 83260 800E9DB0 00433021 */ addu $a2, $v0, $v1 -/* 83264 800E9DB4 00071040 */ sll $v0, $a3, 1 -.L800E9DB8: -/* 83268 800E9DB8 01021021 */ addu $v0, $t0, $v0 -/* 8326C 800E9DBC 84430208 */ lh $v1, 0x208($v0) -/* 83270 800E9DC0 10600004 */ beqz $v1, .L800E9DD4 -/* 83274 800E9DC4 00031140 */ sll $v0, $v1, 5 -/* 83278 800E9DC8 3C038008 */ lui $v1, %hi(gItemTable+0x1A) -/* 8327C 800E9DCC 00621821 */ addu $v1, $v1, $v0 -/* 83280 800E9DD0 906378FA */ lbu $v1, %lo(gItemTable+0x1A)($v1) -.L800E9DD4: -/* 83284 800E9DD4 2D220038 */ sltiu $v0, $t1, 0x38 -/* 83288 800E9DD8 504000A9 */ beql $v0, $zero, .L800EA080 -/* 8328C 800E9DDC 24E70001 */ addiu $a3, $a3, 1 -/* 83290 800E9DE0 8D420000 */ lw $v0, ($t2) -/* 83294 800E9DE4 00400008 */ jr $v0 -/* 83298 800E9DE8 00000000 */ nop -.L800E9DEC: -/* 8329C 800E9DEC 0803A81D */ j .L800EA074 -/* 832A0 800E9DF0 2402004C */ addiu $v0, $zero, 0x4c -.L800E9DF4: -/* 832A4 800E9DF4 0803A81D */ j .L800EA074 -/* 832A8 800E9DF8 24020040 */ addiu $v0, $zero, 0x40 -.L800E9DFC: -/* 832AC 800E9DFC 0803A81D */ j .L800EA074 -/* 832B0 800E9E00 2402004D */ addiu $v0, $zero, 0x4d -.L800E9E04: -/* 832B4 800E9E04 0803A81D */ j .L800EA074 -/* 832B8 800E9E08 24020052 */ addiu $v0, $zero, 0x52 -.L800E9E0C: -/* 832BC 800E9E0C 0803A81D */ j .L800EA074 -/* 832C0 800E9E10 24020035 */ addiu $v0, $zero, 0x35 -.L800E9E14: -/* 832C4 800E9E14 24020053 */ addiu $v0, $zero, 0x53 -/* 832C8 800E9E18 50620001 */ beql $v1, $v0, .L800E9E20 -/* 832CC 800E9E1C 24A50001 */ addiu $a1, $a1, 1 -.L800E9E20: -/* 832D0 800E9E20 8102000A */ lb $v0, 0xa($t0) -/* 832D4 800E9E24 50400096 */ beql $v0, $zero, .L800EA080 -/* 832D8 800E9E28 24E70001 */ addiu $a3, $a3, 1 -/* 832DC 800E9E2C 0803A81F */ j .L800EA07C -/* 832E0 800E9E30 24A50001 */ addiu $a1, $a1, 1 -.L800E9E34: -/* 832E4 800E9E34 0803A81D */ j .L800EA074 -/* 832E8 800E9E38 24020041 */ addiu $v0, $zero, 0x41 -.L800E9E3C: -/* 832EC 800E9E3C 0803A81D */ j .L800EA074 -/* 832F0 800E9E40 24020042 */ addiu $v0, $zero, 0x42 -.L800E9E44: -/* 832F4 800E9E44 0803A81D */ j .L800EA074 -/* 832F8 800E9E48 2402005A */ addiu $v0, $zero, 0x5a -.L800E9E4C: -/* 832FC 800E9E4C 0803A81D */ j .L800EA074 -/* 83300 800E9E50 2402003C */ addiu $v0, $zero, 0x3c -.L800E9E54: -/* 83304 800E9E54 0803A81D */ j .L800EA074 -/* 83308 800E9E58 2402004E */ addiu $v0, $zero, 0x4e -.L800E9E5C: -/* 8330C 800E9E5C 0803A81D */ j .L800EA074 -/* 83310 800E9E60 2402005B */ addiu $v0, $zero, 0x5b -.L800E9E64: -/* 83314 800E9E64 0803A81D */ j .L800EA074 -/* 83318 800E9E68 2402003D */ addiu $v0, $zero, 0x3d -.L800E9E6C: -/* 8331C 800E9E6C 0803A81D */ j .L800EA074 -/* 83320 800E9E70 24020043 */ addiu $v0, $zero, 0x43 -.L800E9E74: -/* 83324 800E9E74 24020054 */ addiu $v0, $zero, 0x54 -/* 83328 800E9E78 14620007 */ bne $v1, $v0, .L800E9E98 -/* 8332C 800E9E7C 24020055 */ addiu $v0, $zero, 0x55 -/* 83330 800E9E80 24020001 */ addiu $v0, $zero, 1 -/* 83334 800E9E84 ACC20000 */ sw $v0, ($a2) -/* 83338 800E9E88 24C60004 */ addiu $a2, $a2, 4 -/* 8333C 800E9E8C 00822021 */ addu $a0, $a0, $v0 -/* 83340 800E9E90 2405FFFF */ addiu $a1, $zero, -1 -/* 83344 800E9E94 24020055 */ addiu $v0, $zero, 0x55 -.L800E9E98: -/* 83348 800E9E98 14620007 */ bne $v1, $v0, .L800E9EB8 -/* 8334C 800E9E9C 24020056 */ addiu $v0, $zero, 0x56 -/* 83350 800E9EA0 24020002 */ addiu $v0, $zero, 2 -/* 83354 800E9EA4 ACC20000 */ sw $v0, ($a2) -/* 83358 800E9EA8 24C60004 */ addiu $a2, $a2, 4 -/* 8335C 800E9EAC 24840001 */ addiu $a0, $a0, 1 -/* 83360 800E9EB0 2405FFFF */ addiu $a1, $zero, -1 -/* 83364 800E9EB4 24020056 */ addiu $v0, $zero, 0x56 -.L800E9EB8: -/* 83368 800E9EB8 14620007 */ bne $v1, $v0, .L800E9ED8 -/* 8336C 800E9EBC 24020057 */ addiu $v0, $zero, 0x57 -/* 83370 800E9EC0 24020003 */ addiu $v0, $zero, 3 -/* 83374 800E9EC4 ACC20000 */ sw $v0, ($a2) -/* 83378 800E9EC8 24C60004 */ addiu $a2, $a2, 4 -/* 8337C 800E9ECC 24840001 */ addiu $a0, $a0, 1 -/* 83380 800E9ED0 2405FFFF */ addiu $a1, $zero, -1 -/* 83384 800E9ED4 24020057 */ addiu $v0, $zero, 0x57 -.L800E9ED8: -/* 83388 800E9ED8 14620007 */ bne $v1, $v0, .L800E9EF8 -/* 8338C 800E9EDC 24020058 */ addiu $v0, $zero, 0x58 -/* 83390 800E9EE0 24020004 */ addiu $v0, $zero, 4 -/* 83394 800E9EE4 ACC20000 */ sw $v0, ($a2) -/* 83398 800E9EE8 00C23021 */ addu $a2, $a2, $v0 -/* 8339C 800E9EEC 24840001 */ addiu $a0, $a0, 1 -/* 833A0 800E9EF0 2405FFFF */ addiu $a1, $zero, -1 -/* 833A4 800E9EF4 24020058 */ addiu $v0, $zero, 0x58 -.L800E9EF8: -/* 833A8 800E9EF8 14620007 */ bne $v1, $v0, .L800E9F18 -/* 833AC 800E9EFC 24020059 */ addiu $v0, $zero, 0x59 -/* 833B0 800E9F00 24020005 */ addiu $v0, $zero, 5 -/* 833B4 800E9F04 ACC20000 */ sw $v0, ($a2) -/* 833B8 800E9F08 24C60004 */ addiu $a2, $a2, 4 -/* 833BC 800E9F0C 24840001 */ addiu $a0, $a0, 1 -/* 833C0 800E9F10 2405FFFF */ addiu $a1, $zero, -1 -/* 833C4 800E9F14 24020059 */ addiu $v0, $zero, 0x59 -.L800E9F18: -/* 833C8 800E9F18 54620059 */ bnel $v1, $v0, .L800EA080 -/* 833CC 800E9F1C 24E70001 */ addiu $a3, $a3, 1 -/* 833D0 800E9F20 24020006 */ addiu $v0, $zero, 6 -/* 833D4 800E9F24 ACC20000 */ sw $v0, ($a2) -/* 833D8 800E9F28 24C60004 */ addiu $a2, $a2, 4 -/* 833DC 800E9F2C 24840001 */ addiu $a0, $a0, 1 -/* 833E0 800E9F30 0803A81F */ j .L800EA07C -/* 833E4 800E9F34 2405FFFF */ addiu $a1, $zero, -1 -.L800E9F38: -/* 833E8 800E9F38 0803A81D */ j .L800EA074 -/* 833EC 800E9F3C 2402005C */ addiu $v0, $zero, 0x5c -.L800E9F40: -/* 833F0 800E9F40 0803A81D */ j .L800EA074 -/* 833F4 800E9F44 2402005D */ addiu $v0, $zero, 0x5d -.L800E9F48: -/* 833F8 800E9F48 0803A81D */ j .L800EA074 -/* 833FC 800E9F4C 2402005E */ addiu $v0, $zero, 0x5e -.L800E9F50: -/* 83400 800E9F50 0803A81D */ j .L800EA074 -/* 83404 800E9F54 24020044 */ addiu $v0, $zero, 0x44 -.L800E9F58: -/* 83408 800E9F58 0803A81D */ j .L800EA074 -/* 8340C 800E9F5C 2402005F */ addiu $v0, $zero, 0x5f -.L800E9F60: -/* 83410 800E9F60 0803A81D */ j .L800EA074 -/* 83414 800E9F64 24020060 */ addiu $v0, $zero, 0x60 -.L800E9F68: -/* 83418 800E9F68 0803A81D */ j .L800EA074 -/* 8341C 800E9F6C 2402004F */ addiu $v0, $zero, 0x4f -.L800E9F70: -/* 83420 800E9F70 0803A81D */ j .L800EA074 -/* 83424 800E9F74 24020061 */ addiu $v0, $zero, 0x61 -.L800E9F78: -/* 83428 800E9F78 0803A81D */ j .L800EA074 -/* 8342C 800E9F7C 24020062 */ addiu $v0, $zero, 0x62 -.L800E9F80: -/* 83430 800E9F80 0803A81D */ j .L800EA074 -/* 83434 800E9F84 24020063 */ addiu $v0, $zero, 0x63 -.L800E9F88: -/* 83438 800E9F88 0803A81D */ j .L800EA074 -/* 8343C 800E9F8C 24020045 */ addiu $v0, $zero, 0x45 -.L800E9F90: -/* 83440 800E9F90 0803A81D */ j .L800EA074 -/* 83444 800E9F94 2402003B */ addiu $v0, $zero, 0x3b -.L800E9F98: -/* 83448 800E9F98 0803A81D */ j .L800EA074 -/* 8344C 800E9F9C 2402006E */ addiu $v0, $zero, 0x6e -.L800E9FA0: -/* 83450 800E9FA0 0803A81D */ j .L800EA074 -/* 83454 800E9FA4 24020064 */ addiu $v0, $zero, 0x64 -.L800E9FA8: -/* 83458 800E9FA8 0803A81D */ j .L800EA074 -/* 8345C 800E9FAC 24020065 */ addiu $v0, $zero, 0x65 -.L800E9FB0: -/* 83460 800E9FB0 0803A81D */ j .L800EA074 -/* 83464 800E9FB4 24020046 */ addiu $v0, $zero, 0x46 -.L800E9FB8: -/* 83468 800E9FB8 0803A81D */ j .L800EA074 -/* 8346C 800E9FBC 24020047 */ addiu $v0, $zero, 0x47 -.L800E9FC0: -/* 83470 800E9FC0 0803A81D */ j .L800EA074 -/* 83474 800E9FC4 2402003E */ addiu $v0, $zero, 0x3e -.L800E9FC8: -/* 83478 800E9FC8 0803A81D */ j .L800EA074 -/* 8347C 800E9FCC 24020048 */ addiu $v0, $zero, 0x48 -.L800E9FD0: -/* 83480 800E9FD0 0803A81D */ j .L800EA074 -/* 83484 800E9FD4 24020066 */ addiu $v0, $zero, 0x66 -.L800E9FD8: -/* 83488 800E9FD8 0803A81D */ j .L800EA074 -/* 8348C 800E9FDC 24020049 */ addiu $v0, $zero, 0x49 -.L800E9FE0: -/* 83490 800E9FE0 0803A81D */ j .L800EA074 -/* 83494 800E9FE4 24020067 */ addiu $v0, $zero, 0x67 -.L800E9FE8: -/* 83498 800E9FE8 0803A81D */ j .L800EA074 -/* 8349C 800E9FEC 2402006D */ addiu $v0, $zero, 0x6d -.L800E9FF0: -/* 834A0 800E9FF0 0803A81D */ j .L800EA074 -/* 834A4 800E9FF4 2402006A */ addiu $v0, $zero, 0x6a -.L800E9FF8: -/* 834A8 800E9FF8 0803A81D */ j .L800EA074 -/* 834AC 800E9FFC 2402006C */ addiu $v0, $zero, 0x6c -.L800EA000: -/* 834B0 800EA000 0803A81D */ j .L800EA074 -/* 834B4 800EA004 24020050 */ addiu $v0, $zero, 0x50 -.L800EA008: -/* 834B8 800EA008 0803A81D */ j .L800EA074 -/* 834BC 800EA00C 24020038 */ addiu $v0, $zero, 0x38 -.L800EA010: -/* 834C0 800EA010 0803A81D */ j .L800EA074 -/* 834C4 800EA014 24020068 */ addiu $v0, $zero, 0x68 -.L800EA018: -/* 834C8 800EA018 0803A81D */ j .L800EA074 -/* 834CC 800EA01C 24020069 */ addiu $v0, $zero, 0x69 -.L800EA020: -/* 834D0 800EA020 0803A81D */ j .L800EA074 -/* 834D4 800EA024 2402006B */ addiu $v0, $zero, 0x6b -.L800EA028: -/* 834D8 800EA028 0803A81D */ j .L800EA074 -/* 834DC 800EA02C 2402006F */ addiu $v0, $zero, 0x6f -.L800EA030: -/* 834E0 800EA030 0803A81D */ j .L800EA074 -/* 834E4 800EA034 24020070 */ addiu $v0, $zero, 0x70 -.L800EA038: -/* 834E8 800EA038 0803A81D */ j .L800EA074 -/* 834EC 800EA03C 24020071 */ addiu $v0, $zero, 0x71 -.L800EA040: -/* 834F0 800EA040 0803A81D */ j .L800EA074 -/* 834F4 800EA044 24020072 */ addiu $v0, $zero, 0x72 -.L800EA048: -/* 834F8 800EA048 0803A81D */ j .L800EA074 -/* 834FC 800EA04C 24020073 */ addiu $v0, $zero, 0x73 -.L800EA050: -/* 83500 800EA050 0803A81D */ j .L800EA074 -/* 83504 800EA054 24020033 */ addiu $v0, $zero, 0x33 -.L800EA058: -/* 83508 800EA058 0803A81D */ j .L800EA074 -/* 8350C 800EA05C 24020074 */ addiu $v0, $zero, 0x74 -.L800EA060: -/* 83510 800EA060 0803A81D */ j .L800EA074 -/* 83514 800EA064 24020075 */ addiu $v0, $zero, 0x75 -.L800EA068: -/* 83518 800EA068 0803A81D */ j .L800EA074 -/* 8351C 800EA06C 24020076 */ addiu $v0, $zero, 0x76 -.L800EA070: -/* 83520 800EA070 2402004A */ addiu $v0, $zero, 0x4a -.L800EA074: -/* 83524 800EA074 50620001 */ beql $v1, $v0, .L800EA07C -/* 83528 800EA078 24A50001 */ addiu $a1, $a1, 1 -.L800EA07C: -/* 8352C 800EA07C 24E70001 */ addiu $a3, $a3, 1 -.L800EA080: -/* 83530 800EA080 28E20040 */ slti $v0, $a3, 0x40 -/* 83534 800EA084 1440FF4C */ bnez $v0, .L800E9DB8 -/* 83538 800EA088 00071040 */ sll $v0, $a3, 1 -/* 8353C 800EA08C 04A10007 */ bgez $a1, .L800EA0AC -/* 83540 800EA090 00A0102D */ daddu $v0, $a1, $zero -/* 83544 800EA094 0C00A67F */ jal rand_int -/* 83548 800EA098 2484FFFF */ addiu $a0, $a0, -1 -/* 8354C 800EA09C 00021080 */ sll $v0, $v0, 2 -/* 83550 800EA0A0 03A21021 */ addu $v0, $sp, $v0 -/* 83554 800EA0A4 8C450010 */ lw $a1, 0x10($v0) -/* 83558 800EA0A8 00A0102D */ daddu $v0, $a1, $zero -.L800EA0AC: -/* 8355C 800EA0AC 8FBF0028 */ lw $ra, 0x28($sp) -/* 83560 800EA0B0 03E00008 */ jr $ra -/* 83564 800EA0B4 27BD0030 */ addiu $sp, $sp, 0x30 diff --git a/ver/us/asm/nonmatchings/a5dd0_len_114e0/func_80116698.s b/ver/us/asm/nonmatchings/a5dd0_len_114e0/func_80116698.s deleted file mode 100644 index 13da735c4f..0000000000 --- a/ver/us/asm/nonmatchings/a5dd0_len_114e0/func_80116698.s +++ /dev/null @@ -1,343 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_80116698 -/* ACD98 80116698 27BDFF20 */ addiu $sp, $sp, -0xe0 -/* ACD9C 8011669C AFB200C0 */ sw $s2, 0xc0($sp) -/* ACDA0 801166A0 0000902D */ daddu $s2, $zero, $zero -/* ACDA4 801166A4 AFB300C4 */ sw $s3, 0xc4($sp) -/* ACDA8 801166A8 3C138007 */ lui $s3, %hi(gMatrixListPos) -/* ACDAC 801166AC 267341F0 */ addiu $s3, $s3, %lo(gMatrixListPos) -/* ACDB0 801166B0 AFB400C8 */ sw $s4, 0xc8($sp) -/* ACDB4 801166B4 3C140001 */ lui $s4, 1 -/* ACDB8 801166B8 F7B400D8 */ sdc1 $f20, 0xd8($sp) -/* ACDBC 801166BC 3C013F00 */ lui $at, 0x3f00 -/* ACDC0 801166C0 4481A000 */ mtc1 $at, $f20 -/* ACDC4 801166C4 36941630 */ ori $s4, $s4, 0x1630 -/* ACDC8 801166C8 AFBF00D0 */ sw $ra, 0xd0($sp) -/* ACDCC 801166CC AFB500CC */ sw $s5, 0xcc($sp) -/* ACDD0 801166D0 AFB100BC */ sw $s1, 0xbc($sp) -/* ACDD4 801166D4 AFB000B8 */ sw $s0, 0xb8($sp) -.L801166D8: -/* ACDD8 801166D8 3C038015 */ lui $v1, %hi(gCurrentModels) -/* ACDDC 801166DC 8C6312CC */ lw $v1, %lo(gCurrentModels)($v1) -/* ACDE0 801166E0 00121080 */ sll $v0, $s2, 2 -/* ACDE4 801166E4 00431021 */ addu $v0, $v0, $v1 -/* ACDE8 801166E8 8C500000 */ lw $s0, ($v0) -/* ACDEC 801166EC 52000088 */ beql $s0, $zero, .L80116910 -/* ACDF0 801166F0 26520001 */ addiu $s2, $s2, 1 -/* ACDF4 801166F4 96030000 */ lhu $v1, ($s0) -/* ACDF8 801166F8 50600085 */ beql $v1, $zero, .L80116910 -/* ACDFC 801166FC 26520001 */ addiu $s2, $s2, 1 -/* ACE00 80116700 30620004 */ andi $v0, $v1, 4 -/* ACE04 80116704 54400082 */ bnel $v0, $zero, .L80116910 -/* ACE08 80116708 26520001 */ addiu $s2, $s2, 1 -/* ACE0C 8011670C 30621000 */ andi $v0, $v1, 0x1000 -/* ACE10 80116710 14400034 */ bnez $v0, .L801167E4 -/* ACE14 80116714 24020002 */ addiu $v0, $zero, 2 -/* ACE18 80116718 920200A7 */ lbu $v0, 0xa7($s0) -/* ACE1C 8011671C 1040002E */ beqz $v0, .L801167D8 -/* ACE20 80116720 2442FFFF */ addiu $v0, $v0, -1 -/* ACE24 80116724 A20200A7 */ sb $v0, 0xa7($s0) -/* ACE28 80116728 304200FF */ andi $v0, $v0, 0xff -/* ACE2C 8011672C 1440000F */ bnez $v0, .L8011676C -/* ACE30 80116730 00000000 */ nop -/* ACE34 80116734 8E020010 */ lw $v0, 0x10($s0) -/* ACE38 80116738 26030018 */ addiu $v1, $s0, 0x18 -/* ACE3C 8011673C 24440040 */ addiu $a0, $v0, 0x40 -.L80116740: -/* ACE40 80116740 8C480000 */ lw $t0, ($v0) -/* ACE44 80116744 8C490004 */ lw $t1, 4($v0) -/* ACE48 80116748 8C4A0008 */ lw $t2, 8($v0) -/* ACE4C 8011674C 8C4B000C */ lw $t3, 0xc($v0) -/* ACE50 80116750 AC680000 */ sw $t0, ($v1) -/* ACE54 80116754 AC690004 */ sw $t1, 4($v1) -/* ACE58 80116758 AC6A0008 */ sw $t2, 8($v1) -/* ACE5C 8011675C AC6B000C */ sw $t3, 0xc($v1) -/* ACE60 80116760 24420010 */ addiu $v0, $v0, 0x10 -/* ACE64 80116764 1444FFF6 */ bne $v0, $a0, .L80116740 -/* ACE68 80116768 24630010 */ addiu $v1, $v1, 0x10 -.L8011676C: -/* ACE6C 8011676C 96620000 */ lhu $v0, ($s3) -/* ACE70 80116770 8E110010 */ lw $s1, 0x10($s0) -/* ACE74 80116774 3C04800A */ lui $a0, %hi(gDisplayContext) -/* ACE78 80116778 8C84A674 */ lw $a0, %lo(gDisplayContext)($a0) -/* ACE7C 8011677C 3043FFFF */ andi $v1, $v0, 0xffff -/* ACE80 80116780 00031980 */ sll $v1, $v1, 6 -/* ACE84 80116784 00741821 */ addu $v1, $v1, $s4 -/* ACE88 80116788 00832021 */ addu $a0, $a0, $v1 -/* ACE8C 8011678C 0080182D */ daddu $v1, $a0, $zero -/* ACE90 80116790 0220202D */ daddu $a0, $s1, $zero -/* ACE94 80116794 24850040 */ addiu $a1, $a0, 0x40 -/* ACE98 80116798 24420001 */ addiu $v0, $v0, 1 -/* ACE9C 8011679C A6620000 */ sh $v0, ($s3) -/* ACEA0 801167A0 AE030010 */ sw $v1, 0x10($s0) -.L801167A4: -/* ACEA4 801167A4 8C880000 */ lw $t0, ($a0) -/* ACEA8 801167A8 8C890004 */ lw $t1, 4($a0) -/* ACEAC 801167AC 8C8A0008 */ lw $t2, 8($a0) -/* ACEB0 801167B0 8C8B000C */ lw $t3, 0xc($a0) -/* ACEB4 801167B4 AC680000 */ sw $t0, ($v1) -/* ACEB8 801167B8 AC690004 */ sw $t1, 4($v1) -/* ACEBC 801167BC AC6A0008 */ sw $t2, 8($v1) -/* ACEC0 801167C0 AC6B000C */ sw $t3, 0xc($v1) -/* ACEC4 801167C4 24840010 */ addiu $a0, $a0, 0x10 -/* ACEC8 801167C8 1485FFF6 */ bne $a0, $a1, .L801167A4 -/* ACECC 801167CC 24630010 */ addiu $v1, $v1, 0x10 -/* ACED0 801167D0 08045A44 */ j .L80116910 -/* ACED4 801167D4 26520001 */ addiu $s2, $s2, 1 -.L801167D8: -/* ACED8 801167D8 26020018 */ addiu $v0, $s0, 0x18 -/* ACEDC 801167DC 08045A43 */ j .L8011690C -/* ACEE0 801167E0 AE020010 */ sw $v0, 0x10($s0) -.L801167E4: -/* ACEE4 801167E4 A20200A7 */ sb $v0, 0xa7($s0) -/* ACEE8 801167E8 3062EFFF */ andi $v0, $v1, 0xefff -/* ACEEC 801167EC 96640000 */ lhu $a0, ($s3) -/* ACEF0 801167F0 3C03800A */ lui $v1, %hi(gDisplayContext) -/* ACEF4 801167F4 8C63A674 */ lw $v1, %lo(gDisplayContext)($v1) -/* ACEF8 801167F8 8E050004 */ lw $a1, 4($s0) -/* ACEFC 801167FC A6020000 */ sh $v0, ($s0) -/* ACF00 80116800 3082FFFF */ andi $v0, $a0, 0xffff -/* ACF04 80116804 00021180 */ sll $v0, $v0, 6 -/* ACF08 80116808 00541021 */ addu $v0, $v0, $s4 -/* ACF0C 8011680C 00628821 */ addu $s1, $v1, $v0 -/* ACF10 80116810 24840001 */ addiu $a0, $a0, 1 -/* ACF14 80116814 10A00005 */ beqz $a1, .L8011682C -/* ACF18 80116818 A6640000 */ sh $a0, ($s3) -/* ACF1C 8011681C 96020000 */ lhu $v0, ($s0) -/* ACF20 80116820 30420008 */ andi $v0, $v0, 8 -/* ACF24 80116824 10400003 */ beqz $v0, .L80116834 -/* ACF28 80116828 00000000 */ nop -.L8011682C: -/* ACF2C 8011682C 08045A14 */ j .L80116850 -/* ACF30 80116830 26040058 */ addiu $a0, $s0, 0x58 -.L80116834: -/* ACF34 80116834 0C019D60 */ jal guMtxL2F -/* ACF38 80116838 27A40020 */ addiu $a0, $sp, 0x20 -/* ACF3C 8011683C 26040058 */ addiu $a0, $s0, 0x58 -/* ACF40 80116840 27A50020 */ addiu $a1, $sp, 0x20 -/* ACF44 80116844 0C019D80 */ jal guMtxCatF -/* ACF48 80116848 00A0302D */ daddu $a2, $a1, $zero -/* ACF4C 8011684C 27A40020 */ addiu $a0, $sp, 0x20 -.L80116850: -/* ACF50 80116850 0C019D40 */ jal guMtxF2L -/* ACF54 80116854 0220282D */ daddu $a1, $s1, $zero -/* ACF58 80116858 24050061 */ addiu $a1, $zero, 0x61 -/* ACF5C 8011685C 96020000 */ lhu $v0, ($s0) -/* ACF60 80116860 8E040008 */ lw $a0, 8($s0) -/* ACF64 80116864 3042DFFF */ andi $v0, $v0, 0xdfff -/* ACF68 80116868 0C0456C3 */ jal get_model_property -/* ACF6C 8011686C A6020000 */ sh $v0, ($s0) -/* ACF70 80116870 C4460008 */ lwc1 $f6, 8($v0) -/* ACF74 80116874 C440002C */ lwc1 $f0, 0x2c($v0) -/* ACF78 80116878 46003180 */ add.s $f6, $f6, $f0 -/* ACF7C 8011687C 46143182 */ mul.s $f6, $f6, $f20 -/* ACF80 80116880 00000000 */ nop -/* ACF84 80116884 C4440014 */ lwc1 $f4, 0x14($v0) -/* ACF88 80116888 C4400038 */ lwc1 $f0, 0x38($v0) -/* ACF8C 8011688C 46002100 */ add.s $f4, $f4, $f0 -/* ACF90 80116890 46142102 */ mul.s $f4, $f4, $f20 -/* ACF94 80116894 00000000 */ nop -/* ACF98 80116898 C4420020 */ lwc1 $f2, 0x20($v0) -/* ACF9C 8011689C C4400044 */ lwc1 $f0, 0x44($v0) -/* ACFA0 801168A0 46001080 */ add.s $f2, $f2, $f0 -/* ACFA4 801168A4 46141082 */ mul.s $f2, $f2, $f20 -/* ACFA8 801168A8 00000000 */ nop -/* ACFAC 801168AC 0220202D */ daddu $a0, $s1, $zero -/* ACFB0 801168B0 44053000 */ mfc1 $a1, $f6 -/* ACFB4 801168B4 44062000 */ mfc1 $a2, $f4 -/* ACFB8 801168B8 44071000 */ mfc1 $a3, $f2 -/* ACFBC 801168BC 27A200A0 */ addiu $v0, $sp, 0xa0 -/* ACFC0 801168C0 AFA500A0 */ sw $a1, 0xa0($sp) -/* ACFC4 801168C4 AFA600A4 */ sw $a2, 0xa4($sp) -/* ACFC8 801168C8 AFA700A8 */ sw $a3, 0xa8($sp) -/* ACFCC 801168CC AFA20010 */ sw $v0, 0x10($sp) -/* ACFD0 801168D0 27A200A4 */ addiu $v0, $sp, 0xa4 -/* ACFD4 801168D4 AFA20014 */ sw $v0, 0x14($sp) -/* ACFD8 801168D8 27A200A8 */ addiu $v0, $sp, 0xa8 -/* ACFDC 801168DC 0C019E78 */ jal guMtxXFML -/* ACFE0 801168E0 AFA20018 */ sw $v0, 0x18($sp) -/* ACFE4 801168E4 C7A000A0 */ lwc1 $f0, 0xa0($sp) -/* ACFE8 801168E8 C7A200A4 */ lwc1 $f2, 0xa4($sp) -/* ACFEC 801168EC C7A400A8 */ lwc1 $f4, 0xa8($sp) -/* ACFF0 801168F0 96020000 */ lhu $v0, ($s0) -/* ACFF4 801168F4 AE110010 */ sw $s1, 0x10($s0) -/* ACFF8 801168F8 3042FDFF */ andi $v0, $v0, 0xfdff -/* ACFFC 801168FC E6000098 */ swc1 $f0, 0x98($s0) -/* AD000 80116900 E602009C */ swc1 $f2, 0x9c($s0) -/* AD004 80116904 E60400A0 */ swc1 $f4, 0xa0($s0) -/* AD008 80116908 A6020000 */ sh $v0, ($s0) -.L8011690C: -/* AD00C 8011690C 26520001 */ addiu $s2, $s2, 1 -.L80116910: -/* AD010 80116910 2A420100 */ slti $v0, $s2, 0x100 -/* AD014 80116914 1440FF70 */ bnez $v0, .L801166D8 -/* AD018 80116918 3C150001 */ lui $s5, 1 -/* AD01C 8011691C 0000902D */ daddu $s2, $zero, $zero -/* AD020 80116920 3C148007 */ lui $s4, %hi(gMatrixListPos) -/* AD024 80116924 269441F0 */ addiu $s4, $s4, %lo(gMatrixListPos) -/* AD028 80116928 36B51630 */ ori $s5, $s5, 0x1630 -/* AD02C 8011692C 27B30060 */ addiu $s3, $sp, 0x60 -/* AD030 80116930 3C013F00 */ lui $at, 0x3f00 -/* AD034 80116934 4481A000 */ mtc1 $at, $f20 -.L80116938: -/* AD038 80116938 3C038015 */ lui $v1, %hi(gCurrentTransformGroups) -/* AD03C 8011693C 8C6312E0 */ lw $v1, %lo(gCurrentTransformGroups)($v1) -/* AD040 80116940 00121080 */ sll $v0, $s2, 2 -/* AD044 80116944 00431021 */ addu $v0, $v0, $v1 -/* AD048 80116948 8C500000 */ lw $s0, ($v0) -/* AD04C 8011694C 52000081 */ beql $s0, $zero, .L80116B54 -/* AD050 80116950 26520001 */ addiu $s2, $s2, 1 -/* AD054 80116954 96030000 */ lhu $v1, ($s0) -/* AD058 80116958 5060007E */ beql $v1, $zero, .L80116B54 -/* AD05C 8011695C 26520001 */ addiu $s2, $s2, 1 -/* AD060 80116960 30620004 */ andi $v0, $v1, 4 -/* AD064 80116964 5440007B */ bnel $v0, $zero, .L80116B54 -/* AD068 80116968 26520001 */ addiu $s2, $s2, 1 -/* AD06C 8011696C 30621000 */ andi $v0, $v1, 0x1000 -/* AD070 80116970 14400034 */ bnez $v0, .L80116A44 -/* AD074 80116974 24020002 */ addiu $v0, $zero, 2 -/* AD078 80116978 9202009F */ lbu $v0, 0x9f($s0) -/* AD07C 8011697C 1040002E */ beqz $v0, .L80116A38 -/* AD080 80116980 2442FFFF */ addiu $v0, $v0, -1 -/* AD084 80116984 A202009F */ sb $v0, 0x9f($s0) -/* AD088 80116988 304200FF */ andi $v0, $v0, 0xff -/* AD08C 8011698C 1440000F */ bnez $v0, .L801169CC -/* AD090 80116990 00000000 */ nop -/* AD094 80116994 8E02000C */ lw $v0, 0xc($s0) -/* AD098 80116998 26030010 */ addiu $v1, $s0, 0x10 -/* AD09C 8011699C 24440040 */ addiu $a0, $v0, 0x40 -.L801169A0: -/* AD0A0 801169A0 8C480000 */ lw $t0, ($v0) -/* AD0A4 801169A4 8C490004 */ lw $t1, 4($v0) -/* AD0A8 801169A8 8C4A0008 */ lw $t2, 8($v0) -/* AD0AC 801169AC 8C4B000C */ lw $t3, 0xc($v0) -/* AD0B0 801169B0 AC680000 */ sw $t0, ($v1) -/* AD0B4 801169B4 AC690004 */ sw $t1, 4($v1) -/* AD0B8 801169B8 AC6A0008 */ sw $t2, 8($v1) -/* AD0BC 801169BC AC6B000C */ sw $t3, 0xc($v1) -/* AD0C0 801169C0 24420010 */ addiu $v0, $v0, 0x10 -/* AD0C4 801169C4 1444FFF6 */ bne $v0, $a0, .L801169A0 -/* AD0C8 801169C8 24630010 */ addiu $v1, $v1, 0x10 -.L801169CC: -/* AD0CC 801169CC 96820000 */ lhu $v0, ($s4) -/* AD0D0 801169D0 8E11000C */ lw $s1, 0xc($s0) -/* AD0D4 801169D4 3C04800A */ lui $a0, %hi(gDisplayContext) -/* AD0D8 801169D8 8C84A674 */ lw $a0, %lo(gDisplayContext)($a0) -/* AD0DC 801169DC 3043FFFF */ andi $v1, $v0, 0xffff -/* AD0E0 801169E0 00031980 */ sll $v1, $v1, 6 -/* AD0E4 801169E4 00751821 */ addu $v1, $v1, $s5 -/* AD0E8 801169E8 00832021 */ addu $a0, $a0, $v1 -/* AD0EC 801169EC 0080182D */ daddu $v1, $a0, $zero -/* AD0F0 801169F0 0220202D */ daddu $a0, $s1, $zero -/* AD0F4 801169F4 24850040 */ addiu $a1, $a0, 0x40 -/* AD0F8 801169F8 24420001 */ addiu $v0, $v0, 1 -/* AD0FC 801169FC A6820000 */ sh $v0, ($s4) -/* AD100 80116A00 AE03000C */ sw $v1, 0xc($s0) -.L80116A04: -/* AD104 80116A04 8C880000 */ lw $t0, ($a0) -/* AD108 80116A08 8C890004 */ lw $t1, 4($a0) -/* AD10C 80116A0C 8C8A0008 */ lw $t2, 8($a0) -/* AD110 80116A10 8C8B000C */ lw $t3, 0xc($a0) -/* AD114 80116A14 AC680000 */ sw $t0, ($v1) -/* AD118 80116A18 AC690004 */ sw $t1, 4($v1) -/* AD11C 80116A1C AC6A0008 */ sw $t2, 8($v1) -/* AD120 80116A20 AC6B000C */ sw $t3, 0xc($v1) -/* AD124 80116A24 24840010 */ addiu $a0, $a0, 0x10 -/* AD128 80116A28 1485FFF6 */ bne $a0, $a1, .L80116A04 -/* AD12C 80116A2C 24630010 */ addiu $v1, $v1, 0x10 -/* AD130 80116A30 08045AD5 */ j .L80116B54 -/* AD134 80116A34 26520001 */ addiu $s2, $s2, 1 -.L80116A38: -/* AD138 80116A38 26020010 */ addiu $v0, $s0, 0x10 -/* AD13C 80116A3C 08045AD4 */ j .L80116B50 -/* AD140 80116A40 AE02000C */ sw $v0, 0xc($s0) -.L80116A44: -/* AD144 80116A44 A202009F */ sb $v0, 0x9f($s0) -/* AD148 80116A48 3062EFFF */ andi $v0, $v1, 0xefff -/* AD14C 80116A4C 96840000 */ lhu $a0, ($s4) -/* AD150 80116A50 3C03800A */ lui $v1, %hi(gDisplayContext) -/* AD154 80116A54 8C63A674 */ lw $v1, %lo(gDisplayContext)($v1) -/* AD158 80116A58 8E050004 */ lw $a1, 4($s0) -/* AD15C 80116A5C A6020000 */ sh $v0, ($s0) -/* AD160 80116A60 3082FFFF */ andi $v0, $a0, 0xffff -/* AD164 80116A64 00021180 */ sll $v0, $v0, 6 -/* AD168 80116A68 00551021 */ addu $v0, $v0, $s5 -/* AD16C 80116A6C 00628821 */ addu $s1, $v1, $v0 -/* AD170 80116A70 24840001 */ addiu $a0, $a0, 1 -/* AD174 80116A74 14A00003 */ bnez $a1, .L80116A84 -/* AD178 80116A78 A6840000 */ sh $a0, ($s4) -/* AD17C 80116A7C 08045AA8 */ j .L80116AA0 -/* AD180 80116A80 26040050 */ addiu $a0, $s0, 0x50 -.L80116A84: -/* AD184 80116A84 0C019D60 */ jal guMtxL2F -/* AD188 80116A88 0260202D */ daddu $a0, $s3, $zero -/* AD18C 80116A8C 26040050 */ addiu $a0, $s0, 0x50 -/* AD190 80116A90 0260282D */ daddu $a1, $s3, $zero -/* AD194 80116A94 0C019D80 */ jal guMtxCatF -/* AD198 80116A98 0260302D */ daddu $a2, $s3, $zero -/* AD19C 80116A9C 0260202D */ daddu $a0, $s3, $zero -.L80116AA0: -/* AD1A0 80116AA0 0C019D40 */ jal guMtxF2L -/* AD1A4 80116AA4 0220282D */ daddu $a1, $s1, $zero -/* AD1A8 80116AA8 24050061 */ addiu $a1, $zero, 0x61 -/* AD1AC 80116AAC 96020000 */ lhu $v0, ($s0) -/* AD1B0 80116AB0 8E040008 */ lw $a0, 8($s0) -/* AD1B4 80116AB4 3042DFFF */ andi $v0, $v0, 0xdfff -/* AD1B8 80116AB8 0C0456C3 */ jal get_model_property -/* AD1BC 80116ABC A6020000 */ sh $v0, ($s0) -/* AD1C0 80116AC0 C4460008 */ lwc1 $f6, 8($v0) -/* AD1C4 80116AC4 C440002C */ lwc1 $f0, 0x2c($v0) -/* AD1C8 80116AC8 46003180 */ add.s $f6, $f6, $f0 -/* AD1CC 80116ACC 46143182 */ mul.s $f6, $f6, $f20 -/* AD1D0 80116AD0 00000000 */ nop -/* AD1D4 80116AD4 C4440014 */ lwc1 $f4, 0x14($v0) -/* AD1D8 80116AD8 C4400038 */ lwc1 $f0, 0x38($v0) -/* AD1DC 80116ADC 46002100 */ add.s $f4, $f4, $f0 -/* AD1E0 80116AE0 46142102 */ mul.s $f4, $f4, $f20 -/* AD1E4 80116AE4 00000000 */ nop -/* AD1E8 80116AE8 C4420020 */ lwc1 $f2, 0x20($v0) -/* AD1EC 80116AEC C4400044 */ lwc1 $f0, 0x44($v0) -/* AD1F0 80116AF0 46001080 */ add.s $f2, $f2, $f0 -/* AD1F4 80116AF4 46141082 */ mul.s $f2, $f2, $f20 -/* AD1F8 80116AF8 00000000 */ nop -/* AD1FC 80116AFC 0220202D */ daddu $a0, $s1, $zero -/* AD200 80116B00 44053000 */ mfc1 $a1, $f6 -/* AD204 80116B04 44062000 */ mfc1 $a2, $f4 -/* AD208 80116B08 44071000 */ mfc1 $a3, $f2 -/* AD20C 80116B0C 27A200AC */ addiu $v0, $sp, 0xac -/* AD210 80116B10 AFA500AC */ sw $a1, 0xac($sp) -/* AD214 80116B14 AFA600B0 */ sw $a2, 0xb0($sp) -/* AD218 80116B18 AFA700B4 */ sw $a3, 0xb4($sp) -/* AD21C 80116B1C AFA20010 */ sw $v0, 0x10($sp) -/* AD220 80116B20 27A200B0 */ addiu $v0, $sp, 0xb0 -/* AD224 80116B24 AFA20014 */ sw $v0, 0x14($sp) -/* AD228 80116B28 27A200B4 */ addiu $v0, $sp, 0xb4 -/* AD22C 80116B2C 0C019E78 */ jal guMtxXFML -/* AD230 80116B30 AFA20018 */ sw $v0, 0x18($sp) -/* AD234 80116B34 C7A000AC */ lwc1 $f0, 0xac($sp) -/* AD238 80116B38 C7A200B0 */ lwc1 $f2, 0xb0($sp) -/* AD23C 80116B3C C7A400B4 */ lwc1 $f4, 0xb4($sp) -/* AD240 80116B40 AE11000C */ sw $s1, 0xc($s0) -/* AD244 80116B44 E6000090 */ swc1 $f0, 0x90($s0) -/* AD248 80116B48 E6020094 */ swc1 $f2, 0x94($s0) -/* AD24C 80116B4C E6040098 */ swc1 $f4, 0x98($s0) -.L80116B50: -/* AD250 80116B50 26520001 */ addiu $s2, $s2, 1 -.L80116B54: -/* AD254 80116B54 2A420004 */ slti $v0, $s2, 4 -/* AD258 80116B58 1440FF77 */ bnez $v0, .L80116938 -/* AD25C 80116B5C 00000000 */ nop -/* AD260 80116B60 0C046F3B */ jal build_custom_gfx -/* AD264 80116B64 00000000 */ nop -/* AD268 80116B68 8FBF00D0 */ lw $ra, 0xd0($sp) -/* AD26C 80116B6C 8FB500CC */ lw $s5, 0xcc($sp) -/* AD270 80116B70 8FB400C8 */ lw $s4, 0xc8($sp) -/* AD274 80116B74 8FB300C4 */ lw $s3, 0xc4($sp) -/* AD278 80116B78 8FB200C0 */ lw $s2, 0xc0($sp) -/* AD27C 80116B7C 8FB100BC */ lw $s1, 0xbc($sp) -/* AD280 80116B80 8FB000B8 */ lw $s0, 0xb8($sp) -/* AD284 80116B84 D7B400D8 */ ldc1 $f20, 0xd8($sp) -/* AD288 80116B88 03E00008 */ jr $ra -/* AD28C 80116B8C 27BD00E0 */ addiu $sp, $sp, 0xe0 diff --git a/ver/us/asm/nonmatchings/pause/138CC0/pause_stats_draw_contents.s b/ver/us/asm/nonmatchings/pause/138CC0/pause_stats_draw_contents.s deleted file mode 100644 index 3d318760c2..0000000000 --- a/ver/us/asm/nonmatchings/pause/138CC0/pause_stats_draw_contents.s +++ /dev/null @@ -1,1164 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel pause_stats_draw_contents -/* 138CC0 80245980 27BDFF80 */ addiu $sp, $sp, -0x80 -/* 138CC4 80245984 AFBE0078 */ sw $fp, 0x78($sp) -/* 138CC8 80245988 00C0F02D */ daddu $fp, $a2, $zero -/* 138CCC 8024598C AFA50084 */ sw $a1, 0x84($sp) -/* 138CD0 80245990 24A8008F */ addiu $t0, $a1, 0x8f -/* 138CD4 80245994 0100282D */ daddu $a1, $t0, $zero -/* 138CD8 80245998 AFB1005C */ sw $s1, 0x5c($sp) -/* 138CDC 8024599C 3C118027 */ lui $s1, %hi(gPauseStatsIconIDs) -/* 138CE0 802459A0 26310150 */ addiu $s1, $s1, %lo(gPauseStatsIconIDs) -/* 138CE4 802459A4 AFBF007C */ sw $ra, 0x7c($sp) -/* 138CE8 802459A8 AFB70074 */ sw $s7, 0x74($sp) -/* 138CEC 802459AC AFB60070 */ sw $s6, 0x70($sp) -/* 138CF0 802459B0 AFB5006C */ sw $s5, 0x6c($sp) -/* 138CF4 802459B4 AFB40068 */ sw $s4, 0x68($sp) -/* 138CF8 802459B8 AFB30064 */ sw $s3, 0x64($sp) -/* 138CFC 802459BC AFB20060 */ sw $s2, 0x60($sp) -/* 138D00 802459C0 AFB00058 */ sw $s0, 0x58($sp) -/* 138D04 802459C4 AFA40080 */ sw $a0, 0x80($sp) -/* 138D08 802459C8 AFA80050 */ sw $t0, 0x50($sp) -/* 138D0C 802459CC 8E24000C */ lw $a0, 0xc($s1) -/* 138D10 802459D0 0C051261 */ jal hud_element_set_render_pos -/* 138D14 802459D4 27C6006D */ addiu $a2, $fp, 0x6d -/* 138D18 802459D8 8E24000C */ lw $a0, 0xc($s1) -/* 138D1C 802459DC 0C0511F8 */ jal hud_element_draw_without_clipping -/* 138D20 802459E0 27D00065 */ addiu $s0, $fp, 0x65 -/* 138D24 802459E4 0C093BA0 */ jal pause_get_menu_msg -/* 138D28 802459E8 24040032 */ addiu $a0, $zero, 0x32 -/* 138D2C 802459EC 0040202D */ daddu $a0, $v0, $zero -/* 138D30 802459F0 0200302D */ daddu $a2, $s0, $zero -/* 138D34 802459F4 8FA80084 */ lw $t0, 0x84($sp) -/* 138D38 802459F8 240700FF */ addiu $a3, $zero, 0xff -/* 138D3C 802459FC 2508009B */ addiu $t0, $t0, 0x9b -/* 138D40 80245A00 0100282D */ daddu $a1, $t0, $zero -/* 138D44 80245A04 AFA80054 */ sw $t0, 0x54($sp) -/* 138D48 80245A08 2408000A */ addiu $t0, $zero, 0xa -/* 138D4C 80245A0C AFA80010 */ sw $t0, 0x10($sp) -/* 138D50 80245A10 24080001 */ addiu $t0, $zero, 1 -/* 138D54 80245A14 0C04993B */ jal draw_msg -/* 138D58 80245A18 AFA80014 */ sw $t0, 0x14($sp) -/* 138D5C 80245A1C 0200302D */ daddu $a2, $s0, $zero -/* 138D60 80245A20 24070001 */ addiu $a3, $zero, 1 -/* 138D64 80245A24 8FA80084 */ lw $t0, 0x84($sp) -/* 138D68 80245A28 3C048011 */ lui $a0, %hi(gPlayerData+0xC) -/* 138D6C 80245A2C 8484F29C */ lh $a0, %lo(gPlayerData+0xC)($a0) -/* 138D70 80245A30 24120003 */ addiu $s2, $zero, 3 -/* 138D74 80245A34 AFB20018 */ sw $s2, 0x18($sp) -/* 138D78 80245A38 25140119 */ addiu $s4, $t0, 0x119 -/* 138D7C 80245A3C 0280282D */ daddu $a1, $s4, $zero -/* 138D80 80245A40 2408000A */ addiu $t0, $zero, 0xa -/* 138D84 80245A44 AFA80010 */ sw $t0, 0x10($sp) -/* 138D88 80245A48 240800FF */ addiu $t0, $zero, 0xff -/* 138D8C 80245A4C 0C049DA7 */ jal draw_number -/* 138D90 80245A50 AFA80014 */ sw $t0, 0x14($sp) -/* 138D94 80245A54 27C6006C */ addiu $a2, $fp, 0x6c -/* 138D98 80245A58 8FA80084 */ lw $t0, 0x84($sp) -/* 138D9C 80245A5C 8E24002C */ lw $a0, 0x2c($s1) -/* 138DA0 80245A60 251300F8 */ addiu $s3, $t0, 0xf8 -/* 138DA4 80245A64 0C051261 */ jal hud_element_set_render_pos -/* 138DA8 80245A68 0260282D */ daddu $a1, $s3, $zero -/* 138DAC 80245A6C 8E24002C */ lw $a0, 0x2c($s1) -/* 138DB0 80245A70 0C0511F8 */ jal hud_element_draw_without_clipping -/* 138DB4 80245A74 27D00056 */ addiu $s0, $fp, 0x56 -/* 138DB8 80245A78 8FA50050 */ lw $a1, 0x50($sp) -/* 138DBC 80245A7C 8E240010 */ lw $a0, 0x10($s1) -/* 138DC0 80245A80 0C051261 */ jal hud_element_set_render_pos -/* 138DC4 80245A84 27C6005E */ addiu $a2, $fp, 0x5e -/* 138DC8 80245A88 8E240010 */ lw $a0, 0x10($s1) -/* 138DCC 80245A8C 0C0511F8 */ jal hud_element_draw_without_clipping -/* 138DD0 80245A90 27D5007B */ addiu $s5, $fp, 0x7b -/* 138DD4 80245A94 0C093BA0 */ jal pause_get_menu_msg -/* 138DD8 80245A98 24040033 */ addiu $a0, $zero, 0x33 -/* 138DDC 80245A9C 0040202D */ daddu $a0, $v0, $zero -/* 138DE0 80245AA0 0200302D */ daddu $a2, $s0, $zero -/* 138DE4 80245AA4 240700FF */ addiu $a3, $zero, 0xff -/* 138DE8 80245AA8 8FA50054 */ lw $a1, 0x54($sp) -/* 138DEC 80245AAC 2408000A */ addiu $t0, $zero, 0xa -/* 138DF0 80245AB0 AFA80010 */ sw $t0, 0x10($sp) -/* 138DF4 80245AB4 24080001 */ addiu $t0, $zero, 1 -/* 138DF8 80245AB8 0C04993B */ jal draw_msg -/* 138DFC 80245ABC AFA80014 */ sw $t0, 0x14($sp) -/* 138E00 80245AC0 0280282D */ daddu $a1, $s4, $zero -/* 138E04 80245AC4 0200302D */ daddu $a2, $s0, $zero -/* 138E08 80245AC8 24070001 */ addiu $a3, $zero, 1 -/* 138E0C 80245ACC 3C048011 */ lui $a0, %hi(gPlayerData+0x10) -/* 138E10 80245AD0 8084F2A0 */ lb $a0, %lo(gPlayerData+0x10)($a0) -/* 138E14 80245AD4 2408000A */ addiu $t0, $zero, 0xa -/* 138E18 80245AD8 AFA80010 */ sw $t0, 0x10($sp) -/* 138E1C 80245ADC 240800FF */ addiu $t0, $zero, 0xff -/* 138E20 80245AE0 AFA80014 */ sw $t0, 0x14($sp) -/* 138E24 80245AE4 0C049DA7 */ jal draw_number -/* 138E28 80245AE8 AFB20018 */ sw $s2, 0x18($sp) -/* 138E2C 80245AEC 0260282D */ daddu $a1, $s3, $zero -/* 138E30 80245AF0 8E24002C */ lw $a0, 0x2c($s1) -/* 138E34 80245AF4 0C051261 */ jal hud_element_set_render_pos -/* 138E38 80245AF8 27C6005D */ addiu $a2, $fp, 0x5d -/* 138E3C 80245AFC 8E24002C */ lw $a0, 0x2c($s1) -/* 138E40 80245B00 0C0511F8 */ jal hud_element_draw_without_clipping -/* 138E44 80245B04 27D00074 */ addiu $s0, $fp, 0x74 -/* 138E48 80245B08 8FA50050 */ lw $a1, 0x50($sp) -/* 138E4C 80245B0C 8E240014 */ lw $a0, 0x14($s1) -/* 138E50 80245B10 0C051261 */ jal hud_element_set_render_pos -/* 138E54 80245B14 02A0302D */ daddu $a2, $s5, $zero -/* 138E58 80245B18 8E240014 */ lw $a0, 0x14($s1) -/* 138E5C 80245B1C 0C0511F8 */ jal hud_element_draw_without_clipping -/* 138E60 80245B20 00000000 */ nop -/* 138E64 80245B24 0C093BA0 */ jal pause_get_menu_msg -/* 138E68 80245B28 24040034 */ addiu $a0, $zero, 0x34 -/* 138E6C 80245B2C 0040202D */ daddu $a0, $v0, $zero -/* 138E70 80245B30 0200302D */ daddu $a2, $s0, $zero -/* 138E74 80245B34 240700FF */ addiu $a3, $zero, 0xff -/* 138E78 80245B38 8FA50054 */ lw $a1, 0x54($sp) -/* 138E7C 80245B3C 2408000A */ addiu $t0, $zero, 0xa -/* 138E80 80245B40 AFA80010 */ sw $t0, 0x10($sp) -/* 138E84 80245B44 24080001 */ addiu $t0, $zero, 1 -/* 138E88 80245B48 0C04993B */ jal draw_msg -/* 138E8C 80245B4C AFA80014 */ sw $t0, 0x14($sp) -/* 138E90 80245B50 0280282D */ daddu $a1, $s4, $zero -/* 138E94 80245B54 0200302D */ daddu $a2, $s0, $zero -/* 138E98 80245B58 24070001 */ addiu $a3, $zero, 1 -/* 138E9C 80245B5C 3C048011 */ lui $a0, %hi(gPlayerData+0xF) -/* 138EA0 80245B60 9084F29F */ lbu $a0, %lo(gPlayerData+0xF)($a0) -/* 138EA4 80245B64 2408000A */ addiu $t0, $zero, 0xa -/* 138EA8 80245B68 AFA80010 */ sw $t0, 0x10($sp) -/* 138EAC 80245B6C 240800FF */ addiu $t0, $zero, 0xff -/* 138EB0 80245B70 AFA80014 */ sw $t0, 0x14($sp) -/* 138EB4 80245B74 0C049DA7 */ jal draw_number -/* 138EB8 80245B78 AFB20018 */ sw $s2, 0x18($sp) -/* 138EBC 80245B7C 0260282D */ daddu $a1, $s3, $zero -/* 138EC0 80245B80 8E24002C */ lw $a0, 0x2c($s1) -/* 138EC4 80245B84 0C051261 */ jal hud_element_set_render_pos -/* 138EC8 80245B88 02A0302D */ daddu $a2, $s5, $zero -/* 138ECC 80245B8C 8E24002C */ lw $a0, 0x2c($s1) -/* 138ED0 80245B90 0C0511F8 */ jal hud_element_draw_without_clipping -/* 138ED4 80245B94 27D00033 */ addiu $s0, $fp, 0x33 -/* 138ED8 80245B98 0000202D */ daddu $a0, $zero, $zero -/* 138EDC 80245B9C 8FA80084 */ lw $t0, 0x84($sp) -/* 138EE0 80245BA0 27C60023 */ addiu $a2, $fp, 0x23 -/* 138EE4 80245BA4 25160015 */ addiu $s6, $t0, 0x15 -/* 138EE8 80245BA8 0C093BA5 */ jal pause_draw_menu_label -/* 138EEC 80245BAC 02C0282D */ daddu $a1, $s6, $zero -/* 138EF0 80245BB0 27C60039 */ addiu $a2, $fp, 0x39 -/* 138EF4 80245BB4 8FA80084 */ lw $t0, 0x84($sp) -/* 138EF8 80245BB8 8E24001C */ lw $a0, 0x1c($s1) -/* 138EFC 80245BBC 25150034 */ addiu $s5, $t0, 0x34 -/* 138F00 80245BC0 0C051261 */ jal hud_element_set_render_pos -/* 138F04 80245BC4 02A0282D */ daddu $a1, $s5, $zero -/* 138F08 80245BC8 8E24001C */ lw $a0, 0x1c($s1) -/* 138F0C 80245BCC 0C0511F8 */ jal hud_element_draw_without_clipping -/* 138F10 80245BD0 00000000 */ nop -/* 138F14 80245BD4 0C093BA0 */ jal pause_get_menu_msg -/* 138F18 80245BD8 24040036 */ addiu $a0, $zero, 0x36 -/* 138F1C 80245BDC 0040202D */ daddu $a0, $v0, $zero -/* 138F20 80245BE0 0200302D */ daddu $a2, $s0, $zero -/* 138F24 80245BE4 8FA80084 */ lw $t0, 0x84($sp) -/* 138F28 80245BE8 240700FF */ addiu $a3, $zero, 0xff -/* 138F2C 80245BEC AFA00010 */ sw $zero, 0x10($sp) -/* 138F30 80245BF0 25140019 */ addiu $s4, $t0, 0x19 -/* 138F34 80245BF4 0280282D */ daddu $a1, $s4, $zero -/* 138F38 80245BF8 24080001 */ addiu $t0, $zero, 1 -/* 138F3C 80245BFC 0C04993B */ jal draw_msg -/* 138F40 80245C00 AFA80014 */ sw $t0, 0x14($sp) -/* 138F44 80245C04 0200302D */ daddu $a2, $s0, $zero -/* 138F48 80245C08 8FA80084 */ lw $t0, 0x84($sp) -/* 138F4C 80245C0C 3C048011 */ lui $a0, %hi(gPlayerData+0x2) -/* 138F50 80245C10 8084F292 */ lb $a0, %lo(gPlayerData+0x2)($a0) -/* 138F54 80245C14 24070001 */ addiu $a3, $zero, 1 -/* 138F58 80245C18 AFA00010 */ sw $zero, 0x10($sp) -/* 138F5C 80245C1C AFB20018 */ sw $s2, 0x18($sp) -/* 138F60 80245C20 2513004E */ addiu $s3, $t0, 0x4e -/* 138F64 80245C24 0260282D */ daddu $a1, $s3, $zero -/* 138F68 80245C28 240800FF */ addiu $t0, $zero, 0xff -/* 138F6C 80245C2C 0C049DA7 */ jal draw_number -/* 138F70 80245C30 AFA80014 */ sw $t0, 0x14($sp) -/* 138F74 80245C34 0C093BA0 */ jal pause_get_menu_msg -/* 138F78 80245C38 24040039 */ addiu $a0, $zero, 0x39 -/* 138F7C 80245C3C 0040202D */ daddu $a0, $v0, $zero -/* 138F80 80245C40 0260282D */ daddu $a1, $s3, $zero -/* 138F84 80245C44 0200302D */ daddu $a2, $s0, $zero -/* 138F88 80245C48 240700FF */ addiu $a3, $zero, 0xff -/* 138F8C 80245C4C 24080001 */ addiu $t0, $zero, 1 -/* 138F90 80245C50 AFA00010 */ sw $zero, 0x10($sp) -/* 138F94 80245C54 0C04993B */ jal draw_msg -/* 138F98 80245C58 AFA80014 */ sw $t0, 0x14($sp) -/* 138F9C 80245C5C 0200302D */ daddu $a2, $s0, $zero -/* 138FA0 80245C60 8FA80084 */ lw $t0, 0x84($sp) -/* 138FA4 80245C64 3C048011 */ lui $a0, %hi(gPlayerData+0x3) -/* 138FA8 80245C68 8084F293 */ lb $a0, %lo(gPlayerData+0x3)($a0) -/* 138FAC 80245C6C 24070001 */ addiu $a3, $zero, 1 -/* 138FB0 80245C70 AFA00010 */ sw $zero, 0x10($sp) -/* 138FB4 80245C74 AFB20018 */ sw $s2, 0x18($sp) -/* 138FB8 80245C78 25170069 */ addiu $s7, $t0, 0x69 -/* 138FBC 80245C7C 02E0282D */ daddu $a1, $s7, $zero -/* 138FC0 80245C80 240800FF */ addiu $t0, $zero, 0xff -/* 138FC4 80245C84 0C049DA7 */ jal draw_number -/* 138FC8 80245C88 AFA80014 */ sw $t0, 0x14($sp) -/* 138FCC 80245C8C 24040001 */ addiu $a0, $zero, 1 -/* 138FD0 80245C90 02C0282D */ daddu $a1, $s6, $zero -/* 138FD4 80245C94 0C093BA5 */ jal pause_draw_menu_label -/* 138FD8 80245C98 27C60045 */ addiu $a2, $fp, 0x45 -/* 138FDC 80245C9C 02A0282D */ daddu $a1, $s5, $zero -/* 138FE0 80245CA0 8E240020 */ lw $a0, 0x20($s1) -/* 138FE4 80245CA4 0C051261 */ jal hud_element_set_render_pos -/* 138FE8 80245CA8 27C6005C */ addiu $a2, $fp, 0x5c -/* 138FEC 80245CAC 8E240020 */ lw $a0, 0x20($s1) -/* 138FF0 80245CB0 0C0511F8 */ jal hud_element_draw_without_clipping -/* 138FF4 80245CB4 27D00055 */ addiu $s0, $fp, 0x55 -/* 138FF8 80245CB8 0C093BA0 */ jal pause_get_menu_msg -/* 138FFC 80245CBC 24040037 */ addiu $a0, $zero, 0x37 -/* 139000 80245CC0 0040202D */ daddu $a0, $v0, $zero -/* 139004 80245CC4 0280282D */ daddu $a1, $s4, $zero -/* 139008 80245CC8 0200302D */ daddu $a2, $s0, $zero -/* 13900C 80245CCC 240700FF */ addiu $a3, $zero, 0xff -/* 139010 80245CD0 24080001 */ addiu $t0, $zero, 1 -/* 139014 80245CD4 AFA00010 */ sw $zero, 0x10($sp) -/* 139018 80245CD8 0C04993B */ jal draw_msg -/* 13901C 80245CDC AFA80014 */ sw $t0, 0x14($sp) -/* 139020 80245CE0 0260282D */ daddu $a1, $s3, $zero -/* 139024 80245CE4 0200302D */ daddu $a2, $s0, $zero -/* 139028 80245CE8 24070001 */ addiu $a3, $zero, 1 -/* 13902C 80245CEC 3C048011 */ lui $a0, %hi(gPlayerData+0x5) -/* 139030 80245CF0 8084F295 */ lb $a0, %lo(gPlayerData+0x5)($a0) -/* 139034 80245CF4 240800FF */ addiu $t0, $zero, 0xff -/* 139038 80245CF8 AFA00010 */ sw $zero, 0x10($sp) -/* 13903C 80245CFC AFA80014 */ sw $t0, 0x14($sp) -/* 139040 80245D00 0C049DA7 */ jal draw_number -/* 139044 80245D04 AFB20018 */ sw $s2, 0x18($sp) -/* 139048 80245D08 0C093BA0 */ jal pause_get_menu_msg -/* 13904C 80245D0C 24040039 */ addiu $a0, $zero, 0x39 -/* 139050 80245D10 0040202D */ daddu $a0, $v0, $zero -/* 139054 80245D14 0260282D */ daddu $a1, $s3, $zero -/* 139058 80245D18 0200302D */ daddu $a2, $s0, $zero -/* 13905C 80245D1C 240700FF */ addiu $a3, $zero, 0xff -/* 139060 80245D20 24080001 */ addiu $t0, $zero, 1 -/* 139064 80245D24 AFA00010 */ sw $zero, 0x10($sp) -/* 139068 80245D28 0C04993B */ jal draw_msg -/* 13906C 80245D2C AFA80014 */ sw $t0, 0x14($sp) -/* 139070 80245D30 02E0282D */ daddu $a1, $s7, $zero -/* 139074 80245D34 0200302D */ daddu $a2, $s0, $zero -/* 139078 80245D38 24070001 */ addiu $a3, $zero, 1 -/* 13907C 80245D3C 3C048011 */ lui $a0, %hi(gPlayerData+0x6) -/* 139080 80245D40 8084F296 */ lb $a0, %lo(gPlayerData+0x6)($a0) -/* 139084 80245D44 240800FF */ addiu $t0, $zero, 0xff -/* 139088 80245D48 AFA00010 */ sw $zero, 0x10($sp) -/* 13908C 80245D4C AFA80014 */ sw $t0, 0x14($sp) -/* 139090 80245D50 0C049DA7 */ jal draw_number -/* 139094 80245D54 AFB20018 */ sw $s2, 0x18($sp) -/* 139098 80245D58 24040002 */ addiu $a0, $zero, 2 -/* 13909C 80245D5C 02C0282D */ daddu $a1, $s6, $zero -/* 1390A0 80245D60 0C093BA5 */ jal pause_draw_menu_label -/* 1390A4 80245D64 27C60067 */ addiu $a2, $fp, 0x67 -/* 1390A8 80245D68 02A0282D */ daddu $a1, $s5, $zero -/* 1390AC 80245D6C 8E240024 */ lw $a0, 0x24($s1) -/* 1390B0 80245D70 0C051261 */ jal hud_element_set_render_pos -/* 1390B4 80245D74 27C6007E */ addiu $a2, $fp, 0x7e -/* 1390B8 80245D78 8E240024 */ lw $a0, 0x24($s1) -/* 1390BC 80245D7C 0C0511F8 */ jal hud_element_draw_without_clipping -/* 1390C0 80245D80 27D00077 */ addiu $s0, $fp, 0x77 -/* 1390C4 80245D84 0C093BA0 */ jal pause_get_menu_msg -/* 1390C8 80245D88 24040038 */ addiu $a0, $zero, 0x38 -/* 1390CC 80245D8C 0040202D */ daddu $a0, $v0, $zero -/* 1390D0 80245D90 0280282D */ daddu $a1, $s4, $zero -/* 1390D4 80245D94 0200302D */ daddu $a2, $s0, $zero -/* 1390D8 80245D98 240700FF */ addiu $a3, $zero, 0xff -/* 1390DC 80245D9C 24080001 */ addiu $t0, $zero, 1 -/* 1390E0 80245DA0 AFA00010 */ sw $zero, 0x10($sp) -/* 1390E4 80245DA4 0C04993B */ jal draw_msg -/* 1390E8 80245DA8 AFA80014 */ sw $t0, 0x14($sp) -/* 1390EC 80245DAC 0260282D */ daddu $a1, $s3, $zero -/* 1390F0 80245DB0 0200302D */ daddu $a2, $s0, $zero -/* 1390F4 80245DB4 24070001 */ addiu $a3, $zero, 1 -/* 1390F8 80245DB8 3C048011 */ lui $a0, %hi(gPlayerData+0x8) -/* 1390FC 80245DBC 8084F298 */ lb $a0, %lo(gPlayerData+0x8)($a0) -/* 139100 80245DC0 240800FF */ addiu $t0, $zero, 0xff -/* 139104 80245DC4 AFA00010 */ sw $zero, 0x10($sp) -/* 139108 80245DC8 AFA80014 */ sw $t0, 0x14($sp) -/* 13910C 80245DCC 0C049DA7 */ jal draw_number -/* 139110 80245DD0 AFB20018 */ sw $s2, 0x18($sp) -/* 139114 80245DD4 8FA50050 */ lw $a1, 0x50($sp) -/* 139118 80245DD8 8E240018 */ lw $a0, 0x18($s1) -/* 13911C 80245DDC 0C051261 */ jal hud_element_set_render_pos -/* 139120 80245DE0 27C6008C */ addiu $a2, $fp, 0x8c -/* 139124 80245DE4 8E240018 */ lw $a0, 0x18($s1) -/* 139128 80245DE8 0C0511F8 */ jal hud_element_draw_without_clipping -/* 13912C 80245DEC 27D50085 */ addiu $s5, $fp, 0x85 -/* 139130 80245DF0 0C093BA0 */ jal pause_get_menu_msg -/* 139134 80245DF4 24040035 */ addiu $a0, $zero, 0x35 -/* 139138 80245DF8 0040202D */ daddu $a0, $v0, $zero -/* 13913C 80245DFC 02A0302D */ daddu $a2, $s5, $zero -/* 139140 80245E00 240700FF */ addiu $a3, $zero, 0xff -/* 139144 80245E04 8FA50054 */ lw $a1, 0x54($sp) -/* 139148 80245E08 2408000A */ addiu $t0, $zero, 0xa -/* 13914C 80245E0C AFA80010 */ sw $t0, 0x10($sp) -/* 139150 80245E10 24080001 */ addiu $t0, $zero, 1 -/* 139154 80245E14 0C04993B */ jal draw_msg -/* 139158 80245E18 AFA80014 */ sw $t0, 0x14($sp) -/* 13915C 80245E1C 3C020149 */ lui $v0, 0x149 -/* 139160 80245E20 3C148011 */ lui $s4, %hi(gPlayerData+0x2BC) -/* 139164 80245E24 8E94F54C */ lw $s4, %lo(gPlayerData+0x2BC)($s4) -/* 139168 80245E28 344296FF */ ori $v0, $v0, 0x96ff -/* 13916C 80245E2C 0054102A */ slt $v0, $v0, $s4 -/* 139170 80245E30 10400003 */ beqz $v0, .L80245E40 -/* 139174 80245E34 3C021F11 */ lui $v0, 0x1f11 -/* 139178 80245E38 3C140149 */ lui $s4, 0x149 -/* 13917C 80245E3C 369496FF */ ori $s4, $s4, 0x96ff -.L80245E40: -/* 139180 80245E40 3442A4A5 */ ori $v0, $v0, 0xa4a5 -/* 139184 80245E44 3C036666 */ lui $v1, 0x6666 -/* 139188 80245E48 34636667 */ ori $v1, $v1, 0x6667 -/* 13918C 80245E4C 02A0302D */ daddu $a2, $s5, $zero -/* 139190 80245E50 24070001 */ addiu $a3, $zero, 1 -/* 139194 80245E54 00149FC3 */ sra $s3, $s4, 0x1f -/* 139198 80245E58 02820018 */ mult $s4, $v0 -/* 13919C 80245E5C 8FA80084 */ lw $t0, 0x84($sp) -/* 1391A0 80245E60 24120002 */ addiu $s2, $zero, 2 -/* 1391A4 80245E64 AFB20018 */ sw $s2, 0x18($sp) -/* 1391A8 80245E68 250500ED */ addiu $a1, $t0, 0xed -/* 1391AC 80245E6C 00004010 */ mfhi $t0 -/* 1391B0 80245E70 00088483 */ sra $s0, $t0, 0x12 -/* 1391B4 80245E74 02138023 */ subu $s0, $s0, $s3 -/* 1391B8 80245E78 2408000A */ addiu $t0, $zero, 0xa -/* 1391BC 80245E7C 02030018 */ mult $s0, $v1 -/* 1391C0 80245E80 AFA80010 */ sw $t0, 0x10($sp) -/* 1391C4 80245E84 240800FF */ addiu $t0, $zero, 0xff -/* 1391C8 80245E88 00101FC3 */ sra $v1, $s0, 0x1f -/* 1391CC 80245E8C AFA80014 */ sw $t0, 0x14($sp) -/* 1391D0 80245E90 00004010 */ mfhi $t0 -/* 1391D4 80245E94 02481007 */ srav $v0, $t0, $s2 -/* 1391D8 80245E98 00431023 */ subu $v0, $v0, $v1 -/* 1391DC 80245E9C 02422004 */ sllv $a0, $v0, $s2 -/* 1391E0 80245EA0 00822021 */ addu $a0, $a0, $v0 -/* 1391E4 80245EA4 00E42004 */ sllv $a0, $a0, $a3 -/* 1391E8 80245EA8 0C049DA7 */ jal draw_number -/* 1391EC 80245EAC 02042023 */ subu $a0, $s0, $a0 -/* 1391F0 80245EB0 3C029B58 */ lui $v0, 0x9b58 -/* 1391F4 80245EB4 34423739 */ ori $v0, $v0, 0x3739 -/* 1391F8 80245EB8 02A0302D */ daddu $a2, $s5, $zero -/* 1391FC 80245EBC 24070001 */ addiu $a3, $zero, 1 -/* 139200 80245EC0 02502004 */ sllv $a0, $s0, $s2 -/* 139204 80245EC4 00902021 */ addu $a0, $a0, $s0 -/* 139208 80245EC8 00E42004 */ sllv $a0, $a0, $a3 -/* 13920C 80245ECC 8FA80084 */ lw $t0, 0x84($sp) -/* 139210 80245ED0 02820018 */ mult $s4, $v0 -/* 139214 80245ED4 AFB20018 */ sw $s2, 0x18($sp) -/* 139218 80245ED8 250500F6 */ addiu $a1, $t0, 0xf6 -/* 13921C 80245EDC 2408000A */ addiu $t0, $zero, 0xa -/* 139220 80245EE0 AFA80010 */ sw $t0, 0x10($sp) -/* 139224 80245EE4 240800FF */ addiu $t0, $zero, 0xff -/* 139228 80245EE8 AFA80014 */ sw $t0, 0x14($sp) -/* 13922C 80245EEC 00004010 */ mfhi $t0 -/* 139230 80245EF0 01148821 */ addu $s1, $t0, $s4 -/* 139234 80245EF4 00118C43 */ sra $s1, $s1, 0x11 -/* 139238 80245EF8 02338823 */ subu $s1, $s1, $s3 -/* 13923C 80245EFC 0C049DA7 */ jal draw_number -/* 139240 80245F00 02242023 */ subu $a0, $s1, $a0 -/* 139244 80245F04 0C093BA0 */ jal pause_get_menu_msg -/* 139248 80245F08 2404003A */ addiu $a0, $zero, 0x3a -/* 13924C 80245F0C 0040202D */ daddu $a0, $v0, $zero -/* 139250 80245F10 27C60084 */ addiu $a2, $fp, 0x84 -/* 139254 80245F14 8FA80084 */ lw $t0, 0x84($sp) -/* 139258 80245F18 240700FF */ addiu $a3, $zero, 0xff -/* 13925C 80245F1C 25100101 */ addiu $s0, $t0, 0x101 -/* 139260 80245F20 0200282D */ daddu $a1, $s0, $zero -/* 139264 80245F24 2408000A */ addiu $t0, $zero, 0xa -/* 139268 80245F28 AFA80010 */ sw $t0, 0x10($sp) -/* 13926C 80245F2C 24080001 */ addiu $t0, $zero, 1 -/* 139270 80245F30 0C04993B */ jal draw_msg -/* 139274 80245F34 AFA80014 */ sw $t0, 0x14($sp) -/* 139278 80245F38 0C093BA0 */ jal pause_get_menu_msg -/* 13927C 80245F3C 2404003A */ addiu $a0, $zero, 0x3a -/* 139280 80245F40 0040202D */ daddu $a0, $v0, $zero -/* 139284 80245F44 0200282D */ daddu $a1, $s0, $zero -/* 139288 80245F48 27C6007F */ addiu $a2, $fp, 0x7f -/* 13928C 80245F4C 240700FF */ addiu $a3, $zero, 0xff -/* 139290 80245F50 2408000A */ addiu $t0, $zero, 0xa -/* 139294 80245F54 AFA80010 */ sw $t0, 0x10($sp) -/* 139298 80245F58 24080001 */ addiu $t0, $zero, 1 -/* 13929C 80245F5C 0C04993B */ jal draw_msg -/* 1392A0 80245F60 AFA80014 */ sw $t0, 0x14($sp) -/* 1392A4 80245F64 3C027482 */ lui $v0, 0x7482 -/* 1392A8 80245F68 3442296B */ ori $v0, $v0, 0x296b -/* 1392AC 80245F6C 02A0302D */ daddu $a2, $s5, $zero -/* 1392B0 80245F70 24070001 */ addiu $a3, $zero, 1 -/* 1392B4 80245F74 00F12004 */ sllv $a0, $s1, $a3 -/* 1392B8 80245F78 00912021 */ addu $a0, $a0, $s1 -/* 1392BC 80245F7C 00E42004 */ sllv $a0, $a0, $a3 -/* 1392C0 80245F80 8FA80084 */ lw $t0, 0x84($sp) -/* 1392C4 80245F84 02820018 */ mult $s4, $v0 -/* 1392C8 80245F88 AFB20018 */ sw $s2, 0x18($sp) -/* 1392CC 80245F8C 25050108 */ addiu $a1, $t0, 0x108 -/* 1392D0 80245F90 2408000A */ addiu $t0, $zero, 0xa -/* 1392D4 80245F94 AFA80010 */ sw $t0, 0x10($sp) -/* 1392D8 80245F98 240800FF */ addiu $t0, $zero, 0xff -/* 1392DC 80245F9C AFA80014 */ sw $t0, 0x14($sp) -/* 1392E0 80245FA0 00004010 */ mfhi $t0 -/* 1392E4 80245FA4 00088383 */ sra $s0, $t0, 0xe -/* 1392E8 80245FA8 02138023 */ subu $s0, $s0, $s3 -/* 1392EC 80245FAC 0C049DA7 */ jal draw_number -/* 1392F0 80245FB0 02042023 */ subu $a0, $s0, $a0 -/* 1392F4 80245FB4 3C0291A2 */ lui $v0, 0x91a2 -/* 1392F8 80245FB8 3442B3C5 */ ori $v0, $v0, 0xb3c5 -/* 1392FC 80245FBC 02A0302D */ daddu $a2, $s5, $zero -/* 139300 80245FC0 24070001 */ addiu $a3, $zero, 1 -/* 139304 80245FC4 02502004 */ sllv $a0, $s0, $s2 -/* 139308 80245FC8 00902021 */ addu $a0, $a0, $s0 -/* 13930C 80245FCC 00E42004 */ sllv $a0, $a0, $a3 -/* 139310 80245FD0 8FA80084 */ lw $t0, 0x84($sp) -/* 139314 80245FD4 02820018 */ mult $s4, $v0 -/* 139318 80245FD8 AFB20018 */ sw $s2, 0x18($sp) -/* 13931C 80245FDC 25050111 */ addiu $a1, $t0, 0x111 -/* 139320 80245FE0 2408000A */ addiu $t0, $zero, 0xa -/* 139324 80245FE4 AFA80010 */ sw $t0, 0x10($sp) -/* 139328 80245FE8 240800FF */ addiu $t0, $zero, 0xff -/* 13932C 80245FEC AFA80014 */ sw $t0, 0x14($sp) -/* 139330 80245FF0 00004010 */ mfhi $t0 -/* 139334 80245FF4 01141021 */ addu $v0, $t0, $s4 -/* 139338 80245FF8 000212C3 */ sra $v0, $v0, 0xb -/* 13933C 80245FFC 00531023 */ subu $v0, $v0, $s3 -/* 139340 80246000 0C049DA7 */ jal draw_number -/* 139344 80246004 00442023 */ subu $a0, $v0, $a0 -/* 139348 80246008 3C028011 */ lui $v0, %hi(gPlayerData) -/* 13934C 8024600C 9042F290 */ lbu $v0, %lo(gPlayerData)($v0) -/* 139350 80246010 3C038011 */ lui $v1, %hi(gPlayerData+0x1) -/* 139354 80246014 9063F291 */ lbu $v1, %lo(gPlayerData+0x1)($v1) -/* 139358 80246018 8FA80084 */ lw $t0, 0x84($sp) -/* 13935C 8024601C 27C7000C */ addiu $a3, $fp, 0xc -/* 139360 80246020 AFA00010 */ sw $zero, 0x10($sp) -/* 139364 80246024 00021600 */ sll $v0, $v0, 0x18 -/* 139368 80246028 00029603 */ sra $s2, $v0, 0x18 -/* 13936C 8024602C 00031E00 */ sll $v1, $v1, 0x18 -/* 139370 80246030 00039E03 */ sra $s3, $v1, 0x18 -/* 139374 80246034 3C028011 */ lui $v0, %hi(gPlayerData+0x9) -/* 139378 80246038 9042F299 */ lbu $v0, %lo(gPlayerData+0x9)($v0) -/* 13937C 8024603C 00021600 */ sll $v0, $v0, 0x18 -/* 139380 80246040 0002A603 */ sra $s4, $v0, 0x18 -/* 139384 80246044 0280102D */ daddu $v0, $s4, $zero -/* 139388 80246048 2842000A */ slti $v0, $v0, 0xa -/* 13938C 8024604C 14400003 */ bnez $v0, .L8024605C -/* 139390 80246050 25060007 */ addiu $a2, $t0, 7 -/* 139394 80246054 08091818 */ j .L80246060 -/* 139398 80246058 24020079 */ addiu $v0, $zero, 0x79 -.L8024605C: -/* 13939C 8024605C 24020071 */ addiu $v0, $zero, 0x71 -.L80246060: -/* 1393A0 80246060 AFA20014 */ sw $v0, 0x14($sp) -/* 1393A4 80246064 24040004 */ addiu $a0, $zero, 4 -/* 1393A8 80246068 3C058027 */ lui $a1, %hi(gPauseWS_10) -/* 1393AC 8024606C 24A5FB30 */ addiu $a1, $a1, %lo(gPauseWS_10) -/* 1393B0 80246070 24020011 */ addiu $v0, $zero, 0x11 -/* 1393B4 80246074 241100FF */ addiu $s1, $zero, 0xff -/* 1393B8 80246078 AFA20018 */ sw $v0, 0x18($sp) -/* 1393BC 8024607C 24020140 */ addiu $v0, $zero, 0x140 -/* 1393C0 80246080 AFA20044 */ sw $v0, 0x44($sp) -/* 1393C4 80246084 240200F0 */ addiu $v0, $zero, 0xf0 -/* 1393C8 80246088 AFB1001C */ sw $s1, 0x1c($sp) -/* 1393CC 8024608C AFA00020 */ sw $zero, 0x20($sp) -/* 1393D0 80246090 AFA00024 */ sw $zero, 0x24($sp) -/* 1393D4 80246094 AFA00028 */ sw $zero, 0x28($sp) -/* 1393D8 80246098 AFA0002C */ sw $zero, 0x2c($sp) -/* 1393DC 8024609C AFA00030 */ sw $zero, 0x30($sp) -/* 1393E0 802460A0 AFA00034 */ sw $zero, 0x34($sp) -/* 1393E4 802460A4 AFA00038 */ sw $zero, 0x38($sp) -/* 1393E8 802460A8 AFA0003C */ sw $zero, 0x3c($sp) -/* 1393EC 802460AC AFA00040 */ sw $zero, 0x40($sp) -/* 1393F0 802460B0 AFA20048 */ sw $v0, 0x48($sp) -/* 1393F4 802460B4 0C03D4B8 */ jal draw_box -/* 1393F8 802460B8 AFA0004C */ sw $zero, 0x4c($sp) -/* 1393FC 802460BC 3C168027 */ lui $s6, %hi(gPauseStatsIconIDs) -/* 139400 802460C0 26D60150 */ addiu $s6, $s6, %lo(gPauseStatsIconIDs) -/* 139404 802460C4 27C60015 */ addiu $a2, $fp, 0x15 -/* 139408 802460C8 8FA80084 */ lw $t0, 0x84($sp) -/* 13940C 802460CC 8EC40000 */ lw $a0, ($s6) -/* 139410 802460D0 0C051261 */ jal hud_element_set_render_pos -/* 139414 802460D4 2505003D */ addiu $a1, $t0, 0x3d -/* 139418 802460D8 8EC40000 */ lw $a0, ($s6) -/* 13941C 802460DC 0C0511F8 */ jal hud_element_draw_without_clipping -/* 139420 802460E0 27D0000E */ addiu $s0, $fp, 0xe -/* 139424 802460E4 0C093BA0 */ jal pause_get_menu_msg -/* 139428 802460E8 24040043 */ addiu $a0, $zero, 0x43 -/* 13942C 802460EC 0040202D */ daddu $a0, $v0, $zero -/* 139430 802460F0 0200302D */ daddu $a2, $s0, $zero -/* 139434 802460F4 0220382D */ daddu $a3, $s1, $zero -/* 139438 802460F8 8FA80084 */ lw $t0, 0x84($sp) -/* 13943C 802460FC 24170001 */ addiu $s7, $zero, 1 -/* 139440 80246100 AFA00010 */ sw $zero, 0x10($sp) -/* 139444 80246104 AFB70014 */ sw $s7, 0x14($sp) -/* 139448 80246108 0C04993B */ jal draw_msg -/* 13944C 8024610C 25050010 */ addiu $a1, $t0, 0x10 -/* 139450 80246110 0C093BA0 */ jal pause_get_menu_msg -/* 139454 80246114 24040044 */ addiu $a0, $zero, 0x44 -/* 139458 80246118 0040202D */ daddu $a0, $v0, $zero -/* 13945C 8024611C 0200302D */ daddu $a2, $s0, $zero -/* 139460 80246120 8FA80084 */ lw $t0, 0x84($sp) -/* 139464 80246124 0220382D */ daddu $a3, $s1, $zero -/* 139468 80246128 AFA00010 */ sw $zero, 0x10($sp) -/* 13946C 8024612C AFB70014 */ sw $s7, 0x14($sp) -/* 139470 80246130 0C04993B */ jal draw_msg -/* 139474 80246134 25050043 */ addiu $a1, $t0, 0x43 -/* 139478 80246138 00142400 */ sll $a0, $s4, 0x10 -/* 13947C 8024613C 00042403 */ sra $a0, $a0, 0x10 -/* 139480 80246140 0200302D */ daddu $a2, $s0, $zero -/* 139484 80246144 02E0382D */ daddu $a3, $s7, $zero -/* 139488 80246148 8FA80084 */ lw $t0, 0x84($sp) -/* 13948C 8024614C 24020002 */ addiu $v0, $zero, 2 -/* 139490 80246150 AFA00010 */ sw $zero, 0x10($sp) -/* 139494 80246154 AFB10014 */ sw $s1, 0x14($sp) -/* 139498 80246158 AFA20018 */ sw $v0, 0x18($sp) -/* 13949C 8024615C 0C049DA7 */ jal draw_number -/* 1394A0 80246160 2505006A */ addiu $a1, $t0, 0x6a -/* 1394A4 80246164 02571021 */ addu $v0, $s2, $s7 -/* 1394A8 80246168 0040902D */ daddu $s2, $v0, $zero -/* 1394AC 8024616C 00021400 */ sll $v0, $v0, 0x10 -/* 1394B0 80246170 04420001 */ bltzl $v0, .L80246178 -/* 1394B4 80246174 0000902D */ daddu $s2, $zero, $zero -.L80246178: -/* 1394B8 80246178 00121400 */ sll $v0, $s2, 0x10 -/* 1394BC 8024617C 00021403 */ sra $v0, $v0, 0x10 -/* 1394C0 80246180 28420004 */ slti $v0, $v0, 4 -/* 1394C4 80246184 50400001 */ beql $v0, $zero, .L8024618C -/* 1394C8 80246188 24120003 */ addiu $s2, $zero, 3 -.L8024618C: -/* 1394CC 8024618C 26620001 */ addiu $v0, $s3, 1 -/* 1394D0 80246190 0040982D */ daddu $s3, $v0, $zero -/* 1394D4 80246194 00021400 */ sll $v0, $v0, 0x10 -/* 1394D8 80246198 04420001 */ bltzl $v0, .L802461A0 -/* 1394DC 8024619C 0000982D */ daddu $s3, $zero, $zero -.L802461A0: -/* 1394E0 802461A0 00131400 */ sll $v0, $s3, 0x10 -/* 1394E4 802461A4 00021403 */ sra $v0, $v0, 0x10 -/* 1394E8 802461A8 28420004 */ slti $v0, $v0, 4 -/* 1394EC 802461AC 50400001 */ beql $v0, $zero, .L802461B4 -/* 1394F0 802461B0 24130003 */ addiu $s3, $zero, 3 -.L802461B4: -/* 1394F4 802461B4 24040003 */ addiu $a0, $zero, 3 -/* 1394F8 802461B8 8FA80084 */ lw $t0, 0x84($sp) -/* 1394FC 802461BC 27C6000A */ addiu $a2, $fp, 0xa -/* 139500 802461C0 25100089 */ addiu $s0, $t0, 0x89 -/* 139504 802461C4 0C093BA5 */ jal pause_draw_menu_label -/* 139508 802461C8 0200282D */ daddu $a1, $s0, $zero -/* 13950C 802461CC 24040004 */ addiu $a0, $zero, 4 -/* 139510 802461D0 0200282D */ daddu $a1, $s0, $zero -/* 139514 802461D4 0C093BA5 */ jal pause_draw_menu_label -/* 139518 802461D8 27C60023 */ addiu $a2, $fp, 0x23 -/* 13951C 802461DC 00128400 */ sll $s0, $s2, 0x10 -/* 139520 802461E0 00108383 */ sra $s0, $s0, 0xe -/* 139524 802461E4 8EC40004 */ lw $a0, 4($s6) -/* 139528 802461E8 3C058025 */ lui $a1, %hi(gStatsBootsElements) -/* 13952C 802461EC 00B02821 */ addu $a1, $a1, $s0 -/* 139530 802461F0 8CA5F360 */ lw $a1, %lo(gStatsBootsElements)($a1) -/* 139534 802461F4 0C0511FF */ jal hud_element_set_script -/* 139538 802461F8 24140001 */ addiu $s4, $zero, 1 -/* 13953C 802461FC 27C6001D */ addiu $a2, $fp, 0x1d -/* 139540 80246200 8FA80084 */ lw $t0, 0x84($sp) -/* 139544 80246204 8EC40004 */ lw $a0, 4($s6) -/* 139548 80246208 251100A3 */ addiu $s1, $t0, 0xa3 -/* 13954C 8024620C 0C051261 */ jal hud_element_set_render_pos -/* 139550 80246210 0220282D */ daddu $a1, $s1, $zero -/* 139554 80246214 8EC40004 */ lw $a0, 4($s6) -/* 139558 80246218 0C0511F8 */ jal hud_element_draw_without_clipping -/* 13955C 8024621C 00000000 */ nop -/* 139560 80246220 3C048025 */ lui $a0, %hi(gPauseStatsBootsMessages) -/* 139564 80246224 00902021 */ addu $a0, $a0, $s0 -/* 139568 80246228 8C84F380 */ lw $a0, %lo(gPauseStatsBootsMessages)($a0) -/* 13956C 8024622C 0C093BA0 */ jal pause_get_menu_msg -/* 139570 80246230 00138400 */ sll $s0, $s3, 0x10 -/* 139574 80246234 0040202D */ daddu $a0, $v0, $zero -/* 139578 80246238 27C60017 */ addiu $a2, $fp, 0x17 -/* 13957C 8024623C 8FA80084 */ lw $t0, 0x84($sp) -/* 139580 80246240 240700FF */ addiu $a3, $zero, 0xff -/* 139584 80246244 AFA00010 */ sw $zero, 0x10($sp) -/* 139588 80246248 AFB70014 */ sw $s7, 0x14($sp) -/* 13958C 8024624C 251200B0 */ addiu $s2, $t0, 0xb0 -/* 139590 80246250 0C04993B */ jal draw_msg -/* 139594 80246254 0240282D */ daddu $a1, $s2, $zero -/* 139598 80246258 00108383 */ sra $s0, $s0, 0xe -/* 13959C 8024625C 8EC40008 */ lw $a0, 8($s6) -/* 1395A0 80246260 3C058025 */ lui $a1, %hi(gStatsHammerElements) -/* 1395A4 80246264 00B02821 */ addu $a1, $a1, $s0 -/* 1395A8 80246268 8CA5F370 */ lw $a1, %lo(gStatsHammerElements)($a1) -/* 1395AC 8024626C 0C0511FF */ jal hud_element_set_script -/* 1395B0 80246270 0000982D */ daddu $s3, $zero, $zero -/* 1395B4 80246274 0220282D */ daddu $a1, $s1, $zero -/* 1395B8 80246278 8EC40008 */ lw $a0, 8($s6) -/* 1395BC 8024627C 0C051261 */ jal hud_element_set_render_pos -/* 1395C0 80246280 27C60036 */ addiu $a2, $fp, 0x36 -/* 1395C4 80246284 8EC40008 */ lw $a0, 8($s6) -/* 1395C8 80246288 0C0511F8 */ jal hud_element_draw_without_clipping -/* 1395CC 8024628C 0260A82D */ daddu $s5, $s3, $zero -/* 1395D0 80246290 3C048025 */ lui $a0, %hi(gPauseStatsHammerMessages) -/* 1395D4 80246294 00902021 */ addu $a0, $a0, $s0 -/* 1395D8 80246298 0C093BA0 */ jal pause_get_menu_msg -/* 1395DC 8024629C 8C84F390 */ lw $a0, %lo(gPauseStatsHammerMessages)($a0) -/* 1395E0 802462A0 0040202D */ daddu $a0, $v0, $zero -/* 1395E4 802462A4 0240282D */ daddu $a1, $s2, $zero -/* 1395E8 802462A8 27C60030 */ addiu $a2, $fp, 0x30 -/* 1395EC 802462AC 240700FF */ addiu $a3, $zero, 0xff -/* 1395F0 802462B0 AFA00010 */ sw $zero, 0x10($sp) -/* 1395F4 802462B4 0C04993B */ jal draw_msg -/* 1395F8 802462B8 AFB70014 */ sw $s7, 0x14($sp) -/* 1395FC 802462BC 24040006 */ addiu $a0, $zero, 6 -/* 139600 802462C0 8FA80084 */ lw $t0, 0x84($sp) -/* 139604 802462C4 27C60045 */ addiu $a2, $fp, 0x45 -/* 139608 802462C8 0C093BA5 */ jal pause_draw_menu_label -/* 13960C 802462CC 25050082 */ addiu $a1, $t0, 0x82 -/* 139610 802462D0 24040005 */ addiu $a0, $zero, 5 -/* 139614 802462D4 8FA80084 */ lw $t0, 0x84($sp) -/* 139618 802462D8 27C6003C */ addiu $a2, $fp, 0x3c -/* 13961C 802462DC 0C093BA5 */ jal pause_draw_menu_label -/* 139620 802462E0 2505008A */ addiu $a1, $t0, 0x8a -/* 139624 802462E4 3C178011 */ lui $s7, %hi(gPlayerData) -/* 139628 802462E8 26F7F290 */ addiu $s7, $s7, %lo(gPlayerData) -/* 13962C 802462EC 0260902D */ daddu $s2, $s3, $zero -/* 139630 802462F0 86E30290 */ lh $v1, 0x290($s7) -/* 139634 802462F4 8ED10028 */ lw $s1, 0x28($s6) -/* 139638 802462F8 04610002 */ bgez $v1, .L80246304 -/* 13963C 802462FC 0060102D */ daddu $v0, $v1, $zero -/* 139640 80246300 246200FF */ addiu $v0, $v1, 0xff -.L80246304: -/* 139644 80246304 00021203 */ sra $v0, $v0, 8 -/* 139648 80246308 0040202D */ daddu $a0, $v0, $zero -/* 13964C 8024630C 00041200 */ sll $v0, $a0, 8 -/* 139650 80246310 00621023 */ subu $v0, $v1, $v0 -/* 139654 80246314 00021400 */ sll $v0, $v0, 0x10 -/* 139658 80246318 0002B403 */ sra $s6, $v0, 0x10 -/* 13965C 8024631C 06C10002 */ bgez $s6, .L80246328 -/* 139660 80246320 02C0102D */ daddu $v0, $s6, $zero -/* 139664 80246324 26C2001F */ addiu $v0, $s6, 0x1f -.L80246328: -/* 139668 80246328 0002B143 */ sra $s6, $v0, 5 -/* 13966C 8024632C 000410C0 */ sll $v0, $a0, 3 -/* 139670 80246330 02C2B021 */ addu $s6, $s6, $v0 -/* 139674 80246334 02B6102A */ slt $v0, $s5, $s6 -/* 139678 80246338 104000E7 */ beqz $v0, .L802466D8 -/* 13967C 8024633C 00000000 */ nop -.L80246340: -/* 139680 80246340 26730001 */ addiu $s3, $s3, 1 -/* 139684 80246344 00158080 */ sll $s0, $s5, 2 -/* 139688 80246348 3C058025 */ lui $a1, %hi(gPauseStatsSPIncElements) -/* 13968C 8024634C 00B02821 */ addu $a1, $a1, $s0 -/* 139690 80246350 8CA5F434 */ lw $a1, %lo(gPauseStatsSPIncElements)($a1) -/* 139694 80246354 0C0511FF */ jal hud_element_set_script -/* 139698 80246358 0220202D */ daddu $a0, $s1, $zero -/* 13969C 8024635C 0220202D */ daddu $a0, $s1, $zero -/* 1396A0 80246360 27C6004B */ addiu $a2, $fp, 0x4b -/* 1396A4 80246364 02158021 */ addu $s0, $s0, $s5 -/* 1396A8 80246368 00108080 */ sll $s0, $s0, 2 -/* 1396AC 8024636C 2610008C */ addiu $s0, $s0, 0x8c -/* 1396B0 80246370 8FA80084 */ lw $t0, 0x84($sp) -/* 1396B4 80246374 3C058025 */ lui $a1, %hi(D_8024F46C) -/* 1396B8 80246378 8CA5F46C */ lw $a1, %lo(D_8024F46C)($a1) -/* 1396BC 8024637C 01108021 */ addu $s0, $t0, $s0 -/* 1396C0 80246380 0C051261 */ jal hud_element_set_render_pos -/* 1396C4 80246384 02052821 */ addu $a1, $s0, $a1 -/* 1396C8 80246388 12800005 */ beqz $s4, .L802463A0 -/* 1396CC 8024638C 00000000 */ nop -/* 1396D0 80246390 0C0511F8 */ jal hud_element_draw_without_clipping -/* 1396D4 80246394 0220202D */ daddu $a0, $s1, $zero -/* 1396D8 80246398 080918EA */ j .L802463A8 -/* 1396DC 8024639C 0000A02D */ daddu $s4, $zero, $zero -.L802463A0: -/* 1396E0 802463A0 0C0511F1 */ jal hud_element_draw_next -/* 1396E4 802463A4 0220202D */ daddu $a0, $s1, $zero -.L802463A8: -/* 1396E8 802463A8 0276102A */ slt $v0, $s3, $s6 -/* 1396EC 802463AC 104000CA */ beqz $v0, .L802466D8 -/* 1396F0 802463B0 26520001 */ addiu $s2, $s2, 1 -/* 1396F4 802463B4 26730001 */ addiu $s3, $s3, 1 -/* 1396F8 802463B8 00158080 */ sll $s0, $s5, 2 -/* 1396FC 802463BC 3C058025 */ lui $a1, %hi(gPauseStatsSPIncElements) -/* 139700 802463C0 00B02821 */ addu $a1, $a1, $s0 -/* 139704 802463C4 8CA5F434 */ lw $a1, %lo(gPauseStatsSPIncElements)($a1) -/* 139708 802463C8 0C0511FF */ jal hud_element_set_script -/* 13970C 802463CC 0220202D */ daddu $a0, $s1, $zero -/* 139710 802463D0 0220202D */ daddu $a0, $s1, $zero -/* 139714 802463D4 27C6004B */ addiu $a2, $fp, 0x4b -/* 139718 802463D8 02158021 */ addu $s0, $s0, $s5 -/* 13971C 802463DC 00108080 */ sll $s0, $s0, 2 -/* 139720 802463E0 2610008C */ addiu $s0, $s0, 0x8c -/* 139724 802463E4 8FA80084 */ lw $t0, 0x84($sp) -/* 139728 802463E8 3C058025 */ lui $a1, %hi(D_8024F46C + 0x4) -/* 13972C 802463EC 8CA5F470 */ lw $a1, %lo(D_8024F46C + 0x4)($a1) -/* 139730 802463F0 01108021 */ addu $s0, $t0, $s0 -/* 139734 802463F4 0C051261 */ jal hud_element_set_render_pos -/* 139738 802463F8 02052821 */ addu $a1, $s0, $a1 -/* 13973C 802463FC 12800005 */ beqz $s4, .L80246414 -/* 139740 80246400 00000000 */ nop -/* 139744 80246404 0C0511F8 */ jal hud_element_draw_without_clipping -/* 139748 80246408 0220202D */ daddu $a0, $s1, $zero -/* 13974C 8024640C 08091907 */ j .L8024641C -/* 139750 80246410 0000A02D */ daddu $s4, $zero, $zero -.L80246414: -/* 139754 80246414 0C0511F1 */ jal hud_element_draw_next -/* 139758 80246418 0220202D */ daddu $a0, $s1, $zero -.L8024641C: -/* 13975C 8024641C 0276102A */ slt $v0, $s3, $s6 -/* 139760 80246420 104000AD */ beqz $v0, .L802466D8 -/* 139764 80246424 26520001 */ addiu $s2, $s2, 1 -/* 139768 80246428 26730001 */ addiu $s3, $s3, 1 -/* 13976C 8024642C 00158080 */ sll $s0, $s5, 2 -/* 139770 80246430 3C058025 */ lui $a1, %hi(gPauseStatsSPIncElements) -/* 139774 80246434 00B02821 */ addu $a1, $a1, $s0 -/* 139778 80246438 8CA5F434 */ lw $a1, %lo(gPauseStatsSPIncElements)($a1) -/* 13977C 8024643C 0C0511FF */ jal hud_element_set_script -/* 139780 80246440 0220202D */ daddu $a0, $s1, $zero -/* 139784 80246444 0220202D */ daddu $a0, $s1, $zero -/* 139788 80246448 27C6004B */ addiu $a2, $fp, 0x4b -/* 13978C 8024644C 02158021 */ addu $s0, $s0, $s5 -/* 139790 80246450 00108080 */ sll $s0, $s0, 2 -/* 139794 80246454 2610008C */ addiu $s0, $s0, 0x8c -/* 139798 80246458 8FA80084 */ lw $t0, 0x84($sp) -/* 13979C 8024645C 3C058025 */ lui $a1, %hi(D_8024F46C + 0x8) -/* 1397A0 80246460 8CA5F474 */ lw $a1, %lo(D_8024F46C + 0x8)($a1) -/* 1397A4 80246464 01108021 */ addu $s0, $t0, $s0 -/* 1397A8 80246468 0C051261 */ jal hud_element_set_render_pos -/* 1397AC 8024646C 02052821 */ addu $a1, $s0, $a1 -/* 1397B0 80246470 12800005 */ beqz $s4, .L80246488 -/* 1397B4 80246474 00000000 */ nop -/* 1397B8 80246478 0C0511F8 */ jal hud_element_draw_without_clipping -/* 1397BC 8024647C 0220202D */ daddu $a0, $s1, $zero -/* 1397C0 80246480 08091924 */ j .L80246490 -/* 1397C4 80246484 0000A02D */ daddu $s4, $zero, $zero -.L80246488: -/* 1397C8 80246488 0C0511F1 */ jal hud_element_draw_next -/* 1397CC 8024648C 0220202D */ daddu $a0, $s1, $zero -.L80246490: -/* 1397D0 80246490 0276102A */ slt $v0, $s3, $s6 -/* 1397D4 80246494 10400090 */ beqz $v0, .L802466D8 -/* 1397D8 80246498 26520001 */ addiu $s2, $s2, 1 -/* 1397DC 8024649C 26730001 */ addiu $s3, $s3, 1 -/* 1397E0 802464A0 00158080 */ sll $s0, $s5, 2 -/* 1397E4 802464A4 3C058025 */ lui $a1, %hi(gPauseStatsSPIncElements) -/* 1397E8 802464A8 00B02821 */ addu $a1, $a1, $s0 -/* 1397EC 802464AC 8CA5F434 */ lw $a1, %lo(gPauseStatsSPIncElements)($a1) -/* 1397F0 802464B0 0C0511FF */ jal hud_element_set_script -/* 1397F4 802464B4 0220202D */ daddu $a0, $s1, $zero -/* 1397F8 802464B8 0220202D */ daddu $a0, $s1, $zero -/* 1397FC 802464BC 27C6004B */ addiu $a2, $fp, 0x4b -/* 139800 802464C0 02158021 */ addu $s0, $s0, $s5 -/* 139804 802464C4 00108080 */ sll $s0, $s0, 2 -/* 139808 802464C8 2610008C */ addiu $s0, $s0, 0x8c -/* 13980C 802464CC 8FA80084 */ lw $t0, 0x84($sp) -/* 139810 802464D0 3C058025 */ lui $a1, %hi(D_8024F46C + 0xC) -/* 139814 802464D4 8CA5F478 */ lw $a1, %lo(D_8024F46C + 0xC)($a1) -/* 139818 802464D8 01108021 */ addu $s0, $t0, $s0 -/* 13981C 802464DC 0C051261 */ jal hud_element_set_render_pos -/* 139820 802464E0 02052821 */ addu $a1, $s0, $a1 -/* 139824 802464E4 12800005 */ beqz $s4, .L802464FC -/* 139828 802464E8 00000000 */ nop -/* 13982C 802464EC 0C0511F8 */ jal hud_element_draw_without_clipping -/* 139830 802464F0 0220202D */ daddu $a0, $s1, $zero -/* 139834 802464F4 08091941 */ j .L80246504 -/* 139838 802464F8 0000A02D */ daddu $s4, $zero, $zero -.L802464FC: -/* 13983C 802464FC 0C0511F1 */ jal hud_element_draw_next -/* 139840 80246500 0220202D */ daddu $a0, $s1, $zero -.L80246504: -/* 139844 80246504 0276102A */ slt $v0, $s3, $s6 -/* 139848 80246508 10400073 */ beqz $v0, .L802466D8 -/* 13984C 8024650C 26520001 */ addiu $s2, $s2, 1 -/* 139850 80246510 26730001 */ addiu $s3, $s3, 1 -/* 139854 80246514 00158080 */ sll $s0, $s5, 2 -/* 139858 80246518 3C058025 */ lui $a1, %hi(gPauseStatsSPIncElements) -/* 13985C 8024651C 00B02821 */ addu $a1, $a1, $s0 -/* 139860 80246520 8CA5F434 */ lw $a1, %lo(gPauseStatsSPIncElements)($a1) -/* 139864 80246524 0C0511FF */ jal hud_element_set_script -/* 139868 80246528 0220202D */ daddu $a0, $s1, $zero -/* 13986C 8024652C 0220202D */ daddu $a0, $s1, $zero -/* 139870 80246530 27C6004B */ addiu $a2, $fp, 0x4b -/* 139874 80246534 02158021 */ addu $s0, $s0, $s5 -/* 139878 80246538 00108080 */ sll $s0, $s0, 2 -/* 13987C 8024653C 2610008C */ addiu $s0, $s0, 0x8c -/* 139880 80246540 8FA80084 */ lw $t0, 0x84($sp) -/* 139884 80246544 3C058025 */ lui $a1, %hi(D_8024F46C + 0x10) -/* 139888 80246548 8CA5F47C */ lw $a1, %lo(D_8024F46C + 0x10)($a1) -/* 13988C 8024654C 01108021 */ addu $s0, $t0, $s0 -/* 139890 80246550 0C051261 */ jal hud_element_set_render_pos -/* 139894 80246554 02052821 */ addu $a1, $s0, $a1 -/* 139898 80246558 12800005 */ beqz $s4, .L80246570 -/* 13989C 8024655C 00000000 */ nop -/* 1398A0 80246560 0C0511F8 */ jal hud_element_draw_without_clipping -/* 1398A4 80246564 0220202D */ daddu $a0, $s1, $zero -/* 1398A8 80246568 0809195E */ j .L80246578 -/* 1398AC 8024656C 0000A02D */ daddu $s4, $zero, $zero -.L80246570: -/* 1398B0 80246570 0C0511F1 */ jal hud_element_draw_next -/* 1398B4 80246574 0220202D */ daddu $a0, $s1, $zero -.L80246578: -/* 1398B8 80246578 0276102A */ slt $v0, $s3, $s6 -/* 1398BC 8024657C 10400056 */ beqz $v0, .L802466D8 -/* 1398C0 80246580 26520001 */ addiu $s2, $s2, 1 -/* 1398C4 80246584 26730001 */ addiu $s3, $s3, 1 -/* 1398C8 80246588 00158080 */ sll $s0, $s5, 2 -/* 1398CC 8024658C 3C058025 */ lui $a1, %hi(gPauseStatsSPIncElements) -/* 1398D0 80246590 00B02821 */ addu $a1, $a1, $s0 -/* 1398D4 80246594 8CA5F434 */ lw $a1, %lo(gPauseStatsSPIncElements)($a1) -/* 1398D8 80246598 0C0511FF */ jal hud_element_set_script -/* 1398DC 8024659C 0220202D */ daddu $a0, $s1, $zero -/* 1398E0 802465A0 0220202D */ daddu $a0, $s1, $zero -/* 1398E4 802465A4 27C6004B */ addiu $a2, $fp, 0x4b -/* 1398E8 802465A8 02158021 */ addu $s0, $s0, $s5 -/* 1398EC 802465AC 00108080 */ sll $s0, $s0, 2 -/* 1398F0 802465B0 2610008C */ addiu $s0, $s0, 0x8c -/* 1398F4 802465B4 8FA80084 */ lw $t0, 0x84($sp) -/* 1398F8 802465B8 3C058025 */ lui $a1, %hi(D_8024F46C + 0x14) -/* 1398FC 802465BC 8CA5F480 */ lw $a1, %lo(D_8024F46C + 0x14)($a1) -/* 139900 802465C0 01108021 */ addu $s0, $t0, $s0 -/* 139904 802465C4 0C051261 */ jal hud_element_set_render_pos -/* 139908 802465C8 02052821 */ addu $a1, $s0, $a1 -/* 13990C 802465CC 12800005 */ beqz $s4, .L802465E4 -/* 139910 802465D0 00000000 */ nop -/* 139914 802465D4 0C0511F8 */ jal hud_element_draw_without_clipping -/* 139918 802465D8 0220202D */ daddu $a0, $s1, $zero -/* 13991C 802465DC 0809197B */ j .L802465EC -/* 139920 802465E0 0000A02D */ daddu $s4, $zero, $zero -.L802465E4: -/* 139924 802465E4 0C0511F1 */ jal hud_element_draw_next -/* 139928 802465E8 0220202D */ daddu $a0, $s1, $zero -.L802465EC: -/* 13992C 802465EC 0276102A */ slt $v0, $s3, $s6 -/* 139930 802465F0 10400039 */ beqz $v0, .L802466D8 -/* 139934 802465F4 26520001 */ addiu $s2, $s2, 1 -/* 139938 802465F8 26730001 */ addiu $s3, $s3, 1 -/* 13993C 802465FC 00158080 */ sll $s0, $s5, 2 -/* 139940 80246600 3C058025 */ lui $a1, %hi(gPauseStatsSPIncElements) -/* 139944 80246604 00B02821 */ addu $a1, $a1, $s0 -/* 139948 80246608 8CA5F434 */ lw $a1, %lo(gPauseStatsSPIncElements)($a1) -/* 13994C 8024660C 0C0511FF */ jal hud_element_set_script -/* 139950 80246610 0220202D */ daddu $a0, $s1, $zero -/* 139954 80246614 0220202D */ daddu $a0, $s1, $zero -/* 139958 80246618 27C6004B */ addiu $a2, $fp, 0x4b -/* 13995C 8024661C 02158021 */ addu $s0, $s0, $s5 -/* 139960 80246620 00108080 */ sll $s0, $s0, 2 -/* 139964 80246624 2610008C */ addiu $s0, $s0, 0x8c -/* 139968 80246628 8FA80084 */ lw $t0, 0x84($sp) -/* 13996C 8024662C 3C058025 */ lui $a1, %hi(D_8024F46C + 0x18) -/* 139970 80246630 8CA5F484 */ lw $a1, %lo(D_8024F46C + 0x18)($a1) -/* 139974 80246634 01108021 */ addu $s0, $t0, $s0 -/* 139978 80246638 0C051261 */ jal hud_element_set_render_pos -/* 13997C 8024663C 02052821 */ addu $a1, $s0, $a1 -/* 139980 80246640 12800005 */ beqz $s4, .L80246658 -/* 139984 80246644 00000000 */ nop -/* 139988 80246648 0C0511F8 */ jal hud_element_draw_without_clipping -/* 13998C 8024664C 0220202D */ daddu $a0, $s1, $zero -/* 139990 80246650 08091998 */ j .L80246660 -/* 139994 80246654 0000A02D */ daddu $s4, $zero, $zero -.L80246658: -/* 139998 80246658 0C0511F1 */ jal hud_element_draw_next -/* 13999C 8024665C 0220202D */ daddu $a0, $s1, $zero -.L80246660: -/* 1399A0 80246660 0276102A */ slt $v0, $s3, $s6 -/* 1399A4 80246664 1040001C */ beqz $v0, .L802466D8 -/* 1399A8 80246668 26520001 */ addiu $s2, $s2, 1 -/* 1399AC 8024666C 26730001 */ addiu $s3, $s3, 1 -/* 1399B0 80246670 00158080 */ sll $s0, $s5, 2 -/* 1399B4 80246674 3C058025 */ lui $a1, %hi(gPauseStatsStarElements) -/* 1399B8 80246678 00B02821 */ addu $a1, $a1, $s0 -/* 1399BC 8024667C 8CA5F450 */ lw $a1, %lo(gPauseStatsStarElements)($a1) -/* 1399C0 80246680 0C0511FF */ jal hud_element_set_script -/* 1399C4 80246684 0220202D */ daddu $a0, $s1, $zero -/* 1399C8 80246688 0220202D */ daddu $a0, $s1, $zero -/* 1399CC 8024668C 02158021 */ addu $s0, $s0, $s5 -/* 1399D0 80246690 00108080 */ sll $s0, $s0, 2 -/* 1399D4 80246694 26100098 */ addiu $s0, $s0, 0x98 -/* 1399D8 80246698 8FA80084 */ lw $t0, 0x84($sp) -/* 1399DC 8024669C 27C6004D */ addiu $a2, $fp, 0x4d -/* 1399E0 802466A0 0C051261 */ jal hud_element_set_render_pos -/* 1399E4 802466A4 01102821 */ addu $a1, $t0, $s0 -/* 1399E8 802466A8 12800005 */ beqz $s4, .L802466C0 -/* 1399EC 802466AC 00000000 */ nop -/* 1399F0 802466B0 0C0511F8 */ jal hud_element_draw_without_clipping -/* 1399F4 802466B4 0220202D */ daddu $a0, $s1, $zero -/* 1399F8 802466B8 080919B2 */ j .L802466C8 -/* 1399FC 802466BC 0000A02D */ daddu $s4, $zero, $zero -.L802466C0: -/* 139A00 802466C0 0C0511F1 */ jal hud_element_draw_next -/* 139A04 802466C4 0220202D */ daddu $a0, $s1, $zero -.L802466C8: -/* 139A08 802466C8 0000902D */ daddu $s2, $zero, $zero -/* 139A0C 802466CC 0276102A */ slt $v0, $s3, $s6 -/* 139A10 802466D0 1440FF1B */ bnez $v0, .L80246340 -/* 139A14 802466D4 26B50001 */ addiu $s5, $s5, 1 -.L802466D8: -/* 139A18 802466D8 82E4028E */ lb $a0, 0x28e($s7) -/* 139A1C 802466DC 3C178025 */ lui $s7, %hi(D_8024F46C) -/* 139A20 802466E0 26F7F46C */ addiu $s7, $s7, %lo(D_8024F46C) -/* 139A24 802466E4 00151080 */ sll $v0, $s5, 2 -/* 139A28 802466E8 00551021 */ addu $v0, $v0, $s5 -/* 139A2C 802466EC 00021080 */ sll $v0, $v0, 2 -/* 139A30 802466F0 24550098 */ addiu $s5, $v0, 0x98 -/* 139A34 802466F4 2450008C */ addiu $s0, $v0, 0x8c -/* 139A38 802466F8 0004B0C0 */ sll $s6, $a0, 3 -.L802466FC: -/* 139A3C 802466FC 0276102A */ slt $v0, $s3, $s6 -/* 139A40 80246700 104000D2 */ beqz $v0, .L80246A4C -/* 139A44 80246704 00000000 */ nop -/* 139A48 80246708 1640001A */ bnez $s2, .L80246774 -/* 139A4C 8024670C 24020001 */ addiu $v0, $zero, 1 -/* 139A50 80246710 26730001 */ addiu $s3, $s3, 1 -/* 139A54 80246714 3C058011 */ lui $a1, %hi(HES_StatusSPEmptyIncrement) -/* 139A58 80246718 24A583B0 */ addiu $a1, $a1, %lo(HES_StatusSPEmptyIncrement) -/* 139A5C 8024671C 0C0511FF */ jal hud_element_set_script -/* 139A60 80246720 0220202D */ daddu $a0, $s1, $zero -/* 139A64 80246724 0220202D */ daddu $a0, $s1, $zero -/* 139A68 80246728 27C6004B */ addiu $a2, $fp, 0x4b -/* 139A6C 8024672C 8FA80084 */ lw $t0, 0x84($sp) -/* 139A70 80246730 3C028025 */ lui $v0, %hi(D_8024F46C) -/* 139A74 80246734 8C42F46C */ lw $v0, %lo(D_8024F46C)($v0) -/* 139A78 80246738 01102821 */ addu $a1, $t0, $s0 -/* 139A7C 8024673C 0C051261 */ jal hud_element_set_render_pos -/* 139A80 80246740 00A22821 */ addu $a1, $a1, $v0 -/* 139A84 80246744 12800005 */ beqz $s4, .L8024675C -/* 139A88 80246748 00000000 */ nop -/* 139A8C 8024674C 0C0511F8 */ jal hud_element_draw_without_clipping -/* 139A90 80246750 0220202D */ daddu $a0, $s1, $zero -/* 139A94 80246754 080919D9 */ j .L80246764 -/* 139A98 80246758 0000A02D */ daddu $s4, $zero, $zero -.L8024675C: -/* 139A9C 8024675C 0C0511F1 */ jal hud_element_draw_next -/* 139AA0 80246760 0220202D */ daddu $a0, $s1, $zero -.L80246764: -/* 139AA4 80246764 0276102A */ slt $v0, $s3, $s6 -/* 139AA8 80246768 104000B8 */ beqz $v0, .L80246A4C -/* 139AAC 8024676C 26520001 */ addiu $s2, $s2, 1 -/* 139AB0 80246770 24020001 */ addiu $v0, $zero, 1 -.L80246774: -/* 139AB4 80246774 56420019 */ bnel $s2, $v0, .L802467DC -/* 139AB8 80246778 24020002 */ addiu $v0, $zero, 2 -/* 139ABC 8024677C 02629821 */ addu $s3, $s3, $v0 -/* 139AC0 80246780 3C058011 */ lui $a1, %hi(HES_StatusSPEmptyIncrement) -/* 139AC4 80246784 24A583B0 */ addiu $a1, $a1, %lo(HES_StatusSPEmptyIncrement) -/* 139AC8 80246788 0C0511FF */ jal hud_element_set_script -/* 139ACC 8024678C 0220202D */ daddu $a0, $s1, $zero -/* 139AD0 80246790 0220202D */ daddu $a0, $s1, $zero -/* 139AD4 80246794 27C6004B */ addiu $a2, $fp, 0x4b -/* 139AD8 80246798 8FA80084 */ lw $t0, 0x84($sp) -/* 139ADC 8024679C 8EE20004 */ lw $v0, 4($s7) -/* 139AE0 802467A0 01102821 */ addu $a1, $t0, $s0 -/* 139AE4 802467A4 0C051261 */ jal hud_element_set_render_pos -/* 139AE8 802467A8 00A22821 */ addu $a1, $a1, $v0 -/* 139AEC 802467AC 12800005 */ beqz $s4, .L802467C4 -/* 139AF0 802467B0 00000000 */ nop -/* 139AF4 802467B4 0C0511F8 */ jal hud_element_draw_without_clipping -/* 139AF8 802467B8 0220202D */ daddu $a0, $s1, $zero -/* 139AFC 802467BC 080919F3 */ j .L802467CC -/* 139B00 802467C0 0000A02D */ daddu $s4, $zero, $zero -.L802467C4: -/* 139B04 802467C4 0C0511F1 */ jal hud_element_draw_next -/* 139B08 802467C8 0220202D */ daddu $a0, $s1, $zero -.L802467CC: -/* 139B0C 802467CC 0276102A */ slt $v0, $s3, $s6 -/* 139B10 802467D0 1040009E */ beqz $v0, .L80246A4C -/* 139B14 802467D4 26520001 */ addiu $s2, $s2, 1 -/* 139B18 802467D8 24020002 */ addiu $v0, $zero, 2 -.L802467DC: -/* 139B1C 802467DC 16420019 */ bne $s2, $v0, .L80246844 -/* 139B20 802467E0 24020003 */ addiu $v0, $zero, 3 -/* 139B24 802467E4 26730001 */ addiu $s3, $s3, 1 -/* 139B28 802467E8 3C058011 */ lui $a1, %hi(HES_StatusSPEmptyIncrement) -/* 139B2C 802467EC 24A583B0 */ addiu $a1, $a1, %lo(HES_StatusSPEmptyIncrement) -/* 139B30 802467F0 0C0511FF */ jal hud_element_set_script -/* 139B34 802467F4 0220202D */ daddu $a0, $s1, $zero -/* 139B38 802467F8 0220202D */ daddu $a0, $s1, $zero -/* 139B3C 802467FC 27C6004B */ addiu $a2, $fp, 0x4b -/* 139B40 80246800 8FA80084 */ lw $t0, 0x84($sp) -/* 139B44 80246804 8EE20008 */ lw $v0, 8($s7) -/* 139B48 80246808 01102821 */ addu $a1, $t0, $s0 -/* 139B4C 8024680C 0C051261 */ jal hud_element_set_render_pos -/* 139B50 80246810 00A22821 */ addu $a1, $a1, $v0 -/* 139B54 80246814 12800005 */ beqz $s4, .L8024682C -/* 139B58 80246818 00000000 */ nop -/* 139B5C 8024681C 0C0511F8 */ jal hud_element_draw_without_clipping -/* 139B60 80246820 0220202D */ daddu $a0, $s1, $zero -/* 139B64 80246824 08091A0D */ j .L80246834 -/* 139B68 80246828 0000A02D */ daddu $s4, $zero, $zero -.L8024682C: -/* 139B6C 8024682C 0C0511F1 */ jal hud_element_draw_next -/* 139B70 80246830 0220202D */ daddu $a0, $s1, $zero -.L80246834: -/* 139B74 80246834 0276102A */ slt $v0, $s3, $s6 -/* 139B78 80246838 10400084 */ beqz $v0, .L80246A4C -/* 139B7C 8024683C 26520001 */ addiu $s2, $s2, 1 -/* 139B80 80246840 24020003 */ addiu $v0, $zero, 3 -.L80246844: -/* 139B84 80246844 16420019 */ bne $s2, $v0, .L802468AC -/* 139B88 80246848 24020004 */ addiu $v0, $zero, 4 -/* 139B8C 8024684C 26730001 */ addiu $s3, $s3, 1 -/* 139B90 80246850 3C058011 */ lui $a1, %hi(HES_StatusSPEmptyIncrement) -/* 139B94 80246854 24A583B0 */ addiu $a1, $a1, %lo(HES_StatusSPEmptyIncrement) -/* 139B98 80246858 0C0511FF */ jal hud_element_set_script -/* 139B9C 8024685C 0220202D */ daddu $a0, $s1, $zero -/* 139BA0 80246860 0220202D */ daddu $a0, $s1, $zero -/* 139BA4 80246864 27C6004B */ addiu $a2, $fp, 0x4b -/* 139BA8 80246868 8FA80084 */ lw $t0, 0x84($sp) -/* 139BAC 8024686C 8EE2000C */ lw $v0, 0xc($s7) -/* 139BB0 80246870 01102821 */ addu $a1, $t0, $s0 -/* 139BB4 80246874 0C051261 */ jal hud_element_set_render_pos -/* 139BB8 80246878 00A22821 */ addu $a1, $a1, $v0 -/* 139BBC 8024687C 12800005 */ beqz $s4, .L80246894 -/* 139BC0 80246880 00000000 */ nop -/* 139BC4 80246884 0C0511F8 */ jal hud_element_draw_without_clipping -/* 139BC8 80246888 0220202D */ daddu $a0, $s1, $zero -/* 139BCC 8024688C 08091A27 */ j .L8024689C -/* 139BD0 80246890 0000A02D */ daddu $s4, $zero, $zero -.L80246894: -/* 139BD4 80246894 0C0511F1 */ jal hud_element_draw_next -/* 139BD8 80246898 0220202D */ daddu $a0, $s1, $zero -.L8024689C: -/* 139BDC 8024689C 0276102A */ slt $v0, $s3, $s6 -/* 139BE0 802468A0 1040006A */ beqz $v0, .L80246A4C -/* 139BE4 802468A4 26520001 */ addiu $s2, $s2, 1 -/* 139BE8 802468A8 24020004 */ addiu $v0, $zero, 4 -.L802468AC: -/* 139BEC 802468AC 16420019 */ bne $s2, $v0, .L80246914 -/* 139BF0 802468B0 24020005 */ addiu $v0, $zero, 5 -/* 139BF4 802468B4 26730001 */ addiu $s3, $s3, 1 -/* 139BF8 802468B8 3C058011 */ lui $a1, %hi(HES_StatusSPEmptyIncrement) -/* 139BFC 802468BC 24A583B0 */ addiu $a1, $a1, %lo(HES_StatusSPEmptyIncrement) -/* 139C00 802468C0 0C0511FF */ jal hud_element_set_script -/* 139C04 802468C4 0220202D */ daddu $a0, $s1, $zero -/* 139C08 802468C8 0220202D */ daddu $a0, $s1, $zero -/* 139C0C 802468CC 27C6004B */ addiu $a2, $fp, 0x4b -/* 139C10 802468D0 8FA80084 */ lw $t0, 0x84($sp) -/* 139C14 802468D4 8EE20010 */ lw $v0, 0x10($s7) -/* 139C18 802468D8 01102821 */ addu $a1, $t0, $s0 -/* 139C1C 802468DC 0C051261 */ jal hud_element_set_render_pos -/* 139C20 802468E0 00A22821 */ addu $a1, $a1, $v0 -/* 139C24 802468E4 12800005 */ beqz $s4, .L802468FC -/* 139C28 802468E8 00000000 */ nop -/* 139C2C 802468EC 0C0511F8 */ jal hud_element_draw_without_clipping -/* 139C30 802468F0 0220202D */ daddu $a0, $s1, $zero -/* 139C34 802468F4 08091A41 */ j .L80246904 -/* 139C38 802468F8 0000A02D */ daddu $s4, $zero, $zero -.L802468FC: -/* 139C3C 802468FC 0C0511F1 */ jal hud_element_draw_next -/* 139C40 80246900 0220202D */ daddu $a0, $s1, $zero -.L80246904: -/* 139C44 80246904 0276102A */ slt $v0, $s3, $s6 -/* 139C48 80246908 10400050 */ beqz $v0, .L80246A4C -/* 139C4C 8024690C 26520001 */ addiu $s2, $s2, 1 -/* 139C50 80246910 24020005 */ addiu $v0, $zero, 5 -.L80246914: -/* 139C54 80246914 16420019 */ bne $s2, $v0, .L8024697C -/* 139C58 80246918 24020006 */ addiu $v0, $zero, 6 -/* 139C5C 8024691C 26730001 */ addiu $s3, $s3, 1 -/* 139C60 80246920 3C058011 */ lui $a1, %hi(HES_StatusSPEmptyIncrement) -/* 139C64 80246924 24A583B0 */ addiu $a1, $a1, %lo(HES_StatusSPEmptyIncrement) -/* 139C68 80246928 0C0511FF */ jal hud_element_set_script -/* 139C6C 8024692C 0220202D */ daddu $a0, $s1, $zero -/* 139C70 80246930 0220202D */ daddu $a0, $s1, $zero -/* 139C74 80246934 27C6004B */ addiu $a2, $fp, 0x4b -/* 139C78 80246938 8FA80084 */ lw $t0, 0x84($sp) -/* 139C7C 8024693C 8EE20014 */ lw $v0, 0x14($s7) -/* 139C80 80246940 01102821 */ addu $a1, $t0, $s0 -/* 139C84 80246944 0C051261 */ jal hud_element_set_render_pos -/* 139C88 80246948 00A22821 */ addu $a1, $a1, $v0 -/* 139C8C 8024694C 12800005 */ beqz $s4, .L80246964 -/* 139C90 80246950 00000000 */ nop -/* 139C94 80246954 0C0511F8 */ jal hud_element_draw_without_clipping -/* 139C98 80246958 0220202D */ daddu $a0, $s1, $zero -/* 139C9C 8024695C 08091A5B */ j .L8024696C -/* 139CA0 80246960 0000A02D */ daddu $s4, $zero, $zero -.L80246964: -/* 139CA4 80246964 0C0511F1 */ jal hud_element_draw_next -/* 139CA8 80246968 0220202D */ daddu $a0, $s1, $zero -.L8024696C: -/* 139CAC 8024696C 0276102A */ slt $v0, $s3, $s6 -/* 139CB0 80246970 10400036 */ beqz $v0, .L80246A4C -/* 139CB4 80246974 26520001 */ addiu $s2, $s2, 1 -/* 139CB8 80246978 24020006 */ addiu $v0, $zero, 6 -.L8024697C: -/* 139CBC 8024697C 16420019 */ bne $s2, $v0, .L802469E4 -/* 139CC0 80246980 24020007 */ addiu $v0, $zero, 7 -/* 139CC4 80246984 26730001 */ addiu $s3, $s3, 1 -/* 139CC8 80246988 3C058011 */ lui $a1, %hi(HES_StatusSPEmptyIncrement) -/* 139CCC 8024698C 24A583B0 */ addiu $a1, $a1, %lo(HES_StatusSPEmptyIncrement) -/* 139CD0 80246990 0C0511FF */ jal hud_element_set_script -/* 139CD4 80246994 0220202D */ daddu $a0, $s1, $zero -/* 139CD8 80246998 0220202D */ daddu $a0, $s1, $zero -/* 139CDC 8024699C 27C6004B */ addiu $a2, $fp, 0x4b -/* 139CE0 802469A0 8FA80084 */ lw $t0, 0x84($sp) -/* 139CE4 802469A4 8EE20018 */ lw $v0, 0x18($s7) -/* 139CE8 802469A8 01102821 */ addu $a1, $t0, $s0 -/* 139CEC 802469AC 0C051261 */ jal hud_element_set_render_pos -/* 139CF0 802469B0 00A22821 */ addu $a1, $a1, $v0 -/* 139CF4 802469B4 12800005 */ beqz $s4, .L802469CC -/* 139CF8 802469B8 00000000 */ nop -/* 139CFC 802469BC 0C0511F8 */ jal hud_element_draw_without_clipping -/* 139D00 802469C0 0220202D */ daddu $a0, $s1, $zero -/* 139D04 802469C4 08091A75 */ j .L802469D4 -/* 139D08 802469C8 0000A02D */ daddu $s4, $zero, $zero -.L802469CC: -/* 139D0C 802469CC 0C0511F1 */ jal hud_element_draw_next -/* 139D10 802469D0 0220202D */ daddu $a0, $s1, $zero -.L802469D4: -/* 139D14 802469D4 0276102A */ slt $v0, $s3, $s6 -/* 139D18 802469D8 1040001C */ beqz $v0, .L80246A4C -/* 139D1C 802469DC 26520001 */ addiu $s2, $s2, 1 -/* 139D20 802469E0 24020007 */ addiu $v0, $zero, 7 -.L802469E4: -/* 139D24 802469E4 56420016 */ bnel $s2, $v0, .L80246A40 -/* 139D28 802469E8 0000902D */ daddu $s2, $zero, $zero -/* 139D2C 802469EC 26730001 */ addiu $s3, $s3, 1 -/* 139D30 802469F0 3C058011 */ lui $a1, %hi(HES_StatusStarEmpty) -/* 139D34 802469F4 24A584F0 */ addiu $a1, $a1, %lo(HES_StatusStarEmpty) -/* 139D38 802469F8 0C0511FF */ jal hud_element_set_script -/* 139D3C 802469FC 0220202D */ daddu $a0, $s1, $zero -/* 139D40 80246A00 0220202D */ daddu $a0, $s1, $zero -/* 139D44 80246A04 8FA80084 */ lw $t0, 0x84($sp) -/* 139D48 80246A08 27C6004D */ addiu $a2, $fp, 0x4d -/* 139D4C 80246A0C 0C051261 */ jal hud_element_set_render_pos -/* 139D50 80246A10 01152821 */ addu $a1, $t0, $s5 -/* 139D54 80246A14 12800005 */ beqz $s4, .L80246A2C -/* 139D58 80246A18 00000000 */ nop -/* 139D5C 80246A1C 0C0511F8 */ jal hud_element_draw_without_clipping -/* 139D60 80246A20 0220202D */ daddu $a0, $s1, $zero -/* 139D64 80246A24 08091A8D */ j .L80246A34 -/* 139D68 80246A28 0000A02D */ daddu $s4, $zero, $zero -.L80246A2C: -/* 139D6C 80246A2C 0C0511F1 */ jal hud_element_draw_next -/* 139D70 80246A30 0220202D */ daddu $a0, $s1, $zero -.L80246A34: -/* 139D74 80246A34 0276102A */ slt $v0, $s3, $s6 -/* 139D78 80246A38 10400004 */ beqz $v0, .L80246A4C -/* 139D7C 80246A3C 0000902D */ daddu $s2, $zero, $zero -.L80246A40: -/* 139D80 80246A40 26B50014 */ addiu $s5, $s5, 0x14 -/* 139D84 80246A44 080919BF */ j .L802466FC -/* 139D88 80246A48 26100014 */ addiu $s0, $s0, 0x14 -.L80246A4C: -/* 139D8C 80246A4C 3C038027 */ lui $v1, %hi(gPauseMenuCurrentTab) -/* 139D90 80246A50 806300D4 */ lb $v1, %lo(gPauseMenuCurrentTab)($v1) -/* 139D94 80246A54 24020001 */ addiu $v0, $zero, 1 -/* 139D98 80246A58 1462000F */ bne $v1, $v0, .L80246A98 -/* 139D9C 80246A5C 2404001F */ addiu $a0, $zero, 0x1f -/* 139DA0 80246A60 8FA80080 */ lw $t0, 0x80($sp) -/* 139DA4 80246A64 3C058025 */ lui $a1, %hi(gStatsMenuEntries) -/* 139DA8 80246A68 24A5F3B0 */ addiu $a1, $a1, %lo(gStatsMenuEntries) -/* 139DAC 80246A6C 91030003 */ lbu $v1, 3($t0) -/* 139DB0 80246A70 8FA80084 */ lw $t0, 0x84($sp) -/* 139DB4 80246A74 00431004 */ sllv $v0, $v1, $v0 -/* 139DB8 80246A78 00431021 */ addu $v0, $v0, $v1 -/* 139DBC 80246A7C 00021080 */ sll $v0, $v0, 2 -/* 139DC0 80246A80 00451021 */ addu $v0, $v0, $a1 -/* 139DC4 80246A84 8C450000 */ lw $a1, ($v0) -/* 139DC8 80246A88 8C460004 */ lw $a2, 4($v0) -/* 139DCC 80246A8C 01052821 */ addu $a1, $t0, $a1 -/* 139DD0 80246A90 0C090B41 */ jal pause_set_cursor_pos -/* 139DD4 80246A94 03C63021 */ addu $a2, $fp, $a2 -.L80246A98: -/* 139DD8 80246A98 8FBF007C */ lw $ra, 0x7c($sp) -/* 139DDC 80246A9C 8FBE0078 */ lw $fp, 0x78($sp) -/* 139DE0 80246AA0 8FB70074 */ lw $s7, 0x74($sp) -/* 139DE4 80246AA4 8FB60070 */ lw $s6, 0x70($sp) -/* 139DE8 80246AA8 8FB5006C */ lw $s5, 0x6c($sp) -/* 139DEC 80246AAC 8FB40068 */ lw $s4, 0x68($sp) -/* 139DF0 80246AB0 8FB30064 */ lw $s3, 0x64($sp) -/* 139DF4 80246AB4 8FB20060 */ lw $s2, 0x60($sp) -/* 139DF8 80246AB8 8FB1005C */ lw $s1, 0x5c($sp) -/* 139DFC 80246ABC 8FB00058 */ lw $s0, 0x58($sp) -/* 139E00 80246AC0 03E00008 */ jr $ra -/* 139E04 80246AC4 27BD0080 */ addiu $sp, $sp, 0x80