From 51d02cfbf53b87997474c20f5539fce6faf80da0 Mon Sep 17 00:00:00 2001 From: HailSanta <53960937+HailSanta@users.noreply.github.com> Date: Fri, 26 Aug 2022 06:13:57 -0400 Subject: [PATCH] actor decor stuff (#750) * big func * this and that * checkpoint * more funcs * enough * formatting Co-authored-by: HailSanta Co-authored-by: Ethan Roseman --- include/common_structs.h | 87 +- include/effects.h | 28 +- include/effects_internal.h | 2 +- include/enums.h | 2 +- include/functions.h | 22 +- src/16F740.c | 38 +- src/16c8e0.c | 32 +- src/17D6A0.c | 116 +- src/17FEB0.c | 12 +- src/181810.c | 8 +- src/182B30.c | 2237 ++++++++++++----- src/190B20.c | 86 +- src/19FAF0.c | 4 +- src/1A5830.c | 16 +- src/1AC760.c | 2 +- src/actor_api.c | 3 +- src/battle/action_cmd/air_lift.c | 2 +- src/battle/action_cmd/bomb.c | 2 +- src/battle/action_cmd/dizzy_shell.c | 8 +- src/battle/action_cmd/hurricane.c | 12 +- src/battle/action_cmd/mega_shock.c | 12 +- src/battle/action_cmd/power_shock.c | 2 +- src/battle/action_cmd/smack.c | 4 +- src/battle/action_cmd/spook.c | 12 +- src/battle/action_cmd/water_block.c | 6 +- src/battle/action_cmd/whirlwind.c | 93 +- src/battle/item/food.c | 4 +- src/battle/item/hustle_drink.c | 6 +- src/battle/item/life_shroom.c | 4 +- src/battle/item/mushroom.c | 4 +- src/battle/item/sleepy_sheep.c | 4 +- src/battle/item/super_soda.c | 6 +- src/battle/item/tasty_tonic.c | 2 +- src/battle/partner/bow.c | 2 +- src/battle/partner/kooper.c | 4 +- src/battle/partner/lakilester.c | 2 +- src/battle/partner/parakarry.c | 2 +- src/battle/partner/sushie.c | 2 +- src/battle/partner/watt.c | 6 +- src/battle/star/refresh/78B600.c | 2 +- src/common/MashActionCommandInit.inc.c | 2 +- src/d0a70_len_4fe0.c | 2 +- src/effects/partner_buff.c | 182 +- src/npc.c | 56 +- src/sprite.c | 18 +- src/sprite.h | 2 + src/status_icons.c | 20 +- ...nc_80257DA4.s => appendGfx_player_actor.s} | 2 +- .../asm/nonmatchings/182B30/func_80255FE0.s | 1237 --------- .../asm/nonmatchings/182B30/func_80259494.s | 38 - .../asm/nonmatchings/182B30/func_8025950C.s | 125 - .../asm/nonmatchings/182B30/func_802597B0.s | 123 - .../asm/nonmatchings/182B30/func_8025BAA0.s | 453 ---- .../asm/nonmatchings/182B30/func_8025C120.s | 497 ---- .../effects/partner_buff/func_E011A3A0.s | 11 - .../effects/partner_buff/func_E011A48C.s | 179 -- .../effects/partner_buff/partner_buff_main.s | 73 - .../partner_buff/partner_buff_update.s | 197 -- ver/us/symbol_addrs.txt | 26 +- 59 files changed, 2198 insertions(+), 3943 deletions(-) rename ver/us/asm/nonmatchings/182B30/{func_80257DA4.s => appendGfx_player_actor.s} (99%) delete mode 100644 ver/us/asm/nonmatchings/182B30/func_80255FE0.s delete mode 100644 ver/us/asm/nonmatchings/182B30/func_80259494.s delete mode 100644 ver/us/asm/nonmatchings/182B30/func_8025950C.s delete mode 100644 ver/us/asm/nonmatchings/182B30/func_802597B0.s delete mode 100644 ver/us/asm/nonmatchings/182B30/func_8025BAA0.s delete mode 100644 ver/us/asm/nonmatchings/182B30/func_8025C120.s delete mode 100644 ver/us/asm/nonmatchings/effects/partner_buff/func_E011A3A0.s delete mode 100644 ver/us/asm/nonmatchings/effects/partner_buff/func_E011A48C.s delete mode 100644 ver/us/asm/nonmatchings/effects/partner_buff/partner_buff_main.s delete mode 100644 ver/us/asm/nonmatchings/effects/partner_buff/partner_buff_update.s diff --git a/include/common_structs.h b/include/common_structs.h index 05ed26a715..6a1d8c6517 100644 --- a/include/common_structs.h +++ b/include/common_structs.h @@ -168,8 +168,6 @@ typedef struct NpcQuizmoBlur { /* 0x04 */ char unk_04[0x4]; } NpcQuizmoBlur; // size = 0x8; -typedef u16 Palette16[16]; // size = 0x20 - typedef struct Npc { /* 0x000 */ s32 flags; /* 0x004 */ void (*onUpdate)(struct Npc*); ///< Run before anything else for this NPC in update_npcs() @@ -225,7 +223,7 @@ typedef struct Npc { /* 0x0AC */ u8 alpha; /* 0x0AD */ u8 alpha2; ///< Multiplied with Npc::alpha /* 0x0AE */ char unk_AE[2]; - /* 0x0B0 */ u32** extraAnimList; + /* 0x0B0 */ AnimID** extraAnimList; /* 0x0B4 */ s8 palSwapType; // 0..4 inclusive /* 0x0B5 */ s8 palSwapPrevType; /* 0x0B6 */ s8 dirtyPalettes; @@ -237,8 +235,8 @@ typedef struct Npc { /* 0x0C1 */ s8 paletteCount; /* 0x0C2 */ char unk_C2[2]; /* 0x0C4 */ PAL_PTR* spritePaletteList; - /* 0x0C8 */ Palette16 localPaletteData[16]; - /* 0x2C8 */ Palette16* localPalettes[16]; + /* 0x0C8 */ PAL_BIN localPaletteData[16][16]; + /* 0x2C8 */ PAL_PTR* localPalettes[16]; /* 0x308 */ s16 unk_308; /* 0x30A */ s16 unk_30A; /* 0x30C */ s16 unk_30C; @@ -801,20 +799,6 @@ typedef struct Camera { /* 0x556 */ s16 unk_556; } Camera; // size = 0x558 -typedef struct BattleStatusUnkInner { - /* 0x00 */ char unk_00[0x10]; - /* 0x10 */ s16 unk_10; - /* 0x12 */ char unk_12[8]; - /* 0x1A */ s16 unk_1A; - /* 0x1C */ char unk_1C[8]; - /* 0x24 */ s16 unk_24; -} BattleStatusUnkInner; // size = unknown - -typedef struct BattleStatusUnk { - /* 0x00 */ char unk_00[0xC]; - /* 0x0C */ BattleStatusUnkInner* unk_0C; -} BattleStatusUnk; // size = unknown - typedef struct FGModelData { /* 0x00 */ char unk_00[0x18]; /* 0x18 */ s32* idList; @@ -947,7 +931,7 @@ typedef struct BattleStatus { /* 0x433 */ char unk_433; /* 0x434 */ s32* unk_434; /* 0x438 */ FGModelData* foregroundModelData; - /* 0x43C */ BattleStatusUnk* unk_43C; + /* 0x43C */ struct EffectInstance* buffEffect; /* 0x440 */ u8 tattleFlags[28]; /* 0x45C */ char unk_45C[4]; } BattleStatus; // size = 0x460 @@ -1627,18 +1611,20 @@ typedef struct DecorationUnk { /* 0x0E */ s16 unk0E; } DecorationUnk; // size = 0x10 +#define MAX_ACTOR_DECORATIONS 2 + typedef struct DecorationTable { - /* 0x000 */ Palette16 unk_00[54]; + /* 0x000 */ PAL_BIN copiedPalettes[2][27][16]; /* 0x6C0 */ s8 unk_6C0; /* 0x6C1 */ s8 unk_6C1; /* 0x6C2 */ s8 unk_6C2; /* 0x6C3 */ char unk_6C3[5]; /* 0x6C8 */ s16 unk_6C8; - /* 0x6CA */ u16 unk_6CA; - /* 0x6CC */ s8 unk_6CC; - /* 0x6CD */ s8 numPalettes; + /* 0x6CA */ s16 unk_6CA; + /* 0x6CC */ s8 spriteColorVariations; + /* 0x6CD */ s8 numSpritePalettes; /* 0x6CE */ char unk_6CE[2]; - /* 0x6D0 */ PAL_PTR* palettes; + /* 0x6D0 */ PAL_PTR* spritePalettes; /* 0x6D4 */ PAL_PTR unk_6D4[27]; /* 0x740 */ s16 unk_740; /* 0x742 */ s16 unk_742; @@ -1679,13 +1665,14 @@ typedef struct DecorationTable { /* 0x89C */ u8 rotZ[16]; /* 0x8AC */ s8 effectType; /* 0 = blur, 14 = none? */ /* 0x8AD */ char unk_8AD[3]; - /* 0x8B0 */ struct EffectInstance* effects[2]; - /* 0x8B8 */ s8 decorationType[2]; - /* 0x8BA */ u8 unk_8BA[2]; - /* 0x8BC */ s8 unk_8BC[2]; - /* 0x8BE */ s16 unk_8BE[2]; + /* substruct for decorations? */ + /* 0x8B0 */ struct EffectInstance* effect[MAX_ACTOR_DECORATIONS]; + /* 0x8B8 */ s8 type[MAX_ACTOR_DECORATIONS]; + /* 0x8BA */ u8 changed[MAX_ACTOR_DECORATIONS]; + /* 0x8BC */ s8 state[MAX_ACTOR_DECORATIONS]; + /* 0x8BE */ s16 stateResetTimer[MAX_ACTOR_DECORATIONS]; /* 0x8C2 */ char unk_8C0[4]; - /* 0x8C6 */ DecorationUnk unk_8C6[2]; + /* 0x8C6 */ DecorationUnk unk_8C6[MAX_ACTOR_DECORATIONS]; } DecorationTable; // size = 0x8E8 typedef struct PlayerPathElement { @@ -1852,11 +1839,11 @@ typedef struct Actor { /* 0x215 */ s8 stoneDuration; /* 0x216 */ s8 koStatus; /* 0D = yes */ /* 0x217 */ s8 koDuration; - /* 0x218 */ s8 transStatus; /* 0E = yes */ - /* 0x219 */ s8 transDuration; + /* 0x218 */ s8 transparentStatus; /* 0E = yes */ + /* 0x219 */ s8 transparentDuration; /* 0x21A */ char unk_21A[2]; /* 0x21C */ s8 status; - /* 0x21D */ s8 unk_21D; + /* 0x21D */ s8 disableDismissTimer; /* 0x21E */ s16 unk_21E; /* 0x220 */ s8 isGlowing; // not the case for goombario /* 0x221 */ s8 attackBoost; @@ -1870,7 +1857,7 @@ typedef struct Actor { /* 0x40D */ s8 targetIndexList[24]; /* into targetData */ /* 0x425 */ s8 selectedTargetIndex; /* into target index list */ /* 0x426 */ s8 targetPartIndex; - /* 0x427 */ char unk_427; + /* 0x427 */ char unk_427[1]; /* 0x428 */ s16 targetActorID; /* 0x42A */ char unk_42A[2]; /* 0x42C */ union { @@ -1880,8 +1867,8 @@ typedef struct Actor { /* 0x430 */ f32 shadowScale; /* = actor size / 24.0 */ /* 0x434 */ s16 renderMode; /* initially 0xD, set to 0x22 if any part is transparent */ /* 0x436 */ s16 hudElementDataIndex; - /* 0x438 */ s32 unk_438[2]; /* ??? see FUN_80253974 */ - /* 0x440 */ struct EffectInstance* debuffEffect; + /* 0x438 */ s32 loopingSoundID[2]; + /* 0x440 */ struct EffectInstance* disableEffect; } Actor; // size = 0x444 typedef struct BackgroundHeader { @@ -2269,7 +2256,7 @@ typedef struct ActionCommandStatus { /* 0x61 */ s8 unk_61; /* 0x62 */ s8 unk_62; /* 0x63 */ s8 unk_63; - /* 0x64 */ s16 unk_64; + /* 0x64 */ s16 easyVersion; /* 0x66 */ s16 unk_66; /* 0x68 */ s16 unk_68; /* 0x6A */ s16 unk_6A; @@ -2284,21 +2271,15 @@ typedef struct ActionCommandStatus { typedef struct Message { /* 0x00 */ s32 unk_00; /* 0x04 */ s32 unk_04; - /* 0x08 */ f32 unk_08; - /* 0x0C */ f32 unk_0C; - /* 0x10 */ f32 unk_10; - /* 0x14 */ f32 unk_14; - /* 0x18 */ f32 unk_18; - /* 0x1C */ f32 unk_1C; + /* 0x08 */ Vec3f accel; + /* 0x14 */ Vec3f vel; /* 0x20 */ s32 unk_20; /* 0x24 */ s32 unk_24; - /* 0x28 */ f32 unk_28; - /* 0x2C */ f32 unk_2C; - /* 0x30 */ f32 unk_30; - /* 0x34 */ f32 unk_34; - /* 0x38 */ f32 unk_38; - /* 0x3C */ f32 unk_3C; - /* 0x40 */ f32 unk_40; + /* 0x28 */ f32 rotZ; + /* 0x2C */ f32 rotVelZ; + /* 0x30 */ f32 rotY; + /* 0x34 */ f32 scale; + /* 0x38 */ Vec3f pos; /* 0x44 */ s32 unk_44; /* 0x48 */ f32 unk_48; } Message; // size = 0x4C @@ -2308,8 +2289,8 @@ typedef void (*PopupMessageCallback)(void* popup); typedef struct PopupMessage { /* 0x00 */ s32 unk_00; /* 0x04 */ PopupMessageCallback updateFunc; - /* 0x08 */ PopupMessageCallback unk_08; - /* 0x0C */ PopupMessageCallback drawFunc; + /* 0x08 */ PopupMessageCallback renderWorldFunc; + /* 0x0C */ PopupMessageCallback renderUIFunc; /* 0x10 */ s16 active; /* 0x12 */ s16 messageIndex; /* 0x14 */ s16 duration; diff --git a/include/effects.h b/include/effects.h index 8ba05d24c5..7caaabcec3 100644 --- a/include/effects.h +++ b/include/effects.h @@ -615,7 +615,7 @@ typedef struct RadialShimmerFXData { typedef struct EndingDecalsFXData { /* 0x00 */ s32 unk_00; - /* 0x04 */ char unk_04[0xC]; + /* 0x04 */ Vec3f pos; /* 0x10 */ f32 unk_10; /* 0x14 */ char todo[0]; } EndingDecalsFXData; // size = 0x?? @@ -986,7 +986,9 @@ typedef struct SquirtFXData { } SquirtFXData; // size = unknown typedef struct WaterBlockFXData { - /* 0x00 */ char todo[0]; + /* 0x00 */ char unk_00[4]; + /* 0x04 */ Vec3f pos; + /* 0x10 */ char todo[0]; } WaterBlockFXData; // size = unknown typedef struct WaterfallFXData { @@ -1302,9 +1304,27 @@ typedef struct BreakingJunkFXData { /* 0x3A */ s16 envA; } BreakingJunkFXData; // size = unknown +enum { + FX_BUFF_DATA_WATER_BLOCK = 0, + FX_BUFF_DATA_CLOUD_NINE = 1, + FX_BUFF_DATA_TURBO_CHARGE = 2 +}; + +typedef struct BuffData { + /* 0x00 */ s16 alpha; + /* 0x02 */ s16 turnsDisplay; + /* 0x04 */ s16 turnsLeft; + /* 0x06 */ s16 state; + /* 0x08 */ s16 stateTimer; +} BuffData; + typedef struct PartnerBuffFXData { - /* 0x00 */ char todo[0]; -} PartnerBuffFXData; // size = unknown + /* 0x00 */ s16 useRandomValues; + /* 0x02 */ s16 unk_02; + /* 0x04 */ s32 timeLeft; + /* 0x08 */ s32 lifeTime; + /* 0x0C */ BuffData unk_0C[3]; +} PartnerBuffFXData; // size = 0x2C typedef struct QuizmoAssistantFXData { /* 0x00 */ char unk_00[0x4]; diff --git a/include/effects_internal.h b/include/effects_internal.h index 0f58e02005..87d0fc5ea8 100644 --- a/include/effects_internal.h +++ b/include/effects_internal.h @@ -155,7 +155,7 @@ FX_MAIN(spirit_card_main); FX_MAIN(lil_oink_main); FX_MAIN(something_rotating_main); EffectInstance* breaking_junk_main(s32, f32, f32, f32, f32, s32); -FX_MAIN(partner_buff_main); +EffectInstance* partner_buff_main(s32, f32, f32, f32, f32, s32); FX_MAIN(quizmo_assistant_main); FX_MAIN(ice_pillar_main); EffectInstance* sun_main(s32, f32, f32, f32, f32, s32); diff --git a/include/enums.h b/include/enums.h index bd6431d40b..35323af6b0 100644 --- a/include/enums.h +++ b/include/enums.h @@ -2381,7 +2381,7 @@ enum ActorFlags { ACTOR_FLAG_NO_DMG_POPUP = 0x02000000, ///< Hide damage popup. ACTOR_FLAG_4000000 = 0x04000000, ACTOR_FLAG_8000000 = 0x08000000, - ACTOR_FLAG_10000000 = 0x10000000, + ACTOR_FLAG_BLUR_ENABLED = 0x10000000, ACTOR_FLAG_20000000 = 0x20000000, ACTOR_FLAG_40000000 = 0x40000000, ACTOR_FLAG_80000000 = 0x80000000, diff --git a/include/functions.h b/include/functions.h index 629415c0fd..0479f73637 100644 --- a/include/functions.h +++ b/include/functions.h @@ -122,14 +122,14 @@ void update_hero_shadows(void); // append gfx funcs void appendGfx_background_texture(void); -void func_80257B28(void*); -void func_8025595C(void*); -void func_80257B68(void*); -void func_80257B48(void*); -void func_8025599C(void*); +void appendGfx_enemy_actor(void*); +void appendGfx_enemy_actor_blur(void*); +void appendGfx_enemy_actor_decorations(void*); +void appendGfx_partner_actor(void*); +void appendGfx_partner_actor_blur(void*); void func_80257B88(void*); -void func_80257DA4(void*); -void func_80254C50(Actor*); +void appendGfx_player_actor(void*); +void appendGfx_player_actor_blur(Actor*); void func_80258E14(void*); void func_80254610(Actor*); @@ -376,8 +376,8 @@ void func_80263E08(Actor*, ActorPart*, s32); void func_80266978(void); void func_80266B14(void); s32 btl_cam_is_moving_done(void); -void func_8024EE48(void); -void func_8024EEA8(void); +void btl_popup_messages_update(void); +void btl_popup_messages_draw_world_geometry(void); void func_80255FD8(void); void func_80266EE8(Actor* actor, s32 arg1); @@ -626,7 +626,7 @@ void play_movement_dust_effects(s32 var0, f32 xPos, f32 yPos, f32 zPos, f32 angl void func_80138D88(s32, s32, s32, s32, f32); void func_8013A4D0(void); -void btl_draw_popup_messages(void); +void btl_popup_messages_draw_ui(void); void btl_cam_set_target_pos(f32, f32, f32); void btl_cam_unfreeze(void); @@ -861,7 +861,7 @@ void load_model_animator_tree(s32, StaticAnimatorNode**); s32 inflict_partner_ko(Actor* target, s32 statusTypeKey, s32 duration); s32 get_defense(Actor* actor, s32* defenseTable, s32 elementFlags); -void func_8024EDC0(void); +void btl_popup_messages_init(void); void remove_all_effects(void); void update_effects(void); diff --git a/src/16F740.c b/src/16F740.c index f4a0f56233..51d31cfd9a 100644 --- a/src/16F740.c +++ b/src/16F740.c @@ -210,11 +210,11 @@ void btl_state_update_begin_turn(void) { battleStatus->merleeAttackBoost = 0; battleStatus->merleeDefenseBoost = 0; battleStatus->flags2 &= ~BS_FLAGS2_1000000; - player->unk_21D = 0; + player->disableDismissTimer = 0; player->flags |= ACTOR_FLAG_8000000 | ACTOR_FLAG_4000000; if (partner != NULL) { player->flags |= ACTOR_FLAG_8000000 | ACTOR_FLAG_4000000; - partner->unk_21D = 0; + partner->disableDismissTimer = 0; } if (battleStatus->hustleTurns != 0) { @@ -422,7 +422,7 @@ void btl_state_update_begin_player_turn(void) { if (gBattleState2 == BATTLE_STATE2_PLAYER_DEFEATED && (battleStatus->unk_8C == 0)) { if (battleStatus->waterBlockTurnsLeft != 0) { battleStatus->waterBlockTurnsLeft--; - battleStatus->unk_43C->unk_0C->unk_10 = battleStatus->waterBlockTurnsLeft; + battleStatus->buffEffect->data.partnerBuff->unk_0C[FX_BUFF_DATA_WATER_BLOCK].unk_04 = battleStatus->waterBlockTurnsLeft; if (battleStatus->waterBlockTurnsLeft <= 0) { battleStatus->waterBlockEffect->flags |= 0x10; fx_water_block(1, player->currentPos.x, player->currentPos.y + 18.0f, player->currentPos.z + 5.0f, 1.5f, 10); @@ -448,7 +448,7 @@ void btl_state_update_begin_player_turn(void) { case BATTLE_STATE2_UNK_B: if (battleStatus->cloudNineTurnsLeft != 0) { battleStatus->cloudNineTurnsLeft--; - battleStatus->unk_43C->unk_0C->unk_1A = battleStatus->cloudNineTurnsLeft; + battleStatus->buffEffect->data.partnerBuff->unk_0C[FX_BUFF_DATA_CLOUD_NINE].unk_04 = battleStatus->cloudNineTurnsLeft; if (battleStatus->cloudNineTurnsLeft <= 0) { remove_effect(battleStatus->cloudNineEffect); @@ -477,7 +477,7 @@ void btl_state_update_begin_player_turn(void) { gBattleState2 = BATTLE_STATE2_UNK_15; } else { battleStatus->turboChargeTurnsLeft--; - battleStatus->unk_43C->unk_0C->unk_24 = battleStatus->turboChargeTurnsLeft; + battleStatus->buffEffect->data.partnerBuff->unk_0C[FX_BUFF_DATA_TURBO_CHARGE].unk_04 = battleStatus->turboChargeTurnsLeft; if (battleStatus->turboChargeTurnsLeft <= 0) { btl_show_battle_message(0x2B, 60); gBattleState2 = BATTLE_STATE2_UNK_10; @@ -593,11 +593,11 @@ void btl_state_update_begin_player_turn(void) { player->koDuration = debuffDuration; if ((s8) debuffDuration > 0) { player->koStatus = 0xD; - player->debuffEffect->data.disableX->unk_3C = player->koDuration; + player->disableEffect->data.disableX->unk_3C = player->koDuration; } else if (koDuration != (s8) debuffDuration) { player->koStatus = 0; player->koDuration = 0; - player->debuffEffect->data.disableX->unk_3C = 0; + player->disableEffect->data.disableX->unk_3C = 0; } } @@ -775,11 +775,11 @@ void btl_state_update_begin_partner_turn(void) { D_8029F254 = 1; D_8029F258 = 20; if (partner->koDuration > 0) { - partner->debuffEffect->data.disableX->unk_3C = partner->koDuration; + partner->disableEffect->data.disableX->unk_3C = partner->koDuration; } else { partner->koStatus = 0; dispatch_event_partner(EVENT_RECOVER_PARTNER); - partner->debuffEffect->data.disableX->unk_3C = 0; + partner->disableEffect->data.disableX->unk_3C = 0; gBattleStatus.flags2 |= BS_FLAGS2_8; } } @@ -985,10 +985,10 @@ void btl_state_update_victory(void) { player->debuff = 0; player->staticStatus = 0; player->stoneStatus = 0; - player->transStatus = 0; + player->transparentStatus = 0; player->koStatus = 0; player->koDuration = 0; - player->debuffEffect->data.disableX->unk_3C = 0; + player->disableEffect->data.disableX->unk_3C = 0; if (partner != NULL) { if (partner->koStatus == STATUS_DAZE) { @@ -998,10 +998,10 @@ void btl_state_update_victory(void) { partner->debuff = 0; partner->staticStatus = 0; partner->stoneStatus = 0; - partner->transStatus = 0; + partner->transparentStatus = 0; partner->koStatus = 0; partner->koDuration = 0; - partner->debuffEffect->data.disableX->unk_3C = 0; + partner->disableEffect->data.disableX->unk_3C = 0; } break; case BATTLE_STATE2_PLAYER_DEFEATED: @@ -1155,10 +1155,10 @@ void btl_state_update_end_training_battle(void) { player->debuff = 0; player->staticStatus = 0; player->stoneStatus = 0; - player->transStatus = 0; + player->transparentStatus = 0; player->koStatus = 0; player->koDuration = 0; - player->debuffEffect->data.disableX->unk_3C = 0; + player->disableEffect->data.disableX->unk_3C = 0; if (partner != NULL) { if (partner->koStatus == STATUS_DAZE) { dispatch_event_partner(EVENT_RECOVER_PARTNER); @@ -1167,10 +1167,10 @@ void btl_state_update_end_training_battle(void) { partner->debuff = 0; partner->staticStatus = 0; partner->stoneStatus = 0; - partner->transStatus = 0; + partner->transparentStatus = 0; partner->koStatus = 0; partner->koDuration = 0; - partner->debuffEffect->data.disableX->unk_3C = 0; + partner->disableEffect->data.disableX->unk_3C = 0; } break; case BATTLE_STATE2_PLAYER_DEFEATED: @@ -1575,7 +1575,7 @@ void btl_state_update_defeat(void) { remove_status_debuff(player->hudElementDataIndex); player->koStatus = 0; player->koDuration = 0; - player->debuffEffect->data.disableX->unk_3C = 0; + player->disableEffect->data.disableX->unk_3C = 0; } btl_cam_use_preset(BTL_CAM_PRESET_25); @@ -1911,7 +1911,7 @@ void btl_state_update_partner_move(void) { btl_cam_use_preset(BTL_CAM_PRESET_54); btl_show_battle_message(0x23, 60); partner->status = 0; - partner->unk_21D = 0; + partner->disableDismissTimer = 0; gBattleState2 = BATTLE_STATE2_UNK_B; partner->flags |= ACTOR_FLAG_8000000; } else { diff --git a/src/16c8e0.c b/src/16c8e0.c index a1ece825b7..f8b0d4b063 100644 --- a/src/16c8e0.c +++ b/src/16c8e0.c @@ -198,7 +198,7 @@ void initialize_battle(void) { } create_generic_entity_world(NULL, func_8023ED5C); - func_8024EDC0(); + btl_popup_messages_init(); func_80268E88(); set_windows_visible(WINDOW_GROUP_1); D_8029EFBC = hud_element_create(&HES_HPBar); @@ -409,7 +409,7 @@ void btl_update(void) { func_80266684(); func_80266978(); func_80266B14(); - func_8024EE48(); + btl_popup_messages_update(); update_actor_shadows(); if (battleStatus->unk_432 != -2) { @@ -608,7 +608,7 @@ void btl_draw_ui(void) { break; } } - btl_draw_popup_messages(); + btl_popup_messages_draw_ui(); draw_status_ui(); } @@ -620,7 +620,7 @@ void func_8023ED5C(void) { s32 i; if (gBattleState != BATTLE_STATE_0) { - func_8024EEA8(); + btl_popup_messages_draw_world_geometry(); if (battleStatus->initBattleCallback != NULL) { battleStatus->initBattleCallback(); } @@ -633,14 +633,14 @@ void func_8023ED5C(void) { if (actor != NULL && !(actor->flags & ACTOR_FLAG_DISABLED)) { renderTaskPtr->appendGfxArg = (void*)i; - renderTaskPtr->appendGfx = func_80257B28; + renderTaskPtr->appendGfx = appendGfx_enemy_actor; renderTaskPtr->distance = actor->currentPos.z; renderTaskPtr->renderMode = actor->renderMode; queue_render_task(renderTaskPtr); - if (actor->flags & ACTOR_FLAG_10000000) { + if (actor->flags & ACTOR_FLAG_BLUR_ENABLED) { renderTaskPtr->appendGfxArg = actor; - renderTaskPtr->appendGfx = func_8025595C; + renderTaskPtr->appendGfx = appendGfx_enemy_actor_blur; renderTaskPtr->distance = actor->currentPos.z; renderTaskPtr->renderMode = RENDER_MODE_SURFACE_XLU_LAYER3; queue_render_task(renderTaskPtr); @@ -648,7 +648,7 @@ void func_8023ED5C(void) { if (battleStatus->unk_92 & 1) { renderTaskPtr->appendGfxArg = actor; - renderTaskPtr->appendGfx = func_80257B68; + renderTaskPtr->appendGfx = appendGfx_enemy_actor_decorations; renderTaskPtr->distance = actor->currentPos.z; renderTaskPtr->renderMode = actor->renderMode; queue_render_task(renderTaskPtr); @@ -659,14 +659,14 @@ void func_8023ED5C(void) { actor = battleStatus->partnerActor; if (actor != NULL && !(actor->flags & ACTOR_FLAG_DISABLED)) { renderTaskPtr->appendGfxArg = NULL; - renderTaskPtr->appendGfx = func_80257B48; + renderTaskPtr->appendGfx = appendGfx_partner_actor; renderTaskPtr->distance = actor->currentPos.z; renderTaskPtr->renderMode = actor->renderMode; queue_render_task(renderTaskPtr); - if (actor->flags & ACTOR_FLAG_10000000) { + if (actor->flags & ACTOR_FLAG_BLUR_ENABLED) { renderTaskPtr->appendGfxArg = actor; - renderTaskPtr->appendGfx = func_8025599C; + renderTaskPtr->appendGfx = appendGfx_partner_actor_blur; renderTaskPtr->distance = actor->currentPos.z; renderTaskPtr->renderMode = RENDER_MODE_SURFACE_XLU_LAYER3; queue_render_task(renderTaskPtr); @@ -684,14 +684,14 @@ void func_8023ED5C(void) { actor = battleStatus->playerActor; if (actor != NULL && !(actor->flags & ACTOR_FLAG_DISABLED)) { renderTaskPtr->appendGfxArg = NULL; - renderTaskPtr->appendGfx = func_80257DA4; + renderTaskPtr->appendGfx = appendGfx_player_actor; renderTaskPtr->distance = actor->currentPos.z; renderTaskPtr->renderMode = actor->renderMode; queue_render_task(renderTaskPtr); - if (actor->flags & ACTOR_FLAG_10000000) { + if (actor->flags & ACTOR_FLAG_BLUR_ENABLED) { renderTaskPtr->appendGfxArg = actor; - renderTaskPtr->appendGfx = func_80254C50; + renderTaskPtr->appendGfx = appendGfx_player_actor_blur; renderTaskPtr->distance = actor->currentPos.z; renderTaskPtr->renderMode = RENDER_MODE_SURFACE_XLU_LAYER3; queue_render_task(renderTaskPtr); @@ -1027,7 +1027,7 @@ void btl_delete_actor(Actor* actor) { delete_shadow(actor->shadow.id); remove_all_status_icons(actor->hudElementDataIndex); - remove_effect(actor->debuffEffect); + remove_effect(actor->disableEffect); if (actor->attackResultEffect != NULL) { actor->attackResultEffect->data.attackResultText->unk_24 = 0; @@ -1070,7 +1070,7 @@ void btl_delete_player_actor(Actor* player) { delete_shadow(player->shadow.id); remove_all_status_icons(player->hudElementDataIndex); - remove_effect(player->debuffEffect); + remove_effect(player->disableEffect); if (player->attackResultEffect != NULL) { player->attackResultEffect->data.attackResultText->unk_24 = 0; diff --git a/src/17D6A0.c b/src/17D6A0.c index 96e40f60f1..3411390d08 100644 --- a/src/17D6A0.c +++ b/src/17D6A0.c @@ -1170,7 +1170,7 @@ void func_8024F768(void* data); void func_8024FB3C(void* popup); void btl_show_message_popup(void* popup); -void func_8024EDC0(void) { +void btl_popup_messages_init(void) { s32 i; for (i = 0; i < ARRAY_COUNT(popupMessages); i++) { @@ -1180,7 +1180,7 @@ void func_8024EDC0(void) { } } -void func_8024EDEC(void) { +void btl_popup_messages_delete(void) { s32 i; for (i = 0; i < ARRAY_COUNT(popupMessages); i++) { @@ -1193,7 +1193,7 @@ void func_8024EDEC(void) { } } -void func_8024EE48(void) { +void btl_popup_messages_update(void) { s32 i; for (i = 0; i < ARRAY_COUNT(popupMessages); i++) { @@ -1204,24 +1204,24 @@ void func_8024EE48(void) { } } -void func_8024EEA8(void) { +void btl_popup_messages_draw_world_geometry(void) { s32 i; for (i = 0; i < ARRAY_COUNT(popupMessages); i++) { PopupMessage* popup = &popupMessages[i]; - if (popup->active && popup->unk_08 != NULL) { - popup->unk_08(popup); + if (popup->active && popup->renderWorldFunc != NULL) { + popup->renderWorldFunc(popup); } } } -void btl_draw_popup_messages(void) { +void btl_popup_messages_draw_ui(void) { s32 i; for (i = 0; i < ARRAY_COUNT(popupMessages); i++) { PopupMessage* popup = &popupMessages[i]; - if (popup->active && popup->drawFunc != NULL) { - popup->drawFunc(popup); + if (popup->active && popup->renderUIFunc != NULL) { + popup->renderUIFunc(popup); } } } @@ -1298,9 +1298,9 @@ void func_8024EFE0(f32 x, f32 y, f32 z, s32 numMessages, s32 arg4, s32 arg5) { battleStatus->unk_90 = 0; popup->updateFunc = func_8024F394; - popup->unk_08 = func_8024F5AC; + popup->renderWorldFunc = func_8024F5AC; popup->unk_00 = 0; - popup->drawFunc = NULL; + popup->renderUIFunc = NULL; popup->messageIndex = 1; popup->active |= 0x10; message = popup->message = heap_malloc(numMessages * sizeof(*popup->message)); @@ -1310,11 +1310,11 @@ void func_8024EFE0(f32 x, f32 y, f32 z, s32 numMessages, s32 arg4, s32 arg5) { sp10 = &D_80283744[numMessages]; message->unk_00 = 1; message->unk_04 = load_entity_model(*sp10); - set_entity_model_flags(message->unk_04, 0x20); + set_entity_model_flags(message->unk_04, ENTITY_MODEL_FLAGS_HIDDEN); bind_entity_model_setupGfx(message->unk_04, message, func_8024F768); - message->unk_38 = x; - message->unk_3C = y; - message->unk_40 = z; + message->pos.x = x; + message->pos.y = y; + message->pos.z = z; arg5mod8 = arg5 % 8; arg5++; @@ -1324,18 +1324,18 @@ void func_8024EFE0(f32 x, f32 y, f32 z, s32 numMessages, s32 arg4, s32 arg5) { f1 = &D_802835DC[arg5mod8 * 3]; f2 = &D_802835DC[arg5mod8 * 3 + one]; f3 = &D_802835DC[arg5mod8 * 3 + two]; - message->unk_14 = 2.0 * *f1 * sign * var_f20; - message->unk_18 = 2.0 * *f2 * var_f20; - message->unk_1C = 2.0 * *f3 * var_f20; - message->unk_08 = *f1 * sign * var_f20; - message->unk_0C = *f2 * var_f20; - message->unk_10 = *f3 * var_f20; + message->vel.x = 2.0 * *f1 * sign * var_f20; + message->vel.y = 2.0 * *f2 * var_f20; + message->vel.z = 2.0 * *f3 * var_f20; + message->accel.x = *f1 * sign * var_f20; + message->accel.y = *f2 * var_f20; + message->accel.z = *f3 * var_f20; iMod8 = (i % 8); - message->unk_34 = D_80283690[iMod8 * 3] * var_f22; - message->unk_28 = 0; - message->unk_2C = sign * 107; - message->unk_30 = clamp_angle(180.0f - gCameras[CAM_BATTLE].currentYaw); + message->scale = D_80283690[iMod8 * 3] * var_f22; + message->rotZ = 0; + message->rotVelZ = sign * 107; + message->rotY = clamp_angle(180.0f - gCameras[CAM_BATTLE].currentYaw); message->unk_20 = 14; message->unk_24 = arg4; message->unk_44 = 240; @@ -1368,21 +1368,21 @@ void func_8024F394(void* data) { } else { exec_entity_model_commandlist(modelIdx); if (message->unk_20 >= 0) { - message->unk_38 += message->unk_14; - message->unk_3C += message->unk_18; - message->unk_40 += message->unk_1C; + message->pos.x += message->vel.x; + message->pos.y += message->vel.y; + message->pos.z += message->vel.z; } - message->unk_30 = clamp_angle(180.0f - gCameras[CAM_BATTLE].currentYaw); - message->unk_28 += message->unk_2C; - message->unk_28 = clamp_angle(message->unk_28); - message->unk_2C *= 0.8; + message->rotY = clamp_angle(180.0f - gCameras[CAM_BATTLE].currentYaw); + message->rotZ += message->rotVelZ; + message->rotZ = clamp_angle(message->rotZ); + message->rotVelZ *= 0.8; if (message->unk_20 < 10) { - message->unk_08 *= 0.5; - message->unk_0C *= 0.5; - message->unk_10 *= 0.5; - message->unk_14 = message->unk_08; - message->unk_18 = message->unk_0C; - message->unk_1C = message->unk_10; + message->accel.x *= 0.5; + message->accel.y *= 0.5; + message->accel.z *= 0.5; + message->vel.x = message->accel.x; + message->vel.y = message->accel.y; + message->vel.z = message->accel.z; } message->unk_20--; @@ -1408,13 +1408,13 @@ void func_8024F5AC(void* data) { PopupMessage* popup = data; Message* message = popup->message; Matrix4f sp18; - Matrix4f sp58; - Matrix4f sp98; - Matrix4f spD8; + Matrix4f mtxRotX; + Matrix4f mtxRotY; + Matrix4f mtxRotZ; Matrix4f sp118; Matrix4f sp158; Matrix4f sp198; - Matrix4f sp1D8; + Matrix4f mtxScale; Mtx sp218; s32 i; @@ -1425,14 +1425,14 @@ void func_8024F5AC(void* data) { } else { s32 modelIdx = message->unk_04; - guTranslateF(sp18, message->unk_38, message->unk_3C, message->unk_40); - guRotateF(sp58, 0.0f, 1.0f, 0.0f, 0.0f); - guRotateF(sp98, message->unk_30, 0.0f, 1.0f, 0.0f); - guRotateF(spD8, message->unk_28, 0.0f, 0.0f, 1.0f); - guScaleF(sp1D8, message->unk_34, message->unk_34, message->unk_34); - guMtxCatF(spD8, sp58, sp158); - guMtxCatF(sp158, sp98, sp118); - guMtxCatF(sp1D8, sp118, sp158); + guTranslateF(sp18, message->pos.x, message->pos.y, message->pos.z); + guRotateF(mtxRotX, 0.0f, 1.0f, 0.0f, 0.0f); + guRotateF(mtxRotY, message->rotY, 0.0f, 1.0f, 0.0f); + guRotateF(mtxRotZ, message->rotZ, 0.0f, 0.0f, 1.0f); + guScaleF(mtxScale, message->scale, message->scale, message->scale); + guMtxCatF(mtxRotZ, mtxRotX, sp158); + guMtxCatF(sp158, mtxRotY, sp118); + guMtxCatF(mtxScale, sp118, sp158); guMtxCatF(sp158, sp18, sp198); guMtxF2L(sp198, &sp218); draw_entity_model_A(modelIdx, &sp218); @@ -1443,12 +1443,12 @@ void func_8024F5AC(void* data) { void func_8024F768(void* data) { Message* message = data; - s32 var_a3 = message->unk_44; + s32 alphaAmt = message->unk_44; - if (var_a3 > 0xA) { - var_a3 = 0xA; + if (alphaAmt > 10) { + alphaAmt = 10; } - gDPSetPrimColor(gMasterGfxPos++, 0, 0, 0, 0, 0, (var_a3 * 255) / 10); + gDPSetPrimColor(gMasterGfxPos++, 0, 0, 0, 0, 0, (alphaAmt * 255) / 10); } void func_8024F7C8(void) { @@ -1495,9 +1495,9 @@ void btl_show_battle_message(s32 messageIndex, s32 duration) { if (popup != NULL) { popup->updateFunc = func_8024FB3C; - popup->drawFunc = btl_show_message_popup; + popup->renderUIFunc = btl_show_message_popup; popup->unk_00 = 0; - popup->unk_08 = NULL; + popup->renderWorldFunc = NULL; popup->messageIndex = messageIndex; popup->duration = duration; popup->unk_16 = 0; @@ -1517,9 +1517,9 @@ void btl_show_variable_battle_message(s32 messageIndex, s32 duration, s32 varVal if (popup != NULL) { popup->updateFunc = func_8024FB3C; - popup->drawFunc = btl_show_message_popup; + popup->renderUIFunc = btl_show_message_popup; popup->unk_00 = 0; - popup->unk_08 = NULL; + popup->renderWorldFunc = NULL; popup->messageIndex = messageIndex; popup->duration = duration; popup->unk_16 = 0; diff --git a/src/17FEB0.c b/src/17FEB0.c index 81b3a1e2cd..a8b43042ea 100644 --- a/src/17FEB0.c +++ b/src/17FEB0.c @@ -22,7 +22,7 @@ s32 calc_item_check_hit(void) { ASSERT(actorPart != NULL); if (!(actorPart->eventFlags & ACTOR_EVENT_FLAG_ILLUSORY)) { - if (actor->transStatus == STATUS_TRANSPARENT) { + if (actor->transparentStatus == STATUS_TRANSPARENT) { return HIT_RESULT_MISS; } if (actor->stoneStatus == STATUS_STONE) { @@ -107,7 +107,7 @@ s32 calc_item_damage_enemy(void) { if (!(battleStatus->currentAttackElement & DAMAGE_TYPE_REMOVE_BUFFS)) { if ((targetPart->eventFlags & ACTOR_EVENT_FLAG_ILLUSORY) || - ((target->transStatus == STATUS_TRANSPARENT) || ((targetPart->eventFlags & ACTOR_EVENT_FLAG_800) && !(battleStatus->currentAttackElement & DAMAGE_TYPE_QUAKE)))) + ((target->transparentStatus == STATUS_TRANSPARENT) || ((targetPart->eventFlags & ACTOR_EVENT_FLAG_800) && !(battleStatus->currentAttackElement & DAMAGE_TYPE_QUAKE)))) { return 6; } @@ -227,7 +227,7 @@ s32 calc_item_damage_enemy(void) { if (battleStatus->currentAttackElement & DAMAGE_TYPE_REMOVE_BUFFS) { if (gBattleStatus.flags1 & 0x20) { if ((target->attackBoost > 0 || target->defenseBoost > 0) || - ((target->staticStatus == 0 && target->transStatus != 0) || target->staticStatus != 0)) + ((target->staticStatus == 0 && target->transparentStatus != 0) || target->staticStatus != 0)) { target->attackBoost = 0; target->defenseBoost = 0; @@ -238,9 +238,9 @@ s32 calc_item_damage_enemy(void) { target->staticDuration = 0; remove_status_static(target->hudElementDataIndex); } - if (target->transStatus != 0) { - target->transStatus = 0; - target->transDuration = 0; + if (target->transparentStatus != 0) { + target->transparentStatus = 0; + target->transparentDuration = 0; remove_status_transparent(target->hudElementDataIndex); } wasStatusInflicted = TRUE; diff --git a/src/181810.c b/src/181810.c index eefad51daf..a65185585d 100644 --- a/src/181810.c +++ b/src/181810.c @@ -326,7 +326,7 @@ ApiStatus PlayLoopingSoundAtActor(Evt* script, s32 isInitialCall) { } actor = get_actor(actorID); - actor->unk_438[idx] = soundID; + actor->loopingSoundID[idx] = soundID; sfx_play_sound_at_position(soundID, 0, actor->currentPos.x, actor->currentPos.y, actor->currentPos.z); return ApiStatus_DONE2; @@ -344,12 +344,12 @@ ApiStatus StopLoopingSoundAtActor(Evt* script, s32 isInitialCall) { actor = get_actor(actorID); - if (actor->unk_438[idx] == 0) { + if (actor->loopingSoundID[idx] == 0) { return ApiStatus_DONE2; } - sfx_stop_sound(actor->unk_438[idx]); - actor->unk_438[idx] = 0; + sfx_stop_sound(actor->loopingSoundID[idx]); + actor->loopingSoundID[idx] = 0; return ApiStatus_DONE2; } diff --git a/src/182B30.c b/src/182B30.c index cfc6bf41ce..1f554a9f06 100644 --- a/src/182B30.c +++ b/src/182B30.c @@ -11,7 +11,7 @@ extern u8 D_80284120[]; extern s16 D_80284134[]; void update_player_actor_shadow(void); -void func_80255FE0(s32 isPartner, s32 actorIndex); +void appendGfx_npc_actor(s32 isPartner, s32 actorIndex); void func_802571F0(s32, Actor*); void func_80259494(ActorPart*); @@ -49,6 +49,7 @@ void func_8025BAA0(s32 arg0, ActorPart* part, s32 yaw, s32 arg3, Matrix4f mtx, s void func_8025C120(s32 arg0, ActorPart* part, s32 yaw, Matrix4f mtx, s32 arg4); s32 func_8025C840(s32 arg0, ActorPart* part, s32 yaw, s32); s32 func_8025CCC8(s32 arg0, ActorPart* part, s32 yaw, s32); +s32 func_80265D44(s32 animID); void func_8026709C(ActorPart* part); s32 func_80254250(ActorPart* part) { @@ -83,7 +84,7 @@ void enable_actor_blur(Actor* actor) { decorationTable->effectType = 0; decorationTable->unk_7DB++; - actor->flags |= ACTOR_FLAG_10000000; + actor->flags |= ACTOR_FLAG_BLUR_ENABLED; partsTable = actor->partsTable; numParts = actor->numParts; @@ -133,7 +134,7 @@ void reset_actor_blur(Actor* actor) { if (decorationTable->unk_7DB != 0) { decorationTable->unk_7DB--; if (decorationTable->unk_7DB == 0) { - actor->flags &= ~ACTOR_FLAG_10000000; + actor->flags &= ~ACTOR_FLAG_BLUR_ENABLED; decorationTable->effectType = 1; } } @@ -175,7 +176,7 @@ void enable_player_blur(void) { decorationTable->effectType = 0; decorationTable->unk_7DB++; - playerActor->flags |= ACTOR_FLAG_10000000; + playerActor->flags |= ACTOR_FLAG_BLUR_ENABLED; decorationTable->unk_7D8 = 0; decorationTable->unk_7D9 = 0; @@ -184,12 +185,12 @@ void enable_player_blur(void) { decorationTable->posY[i] = partsTable->currentPos.y; decorationTable->posZ[i] = partsTable->currentPos.z; decorationTable->scale[i] = playerActor->yaw; - decorationTable->rotationPivotOffsetX[i] = (s32)(playerActor->rotationPivotOffset.x * playerActor->scalingFactor); - decorationTable->rotationPivotOffsetY[i] = (s32)(playerActor->rotationPivotOffset.y * playerActor->scalingFactor); + decorationTable->rotationPivotOffsetX[i] = playerActor->rotationPivotOffset.x * playerActor->scalingFactor; + decorationTable->rotationPivotOffsetY[i] = playerActor->rotationPivotOffset.y * playerActor->scalingFactor; - *(&decorationTable->rotX[i]) = clamp_angle(playerActor->rotation.x) * 0.5f; - *(&decorationTable->rotY[i]) = clamp_angle(playerActor->rotation.y) * 0.5f; - *(&decorationTable->rotZ[i]) = clamp_angle(playerActor->rotation.z) * 0.5f; + decorationTable->rotX[i] = clamp_angle(playerActor->rotation.x) * 0.5f; + decorationTable->rotY[i] = clamp_angle(playerActor->rotation.y) * 0.5f; + decorationTable->rotZ[i] = clamp_angle(playerActor->rotation.z) * 0.5f; } } @@ -211,7 +212,7 @@ void func_80254950(void) { if (decorationTable->unk_7DB != 0) { decorationTable->unk_7DB--; if (decorationTable->unk_7DB == 0) { - playerActor->flags &= ~ACTOR_FLAG_10000000; + playerActor->flags &= ~ACTOR_FLAG_BLUR_ENABLED; decorationTable->effectType = 1; } } @@ -228,7 +229,7 @@ void func_802549C0(void) { Actor* playerActor = gBattleStatus.playerActor; DecorationTable* decorationTable = playerActor->partsTable->decorationTable; - playerActor->flags &= ~ACTOR_FLAG_10000000; + playerActor->flags &= ~ACTOR_FLAG_BLUR_ENABLED; decorationTable->unk_7DB = 0; decorationTable->effectType = 1; } @@ -260,30 +261,24 @@ void func_802549F4(Actor* actor) { } } -void func_80254C50(Actor* actor) { - Matrix4f sp18; - Matrix4f sp58; - Matrix4f sp98; - Matrix4f spD8; - Matrix4f sp118; - Matrix4f sp158; - Matrix4f sp198; - Matrix4f sp1D8; - Matrix4f sp218; - Matrix4f sp258; - s32 sp298; - s32 sp29C; +void appendGfx_player_actor_blur(Actor* actor) { + Matrix4f mtxRotX, mtxRotY, mtxRotZ, mtxRotation; + Matrix4f mtxScale; + Matrix4f mtxPivotOn, mtxPivotOff, mtxTranslate; + Matrix4f mtxTransform, mtxTemp; + s32 delay; + s32 num; s32 scale; ActorPart* partTable; DecorationTable* decorationTable; f32 rotX, rotY, rotZ; - s32 temp_s0_2; + s32 prevOpacity; s32 temp_v1; - s32 temp_s0; - s32 temp_s1; - s32 i; - s32 phi_s6; - s32 phi_s4; + s32 pivotOffsetX; + s32 pivotOffsetY; + s32 bufPos; + s32 newOpacityBase; + s32 newOpacityModulus; f32 x, y, z; partTable = actor->partsTable; @@ -291,79 +286,79 @@ void func_80254C50(Actor* actor) { if (decorationTable->effectType != 0) { decorationTable->effectType--; if (decorationTable->effectType == 0) { - actor->flags &= ~ACTOR_FLAG_10000000; + actor->flags &= ~ACTOR_FLAG_BLUR_ENABLED; return; } } if (!(partTable->flags & ACTOR_PART_FLAG_INVISIBLE) && partTable->idleAnimations != NULL) { - sp298 = 0; - sp29C = 0; - i = decorationTable->unk_7D9; + delay = 0; + num = 0; + bufPos = decorationTable->unk_7D9; while (1) { - i--; - sp298 += 1; - if (i < 0) { - i = 0xF; + bufPos--; + delay++; + if (bufPos < 0) { + bufPos = ARRAY_COUNT(decorationTable->posX) - 1; } - if (i == decorationTable->unk_7D9) { + if (bufPos == decorationTable->unk_7D9) { break; } - if (sp298 >= 3) { - sp298 = 0; - sp29C++; + if (delay >= 3) { + delay = 0; + num++; - if (decorationTable->unk_7DA < sp29C) { + if (decorationTable->unk_7DA < num) { break; } temp_v1 = partTable->opacity; - x = decorationTable->posX[i]; - y = decorationTable->posY[i]; - z = decorationTable->posZ[i]; + x = decorationTable->posX[bufPos]; + y = decorationTable->posY[bufPos]; + z = decorationTable->posZ[bufPos]; - scale = decorationTable->scale[i]; + scale = decorationTable->scale[bufPos]; - temp_s0 = decorationTable->rotationPivotOffsetX[i]; - temp_s1 = decorationTable->rotationPivotOffsetY[i]; + pivotOffsetX = decorationTable->rotationPivotOffsetX[bufPos]; + pivotOffsetY = decorationTable->rotationPivotOffsetY[bufPos]; - rotX = decorationTable->rotX[i] * 2; - rotY = decorationTable->rotY[i] * 2; - rotZ = decorationTable->rotZ[i] * 2; + rotX = decorationTable->rotX[bufPos] * 2; + rotY = decorationTable->rotY[bufPos] * 2; + rotZ = decorationTable->rotZ[bufPos] * 2; - phi_s6 = 120; - phi_s4 = 20; + newOpacityBase = 120; + newOpacityModulus = 20; if (temp_v1 < 50) { - phi_s6 = 50; - phi_s4 = 8; + newOpacityBase = 50; + newOpacityModulus = 8; } else if (temp_v1 < 100) { - phi_s6 = 70; - phi_s4 = 10; + newOpacityBase = 70; + newOpacityModulus = 10; } else if (temp_v1 < 150) { - phi_s6 = 100; - phi_s4 = 15; + newOpacityBase = 100; + newOpacityModulus = 15; } - guTranslateF(sp1D8, x, y, z); - guTranslateF(sp158, -temp_s0, -temp_s1, 0.0f); - guTranslateF(sp198, temp_s0, temp_s1, 0.0f); - guRotateF(sp18, rotX, 1.0f, 0.0f, 0.0f); - guRotateF(sp58, rotY, 0.0f, 1.0f, 0.0f); - guRotateF(sp98, rotZ, 0.0f, 0.0f, 1.0f); - guMtxCatF(sp18, sp58, sp218); - guMtxCatF(sp218, sp98, spD8); - guScaleF(sp118, actor->scale.x * SPRITE_PIXEL_SCALE * actor->scalingFactor, + guTranslateF(mtxTranslate, x, y, z); + guTranslateF(mtxPivotOn, -pivotOffsetX, -pivotOffsetY, 0.0f); + guTranslateF(mtxPivotOff, pivotOffsetX, pivotOffsetY, 0.0f); + guRotateF(mtxRotX, rotX, 1.0f, 0.0f, 0.0f); + guRotateF(mtxRotY, rotY, 0.0f, 1.0f, 0.0f); + guRotateF(mtxRotZ, rotZ, 0.0f, 0.0f, 1.0f); + guMtxCatF(mtxRotX, mtxRotY, mtxTransform); + guMtxCatF(mtxTransform, mtxRotZ, mtxRotation); + guScaleF(mtxScale, actor->scale.x * SPRITE_PIXEL_SCALE * actor->scalingFactor, actor->scale.y * SPRITE_PIXEL_SCALE * actor->scalingFactor * partTable->verticalStretch, actor->scale.z * SPRITE_PIXEL_SCALE); - guMtxCatF(sp118, sp158, sp258); - guMtxCatF(sp258, spD8, sp218); - guMtxCatF(sp218, sp198, sp258); - guMtxCatF(sp258, sp1D8, sp218); - temp_s0_2 = partTable->opacity; - partTable->opacity = phi_s6 - (sp29C * phi_s4); - func_802591EC(0, partTable, clamp_angle(scale + 180), sp218, 1); - partTable->opacity = temp_s0_2; + guMtxCatF(mtxScale, mtxPivotOn, mtxTemp); + guMtxCatF(mtxTemp, mtxRotation, mtxTransform); + guMtxCatF(mtxTransform, mtxPivotOff, mtxTemp); + guMtxCatF(mtxTemp, mtxTranslate, mtxTransform); + prevOpacity = partTable->opacity; + partTable->opacity = newOpacityBase - (num * newOpacityModulus); + func_802591EC(0, partTable, clamp_angle(scale + 180), mtxTransform, 1); + partTable->opacity = prevOpacity; } } } @@ -406,18 +401,11 @@ void func_802550BC(s32 arg0, Actor* actor) { void func_802552EC(s32 arg0, Actor* actor) { DecorationTable* decorationTable; ActorPart* partTable; - Matrix4f sp18; - Matrix4f sp58; - Matrix4f sp98; - Matrix4f spD8; - Matrix4f sp118; - Matrix4f sp158; - Matrix4f sp198; - Matrix4f sp1D8; - Matrix4f sp218; - Matrix4f sp258; - Matrix4f sp298; - Matrix4f sp2D8; + Matrix4f mtxRotX, mtxRotY, mtxRotZ, mtxRotation; + Matrix4f mtxScale, mtxTranslate; + Matrix4f mtxTemp, mtxTransform; + Matrix4f mtxPivotOn, mtxPivotOff; + Matrix4f mtxActor, mtxPartScale; s32 numParts; s32 i, j, k, l; f32 x, y, z; @@ -431,15 +419,15 @@ void func_802552EC(s32 arg0, Actor* actor) { s32 temp; s32 flags; - guRotateF(sp18, actor->rotation.x, 1.0f, 0.0f, 0.0f); - guRotateF(sp58, actor->rotation.y, 0.0f, 1.0f, 0.0f); - guRotateF(sp98, actor->rotation.z, 0.0f, 0.0f, 1.0f); - guMtxCatF(sp18, sp58, sp198); - guMtxCatF(sp198, sp98, spD8); - guScaleF(sp118, actor->scale.x * SPRITE_PIXEL_SCALE * actor->scalingFactor, + guRotateF(mtxRotX, actor->rotation.x, 1.0f, 0.0f, 0.0f); + guRotateF(mtxRotY, actor->rotation.y, 0.0f, 1.0f, 0.0f); + guRotateF(mtxRotZ, actor->rotation.z, 0.0f, 0.0f, 1.0f); + guMtxCatF(mtxRotX, mtxRotY, mtxTemp); + guMtxCatF(mtxTemp, mtxRotZ, mtxRotation); + guScaleF(mtxScale, actor->scale.x * SPRITE_PIXEL_SCALE * actor->scalingFactor, actor->scale.y * SPRITE_PIXEL_SCALE * actor->scalingFactor, actor->scale.z * SPRITE_PIXEL_SCALE); - guMtxCatF(sp118, spD8, sp298); + guMtxCatF(mtxScale, mtxRotation, mtxActor); numParts = actor->numParts; partTable = actor->partsTable; @@ -453,7 +441,7 @@ void func_802552EC(s32 arg0, Actor* actor) { if (decorationTable->effectType != 0) { decorationTable->effectType--; if (decorationTable->effectType == 0) { - actor->flags &= ~ACTOR_FLAG_10000000; + actor->flags &= ~ACTOR_FLAG_BLUR_ENABLED; partTable = partTable->nextPart; continue; } @@ -465,7 +453,7 @@ void func_802552EC(s32 arg0, Actor* actor) { } if (partTable->flags & ACTOR_PART_FLAG_USE_ABSOLUTE_POSITION) { - guScaleF(sp2D8, actor->scale.x * SPRITE_PIXEL_SCALE, actor->scale.y * SPRITE_PIXEL_SCALE, actor->scale.z * SPRITE_PIXEL_SCALE); + guScaleF(mtxPartScale, actor->scale.x * SPRITE_PIXEL_SCALE, actor->scale.y * SPRITE_PIXEL_SCALE, actor->scale.z * SPRITE_PIXEL_SCALE); } j = decorationTable->unk_7D9; @@ -524,37 +512,37 @@ void func_802552EC(s32 arg0, Actor* actor) { } if (!(actor->flags & ACTOR_FLAG_HP_OFFSET_BELOW)) { - guTranslateF(sp218, -pivotX, -pivotY, 0.0f); - guTranslateF(sp258, pivotX, pivotY, 0.0f); + guTranslateF(mtxPivotOn, -pivotX, -pivotY, 0.0f); + guTranslateF(mtxPivotOff, pivotX, pivotY, 0.0f); } else { - guTranslateF(sp218, -pivotX, pivotY, 0.0f); - guTranslateF(sp258, pivotX, -pivotY, 0.0f); + guTranslateF(mtxPivotOn, -pivotX, pivotY, 0.0f); + guTranslateF(mtxPivotOff, pivotX, -pivotY, 0.0f); } - guTranslateF(sp158, x, y, z); - guRotateF(sp18, rotX, 1.0f, 0.0f, 0.0f); - guRotateF(sp58, rotY, 0.0f, 1.0f, 0.0f); - guRotateF(sp98, rotZ, 0.0f, 0.0f, 1.0f); - guMtxCatF(sp58, sp18, sp198); - guMtxCatF(sp198, sp98, spD8); - guScaleF(sp118, partTable->scale.x, partTable->scale.y * partTable->verticalStretch, partTable->scale.z); - guMtxCatF(sp118, sp218, sp1D8); - guMtxCatF(sp1D8, spD8, sp198); - guMtxCatF(sp198, sp258, sp1D8); + guTranslateF(mtxTranslate, x, y, z); + guRotateF(mtxRotX, rotX, 1.0f, 0.0f, 0.0f); + guRotateF(mtxRotY, rotY, 0.0f, 1.0f, 0.0f); + guRotateF(mtxRotZ, rotZ, 0.0f, 0.0f, 1.0f); + guMtxCatF(mtxRotY, mtxRotX, mtxTemp); + guMtxCatF(mtxTemp, mtxRotZ, mtxRotation); + guScaleF(mtxScale, partTable->scale.x, partTable->scale.y * partTable->verticalStretch, partTable->scale.z); + guMtxCatF(mtxScale, mtxPivotOn, mtxTransform); + guMtxCatF(mtxTransform, mtxRotation, mtxTemp); + guMtxCatF(mtxTemp, mtxPivotOff, mtxTransform); if (!(partTable->flags & ACTOR_PART_FLAG_USE_ABSOLUTE_POSITION)) { - guMtxCatF(sp1D8, sp298, sp198); + guMtxCatF(mtxTransform, mtxActor, mtxTemp); } else { - guMtxCatF(sp1D8, sp2D8, sp198); + guMtxCatF(mtxTransform, mtxPartScale, mtxTemp); } - guMtxCatF(sp198, sp158, sp1D8); + guMtxCatF(mtxTemp, mtxTranslate, mtxTransform); flags = ACTOR_PART_FLAG_80000000; temp = phi_fp - l * phi_s6; if (arg0 == 0) { - spr_draw_npc_sprite(partTable->unk_84 | flags, scale, temp, 0, sp1D8); + spr_draw_npc_sprite(partTable->unk_84 | flags, scale, temp, 0, mtxTransform); } else { - spr_draw_npc_sprite(partTable->unk_84 | flags, clamp_angle(scale + 0xB4), temp, 0, sp1D8); + spr_draw_npc_sprite(partTable->unk_84 | flags, clamp_angle(scale + 0xB4), temp, 0, mtxTransform); } } } @@ -564,7 +552,7 @@ void func_8025593C(Actor* actor) { func_802550BC(0, actor); } -void func_8025595C(void* data) { +void appendGfx_enemy_actor_blur(void* data) { Actor* actor = data; func_802552EC(0, actor); @@ -574,7 +562,7 @@ void func_8025597C(Actor* actor) { func_802550BC(1, actor); } -void func_8025599C(void* data) { +void appendGfx_partner_actor_blur(void* data) { Actor* actor = data; func_802552EC(1, actor); @@ -596,7 +584,7 @@ void update_actor_shadow(s32 arg0, Actor* actor) { shadow = get_shadow_by_index(actor->shadow.id); shadow->flags |= ENTITY_FLAGS_HIDDEN; if (!(actor->flags & ACTOR_FLAG_DISABLED)) { - if (actor->flags & ACTOR_FLAG_10000000) { + if (actor->flags & ACTOR_FLAG_BLUR_ENABLED) { if (arg0 == 0) { func_8025593C(actor); } else { @@ -719,7 +707,420 @@ void update_hero_shadows(void) { void func_80255FD8(void) { } -INCLUDE_ASM(s32, "182B30", func_80255FE0); +void create_status_chill_out(s32 iconID); +void enable_status_2(s32 iconID); +void enable_status_chill_out(s32 iconID); +void enable_status_debuff(s16); +void enable_status_transparent(s16); +s32 func_80265CE8(u32*, s32); +void func_80266DAC(Actor* actor, s32 arg1); +void set_status_icons_offset(s32 iconID, s32 offsetY, s32 arg2); +void set_status_icons_properties(s32 iconID, f32 x, f32 y, f32 z, s32 arg, s32 arg2, s32 radius, s32 offsetY); + +void appendGfx_npc_actor(s32 isPartner, s32 actorIndex) { + BattleStatus* battleStatus = &gBattleStatus; + Matrix4f mtxRotX, mtxRotY, mtxRotZ, mtxRotation; + Matrix4f mtxScale, mtxScaleMod; + Matrix4f mtxPivotOn, mtxPivotOff, mtxTranslate; + Matrix4f mtxTemp, mtxActor, mtxTransform, mtxPartScale; + Actor* actor; + ActorPart* part; + EffectInstance* effect; + s32 numParts; + f32 actorPosX, actorPosY, actorPosZ; + f32 partPosX, partPosY, partPosZ, partYaw; + u32 lastAnim; + s32 animChanged; + s32 cond2; + s32 decorChanged; + s32 i; + + if (!isPartner) { + actor = battleStatus->enemyActors[actorIndex]; + } else { + actor = battleStatus->partnerActor; + } + actorPosX = actor->currentPos.x + actor->headOffset.x; + if (!(actor->flags & ACTOR_FLAG_HP_OFFSET_BELOW)) { + actorPosY = actor->currentPos.y + actor->headOffset.y + actor->unk_19A; + } else { + actorPosY = actor->currentPos.y - actor->headOffset.y + actor->unk_19A; + } + actorPosZ = actor->currentPos.z + actor->headOffset.z; + + actor->disableEffect->data.disableX->pos.x = actorPosX + ((actor->actorBlueprint->statusIconOffset.x + actor->unk_194) * actor->scalingFactor); + actor->disableEffect->data.disableX->pos.y = actorPosY + ((actor->actorBlueprint->statusIconOffset.y + actor->unk_195) * actor->scalingFactor); + actor->disableEffect->data.disableX->pos.z = actorPosZ; + + if (!(gBattleStatus.flags1 & ACTOR_PART_FLAG_4) && (actor->flags & ACTOR_FLAG_8000000)) { + if (actor->disableDismissTimer != 0) { + actor->disableDismissTimer--; + actor->disableEffect->data.disableX->pos.y = -1000.0f; + } else { + actor->disableEffect->data.disableX->scale = (actor->scalingFactor * 0.75); + } + } else { + actor->disableEffect->data.disableX->pos.y = -1000.0f; + actor->disableDismissTimer = 10; + } + if (actor->debuff == STATUS_FROZEN) { + effect = actor->icePillarEffect; + if (actor->icePillarEffect != NULL) { + if ((gBattleStatus.flags1 & BS_FLAGS1_8) || (!(gBattleStatus.flags1 & BS_FLAGS1_4) && (actor->flags & ACTOR_FLAG_8000000))) { + effect->data.icePillar->pos.x = actorPosX; + effect->data.icePillar->pos.y = actorPosY; + effect->data.icePillar->pos.z = actorPosZ; + effect->data.icePillar->unk_20 = actor->size.y / 24.0; + } else { + effect->data.icePillar->pos.x = 0.0f; + effect->data.icePillar->pos.y = -1000.0f; + effect->data.icePillar->pos.z = 0.0f; + } + } + } else { + effect = actor->icePillarEffect; + if (effect != NULL) { + effect->flags |= EFFECT_INSTANCE_FLAGS_10; + actor->icePillarEffect = NULL; + } + } + set_status_icons_properties(actor->hudElementDataIndex, actorPosX, actorPosY, actorPosZ, + (actor->actorBlueprint->statusIconOffset.x + actor->unk_194) * actor->scalingFactor, + (actor->actorBlueprint->statusIconOffset.y + actor->unk_195) * actor->scalingFactor, + (actor->actorBlueprint->statusMessageOffset.x + actor->unk_196) * actor->scalingFactor, + (actor->actorBlueprint->statusMessageOffset.y + actor->unk_197) * actor->scalingFactor); + + if (!(actor->flags & ACTOR_FLAG_HP_OFFSET_BELOW)) { + set_status_icons_offset(actor->hudElementDataIndex, + actor->size.y * actor->scalingFactor, + actor->size.x * actor->scalingFactor); + } else { + set_status_icons_offset(actor->hudElementDataIndex, + -actor->size.y * actor->scalingFactor, + actor->size.x * actor->scalingFactor); + } + + do { + if (actor->debuff == STATUS_SHRINK) { + actor->scalingFactor += ((0.4 - actor->scalingFactor) / 6.0); + } else { + actor->scalingFactor += ((1.0 - actor->scalingFactor) / 6.0); + } + } while (0); // required to match + + if (!(actor->flags & ACTOR_FLAG_HP_OFFSET_BELOW)) { + guTranslateF(mtxPivotOn, + -actor->rotationPivotOffset.x * actor->scalingFactor, + -actor->rotationPivotOffset.y * actor->scalingFactor, + -actor->rotationPivotOffset.z * actor->scalingFactor); + guTranslateF(mtxPivotOff, + actor->rotationPivotOffset.x * actor->scalingFactor, + actor->rotationPivotOffset.y * actor->scalingFactor, + actor->rotationPivotOffset.z * actor->scalingFactor); + } else { + guTranslateF(mtxPivotOn, + -actor->rotationPivotOffset.x * actor->scalingFactor, + actor->rotationPivotOffset.y * actor->scalingFactor, + -actor->rotationPivotOffset.z * actor->scalingFactor); + guTranslateF(mtxPivotOff, + actor->rotationPivotOffset.x * actor->scalingFactor, + -actor->rotationPivotOffset.y * actor->scalingFactor, + actor->rotationPivotOffset.z * actor->scalingFactor); + } + guRotateF(mtxRotX, actor->rotation.x, 1.0f, 0.0f, 0.0f); + guRotateF(mtxRotY, actor->rotation.y, 0.0f, 1.0f, 0.0f); + guRotateF(mtxRotZ, actor->rotation.z, 0.0f, 0.0f, 1.0f); + guMtxCatF(mtxRotY, mtxRotX, mtxTemp); + guMtxCatF(mtxTemp, mtxRotZ, mtxRotation); + guScaleF(mtxScale, + actor->scale.x * SPRITE_WORLD_SCALE_D * actor->scalingFactor, + actor->scale.y * SPRITE_WORLD_SCALE_D * actor->scalingFactor, + actor->scale.z * SPRITE_WORLD_SCALE_D); + guScaleF(mtxScaleMod, actor->scaleModifier.x, actor->scaleModifier.y, actor->scaleModifier.z); + guMtxCatF(mtxPivotOn, mtxScale, mtxTemp); + guMtxCatF(mtxTemp, mtxScaleMod, mtxScale); + guMtxCatF(mtxScale, mtxRotation, mtxTransform); + guMtxCatF(mtxTransform, mtxPivotOff, mtxActor); + + part = actor->partsTable; + numParts = actor->numParts; + for (i = 0; i < numParts; i++) { + if (!(part->flags & ACTOR_PART_FLAG_USE_ABSOLUTE_POSITION)) { + partPosX = actorPosX + part->partOffset.x + part->visualOffset.x; + if (!(actor->flags & ACTOR_FLAG_HP_OFFSET_BELOW)) { + partPosY = actorPosY + part->partOffset.y + part->visualOffset.y; + } else { + partPosY = (actorPosY - part->partOffset.y) - part->visualOffset.y; + } + partPosZ = actorPosZ + part->partOffset.z + part->visualOffset.z; + partYaw = part->yaw = actor->yaw; + } else { + partPosX = part->absolutePosition.x + part->visualOffset.x; + partPosY = part->absolutePosition.y + part->visualOffset.y; + partPosZ = part->absolutePosition.z + part->visualOffset.z; + guScaleF(mtxPartScale, + actor->scale.x * SPRITE_WORLD_SCALE_D, + actor->scale.y * SPRITE_WORLD_SCALE_D, + actor->scale.z * SPRITE_WORLD_SCALE_D); + partYaw = part->yaw; + } + part->currentPos.x = partPosX; + part->currentPos.y = partPosY; + part->currentPos.z = partPosZ; + + if (part->flags & ACTOR_PART_FLAG_INVISIBLE) { + part = part->nextPart; + continue; + } + if (part->idleAnimations == NULL) { + part = part->nextPart; + continue; + } + + if (actor->transparentStatus == STATUS_TRANSPARENT) { + part->flags |= ACTOR_PART_FLAG_100; + } else { + part->flags &= ~ACTOR_PART_FLAG_100; + } + + do { + lastAnim = part->currentAnimation; + animChanged = FALSE; + cond2 = FALSE; + decorChanged = FALSE; + } while (0); // required to match + + if (isPartner) { + if ((gBattleStatus.flags2 & (BS_FLAGS2_10 | BS_FLAGS2_4)) == BS_FLAGS2_4) { + do { + if (actor->koStatus == 0) { + part->currentAnimation = func_80265CE8(part->idleAnimations, STATUS_TURN_DONE); + spr_update_sprite(part->unk_84, part->currentAnimation, part->animationRate); + animChanged = TRUE; + } + } while (0); // required to match + func_80266DAC(actor, 0xC); + cond2 = 1; + func_80266EE8(actor, 0); + decorChanged = TRUE; + } + if (isPartner && (gPlayerData.currentPartner == PARTNER_WATT)) { + if (cond2 == 0) { + func_80266DAC(actor, 9); + } + cond2 = 1; + } + } + if (actor->isGlowing) { + if (!decorChanged) { + func_80266EE8(actor, 0xB); + } + decorChanged = TRUE; + } + if (actor->debuff == STATUS_POISON) { + if (cond2 == 0) { + func_80266DAC(actor, 6); + } + cond2 = 1; + } + if (actor->debuff == STATUS_PARALYZE) { + if (cond2 == 0) { + func_80266DAC(actor, 7); + } + cond2 = 1; + } + if (actor->debuff == STATUS_FEAR) { + if (cond2 == 0) { + func_80266DAC(actor, 5); + } + cond2 = 1; + } + if (actor->staticStatus == STATUS_STATIC) { + if (cond2 == 0) { + func_80266DAC(actor, 4); + } + cond2 = 1; + } + if ((cond2 == 0) && !(part->flags & ACTOR_PART_FLAG_1000000)) { + func_80266DAC(actor, 0); + } + if ((!decorChanged) && !(part->flags & ACTOR_PART_FLAG_1000000)) { + func_80266EE8(actor, 0); + } + if (actor->flags & ACTOR_FLAG_4000000) { + if (!(part->flags & ACTOR_PART_FLAG_20000000)) { + if (actor->debuff == STATUS_FROZEN) { + if (!animChanged) { + part->currentAnimation = func_80265CE8(part->idleAnimations, STATUS_FROZEN); + animChanged = TRUE; + } + } else if (actor->debuff != STATUS_SHRINK) { + if (actor->debuff == STATUS_POISON) { + if (!animChanged) { + part->currentAnimation = func_80265CE8(part->idleAnimations, STATUS_POISON); + animChanged = TRUE; + } + } else if (actor->debuff == STATUS_DIZZY) { + if (!animChanged) { + part->currentAnimation = func_80265CE8(part->idleAnimations, STATUS_DIZZY); + animChanged = TRUE; + } + } else if (actor->debuff == STATUS_FEAR) { + if (!animChanged) { + part->currentAnimation = func_80265CE8(part->idleAnimations, STATUS_FEAR); + animChanged = TRUE; + } + } else if (actor->debuff == STATUS_SLEEP) { + if (!animChanged) { + part->currentAnimation = func_80265CE8(part->idleAnimations, STATUS_SLEEP); + animChanged = TRUE; + } + } else if (actor->debuff == STATUS_PARALYZE) { + if (!animChanged) { + part->currentAnimation = func_80265CE8(part->idleAnimations, STATUS_PARALYZE); + animChanged = TRUE; + } + } + } + + if (actor->staticStatus == STATUS_STATIC) { + if (!animChanged) { + part->currentAnimation = func_80265CE8(part->idleAnimations, STATUS_STATIC); + animChanged = TRUE; + } + + do {} while (0); // required to match + } + if (!animChanged) { + part->currentAnimation = func_80265CE8(part->idleAnimations, 1); + } + + if (isPartner) { + if (actor->koStatus == STATUS_DAZE) { + part->currentAnimation = func_80265CE8(part->idleAnimations, STATUS_DAZE); + animChanged = TRUE; + } else { + s32 temp = func_80265CE8(part->idleAnimations, STATUS_NORMAL); + do { + if (temp == func_80265CE8(part->idleAnimations, STATUS_DAZE)) { + part->currentAnimation = func_80265CE8(part->idleAnimations, STATUS_NORMAL); + } + } while (0); // required to match + } + } + if (actor->debuff == STATUS_STOP) { + part->currentAnimation = func_80265CE8(part->idleAnimations, STATUS_STOP); + create_status_debuff(actor->hudElementDataIndex, STATUS_STOP); + } else if (!animChanged) { + s32 temp = func_80265CE8(part->idleAnimations, STATUS_NORMAL); + do { + if (temp == func_80265CE8(part->idleAnimations, STATUS_STOP)) { + part->currentAnimation = func_80265CE8(part->idleAnimations, STATUS_NORMAL); + } + } while (0); // required to match + } + } + } + + if (!(gBattleStatus.flags1 & BS_FLAGS1_4) && (actor->flags & ACTOR_FLAG_8000000)) { + do { + if (actor->debuff == STATUS_POISON) { + create_status_debuff(actor->hudElementDataIndex, STATUS_POISON); + } else if (actor->debuff == STATUS_DIZZY) { + create_status_debuff(actor->hudElementDataIndex, STATUS_DIZZY); + } else if (actor->debuff == STATUS_SLEEP) { + create_status_debuff(actor->hudElementDataIndex, STATUS_SLEEP); + } else if (actor->debuff == STATUS_PARALYZE) { + create_status_debuff(actor->hudElementDataIndex, STATUS_PARALYZE); + } else if (actor->debuff == STATUS_SHRINK) { + create_status_debuff(actor->hudElementDataIndex, STATUS_SHRINK); + } else if (actor->debuff == STATUS_FROZEN) { + create_status_debuff(actor->hudElementDataIndex, STATUS_FROZEN); + } + } while (0); // required to match + + if (actor->staticStatus == STATUS_STATIC) { + create_status_static(actor->hudElementDataIndex, STATUS_STATIC); + } + if ((actor->transparentStatus == STATUS_TRANSPARENT) || (part->flags & ACTOR_PART_FLAG_100)) { + create_status_transparent(actor->hudElementDataIndex, STATUS_TRANSPARENT); + } + if (actor->chillOutAmount != 0) { + create_status_chill_out(actor->hudElementDataIndex); + } + } else { + enable_status_debuff(actor->hudElementDataIndex); + enable_status_2(actor->hudElementDataIndex); + enable_status_transparent(actor->hudElementDataIndex); + enable_status_chill_out(actor->hudElementDataIndex); + } + if (part->unk_84 >= 0) { + if (lastAnim != part->currentAnimation) { + spr_update_sprite(part->unk_84, part->currentAnimation, part->animationRate); + part->unk_8C = func_802DE5C8(part->unk_84); + } + } + if (!(actor->flags & ACTOR_FLAG_HP_OFFSET_BELOW)) { + guTranslateF(mtxPivotOn, + -part->rotationPivotOffset.x * actor->scalingFactor, + -part->rotationPivotOffset.y * actor->scalingFactor, + -part->rotationPivotOffset.z * actor->scalingFactor); + guTranslateF(mtxPivotOff, + part->rotationPivotOffset.x * actor->scalingFactor, + part->rotationPivotOffset.y * actor->scalingFactor, + part->rotationPivotOffset.z * actor->scalingFactor); + } else { + guTranslateF(mtxPivotOn, + -part->rotationPivotOffset.x * actor->scalingFactor, + part->rotationPivotOffset.y * actor->scalingFactor, + -part->rotationPivotOffset.z * actor->scalingFactor); + guTranslateF(mtxPivotOff, + part->rotationPivotOffset.x * actor->scalingFactor, + -part->rotationPivotOffset.y * actor->scalingFactor, + part->rotationPivotOffset.z * actor->scalingFactor); + } + guTranslateF(mtxTranslate, + partPosX + part->unkOffset[0], + partPosY + part->unkOffset[1], + partPosZ); + guRotateF(mtxRotX, part->rotation.x, 1.0f, 0.0f, 0.0f); + guRotateF(mtxRotY, part->rotation.y, 0.0f, 1.0f, 0.0f); + guRotateF(mtxRotZ, part->rotation.z, 0.0f, 0.0f, 1.0f); + guMtxCatF(mtxRotY, mtxRotX, mtxTemp); + guMtxCatF(mtxTemp, mtxRotZ, mtxRotation); + guScaleF(mtxScale, part->scale.x, part->scale.y * part->verticalStretch, part->scale.z); + guMtxCatF(mtxScale, mtxPivotOn, mtxTransform); + guMtxCatF(mtxTransform, mtxRotation, mtxTemp); + guMtxCatF(mtxTemp, mtxPivotOff, mtxTransform); + + if (!(part->flags & ACTOR_PART_FLAG_USE_ABSOLUTE_POSITION)) { + guMtxCatF(mtxTransform, mtxActor, mtxTemp); + } else { + guMtxCatF(mtxTransform, mtxPartScale, mtxTemp); + } + guMtxCatF(mtxTemp, mtxTranslate, mtxTransform); + + part->currentPos.x = partPosX + part->unkOffset[0]; + part->currentPos.y = partPosY + part->unkOffset[1]; + part->currentPos.z = partPosZ; + + if (part->unk_84 >= 0) { + if (!isPartner) { + func_8025C840(1, part, partYaw, 0); + func_8025CCC8(1, part, partYaw, 0); + func_802591EC(1, part, partYaw, mtxTransform, 0); + } else { + func_8025C840(1, part, clamp_angle(180.0f - partYaw), 0); + func_8025CCC8(1, part, clamp_angle(180.0f - partYaw), 0); + func_802591EC(1, part, clamp_angle(180.0f - partYaw), mtxTransform, 0); + } + + _add_part_decoration(part); + } + + part = part->nextPart; + } +} void func_802571F0(s32 flipYaw, Actor* actor) { Matrix4f mtxRotX, mtxRotY, mtxRotZ, mtxRotation, mtxScale; @@ -866,15 +1267,15 @@ void func_802571F0(s32 flipYaw, Actor* actor) { } } -void func_80257B28(void* data) { - func_80255FE0(FALSE, (s32) data); +void appendGfx_enemy_actor(void* data) { + appendGfx_npc_actor(FALSE, (s32) data); } -void func_80257B48(void* data) { - func_80255FE0(TRUE, (s32) data); +void appendGfx_partner_actor(void* data) { + appendGfx_npc_actor(TRUE, (s32) data); } -void func_80257B68(void* data) { +void appendGfx_enemy_actor_decorations(void* data) { Actor* actor = data; func_802571F0(0, actor); @@ -894,7 +1295,7 @@ void update_player_actor_shadow(void) { parts->unk_8C = spr_update_player_sprite(0, parts->currentAnimation, parts->animationRate); - if (player->flags & ACTOR_FLAG_10000000) { + if (player->flags & ACTOR_FLAG_BLUR_ENABLED) { func_802549F4(player); } @@ -923,14 +1324,434 @@ void update_player_actor_shadow(void) { set_standard_shadow_scale(shadow, distance); shadow->scale.x *= player->shadowScale * player->scalingFactor; - if (parts->opacity >= 255 && !(parts->flags & 0x100)) { + if (parts->opacity >= 255 && !(parts->flags & ACTOR_PART_FLAG_100)) { player->renderMode = RENDER_MODE_ALPHATEST; } else { player->renderMode = RENDER_MODE_SURFACE_XLU_LAYER3; } } -INCLUDE_ASM(void, "182B30", func_80257DA4); +#ifdef NON_EQUIVALENT +void appendGfx_player_actor(void* arg0) { + BattleStatus* battleStatus = &gBattleStatus; + PlayerData* playerData = &gPlayerData; + Matrix4f mtxRotX, mtxRotY, mtxRotZ, mtxRotation; + Matrix4f mtxScale; + Matrix4f mtxPivotOn, mtxPivotOff, mtxTranslate; + Matrix4f mtxTemp, mtxTransform; + + Actor* partner; + Actor* player; + ActorPart* playerParts; + EffectInstance* effect; + f32 playerPosX, playerPosY, playerPosZ, playerYaw; + f32 dx, dy, dz; + s32 cond1, cond2, cond3, cond4; + u32 lastAnim; + + player = gBattleStatus.playerActor; + partner = gBattleStatus.partnerActor; + playerParts = player->partsTable; + + playerPosX = player->currentPos.x + player->headOffset.x; + playerPosY = player->currentPos.y + player->headOffset.y + player->unk_19A; + playerPosZ = player->currentPos.z + player->headOffset.z; + + playerYaw = player->yaw; + playerParts->yaw = playerYaw; + + player->disableEffect->data.disableX->pos.x = playerPosX + ((player->actorBlueprint->statusIconOffset.x + player->unk_194) * player->scalingFactor); + player->disableEffect->data.disableX->pos.y = playerPosY + ((player->actorBlueprint->statusIconOffset.y + player->unk_195) * player->scalingFactor); + player->disableEffect->data.disableX->pos.z = playerPosZ; + + if (!(gBattleStatus.flags1 & 4) && (player->flags & 0x08000000)) { + if (player->disableDismissTimer != 0) { + player->disableDismissTimer--; + player->disableEffect->data.disableX->pos.y = -1000.0f; + } else { + player->disableEffect->data.disableX->scale = player->scalingFactor * 0.75; + } + } else { + player->disableEffect->data.disableX->pos.y = -1000.0f; + player->disableDismissTimer = 10; + } + if (battleStatus->waterBlockTurnsLeft != 0) { + if ((gBattleStatus.flags1 & 8) || (!(gBattleStatus.flags1 & 4) && (player->flags & 0x08000000))) { + effect = battleStatus->waterBlockEffect; + effect->data.waterBlock->pos.x = playerPosX; + effect->data.waterBlock->pos.y = playerPosY; + effect->data.waterBlock->pos.z = playerPosZ; + } else { + effect = battleStatus->waterBlockEffect; + effect->data.waterBlock->pos.x = playerPosX; + effect->data.waterBlock->pos.y = -1000.0f; + effect->data.waterBlock->pos.z = playerPosZ; + } + } + if (battleStatus->cloudNineTurnsLeft != 0) { + if ((gBattleStatus.flags1 & 8) || (!(gBattleStatus.flags1 & 4) && (player->flags & 0x08000000))) { + effect = battleStatus->cloudNineEffect; + effect->data.endingDecals->pos.x = playerPosX; + effect->data.endingDecals->pos.y = playerPosY; + effect->data.endingDecals->pos.z = playerPosZ; + effect->data.endingDecals->unk_10 = player->scalingFactor; + } else { + effect = battleStatus->cloudNineEffect; + effect->data.endingDecals->pos.x = playerPosX; + effect->data.endingDecals->pos.y = -1000.0f; + effect->data.endingDecals->pos.z = playerPosZ; + } + } + if (player->debuff == 7) { + effect = player->icePillarEffect; + if (player->icePillarEffect != NULL) { + if ((gBattleStatus.flags1 & 8) || (!(gBattleStatus.flags1 & 4) && (player->flags & 0x08000000))) { + effect->data.icePillar->pos.x = (f32) (playerPosX - 8.0f); + effect->data.icePillar->pos.y = playerPosY; + effect->data.icePillar->pos.z = playerPosZ; + effect->data.icePillar->unk_20 = player->size.y / 24.0; + } else { + effect->data.icePillar->pos.x = 0.0f; + effect->data.icePillar->pos.y = -1000.0f; + effect->data.icePillar->pos.z = 0.0f; + } + } + } else { + effect = player->icePillarEffect; + if (effect != NULL) { + effect->flags |= 0x10; + player->icePillarEffect = NULL; + } + } + if (!(gBattleStatus.flags2 & 0x10000) && !(gBattleStatus.flags1 & 4) && (player->flags & 0x08000000)) { + battleStatus->buffEffect->data.partnerBuff->unk_02 = 1; + } else { + battleStatus->buffEffect->data.partnerBuff->unk_02 = 0; + } + do { + if (player->debuff == 0xA) { + player->scalingFactor += ((0.4 - player->scalingFactor) / 6.0); + } else { + player->scalingFactor += ((1.0 - player->scalingFactor) / 6.0); + } + } while (0); // required to match + + if (player->flags & 0x08000000) { + if (battleStatus->hammerCharge > 0) { + create_status_icon_boost_hammer(player->hudElementDataIndex); + remove_status_icon_boost_jump(player->hudElementDataIndex); + } else { + remove_status_icon_boost_hammer(player->hudElementDataIndex); + } + if (battleStatus->jumpCharge > 0) { + create_status_icon_boost_jump(player->hudElementDataIndex); + remove_status_icon_boost_hammer(player->hudElementDataIndex); + } else { + remove_status_icon_boost_jump(player->hudElementDataIndex); + } + } else { + enable_status_icon_boost_jump(player->hudElementDataIndex); + enable_status_icon_boost_hammer(player->hudElementDataIndex); + } + + if ((player->flags & 0x08000000) && !(gBattleStatus.flags2 & 0x40)) { + if (playerData->curHP > 1) { + remove_status_icon_peril(player->hudElementDataIndex); + if (playerData->curHP > 5) { + remove_status_icon_danger(player->hudElementDataIndex); + } else { + create_status_icon_danger(player->hudElementDataIndex); + remove_status_icon_peril(player->hudElementDataIndex); + } + } else { + create_status_icon_peril(player->hudElementDataIndex); + remove_status_icon_danger(player->hudElementDataIndex); + } + } else { + remove_status_icon_peril(player->hudElementDataIndex); + remove_status_icon_danger(player->hudElementDataIndex); + } + + if (player->transparentStatus == 0xE) { + playerParts->flags |= 0x100; + } else { + playerParts->flags &= ~0x100; + } + + do { + cond1 = FALSE; + cond2 = FALSE; + cond3 = FALSE; + cond4 = FALSE; + lastAnim = playerParts->currentAnimation; + } while (0); // required to match + + if (((((gBattleStatus.flags2 & 0xA) == 2) && (partner != NULL)) || (gBattleStatus.outtaSightActive > 0)) && !(player->flags & 0x20000000) && ((partner == NULL) || !(partner->flags & 0x200000))) { + if (!(gBattleStatus.flags2 & 0x100000)) { + if ((player->debuff != 3) && (player->debuff != 5) && (player->debuff != 7) && (player->debuff != 8)) { + if ((player->transparentStatus != 0xE) && (player->stoneStatus != 0xC) && ((gBattleStatus.outtaSightActive > 0) || (gBattleStatus.flags2 & 2))) { + if (is_ability_active(0x15)) { + playerParts->currentAnimation = func_80265D44(0x13); + } else if (player->debuff == 6) { + playerParts->currentAnimation = func_80265D44(0x15); + } else if (player->debuff == 4) { + playerParts->currentAnimation = func_80265D44(0x18); + } else { + playerParts->currentAnimation = func_80265D44(0x12); + } + spr_update_player_sprite(0, (s32) playerParts->currentAnimation, playerParts->animationRate); + cond1 = TRUE; + } + } + + if (player->debuff != 9) { + func_80266DAC(player, 0xC); + } else { + func_80266DAC(player, 0xD); + } + cond2 = TRUE; + + func_80266EE8(player, 0); + cond3 = TRUE; + } + } + if (player->stoneStatus == 0xC) { + playerParts->currentAnimation = func_80265D44(0xC); + spr_update_player_sprite(0, playerParts->currentAnimation, playerParts->animationRate); + cond1 = TRUE; + + if (cond2 == 0) { + func_80266DAC(player, 0); + } + func_80266EE8(player, 0); + cond2 = 1; + enable_status_debuff(player->hudElementDataIndex); + cond3 = 1; + enable_status_2(player->hudElementDataIndex); + cond4 = 1; + + enable_status_transparent(player->hudElementDataIndex); + enable_status_chill_out(player->hudElementDataIndex); + } + + if ((player->flags & 0x04000000) && (cond1 == 0)) { + s32 temp = playerParts->currentAnimation; + if (temp == func_80265D44(0xC)) { + playerParts->currentAnimation = func_80265D44(1); + } + } + + if (is_ability_active(0x15) != 0) { + if (cond2 == 0) { + func_80266DAC(player, 8); + } + cond2 = 1; + } + if (player->debuff == 9) { + if (cond2 == 0) { + func_80266DAC(player, 6); + } + cond2 = 1; + } + if (player->debuff == 5) { + if (cond2 == 0) { + func_80266DAC(player, 7); + } + cond2 = 1; + } + if (player->staticStatus == 0xB) { + if (cond2 == 0) { + func_80266DAC(player, 4); + } + cond2 = 1; + } + if (battleStatus->turboChargeTurnsLeft != 0) { + if (cond3 == 0) { + func_80266EE8(player, 0xB); + } + cond3 = 1; + } + if (is_ability_active(0x13) != 0) { + if (cond2 == 0) { + func_80266DAC(player, 4); + } + cond2 = 1; + } + if (cond2 == 0) { + func_80266DAC(player, 0); + } + if (cond3 == 0) { + func_80266EE8(player, 0); + } + if (player->flags & 0x04000000) { + if (battleStatus->hustleTurns != 0) { + playerParts->currentAnimation = func_80265D44(0x19); + cond1 = 1; + } else if (cond1 == 0) { + s32 temp = func_80265D44(1); + do { + if (temp == func_80265D44(0x19)) { + playerParts->currentAnimation = func_80265D44(1); + } + } while (0); // required to match + } + + do { + if (player->debuff == 7) { + if (!cond1) { + playerParts->currentAnimation = func_80265D44(7); + cond1 = 1; + } + } else if (player->debuff != STATUS_SHRINK) { + if (player->debuff == 9) { + if (!cond1) { + playerParts->currentAnimation = func_80265D44(9); + cond1 = 1; + } + } else if (player->debuff == 4) { + if (!cond1) { + playerParts->currentAnimation = func_80265D44(4); + cond1 = 1; + } + } else if (player->debuff == 6) { + if (!cond1) { + playerParts->currentAnimation = func_80265D44(6); + cond1 = 1; + } + } else if (player->debuff == 5) { + if (!cond1) { + playerParts->currentAnimation = func_80265D44(5); + cond1 = 1; + } + } else { + if (player_team_is_ability_active(player, 0x15) != 0) { + if (cond1 == 0) { + playerParts->currentAnimation = func_80265D44(0x10); + cond1 = 1; + } + } + } + } + if (is_ability_active(0x13) != 0) { + if (cond1 == 0) { + playerParts->currentAnimation = func_80265D44(0xB); + cond1 = 1; + } + player->staticStatus = 0xB; + player->staticDuration = 0x7F; + } else if ((player->staticStatus == (s8) 0xB) && (cond1 == 0)) { + playerParts->currentAnimation = func_80265D44(0xB); + cond1 = 1; + } + if ((player->transparentStatus == 0xE) || (playerParts->flags & 0x100)) { + if (cond1 == 0) { + playerParts->currentAnimation = func_80265D44(0xE); + cond1 = 1; + } + create_status_transparent((s32) player->hudElementDataIndex, 0xE); + } + if (cond1 == 0) { + playerParts->currentAnimation = func_80265D44(1); + } + } while(0); // needed to match + } + if (!(gBattleStatus.flags1 & 4) && (player->flags & 0x08000000)) { + if (cond4 == 0) { + do { + if (player->debuff == 0x9) { + create_status_debuff(player->hudElementDataIndex, player->debuff); + } else if (player->debuff == 6) { + create_status_debuff(player->hudElementDataIndex, player->debuff); + } else if (player->debuff == 5) { + create_status_debuff(player->hudElementDataIndex, player->debuff); + } else if (player->debuff == 4) { + create_status_debuff(player->hudElementDataIndex, player->debuff); + } else if (player->debuff == 10) { + create_status_debuff(player->hudElementDataIndex, player->debuff); + } else if (player->debuff == 7) { + create_status_debuff(player->hudElementDataIndex, player->debuff); + } + } while (0); // required to match + if ((cond4 == 0) && ((is_ability_active(0x13) != 0) || (player->staticStatus == 0xB))) { + create_status_static((s32) player->hudElementDataIndex, 0xB); + } + } + if ((player->transparentStatus == 0xE) || (playerParts->flags & 0x100)) { + create_status_transparent((s32) player->hudElementDataIndex, 0xE); + } + } else { + enable_status_debuff(player->hudElementDataIndex); + enable_status_2(player->hudElementDataIndex); + enable_status_transparent(player->hudElementDataIndex); + enable_status_chill_out(player->hudElementDataIndex); + } + + if (player->debuff != 8) { + if (cond1 == 0) { + s32 temp = playerParts->currentAnimation; + if (temp == func_80265D44(8)) { + playerParts->currentAnimation = func_80265D44(1); + } + } + } else { + playerParts->currentAnimation = func_80265D44(8); + create_status_debuff(player->hudElementDataIndex, 8); + } + + set_status_icons_properties(player->hudElementDataIndex, + playerPosX, playerPosY, playerPosZ, + player->actorBlueprint->statusIconOffset.x * player->scalingFactor, + player->actorBlueprint->statusIconOffset.y * player->scalingFactor, + player->actorBlueprint->statusMessageOffset.x * player->scalingFactor, + player->actorBlueprint->statusMessageOffset.y * player->scalingFactor); + set_status_icons_offset(player->hudElementDataIndex, + player->size.y * player->scalingFactor, + player->size.x * player->scalingFactor); + + dx = playerPosX + playerParts->unkOffset[0]; + dy = playerPosY + playerParts->unkOffset[1]; + dz = playerPosZ; + playerParts->currentPos.x = dx; + playerParts->currentPos.y = dy; + playerParts->currentPos.z = dz; + guTranslateF(mtxTranslate, dx, dy, dz); + + guTranslateF(mtxPivotOn, + -player->rotationPivotOffset.x * player->scalingFactor, + -player->rotationPivotOffset.y * player->scalingFactor, + -player->rotationPivotOffset.z * player->scalingFactor); + guTranslateF(mtxPivotOff, + player->rotationPivotOffset.x * player->scalingFactor, + player->rotationPivotOffset.y * player->scalingFactor, + player->rotationPivotOffset.z * player->scalingFactor); + + guRotateF(mtxRotX, player->rotation.x, 1.0f, 0.0f, 0.0f); + guRotateF(mtxRotY, player->rotation.y, 0.0f, 1.0f, 0.0f); + guRotateF(mtxRotZ, player->rotation.z, 0.0f, 0.0f, 1.0f); + guMtxCatF(mtxRotY, mtxRotX, mtxTemp); + guMtxCatF(mtxTemp, mtxRotZ, mtxRotation); + + guScaleF(mtxScale, + player->scale.x * SPRITE_WORLD_SCALE_D * player->scalingFactor, + player->scale.y * SPRITE_WORLD_SCALE_D * player->scalingFactor * playerParts->verticalStretch, + player->scale.z * SPRITE_WORLD_SCALE_D); + + guMtxCatF(mtxScale, mtxPivotOn, mtxTemp); + guMtxCatF(mtxTemp, mtxRotation, mtxTransform); + guMtxCatF(mtxTransform, mtxPivotOff, mtxTemp); + guMtxCatF(mtxTemp, mtxTranslate, mtxTransform); + + if (lastAnim != playerParts->currentAnimation) { + spr_update_player_sprite(0, playerParts->currentAnimation, playerParts->animationRate); + } + func_8025C840(0, playerParts, clamp_angle(playerYaw + 180.0f), 0); + func_8025CCC8(0, playerParts, clamp_angle(playerYaw + 180.0f), 0); + func_802591EC(0, playerParts, clamp_angle(playerYaw + 180.0f), mtxTransform, 0); + _add_part_decoration(playerParts); +} +#else +INCLUDE_ASM(void, "182B30", appendGfx_player_actor); +#endif void func_80258E14(void* arg0) { Matrix4f mtxRotX, mtxRotY, mtxRotZ, mtxRotation, mtxScale; @@ -1010,70 +1831,129 @@ s32 func_802591EC(s32 arg0, ActorPart* part, s32 yaw, Matrix4f mtx, s32 arg4) { } } return 0; - } else { - switch (part->decorationTable->unk_6C0) { - case 0: - func_80259A48(arg0, part, yaw, mtx, arg4); - return 0; - case 3: - func_80259AAC(arg0, part, yaw, mtx, arg4); - break; - case 4: - func_80259D9C(arg0, part, yaw, mtx, arg4); - break; - case 5: - func_8025A2C4(arg0, part, yaw, mtx, arg4); - break; - case 6: - func_8025A50C(arg0, part, yaw, mtx, arg4); - break; - case 7: - func_8025A74C(arg0, part, yaw, mtx, arg4); - break; - case 8: - func_8025AA80(arg0, part, yaw, mtx, arg4); - break; - case 9: - func_8025AD90(arg0, part, yaw, mtx, arg4); - break; - case 10: - func_8025B1A8(arg0, part, yaw, mtx, arg4); - break; - case 12: - func_8025B5C0(arg0, part, yaw, mtx, arg4, 0); - break; - case 13: - func_8025B5C0(arg0, part, yaw, mtx, arg4, 1); - break; - case 14: - func_8025BAA0(arg0, part, yaw, 0, mtx, arg4); - break; - case 15: - func_8025BAA0(arg0, part, yaw, 1, mtx, arg4); - break; - case 16: - func_8025C120(arg0, part, yaw, mtx, arg4); - break; - default: - break; - } } + switch (part->decorationTable->unk_6C0) { + case 0: + func_80259A48(arg0, part, yaw, mtx, arg4); + break; + case 3: + func_80259AAC(arg0, part, yaw, mtx, arg4); + break; + case 4: + func_80259D9C(arg0, part, yaw, mtx, arg4); + break; + case 5: + func_8025A2C4(arg0, part, yaw, mtx, arg4); + break; + case 6: + func_8025A50C(arg0, part, yaw, mtx, arg4); + break; + case 7: + func_8025A74C(arg0, part, yaw, mtx, arg4); + break; + case 8: + func_8025AA80(arg0, part, yaw, mtx, arg4); + break; + case 9: + func_8025AD90(arg0, part, yaw, mtx, arg4); + break; + case 10: + func_8025B1A8(arg0, part, yaw, mtx, arg4); + break; + case 12: + func_8025B5C0(arg0, part, yaw, mtx, arg4, 0); + break; + case 13: + func_8025B5C0(arg0, part, yaw, mtx, arg4, 1); + break; + case 14: + func_8025BAA0(arg0, part, yaw, 0, mtx, arg4); + break; + case 15: + func_8025BAA0(arg0, part, yaw, 1, mtx, arg4); + break; + case 16: + func_8025C120(arg0, part, yaw, mtx, arg4); + break; + default: + break; + } return 0; } -INCLUDE_ASM(s32, "182B30", func_80259494); +void func_80259494(ActorPart* part) { + DecorationTable* decor = part->decorationTable; + u16* src; + u16* dest; + s32 i, j; -INCLUDE_ASM(s32, "182B30", func_8025950C); + for (i = 0; i < decor->numSpritePalettes; i++) { + if (decor->unk_6D4[i] != NULL) { + src = decor->unk_6D4[i]; + dest = decor->copiedPalettes[1][i]; + + for (j = 0; j < 0x10; j++) { + *dest = *src | 0xFFFE; + src++; + dest++; + + } + decor->unk_76C[i] = decor->copiedPalettes[1][i]; + } + } +} + +void func_8025950C(ActorPart* part, s32 yaw, Matrix4f mtx) { + DecorationTable* decor = part->decorationTable; + s32 opacity = 255; + s32 idMask = 0; + s32 ii, jj; + u16* dest; + u16* src; + + if (part->opacity < 0xFF) { + idMask = 0x80000000; + opacity = part->opacity; + } + if (part->flags & 0x100) { + idMask = 0x80000000; + opacity = (opacity * 120) / 255; + } + + if (decor->unk_768 != 0) { + decor->spritePalettes = spr_get_npc_palettes(part->currentAnimation >> 0x10); + decor->numSpritePalettes = 0; + while ((s32) decor->spritePalettes[decor->numSpritePalettes] != -1) { + decor->numSpritePalettes++; + } + + for (ii = 0; ii < decor->numSpritePalettes; ii++) { + src = decor->spritePalettes[ii]; + dest = decor->copiedPalettes[0][ii]; + if (src != NULL) { + for (jj = 0; jj < 16; jj++) { + *dest = *src; + src++; + dest++; + } + } + } + + for (ii = 0; ii < decor->numSpritePalettes; ii++) { + decor->unk_6D4[ii] = decor->copiedPalettes[0][ii]; + } + + func_802596C0(part, yaw, mtx); + } else { + spr_draw_npc_sprite(part->unk_84 | idMask, yaw, opacity, NULL, mtx); + } +} void func_802596C0(ActorPart* part, s32 yaw, Matrix4f mtx) { DecorationTable* decorationTable = part->decorationTable; - s32 opacity; - s32 idMask; - - opacity = 255; - - idMask = 0; + s32 opacity = 255; + s32 idMask = 0; if (part->opacity < 255) { idMask = 0x80000000; @@ -1093,17 +1973,59 @@ void func_802596C0(ActorPart* part, s32 yaw, Matrix4f mtx) { } } -INCLUDE_ASM(s32, "182B30", func_802597B0); +void func_802597B0(ActorPart* part, s32 yaw, Matrix4f mtx) { + DecorationTable* decor = part->decorationTable; + s32 opacity = 255; + s32 idMask = 0; + s32 i, j; + PAL_PTR src; + PAL_PTR dest; + + if (part->opacity < 255) { + idMask = 0x80000000; + opacity = part->opacity; + } + if (part->flags & 0x100) { + idMask = 0x80000000; + opacity = (opacity * 120) / 255; + } + + if (decor->unk_768 != 0) { + decor->spritePalettes = spr_get_player_palettes(part->currentAnimation >> 16); + decor->numSpritePalettes = 0; + + while ((s32) decor->spritePalettes[decor->numSpritePalettes] != -1) { + decor->numSpritePalettes++; + } + + for (i = 0; i < decor->numSpritePalettes; i++) { + src = decor->spritePalettes[i]; + dest = decor->copiedPalettes[0][i]; + if (decor->spritePalettes[i] != NULL) { + for (j = 0; j < 16; j++) { + *dest = *src; + dest++; + src++; + } + } + } + for (i = 0; i < decor->numSpritePalettes; i++) { + decor->unk_6D4[i] = decor->copiedPalettes[0][i]; + } + func_8025995C(part, yaw, mtx); + } else { + spr_draw_player_sprite(idMask, yaw, opacity, NULL, mtx); + } +} void func_8025995C(ActorPart* part, s32 yaw, Matrix4f mtx) { DecorationTable* decorationTable = part->decorationTable; - s32 partOpacity = part->opacity; s32 opacity = 255; s32 idMask = 0; - if (partOpacity < 0xFF) { + if (part->opacity < 255) { idMask = 0x80000000; - opacity = partOpacity; + opacity = part->opacity; } if (part->flags & 0x100) { idMask = 0x80000000; @@ -1142,28 +2064,28 @@ void func_80259AAC(s32 arg0, ActorPart* part, s32 yaw, Matrix4f mtx, s32 arg4) { if (decorationTable->unk_6C1 != 0) { if (arg0 == 0) { - decorationTable->palettes = spr_get_player_palettes(part->currentAnimation >> 16); - decorationTable->numPalettes = 0; - while ((s32)decorationTable->palettes[decorationTable->numPalettes] != -1) { - decorationTable->numPalettes++; + decorationTable->spritePalettes = spr_get_player_palettes(part->currentAnimation >> 16); + decorationTable->numSpritePalettes = 0; + while ((s32)decorationTable->spritePalettes[decorationTable->numSpritePalettes] != -1) { + decorationTable->numSpritePalettes++; } } else { - decorationTable->palettes = spr_get_npc_palettes(part->currentAnimation >> 16); - decorationTable->numPalettes = 0; - while ((s32)decorationTable->palettes[decorationTable->numPalettes] != -1) { - decorationTable->numPalettes++; + decorationTable->spritePalettes = spr_get_npc_palettes(part->currentAnimation >> 16); + decorationTable->numSpritePalettes = 0; + while ((s32)decorationTable->spritePalettes[decorationTable->numSpritePalettes] != -1) { + decorationTable->numSpritePalettes++; } } decorationTable->unk_6C2 = 0; decorationTable->unk_6C1 = 0; } - for (i = 0; i < decorationTable->numPalettes; i++) { - u16* palIn = decorationTable->palettes[i]; - u16* palOut = decorationTable->unk_00[i]; + for (i = 0; i < decorationTable->numSpritePalettes; i++) { + u16* palIn = decorationTable->spritePalettes[i]; + u16* palOut = decorationTable->copiedPalettes[0][i]; decorationTable->unk_6D4[i] = palOut; if (palIn != NULL) { - for (j = 0; j < ARRAY_COUNT(decorationTable->unk_00[i]); j++) { + for (j = 0; j < ARRAY_COUNT(decorationTable->copiedPalettes[0][i]); j++) { u8 r = ((*palIn >> 11) & 0x1F); u8 g = ((*palIn >> 6) & 0x1F); u8 b = ((*palIn >> 1) & 0x1F); @@ -1199,26 +2121,26 @@ void func_80259D9C(s32 arg0, ActorPart* part, s32 yaw, Matrix4f mtx, s32 arg4) { if (decorationTable->unk_6C1 != 0) { if (arg0 == 0) { - decorationTable->palettes = spr_get_player_palettes(part->currentAnimation >> 16); - decorationTable->numPalettes = 0; - while ((s32)decorationTable->palettes[decorationTable->numPalettes] != -1) { - decorationTable->numPalettes++; + decorationTable->spritePalettes = spr_get_player_palettes(part->currentAnimation >> 16); + decorationTable->numSpritePalettes = 0; + while ((s32)decorationTable->spritePalettes[decorationTable->numSpritePalettes] != -1) { + decorationTable->numSpritePalettes++; } - decorationTable->unk_6CC = 6; + decorationTable->spriteColorVariations = 6; } else { - decorationTable->palettes = spr_get_npc_palettes(part->currentAnimation >> 16); - decorationTable->numPalettes = 0; - while ((s32)decorationTable->palettes[decorationTable->numPalettes] != -1) { - decorationTable->numPalettes++; + decorationTable->spritePalettes = spr_get_npc_palettes(part->currentAnimation >> 16); + decorationTable->numSpritePalettes = 0; + while ((s32)decorationTable->spritePalettes[decorationTable->numSpritePalettes] != -1) { + decorationTable->numSpritePalettes++; } - decorationTable->unk_6CC = spr_get_npc_color_variations(part->currentAnimation >> 16); + decorationTable->spriteColorVariations = spr_get_npc_color_variations(part->currentAnimation >> 16); } - for (i = 0; i < decorationTable->numPalettes; i++) { - palIn = decorationTable->palettes[i]; - palOut = decorationTable->unk_00[i]; + for (i = 0; i < decorationTable->numSpritePalettes; i++) { + palIn = decorationTable->spritePalettes[i]; + palOut = decorationTable->copiedPalettes[0][i]; if (palIn != NULL) { - for (j = 0; j < ARRAY_COUNT(decorationTable->unk_00[i]); j++) { + for (j = 0; j < ARRAY_COUNT(decorationTable->copiedPalettes[0][i]); j++) { *palOut++ = *palIn++; } } @@ -1244,33 +2166,33 @@ void func_80259D9C(s32 arg0, ActorPart* part, s32 yaw, Matrix4f mtx, s32 arg4) { } switch (temp) { case 0: - for (i = 0; i < decorationTable->unk_6CC; i++) { - palIn = decorationTable->palettes[i]; - palOut = decorationTable->unk_00[i]; + for (i = 0; i < decorationTable->spriteColorVariations; i++) { + palIn = decorationTable->spritePalettes[i]; + palOut = decorationTable->copiedPalettes[0][i]; if (palIn != NULL) { - for (j = 0; j < ARRAY_COUNT(decorationTable->unk_00[i]); j++) { + for (j = 0; j < ARRAY_COUNT(decorationTable->copiedPalettes[0][i]); j++) { *palOut++ = *palIn++; } } } break; case 1: - for (i = 0; i < decorationTable->unk_6CC; i++) { - palIn = decorationTable->palettes[decorationTable->unk_6CC * 3 + i]; - palOut = decorationTable->unk_00[i]; + for (i = 0; i < decorationTable->spriteColorVariations; i++) { + palIn = decorationTable->spritePalettes[decorationTable->spriteColorVariations * 3 + i]; + palOut = decorationTable->copiedPalettes[0][i]; if (palIn != NULL) { - for (j = 0; j < ARRAY_COUNT(decorationTable->unk_00[i]); j++) { + for (j = 0; j < ARRAY_COUNT(decorationTable->copiedPalettes[0][i]); j++) { *palOut++ = *palIn++; } } } break; case 2: - for (i = 0; i < decorationTable->unk_6CC; i++) { - palIn = decorationTable->palettes[i]; - palOut = decorationTable->unk_00[i]; + for (i = 0; i < decorationTable->spriteColorVariations; i++) { + palIn = decorationTable->spritePalettes[i]; + palOut = decorationTable->copiedPalettes[0][i]; if (palIn != NULL) { - for (j = 0; j < ARRAY_COUNT(decorationTable->unk_00[i]); j++) { + for (j = 0; j < ARRAY_COUNT(decorationTable->copiedPalettes[0][i]); j++) { u8 r = ((*palIn >> 11) & 0x1F); u8 g = ((*palIn >> 6) & 0x1F); u8 b = ((*palIn >> 1) & 0x1F); @@ -1288,8 +2210,8 @@ void func_80259D9C(s32 arg0, ActorPart* part, s32 yaw, Matrix4f mtx, s32 arg4) { break; } - for (i = 0; i < decorationTable->numPalettes; i++) { - decorationTable->unk_6D4[i] = decorationTable->unk_00[i]; + for (i = 0; i < decorationTable->numSpritePalettes; i++) { + decorationTable->unk_6D4[i] = decorationTable->copiedPalettes[0][i]; } if (arg0 == 0) { @@ -1312,16 +2234,16 @@ void func_8025A2C4(s32 arg0, ActorPart* part, s32 yaw, Matrix4f mtx, s32 arg4) { if (decorationTable->unk_6C1 != 0) { if (arg0 == 0) { - decorationTable->palettes = spr_get_player_palettes(part->currentAnimation >> 16); - decorationTable->numPalettes = 2; - while ((s32)decorationTable->palettes[decorationTable->numPalettes] != -1) { - decorationTable->numPalettes++; + decorationTable->spritePalettes = spr_get_player_palettes(part->currentAnimation >> 16); + decorationTable->numSpritePalettes = 2; + while ((s32)decorationTable->spritePalettes[decorationTable->numSpritePalettes] != -1) { + decorationTable->numSpritePalettes++; } } else { - decorationTable->palettes = spr_get_npc_palettes(part->currentAnimation >> 16); - decorationTable->numPalettes = 0; - while ((s32)decorationTable->palettes[decorationTable->numPalettes] != -1) { - decorationTable->numPalettes++; + decorationTable->spritePalettes = spr_get_npc_palettes(part->currentAnimation >> 16); + decorationTable->numSpritePalettes = 0; + while ((s32)decorationTable->spritePalettes[decorationTable->numSpritePalettes] != -1) { + decorationTable->numSpritePalettes++; } } @@ -1331,15 +2253,15 @@ void func_8025A2C4(s32 arg0, ActorPart* part, s32 yaw, Matrix4f mtx, s32 arg4) { decorationTable->unk_6C1 = 0; } - for (i = 0; i < decorationTable->numPalettes; i++) { - palIn = decorationTable->palettes[i]; - palOut = decorationTable->unk_00[i]; + for (i = 0; i < decorationTable->numSpritePalettes; i++) { + palIn = decorationTable->spritePalettes[i]; + palOut = decorationTable->copiedPalettes[0][i]; decorationTable->unk_6D4[i] = palOut; if (palIn != NULL) { - for (j = 0; j < ARRAY_COUNT(decorationTable->unk_00[i]); j++) { - u8 r = ((*palIn >> 12) & 0xF); - u8 g = ((*palIn >> 7) & 0xF); - u8 b = ((*palIn >> 2) & 0xF); + for (j = 0; j < ARRAY_COUNT(decorationTable->copiedPalettes[0][i]); j++) { + u8 r = ((*palIn >> 11) / 2) & 0xF; + u8 g = ((*palIn >> 6) / 2) & 0xF; + u8 b = ((*palIn >> 1) / 2) & 0xF; u8 a = *palIn & 1; palIn++; *palOut++ = (r << 11) | (g << 6) | (b << 1) | a; @@ -1374,19 +2296,19 @@ void func_8025A50C(s32 arg0, ActorPart* part, s32 yaw, Matrix4f mtx, s32 arg4) { if (decorationTable->unk_6C1 != 0) { if (arg0 == 0) { - decorationTable->palettes = spr_get_player_palettes(part->currentAnimation >> 16); - decorationTable->numPalettes = 0; - while ((s32)decorationTable->palettes[decorationTable->numPalettes] != -1) { - decorationTable->numPalettes++; + decorationTable->spritePalettes = spr_get_player_palettes(part->currentAnimation >> 16); + decorationTable->numSpritePalettes = 0; + while ((s32)decorationTable->spritePalettes[decorationTable->numSpritePalettes] != -1) { + decorationTable->numSpritePalettes++; } - decorationTable->unk_6CC = 6; + decorationTable->spriteColorVariations = SPR_PLAYER_COLOR_VARIATIONS; } else { - decorationTable->palettes = spr_get_npc_palettes(part->currentAnimation >> 16); - decorationTable->numPalettes = 0; - while ((s32)decorationTable->palettes[decorationTable->numPalettes] != -1) { - decorationTable->numPalettes++; + decorationTable->spritePalettes = spr_get_npc_palettes(part->currentAnimation >> 16); + decorationTable->numSpritePalettes = 0; + while ((s32)decorationTable->spritePalettes[decorationTable->numSpritePalettes] != -1) { + decorationTable->numSpritePalettes++; } - decorationTable->unk_6CC = spr_get_npc_color_variations(part->currentAnimation >> 16); + decorationTable->spriteColorVariations = spr_get_npc_color_variations(part->currentAnimation >> 16); } decorationTable->unk_6C2 = 0; @@ -1394,27 +2316,27 @@ void func_8025A50C(s32 arg0, ActorPart* part, s32 yaw, Matrix4f mtx, s32 arg4) { decorationTable->unk_6C1 = 0; } - for (i = 0; i < decorationTable->numPalettes; i++) { - palIn = decorationTable->palettes[i]; - palOut = decorationTable->unk_00[i]; + for (i = 0; i < decorationTable->numSpritePalettes; i++) { + palIn = decorationTable->spritePalettes[i]; + palOut = decorationTable->copiedPalettes[0][i]; if (palIn != NULL) { - for (j = 0; j < ARRAY_COUNT(decorationTable->unk_00[i]); j++) { + for (j = 0; j < ARRAY_COUNT(decorationTable->copiedPalettes[0][i]); j++) { *palOut++ = *palIn++; } } } - for (i = 0; i < decorationTable->unk_6CC; i++) { - palIn = decorationTable->palettes[decorationTable->unk_6CC + i]; - palOut = decorationTable->unk_00[i]; + for (i = 0; i < decorationTable->spriteColorVariations; i++) { + palIn = decorationTable->spritePalettes[decorationTable->spriteColorVariations + i]; + palOut = decorationTable->copiedPalettes[0][i]; if (palIn != NULL) { - for (j = 0; j < ARRAY_COUNT(decorationTable->unk_00[i]); j++) { + for (j = 0; j < ARRAY_COUNT(decorationTable->copiedPalettes[0][i]); j++) { *palOut++ = *palIn++; } } } - for (i = 0; i < decorationTable->numPalettes; i++) { - decorationTable->unk_6D4[i] = decorationTable->unk_00[i]; + for (i = 0; i < decorationTable->numSpritePalettes; i++) { + decorationTable->unk_6D4[i] = decorationTable->copiedPalettes[0][i]; } if (arg0 == 0) { @@ -1432,16 +2354,16 @@ void func_8025A74C(s32 arg0, ActorPart* part, s32 yaw, Matrix4f mtx, s32 arg4) { if (decorationTable->unk_6C1 != 0) { if (arg0 == 0) { - decorationTable->palettes = spr_get_player_palettes(part->currentAnimation >> 16); - decorationTable->numPalettes = 0; - while ((s32)decorationTable->palettes[decorationTable->numPalettes] != -1) { - decorationTable->numPalettes++; + decorationTable->spritePalettes = spr_get_player_palettes(part->currentAnimation >> 16); + decorationTable->numSpritePalettes = 0; + while ((s32)decorationTable->spritePalettes[decorationTable->numSpritePalettes] != -1) { + decorationTable->numSpritePalettes++; } } else { - decorationTable->palettes = spr_get_npc_palettes(part->currentAnimation >> 16); - decorationTable->numPalettes = 0; - while ((s32)decorationTable->palettes[decorationTable->numPalettes] != -1) { - decorationTable->numPalettes++; + decorationTable->spritePalettes = spr_get_npc_palettes(part->currentAnimation >> 16); + decorationTable->numSpritePalettes = 0; + while ((s32)decorationTable->spritePalettes[decorationTable->numSpritePalettes] != -1) { + decorationTable->numSpritePalettes++; } } @@ -1450,27 +2372,27 @@ void func_8025A74C(s32 arg0, ActorPart* part, s32 yaw, Matrix4f mtx, s32 arg4) { decorationTable->unk_6CA = 10; decorationTable->unk_6C1 = 0; } - for (i = 0; i < decorationTable->numPalettes; i++) { - palIn = decorationTable->palettes[i]; - palOut = decorationTable->unk_00[i]; + for (i = 0; i < decorationTable->numSpritePalettes; i++) { + palIn = decorationTable->spritePalettes[i]; + palOut = decorationTable->copiedPalettes[0][i]; if (palIn != NULL) { - for (j = 0; j < ARRAY_COUNT(decorationTable->unk_00[i]); j++) { + for (j = 0; j < ARRAY_COUNT(decorationTable->copiedPalettes[0][i]); j++) { u8 r = ((*palIn >> 11) & 0x1F); u8 g = ((*palIn >> 6) & 0x1F); u8 b = ((*palIn >> 1) & 0x1F); u8 a = *palIn & 1; palIn++; r += 4; - if (r > 0x1F) { - r = 0x1F; + if (r > 31) { + r = 31; } g += 4; - if (g > 0x1F) { - g = 0x1F; + if (g > 31) { + g = 31; } b += 4; - if (b > 0x1F) { - b = 0x1F; + if (b > 31) { + b = 31; } *palOut++ = (r << 11) | (g << 6) | (b << 1) | a; @@ -1478,8 +2400,8 @@ void func_8025A74C(s32 arg0, ActorPart* part, s32 yaw, Matrix4f mtx, s32 arg4) { } } - for (i = 0; i < decorationTable->numPalettes; i++) { - decorationTable->unk_6D4[i] = decorationTable->unk_00[i]; + for (i = 0; i < decorationTable->numSpritePalettes; i++) { + decorationTable->unk_6D4[i] = decorationTable->copiedPalettes[0][i]; } switch (decorationTable->unk_6C2) { @@ -1497,7 +2419,7 @@ void func_8025A74C(s32 arg0, ActorPart* part, s32 yaw, Matrix4f mtx, s32 arg4) { decorationTable->unk_6C8--; } - switch ((s16)decorationTable->unk_6CA) { + switch (decorationTable->unk_6CA) { case 10: case 12: if (arg0 == 0) { @@ -1508,7 +2430,7 @@ void func_8025A74C(s32 arg0, ActorPart* part, s32 yaw, Matrix4f mtx, s32 arg4) { break; case 13: decorationTable->unk_6CA = 0; - /* fallthrough */ + // fallthrough default: if (arg0 == 0) { func_802597B0(part, yaw, mtx); @@ -1531,17 +2453,17 @@ void func_8025AA80(s32 arg0, ActorPart* part, s32 yaw, Matrix4f mtx, s32 arg4) { if (decorationTable->unk_6C1 != 0) { if (arg0 == 0) { - decorationTable->palettes = spr_get_player_palettes(part->currentAnimation >> 16); - decorationTable->numPalettes = 0; - while ((s32)decorationTable->palettes[decorationTable->numPalettes] != -1) { - decorationTable->numPalettes++; + decorationTable->spritePalettes = spr_get_player_palettes(part->currentAnimation >> 16); + decorationTable->numSpritePalettes = 0; + while ((s32)decorationTable->spritePalettes[decorationTable->numSpritePalettes] != -1) { + decorationTable->numSpritePalettes++; } decorationTable->unk_6C2 = 0; } else { - decorationTable->palettes = spr_get_npc_palettes(part->currentAnimation >> 16); - decorationTable->numPalettes = 0; - while ((s32)decorationTable->palettes[decorationTable->numPalettes] != -1) { - decorationTable->numPalettes++; + decorationTable->spritePalettes = spr_get_npc_palettes(part->currentAnimation >> 16); + decorationTable->numSpritePalettes = 0; + while ((s32)decorationTable->spritePalettes[decorationTable->numSpritePalettes] != -1) { + decorationTable->numSpritePalettes++; } decorationTable->unk_6C2 = 0; } @@ -1550,11 +2472,11 @@ void func_8025AA80(s32 arg0, ActorPart* part, s32 yaw, Matrix4f mtx, s32 arg4) { decorationTable->unk_6C1 = 0; } - for (i = 0; i < decorationTable->numPalettes; i++) { - u16* palIn = decorationTable->palettes[i]; - u16* palOut = decorationTable->unk_00[i]; + for (i = 0; i < decorationTable->numSpritePalettes; i++) { + PAL_PTR palIn = decorationTable->spritePalettes[i]; + PAL_PTR palOut = decorationTable->copiedPalettes[0][i]; if (palIn != NULL) { - for (j = 0; j < ARRAY_COUNT(decorationTable->unk_00[i]); j++) { + for (j = 0; j < ARRAY_COUNT(decorationTable->copiedPalettes[0][i]); j++) { u8 r = ((*palIn >> 11) & 0x1F); u8 g = ((*palIn >> 6) & 0x1F); u8 b = ((*palIn >> 1) & 0x1F); @@ -1570,8 +2492,8 @@ void func_8025AA80(s32 arg0, ActorPart* part, s32 yaw, Matrix4f mtx, s32 arg4) { } } - for (i = 0; i < decorationTable->numPalettes; i++) { - decorationTable->unk_6D4[i] = decorationTable->unk_00[i]; + for (i = 0; i < decorationTable->numSpritePalettes; i++) { + decorationTable->unk_6D4[i] = decorationTable->copiedPalettes[0][i]; } if (arg0 == 0) { @@ -1583,33 +2505,33 @@ void func_8025AA80(s32 arg0, ActorPart* part, s32 yaw, Matrix4f mtx, s32 arg4) { void func_8025AD90(s32 arg0, ActorPart* part, s32 yaw, Matrix4f mtx, s32 arg4) { DecorationTable* decorationTable = part->decorationTable; - u16* palIn; - u16* palOut; + PAL_PTR palIn; + PAL_PTR palOut; s32 i, j; s32 temp; if (decorationTable->unk_6C1 != 0) { if (arg0 == 0) { - decorationTable->palettes = spr_get_player_palettes(part->currentAnimation >> 16); - decorationTable->numPalettes = 0; - while ((s32)decorationTable->palettes[decorationTable->numPalettes] != -1) { - decorationTable->numPalettes++; + decorationTable->spritePalettes = spr_get_player_palettes(part->currentAnimation >> 16); + decorationTable->numSpritePalettes = 0; + while ((s32)decorationTable->spritePalettes[decorationTable->numSpritePalettes] != -1) { + decorationTable->numSpritePalettes++; } - decorationTable->unk_6CC = 6; + decorationTable->spriteColorVariations = 6; } else { - decorationTable->palettes = spr_get_npc_palettes(part->currentAnimation >> 16); - decorationTable->numPalettes = 0; - while ((s32)decorationTable->palettes[decorationTable->numPalettes] != -1) { - decorationTable->numPalettes++; + decorationTable->spritePalettes = spr_get_npc_palettes(part->currentAnimation >> 16); + decorationTable->numSpritePalettes = 0; + while ((s32)decorationTable->spritePalettes[decorationTable->numSpritePalettes] != -1) { + decorationTable->numSpritePalettes++; } - decorationTable->unk_6CC = spr_get_npc_color_variations(part->currentAnimation >> 16); + decorationTable->spriteColorVariations = spr_get_npc_color_variations(part->currentAnimation >> 16); } - for (i = 0; i < decorationTable->numPalettes; i++) { - palIn = decorationTable->palettes[i]; - palOut = decorationTable->unk_00[i]; + for (i = 0; i < decorationTable->numSpritePalettes; i++) { + palIn = decorationTable->spritePalettes[i]; + palOut = decorationTable->copiedPalettes[0][i]; if (palIn != NULL) { - for (j = 0; j < ARRAY_COUNT(decorationTable->unk_00[i]); j++) { + for (j = 0; j < ARRAY_COUNT(decorationTable->copiedPalettes[0][i]); j++) { *palOut++ = *palIn++; } } @@ -1635,33 +2557,33 @@ void func_8025AD90(s32 arg0, ActorPart* part, s32 yaw, Matrix4f mtx, s32 arg4) { } switch (temp) { case 0: - for (i = 0; i < decorationTable->unk_6CC; i++) { - palIn = decorationTable->palettes[i]; - palOut = decorationTable->unk_00[i]; + for (i = 0; i < decorationTable->spriteColorVariations; i++) { + palIn = decorationTable->spritePalettes[i]; + palOut = decorationTable->copiedPalettes[0][i]; if (palIn != NULL) { - for (j = 0; j < ARRAY_COUNT(decorationTable->unk_00[i]); j++) { + for (j = 0; j < ARRAY_COUNT(decorationTable->copiedPalettes[0][i]); j++) { *palOut++ = *palIn++; } } } break; case 1: - for (i = 0; i < decorationTable->unk_6CC; i++) { - palIn = decorationTable->palettes[decorationTable->unk_6CC * 5 + i]; - palOut = decorationTable->unk_00[i]; + for (i = 0; i < decorationTable->spriteColorVariations; i++) { + palIn = decorationTable->spritePalettes[decorationTable->spriteColorVariations * 5 + i]; + palOut = decorationTable->copiedPalettes[0][i]; if (palIn != NULL) { - for (j = 0; j < ARRAY_COUNT(decorationTable->unk_00[i]); j++) { + for (j = 0; j < ARRAY_COUNT(decorationTable->copiedPalettes[0][i]); j++) { *palOut++ = *palIn++; } } } break; case 2: - for (i = 0; i < decorationTable->unk_6CC; i++) { - palIn = decorationTable->palettes[decorationTable->unk_6CC * 6 + i]; - palOut = decorationTable->unk_00[i]; + for (i = 0; i < decorationTable->spriteColorVariations; i++) { + palIn = decorationTable->spritePalettes[decorationTable->spriteColorVariations * 6 + i]; + palOut = decorationTable->copiedPalettes[0][i]; if (palIn != NULL) { - for (j = 0; j < ARRAY_COUNT(decorationTable->unk_00[i]); j++) { + for (j = 0; j < ARRAY_COUNT(decorationTable->copiedPalettes[0][i]); j++) { *palOut++ = *palIn++; } } @@ -1669,8 +2591,8 @@ void func_8025AD90(s32 arg0, ActorPart* part, s32 yaw, Matrix4f mtx, s32 arg4) { break; } - for (i = 0; i < decorationTable->numPalettes; i++) { - decorationTable->unk_6D4[i] = decorationTable->unk_00[i]; + for (i = 0; i < decorationTable->numSpritePalettes; i++) { + decorationTable->unk_6D4[i] = decorationTable->copiedPalettes[0][i]; } if (arg0 == 0) { @@ -1693,26 +2615,26 @@ void func_8025B1A8(s32 arg0, ActorPart* part, s32 yaw, Matrix4f mtx, s32 arg4) { if (decorationTable->unk_6C1 != 0) { if (arg0 == 0) { - decorationTable->palettes = spr_get_player_palettes(part->currentAnimation >> 16); - decorationTable->numPalettes = 0; - while ((s32)decorationTable->palettes[decorationTable->numPalettes] != -1) { - decorationTable->numPalettes++; + decorationTable->spritePalettes = spr_get_player_palettes(part->currentAnimation >> 16); + decorationTable->numSpritePalettes = 0; + while ((s32)decorationTable->spritePalettes[decorationTable->numSpritePalettes] != -1) { + decorationTable->numSpritePalettes++; } - decorationTable->unk_6CC = 6; + decorationTable->spriteColorVariations = 6; } else { - decorationTable->palettes = spr_get_npc_palettes(part->currentAnimation >> 16); - decorationTable->numPalettes = 0; - while ((s32)decorationTable->palettes[decorationTable->numPalettes] != -1) { - decorationTable->numPalettes++; + decorationTable->spritePalettes = spr_get_npc_palettes(part->currentAnimation >> 16); + decorationTable->numSpritePalettes = 0; + while ((s32)decorationTable->spritePalettes[decorationTable->numSpritePalettes] != -1) { + decorationTable->numSpritePalettes++; } - decorationTable->unk_6CC = spr_get_npc_color_variations(part->currentAnimation >> 16); + decorationTable->spriteColorVariations = spr_get_npc_color_variations(part->currentAnimation >> 16); } - for (i = 0; i < decorationTable->numPalettes; i++) { - palIn = decorationTable->palettes[i]; - palOut = decorationTable->unk_00[i]; + for (i = 0; i < decorationTable->numSpritePalettes; i++) { + palIn = decorationTable->spritePalettes[i]; + palOut = decorationTable->copiedPalettes[0][i]; if (palIn != NULL) { - for (j = 0; j < ARRAY_COUNT(decorationTable->unk_00[i]); j++) { + for (j = 0; j < ARRAY_COUNT(decorationTable->copiedPalettes[0][i]); j++) { *palOut++ = *palIn++; } } @@ -1738,33 +2660,33 @@ void func_8025B1A8(s32 arg0, ActorPart* part, s32 yaw, Matrix4f mtx, s32 arg4) { } switch (temp) { case 0: - for (i = 0; i < decorationTable->unk_6CC; i++) { - palIn = decorationTable->palettes[i]; - palOut = decorationTable->unk_00[i]; + for (i = 0; i < decorationTable->spriteColorVariations; i++) { + palIn = decorationTable->spritePalettes[i]; + palOut = decorationTable->copiedPalettes[0][i]; if (palIn != NULL) { - for (j = 0; j < ARRAY_COUNT(decorationTable->unk_00[i]); j++) { + for (j = 0; j < ARRAY_COUNT(decorationTable->copiedPalettes[0][i]); j++) { *palOut++ = *palIn++; } } } break; case 1: - for (i = 0; i < decorationTable->unk_6CC; i++) { - palIn = decorationTable->palettes[decorationTable->unk_6CC * 5 + i]; - palOut = decorationTable->unk_00[i]; + for (i = 0; i < decorationTable->spriteColorVariations; i++) { + palIn = decorationTable->spritePalettes[decorationTable->spriteColorVariations * 5 + i]; + palOut = decorationTable->copiedPalettes[0][i]; if (palIn != NULL) { - for (j = 0; j < ARRAY_COUNT(decorationTable->unk_00[i]); j++) { + for (j = 0; j < ARRAY_COUNT(decorationTable->copiedPalettes[0][i]); j++) { *palOut++ = *palIn++; } } } break; case 2: - for (i = 0; i < decorationTable->unk_6CC; i++) { - palIn = decorationTable->palettes[decorationTable->unk_6CC * 6 + i]; - palOut = decorationTable->unk_00[i]; + for (i = 0; i < decorationTable->spriteColorVariations; i++) { + palIn = decorationTable->spritePalettes[decorationTable->spriteColorVariations * 6 + i]; + palOut = decorationTable->copiedPalettes[0][i]; if (palIn != NULL) { - for (j = 0; j < ARRAY_COUNT(decorationTable->unk_00[i]); j++) { + for (j = 0; j < ARRAY_COUNT(decorationTable->copiedPalettes[0][i]); j++) { *palOut++ = *palIn++; } } @@ -1772,8 +2694,8 @@ void func_8025B1A8(s32 arg0, ActorPart* part, s32 yaw, Matrix4f mtx, s32 arg4) { break; } - for (i = 0; i < decorationTable->numPalettes; i++) { - decorationTable->unk_6D4[i] = decorationTable->unk_00[i]; + for (i = 0; i < decorationTable->numSpritePalettes; i++) { + decorationTable->unk_6D4[i] = decorationTable->copiedPalettes[0][i]; } if (arg0 == 0) { @@ -1789,32 +2711,32 @@ void func_8025B1A8(s32 arg0, ActorPart* part, s32 yaw, Matrix4f mtx, s32 arg4) { void func_8025B5C0(s32 arg0, ActorPart* part, s32 yaw, Matrix4f mtx, s32 arg4, s32 arg5) { DecorationTable* decorationTable = part->decorationTable; - u16* palIn; - u16* palIn2; - u16* palOut; + PAL_PTR color2; + PAL_PTR color1; + PAL_PTR palOut; s32 i, j; u8 alpha; if (decorationTable->unk_6C1 != 0) { if (arg0 == 0) { - decorationTable->palettes = spr_get_player_palettes(part->currentAnimation >> 16); - decorationTable->numPalettes = 0; - while ((s32)decorationTable->palettes[decorationTable->numPalettes] != -1) { - decorationTable->numPalettes++; + decorationTable->spritePalettes = spr_get_player_palettes(part->currentAnimation >> 16); + decorationTable->numSpritePalettes = 0; + while ((s32)decorationTable->spritePalettes[decorationTable->numSpritePalettes] != -1) { + decorationTable->numSpritePalettes++; } if (gBattleStatus.flags2 & BS_FLAGS2_40) { - decorationTable->unk_6CC = 4; + decorationTable->spriteColorVariations = 4; } else { - decorationTable->unk_6CC = 6; + decorationTable->spriteColorVariations = 6; } } else { - decorationTable->palettes = spr_get_npc_palettes(part->currentAnimation >> 16); - decorationTable->numPalettes = 0; - while ((s32)decorationTable->palettes[decorationTable->numPalettes] != -1) { - decorationTable->numPalettes++; + decorationTable->spritePalettes = spr_get_npc_palettes(part->currentAnimation >> 16); + decorationTable->numSpritePalettes = 0; + while ((s32)decorationTable->spritePalettes[decorationTable->numSpritePalettes] != -1) { + decorationTable->numSpritePalettes++; } - decorationTable->unk_6CC = spr_get_npc_color_variations(part->currentAnimation >> 16); + decorationTable->spriteColorVariations = spr_get_npc_color_variations(part->currentAnimation >> 16); } if (decorationTable->unk_6C1 == 1) { @@ -1825,23 +2747,23 @@ void func_8025B5C0(s32 arg0, ActorPart* part, s32 yaw, Matrix4f mtx, s32 arg4, s decorationTable->unk_6CA = 255; } - for (i = 0; i < decorationTable->numPalettes; i++) { - palIn = decorationTable->palettes[i]; - palIn2 = decorationTable->unk_00[i]; - decorationTable->unk_6D4[i] = palIn2; - if (palIn != NULL) { - for (j = 0; j < ARRAY_COUNT(decorationTable->unk_00[i]); j++) { - *palIn2++ = *palIn++; + for (i = 0; i < decorationTable->numSpritePalettes; i++) { + color2 = decorationTable->spritePalettes[i]; + color1 = decorationTable->copiedPalettes[0][i]; + decorationTable->unk_6D4[i] = color1; + if (color2 != NULL) { + for (j = 0; j < ARRAY_COUNT(decorationTable->copiedPalettes[0][i]); j++) { + *color1++ = *color2++; } } } if (arg5) { - for (i = 0; i < decorationTable->unk_6CC; i++) { - palIn = decorationTable->palettes[decorationTable->unk_6CC + i]; - palOut = decorationTable->unk_00[i]; - for (j = 0; j < ARRAY_COUNT(decorationTable->unk_00[i]); j++) { - *palOut++ = *palIn++; + for (i = 0; i < decorationTable->spriteColorVariations; i++) { + color2 = decorationTable->spritePalettes[decorationTable->spriteColorVariations + i]; + palOut = decorationTable->copiedPalettes[0][i]; + for (j = 0; j < ARRAY_COUNT(decorationTable->copiedPalettes[0][i]); j++) { + *palOut++ = *color2++; } } } @@ -1858,36 +2780,36 @@ void func_8025B5C0(s32 arg0, ActorPart* part, s32 yaw, Matrix4f mtx, s32 arg4, s } else { if (arg4 == 0) { decorationTable->unk_6CA += 2560; - if ((s16)decorationTable->unk_6CA > 25500) { + if (decorationTable->unk_6CA > 25500) { decorationTable->unk_6CA = 25500; } } - alpha = (s16)decorationTable->unk_6CA / 100; - for (i = 0; i < decorationTable->unk_6CC; i++) { + alpha = decorationTable->unk_6CA / 100; + for (i = 0; i < decorationTable->spriteColorVariations; i++) { if (arg5 == 0) { - palIn = decorationTable->palettes[i]; + color2 = decorationTable->spritePalettes[i]; } else { - palIn = decorationTable->palettes[decorationTable->unk_6CC + i]; + color2 = decorationTable->spritePalettes[decorationTable->spriteColorVariations + i]; } - palIn2 = decorationTable->palettes[decorationTable->unk_6CC * 2 + i]; - palOut = decorationTable->unk_00[i]; + color1 = decorationTable->spritePalettes[decorationTable->spriteColorVariations * 2 + i]; + palOut = decorationTable->copiedPalettes[0][i]; - for (j = 0; j < ARRAY_COUNT(decorationTable->unk_00[i]); j++) { - u8 r = (*palIn >> 11) & 0x1F; - u8 g = (*palIn >> 6) & 0x1F; - u8 b = (*palIn >> 1) & 0x1F; - u8 r1 = (*palIn2 >> 11) & 0x1F; - u8 g1 = (*palIn2 >> 6) & 0x1F; - u8 b1 = (*palIn2 >> 1) & 0x1F; - u8 a = *palIn2 & 1; - palIn++; - palIn2++; + for (j = 0; j < ARRAY_COUNT(decorationTable->copiedPalettes[0][i]); j++) { + u8 r2 = (*color2 >> 11) & 0x1F; + u8 g2 = (*color2 >> 6) & 0x1F; + u8 b2 = (*color2 >> 1) & 0x1F; + u8 r1 = (*color1 >> 11) & 0x1F; + u8 g1 = (*color1 >> 6) & 0x1F; + u8 b1 = (*color1 >> 1) & 0x1F; + u8 a1 = *color1 & 1; + color2++; + color1++; - r = (r * (255 - alpha) + r1 * alpha) / 255; - g = (g * (255 - alpha) + g1 * alpha) / 255; - b = (b * (255 - alpha) + b1 * alpha) / 255; + r2 = (r2 * (255 - alpha) + r1 * alpha) / 255; + g2 = (g2 * (255 - alpha) + g1 * alpha) / 255; + b2 = (b2 * (255 - alpha) + b1 * alpha) / 255; - *palOut++ = (r << 11) | (g << 6) | (b << 1) | a; + *palOut++ = (r2 << 11) | (g2 << 6) | (b2 << 1) | a1; } } if (alpha == 255) { @@ -1896,8 +2818,8 @@ void func_8025B5C0(s32 arg0, ActorPart* part, s32 yaw, Matrix4f mtx, s32 arg4, s } } - for (i = 0; i < decorationTable->numPalettes; i++) { - decorationTable->unk_6D4[i] = decorationTable->unk_00[i]; + for (i = 0; i < decorationTable->numSpritePalettes; i++) { + decorationTable->unk_6D4[i] = decorationTable->copiedPalettes[0][i]; } switch (decorationTable->unk_6C2) { @@ -1912,159 +2834,160 @@ void func_8025B5C0(s32 arg0, ActorPart* part, s32 yaw, Matrix4f mtx, s32 arg4, s } } -#ifdef NON_MATCHING void func_8025BAA0(s32 arg0, ActorPart* part, s32 yaw, s32 arg3, Matrix4f mtx, s32 arg5) { - DecorationTable* decorationTable = part->decorationTable; - u16* t1; - u16* t2; - u16* palOut; + DecorationTable* decor = part->decorationTable; + PAL_PTR color1; + PAL_PTR color2; + PAL_PTR blendColor; s32 i, j; - u8 alpha; + u8 blendAlpha; + u8 r2, g2, b2, a1; + u8 r1, g1, b1; - if (decorationTable->unk_6C1 != 0) { + if (decor->unk_6C1 != 0) { if (arg0 == 0) { - decorationTable->palettes = spr_get_player_palettes(part->currentAnimation >> 16); - decorationTable->numPalettes = 0; - while (decorationTable->palettes[decorationTable->numPalettes] != -1) { - decorationTable->numPalettes++; + decor->spritePalettes = spr_get_player_palettes(part->currentAnimation >> 16); + decor->numSpritePalettes = 0; + while ((s32)decor->spritePalettes[decor->numSpritePalettes] != -1) { + decor->numSpritePalettes++; } } else { - decorationTable->palettes = spr_get_npc_palettes(part->currentAnimation >> 16); - decorationTable->numPalettes = 0; - while (decorationTable->palettes[decorationTable->numPalettes] != -1) { - decorationTable->numPalettes++; + decor->spritePalettes = spr_get_npc_palettes(part->currentAnimation >> 16); + decor->numSpritePalettes = 0; + while ((s32)decor->spritePalettes[decor->numSpritePalettes] != -1) { + decor->numSpritePalettes++; } } - if (decorationTable->unk_6C1 == 1) { - decorationTable->unk_6C2 = 0; - decorationTable->unk_6CA = 0; + if (decor->unk_6C1 == 1) { + decor->unk_6C2 = 0; + decor->unk_6CA = 0; } else { - decorationTable->unk_6C2 = 0; - decorationTable->unk_6CA = 255; + decor->unk_6C2 = 0; + decor->unk_6CA = 255; } - for (i = 0; i < decorationTable->numPalettes; i++) { - t2 = decorationTable->palettes[i]; - t1 = decorationTable->unk_00[i]; - decorationTable->unk_6D4[i] = t1; - if (t2 != NULL) { - for (j = 0; j < ARRAY_COUNT(decorationTable->unk_00[i]); j++) { - *t1++ = *t2++; + for (i = 0; i < decor->numSpritePalettes; i++) { + color2 = decor->spritePalettes[i]; + color1 = decor->copiedPalettes[0][i]; + decor->unk_6D4[i] = color1; + if (color2 != NULL) { + for (j = 0; j < 16; j++) { + *color1++ = *color2++; } } } if (arg3 == 0) { - decorationTable->unk_746 = decorationTable->unk_744; - decorationTable->unk_748 = decorationTable->unk_746; - decorationTable->unk_74A = decorationTable->unk_746; - decorationTable->unk_744 = 0; + decor->unk_746 = decor->unk_744; + decor->unk_748 = decor->unk_746; + decor->unk_74A = decor->unk_746; + decor->unk_744 = 0; } - decorationTable->unk_6C8 = decorationTable->unk_744; - decorationTable->unk_6CA = 0; - decorationTable->unk_6C2 = 0; - decorationTable->unk_6C1 = 0; + decor->unk_6C8 = decor->unk_744; + decor->unk_6CA = 0; + decor->unk_6C2 = 0; + decor->unk_6C1 = 0; } - switch (decorationTable->unk_6C2) { + switch (decor->unk_6C2) { case 0: if (arg5 != 0) { break; } - if (decorationTable->unk_6C8 != 0) { - decorationTable->unk_6C8--; + if (decor->unk_6C8 != 0) { + decor->unk_6C8--; break; } - decorationTable->unk_6CA = 0; - decorationTable->unk_6C2 = 1; - /* fallthrough */ + decor->unk_6CA = 0; + decor->unk_6C2 = 1; + // fallthrough case 1: if (arg5 == 0) { - decorationTable->unk_6CA += 25600 / decorationTable->unk_746; - if ((s16)decorationTable->unk_6CA > 25500) { - decorationTable->unk_6CA = 25500; + decor->unk_6CA += 25600 / decor->unk_746; + if (decor->unk_6CA > 25500) { + decor->unk_6CA = 25500; } } - alpha = (s16)decorationTable->unk_6CA / 100; - t2 = decorationTable->palettes[decorationTable->unk_740]; - t1 = decorationTable->palettes[decorationTable->unk_742]; - palOut = decorationTable->unk_00[0]; - decorationTable->unk_6D4[0] = palOut; + blendAlpha = decor->unk_6CA / 100; + color2 = decor->spritePalettes[decor->unk_740]; + color1 = decor->spritePalettes[decor->unk_742]; + blendColor = decor->unk_6D4[0] = decor->copiedPalettes[0][0]; - for (j = 0; j < ARRAY_COUNT(decorationTable->unk_00[0]); t2++, t1++, j++) { - s32 r1 = (*t1 >> 11) & 0x1F; - s32 r = (*t2 >> 11) & 0x1F; - s32 g1 = (*t1 >> 6) & 0x1F; - s32 g = (*t2 >> 6) & 0x1F; - s32 b1 = (*t1 >> 1) & 0x1F; - s32 b = (*t2 >> 1) & 0x1F; - u8 a = *t1 & 1; + for (j = 0; j < 16; j++) { + r2 = (*color2 >> 11) & 0x1F; + g2 = (*color2 >> 6) & 0x1F; + b2 = (*color2 >> 1) & 0x1F; + r1 = (*color1 >> 11) & 0x1F; + g1 = (*color1 >> 6) & 0x1F; + b1 = (*color1 >> 1) & 0x1F; + a1 = *color1 & 1; + color2++; + color1++; - r *= (255 - alpha); - r1 = (r + r1 * alpha) / 255; - g1 = (g * (255 - alpha) + g1 * alpha) / 255; - b1 = (b * (255 - alpha) + b1 * alpha) / 255; + r1 = (r2 * (255 - blendAlpha) + r1 * blendAlpha) / 255; + g1 = (g2 * (255 - blendAlpha) + g1 * blendAlpha) / 255; + b1 = (b2 * (255 - blendAlpha) + b1 * blendAlpha) / 255; - *palOut++ = ((r1 & 0xFF) << 11) | ((g1 & 0xFF) << 6) | ((b1 & 0xFF) << 1) | a; + *blendColor++ = (r1 << 11) | (g1 << 6) | (b1 << 1) | a1; } - if (alpha == 255) { - decorationTable->unk_6C2 = 2; - decorationTable->unk_6C8 = decorationTable->unk_748; + if (blendAlpha == 255) { + decor->unk_6C2 = 2; + decor->unk_6C8 = decor->unk_748; } break; } - switch (decorationTable->unk_6C2) { + switch (decor->unk_6C2) { case 2: if (arg5 != 0) { break; } - if (decorationTable->unk_6C8 != 0) { - decorationTable->unk_6C8--; + if (decor->unk_6C8 != 0) { + decor->unk_6C8--; break; } - decorationTable->unk_6CA = 0; - decorationTable->unk_6C2 = 3; - /* fallthrough */ + decor->unk_6CA = 0; + decor->unk_6C2 = 3; + // fallthrough case 3: if (arg5 == 0) { - decorationTable->unk_6CA += 25600 / decorationTable->unk_74A; - if ((s16)decorationTable->unk_6CA > 25500) { - decorationTable->unk_6CA = 25500; + decor->unk_6CA += 25600 / decor->unk_74A; + if (decor->unk_6CA > 25500) { + decor->unk_6CA = 25500; } } - alpha = (s16)decorationTable->unk_6CA / 100; - t2 = decorationTable->palettes[decorationTable->unk_742]; - t1 = decorationTable->palettes[decorationTable->unk_740]; - palOut = decorationTable->unk_00[0]; - decorationTable->unk_6D4[0] = palOut; + blendAlpha = decor->unk_6CA / 100; + color2 = decor->spritePalettes[decor->unk_742]; + color1 = decor->spritePalettes[decor->unk_740]; + blendColor = decor->copiedPalettes[0][0]; + decor->unk_6D4[0] = blendColor; - for (j = 0; j < ARRAY_COUNT(decorationTable->unk_00[0]); j++) { - s32 r1 = (*t1 >> 11) & 0x1F; - s32 r = (*t2 >> 11) & 0x1F; - s32 g1 = (*t1 >> 6) & 0x1F; - s32 g = (*t2 >> 6) & 0x1F; - s32 b1 = (*t1 >> 1) & 0x1F; - s32 b = (*t2 >> 1) & 0x1F; - u8 a = *t1 & 1; - t2++; - t1++; + for (j = 0; j < 16; j++) { + r2 = (*color2 >> 11) & 0x1F; + g2 = (*color2 >> 6) & 0x1F; + b2 = (*color2 >> 1) & 0x1F; + r1 = (*color1 >> 11) & 0x1F; + g1 = (*color1 >> 6) & 0x1F; + b1 = (*color1 >> 1) & 0x1F; + a1 = *color1 & 1; + color2++; + color1++; - r1 = (r * (255 - alpha) + r1 * alpha) / 255; - g1 = (g * (255 - alpha) + g1 * alpha) / 255; - b1 = (b * (255 - alpha) + b1 * alpha) / 255; + r1 = (r2 * (255 - blendAlpha) + r1 * blendAlpha) / 255; + g1 = (g2 * (255 - blendAlpha) + g1 * blendAlpha) / 255; + b1 = (b2 * (255 - blendAlpha) + b1 * blendAlpha) / 255; - *palOut++ = ((r1 & 0xFF) << 11) | ((g1 & 0xFF) << 6) | ((b1 & 0xFF) << 1) | a; + *blendColor++ = ((r1) << 11) | ((g1) << 6) | ((b1) << 1) | a1; } - if (alpha == 255) { - decorationTable->unk_6C2 = 0; - decorationTable->unk_6C8 = decorationTable->unk_744; + if (blendAlpha == 255) { + decor->unk_6C2 = 0; + decor->unk_6C8 = decor->unk_744; } break; } - switch (decorationTable->unk_6C2) { + switch (decor->unk_6C2) { case 0: case 1: case 2: @@ -2077,11 +3000,173 @@ void func_8025BAA0(s32 arg0, ActorPart* part, s32 yaw, s32 arg3, Matrix4f mtx, s break; } } -#else -INCLUDE_ASM(s32, "182B30", func_8025BAA0); -#endif -INCLUDE_ASM(s32, "182B30", func_8025C120); +void func_8025C120(s32 arg0, ActorPart* part, s32 yaw, Matrix4f mtx, s32 arg4) { + + DecorationTable* decor = part->decorationTable; + PAL_PTR color1; + PAL_PTR color2; + PAL_PTR blendColor; + s32 i, j; + u8 blendAlpha; + u8 r2, g2, b2, a1; + u8 r1, g1, b1; + + if (decor->unk_6C1 != 0) { + if (arg0 == 0) { + decor->spritePalettes = spr_get_player_palettes(part->currentAnimation >> 16); + decor->numSpritePalettes = 0; + while ((s32) decor->spritePalettes[decor->numSpritePalettes] != -1) { + decor->numSpritePalettes++; + } + } else { + decor->spritePalettes = spr_get_npc_palettes(part->currentAnimation >> 16); + decor->numSpritePalettes = 0; + while ((s32) decor->spritePalettes[decor->numSpritePalettes] != -1) { + decor->numSpritePalettes++; + } + decor->spriteColorVariations = spr_get_npc_color_variations(part->currentAnimation >> 16); + } + if (decor->unk_6C1 == 1) { + decor->unk_6C2 = 0; + decor->unk_6CA = 0; + } else { + decor->unk_6C2 = 0; + decor->unk_6CA = 255; + } + + for (i = 0; i < decor->numSpritePalettes; i++) { + color2 = decor->spritePalettes[i]; + color1 = decor->copiedPalettes[0][i]; + decor->unk_6D4[i] = color1; + if (color2 != NULL) { + for (j = 0; j < 16; j++) { + *color1++ = *color2++; + } + } + } + + decor->unk_6C8 = decor->unk_744; + decor->unk_6CA = 0; + decor->unk_6C2 = 0; + decor->unk_6C1 = 0; + } + + switch (decor->unk_6C2) { + case 0: + if (arg4 != 0) { + break; + } + if (decor->unk_6C8 != 0) { + decor->unk_6C8--; + break; + } + decor->unk_6CA = 0; + decor->unk_6C2 = 1; + // fallthrough + case 1: + if (arg4 == 0) { + decor->unk_6CA += 0x6400 / decor->unk_746; + if (decor->unk_6CA > 25500) { + decor->unk_6CA = 25500; + } + } + blendAlpha = decor->unk_6CA / 100; + for (i = 0; i < decor->spriteColorVariations; i++) { + color2 = decor->spritePalettes[decor->unk_740 * decor->spriteColorVariations + i]; + color1 = decor->spritePalettes[decor->unk_742 * decor->spriteColorVariations + i]; + blendColor = decor->copiedPalettes[0][i]; + decor->unk_6D4[i] = blendColor; + + for (j = 0; j < 16; j++) { + r2 = (*color2 >> 11) & 0x1F; + g2 = (*color2 >> 6) & 0x1F; + b2 = (*color2 >> 1) & 0x1F; + r1 = (*color1 >> 11) & 0x1F; + g1 = (*color1 >> 6) & 0x1F; + b1 = (*color1 >> 1) & 0x1F; + a1 = *color1 & 1; + color2++; + color1++; + + r1 = (r2 * (255 - blendAlpha) + r1 * blendAlpha) / 255; + g1 = (g2 * (255 - blendAlpha) + g1 * blendAlpha) / 255; + b1 = (b2 * (255 - blendAlpha) + b1 * blendAlpha) / 255; + + *blendColor++ = (r1 << 11) | (g1 << 6) | (b1 << 1) | a1; + } + } + if (blendAlpha == 255) { + decor->unk_6C2 = 2; + decor->unk_6C8 = decor->unk_748; + } + break; + } + + switch (decor->unk_6C2) { + case 2: + if (arg4 != 0) { + break; + } + if (decor->unk_6C8 != 0) { + decor->unk_6C8--; + break; + } + decor->unk_6CA = 0; + decor->unk_6C2 = 3; + // fallthrough + case 3: + if (arg4 == 0) { + decor->unk_6CA += 0x6400 / decor->unk_74A; + if (decor->unk_6CA > 25500) { + decor->unk_6CA = 25500; + } + } + blendAlpha = decor->unk_6CA / 100; + for (i = 0; i < decor->spriteColorVariations; i++) { + color2 = decor->spritePalettes[decor->unk_740 * decor->spriteColorVariations + i]; + color1 = decor->spritePalettes[decor->unk_742 * decor->spriteColorVariations + i]; + blendColor = decor->copiedPalettes[0][i]; + decor->unk_6D4[i] = blendColor; + + for (j = 0; j < 16; j++) { + r2 = (*color2 >> 11) & 0x1F; + g2 = (*color2 >> 6) & 0x1F; + b2 = (*color2 >> 1) & 0x1F; + r1 = (*color1 >> 11) & 0x1F; + g1 = (*color1 >> 6) & 0x1F; + b1 = (*color1 >> 1) & 0x1F; + a1 = *color1 & 1; + color2++; + color1++; + + r1 = (r2 * (255 - blendAlpha) + r1 * blendAlpha) / 255; + g1 = (g2 * (255 - blendAlpha) + g1 * blendAlpha) / 255; + b1 = (b2 * (255 - blendAlpha) + b1 * blendAlpha) / 255; + + *blendColor++ = ((r1) << 11) | ((g1) << 6) | ((b1) << 1) | a1; + } + } + if (blendAlpha == 255) { + decor->unk_6C2 = 0; + decor->unk_6C8 = decor->unk_744; + } + break; + } + + switch (decor->unk_6C2) { + case 0: + case 1: + case 2: + case 3: + if (arg0 == 0) { + func_8025995C(part, yaw, mtx); + } else { + func_802596C0(part, yaw, mtx); + } + break; + } +} s32 func_8025C840(s32 arg0, ActorPart* part, s32 yaw, s32 arg3) { if (!(part->flags & 2)) { @@ -2290,8 +3375,8 @@ void _add_part_decoration(ActorPart* actorPart) { if (!(actorPart->flags & 2)) { decorationTable = actorPart->decorationTable; - for (i = 0; i < ARRAY_COUNT(decorationTable->decorationType); i++) { - switch (decorationTable->decorationType[i]) { + for (i = 0; i < ARRAY_COUNT(decorationTable->type); i++) { + switch (decorationTable->type[i]) { case DECORATION_0: func_8025D150(actorPart, i); break; @@ -2336,7 +3421,7 @@ void _add_part_decoration(ActorPart* actorPart) { void _remove_part_decoration(ActorPart* part, s32 decorationIndex) { DecorationTable* decorationTable = part->decorationTable; - switch (decorationTable->decorationType[decorationIndex]) { + switch (decorationTable->type[decorationIndex]) { case DECORATION_0: func_8025D158(part, decorationIndex); break; @@ -2375,7 +3460,7 @@ void _remove_part_decoration(ActorPart* part, s32 decorationIndex) { break; } - decorationTable->decorationType[decorationIndex] = 0; + decorationTable->type[decorationIndex] = 0; } void func_8025D150(ActorPart* actorPart, s32 i) { @@ -2384,30 +3469,30 @@ void func_8025D150(ActorPart* actorPart, s32 i) { void func_8025D158(ActorPart* part, s32 decorationIndex) { } -void func_8025D160(ActorPart* arg0, s32 arg1) { +void func_8025D160(ActorPart* arg0, s32 index) { DecorationTable* table = arg0->decorationTable; EffectInstance* effect; AuraFXData* data; f32 scale; - switch (table->unk_8BC[arg1]) { + switch (table->state[index]) { case 0: - fx_aura(3, arg0->currentPos.x, arg0->currentPos.y, arg0->currentPos.z, 0.4f, &table->effects[arg1]); - table->unk_8BC[arg1] = 1; - table->unk_8C6[arg1].unk00 = 0x28; - table->unk_8C6[arg1].unk02 = 0x28; - table->unk_8C6[arg1].unk04 = 0; + fx_aura(3, arg0->currentPos.x, arg0->currentPos.y, arg0->currentPos.z, 0.4f, &table->effect[index]); + table->state[index] = 1; + table->unk_8C6[index].unk00 = 0x28; + table->unk_8C6[index].unk02 = 0x28; + table->unk_8C6[index].unk04 = 0; break; case 1: - effect = table->effects[arg1]; + effect = table->effect[index]; data = effect->data.aura; - data->posA.x = arg0->currentPos.x + table->unk_8C6[arg1].unk04; + data->posA.x = arg0->currentPos.x + table->unk_8C6[index].unk04; data->posA.y = arg0->currentPos.y; data->posA.z = arg0->currentPos.z; - scale = table->unk_8C6[arg1].unk00; + scale = table->unk_8C6[index].unk00; scale /= 100.0f; effect->data.aura->scale.x = scale; - scale = table->unk_8C6[arg1].unk02; + scale = table->unk_8C6[index].unk02; scale /= 100.0f; effect->data.aura->scale.y = scale; break; @@ -2415,27 +3500,27 @@ void func_8025D160(ActorPart* arg0, s32 arg1) { } void func_8025D290(ActorPart* part, s32 decorationIndex) { - part->decorationTable->effects[decorationIndex]->data.aura->fadeTime = 5; + part->decorationTable->effect[decorationIndex]->data.aura->fadeTime = 5; } void func_8025D2B0(ActorPart* part, s32 decorationIndex) { DecorationTable* decor = part->decorationTable; - switch (decor->unk_8BC[decorationIndex]) { + switch (decor->state[decorationIndex]) { case 0: if (part->yaw > 90.0f) { fx_sweat(0, part->currentPos.x, part->currentPos.y + part->size.y, part->currentPos.z, 5.0f, 45.0f, 20); } else { fx_sweat(0, part->currentPos.x, part->currentPos.y + part->size.y, part->currentPos.z, 5.0f, -45.0f, 20); } - decor->unk_8BE[decorationIndex] = 0xA; - decor->unk_8BC[decorationIndex] = 1; + decor->stateResetTimer[decorationIndex] = 10; + decor->state[decorationIndex] = TRUE; break; case 1: - if (decor->unk_8BE[decorationIndex] != 0) { - decor->unk_8BE[decorationIndex]--; + if (decor->stateResetTimer[decorationIndex] != 0) { + decor->stateResetTimer[decorationIndex]--; } else { - decor->unk_8BC[decorationIndex] = 0; + decor->state[decorationIndex] = FALSE; } break; } @@ -2450,14 +3535,14 @@ void func_8025D3CC(ActorPart* part, s32 decorationIndex) { s8 temp_v1; decor = part->decorationTable; - switch (decor->unk_8BC[decorationIndex]) { + switch (decor->state[decorationIndex]) { case 0: fx_stars_orbiting(0, part->currentPos.x, part->currentPos.y + part->size.y, part->currentPos.z, - 20.0f, 3, &decor->effects[decorationIndex]); - decor->unk_8BC[decorationIndex] = 1; + 20.0f, 3, &decor->effect[decorationIndex]); + decor->state[decorationIndex] = 1; break; case 1: - data = decor->effects[decorationIndex]->data.starsOrbiting; + data = decor->effect[decorationIndex]->data.starsOrbiting; data->pos.x = part->currentPos.x; data->pos.y = part->currentPos.y + part->size.y; data->pos.z = part->currentPos.z; @@ -2466,7 +3551,7 @@ void func_8025D3CC(ActorPart* part, s32 decorationIndex) { } void func_8025D4A0(ActorPart* part, s32 decorationIndex) { - remove_effect(part->decorationTable->effects[decorationIndex]); + remove_effect(part->decorationTable->effect[decorationIndex]); } void func_8025D4C8(ActorPart* part, s32 decorationIndex) { @@ -2475,10 +3560,10 @@ void func_8025D4C8(ActorPart* part, s32 decorationIndex) { AuraFXData* data; f32 scale; - switch (decor->unk_8BC[decorationIndex]) { + switch (decor->state[decorationIndex]) { case 0: - fx_aura(1, part->currentPos.x, part->currentPos.y, part->currentPos.z, 0.4f, &decor->effects[decorationIndex]); - decor->unk_8BC[decorationIndex] = 1; + fx_aura(1, part->currentPos.x, part->currentPos.y, part->currentPos.z, 0.4f, &decor->effect[decorationIndex]); + decor->state[decorationIndex] = 1; decor->unk_8C6[decorationIndex].unk00 = 40; decor->unk_8C6[decorationIndex].unk02 = 40; decor->unk_8C6[decorationIndex].unk04 = 255; @@ -2488,7 +3573,7 @@ void func_8025D4C8(ActorPart* part, s32 decorationIndex) { decor->unk_8C6[decorationIndex].unk0C = 0; // fallthrough case 1: - effect = decor->effects[decorationIndex]; + effect = decor->effect[decorationIndex]; data = effect->data.aura; data->posA.x = part->currentPos.x; data->posA.y = part->currentPos.y; @@ -2506,20 +3591,20 @@ void func_8025D4C8(ActorPart* part, s32 decorationIndex) { } void func_8025D620(ActorPart* part, s32 decorationIndex) { - part->decorationTable->effects[decorationIndex]->data.aura->fadeTime = 5; + part->decorationTable->effect[decorationIndex]->data.aura->fadeTime = 5; } void func_8025D640(ActorPart* part, s32 decorationIndex) { DecorationTable* decor = part->decorationTable; EffectInstance* effect; - switch (decor->unk_8BC[decorationIndex]) { + switch (decor->state[decorationIndex]) { case 0: - decor->effects[decorationIndex] = fx_65(1, part->currentPos.x, part->currentPos.y, part->currentPos.z, 1.0f, 0); - decor->unk_8BC[decorationIndex] = 1; + decor->effect[decorationIndex] = fx_65(1, part->currentPos.x, part->currentPos.y, part->currentPos.z, 1.0f, 0); + decor->state[decorationIndex] = 1; break; case 1: - effect = decor->effects[decorationIndex]; + effect = decor->effect[decorationIndex]; effect->data.unk_65->pos.x = part->currentPos.x; effect->data.unk_65->pos.y = part->currentPos.y; effect->data.unk_65->pos.z = part->currentPos.z; @@ -2528,21 +3613,21 @@ void func_8025D640(ActorPart* part, s32 decorationIndex) { } void func_8025D6FC(ActorPart* part, s32 decorationIndex) { - part->decorationTable->effects[decorationIndex]->flags |= 0x10; + part->decorationTable->effect[decorationIndex]->flags |= 0x10; } void func_8025D71C(ActorPart* part, s32 decorationIndex) { DecorationTable* decor = part->decorationTable; EffectInstance* effect; - switch (decor->unk_8BC[decorationIndex]) { + switch (decor->state[decorationIndex]) { case 0: - decor->effects[decorationIndex] = fx_65(2, part->currentPos.x, part->currentPos.y, part->currentPos.z, 1.0f, 0); + decor->effect[decorationIndex] = fx_65(2, part->currentPos.x, part->currentPos.y, part->currentPos.z, 1.0f, 0); decor->unk_8C6[decorationIndex].unk00 = 1; - decor->unk_8BC[decorationIndex] = 1; + decor->state[decorationIndex] = 1; break; case 1: - effect = decor->effects[decorationIndex]; + effect = decor->effect[decorationIndex]; effect->data.unk_65->pos.x = part->currentPos.x; effect->data.unk_65->pos.y = part->currentPos.y; effect->data.unk_65->pos.z = part->currentPos.z; @@ -2552,20 +3637,20 @@ void func_8025D71C(ActorPart* part, s32 decorationIndex) { } void func_8025D810(ActorPart* part, s32 decorationIndex) { - part->decorationTable->effects[decorationIndex]->flags |= 0x10; + part->decorationTable->effect[decorationIndex]->flags |= 0x10; } void func_8025D830(ActorPart* part, s32 decorationIndex) { DecorationTable* decor = part->decorationTable; EffectInstance* effect; - switch (decor->unk_8BC[decorationIndex]) { + switch (decor->state[decorationIndex]) { case 0: - decor->effects[decorationIndex] = fx_whirlwind(2, part->currentPos.x, part->currentPos.y, part->currentPos.z, 1.0f, 0); - decor->unk_8BC[decorationIndex] = 1; + decor->effect[decorationIndex] = fx_whirlwind(2, part->currentPos.x, part->currentPos.y, part->currentPos.z, 1.0f, 0); + decor->state[decorationIndex] = 1; break; case 1: - effect = decor->effects[decorationIndex]; + effect = decor->effect[decorationIndex]; effect->data.whirlwind->pos.x = part->currentPos.x; effect->data.whirlwind->pos.y = part->currentPos.y; effect->data.whirlwind->pos.z = part->currentPos.z; @@ -2574,22 +3659,22 @@ void func_8025D830(ActorPart* part, s32 decorationIndex) { } void func_8025D8EC(ActorPart* part, s32 decorationIndex) { - part->decorationTable->effects[decorationIndex]->flags |= EFFECT_INSTANCE_FLAGS_10; + part->decorationTable->effect[decorationIndex]->flags |= EFFECT_INSTANCE_FLAGS_10; } void func_8025D90C(ActorPart* part, s32 decorationIndex) { DecorationTable* decor = part->decorationTable; f32 angle, sinA, cosA; - switch (decor->unk_8BC[decorationIndex]) { + switch (decor->state[decorationIndex]) { case 0: - decor->unk_8BE[decorationIndex] = 0; - decor->unk_8BC[decorationIndex] = 1; + decor->stateResetTimer[decorationIndex] = 0; + decor->state[decorationIndex] = 1; // fallthrough case 1: - decor->unk_8BE[decorationIndex]++; - if (decor->unk_8BE[decorationIndex] >= 4) { - decor->unk_8BE[decorationIndex] = 0U; + decor->stateResetTimer[decorationIndex]++; + if (decor->stateResetTimer[decorationIndex] >= 4) { + decor->stateResetTimer[decorationIndex] = 0; angle = (clamp_angle(-part->yaw) * TAU) / 360.0f; sinA = sin_rad(angle); cosA = cos_rad(angle); @@ -2611,10 +3696,10 @@ void func_8025DA68(ActorPart* part, s32 decorationIndex) { f32 x, y, z; if (D_80284134[decor->unk_8C6[decorationIndex].unk00] >= 0) { - switch (decor->unk_8BC[decorationIndex]) { + switch (decor->state[decorationIndex]) { case 0: - decor->unk_8BE[decorationIndex] = 0; - decor->unk_8BC[decorationIndex] = 1; + decor->stateResetTimer[decorationIndex] = 0; + decor->state[decorationIndex] = 1; // fallthrough case 1: x = part->currentPos.x; @@ -2624,9 +3709,9 @@ void func_8025DA68(ActorPart* part, s32 decorationIndex) { if ((gGameStatusPtr->frameCounter / 4) == 0) { fx_sparkles(FX_SPARKLES_1, x, y, z, 10.0f); } - decor->unk_8BE[decorationIndex]++; - if (D_80284134[decor->unk_8C6[decorationIndex].unk00] < decor->unk_8BE[decorationIndex]) { - decor->unk_8BE[decorationIndex] = 0; + decor->stateResetTimer[decorationIndex]++; + if (D_80284134[decor->unk_8C6[decorationIndex].unk00] < decor->stateResetTimer[decorationIndex]) { + decor->stateResetTimer[decorationIndex] = 0; fx_sparkles(FX_SPARKLES_1, x, y, z, 20.0f); } break; @@ -2643,17 +3728,17 @@ void func_8025DBD0(ActorPart* part, s32 decorationIndex) { AuraFXData* data; f32 scale; - switch (decor->unk_8BC[decorationIndex]) { + switch (decor->state[decorationIndex]) { case 0: - fx_aura(2, part->currentPos.x, part->currentPos.y, part->currentPos.z, 1.2f, &decor->effects[decorationIndex]); - decor->unk_8BC[decorationIndex] = 1; + fx_aura(2, part->currentPos.x, part->currentPos.y, part->currentPos.z, 1.2f, &decor->effect[decorationIndex]); + decor->state[decorationIndex] = 1; decor->unk_8C6[decorationIndex].unk00 = 150; decor->unk_8C6[decorationIndex].unk02 = 150; decor->unk_8C6[decorationIndex].unk04 = 255; decor->unk_8C6[decorationIndex].unk06 = 0; // fallthrough case 1: - effect = decor->effects[decorationIndex]; + effect = decor->effect[decorationIndex]; data = effect->data.aura; data->posA.x = part->currentPos.x; data->posA.y = part->currentPos.y; @@ -2672,7 +3757,7 @@ void func_8025DBD0(ActorPart* part, s32 decorationIndex) { } void func_8025DD40(ActorPart* part, s32 decorationIndex) { - part->decorationTable->effects[decorationIndex]->data.aura->fadeTime = 5; + part->decorationTable->effect[decorationIndex]->data.aura->fadeTime = 5; } void func_8025DD60(ActorPart* part, s32 decorationIndex) { @@ -2680,15 +3765,15 @@ void func_8025DD60(ActorPart* part, s32 decorationIndex) { EnergyInOutFXData* data; f32 scale; - switch (decor->unk_8BC[decorationIndex]) { + switch (decor->state[decorationIndex]) { case 0: - decor->effects[decorationIndex] = fx_energy_in_out(4, part->currentPos.x, part->currentPos.y, part->currentPos.z, 1.2f, 0); - decor->unk_8BC[decorationIndex] = 1; + decor->effect[decorationIndex] = fx_energy_in_out(4, part->currentPos.x, part->currentPos.y, part->currentPos.z, 1.2f, 0); + decor->state[decorationIndex] = 1; decor->unk_8C6[decorationIndex].unk00 = 0x78; decor->unk_8C6[decorationIndex].unk02 = 0; // fallthrough case 1: - data = decor->effects[decorationIndex]->data.energyInOut; + data = decor->effect[decorationIndex]->data.energyInOut; scale = decor->unk_8C6[decorationIndex].unk00; scale /= 100.0f; data->unk_44 = scale; @@ -2700,5 +3785,5 @@ void func_8025DD60(ActorPart* part, s32 decorationIndex) { } void func_8025DE88(ActorPart* part, s32 decorationIndex) { - part->decorationTable->effects[decorationIndex]->flags |= 0x10; + part->decorationTable->effect[decorationIndex]->flags |= 0x10; } diff --git a/src/190B20.c b/src/190B20.c index 02f9c85f65..28ae7b4161 100644 --- a/src/190B20.c +++ b/src/190B20.c @@ -858,11 +858,11 @@ void load_player_actor(void) { player->stoneDuration = 0; player->koStatus = 0; player->koDuration = 0; - player->transStatus = 0; - player->transDuration = 0; + player->transparentStatus = 0; + player->transparentDuration = 0; player->isGlowing = 0; player->unk_21E = 0; - player->unk_21D = 0; + player->disableDismissTimer = 0; player->attackBoost = 0; player->defenseBoost = 0; player->chillOutAmount = 0; @@ -877,8 +877,8 @@ void load_player_actor(void) { player->actorTypeData1b[0] = bActorSoundTable[player->actorType].delay[0]; player->actorTypeData1b[1] = bActorSoundTable[player->actorType].delay[1]; - for (i = 0; i < ARRAY_COUNT(player->unk_438); i++) { - player->unk_438[i] = 0; + for (i = 0; i < ARRAY_COUNT(player->loopingSoundID); i++) { + player->loopingSoundID[i] = 0; } part = heap_malloc(sizeof(*part)); @@ -972,9 +972,9 @@ void load_player_actor(void) { decorationTable->unk_7DB = 0; decorationTable->effectType = 0; - for (j = 0; j < ARRAY_COUNT(decorationTable->effects); j++) { - decorationTable->effects[j] = NULL; - decorationTable->decorationType[j] = 0; + for (j = 0; j < ARRAY_COUNT(decorationTable->effect); j++) { + decorationTable->effect[j] = NULL; + decorationTable->type[j] = 0; } } @@ -984,7 +984,7 @@ void load_player_actor(void) { player->shadow.id = create_shadow_type(0, player->currentPos.x, player->currentPos.y, player->currentPos.z); player->shadowScale = player->size.x / 24.0; player->hudElementDataIndex = create_status_icon_set(); - player->debuffEffect = fx_disable_x(0, -142.0f, 34.0f, 1.0f, 0); + player->disableEffect = fx_disable_x(0, -142.0f, 34.0f, 1.0f, 0); player->icePillarEffect = NULL; if (is_ability_active(ABILITY_ZAP_TAP)) { @@ -1097,11 +1097,11 @@ void load_partner_actor(void) { partnerActor->stoneDuration = 0; partnerActor->koStatus = 0; partnerActor->koDuration = 0; - partnerActor->transStatus = 0; - partnerActor->transDuration = 0; + partnerActor->transparentStatus = 0; + partnerActor->transparentDuration = 0; partnerActor->isGlowing = 0; partnerActor->unk_21E = 0; - partnerActor->unk_21D = 0; + partnerActor->disableDismissTimer = 0; partnerActor->attackBoost = 0; partnerActor->defenseBoost = 0; partnerActor->chillOutAmount = 0; @@ -1116,8 +1116,8 @@ void load_partner_actor(void) { partnerActor->actorTypeData1b[0] = bActorSoundTable[partnerActor->actorType].delay[0]; partnerActor->actorTypeData1b[1] = bActorSoundTable[partnerActor->actorType].delay[1]; - for (i2 = 0; i2 < ARRAY_COUNT(partnerActor->unk_438); i2++) { - partnerActor->unk_438[i2] = 0; + for (i2 = 0; i2 < ARRAY_COUNT(partnerActor->loopingSoundID); i2++) { + partnerActor->loopingSoundID[i2] = 0; } part = heap_malloc(sizeof(*part)); @@ -1201,9 +1201,9 @@ void load_partner_actor(void) { decorationTable->unk_7DB = 0; decorationTable->effectType = 0; - for (j = 0; j < ARRAY_COUNT(decorationTable->effects); j++) { - decorationTable->effects[j] = NULL; - decorationTable->decorationType[j] = 0; + for (j = 0; j < ARRAY_COUNT(decorationTable->effect); j++) { + decorationTable->effect[j] = NULL; + decorationTable->type[j] = 0; } } @@ -1238,7 +1238,7 @@ void load_partner_actor(void) { partnerActor->shadow.id = create_shadow_type(0, partnerActor->currentPos.x, partnerActor->currentPos.y, partnerActor->currentPos.z); partnerActor->shadowScale = partnerActor->size.x / 24.0; partnerActor->hudElementDataIndex = create_status_icon_set(); - partnerActor->debuffEffect = fx_disable_x(0, -142.0f, 34.0f, 1.0f, 0); + partnerActor->disableEffect = fx_disable_x(0, -142.0f, 34.0f, 1.0f, 0); partnerActor->icePillarEffect = NULL; takeTurnScript = start_script(partnerActor->takeTurnScriptSource, EVT_PRIORITY_A, 0); @@ -1349,11 +1349,11 @@ Actor* create_actor(Formation formation) { actor->stoneDuration = 0; actor->koStatus = 0; actor->koDuration = 0; - actor->transStatus = 0; - actor->transDuration = 0; + actor->transparentStatus = 0; + actor->transparentDuration = 0; actor->isGlowing = 0; actor->unk_21E = 0; - actor->unk_21D = 0; + actor->disableDismissTimer = 0; actor->attackBoost = 0; actor->defenseBoost = 0; actor->chillOutAmount = 0; @@ -1368,8 +1368,8 @@ Actor* create_actor(Formation formation) { actor->actorTypeData1b[0] = bActorSoundTable[actor->actorType].delay[0]; actor->actorTypeData1b[1] = bActorSoundTable[actor->actorType].delay[1]; - for (i = 0; i < ARRAY_COUNT(actor->unk_438); i++) { - actor->unk_438[i] = 0; + for (i = 0; i < ARRAY_COUNT(actor->loopingSoundID); i++) { + actor->loopingSoundID[i] = 0; } actor->state.varTable[0] = formation->var0; @@ -1463,9 +1463,9 @@ Actor* create_actor(Formation formation) { decorationTable->unk_7DB = 0; decorationTable->effectType = 0; - for (k = 0; k < ARRAY_COUNT(decorationTable->effects); k++) { - decorationTable->effects[k] = NULL; - decorationTable->decorationType[k] = 0; + for (k = 0; k < ARRAY_COUNT(decorationTable->effect); k++) { + decorationTable->effect[k] = NULL; + decorationTable->type[k] = 0; } } @@ -1509,7 +1509,7 @@ Actor* create_actor(Formation formation) { takeTurnScript->owner1.enemyID = actor->enemyIndex | 0x200; actor->shadow.id = create_shadow_type(0, actor->currentPos.x, actor->currentPos.y, actor->currentPos.z); actor->shadowScale = actor->size.x / 24.0; - actor->debuffEffect = fx_disable_x(0, -142.0f, 34.0f, 1.0f, 0); + actor->disableEffect = fx_disable_x(0, -142.0f, 34.0f, 1.0f, 0); actor->icePillarEffect = NULL; actor->hudElementDataIndex = create_status_icon_set(); return actor; @@ -1674,7 +1674,7 @@ s32 inflict_status(Actor* target, s32 statusTypeKey, s32 duration) { if (target->debuff != statusTypeKey) { target->status = statusTypeKey; } - target->debuffEffect->data.disableX->unk_3C = 0; + target->disableEffect->data.disableX->unk_3C = 0; target->debuff = statusTypeKey; target->debuffDuration = duration; if ((s8)duration > 9) { @@ -1756,10 +1756,10 @@ s32 inflict_status(Actor* target, s32 statusTypeKey, s32 duration) { return TRUE; case STATUS_TRANSPARENT: if (target->actorID != ACTOR_PARTNER) { - target->transStatus = STATUS_TRANSPARENT; - target->transDuration = duration; + target->transparentStatus = STATUS_TRANSPARENT; + target->transparentDuration = duration; if ((s8)duration > 9) { - target->transDuration = 9; + target->transparentDuration = 9; } target->status = STATUS_TRANSPARENT; create_status_transparent(target->hudElementDataIndex, STATUS_TRANSPARENT); @@ -2370,9 +2370,9 @@ void add_part_decoration(ActorPart* part, s32 decorationIndex, s32 decorationTyp DecorationTable* decorationTable = part->decorationTable; _remove_part_decoration(part, decorationIndex); - decorationTable->decorationType[decorationIndex] = decorationType; - decorationTable->unk_8BA[decorationIndex] = 1; - decorationTable->unk_8BC[decorationIndex] = 0; + decorationTable->type[decorationIndex] = decorationType; + decorationTable->changed[decorationIndex] = TRUE; + decorationTable->state[decorationIndex] = 0; _add_part_decoration(part); } } @@ -2472,15 +2472,15 @@ void remove_player_buffs(s32 buffs) { player->staticStatus = 0; remove_status_static(player->hudElementDataIndex); } - if (buffs & 0x40 && (player->transStatus != 0)) { - player->transDuration = 0; - player->transStatus = 0; + if (buffs & 0x40 && (player->transparentStatus != 0)) { + player->transparentDuration = 0; + player->transparentStatus = 0; playerPartsTable->flags &= ~0x100; remove_status_transparent(player->hudElementDataIndex); } if (buffs & 0x200 && (battleStatus->waterBlockTurnsLeft != 0)) { battleStatus->waterBlockTurnsLeft = 0; - battleStatus->unk_43C->unk_0C->unk_10 = 0; + battleStatus->buffEffect->data.partnerBuff->unk_0C[FX_BUFF_DATA_WATER_BLOCK].turnsLeft = 0; battleStatus->waterBlockEffect->flags |= 0x10; fx_water_block(1, player->currentPos.x, player->currentPos.y + 18.0f, player->currentPos.z + 5.0f, 1.5f, 0xA); @@ -2493,11 +2493,11 @@ void remove_player_buffs(s32 buffs) { } if (buffs & 0x100 && (battleStatus->turboChargeTurnsLeft != 0)) { battleStatus->turboChargeTurnsLeft = 0; - battleStatus->unk_43C->unk_0C->unk_24 = 0; + battleStatus->buffEffect->data.partnerBuff->unk_0C[FX_BUFF_DATA_TURBO_CHARGE].turnsLeft = 0; } if (buffs & 0x80 && (battleStatus->cloudNineTurnsLeft != 0)) { battleStatus->cloudNineTurnsLeft = 0; - battleStatus->unk_43C->unk_0C->unk_1A = 0; + battleStatus->buffEffect->data.partnerBuff->unk_0C[FX_BUFF_DATA_CLOUD_NINE].turnsLeft = 0; remove_effect(battleStatus->cloudNineEffect); battleStatus->cloudNineEffect = NULL; } @@ -2518,7 +2518,7 @@ void btl_update_ko_status(void) { player->koDuration = player->debuffDuration; if (player->koDuration > 0) { player->koStatus = STATUS_DAZE; - player->debuffEffect->data.disableX->unk_3C = player->koDuration; + player->disableEffect->data.disableX->unk_3C = player->koDuration; if (koDuration == 0) { sfx_play_sound(SOUND_2107); @@ -2533,7 +2533,7 @@ void btl_update_ko_status(void) { if (partner->koDuration > 0) { partner->koStatus = STATUS_DAZE; - partner->debuffEffect->data.disableX->unk_3C = partner->koDuration; + partner->disableEffect->data.disableX->unk_3C = partner->koDuration; } } @@ -2544,7 +2544,7 @@ void btl_update_ko_status(void) { enemy->koDuration = enemy->debuffDuration; if (enemy->koDuration > 0) { enemy->koStatus = STATUS_DAZE; - enemy->debuffEffect->data.disableX->unk_3C = enemy->koDuration; + enemy->disableEffect->data.disableX->unk_3C = enemy->koDuration; } } } diff --git a/src/19FAF0.c b/src/19FAF0.c index 591c64e683..a57638b810 100644 --- a/src/19FAF0.c +++ b/src/19FAF0.c @@ -197,7 +197,7 @@ s32 calc_player_test_enemy(void) { if (part->eventFlags & ACTOR_EVENT_FLAG_ILLUSORY) { return HIT_RESULT_MISS; - } else if (target->transStatus == STATUS_TRANSPARENT || ((part->eventFlags & ACTOR_EVENT_FLAG_800) && + } else if (target->transparentStatus == STATUS_TRANSPARENT || ((part->eventFlags & ACTOR_EVENT_FLAG_800) && !(battleStatus->currentAttackElement & DAMAGE_TYPE_QUAKE))) { return HIT_RESULT_MISS; @@ -286,7 +286,7 @@ s32 calc_player_damage_enemy(void) { } } - if (targetPart->eventFlags & ACTOR_EVENT_FLAG_ILLUSORY || (target->transStatus == STATUS_TRANSPARENT || + if (targetPart->eventFlags & ACTOR_EVENT_FLAG_ILLUSORY || (target->transparentStatus == STATUS_TRANSPARENT || targetPart->eventFlags & ACTOR_EVENT_FLAG_800 && !(battleStatus->currentAttackElement & DAMAGE_TYPE_QUAKE))) { return 6; } diff --git a/src/1A5830.c b/src/1A5830.c index f5f4687d28..21711ef37a 100644 --- a/src/1A5830.c +++ b/src/1A5830.c @@ -168,7 +168,7 @@ s32 calc_enemy_test_target(Actor* actor) { hitResult = HIT_RESULT_HIT; target2 = target; - if (targetPart->eventFlags & ACTOR_EVENT_FLAG_ILLUSORY || battleStatus->outtaSightActive || target2->transStatus == STATUS_TRANSPARENT) { + if (targetPart->eventFlags & ACTOR_EVENT_FLAG_ILLUSORY || battleStatus->outtaSightActive || target2->transparentStatus == STATUS_TRANSPARENT) { if (!(battleStatus->currentAttackElement & DAMAGE_TYPE_MAGIC)) { hitResult = HIT_RESULT_MISS; } @@ -285,7 +285,7 @@ s32 calc_enemy_damage_target(Actor* attacker) { return HIT_RESULT_MISS; } - if (target->transStatus == STATUS_TRANSPARENT || targetPart->eventFlags & ACTOR_EVENT_FLAG_800 && !(battleStatus->currentAttackElement & DAMAGE_TYPE_QUAKE)) { + if (target->transparentStatus == STATUS_TRANSPARENT || targetPart->eventFlags & ACTOR_EVENT_FLAG_800 && !(battleStatus->currentAttackElement & DAMAGE_TYPE_QUAKE)) { return HIT_RESULT_MISS; } @@ -781,7 +781,7 @@ s32 calc_enemy_damage_target(Actor* attacker) { ) && !(battleStatus->currentAttackElement & DAMAGE_TYPE_NO_CONTACT) && !(battleStatus->currentAttackEventSuppression & 8) - && (attacker->transStatus != STATUS_TRANSPARENT) + && (attacker->transparentStatus != STATUS_TRANSPARENT) && !has_enchanted_part(attacker) ) { // enum mismatch? shock vs explode :raised_eyebrow: @@ -2548,7 +2548,7 @@ ApiStatus CopyStatusEffects(Evt* script, s32 isInitialCall) { inflict_status(actorTo, actorFrom->staticStatus, actorFrom->staticDuration); inflict_status(actorTo, actorFrom->stoneStatus, actorFrom->stoneDuration); inflict_status(actorTo, actorFrom->koStatus, actorFrom->koDuration); - inflict_status(actorTo, actorFrom->transStatus, actorFrom->transDuration); + inflict_status(actorTo, actorFrom->transparentStatus, actorFrom->transparentDuration); actorFrom->status = 0; actorTo->status = 0; @@ -2580,9 +2580,9 @@ ApiStatus ClearStatusEffects(Evt* script, s32 isInitialCall) { remove_status_static(actor->hudElementDataIndex); } - if (actor->transStatus != 0) { - actor->transDuration = 0; - actor->transStatus = 0; + if (actor->transparentStatus != 0) { + actor->transparentDuration = 0; + actor->transparentStatus = 0; remove_status_transparent(actor->hudElementDataIndex); } @@ -2593,7 +2593,7 @@ ApiStatus ClearStatusEffects(Evt* script, s32 isInitialCall) { actor->koStatus = 0; actor->koDuration = 0; - actor->debuffEffect->data.disableX->unk_3C = 0; + actor->disableEffect->data.disableX->unk_3C = 0; actor->attackBoost = 0; actor->defenseBoost = 0; actor->isGlowing = 0; diff --git a/src/1AC760.c b/src/1AC760.c index 6c5e391423..e24c9c0f64 100644 --- a/src/1AC760.c +++ b/src/1AC760.c @@ -188,7 +188,7 @@ s32 calc_partner_damage_enemy(void) { dispatchEvent = EVENT_UNKNOWN_TRIGGER; sfx_play_sound_at_position(SOUND_IMMUNE, 0, state->goalPos.x, state->goalPos.y, state->goalPos.z); } else { - if (targetPart->eventFlags & ACTOR_EVENT_FLAG_ILLUSORY || target->transStatus == STATUS_TRANSPARENT || + if (targetPart->eventFlags & ACTOR_EVENT_FLAG_ILLUSORY || target->transparentStatus == STATUS_TRANSPARENT || targetPart->eventFlags & ACTOR_EVENT_FLAG_800 && !(battleStatus->currentAttackElement & DAMAGE_TYPE_QUAKE)) { return 6; } diff --git a/src/actor_api.c b/src/actor_api.c index d6eff1cdff..ae5a66e042 100644 --- a/src/actor_api.c +++ b/src/actor_api.c @@ -2610,7 +2610,6 @@ ApiStatus func_8026ED20(Evt* script, s32 isInitialCall) { s32 temp_s3 = evt_get_variable(script, *args++); ActorPart* actorPart; - if (actorID == ACTOR_SELF) { actorID = script->owner1.actorID; } @@ -2816,7 +2815,7 @@ ApiStatus GetStatusFlags(Evt* script, s32 isInitialCall) { break; } - switch (actor->transStatus) { + switch (actor->transparentStatus) { case STATUS_END: break; case STATUS_TRANSPARENT: diff --git a/src/battle/action_cmd/air_lift.c b/src/battle/action_cmd/air_lift.c index da0ce25cb6..5ca13280e7 100644 --- a/src/battle/action_cmd/air_lift.c +++ b/src/battle/action_cmd/air_lift.c @@ -76,7 +76,7 @@ ApiStatus func_802A9184_428BF4(Evt* script, s32 isInitialCall) { actionCommandStatus->unk_52 = evt_get_variable(script, *args++); actionCommandStatus->unk_50 = evt_get_variable(script, *args++); actionCommandStatus->unk_50 = func_80268224(actionCommandStatus->unk_50); - actionCommandStatus->unk_64 = evt_get_variable(script, *args++); + actionCommandStatus->easyVersion = evt_get_variable(script, *args++); actionCommandStatus->unk_60 = 0; battleStatus->actionSuccess = 0; diff --git a/src/battle/action_cmd/bomb.c b/src/battle/action_cmd/bomb.c index 4ceb72266f..88b1ad0f9a 100644 --- a/src/battle/action_cmd/bomb.c +++ b/src/battle/action_cmd/bomb.c @@ -126,7 +126,7 @@ void func_802A928C_427CFC(void) { } if (battleStatus->currentButtonsPressed & BUTTON_A) { - switch (actionCommandStatus->unk_64) { + switch (actionCommandStatus->easyVersion) { case 0: { s32 fillOffset = battleStatus->unk_434[actionCommandStatus->unk_50] * 235 * 4; actionCommandStatus->barFillLevel += fillOffset / 100; diff --git a/src/battle/action_cmd/dizzy_shell.c b/src/battle/action_cmd/dizzy_shell.c index 865b73728a..93f73acff9 100644 --- a/src/battle/action_cmd/dizzy_shell.c +++ b/src/battle/action_cmd/dizzy_shell.c @@ -109,7 +109,7 @@ void func_802A928C_4263FC(void) { case 11: btl_set_popup_duration(99); if (actionCommandStatus->unk_68 == 0) { - if (actionCommandStatus->unk_64 != 0) { + if (actionCommandStatus->easyVersion != 0) { cutoff = actionCommandStatus->mashMeterCutoffs[actionCommandStatus->mashMeterIntervals]; actionCommandStatus->barFillLevel -= D_802A9800_426970[actionCommandStatus->barFillLevel / cutoff / 20]; @@ -126,7 +126,7 @@ void func_802A928C_4263FC(void) { if (battleStatus->currentButtonsPressed & A_BUTTON) { s32 a = battleStatus->unk_434[actionCommandStatus->unk_50]; - s32 b = actionCommandStatus->unk_64 * 850; + s32 b = actionCommandStatus->easyVersion * 850; s32 temp_v1_2 = (a * b) / 10000; if (temp_v1_2 != 0) { @@ -156,7 +156,7 @@ void func_802A928C_4263FC(void) { } fillLevel = actionCommandStatus->barFillLevel; - if (actionCommandStatus->unk_64 == 0) { + if (actionCommandStatus->easyVersion == 0) { fillLevel = 0; } @@ -183,7 +183,7 @@ void func_802A928C_4263FC(void) { actionCommandStatus->state = 12; break; case 12: - if (actionCommandStatus->unk_64 == 0) { + if (actionCommandStatus->easyVersion == 0) { actionCommandStatus->barFillLevel -= 100; if (actionCommandStatus->barFillLevel < 0) { actionCommandStatus->barFillLevel = 0; diff --git a/src/battle/action_cmd/hurricane.c b/src/battle/action_cmd/hurricane.c index 3d9ac5f41b..e190e2ab83 100644 --- a/src/battle/action_cmd/hurricane.c +++ b/src/battle/action_cmd/hurricane.c @@ -80,7 +80,7 @@ ApiStatus func_802A91A0_42F880(Evt* script, s32 isInitialCall) { actionCommandStatus->unk_52 = evt_get_variable(script, *args++); actionCommandStatus->unk_50 = evt_get_variable(script, *args++); actionCommandStatus->unk_50 = func_80268224(actionCommandStatus->unk_50); - actionCommandStatus->unk_64 = evt_get_variable(script, *args++); + actionCommandStatus->easyVersion = evt_get_variable(script, *args++); actionCommandStatus->unk_60 = 0; actionCommandStatus->barFillLevel = 0; @@ -170,7 +170,7 @@ void func_802A92A0_42F980(void) { if (actionCommandStatus->unk_68 == 0) { s16 newFillLevel; - if (actionCommandStatus->unk_64 != 0) { + if (actionCommandStatus->easyVersion != 0) { s8 mashMeterIntervals = actionCommandStatus->mashMeterIntervals; s16* mashMeterCutoffs = actionCommandStatus->mashMeterCutoffs; s32 index; @@ -208,10 +208,10 @@ void func_802A92A0_42F980(void) { buttonsAB = BUTTON_A | BUTTON_B; if ((buttonsPushed & buttonsAB) == buttonsAB) { - if (actionCommandStatus->unk_64 != 0) { + if (actionCommandStatus->easyVersion != 0) { s32 fillLevel; - fillLevel = actionCommandStatus->unk_64 * 650; + fillLevel = actionCommandStatus->easyVersion * 650; fillLevel = fillLevel / 100 * battleStatus->unk_434[actionCommandStatus->unk_50]; // Perplexing reuse of buttonsPushed here, but it fixes register allocation. Likely another @@ -266,7 +266,7 @@ void func_802A92A0_42F980(void) { // // TODO: Find a way to avoid reusing buttonsPushed. buttonsPushed = actionCommandStatus->barFillLevel; - if (actionCommandStatus->unk_64 == 0) { + if (actionCommandStatus->easyVersion == 0) { buttonsPushed = 0; } @@ -298,7 +298,7 @@ void func_802A92A0_42F980(void) { } break; case 12: - if (actionCommandStatus->unk_64 == 0) { + if (actionCommandStatus->easyVersion == 0) { actionCommandStatus->barFillLevel -= 100; if (actionCommandStatus->barFillLevel < 0) { actionCommandStatus->barFillLevel = 0; diff --git a/src/battle/action_cmd/mega_shock.c b/src/battle/action_cmd/mega_shock.c index b8e8f9b110..455c2146ba 100644 --- a/src/battle/action_cmd/mega_shock.c +++ b/src/battle/action_cmd/mega_shock.c @@ -82,7 +82,7 @@ ApiStatus func_802A91A0_42DBB0(Evt* script, s32 isInitialCall) { actionCommandStatus->unk_50 = arg; actionCommandStatus->unk_50 = func_80268224(arg); - actionCommandStatus->unk_64 = evt_get_variable(script, *readPos++); + actionCommandStatus->easyVersion = evt_get_variable(script, *readPos++); actionCommandStatus->unk_60 = 0; actionCommandStatus->barFillLevel = 0; actionCommandStatus->unk_48 = 0; @@ -176,7 +176,7 @@ void func_802A92A0_42DCB0(void) { if (actionCommandStatus->unk_68 == 0) { s16 newFillLevel; - if (actionCommandStatus->unk_64 != 0) { + if (actionCommandStatus->easyVersion != 0) { s8 mashMeterIntervals = actionCommandStatus->mashMeterIntervals; s16* mashMeterCutoffs = actionCommandStatus->mashMeterCutoffs; s32 index; @@ -214,10 +214,10 @@ void func_802A92A0_42DCB0(void) { buttonsAB = BUTTON_A | BUTTON_B; if ((buttonsPushed & buttonsAB) == buttonsAB) { - if (actionCommandStatus->unk_64 != 0) { + if (actionCommandStatus->easyVersion != 0) { s32 fillLevel; - fillLevel = actionCommandStatus->unk_64 * 780; + fillLevel = actionCommandStatus->easyVersion * 780; fillLevel = fillLevel / 100 * battleStatus->unk_434[actionCommandStatus->unk_50]; // Perplexing reuse of buttonsPushed here, but it fixes register allocation. Likely another @@ -273,7 +273,7 @@ void func_802A92A0_42DCB0(void) { // // TODO: Find a way to avoid reusing buttonsPushed. buttonsPushed = actionCommandStatus->barFillLevel; - if (actionCommandStatus->unk_64 == 0) { + if (actionCommandStatus->easyVersion == 0) { buttonsPushed = 0; } @@ -306,7 +306,7 @@ void func_802A92A0_42DCB0(void) { } break; case 12: - if (actionCommandStatus->unk_64 == 0) { + if (actionCommandStatus->easyVersion == 0) { actionCommandStatus->barFillLevel -= 100; if (actionCommandStatus->barFillLevel < 0) { actionCommandStatus->barFillLevel = 0; diff --git a/src/battle/action_cmd/power_shock.c b/src/battle/action_cmd/power_shock.c index 62d7c78484..bb35d1fb03 100644 --- a/src/battle/action_cmd/power_shock.c +++ b/src/battle/action_cmd/power_shock.c @@ -88,7 +88,7 @@ ApiStatus func_802A9210_42D120(Evt* script, s32 isInitialCall) { actionCommandStatus->unk_52 = evt_get_variable(script, *args++); actionCommandStatus->unk_50 = evt_get_variable(script, *args++); actionCommandStatus->unk_50 = func_80268224(actionCommandStatus->unk_50); - actionCommandStatus->unk_64 = evt_get_variable(script, *args++); + actionCommandStatus->easyVersion = evt_get_variable(script, *args++); actionCommandStatus->unk_60 = 0; actionCommandStatus->barFillLevel = 0; actionCommandStatus->unk_48 = 0; diff --git a/src/battle/action_cmd/smack.c b/src/battle/action_cmd/smack.c index 778c9b3dec..1f205c7fca 100644 --- a/src/battle/action_cmd/smack.c +++ b/src/battle/action_cmd/smack.c @@ -161,7 +161,7 @@ void func_802A9298_42E638(void) { } if (!(battleStatus->currentButtonsDown & BUTTON_STICK_LEFT) && actionCommandStatus->unk_5C) { - if (actionCommandStatus->unk_64 == 0) { + if (actionCommandStatus->easyVersion == 0) { actionCommandStatus->barFillLevel += battleStatus->unk_434[actionCommandStatus->unk_50] * 13; } else { actionCommandStatus->barFillLevel += battleStatus->unk_434[actionCommandStatus->unk_50] * 850 / 100; @@ -218,7 +218,7 @@ void func_802A9298_42E638(void) { } break; case 2: - if (actionCommandStatus->unk_64 == 0) { + if (actionCommandStatus->easyVersion == 0) { if (battleStatus->unk_84 >= D_802A9A08_42EDA8[battleStatus->unk_85]) { battleStatus->unk_85++; } diff --git a/src/battle/action_cmd/spook.c b/src/battle/action_cmd/spook.c index e41004eddf..81a367e275 100644 --- a/src/battle/action_cmd/spook.c +++ b/src/battle/action_cmd/spook.c @@ -111,7 +111,7 @@ void func_802A9298_4302B8(void) { case 11: btl_set_popup_duration(99); if (actionCommandStatus->unk_68 == 0) { - if (actionCommandStatus->unk_64 != 0) { + if (actionCommandStatus->easyVersion != 0) { cutoff = actionCommandStatus->mashMeterCutoffs[actionCommandStatus->mashMeterIntervals]; actionCommandStatus->barFillLevel -= D_802A9920_430940[actionCommandStatus->barFillLevel / cutoff / 20]; @@ -126,7 +126,7 @@ void func_802A9298_4302B8(void) { } if (actionCommandStatus->unk_68 == 0) { - if (actionCommandStatus->unk_64 != 0) { + if (actionCommandStatus->easyVersion != 0) { if (battleStatus->currentButtonsDown & BUTTON_STICK_LEFT) { actionCommandStatus->unk_5C = TRUE; @@ -134,7 +134,7 @@ void func_802A9298_4302B8(void) { if (!(battleStatus->currentButtonsDown & BUTTON_STICK_LEFT) && actionCommandStatus->unk_5C) { s32 a = battleStatus->unk_434[actionCommandStatus->unk_50]; - s32 b = actionCommandStatus->unk_64 * 850; + s32 b = actionCommandStatus->easyVersion * 850; actionCommandStatus->barFillLevel += (a * b) / 10000; actionCommandStatus->unk_5C = 0; @@ -142,7 +142,7 @@ void func_802A9298_4302B8(void) { if (battleStatus->currentButtonsPressed & BUTTON_STICK_RIGHT) { s32 a = battleStatus->unk_434[actionCommandStatus->unk_50]; - s32 b = actionCommandStatus->unk_64 * 850; + s32 b = actionCommandStatus->easyVersion * 850; actionCommandStatus->barFillLevel -= (a * b) / 10000; } @@ -186,7 +186,7 @@ void func_802A9298_4302B8(void) { } fillLevel = actionCommandStatus->barFillLevel; - if (actionCommandStatus->unk_64 == 0) { + if (actionCommandStatus->easyVersion == 0) { fillLevel = 0; } @@ -213,7 +213,7 @@ void func_802A9298_4302B8(void) { actionCommandStatus->state = 12; break; case 12: - if (actionCommandStatus->unk_64 == 0) { + if (actionCommandStatus->easyVersion == 0) { actionCommandStatus->barFillLevel -= 100; if (actionCommandStatus->barFillLevel < 0) { actionCommandStatus->barFillLevel = 0; diff --git a/src/battle/action_cmd/water_block.c b/src/battle/action_cmd/water_block.c index e6a70b19d9..03cb6626b8 100644 --- a/src/battle/action_cmd/water_block.c +++ b/src/battle/action_cmd/water_block.c @@ -141,7 +141,7 @@ ApiStatus func_802A9000_42A4F0(Evt* script, s32 isInitialCall) { actionCommandStatus->unk_60 = 0; actionCommandStatus->barFillLevel = 0; actionCommandStatus->unk_48 = 0; - actionCommandStatus->unk_64 = evt_get_variable(script, *args++); + actionCommandStatus->easyVersion = evt_get_variable(script, *args++); battleStatus->unk_84 = 1; actionCommandStatus->unk_6C = 30; actionCommandStatus->hudElementX = -48; @@ -207,7 +207,7 @@ ApiStatus func_802A9000_42A4F0(Evt* script, s32 isInitialCall) { actionCommandStatus->hudElements[12] = id; hud_element_set_render_pos(id, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY); - switch (actionCommandStatus->unk_64) { + switch (actionCommandStatus->easyVersion) { case 0: actionCommandStatus->hudElements[13] = hud_element_create(&HES_WaterBlockBlock); id = actionCommandStatus->hudElements[13]; @@ -328,7 +328,7 @@ void func_802A948C_42A97C(void) { hud_element_set_render_pos(actionCommandStatus->hudElements[4], actionCommandStatus->hudElementX + 61, actionCommandStatus->hudElementY + 24); id = actionCommandStatus->hudElements[10]; - switch (actionCommandStatus->unk_64) { + switch (actionCommandStatus->easyVersion) { case 0: hud_element_set_render_pos(id, actionCommandStatus->hudElementX + 91, actionCommandStatus->hudElementY + 7); break; diff --git a/src/battle/action_cmd/whirlwind.c b/src/battle/action_cmd/whirlwind.c index 27e0813a2a..3357e55c73 100644 --- a/src/battle/action_cmd/whirlwind.c +++ b/src/battle/action_cmd/whirlwind.c @@ -34,82 +34,22 @@ extern s32 D_80294240; #include "battle/action_cmd/whirlwind_bubble.png.inc.c" #include "battle/action_cmd/whirlwind_bubble.pal.inc.c" -HudScript HES_Whirlwind1 = { - HUD_ELEMENT_OP_SetVisible, - HUD_ELEMENT_OP_SetTileSize, HUD_ELEMENT_SIZE_24x24, - HUD_ELEMENT_OP_Loop, - HUD_ELEMENT_OP_SetCI, 60, (s32)battle_action_cmd_whirlwind_1_png, (s32)battle_action_cmd_whirlwind_1_pal, - 0x00000003, - HUD_ELEMENT_OP_End -}; +HudScript HES_Whirlwind1 = HES_TEMPLATE_CI_ENUM_SIZE(battle_action_cmd_whirlwind_1, 24, 24); -HudScript HES_Whirlwind2 = { - HUD_ELEMENT_OP_SetVisible, - HUD_ELEMENT_OP_SetTileSize, HUD_ELEMENT_SIZE_24x24, - HUD_ELEMENT_OP_Loop, - HUD_ELEMENT_OP_SetCI, 60, (s32)battle_action_cmd_whirlwind_2_png, (s32)battle_action_cmd_whirlwind_2_pal, - 0x00000003, - HUD_ELEMENT_OP_End -}; +HudScript HES_Whirlwind2 = HES_TEMPLATE_CI_ENUM_SIZE(battle_action_cmd_whirlwind_2, 24, 24); -HudScript HES_Whirlwind3 = { - HUD_ELEMENT_OP_SetVisible, - HUD_ELEMENT_OP_SetTileSize, HUD_ELEMENT_SIZE_24x24, - HUD_ELEMENT_OP_Loop, - HUD_ELEMENT_OP_SetCI, - 60, (s32)battle_action_cmd_whirlwind_3_png, (s32)battle_action_cmd_whirlwind_3_pal, - 0x00000003, - HUD_ELEMENT_OP_End -}; +HudScript HES_Whirlwind3 = HES_TEMPLATE_CI_ENUM_SIZE(battle_action_cmd_whirlwind_3, 24, 24); -HudScript HES_Whirlwind4 = { - HUD_ELEMENT_OP_SetVisible, - HUD_ELEMENT_OP_SetTileSize, HUD_ELEMENT_SIZE_24x24, - HUD_ELEMENT_OP_Loop, - HUD_ELEMENT_OP_SetCI, - 60, (s32)battle_action_cmd_whirlwind_4_png, (s32)battle_action_cmd_whirlwind_4_pal, - 0x00000003, - HUD_ELEMENT_OP_End -}; +HudScript HES_Whirlwind4 = HES_TEMPLATE_CI_ENUM_SIZE(battle_action_cmd_whirlwind_4, 24, 24); -HudScript HES_Whirlwind5 = { - HUD_ELEMENT_OP_SetVisible, - HUD_ELEMENT_OP_SetTileSize, HUD_ELEMENT_SIZE_24x24, - HUD_ELEMENT_OP_Loop, - HUD_ELEMENT_OP_SetCI, - 60, (s32)battle_action_cmd_whirlwind_5_png, (s32)battle_action_cmd_whirlwind_5_pal, - 0x00000003, - HUD_ELEMENT_OP_End -}; +HudScript HES_Whirlwind5 = HES_TEMPLATE_CI_ENUM_SIZE(battle_action_cmd_whirlwind_5, 24, 24);; -HudScript HES_Whirlwind6 = { - HUD_ELEMENT_OP_SetVisible, - HUD_ELEMENT_OP_SetTileSize, HUD_ELEMENT_SIZE_24x24, - HUD_ELEMENT_OP_Loop, - HUD_ELEMENT_OP_SetCI, - 60, (s32)battle_action_cmd_whirlwind_6_png, (s32)battle_action_cmd_whirlwind_6_pal, - 0x00000003, - HUD_ELEMENT_OP_End -}; +HudScript HES_Whirlwind6 = HES_TEMPLATE_CI_ENUM_SIZE(battle_action_cmd_whirlwind_6, 24, 24); -HudScript HES_Whirlwind7 = { - HUD_ELEMENT_OP_SetVisible, - HUD_ELEMENT_OP_SetTileSize, HUD_ELEMENT_SIZE_24x24, - HUD_ELEMENT_OP_Loop, - HUD_ELEMENT_OP_SetCI, - 60, (s32)battle_action_cmd_whirlwind_7_png, (s32)battle_action_cmd_whirlwind_7_pal, - 0x00000003, - HUD_ELEMENT_OP_End -}; +HudScript HES_Whirlwind7 = HES_TEMPLATE_CI_ENUM_SIZE(battle_action_cmd_whirlwind_7, 24, 24); -HudScript HES_WhirlwindBubble = { - HUD_ELEMENT_OP_SetVisible, - HUD_ELEMENT_OP_SetCustomSize, battle_action_cmd_whirlwind_bubble_png_width, battle_action_cmd_whirlwind_bubble_png_height, - 0x00000004, - HUD_ELEMENT_OP_SetCI, 60, (s32)battle_action_cmd_whirlwind_bubble_png, (s32)battle_action_cmd_whirlwind_bubble_pal, - 0x00000003, - HUD_ELEMENT_OP_End -}; +HudScript HES_WhirlwindBubble = HES_TEMPLATE_CI_CUSTOM_SIZE(battle_action_cmd_whirlwind_bubble, + battle_action_cmd_whirlwind_bubble_png_width, battle_action_cmd_whirlwind_bubble_png_height); s32 D_802AA844_4254B4[] = { 0, 25, 50, 75, 100, 100 }; @@ -140,14 +80,13 @@ ApiStatus func_802A9000_423C70(Evt* script, s32 isInitialCall) { } func_80268858(); - temp_v0 = evt_get_variable(script, *args++); - actionCommandStatus->unk_64 = temp_v0; + actionCommandStatus->easyVersion = evt_get_variable(script, *args++); actionCommandStatus->actionCommandID = ACTION_COMMAND_WHIRLWIND; actionCommandStatus->state = 0; actionCommandStatus->unk_60 = 0; actionCommandStatus->barFillLevel = 0; actionCommandStatus->unk_48 = 0; - if (temp_v0 == 0) { + if (actionCommandStatus->easyVersion == 0) { battleStatus->unk_84 = 0; } else { battleStatus->unk_84 = 3; @@ -202,7 +141,7 @@ ApiStatus func_802A91E0_423E50(Evt* script, s32 isInitialCall) { actionCommandStatus->unk_48 = 0; battleStatus->actionSuccess = 0; battleStatus->unk_86 = 0; - if (actionCommandStatus->unk_64 == 0) { + if (actionCommandStatus->easyVersion == 0) { battleStatus->unk_84 = 0; } else { battleStatus->unk_84 = 3; @@ -275,7 +214,7 @@ void func_802A92F0_423F60(void) { btl_set_popup_duration(99); cutoff = actionCommandStatus->mashMeterCutoffs[actionCommandStatus->mashMeterIntervals]; temp = actionCommandStatus->barFillLevel / cutoff; - if (actionCommandStatus->unk_64 == 0) { + if (actionCommandStatus->easyVersion == 0) { amt = D_802AA844_4254B4[temp / 20]; } else { amt = D_802AA85C_4254CC[temp / 10]; @@ -290,7 +229,7 @@ void func_802A92F0_423F60(void) { if (battleStatus->currentButtonsPressed & BUTTON_A) { s32 amt; - if (actionCommandStatus->unk_64 == 0) { + if (actionCommandStatus->easyVersion == 0) { amt = battleStatus->unk_434[actionCommandStatus->unk_50] * 5; } else { amt = battleStatus->unk_434[actionCommandStatus->unk_50] * 6; @@ -305,7 +244,7 @@ void func_802A92F0_423F60(void) { if (actionCommandStatus->barFillLevel > cutoff * 100) { actionCommandStatus->barFillLevel = cutoff * 100; } - if (actionCommandStatus->unk_64 == 0) { + if (!actionCommandStatus->easyVersion) { battleStatus->unk_84 = actionCommandStatus->barFillLevel / 2000; } else { battleStatus->unk_84 = D_802AA8B4_425524[actionCommandStatus->barFillLevel / 1000]; @@ -347,7 +286,7 @@ void N(draw_hud_elements)(void) { func_80268798(x, y, actionCommandStatus->barFillLevel / 100, 1); hud_element_draw_clipped(actionCommandStatus->hudElements[3]); id = actionCommandStatus->hudElements[2]; - if (actionCommandStatus->unk_64 == 0) { + if (!actionCommandStatus->easyVersion) { if (D_802AA888_4254F8[battleStatus->unk_84] != hud_element_get_script(id)) { hud_element_set_script(id, D_802AA888_4254F8[battleStatus->unk_84]); } diff --git a/src/battle/item/food.c b/src/battle/item/food.c index 536b3dd386..fba9028124 100644 --- a/src/battle/item/food.c +++ b/src/battle/item/food.c @@ -31,11 +31,11 @@ ApiStatus N(func_802A12EC_7333BC)(Evt* script, s32 isInitialCall) { partner->koDuration = 0; } if (partner->koDuration > 0) { - partner->debuffEffect->data.disableX->unk_3C = partner->koDuration; + partner->disableEffect->data.disableX->unk_3C = partner->koDuration; } else { partner->koStatus = 0; dispatch_event_partner(EVENT_RECOVER_PARTNER); - partner->debuffEffect->data.disableX->unk_3C = 0; + partner->disableEffect->data.disableX->unk_3C = 0; } return ApiStatus_DONE2; diff --git a/src/battle/item/hustle_drink.c b/src/battle/item/hustle_drink.c index 598a9bb8e5..82ef923ce1 100644 --- a/src/battle/item/hustle_drink.c +++ b/src/battle/item/hustle_drink.c @@ -20,9 +20,9 @@ ApiStatus N(func_802A123C_72619C)(Evt* script, s32 isInitialCall) { player->stoneDuration = 0; player->stoneStatus = 0; } - if (player->transStatus != 0) { - player->transDuration = 0; - player->transStatus = 0; + if (player->transparentStatus != 0) { + player->transparentDuration = 0; + player->transparentStatus = 0; } return ApiStatus_DONE2; diff --git a/src/battle/item/life_shroom.c b/src/battle/item/life_shroom.c index 2324dbad7d..5d9e1107b6 100644 --- a/src/battle/item/life_shroom.c +++ b/src/battle/item/life_shroom.c @@ -31,11 +31,11 @@ ApiStatus N(func_802A12EC_72E81C)(Evt* script, s32 isInitialCall) { partner->koDuration = 0; } if (partner->koDuration > 0) { - partner->debuffEffect->data.disableX->unk_3C = partner->koDuration; + partner->disableEffect->data.disableX->unk_3C = partner->koDuration; } else { partner->koStatus = 0; dispatch_event_partner(EVENT_RECOVER_PARTNER); - partner->debuffEffect->data.disableX->unk_3C = 0; + partner->disableEffect->data.disableX->unk_3C = 0; } return ApiStatus_DONE2; diff --git a/src/battle/item/mushroom.c b/src/battle/item/mushroom.c index 39991515da..cbe1025483 100644 --- a/src/battle/item/mushroom.c +++ b/src/battle/item/mushroom.c @@ -31,11 +31,11 @@ ApiStatus N(func_802A12EC_715B3C)(Evt* script, s32 isInitialCall) { partner->koDuration = 0; } if (partner->koDuration > 0) { - partner->debuffEffect->data.disableX->unk_3C = partner->koDuration; + partner->disableEffect->data.disableX->unk_3C = partner->koDuration; } else { partner->koStatus = 0; dispatch_event_partner(EVENT_RECOVER_PARTNER); - partner->debuffEffect->data.disableX->unk_3C = 0; + partner->disableEffect->data.disableX->unk_3C = 0; } return ApiStatus_DONE2; diff --git a/src/battle/item/sleepy_sheep.c b/src/battle/item/sleepy_sheep.c index 9eed29aed3..fe338bc46e 100644 --- a/src/battle/item/sleepy_sheep.c +++ b/src/battle/item/sleepy_sheep.c @@ -180,7 +180,7 @@ ApiStatus N(func_802A1740_71ED90)(Evt* script, s32 isInitialCall) { Actor* targetActor = get_actor(target->actorID); ActorPart* targetPart = get_actor_part(targetActor, target->partID); - if ((targetActor->transStatus == 0) && !(targetPart->eventFlags & ACTOR_EVENT_FLAG_ILLUSORY)) { + if ((targetActor->transparentStatus == 0) && !(targetPart->eventFlags & ACTOR_EVENT_FLAG_ILLUSORY)) { targetActor->yaw += 33.0f; targetActor->yaw = clamp_angle(targetActor->yaw); } @@ -213,7 +213,7 @@ ApiStatus N(func_802A1848_71EE98)(Evt* script, s32 isInitialCall) { if (targetActor != NULL) { ActorPart* targetPart = get_actor_part(targetActor, target->partID); - if ((targetActor->transStatus == 0) && !(targetPart->eventFlags & ACTOR_EVENT_FLAG_ILLUSORY)) { + if ((targetActor->transparentStatus == 0) && !(targetPart->eventFlags & ACTOR_EVENT_FLAG_ILLUSORY)) { if (targetActor->yaw < 360.0f) { targetActor->yaw += 33.0f; if (targetActor->yaw >= 360.0f) { diff --git a/src/battle/item/super_soda.c b/src/battle/item/super_soda.c index 918299c15d..dcd35380bb 100644 --- a/src/battle/item/super_soda.c +++ b/src/battle/item/super_soda.c @@ -31,11 +31,11 @@ ApiStatus N(func_802A12EC_724FCC)(Evt* script, s32 isInitialCall) { partner->koDuration = 0; } if (partner->koDuration > 0) { - partner->debuffEffect->data.disableX->unk_3C = partner->koDuration; + partner->disableEffect->data.disableX->unk_3C = partner->koDuration; } else { partner->koStatus = 0; dispatch_event_partner(EVENT_RECOVER_PARTNER); - partner->debuffEffect->data.disableX->unk_3C = 0; + partner->disableEffect->data.disableX->unk_3C = 0; } return ApiStatus_DONE2; @@ -64,7 +64,7 @@ ApiStatus N(func_802A1378_725058)(Evt* script, s32 isInitialCall) { break; } - actor->debuffEffect->data.disableX->unk_3C = 0; + actor->disableEffect->data.disableX->unk_3C = 0; } btl_update_ko_status(); diff --git a/src/battle/item/tasty_tonic.c b/src/battle/item/tasty_tonic.c index eb5b7bde48..658513ef2a 100644 --- a/src/battle/item/tasty_tonic.c +++ b/src/battle/item/tasty_tonic.c @@ -24,7 +24,7 @@ ApiStatus N(func_802A123C_72223C)(Evt* script, s32 isInitialCall) { case ACTOR_CLASS_PARTNER: dispatch_event_partner(EVENT_RECOVER_STATUS); } - actor->debuffEffect->data.disableX->unk_3C = 0; + actor->disableEffect->data.disableX->unk_3C = 0; } return ApiStatus_DONE2; diff --git a/src/battle/partner/bow.c b/src/battle/partner/bow.c index cfb25cf60d..c53a6140ab 100644 --- a/src/battle/partner/bow.c +++ b/src/battle/partner/bow.c @@ -102,7 +102,7 @@ ApiStatus N(AverageTargetStatusChance)(Evt* script, s32 isInitialCall) { targetActorBlueprint = targetActor->actorBlueprint; targetActorBlueprintBaseStatusChance = targetActorBlueprint->baseStatusChance; - if (targetActor->transStatus == STATUS_TRANSPARENT) { + if (targetActor->transparentStatus == STATUS_TRANSPARENT) { targetActorBlueprintBaseStatusChance = 0; } diff --git a/src/battle/partner/kooper.c b/src/battle/partner/kooper.c index 00e1973dd1..76a9fa2d77 100644 --- a/src/battle/partner/kooper.c +++ b/src/battle/partner/kooper.c @@ -83,7 +83,7 @@ ApiStatus func_80238114_6F5F94(Evt* script, s32 isInitialCall) { if (targetActor != NULL) { targetActorPart = get_actor_part(targetActor, target->partID); - if (targetActor->transStatus == 0) { + if (targetActor->transparentStatus == 0) { if (!(targetActorPart->eventFlags & 0x20)) { if (x > targetX) { targetActor->yaw += 33; @@ -126,7 +126,7 @@ ApiStatus N(AverageTargetDizzyChance)(Evt* script, s32 isInitialCall) { targetActorPart = get_actor_part(targetActor, partnerActor->targetData[i].partID); targetActorBlueprintBaseStatusChance = lookup_status_chance(targetActor->statusTable, STATUS_DIZZY); - if (targetActor->transStatus == STATUS_TRANSPARENT) { + if (targetActor->transparentStatus == STATUS_TRANSPARENT) { targetActorBlueprintBaseStatusChance = 0; } diff --git a/src/battle/partner/lakilester.c b/src/battle/partner/lakilester.c index cb6ab6684c..80f43bb283 100644 --- a/src/battle/partner/lakilester.c +++ b/src/battle/partner/lakilester.c @@ -79,7 +79,7 @@ ApiStatus func_80238D48_70CA58(Evt* script, s32 isInitialCall) { if (gBattleStatus.cloudNineTurnsLeft < script->varTable[10]) { gBattleStatus.cloudNineTurnsLeft = script->varTable[10]; gBattleStatus.cloudNineDodgeChance = 50; - gBattleStatus.unk_43C->unk_0C->unk_1A = gBattleStatus.cloudNineTurnsLeft; + gBattleStatus.buffEffect->data.partnerBuff->unk_0C[FX_BUFF_DATA_CLOUD_NINE].turnsLeft = gBattleStatus.cloudNineTurnsLeft; } return ApiStatus_DONE2; diff --git a/src/battle/partner/parakarry.c b/src/battle/partner/parakarry.c index 28de88f33f..86602c5977 100644 --- a/src/battle/partner/parakarry.c +++ b/src/battle/partner/parakarry.c @@ -349,7 +349,7 @@ ApiStatus func_80238CE0_700A60(Evt* script, s32 isInitialCall) { s32 airLiftChance = targetActor->actorBlueprint->airLiftChance; s32 hpPercentLost = 100 - (targetActor->currentHP * 100) / targetActor->maxHP; - if (targetActor->transStatus == STATUS_TRANSPARENT) { + if (targetActor->transparentStatus == STATUS_TRANSPARENT) { airLiftChance = 0; } diff --git a/src/battle/partner/sushie.c b/src/battle/partner/sushie.c index ba88992718..feb6b45244 100644 --- a/src/battle/partner/sushie.c +++ b/src/battle/partner/sushie.c @@ -96,7 +96,7 @@ ApiStatus func_80238328_707FC8(Evt* script, s32 isInitialCall) { if (battleStatus->waterBlockTurnsLeft < var) { battleStatus->waterBlockTurnsLeft = var; battleStatus->waterBlockAmount = 1; - battleStatus->unk_43C->unk_0C->unk_10 = battleStatus->waterBlockTurnsLeft; + battleStatus->buffEffect->data.partnerBuff->unk_0C[FX_BUFF_DATA_WATER_BLOCK].turnsLeft = battleStatus->waterBlockTurnsLeft; } return ApiStatus_DONE2; diff --git a/src/battle/partner/watt.c b/src/battle/partner/watt.c index f759397181..cd30c0c3a8 100644 --- a/src/battle/partner/watt.c +++ b/src/battle/partner/watt.c @@ -120,7 +120,7 @@ ApiStatus func_80238784_704274(Evt* script, s32 isInitialCall) { ActorPart* targetActorPart = get_actor_part(targetActor, partnerActor->targetPartIndex); s32 statusChance = lookup_status_chance(targetActor->statusTable, 5); - if (targetActor->transStatus == STATUS_TRANSPARENT) { + if (targetActor->transparentStatus == STATUS_TRANSPARENT) { statusChance = 0; } if (targetActorPart->eventFlags & ACTOR_EVENT_FLAG_ILLUSORY) { @@ -163,7 +163,7 @@ ApiStatus func_80238C08_7046F8(Evt* script, s32 isInitialCall) { if (battleStatus->turboChargeTurnsLeft < var1) { battleStatus->turboChargeTurnsLeft = var1; battleStatus->turboChargeAmount = 1; - battleStatus->unk_43C->unk_0C->unk_24 = battleStatus->turboChargeTurnsLeft; + battleStatus->buffEffect->data.partnerBuff->unk_0C[FX_BUFF_DATA_TURBO_CHARGE].turnsLeft = battleStatus->turboChargeTurnsLeft; } if (gBattleStatus.flags2 & 2) { @@ -190,7 +190,7 @@ ApiStatus N(AverageTargetParalyzeChance)(Evt* script, s32 isInitialCall) { targetActorPart = get_actor_part(targetActor, partnerActor->targetData[i].partID); targetActorBlueprintBaseStatusChance = lookup_status_chance(targetActor->statusTable, STATUS_PARALYZE); - if (targetActor->transStatus == STATUS_TRANSPARENT) { + if (targetActor->transparentStatus == STATUS_TRANSPARENT) { targetActorBlueprintBaseStatusChance = 0; } diff --git a/src/battle/star/refresh/78B600.c b/src/battle/star/refresh/78B600.c index 9da95d937d..69b67439e0 100644 --- a/src/battle/star/refresh/78B600.c +++ b/src/battle/star/refresh/78B600.c @@ -22,7 +22,7 @@ ApiStatus func_802A17D4_78BDD4(Evt* script, s32 isInitialCall) { if (actor->koStatus != 0) { actor->koDuration = 0; actor->koStatus = 0; - actor->debuffEffect->data.disableX->unk_3C = 0; + actor->disableEffect->data.disableX->unk_3C = 0; } btl_update_ko_status(); diff --git a/src/common/MashActionCommandInit.inc.c b/src/common/MashActionCommandInit.inc.c index 1feda84dc5..13c1246a02 100644 --- a/src/common/MashActionCommandInit.inc.c +++ b/src/common/MashActionCommandInit.inc.c @@ -15,7 +15,7 @@ ApiStatus N(MashActionCommandInit)(Evt* script, s32 isInitialCall) { actionCommandStatus->unk_52 = evt_get_variable(script, *args++); actionCommandStatus->unk_50 = evt_get_variable(script, *args++); actionCommandStatus->unk_50 = func_80268224(actionCommandStatus->unk_50); - actionCommandStatus->unk_64 = evt_get_variable(script, *args++); + actionCommandStatus->easyVersion = evt_get_variable(script, *args++); actionCommandStatus->unk_60 = 0; actionCommandStatus->barFillLevel = 0; actionCommandStatus->unk_48 = 0; diff --git a/src/d0a70_len_4fe0.c b/src/d0a70_len_4fe0.c index f06d7c4ece..d65dfc0e3b 100644 --- a/src/d0a70_len_4fe0.c +++ b/src/d0a70_len_4fe0.c @@ -424,7 +424,7 @@ void fold_update(u32 idx, FoldType type, s32 arg2, s32 arg3, s32 arg4, s32 arg5, if (arg6 != 0) { state->flags |= arg6; } else { - state->flags = state->flags; // required to match + state->flags |= arg6; // required to match } return; case FOLD_TYPE_1: diff --git a/src/effects/partner_buff.c b/src/effects/partner_buff.c index 12c3f25ca7..0391ce1508 100644 --- a/src/effects/partner_buff.c +++ b/src/effects/partner_buff.c @@ -1,23 +1,173 @@ #include "common.h" #include "effects_internal.h" -INCLUDE_ASM(s32, "effects/partner_buff", partner_buff_main); +void partner_buff_init(EffectInstance* effect); +void partner_buff_update(EffectInstance* effect); +void partner_buff_render(EffectInstance* effect); +void func_E011A3A0(EffectInstance* effect); +void func_E011A700(EffectInstance* effect); -void partner_buff_init(void) { +enum { + BUFF_STATE_IDLE = 0, + BUFF_STATE_DECREMENT_TURNS_INIT = 1, + BUFF_STATE_DECREMENT_TURNS = 10, + BUFF_STATE_SET_TURNS_INIT = 2, + BUFF_STATE_SET_TURNS = 20, + BUFF_STATE_FADE_OUT = 3, + BUFF_STATE_FADE_IN_INIT = 4, + BUFF_STATE_FADE_IN = 40 +}; + +EffectInstance* partner_buff_main(s32 useRandomValues, f32 arg1, f32 arg2, f32 arg3, f32 arg4, s32 duration) { + EffectBlueprint bp; + EffectInstance* effect; + PartnerBuffFXData* part; + s32 numParts = 1; + s32 i; + + bp.unk_00 = 0; + bp.init = partner_buff_init; + bp.update = partner_buff_update; + bp.renderWorld = partner_buff_render; + bp.unk_14 = func_E011A3A0; + bp.effectID = EFFECT_PARTNER_BUFF; + + effect = shim_create_effect_instance(&bp); + effect->numParts = numParts; + part = effect->data.partnerBuff = shim_general_heap_malloc(numParts * sizeof(*part)); + ASSERT(effect->data.partnerBuff != NULL); + + part->useRandomValues = useRandomValues; + part->lifeTime = 0; + if (duration <= 0) { + part->timeLeft = 1000; + } else { + part->timeLeft = duration; + } + + for (i = 0; i < ARRAY_COUNT(part->unk_0C); i++) { + part->unk_0C[i].alpha = 0; + part->unk_0C[i].turnsDisplay = 0; + part->unk_0C[i].turnsLeft = 0; + part->unk_0C[i].state = BUFF_STATE_IDLE; + part->unk_0C[i].stateTimer = 0; + } + + part->unk_02 = 0; + if (useRandomValues == 1) { + part->unk_02 = 1; + } + + return effect; } -INCLUDE_ASM(s32, "effects/partner_buff", partner_buff_update); - -void partner_buff_render(void) { +void partner_buff_init(EffectInstance* effect) { } -INCLUDE_ASM(s32, "effects/partner_buff", func_E011A3A0); +void partner_buff_update(EffectInstance* effect) { + PartnerBuffFXData* data = effect->data.partnerBuff; + s32 useRandomValues = data->useRandomValues; + s32 time; + s32 i; + + if (effect->flags & EFFECT_INSTANCE_FLAGS_10) { + effect->flags &= ~EFFECT_INSTANCE_FLAGS_10; + data->timeLeft = 16; + } + if (data->timeLeft < 1000) { + data->timeLeft--; + } + + data->lifeTime++; + if (data->timeLeft < 0) { + shim_remove_effect(effect); + return; + } + + time = data->lifeTime; + + for (i = 0; i < ARRAY_COUNT(data->unk_0C); i++) { + BuffData* buff = &data->unk_0C[i]; + if (buff->turnsLeft < 0) { + buff->turnsLeft = 0; + } + // possibly a leftover debug option + if ((useRandomValues == 1) && (time % 30 == 0)) { + buff->turnsLeft = shim_rand_int(4); + } + + switch (buff->state) { + case BUFF_STATE_IDLE: + if (buff->alpha == 255) { + if (buff->turnsLeft < buff->turnsDisplay) { + buff->state = BUFF_STATE_DECREMENT_TURNS_INIT; + } else if (buff->turnsDisplay < buff->turnsLeft) { + buff->state = BUFF_STATE_SET_TURNS_INIT; + } else if (buff->turnsDisplay == 0) { + buff->state = BUFF_STATE_FADE_OUT; + } + } else if ((buff->alpha == 0) && (buff->turnsLeft > 0)) { + buff->state = BUFF_STATE_FADE_IN_INIT; + } + break; + case BUFF_STATE_DECREMENT_TURNS_INIT: + buff->stateTimer = 0; + buff->state = BUFF_STATE_DECREMENT_TURNS; + // fallthrough + case BUFF_STATE_DECREMENT_TURNS: + buff->stateTimer++; + if (buff->stateTimer > 10) { + buff->stateTimer = 0; + buff->state = BUFF_STATE_IDLE; + buff->turnsDisplay--; + } + break; + case BUFF_STATE_SET_TURNS_INIT: + buff->stateTimer = 0; + buff->state = BUFF_STATE_SET_TURNS; + // fallthrough + case BUFF_STATE_SET_TURNS: + buff->stateTimer++; + if (buff->stateTimer > 10) { + buff->stateTimer = 0; + buff->state = BUFF_STATE_IDLE; + buff->turnsDisplay = buff->turnsLeft; + } + break; + case BUFF_STATE_FADE_OUT: + buff->alpha -= 32; + if (buff->alpha < 0) { + buff->alpha = 0; + buff->state = BUFF_STATE_IDLE; + } + break; + case BUFF_STATE_FADE_IN_INIT: + buff->state = BUFF_STATE_FADE_IN; + buff->turnsDisplay = buff->turnsLeft; + // fallthrough + case BUFF_STATE_FADE_IN: + buff->alpha += 64; + if (buff->alpha > 255) { + buff->alpha = 255; + buff->state = BUFF_STATE_IDLE; + } + break; + } + } +} + +void partner_buff_render(EffectInstance* effect) { +} + +void func_E011A3A0(EffectInstance* effect) { + func_E011A700(effect); +} void func_E011A3BC(s16 alpha) { if (alpha == 255) { - gDPSetRenderMode(gMasterGfxPos++, AA_EN | CVG_DST_FULL | ZMODE_OPA | CVG_X_ALPHA | GBL_c1(G_BL_CLR_IN, G_BL_A_IN, - G_BL_CLR_MEM, G_BL_A_MEM), AA_EN | CVG_DST_FULL | ZMODE_OPA | CVG_X_ALPHA | GBL_c2(G_BL_CLR_IN, G_BL_A_IN, G_BL_CLR_MEM, - G_BL_A_MEM)); + gDPSetRenderMode(gMasterGfxPos++, AA_EN | CVG_DST_FULL | ZMODE_OPA | CVG_X_ALPHA | + GBL_c1(G_BL_CLR_IN, G_BL_A_IN, G_BL_CLR_MEM, G_BL_A_MEM), + GBL_c2(G_BL_CLR_IN, G_BL_A_IN, G_BL_CLR_MEM, G_BL_A_MEM)); gDPSetCombineMode(gMasterGfxPos++, G_CC_DECALRGBA, G_CC_DECALRGBA); } else { gDPSetRenderMode(gMasterGfxPos++, G_RM_CLD_SURF, G_RM_CLD_SURF2); @@ -26,6 +176,18 @@ void func_E011A3BC(s16 alpha) { } } -INCLUDE_ASM(s32, "effects/partner_buff", func_E011A48C); +void func_E011A48C(s32 posX, s32 posY, s32 tile, f32 scale) { + gSPScisTextureRectangle(gMasterGfxPos++, + posX * 4, + posY * 4, + (posX + 32) * 4, + (posY + 32) * 4, + tile, + 0, + 1024, + scale, + -scale); + gDPPipeSync(gMasterGfxPos++); +} INCLUDE_ASM(s32, "effects/partner_buff", func_E011A700); diff --git a/src/npc.c b/src/npc.c index df43706ae0..c20f81dbd8 100644 --- a/src/npc.c +++ b/src/npc.c @@ -1530,63 +1530,63 @@ void func_8003D3BC(Npc* npc) { s32 temp_s6 = npc->unk_A0; s32 temp_s3 = npc->unk_A2; - func_802DE894(npc->spriteInstanceID, 0, 0, 0, 0, 0, 0); + func_802DE894(npc->spriteInstanceID, FOLD_TYPE_NONE, 0, 0, 0, 0, 0); switch (temp_s4) { - case 0: + case FOLD_TYPE_NONE: npc->renderMode = 13; - func_802DE894(npc->spriteInstanceID, 0, 0, 0, 0, 0, temp_s3); + func_802DE894(npc->spriteInstanceID, FOLD_TYPE_NONE, 0, 0, 0, 0, temp_s3); break; - case 2: - case 3: + case FOLD_TYPE_2: + case FOLD_TYPE_3: npc->renderMode = 13; // fallthrough - case 1: + case FOLD_TYPE_1: func_802DE894(npc->spriteInstanceID, temp_s4, 0, 0, 0, 0, temp_s3); break; - case 4: + case FOLD_TYPE_4: npc->renderMode = 13; - func_802DE894(npc->spriteInstanceID, 4, temp_s0, temp_s5, temp_s2, 0, temp_s3); + func_802DE894(npc->spriteInstanceID, FOLD_TYPE_4, temp_s0, temp_s5, temp_s2, 0, temp_s3); break; - case 6: + case FOLD_TYPE_6: npc->renderMode = 13; - func_802DE894(npc->spriteInstanceID, 6, temp_s0, temp_s5, temp_s2, 255, temp_s3); + func_802DE894(npc->spriteInstanceID, FOLD_TYPE_6, temp_s0, temp_s5, temp_s2, 255, temp_s3); break; - case 7: + case FOLD_TYPE_7: npc->renderMode = 22; - func_802DE894(npc->spriteInstanceID, 7, 255, 255, 255, temp_s0, temp_s3); + func_802DE894(npc->spriteInstanceID, FOLD_TYPE_7, 255, 255, 255, temp_s0, temp_s3); break; - case 8: + case FOLD_TYPE_8: npc->renderMode = 22; - func_802DE894(npc->spriteInstanceID, 8, temp_s0, temp_s5, temp_s2, temp_s6, temp_s3); + func_802DE894(npc->spriteInstanceID, FOLD_TYPE_8, temp_s0, temp_s5, temp_s2, temp_s6, temp_s3); break; - case 9: + case FOLD_TYPE_9: npc->renderMode = 13; - func_802DE894(npc->spriteInstanceID, 9, temp_s0, temp_s5, temp_s2, 255, temp_s3); + func_802DE894(npc->spriteInstanceID, FOLD_TYPE_9, temp_s0, temp_s5, temp_s2, 255, temp_s3); break; - case 10: + case FOLD_TYPE_A: npc->renderMode = 22; - func_802DE894(npc->spriteInstanceID, 10, temp_s0, temp_s5, temp_s2, temp_s6, temp_s3); + func_802DE894(npc->spriteInstanceID, FOLD_TYPE_A, temp_s0, temp_s5, temp_s2, temp_s6, temp_s3); break; - case 5: + case FOLD_TYPE_5: npc->renderMode = 13; - func_802DE894(npc->spriteInstanceID, 5, temp_s0, temp_s5, temp_s2, 0, temp_s3); + func_802DE894(npc->spriteInstanceID, FOLD_TYPE_5, temp_s0, temp_s5, temp_s2, 0, temp_s3); break; - case 13: + case FOLD_TYPE_D: npc->renderMode = 22; - func_802DE894(npc->spriteInstanceID, 13, temp_s0, temp_s5, temp_s2, temp_s6, temp_s3); + func_802DE894(npc->spriteInstanceID, FOLD_TYPE_D, temp_s0, temp_s5, temp_s2, temp_s6, temp_s3); break; - case 14: + case FOLD_TYPE_E: npc->renderMode = 13; - func_802DE894(npc->spriteInstanceID, 14, temp_s0, temp_s5, temp_s2, 255, temp_s3); + func_802DE894(npc->spriteInstanceID, FOLD_TYPE_E, temp_s0, temp_s5, temp_s2, 255, temp_s3); break; - case 15: + case FOLD_TYPE_F: npc->renderMode = 13; - func_802DE894(npc->spriteInstanceID, 15, temp_s0, 255, 0, 255, temp_s3); + func_802DE894(npc->spriteInstanceID, FOLD_TYPE_F, temp_s0, 255, 0, 255, temp_s3); break; - case 16: + case FOLD_TYPE_10: npc->renderMode = 22; - func_802DE894(npc->spriteInstanceID, 15, temp_s0, temp_s5, 0, temp_s5, temp_s3); + func_802DE894(npc->spriteInstanceID, FOLD_TYPE_F, temp_s0, temp_s5, 0, temp_s5, temp_s3); break; } } diff --git a/src/sprite.c b/src/sprite.c index 62897e02cb..6320210c4b 100644 --- a/src/sprite.c +++ b/src/sprite.c @@ -666,17 +666,17 @@ s32 spr_free_sprite(s32 spriteInstanceID) { return 0; } -s32 func_802DE748(s32 arg0, s32 arg1) { - SpriteComponent** componentList = D_802DFA48[arg0].componentList; +s32 func_802DE748(s32 spriteIdx, s32 compIdx) { + SpriteComponent** componentList = D_802DFA48[spriteIdx].componentList; if (componentList == NULL) { return -1; } - return componentList[arg1]->unk_4C & 0xFF; + return componentList[compIdx]->unk_4C & 0xFF; } -void func_802DE780(s32 spriteIdx, s32 arg1, s32 arg2, s32 arg3, s32 arg4, s32 arg5, s32 arg6, s32 arg7) { +void func_802DE780(s32 spriteIdx, s32 compIdx, s32 foldType, s32 foldArg0, s32 foldArg1, s32 foldArg2, s32 foldArg3, s32 foldArg4) { SpriteInstance* sprite = &D_802DFA48[spriteIdx]; SpriteComponent** componentList; s32 i; @@ -688,9 +688,9 @@ void func_802DE780(s32 spriteIdx, s32 arg1, s32 arg2, s32 arg3, s32 arg4, s32 ar while ((s32) *componentList != -1) { SpriteComponent* comp = *componentList; - if (arg1 == -1 || i == arg1) { - fold_update((u8)comp->unk_4C, arg2, arg3, arg4, arg5, arg6, arg7); - if (arg2 != FOLD_TYPE_NONE) { + if (compIdx == -1 || i == compIdx) { + fold_update((u8)comp->unk_4C, foldType, foldArg0, foldArg1, foldArg2, foldArg3, foldArg4); + if (foldType != FOLD_TYPE_NONE) { comp->unk_4C |= 0x10000000; } else { comp->unk_4C &= ~0xF0000000; @@ -702,8 +702,8 @@ void func_802DE780(s32 spriteIdx, s32 arg1, s32 arg2, s32 arg3, s32 arg4, s32 ar } } -void func_802DE894(s32 spriteIdx, s32 compListIdx, s32 foldType, s32 arg3, s32 arg4, s32 arg5, s32 arg6) { - func_802DE780(spriteIdx, -1, compListIdx, foldType, arg3, arg4, arg5, arg6); +void func_802DE894(s32 spriteIdx, s32 foldType, s32 foldArg0, s32 foldArg1, s32 foldArg2, s32 foldArg3, s32 foldArg4) { + func_802DE780(spriteIdx, -1, foldType, foldArg0, foldArg1, foldArg2, foldArg3, foldArg4); } // animList issue diff --git a/src/sprite.h b/src/sprite.h index bf30070882..5b1d3a88b9 100644 --- a/src/sprite.h +++ b/src/sprite.h @@ -3,6 +3,8 @@ #include "common.h" +#define SPR_PLAYER_COLOR_VARIATIONS 6 + typedef struct SpriteComponent { /* 0x00 */ s32 initialized; /* 0x04 */ s32 unk_04; diff --git a/src/status_icons.c b/src/status_icons.c index 556a706600..d29757bae7 100644 --- a/src/status_icons.c +++ b/src/status_icons.c @@ -54,7 +54,7 @@ typedef struct HudStatusIcon { /* 0x28 */ s32 status4Radius; /* 0x2C */ s32 status4OffsetY; /* 0x30 */ s32 offsetY; - /* 0x34 */ f32 offsetX; + /* 0x34 */ s32 offsetX; /* 0x38 */ HudComplexStatusIcon status1; /* 0x48 */ HudComplexStatusIcon status2; /* 0x58 */ HudComplexStatusIcon status3; @@ -158,8 +158,8 @@ void func_80045BC8(void) { for (i = 0; i < ARRAY_COUNT(D_800A0BC0); i++) { PopupMessage* popup = &D_800A0BC0[i]; - if (popup->active && popup->unk_08 != NULL) { - popup->unk_08(popup); + if (popup->active && popup->renderWorldFunc != NULL) { + popup->renderWorldFunc(popup); } } } @@ -169,8 +169,8 @@ void draw_merlee_messages(void) { for (i = 0; i < ARRAY_COUNT(D_800A0BC0); i++) { PopupMessage* popup = &D_800A0BC0[i]; - if (popup->active && popup->drawFunc != NULL) { - popup->drawFunc(popup); + if (popup->active && popup->renderUIFunc != NULL) { + popup->renderUIFunc(popup); } } } @@ -202,10 +202,10 @@ void show_merlee_message(s16 messageIndex, s16 duration) { if (popup != NULL) { popup->updateFunc = update_merlee_message; - popup->drawFunc = draw_merlee_message; + popup->renderUIFunc = draw_merlee_message; popup->unk_17 = 1; popup->unk_00 = 0; - popup->unk_08 = NULL; + popup->renderWorldFunc = NULL; popup->messageIndex = messageIndex; popup->duration = duration; popup->unk_16 = 0; @@ -288,8 +288,8 @@ void init_all_status_icons(void) { if (popup != NULL) { popup->updateFunc = update_all_status_icons; popup->unk_00 = 0; - popup->unk_08 = NULL; - popup->drawFunc = draw_all_status_icons; + popup->renderWorldFunc = NULL; + popup->renderUIFunc = draw_all_status_icons; popup->message = general_heap_malloc(64 * sizeof(HudStatusIcon)); icons = D_800A0F44 = (HudStatusIcon*)(popup->message); ASSERT(icons != NULL); @@ -983,7 +983,7 @@ void set_status_icons_properties(s32 iconID, f32 x, f32 y, f32 z, s32 arg, s32 a icon->status4OffsetY = offsetY + 51; } -void set_status_icons_offset(s32 iconID, s32 offsetY, f32 offsetX) { +void set_status_icons_offset(s32 iconID, s32 offsetY, s32 offsetX) { HudStatusIcon* statusIcon = &D_800A0F44[iconID]; statusIcon->offsetY = offsetY; diff --git a/ver/us/asm/nonmatchings/182B30/func_80257DA4.s b/ver/us/asm/nonmatchings/182B30/appendGfx_player_actor.s similarity index 99% rename from ver/us/asm/nonmatchings/182B30/func_80257DA4.s rename to ver/us/asm/nonmatchings/182B30/appendGfx_player_actor.s index 7d69a04701..337fd3304a 100644 --- a/ver/us/asm/nonmatchings/182B30/func_80257DA4.s +++ b/ver/us/asm/nonmatchings/182B30/appendGfx_player_actor.s @@ -11,7 +11,7 @@ dlabel D_8029D390 .section .text -glabel func_80257DA4 +glabel appendGfx_player_actor /* 186684 80257DA4 27BDFD18 */ addiu $sp, $sp, -0x2e8 /* 186688 80257DA8 AFB402B0 */ sw $s4, 0x2b0($sp) /* 18668C 80257DAC 3C14800E */ lui $s4, %hi(gBattleStatus) diff --git a/ver/us/asm/nonmatchings/182B30/func_80255FE0.s b/ver/us/asm/nonmatchings/182B30/func_80255FE0.s deleted file mode 100644 index 03b149a63d..0000000000 --- a/ver/us/asm/nonmatchings/182B30/func_80255FE0.s +++ /dev/null @@ -1,1237 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -.section .rodata - -dlabel D_8029D368 -.double 0.4 - -dlabel D_8029D370 -.double 0.7142857142857143 - -dlabel D_8029D378 -.double 0.7142857142857143 - -.section .text - -glabel func_80255FE0 -/* 1848C0 80255FE0 27BDFC30 */ addiu $sp, $sp, -0x3d0 -/* 1848C4 80255FE4 3C03800E */ lui $v1, %hi(gBattleStatus) -/* 1848C8 80255FE8 2463C070 */ addiu $v1, $v1, %lo(gBattleStatus) -/* 1848CC 80255FEC 0060102D */ daddu $v0, $v1, $zero -/* 1848D0 80255FF0 AFBF039C */ sw $ra, 0x39c($sp) -/* 1848D4 80255FF4 AFBE0398 */ sw $fp, 0x398($sp) -/* 1848D8 80255FF8 AFB70394 */ sw $s7, 0x394($sp) -/* 1848DC 80255FFC AFB60390 */ sw $s6, 0x390($sp) -/* 1848E0 80256000 AFB5038C */ sw $s5, 0x38c($sp) -/* 1848E4 80256004 AFB40388 */ sw $s4, 0x388($sp) -/* 1848E8 80256008 AFB30384 */ sw $s3, 0x384($sp) -/* 1848EC 8025600C AFB20380 */ sw $s2, 0x380($sp) -/* 1848F0 80256010 AFB1037C */ sw $s1, 0x37c($sp) -/* 1848F4 80256014 AFB00378 */ sw $s0, 0x378($sp) -/* 1848F8 80256018 F7BE03C8 */ sdc1 $f30, 0x3c8($sp) -/* 1848FC 8025601C F7BC03C0 */ sdc1 $f28, 0x3c0($sp) -/* 184900 80256020 F7BA03B8 */ sdc1 $f26, 0x3b8($sp) -/* 184904 80256024 F7B803B0 */ sdc1 $f24, 0x3b0($sp) -/* 184908 80256028 F7B603A8 */ sdc1 $f22, 0x3a8($sp) -/* 18490C 8025602C F7B403A0 */ sdc1 $f20, 0x3a0($sp) -/* 184910 80256030 14800005 */ bnez $a0, .L80256048 -/* 184914 80256034 AFA403D0 */ sw $a0, 0x3d0($sp) -/* 184918 80256038 00051080 */ sll $v0, $a1, 2 -/* 18491C 8025603C 00431021 */ addu $v0, $v0, $v1 -/* 184920 80256040 08095813 */ j .L8025604C -/* 184924 80256044 8C5200E0 */ lw $s2, 0xe0($v0) -.L80256048: -/* 184928 80256048 8C5200DC */ lw $s2, 0xdc($v0) -.L8025604C: -/* 18492C 8025604C 86420150 */ lh $v0, 0x150($s2) -/* 184930 80256050 C6400144 */ lwc1 $f0, 0x144($s2) -/* 184934 80256054 44821000 */ mtc1 $v0, $f2 -/* 184938 80256058 00000000 */ nop -/* 18493C 8025605C 468010A0 */ cvt.s.w $f2, $f2 -/* 184940 80256060 46020000 */ add.s $f0, $f0, $f2 -/* 184944 80256064 8E420000 */ lw $v0, ($s2) -/* 184948 80256068 30420800 */ andi $v0, $v0, 0x800 -/* 18494C 8025606C 14400009 */ bnez $v0, .L80256094 -/* 184950 80256070 E7A00364 */ swc1 $f0, 0x364($sp) -/* 184954 80256074 86420152 */ lh $v0, 0x152($s2) -/* 184958 80256078 C6400148 */ lwc1 $f0, 0x148($s2) -/* 18495C 8025607C 44821000 */ mtc1 $v0, $f2 -/* 184960 80256080 00000000 */ nop -/* 184964 80256084 468010A0 */ cvt.s.w $f2, $f2 -/* 184968 80256088 8242019A */ lb $v0, 0x19a($s2) -/* 18496C 8025608C 0809582C */ j .L802560B0 -/* 184970 80256090 46020000 */ add.s $f0, $f0, $f2 -.L80256094: -/* 184974 80256094 86420152 */ lh $v0, 0x152($s2) -/* 184978 80256098 C6400148 */ lwc1 $f0, 0x148($s2) -/* 18497C 8025609C 44821000 */ mtc1 $v0, $f2 -/* 184980 802560A0 00000000 */ nop -/* 184984 802560A4 468010A0 */ cvt.s.w $f2, $f2 -/* 184988 802560A8 8242019A */ lb $v0, 0x19a($s2) -/* 18498C 802560AC 46020001 */ sub.s $f0, $f0, $f2 -.L802560B0: -/* 184990 802560B0 44821000 */ mtc1 $v0, $f2 -/* 184994 802560B4 00000000 */ nop -/* 184998 802560B8 468010A0 */ cvt.s.w $f2, $f2 -/* 18499C 802560BC 46020780 */ add.s $f30, $f0, $f2 -/* 1849A0 802560C0 8E420008 */ lw $v0, 8($s2) -/* 1849A4 802560C4 82430194 */ lb $v1, 0x194($s2) -/* 1849A8 802560C8 80420024 */ lb $v0, 0x24($v0) -/* 1849AC 802560CC C6420188 */ lwc1 $f2, 0x188($s2) -/* 1849B0 802560D0 00431021 */ addu $v0, $v0, $v1 -/* 1849B4 802560D4 44820000 */ mtc1 $v0, $f0 -/* 1849B8 802560D8 00000000 */ nop -/* 1849BC 802560DC 46800020 */ cvt.s.w $f0, $f0 -/* 1849C0 802560E0 46020002 */ mul.s $f0, $f0, $f2 -/* 1849C4 802560E4 00000000 */ nop -/* 1849C8 802560E8 C7AA0364 */ lwc1 $f10, 0x364($sp) -/* 1849CC 802560EC 86440154 */ lh $a0, 0x154($s2) -/* 1849D0 802560F0 C644014C */ lwc1 $f4, 0x14c($s2) -/* 1849D4 802560F4 8E420440 */ lw $v0, 0x440($s2) -/* 1849D8 802560F8 46005000 */ add.s $f0, $f10, $f0 -/* 1849DC 802560FC 8C42000C */ lw $v0, 0xc($v0) -/* 1849E0 80256100 E4400008 */ swc1 $f0, 8($v0) -/* 1849E4 80256104 8E420008 */ lw $v0, 8($s2) -/* 1849E8 80256108 82430195 */ lb $v1, 0x195($s2) -/* 1849EC 8025610C 80420025 */ lb $v0, 0x25($v0) -/* 1849F0 80256110 C6420188 */ lwc1 $f2, 0x188($s2) -/* 1849F4 80256114 00431021 */ addu $v0, $v0, $v1 -/* 1849F8 80256118 44820000 */ mtc1 $v0, $f0 -/* 1849FC 8025611C 00000000 */ nop -/* 184A00 80256120 46800020 */ cvt.s.w $f0, $f0 -/* 184A04 80256124 46020002 */ mul.s $f0, $f0, $f2 -/* 184A08 80256128 00000000 */ nop -/* 184A0C 8025612C 8E420440 */ lw $v0, 0x440($s2) -/* 184A10 80256130 4600F000 */ add.s $f0, $f30, $f0 -/* 184A14 80256134 8C42000C */ lw $v0, 0xc($v0) -/* 184A18 80256138 E440000C */ swc1 $f0, 0xc($v0) -/* 184A1C 8025613C 44840000 */ mtc1 $a0, $f0 -/* 184A20 80256140 00000000 */ nop -/* 184A24 80256144 46800020 */ cvt.s.w $f0, $f0 -/* 184A28 80256148 46002100 */ add.s $f4, $f4, $f0 -/* 184A2C 8025614C 8E420440 */ lw $v0, 0x440($s2) -/* 184A30 80256150 E7A40368 */ swc1 $f4, 0x368($sp) -/* 184A34 80256154 8C42000C */ lw $v0, 0xc($v0) -/* 184A38 80256158 E4440010 */ swc1 $f4, 0x10($v0) -/* 184A3C 8025615C 3C02800E */ lui $v0, %hi(gBattleStatus) -/* 184A40 80256160 8C42C070 */ lw $v0, %lo(gBattleStatus)($v0) -/* 184A44 80256164 30420004 */ andi $v0, $v0, 4 -/* 184A48 80256168 1440001C */ bnez $v0, .L802561DC -/* 184A4C 8025616C 3C030800 */ lui $v1, 0x800 -/* 184A50 80256170 8E420000 */ lw $v0, ($s2) -/* 184A54 80256174 00431024 */ and $v0, $v0, $v1 -/* 184A58 80256178 10400018 */ beqz $v0, .L802561DC -/* 184A5C 8025617C 00000000 */ nop -/* 184A60 80256180 8242021D */ lb $v0, 0x21d($s2) -/* 184A64 80256184 9244021D */ lbu $a0, 0x21d($s2) -/* 184A68 80256188 10400008 */ beqz $v0, .L802561AC -/* 184A6C 8025618C 2482FFFF */ addiu $v0, $a0, -1 -/* 184A70 80256190 8E430440 */ lw $v1, 0x440($s2) -/* 184A74 80256194 3C01C47A */ lui $at, 0xc47a -/* 184A78 80256198 44810000 */ mtc1 $at, $f0 -/* 184A7C 8025619C A242021D */ sb $v0, 0x21d($s2) -/* 184A80 802561A0 8C62000C */ lw $v0, 0xc($v1) -/* 184A84 802561A4 0809587E */ j .L802561F8 -/* 184A88 802561A8 E440000C */ swc1 $f0, 0xc($v0) -.L802561AC: -/* 184A8C 802561AC C6400188 */ lwc1 $f0, 0x188($s2) -/* 184A90 802561B0 3C013FE8 */ lui $at, 0x3fe8 -/* 184A94 802561B4 44811800 */ mtc1 $at, $f3 -/* 184A98 802561B8 44801000 */ mtc1 $zero, $f2 -/* 184A9C 802561BC 46000021 */ cvt.d.s $f0, $f0 -/* 184AA0 802561C0 46220002 */ mul.d $f0, $f0, $f2 -/* 184AA4 802561C4 00000000 */ nop -/* 184AA8 802561C8 8E420440 */ lw $v0, 0x440($s2) -/* 184AAC 802561CC 8C42000C */ lw $v0, 0xc($v0) -/* 184AB0 802561D0 46200020 */ cvt.s.d $f0, $f0 -/* 184AB4 802561D4 0809587E */ j .L802561F8 -/* 184AB8 802561D8 E4400034 */ swc1 $f0, 0x34($v0) -.L802561DC: -/* 184ABC 802561DC 8E420440 */ lw $v0, 0x440($s2) -/* 184AC0 802561E0 3C01C47A */ lui $at, 0xc47a -/* 184AC4 802561E4 44810000 */ mtc1 $at, $f0 -/* 184AC8 802561E8 8C42000C */ lw $v0, 0xc($v0) -/* 184ACC 802561EC E440000C */ swc1 $f0, 0xc($v0) -/* 184AD0 802561F0 2402000A */ addiu $v0, $zero, 0xa -/* 184AD4 802561F4 A242021D */ sb $v0, 0x21d($s2) -.L802561F8: -/* 184AD8 802561F8 82430210 */ lb $v1, 0x210($s2) -/* 184ADC 802561FC 24020007 */ addiu $v0, $zero, 7 -/* 184AE0 80256200 1462002C */ bne $v1, $v0, .L802562B4 -/* 184AE4 80256204 00000000 */ nop -/* 184AE8 80256208 8E440228 */ lw $a0, 0x228($s2) -/* 184AEC 8025620C 10800030 */ beqz $a0, .L802562D0 -/* 184AF0 80256210 00000000 */ nop -/* 184AF4 80256214 3C03800E */ lui $v1, %hi(gBattleStatus) -/* 184AF8 80256218 8C63C070 */ lw $v1, %lo(gBattleStatus)($v1) -/* 184AFC 8025621C 30620008 */ andi $v0, $v1, 8 -/* 184B00 80256220 14400007 */ bnez $v0, .L80256240 -/* 184B04 80256224 30620004 */ andi $v0, $v1, 4 -/* 184B08 80256228 14400019 */ bnez $v0, .L80256290 -/* 184B0C 8025622C 3C030800 */ lui $v1, 0x800 -/* 184B10 80256230 8E420000 */ lw $v0, ($s2) -/* 184B14 80256234 00431024 */ and $v0, $v0, $v1 -/* 184B18 80256238 10400015 */ beqz $v0, .L80256290 -/* 184B1C 8025623C 00000000 */ nop -.L80256240: -/* 184B20 80256240 8C82000C */ lw $v0, 0xc($a0) -/* 184B24 80256244 C7AA0364 */ lwc1 $f10, 0x364($sp) -/* 184B28 80256248 E44A0004 */ swc1 $f10, 4($v0) -/* 184B2C 8025624C 8C82000C */ lw $v0, 0xc($a0) -/* 184B30 80256250 E45E0008 */ swc1 $f30, 8($v0) -/* 184B34 80256254 8C82000C */ lw $v0, 0xc($a0) -/* 184B38 80256258 C7AA0368 */ lwc1 $f10, 0x368($sp) -/* 184B3C 8025625C E44A000C */ swc1 $f10, 0xc($v0) -/* 184B40 80256260 92420191 */ lbu $v0, 0x191($s2) -/* 184B44 80256264 3C014038 */ lui $at, 0x4038 -/* 184B48 80256268 44811800 */ mtc1 $at, $f3 -/* 184B4C 8025626C 44801000 */ mtc1 $zero, $f2 -/* 184B50 80256270 44820000 */ mtc1 $v0, $f0 -/* 184B54 80256274 00000000 */ nop -/* 184B58 80256278 46800021 */ cvt.d.w $f0, $f0 -/* 184B5C 8025627C 46220003 */ div.d $f0, $f0, $f2 -/* 184B60 80256280 8C82000C */ lw $v0, 0xc($a0) -/* 184B64 80256284 46200020 */ cvt.s.d $f0, $f0 -/* 184B68 80256288 080958B4 */ j .L802562D0 -/* 184B6C 8025628C E4400020 */ swc1 $f0, 0x20($v0) -.L80256290: -/* 184B70 80256290 8C82000C */ lw $v0, 0xc($a0) -/* 184B74 80256294 3C01C47A */ lui $at, 0xc47a -/* 184B78 80256298 44810000 */ mtc1 $at, $f0 -/* 184B7C 8025629C AC400004 */ sw $zero, 4($v0) -/* 184B80 802562A0 8C82000C */ lw $v0, 0xc($a0) -/* 184B84 802562A4 E4400008 */ swc1 $f0, 8($v0) -/* 184B88 802562A8 8C82000C */ lw $v0, 0xc($a0) -/* 184B8C 802562AC 080958B4 */ j .L802562D0 -/* 184B90 802562B0 AC40000C */ sw $zero, 0xc($v0) -.L802562B4: -/* 184B94 802562B4 8E440228 */ lw $a0, 0x228($s2) -/* 184B98 802562B8 10800005 */ beqz $a0, .L802562D0 -/* 184B9C 802562BC 00000000 */ nop -/* 184BA0 802562C0 8C820000 */ lw $v0, ($a0) -/* 184BA4 802562C4 34420010 */ ori $v0, $v0, 0x10 -/* 184BA8 802562C8 AC820000 */ sw $v0, ($a0) -/* 184BAC 802562CC AE400228 */ sw $zero, 0x228($s2) -.L802562D0: -/* 184BB0 802562D0 8E420008 */ lw $v0, 8($s2) -/* 184BB4 802562D4 82430194 */ lb $v1, 0x194($s2) -/* 184BB8 802562D8 80420024 */ lb $v0, 0x24($v0) -/* 184BBC 802562DC C6420188 */ lwc1 $f2, 0x188($s2) -/* 184BC0 802562E0 00431021 */ addu $v0, $v0, $v1 -/* 184BC4 802562E4 44820000 */ mtc1 $v0, $f0 -/* 184BC8 802562E8 00000000 */ nop -/* 184BCC 802562EC 46800020 */ cvt.s.w $f0, $f0 -/* 184BD0 802562F0 46020002 */ mul.s $f0, $f0, $f2 -/* 184BD4 802562F4 00000000 */ nop -/* 184BD8 802562F8 86440436 */ lh $a0, 0x436($s2) -/* 184BDC 802562FC 4600028D */ trunc.w.s $f10, $f0 -/* 184BE0 80256300 E7AA0010 */ swc1 $f10, 0x10($sp) -/* 184BE4 80256304 8E420008 */ lw $v0, 8($s2) -/* 184BE8 80256308 82430195 */ lb $v1, 0x195($s2) -/* 184BEC 8025630C 80420025 */ lb $v0, 0x25($v0) -/* 184BF0 80256310 C6420188 */ lwc1 $f2, 0x188($s2) -/* 184BF4 80256314 00431021 */ addu $v0, $v0, $v1 -/* 184BF8 80256318 44820000 */ mtc1 $v0, $f0 -/* 184BFC 8025631C 00000000 */ nop -/* 184C00 80256320 46800020 */ cvt.s.w $f0, $f0 -/* 184C04 80256324 46020002 */ mul.s $f0, $f0, $f2 -/* 184C08 80256328 00000000 */ nop -/* 184C0C 8025632C 4600028D */ trunc.w.s $f10, $f0 -/* 184C10 80256330 E7AA0014 */ swc1 $f10, 0x14($sp) -/* 184C14 80256334 8E420008 */ lw $v0, 8($s2) -/* 184C18 80256338 82430196 */ lb $v1, 0x196($s2) -/* 184C1C 8025633C 80420026 */ lb $v0, 0x26($v0) -/* 184C20 80256340 C6420188 */ lwc1 $f2, 0x188($s2) -/* 184C24 80256344 00431021 */ addu $v0, $v0, $v1 -/* 184C28 80256348 44820000 */ mtc1 $v0, $f0 -/* 184C2C 8025634C 00000000 */ nop -/* 184C30 80256350 46800020 */ cvt.s.w $f0, $f0 -/* 184C34 80256354 46020002 */ mul.s $f0, $f0, $f2 -/* 184C38 80256358 00000000 */ nop -/* 184C3C 8025635C 4600028D */ trunc.w.s $f10, $f0 -/* 184C40 80256360 E7AA0018 */ swc1 $f10, 0x18($sp) -/* 184C44 80256364 8E420008 */ lw $v0, 8($s2) -/* 184C48 80256368 82430197 */ lb $v1, 0x197($s2) -/* 184C4C 8025636C 80420027 */ lb $v0, 0x27($v0) -/* 184C50 80256370 C6420188 */ lwc1 $f2, 0x188($s2) -/* 184C54 80256374 00431021 */ addu $v0, $v0, $v1 -/* 184C58 80256378 44820000 */ mtc1 $v0, $f0 -/* 184C5C 8025637C 00000000 */ nop -/* 184C60 80256380 46800020 */ cvt.s.w $f0, $f0 -/* 184C64 80256384 46020002 */ mul.s $f0, $f0, $f2 -/* 184C68 80256388 00000000 */ nop -/* 184C6C 8025638C 8FA50364 */ lw $a1, 0x364($sp) -/* 184C70 80256390 4406F000 */ mfc1 $a2, $f30 -/* 184C74 80256394 8FA70368 */ lw $a3, 0x368($sp) -/* 184C78 80256398 4600028D */ trunc.w.s $f10, $f0 -/* 184C7C 8025639C 0C011DE3 */ jal set_status_icons_properties -/* 184C80 802563A0 E7AA001C */ swc1 $f10, 0x1c($sp) -/* 184C84 802563A4 8E420000 */ lw $v0, ($s2) -/* 184C88 802563A8 30420800 */ andi $v0, $v0, 0x800 -/* 184C8C 802563AC 14400010 */ bnez $v0, .L802563F0 -/* 184C90 802563B0 00000000 */ nop -/* 184C94 802563B4 92420191 */ lbu $v0, 0x191($s2) -/* 184C98 802563B8 080958FF */ j .L802563FC -/* 184C9C 802563BC C6440188 */ lwc1 $f4, 0x188($s2) -.L802563C0: -/* 184CA0 802563C0 C6400188 */ lwc1 $f0, 0x188($s2) -/* 184CA4 802563C4 3C01802A */ lui $at, %hi(D_8029D368) -/* 184CA8 802563C8 D422D368 */ ldc1 $f2, %lo(D_8029D368)($at) -/* 184CAC 802563CC 46000021 */ cvt.d.s $f0, $f0 -/* 184CB0 802563D0 46201081 */ sub.d $f2, $f2, $f0 -/* 184CB4 802563D4 3C014018 */ lui $at, 0x4018 -/* 184CB8 802563D8 44812800 */ mtc1 $at, $f5 -/* 184CBC 802563DC 44802000 */ mtc1 $zero, $f4 -/* 184CC0 802563E0 00000000 */ nop -/* 184CC4 802563E4 46241083 */ div.d $f2, $f2, $f4 -/* 184CC8 802563E8 08095921 */ j .L80256484 -/* 184CCC 802563EC 46220000 */ add.d $f0, $f0, $f2 -.L802563F0: -/* 184CD0 802563F0 92420191 */ lbu $v0, 0x191($s2) -/* 184CD4 802563F4 C6440188 */ lwc1 $f4, 0x188($s2) -/* 184CD8 802563F8 00021023 */ negu $v0, $v0 -.L802563FC: -/* 184CDC 802563FC 44821000 */ mtc1 $v0, $f2 -/* 184CE0 80256400 00000000 */ nop -/* 184CE4 80256404 468010A0 */ cvt.s.w $f2, $f2 -/* 184CE8 80256408 46041082 */ mul.s $f2, $f2, $f4 -/* 184CEC 8025640C 00000000 */ nop -/* 184CF0 80256410 92420190 */ lbu $v0, 0x190($s2) -/* 184CF4 80256414 44820000 */ mtc1 $v0, $f0 -/* 184CF8 80256418 00000000 */ nop -/* 184CFC 8025641C 46800020 */ cvt.s.w $f0, $f0 -/* 184D00 80256420 46040002 */ mul.s $f0, $f0, $f4 -/* 184D04 80256424 00000000 */ nop -/* 184D08 80256428 86440436 */ lh $a0, 0x436($s2) -/* 184D0C 8025642C 4600128D */ trunc.w.s $f10, $f2 -/* 184D10 80256430 44055000 */ mfc1 $a1, $f10 -/* 184D14 80256434 4600028D */ trunc.w.s $f10, $f0 -/* 184D18 80256438 44065000 */ mfc1 $a2, $f10 -/* 184D1C 8025643C 0C011DFD */ jal set_status_icons_offset -/* 184D20 80256440 00000000 */ nop -/* 184D24 80256444 82430210 */ lb $v1, 0x210($s2) -/* 184D28 80256448 2402000A */ addiu $v0, $zero, 0xa -/* 184D2C 8025644C 1062FFDC */ beq $v1, $v0, .L802563C0 -/* 184D30 80256450 00000000 */ nop -/* 184D34 80256454 C6400188 */ lwc1 $f0, 0x188($s2) -/* 184D38 80256458 3C013FF0 */ lui $at, 0x3ff0 -/* 184D3C 8025645C 44812800 */ mtc1 $at, $f5 -/* 184D40 80256460 44802000 */ mtc1 $zero, $f4 -/* 184D44 80256464 46000021 */ cvt.d.s $f0, $f0 -/* 184D48 80256468 46202101 */ sub.d $f4, $f4, $f0 -/* 184D4C 8025646C 3C014018 */ lui $at, 0x4018 -/* 184D50 80256470 44811800 */ mtc1 $at, $f3 -/* 184D54 80256474 44801000 */ mtc1 $zero, $f2 -/* 184D58 80256478 00000000 */ nop -/* 184D5C 8025647C 46222103 */ div.d $f4, $f4, $f2 -/* 184D60 80256480 46240000 */ add.d $f0, $f0, $f4 -.L80256484: -/* 184D64 80256484 46200020 */ cvt.s.d $f0, $f0 -/* 184D68 80256488 E6400188 */ swc1 $f0, 0x188($s2) -/* 184D6C 8025648C 8E420000 */ lw $v0, ($s2) -/* 184D70 80256490 30420800 */ andi $v0, $v0, 0x800 -/* 184D74 80256494 14400025 */ bnez $v0, .L8025652C -/* 184D78 80256498 00000000 */ nop -/* 184D7C 8025649C 86420168 */ lh $v0, 0x168($s2) -/* 184D80 802564A0 C6420188 */ lwc1 $f2, 0x188($s2) -/* 184D84 802564A4 00021023 */ negu $v0, $v0 -/* 184D88 802564A8 44820000 */ mtc1 $v0, $f0 -/* 184D8C 802564AC 00000000 */ nop -/* 184D90 802564B0 46800020 */ cvt.s.w $f0, $f0 -/* 184D94 802564B4 46020002 */ mul.s $f0, $f0, $f2 -/* 184D98 802564B8 00000000 */ nop -/* 184D9C 802564BC 8642016A */ lh $v0, 0x16a($s2) -/* 184DA0 802564C0 00021023 */ negu $v0, $v0 -/* 184DA4 802564C4 44050000 */ mfc1 $a1, $f0 -/* 184DA8 802564C8 44820000 */ mtc1 $v0, $f0 -/* 184DAC 802564CC 00000000 */ nop -/* 184DB0 802564D0 46800020 */ cvt.s.w $f0, $f0 -/* 184DB4 802564D4 46020002 */ mul.s $f0, $f0, $f2 -/* 184DB8 802564D8 00000000 */ nop -/* 184DBC 802564DC 8642016C */ lh $v0, 0x16c($s2) -/* 184DC0 802564E0 00021023 */ negu $v0, $v0 -/* 184DC4 802564E4 44060000 */ mfc1 $a2, $f0 -/* 184DC8 802564E8 44820000 */ mtc1 $v0, $f0 -/* 184DCC 802564EC 00000000 */ nop -/* 184DD0 802564F0 46800020 */ cvt.s.w $f0, $f0 -/* 184DD4 802564F4 46020002 */ mul.s $f0, $f0, $f2 -/* 184DD8 802564F8 00000000 */ nop -/* 184DDC 802564FC 44070000 */ mfc1 $a3, $f0 -/* 184DE0 80256500 0C019E40 */ jal guTranslateF -/* 184DE4 80256504 27A401A0 */ addiu $a0, $sp, 0x1a0 -/* 184DE8 80256508 86420168 */ lh $v0, 0x168($s2) -/* 184DEC 8025650C C6420188 */ lwc1 $f2, 0x188($s2) -/* 184DF0 80256510 44820000 */ mtc1 $v0, $f0 -/* 184DF4 80256514 00000000 */ nop -/* 184DF8 80256518 46800020 */ cvt.s.w $f0, $f0 -/* 184DFC 8025651C 46020002 */ mul.s $f0, $f0, $f2 -/* 184E00 80256520 00000000 */ nop -/* 184E04 80256524 0809596E */ j .L802565B8 -/* 184E08 80256528 8642016A */ lh $v0, 0x16a($s2) -.L8025652C: -/* 184E0C 8025652C 86420168 */ lh $v0, 0x168($s2) -/* 184E10 80256530 C6420188 */ lwc1 $f2, 0x188($s2) -/* 184E14 80256534 00021023 */ negu $v0, $v0 -/* 184E18 80256538 44820000 */ mtc1 $v0, $f0 -/* 184E1C 8025653C 00000000 */ nop -/* 184E20 80256540 46800020 */ cvt.s.w $f0, $f0 -/* 184E24 80256544 46020002 */ mul.s $f0, $f0, $f2 -/* 184E28 80256548 00000000 */ nop -/* 184E2C 8025654C 8642016A */ lh $v0, 0x16a($s2) -/* 184E30 80256550 44050000 */ mfc1 $a1, $f0 -/* 184E34 80256554 44820000 */ mtc1 $v0, $f0 -/* 184E38 80256558 00000000 */ nop -/* 184E3C 8025655C 46800020 */ cvt.s.w $f0, $f0 -/* 184E40 80256560 46020002 */ mul.s $f0, $f0, $f2 -/* 184E44 80256564 00000000 */ nop -/* 184E48 80256568 8642016C */ lh $v0, 0x16c($s2) -/* 184E4C 8025656C 00021023 */ negu $v0, $v0 -/* 184E50 80256570 44060000 */ mfc1 $a2, $f0 -/* 184E54 80256574 44820000 */ mtc1 $v0, $f0 -/* 184E58 80256578 00000000 */ nop -/* 184E5C 8025657C 46800020 */ cvt.s.w $f0, $f0 -/* 184E60 80256580 46020002 */ mul.s $f0, $f0, $f2 -/* 184E64 80256584 00000000 */ nop -/* 184E68 80256588 44070000 */ mfc1 $a3, $f0 -/* 184E6C 8025658C 0C019E40 */ jal guTranslateF -/* 184E70 80256590 27A401A0 */ addiu $a0, $sp, 0x1a0 -/* 184E74 80256594 86420168 */ lh $v0, 0x168($s2) -/* 184E78 80256598 C6420188 */ lwc1 $f2, 0x188($s2) -/* 184E7C 8025659C 44820000 */ mtc1 $v0, $f0 -/* 184E80 802565A0 00000000 */ nop -/* 184E84 802565A4 46800020 */ cvt.s.w $f0, $f0 -/* 184E88 802565A8 46020002 */ mul.s $f0, $f0, $f2 -/* 184E8C 802565AC 00000000 */ nop -/* 184E90 802565B0 8642016A */ lh $v0, 0x16a($s2) -/* 184E94 802565B4 00021023 */ negu $v0, $v0 -.L802565B8: -/* 184E98 802565B8 44050000 */ mfc1 $a1, $f0 -/* 184E9C 802565BC 44820000 */ mtc1 $v0, $f0 -/* 184EA0 802565C0 00000000 */ nop -/* 184EA4 802565C4 46800020 */ cvt.s.w $f0, $f0 -/* 184EA8 802565C8 46020002 */ mul.s $f0, $f0, $f2 -/* 184EAC 802565CC 00000000 */ nop -/* 184EB0 802565D0 8642016C */ lh $v0, 0x16c($s2) -/* 184EB4 802565D4 44060000 */ mfc1 $a2, $f0 -/* 184EB8 802565D8 44820000 */ mtc1 $v0, $f0 -/* 184EBC 802565DC 00000000 */ nop -/* 184EC0 802565E0 46800020 */ cvt.s.w $f0, $f0 -/* 184EC4 802565E4 46020002 */ mul.s $f0, $f0, $f2 -/* 184EC8 802565E8 00000000 */ nop -/* 184ECC 802565EC 44070000 */ mfc1 $a3, $f0 -/* 184ED0 802565F0 0C019E40 */ jal guTranslateF -/* 184ED4 802565F4 27A401E0 */ addiu $a0, $sp, 0x1e0 -/* 184ED8 802565F8 4480A000 */ mtc1 $zero, $f20 -/* 184EDC 802565FC 3C013F80 */ lui $at, 0x3f80 -/* 184EE0 80256600 4481B000 */ mtc1 $at, $f22 -/* 184EE4 80256604 E7B40010 */ swc1 $f20, 0x10($sp) -/* 184EE8 80256608 8E45015C */ lw $a1, 0x15c($s2) -/* 184EEC 8025660C 4406B000 */ mfc1 $a2, $f22 -/* 184EF0 80256610 4407A000 */ mfc1 $a3, $f20 -/* 184EF4 80256614 0C019EC8 */ jal guRotateF -/* 184EF8 80256618 27A40020 */ addiu $a0, $sp, 0x20 -/* 184EFC 8025661C 27B50060 */ addiu $s5, $sp, 0x60 -/* 184F00 80256620 E7B40010 */ swc1 $f20, 0x10($sp) -/* 184F04 80256624 8E450160 */ lw $a1, 0x160($s2) -/* 184F08 80256628 4406A000 */ mfc1 $a2, $f20 -/* 184F0C 8025662C 4407B000 */ mfc1 $a3, $f22 -/* 184F10 80256630 0C019EC8 */ jal guRotateF -/* 184F14 80256634 02A0202D */ daddu $a0, $s5, $zero -/* 184F18 80256638 27B000A0 */ addiu $s0, $sp, 0xa0 -/* 184F1C 8025663C E7B60010 */ swc1 $f22, 0x10($sp) -/* 184F20 80256640 8E450164 */ lw $a1, 0x164($s2) -/* 184F24 80256644 4406A000 */ mfc1 $a2, $f20 -/* 184F28 80256648 4407A000 */ mfc1 $a3, $f20 -/* 184F2C 8025664C 0C019EC8 */ jal guRotateF -/* 184F30 80256650 0200202D */ daddu $a0, $s0, $zero -/* 184F34 80256654 02A0202D */ daddu $a0, $s5, $zero -/* 184F38 80256658 27A50020 */ addiu $a1, $sp, 0x20 -/* 184F3C 8025665C 27B30260 */ addiu $s3, $sp, 0x260 -/* 184F40 80256660 0C019D80 */ jal guMtxCatF -/* 184F44 80256664 0260302D */ daddu $a2, $s3, $zero -/* 184F48 80256668 0260202D */ daddu $a0, $s3, $zero -/* 184F4C 8025666C 0200282D */ daddu $a1, $s0, $zero -/* 184F50 80256670 27B400E0 */ addiu $s4, $sp, 0xe0 -/* 184F54 80256674 0C019D80 */ jal guMtxCatF -/* 184F58 80256678 0280302D */ daddu $a2, $s4, $zero -/* 184F5C 8025667C C6440170 */ lwc1 $f4, 0x170($s2) -/* 184F60 80256680 3C01802A */ lui $at, %hi(D_8029D370) -/* 184F64 80256684 D428D370 */ ldc1 $f8, %lo(D_8029D370)($at) -/* 184F68 80256688 46002121 */ cvt.d.s $f4, $f4 -/* 184F6C 8025668C 46282102 */ mul.d $f4, $f4, $f8 -/* 184F70 80256690 00000000 */ nop -/* 184F74 80256694 C6400174 */ lwc1 $f0, 0x174($s2) -/* 184F78 80256698 46000021 */ cvt.d.s $f0, $f0 -/* 184F7C 8025669C 46280002 */ mul.d $f0, $f0, $f8 -/* 184F80 802566A0 00000000 */ nop -/* 184F84 802566A4 C6420178 */ lwc1 $f2, 0x178($s2) -/* 184F88 802566A8 460010A1 */ cvt.d.s $f2, $f2 -/* 184F8C 802566AC 46281082 */ mul.d $f2, $f2, $f8 -/* 184F90 802566B0 00000000 */ nop -/* 184F94 802566B4 C6460188 */ lwc1 $f6, 0x188($s2) -/* 184F98 802566B8 460031A1 */ cvt.d.s $f6, $f6 -/* 184F9C 802566BC 46262102 */ mul.d $f4, $f4, $f6 -/* 184FA0 802566C0 00000000 */ nop -/* 184FA4 802566C4 46260002 */ mul.d $f0, $f0, $f6 -/* 184FA8 802566C8 00000000 */ nop -/* 184FAC 802566CC 27B00120 */ addiu $s0, $sp, 0x120 -/* 184FB0 802566D0 462010A0 */ cvt.s.d $f2, $f2 -/* 184FB4 802566D4 44071000 */ mfc1 $a3, $f2 -/* 184FB8 802566D8 46202120 */ cvt.s.d $f4, $f4 -/* 184FBC 802566DC 46200020 */ cvt.s.d $f0, $f0 -/* 184FC0 802566E0 44052000 */ mfc1 $a1, $f4 -/* 184FC4 802566E4 44060000 */ mfc1 $a2, $f0 -/* 184FC8 802566E8 0C019DF0 */ jal guScaleF -/* 184FCC 802566EC 0200202D */ daddu $a0, $s0, $zero -/* 184FD0 802566F0 27B10160 */ addiu $s1, $sp, 0x160 -/* 184FD4 802566F4 8E45017C */ lw $a1, 0x17c($s2) -/* 184FD8 802566F8 8E460180 */ lw $a2, 0x180($s2) -/* 184FDC 802566FC 8E470184 */ lw $a3, 0x184($s2) -/* 184FE0 80256700 0C019DF0 */ jal guScaleF -/* 184FE4 80256704 0220202D */ daddu $a0, $s1, $zero -/* 184FE8 80256708 27A401A0 */ addiu $a0, $sp, 0x1a0 -/* 184FEC 8025670C 0200282D */ daddu $a1, $s0, $zero -/* 184FF0 80256710 0C019D80 */ jal guMtxCatF -/* 184FF4 80256714 0260302D */ daddu $a2, $s3, $zero -/* 184FF8 80256718 0260202D */ daddu $a0, $s3, $zero -/* 184FFC 8025671C 0220282D */ daddu $a1, $s1, $zero -/* 185000 80256720 0C019D80 */ jal guMtxCatF -/* 185004 80256724 0200302D */ daddu $a2, $s0, $zero -/* 185008 80256728 0200202D */ daddu $a0, $s0, $zero -/* 18500C 8025672C 0280282D */ daddu $a1, $s4, $zero -/* 185010 80256730 27B002E0 */ addiu $s0, $sp, 0x2e0 -/* 185014 80256734 0C019D80 */ jal guMtxCatF -/* 185018 80256738 0200302D */ daddu $a2, $s0, $zero -/* 18501C 8025673C 0200202D */ daddu $a0, $s0, $zero -/* 185020 80256740 27A501E0 */ addiu $a1, $sp, 0x1e0 -/* 185024 80256744 0C019D80 */ jal guMtxCatF -/* 185028 80256748 27A602A0 */ addiu $a2, $sp, 0x2a0 -/* 18502C 8025674C 824801F3 */ lb $t0, 0x1f3($s2) -/* 185030 80256750 AFA80360 */ sw $t0, 0x360($sp) -/* 185034 80256754 8E5101F4 */ lw $s1, 0x1f4($s2) -/* 185038 80256758 19000293 */ blez $t0, .L802571A8 -/* 18503C 8025675C 0000B82D */ daddu $s7, $zero, $zero -/* 185040 80256760 4600A706 */ mov.s $f28, $f20 -/* 185044 80256764 0260B02D */ daddu $s6, $s3, $zero -/* 185048 80256768 AFB5036C */ sw $s5, 0x36c($sp) -/* 18504C 8025676C 0200A82D */ daddu $s5, $s0, $zero -/* 185050 80256770 AFB40370 */ sw $s4, 0x370($sp) -.L80256774: -/* 185054 80256774 8E220000 */ lw $v0, ($s1) -/* 185058 80256778 3C030010 */ lui $v1, 0x10 -/* 18505C 8025677C 00431024 */ and $v0, $v0, $v1 -/* 185060 80256780 14400033 */ bnez $v0, .L80256850 -/* 185064 80256784 27A40320 */ addiu $a0, $sp, 0x320 -/* 185068 80256788 86220014 */ lh $v0, 0x14($s1) -/* 18506C 8025678C C7AA0364 */ lwc1 $f10, 0x364($sp) -/* 185070 80256790 44820000 */ mtc1 $v0, $f0 -/* 185074 80256794 00000000 */ nop -/* 185078 80256798 46800020 */ cvt.s.w $f0, $f0 -/* 18507C 8025679C 8622001A */ lh $v0, 0x1a($s1) -/* 185080 802567A0 46005000 */ add.s $f0, $f10, $f0 -/* 185084 802567A4 44821000 */ mtc1 $v0, $f2 -/* 185088 802567A8 00000000 */ nop -/* 18508C 802567AC 468010A0 */ cvt.s.w $f2, $f2 -/* 185090 802567B0 8E420000 */ lw $v0, ($s2) -/* 185094 802567B4 30420800 */ andi $v0, $v0, 0x800 -/* 185098 802567B8 1440000C */ bnez $v0, .L802567EC -/* 18509C 802567BC 46020680 */ add.s $f26, $f0, $f2 -/* 1850A0 802567C0 86220016 */ lh $v0, 0x16($s1) -/* 1850A4 802567C4 44821000 */ mtc1 $v0, $f2 -/* 1850A8 802567C8 00000000 */ nop -/* 1850AC 802567CC 468010A0 */ cvt.s.w $f2, $f2 -/* 1850B0 802567D0 8622001C */ lh $v0, 0x1c($s1) -/* 1850B4 802567D4 4602F080 */ add.s $f2, $f30, $f2 -/* 1850B8 802567D8 44820000 */ mtc1 $v0, $f0 -/* 1850BC 802567DC 00000000 */ nop -/* 1850C0 802567E0 46800020 */ cvt.s.w $f0, $f0 -/* 1850C4 802567E4 08095A05 */ j .L80256814 -/* 1850C8 802567E8 46001500 */ add.s $f20, $f2, $f0 -.L802567EC: -/* 1850CC 802567EC 86220016 */ lh $v0, 0x16($s1) -/* 1850D0 802567F0 44821000 */ mtc1 $v0, $f2 -/* 1850D4 802567F4 00000000 */ nop -/* 1850D8 802567F8 468010A0 */ cvt.s.w $f2, $f2 -/* 1850DC 802567FC 8622001C */ lh $v0, 0x1c($s1) -/* 1850E0 80256800 4602F081 */ sub.s $f2, $f30, $f2 -/* 1850E4 80256804 44820000 */ mtc1 $v0, $f0 -/* 1850E8 80256808 00000000 */ nop -/* 1850EC 8025680C 46800020 */ cvt.s.w $f0, $f0 -/* 1850F0 80256810 46001501 */ sub.s $f20, $f2, $f0 -.L80256814: -/* 1850F4 80256814 C640018C */ lwc1 $f0, 0x18c($s2) -/* 1850F8 80256818 86220018 */ lh $v0, 0x18($s1) -/* 1850FC 8025681C C7AA0368 */ lwc1 $f10, 0x368($sp) -/* 185100 80256820 46000606 */ mov.s $f24, $f0 -/* 185104 80256824 44821000 */ mtc1 $v0, $f2 -/* 185108 80256828 00000000 */ nop -/* 18510C 8025682C 468010A0 */ cvt.s.w $f2, $f2 -/* 185110 80256830 8622001E */ lh $v0, 0x1e($s1) -/* 185114 80256834 46025080 */ add.s $f2, $f10, $f2 -/* 185118 80256838 E6380064 */ swc1 $f24, 0x64($s1) -/* 18511C 8025683C 44820000 */ mtc1 $v0, $f0 -/* 185120 80256840 00000000 */ nop -/* 185124 80256844 46800020 */ cvt.s.w $f0, $f0 -/* 185128 80256848 08095A3C */ j .L802568F0 -/* 18512C 8025684C 46001580 */ add.s $f22, $f2, $f0 -.L80256850: -/* 185130 80256850 C6480170 */ lwc1 $f8, 0x170($s2) -/* 185134 80256854 3C01802A */ lui $at, %hi(D_8029D378) -/* 185138 80256858 D420D378 */ ldc1 $f0, %lo(D_8029D378)($at) -/* 18513C 8025685C 46004221 */ cvt.d.s $f8, $f8 -/* 185140 80256860 46204202 */ mul.d $f8, $f8, $f0 -/* 185144 80256864 00000000 */ nop -/* 185148 80256868 C6460174 */ lwc1 $f6, 0x174($s2) -/* 18514C 8025686C 460031A1 */ cvt.d.s $f6, $f6 -/* 185150 80256870 46203182 */ mul.d $f6, $f6, $f0 -/* 185154 80256874 00000000 */ nop -/* 185158 80256878 C6420178 */ lwc1 $f2, 0x178($s2) -/* 18515C 8025687C 460010A1 */ cvt.d.s $f2, $f2 -/* 185160 80256880 46201082 */ mul.d $f2, $f2, $f0 -/* 185164 80256884 00000000 */ nop -/* 185168 80256888 8622001A */ lh $v0, 0x1a($s1) -/* 18516C 8025688C C624002C */ lwc1 $f4, 0x2c($s1) -/* 185170 80256890 44820000 */ mtc1 $v0, $f0 -/* 185174 80256894 00000000 */ nop -/* 185178 80256898 46800020 */ cvt.s.w $f0, $f0 -/* 18517C 8025689C 46002680 */ add.s $f26, $f4, $f0 -/* 185180 802568A0 8622001C */ lh $v0, 0x1c($s1) -/* 185184 802568A4 C6240030 */ lwc1 $f4, 0x30($s1) -/* 185188 802568A8 44820000 */ mtc1 $v0, $f0 -/* 18518C 802568AC 00000000 */ nop -/* 185190 802568B0 46800020 */ cvt.s.w $f0, $f0 -/* 185194 802568B4 46002500 */ add.s $f20, $f4, $f0 -/* 185198 802568B8 8622001E */ lh $v0, 0x1e($s1) -/* 18519C 802568BC C6240034 */ lwc1 $f4, 0x34($s1) -/* 1851A0 802568C0 44820000 */ mtc1 $v0, $f0 -/* 1851A4 802568C4 00000000 */ nop -/* 1851A8 802568C8 46800020 */ cvt.s.w $f0, $f0 -/* 1851AC 802568CC 46204220 */ cvt.s.d $f8, $f8 -/* 1851B0 802568D0 462031A0 */ cvt.s.d $f6, $f6 -/* 1851B4 802568D4 462010A0 */ cvt.s.d $f2, $f2 -/* 1851B8 802568D8 44054000 */ mfc1 $a1, $f8 -/* 1851BC 802568DC 44063000 */ mfc1 $a2, $f6 -/* 1851C0 802568E0 44071000 */ mfc1 $a3, $f2 -/* 1851C4 802568E4 0C019DF0 */ jal guScaleF -/* 1851C8 802568E8 46002580 */ add.s $f22, $f4, $f0 -/* 1851CC 802568EC C6380064 */ lwc1 $f24, 0x64($s1) -.L802568F0: -/* 1851D0 802568F0 8E240000 */ lw $a0, ($s1) -/* 1851D4 802568F4 E63A0058 */ swc1 $f26, 0x58($s1) -/* 1851D8 802568F8 E634005C */ swc1 $f20, 0x5c($s1) -/* 1851DC 802568FC 30820001 */ andi $v0, $a0, 1 -/* 1851E0 80256900 14400223 */ bnez $v0, .L80257190 -/* 1851E4 80256904 E6360060 */ swc1 $f22, 0x60($s1) -/* 1851E8 80256908 8E220094 */ lw $v0, 0x94($s1) -/* 1851EC 8025690C 10400220 */ beqz $v0, .L80257190 -/* 1851F0 80256910 2402000E */ addiu $v0, $zero, 0xe -/* 1851F4 80256914 82430218 */ lb $v1, 0x218($s2) -/* 1851F8 80256918 14620003 */ bne $v1, $v0, .L80256928 -/* 1851FC 8025691C 2402FEFF */ addiu $v0, $zero, -0x101 -/* 185200 80256920 08095A4B */ j .L8025692C -/* 185204 80256924 34820100 */ ori $v0, $a0, 0x100 -.L80256928: -/* 185208 80256928 00821024 */ and $v0, $a0, $v0 -.L8025692C: -/* 18520C 8025692C AE220000 */ sw $v0, ($s1) -/* 185210 80256930 0000982D */ daddu $s3, $zero, $zero -/* 185214 80256934 0260802D */ daddu $s0, $s3, $zero -/* 185218 80256938 8E3E0088 */ lw $fp, 0x88($s1) -/* 18521C 8025693C 8FA803D0 */ lw $t0, 0x3d0($sp) -/* 185220 80256940 11000027 */ beqz $t0, .L802569E0 -/* 185224 80256944 0260A02D */ daddu $s4, $s3, $zero -/* 185228 80256948 3C02800E */ lui $v0, %hi(gBattleStatus+0x4) -/* 18522C 8025694C 8C42C074 */ lw $v0, %lo(gBattleStatus+0x4)($v0) -/* 185230 80256950 24030004 */ addiu $v1, $zero, 4 -/* 185234 80256954 30420014 */ andi $v0, $v0, 0x14 -/* 185238 80256958 14430015 */ bne $v0, $v1, .L802569B0 -/* 18523C 8025695C 00000000 */ nop -/* 185240 80256960 82420216 */ lb $v0, 0x216($s2) -/* 185244 80256964 14400009 */ bnez $v0, .L8025698C -/* 185248 80256968 24050012 */ addiu $a1, $zero, 0x12 -/* 18524C 8025696C 8E240094 */ lw $a0, 0x94($s1) -/* 185250 80256970 0C09973A */ jal func_80265CE8 -/* 185254 80256974 24130001 */ addiu $s3, $zero, 1 -/* 185258 80256978 8E240084 */ lw $a0, 0x84($s1) -/* 18525C 8025697C 8E260090 */ lw $a2, 0x90($s1) -/* 185260 80256980 0040282D */ daddu $a1, $v0, $zero -/* 185264 80256984 0C0B78AB */ jal spr_update_sprite -/* 185268 80256988 AE250088 */ sw $a1, 0x88($s1) -.L8025698C: -/* 18526C 8025698C 0240202D */ daddu $a0, $s2, $zero -/* 185270 80256990 0C099B6B */ jal func_80266DAC -/* 185274 80256994 2405000C */ addiu $a1, $zero, 0xc -/* 185278 80256998 24100001 */ addiu $s0, $zero, 1 -/* 18527C 8025699C 0240202D */ daddu $a0, $s2, $zero -/* 185280 802569A0 0C099BBA */ jal func_80266EE8 -/* 185284 802569A4 0000282D */ daddu $a1, $zero, $zero -/* 185288 802569A8 0200A02D */ daddu $s4, $s0, $zero -/* 18528C 802569AC 8FA803D0 */ lw $t0, 0x3d0($sp) -.L802569B0: -/* 185290 802569B0 1100000B */ beqz $t0, .L802569E0 -/* 185294 802569B4 24020006 */ addiu $v0, $zero, 6 -/* 185298 802569B8 3C038011 */ lui $v1, %hi(gPlayerData+0x12) -/* 18529C 802569BC 8063F2A2 */ lb $v1, %lo(gPlayerData+0x12)($v1) -/* 1852A0 802569C0 14620007 */ bne $v1, $v0, .L802569E0 -/* 1852A4 802569C4 00000000 */ nop -/* 1852A8 802569C8 16000005 */ bnez $s0, .L802569E0 -/* 1852AC 802569CC 24100001 */ addiu $s0, $zero, 1 -/* 1852B0 802569D0 0240202D */ daddu $a0, $s2, $zero -/* 1852B4 802569D4 0C099B6B */ jal func_80266DAC -/* 1852B8 802569D8 24050009 */ addiu $a1, $zero, 9 -/* 1852BC 802569DC 24100001 */ addiu $s0, $zero, 1 -.L802569E0: -/* 1852C0 802569E0 82420220 */ lb $v0, 0x220($s2) -/* 1852C4 802569E4 10400007 */ beqz $v0, .L80256A04 -/* 1852C8 802569E8 00000000 */ nop -/* 1852CC 802569EC 16800005 */ bnez $s4, .L80256A04 -/* 1852D0 802569F0 24140001 */ addiu $s4, $zero, 1 -/* 1852D4 802569F4 0240202D */ daddu $a0, $s2, $zero -/* 1852D8 802569F8 0C099BBA */ jal func_80266EE8 -/* 1852DC 802569FC 2405000B */ addiu $a1, $zero, 0xb -/* 1852E0 80256A00 24140001 */ addiu $s4, $zero, 1 -.L80256A04: -/* 1852E4 80256A04 82430210 */ lb $v1, 0x210($s2) -/* 1852E8 80256A08 24020009 */ addiu $v0, $zero, 9 -/* 1852EC 80256A0C 14620009 */ bne $v1, $v0, .L80256A34 -/* 1852F0 80256A10 24020005 */ addiu $v0, $zero, 5 -/* 1852F4 80256A14 16000007 */ bnez $s0, .L80256A34 -/* 1852F8 80256A18 24100001 */ addiu $s0, $zero, 1 -/* 1852FC 80256A1C 0240202D */ daddu $a0, $s2, $zero -/* 185300 80256A20 0C099B6B */ jal func_80266DAC -/* 185304 80256A24 24050006 */ addiu $a1, $zero, 6 -/* 185308 80256A28 24100001 */ addiu $s0, $zero, 1 -/* 18530C 80256A2C 82430210 */ lb $v1, 0x210($s2) -/* 185310 80256A30 24020005 */ addiu $v0, $zero, 5 -.L80256A34: -/* 185314 80256A34 14620007 */ bne $v1, $v0, .L80256A54 -/* 185318 80256A38 00000000 */ nop -/* 18531C 80256A3C 16000005 */ bnez $s0, .L80256A54 -/* 185320 80256A40 24100001 */ addiu $s0, $zero, 1 -/* 185324 80256A44 0240202D */ daddu $a0, $s2, $zero -/* 185328 80256A48 0C099B6B */ jal func_80266DAC -/* 18532C 80256A4C 24050007 */ addiu $a1, $zero, 7 -/* 185330 80256A50 24100001 */ addiu $s0, $zero, 1 -.L80256A54: -/* 185334 80256A54 82430210 */ lb $v1, 0x210($s2) -/* 185338 80256A58 24020003 */ addiu $v0, $zero, 3 -/* 18533C 80256A5C 14620007 */ bne $v1, $v0, .L80256A7C -/* 185340 80256A60 00000000 */ nop -/* 185344 80256A64 16000005 */ bnez $s0, .L80256A7C -/* 185348 80256A68 24100001 */ addiu $s0, $zero, 1 -/* 18534C 80256A6C 0240202D */ daddu $a0, $s2, $zero -/* 185350 80256A70 0C099B6B */ jal func_80266DAC -/* 185354 80256A74 24050005 */ addiu $a1, $zero, 5 -/* 185358 80256A78 24100001 */ addiu $s0, $zero, 1 -.L80256A7C: -/* 18535C 80256A7C 82430212 */ lb $v1, 0x212($s2) -/* 185360 80256A80 2402000B */ addiu $v0, $zero, 0xb -/* 185364 80256A84 14620007 */ bne $v1, $v0, .L80256AA4 -/* 185368 80256A88 00000000 */ nop -/* 18536C 80256A8C 16000005 */ bnez $s0, .L80256AA4 -/* 185370 80256A90 24100001 */ addiu $s0, $zero, 1 -/* 185374 80256A94 0240202D */ daddu $a0, $s2, $zero -/* 185378 80256A98 0C099B6B */ jal func_80266DAC -/* 18537C 80256A9C 24050004 */ addiu $a1, $zero, 4 -/* 185380 80256AA0 24100001 */ addiu $s0, $zero, 1 -.L80256AA4: -/* 185384 80256AA4 16000007 */ bnez $s0, .L80256AC4 -/* 185388 80256AA8 3C030100 */ lui $v1, 0x100 -/* 18538C 80256AAC 8E220000 */ lw $v0, ($s1) -/* 185390 80256AB0 00431024 */ and $v0, $v0, $v1 -/* 185394 80256AB4 14400003 */ bnez $v0, .L80256AC4 -/* 185398 80256AB8 0240202D */ daddu $a0, $s2, $zero -/* 18539C 80256ABC 0C099B6B */ jal func_80266DAC -/* 1853A0 80256AC0 0000282D */ daddu $a1, $zero, $zero -.L80256AC4: -/* 1853A4 80256AC4 16800007 */ bnez $s4, .L80256AE4 -/* 1853A8 80256AC8 3C030100 */ lui $v1, 0x100 -/* 1853AC 80256ACC 8E220000 */ lw $v0, ($s1) -/* 1853B0 80256AD0 00431024 */ and $v0, $v0, $v1 -/* 1853B4 80256AD4 14400003 */ bnez $v0, .L80256AE4 -/* 1853B8 80256AD8 0240202D */ daddu $a0, $s2, $zero -/* 1853BC 80256ADC 0C099BBA */ jal func_80266EE8 -/* 1853C0 80256AE0 0000282D */ daddu $a1, $zero, $zero -.L80256AE4: -/* 1853C4 80256AE4 8E420000 */ lw $v0, ($s2) -/* 1853C8 80256AE8 3C030400 */ lui $v1, 0x400 -/* 1853CC 80256AEC 00431024 */ and $v0, $v0, $v1 -/* 1853D0 80256AF0 10400070 */ beqz $v0, .L80256CB4 -/* 1853D4 80256AF4 3C032000 */ lui $v1, 0x2000 -/* 1853D8 80256AF8 8E220000 */ lw $v0, ($s1) -/* 1853DC 80256AFC 00431024 */ and $v0, $v0, $v1 -/* 1853E0 80256B00 1440006C */ bnez $v0, .L80256CB4 -/* 1853E4 80256B04 24020007 */ addiu $v0, $zero, 7 -/* 1853E8 80256B08 82430210 */ lb $v1, 0x210($s2) -/* 1853EC 80256B0C 10620012 */ beq $v1, $v0, .L80256B58 -/* 1853F0 80256B10 00000000 */ nop -/* 1853F4 80256B14 2402000A */ addiu $v0, $zero, 0xa -/* 1853F8 80256B18 10620015 */ beq $v1, $v0, .L80256B70 -/* 1853FC 80256B1C 24020009 */ addiu $v0, $zero, 9 -/* 185400 80256B20 1062000D */ beq $v1, $v0, .L80256B58 -/* 185404 80256B24 00000000 */ nop -/* 185408 80256B28 24020004 */ addiu $v0, $zero, 4 -/* 18540C 80256B2C 1062000A */ beq $v1, $v0, .L80256B58 -/* 185410 80256B30 00000000 */ nop -/* 185414 80256B34 24020003 */ addiu $v0, $zero, 3 -/* 185418 80256B38 10620007 */ beq $v1, $v0, .L80256B58 -/* 18541C 80256B3C 00000000 */ nop -/* 185420 80256B40 24020006 */ addiu $v0, $zero, 6 -/* 185424 80256B44 10620004 */ beq $v1, $v0, .L80256B58 -/* 185428 80256B48 00000000 */ nop -/* 18542C 80256B4C 24020005 */ addiu $v0, $zero, 5 -/* 185430 80256B50 14620007 */ bne $v1, $v0, .L80256B70 -/* 185434 80256B54 00000000 */ nop -.L80256B58: -/* 185438 80256B58 16600005 */ bnez $s3, .L80256B70 -/* 18543C 80256B5C 0040282D */ daddu $a1, $v0, $zero -/* 185440 80256B60 8E240094 */ lw $a0, 0x94($s1) -/* 185444 80256B64 0C09973A */ jal func_80265CE8 -/* 185448 80256B68 24130001 */ addiu $s3, $zero, 1 -/* 18544C 80256B6C AE220088 */ sw $v0, 0x88($s1) -.L80256B70: -/* 185450 80256B70 82430212 */ lb $v1, 0x212($s2) -/* 185454 80256B74 2402000B */ addiu $v0, $zero, 0xb -/* 185458 80256B78 14620007 */ bne $v1, $v0, .L80256B98 -/* 18545C 80256B7C 00000000 */ nop -/* 185460 80256B80 16600005 */ bnez $s3, .L80256B98 -/* 185464 80256B84 0040282D */ daddu $a1, $v0, $zero -/* 185468 80256B88 8E240094 */ lw $a0, 0x94($s1) -/* 18546C 80256B8C 0C09973A */ jal func_80265CE8 -/* 185470 80256B90 24130001 */ addiu $s3, $zero, 1 -/* 185474 80256B94 AE220088 */ sw $v0, 0x88($s1) -.L80256B98: -/* 185478 80256B98 16600005 */ bnez $s3, .L80256BB0 -/* 18547C 80256B9C 00000000 */ nop -/* 185480 80256BA0 8E240094 */ lw $a0, 0x94($s1) -/* 185484 80256BA4 0C09973A */ jal func_80265CE8 -/* 185488 80256BA8 24050001 */ addiu $a1, $zero, 1 -/* 18548C 80256BAC AE220088 */ sw $v0, 0x88($s1) -.L80256BB0: -/* 185490 80256BB0 8FA803D0 */ lw $t0, 0x3d0($sp) -/* 185494 80256BB4 11000014 */ beqz $t0, .L80256C08 -/* 185498 80256BB8 2402000D */ addiu $v0, $zero, 0xd -/* 18549C 80256BBC 82430216 */ lb $v1, 0x216($s2) -/* 1854A0 80256BC0 14620004 */ bne $v1, $v0, .L80256BD4 -/* 1854A4 80256BC4 0040282D */ daddu $a1, $v0, $zero -/* 1854A8 80256BC8 8E240094 */ lw $a0, 0x94($s1) -/* 1854AC 80256BCC 08095AFF */ j .L80256BFC -/* 1854B0 80256BD0 24130001 */ addiu $s3, $zero, 1 -.L80256BD4: -/* 1854B4 80256BD4 8E240094 */ lw $a0, 0x94($s1) -/* 1854B8 80256BD8 0C09973A */ jal func_80265CE8 -/* 1854BC 80256BDC 24050001 */ addiu $a1, $zero, 1 -/* 1854C0 80256BE0 0040802D */ daddu $s0, $v0, $zero -/* 1854C4 80256BE4 8E240094 */ lw $a0, 0x94($s1) -/* 1854C8 80256BE8 0C09973A */ jal func_80265CE8 -/* 1854CC 80256BEC 2405000D */ addiu $a1, $zero, 0xd -/* 1854D0 80256BF0 16020005 */ bne $s0, $v0, .L80256C08 -/* 1854D4 80256BF4 24050001 */ addiu $a1, $zero, 1 -/* 1854D8 80256BF8 8E240094 */ lw $a0, 0x94($s1) -.L80256BFC: -/* 1854DC 80256BFC 0C09973A */ jal func_80265CE8 -/* 1854E0 80256C00 00000000 */ nop -/* 1854E4 80256C04 AE220088 */ sw $v0, 0x88($s1) -.L80256C08: -/* 1854E8 80256C08 82430210 */ lb $v1, 0x210($s2) -/* 1854EC 80256C0C 24020008 */ addiu $v0, $zero, 8 -/* 1854F0 80256C10 14620019 */ bne $v1, $v0, .L80256C78 -/* 1854F4 80256C14 00000000 */ nop -/* 1854F8 80256C18 8E240094 */ lw $a0, 0x94($s1) -/* 1854FC 80256C1C 0C09973A */ jal func_80265CE8 -/* 185500 80256C20 0040282D */ daddu $a1, $v0, $zero -/* 185504 80256C24 AE220088 */ sw $v0, 0x88($s1) -/* 185508 80256C28 86440436 */ lh $a0, 0x436($s2) -/* 18550C 80256C2C 0C011E08 */ jal create_status_debuff -/* 185510 80256C30 24050008 */ addiu $a1, $zero, 8 -/* 185514 80256C34 08095B2D */ j .L80256CB4 -/* 185518 80256C38 00000000 */ nop -.L80256C3C: -/* 18551C 80256C3C 86440436 */ lh $a0, 0x436($s2) -/* 185520 80256C40 08095B44 */ j .L80256D10 -/* 185524 80256C44 24050009 */ addiu $a1, $zero, 9 -.L80256C48: -/* 185528 80256C48 86440436 */ lh $a0, 0x436($s2) -/* 18552C 80256C4C 08095B44 */ j .L80256D10 -/* 185530 80256C50 24050004 */ addiu $a1, $zero, 4 -.L80256C54: -/* 185534 80256C54 86440436 */ lh $a0, 0x436($s2) -/* 185538 80256C58 08095B44 */ j .L80256D10 -/* 18553C 80256C5C 24050006 */ addiu $a1, $zero, 6 -.L80256C60: -/* 185540 80256C60 86440436 */ lh $a0, 0x436($s2) -/* 185544 80256C64 08095B44 */ j .L80256D10 -/* 185548 80256C68 24050005 */ addiu $a1, $zero, 5 -.L80256C6C: -/* 18554C 80256C6C 86440436 */ lh $a0, 0x436($s2) -/* 185550 80256C70 08095B44 */ j .L80256D10 -/* 185554 80256C74 2405000A */ addiu $a1, $zero, 0xa -.L80256C78: -/* 185558 80256C78 1660000E */ bnez $s3, .L80256CB4 -/* 18555C 80256C7C 00000000 */ nop -/* 185560 80256C80 8E240094 */ lw $a0, 0x94($s1) -/* 185564 80256C84 0C09973A */ jal func_80265CE8 -/* 185568 80256C88 24050001 */ addiu $a1, $zero, 1 -/* 18556C 80256C8C 0040802D */ daddu $s0, $v0, $zero -/* 185570 80256C90 8E240094 */ lw $a0, 0x94($s1) -/* 185574 80256C94 0C09973A */ jal func_80265CE8 -/* 185578 80256C98 24050008 */ addiu $a1, $zero, 8 -/* 18557C 80256C9C 16020005 */ bne $s0, $v0, .L80256CB4 -/* 185580 80256CA0 00000000 */ nop -/* 185584 80256CA4 8E240094 */ lw $a0, 0x94($s1) -/* 185588 80256CA8 0C09973A */ jal func_80265CE8 -/* 18558C 80256CAC 24050001 */ addiu $a1, $zero, 1 -/* 185590 80256CB0 AE220088 */ sw $v0, 0x88($s1) -.L80256CB4: -/* 185594 80256CB4 3C02800E */ lui $v0, %hi(gBattleStatus) -/* 185598 80256CB8 8C42C070 */ lw $v0, %lo(gBattleStatus)($v0) -/* 18559C 80256CBC 30420004 */ andi $v0, $v0, 4 -/* 1855A0 80256CC0 1440002E */ bnez $v0, .L80256D7C -/* 1855A4 80256CC4 3C030800 */ lui $v1, 0x800 -/* 1855A8 80256CC8 8E420000 */ lw $v0, ($s2) -/* 1855AC 80256CCC 00431024 */ and $v0, $v0, $v1 -/* 1855B0 80256CD0 1040002A */ beqz $v0, .L80256D7C -/* 1855B4 80256CD4 24020009 */ addiu $v0, $zero, 9 -/* 1855B8 80256CD8 82430210 */ lb $v1, 0x210($s2) -/* 1855BC 80256CDC 1062FFD7 */ beq $v1, $v0, .L80256C3C -/* 1855C0 80256CE0 24020004 */ addiu $v0, $zero, 4 -/* 1855C4 80256CE4 1062FFD8 */ beq $v1, $v0, .L80256C48 -/* 1855C8 80256CE8 24020006 */ addiu $v0, $zero, 6 -/* 1855CC 80256CEC 1062FFD9 */ beq $v1, $v0, .L80256C54 -/* 1855D0 80256CF0 24020005 */ addiu $v0, $zero, 5 -/* 1855D4 80256CF4 1062FFDA */ beq $v1, $v0, .L80256C60 -/* 1855D8 80256CF8 2402000A */ addiu $v0, $zero, 0xa -/* 1855DC 80256CFC 1062FFDB */ beq $v1, $v0, .L80256C6C -/* 1855E0 80256D00 24020007 */ addiu $v0, $zero, 7 -/* 1855E4 80256D04 14620004 */ bne $v1, $v0, .L80256D18 -/* 1855E8 80256D08 0040282D */ daddu $a1, $v0, $zero -/* 1855EC 80256D0C 86440436 */ lh $a0, 0x436($s2) -.L80256D10: -/* 1855F0 80256D10 0C011E08 */ jal create_status_debuff -/* 1855F4 80256D14 00000000 */ nop -.L80256D18: -/* 1855F8 80256D18 82430212 */ lb $v1, 0x212($s2) -/* 1855FC 80256D1C 2402000B */ addiu $v0, $zero, 0xb -/* 185600 80256D20 14620004 */ bne $v1, $v0, .L80256D34 -/* 185604 80256D24 00000000 */ nop -/* 185608 80256D28 86440436 */ lh $a0, 0x436($s2) -/* 18560C 80256D2C 0C011E4A */ jal create_status_static -/* 185610 80256D30 0040282D */ daddu $a1, $v0, $zero -.L80256D34: -/* 185614 80256D34 82430218 */ lb $v1, 0x218($s2) -/* 185618 80256D38 2402000E */ addiu $v0, $zero, 0xe -/* 18561C 80256D3C 10620005 */ beq $v1, $v0, .L80256D54 -/* 185620 80256D40 00000000 */ nop -/* 185624 80256D44 8E220000 */ lw $v0, ($s1) -/* 185628 80256D48 30420100 */ andi $v0, $v0, 0x100 -/* 18562C 80256D4C 10400004 */ beqz $v0, .L80256D60 -/* 185630 80256D50 00000000 */ nop -.L80256D54: -/* 185634 80256D54 86440436 */ lh $a0, 0x436($s2) -/* 185638 80256D58 0C011E8C */ jal create_status_transparent -/* 18563C 80256D5C 2405000E */ addiu $a1, $zero, 0xe -.L80256D60: -/* 185640 80256D60 82420223 */ lb $v0, 0x223($s2) -/* 185644 80256D64 1040000D */ beqz $v0, .L80256D9C -/* 185648 80256D68 00000000 */ nop -/* 18564C 80256D6C 0C011ECE */ jal create_status_chill_out -/* 185650 80256D70 86440436 */ lh $a0, 0x436($s2) -/* 185654 80256D74 08095B67 */ j .L80256D9C -/* 185658 80256D78 00000000 */ nop -.L80256D7C: -/* 18565C 80256D7C 0C011E3E */ jal enable_status_debuff -/* 185660 80256D80 86440436 */ lh $a0, 0x436($s2) -/* 185664 80256D84 0C011E80 */ jal enable_status_2 -/* 185668 80256D88 86440436 */ lh $a0, 0x436($s2) -/* 18566C 80256D8C 0C011EC2 */ jal enable_status_transparent -/* 185670 80256D90 86440436 */ lh $a0, 0x436($s2) -/* 185674 80256D94 0C011EF9 */ jal enable_status_chill_out -/* 185678 80256D98 86440436 */ lh $a0, 0x436($s2) -.L80256D9C: -/* 18567C 80256D9C 8E240084 */ lw $a0, 0x84($s1) -/* 185680 80256DA0 04800009 */ bltz $a0, .L80256DC8 -/* 185684 80256DA4 00000000 */ nop -/* 185688 80256DA8 8E250088 */ lw $a1, 0x88($s1) -/* 18568C 80256DAC 13C50006 */ beq $fp, $a1, .L80256DC8 -/* 185690 80256DB0 00000000 */ nop -/* 185694 80256DB4 0C0B78AB */ jal spr_update_sprite -/* 185698 80256DB8 8E260090 */ lw $a2, 0x90($s1) -/* 18569C 80256DBC 0C0B7972 */ jal func_802DE5C8 -/* 1856A0 80256DC0 8E240084 */ lw $a0, 0x84($s1) -/* 1856A4 80256DC4 AE22008C */ sw $v0, 0x8c($s1) -.L80256DC8: -/* 1856A8 80256DC8 8E420000 */ lw $v0, ($s2) -/* 1856AC 80256DCC 30420800 */ andi $v0, $v0, 0x800 -/* 1856B0 80256DD0 14400025 */ bnez $v0, .L80256E68 -/* 1856B4 80256DD4 00000000 */ nop -/* 1856B8 80256DD8 86220044 */ lh $v0, 0x44($s1) -/* 1856BC 80256DDC C6420188 */ lwc1 $f2, 0x188($s2) -/* 1856C0 80256DE0 00021023 */ negu $v0, $v0 -/* 1856C4 80256DE4 44820000 */ mtc1 $v0, $f0 -/* 1856C8 80256DE8 00000000 */ nop -/* 1856CC 80256DEC 46800020 */ cvt.s.w $f0, $f0 -/* 1856D0 80256DF0 46020002 */ mul.s $f0, $f0, $f2 -/* 1856D4 80256DF4 00000000 */ nop -/* 1856D8 80256DF8 86220046 */ lh $v0, 0x46($s1) -/* 1856DC 80256DFC 00021023 */ negu $v0, $v0 -/* 1856E0 80256E00 44050000 */ mfc1 $a1, $f0 -/* 1856E4 80256E04 44820000 */ mtc1 $v0, $f0 -/* 1856E8 80256E08 00000000 */ nop -/* 1856EC 80256E0C 46800020 */ cvt.s.w $f0, $f0 -/* 1856F0 80256E10 46020002 */ mul.s $f0, $f0, $f2 -/* 1856F4 80256E14 00000000 */ nop -/* 1856F8 80256E18 86220048 */ lh $v0, 0x48($s1) -/* 1856FC 80256E1C 00021023 */ negu $v0, $v0 -/* 185700 80256E20 44060000 */ mfc1 $a2, $f0 -/* 185704 80256E24 44820000 */ mtc1 $v0, $f0 -/* 185708 80256E28 00000000 */ nop -/* 18570C 80256E2C 46800020 */ cvt.s.w $f0, $f0 -/* 185710 80256E30 46020002 */ mul.s $f0, $f0, $f2 -/* 185714 80256E34 00000000 */ nop -/* 185718 80256E38 44070000 */ mfc1 $a3, $f0 -/* 18571C 80256E3C 0C019E40 */ jal guTranslateF -/* 185720 80256E40 27A401A0 */ addiu $a0, $sp, 0x1a0 -/* 185724 80256E44 86220044 */ lh $v0, 0x44($s1) -/* 185728 80256E48 C6420188 */ lwc1 $f2, 0x188($s2) -/* 18572C 80256E4C 44820000 */ mtc1 $v0, $f0 -/* 185730 80256E50 00000000 */ nop -/* 185734 80256E54 46800020 */ cvt.s.w $f0, $f0 -/* 185738 80256E58 46020002 */ mul.s $f0, $f0, $f2 -/* 18573C 80256E5C 00000000 */ nop -/* 185740 80256E60 08095BBD */ j .L80256EF4 -/* 185744 80256E64 86220046 */ lh $v0, 0x46($s1) -.L80256E68: -/* 185748 80256E68 86220044 */ lh $v0, 0x44($s1) -/* 18574C 80256E6C C6420188 */ lwc1 $f2, 0x188($s2) -/* 185750 80256E70 00021023 */ negu $v0, $v0 -/* 185754 80256E74 44820000 */ mtc1 $v0, $f0 -/* 185758 80256E78 00000000 */ nop -/* 18575C 80256E7C 46800020 */ cvt.s.w $f0, $f0 -/* 185760 80256E80 46020002 */ mul.s $f0, $f0, $f2 -/* 185764 80256E84 00000000 */ nop -/* 185768 80256E88 86220046 */ lh $v0, 0x46($s1) -/* 18576C 80256E8C 44050000 */ mfc1 $a1, $f0 -/* 185770 80256E90 44820000 */ mtc1 $v0, $f0 -/* 185774 80256E94 00000000 */ nop -/* 185778 80256E98 46800020 */ cvt.s.w $f0, $f0 -/* 18577C 80256E9C 46020002 */ mul.s $f0, $f0, $f2 -/* 185780 80256EA0 00000000 */ nop -/* 185784 80256EA4 86220048 */ lh $v0, 0x48($s1) -/* 185788 80256EA8 00021023 */ negu $v0, $v0 -/* 18578C 80256EAC 44060000 */ mfc1 $a2, $f0 -/* 185790 80256EB0 44820000 */ mtc1 $v0, $f0 -/* 185794 80256EB4 00000000 */ nop -/* 185798 80256EB8 46800020 */ cvt.s.w $f0, $f0 -/* 18579C 80256EBC 46020002 */ mul.s $f0, $f0, $f2 -/* 1857A0 80256EC0 00000000 */ nop -/* 1857A4 80256EC4 44070000 */ mfc1 $a3, $f0 -/* 1857A8 80256EC8 0C019E40 */ jal guTranslateF -/* 1857AC 80256ECC 27A401A0 */ addiu $a0, $sp, 0x1a0 -/* 1857B0 80256ED0 86220044 */ lh $v0, 0x44($s1) -/* 1857B4 80256ED4 C6420188 */ lwc1 $f2, 0x188($s2) -/* 1857B8 80256ED8 44820000 */ mtc1 $v0, $f0 -/* 1857BC 80256EDC 00000000 */ nop -/* 1857C0 80256EE0 46800020 */ cvt.s.w $f0, $f0 -/* 1857C4 80256EE4 46020002 */ mul.s $f0, $f0, $f2 -/* 1857C8 80256EE8 00000000 */ nop -/* 1857CC 80256EEC 86220046 */ lh $v0, 0x46($s1) -/* 1857D0 80256EF0 00021023 */ negu $v0, $v0 -.L80256EF4: -/* 1857D4 80256EF4 44050000 */ mfc1 $a1, $f0 -/* 1857D8 80256EF8 44820000 */ mtc1 $v0, $f0 -/* 1857DC 80256EFC 00000000 */ nop -/* 1857E0 80256F00 46800020 */ cvt.s.w $f0, $f0 -/* 1857E4 80256F04 46020002 */ mul.s $f0, $f0, $f2 -/* 1857E8 80256F08 00000000 */ nop -/* 1857EC 80256F0C 86220048 */ lh $v0, 0x48($s1) -/* 1857F0 80256F10 44060000 */ mfc1 $a2, $f0 -/* 1857F4 80256F14 44820000 */ mtc1 $v0, $f0 -/* 1857F8 80256F18 00000000 */ nop -/* 1857FC 80256F1C 46800020 */ cvt.s.w $f0, $f0 -/* 185800 80256F20 46020002 */ mul.s $f0, $f0, $f2 -/* 185804 80256F24 00000000 */ nop -/* 185808 80256F28 44070000 */ mfc1 $a3, $f0 -/* 18580C 80256F2C 0C019E40 */ jal guTranslateF -/* 185810 80256F30 27A401E0 */ addiu $a0, $sp, 0x1e0 -/* 185814 80256F34 86220068 */ lh $v0, 0x68($s1) -/* 185818 80256F38 44820000 */ mtc1 $v0, $f0 -/* 18581C 80256F3C 00000000 */ nop -/* 185820 80256F40 46800020 */ cvt.s.w $f0, $f0 -/* 185824 80256F44 4600D000 */ add.s $f0, $f26, $f0 -/* 185828 80256F48 8622006A */ lh $v0, 0x6a($s1) -/* 18582C 80256F4C 44050000 */ mfc1 $a1, $f0 -/* 185830 80256F50 44820000 */ mtc1 $v0, $f0 -/* 185834 80256F54 00000000 */ nop -/* 185838 80256F58 46800020 */ cvt.s.w $f0, $f0 -/* 18583C 80256F5C 4600A000 */ add.s $f0, $f20, $f0 -/* 185840 80256F60 4407B000 */ mfc1 $a3, $f22 -/* 185844 80256F64 44060000 */ mfc1 $a2, $f0 -/* 185848 80256F68 0C019E40 */ jal guTranslateF -/* 18584C 80256F6C 27A40220 */ addiu $a0, $sp, 0x220 -/* 185850 80256F70 E7BC0010 */ swc1 $f28, 0x10($sp) -/* 185854 80256F74 8E250038 */ lw $a1, 0x38($s1) -/* 185858 80256F78 3C063F80 */ lui $a2, 0x3f80 -/* 18585C 80256F7C 4407E000 */ mfc1 $a3, $f28 -/* 185860 80256F80 0C019EC8 */ jal guRotateF -/* 185864 80256F84 27A40020 */ addiu $a0, $sp, 0x20 -/* 185868 80256F88 E7BC0010 */ swc1 $f28, 0x10($sp) -/* 18586C 80256F8C 8E25003C */ lw $a1, 0x3c($s1) -/* 185870 80256F90 4406E000 */ mfc1 $a2, $f28 -/* 185874 80256F94 3C073F80 */ lui $a3, 0x3f80 -/* 185878 80256F98 0C019EC8 */ jal guRotateF -/* 18587C 80256F9C 8FA4036C */ lw $a0, 0x36c($sp) -/* 185880 80256FA0 3C013F80 */ lui $at, 0x3f80 -/* 185884 80256FA4 44815000 */ mtc1 $at, $f10 -/* 185888 80256FA8 4406E000 */ mfc1 $a2, $f28 -/* 18588C 80256FAC 4407E000 */ mfc1 $a3, $f28 -/* 185890 80256FB0 27B000A0 */ addiu $s0, $sp, 0xa0 -/* 185894 80256FB4 E7AA0010 */ swc1 $f10, 0x10($sp) -/* 185898 80256FB8 8E250040 */ lw $a1, 0x40($s1) -/* 18589C 80256FBC 0C019EC8 */ jal guRotateF -/* 1858A0 80256FC0 0200202D */ daddu $a0, $s0, $zero -/* 1858A4 80256FC4 27A50020 */ addiu $a1, $sp, 0x20 -/* 1858A8 80256FC8 8FA4036C */ lw $a0, 0x36c($sp) -/* 1858AC 80256FCC 0C019D80 */ jal guMtxCatF -/* 1858B0 80256FD0 02C0302D */ daddu $a2, $s6, $zero -/* 1858B4 80256FD4 02C0202D */ daddu $a0, $s6, $zero -/* 1858B8 80256FD8 8FA60370 */ lw $a2, 0x370($sp) -/* 1858BC 80256FDC 0C019D80 */ jal guMtxCatF -/* 1858C0 80256FE0 0200282D */ daddu $a1, $s0, $zero -/* 1858C4 80256FE4 82220074 */ lb $v0, 0x74($s1) -/* 1858C8 80256FE8 C6220050 */ lwc1 $f2, 0x50($s1) -/* 1858CC 80256FEC 44820000 */ mtc1 $v0, $f0 -/* 1858D0 80256FF0 00000000 */ nop -/* 1858D4 80256FF4 46800020 */ cvt.s.w $f0, $f0 -/* 1858D8 80256FF8 46001082 */ mul.s $f2, $f2, $f0 -/* 1858DC 80256FFC 00000000 */ nop -/* 1858E0 80257000 27B00120 */ addiu $s0, $sp, 0x120 -/* 1858E4 80257004 8E25004C */ lw $a1, 0x4c($s1) -/* 1858E8 80257008 8E270054 */ lw $a3, 0x54($s1) -/* 1858EC 8025700C 44061000 */ mfc1 $a2, $f2 -/* 1858F0 80257010 0C019DF0 */ jal guScaleF -/* 1858F4 80257014 0200202D */ daddu $a0, $s0, $zero -/* 1858F8 80257018 0200202D */ daddu $a0, $s0, $zero -/* 1858FC 8025701C 27A501A0 */ addiu $a1, $sp, 0x1a0 -/* 185900 80257020 0C019D80 */ jal guMtxCatF -/* 185904 80257024 02A0302D */ daddu $a2, $s5, $zero -/* 185908 80257028 02A0202D */ daddu $a0, $s5, $zero -/* 18590C 8025702C 8FA50370 */ lw $a1, 0x370($sp) -/* 185910 80257030 0C019D80 */ jal guMtxCatF -/* 185914 80257034 02C0302D */ daddu $a2, $s6, $zero -/* 185918 80257038 02C0202D */ daddu $a0, $s6, $zero -/* 18591C 8025703C 27A501E0 */ addiu $a1, $sp, 0x1e0 -/* 185920 80257040 0C019D80 */ jal guMtxCatF -/* 185924 80257044 02A0302D */ daddu $a2, $s5, $zero -/* 185928 80257048 8E220000 */ lw $v0, ($s1) -/* 18592C 8025704C 3C030010 */ lui $v1, 0x10 -/* 185930 80257050 00431024 */ and $v0, $v0, $v1 -/* 185934 80257054 14400003 */ bnez $v0, .L80257064 -/* 185938 80257058 02A0202D */ daddu $a0, $s5, $zero -/* 18593C 8025705C 08095C1A */ j .L80257068 -/* 185940 80257060 27A502A0 */ addiu $a1, $sp, 0x2a0 -.L80257064: -/* 185944 80257064 27A50320 */ addiu $a1, $sp, 0x320 -.L80257068: -/* 185948 80257068 0C019D80 */ jal guMtxCatF -/* 18594C 8025706C 02C0302D */ daddu $a2, $s6, $zero -/* 185950 80257070 27A40260 */ addiu $a0, $sp, 0x260 -/* 185954 80257074 27A50220 */ addiu $a1, $sp, 0x220 -/* 185958 80257078 0C019D80 */ jal guMtxCatF -/* 18595C 8025707C 02A0302D */ daddu $a2, $s5, $zero -/* 185960 80257080 86220068 */ lh $v0, 0x68($s1) -/* 185964 80257084 44821000 */ mtc1 $v0, $f2 -/* 185968 80257088 00000000 */ nop -/* 18596C 8025708C 468010A0 */ cvt.s.w $f2, $f2 -/* 185970 80257090 8622006A */ lh $v0, 0x6a($s1) -/* 185974 80257094 4602D080 */ add.s $f2, $f26, $f2 -/* 185978 80257098 44820000 */ mtc1 $v0, $f0 -/* 18597C 8025709C 00000000 */ nop -/* 185980 802570A0 46800020 */ cvt.s.w $f0, $f0 -/* 185984 802570A4 8E220084 */ lw $v0, 0x84($s1) -/* 185988 802570A8 4600A000 */ add.s $f0, $f20, $f0 -/* 18598C 802570AC E6360060 */ swc1 $f22, 0x60($s1) -/* 185990 802570B0 E6220058 */ swc1 $f2, 0x58($s1) -/* 185994 802570B4 04400036 */ bltz $v0, .L80257190 -/* 185998 802570B8 E620005C */ swc1 $f0, 0x5c($s1) -/* 18599C 802570BC 8FA803D0 */ lw $t0, 0x3d0($sp) -/* 1859A0 802570C0 15000013 */ bnez $t0, .L80257110 -/* 1859A4 802570C4 0220282D */ daddu $a1, $s1, $zero -/* 1859A8 802570C8 24040001 */ addiu $a0, $zero, 1 -/* 1859AC 802570CC 4600C28D */ trunc.w.s $f10, $f24 -/* 1859B0 802570D0 44105000 */ mfc1 $s0, $f10 -/* 1859B4 802570D4 00000000 */ nop -/* 1859B8 802570D8 0200302D */ daddu $a2, $s0, $zero -/* 1859BC 802570DC 0C097210 */ jal func_8025C840 -/* 1859C0 802570E0 0000382D */ daddu $a3, $zero, $zero -/* 1859C4 802570E4 24040001 */ addiu $a0, $zero, 1 -/* 1859C8 802570E8 0220282D */ daddu $a1, $s1, $zero -/* 1859CC 802570EC 0200302D */ daddu $a2, $s0, $zero -/* 1859D0 802570F0 0C097332 */ jal func_8025CCC8 -/* 1859D4 802570F4 0000382D */ daddu $a3, $zero, $zero -/* 1859D8 802570F8 AFA00010 */ sw $zero, 0x10($sp) -/* 1859DC 802570FC 24040001 */ addiu $a0, $zero, 1 -/* 1859E0 80257100 0220282D */ daddu $a1, $s1, $zero -/* 1859E4 80257104 0200302D */ daddu $a2, $s0, $zero -/* 1859E8 80257108 08095C60 */ j .L80257180 -/* 1859EC 8025710C 02A0382D */ daddu $a3, $s5, $zero -.L80257110: -/* 1859F0 80257110 3C014334 */ lui $at, 0x4334 -/* 1859F4 80257114 4481A000 */ mtc1 $at, $f20 -/* 1859F8 80257118 00000000 */ nop -/* 1859FC 8025711C 4618A501 */ sub.s $f20, $f20, $f24 -/* 185A00 80257120 0C00A6C9 */ jal clamp_angle -/* 185A04 80257124 4600A306 */ mov.s $f12, $f20 -/* 185A08 80257128 24040001 */ addiu $a0, $zero, 1 -/* 185A0C 8025712C 0220282D */ daddu $a1, $s1, $zero -/* 185A10 80257130 4600028D */ trunc.w.s $f10, $f0 -/* 185A14 80257134 44065000 */ mfc1 $a2, $f10 -/* 185A18 80257138 0C097210 */ jal func_8025C840 -/* 185A1C 8025713C 0000382D */ daddu $a3, $zero, $zero -/* 185A20 80257140 0C00A6C9 */ jal clamp_angle -/* 185A24 80257144 4600A306 */ mov.s $f12, $f20 -/* 185A28 80257148 24040001 */ addiu $a0, $zero, 1 -/* 185A2C 8025714C 0220282D */ daddu $a1, $s1, $zero -/* 185A30 80257150 4600028D */ trunc.w.s $f10, $f0 -/* 185A34 80257154 44065000 */ mfc1 $a2, $f10 -/* 185A38 80257158 0C097332 */ jal func_8025CCC8 -/* 185A3C 8025715C 0000382D */ daddu $a3, $zero, $zero -/* 185A40 80257160 0C00A6C9 */ jal clamp_angle -/* 185A44 80257164 4600A306 */ mov.s $f12, $f20 -/* 185A48 80257168 24040001 */ addiu $a0, $zero, 1 -/* 185A4C 8025716C 0220282D */ daddu $a1, $s1, $zero -/* 185A50 80257170 4600028D */ trunc.w.s $f10, $f0 -/* 185A54 80257174 44065000 */ mfc1 $a2, $f10 -/* 185A58 80257178 02A0382D */ daddu $a3, $s5, $zero -/* 185A5C 8025717C AFA00010 */ sw $zero, 0x10($sp) -.L80257180: -/* 185A60 80257180 0C09647B */ jal func_802591EC -/* 185A64 80257184 00000000 */ nop -/* 185A68 80257188 0C0973B2 */ jal _add_part_decoration -/* 185A6C 8025718C 0220202D */ daddu $a0, $s1, $zero -.L80257190: -/* 185A70 80257190 8E31000C */ lw $s1, 0xc($s1) -/* 185A74 80257194 8FA80360 */ lw $t0, 0x360($sp) -/* 185A78 80257198 26F70001 */ addiu $s7, $s7, 1 -/* 185A7C 8025719C 02E8102A */ slt $v0, $s7, $t0 -/* 185A80 802571A0 1440FD74 */ bnez $v0, .L80256774 -/* 185A84 802571A4 00000000 */ nop -.L802571A8: -/* 185A88 802571A8 8FBF039C */ lw $ra, 0x39c($sp) -/* 185A8C 802571AC 8FBE0398 */ lw $fp, 0x398($sp) -/* 185A90 802571B0 8FB70394 */ lw $s7, 0x394($sp) -/* 185A94 802571B4 8FB60390 */ lw $s6, 0x390($sp) -/* 185A98 802571B8 8FB5038C */ lw $s5, 0x38c($sp) -/* 185A9C 802571BC 8FB40388 */ lw $s4, 0x388($sp) -/* 185AA0 802571C0 8FB30384 */ lw $s3, 0x384($sp) -/* 185AA4 802571C4 8FB20380 */ lw $s2, 0x380($sp) -/* 185AA8 802571C8 8FB1037C */ lw $s1, 0x37c($sp) -/* 185AAC 802571CC 8FB00378 */ lw $s0, 0x378($sp) -/* 185AB0 802571D0 D7BE03C8 */ ldc1 $f30, 0x3c8($sp) -/* 185AB4 802571D4 D7BC03C0 */ ldc1 $f28, 0x3c0($sp) -/* 185AB8 802571D8 D7BA03B8 */ ldc1 $f26, 0x3b8($sp) -/* 185ABC 802571DC D7B803B0 */ ldc1 $f24, 0x3b0($sp) -/* 185AC0 802571E0 D7B603A8 */ ldc1 $f22, 0x3a8($sp) -/* 185AC4 802571E4 D7B403A0 */ ldc1 $f20, 0x3a0($sp) -/* 185AC8 802571E8 03E00008 */ jr $ra -/* 185ACC 802571EC 27BD03D0 */ addiu $sp, $sp, 0x3d0 diff --git a/ver/us/asm/nonmatchings/182B30/func_80259494.s b/ver/us/asm/nonmatchings/182B30/func_80259494.s deleted file mode 100644 index 016ed28806..0000000000 --- a/ver/us/asm/nonmatchings/182B30/func_80259494.s +++ /dev/null @@ -1,38 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_80259494 -/* 187D74 80259494 8C8800C0 */ lw $t0, 0xc0($a0) -/* 187D78 80259498 810206CD */ lb $v0, 0x6cd($t0) -/* 187D7C 8025949C 18400019 */ blez $v0, .L80259504 -/* 187D80 802594A0 0000482D */ daddu $t1, $zero, $zero -/* 187D84 802594A4 24070360 */ addiu $a3, $zero, 0x360 -/* 187D88 802594A8 0100302D */ daddu $a2, $t0, $zero -.L802594AC: -/* 187D8C 802594AC 8CC206D4 */ lw $v0, 0x6d4($a2) -/* 187D90 802594B0 5040000F */ beql $v0, $zero, .L802594F0 -/* 187D94 802594B4 24E70020 */ addiu $a3, $a3, 0x20 -/* 187D98 802594B8 0040282D */ daddu $a1, $v0, $zero -/* 187D9C 802594BC 01072021 */ addu $a0, $t0, $a3 -/* 187DA0 802594C0 0000182D */ daddu $v1, $zero, $zero -.L802594C4: -/* 187DA4 802594C4 94A20000 */ lhu $v0, ($a1) -/* 187DA8 802594C8 24A50002 */ addiu $a1, $a1, 2 -/* 187DAC 802594CC 24630001 */ addiu $v1, $v1, 1 -/* 187DB0 802594D0 3442FFFE */ ori $v0, $v0, 0xfffe -/* 187DB4 802594D4 A4820000 */ sh $v0, ($a0) -/* 187DB8 802594D8 28620010 */ slti $v0, $v1, 0x10 -/* 187DBC 802594DC 1440FFF9 */ bnez $v0, .L802594C4 -/* 187DC0 802594E0 24840002 */ addiu $a0, $a0, 2 -/* 187DC4 802594E4 01071021 */ addu $v0, $t0, $a3 -/* 187DC8 802594E8 ACC2076C */ sw $v0, 0x76c($a2) -/* 187DCC 802594EC 24E70020 */ addiu $a3, $a3, 0x20 -.L802594F0: -/* 187DD0 802594F0 810206CD */ lb $v0, 0x6cd($t0) -/* 187DD4 802594F4 25290001 */ addiu $t1, $t1, 1 -/* 187DD8 802594F8 0122102A */ slt $v0, $t1, $v0 -/* 187DDC 802594FC 1440FFEB */ bnez $v0, .L802594AC -/* 187DE0 80259500 24C60004 */ addiu $a2, $a2, 4 -.L80259504: -/* 187DE4 80259504 03E00008 */ jr $ra -/* 187DE8 80259508 00000000 */ nop diff --git a/ver/us/asm/nonmatchings/182B30/func_8025950C.s b/ver/us/asm/nonmatchings/182B30/func_8025950C.s deleted file mode 100644 index 8d5107807b..0000000000 --- a/ver/us/asm/nonmatchings/182B30/func_8025950C.s +++ /dev/null @@ -1,125 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_8025950C -/* 187DEC 8025950C 27BDFFD0 */ addiu $sp, $sp, -0x30 -/* 187DF0 80259510 AFB1001C */ sw $s1, 0x1c($sp) -/* 187DF4 80259514 0080882D */ daddu $s1, $a0, $zero -/* 187DF8 80259518 AFB20020 */ sw $s2, 0x20($sp) -/* 187DFC 8025951C 00A0902D */ daddu $s2, $a1, $zero -/* 187E00 80259520 AFB30024 */ sw $s3, 0x24($sp) -/* 187E04 80259524 00C0982D */ daddu $s3, $a2, $zero -/* 187E08 80259528 240600FF */ addiu $a2, $zero, 0xff -/* 187E0C 8025952C AFBF0028 */ sw $ra, 0x28($sp) -/* 187E10 80259530 AFB00018 */ sw $s0, 0x18($sp) -/* 187E14 80259534 86230098 */ lh $v1, 0x98($s1) -/* 187E18 80259538 8E3000C0 */ lw $s0, 0xc0($s1) -/* 187E1C 8025953C 0066102A */ slt $v0, $v1, $a2 -/* 187E20 80259540 10400003 */ beqz $v0, .L80259550 -/* 187E24 80259544 0000382D */ daddu $a3, $zero, $zero -/* 187E28 80259548 3C078000 */ lui $a3, 0x8000 -/* 187E2C 8025954C 0060302D */ daddu $a2, $v1, $zero -.L80259550: -/* 187E30 80259550 8E220000 */ lw $v0, ($s1) -/* 187E34 80259554 30420100 */ andi $v0, $v0, 0x100 -/* 187E38 80259558 1040000C */ beqz $v0, .L8025958C -/* 187E3C 8025955C 3C038080 */ lui $v1, 0x8080 -/* 187E40 80259560 34638081 */ ori $v1, $v1, 0x8081 -/* 187E44 80259564 00061100 */ sll $v0, $a2, 4 -/* 187E48 80259568 00461023 */ subu $v0, $v0, $a2 -/* 187E4C 8025956C 000210C0 */ sll $v0, $v0, 3 -/* 187E50 80259570 00430018 */ mult $v0, $v1 -/* 187E54 80259574 3C078000 */ lui $a3, 0x8000 -/* 187E58 80259578 00004010 */ mfhi $t0 -/* 187E5C 8025957C 01021821 */ addu $v1, $t0, $v0 -/* 187E60 80259580 000319C3 */ sra $v1, $v1, 7 -/* 187E64 80259584 000217C3 */ sra $v0, $v0, 0x1f -/* 187E68 80259588 00623023 */ subu $a2, $v1, $v0 -.L8025958C: -/* 187E6C 8025958C 92020768 */ lbu $v0, 0x768($s0) -/* 187E70 80259590 1040003F */ beqz $v0, .L80259690 -/* 187E74 80259594 0240282D */ daddu $a1, $s2, $zero -/* 187E78 80259598 96240088 */ lhu $a0, 0x88($s1) -/* 187E7C 8025959C 0C0B7A90 */ jal spr_get_npc_palettes -/* 187E80 802595A0 00000000 */ nop -/* 187E84 802595A4 AE0206D0 */ sw $v0, 0x6d0($s0) -/* 187E88 802595A8 0040202D */ daddu $a0, $v0, $zero -/* 187E8C 802595AC A20006CD */ sb $zero, 0x6cd($s0) -/* 187E90 802595B0 8C830000 */ lw $v1, ($a0) -/* 187E94 802595B4 2402FFFF */ addiu $v0, $zero, -1 -/* 187E98 802595B8 1062000C */ beq $v1, $v0, .L802595EC -/* 187E9C 802595BC 00000000 */ nop -/* 187EA0 802595C0 0080182D */ daddu $v1, $a0, $zero -/* 187EA4 802595C4 0040202D */ daddu $a0, $v0, $zero -.L802595C8: -/* 187EA8 802595C8 920206CD */ lbu $v0, 0x6cd($s0) -/* 187EAC 802595CC 24420001 */ addiu $v0, $v0, 1 -/* 187EB0 802595D0 A20206CD */ sb $v0, 0x6cd($s0) -/* 187EB4 802595D4 00021600 */ sll $v0, $v0, 0x18 -/* 187EB8 802595D8 00021583 */ sra $v0, $v0, 0x16 -/* 187EBC 802595DC 00431021 */ addu $v0, $v0, $v1 -/* 187EC0 802595E0 8C420000 */ lw $v0, ($v0) -/* 187EC4 802595E4 1444FFF8 */ bne $v0, $a0, .L802595C8 -/* 187EC8 802595E8 00000000 */ nop -.L802595EC: -/* 187ECC 802595EC 820206CD */ lb $v0, 0x6cd($s0) -/* 187ED0 802595F0 18400016 */ blez $v0, .L8025964C -/* 187ED4 802595F4 0000302D */ daddu $a2, $zero, $zero -.L802595F8: -/* 187ED8 802595F8 8E0206D0 */ lw $v0, 0x6d0($s0) -/* 187EDC 802595FC 00061880 */ sll $v1, $a2, 2 -/* 187EE0 80259600 00621821 */ addu $v1, $v1, $v0 -/* 187EE4 80259604 00061140 */ sll $v0, $a2, 5 -/* 187EE8 80259608 8C630000 */ lw $v1, ($v1) -/* 187EEC 8025960C 10600009 */ beqz $v1, .L80259634 -/* 187EF0 80259610 02022821 */ addu $a1, $s0, $v0 -/* 187EF4 80259614 0000202D */ daddu $a0, $zero, $zero -.L80259618: -/* 187EF8 80259618 94620000 */ lhu $v0, ($v1) -/* 187EFC 8025961C 24630002 */ addiu $v1, $v1, 2 -/* 187F00 80259620 24840001 */ addiu $a0, $a0, 1 -/* 187F04 80259624 A4A20000 */ sh $v0, ($a1) -/* 187F08 80259628 28820010 */ slti $v0, $a0, 0x10 -/* 187F0C 8025962C 1440FFFA */ bnez $v0, .L80259618 -/* 187F10 80259630 24A50002 */ addiu $a1, $a1, 2 -.L80259634: -/* 187F14 80259634 820206CD */ lb $v0, 0x6cd($s0) -/* 187F18 80259638 24C60001 */ addiu $a2, $a2, 1 -/* 187F1C 8025963C 00C2102A */ slt $v0, $a2, $v0 -/* 187F20 80259640 1440FFED */ bnez $v0, .L802595F8 -/* 187F24 80259644 00000000 */ nop -/* 187F28 80259648 820206CD */ lb $v0, 0x6cd($s0) -.L8025964C: -/* 187F2C 8025964C 1840000A */ blez $v0, .L80259678 -/* 187F30 80259650 0000302D */ daddu $a2, $zero, $zero -/* 187F34 80259654 0200202D */ daddu $a0, $s0, $zero -/* 187F38 80259658 0200182D */ daddu $v1, $s0, $zero -.L8025965C: -/* 187F3C 8025965C AC6406D4 */ sw $a0, 0x6d4($v1) -/* 187F40 80259660 24840020 */ addiu $a0, $a0, 0x20 -/* 187F44 80259664 820206CD */ lb $v0, 0x6cd($s0) -/* 187F48 80259668 24C60001 */ addiu $a2, $a2, 1 -/* 187F4C 8025966C 00C2102A */ slt $v0, $a2, $v0 -/* 187F50 80259670 1440FFFA */ bnez $v0, .L8025965C -/* 187F54 80259674 24630004 */ addiu $v1, $v1, 4 -.L80259678: -/* 187F58 80259678 0220202D */ daddu $a0, $s1, $zero -/* 187F5C 8025967C 0240282D */ daddu $a1, $s2, $zero -/* 187F60 80259680 0C0965B0 */ jal func_802596C0 -/* 187F64 80259684 0260302D */ daddu $a2, $s3, $zero -/* 187F68 80259688 080965A9 */ j .L802596A4 -/* 187F6C 8025968C 00000000 */ nop -.L80259690: -/* 187F70 80259690 8E240084 */ lw $a0, 0x84($s1) -/* 187F74 80259694 AFB30010 */ sw $s3, 0x10($sp) -/* 187F78 80259698 00872025 */ or $a0, $a0, $a3 -/* 187F7C 8025969C 0C0B78F6 */ jal spr_draw_npc_sprite -/* 187F80 802596A0 0000382D */ daddu $a3, $zero, $zero -.L802596A4: -/* 187F84 802596A4 8FBF0028 */ lw $ra, 0x28($sp) -/* 187F88 802596A8 8FB30024 */ lw $s3, 0x24($sp) -/* 187F8C 802596AC 8FB20020 */ lw $s2, 0x20($sp) -/* 187F90 802596B0 8FB1001C */ lw $s1, 0x1c($sp) -/* 187F94 802596B4 8FB00018 */ lw $s0, 0x18($sp) -/* 187F98 802596B8 03E00008 */ jr $ra -/* 187F9C 802596BC 27BD0030 */ addiu $sp, $sp, 0x30 diff --git a/ver/us/asm/nonmatchings/182B30/func_802597B0.s b/ver/us/asm/nonmatchings/182B30/func_802597B0.s deleted file mode 100644 index 4c65493c0f..0000000000 --- a/ver/us/asm/nonmatchings/182B30/func_802597B0.s +++ /dev/null @@ -1,123 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_802597B0 -/* 188090 802597B0 27BDFFD0 */ addiu $sp, $sp, -0x30 -/* 188094 802597B4 AFB1001C */ sw $s1, 0x1c($sp) -/* 188098 802597B8 0080882D */ daddu $s1, $a0, $zero -/* 18809C 802597BC AFB30024 */ sw $s3, 0x24($sp) -/* 1880A0 802597C0 00A0982D */ daddu $s3, $a1, $zero -/* 1880A4 802597C4 AFB20020 */ sw $s2, 0x20($sp) -/* 1880A8 802597C8 00C0902D */ daddu $s2, $a2, $zero -/* 1880AC 802597CC 240600FF */ addiu $a2, $zero, 0xff -/* 1880B0 802597D0 AFBF0028 */ sw $ra, 0x28($sp) -/* 1880B4 802597D4 AFB00018 */ sw $s0, 0x18($sp) -/* 1880B8 802597D8 86230098 */ lh $v1, 0x98($s1) -/* 1880BC 802597DC 8E3000C0 */ lw $s0, 0xc0($s1) -/* 1880C0 802597E0 0066102A */ slt $v0, $v1, $a2 -/* 1880C4 802597E4 10400003 */ beqz $v0, .L802597F4 -/* 1880C8 802597E8 0000202D */ daddu $a0, $zero, $zero -/* 1880CC 802597EC 3C048000 */ lui $a0, 0x8000 -/* 1880D0 802597F0 0060302D */ daddu $a2, $v1, $zero -.L802597F4: -/* 1880D4 802597F4 8E220000 */ lw $v0, ($s1) -/* 1880D8 802597F8 30420100 */ andi $v0, $v0, 0x100 -/* 1880DC 802597FC 1040000C */ beqz $v0, .L80259830 -/* 1880E0 80259800 3C038080 */ lui $v1, 0x8080 -/* 1880E4 80259804 34638081 */ ori $v1, $v1, 0x8081 -/* 1880E8 80259808 00061100 */ sll $v0, $a2, 4 -/* 1880EC 8025980C 00461023 */ subu $v0, $v0, $a2 -/* 1880F0 80259810 000210C0 */ sll $v0, $v0, 3 -/* 1880F4 80259814 00430018 */ mult $v0, $v1 -/* 1880F8 80259818 3C048000 */ lui $a0, 0x8000 -/* 1880FC 8025981C 00004010 */ mfhi $t0 -/* 188100 80259820 01021821 */ addu $v1, $t0, $v0 -/* 188104 80259824 000319C3 */ sra $v1, $v1, 7 -/* 188108 80259828 000217C3 */ sra $v0, $v0, 0x1f -/* 18810C 8025982C 00623023 */ subu $a2, $v1, $v0 -.L80259830: -/* 188110 80259830 92020768 */ lbu $v0, 0x768($s0) -/* 188114 80259834 5040003F */ beql $v0, $zero, .L80259934 -/* 188118 80259838 AFB20010 */ sw $s2, 0x10($sp) -/* 18811C 8025983C 96240088 */ lhu $a0, 0x88($s1) -/* 188120 80259840 0C0B7830 */ jal spr_get_player_palettes -/* 188124 80259844 00000000 */ nop -/* 188128 80259848 AE0206D0 */ sw $v0, 0x6d0($s0) -/* 18812C 8025984C 0040202D */ daddu $a0, $v0, $zero -/* 188130 80259850 A20006CD */ sb $zero, 0x6cd($s0) -/* 188134 80259854 8C830000 */ lw $v1, ($a0) -/* 188138 80259858 2402FFFF */ addiu $v0, $zero, -1 -/* 18813C 8025985C 1062000C */ beq $v1, $v0, .L80259890 -/* 188140 80259860 00000000 */ nop -/* 188144 80259864 0080182D */ daddu $v1, $a0, $zero -/* 188148 80259868 0040202D */ daddu $a0, $v0, $zero -.L8025986C: -/* 18814C 8025986C 920206CD */ lbu $v0, 0x6cd($s0) -/* 188150 80259870 24420001 */ addiu $v0, $v0, 1 -/* 188154 80259874 A20206CD */ sb $v0, 0x6cd($s0) -/* 188158 80259878 00021600 */ sll $v0, $v0, 0x18 -/* 18815C 8025987C 00021583 */ sra $v0, $v0, 0x16 -/* 188160 80259880 00431021 */ addu $v0, $v0, $v1 -/* 188164 80259884 8C420000 */ lw $v0, ($v0) -/* 188168 80259888 1444FFF8 */ bne $v0, $a0, .L8025986C -/* 18816C 8025988C 00000000 */ nop -.L80259890: -/* 188170 80259890 820206CD */ lb $v0, 0x6cd($s0) -/* 188174 80259894 18400016 */ blez $v0, .L802598F0 -/* 188178 80259898 0000302D */ daddu $a2, $zero, $zero -.L8025989C: -/* 18817C 8025989C 8E0206D0 */ lw $v0, 0x6d0($s0) -/* 188180 802598A0 00061880 */ sll $v1, $a2, 2 -/* 188184 802598A4 00621821 */ addu $v1, $v1, $v0 -/* 188188 802598A8 00061140 */ sll $v0, $a2, 5 -/* 18818C 802598AC 8C630000 */ lw $v1, ($v1) -/* 188190 802598B0 10600009 */ beqz $v1, .L802598D8 -/* 188194 802598B4 02022821 */ addu $a1, $s0, $v0 -/* 188198 802598B8 0000202D */ daddu $a0, $zero, $zero -.L802598BC: -/* 18819C 802598BC 94620000 */ lhu $v0, ($v1) -/* 1881A0 802598C0 24630002 */ addiu $v1, $v1, 2 -/* 1881A4 802598C4 24840001 */ addiu $a0, $a0, 1 -/* 1881A8 802598C8 A4A20000 */ sh $v0, ($a1) -/* 1881AC 802598CC 28820010 */ slti $v0, $a0, 0x10 -/* 1881B0 802598D0 1440FFFA */ bnez $v0, .L802598BC -/* 1881B4 802598D4 24A50002 */ addiu $a1, $a1, 2 -.L802598D8: -/* 1881B8 802598D8 820206CD */ lb $v0, 0x6cd($s0) -/* 1881BC 802598DC 24C60001 */ addiu $a2, $a2, 1 -/* 1881C0 802598E0 00C2102A */ slt $v0, $a2, $v0 -/* 1881C4 802598E4 1440FFED */ bnez $v0, .L8025989C -/* 1881C8 802598E8 00000000 */ nop -/* 1881CC 802598EC 820206CD */ lb $v0, 0x6cd($s0) -.L802598F0: -/* 1881D0 802598F0 1840000A */ blez $v0, .L8025991C -/* 1881D4 802598F4 0000302D */ daddu $a2, $zero, $zero -/* 1881D8 802598F8 0200202D */ daddu $a0, $s0, $zero -/* 1881DC 802598FC 0200182D */ daddu $v1, $s0, $zero -.L80259900: -/* 1881E0 80259900 AC6406D4 */ sw $a0, 0x6d4($v1) -/* 1881E4 80259904 24840020 */ addiu $a0, $a0, 0x20 -/* 1881E8 80259908 820206CD */ lb $v0, 0x6cd($s0) -/* 1881EC 8025990C 24C60001 */ addiu $a2, $a2, 1 -/* 1881F0 80259910 00C2102A */ slt $v0, $a2, $v0 -/* 1881F4 80259914 1440FFFA */ bnez $v0, .L80259900 -/* 1881F8 80259918 24630004 */ addiu $v1, $v1, 4 -.L8025991C: -/* 1881FC 8025991C 0220202D */ daddu $a0, $s1, $zero -/* 188200 80259920 0260282D */ daddu $a1, $s3, $zero -/* 188204 80259924 0C096657 */ jal func_8025995C -/* 188208 80259928 0240302D */ daddu $a2, $s2, $zero -/* 18820C 8025992C 08096650 */ j .L80259940 -/* 188210 80259930 00000000 */ nop -.L80259934: -/* 188214 80259934 0260282D */ daddu $a1, $s3, $zero -/* 188218 80259938 0C0B7710 */ jal spr_draw_player_sprite -/* 18821C 8025993C 0000382D */ daddu $a3, $zero, $zero -.L80259940: -/* 188220 80259940 8FBF0028 */ lw $ra, 0x28($sp) -/* 188224 80259944 8FB30024 */ lw $s3, 0x24($sp) -/* 188228 80259948 8FB20020 */ lw $s2, 0x20($sp) -/* 18822C 8025994C 8FB1001C */ lw $s1, 0x1c($sp) -/* 188230 80259950 8FB00018 */ lw $s0, 0x18($sp) -/* 188234 80259954 03E00008 */ jr $ra -/* 188238 80259958 27BD0030 */ addiu $sp, $sp, 0x30 diff --git a/ver/us/asm/nonmatchings/182B30/func_8025BAA0.s b/ver/us/asm/nonmatchings/182B30/func_8025BAA0.s deleted file mode 100644 index f00283ff65..0000000000 --- a/ver/us/asm/nonmatchings/182B30/func_8025BAA0.s +++ /dev/null @@ -1,453 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_8025BAA0 -/* 18A380 8025BAA0 27BDFFC8 */ addiu $sp, $sp, -0x38 -/* 18A384 8025BAA4 AFB40020 */ sw $s4, 0x20($sp) -/* 18A388 8025BAA8 0080A02D */ daddu $s4, $a0, $zero -/* 18A38C 8025BAAC AFB20018 */ sw $s2, 0x18($sp) -/* 18A390 8025BAB0 00A0902D */ daddu $s2, $a1, $zero -/* 18A394 8025BAB4 AFB50024 */ sw $s5, 0x24($sp) -/* 18A398 8025BAB8 00C0A82D */ daddu $s5, $a2, $zero -/* 18A39C 8025BABC AFB3001C */ sw $s3, 0x1c($sp) -/* 18A3A0 8025BAC0 AFBF0030 */ sw $ra, 0x30($sp) -/* 18A3A4 8025BAC4 AFB7002C */ sw $s7, 0x2c($sp) -/* 18A3A8 8025BAC8 AFB60028 */ sw $s6, 0x28($sp) -/* 18A3AC 8025BACC AFB10014 */ sw $s1, 0x14($sp) -/* 18A3B0 8025BAD0 AFB00010 */ sw $s0, 0x10($sp) -/* 18A3B4 8025BAD4 8E5000C0 */ lw $s0, 0xc0($s2) -/* 18A3B8 8025BAD8 8FB60048 */ lw $s6, 0x48($sp) -/* 18A3BC 8025BADC 820206C1 */ lb $v0, 0x6c1($s0) -/* 18A3C0 8025BAE0 8FB1004C */ lw $s1, 0x4c($sp) -/* 18A3C4 8025BAE4 1040005A */ beqz $v0, .L8025BC50 -/* 18A3C8 8025BAE8 00E0982D */ daddu $s3, $a3, $zero -/* 18A3CC 8025BAEC 16800016 */ bnez $s4, .L8025BB48 -/* 18A3D0 8025BAF0 00000000 */ nop -/* 18A3D4 8025BAF4 0C0B7830 */ jal spr_get_player_palettes -/* 18A3D8 8025BAF8 96440088 */ lhu $a0, 0x88($s2) -/* 18A3DC 8025BAFC AE0206D0 */ sw $v0, 0x6d0($s0) -/* 18A3E0 8025BB00 0040202D */ daddu $a0, $v0, $zero -/* 18A3E4 8025BB04 A20006CD */ sb $zero, 0x6cd($s0) -/* 18A3E8 8025BB08 8C830000 */ lw $v1, ($a0) -/* 18A3EC 8025BB0C 2402FFFF */ addiu $v0, $zero, -1 -/* 18A3F0 8025BB10 10620020 */ beq $v1, $v0, .L8025BB94 -/* 18A3F4 8025BB14 0080182D */ daddu $v1, $a0, $zero -/* 18A3F8 8025BB18 0040202D */ daddu $a0, $v0, $zero -.L8025BB1C: -/* 18A3FC 8025BB1C 920206CD */ lbu $v0, 0x6cd($s0) -/* 18A400 8025BB20 24420001 */ addiu $v0, $v0, 1 -/* 18A404 8025BB24 A20206CD */ sb $v0, 0x6cd($s0) -/* 18A408 8025BB28 00021600 */ sll $v0, $v0, 0x18 -/* 18A40C 8025BB2C 00021583 */ sra $v0, $v0, 0x16 -/* 18A410 8025BB30 00431021 */ addu $v0, $v0, $v1 -/* 18A414 8025BB34 8C420000 */ lw $v0, ($v0) -/* 18A418 8025BB38 10440016 */ beq $v0, $a0, .L8025BB94 -/* 18A41C 8025BB3C 00000000 */ nop -/* 18A420 8025BB40 08096EC7 */ j .L8025BB1C -/* 18A424 8025BB44 00000000 */ nop -.L8025BB48: -/* 18A428 8025BB48 0C0B7A90 */ jal spr_get_npc_palettes -/* 18A42C 8025BB4C 96440088 */ lhu $a0, 0x88($s2) -/* 18A430 8025BB50 AE0206D0 */ sw $v0, 0x6d0($s0) -/* 18A434 8025BB54 0040202D */ daddu $a0, $v0, $zero -/* 18A438 8025BB58 A20006CD */ sb $zero, 0x6cd($s0) -/* 18A43C 8025BB5C 8C830000 */ lw $v1, ($a0) -/* 18A440 8025BB60 2402FFFF */ addiu $v0, $zero, -1 -/* 18A444 8025BB64 1062000B */ beq $v1, $v0, .L8025BB94 -/* 18A448 8025BB68 0080182D */ daddu $v1, $a0, $zero -/* 18A44C 8025BB6C 0040202D */ daddu $a0, $v0, $zero -.L8025BB70: -/* 18A450 8025BB70 920206CD */ lbu $v0, 0x6cd($s0) -/* 18A454 8025BB74 24420001 */ addiu $v0, $v0, 1 -/* 18A458 8025BB78 A20206CD */ sb $v0, 0x6cd($s0) -/* 18A45C 8025BB7C 00021600 */ sll $v0, $v0, 0x18 -/* 18A460 8025BB80 00021583 */ sra $v0, $v0, 0x16 -/* 18A464 8025BB84 00431021 */ addu $v0, $v0, $v1 -/* 18A468 8025BB88 8C420000 */ lw $v0, ($v0) -/* 18A46C 8025BB8C 1444FFF8 */ bne $v0, $a0, .L8025BB70 -/* 18A470 8025BB90 00000000 */ nop -.L8025BB94: -/* 18A474 8025BB94 820306C1 */ lb $v1, 0x6c1($s0) -/* 18A478 8025BB98 24020001 */ addiu $v0, $zero, 1 -/* 18A47C 8025BB9C 14620004 */ bne $v1, $v0, .L8025BBB0 -/* 18A480 8025BBA0 240200FF */ addiu $v0, $zero, 0xff -/* 18A484 8025BBA4 A20006C2 */ sb $zero, 0x6c2($s0) -/* 18A488 8025BBA8 08096EEE */ j .L8025BBB8 -/* 18A48C 8025BBAC A60006CA */ sh $zero, 0x6ca($s0) -.L8025BBB0: -/* 18A490 8025BBB0 A20006C2 */ sb $zero, 0x6c2($s0) -/* 18A494 8025BBB4 A60206CA */ sh $v0, 0x6ca($s0) -.L8025BBB8: -/* 18A498 8025BBB8 820206CD */ lb $v0, 0x6cd($s0) -/* 18A49C 8025BBBC 18400017 */ blez $v0, .L8025BC1C -/* 18A4A0 8025BBC0 0000202D */ daddu $a0, $zero, $zero -/* 18A4A4 8025BBC4 0200282D */ daddu $a1, $s0, $zero -.L8025BBC8: -/* 18A4A8 8025BBC8 8E0206D0 */ lw $v0, 0x6d0($s0) -/* 18A4AC 8025BBCC 00041880 */ sll $v1, $a0, 2 -/* 18A4B0 8025BBD0 00621821 */ addu $v1, $v1, $v0 -/* 18A4B4 8025BBD4 00041140 */ sll $v0, $a0, 5 -/* 18A4B8 8025BBD8 8C6A0000 */ lw $t2, ($v1) -/* 18A4BC 8025BBDC 02024821 */ addu $t1, $s0, $v0 -/* 18A4C0 8025BBE0 11400009 */ beqz $t2, .L8025BC08 -/* 18A4C4 8025BBE4 ACA906D4 */ sw $t1, 0x6d4($a1) -/* 18A4C8 8025BBE8 0000582D */ daddu $t3, $zero, $zero -.L8025BBEC: -/* 18A4CC 8025BBEC 95420000 */ lhu $v0, ($t2) -/* 18A4D0 8025BBF0 254A0002 */ addiu $t2, $t2, 2 -/* 18A4D4 8025BBF4 256B0001 */ addiu $t3, $t3, 1 -/* 18A4D8 8025BBF8 A5220000 */ sh $v0, ($t1) -/* 18A4DC 8025BBFC 29620010 */ slti $v0, $t3, 0x10 -/* 18A4E0 8025BC00 1440FFFA */ bnez $v0, .L8025BBEC -/* 18A4E4 8025BC04 25290002 */ addiu $t1, $t1, 2 -.L8025BC08: -/* 18A4E8 8025BC08 820206CD */ lb $v0, 0x6cd($s0) -/* 18A4EC 8025BC0C 24840001 */ addiu $a0, $a0, 1 -/* 18A4F0 8025BC10 0082102A */ slt $v0, $a0, $v0 -/* 18A4F4 8025BC14 1440FFEC */ bnez $v0, .L8025BBC8 -/* 18A4F8 8025BC18 24A50004 */ addiu $a1, $a1, 4 -.L8025BC1C: -/* 18A4FC 8025BC1C 16600007 */ bnez $s3, .L8025BC3C -/* 18A500 8025BC20 00000000 */ nop -/* 18A504 8025BC24 96020744 */ lhu $v0, 0x744($s0) -/* 18A508 8025BC28 A6000744 */ sh $zero, 0x744($s0) -/* 18A50C 8025BC2C A6020746 */ sh $v0, 0x746($s0) -/* 18A510 8025BC30 0040182D */ daddu $v1, $v0, $zero -/* 18A514 8025BC34 A6020748 */ sh $v0, 0x748($s0) -/* 18A518 8025BC38 A603074A */ sh $v1, 0x74a($s0) -.L8025BC3C: -/* 18A51C 8025BC3C 96020744 */ lhu $v0, 0x744($s0) -/* 18A520 8025BC40 A60006CA */ sh $zero, 0x6ca($s0) -/* 18A524 8025BC44 A20006C2 */ sb $zero, 0x6c2($s0) -/* 18A528 8025BC48 A20006C1 */ sb $zero, 0x6c1($s0) -/* 18A52C 8025BC4C A60206C8 */ sh $v0, 0x6c8($s0) -.L8025BC50: -/* 18A530 8025BC50 820306C2 */ lb $v1, 0x6c2($s0) -/* 18A534 8025BC54 10600005 */ beqz $v1, .L8025BC6C -/* 18A538 8025BC58 24020001 */ addiu $v0, $zero, 1 -/* 18A53C 8025BC5C 1062000E */ beq $v1, $v0, .L8025BC98 -/* 18A540 8025BC60 24020002 */ addiu $v0, $zero, 2 -/* 18A544 8025BC64 08096FA3 */ j .L8025BE8C -/* 18A548 8025BC68 00000000 */ nop -.L8025BC6C: -/* 18A54C 8025BC6C 16200085 */ bnez $s1, .L8025BE84 -/* 18A550 8025BC70 00000000 */ nop -/* 18A554 8025BC74 860206C8 */ lh $v0, 0x6c8($s0) -/* 18A558 8025BC78 960306C8 */ lhu $v1, 0x6c8($s0) -/* 18A55C 8025BC7C 10400003 */ beqz $v0, .L8025BC8C -/* 18A560 8025BC80 2462FFFF */ addiu $v0, $v1, -1 -/* 18A564 8025BC84 08096FA1 */ j .L8025BE84 -/* 18A568 8025BC88 A60206C8 */ sh $v0, 0x6c8($s0) -.L8025BC8C: -/* 18A56C 8025BC8C 24020001 */ addiu $v0, $zero, 1 -/* 18A570 8025BC90 A60006CA */ sh $zero, 0x6ca($s0) -/* 18A574 8025BC94 A20206C2 */ sb $v0, 0x6c2($s0) -.L8025BC98: -/* 18A578 8025BC98 16200018 */ bnez $s1, .L8025BCFC -/* 18A57C 8025BC9C 3C0651EB */ lui $a2, 0x51eb -/* 18A580 8025BCA0 86020746 */ lh $v0, 0x746($s0) -/* 18A584 8025BCA4 24036400 */ addiu $v1, $zero, 0x6400 -/* 18A588 8025BCA8 14400002 */ bnez $v0, .L8025BCB4 -/* 18A58C 8025BCAC 0062001A */ div $zero, $v1, $v0 -/* 18A590 8025BCB0 0007000D */ break 7 -.L8025BCB4: -/* 18A594 8025BCB4 2401FFFF */ addiu $at, $zero, -1 -/* 18A598 8025BCB8 14410004 */ bne $v0, $at, .L8025BCCC -/* 18A59C 8025BCBC 3C018000 */ lui $at, 0x8000 -/* 18A5A0 8025BCC0 14610002 */ bne $v1, $at, .L8025BCCC -/* 18A5A4 8025BCC4 00000000 */ nop -/* 18A5A8 8025BCC8 0006000D */ break 6 -.L8025BCCC: -/* 18A5AC 8025BCCC 00001812 */ mflo $v1 -/* 18A5B0 8025BCD0 960206CA */ lhu $v0, 0x6ca($s0) -/* 18A5B4 8025BCD4 00431021 */ addu $v0, $v0, $v1 -/* 18A5B8 8025BCD8 A60206CA */ sh $v0, 0x6ca($s0) -/* 18A5BC 8025BCDC 00021400 */ sll $v0, $v0, 0x10 -/* 18A5C0 8025BCE0 00021403 */ sra $v0, $v0, 0x10 -/* 18A5C4 8025BCE4 2842639D */ slti $v0, $v0, 0x639d -/* 18A5C8 8025BCE8 14400005 */ bnez $v0, .L8025BD00 -/* 18A5CC 8025BCEC 34C6851F */ ori $a2, $a2, 0x851f -/* 18A5D0 8025BCF0 2402639C */ addiu $v0, $zero, 0x639c -/* 18A5D4 8025BCF4 A60206CA */ sh $v0, 0x6ca($s0) -/* 18A5D8 8025BCF8 3C0651EB */ lui $a2, 0x51eb -.L8025BCFC: -/* 18A5DC 8025BCFC 34C6851F */ ori $a2, $a2, 0x851f -.L8025BD00: -/* 18A5E0 8025BD00 0200682D */ daddu $t5, $s0, $zero -/* 18A5E4 8025BD04 0000582D */ daddu $t3, $zero, $zero -/* 18A5E8 8025BD08 3C0F8080 */ lui $t7, 0x8080 -/* 18A5EC 8025BD0C 35EF8081 */ ori $t7, $t7, 0x8081 -/* 18A5F0 8025BD10 86020740 */ lh $v0, 0x740($s0) -/* 18A5F4 8025BD14 8E0506D0 */ lw $a1, 0x6d0($s0) -/* 18A5F8 8025BD18 960306CA */ lhu $v1, 0x6ca($s0) -/* 18A5FC 8025BD1C 00021080 */ sll $v0, $v0, 2 -/* 18A600 8025BD20 00451021 */ addu $v0, $v0, $a1 -/* 18A604 8025BD24 00031C00 */ sll $v1, $v1, 0x10 -/* 18A608 8025BD28 00032403 */ sra $a0, $v1, 0x10 -/* 18A60C 8025BD2C 8C4A0000 */ lw $t2, ($v0) -/* 18A610 8025BD30 86020742 */ lh $v0, 0x742($s0) -/* 18A614 8025BD34 00860018 */ mult $a0, $a2 -/* 18A618 8025BD38 00021080 */ sll $v0, $v0, 2 -/* 18A61C 8025BD3C 00451021 */ addu $v0, $v0, $a1 -/* 18A620 8025BD40 8C490000 */ lw $t1, ($v0) -/* 18A624 8025BD44 00031FC3 */ sra $v1, $v1, 0x1f -/* 18A628 8025BD48 AE1006D4 */ sw $s0, 0x6d4($s0) -/* 18A62C 8025BD4C 0000C810 */ mfhi $t9 -/* 18A630 8025BD50 00191143 */ sra $v0, $t9, 5 -/* 18A634 8025BD54 0043C023 */ subu $t8, $v0, $v1 -/* 18A638 8025BD58 330C00FF */ andi $t4, $t8, 0xff -/* 18A63C 8025BD5C 240200FF */ addiu $v0, $zero, 0xff -/* 18A640 8025BD60 004C7023 */ subu $t6, $v0, $t4 -.L8025BD64: -/* 18A644 8025BD64 95430000 */ lhu $v1, ($t2) -/* 18A648 8025BD68 000312C2 */ srl $v0, $v1, 0xb -/* 18A64C 8025BD6C 004E0018 */ mult $v0, $t6 -/* 18A650 8025BD70 95240000 */ lhu $a0, ($t1) -/* 18A654 8025BD74 00002812 */ mflo $a1 -/* 18A658 8025BD78 000412C2 */ srl $v0, $a0, 0xb -/* 18A65C 8025BD7C 00000000 */ nop -/* 18A660 8025BD80 004C0018 */ mult $v0, $t4 -/* 18A664 8025BD84 00004012 */ mflo $t0 -/* 18A668 8025BD88 00A82821 */ addu $a1, $a1, $t0 -/* 18A66C 8025BD8C 00000000 */ nop -/* 18A670 8025BD90 00AF0018 */ mult $a1, $t7 -/* 18A674 8025BD94 00009810 */ mfhi $s3 -/* 18A678 8025BD98 00031182 */ srl $v0, $v1, 6 -/* 18A67C 8025BD9C 3042001F */ andi $v0, $v0, 0x1f -/* 18A680 8025BDA0 004E0018 */ mult $v0, $t6 -/* 18A684 8025BDA4 00004012 */ mflo $t0 -/* 18A688 8025BDA8 00041182 */ srl $v0, $a0, 6 -/* 18A68C 8025BDAC 3042001F */ andi $v0, $v0, 0x1f -/* 18A690 8025BDB0 004C0018 */ mult $v0, $t4 -/* 18A694 8025BDB4 00003812 */ mflo $a3 -/* 18A698 8025BDB8 00031842 */ srl $v1, $v1, 1 -/* 18A69C 8025BDBC 3063001F */ andi $v1, $v1, 0x1f -/* 18A6A0 8025BDC0 006E0018 */ mult $v1, $t6 -/* 18A6A4 8025BDC4 00001812 */ mflo $v1 -/* 18A6A8 8025BDC8 00042042 */ srl $a0, $a0, 1 -/* 18A6AC 8025BDCC 3084001F */ andi $a0, $a0, 0x1f -/* 18A6B0 8025BDD0 008C0018 */ mult $a0, $t4 -/* 18A6B4 8025BDD4 254A0002 */ addiu $t2, $t2, 2 -/* 18A6B8 8025BDD8 91260001 */ lbu $a2, 1($t1) -/* 18A6BC 8025BDDC 25290002 */ addiu $t1, $t1, 2 -/* 18A6C0 8025BDE0 0000B812 */ mflo $s7 -/* 18A6C4 8025BDE4 256B0001 */ addiu $t3, $t3, 1 -/* 18A6C8 8025BDE8 01072021 */ addu $a0, $t0, $a3 -/* 18A6CC 8025BDEC 008F0018 */ mult $a0, $t7 -/* 18A6D0 8025BDF0 30C60001 */ andi $a2, $a2, 1 -/* 18A6D4 8025BDF4 02651021 */ addu $v0, $s3, $a1 -/* 18A6D8 8025BDF8 000211C3 */ sra $v0, $v0, 7 -/* 18A6DC 8025BDFC 00052FC3 */ sra $a1, $a1, 0x1f -/* 18A6E0 8025BE00 00004010 */ mfhi $t0 -/* 18A6E4 8025BE04 00453823 */ subu $a3, $v0, $a1 -/* 18A6E8 8025BE08 00771821 */ addu $v1, $v1, $s7 -/* 18A6EC 8025BE0C 006F0018 */ mult $v1, $t7 -/* 18A6F0 8025BE10 01041021 */ addu $v0, $t0, $a0 -/* 18A6F4 8025BE14 000211C3 */ sra $v0, $v0, 7 -/* 18A6F8 8025BE18 000427C3 */ sra $a0, $a0, 0x1f -/* 18A6FC 8025BE1C 00442823 */ subu $a1, $v0, $a0 -/* 18A700 8025BE20 00009810 */ mfhi $s3 -/* 18A704 8025BE24 02631021 */ addu $v0, $s3, $v1 -/* 18A708 8025BE28 000211C3 */ sra $v0, $v0, 7 -/* 18A70C 8025BE2C 00031FC3 */ sra $v1, $v1, 0x1f -/* 18A710 8025BE30 00432023 */ subu $a0, $v0, $v1 -/* 18A714 8025BE34 30E300FF */ andi $v1, $a3, 0xff -/* 18A718 8025BE38 00031AC0 */ sll $v1, $v1, 0xb -/* 18A71C 8025BE3C 30A200FF */ andi $v0, $a1, 0xff -/* 18A720 8025BE40 00021180 */ sll $v0, $v0, 6 -/* 18A724 8025BE44 00621825 */ or $v1, $v1, $v0 -/* 18A728 8025BE48 308200FF */ andi $v0, $a0, 0xff -/* 18A72C 8025BE4C 00021040 */ sll $v0, $v0, 1 -/* 18A730 8025BE50 00621825 */ or $v1, $v1, $v0 -/* 18A734 8025BE54 00C33025 */ or $a2, $a2, $v1 -/* 18A738 8025BE58 A5A60000 */ sh $a2, ($t5) -/* 18A73C 8025BE5C 29620010 */ slti $v0, $t3, 0x10 -/* 18A740 8025BE60 1440FFC0 */ bnez $v0, .L8025BD64 -/* 18A744 8025BE64 25AD0002 */ addiu $t5, $t5, 2 -/* 18A748 8025BE68 330300FF */ andi $v1, $t8, 0xff -/* 18A74C 8025BE6C 240200FF */ addiu $v0, $zero, 0xff -/* 18A750 8025BE70 14620004 */ bne $v1, $v0, .L8025BE84 -/* 18A754 8025BE74 24020002 */ addiu $v0, $zero, 2 -/* 18A758 8025BE78 96030748 */ lhu $v1, 0x748($s0) -/* 18A75C 8025BE7C A20206C2 */ sb $v0, 0x6c2($s0) -/* 18A760 8025BE80 A60306C8 */ sh $v1, 0x6c8($s0) -.L8025BE84: -/* 18A764 8025BE84 820306C2 */ lb $v1, 0x6c2($s0) -/* 18A768 8025BE88 24020002 */ addiu $v0, $zero, 2 -.L8025BE8C: -/* 18A76C 8025BE8C 10620005 */ beq $v1, $v0, .L8025BEA4 -/* 18A770 8025BE90 24020003 */ addiu $v0, $zero, 3 -/* 18A774 8025BE94 1062000C */ beq $v1, $v0, .L8025BEC8 -/* 18A778 8025BE98 00000000 */ nop -/* 18A77C 8025BE9C 0809702D */ j .L8025C0B4 -/* 18A780 8025BEA0 00000000 */ nop -.L8025BEA4: -/* 18A784 8025BEA4 16200083 */ bnez $s1, .L8025C0B4 -/* 18A788 8025BEA8 00000000 */ nop -/* 18A78C 8025BEAC 860206C8 */ lh $v0, 0x6c8($s0) -/* 18A790 8025BEB0 960306C8 */ lhu $v1, 0x6c8($s0) -/* 18A794 8025BEB4 1440007E */ bnez $v0, .L8025C0B0 -/* 18A798 8025BEB8 2462FFFF */ addiu $v0, $v1, -1 -/* 18A79C 8025BEBC 24020003 */ addiu $v0, $zero, 3 -/* 18A7A0 8025BEC0 A60006CA */ sh $zero, 0x6ca($s0) -/* 18A7A4 8025BEC4 A20206C2 */ sb $v0, 0x6c2($s0) -.L8025BEC8: -/* 18A7A8 8025BEC8 16200018 */ bnez $s1, .L8025BF2C -/* 18A7AC 8025BECC 3C0651EB */ lui $a2, 0x51eb -/* 18A7B0 8025BED0 8602074A */ lh $v0, 0x74a($s0) -/* 18A7B4 8025BED4 24036400 */ addiu $v1, $zero, 0x6400 -/* 18A7B8 8025BED8 14400002 */ bnez $v0, .L8025BEE4 -/* 18A7BC 8025BEDC 0062001A */ div $zero, $v1, $v0 -/* 18A7C0 8025BEE0 0007000D */ break 7 -.L8025BEE4: -/* 18A7C4 8025BEE4 2401FFFF */ addiu $at, $zero, -1 -/* 18A7C8 8025BEE8 14410004 */ bne $v0, $at, .L8025BEFC -/* 18A7CC 8025BEEC 3C018000 */ lui $at, 0x8000 -/* 18A7D0 8025BEF0 14610002 */ bne $v1, $at, .L8025BEFC -/* 18A7D4 8025BEF4 00000000 */ nop -/* 18A7D8 8025BEF8 0006000D */ break 6 -.L8025BEFC: -/* 18A7DC 8025BEFC 00001812 */ mflo $v1 -/* 18A7E0 8025BF00 960206CA */ lhu $v0, 0x6ca($s0) -/* 18A7E4 8025BF04 00431021 */ addu $v0, $v0, $v1 -/* 18A7E8 8025BF08 A60206CA */ sh $v0, 0x6ca($s0) -/* 18A7EC 8025BF0C 00021400 */ sll $v0, $v0, 0x10 -/* 18A7F0 8025BF10 00021403 */ sra $v0, $v0, 0x10 -/* 18A7F4 8025BF14 2842639D */ slti $v0, $v0, 0x639d -/* 18A7F8 8025BF18 14400005 */ bnez $v0, .L8025BF30 -/* 18A7FC 8025BF1C 34C6851F */ ori $a2, $a2, 0x851f -/* 18A800 8025BF20 2402639C */ addiu $v0, $zero, 0x639c -/* 18A804 8025BF24 A60206CA */ sh $v0, 0x6ca($s0) -/* 18A808 8025BF28 3C0651EB */ lui $a2, 0x51eb -.L8025BF2C: -/* 18A80C 8025BF2C 34C6851F */ ori $a2, $a2, 0x851f -.L8025BF30: -/* 18A810 8025BF30 0200682D */ daddu $t5, $s0, $zero -/* 18A814 8025BF34 0000582D */ daddu $t3, $zero, $zero -/* 18A818 8025BF38 3C0F8080 */ lui $t7, 0x8080 -/* 18A81C 8025BF3C 35EF8081 */ ori $t7, $t7, 0x8081 -/* 18A820 8025BF40 86020742 */ lh $v0, 0x742($s0) -/* 18A824 8025BF44 8E0506D0 */ lw $a1, 0x6d0($s0) -/* 18A828 8025BF48 960306CA */ lhu $v1, 0x6ca($s0) -/* 18A82C 8025BF4C 00021080 */ sll $v0, $v0, 2 -/* 18A830 8025BF50 00451021 */ addu $v0, $v0, $a1 -/* 18A834 8025BF54 00031C00 */ sll $v1, $v1, 0x10 -/* 18A838 8025BF58 00032403 */ sra $a0, $v1, 0x10 -/* 18A83C 8025BF5C 8C4A0000 */ lw $t2, ($v0) -/* 18A840 8025BF60 86020740 */ lh $v0, 0x740($s0) -/* 18A844 8025BF64 00860018 */ mult $a0, $a2 -/* 18A848 8025BF68 00021080 */ sll $v0, $v0, 2 -/* 18A84C 8025BF6C 00451021 */ addu $v0, $v0, $a1 -/* 18A850 8025BF70 8C490000 */ lw $t1, ($v0) -/* 18A854 8025BF74 00031FC3 */ sra $v1, $v1, 0x1f -/* 18A858 8025BF78 AE1006D4 */ sw $s0, 0x6d4($s0) -/* 18A85C 8025BF7C 0000C810 */ mfhi $t9 -/* 18A860 8025BF80 00191143 */ sra $v0, $t9, 5 -/* 18A864 8025BF84 0043C023 */ subu $t8, $v0, $v1 -/* 18A868 8025BF88 330C00FF */ andi $t4, $t8, 0xff -/* 18A86C 8025BF8C 240200FF */ addiu $v0, $zero, 0xff -/* 18A870 8025BF90 004C7023 */ subu $t6, $v0, $t4 -.L8025BF94: -/* 18A874 8025BF94 95430000 */ lhu $v1, ($t2) -/* 18A878 8025BF98 000312C2 */ srl $v0, $v1, 0xb -/* 18A87C 8025BF9C 004E0018 */ mult $v0, $t6 -/* 18A880 8025BFA0 95240000 */ lhu $a0, ($t1) -/* 18A884 8025BFA4 00002812 */ mflo $a1 -/* 18A888 8025BFA8 000412C2 */ srl $v0, $a0, 0xb -/* 18A88C 8025BFAC 00000000 */ nop -/* 18A890 8025BFB0 004C0018 */ mult $v0, $t4 -/* 18A894 8025BFB4 00004012 */ mflo $t0 -/* 18A898 8025BFB8 00A82821 */ addu $a1, $a1, $t0 -/* 18A89C 8025BFBC 00000000 */ nop -/* 18A8A0 8025BFC0 00AF0018 */ mult $a1, $t7 -/* 18A8A4 8025BFC4 00008810 */ mfhi $s1 -/* 18A8A8 8025BFC8 00031182 */ srl $v0, $v1, 6 -/* 18A8AC 8025BFCC 3042001F */ andi $v0, $v0, 0x1f -/* 18A8B0 8025BFD0 004E0018 */ mult $v0, $t6 -/* 18A8B4 8025BFD4 00004012 */ mflo $t0 -/* 18A8B8 8025BFD8 00041182 */ srl $v0, $a0, 6 -/* 18A8BC 8025BFDC 3042001F */ andi $v0, $v0, 0x1f -/* 18A8C0 8025BFE0 004C0018 */ mult $v0, $t4 -/* 18A8C4 8025BFE4 00003812 */ mflo $a3 -/* 18A8C8 8025BFE8 00031842 */ srl $v1, $v1, 1 -/* 18A8CC 8025BFEC 3063001F */ andi $v1, $v1, 0x1f -/* 18A8D0 8025BFF0 006E0018 */ mult $v1, $t6 -/* 18A8D4 8025BFF4 00001812 */ mflo $v1 -/* 18A8D8 8025BFF8 00042042 */ srl $a0, $a0, 1 -/* 18A8DC 8025BFFC 3084001F */ andi $a0, $a0, 0x1f -/* 18A8E0 8025C000 008C0018 */ mult $a0, $t4 -/* 18A8E4 8025C004 254A0002 */ addiu $t2, $t2, 2 -/* 18A8E8 8025C008 91260001 */ lbu $a2, 1($t1) -/* 18A8EC 8025C00C 25290002 */ addiu $t1, $t1, 2 -/* 18A8F0 8025C010 00009812 */ mflo $s3 -/* 18A8F4 8025C014 256B0001 */ addiu $t3, $t3, 1 -/* 18A8F8 8025C018 01072021 */ addu $a0, $t0, $a3 -/* 18A8FC 8025C01C 008F0018 */ mult $a0, $t7 -/* 18A900 8025C020 30C60001 */ andi $a2, $a2, 1 -/* 18A904 8025C024 02251021 */ addu $v0, $s1, $a1 -/* 18A908 8025C028 000211C3 */ sra $v0, $v0, 7 -/* 18A90C 8025C02C 00052FC3 */ sra $a1, $a1, 0x1f -/* 18A910 8025C030 00004010 */ mfhi $t0 -/* 18A914 8025C034 00453823 */ subu $a3, $v0, $a1 -/* 18A918 8025C038 00731821 */ addu $v1, $v1, $s3 -/* 18A91C 8025C03C 006F0018 */ mult $v1, $t7 -/* 18A920 8025C040 01041021 */ addu $v0, $t0, $a0 -/* 18A924 8025C044 000211C3 */ sra $v0, $v0, 7 -/* 18A928 8025C048 000427C3 */ sra $a0, $a0, 0x1f -/* 18A92C 8025C04C 00442823 */ subu $a1, $v0, $a0 -/* 18A930 8025C050 00008810 */ mfhi $s1 -/* 18A934 8025C054 02231021 */ addu $v0, $s1, $v1 -/* 18A938 8025C058 000211C3 */ sra $v0, $v0, 7 -/* 18A93C 8025C05C 00031FC3 */ sra $v1, $v1, 0x1f -/* 18A940 8025C060 00432023 */ subu $a0, $v0, $v1 -/* 18A944 8025C064 30E300FF */ andi $v1, $a3, 0xff -/* 18A948 8025C068 00031AC0 */ sll $v1, $v1, 0xb -/* 18A94C 8025C06C 30A200FF */ andi $v0, $a1, 0xff -/* 18A950 8025C070 00021180 */ sll $v0, $v0, 6 -/* 18A954 8025C074 00621825 */ or $v1, $v1, $v0 -/* 18A958 8025C078 308200FF */ andi $v0, $a0, 0xff -/* 18A95C 8025C07C 00021040 */ sll $v0, $v0, 1 -/* 18A960 8025C080 00621825 */ or $v1, $v1, $v0 -/* 18A964 8025C084 00C33025 */ or $a2, $a2, $v1 -/* 18A968 8025C088 A5A60000 */ sh $a2, ($t5) -/* 18A96C 8025C08C 29620010 */ slti $v0, $t3, 0x10 -/* 18A970 8025C090 1440FFC0 */ bnez $v0, .L8025BF94 -/* 18A974 8025C094 25AD0002 */ addiu $t5, $t5, 2 -/* 18A978 8025C098 330300FF */ andi $v1, $t8, 0xff -/* 18A97C 8025C09C 240200FF */ addiu $v0, $zero, 0xff -/* 18A980 8025C0A0 14620004 */ bne $v1, $v0, .L8025C0B4 -/* 18A984 8025C0A4 00000000 */ nop -/* 18A988 8025C0A8 96020744 */ lhu $v0, 0x744($s0) -/* 18A98C 8025C0AC A20006C2 */ sb $zero, 0x6c2($s0) -.L8025C0B0: -/* 18A990 8025C0B0 A60206C8 */ sh $v0, 0x6c8($s0) -.L8025C0B4: -/* 18A994 8025C0B4 820306C2 */ lb $v1, 0x6c2($s0) -/* 18A998 8025C0B8 28620004 */ slti $v0, $v1, 4 -/* 18A99C 8025C0BC 1040000D */ beqz $v0, .L8025C0F4 -/* 18A9A0 8025C0C0 00000000 */ nop -/* 18A9A4 8025C0C4 0460000B */ bltz $v1, .L8025C0F4 -/* 18A9A8 8025C0C8 00000000 */ nop -/* 18A9AC 8025C0CC 16800006 */ bnez $s4, .L8025C0E8 -/* 18A9B0 8025C0D0 0240202D */ daddu $a0, $s2, $zero -/* 18A9B4 8025C0D4 02A0282D */ daddu $a1, $s5, $zero -/* 18A9B8 8025C0D8 0C096657 */ jal func_8025995C -/* 18A9BC 8025C0DC 02C0302D */ daddu $a2, $s6, $zero -/* 18A9C0 8025C0E0 0809703D */ j .L8025C0F4 -/* 18A9C4 8025C0E4 00000000 */ nop -.L8025C0E8: -/* 18A9C8 8025C0E8 02A0282D */ daddu $a1, $s5, $zero -/* 18A9CC 8025C0EC 0C0965B0 */ jal func_802596C0 -/* 18A9D0 8025C0F0 02C0302D */ daddu $a2, $s6, $zero -.L8025C0F4: -/* 18A9D4 8025C0F4 8FBF0030 */ lw $ra, 0x30($sp) -/* 18A9D8 8025C0F8 8FB7002C */ lw $s7, 0x2c($sp) -/* 18A9DC 8025C0FC 8FB60028 */ lw $s6, 0x28($sp) -/* 18A9E0 8025C100 8FB50024 */ lw $s5, 0x24($sp) -/* 18A9E4 8025C104 8FB40020 */ lw $s4, 0x20($sp) -/* 18A9E8 8025C108 8FB3001C */ lw $s3, 0x1c($sp) -/* 18A9EC 8025C10C 8FB20018 */ lw $s2, 0x18($sp) -/* 18A9F0 8025C110 8FB10014 */ lw $s1, 0x14($sp) -/* 18A9F4 8025C114 8FB00010 */ lw $s0, 0x10($sp) -/* 18A9F8 8025C118 03E00008 */ jr $ra -/* 18A9FC 8025C11C 27BD0038 */ addiu $sp, $sp, 0x38 diff --git a/ver/us/asm/nonmatchings/182B30/func_8025C120.s b/ver/us/asm/nonmatchings/182B30/func_8025C120.s deleted file mode 100644 index b6dcea33e2..0000000000 --- a/ver/us/asm/nonmatchings/182B30/func_8025C120.s +++ /dev/null @@ -1,497 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_8025C120 -/* 18AA00 8025C120 27BDFFC0 */ addiu $sp, $sp, -0x40 -/* 18AA04 8025C124 AFB40028 */ sw $s4, 0x28($sp) -/* 18AA08 8025C128 0080A02D */ daddu $s4, $a0, $zero -/* 18AA0C 8025C12C AFB30024 */ sw $s3, 0x24($sp) -/* 18AA10 8025C130 00A0982D */ daddu $s3, $a1, $zero -/* 18AA14 8025C134 AFB5002C */ sw $s5, 0x2c($sp) -/* 18AA18 8025C138 00C0A82D */ daddu $s5, $a2, $zero -/* 18AA1C 8025C13C AFBF0038 */ sw $ra, 0x38($sp) -/* 18AA20 8025C140 AFB70034 */ sw $s7, 0x34($sp) -/* 18AA24 8025C144 AFB60030 */ sw $s6, 0x30($sp) -/* 18AA28 8025C148 AFB20020 */ sw $s2, 0x20($sp) -/* 18AA2C 8025C14C AFB1001C */ sw $s1, 0x1c($sp) -/* 18AA30 8025C150 AFB00018 */ sw $s0, 0x18($sp) -/* 18AA34 8025C154 8E7000C0 */ lw $s0, 0xc0($s3) -/* 18AA38 8025C158 820206C1 */ lb $v0, 0x6c1($s0) -/* 18AA3C 8025C15C 8FB20050 */ lw $s2, 0x50($sp) -/* 18AA40 8025C160 10400055 */ beqz $v0, .L8025C2B8 -/* 18AA44 8025C164 00E0B02D */ daddu $s6, $a3, $zero -/* 18AA48 8025C168 16800016 */ bnez $s4, .L8025C1C4 -/* 18AA4C 8025C16C 00000000 */ nop -/* 18AA50 8025C170 0C0B7830 */ jal spr_get_player_palettes -/* 18AA54 8025C174 96640088 */ lhu $a0, 0x88($s3) -/* 18AA58 8025C178 AE0206D0 */ sw $v0, 0x6d0($s0) -/* 18AA5C 8025C17C 0040202D */ daddu $a0, $v0, $zero -/* 18AA60 8025C180 A20006CD */ sb $zero, 0x6cd($s0) -/* 18AA64 8025C184 8C830000 */ lw $v1, ($a0) -/* 18AA68 8025C188 2402FFFF */ addiu $v0, $zero, -1 -/* 18AA6C 8025C18C 10620023 */ beq $v1, $v0, .L8025C21C -/* 18AA70 8025C190 0080182D */ daddu $v1, $a0, $zero -/* 18AA74 8025C194 0040202D */ daddu $a0, $v0, $zero -.L8025C198: -/* 18AA78 8025C198 920206CD */ lbu $v0, 0x6cd($s0) -/* 18AA7C 8025C19C 24420001 */ addiu $v0, $v0, 1 -/* 18AA80 8025C1A0 A20206CD */ sb $v0, 0x6cd($s0) -/* 18AA84 8025C1A4 00021600 */ sll $v0, $v0, 0x18 -/* 18AA88 8025C1A8 00021583 */ sra $v0, $v0, 0x16 -/* 18AA8C 8025C1AC 00431021 */ addu $v0, $v0, $v1 -/* 18AA90 8025C1B0 8C420000 */ lw $v0, ($v0) -/* 18AA94 8025C1B4 10440019 */ beq $v0, $a0, .L8025C21C -/* 18AA98 8025C1B8 00000000 */ nop -/* 18AA9C 8025C1BC 08097066 */ j .L8025C198 -/* 18AAA0 8025C1C0 00000000 */ nop -.L8025C1C4: -/* 18AAA4 8025C1C4 0C0B7A90 */ jal spr_get_npc_palettes -/* 18AAA8 8025C1C8 96640088 */ lhu $a0, 0x88($s3) -/* 18AAAC 8025C1CC AE0206D0 */ sw $v0, 0x6d0($s0) -/* 18AAB0 8025C1D0 0040202D */ daddu $a0, $v0, $zero -/* 18AAB4 8025C1D4 A20006CD */ sb $zero, 0x6cd($s0) -/* 18AAB8 8025C1D8 8C830000 */ lw $v1, ($a0) -/* 18AABC 8025C1DC 2402FFFF */ addiu $v0, $zero, -1 -/* 18AAC0 8025C1E0 1062000B */ beq $v1, $v0, .L8025C210 -/* 18AAC4 8025C1E4 0080182D */ daddu $v1, $a0, $zero -/* 18AAC8 8025C1E8 0040202D */ daddu $a0, $v0, $zero -.L8025C1EC: -/* 18AACC 8025C1EC 920206CD */ lbu $v0, 0x6cd($s0) -/* 18AAD0 8025C1F0 24420001 */ addiu $v0, $v0, 1 -/* 18AAD4 8025C1F4 A20206CD */ sb $v0, 0x6cd($s0) -/* 18AAD8 8025C1F8 00021600 */ sll $v0, $v0, 0x18 -/* 18AADC 8025C1FC 00021583 */ sra $v0, $v0, 0x16 -/* 18AAE0 8025C200 00431021 */ addu $v0, $v0, $v1 -/* 18AAE4 8025C204 8C420000 */ lw $v0, ($v0) -/* 18AAE8 8025C208 1444FFF8 */ bne $v0, $a0, .L8025C1EC -/* 18AAEC 8025C20C 00000000 */ nop -.L8025C210: -/* 18AAF0 8025C210 0C0B7A9B */ jal spr_get_npc_color_variations -/* 18AAF4 8025C214 96640088 */ lhu $a0, 0x88($s3) -/* 18AAF8 8025C218 A20206CC */ sb $v0, 0x6cc($s0) -.L8025C21C: -/* 18AAFC 8025C21C 820306C1 */ lb $v1, 0x6c1($s0) -/* 18AB00 8025C220 24020001 */ addiu $v0, $zero, 1 -/* 18AB04 8025C224 14620004 */ bne $v1, $v0, .L8025C238 -/* 18AB08 8025C228 240200FF */ addiu $v0, $zero, 0xff -/* 18AB0C 8025C22C A20006C2 */ sb $zero, 0x6c2($s0) -/* 18AB10 8025C230 08097090 */ j .L8025C240 -/* 18AB14 8025C234 A60006CA */ sh $zero, 0x6ca($s0) -.L8025C238: -/* 18AB18 8025C238 A20006C2 */ sb $zero, 0x6c2($s0) -/* 18AB1C 8025C23C A60206CA */ sh $v0, 0x6ca($s0) -.L8025C240: -/* 18AB20 8025C240 820206CD */ lb $v0, 0x6cd($s0) -/* 18AB24 8025C244 18400017 */ blez $v0, .L8025C2A4 -/* 18AB28 8025C248 0000602D */ daddu $t4, $zero, $zero -/* 18AB2C 8025C24C 0200202D */ daddu $a0, $s0, $zero -.L8025C250: -/* 18AB30 8025C250 8E0206D0 */ lw $v0, 0x6d0($s0) -/* 18AB34 8025C254 000C1880 */ sll $v1, $t4, 2 -/* 18AB38 8025C258 00621821 */ addu $v1, $v1, $v0 -/* 18AB3C 8025C25C 000C1140 */ sll $v0, $t4, 5 -/* 18AB40 8025C260 8C6B0000 */ lw $t3, ($v1) -/* 18AB44 8025C264 02024821 */ addu $t1, $s0, $v0 -/* 18AB48 8025C268 11600009 */ beqz $t3, .L8025C290 -/* 18AB4C 8025C26C AC8906D4 */ sw $t1, 0x6d4($a0) -/* 18AB50 8025C270 0000502D */ daddu $t2, $zero, $zero -.L8025C274: -/* 18AB54 8025C274 95620000 */ lhu $v0, ($t3) -/* 18AB58 8025C278 256B0002 */ addiu $t3, $t3, 2 -/* 18AB5C 8025C27C 254A0001 */ addiu $t2, $t2, 1 -/* 18AB60 8025C280 A5220000 */ sh $v0, ($t1) -/* 18AB64 8025C284 29420010 */ slti $v0, $t2, 0x10 -/* 18AB68 8025C288 1440FFFA */ bnez $v0, .L8025C274 -/* 18AB6C 8025C28C 25290002 */ addiu $t1, $t1, 2 -.L8025C290: -/* 18AB70 8025C290 820206CD */ lb $v0, 0x6cd($s0) -/* 18AB74 8025C294 258C0001 */ addiu $t4, $t4, 1 -/* 18AB78 8025C298 0182102A */ slt $v0, $t4, $v0 -/* 18AB7C 8025C29C 1440FFEC */ bnez $v0, .L8025C250 -/* 18AB80 8025C2A0 24840004 */ addiu $a0, $a0, 4 -.L8025C2A4: -/* 18AB84 8025C2A4 96020744 */ lhu $v0, 0x744($s0) -/* 18AB88 8025C2A8 A60006CA */ sh $zero, 0x6ca($s0) -/* 18AB8C 8025C2AC A20006C2 */ sb $zero, 0x6c2($s0) -/* 18AB90 8025C2B0 A20006C1 */ sb $zero, 0x6c1($s0) -/* 18AB94 8025C2B4 A60206C8 */ sh $v0, 0x6c8($s0) -.L8025C2B8: -/* 18AB98 8025C2B8 820306C2 */ lb $v1, 0x6c2($s0) -/* 18AB9C 8025C2BC 10600005 */ beqz $v1, .L8025C2D4 -/* 18ABA0 8025C2C0 24020001 */ addiu $v0, $zero, 1 -/* 18ABA4 8025C2C4 1062000E */ beq $v1, $v0, .L8025C300 -/* 18ABA8 8025C2C8 24020002 */ addiu $v0, $zero, 2 -/* 18ABAC 8025C2CC 08097156 */ j .L8025C558 -/* 18ABB0 8025C2D0 00000000 */ nop -.L8025C2D4: -/* 18ABB4 8025C2D4 1640009E */ bnez $s2, .L8025C550 -/* 18ABB8 8025C2D8 00000000 */ nop -/* 18ABBC 8025C2DC 860206C8 */ lh $v0, 0x6c8($s0) -/* 18ABC0 8025C2E0 960306C8 */ lhu $v1, 0x6c8($s0) -/* 18ABC4 8025C2E4 10400003 */ beqz $v0, .L8025C2F4 -/* 18ABC8 8025C2E8 2462FFFF */ addiu $v0, $v1, -1 -/* 18ABCC 8025C2EC 08097154 */ j .L8025C550 -/* 18ABD0 8025C2F0 A60206C8 */ sh $v0, 0x6c8($s0) -.L8025C2F4: -/* 18ABD4 8025C2F4 24020001 */ addiu $v0, $zero, 1 -/* 18ABD8 8025C2F8 A60006CA */ sh $zero, 0x6ca($s0) -/* 18ABDC 8025C2FC A20206C2 */ sb $v0, 0x6c2($s0) -.L8025C300: -/* 18ABE0 8025C300 16400018 */ bnez $s2, .L8025C364 -/* 18ABE4 8025C304 3C0451EB */ lui $a0, 0x51eb -/* 18ABE8 8025C308 86020746 */ lh $v0, 0x746($s0) -/* 18ABEC 8025C30C 24036400 */ addiu $v1, $zero, 0x6400 -/* 18ABF0 8025C310 14400002 */ bnez $v0, .L8025C31C -/* 18ABF4 8025C314 0062001A */ div $zero, $v1, $v0 -/* 18ABF8 8025C318 0007000D */ break 7 -.L8025C31C: -/* 18ABFC 8025C31C 2401FFFF */ addiu $at, $zero, -1 -/* 18AC00 8025C320 14410004 */ bne $v0, $at, .L8025C334 -/* 18AC04 8025C324 3C018000 */ lui $at, 0x8000 -/* 18AC08 8025C328 14610002 */ bne $v1, $at, .L8025C334 -/* 18AC0C 8025C32C 00000000 */ nop -/* 18AC10 8025C330 0006000D */ break 6 -.L8025C334: -/* 18AC14 8025C334 00001812 */ mflo $v1 -/* 18AC18 8025C338 960206CA */ lhu $v0, 0x6ca($s0) -/* 18AC1C 8025C33C 00431021 */ addu $v0, $v0, $v1 -/* 18AC20 8025C340 A60206CA */ sh $v0, 0x6ca($s0) -/* 18AC24 8025C344 00021400 */ sll $v0, $v0, 0x10 -/* 18AC28 8025C348 00021403 */ sra $v0, $v0, 0x10 -/* 18AC2C 8025C34C 2842639D */ slti $v0, $v0, 0x639d -/* 18AC30 8025C350 14400005 */ bnez $v0, .L8025C368 -/* 18AC34 8025C354 3484851F */ ori $a0, $a0, 0x851f -/* 18AC38 8025C358 2402639C */ addiu $v0, $zero, 0x639c -/* 18AC3C 8025C35C A60206CA */ sh $v0, 0x6ca($s0) -/* 18AC40 8025C360 3C0451EB */ lui $a0, 0x51eb -.L8025C364: -/* 18AC44 8025C364 3484851F */ ori $a0, $a0, 0x851f -.L8025C368: -/* 18AC48 8025C368 960306CA */ lhu $v1, 0x6ca($s0) -/* 18AC4C 8025C36C 00031C00 */ sll $v1, $v1, 0x10 -/* 18AC50 8025C370 00031403 */ sra $v0, $v1, 0x10 -/* 18AC54 8025C374 00440018 */ mult $v0, $a0 -/* 18AC58 8025C378 0000602D */ daddu $t4, $zero, $zero -/* 18AC5C 8025C37C 920506CC */ lbu $a1, 0x6cc($s0) -/* 18AC60 8025C380 00031FC3 */ sra $v1, $v1, 0x1f -/* 18AC64 8025C384 820206CC */ lb $v0, 0x6cc($s0) -/* 18AC68 8025C388 0000B810 */ mfhi $s7 -/* 18AC6C 8025C38C 00172143 */ sra $a0, $s7, 5 -/* 18AC70 8025C390 18400068 */ blez $v0, .L8025C534 -/* 18AC74 8025C394 00838823 */ subu $s1, $a0, $v1 -/* 18AC78 8025C398 322E00FF */ andi $t6, $s1, 0xff -/* 18AC7C 8025C39C 240200FF */ addiu $v0, $zero, 0xff -/* 18AC80 8025C3A0 004EC023 */ subu $t8, $v0, $t6 -/* 18AC84 8025C3A4 3C0F8080 */ lui $t7, 0x8080 -/* 18AC88 8025C3A8 35EF8081 */ ori $t7, $t7, 0x8081 -/* 18AC8C 8025C3AC 0200C82D */ daddu $t9, $s0, $zero -.L8025C3B0: -/* 18AC90 8025C3B0 00052600 */ sll $a0, $a1, 0x18 -/* 18AC94 8025C3B4 86020740 */ lh $v0, 0x740($s0) -/* 18AC98 8025C3B8 00042603 */ sra $a0, $a0, 0x18 -/* 18AC9C 8025C3BC 00440018 */ mult $v0, $a0 -/* 18ACA0 8025C3C0 86030742 */ lh $v1, 0x742($s0) -/* 18ACA4 8025C3C4 000C1140 */ sll $v0, $t4, 5 -/* 18ACA8 8025C3C8 0000B812 */ mflo $s7 -/* 18ACAC 8025C3CC 02026821 */ addu $t5, $s0, $v0 -/* 18ACB0 8025C3D0 02EC1021 */ addu $v0, $s7, $t4 -/* 18ACB4 8025C3D4 00640018 */ mult $v1, $a0 -/* 18ACB8 8025C3D8 8E0306D0 */ lw $v1, 0x6d0($s0) -/* 18ACBC 8025C3DC 00021080 */ sll $v0, $v0, 2 -/* 18ACC0 8025C3E0 00431021 */ addu $v0, $v0, $v1 -/* 18ACC4 8025C3E4 8C4B0000 */ lw $t3, ($v0) -/* 18ACC8 8025C3E8 0000B812 */ mflo $s7 -/* 18ACCC 8025C3EC 02EC1021 */ addu $v0, $s7, $t4 -/* 18ACD0 8025C3F0 00021080 */ sll $v0, $v0, 2 -/* 18ACD4 8025C3F4 00431021 */ addu $v0, $v0, $v1 -/* 18ACD8 8025C3F8 8C490000 */ lw $t1, ($v0) -/* 18ACDC 8025C3FC 0000502D */ daddu $t2, $zero, $zero -/* 18ACE0 8025C400 AF2D06D4 */ sw $t5, 0x6d4($t9) -.L8025C404: -/* 18ACE4 8025C404 95630000 */ lhu $v1, ($t3) -/* 18ACE8 8025C408 000312C2 */ srl $v0, $v1, 0xb -/* 18ACEC 8025C40C 00580018 */ mult $v0, $t8 -/* 18ACF0 8025C410 95240000 */ lhu $a0, ($t1) -/* 18ACF4 8025C414 00002812 */ mflo $a1 -/* 18ACF8 8025C418 000412C2 */ srl $v0, $a0, 0xb -/* 18ACFC 8025C41C 00000000 */ nop -/* 18AD00 8025C420 004E0018 */ mult $v0, $t6 -/* 18AD04 8025C424 00004012 */ mflo $t0 -/* 18AD08 8025C428 00A82821 */ addu $a1, $a1, $t0 -/* 18AD0C 8025C42C 00000000 */ nop -/* 18AD10 8025C430 00AF0018 */ mult $a1, $t7 -/* 18AD14 8025C434 0000B810 */ mfhi $s7 -/* 18AD18 8025C438 00031182 */ srl $v0, $v1, 6 -/* 18AD1C 8025C43C 3042001F */ andi $v0, $v0, 0x1f -/* 18AD20 8025C440 00580018 */ mult $v0, $t8 -/* 18AD24 8025C444 00004012 */ mflo $t0 -/* 18AD28 8025C448 00041182 */ srl $v0, $a0, 6 -/* 18AD2C 8025C44C 3042001F */ andi $v0, $v0, 0x1f -/* 18AD30 8025C450 004E0018 */ mult $v0, $t6 -/* 18AD34 8025C454 00003812 */ mflo $a3 -/* 18AD38 8025C458 00031842 */ srl $v1, $v1, 1 -/* 18AD3C 8025C45C 3063001F */ andi $v1, $v1, 0x1f -/* 18AD40 8025C460 00780018 */ mult $v1, $t8 -/* 18AD44 8025C464 256B0002 */ addiu $t3, $t3, 2 -/* 18AD48 8025C468 254A0001 */ addiu $t2, $t2, 1 -/* 18AD4C 8025C46C 00042042 */ srl $a0, $a0, 1 -/* 18AD50 8025C470 00001812 */ mflo $v1 -/* 18AD54 8025C474 3084001F */ andi $a0, $a0, 0x1f -/* 18AD58 8025C478 AFB70010 */ sw $s7, 0x10($sp) -/* 18AD5C 8025C47C 008E0018 */ mult $a0, $t6 -/* 18AD60 8025C480 91260001 */ lbu $a2, 1($t1) -/* 18AD64 8025C484 25290002 */ addiu $t1, $t1, 2 -/* 18AD68 8025C488 30C60001 */ andi $a2, $a2, 1 -/* 18AD6C 8025C48C 01072021 */ addu $a0, $t0, $a3 -/* 18AD70 8025C490 0000B812 */ mflo $s7 -/* 18AD74 8025C494 AFB70014 */ sw $s7, 0x14($sp) -/* 18AD78 8025C498 8FB70010 */ lw $s7, 0x10($sp) -/* 18AD7C 8025C49C 008F0018 */ mult $a0, $t7 -/* 18AD80 8025C4A0 02E51021 */ addu $v0, $s7, $a1 -/* 18AD84 8025C4A4 000211C3 */ sra $v0, $v0, 7 -/* 18AD88 8025C4A8 00052FC3 */ sra $a1, $a1, 0x1f -/* 18AD8C 8025C4AC 8FB70014 */ lw $s7, 0x14($sp) -/* 18AD90 8025C4B0 00004010 */ mfhi $t0 -/* 18AD94 8025C4B4 00453823 */ subu $a3, $v0, $a1 -/* 18AD98 8025C4B8 00771821 */ addu $v1, $v1, $s7 -/* 18AD9C 8025C4BC 006F0018 */ mult $v1, $t7 -/* 18ADA0 8025C4C0 01041021 */ addu $v0, $t0, $a0 -/* 18ADA4 8025C4C4 000211C3 */ sra $v0, $v0, 7 -/* 18ADA8 8025C4C8 000427C3 */ sra $a0, $a0, 0x1f -/* 18ADAC 8025C4CC 00442823 */ subu $a1, $v0, $a0 -/* 18ADB0 8025C4D0 0000B810 */ mfhi $s7 -/* 18ADB4 8025C4D4 AFB70010 */ sw $s7, 0x10($sp) -/* 18ADB8 8025C4D8 02E31021 */ addu $v0, $s7, $v1 -/* 18ADBC 8025C4DC 000211C3 */ sra $v0, $v0, 7 -/* 18ADC0 8025C4E0 00031FC3 */ sra $v1, $v1, 0x1f -/* 18ADC4 8025C4E4 00432023 */ subu $a0, $v0, $v1 -/* 18ADC8 8025C4E8 30E300FF */ andi $v1, $a3, 0xff -/* 18ADCC 8025C4EC 00031AC0 */ sll $v1, $v1, 0xb -/* 18ADD0 8025C4F0 30A200FF */ andi $v0, $a1, 0xff -/* 18ADD4 8025C4F4 00021180 */ sll $v0, $v0, 6 -/* 18ADD8 8025C4F8 00621825 */ or $v1, $v1, $v0 -/* 18ADDC 8025C4FC 308200FF */ andi $v0, $a0, 0xff -/* 18ADE0 8025C500 00021040 */ sll $v0, $v0, 1 -/* 18ADE4 8025C504 00621825 */ or $v1, $v1, $v0 -/* 18ADE8 8025C508 00C33025 */ or $a2, $a2, $v1 -/* 18ADEC 8025C50C A5A60000 */ sh $a2, ($t5) -/* 18ADF0 8025C510 29420010 */ slti $v0, $t2, 0x10 -/* 18ADF4 8025C514 1440FFBB */ bnez $v0, .L8025C404 -/* 18ADF8 8025C518 25AD0002 */ addiu $t5, $t5, 2 -/* 18ADFC 8025C51C 258C0001 */ addiu $t4, $t4, 1 -/* 18AE00 8025C520 820206CC */ lb $v0, 0x6cc($s0) -/* 18AE04 8025C524 920506CC */ lbu $a1, 0x6cc($s0) -/* 18AE08 8025C528 0182102A */ slt $v0, $t4, $v0 -/* 18AE0C 8025C52C 1440FFA0 */ bnez $v0, .L8025C3B0 -/* 18AE10 8025C530 27390004 */ addiu $t9, $t9, 4 -.L8025C534: -/* 18AE14 8025C534 322300FF */ andi $v1, $s1, 0xff -/* 18AE18 8025C538 240200FF */ addiu $v0, $zero, 0xff -/* 18AE1C 8025C53C 14620004 */ bne $v1, $v0, .L8025C550 -/* 18AE20 8025C540 24020002 */ addiu $v0, $zero, 2 -/* 18AE24 8025C544 96030748 */ lhu $v1, 0x748($s0) -/* 18AE28 8025C548 A20206C2 */ sb $v0, 0x6c2($s0) -/* 18AE2C 8025C54C A60306C8 */ sh $v1, 0x6c8($s0) -.L8025C550: -/* 18AE30 8025C550 820306C2 */ lb $v1, 0x6c2($s0) -/* 18AE34 8025C554 24020002 */ addiu $v0, $zero, 2 -.L8025C558: -/* 18AE38 8025C558 10620005 */ beq $v1, $v0, .L8025C570 -/* 18AE3C 8025C55C 24020003 */ addiu $v0, $zero, 3 -/* 18AE40 8025C560 1062000C */ beq $v1, $v0, .L8025C594 -/* 18AE44 8025C564 00000000 */ nop -/* 18AE48 8025C568 080971F5 */ j .L8025C7D4 -/* 18AE4C 8025C56C 00000000 */ nop -.L8025C570: -/* 18AE50 8025C570 16400098 */ bnez $s2, .L8025C7D4 -/* 18AE54 8025C574 00000000 */ nop -/* 18AE58 8025C578 860206C8 */ lh $v0, 0x6c8($s0) -/* 18AE5C 8025C57C 960306C8 */ lhu $v1, 0x6c8($s0) -/* 18AE60 8025C580 14400093 */ bnez $v0, .L8025C7D0 -/* 18AE64 8025C584 2462FFFF */ addiu $v0, $v1, -1 -/* 18AE68 8025C588 24020003 */ addiu $v0, $zero, 3 -/* 18AE6C 8025C58C A60006CA */ sh $zero, 0x6ca($s0) -/* 18AE70 8025C590 A20206C2 */ sb $v0, 0x6c2($s0) -.L8025C594: -/* 18AE74 8025C594 16400018 */ bnez $s2, .L8025C5F8 -/* 18AE78 8025C598 3C0451EB */ lui $a0, 0x51eb -/* 18AE7C 8025C59C 8602074A */ lh $v0, 0x74a($s0) -/* 18AE80 8025C5A0 24036400 */ addiu $v1, $zero, 0x6400 -/* 18AE84 8025C5A4 14400002 */ bnez $v0, .L8025C5B0 -/* 18AE88 8025C5A8 0062001A */ div $zero, $v1, $v0 -/* 18AE8C 8025C5AC 0007000D */ break 7 -.L8025C5B0: -/* 18AE90 8025C5B0 2401FFFF */ addiu $at, $zero, -1 -/* 18AE94 8025C5B4 14410004 */ bne $v0, $at, .L8025C5C8 -/* 18AE98 8025C5B8 3C018000 */ lui $at, 0x8000 -/* 18AE9C 8025C5BC 14610002 */ bne $v1, $at, .L8025C5C8 -/* 18AEA0 8025C5C0 00000000 */ nop -/* 18AEA4 8025C5C4 0006000D */ break 6 -.L8025C5C8: -/* 18AEA8 8025C5C8 00001812 */ mflo $v1 -/* 18AEAC 8025C5CC 960206CA */ lhu $v0, 0x6ca($s0) -/* 18AEB0 8025C5D0 00431021 */ addu $v0, $v0, $v1 -/* 18AEB4 8025C5D4 A60206CA */ sh $v0, 0x6ca($s0) -/* 18AEB8 8025C5D8 00021400 */ sll $v0, $v0, 0x10 -/* 18AEBC 8025C5DC 00021403 */ sra $v0, $v0, 0x10 -/* 18AEC0 8025C5E0 2842639D */ slti $v0, $v0, 0x639d -/* 18AEC4 8025C5E4 14400005 */ bnez $v0, .L8025C5FC -/* 18AEC8 8025C5E8 3484851F */ ori $a0, $a0, 0x851f -/* 18AECC 8025C5EC 2402639C */ addiu $v0, $zero, 0x639c -/* 18AED0 8025C5F0 A60206CA */ sh $v0, 0x6ca($s0) -/* 18AED4 8025C5F4 3C0451EB */ lui $a0, 0x51eb -.L8025C5F8: -/* 18AED8 8025C5F8 3484851F */ ori $a0, $a0, 0x851f -.L8025C5FC: -/* 18AEDC 8025C5FC 960306CA */ lhu $v1, 0x6ca($s0) -/* 18AEE0 8025C600 00031C00 */ sll $v1, $v1, 0x10 -/* 18AEE4 8025C604 00031403 */ sra $v0, $v1, 0x10 -/* 18AEE8 8025C608 00440018 */ mult $v0, $a0 -/* 18AEEC 8025C60C 0000602D */ daddu $t4, $zero, $zero -/* 18AEF0 8025C610 920506CC */ lbu $a1, 0x6cc($s0) -/* 18AEF4 8025C614 00031FC3 */ sra $v1, $v1, 0x1f -/* 18AEF8 8025C618 820206CC */ lb $v0, 0x6cc($s0) -/* 18AEFC 8025C61C 0000B810 */ mfhi $s7 -/* 18AF00 8025C620 00172143 */ sra $a0, $s7, 5 -/* 18AF04 8025C624 18400064 */ blez $v0, .L8025C7B8 -/* 18AF08 8025C628 00838823 */ subu $s1, $a0, $v1 -/* 18AF0C 8025C62C 322E00FF */ andi $t6, $s1, 0xff -/* 18AF10 8025C630 240200FF */ addiu $v0, $zero, 0xff -/* 18AF14 8025C634 004EC023 */ subu $t8, $v0, $t6 -/* 18AF18 8025C638 3C0F8080 */ lui $t7, 0x8080 -/* 18AF1C 8025C63C 35EF8081 */ ori $t7, $t7, 0x8081 -/* 18AF20 8025C640 0200C82D */ daddu $t9, $s0, $zero -.L8025C644: -/* 18AF24 8025C644 00052600 */ sll $a0, $a1, 0x18 -/* 18AF28 8025C648 86020740 */ lh $v0, 0x740($s0) -/* 18AF2C 8025C64C 00042603 */ sra $a0, $a0, 0x18 -/* 18AF30 8025C650 00440018 */ mult $v0, $a0 -/* 18AF34 8025C654 86030742 */ lh $v1, 0x742($s0) -/* 18AF38 8025C658 000C1140 */ sll $v0, $t4, 5 -/* 18AF3C 8025C65C 0000B812 */ mflo $s7 -/* 18AF40 8025C660 02026821 */ addu $t5, $s0, $v0 -/* 18AF44 8025C664 02EC1021 */ addu $v0, $s7, $t4 -/* 18AF48 8025C668 00640018 */ mult $v1, $a0 -/* 18AF4C 8025C66C 8E0306D0 */ lw $v1, 0x6d0($s0) -/* 18AF50 8025C670 00021080 */ sll $v0, $v0, 2 -/* 18AF54 8025C674 00431021 */ addu $v0, $v0, $v1 -/* 18AF58 8025C678 8C4B0000 */ lw $t3, ($v0) -/* 18AF5C 8025C67C 0000B812 */ mflo $s7 -/* 18AF60 8025C680 02EC1021 */ addu $v0, $s7, $t4 -/* 18AF64 8025C684 00021080 */ sll $v0, $v0, 2 -/* 18AF68 8025C688 00431021 */ addu $v0, $v0, $v1 -/* 18AF6C 8025C68C 8C490000 */ lw $t1, ($v0) -/* 18AF70 8025C690 0000502D */ daddu $t2, $zero, $zero -/* 18AF74 8025C694 AF2D06D4 */ sw $t5, 0x6d4($t9) -.L8025C698: -/* 18AF78 8025C698 95630000 */ lhu $v1, ($t3) -/* 18AF7C 8025C69C 000312C2 */ srl $v0, $v1, 0xb -/* 18AF80 8025C6A0 00580018 */ mult $v0, $t8 -/* 18AF84 8025C6A4 95240000 */ lhu $a0, ($t1) -/* 18AF88 8025C6A8 00002812 */ mflo $a1 -/* 18AF8C 8025C6AC 000412C2 */ srl $v0, $a0, 0xb -/* 18AF90 8025C6B0 00000000 */ nop -/* 18AF94 8025C6B4 004E0018 */ mult $v0, $t6 -/* 18AF98 8025C6B8 00004012 */ mflo $t0 -/* 18AF9C 8025C6BC 00A82821 */ addu $a1, $a1, $t0 -/* 18AFA0 8025C6C0 00000000 */ nop -/* 18AFA4 8025C6C4 00AF0018 */ mult $a1, $t7 -/* 18AFA8 8025C6C8 00009010 */ mfhi $s2 -/* 18AFAC 8025C6CC 00031182 */ srl $v0, $v1, 6 -/* 18AFB0 8025C6D0 3042001F */ andi $v0, $v0, 0x1f -/* 18AFB4 8025C6D4 00580018 */ mult $v0, $t8 -/* 18AFB8 8025C6D8 00004012 */ mflo $t0 -/* 18AFBC 8025C6DC 00041182 */ srl $v0, $a0, 6 -/* 18AFC0 8025C6E0 3042001F */ andi $v0, $v0, 0x1f -/* 18AFC4 8025C6E4 004E0018 */ mult $v0, $t6 -/* 18AFC8 8025C6E8 00003812 */ mflo $a3 -/* 18AFCC 8025C6EC 00031842 */ srl $v1, $v1, 1 -/* 18AFD0 8025C6F0 3063001F */ andi $v1, $v1, 0x1f -/* 18AFD4 8025C6F4 00780018 */ mult $v1, $t8 -/* 18AFD8 8025C6F8 00001812 */ mflo $v1 -/* 18AFDC 8025C6FC 00042042 */ srl $a0, $a0, 1 -/* 18AFE0 8025C700 3084001F */ andi $a0, $a0, 0x1f -/* 18AFE4 8025C704 008E0018 */ mult $a0, $t6 -/* 18AFE8 8025C708 256B0002 */ addiu $t3, $t3, 2 -/* 18AFEC 8025C70C 91260001 */ lbu $a2, 1($t1) -/* 18AFF0 8025C710 25290002 */ addiu $t1, $t1, 2 -/* 18AFF4 8025C714 254A0001 */ addiu $t2, $t2, 1 -/* 18AFF8 8025C718 0000B812 */ mflo $s7 -/* 18AFFC 8025C71C 30C60001 */ andi $a2, $a2, 1 -/* 18B000 8025C720 01072021 */ addu $a0, $t0, $a3 -/* 18B004 8025C724 008F0018 */ mult $a0, $t7 -/* 18B008 8025C728 02451021 */ addu $v0, $s2, $a1 -/* 18B00C 8025C72C 000211C3 */ sra $v0, $v0, 7 -/* 18B010 8025C730 00052FC3 */ sra $a1, $a1, 0x1f -/* 18B014 8025C734 00453823 */ subu $a3, $v0, $a1 -/* 18B018 8025C738 00004010 */ mfhi $t0 -/* 18B01C 8025C73C AFB70014 */ sw $s7, 0x14($sp) -/* 18B020 8025C740 00771821 */ addu $v1, $v1, $s7 -/* 18B024 8025C744 006F0018 */ mult $v1, $t7 -/* 18B028 8025C748 01041021 */ addu $v0, $t0, $a0 -/* 18B02C 8025C74C 000211C3 */ sra $v0, $v0, 7 -/* 18B030 8025C750 000427C3 */ sra $a0, $a0, 0x1f -/* 18B034 8025C754 00442823 */ subu $a1, $v0, $a0 -/* 18B038 8025C758 00009010 */ mfhi $s2 -/* 18B03C 8025C75C 02431021 */ addu $v0, $s2, $v1 -/* 18B040 8025C760 000211C3 */ sra $v0, $v0, 7 -/* 18B044 8025C764 00031FC3 */ sra $v1, $v1, 0x1f -/* 18B048 8025C768 00432023 */ subu $a0, $v0, $v1 -/* 18B04C 8025C76C 30E300FF */ andi $v1, $a3, 0xff -/* 18B050 8025C770 00031AC0 */ sll $v1, $v1, 0xb -/* 18B054 8025C774 30A200FF */ andi $v0, $a1, 0xff -/* 18B058 8025C778 00021180 */ sll $v0, $v0, 6 -/* 18B05C 8025C77C 00621825 */ or $v1, $v1, $v0 -/* 18B060 8025C780 308200FF */ andi $v0, $a0, 0xff -/* 18B064 8025C784 00021040 */ sll $v0, $v0, 1 -/* 18B068 8025C788 00621825 */ or $v1, $v1, $v0 -/* 18B06C 8025C78C 00C33025 */ or $a2, $a2, $v1 -/* 18B070 8025C790 A5A60000 */ sh $a2, ($t5) -/* 18B074 8025C794 29420010 */ slti $v0, $t2, 0x10 -/* 18B078 8025C798 1440FFBF */ bnez $v0, .L8025C698 -/* 18B07C 8025C79C 25AD0002 */ addiu $t5, $t5, 2 -/* 18B080 8025C7A0 258C0001 */ addiu $t4, $t4, 1 -/* 18B084 8025C7A4 820206CC */ lb $v0, 0x6cc($s0) -/* 18B088 8025C7A8 920506CC */ lbu $a1, 0x6cc($s0) -/* 18B08C 8025C7AC 0182102A */ slt $v0, $t4, $v0 -/* 18B090 8025C7B0 1440FFA4 */ bnez $v0, .L8025C644 -/* 18B094 8025C7B4 27390004 */ addiu $t9, $t9, 4 -.L8025C7B8: -/* 18B098 8025C7B8 322300FF */ andi $v1, $s1, 0xff -/* 18B09C 8025C7BC 240200FF */ addiu $v0, $zero, 0xff -/* 18B0A0 8025C7C0 14620004 */ bne $v1, $v0, .L8025C7D4 -/* 18B0A4 8025C7C4 00000000 */ nop -/* 18B0A8 8025C7C8 96020744 */ lhu $v0, 0x744($s0) -/* 18B0AC 8025C7CC A20006C2 */ sb $zero, 0x6c2($s0) -.L8025C7D0: -/* 18B0B0 8025C7D0 A60206C8 */ sh $v0, 0x6c8($s0) -.L8025C7D4: -/* 18B0B4 8025C7D4 820306C2 */ lb $v1, 0x6c2($s0) -/* 18B0B8 8025C7D8 28620004 */ slti $v0, $v1, 4 -/* 18B0BC 8025C7DC 1040000D */ beqz $v0, .L8025C814 -/* 18B0C0 8025C7E0 00000000 */ nop -/* 18B0C4 8025C7E4 0460000B */ bltz $v1, .L8025C814 -/* 18B0C8 8025C7E8 00000000 */ nop -/* 18B0CC 8025C7EC 16800006 */ bnez $s4, .L8025C808 -/* 18B0D0 8025C7F0 0260202D */ daddu $a0, $s3, $zero -/* 18B0D4 8025C7F4 02A0282D */ daddu $a1, $s5, $zero -/* 18B0D8 8025C7F8 0C096657 */ jal func_8025995C -/* 18B0DC 8025C7FC 02C0302D */ daddu $a2, $s6, $zero -/* 18B0E0 8025C800 08097205 */ j .L8025C814 -/* 18B0E4 8025C804 00000000 */ nop -.L8025C808: -/* 18B0E8 8025C808 02A0282D */ daddu $a1, $s5, $zero -/* 18B0EC 8025C80C 0C0965B0 */ jal func_802596C0 -/* 18B0F0 8025C810 02C0302D */ daddu $a2, $s6, $zero -.L8025C814: -/* 18B0F4 8025C814 8FBF0038 */ lw $ra, 0x38($sp) -/* 18B0F8 8025C818 8FB70034 */ lw $s7, 0x34($sp) -/* 18B0FC 8025C81C 8FB60030 */ lw $s6, 0x30($sp) -/* 18B100 8025C820 8FB5002C */ lw $s5, 0x2c($sp) -/* 18B104 8025C824 8FB40028 */ lw $s4, 0x28($sp) -/* 18B108 8025C828 8FB30024 */ lw $s3, 0x24($sp) -/* 18B10C 8025C82C 8FB20020 */ lw $s2, 0x20($sp) -/* 18B110 8025C830 8FB1001C */ lw $s1, 0x1c($sp) -/* 18B114 8025C834 8FB00018 */ lw $s0, 0x18($sp) -/* 18B118 8025C838 03E00008 */ jr $ra -/* 18B11C 8025C83C 27BD0040 */ addiu $sp, $sp, 0x40 diff --git a/ver/us/asm/nonmatchings/effects/partner_buff/func_E011A3A0.s b/ver/us/asm/nonmatchings/effects/partner_buff/func_E011A3A0.s deleted file mode 100644 index 4d3abd7d97..0000000000 --- a/ver/us/asm/nonmatchings/effects/partner_buff/func_E011A3A0.s +++ /dev/null @@ -1,11 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_E011A3A0 -/* 4045C0 E011A3A0 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* 4045C4 E011A3A4 AFBF0010 */ sw $ra, 0x10($sp) -/* 4045C8 E011A3A8 0C0469C0 */ jal func_E011A700 -/* 4045CC E011A3AC 00000000 */ nop -/* 4045D0 E011A3B0 8FBF0010 */ lw $ra, 0x10($sp) -/* 4045D4 E011A3B4 03E00008 */ jr $ra -/* 4045D8 E011A3B8 27BD0018 */ addiu $sp, $sp, 0x18 diff --git a/ver/us/asm/nonmatchings/effects/partner_buff/func_E011A48C.s b/ver/us/asm/nonmatchings/effects/partner_buff/func_E011A48C.s deleted file mode 100644 index 6540bd2118..0000000000 --- a/ver/us/asm/nonmatchings/effects/partner_buff/func_E011A48C.s +++ /dev/null @@ -1,179 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_E011A48C -/* 4046AC E011A48C 3C03800A */ lui $v1, %hi(gMasterGfxPos) -/* 4046B0 E011A490 2463A66C */ addiu $v1, $v1, %lo(gMasterGfxPos) -/* 4046B4 E011A494 44872000 */ mtc1 $a3, $f4 -/* 4046B8 E011A498 8C670000 */ lw $a3, ($v1) -/* 4046BC E011A49C 24E20008 */ addiu $v0, $a3, 8 -/* 4046C0 E011A4A0 AC620000 */ sw $v0, ($v1) -/* 4046C4 E011A4A4 24820020 */ addiu $v0, $a0, 0x20 -/* 4046C8 E011A4A8 00021480 */ sll $v0, $v0, 0x12 -/* 4046CC E011A4AC 00021403 */ sra $v0, $v0, 0x10 -/* 4046D0 E011A4B0 18400005 */ blez $v0, .LE011A4C8 -/* 4046D4 E011A4B4 30420FFF */ andi $v0, $v0, 0xfff -/* 4046D8 E011A4B8 00021300 */ sll $v0, $v0, 0xc -/* 4046DC E011A4BC 3C03E400 */ lui $v1, 0xe400 -/* 4046E0 E011A4C0 08046933 */ j .LE011A4CC -/* 4046E4 E011A4C4 00431825 */ or $v1, $v0, $v1 -.LE011A4C8: -/* 4046E8 E011A4C8 3C03E400 */ lui $v1, 0xe400 -.LE011A4CC: -/* 4046EC E011A4CC 24A20020 */ addiu $v0, $a1, 0x20 -/* 4046F0 E011A4D0 00021480 */ sll $v0, $v0, 0x12 -/* 4046F4 E011A4D4 00021403 */ sra $v0, $v0, 0x10 -/* 4046F8 E011A4D8 18400004 */ blez $v0, .LE011A4EC -/* 4046FC E011A4DC ACE30000 */ sw $v1, ($a3) -/* 404700 E011A4E0 30420FFF */ andi $v0, $v0, 0xfff -/* 404704 E011A4E4 00621025 */ or $v0, $v1, $v0 -/* 404708 E011A4E8 ACE20000 */ sw $v0, ($a3) -.LE011A4EC: -/* 40470C E011A4EC 30C20007 */ andi $v0, $a2, 7 -/* 404710 E011A4F0 00021E00 */ sll $v1, $v0, 0x18 -/* 404714 E011A4F4 00041480 */ sll $v0, $a0, 0x12 -/* 404718 E011A4F8 00023403 */ sra $a2, $v0, 0x10 -/* 40471C E011A4FC 18C00003 */ blez $a2, .LE011A50C -/* 404720 E011A500 30C20FFF */ andi $v0, $a2, 0xfff -/* 404724 E011A504 00021300 */ sll $v0, $v0, 0xc -/* 404728 E011A508 00621825 */ or $v1, $v1, $v0 -.LE011A50C: -/* 40472C E011A50C 00051480 */ sll $v0, $a1, 0x12 -/* 404730 E011A510 00021403 */ sra $v0, $v0, 0x10 -/* 404734 E011A514 18400004 */ blez $v0, .LE011A528 -/* 404738 E011A518 ACE30004 */ sw $v1, 4($a3) -/* 40473C E011A51C 30420FFF */ andi $v0, $v0, 0xfff -/* 404740 E011A520 00621025 */ or $v0, $v1, $v0 -/* 404744 E011A524 ACE20004 */ sw $v0, 4($a3) -.LE011A528: -/* 404748 E011A528 3C03800A */ lui $v1, %hi(gMasterGfxPos) -/* 40474C E011A52C 2463A66C */ addiu $v1, $v1, %lo(gMasterGfxPos) -/* 404750 E011A530 8C620000 */ lw $v0, ($v1) -/* 404754 E011A534 0040202D */ daddu $a0, $v0, $zero -/* 404758 E011A538 24420008 */ addiu $v0, $v0, 8 -/* 40475C E011A53C AC620000 */ sw $v0, ($v1) -/* 404760 E011A540 3C02E100 */ lui $v0, 0xe100 -/* 404764 E011A544 AC820000 */ sw $v0, ($a0) -/* 404768 E011A548 04C10015 */ bgez $a2, .LE011A5A0 -/* 40476C E011A54C 24840004 */ addiu $a0, $a0, 4 -/* 404770 E011A550 4600218D */ trunc.w.s $f6, $f4 -/* 404774 E011A554 44023000 */ mfc1 $v0, $f6 -/* 404778 E011A558 00000000 */ nop -/* 40477C E011A55C 00021400 */ sll $v0, $v0, 0x10 -/* 404780 E011A560 00021403 */ sra $v0, $v0, 0x10 -/* 404784 E011A564 04410007 */ bgez $v0, .LE011A584 -/* 404788 E011A568 00C20018 */ mult $a2, $v0 -/* 40478C E011A56C 00004012 */ mflo $t0 -/* 404790 E011A570 000811C3 */ sra $v0, $t0, 7 -/* 404794 E011A574 04410008 */ bgez $v0, .LE011A598 -/* 404798 E011A578 00021023 */ negu $v0, $v0 -/* 40479C E011A57C 08046965 */ j .LE011A594 -/* 4047A0 E011A580 0000102D */ daddu $v0, $zero, $zero -.LE011A584: -/* 4047A4 E011A584 00004012 */ mflo $t0 -/* 4047A8 E011A588 000811C3 */ sra $v0, $t0, 7 -/* 4047AC E011A58C 5C400001 */ bgtzl $v0, .LE011A594 -/* 4047B0 E011A590 0000102D */ daddu $v0, $zero, $zero -.LE011A594: -/* 4047B4 E011A594 00021023 */ negu $v0, $v0 -.LE011A598: -/* 4047B8 E011A598 08046969 */ j .LE011A5A4 -/* 4047BC E011A59C 00023400 */ sll $a2, $v0, 0x10 -.LE011A5A0: -/* 4047C0 E011A5A0 0000302D */ daddu $a2, $zero, $zero -.LE011A5A4: -/* 4047C4 E011A5A4 00051080 */ sll $v0, $a1, 2 -/* 4047C8 E011A5A8 0441001E */ bgez $v0, .LE011A624 -/* 4047CC E011A5AC 34C20400 */ ori $v0, $a2, 0x400 -/* 4047D0 E011A5B0 46002007 */ neg.s $f0, $f4 -/* 4047D4 E011A5B4 4600018D */ trunc.w.s $f6, $f0 -/* 4047D8 E011A5B8 44023000 */ mfc1 $v0, $f6 -/* 4047DC E011A5BC 00000000 */ nop -/* 4047E0 E011A5C0 00021400 */ sll $v0, $v0, 0x10 -/* 4047E4 E011A5C4 00021C03 */ sra $v1, $v0, 0x10 -/* 4047E8 E011A5C8 0461000C */ bgez $v1, .LE011A5FC -/* 4047EC E011A5CC 00051480 */ sll $v0, $a1, 0x12 -/* 4047F0 E011A5D0 00021403 */ sra $v0, $v0, 0x10 -/* 4047F4 E011A5D4 00430018 */ mult $v0, $v1 -/* 4047F8 E011A5D8 00004012 */ mflo $t0 -/* 4047FC E011A5DC 000819C3 */ sra $v1, $t0, 7 -/* 404800 E011A5E0 04620001 */ bltzl $v1, .LE011A5E8 -/* 404804 E011A5E4 0000182D */ daddu $v1, $zero, $zero -.LE011A5E8: -/* 404808 E011A5E8 24020400 */ addiu $v0, $zero, 0x400 -/* 40480C E011A5EC 00431023 */ subu $v0, $v0, $v1 -/* 404810 E011A5F0 3042FFFF */ andi $v0, $v0, 0xffff -/* 404814 E011A5F4 08046989 */ j .LE011A624 -/* 404818 E011A5F8 00C21025 */ or $v0, $a2, $v0 -.LE011A5FC: -/* 40481C E011A5FC 00021403 */ sra $v0, $v0, 0x10 -/* 404820 E011A600 00430018 */ mult $v0, $v1 -/* 404824 E011A604 00004012 */ mflo $t0 -/* 404828 E011A608 000819C3 */ sra $v1, $t0, 7 -/* 40482C E011A60C 5C600001 */ bgtzl $v1, .LE011A614 -/* 404830 E011A610 0000182D */ daddu $v1, $zero, $zero -.LE011A614: -/* 404834 E011A614 24020400 */ addiu $v0, $zero, 0x400 -/* 404838 E011A618 00431023 */ subu $v0, $v0, $v1 -/* 40483C E011A61C 3042FFFF */ andi $v0, $v0, 0xffff -/* 404840 E011A620 00C21025 */ or $v0, $a2, $v0 -.LE011A624: -/* 404844 E011A624 AC820000 */ sw $v0, ($a0) -/* 404848 E011A628 3C03800A */ lui $v1, %hi(gMasterGfxPos) -/* 40484C E011A62C 2463A66C */ addiu $v1, $v1, %lo(gMasterGfxPos) -/* 404850 E011A630 8C620000 */ lw $v0, ($v1) -/* 404854 E011A634 3C014F00 */ lui $at, 0x4f00 -/* 404858 E011A638 44810000 */ mtc1 $at, $f0 -/* 40485C E011A63C 0040202D */ daddu $a0, $v0, $zero -/* 404860 E011A640 24420008 */ addiu $v0, $v0, 8 -/* 404864 E011A644 AC620000 */ sw $v0, ($v1) -/* 404868 E011A648 3C02F100 */ lui $v0, 0xf100 -/* 40486C E011A64C AC820000 */ sw $v0, ($a0) -/* 404870 E011A650 4604003E */ c.le.s $f0, $f4 -/* 404874 E011A654 00000000 */ nop -/* 404878 E011A658 45010005 */ bc1t .LE011A670 -/* 40487C E011A65C 24840004 */ addiu $a0, $a0, 4 -/* 404880 E011A660 4600218D */ trunc.w.s $f6, $f4 -/* 404884 E011A664 44033000 */ mfc1 $v1, $f6 -/* 404888 E011A668 080469A2 */ j .LE011A688 -/* 40488C E011A66C 00000000 */ nop -.LE011A670: -/* 404890 E011A670 46002001 */ sub.s $f0, $f4, $f0 -/* 404894 E011A674 3C028000 */ lui $v0, 0x8000 -/* 404898 E011A678 4600018D */ trunc.w.s $f6, $f0 -/* 40489C E011A67C 44033000 */ mfc1 $v1, $f6 -/* 4048A0 E011A680 00000000 */ nop -/* 4048A4 E011A684 00621825 */ or $v1, $v1, $v0 -.LE011A688: -/* 4048A8 E011A688 3C014F00 */ lui $at, 0x4f00 -/* 4048AC E011A68C 44811000 */ mtc1 $at, $f2 -/* 4048B0 E011A690 46002007 */ neg.s $f0, $f4 -/* 4048B4 E011A694 4600103E */ c.le.s $f2, $f0 -/* 4048B8 E011A698 00000000 */ nop -/* 4048BC E011A69C 45010005 */ bc1t .LE011A6B4 -/* 4048C0 E011A6A0 00033400 */ sll $a2, $v1, 0x10 -/* 4048C4 E011A6A4 4600018D */ trunc.w.s $f6, $f0 -/* 4048C8 E011A6A8 44073000 */ mfc1 $a3, $f6 -/* 4048CC E011A6AC 080469B3 */ j .LE011A6CC -/* 4048D0 E011A6B0 00000000 */ nop -.LE011A6B4: -/* 4048D4 E011A6B4 46020001 */ sub.s $f0, $f0, $f2 -/* 4048D8 E011A6B8 3C028000 */ lui $v0, 0x8000 -/* 4048DC E011A6BC 4600018D */ trunc.w.s $f6, $f0 -/* 4048E0 E011A6C0 44073000 */ mfc1 $a3, $f6 -/* 4048E4 E011A6C4 00000000 */ nop -/* 4048E8 E011A6C8 00E23825 */ or $a3, $a3, $v0 -.LE011A6CC: -/* 4048EC E011A6CC 3C05800A */ lui $a1, %hi(gMasterGfxPos) -/* 4048F0 E011A6D0 24A5A66C */ addiu $a1, $a1, %lo(gMasterGfxPos) -/* 4048F4 E011A6D4 30E2FFFF */ andi $v0, $a3, 0xffff -/* 4048F8 E011A6D8 8CA30000 */ lw $v1, ($a1) -/* 4048FC E011A6DC 00C21025 */ or $v0, $a2, $v0 -/* 404900 E011A6E0 AC820000 */ sw $v0, ($a0) -/* 404904 E011A6E4 3C02E700 */ lui $v0, 0xe700 -/* 404908 E011A6E8 0060202D */ daddu $a0, $v1, $zero -/* 40490C E011A6EC 24630008 */ addiu $v1, $v1, 8 -/* 404910 E011A6F0 ACA30000 */ sw $v1, ($a1) -/* 404914 E011A6F4 AC820000 */ sw $v0, ($a0) -/* 404918 E011A6F8 03E00008 */ jr $ra -/* 40491C E011A6FC AC800004 */ sw $zero, 4($a0) diff --git a/ver/us/asm/nonmatchings/effects/partner_buff/partner_buff_main.s b/ver/us/asm/nonmatchings/effects/partner_buff/partner_buff_main.s deleted file mode 100644 index 22ef3d0430..0000000000 --- a/ver/us/asm/nonmatchings/effects/partner_buff/partner_buff_main.s +++ /dev/null @@ -1,73 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel partner_buff_main -/* 404220 E011A000 27BDFFC8 */ addiu $sp, $sp, -0x38 -/* 404224 E011A004 AFB1002C */ sw $s1, 0x2c($sp) -/* 404228 E011A008 0080882D */ daddu $s1, $a0, $zero -/* 40422C E011A00C 27A40010 */ addiu $a0, $sp, 0x10 -/* 404230 E011A010 AFB20030 */ sw $s2, 0x30($sp) -/* 404234 E011A014 8FB2004C */ lw $s2, 0x4c($sp) -/* 404238 E011A018 3C02E012 */ lui $v0, %hi(partner_buff_init) -/* 40423C E011A01C 2442A0FC */ addiu $v0, $v0, %lo(partner_buff_init) -/* 404240 E011A020 AFA20018 */ sw $v0, 0x18($sp) -/* 404244 E011A024 3C02E012 */ lui $v0, %hi(partner_buff_update) -/* 404248 E011A028 2442A104 */ addiu $v0, $v0, %lo(partner_buff_update) -/* 40424C E011A02C AFA2001C */ sw $v0, 0x1c($sp) -/* 404250 E011A030 3C02E012 */ lui $v0, %hi(partner_buff_render) -/* 404254 E011A034 2442A398 */ addiu $v0, $v0, %lo(partner_buff_render) -/* 404258 E011A038 AFA20020 */ sw $v0, 0x20($sp) -/* 40425C E011A03C 3C02E012 */ lui $v0, %hi(func_E011A3A0) -/* 404260 E011A040 2442A3A0 */ addiu $v0, $v0, %lo(func_E011A3A0) -/* 404264 E011A044 AFA20024 */ sw $v0, 0x24($sp) -/* 404268 E011A048 2402007F */ addiu $v0, $zero, 0x7f -/* 40426C E011A04C AFBF0034 */ sw $ra, 0x34($sp) -/* 404270 E011A050 AFB00028 */ sw $s0, 0x28($sp) -/* 404274 E011A054 AFA00010 */ sw $zero, 0x10($sp) -/* 404278 E011A058 0C080124 */ jal shim_create_effect_instance -/* 40427C E011A05C AFA20014 */ sw $v0, 0x14($sp) -/* 404280 E011A060 2404002C */ addiu $a0, $zero, 0x2c -/* 404284 E011A064 24030001 */ addiu $v1, $zero, 1 -/* 404288 E011A068 0040802D */ daddu $s0, $v0, $zero -/* 40428C E011A06C 0C08012C */ jal shim_general_heap_malloc -/* 404290 E011A070 AE030008 */ sw $v1, 8($s0) -/* 404294 E011A074 0040282D */ daddu $a1, $v0, $zero -/* 404298 E011A078 14A00003 */ bnez $a1, .LE011A088 -/* 40429C E011A07C AE02000C */ sw $v0, 0xc($s0) -.LE011A080: -/* 4042A0 E011A080 08046820 */ j .LE011A080 -/* 4042A4 E011A084 00000000 */ nop -.LE011A088: -/* 4042A8 E011A088 A4B10000 */ sh $s1, ($a1) -/* 4042AC E011A08C 1E400004 */ bgtz $s2, .LE011A0A0 -/* 4042B0 E011A090 ACA00008 */ sw $zero, 8($a1) -/* 4042B4 E011A094 240203E8 */ addiu $v0, $zero, 0x3e8 -/* 4042B8 E011A098 08046829 */ j .LE011A0A4 -/* 4042BC E011A09C ACA20004 */ sw $v0, 4($a1) -.LE011A0A0: -/* 4042C0 E011A0A0 ACB20004 */ sw $s2, 4($a1) -.LE011A0A4: -/* 4042C4 E011A0A4 0000202D */ daddu $a0, $zero, $zero -/* 4042C8 E011A0A8 00A0182D */ daddu $v1, $a1, $zero -.LE011A0AC: -/* 4042CC E011A0AC A460000C */ sh $zero, 0xc($v1) -/* 4042D0 E011A0B0 A460000E */ sh $zero, 0xe($v1) -/* 4042D4 E011A0B4 A4600010 */ sh $zero, 0x10($v1) -/* 4042D8 E011A0B8 A4600012 */ sh $zero, 0x12($v1) -/* 4042DC E011A0BC A4600014 */ sh $zero, 0x14($v1) -/* 4042E0 E011A0C0 24840001 */ addiu $a0, $a0, 1 -/* 4042E4 E011A0C4 28820003 */ slti $v0, $a0, 3 -/* 4042E8 E011A0C8 1440FFF8 */ bnez $v0, .LE011A0AC -/* 4042EC E011A0CC 2463000A */ addiu $v1, $v1, 0xa -/* 4042F0 E011A0D0 24020001 */ addiu $v0, $zero, 1 -/* 4042F4 E011A0D4 16220002 */ bne $s1, $v0, .LE011A0E0 -/* 4042F8 E011A0D8 A4A00002 */ sh $zero, 2($a1) -/* 4042FC E011A0DC A4B10002 */ sh $s1, 2($a1) -.LE011A0E0: -/* 404300 E011A0E0 0200102D */ daddu $v0, $s0, $zero -/* 404304 E011A0E4 8FBF0034 */ lw $ra, 0x34($sp) -/* 404308 E011A0E8 8FB20030 */ lw $s2, 0x30($sp) -/* 40430C E011A0EC 8FB1002C */ lw $s1, 0x2c($sp) -/* 404310 E011A0F0 8FB00028 */ lw $s0, 0x28($sp) -/* 404314 E011A0F4 03E00008 */ jr $ra -/* 404318 E011A0F8 27BD0038 */ addiu $sp, $sp, 0x38 diff --git a/ver/us/asm/nonmatchings/effects/partner_buff/partner_buff_update.s b/ver/us/asm/nonmatchings/effects/partner_buff/partner_buff_update.s deleted file mode 100644 index edbdcf6c4b..0000000000 --- a/ver/us/asm/nonmatchings/effects/partner_buff/partner_buff_update.s +++ /dev/null @@ -1,197 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -.section .rodata - -dlabel jtbl_E011AC70 -.word LE011A214_404434, LE011A280_4044A0, LE011A2C4_4044E4, LE011A304_404524, LE011A324_404544, LE011A360_404580, LE011A360_404580, LE011A360_404580, LE011A360_404580, LE011A360_404580, LE011A28C_4044AC, LE011A360_404580, LE011A360_404580, LE011A360_404580, LE011A360_404580, LE011A360_404580, LE011A360_404580, LE011A360_404580, LE011A360_404580, LE011A360_404580, LE011A2D0_4044F0, LE011A360_404580, LE011A360_404580, LE011A360_404580, LE011A360_404580, LE011A360_404580, LE011A360_404580, LE011A360_404580, LE011A360_404580, LE011A360_404580, LE011A360_404580, LE011A360_404580, LE011A360_404580, LE011A360_404580, LE011A360_404580, LE011A360_404580, LE011A360_404580, LE011A360_404580, LE011A360_404580, LE011A360_404580, LE011A334_404554, 0, 0, 0 - -.section .text - -glabel partner_buff_update -/* 404324 E011A104 27BDFFD0 */ addiu $sp, $sp, -0x30 -/* 404328 E011A108 AFBF002C */ sw $ra, 0x2c($sp) -/* 40432C E011A10C AFB60028 */ sw $s6, 0x28($sp) -/* 404330 E011A110 AFB50024 */ sw $s5, 0x24($sp) -/* 404334 E011A114 AFB40020 */ sw $s4, 0x20($sp) -/* 404338 E011A118 AFB3001C */ sw $s3, 0x1c($sp) -/* 40433C E011A11C AFB20018 */ sw $s2, 0x18($sp) -/* 404340 E011A120 AFB10014 */ sw $s1, 0x14($sp) -/* 404344 E011A124 AFB00010 */ sw $s0, 0x10($sp) -/* 404348 E011A128 8C830000 */ lw $v1, ($a0) -/* 40434C E011A12C 8C91000C */ lw $s1, 0xc($a0) -/* 404350 E011A130 30620010 */ andi $v0, $v1, 0x10 -/* 404354 E011A134 86360000 */ lh $s6, ($s1) -/* 404358 E011A138 10400005 */ beqz $v0, .LE011A150 -/* 40435C E011A13C 2402FFEF */ addiu $v0, $zero, -0x11 -/* 404360 E011A140 00621024 */ and $v0, $v1, $v0 -/* 404364 E011A144 AC820000 */ sw $v0, ($a0) -/* 404368 E011A148 24020010 */ addiu $v0, $zero, 0x10 -/* 40436C E011A14C AE220004 */ sw $v0, 4($s1) -.LE011A150: -/* 404370 E011A150 8E230004 */ lw $v1, 4($s1) -/* 404374 E011A154 286203E8 */ slti $v0, $v1, 0x3e8 -/* 404378 E011A158 10400002 */ beqz $v0, .LE011A164 -/* 40437C E011A15C 2462FFFF */ addiu $v0, $v1, -1 -/* 404380 E011A160 AE220004 */ sw $v0, 4($s1) -.LE011A164: -/* 404384 E011A164 8E220008 */ lw $v0, 8($s1) -/* 404388 E011A168 8E230004 */ lw $v1, 4($s1) -/* 40438C E011A16C 24450001 */ addiu $a1, $v0, 1 -/* 404390 E011A170 04610005 */ bgez $v1, .LE011A188 -/* 404394 E011A174 AE250008 */ sw $a1, 8($s1) -/* 404398 E011A178 0C080128 */ jal shim_remove_effect -/* 40439C E011A17C 00000000 */ nop -/* 4043A0 E011A180 080468DC */ j .LE011A370 -/* 4043A4 E011A184 00000000 */ nop -.LE011A188: -/* 4043A8 E011A188 3C028888 */ lui $v0, 0x8888 -/* 4043AC E011A18C 34428889 */ ori $v0, $v0, 0x8889 -/* 4043B0 E011A190 00A20018 */ mult $a1, $v0 -/* 4043B4 E011A194 0000982D */ daddu $s3, $zero, $zero -/* 4043B8 E011A198 24140001 */ addiu $s4, $zero, 1 -/* 4043BC E011A19C 2412000C */ addiu $s2, $zero, 0xc -/* 4043C0 E011A1A0 000517C3 */ sra $v0, $a1, 0x1f -/* 4043C4 E011A1A4 00003010 */ mfhi $a2 -/* 4043C8 E011A1A8 00C51821 */ addu $v1, $a2, $a1 -/* 4043CC E011A1AC 00031903 */ sra $v1, $v1, 4 -/* 4043D0 E011A1B0 00621823 */ subu $v1, $v1, $v0 -/* 4043D4 E011A1B4 00031100 */ sll $v0, $v1, 4 -/* 4043D8 E011A1B8 00431023 */ subu $v0, $v0, $v1 -/* 4043DC E011A1BC 02821004 */ sllv $v0, $v0, $s4 -/* 4043E0 E011A1C0 00A2A823 */ subu $s5, $a1, $v0 -.LE011A1C4: -/* 4043E4 E011A1C4 02328021 */ addu $s0, $s1, $s2 -/* 4043E8 E011A1C8 86020004 */ lh $v0, 4($s0) -/* 4043EC E011A1CC 04420001 */ bltzl $v0, .LE011A1D4 -/* 4043F0 E011A1D0 A6000004 */ sh $zero, 4($s0) -.LE011A1D4: -/* 4043F4 E011A1D4 16D40006 */ bne $s6, $s4, .LE011A1F0 -/* 4043F8 E011A1D8 00000000 */ nop -/* 4043FC E011A1DC 16A00004 */ bnez $s5, .LE011A1F0 -/* 404400 E011A1E0 00000000 */ nop -/* 404404 E011A1E4 0C080138 */ jal shim_rand_int -/* 404408 E011A1E8 24040004 */ addiu $a0, $zero, 4 -/* 40440C E011A1EC A6020004 */ sh $v0, 4($s0) -.LE011A1F0: -/* 404410 E011A1F0 86030006 */ lh $v1, 6($s0) -/* 404414 E011A1F4 2C620029 */ sltiu $v0, $v1, 0x29 -/* 404418 E011A1F8 10400059 */ beqz $v0, LE011A360_404580 -/* 40441C E011A1FC 00031080 */ sll $v0, $v1, 2 -/* 404420 E011A200 3C01E012 */ lui $at, %hi(jtbl_E011AC70) -/* 404424 E011A204 00220821 */ addu $at, $at, $v0 -/* 404428 E011A208 8C22AC70 */ lw $v0, %lo(jtbl_E011AC70)($at) -/* 40442C E011A20C 00400008 */ jr $v0 -/* 404430 E011A210 00000000 */ nop -dlabel LE011A214_404434 -/* 404434 E011A214 86030000 */ lh $v1, ($s0) -/* 404438 E011A218 240200FF */ addiu $v0, $zero, 0xff -/* 40443C E011A21C 14620011 */ bne $v1, $v0, .LE011A264 -/* 404440 E011A220 00000000 */ nop -/* 404444 E011A224 86040004 */ lh $a0, 4($s0) -/* 404448 E011A228 86030002 */ lh $v1, 2($s0) -/* 40444C E011A22C 0083102A */ slt $v0, $a0, $v1 -/* 404450 E011A230 10400003 */ beqz $v0, .LE011A240 -/* 404454 E011A234 0064102A */ slt $v0, $v1, $a0 -/* 404458 E011A238 080468D8 */ j LE011A360_404580 -/* 40445C E011A23C A6140006 */ sh $s4, 6($s0) -.LE011A240: -/* 404460 E011A240 10400003 */ beqz $v0, .LE011A250 -/* 404464 E011A244 24020002 */ addiu $v0, $zero, 2 -/* 404468 E011A248 080468D8 */ j LE011A360_404580 -/* 40446C E011A24C A6020006 */ sh $v0, 6($s0) -.LE011A250: -/* 404470 E011A250 54600044 */ bnel $v1, $zero, .LE011A364 -/* 404474 E011A254 26730001 */ addiu $s3, $s3, 1 -/* 404478 E011A258 24020003 */ addiu $v0, $zero, 3 -/* 40447C E011A25C 080468D8 */ j LE011A360_404580 -/* 404480 E011A260 A6020006 */ sh $v0, 6($s0) -.LE011A264: -/* 404484 E011A264 5460003F */ bnel $v1, $zero, .LE011A364 -/* 404488 E011A268 26730001 */ addiu $s3, $s3, 1 -/* 40448C E011A26C 86020004 */ lh $v0, 4($s0) -/* 404490 E011A270 1840003B */ blez $v0, LE011A360_404580 -/* 404494 E011A274 24020004 */ addiu $v0, $zero, 4 -/* 404498 E011A278 080468D8 */ j LE011A360_404580 -/* 40449C E011A27C A6020006 */ sh $v0, 6($s0) -dlabel LE011A280_4044A0 -/* 4044A0 E011A280 2402000A */ addiu $v0, $zero, 0xa -/* 4044A4 E011A284 A6000008 */ sh $zero, 8($s0) -/* 4044A8 E011A288 A6020006 */ sh $v0, 6($s0) -dlabel LE011A28C_4044AC -/* 4044AC E011A28C 96020008 */ lhu $v0, 8($s0) -/* 4044B0 E011A290 24420001 */ addiu $v0, $v0, 1 -/* 4044B4 E011A294 A6020008 */ sh $v0, 8($s0) -/* 4044B8 E011A298 00021400 */ sll $v0, $v0, 0x10 -/* 4044BC E011A29C 00021403 */ sra $v0, $v0, 0x10 -/* 4044C0 E011A2A0 2842000B */ slti $v0, $v0, 0xb -/* 4044C4 E011A2A4 5440002F */ bnel $v0, $zero, .LE011A364 -/* 4044C8 E011A2A8 26730001 */ addiu $s3, $s3, 1 -/* 4044CC E011A2AC 96020002 */ lhu $v0, 2($s0) -/* 4044D0 E011A2B0 A6000008 */ sh $zero, 8($s0) -/* 4044D4 E011A2B4 A6000006 */ sh $zero, 6($s0) -/* 4044D8 E011A2B8 2442FFFF */ addiu $v0, $v0, -1 -/* 4044DC E011A2BC 080468D8 */ j LE011A360_404580 -/* 4044E0 E011A2C0 A6020002 */ sh $v0, 2($s0) -dlabel LE011A2C4_4044E4 -/* 4044E4 E011A2C4 24020014 */ addiu $v0, $zero, 0x14 -/* 4044E8 E011A2C8 A6000008 */ sh $zero, 8($s0) -/* 4044EC E011A2CC A6020006 */ sh $v0, 6($s0) -dlabel LE011A2D0_4044F0 -/* 4044F0 E011A2D0 96020008 */ lhu $v0, 8($s0) -/* 4044F4 E011A2D4 24420001 */ addiu $v0, $v0, 1 -/* 4044F8 E011A2D8 A6020008 */ sh $v0, 8($s0) -/* 4044FC E011A2DC 00021400 */ sll $v0, $v0, 0x10 -/* 404500 E011A2E0 00021403 */ sra $v0, $v0, 0x10 -/* 404504 E011A2E4 2842000B */ slti $v0, $v0, 0xb -/* 404508 E011A2E8 5440001E */ bnel $v0, $zero, .LE011A364 -/* 40450C E011A2EC 26730001 */ addiu $s3, $s3, 1 -/* 404510 E011A2F0 96020004 */ lhu $v0, 4($s0) -/* 404514 E011A2F4 A6000008 */ sh $zero, 8($s0) -/* 404518 E011A2F8 A6000006 */ sh $zero, 6($s0) -/* 40451C E011A2FC 080468D8 */ j LE011A360_404580 -/* 404520 E011A300 A6020002 */ sh $v0, 2($s0) -dlabel LE011A304_404524 -/* 404524 E011A304 96020000 */ lhu $v0, ($s0) -/* 404528 E011A308 2442FFE0 */ addiu $v0, $v0, -0x20 -/* 40452C E011A30C A6020000 */ sh $v0, ($s0) -/* 404530 E011A310 00021400 */ sll $v0, $v0, 0x10 -/* 404534 E011A314 04430013 */ bgezl $v0, .LE011A364 -/* 404538 E011A318 26730001 */ addiu $s3, $s3, 1 -/* 40453C E011A31C 080468D7 */ j .LE011A35C -/* 404540 E011A320 A6000000 */ sh $zero, ($s0) -dlabel LE011A324_404544 -/* 404544 E011A324 96030004 */ lhu $v1, 4($s0) -/* 404548 E011A328 24020028 */ addiu $v0, $zero, 0x28 -/* 40454C E011A32C A6020006 */ sh $v0, 6($s0) -/* 404550 E011A330 A6030002 */ sh $v1, 2($s0) -dlabel LE011A334_404554 -/* 404554 E011A334 96020000 */ lhu $v0, ($s0) -/* 404558 E011A338 24420040 */ addiu $v0, $v0, 0x40 -/* 40455C E011A33C A6020000 */ sh $v0, ($s0) -/* 404560 E011A340 00021400 */ sll $v0, $v0, 0x10 -/* 404564 E011A344 00021403 */ sra $v0, $v0, 0x10 -/* 404568 E011A348 28420100 */ slti $v0, $v0, 0x100 -/* 40456C E011A34C 54400005 */ bnel $v0, $zero, .LE011A364 -/* 404570 E011A350 26730001 */ addiu $s3, $s3, 1 -/* 404574 E011A354 240200FF */ addiu $v0, $zero, 0xff -/* 404578 E011A358 A6020000 */ sh $v0, ($s0) -.LE011A35C: -/* 40457C E011A35C A6000006 */ sh $zero, 6($s0) -dlabel LE011A360_404580 -/* 404580 E011A360 26730001 */ addiu $s3, $s3, 1 -.LE011A364: -/* 404584 E011A364 2A620003 */ slti $v0, $s3, 3 -/* 404588 E011A368 1440FF96 */ bnez $v0, .LE011A1C4 -/* 40458C E011A36C 2652000A */ addiu $s2, $s2, 0xa -.LE011A370: -/* 404590 E011A370 8FBF002C */ lw $ra, 0x2c($sp) -/* 404594 E011A374 8FB60028 */ lw $s6, 0x28($sp) -/* 404598 E011A378 8FB50024 */ lw $s5, 0x24($sp) -/* 40459C E011A37C 8FB40020 */ lw $s4, 0x20($sp) -/* 4045A0 E011A380 8FB3001C */ lw $s3, 0x1c($sp) -/* 4045A4 E011A384 8FB20018 */ lw $s2, 0x18($sp) -/* 4045A8 E011A388 8FB10014 */ lw $s1, 0x14($sp) -/* 4045AC E011A38C 8FB00010 */ lw $s0, 0x10($sp) -/* 4045B0 E011A390 03E00008 */ jr $ra -/* 4045B4 E011A394 27BD0030 */ addiu $sp, $sp, 0x30 diff --git a/ver/us/symbol_addrs.txt b/ver/us/symbol_addrs.txt index 4e619f1702..cfdb363adf 100644 --- a/ver/us/symbol_addrs.txt +++ b/ver/us/symbol_addrs.txt @@ -6580,11 +6580,11 @@ AddBattleCamZoom = 0x8024ECAC; // type:func rom:0x17D58C func_8024ECF8 = 0x8024ECF8; // type:func rom:0x17D5D8 FreezeBattleCam = 0x8024ED78; // type:func rom:0x17D658 func_8024EDA4 = 0x8024EDA4; // type:func rom:0x17D684 -func_8024EDC0 = 0x8024EDC0; // type:func rom:0x17D6A0 -func_8024EDEC = 0x8024EDEC; // type:func rom:0x17D6CC -func_8024EE48 = 0x8024EE48; // type:func rom:0x17D728 -func_8024EEA8 = 0x8024EEA8; // type:func rom:0x17D788 -btl_draw_popup_messages = 0x8024EF08; // type:func rom:0x17D7E8 +btl_popup_messages_init = 0x8024EDC0; // type:func rom:0x17D6A0 +btl_popup_messages_delete = 0x8024EDEC; // type:func rom:0x17D6CC +btl_popup_messages_update = 0x8024EE48; // type:func rom:0x17D728 +btl_popup_messages_draw_world_geometry = 0x8024EEA8; // type:func rom:0x17D788 +btl_popup_messages_draw_ui = 0x8024EF08; // type:func rom:0x17D7E8 btl_create_popup = 0x8024EF68; // type:func rom:0x17D848 free_popup = 0x8024EFA4; // type:func rom:0x17D884 func_8024EFE0 = 0x8024EFE0; // type:func rom:0x17D8C0 @@ -6662,25 +6662,25 @@ func_80254950 = 0x80254950; // type:func rom:0x183230 func_802549A0 = 0x802549A0; // type:func rom:0x183280 func_802549C0 = 0x802549C0; // type:func rom:0x1832A0 func_802549F4 = 0x802549F4; // type:func rom:0x1832D4 -func_80254C50 = 0x80254C50; // type:func rom:0x183530 +appendGfx_player_actor_blur = 0x80254C50; // type:func rom:0x183530 func_802550BC = 0x802550BC; // type:func rom:0x18399C func_802552EC = 0x802552EC; // type:func rom:0x183BCC func_8025593C = 0x8025593C; // type:func rom:0x18421C -func_8025595C = 0x8025595C; // type:func rom:0x18423C +appendGfx_enemy_actor_blur = 0x8025595C; // type:func rom:0x18423C func_8025597C = 0x8025597C; // type:func rom:0x18425C -func_8025599C = 0x8025599C; // type:func rom:0x18427C +appendGfx_partner_actor_blur = 0x8025599C; // type:func rom:0x18427C update_actor_shadow = 0x802559BC; // type:func rom:0x18429C update_enemy_shadows = 0x80255F5C; // type:func rom:0x18483C update_hero_shadows = 0x80255FAC; // type:func rom:0x18488C func_80255FD8 = 0x80255FD8; // type:func rom:0x1848B8 -func_80255FE0 = 0x80255FE0; // type:func rom:0x1848C0 +appendGfx_npc_actor = 0x80255FE0; // type:func rom:0x1848C0 func_802571F0 = 0x802571F0; // type:func rom:0x185AD0 -func_80257B28 = 0x80257B28; // type:func rom:0x186408 -func_80257B48 = 0x80257B48; // type:func rom:0x186428 -func_80257B68 = 0x80257B68; // type:func rom:0x186448 +appendGfx_enemy_actor = 0x80257B28; // type:func rom:0x186408 +appendGfx_partner_actor = 0x80257B48; // type:func rom:0x186428 +appendGfx_enemy_actor_decorations = 0x80257B68; // type:func rom:0x186448 func_80257B88 = 0x80257B88; // type:func rom:0x186468 update_player_actor_shadow = 0x80257BAC; // type:func rom:0x18648C -func_80257DA4 = 0x80257DA4; // type:func rom:0x186684 +appendGfx_player_actor = 0x80257DA4; // type:func rom:0x186684 func_80258E14 = 0x80258E14; // type:func rom:0x1876F4 func_802591EC = 0x802591EC; // type:func rom:0x187ACC func_80259494 = 0x80259494; // type:func rom:0x187D74