diff --git a/include/common_structs.h b/include/common_structs.h index 10e250a6cd..597cc35955 100644 --- a/include/common_structs.h +++ b/include/common_structs.h @@ -600,8 +600,8 @@ typedef struct SimpleSpringData { typedef s32 (*EntityCallback)(struct Entity*); typedef struct EntityBlueprint { - /* 0x00 */ s16 flags; - /* 0x02 */ s16 typeDataSize; + /* 0x00 */ u16 flags; + /* 0x02 */ u16 typeDataSize; /* 0x04 */ UNK_PTR renderCommandList; /* 0x08 */ UNK_PTR modelAnimationNodes; /* 0x0C */ EntityCallback(fpInit); @@ -610,16 +610,16 @@ typedef struct EntityBlueprint { /* 0x18 */ s32 dmaStart; /* 0x1C */ s32 dmaEnd; /* 0x20 */ u8 entityType; - /* 0x21 */ char aabbSize[3]; + /* 0x21 */ u8 aabbSize[3]; } EntityBlueprint; // size = 0x24 typedef struct Entity { /* 0x00 */ s32 flags; /* 0x04 */ u8 listIndex; - /* 0x05 */ char unk_05; + /* 0x05 */ s8 unk_05; /* 0x06 */ u8 collisionFlags; /* 0x07 */ s8 unk_07; - /* 0x08 */ char unk_08; + /* 0x08 */ u8 unk_08; /* 0x09 */ u8 hasEntityScript; /* 0x0A */ u8 type; /* 0x0B */ u8 alpha; @@ -1443,18 +1443,12 @@ typedef struct ShopSellPriceData { } ShopSellPriceData; // size = 0xC typedef struct GameStatus { - /* 0x000 */ u32 currentButtons[2]; - /* 0x008 */ char unk_08[8]; - /* 0x010 */ u32 pressedButtons[2]; /* bits = 1 for frame of button press */ - /* 0x018 */ char unk_18[8]; - /* 0x020 */ u32 heldButtons[2]; /* bits = 1 every 4th frame during hold */ - /* 0x028 */ char unk_28[8]; - /* 0x030 */ u32 prevButtons; /* from previous frame */ - /* 0x034 */ char unk_34[12]; - /* 0x040 */ s8 stickX[2]; /* with deadzone */ - /* 0x042 */ char unk_42[2]; - /* 0x044 */ s8 stickY[2]; /* with deadzone */ - /* 0x046 */ char unk_46[2]; + /* 0x000 */ u32 currentButtons[4]; + /* 0x010 */ u32 pressedButtons[4]; /* bits = 1 for frame of button press */ + /* 0x020 */ u32 heldButtons[4]; /* bits = 1 every 4th frame during hold */ + /* 0x030 */ u32 prevButtons[4]; /* from previous frame */ + /* 0x040 */ s8 stickX[4]; /* with deadzone */ + /* 0x044 */ s8 stickY[4]; /* with deadzone */ /* 0x048 */ s16 unk_48[4]; /* 0x050 */ s16 unk_50[4]; /* 0x058 */ s16 unk_58; @@ -1482,7 +1476,7 @@ typedef struct GameStatus { /* 0x07E */ u8 peachFlags; /* (1 = isPeach, 2 = isTransformed, 4 = hasUmbrella) */ /* 0x07F */ s8 peachDisguise; /* (1 = koopatrol, 2 = hammer bros, 3 = clubba) */ /* 0x080 */ u8 peachCookingIngredient; ///< @see enum CookingIngredient - /* 0x081 */ s8 unk_81; + /* 0x081 */ s8 multiplayerEnabled; /* 0x082 */ s8 unk_82; /* 0x083 */ s8 unk_83; /* 0x084 */ s8 playerSpriteSet; @@ -1759,7 +1753,7 @@ typedef struct DecorationTable { /* 0x765 */ s8 unk_765; /* 0x766 */ s8 unk_766; /* 0x767 */ s8 unk_767; - /* 0x768 */ s8 unk_768; + /* 0x768 */ u8 unk_768; /* 0x769 */ char unk_769[3]; /* 0x76C */ s16 unk_76C[16]; /* 0x78C */ char unk_78C[76]; @@ -1934,7 +1928,7 @@ typedef struct Actor { /* 0x1FA */ s16 hpChangeCounter; /* 0x1FC */ u16 damageCounter; /* 0x1FE */ char unk_1FE[2]; - /* 0x200 */ s32** unk_200; // Probably a struct but not sure what yet + /* 0x200 */ struct EffectInstance* unk_200; // fx_attack_result_text /* 0x204 */ s8 unk_204; /* 0x205 */ s8 unk_205; /* 0x206 */ s8 unk_206; @@ -2369,10 +2363,22 @@ typedef struct ActionCommandStatus { typedef struct Message { /* 0x00 */ s32 unk_00; - /* 0x04 */ char unk_04[0x1C]; + /* 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; /* 0x20 */ s32 unk_20; /* 0x24 */ s32 unk_24; - /* 0x28 */ char unk_28[0x1C]; + /* 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; /* 0x44 */ s32 unk_44; /* 0x48 */ char unk_48[0x4]; } Message; // size = 0x4C diff --git a/include/effects.h b/include/effects.h index 1395ac163f..ee7f5eb391 100644 --- a/include/effects.h +++ b/include/effects.h @@ -805,6 +805,13 @@ typedef struct BulbGlowFXData { /* 0x14 */ s32 unk_14; } BulbGlowFXData; // size = ? +typedef struct Effect75FXData { + /* 0x00 */ s32 unk_00; + /* 0x04 */ f32 unk_04; + /* 0x08 */ f32 unk_08; + /* 0x0C */ f32 unk_0C; +} Effect75FXData; // size = ? + // fx_quizmo_stage typedef struct EffectDataQuizStage { /* 0x00 */ char unk_00[0x4]; diff --git a/include/enums.h b/include/enums.h index 7dbfdc6ed2..514bf122b6 100644 --- a/include/enums.h +++ b/include/enums.h @@ -1755,6 +1755,9 @@ enum EntityTypes { ENTITY_TYPE_HAMMER2_BLOCK_TINY = 0x19, ENTITY_TYPE_HAMMER3_BLOCK_TINY = 0x1A, ENTITY_TYPE_HEALING_BLOCK = 0x1B, + ENTITY_TYPE_1C = 0x1C, + ENTITY_TYPE_1D = 0x1D, + ENTITY_TYPE_1E = 0x1E, ENTITY_TYPE_HEALING_BLOCK_FRAME = 0x1F, ENTITY_TYPE_SAVE_POINT = 0x20, ENTITY_TYPE_POW_BLOCK = 0x21, diff --git a/include/evt_funcs.h b/include/evt_funcs.h deleted file mode 100644 index c5c041d8ca..0000000000 --- a/include/evt_funcs.h +++ /dev/null @@ -1,226 +0,0 @@ -#ifndef _EVT_FUNCS_H_ -#define _EVT_FUNCS_H_ - -f32 evt_fixed_var_to_float(Bytecode scriptVar); - -Bytecode evt_float_to_fixed_var(f32 value); - -ApiStatus evt_handle_return(Evt* script); - -ApiStatus evt_handle_label(Evt* script); - -ApiStatus evt_handle_goto(Evt* script); - -ApiStatus evt_handle_loop(Evt* script); - -ApiStatus evt_handle_end_loop(Evt* script); - -ApiStatus evt_handle_break_loop(Evt* script); - -ApiStatus evt_handle_wait(Evt* script); - -ApiStatus evt_handle_wait_seconds(Evt* script); - -ApiStatus evt_handle_if_equal(Evt* script); - -ApiStatus evt_handle_if_not_equal(Evt* script); - -ApiStatus evt_handle_if_less(Evt* script); - -ApiStatus evt_handle_if_greater(Evt* script); - -ApiStatus evt_handle_if_less_equal(Evt* script); - -ApiStatus evt_handle_if_greater_equal(Evt* script); - -ApiStatus evt_handle_if_AND(Evt* script); - -ApiStatus evt_handle_if_not_AND(Evt* script); - -ApiStatus evt_handle_else(Evt* script); - -ApiStatus evt_handle_end_if(Evt* script); - -ApiStatus evt_handle_switch(Evt* script); - -ApiStatus evt_handle_switch_const(Evt* script); - -ApiStatus evt_handle_case_equal(Evt* script); - -ApiStatus evt_handle_case_not_equal(Evt* script); - -ApiStatus evt_handle_case_less(Evt* script); - -ApiStatus evt_handle_case_less_equal(Evt* script); - -ApiStatus evt_handle_case_greater(Evt* script); - -ApiStatus evt_handle_case_greater_equal(Evt* script); - -ApiStatus evt_handle_case_range(Evt* script); - -ApiStatus evt_handle_case_default(Evt* script); - -ApiStatus evt_handle_case_AND(Evt* script); - -ApiStatus evt_handle_case_equal_OR(Evt* script); - -ApiStatus evt_handle_case_equal_AND(Evt* script); - -ApiStatus evt_handle_end_case_group(Evt* script); - -ApiStatus evt_handle_break_case(Evt* script); - -ApiStatus evt_handle_end_switch(Evt* script); - -ApiStatus evt_handle_set_var(Evt* script); - -ApiStatus evt_handle_set_const(Evt* script); - -ApiStatus evt_handle_set_float(Evt* script); - -ApiStatus evt_handle_add(Evt* script); - -ApiStatus evt_handle_subtract(Evt* script); - -ApiStatus evt_handle_multiply(Evt* script); - -ApiStatus evt_handle_divide(Evt* script); - -ApiStatus evt_handle_mod(Evt* script); - -ApiStatus evt_handle_addF(Evt* script); - -ApiStatus evt_handle_subtractF(Evt* script); - -ApiStatus evt_handle_multiplyF(Evt* script); - -ApiStatus evt_handle_divideF(Evt* script); - -ApiStatus evt_handle_set_int_buffer_ptr(Evt* script); - -ApiStatus evt_handle_set_float_buffer_ptr(Evt* script); - -ApiStatus evt_handle_get_1_word(Evt* script); - -ApiStatus evt_handle_get_2_word(Evt* script); - -ApiStatus evt_handle_get_3_word(Evt* script); - -ApiStatus evt_handle_get_4_word(Evt* script); - -ApiStatus evt_handle_get_Nth_word(Evt* script); - -ApiStatus evt_handle_get_1_float(Evt* script); - -ApiStatus evt_handle_get_2_float(Evt* script); - -ApiStatus evt_handle_get_3_float(Evt* script); - -ApiStatus evt_handle_get_4_float(Evt* script); - -ApiStatus evt_handle_get_Nth_float(Evt* script); - -ApiStatus evt_handle_set_array(Evt* script); - -ApiStatus evt_handle_set_flag_array(Evt* script); - -ApiStatus evt_handle_allocate_array(Evt* script); - -ApiStatus evt_handle_AND(Evt* script); - -ApiStatus evt_handle_AND_const(Evt* script); - -ApiStatus evt_handle_OR(Evt* script); - -ApiStatus evt_handle_OR_const(Evt* script); - -ApiStatus evt_handle_call(Evt* script); - -ApiStatus evt_handle_exec1(Evt* script); - -ApiStatus evt_handle_exec1_get_id(Evt* script); - -ApiStatus evt_handle_exec_wait(Evt* script); - -ApiStatus evt_handle_jump(Evt* script); - -s32 evt_trigger_on_activate_exec_script(Trigger* trigger); - -ApiStatus evt_handle_bind(Evt* script); - -ApiStatus DeleteTrigger(Evt* script, s32 ievt_nitialCall); - -ApiStatus evt_handle_unbind(Evt* script); - -ApiStatus evt_handle_kill(Evt* script); - -ApiStatus evt_handle_set_priority(Evt* script); - -ApiStatus evt_handle_set_timescale(Evt* script); - -ApiStatus evt_handle_set_group(Evt* script); - -ApiStatus evt_handle_suspend_all(Evt* script); - -ApiStatus evt_handle_resume_all(Evt* script); - -ApiStatus evt_handle_suspend_others(Evt* script); - -ApiStatus evt_handle_resume_others(Evt* script); - -ApiStatus evt_handle_suspend(Evt* script); - -ApiStatus evt_handle_resume(Evt* script); - -ApiStatus evt_handle_does_script_exist(Evt* script); - -void evt_trigger_on_activate_lock(Trigger* trigger); - -ApiStatus evt_handle_bind_lock(Evt* script); - -ApiStatus evt_handle_thread(Evt* script); - -ApiStatus evt_handle_end_thread(Evt* script); - -ApiStatus evt_handle_child_thread(Evt* script); - -ApiStatus evt_handle_end_child_thread(Evt* script); - -ApiStatus func_802C6E14(Evt* script); - -ApiStatus evt_handle_print_debug_var(Evt* script); - -ApiStatus func_802C739C(Evt* script); - -ApiStatus func_802C73B0(Evt* script); - -s32 func_802C73B8(Evt* script); - -s32 evt_execute_next_command(Evt *script); - -s32 evt_get_variable(Evt* script, Bytecode var); - -s32 evt_get_variable_index(Evt* script, s32 var); - -s32 evt_get_variable_index_alt(s32 var); - -s32 evt_set_variable(Evt* script, Bytecode var, s32 value); - -f32 evt_get_float_variable(Evt* script, Bytecode var); - -f32 evt_set_float_variable(Evt* script, Bytecode var, s32 value); - -Bytecode* evt_find_label(Evt* script, s32 arg1); - -Bytecode* evt_skip_if(Evt* script); - -Bytecode* evt_skip_else(Evt* script); - -Bytecode* evt_goto_end_case(Evt* script); - -Bytecode* evt_goto_next_case(Evt* script); - -Bytecode* evt_goto_end_loop(Evt* script); - -#endif diff --git a/include/functions.h b/include/functions.h index 3272d91acd..abc1951df4 100644 --- a/include/functions.h +++ b/include/functions.h @@ -60,7 +60,7 @@ void intro_logos_update_fade(void); u32 get_entity_type(s32 arg0); Entity* get_entity_by_index(s32 index); -s32 create_entity(EntityBlueprint*, s32, s32, s32, s32, ...); +s32 create_entity(EntityBlueprint* bp, s32 x, s32 y, s32 z, s32 rotY, ...); void entity_shattering_idle(Entity* entity); void func_802666E4(Actor* actor, f32 x, f32 y, f32 z, s32 damage); @@ -252,6 +252,7 @@ s32 evt_get_variable(Evt* script, Bytecode var); s32 evt_set_variable(Evt* script, Bytecode var, s32 value); f32 evt_get_float_variable(Evt* script, Bytecode var); f32 evt_set_float_variable(Evt* script, Bytecode var, f32 value); +s32 evt_get_variable_index(Evt* script, s32 var); void set_script_timescale(Evt* script, f32 timescale); f32 sin_deg(f32 x); f32 cos_deg(f32 x); @@ -381,6 +382,7 @@ void func_80266EE8(Actor* actor, s32 arg1); void btl_set_popup_duration(s32 duration); void switch_to_partner(s32 arg0); +s8 get_current_partner_id(void); void delete_trigger(Trigger* toDelete); void kill_script_by_ID(s32 id); @@ -1003,6 +1005,7 @@ s32 check_conversation_trigger(void); void clear_player_status(void); void clear_entity_models(void); +void bind_entity_model_setupGfx(s32 idx, s32 setupGfxCallbackArg0, void (*fpSetupGfxCallback)(void*)); void clear_animator_list(void); void clear_model_data(void); void clear_sprite_shading_data(void); diff --git a/include/model.h b/include/model.h index bbf49daf07..e4c668159e 100644 --- a/include/model.h +++ b/include/model.h @@ -69,6 +69,8 @@ typedef struct ModelLocalVertexCopy { /* 0x18 */ s32 selector; } ModelLocalVertexCopy; // size = 0x1C +typedef ModelLocalVertexCopy* ModelLocalVertexCopyList[0]; + typedef struct ModelTreeInfo { /* 0x00 */ u8 modelIndex; /* 0x01 */ u8 treeDepth; diff --git a/include/variables.h b/include/variables.h index 3b46e79f12..e2d3e2c84e 100644 --- a/include/variables.h +++ b/include/variables.h @@ -102,7 +102,7 @@ extern MessagePrintState* SaveBlockResultPrinter; extern s32 D_802E99DC; extern Entity* SwitchToLink; -extern s32 CreateEntityVarArgBuffer[3]; // not size 3 +extern s32 CreateEntityVarArgBuffer[4]; extern f32 DefaultMoveSpeeds[4]; diff --git a/src/16c8e0.c b/src/16c8e0.c index 6450680e38..b0b4ffa47f 100644 --- a/src/16c8e0.c +++ b/src/16c8e0.c @@ -79,7 +79,6 @@ EvtScript BtlBringPartnerOut = { extern s32 D_8029DA30; -extern s8 D_8029DA33; extern s32 D_8029DA34; extern s32 D_8029DA40; extern s32 D_8029DA44; @@ -251,7 +250,7 @@ void btl_update(void) { s32 cond; if (battleStatus->inputBitmask != -1) { - if (battleStatus->flags1 & BS_FLAGS1_80000 && gGameStatusPtr->unk_81 != 0) { + if ((battleStatus->flags1 & BS_FLAGS1_80000) && gGameStatusPtr->multiplayerEnabled != 0) { s32 inputBitmask = battleStatus->inputBitmask; battleStatus->currentButtonsDown = gGameStatusPtr->currentButtons[1] & inputBitmask; @@ -972,7 +971,7 @@ void btl_restore_world_cameras(void) { } if (gBattleStatus.flags2 & 0x40) { - playerData->currentPartner = D_8029DA33; + playerData->currentPartner = D_8029DA30; } } @@ -1027,7 +1026,7 @@ void btl_delete_actor(Actor* actor) { remove_effect(actor->debuffEffect); if (actor->unk_200 != NULL) { - actor->unk_200[3][9] = 0; + ((AttackResultTextFXData*)actor->unk_200->data)->unk_24 = 0; } battleStatus = &gBattleStatus; @@ -1070,7 +1069,7 @@ void btl_delete_player_actor(Actor* player) { remove_effect(player->debuffEffect); if (player->unk_200 != NULL) { - player->unk_200[3][9] = 0; + ((AttackResultTextFXData*)player->unk_200->data)->unk_24 = 0; } heap_free(movement); diff --git a/src/17D6A0.c b/src/17D6A0.c index 7285ea1783..d498a00de7 100644 --- a/src/17D6A0.c +++ b/src/17D6A0.c @@ -2,7 +2,10 @@ #include "effects.h" // from 190B20.c +extern s16 bMsgHeights[]; +extern s16 D_802835D8[]; extern s32 bMessages[]; +extern s32 bActorMessages[]; extern PopupMessage* D_802838F8; extern PopupMessage popupMessages[32]; @@ -11,6 +14,7 @@ extern s16 D_8029F640; extern s16 D_8029F64A; extern s16 D_8029F64E; extern s16 D_8029F650; + void func_8024FB3C(PopupMessage* popup); void btl_show_message_popup(PopupMessage* popup); @@ -94,11 +98,109 @@ void free_popup(PopupMessage* popup) { INCLUDE_ASM(s32, "17D6A0", func_8024EFE0); -INCLUDE_ASM(s32, "17D6A0", func_8024F394); +void func_8024F394(void* data) { + PopupMessage* popup = data; + Message* message = popup->message; + s32 found = FALSE; + s32 i; -INCLUDE_ASM(s32, "17D6A0", func_8024F5AC); + for (i = 0; i < popup->messageIndex; i++, message++) { + if (message->unk_00 != 0) { + s32 modelIdx = message->unk_04; -INCLUDE_ASM(s32, "17D6A0", func_8024F768); + found = TRUE; + if (message->unk_24 != 0) { + message->unk_24--; + if (message->unk_24 == 0) { + clear_entity_model_flags(modelIdx, MODEL_FLAGS_FLAG_20); + } + exec_entity_model_commandlist(modelIdx); + break; + } 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->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; + 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->unk_20--; + if (message->unk_20 < 0) { + message->unk_44--; + if (message->unk_44 < 0) { + free_entity_model_by_index(modelIdx); + message->unk_00 = 0; + } + } + } + } + } + + if (!found) { + heap_free(popup->message); + popup->message = NULL; + free_popup(popup); + } +} + +void func_8024F5AC(void* data) { + PopupMessage* popup = data; + Message* message = popup->message; + Matrix4f sp18; + Matrix4f sp58; + Matrix4f sp98; + Matrix4f spD8; + Matrix4f sp118; + Matrix4f sp158; + Matrix4f sp198; + Matrix4f sp1D8; + Mtx sp218; + s32 i; + + for (i = 0; i < popup->messageIndex; i++, message++) { + if (message->unk_00 != 0) { + if (message->unk_24 != 0) { + break; + } 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); + guMtxCatF(sp158, sp18, sp198); + guMtxF2L(sp198, &sp218); + draw_entity_model_A(modelIdx, &sp218); + } + } + } +} + +void func_8024F768(void* data) { + Message* message = data; + s32 var_a3 = message->unk_44; + + if (var_a3 > 0xA) { + var_a3 = 0xA; + } + gDPSetPrimColor(gMasterGfxPos++, 0, 0, 0, 0, 0, (var_a3 * 255) / 10); +} void func_8024F7C8(void) { s32 i; @@ -217,9 +319,186 @@ void close_action_command_instruction_popup(void) { INCLUDE_ASM(s32, "17D6A0", func_8024FB3C); +void func_80250818(void); INCLUDE_ASM(s32, "17D6A0", func_80250818); -INCLUDE_ASM(s32, "17D6A0", btl_show_message_popup); +void btl_show_message_popup(PopupMessage* popup) { + s32 numLines; + s32 posX; + s32 posY = 80; + s32 width; + s32 msgWidth; + s32 height; + + switch (popup->messageIndex) { + case 0: + case 1: + case 2: + case 3: + case 8: + case 9: + case 10: + case 11: + case 12: + case 13: + case 14: + case 15: + case 16: + case 17: + case 18: + case 19: + case 20: + case 21: + case 22: + case 23: + case 24: + case 25: + case 26: + case 27: + case 28: + case 35: + case 36: + case 37: + case 38: + case 39: + case 40: + case 41: + case 42: + case 43: + case 44: + case 45: + case 67: + case 68: + case 69: + case 70: + case 71: + case 72: + case 80: + case 82: + case 83: + case 84: + if (popup->unk_17 != 0) { + s32 messageID; + + popup->unk_17 = 0; + messageID = bMessages[popup->messageIndex]; + msgWidth = get_msg_width(messageID, 0) + 30; + posX = 160 - (msgWidth / 2); + width = msgWidth; + numLines = get_msg_lines(messageID) - 1; + height = bMsgHeights[numLines]; + set_window_properties(9, posX, posY, width, height, 0, func_80250818, popup, -1); + set_window_update(9, 1); + } + break; + case 73: + case 74: + case 75: + case 76: + case 77: + case 78: + case 79: + if (popup->unk_17 != 0) { + popup->unk_17 = 0; + msgWidth = get_msg_width(bMessages[popup->messageIndex], 0) + 55; + posX = 160 - (msgWidth / 2); + width = msgWidth; + height = 40; + set_window_properties(9, posX, posY, width, height, 0, func_80250818, popup, -1); + set_window_update(9, 1); + } + break; + case 4: + case 5: + case 6: + case 7: + case 29: + case 30: + case 31: + case 32: + case 33: + case 34: + if (popup->unk_17 != 0) { + s32 messageID; + + popup->unk_17 = 0; + messageID = bMessages[popup->messageIndex]; + set_message_value(D_8029F640, 0); + msgWidth = get_msg_width(messageID, 0) + 31; + posX = 160 - (msgWidth / 2); + width = msgWidth; + numLines = get_msg_lines(messageID) - 1; + height = bMsgHeights[numLines]; + set_window_properties(9, posX, posY, width, height, 0, func_80250818, popup, -1); + set_window_update(9, 1); + } + break; + case 81: + if (popup->unk_17 != 0) { + s32 messageID; + + popup->unk_17 = 0; + messageID = bMessages[popup->messageIndex]; + set_message_msg(bActorMessages[D_8029F640], 0); + msgWidth = get_msg_width(messageID, 0) + 31; + posX = 160 - (msgWidth / 2); + width = msgWidth; + numLines = get_msg_lines(messageID) - 1; + height = bMsgHeights[numLines]; + set_window_properties(9, posX, posY, width, height, 0, func_80250818, popup, -1); + set_window_update(9, 1); + } + break; + case 46: + case 47: + case 48: + case 49: + case 50: + case 51: + case 52: + case 53: + case 54: + case 55: + case 56: + case 57: + case 58: + case 59: + case 60: + case 61: + case 62: + case 63: + case 64: + case 65: + case 66: + if (popup->unk_17 != 0) { + s32 messageID; + + popup->unk_17 = 0; + messageID = bMessages[popup->messageIndex]; + msgWidth = get_msg_width(messageID, 0) + 31; + posX = 160 - (msgWidth / 2); + posY = 192; + width = msgWidth; + numLines = get_msg_lines(messageID) - 1; + height = bMsgHeights[numLines]; + if (popup->messageIndex == 0x3B) { + posY = 120; + D_8029F64C = 1; + } + D_8029F64E = posY; + D_8029F650 = D_802835D8[numLines]; + + posY = D_8029F64E + D_8029F650; + set_window_properties(9, posX, posY, width, height, 0, func_80250818, popup, -1); + if (popup->messageIndex == 0x3B) { + set_window_update(9, 1); + } else { + set_window_update(9, 8); + } + } + break; + } +} ApiStatus ShowMessageBox(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; diff --git a/src/182B30.c b/src/182B30.c index da483eaaf1..45fc9838d8 100644 --- a/src/182B30.c +++ b/src/182B30.c @@ -9,15 +9,16 @@ extern u16 D_802840DC[]; extern u8 D_80284104[]; extern u8 D_80284120[]; +void update_player_actor_shadow(void); void func_80255FE0(s32, void*); void func_802571F0(s32, Actor*); -void update_player_actor_shadow(void); +void func_80259494(ActorPart*); void func_8025950C(ActorPart*, s32, Matrix4f); void func_802596C0(ActorPart*, s32, Matrix4f); void func_802597B0(ActorPart*, s32, Matrix4f); void func_8025995C(ActorPart*, s32, Matrix4f); -void func_8025C918(void); -void func_8025CD40(void); +void func_8025C918(s32 arg0, ActorPart* part, s32 yaw, Matrix4f mtx); +void func_8025CD40(s32, ActorPart*); void func_80259A48(s32 arg0, ActorPart* part, s32 yaw, Matrix4f mtx, s32 arg4); void func_80259AAC(s32 arg0, ActorPart* part, s32 yaw, Matrix4f mtx, s32 arg4); @@ -857,7 +858,32 @@ INCLUDE_ASM(s32, "182B30", func_80259494); INCLUDE_ASM(s32, "182B30", func_8025950C); -INCLUDE_ASM(s32, "182B30", func_802596C0); +void func_802596C0(ActorPart* part, s32 yaw, Matrix4f mtx) { + DecorationTable* temp_s2; + s32 opacity; + s32 idMask; + + opacity = 255; + temp_s2 = part->decorationTable; + idMask = 0; + + if (part->opacity < 255) { + idMask = 0x80000000; + opacity = part->opacity; + } + + if (part->flags & ACTOR_PART_FLAG_100) { + idMask = 0x80000000; + opacity = (opacity * 120) / 255; + } + + if (temp_s2->unk_768 != 0) { + func_80259494(part); + spr_draw_npc_sprite(part->unk_84 | 0x20000000 | idMask, yaw, opacity, temp_s2->unk_76C, mtx); + } else { + spr_draw_npc_sprite(part->unk_84 | 0x20000000 | idMask, yaw, opacity, temp_s2->unk_6D4, mtx); + } +} INCLUDE_ASM(s32, "182B30", func_802597B0); @@ -1824,15 +1850,15 @@ INCLUDE_ASM(s32, "182B30", func_8025BAA0); INCLUDE_ASM(s32, "182B30", func_8025C120); -s32 func_8025C840(s32 arg0, ActorPart* arg1) { +s32 func_8025C840(s32 arg0, ActorPart* part, s32 yaw, Matrix4f mtx) { - if (!(arg1->flags & 2)) { - switch (arg1->decorationTable->unk_750) { + if (!(part->flags & 2)) { + switch (part->decorationTable->unk_750) { case 0: - func_8025C8A0(arg0, arg1); + func_8025C8A0(arg0, part); return 0; case 11: - func_8025C918(); + func_8025C918(arg0, part, yaw, mtx); break; } } @@ -1852,16 +1878,15 @@ void func_8025C8A0(s32 arg0, ActorPart* arg1) { INCLUDE_ASM(s32, "182B30", func_8025C918); -s32 func_8025CCC8(s32 arg0, ActorPart* arg1) { - - if (!(arg1->flags & 2)) { - switch (arg1->decorationTable->unk_764) { +s32 func_8025CCC8(s32 arg0, ActorPart* part) { + if (!(part->flags & ACTOR_PART_FLAG_2)) { + switch (part->decorationTable->unk_764) { case 0: - func_8025CD28(arg0, arg1); + func_8025CD28(arg0, part); return 0; case 1: - func_8025CD40(); - break; + func_8025CD40(arg0, part); + return 0; } } return 0; diff --git a/src/18F340.c b/src/18F340.c index 1658ea30e6..84ba202023 100644 --- a/src/18F340.c +++ b/src/18F340.c @@ -19,7 +19,7 @@ void func_80260A60(void) { BattleStatus* battleStatus = &gBattleStatus; ActorPart* actorPart = &battleStatus->playerActor->partsTable[0]; - if (battleStatus->flags2 & 0x40) { + if (battleStatus->flags2 & BS_FLAGS2_40) { actorPart->idleAnimations = bPeachIdleAnims; set_animation(0, 0, 0xA0002); } else if (!battleStatus->outtaSightActive) { @@ -49,7 +49,7 @@ ApiStatus activate_defend_command(Evt* script, s32 isInitialCall) { ActorPart* actorPart = &gBattleStatus.playerActor->partsTable[0]; deduct_current_move_fp(); - gBattleStatus.flags1 |= 0x400000; + gBattleStatus.flags1 |= BS_FLAGS1_PLAYER_DEFENDING; actorPart->idleAnimations = bMarioDefendAnims; set_animation(0, 0, 0x10014); return ApiStatus_DONE2; @@ -71,7 +71,7 @@ ApiStatus func_80260B70(Evt* script, s32 isInitialCall) { INCLUDE_ASM(s32, "18F340", func_80260BF4); ApiStatus func_80260DB8(Evt* script, s32 isInitialCall) { - gBattleStatus.flags1 |= 0x40000; + gBattleStatus.flags1 |= BS_FLAGS1_40000; return ApiStatus_DONE2; } @@ -98,9 +98,9 @@ ApiStatus func_80260E38(Evt* script, s32 isInitialCall) { } ApiStatus func_80260E5C(Evt* script, s32 isInitialCall) { - gBattleStatus.flags1 &= ~0x8000; - gBattleStatus.flags1 &= ~0x2000; - gBattleStatus.flags1 &= ~0x4000; + gBattleStatus.flags1 &= ~BS_FLAGS1_8000; + gBattleStatus.flags1 &= ~BS_FLAGS1_2000; + gBattleStatus.flags1 &= ~BS_FLAGS1_4000; return ApiStatus_DONE2; } @@ -188,13 +188,13 @@ ApiStatus func_80261164(Evt* script, s32 isInitialCall) { ApiStatus ConsumeLifeShroom(Evt *script, s32 isInitialCall) { PlayerData* playerData = &gPlayerData; - ItemData* item = &gItemTable[0x95]; + ItemData* item = &gItemTable[ITEM_LIFE_SHROOM]; playerData->curHP += item->potencyA; if (playerData->curMaxHP < playerData->curHP) { playerData->curHP = playerData->curMaxHP; } - playerData->invItems[find_item(0x95)] = ITEM_NONE; + playerData->invItems[find_item(ITEM_LIFE_SHROOM)] = ITEM_NONE; sort_items(); script->varTable[3] = item->potencyA; @@ -217,7 +217,7 @@ ApiStatus RestorePreDefeatState(Evt* script, s32 isInitialCall) { battleStatus->rushFlags |= RUSH_FLAG_MEGA; } - if (playerData->curHP <= 5 && is_ability_active(ABILITY_POWER_RUSH) && + if (playerData->curHP <= 5 && is_ability_active(ABILITY_POWER_RUSH) && !(battleStatus->rushFlags & RUSH_FLAG_MEGA)) { gBattleStatus.flags2 |= BS_FLAGS2_8000000; battleStatus->rushFlags |= RUSH_FLAG_POWER; @@ -485,7 +485,51 @@ ApiStatus func_80261DD4(Evt* script, s32 isInitialCall) { return ApiStatus_DONE2; } -INCLUDE_ASM(s32, "18F340", func_80261DF4); +ApiStatus func_80261DF4(Evt* script, s32 isInitialCall) { + ItemEntity* item = get_item_entity(script->varTable[10]); + + if (isInitialCall) { + script->functionTemp[0] = 0; + script->functionTemp[1] = 0; + } + + switch (script->functionTemp[1]) { + case 0: + script->functionTemp[0]--; + item->position.y += script->functionTemp[0]; + if (item->position.y < 0.0f) { + item->position.y = 0.0f; + script->functionTemp[0] = 8; + script->functionTemp[1] = 1; + } + break; + case 1: + script->functionTemp[0]--; + item->position.y += script->functionTemp[0]; + item->position.x += 1.5; + if (item->position.y < 0.0f) { + item->position.y = 0.0f; + script->functionTemp[0] = 4; + script->functionTemp[1] = 2; + } + break; + case 2: + script->functionTemp[0]--; + item->position.y += script->functionTemp[0]; + item->position.x += 1.2; + if (item->position.y < 0.0f) { + item->position.y = 0.0f; + script->functionTemp[1] = 3; + } + break; + case 3: + D_8029FBB0[0] = 20; + D_8029FBB0[1] = 20; + D_8029FBB0[2] = 20; + return ApiStatus_DONE2; + } + return ApiStatus_BLOCK; +} ApiStatus func_80261FB4(Evt* script, s32 isInitialCall) { ItemEntity* item = get_item_entity(script->varTable[10]); diff --git a/src/190B20.c b/src/190B20.c index 78e242e406..f5babb73e2 100644 --- a/src/190B20.c +++ b/src/190B20.c @@ -1053,7 +1053,7 @@ s32* D_8028358C[] = { (s32*)D_8028358C, (s32*)D_8028358C, 0 }; -s16 D_802835D0[] = { 28, 40 }; +s16 bMsgHeights[] = { 28, 40 }; // keyed by number of lines in the message (1 or 2) s16 D_802835D4[] = { 0, -2 }; s16 D_802835D8[] = { 0, -12 }; @@ -3055,7 +3055,82 @@ void func_802666E4(Actor* actor, f32 x, f32 y, f32 z, s32 damage) { } while (0); // required to match } +// Weird float load issue at the top +#ifdef NON_MATCHING +void func_802667F0(s32 arg0, Actor* actor, f32 x, f32 y, f32 z) { + Actor* player = gBattleStatus.playerActor; + s32 type; + + if (actor->unk_200 == NULL) { + type = 0; + switch (arg0) { + case 0: + type = 0; + actor->unk_204 = 1; + break; + case 1: + type = 4; + actor->unk_204 = 0; + break; + case 2: + type = 3; + actor->unk_204 = 0; + break; + case 3: + type = 2; + actor->unk_204 = 2; + break; + case 4: + type = 0; + actor->unk_204 = 0; + break; + case 5: + type = player->unk_204; + player->unk_204++; + if (player->unk_204 > 2) { + player->unk_204 = 2; + } + break; + } + actor->unk_200 = fx_attack_result_text(type, x, y, z - 10.0f, 12.0f, 90); + actor->unk_205 = 80; + } else { + ((AttackResultTextFXData*)actor->unk_200->data)->unk_18 = 0; + type = actor->unk_204; + switch (arg0) { + case 0: + actor->unk_204++; + if (actor->unk_204 > 2) { + actor->unk_204 = 2; + } + break; + case 1: + type = 4; + break; + case 2: + type = 3; + break; + case 3: + type = 2; + break; + case 4: + type = 0; + break; + case 5: + type = player->unk_204; + player->unk_204++; + if (player->unk_204 > 2) { + player->unk_204 = 2; + } + break; + } + actor->unk_200 = fx_attack_result_text(type, x, y, z - 10.0f, 12.0f, 90); + actor->unk_205 = 80; + } +} +#else INCLUDE_ASM(void, "190B20", func_802667F0, s32 arg0, Actor* arg1, f32 arg2, f32 arg3, f32 arg4); +#endif void func_80266970(Actor* target) { target->unk_204 = 0; @@ -3071,12 +3146,12 @@ void func_80266978(void) { if (actor != NULL) { if (actor->unk_205 == 0x3C) { if (actor->unk_200 != 0) { - actor->unk_200[3][9] = 0; + ((AttackResultTextFXData*)actor->unk_200->data)->unk_24 = 0; } } if (actor->unk_205 == 5) { if (actor->unk_200 != 0) { - actor->unk_200[3][6] = 0; + ((AttackResultTextFXData*)actor->unk_200->data)->unk_18 = 0; actor->unk_200 = NULL; } } @@ -3090,12 +3165,12 @@ void func_80266978(void) { if (actor != NULL) { if (actor->unk_205 == 60) { if (actor->unk_200 != NULL) { - actor->unk_200[3][9] = 0; + ((AttackResultTextFXData*)actor->unk_200->data)->unk_24 = 0; } } if (actor->unk_205 == 5) { if (actor->unk_200 != NULL) { - actor->unk_200[3][6] = 0; + ((AttackResultTextFXData*)actor->unk_200->data)->unk_18 = 0; actor->unk_200 = NULL; } } @@ -3108,12 +3183,12 @@ void func_80266978(void) { if (actor != NULL) { if (actor->unk_205 == 60) { if (actor->unk_200 != NULL) { - actor->unk_200[3][9] = 0; + ((AttackResultTextFXData*)actor->unk_200->data)->unk_24 = 0; } } if (actor->unk_205 == 5) { if (actor->unk_200 != NULL) { - actor->unk_200[3][6] = 0; + ((AttackResultTextFXData*)actor->unk_200->data)->unk_18 = 0; actor->unk_200 = NULL; } } diff --git a/src/23680.c b/src/23680.c index 99d4a87656..614fb29230 100644 --- a/src/23680.c +++ b/src/23680.c @@ -2,6 +2,9 @@ #include "npc.h" #include "effects.h" +extern s32 D_8014B7F0; + +void spawn_drops(Enemy* enemy); INCLUDE_ASM(s32, "23680", spawn_drops); s32 get_coin_drop_amount(Enemy* enemy) { diff --git a/src/325AD0.c b/src/325AD0.c index 5fcd3465e4..649aaa79b2 100644 --- a/src/325AD0.c +++ b/src/325AD0.c @@ -1,5 +1,6 @@ #include "common.h" #include "effects.h" +#include "nu/nusys.h" u32 D_E0200690 = 0x1E6D3457; diff --git a/src/7bb60_len_41b0.c b/src/7bb60_len_41b0.c index 86c0c5eeb8..f659b3ea25 100644 --- a/src/7bb60_len_41b0.c +++ b/src/7bb60_len_41b0.c @@ -9,7 +9,6 @@ extern f32 D_8010C984; void func_800E315C(s32 colliderID); s32 collision_check_player_intersecting_world(s32 mode, s32 arg1, f32 arg2); -s8 get_current_partner_id(void); s32 phys_check_interactable_collision(void); void phys_save_ground_pos(void); diff --git a/src/a5dd0_len_114e0.c b/src/a5dd0_len_114e0.c index 9c33d83249..58df5e1d00 100644 --- a/src/a5dd0_len_114e0.c +++ b/src/a5dd0_len_114e0.c @@ -1,6 +1,7 @@ #include "common.h" #include "model.h" #include "ld_addrs.h" +#include "stdlib/stdarg.h" typedef struct GameMode { /* 0x00 */ u16 flags; @@ -434,7 +435,10 @@ Matrix4s mdl_RDPIdentity = { s32 D_8014B7A8[] = { 0x00000006, 0x00000000, 0x00000005, 0x00020000, 0x00000004, 0x00030000, 0x00000003, 0x00038000, 0x00000002, 0x0003C000, 0x00000001, 0x0003E000, 0x00000000, 0x0003F000, 0x00000000, 0x0003F800, 0x00000000, 0x00000000, }; -s32 D_8014B7F0[] = { 0x00000000, 0x00000000, }; +s32 D_8014B7F0 = 0; + +// padding? +s32 D_8014B7F4 = 0; Gfx D_8014B7F8[] = { gsDPSetRenderMode(G_RM_AA_ZB_OPA_SURF, G_RM_AA_ZB_OPA_SURF2), @@ -986,10 +990,10 @@ extern ModelCustomGfxList bModelSpecialDls; extern ModelCustomGfxBuilderList wCustomModelGfxBuilders; extern ModelCustomGfxBuilderList bCustomModelGfxBuilders; -extern ModelLocalVertexCopy** D_80152190; -extern ModelLocalVertexCopy** D_801521D0; +extern ModelLocalVertexCopyList wModelLocalVtxBuffers; +extern ModelLocalVertexCopyList bModelLocalVtxBuffers; +extern ModelLocalVertexCopyList* gCurrentModelLocalVtxBuffers; -extern ModelLocalVertexCopy** gCurrentModelLocalVtxBuffers; extern ModelNode* D_80152214; extern ModelNode* D_80152218; extern ModelTreeInfoList D_80152220; @@ -1007,10 +1011,11 @@ extern s32 texPannerAuxU[MAX_TEX_PANNERS]; extern s32 texPannerAuxV[MAX_TEX_PANNERS]; extern u32 mdl_nextTextureAddress; extern u16 mdl_currentTransformGroupChildIndex; +extern u16 D_80153226; extern ModelNode* D_80153370; extern u16 D_80153374; extern u16 D_80153376; -extern s16 D_8015336E; +extern u16 D_8015336E; extern RenderTask* mdl_renderTaskLists[3]; extern s32 mdl_renderTaskMode; extern s32 mdl_renderTaskCount; // num render task entries? @@ -1032,8 +1037,8 @@ void _delete_shadow(s32 shadowIndex); void func_80110F10(void); s32 entity_get_collision_flags(Entity* entity); void entity_free_static_data(EntityBlueprint* data); +s32 create_entity_shadow(Entity* entity, f32 x, f32 y, f32 z); void update_entity_shadow_position(Entity* entity); -s32 entity_raycast_down(f32* x, f32* y, f32* z, f32* hitYaw, f32* hitPitch, f32* hitLength); void func_80117D00(Model* model); void appendGfx_model_group(Model* model); void render_transform_group_node(ModelNode* node); @@ -1295,7 +1300,9 @@ void func_8010FE44(void* arg0) { func_8010FD98(arg0, D_8014AFB0); } -void entity_model_set_shadow_color(s32 alpha) { +void entity_model_set_shadow_color(void* data) { + s32 alpha = (s32)data; + gDPSetCombineLERP(gMasterGfxPos++, 0, 0, 0, 0, PRIMITIVE, 0, TEXEL0, 0, 0, 0, 0, 0, TEXEL0, 0, PRIMITIVE, 0); gDPSetPrimColor(gMasterGfxPos++, 0, 0, 0x00, 0x00, 0x00, alpha); } @@ -1629,7 +1636,62 @@ s32 entity_get_collision_flags(Entity* entity) { return entityFlags; } -INCLUDE_ASM(s32, "a5dd0_len_114e0", entity_interacts_with_current_partner); +s32 entity_interacts_with_current_partner(s32 entityIdx) { + s32 ret = FALSE; + u32 entityType = get_entity_type(entityIdx); + s32 partnerID = get_current_partner_id(); + Entity* entity; + + switch (partnerID) { + case PARTNER_BOMBETTE: + switch (entityType) { + default: + return FALSE; + case ENTITY_TYPE_BLUE_SWITCH: + case ENTITY_TYPE_RED_SWITCH: + case ENTITY_TYPE_MULTI_TRIGGER_BLOCK: + case ENTITY_TYPE_BRICK_BLOCK: + case ENTITY_TYPE_MULTI_COIN_BRICK: + case ENTITY_TYPE_YELLOW_BLOCK: + case ENTITY_TYPE_SINGLE_TRIGGER_BLOCK: + case ENTITY_TYPE_HIDDEN_YELLOW_BLOCK: + case ENTITY_TYPE_HIDDEN_RED_BLOCK: + case ENTITY_TYPE_RED_BLOCK: + case ENTITY_TYPE_HAMMER1_BLOCK: + case ENTITY_TYPE_HAMMER1_BLOCK_TINY: + case ENTITY_TYPE_SUPER_BLOCK: + case ENTITY_TYPE_BOMBABLE_ROCK: + entity = get_entity_by_index(entityIdx); + entity->flags |= ENTITY_FLAGS_BLOCK_BEING_HIT; + ret = TRUE; + } + break; + case PARTNER_KOOPER: + switch (entityType) { + default: + return FALSE; + case ENTITY_TYPE_BLUE_SWITCH: + case ENTITY_TYPE_RED_SWITCH: + case ENTITY_TYPE_MULTI_TRIGGER_BLOCK: + case ENTITY_TYPE_BRICK_BLOCK: + case ENTITY_TYPE_MULTI_COIN_BRICK: + case ENTITY_TYPE_YELLOW_BLOCK: + case ENTITY_TYPE_SINGLE_TRIGGER_BLOCK: + case ENTITY_TYPE_HIDDEN_YELLOW_BLOCK: + case ENTITY_TYPE_HIDDEN_RED_BLOCK: + case ENTITY_TYPE_RED_BLOCK: + case ENTITY_TYPE_HEALING_BLOCK: + case ENTITY_TYPE_1C: + case ENTITY_TYPE_SAVE_POINT: + case ENTITY_TYPE_SUPER_BLOCK: + entity = get_entity_by_index(entityIdx); + entity->flags |= ENTITY_FLAGS_BLOCK_BEING_HIT; + ret = TRUE; + } + break; + } + return ret; +} s32 test_player_entity_aabb(Entity* entity) { f32 yTemp = entity->position.y - (gPlayerStatus.position.y + gPlayerStatus.colliderHeight); @@ -1719,7 +1781,7 @@ INCLUDE_ASM(s32, "a5dd0_len_114e0", entity_anim_make_vertex_pointers); s32 is_entity_data_loaded(Entity* entity, EntityBlueprint* entityData, s32* loadedStart, s32* loadedEnd); INCLUDE_ASM(s32, "a5dd0_len_114e0", is_entity_data_loaded); -void load_simple_entity_data(Entity* entity, EntityBlueprint* entityData) { +void load_simple_entity_data(Entity* entity, EntityBlueprint* entityData, s32 listIndex) { s32 loadedStart; s32 loadedEnd; s32 entitySize; @@ -1776,8 +1838,134 @@ s32 func_80111790(void) { INCLUDE_ASM(void, "a5dd0_len_114e0", entity_free_static_data, EntityBlueprint* data); +// matches with this sig, but that breaks other usages of this func. +#ifdef NON_EQUIVALENT +s32 create_entity(EntityBlueprint* bp, ...) { + va_list ap; + EntityBlueprint** bpPtr; + f32 x; + f32 y; + f32 z; + f32 rotY; + s32 i; + s32 listIndex; + Entity* entity; + s32* a; + + va_start(ap, bp); + bpPtr = &bp; + *bpPtr = bp; + + load_area_specific_entity_data(); + + x = va_arg(ap, s32); + y = va_arg(ap, s32); + z = va_arg(ap, s32); + rotY = va_arg(ap, s32); + + a = &CreateEntityVarArgBuffer[3]; + + *a-- = 0; + *a-- = 0; + *a = 0; + + for (listIndex = 3; listIndex > 0; listIndex--) { + s32 arg = va_arg(ap, s32); + + if (arg == MAKE_ENTITY_END) { + break; + } + *a++ = arg; + } + + va_end(ap); + + for (listIndex = 0; listIndex < ARRAY_COUNT(*gCurrentEntityListPtr); listIndex++) { + if ((*gCurrentEntityListPtr)[listIndex] == NULL) { + break; + } + } + + if (listIndex >= 30) { + return -1; + } + + (*gCurrentEntityListPtr)[listIndex] = entity = heap_malloc(sizeof(*entity)); + mem_clear(entity, sizeof(*entity)); + entity->dataBuf.any = NULL; + if (bp->typeDataSize != 0) { + entity->dataBuf.any = heap_malloc(bp->typeDataSize); + mem_clear(entity->dataBuf.any, bp->typeDataSize); + } + entity->type = bp->entityType; + entity->listIndex = listIndex; + entity->boundScript = NULL; + entity->updateMatrixOverride = NULL; + entity->blueprint = bp; + entity->scriptReadPos = bp->updateEntityScript; + entity->hasEntityScript = entity->scriptReadPos != NULL; + entity->savedReadPos = bp->updateEntityScript; + entity->updateScriptCallback = NULL; + entity->flags = bp->flags | 0x80000000; + entity->collisionFlags = 0; + entity->unk_07 = 0; + entity->renderSetupFunc = NULL; + entity->position.x = x; + entity->position.y = y; + entity->position.z = z; + entity->rotation.x = 0.0f; + entity->rotation.y = rotY; + entity->rotation.z = 0.0f; + entity->scale.x = 1.0f; + entity->scale.y = 1.0f; + entity->scale.z = 1.0f; + entity->aabb.x = bp->aabbSize[0]; + entity->aabb.y = bp->aabbSize[1]; + entity->aabb.z = bp->aabbSize[2]; + entity->unk_05 = 1; + entity->unk_08 = -1; + entity->alpha = -1; + entity->virtualModelIndex = -1; + entity->shadowIndex = -1; + entity->vertexData = NULL; + + if (!(bp->flags & 8)) { + if (bp->dmaStart != 0) { + load_simple_entity_data(entity, bp, listIndex); + } + if (bp->renderCommandList != NULL) { + entity->virtualModelIndex = load_entity_model(bp->renderCommandList); + exec_entity_model_commandlist(entity->virtualModelIndex); + } + } else { + load_split_entity_data(entity, bp, listIndex); + } + + if (bp->entityType != 1 && (entity->flags & (ENTITY_FLAGS_SET_SHADOW_FLAG200 | ENTITY_FLAGS_100))) { + create_entity_shadow(entity, x, y, z); + } + + switch (bp->entityType) { + case ENTITY_TYPE_BLUE_SWITCH: + case ENTITY_TYPE_RED_SWITCH: + case ENTITY_TYPE_SIMPLE_SPRING: + case ENTITY_TYPE_SCRIPT_SPRING: + case ENTITY_TYPE_STAR_BOX_LAUCHER: + entity->flags |= ENTITY_FLAGS_4000; + break; + } + + if (bp->fpInit != NULL) { + bp->fpInit(entity); + } + + update_entity_transform_matrix(entity); + return entity->listIndex; +} +#else INCLUDE_ASM(s32, "a5dd0_len_114e0", create_entity, EntityBlueprint* data, s32 x, s32 y, s32 z, s32 arg4, ...); +#endif s32 create_shadow_from_data(ShadowBlueprint* data, f32 x, f32 y, f32 z) { Shadow* shadow; @@ -2506,7 +2694,7 @@ void clear_model_data(void) { gCurrentCustomModelGfxPtr = &wModelSpecialDls; gCurrentCustomModelGfxBuildersPtr = &wCustomModelGfxBuilders; gCurrentModelTreeRoot = &D_80152214; - gCurrentModelLocalVtxBuffers = &D_80152190; + gCurrentModelLocalVtxBuffers = &wModelLocalVtxBuffers; mdl_currentModelTreeNodeInfo = &D_80152220; D_801512F0 = &wBgRenderType; mdl_bgMultiplyColorA = 0; @@ -2520,7 +2708,7 @@ void clear_model_data(void) { gCurrentCustomModelGfxPtr = &bModelSpecialDls; gCurrentCustomModelGfxBuildersPtr = &bCustomModelGfxBuilders; gCurrentModelTreeRoot = &D_80152218; - gCurrentModelLocalVtxBuffers = &D_801521D0; + gCurrentModelLocalVtxBuffers = &bModelLocalVtxBuffers; mdl_currentModelTreeNodeInfo = &D_80152A20; D_801512F0 = &bBgRenderType; gCurrentFogSettings = &bFogSettings; @@ -2571,7 +2759,7 @@ void init_model_data(void) { gCurrentCustomModelGfxPtr = &wModelSpecialDls; gCurrentCustomModelGfxBuildersPtr = &wCustomModelGfxBuilders; gCurrentModelTreeRoot = &D_80152214; - gCurrentModelLocalVtxBuffers = &D_80152190; + gCurrentModelLocalVtxBuffers = &wModelLocalVtxBuffers; mdl_currentModelTreeNodeInfo = &D_80152220; D_801512F0 = &wBgRenderType; gCurrentFogSettings = &wFogSettings; @@ -2581,7 +2769,7 @@ void init_model_data(void) { gCurrentCustomModelGfxPtr = &bModelSpecialDls; gCurrentCustomModelGfxBuildersPtr = &bCustomModelGfxBuilders; gCurrentModelTreeRoot = &D_80152218; - gCurrentModelLocalVtxBuffers = &D_801521D0; + gCurrentModelLocalVtxBuffers = &bModelLocalVtxBuffers; mdl_currentModelTreeNodeInfo = &D_80152A20; D_801512F0 = &bBgRenderType; gCurrentFogSettings = &bFogSettings; @@ -2615,6 +2803,7 @@ void func_80116674(void) { for (i = 0; i < ARRAY_COUNT(*gCurrentModels); i++) { Model* m = (*gCurrentModels)[i]; + do {} while (0); } } #else @@ -3182,8 +3371,56 @@ ModelTransformGroup* get_transform_group(s32 index) { return (*gCurrentTransformGroups)[index]; } -void func_8011B1D8(ModelNode*); -INCLUDE_ASM(s32, "a5dd0_len_114e0", func_8011B1D8); +void func_8011B1D8(ModelNode* node) { + ModelNode* childNode; + ModelNodeProperty* prop; + s32 numChildren; + s32 i; + u16 childCount; + + if (node->type == 2) { + D_80153376 = D_80153226; + return; + } + + if (node->type == 5) { + prop = get_model_property(node, MODEL_PROP_KEY_GROUP_TYPE); + if (prop != NULL && prop->data.s != 0) { + mdl_treeIterPos += mdl_get_child_count(node); + D_80153376 = mdl_treeIterPos; + return; + } + } + + if (node->groupData != NULL) { + numChildren = node->groupData->numChildren; + if (numChildren != 0) { + for (i = 0; i < numChildren; i++) { + childNode = node->groupData->childList[i]; + childCount = mdl_treeIterPos; + if (childNode->type == 5) { + prop = get_model_property(childNode, MODEL_PROP_KEY_GROUP_TYPE); + if (prop != NULL && prop->data.s != 0) { + childCount += mdl_get_child_count(childNode); + } + } + func_8011B1D8(childNode); + + if (D_80153370 != NULL) { + break; + } + + if (D_8015336E == mdl_treeIterPos) { + D_80153370 = childNode; + D_80153374 = childCount; + break; + } + + mdl_treeIterPos++; + } + } + } +} void make_transform_group(u16 modelID) { mdl_treeIterPos = 0; @@ -3583,7 +3820,7 @@ void mdl_local_gfx_copy_vertices(u8* from, s32 num, u8* to) { INCLUDE_ASM(s32, "a5dd0_len_114e0", mdl_make_local_vertex_copy); void mdl_get_copied_vertices(s32 copyIndex, Vtx** firstVertex, Vtx** copiedVertices, s32* numCopied) { - ModelLocalVertexCopy* mlvc = gCurrentModelLocalVtxBuffers[copyIndex]; + ModelLocalVertexCopy* mlvc = (*gCurrentModelLocalVtxBuffers)[copyIndex]; s32 selector = mlvc->selector; *firstVertex = mlvc->minVertexAddr; @@ -3592,7 +3829,7 @@ void mdl_get_copied_vertices(s32 copyIndex, Vtx** firstVertex, Vtx** copiedVerti } Gfx* mdl_get_copied_gfx(s32 copyIndex) { - ModelLocalVertexCopy* mlvc = gCurrentModelLocalVtxBuffers[copyIndex]; + ModelLocalVertexCopy* mlvc = (*gCurrentModelLocalVtxBuffers)[copyIndex]; s32 selector = mlvc->selector; Gfx* gfxCopy = mlvc->gfxCopy[selector]; diff --git a/src/bss3.c b/src/bss3.c index 5351ac62e1..44d6ed31dd 100644 --- a/src/bss3.c +++ b/src/bss3.c @@ -74,8 +74,8 @@ BSS s8 wModelSpecialDls[0x80]; BSS s8 bModelSpecialDls[0x80]; BSS s8 wCustomModelGfxBuilders[0x80]; BSS s8 bCustomModelGfxBuilders[0x80]; -BSS s8 D_80152190[0x40]; -BSS s8 D_801521D0[0x40]; +BSS s8 wModelLocalVtxBuffers[0x40]; +BSS s8 bModelLocalVtxBuffers[0x40]; BSS s32 gCurrentModelLocalVtxBuffers; BSS s32 D_80152214; BSS s32 D_80152218; @@ -267,8 +267,5 @@ BSS char D_8015A57C[0x14]; BSS s8 mdl_textureHandles[0x2200]; BSS s8 D_8015C790[0x30]; BSS s8 D_8015C7C0[0x10]; -BSS s32 CreateEntityVarArgBuffer; -BSS s32 CreateEntityVarArgBuffer1; -BSS s32 CreateEntityVarArgBuffer2; -BSS s32 CreateEntityVarArgBuffer3; +BSS s32 CreateEntityVarArgBuffer[4]; BSS s32 D_8015C7E0; diff --git a/src/effects/effect_75.c b/src/effects/effect_75.c index 7042f6b588..294a225fa1 100644 --- a/src/effects/effect_75.c +++ b/src/effects/effect_75.c @@ -1,13 +1,6 @@ #include "common.h" #include "effects_internal.h" -typedef struct Effect117 { - /* 0x00 */ s32 unk_00; - /* 0x04 */ f32 unk_04; - /* 0x08 */ f32 unk_08; - /* 0x0C */ f32 unk_0C; -} Effect117; // size = 0x?? - void fx_75_appendGfx(void* effect); s32 D_E00EAA50[2] = { 0x09001A00, 0x09001A20 }; @@ -22,7 +15,7 @@ void fx_75_init(void) { INCLUDE_ASM(s32, "effects/effect_75", fx_75_update); void fx_75_render(EffectInstance* effect) { - Effect117* effect117 = effect->data; + Effect75FXData* data = effect->data; RenderTask renderTask; RenderTask* renderTaskPtr = &renderTask; RenderTask* retTask; @@ -32,7 +25,7 @@ void fx_75_render(EffectInstance* effect) { f32 outZ; f32 outS; - shim_transform_point(gCameras[gCurrentCameraID].perspectiveMatrix[0], effect117->unk_04, effect117->unk_08, effect117->unk_0C, 1.0f, &outX, &outY, &outZ, &outS); + shim_transform_point(gCameras[gCurrentCameraID].perspectiveMatrix[0], data->unk_04, data->unk_08, data->unk_0C, 1.0f, &outX, &outY, &outZ, &outS); outDist = outZ + 5000; if (outDist < 0) { diff --git a/src/entity.c b/src/entity.c index c34bc6371f..13f1fa2afa 100644 --- a/src/entity.c +++ b/src/entity.c @@ -782,10 +782,10 @@ void clear_entity_model_flags(s32 idx, s32 newFlags) { } } -void bind_entity_model_setupGfx(s32 idx, s32 setupGfxCallbackArg0, UNK_FUN_PTR(fpSetupGfxCallback)) { +void bind_entity_model_setupGfx(s32 idx, s32 setupGfxCallbackArg0, void (*fpSetupGfxCallback)(void*)) { EntityModel* entityModel = (*gCurrentEntityModelList)[idx & ~BATTLE_ENTITY_ID_MASK]; - entityModel->fpSetupGfxCallback = (void (*)(void*))fpSetupGfxCallback; + entityModel->fpSetupGfxCallback = fpSetupGfxCallback; entityModel->setupGfxCallbackArg0 = (void*)setupGfxCallbackArg0; } diff --git a/src/evt/evt.c b/src/evt/evt.c index 204b19b5ad..dfdea6bac7 100644 --- a/src/evt/evt.c +++ b/src/evt/evt.c @@ -6,7 +6,6 @@ Bytecode* evt_skip_else(Evt* script); Bytecode* evt_goto_end_case(Evt* script); Bytecode* evt_goto_next_case(Evt* script); Bytecode* evt_goto_end_loop(Evt* script); -s32 evt_get_variable_index(Evt* script, s32 var); // BSS extern char evtDebugPrintBuffer[]; diff --git a/src/input.c b/src/input.c index ce31c931ec..85313fd6ce 100644 --- a/src/input.c +++ b/src/input.c @@ -9,7 +9,7 @@ void func_800287F0(void) { gGameStatusPtr->heldButtons[0] = 0; gGameStatusPtr->stickX[0] = 0; gGameStatusPtr->stickY[0] = 0; - gGameStatusPtr->prevButtons = 0; + gGameStatusPtr->prevButtons[0] = 0; gGameStatusPtr->unk_50[0] = 4; gGameStatusPtr->unk_48[0] = 15; gGameStatusPtr->unk_60 = 0; @@ -24,4 +24,228 @@ void func_80028838(void) { D_8009A6A6 = 0; } +// Backwards jump hall of shame +#ifdef NON_MATCHING +void update_input(void) { + OSContPad* cont = &D_8009A5B8; + s8 update; + s8 cond; + s16 stickX; + s16 stickY; + s32 buttons; + + update = FALSE; + if (gGameStatusPtr->contBitPattern & 1) { + update = TRUE; + nuContDataGet(cont, 0); + } + + if (gGameStatusPtr->demoState != 0) { + if (gGameStatusPtr->demoState < 2 && + (cont->button & (BUTTON_A | BUTTON_B | BUTTON_Z | BUTTON_START)) && + update) + { + gGameStatusPtr->demoState = 2; + } + cont->button = gGameStatusPtr->demoButtonInput; + cont->stick_x = gGameStatusPtr->demoStickX; + cont->stick_y = gGameStatusPtr->demoStickY; + update = TRUE; + } + + if (update) { + stickX = cont->stick_x; + stickY = cont->stick_y; + if (stickX > 0) { + stickX -= 4; + if (stickX < 0) { + stickX = 0; + } + } + if (stickX < 0) { + stickX += 4; + if (stickX > 0) { + stickX = 0; + } + } + + if (stickY > 0) { + stickY -= 4; + if (stickY < 0) { + stickY = 0; + } + } + if (stickY < 0) { + stickY += 4; + if (stickY > 0) { + stickY = 0; + } + } + + gGameStatusPtr->stickX[0] = stickX; + gGameStatusPtr->stickY[0] = stickY; + buttons = cont->button; + + cond = FALSE; + if (stickX > 0x20) { + cond = TRUE; + buttons |= BUTTON_STICK_RIGHT; + if (!(gGameStatusPtr->prevButtons[0] & BUTTON_STICK_RIGHT)) { + D_8009A6A0 = stickX; + } else { + if (D_8009A6A4 == 0) { + if (D_8009A6A0 < stickX) { + D_8009A6A0 = stickX; + } + } else { + if (D_8009A6A0 > stickX) { + D_8009A6A0 = stickX; + } + } + + } + } + if (stickX < -0x20) { + cond = TRUE; + buttons |= BUTTON_STICK_LEFT; + if (!(gGameStatusPtr->prevButtons[0] & BUTTON_STICK_LEFT)) { + D_8009A6A0 = stickX; + } else { + if (D_8009A6A4 == 0) { + if (D_8009A6A0 > stickX) { + D_8009A6A0 = stickX; + } + } else { + if (D_8009A6A0 < stickX) { + D_8009A6A0 = stickX; + } + } + } + } + if (!cond) { + D_8009A6A4 = 0; + D_8009A6A0 = stickX; + } + + cond = FALSE; + if (stickY > 0x20) { + cond = TRUE; + buttons |= BUTTON_STICK_UP; + if (!(gGameStatusPtr->prevButtons[0] & BUTTON_STICK_UP)) { + D_8009A6A2 = stickY; + } else { + if (!D_8009A6A6) { + if (D_8009A6A2 < stickY) { + D_8009A6A2 = stickY; + } + } else { + if (D_8009A6A2 > stickY) { + D_8009A6A2 = stickY; + } + } + } + } + if (stickY < -0x20) { + cond = TRUE; + buttons |= BUTTON_STICK_DOWN; + if (!(gGameStatusPtr->prevButtons[0] & BUTTON_STICK_DOWN)) { + D_8009A6A2 = stickY; + } else { + if (!D_8009A6A6) { + if (D_8009A6A2 > stickY) { + D_8009A6A2 = stickY; + } + } else { + if (D_8009A6A2 < stickY) { + D_8009A6A2 = stickY; + } + } + } + } + if (!cond) { + D_8009A6A6 = FALSE; + D_8009A6A2 = stickY; + } + + if (stickX > 0x20) { + if (D_8009A6A4 == TRUE && (stickX - D_8009A6A0 > 0x10)) { + buttons &= ~BUTTON_STICK_RIGHT; + D_8009A6A4 = FALSE; + } + if (D_8009A6A0 - stickX > 0x10) { + D_8009A6A4 = TRUE; + } + } + if (stickX < -0x20) { + if (D_8009A6A4 == TRUE) { + if (D_8009A6A0 - stickX > 0x10) { + buttons &= ~BUTTON_STICK_LEFT; + D_8009A6A4 = FALSE; + } + } + if (stickX - D_8009A6A0 > 0x10) { + D_8009A6A4 = TRUE; + } + } + + if (stickY > 0x20) { + if (D_8009A6A6 == TRUE && (stickY - D_8009A6A2 > 0x10)) { + buttons &= ~BUTTON_STICK_UP; + D_8009A6A6 = FALSE; + } + if (D_8009A6A2 - stickY > 0x10) { + D_8009A6A6 = TRUE; + } + } + if (stickY < -0x20) { + if (D_8009A6A6 == TRUE) { + if (D_8009A6A2 - stickY > 0x10) { + buttons &= ~BUTTON_STICK_DOWN; + D_8009A6A6 = FALSE; + } + } + if (stickY - D_8009A6A2 > 0x10) { + D_8009A6A6 = TRUE; + } + } + + gGameStatusPtr->currentButtons[0] = buttons; + gGameStatusPtr->pressedButtons[0] = gGameStatusPtr->currentButtons[0] ^ gGameStatusPtr->prevButtons[0]; + gGameStatusPtr->pressedButtons[0] &= gGameStatusPtr->currentButtons[0]; + + if (buttons != 0) { + if (gGameStatusPtr->prevButtons[0] != buttons) { + gGameStatusPtr->heldButtons[0] = buttons; + gGameStatusPtr->unk_60 = -1; + gGameStatusPtr->heldButtons[0] = gGameStatusPtr->currentButtons[0] ^ gGameStatusPtr->prevButtons[0]; + gGameStatusPtr->heldButtons[0] &= gGameStatusPtr->currentButtons[0]; + gGameStatusPtr->unk_58 = gGameStatusPtr->unk_48[0]; + } else { + if (gGameStatusPtr->unk_60 >= 0) { + gGameStatusPtr->unk_60--; + if (gGameStatusPtr->unk_60 == 0) { + gGameStatusPtr->heldButtons[0] = gGameStatusPtr->currentButtons[0]; + gGameStatusPtr->unk_60 = gGameStatusPtr->unk_50[0]; + } else { + gGameStatusPtr->heldButtons[0] = 0; + } + } else { + gGameStatusPtr->unk_58--; + if (gGameStatusPtr->unk_58 == 0) { + gGameStatusPtr->heldButtons[0] = gGameStatusPtr->currentButtons[0]; + gGameStatusPtr->unk_60 = gGameStatusPtr->unk_50[0]; + } else { + gGameStatusPtr->heldButtons[0] = 0; + } + } + } + } else { + gGameStatusPtr->heldButtons[0] = 0; + } + + gGameStatusPtr->prevButtons[0] = gGameStatusPtr->currentButtons[0]; + } +} +#else INCLUDE_ASM(s32, "input", update_input); +#endif diff --git a/src/main_loop.c b/src/main_loop.c index 455a055551..9666503969 100644 --- a/src/main_loop.c +++ b/src/main_loop.c @@ -257,7 +257,7 @@ void load_engine_data(void) { gGameStatusPtr->unk_7C = 1; gGameStatusPtr->creditsViewportMode = -1; gGameStatusPtr->demoFlags = 0; - gGameStatusPtr->unk_81 = 0; + gGameStatusPtr->multiplayerEnabled = 0; gGameStatusPtr->unk_82 = -8; gGameStatusPtr->unk_83 = 4; timeFreezeMode = 0; diff --git a/src/pause/pause_stats.c b/src/pause/pause_stats.c index 4c5afe5fdf..a30b97ca6a 100644 --- a/src/pause/pause_stats.c +++ b/src/pause/pause_stats.c @@ -51,14 +51,14 @@ HudScript* gPauseStatsSPIncElements[] = { &HES_StatusSPIncrement1, &HES_StatusSP HudScript* gPauseStatsStarElements[] = { &HES_StatusStar1, &HES_StatusStar3, &HES_StatusStar2, &HES_StatusStar4, &HES_StatusStar5, &HES_StatusStar6, &HES_StatusStar7 }; -//s32 D_8024F46C[] = { -1, 1, 2, 4, 5, 7, 8 }; -s32 D_8024F46C = -1; -s32 D_8024F470 = 1; -s32 D_8024F474 = 2; -s32 D_8024F478 = 4; -s32 D_8024F47C = 5; -s32 D_8024F480 = 7; -s32 D_8024F484 = 8; +s32 D_8024F46C[] = { -1, 1, 2, 4, 5, 7, 8 }; +// s32 D_8024F46C = -1; +// s32 D_8024F470 = 1; +// s32 D_8024F474 = 2; +// s32 D_8024F478 = 4; +// s32 D_8024F47C = 5; +// s32 D_8024F480 = 7; +// s32 D_8024F484 = 8; MenuWindowBP gStatsMenuWindowBPs[] = { { @@ -92,7 +92,403 @@ MenuPanel gPausePanelStats = { .fpCleanup = &pause_stats_cleanup }; +// needs a lot of work with the loops +#ifdef NON_EQUIVALENT +void pause_stats_draw_contents(MenuPanel* menu, s32 baseX, s32 baseY, s32 width, s32 height, s32 opacity, s32 darkening) { + StatsEntryData* statsEntryData; + s16 temp_v0_4; + s16 temp_v1; + s16 bootsLevel; + s16 hammerLevel; + s16 var_v0_2; + s32 icon10; + + s32 limit; + s32 temp_v0_3; + s32 var_s0; + s32 var_s2_2; + s32 var_s3_2; + s32 cond; + s32 elemIdx; + s32 var_s5_2; + s32 boxWidth; + s16 level; + s32 frameCounter; + + hud_element_set_render_pos(gPauseStatsIconIDs[3], baseX + 143, baseY + 109); + hud_element_draw_without_clipping(gPauseStatsIconIDs[3]); + draw_msg(pause_get_menu_msg(0x32), baseX + 155, baseY + 101, 255, 0xA, 1); + draw_number(gPlayerData.coins, baseX + 281, baseY + 101, 1, 0xA, 255, 3); + hud_element_set_render_pos(gPauseStatsIconIDs[11], baseX + 248, baseY + 108); + hud_element_draw_without_clipping(gPauseStatsIconIDs[11]); + hud_element_set_render_pos(gPauseStatsIconIDs[4], baseX + 143, baseY + 0x5E); + hud_element_draw_without_clipping(gPauseStatsIconIDs[4]); + draw_msg(pause_get_menu_msg(51), baseX + 155, baseY + 86, 255, 0xA, 1); + draw_number(gPlayerData.starPoints, baseX + 281, baseY + 86, 1, 0xA, 255, 3); + hud_element_set_render_pos(gPauseStatsIconIDs[11], baseX + 248, baseY + 93); + hud_element_draw_without_clipping(gPauseStatsIconIDs[11]); + hud_element_set_render_pos(gPauseStatsIconIDs[5], baseX + 143, baseY + 123); + hud_element_draw_without_clipping(gPauseStatsIconIDs[5]); + draw_msg(pause_get_menu_msg(0x34), baseX + 155, baseY + 116, 255, 0xA, 1); + draw_number(gPlayerData.starPieces, baseX + 281, baseY + 116, 1, 0xA, 255, 3); + hud_element_set_render_pos(gPauseStatsIconIDs[11], baseX + 248, baseY + 123); + hud_element_draw_without_clipping(gPauseStatsIconIDs[11]); + pause_draw_menu_label(0, baseX + 21, baseY + 35); + hud_element_set_render_pos(gPauseStatsIconIDs[7], baseX + 52, baseY + 57); + hud_element_draw_without_clipping(gPauseStatsIconIDs[7]); + draw_msg(pause_get_menu_msg(0x36), baseX + 25, baseY + 51, 255, 0, 1); + draw_number(gPlayerData.curHP, baseX + 78, baseY + 51, 1, 0, 255, 3); + draw_msg(pause_get_menu_msg(0x39), baseX + 78, baseY + 51, 255, 0, 1); + draw_number(gPlayerData.curMaxHP, baseX + 105, baseY + 51, 1, 0, 255, 3); + pause_draw_menu_label(1, baseX + 21, baseY + 69); + hud_element_set_render_pos(gPauseStatsIconIDs[8], baseX + 52, baseY + 92); + hud_element_draw_without_clipping(gPauseStatsIconIDs[8]); + draw_msg(pause_get_menu_msg(0x37), baseX + 25, baseY + 85, 255, 0, 1); + draw_number(gPlayerData.curFP, baseX + 78, baseY + 85, 1, 0, 255, 3); + draw_msg(pause_get_menu_msg(0x39), baseX + 78, baseY + 85, 255, 0, 1); + draw_number(gPlayerData.curMaxFP, baseX + 105, baseY + 85, 1, 0, 255, 3); + pause_draw_menu_label(2, baseX + 21, baseY + 103); + hud_element_set_render_pos(gPauseStatsIconIDs[9], baseX + 52, baseY + 126); + hud_element_draw_without_clipping(gPauseStatsIconIDs[9]); + draw_msg(pause_get_menu_msg(0x38), baseX + 25, baseY + 119, 255, 0, 1); + draw_number(gPlayerData.maxBP, baseX + 78, baseY + 119, 1, 0, 255, 3); + hud_element_set_render_pos(gPauseStatsIconIDs[6], baseX + 143, baseY + 140); + hud_element_draw_without_clipping(gPauseStatsIconIDs[6]); + draw_msg(pause_get_menu_msg(0x35), baseX + 155, baseY + 133, 255, 0xA, 1); + + frameCounter = gPlayerData.frameCounter; + if (frameCounter > 21599999) { + frameCounter = 21599999; + } + draw_number((frameCounter / 2160000) % 10, baseX + 237, baseY + 133, 1, 0xA, 255, 2); + draw_number((frameCounter / 216000) - ((frameCounter / 2160000) * 10), baseX + 246, baseY + 133, 1, 0xA, 255, 2); + draw_msg(pause_get_menu_msg(0x3A), baseX + 257, baseY + 132, 255, 0xA, 1); + draw_msg(pause_get_menu_msg(0x3A), baseX + 257, baseY + 127, 255, 0xA, 1); + draw_number((frameCounter / 36000) - ((frameCounter / 216000) * 6), baseX + 264, baseY + 133, 1, 0xA, 255, 2); + draw_number((frameCounter / 3600) - ((frameCounter / 36000) * 10), baseX + 273, baseY + 133, 1, 0xA, 255, 2); + + bootsLevel = gPlayerData.bootsLevel; + hammerLevel = gPlayerData.hammerLevel; + level = gPlayerData.level; + if (level >= 10) { + boxWidth = 0x79; + draw_box(4, &gPauseWS_10, baseX + 7, baseY + 12, 0, boxWidth, 17, 255, 0, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, NULL, NULL, NULL, SCREEN_WIDTH, SCREEN_HEIGHT, NULL); + } else { + boxWidth = 0x71; + draw_box(4, &gPauseWS_10, baseX + 7, baseY + 12, 0, boxWidth, 17, 255, 0, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, NULL, NULL, NULL, SCREEN_WIDTH, SCREEN_HEIGHT, NULL); + } + + hud_element_set_render_pos(gPauseStatsIconIDs[0], baseX + 61, baseY + 21); + hud_element_draw_without_clipping(gPauseStatsIconIDs[0]); + draw_msg(pause_get_menu_msg(0x43), baseX + 16, baseY + 14, 255, 0, 1); + draw_msg(pause_get_menu_msg(0x44), baseX + 67, baseY + 14, 255, 0, 1); + draw_number(level, baseX + 106, baseY + 14, 1, 0, 255, 2); + + bootsLevel++; + if (bootsLevel < 0) { + bootsLevel = 0; + } + if (bootsLevel > 3) { + bootsLevel = 3; + } + + hammerLevel++; + if (hammerLevel < 0) { + hammerLevel = 0; + } + if (hammerLevel > 3) { + hammerLevel = 3; + } + + pause_draw_menu_label(3, baseX + 137, baseY + 10); + pause_draw_menu_label(4, baseX + 137, baseY + 35); + cond = TRUE; + hud_element_set_script(gPauseStatsIconIDs[1], gStatsBootsElements[bootsLevel]); + hud_element_set_render_pos(gPauseStatsIconIDs[1], baseX + 163, baseY + 29); + hud_element_draw_without_clipping(gPauseStatsIconIDs[1]); + draw_msg(pause_get_menu_msg(gPauseStatsBootsMessages[bootsLevel]), baseX + 176, baseY + 23, 255, 0, 1); + var_s3_2 = 0; + hud_element_set_script(gPauseStatsIconIDs[2], gStatsHammerElements[hammerLevel]); + hud_element_set_render_pos(gPauseStatsIconIDs[2], baseX + 163, baseY + 54); + elemIdx = 0; + hud_element_draw_without_clipping(gPauseStatsIconIDs[2]); + draw_msg(pause_get_menu_msg(gPauseStatsHammerMessages[hammerLevel]), baseX + 176, baseY + 48, 255, 0, 1); + pause_draw_menu_label(6, baseX + 130, baseY + 69); + pause_draw_menu_label(5, baseX + 138, baseY + 60); + var_s2_2 = 0; + + icon10 = gPauseStatsIconIDs[10]; + temp_v1 = gPlayerData.specialBarsFilled; + var_v0_2 = temp_v1; + if (temp_v1 < 0) { + var_v0_2 = temp_v1 + 255; + } + temp_v0_3 = var_v0_2 >> 8; + temp_v0_4 = temp_v1 - (temp_v0_3 << 8); + if (temp_v0_4 < 0) { + temp_v0_4 = temp_v0_4 + 0x1F; + } + + limit = (temp_v0_4 >> 5) + (temp_v0_3 * 8); + + if (limit > 0) { +loop_18: + var_s3_2++; + hud_element_set_script(icon10, gPauseStatsSPIncElements[elemIdx]); + hud_element_set_render_pos(icon10, baseX + ((elemIdx * 20) + 140) + D_8024F46C[0], baseY + 75); + if (cond) { + hud_element_draw_without_clipping(icon10); + cond = FALSE; + } else { + hud_element_draw_next(icon10); + } + var_s2_2 = 1; + if (var_s3_2 < limit) { + var_s3_2++; + hud_element_set_script(icon10, gPauseStatsSPIncElements[elemIdx]); + hud_element_set_render_pos(icon10, baseX + ((elemIdx * 20) + 140) + D_8024F46C[1], baseY + 75); + if (cond) { + hud_element_draw_without_clipping(icon10); + cond = FALSE; + } else { + hud_element_draw_next(icon10); + } + var_s2_2 = 2; + if (var_s3_2 < limit) { + var_s3_2++; + hud_element_set_script(icon10, gPauseStatsSPIncElements[elemIdx]); + hud_element_set_render_pos(icon10, baseX + ((elemIdx * 20) + 140) + D_8024F46C[2], baseY + 75); + if (cond) { + hud_element_draw_without_clipping(icon10); + cond = FALSE; + } else { + hud_element_draw_next(icon10); + } + var_s2_2 = 3; + if (var_s3_2 < limit) { + var_s3_2++; + hud_element_set_script(icon10, gPauseStatsSPIncElements[elemIdx]); + hud_element_set_render_pos(icon10, baseX + ((elemIdx * 20) + 140) + D_8024F46C[3], baseY + 75); + if (cond) { + hud_element_draw_without_clipping(icon10); + cond = FALSE; + } else { + hud_element_draw_next(icon10); + } + var_s2_2 = 4; + if (var_s3_2 < limit) { + var_s3_2++; + hud_element_set_script(icon10, gPauseStatsSPIncElements[elemIdx]); + hud_element_set_render_pos(icon10, baseX + ((elemIdx * 20) + 140) + D_8024F46C[4], baseY + 75); + if (cond) { + hud_element_draw_without_clipping(icon10); + cond = FALSE; + } else { + hud_element_draw_next(icon10); + } + var_s2_2 = 5; + if (var_s3_2 < limit) { + var_s3_2++; + hud_element_set_script(icon10, gPauseStatsSPIncElements[elemIdx]); + hud_element_set_render_pos(icon10, baseX + ((elemIdx * 20) + 140) + D_8024F46C[5], baseY + 75); + if (cond) { + hud_element_draw_without_clipping(icon10); + cond = FALSE; + } else { + hud_element_draw_next(icon10); + } + var_s2_2 = 6; + if (var_s3_2 < limit) { + var_s3_2++; + hud_element_set_script(icon10, gPauseStatsSPIncElements[elemIdx]); + hud_element_set_render_pos(icon10, baseX + ((elemIdx * 20) + 140) + D_8024F46C[6], baseY + 75); + if (cond) { + hud_element_draw_without_clipping(icon10); + cond = FALSE; + } else { + hud_element_draw_next(icon10); + } + var_s2_2 = 7; + if (var_s3_2 < limit) { + var_s3_2++; + hud_element_set_script(icon10, gPauseStatsStarElements[elemIdx]); + hud_element_set_render_pos(icon10, baseX + ((elemIdx * 20) + 0x98), baseY + 0x4D); + if (cond) { + hud_element_draw_without_clipping(icon10); + cond = FALSE; + } else { + hud_element_draw_next(icon10); + } + var_s2_2 = 0; + elemIdx += 1; + if (var_s3_2 < limit) { + goto loop_18; + } + } + } + } + } + } + } + } + } + + var_s5_2 = (elemIdx * 20) + 152; + var_s0 = (elemIdx * 20) + 140; + limit = gPlayerData.maxStarPower * 8; +loop_51: + if (var_s3_2 < limit) { + if (var_s2_2 == 0) { + var_s3_2++; + hud_element_set_script(icon10, HES_StatusSPEmptyIncrement); + hud_element_set_render_pos(icon10, baseX + var_s0 + D_8024F46C[0], baseY + 75); + if (cond) { + hud_element_draw_without_clipping(icon10); + cond = FALSE; + } else { + hud_element_draw_next(icon10); + } + var_s2_2++; + if (var_s3_2 < limit) { + goto block_58; + } + } else { +block_58: + if (var_s2_2 == 1) { + var_s3_2++; + hud_element_set_script(icon10, HES_StatusSPEmptyIncrement); + hud_element_set_render_pos(icon10, baseX + var_s0 + D_8024F46C[1], baseY + 75); + if (cond) { + hud_element_draw_without_clipping(icon10); + cond = FALSE; + } else { + hud_element_draw_next(icon10); + } + var_s2_2++; + if (var_s3_2 < limit) { + goto block_63; + } + } else { +block_63: + if (var_s2_2 == 2) { + var_s3_2++; + hud_element_set_script(icon10, HES_StatusSPEmptyIncrement); + hud_element_set_render_pos(icon10, baseX + var_s0 + D_8024F46C[2], baseY + 75); + if (cond) { + hud_element_draw_without_clipping(icon10); + cond = FALSE; + } else { + hud_element_draw_next(icon10); + } + var_s2_2++; + if (var_s3_2 < limit) { + goto block_69; + } + } else { +block_69: + if (var_s2_2 == 3) { + var_s3_2++; + hud_element_set_script(icon10, HES_StatusSPEmptyIncrement); + hud_element_set_render_pos(icon10, baseX + var_s0 + D_8024F46C[3], baseY + 75); + if (cond) { + hud_element_draw_without_clipping(icon10); + cond = FALSE; + } else { + hud_element_draw_next(icon10); + } + var_s2_2++; + if (var_s3_2 < limit) { + goto block_75; + } + } else { +block_75: + if (var_s2_2 == 4) { + var_s3_2++; + hud_element_set_script(icon10, HES_StatusSPEmptyIncrement); + hud_element_set_render_pos(icon10, baseX + var_s0 + D_8024F46C[4], baseY + 75); + if (cond) { + hud_element_draw_without_clipping(icon10); + cond = FALSE; + } else { + hud_element_draw_next(icon10); + } + var_s2_2++; + if (var_s3_2 < limit) { + goto block_81; + } + } else { +block_81: + if (var_s2_2 == 5) { + var_s3_2++; + hud_element_set_script(icon10, HES_StatusSPEmptyIncrement); + hud_element_set_render_pos(icon10, baseX + var_s0 + D_8024F46C[5], baseY + 75); + if (cond) { + hud_element_draw_without_clipping(icon10); + cond = FALSE; + } else { + hud_element_draw_next(icon10); + } + var_s2_2++; + if (var_s3_2 < limit) { + goto block_87; + } + } else { +block_87: + if (var_s2_2 == 6) { + var_s3_2++; + hud_element_set_script(icon10, HES_StatusSPEmptyIncrement); + hud_element_set_render_pos(icon10, baseX + var_s0 + D_8024F46C[6], baseY + 75); + if (cond) { + hud_element_draw_without_clipping(icon10); + cond = FALSE; + } else { + hud_element_draw_next(icon10); + } + var_s2_2++; + if (var_s3_2 < limit) { + goto block_93; + } + } else { +block_93: + if (var_s2_2 == 7) { + var_s3_2++; + hud_element_set_script(icon10, HES_StatusStarEmpty); + hud_element_set_render_pos(icon10, baseX + var_s5_2, baseY + 0x4D); + if (cond) { + hud_element_draw_without_clipping(icon10); + cond = FALSE; + } else { + hud_element_draw_next(icon10); + } + var_s2_2 = 0; + if (var_s3_2 < limit) { + goto block_98; + } + } else { +block_98: + var_s2_2 = 0; + var_s5_2 += 20; + var_s0 += 20; + goto loop_51; + } + } + } + } + } + } + } + } + } + + if (gPauseMenuCurrentTab == 1) { + StatsEntryData* entry = &gStatsMenuEntries[menu->selected]; + + pause_set_cursor_pos(0x1F, baseX + entry->cursorX, baseY + entry->cursorY); + } +} +#else INCLUDE_ASM(s32, "pause/138CC0", pause_stats_draw_contents); +#endif void pause_stats_init(MenuPanel* panel) { s32 i; diff --git a/src/world/area_flo/flo_14/CCB310.c b/src/world/area_flo/flo_14/CCB310.c index 635dc1ef81..92523b9a29 100644 --- a/src/world/area_flo/flo_14/CCB310.c +++ b/src/world/area_flo/flo_14/CCB310.c @@ -408,9 +408,7 @@ EvtScript N(80243870) = { EVT_END }; -s32 N(D_80243B14_CCEE24) = { - 0x00000000, -}; +f32 N(D_80243B14_CCEE24) = 0.0f; s32 N(D_80243B18_CCEE28) = { 0x0000005A, @@ -613,12 +611,11 @@ ApiStatus N(func_8024046C_CCB77C)(Evt* script, s32 isInitialCall) { // graphics macros #ifdef NON_EQUIVALENT -void guMtxF2L(Matrix4f, Mtx* m); -void guMtxIdentF(Matrix4f); - void N(func_80240504_CCB814)(void) { Matrix4f matrix; - s32 x, y, z; + Vtx* sp50; + Vtx* sp54; + s32 sp58; guMtxIdentF(matrix); @@ -636,7 +633,7 @@ void N(func_80240504_CCB814)(void) { guMtxF2L(matrix, &gDisplayContext->matrixStack[gMatrixListPos]); - mdl_get_copied_vertices(0, &x, &y, &z); + mdl_get_copied_vertices(0, &sp50, &sp54, &sp58); gSPMatrix(gMasterGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_NOPUSH | G_MTX_MUL | G_MTX_MODELVIEW); gSPDisplayList(gMasterGfxPos++, mdl_get_copied_gfx(0)); diff --git a/src/world/area_hos/hos_00/A0C4B0.c b/src/world/area_hos/hos_00/A0C4B0.c index 6513aee9c9..2f6849550d 100644 --- a/src/world/area_hos/hos_00/A0C4B0.c +++ b/src/world/area_hos/hos_00/A0C4B0.c @@ -2,4 +2,9 @@ static char* N(exit_str_4) = "osr_01"; -INCLUDE_ASM(s32, "world/area_hos/hos_00/A0C4B0", func_802407C0_A0C4B0); +ApiStatus func_802407C0_A0C4B0(Evt* script, s32 isInitialCall) { + Bytecode* args = script->ptrReadPos; + + gPlayerData.currentPartner = evt_get_variable(script, *args++); + return ApiStatus_DONE2; +} diff --git a/src/world/area_hos/hos_00/A0C4E0.c b/src/world/area_hos/hos_00/A0C4E0.c index d25b126fe4..ab69fa2b97 100644 --- a/src/world/area_hos/hos_00/A0C4E0.c +++ b/src/world/area_hos/hos_00/A0C4E0.c @@ -1,5 +1,8 @@ #include "hos_00.h" +extern f32 D_80242B9C_A0E88C; +extern f32 D_80242BA0_A0E890; + #include "world/common/StashVars.inc.c" #include "world/common/GetItemName.inc.c" @@ -11,12 +14,52 @@ ApiStatus N(EnableActionCommands)(Evt* script, s32 isInitialCall) { return ApiStatus_DONE2; } -INCLUDE_ASM(s32, "world/area_hos/hos_00/A0C4E0", func_8024091C_A0C60C); +ApiStatus func_8024091C_A0C60C(Evt* script, s32 isInitialCall) { + Bytecode* args = script->ptrReadPos; + f32 f1 = evt_get_float_variable(script, *args++); + f32 f2 = evt_get_float_variable(script, *args++); -INCLUDE_ASM(s32, "world/area_hos/hos_00/A0C4E0", func_80240994_A0C684); + evt_set_float_variable(script, *args++, f1 * sin_deg(f2)); + return ApiStatus_DONE2; +} -INCLUDE_ASM(s32, "world/area_hos/hos_00/A0C4E0", func_80240A54_A0C744); +ApiStatus func_80240994_A0C684(Evt* script, s32 isInitialCall) { + Npc* partner = get_npc_unsafe(NPC_PARTNER); + Npc* npc = get_npc_unsafe(0); + + partner->yaw = atan2(partner->pos.x, partner->pos.z, npc->pos.x, npc->pos.z); + gPlayerStatus.targetYaw = atan2(gPlayerStatus.position.x, gPlayerStatus.position.z, npc->pos.x, npc->pos.z); + npc->yaw = atan2(D_80242B9C_A0E88C, D_80242BA0_A0E890, npc->pos.x, npc->pos.z); + D_80242B9C_A0E88C = npc->pos.x; + D_80242BA0_A0E890 = npc->pos.z; + return ApiStatus_DONE2; +} + +ApiStatus func_80240A54_A0C744(Evt* script, s32 isInitialCall) { + Npc* npc = get_npc_unsafe(1); + + if (npc->yaw < 180.0f) { + script->varTable[0] = npc->pos.x - 40.0f; + script->varTable[1] = npc->pos.y + 10.0f; + script->varTable[2] = npc->pos.z; + } else { + script->varTable[0] = npc->pos.x + 40.0f; + script->varTable[1] = npc->pos.y + 10.0f; + script->varTable[2] = npc->pos.z; + } + npc->yaw = atan2(script->varTable[6], script->varTable[8], npc->pos.x, npc->pos.z); + return ApiStatus_DONE2; +} #include "world/common/SetCamera0Flag1000.inc.c" -INCLUDE_ASM(s32, "world/area_hos/hos_00/A0C4E0", func_80240B3C_A0C82C); +ApiStatus func_80240B3C_A0C82C(Evt* script, s32 isInitialCall) { + s32 temp_s1 = script->varTable[0]; + s32 temp_s2 = script->varTable[2]; + + script->varTable[0] = temp_s1 + (sin_deg(310.0f) * 100.0f); + script->varTable[1] = temp_s2 - (cos_deg(310.0f) * 100.0f); + script->varTable[2] = temp_s1 + (sin_deg(130.0f) * 100.0f); + script->varTable[3] = temp_s2 - (cos_deg(130.0f) * 100.0f); + return ApiStatus_DONE2; +} diff --git a/src/world/area_hos/hos_00/A0C930.c b/src/world/area_hos/hos_00/A0C930.c index 05c809e7ee..7ad2caa50c 100644 --- a/src/world/area_hos/hos_00/A0C930.c +++ b/src/world/area_hos/hos_00/A0C930.c @@ -1,3 +1,15 @@ #include "hos_00.h" -INCLUDE_ASM(s32, "world/area_hos/hos_00/A0C930", func_80240C40_A0C930); +void func_80240C40_A0C930(void) { + s32 alpha = update_lerp(0, 0.0f, 216.0f, gPlayerStatus.position.x - 200.0f, 500); + + if (alpha < 0) { + alpha = 0; + } + if (alpha > 216) { + alpha = 216; + } + gDPSetCycleType(gMasterGfxPos++, G_CYC_1CYCLE); + gDPSetCombineLERP(gMasterGfxPos++, 0, 0, 0, SHADE, SHADE, 0, PRIMITIVE, 0, 0, 0, 0, SHADE, SHADE, 0, PRIMITIVE, 0); + gDPSetPrimColor(gMasterGfxPos++, 0, 0, 0, 0, 0, alpha); +} diff --git a/src/world/area_hos/hos_01/A11020.c b/src/world/area_hos/hos_01/A11020.c index a6a0026e73..25b59cf45c 100644 --- a/src/world/area_hos/hos_01/A11020.c +++ b/src/world/area_hos/hos_01/A11020.c @@ -1,4 +1,5 @@ #include "hos_01.h" +#include "effects.h" extern u8 D_80241C2F_A124AF; extern u8 D_80241C33_A124B3; @@ -29,4 +30,14 @@ INCLUDE_ASM(s32, "world/area_hos/hos_01/A11020", func_80240C84_A11504); #include "world/common/SwitchToPartner.inc.c" -INCLUDE_ASM(s32, "world/area_hos/hos_01/A11020", func_80240CDC_A1155C); +ApiStatus func_80240CDC_A1155C(Evt* script, s32 isInitialCall) { + Bytecode* args = script->ptrReadPos; + s32 a0 = evt_get_variable(script, *args++); + s32 a1 = evt_get_variable(script, *args++); + s32 a2 = evt_get_variable(script, *args++); + s32 a3 = evt_get_variable(script, *args++); + s32 a4 = evt_get_variable(script, *args++); + + fx_sparkles(a0, a1, a2, a3, a4); + return ApiStatus_DONE2; +} diff --git a/src/world/area_hos/hos_20/A45C40.c b/src/world/area_hos/hos_20/A45C40.c index ebe0f01d5a..f806efe126 100644 --- a/src/world/area_hos/hos_20/A45C40.c +++ b/src/world/area_hos/hos_20/A45C40.c @@ -1,3 +1,12 @@ #include "hos_20.h" -INCLUDE_ASM(s32, "world/area_hos/hos_20/A45C40", func_80240310_A45C40); +s32 func_80240310_A45C40(Evt* script, s32 isInitialCall) { + script->varTable[8] = FALSE; + if (gGameStatusPtr->pressedButtons[0] & BUTTON_A) { + script->varTable[8] = TRUE; + } + if (gGameStatusPtr->pressedButtons[0] & BUTTON_B) { + script->varTable[8] = TRUE; + } + return ApiStatus_DONE2; +} diff --git a/src/world/partners.c b/src/world/partners.c index c0dbe0ae21..822c27fd49 100644 --- a/src/world/partners.c +++ b/src/world/partners.c @@ -569,11 +569,11 @@ void _use_partner_ability(void) { PlayerStatus* playerStatus = &gPlayerStatus; if (!partnerActionStatus->inputDisabled) { - partnerActionStatus->stickX = gGameStatusPtr->stickX[gGameStatusPtr->unk_81]; - partnerActionStatus->stickY = gGameStatusPtr->stickY[gGameStatusPtr->unk_81]; - partnerActionStatus->currentButtons = gGameStatusPtr->currentButtons[gGameStatusPtr->unk_81]; - partnerActionStatus->pressedButtons = gGameStatusPtr->pressedButtons[gGameStatusPtr->unk_81]; - partnerActionStatus->heldButtons = gGameStatusPtr->heldButtons[gGameStatusPtr->unk_81]; + partnerActionStatus->stickX = gGameStatusPtr->stickX[gGameStatusPtr->multiplayerEnabled]; + partnerActionStatus->stickY = gGameStatusPtr->stickY[gGameStatusPtr->multiplayerEnabled]; + partnerActionStatus->currentButtons = gGameStatusPtr->currentButtons[gGameStatusPtr->multiplayerEnabled]; + partnerActionStatus->pressedButtons = gGameStatusPtr->pressedButtons[gGameStatusPtr->multiplayerEnabled]; + partnerActionStatus->heldButtons = gGameStatusPtr->heldButtons[gGameStatusPtr->multiplayerEnabled]; } else { partnerActionStatus->stickX = 0; partnerActionStatus->stickY = 0; @@ -899,8 +899,9 @@ s32 partner_use_ability(void) { if (!is_starting_conversation() && wPartner != NULL && - (wPartner->canUseAbility == NULL || wPartner->canUseAbility(wPartnerNpc))) { - if ((gGameStatusPtr->unk_81 != 0) && (actionStatus->currentButtons & BUTTON_B)) { + (wPartner->canUseAbility == NULL || wPartner->canUseAbility(wPartnerNpc))) + { + if ((gGameStatusPtr->multiplayerEnabled != 0) && (actionStatus->currentButtons & BUTTON_B)) { sfx_play_sound(SOUND_MENU_ERROR); } else if (D_8010CFD8 != 0) { D_8010CFE0 = 1; @@ -1137,7 +1138,7 @@ void partner_walking_update_motion(Npc* partner) { PlayerStatus* playerStatus = &gPlayerStatus; PartnerActionStatus* actionStatus = &gPartnerActionStatus; - if (gGameStatusPtr->unk_81 == 0 || playerStatus->flags & (PLAYER_STATUS_FLAGS_INPUT_DISABLED | PLAYER_STATUS_FLAGS_1000) + if (gGameStatusPtr->multiplayerEnabled == 0 || playerStatus->flags & (PLAYER_STATUS_FLAGS_INPUT_DISABLED | PLAYER_STATUS_FLAGS_1000) || actionStatus->inputDisabled != 0 || actionStatus->partnerAction_unk_2 != 0) { if (!(playerStatus->animFlags & PLAYER_STATUS_ANIM_FLAGS_800)) { partner_walking_follow_player(partner); @@ -1242,7 +1243,7 @@ void partner_flying_update_motion(Npc* partner) { f32 var_f0; f32 var_f2; - if (gGameStatusPtr->unk_81 == 0 || + if (gGameStatusPtr->multiplayerEnabled == 0 || (playerStatus->flags & (PLAYER_STATUS_FLAGS_INPUT_DISABLED | PLAYER_STATUS_FLAGS_1000)) || partnerActionStatus->inputDisabled || partnerActionStatus->partnerAction_unk_2 != 0) @@ -1403,127 +1404,6 @@ s32 partner_init_get_out(Npc* npc) { } INCLUDE_ASM(s32, "world/partners", partner_get_out); -// s32 partner_get_out(Npc* npc) { -// PlayerStatus* playerStatus = &gPlayerStatus; -// Camera* camera = &gCameras[gCurrentCameraID]; -// f32 sp20; -// f32 sp24; -// f32 sp28; -// f32 sp2C; -// f32 temp_f0_2; -// f32 temp_f12; -// f32 temp_f14; -// f32 temp_f2; -// f32 duration; -// f32 x, y, z; - -// switch (D_8010CFC8) { -// case 0: -// if (clamp_angle(playerStatus->spriteFacingAngle) < 180.0f) { -// npc->yaw = clamp_angle(camera->currentYaw + 90.0f); -// } else { -// npc->yaw = clamp_angle(camera->currentYaw - 90.0f); -// } -// npc->moveToPos.x = playerStatus->position.x; -// npc->moveToPos.y = playerStatus->position.y; -// if (wPartner->isFlying) { -// npc->moveToPos.y = playerStatus->position.y; -// } -// npc->moveToPos.z = playerStatus->position.z; -// add_vec2D_polar(&npc->moveToPos.x, &npc->moveToPos.z, playerStatus->colliderDiameter, npc->yaw); -// x = npc->moveToPos.x; -// y = npc->moveToPos.y; -// z = npc->moveToPos.z; -// if (!wPartner->isFlying) { -// sp20 = x; -// sp28 = y + npc->collisionHeight; -// sp24 = z; -// add_vec2D_polar(&sp20, &sp24, 2.0f, gCameras[gCurrentCameraID].currentYaw); - -// sp2C = 1000.0f; - -// if (((npc_raycast_down_around(0x10000, &sp20, &sp28, &sp24, &sp2C, npc->yaw, npc->collisionRadius) == 0)) || ((u32) (get_collider_type_by_id(D_8010C978) - 2) < 2U) || (sp2C > 100.0f)) -// { -// x = playerStatus->position.x; -// y = playerStatus->position.y; -// z = playerStatus->position.z; -// add_vec2D_polar(&sp20, &sp24, 2.0f, gCameras[gCurrentCameraID].currentYaw); -// } -// } -// temp_f12 = playerStatus->position.x; -// npc->pos.x = playerStatus->position.x; -// temp_f2 = playerStatus->position.y + (playerStatus->colliderHeight / 2); -// npc->pos.y = temp_f2; -// temp_f14 = playerStatus->position.z; -// sp20 = temp_f12; -// sp28 = temp_f2; -// npc->moveSpeed = 4.0f; -// npc->jumpScale = 1.2f; -// npc->pos.z = temp_f14; -// sp24 = temp_f14; -// npc->planarFlyDist = dist2D(temp_f12, temp_f14, x, z); -// npc->yaw = atan2(temp_f12, temp_f14, x, z); -// npc->duration = npc->planarFlyDist / npc->moveSpeed; -// if (npc->duration < 10) { -// npc->duration = 10; -// npc->moveSpeed = npc->planarFlyDist / 10.0f; -// } -// npc->jumpVelocity = (y - sp28 + ((npc->jumpScale * npc->duration) * npc->duration * 0.5f)) / npc->duration; -// D_8010CFC8 = 1; -// sp28 = y - sp28; -// npc->currentAnim.w = gPartnerAnimations[D_8010CFD8].anims[2]; -// break; -// case 1: -// if (npc->jumpVelocity < 0.0f && func_800397E8(npc, fabsf(npc->jumpVelocity))) { -// D_8010CFC8 = 2; -// return 0; -// } -// npc->jumpVelocity -= npc->jumpScale; -// npc->pos.y += npc->jumpVelocity; -// if (npc->jumpVelocity <= 0.0f) { -// npc->currentAnim.w = gPartnerAnimations[D_8010CFD8].anims[3]; -// } -// npc_move_heading(npc, npc->moveSpeed, npc->yaw); -// npc_do_world_collision(npc); -// duration = npc->duration; -// if (duration > 10.0f) { -// duration = 10.0f; -// } -// npc->duration--; -// temp_f0_2 = (10.0f - duration) / 10.0f; -// npc->scale.x = temp_f0_2; -// npc->scale.y = temp_f0_2; -// npc->scale.z = temp_f0_2; -// if (npc->duration < 0) { -// D_8010CFC8 = 2; -// } -// break; -// case 2: -// npc->pos.y = npc->moveToPos.y; -// npc->jumpVelocity = 0.0f; -// npc->moveToPos.x = npc->pos.x; -// npc->moveToPos.z = npc->pos.z; -// npc->scale.x = 1.0f; -// npc->scale.y = 1.0f; -// npc->scale.z = 1.0f; -// npc->moveToPos.y = npc->pos.y; -// npc->pos.y = playerStatus->position.y; -// if (wPartner->isFlying) { -// npc->pos.y = playerStatus->position.y; -// } -// partner_clear_player_tracking(npc); -// npc->pos.x = npc->moveToPos.x; -// npc->pos.y = npc->moveToPos.y; -// npc->pos.z = npc->moveToPos.z; -// if (npc->flags & NPC_FLAG_1000) { -// if (!wPartner->isFlying) { -// func_8003D660(npc, 2); -// } -// } -// return TRUE; -// } -// return FALSE; -// } void func_800EF300(void) { D_8010CFC8 = 40; diff --git a/ver/us/asm/nonmatchings/17D6A0/btl_show_message_popup.s b/ver/us/asm/nonmatchings/17D6A0/btl_show_message_popup.s deleted file mode 100644 index 917e778a28..0000000000 --- a/ver/us/asm/nonmatchings/17D6A0/btl_show_message_popup.s +++ /dev/null @@ -1,280 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -.section .rodata - -dlabel jtbl_8029D1F0 -.word .L80250EEC_17F7CC, .L80250EEC_17F7CC, .L80250EEC_17F7CC, .L80250EEC_17F7CC, .L80251010_17F8F0, .L80251010_17F8F0, .L80251010_17F8F0, .L80251010_17F8F0, .L80250EEC_17F7CC, .L80250EEC_17F7CC, .L80250EEC_17F7CC, .L80250EEC_17F7CC, .L80250EEC_17F7CC, .L80250EEC_17F7CC, .L80250EEC_17F7CC, .L80250EEC_17F7CC, .L80250EEC_17F7CC, .L80250EEC_17F7CC, .L80250EEC_17F7CC, .L80250EEC_17F7CC, .L80250EEC_17F7CC, .L80250EEC_17F7CC, .L80250EEC_17F7CC, .L80250EEC_17F7CC, .L80250EEC_17F7CC, .L80250EEC_17F7CC, .L80250EEC_17F7CC, .L80250EEC_17F7CC, .L80250EEC_17F7CC, .L80251010_17F8F0, .L80251010_17F8F0, .L80251010_17F8F0, .L80251010_17F8F0, .L80251010_17F8F0, .L80251010_17F8F0, .L80250EEC_17F7CC, .L80250EEC_17F7CC, .L80250EEC_17F7CC, .L80250EEC_17F7CC, .L80250EEC_17F7CC, .L80250EEC_17F7CC, .L80250EEC_17F7CC, .L80250EEC_17F7CC, .L80250EEC_17F7CC, .L80250EEC_17F7CC, .L80250EEC_17F7CC, .L80251190_17FA70, .L80251190_17FA70, .L80251190_17FA70, .L80251190_17FA70, .L80251190_17FA70, .L80251190_17FA70, .L80251190_17FA70, .L80251190_17FA70, .L80251190_17FA70, .L80251190_17FA70, .L80251190_17FA70, .L80251190_17FA70, .L80251190_17FA70, .L80251190_17FA70, .L80251190_17FA70, .L80251190_17FA70, .L80251190_17FA70, .L80251190_17FA70, .L80251190_17FA70, .L80251190_17FA70, .L80251190_17FA70, .L80250EEC_17F7CC, .L80250EEC_17F7CC, .L80250EEC_17F7CC, .L80250EEC_17F7CC, .L80250EEC_17F7CC, .L80250EEC_17F7CC, .L80250F90_17F870, .L80250F90_17F870, .L80250F90_17F870, .L80250F90_17F870, .L80250F90_17F870, .L80250F90_17F870, .L80250F90_17F870, .L80250EEC_17F7CC, .L802510C8_17F9A8, .L80250EEC_17F7CC, .L80250EEC_17F7CC, .L80250EEC_17F7CC, 0, 0, 0 - -.section .text - -glabel btl_show_message_popup -/* 17F784 80250EA4 27BDFFC0 */ addiu $sp, $sp, -0x40 -/* 17F788 80250EA8 AFB30034 */ sw $s3, 0x34($sp) -/* 17F78C 80250EAC 0080982D */ daddu $s3, $a0, $zero -/* 17F790 80250EB0 AFBF003C */ sw $ra, 0x3c($sp) -/* 17F794 80250EB4 AFB40038 */ sw $s4, 0x38($sp) -/* 17F798 80250EB8 AFB20030 */ sw $s2, 0x30($sp) -/* 17F79C 80250EBC AFB1002C */ sw $s1, 0x2c($sp) -/* 17F7A0 80250EC0 AFB00028 */ sw $s0, 0x28($sp) -/* 17F7A4 80250EC4 86630012 */ lh $v1, 0x12($s3) -/* 17F7A8 80250EC8 2C620055 */ sltiu $v0, $v1, 0x55 -/* 17F7AC 80250ECC 104000F1 */ beqz $v0, .L80251294 -/* 17F7B0 80250ED0 24140050 */ addiu $s4, $zero, 0x50 -/* 17F7B4 80250ED4 00031080 */ sll $v0, $v1, 2 -/* 17F7B8 80250ED8 3C01802A */ lui $at, %hi(jtbl_8029D1F0) -/* 17F7BC 80250EDC 00220821 */ addu $at, $at, $v0 -/* 17F7C0 80250EE0 8C22D1F0 */ lw $v0, %lo(jtbl_8029D1F0)($at) -/* 17F7C4 80250EE4 00400008 */ jr $v0 -/* 17F7C8 80250EE8 00000000 */ nop -.L80250EEC_17F7CC: -/* 17F7CC 80250EEC 82620017 */ lb $v0, 0x17($s3) -/* 17F7D0 80250EF0 104000E8 */ beqz $v0, .L80251294 -/* 17F7D4 80250EF4 0000282D */ daddu $a1, $zero, $zero -/* 17F7D8 80250EF8 86620012 */ lh $v0, 0x12($s3) -/* 17F7DC 80250EFC A2600017 */ sb $zero, 0x17($s3) -/* 17F7E0 80250F00 00021080 */ sll $v0, $v0, 2 -/* 17F7E4 80250F04 3C108028 */ lui $s0, %hi(bMessages) -/* 17F7E8 80250F08 02028021 */ addu $s0, $s0, $v0 -/* 17F7EC 80250F0C 8E103770 */ lw $s0, %lo(bMessages)($s0) -/* 17F7F0 80250F10 0C04991D */ jal get_msg_width -/* 17F7F4 80250F14 0200202D */ daddu $a0, $s0, $zero -/* 17F7F8 80250F18 2447001E */ addiu $a3, $v0, 0x1e -/* 17F7FC 80250F1C 000717C2 */ srl $v0, $a3, 0x1f -/* 17F800 80250F20 00E21021 */ addu $v0, $a3, $v0 -/* 17F804 80250F24 00021043 */ sra $v0, $v0, 1 -/* 17F808 80250F28 240300A0 */ addiu $v1, $zero, 0xa0 -/* 17F80C 80250F2C 00628823 */ subu $s1, $v1, $v0 -/* 17F810 80250F30 00E0902D */ daddu $s2, $a3, $zero -/* 17F814 80250F34 0C04992C */ jal get_msg_lines -/* 17F818 80250F38 0200202D */ daddu $a0, $s0, $zero -/* 17F81C 80250F3C 2442FFFF */ addiu $v0, $v0, -1 -/* 17F820 80250F40 24040009 */ addiu $a0, $zero, 9 -/* 17F824 80250F44 0220282D */ daddu $a1, $s1, $zero -/* 17F828 80250F48 0280302D */ daddu $a2, $s4, $zero -/* 17F82C 80250F4C 00021040 */ sll $v0, $v0, 1 -/* 17F830 80250F50 0240382D */ daddu $a3, $s2, $zero -/* 17F834 80250F54 3C088028 */ lui $t0, %hi(D_802835D0) -/* 17F838 80250F58 01024021 */ addu $t0, $t0, $v0 -/* 17F83C 80250F5C 850835D0 */ lh $t0, %lo(D_802835D0)($t0) -/* 17F840 80250F60 3C028025 */ lui $v0, %hi(func_80250818) -/* 17F844 80250F64 24420818 */ addiu $v0, $v0, %lo(func_80250818) -/* 17F848 80250F68 AFA20018 */ sw $v0, 0x18($sp) -/* 17F84C 80250F6C 2402FFFF */ addiu $v0, $zero, -1 -/* 17F850 80250F70 AFA00014 */ sw $zero, 0x14($sp) -/* 17F854 80250F74 AFB3001C */ sw $s3, 0x1c($sp) -/* 17F858 80250F78 AFA20020 */ sw $v0, 0x20($sp) -/* 17F85C 80250F7C 0C051F32 */ jal set_window_properties -/* 17F860 80250F80 AFA80010 */ sw $t0, 0x10($sp) -/* 17F864 80250F84 24040009 */ addiu $a0, $zero, 9 -/* 17F868 80250F88 080944A3 */ j .L8025128C -/* 17F86C 80250F8C 24050001 */ addiu $a1, $zero, 1 -.L80250F90_17F870: -/* 17F870 80250F90 82620017 */ lb $v0, 0x17($s3) -/* 17F874 80250F94 104000BF */ beqz $v0, .L80251294 -/* 17F878 80250F98 00000000 */ nop -/* 17F87C 80250F9C 86620012 */ lh $v0, 0x12($s3) -/* 17F880 80250FA0 A2600017 */ sb $zero, 0x17($s3) -/* 17F884 80250FA4 00021080 */ sll $v0, $v0, 2 -/* 17F888 80250FA8 3C048028 */ lui $a0, %hi(bMessages) -/* 17F88C 80250FAC 00822021 */ addu $a0, $a0, $v0 -/* 17F890 80250FB0 8C843770 */ lw $a0, %lo(bMessages)($a0) -/* 17F894 80250FB4 0C04991D */ jal get_msg_width -/* 17F898 80250FB8 0000282D */ daddu $a1, $zero, $zero -/* 17F89C 80250FBC 24470037 */ addiu $a3, $v0, 0x37 -/* 17F8A0 80250FC0 24080028 */ addiu $t0, $zero, 0x28 -/* 17F8A4 80250FC4 24040009 */ addiu $a0, $zero, 9 -/* 17F8A8 80250FC8 00072FC2 */ srl $a1, $a3, 0x1f -/* 17F8AC 80250FCC 00E52821 */ addu $a1, $a3, $a1 -/* 17F8B0 80250FD0 00052843 */ sra $a1, $a1, 1 -/* 17F8B4 80250FD4 240200A0 */ addiu $v0, $zero, 0xa0 -/* 17F8B8 80250FD8 00452823 */ subu $a1, $v0, $a1 -/* 17F8BC 80250FDC 0280302D */ daddu $a2, $s4, $zero -/* 17F8C0 80250FE0 3C028025 */ lui $v0, %hi(func_80250818) -/* 17F8C4 80250FE4 24420818 */ addiu $v0, $v0, %lo(func_80250818) -/* 17F8C8 80250FE8 AFA20018 */ sw $v0, 0x18($sp) -/* 17F8CC 80250FEC 2402FFFF */ addiu $v0, $zero, -1 -/* 17F8D0 80250FF0 AFA80010 */ sw $t0, 0x10($sp) -/* 17F8D4 80250FF4 AFA00014 */ sw $zero, 0x14($sp) -/* 17F8D8 80250FF8 AFB3001C */ sw $s3, 0x1c($sp) -/* 17F8DC 80250FFC 0C051F32 */ jal set_window_properties -/* 17F8E0 80251000 AFA20020 */ sw $v0, 0x20($sp) -/* 17F8E4 80251004 24040009 */ addiu $a0, $zero, 9 -/* 17F8E8 80251008 080944A3 */ j .L8025128C -/* 17F8EC 8025100C 24050001 */ addiu $a1, $zero, 1 -.L80251010_17F8F0: -/* 17F8F0 80251010 82620017 */ lb $v0, 0x17($s3) -/* 17F8F4 80251014 1040009F */ beqz $v0, .L80251294 -/* 17F8F8 80251018 00000000 */ nop -/* 17F8FC 8025101C 86620012 */ lh $v0, 0x12($s3) -/* 17F900 80251020 A2600017 */ sb $zero, 0x17($s3) -/* 17F904 80251024 3C04802A */ lui $a0, %hi(D_8029F640) -/* 17F908 80251028 8484F640 */ lh $a0, %lo(D_8029F640)($a0) -/* 17F90C 8025102C 00021080 */ sll $v0, $v0, 2 -/* 17F910 80251030 3C108028 */ lui $s0, %hi(bMessages) -/* 17F914 80251034 02028021 */ addu $s0, $s0, $v0 -/* 17F918 80251038 8E103770 */ lw $s0, %lo(bMessages)($s0) -/* 17F91C 8025103C 0C0496FA */ jal set_message_value -/* 17F920 80251040 0000282D */ daddu $a1, $zero, $zero -/* 17F924 80251044 0000282D */ daddu $a1, $zero, $zero -/* 17F928 80251048 0C04991D */ jal get_msg_width -/* 17F92C 8025104C 0200202D */ daddu $a0, $s0, $zero -/* 17F930 80251050 2447001F */ addiu $a3, $v0, 0x1f -/* 17F934 80251054 000717C2 */ srl $v0, $a3, 0x1f -/* 17F938 80251058 00E21021 */ addu $v0, $a3, $v0 -/* 17F93C 8025105C 00021043 */ sra $v0, $v0, 1 -/* 17F940 80251060 240300A0 */ addiu $v1, $zero, 0xa0 -/* 17F944 80251064 00628823 */ subu $s1, $v1, $v0 -/* 17F948 80251068 00E0902D */ daddu $s2, $a3, $zero -/* 17F94C 8025106C 0C04992C */ jal get_msg_lines -/* 17F950 80251070 0200202D */ daddu $a0, $s0, $zero -/* 17F954 80251074 2442FFFF */ addiu $v0, $v0, -1 -/* 17F958 80251078 24040009 */ addiu $a0, $zero, 9 -/* 17F95C 8025107C 0220282D */ daddu $a1, $s1, $zero -/* 17F960 80251080 0280302D */ daddu $a2, $s4, $zero -/* 17F964 80251084 00021040 */ sll $v0, $v0, 1 -/* 17F968 80251088 0240382D */ daddu $a3, $s2, $zero -/* 17F96C 8025108C 3C088028 */ lui $t0, %hi(D_802835D0) -/* 17F970 80251090 01024021 */ addu $t0, $t0, $v0 -/* 17F974 80251094 850835D0 */ lh $t0, %lo(D_802835D0)($t0) -/* 17F978 80251098 3C028025 */ lui $v0, %hi(func_80250818) -/* 17F97C 8025109C 24420818 */ addiu $v0, $v0, %lo(func_80250818) -/* 17F980 802510A0 AFA20018 */ sw $v0, 0x18($sp) -/* 17F984 802510A4 2402FFFF */ addiu $v0, $zero, -1 -/* 17F988 802510A8 AFA00014 */ sw $zero, 0x14($sp) -/* 17F98C 802510AC AFB3001C */ sw $s3, 0x1c($sp) -/* 17F990 802510B0 AFA20020 */ sw $v0, 0x20($sp) -/* 17F994 802510B4 0C051F32 */ jal set_window_properties -/* 17F998 802510B8 AFA80010 */ sw $t0, 0x10($sp) -/* 17F99C 802510BC 24040009 */ addiu $a0, $zero, 9 -/* 17F9A0 802510C0 080944A3 */ j .L8025128C -/* 17F9A4 802510C4 24050001 */ addiu $a1, $zero, 1 -.L802510C8_17F9A8: -/* 17F9A8 802510C8 82620017 */ lb $v0, 0x17($s3) -/* 17F9AC 802510CC 10400071 */ beqz $v0, .L80251294 -/* 17F9B0 802510D0 00000000 */ nop -/* 17F9B4 802510D4 A2600017 */ sb $zero, 0x17($s3) -/* 17F9B8 802510D8 3C03802A */ lui $v1, %hi(D_8029F640) -/* 17F9BC 802510DC 8463F640 */ lh $v1, %lo(D_8029F640)($v1) -/* 17F9C0 802510E0 86620012 */ lh $v0, 0x12($s3) -/* 17F9C4 802510E4 00031880 */ sll $v1, $v1, 2 -/* 17F9C8 802510E8 00021080 */ sll $v0, $v0, 2 -/* 17F9CC 802510EC 3C048028 */ lui $a0, %hi(bActorMessages) -/* 17F9D0 802510F0 00832021 */ addu $a0, $a0, $v1 -/* 17F9D4 802510F4 8C8438C4 */ lw $a0, %lo(bActorMessages)($a0) -/* 17F9D8 802510F8 3C108028 */ lui $s0, %hi(bMessages) -/* 17F9DC 802510FC 02028021 */ addu $s0, $s0, $v0 -/* 17F9E0 80251100 8E103770 */ lw $s0, %lo(bMessages)($s0) -/* 17F9E4 80251104 0C0496CF */ jal set_message_msg -/* 17F9E8 80251108 0000282D */ daddu $a1, $zero, $zero -/* 17F9EC 8025110C 0200202D */ daddu $a0, $s0, $zero -/* 17F9F0 80251110 0C04991D */ jal get_msg_width -/* 17F9F4 80251114 0000282D */ daddu $a1, $zero, $zero -/* 17F9F8 80251118 2447001F */ addiu $a3, $v0, 0x1f -/* 17F9FC 8025111C 000717C2 */ srl $v0, $a3, 0x1f -/* 17FA00 80251120 00E21021 */ addu $v0, $a3, $v0 -/* 17FA04 80251124 00021043 */ sra $v0, $v0, 1 -/* 17FA08 80251128 240300A0 */ addiu $v1, $zero, 0xa0 -/* 17FA0C 8025112C 00628823 */ subu $s1, $v1, $v0 -/* 17FA10 80251130 00E0902D */ daddu $s2, $a3, $zero -/* 17FA14 80251134 0C04992C */ jal get_msg_lines -/* 17FA18 80251138 0200202D */ daddu $a0, $s0, $zero -/* 17FA1C 8025113C 2442FFFF */ addiu $v0, $v0, -1 -/* 17FA20 80251140 24040009 */ addiu $a0, $zero, 9 -/* 17FA24 80251144 0220282D */ daddu $a1, $s1, $zero -/* 17FA28 80251148 0280302D */ daddu $a2, $s4, $zero -/* 17FA2C 8025114C 00021040 */ sll $v0, $v0, 1 -/* 17FA30 80251150 0240382D */ daddu $a3, $s2, $zero -/* 17FA34 80251154 3C088028 */ lui $t0, %hi(D_802835D0) -/* 17FA38 80251158 01024021 */ addu $t0, $t0, $v0 -/* 17FA3C 8025115C 850835D0 */ lh $t0, %lo(D_802835D0)($t0) -/* 17FA40 80251160 3C028025 */ lui $v0, %hi(func_80250818) -/* 17FA44 80251164 24420818 */ addiu $v0, $v0, %lo(func_80250818) -/* 17FA48 80251168 AFA20018 */ sw $v0, 0x18($sp) -/* 17FA4C 8025116C 2402FFFF */ addiu $v0, $zero, -1 -/* 17FA50 80251170 AFA00014 */ sw $zero, 0x14($sp) -/* 17FA54 80251174 AFB3001C */ sw $s3, 0x1c($sp) -/* 17FA58 80251178 AFA20020 */ sw $v0, 0x20($sp) -/* 17FA5C 8025117C 0C051F32 */ jal set_window_properties -/* 17FA60 80251180 AFA80010 */ sw $t0, 0x10($sp) -/* 17FA64 80251184 24040009 */ addiu $a0, $zero, 9 -/* 17FA68 80251188 080944A3 */ j .L8025128C -/* 17FA6C 8025118C 24050001 */ addiu $a1, $zero, 1 -.L80251190_17FA70: -/* 17FA70 80251190 82620017 */ lb $v0, 0x17($s3) -/* 17FA74 80251194 1040003F */ beqz $v0, .L80251294 -/* 17FA78 80251198 0000282D */ daddu $a1, $zero, $zero -/* 17FA7C 8025119C 86620012 */ lh $v0, 0x12($s3) -/* 17FA80 802511A0 A2600017 */ sb $zero, 0x17($s3) -/* 17FA84 802511A4 00021080 */ sll $v0, $v0, 2 -/* 17FA88 802511A8 3C108028 */ lui $s0, %hi(bMessages) -/* 17FA8C 802511AC 02028021 */ addu $s0, $s0, $v0 -/* 17FA90 802511B0 8E103770 */ lw $s0, %lo(bMessages)($s0) -/* 17FA94 802511B4 241400C0 */ addiu $s4, $zero, 0xc0 -/* 17FA98 802511B8 0C04991D */ jal get_msg_width -/* 17FA9C 802511BC 0200202D */ daddu $a0, $s0, $zero -/* 17FAA0 802511C0 2447001F */ addiu $a3, $v0, 0x1f -/* 17FAA4 802511C4 000717C2 */ srl $v0, $a3, 0x1f -/* 17FAA8 802511C8 00E21021 */ addu $v0, $a3, $v0 -/* 17FAAC 802511CC 00021043 */ sra $v0, $v0, 1 -/* 17FAB0 802511D0 240300A0 */ addiu $v1, $zero, 0xa0 -/* 17FAB4 802511D4 00628823 */ subu $s1, $v1, $v0 -/* 17FAB8 802511D8 00E0902D */ daddu $s2, $a3, $zero -/* 17FABC 802511DC 0C04992C */ jal get_msg_lines -/* 17FAC0 802511E0 0200202D */ daddu $a0, $s0, $zero -/* 17FAC4 802511E4 2442FFFF */ addiu $v0, $v0, -1 -/* 17FAC8 802511E8 00021840 */ sll $v1, $v0, 1 -/* 17FACC 802511EC 2410003B */ addiu $s0, $zero, 0x3b -/* 17FAD0 802511F0 86620012 */ lh $v0, 0x12($s3) -/* 17FAD4 802511F4 3C088028 */ lui $t0, %hi(D_802835D0) -/* 17FAD8 802511F8 01034021 */ addu $t0, $t0, $v1 -/* 17FADC 802511FC 850835D0 */ lh $t0, %lo(D_802835D0)($t0) -/* 17FAE0 80251200 14500005 */ bne $v0, $s0, .L80251218 -/* 17FAE4 80251204 24040009 */ addiu $a0, $zero, 9 -/* 17FAE8 80251208 24140078 */ addiu $s4, $zero, 0x78 -/* 17FAEC 8025120C 24020001 */ addiu $v0, $zero, 1 -/* 17FAF0 80251210 3C01802A */ lui $at, %hi(D_8029F64C) -/* 17FAF4 80251214 A422F64C */ sh $v0, %lo(D_8029F64C)($at) -.L80251218: -/* 17FAF8 80251218 0220282D */ daddu $a1, $s1, $zero -/* 17FAFC 8025121C 0240382D */ daddu $a3, $s2, $zero -/* 17FB00 80251220 3C018028 */ lui $at, %hi(D_802835D8) -/* 17FB04 80251224 00230821 */ addu $at, $at, $v1 -/* 17FB08 80251228 942335D8 */ lhu $v1, %lo(D_802835D8)($at) -/* 17FB0C 8025122C 3C028025 */ lui $v0, %hi(func_80250818) -/* 17FB10 80251230 24420818 */ addiu $v0, $v0, %lo(func_80250818) -/* 17FB14 80251234 AFA20018 */ sw $v0, 0x18($sp) -/* 17FB18 80251238 2402FFFF */ addiu $v0, $zero, -1 -/* 17FB1C 8025123C AFA20020 */ sw $v0, 0x20($sp) -/* 17FB20 80251240 00141400 */ sll $v0, $s4, 0x10 -/* 17FB24 80251244 00021403 */ sra $v0, $v0, 0x10 -/* 17FB28 80251248 3C01802A */ lui $at, %hi(D_8029F64E) -/* 17FB2C 8025124C A434F64E */ sh $s4, %lo(D_8029F64E)($at) -/* 17FB30 80251250 AFA80010 */ sw $t0, 0x10($sp) -/* 17FB34 80251254 AFA00014 */ sw $zero, 0x14($sp) -/* 17FB38 80251258 AFB3001C */ sw $s3, 0x1c($sp) -/* 17FB3C 8025125C 00033400 */ sll $a2, $v1, 0x10 -/* 17FB40 80251260 00063403 */ sra $a2, $a2, 0x10 -/* 17FB44 80251264 3C01802A */ lui $at, %hi(D_8029F650) -/* 17FB48 80251268 A423F650 */ sh $v1, %lo(D_8029F650)($at) -/* 17FB4C 8025126C 0C051F32 */ jal set_window_properties -/* 17FB50 80251270 00463021 */ addu $a2, $v0, $a2 -/* 17FB54 80251274 86620012 */ lh $v0, 0x12($s3) -/* 17FB58 80251278 14500003 */ bne $v0, $s0, .L80251288 -/* 17FB5C 8025127C 24040009 */ addiu $a0, $zero, 9 -/* 17FB60 80251280 080944A3 */ j .L8025128C -/* 17FB64 80251284 24050001 */ addiu $a1, $zero, 1 -.L80251288: -/* 17FB68 80251288 24050008 */ addiu $a1, $zero, 8 -.L8025128C: -/* 17FB6C 8025128C 0C051F9F */ jal set_window_update -/* 17FB70 80251290 00000000 */ nop -.L80251294: -/* 17FB74 80251294 8FBF003C */ lw $ra, 0x3c($sp) -/* 17FB78 80251298 8FB40038 */ lw $s4, 0x38($sp) -/* 17FB7C 8025129C 8FB30034 */ lw $s3, 0x34($sp) -/* 17FB80 802512A0 8FB20030 */ lw $s2, 0x30($sp) -/* 17FB84 802512A4 8FB1002C */ lw $s1, 0x2c($sp) -/* 17FB88 802512A8 8FB00028 */ lw $s0, 0x28($sp) -/* 17FB8C 802512AC 03E00008 */ jr $ra -/* 17FB90 802512B0 27BD0040 */ addiu $sp, $sp, 0x40 diff --git a/ver/us/asm/nonmatchings/17D6A0/func_8024F394.s b/ver/us/asm/nonmatchings/17D6A0/func_8024F394.s deleted file mode 100644 index b4f037d1d0..0000000000 --- a/ver/us/asm/nonmatchings/17D6A0/func_8024F394.s +++ /dev/null @@ -1,154 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -.section .rodata - -dlabel D_8029CD90 -.double 0.8 - -.section .text - -glabel func_8024F394 -/* 17DC74 8024F394 27BDFFC8 */ addiu $sp, $sp, -0x38 -/* 17DC78 8024F398 AFB40020 */ sw $s4, 0x20($sp) -/* 17DC7C 8024F39C 0080A02D */ daddu $s4, $a0, $zero -/* 17DC80 8024F3A0 AFB3001C */ sw $s3, 0x1c($sp) -/* 17DC84 8024F3A4 0000982D */ daddu $s3, $zero, $zero -/* 17DC88 8024F3A8 AFB50024 */ sw $s5, 0x24($sp) -/* 17DC8C 8024F3AC AFBF0028 */ sw $ra, 0x28($sp) -/* 17DC90 8024F3B0 AFB20018 */ sw $s2, 0x18($sp) -/* 17DC94 8024F3B4 AFB10014 */ sw $s1, 0x14($sp) -/* 17DC98 8024F3B8 AFB00010 */ sw $s0, 0x10($sp) -/* 17DC9C 8024F3BC F7B40030 */ sdc1 $f20, 0x30($sp) -/* 17DCA0 8024F3C0 86820012 */ lh $v0, 0x12($s4) -/* 17DCA4 8024F3C4 8E920018 */ lw $s2, 0x18($s4) -/* 17DCA8 8024F3C8 18400067 */ blez $v0, .L8024F568 -/* 17DCAC 8024F3CC 0260A82D */ daddu $s5, $s3, $zero -/* 17DCB0 8024F3D0 3C013FE0 */ lui $at, 0x3fe0 -/* 17DCB4 8024F3D4 4481A800 */ mtc1 $at, $f21 -/* 17DCB8 8024F3D8 4480A000 */ mtc1 $zero, $f20 -/* 17DCBC 8024F3DC 26500044 */ addiu $s0, $s2, 0x44 -.L8024F3E0: -/* 17DCC0 8024F3E0 8E420000 */ lw $v0, ($s2) -/* 17DCC4 8024F3E4 5040005B */ beql $v0, $zero, .L8024F554 -/* 17DCC8 8024F3E8 26730001 */ addiu $s3, $s3, 1 -/* 17DCCC 8024F3EC 8E02FFE0 */ lw $v0, -0x20($s0) -/* 17DCD0 8024F3F0 8E11FFC0 */ lw $s1, -0x40($s0) -/* 17DCD4 8024F3F4 1040000B */ beqz $v0, .L8024F424 -/* 17DCD8 8024F3F8 24150001 */ addiu $s5, $zero, 1 -/* 17DCDC 8024F3FC 2442FFFF */ addiu $v0, $v0, -1 -/* 17DCE0 8024F400 14400004 */ bnez $v0, .L8024F414 -/* 17DCE4 8024F404 AE02FFE0 */ sw $v0, -0x20($s0) -/* 17DCE8 8024F408 0220202D */ daddu $a0, $s1, $zero -/* 17DCEC 8024F40C 0C048BC9 */ jal clear_entity_model_flags -/* 17DCF0 8024F410 24050020 */ addiu $a1, $zero, 0x20 -.L8024F414: -/* 17DCF4 8024F414 0C0483C1 */ jal exec_entity_model_commandlist -/* 17DCF8 8024F418 0220202D */ daddu $a0, $s1, $zero -/* 17DCFC 8024F41C 08093D5A */ j .L8024F568 -/* 17DD00 8024F420 00000000 */ nop -.L8024F424: -/* 17DD04 8024F424 0C0483C1 */ jal exec_entity_model_commandlist -/* 17DD08 8024F428 0220202D */ daddu $a0, $s1, $zero -/* 17DD0C 8024F42C 8E02FFDC */ lw $v0, -0x24($s0) -/* 17DD10 8024F430 0440000D */ bltz $v0, .L8024F468 -/* 17DD14 8024F434 00000000 */ nop -/* 17DD18 8024F438 C606FFF4 */ lwc1 $f6, -0xc($s0) -/* 17DD1C 8024F43C C600FFD0 */ lwc1 $f0, -0x30($s0) -/* 17DD20 8024F440 C604FFF8 */ lwc1 $f4, -8($s0) -/* 17DD24 8024F444 46003180 */ add.s $f6, $f6, $f0 -/* 17DD28 8024F448 C600FFD4 */ lwc1 $f0, -0x2c($s0) -/* 17DD2C 8024F44C C602FFFC */ lwc1 $f2, -4($s0) -/* 17DD30 8024F450 46002100 */ add.s $f4, $f4, $f0 -/* 17DD34 8024F454 C600FFD8 */ lwc1 $f0, -0x28($s0) -/* 17DD38 8024F458 46001080 */ add.s $f2, $f2, $f0 -/* 17DD3C 8024F45C E606FFF4 */ swc1 $f6, -0xc($s0) -/* 17DD40 8024F460 E604FFF8 */ swc1 $f4, -8($s0) -/* 17DD44 8024F464 E602FFFC */ swc1 $f2, -4($s0) -.L8024F468: -/* 17DD48 8024F468 3C01800B */ lui $at, %hi(gCameras+0x5C4) -/* 17DD4C 8024F46C C4202344 */ lwc1 $f0, %lo(gCameras+0x5C4)($at) -/* 17DD50 8024F470 3C014334 */ lui $at, 0x4334 -/* 17DD54 8024F474 44816000 */ mtc1 $at, $f12 -/* 17DD58 8024F478 0C00A6C9 */ jal clamp_angle -/* 17DD5C 8024F47C 46006301 */ sub.s $f12, $f12, $f0 -/* 17DD60 8024F480 C60CFFE4 */ lwc1 $f12, -0x1c($s0) -/* 17DD64 8024F484 C602FFE8 */ lwc1 $f2, -0x18($s0) -/* 17DD68 8024F488 46026300 */ add.s $f12, $f12, $f2 -/* 17DD6C 8024F48C E600FFEC */ swc1 $f0, -0x14($s0) -/* 17DD70 8024F490 0C00A6C9 */ jal clamp_angle -/* 17DD74 8024F494 E60CFFE4 */ swc1 $f12, -0x1c($s0) -/* 17DD78 8024F498 C602FFE8 */ lwc1 $f2, -0x18($s0) -/* 17DD7C 8024F49C 3C01802A */ lui $at, %hi(D_8029CD90) -/* 17DD80 8024F4A0 D424CD90 */ ldc1 $f4, %lo(D_8029CD90)($at) -/* 17DD84 8024F4A4 460010A1 */ cvt.d.s $f2, $f2 -/* 17DD88 8024F4A8 46241082 */ mul.d $f2, $f2, $f4 -/* 17DD8C 8024F4AC 00000000 */ nop -/* 17DD90 8024F4B0 8E02FFDC */ lw $v0, -0x24($s0) -/* 17DD94 8024F4B4 E600FFE4 */ swc1 $f0, -0x1c($s0) -/* 17DD98 8024F4B8 2842000A */ slti $v0, $v0, 0xa -/* 17DD9C 8024F4BC 462010A0 */ cvt.s.d $f2, $f2 -/* 17DDA0 8024F4C0 10400018 */ beqz $v0, .L8024F524 -/* 17DDA4 8024F4C4 E602FFE8 */ swc1 $f2, -0x18($s0) -/* 17DDA8 8024F4C8 C604FFC4 */ lwc1 $f4, -0x3c($s0) -/* 17DDAC 8024F4CC 46002121 */ cvt.d.s $f4, $f4 -/* 17DDB0 8024F4D0 46342102 */ mul.d $f4, $f4, $f20 -/* 17DDB4 8024F4D4 00000000 */ nop -/* 17DDB8 8024F4D8 C600FFCC */ lwc1 $f0, -0x34($s0) -/* 17DDBC 8024F4DC 46000021 */ cvt.d.s $f0, $f0 -/* 17DDC0 8024F4E0 46340002 */ mul.d $f0, $f0, $f20 -/* 17DDC4 8024F4E4 00000000 */ nop -/* 17DDC8 8024F4E8 C602FFC8 */ lwc1 $f2, -0x38($s0) -/* 17DDCC 8024F4EC 460010A1 */ cvt.d.s $f2, $f2 -/* 17DDD0 8024F4F0 46341082 */ mul.d $f2, $f2, $f20 -/* 17DDD4 8024F4F4 00000000 */ nop -/* 17DDD8 8024F4F8 46202120 */ cvt.s.d $f4, $f4 -/* 17DDDC 8024F4FC 46200020 */ cvt.s.d $f0, $f0 -/* 17DDE0 8024F500 E604FFC4 */ swc1 $f4, -0x3c($s0) -/* 17DDE4 8024F504 E600FFCC */ swc1 $f0, -0x34($s0) -/* 17DDE8 8024F508 46002006 */ mov.s $f0, $f4 -/* 17DDEC 8024F50C C604FFCC */ lwc1 $f4, -0x34($s0) -/* 17DDF0 8024F510 462010A0 */ cvt.s.d $f2, $f2 -/* 17DDF4 8024F514 E602FFC8 */ swc1 $f2, -0x38($s0) -/* 17DDF8 8024F518 E600FFD0 */ swc1 $f0, -0x30($s0) -/* 17DDFC 8024F51C E602FFD4 */ swc1 $f2, -0x2c($s0) -/* 17DE00 8024F520 E604FFD8 */ swc1 $f4, -0x28($s0) -.L8024F524: -/* 17DE04 8024F524 8E02FFDC */ lw $v0, -0x24($s0) -/* 17DE08 8024F528 2442FFFF */ addiu $v0, $v0, -1 -/* 17DE0C 8024F52C 04410008 */ bgez $v0, .L8024F550 -/* 17DE10 8024F530 AE02FFDC */ sw $v0, -0x24($s0) -/* 17DE14 8024F534 8E020000 */ lw $v0, ($s0) -/* 17DE18 8024F538 2442FFFF */ addiu $v0, $v0, -1 -/* 17DE1C 8024F53C 04410004 */ bgez $v0, .L8024F550 -/* 17DE20 8024F540 AE020000 */ sw $v0, ($s0) -/* 17DE24 8024F544 0C048B7F */ jal free_entity_model_by_index -/* 17DE28 8024F548 0220202D */ daddu $a0, $s1, $zero -/* 17DE2C 8024F54C AE400000 */ sw $zero, ($s2) -.L8024F550: -/* 17DE30 8024F550 26730001 */ addiu $s3, $s3, 1 -.L8024F554: -/* 17DE34 8024F554 2610004C */ addiu $s0, $s0, 0x4c -/* 17DE38 8024F558 86820012 */ lh $v0, 0x12($s4) -/* 17DE3C 8024F55C 0262102A */ slt $v0, $s3, $v0 -/* 17DE40 8024F560 1440FF9F */ bnez $v0, .L8024F3E0 -/* 17DE44 8024F564 2652004C */ addiu $s2, $s2, 0x4c -.L8024F568: -/* 17DE48 8024F568 16A00006 */ bnez $s5, .L8024F584 -/* 17DE4C 8024F56C 00000000 */ nop -/* 17DE50 8024F570 0C00AB4B */ jal heap_free -/* 17DE54 8024F574 8E840018 */ lw $a0, 0x18($s4) -/* 17DE58 8024F578 0280202D */ daddu $a0, $s4, $zero -/* 17DE5C 8024F57C 0C093BE9 */ jal free_popup -/* 17DE60 8024F580 AC800018 */ sw $zero, 0x18($a0) -.L8024F584: -/* 17DE64 8024F584 8FBF0028 */ lw $ra, 0x28($sp) -/* 17DE68 8024F588 8FB50024 */ lw $s5, 0x24($sp) -/* 17DE6C 8024F58C 8FB40020 */ lw $s4, 0x20($sp) -/* 17DE70 8024F590 8FB3001C */ lw $s3, 0x1c($sp) -/* 17DE74 8024F594 8FB20018 */ lw $s2, 0x18($sp) -/* 17DE78 8024F598 8FB10014 */ lw $s1, 0x14($sp) -/* 17DE7C 8024F59C 8FB00010 */ lw $s0, 0x10($sp) -/* 17DE80 8024F5A0 D7B40030 */ ldc1 $f20, 0x30($sp) -/* 17DE84 8024F5A4 03E00008 */ jr $ra -/* 17DE88 8024F5A8 27BD0038 */ addiu $sp, $sp, 0x38 diff --git a/ver/us/asm/nonmatchings/17D6A0/func_8024F5AC.s b/ver/us/asm/nonmatchings/17D6A0/func_8024F5AC.s deleted file mode 100644 index bb69a57869..0000000000 --- a/ver/us/asm/nonmatchings/17D6A0/func_8024F5AC.s +++ /dev/null @@ -1,118 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_8024F5AC -/* 17DE8C 8024F5AC 27BDFD60 */ addiu $sp, $sp, -0x2a0 -/* 17DE90 8024F5B0 AFB40278 */ sw $s4, 0x278($sp) -/* 17DE94 8024F5B4 AFBF028C */ sw $ra, 0x28c($sp) -/* 17DE98 8024F5B8 AFBE0288 */ sw $fp, 0x288($sp) -/* 17DE9C 8024F5BC AFB70284 */ sw $s7, 0x284($sp) -/* 17DEA0 8024F5C0 AFB60280 */ sw $s6, 0x280($sp) -/* 17DEA4 8024F5C4 AFB5027C */ sw $s5, 0x27c($sp) -/* 17DEA8 8024F5C8 AFB30274 */ sw $s3, 0x274($sp) -/* 17DEAC 8024F5CC AFB20270 */ sw $s2, 0x270($sp) -/* 17DEB0 8024F5D0 AFB1026C */ sw $s1, 0x26c($sp) -/* 17DEB4 8024F5D4 AFB00268 */ sw $s0, 0x268($sp) -/* 17DEB8 8024F5D8 F7B60298 */ sdc1 $f22, 0x298($sp) -/* 17DEBC 8024F5DC F7B40290 */ sdc1 $f20, 0x290($sp) -/* 17DEC0 8024F5E0 AFA40258 */ sw $a0, 0x258($sp) -/* 17DEC4 8024F5E4 84820012 */ lh $v0, 0x12($a0) -/* 17DEC8 8024F5E8 8C930018 */ lw $s3, 0x18($a0) -/* 17DECC 8024F5EC 18400050 */ blez $v0, .L8024F730 -/* 17DED0 8024F5F0 0000A02D */ daddu $s4, $zero, $zero -/* 17DED4 8024F5F4 27A30058 */ addiu $v1, $sp, 0x58 -/* 17DED8 8024F5F8 AFA3025C */ sw $v1, 0x25c($sp) -/* 17DEDC 8024F5FC 27A30098 */ addiu $v1, $sp, 0x98 -/* 17DEE0 8024F600 AFA30260 */ sw $v1, 0x260($sp) -/* 17DEE4 8024F604 27A300D8 */ addiu $v1, $sp, 0xd8 -/* 17DEE8 8024F608 27BE01D8 */ addiu $fp, $sp, 0x1d8 -/* 17DEEC 8024F60C 27B20158 */ addiu $s2, $sp, 0x158 -/* 17DEF0 8024F610 27B70118 */ addiu $s7, $sp, 0x118 -/* 17DEF4 8024F614 27B60198 */ addiu $s6, $sp, 0x198 -/* 17DEF8 8024F618 27B50218 */ addiu $s5, $sp, 0x218 -/* 17DEFC 8024F61C 4480A000 */ mtc1 $zero, $f20 -/* 17DF00 8024F620 3C013F80 */ lui $at, 0x3f80 -/* 17DF04 8024F624 4481B000 */ mtc1 $at, $f22 -/* 17DF08 8024F628 26710034 */ addiu $s1, $s3, 0x34 -/* 17DF0C 8024F62C AFA30264 */ sw $v1, 0x264($sp) -.L8024F630: -/* 17DF10 8024F630 8E620000 */ lw $v0, ($s3) -/* 17DF14 8024F634 50400038 */ beql $v0, $zero, .L8024F718 -/* 17DF18 8024F638 26940001 */ addiu $s4, $s4, 1 -/* 17DF1C 8024F63C 8E22FFF0 */ lw $v0, -0x10($s1) -/* 17DF20 8024F640 1440003B */ bnez $v0, .L8024F730 -/* 17DF24 8024F644 00000000 */ nop -/* 17DF28 8024F648 8E250004 */ lw $a1, 4($s1) -/* 17DF2C 8024F64C 8E260008 */ lw $a2, 8($s1) -/* 17DF30 8024F650 8E27000C */ lw $a3, 0xc($s1) -/* 17DF34 8024F654 8E30FFD0 */ lw $s0, -0x30($s1) -/* 17DF38 8024F658 0C019E40 */ jal guTranslateF -/* 17DF3C 8024F65C 27A40018 */ addiu $a0, $sp, 0x18 -/* 17DF40 8024F660 4405A000 */ mfc1 $a1, $f20 -/* 17DF44 8024F664 4406B000 */ mfc1 $a2, $f22 -/* 17DF48 8024F668 4407A000 */ mfc1 $a3, $f20 -/* 17DF4C 8024F66C 8FA4025C */ lw $a0, 0x25c($sp) -/* 17DF50 8024F670 0C019EC8 */ jal guRotateF -/* 17DF54 8024F674 E7B40010 */ swc1 $f20, 0x10($sp) -/* 17DF58 8024F678 E7B40010 */ swc1 $f20, 0x10($sp) -/* 17DF5C 8024F67C 8E25FFFC */ lw $a1, -4($s1) -/* 17DF60 8024F680 4406A000 */ mfc1 $a2, $f20 -/* 17DF64 8024F684 4407B000 */ mfc1 $a3, $f22 -/* 17DF68 8024F688 8FA40260 */ lw $a0, 0x260($sp) -/* 17DF6C 8024F68C 0C019EC8 */ jal guRotateF -/* 17DF70 8024F690 26940001 */ addiu $s4, $s4, 1 -/* 17DF74 8024F694 E7B60010 */ swc1 $f22, 0x10($sp) -/* 17DF78 8024F698 8E25FFF4 */ lw $a1, -0xc($s1) -/* 17DF7C 8024F69C 4406A000 */ mfc1 $a2, $f20 -/* 17DF80 8024F6A0 4407A000 */ mfc1 $a3, $f20 -/* 17DF84 8024F6A4 0C019EC8 */ jal guRotateF -/* 17DF88 8024F6A8 8FA40264 */ lw $a0, 0x264($sp) -/* 17DF8C 8024F6AC 8E250000 */ lw $a1, ($s1) -/* 17DF90 8024F6B0 03C0202D */ daddu $a0, $fp, $zero -/* 17DF94 8024F6B4 00A0302D */ daddu $a2, $a1, $zero -/* 17DF98 8024F6B8 0C019DF0 */ jal guScaleF -/* 17DF9C 8024F6BC 00A0382D */ daddu $a3, $a1, $zero -/* 17DFA0 8024F6C0 8FA40264 */ lw $a0, 0x264($sp) -/* 17DFA4 8024F6C4 8FA5025C */ lw $a1, 0x25c($sp) -/* 17DFA8 8024F6C8 0C019D80 */ jal guMtxCatF -/* 17DFAC 8024F6CC 0240302D */ daddu $a2, $s2, $zero -/* 17DFB0 8024F6D0 0240202D */ daddu $a0, $s2, $zero -/* 17DFB4 8024F6D4 8FA50260 */ lw $a1, 0x260($sp) -/* 17DFB8 8024F6D8 0C019D80 */ jal guMtxCatF -/* 17DFBC 8024F6DC 02E0302D */ daddu $a2, $s7, $zero -/* 17DFC0 8024F6E0 03C0202D */ daddu $a0, $fp, $zero -/* 17DFC4 8024F6E4 02E0282D */ daddu $a1, $s7, $zero -/* 17DFC8 8024F6E8 0C019D80 */ jal guMtxCatF -/* 17DFCC 8024F6EC 0240302D */ daddu $a2, $s2, $zero -/* 17DFD0 8024F6F0 0240202D */ daddu $a0, $s2, $zero -/* 17DFD4 8024F6F4 27A50018 */ addiu $a1, $sp, 0x18 -/* 17DFD8 8024F6F8 0C019D80 */ jal guMtxCatF -/* 17DFDC 8024F6FC 02C0302D */ daddu $a2, $s6, $zero -/* 17DFE0 8024F700 02C0202D */ daddu $a0, $s6, $zero -/* 17DFE4 8024F704 0C019D40 */ jal guMtxF2L -/* 17DFE8 8024F708 02A0282D */ daddu $a1, $s5, $zero -/* 17DFEC 8024F70C 0200202D */ daddu $a0, $s0, $zero -/* 17DFF0 8024F710 0C04873A */ jal draw_entity_model_A -/* 17DFF4 8024F714 02A0282D */ daddu $a1, $s5, $zero -.L8024F718: -/* 17DFF8 8024F718 8FA30258 */ lw $v1, 0x258($sp) -/* 17DFFC 8024F71C 2631004C */ addiu $s1, $s1, 0x4c -/* 17E000 8024F720 84620012 */ lh $v0, 0x12($v1) -/* 17E004 8024F724 0282102A */ slt $v0, $s4, $v0 -/* 17E008 8024F728 1440FFC1 */ bnez $v0, .L8024F630 -/* 17E00C 8024F72C 2673004C */ addiu $s3, $s3, 0x4c -.L8024F730: -/* 17E010 8024F730 8FBF028C */ lw $ra, 0x28c($sp) -/* 17E014 8024F734 8FBE0288 */ lw $fp, 0x288($sp) -/* 17E018 8024F738 8FB70284 */ lw $s7, 0x284($sp) -/* 17E01C 8024F73C 8FB60280 */ lw $s6, 0x280($sp) -/* 17E020 8024F740 8FB5027C */ lw $s5, 0x27c($sp) -/* 17E024 8024F744 8FB40278 */ lw $s4, 0x278($sp) -/* 17E028 8024F748 8FB30274 */ lw $s3, 0x274($sp) -/* 17E02C 8024F74C 8FB20270 */ lw $s2, 0x270($sp) -/* 17E030 8024F750 8FB1026C */ lw $s1, 0x26c($sp) -/* 17E034 8024F754 8FB00268 */ lw $s0, 0x268($sp) -/* 17E038 8024F758 D7B60298 */ ldc1 $f22, 0x298($sp) -/* 17E03C 8024F75C D7B40290 */ ldc1 $f20, 0x290($sp) -/* 17E040 8024F760 03E00008 */ jr $ra -/* 17E044 8024F764 27BD02A0 */ addiu $sp, $sp, 0x2a0 diff --git a/ver/us/asm/nonmatchings/17D6A0/func_8024F768.s b/ver/us/asm/nonmatchings/17D6A0/func_8024F768.s deleted file mode 100644 index 9708501032..0000000000 --- a/ver/us/asm/nonmatchings/17D6A0/func_8024F768.s +++ /dev/null @@ -1,29 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_8024F768 -/* 17E048 8024F768 8C870044 */ lw $a3, 0x44($a0) -/* 17E04C 8024F76C 28E2000B */ slti $v0, $a3, 0xb -/* 17E050 8024F770 50400001 */ beql $v0, $zero, .L8024F778 -/* 17E054 8024F774 2407000A */ addiu $a3, $zero, 0xa -.L8024F778: -/* 17E058 8024F778 3C056666 */ lui $a1, 0x6666 -/* 17E05C 8024F77C 3C04800A */ lui $a0, %hi(gMasterGfxPos) -/* 17E060 8024F780 2484A66C */ addiu $a0, $a0, %lo(gMasterGfxPos) -/* 17E064 8024F784 34A56667 */ ori $a1, $a1, 0x6667 -/* 17E068 8024F788 00071A00 */ sll $v1, $a3, 8 -/* 17E06C 8024F78C 00671823 */ subu $v1, $v1, $a3 -/* 17E070 8024F790 00650018 */ mult $v1, $a1 -/* 17E074 8024F794 8C820000 */ lw $v0, ($a0) -/* 17E078 8024F798 00031FC3 */ sra $v1, $v1, 0x1f -/* 17E07C 8024F79C 0040302D */ daddu $a2, $v0, $zero -/* 17E080 8024F7A0 24420008 */ addiu $v0, $v0, 8 -/* 17E084 8024F7A4 AC820000 */ sw $v0, ($a0) -/* 17E088 8024F7A8 3C02FA00 */ lui $v0, 0xfa00 -/* 17E08C 8024F7AC ACC20000 */ sw $v0, ($a2) -/* 17E090 8024F7B0 00004010 */ mfhi $t0 -/* 17E094 8024F7B4 00081083 */ sra $v0, $t0, 2 -/* 17E098 8024F7B8 00431023 */ subu $v0, $v0, $v1 -/* 17E09C 8024F7BC 304200FF */ andi $v0, $v0, 0xff -/* 17E0A0 8024F7C0 03E00008 */ jr $ra -/* 17E0A4 8024F7C4 ACC20004 */ sw $v0, 4($a2) diff --git a/ver/us/asm/nonmatchings/182B30/func_802596C0.s b/ver/us/asm/nonmatchings/182B30/func_802596C0.s deleted file mode 100644 index 6d839c88e7..0000000000 --- a/ver/us/asm/nonmatchings/182B30/func_802596C0.s +++ /dev/null @@ -1,68 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_802596C0 -/* 187FA0 802596C0 27BDFFC8 */ addiu $sp, $sp, -0x38 -/* 187FA4 802596C4 AFB30024 */ sw $s3, 0x24($sp) -/* 187FA8 802596C8 0080982D */ daddu $s3, $a0, $zero -/* 187FAC 802596CC AFB40028 */ sw $s4, 0x28($sp) -/* 187FB0 802596D0 00A0A02D */ daddu $s4, $a1, $zero -/* 187FB4 802596D4 AFB5002C */ sw $s5, 0x2c($sp) -/* 187FB8 802596D8 00C0A82D */ daddu $s5, $a2, $zero -/* 187FBC 802596DC AFB00018 */ sw $s0, 0x18($sp) -/* 187FC0 802596E0 241000FF */ addiu $s0, $zero, 0xff -/* 187FC4 802596E4 AFB1001C */ sw $s1, 0x1c($sp) -/* 187FC8 802596E8 AFBF0030 */ sw $ra, 0x30($sp) -/* 187FCC 802596EC AFB20020 */ sw $s2, 0x20($sp) -/* 187FD0 802596F0 86630098 */ lh $v1, 0x98($s3) -/* 187FD4 802596F4 8E7200C0 */ lw $s2, 0xc0($s3) -/* 187FD8 802596F8 0070102A */ slt $v0, $v1, $s0 -/* 187FDC 802596FC 10400003 */ beqz $v0, .L8025970C -/* 187FE0 80259700 0000882D */ daddu $s1, $zero, $zero -/* 187FE4 80259704 3C118000 */ lui $s1, 0x8000 -/* 187FE8 80259708 0060802D */ daddu $s0, $v1, $zero -.L8025970C: -/* 187FEC 8025970C 8E620000 */ lw $v0, ($s3) -/* 187FF0 80259710 30420100 */ andi $v0, $v0, 0x100 -/* 187FF4 80259714 1040000C */ beqz $v0, .L80259748 -/* 187FF8 80259718 3C038080 */ lui $v1, 0x8080 -/* 187FFC 8025971C 34638081 */ ori $v1, $v1, 0x8081 -/* 188000 80259720 00101100 */ sll $v0, $s0, 4 -/* 188004 80259724 00501023 */ subu $v0, $v0, $s0 -/* 188008 80259728 000210C0 */ sll $v0, $v0, 3 -/* 18800C 8025972C 00430018 */ mult $v0, $v1 -/* 188010 80259730 3C118000 */ lui $s1, 0x8000 -/* 188014 80259734 00004010 */ mfhi $t0 -/* 188018 80259738 01021821 */ addu $v1, $t0, $v0 -/* 18801C 8025973C 000319C3 */ sra $v1, $v1, 7 -/* 188020 80259740 000217C3 */ sra $v0, $v0, 0x1f -/* 188024 80259744 00628023 */ subu $s0, $v1, $v0 -.L80259748: -/* 188028 80259748 92420768 */ lbu $v0, 0x768($s2) -/* 18802C 8025974C 10400007 */ beqz $v0, .L8025976C -/* 188030 80259750 0280282D */ daddu $a1, $s4, $zero -/* 188034 80259754 0C096525 */ jal func_80259494 -/* 188038 80259758 0260202D */ daddu $a0, $s3, $zero -/* 18803C 8025975C 0280282D */ daddu $a1, $s4, $zero -/* 188040 80259760 0200302D */ daddu $a2, $s0, $zero -/* 188044 80259764 080965DD */ j .L80259774 -/* 188048 80259768 2647076C */ addiu $a3, $s2, 0x76c -.L8025976C: -/* 18804C 8025976C 0200302D */ daddu $a2, $s0, $zero -/* 188050 80259770 264706D4 */ addiu $a3, $s2, 0x6d4 -.L80259774: -/* 188054 80259774 3C042000 */ lui $a0, 0x2000 -/* 188058 80259778 8E620084 */ lw $v0, 0x84($s3) -/* 18805C 8025977C 02242025 */ or $a0, $s1, $a0 -/* 188060 80259780 AFB50010 */ sw $s5, 0x10($sp) -/* 188064 80259784 0C0B78F6 */ jal spr_draw_npc_sprite -/* 188068 80259788 00442025 */ or $a0, $v0, $a0 -/* 18806C 8025978C 8FBF0030 */ lw $ra, 0x30($sp) -/* 188070 80259790 8FB5002C */ lw $s5, 0x2c($sp) -/* 188074 80259794 8FB40028 */ lw $s4, 0x28($sp) -/* 188078 80259798 8FB30024 */ lw $s3, 0x24($sp) -/* 18807C 8025979C 8FB20020 */ lw $s2, 0x20($sp) -/* 188080 802597A0 8FB1001C */ lw $s1, 0x1c($sp) -/* 188084 802597A4 8FB00018 */ lw $s0, 0x18($sp) -/* 188088 802597A8 03E00008 */ jr $ra -/* 18808C 802597AC 27BD0038 */ addiu $sp, $sp, 0x38 diff --git a/ver/us/asm/nonmatchings/18F340/func_80261DF4.s b/ver/us/asm/nonmatchings/18F340/func_80261DF4.s deleted file mode 100644 index 83e218efb7..0000000000 --- a/ver/us/asm/nonmatchings/18F340/func_80261DF4.s +++ /dev/null @@ -1,131 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -.section .rodata - -dlabel D_8029D598 -.double 1.2 - -.section .text - -glabel func_80261DF4 -/* 1906D4 80261DF4 27BDFFE0 */ addiu $sp, $sp, -0x20 -/* 1906D8 80261DF8 AFB10014 */ sw $s1, 0x14($sp) -/* 1906DC 80261DFC 0080882D */ daddu $s1, $a0, $zero -/* 1906E0 80261E00 AFBF0018 */ sw $ra, 0x18($sp) -/* 1906E4 80261E04 AFB00010 */ sw $s0, 0x10($sp) -/* 1906E8 80261E08 8E2400AC */ lw $a0, 0xac($s1) -/* 1906EC 80261E0C 0C04C3D6 */ jal get_item_entity -/* 1906F0 80261E10 00A0802D */ daddu $s0, $a1, $zero -/* 1906F4 80261E14 12000003 */ beqz $s0, .L80261E24 -/* 1906F8 80261E18 0040202D */ daddu $a0, $v0, $zero -/* 1906FC 80261E1C AE200070 */ sw $zero, 0x70($s1) -/* 190700 80261E20 AE200074 */ sw $zero, 0x74($s1) -.L80261E24: -/* 190704 80261E24 8E230074 */ lw $v1, 0x74($s1) -/* 190708 80261E28 24050001 */ addiu $a1, $zero, 1 -/* 19070C 80261E2C 10650020 */ beq $v1, $a1, .L80261EB0 -/* 190710 80261E30 28620002 */ slti $v0, $v1, 2 -/* 190714 80261E34 10400005 */ beqz $v0, .L80261E4C -/* 190718 80261E38 24020002 */ addiu $v0, $zero, 2 -/* 19071C 80261E3C 10600009 */ beqz $v1, .L80261E64 -/* 190720 80261E40 0000102D */ daddu $v0, $zero, $zero -/* 190724 80261E44 080987E8 */ j .L80261FA0 -/* 190728 80261E48 00000000 */ nop -.L80261E4C: -/* 19072C 80261E4C 10620033 */ beq $v1, $v0, .L80261F1C -/* 190730 80261E50 24020003 */ addiu $v0, $zero, 3 -/* 190734 80261E54 10620049 */ beq $v1, $v0, .L80261F7C -/* 190738 80261E58 0000102D */ daddu $v0, $zero, $zero -/* 19073C 80261E5C 080987E8 */ j .L80261FA0 -/* 190740 80261E60 00000000 */ nop -.L80261E64: -/* 190744 80261E64 8E220070 */ lw $v0, 0x70($s1) -/* 190748 80261E68 2442FFFF */ addiu $v0, $v0, -1 -/* 19074C 80261E6C AE220070 */ sw $v0, 0x70($s1) -/* 190750 80261E70 C480000C */ lwc1 $f0, 0xc($a0) -/* 190754 80261E74 44821000 */ mtc1 $v0, $f2 -/* 190758 80261E78 00000000 */ nop -/* 19075C 80261E7C 468010A0 */ cvt.s.w $f2, $f2 -/* 190760 80261E80 46020000 */ add.s $f0, $f0, $f2 -/* 190764 80261E84 44801000 */ mtc1 $zero, $f2 -/* 190768 80261E88 00000000 */ nop -/* 19076C 80261E8C 4602003C */ c.lt.s $f0, $f2 -/* 190770 80261E90 00000000 */ nop -/* 190774 80261E94 45000041 */ bc1f .L80261F9C -/* 190778 80261E98 E480000C */ swc1 $f0, 0xc($a0) -/* 19077C 80261E9C 24020008 */ addiu $v0, $zero, 8 -/* 190780 80261EA0 E482000C */ swc1 $f2, 0xc($a0) -/* 190784 80261EA4 AE220070 */ sw $v0, 0x70($s1) -/* 190788 80261EA8 080987E7 */ j .L80261F9C -/* 19078C 80261EAC AE250074 */ sw $a1, 0x74($s1) -.L80261EB0: -/* 190790 80261EB0 8E220070 */ lw $v0, 0x70($s1) -/* 190794 80261EB4 2442FFFF */ addiu $v0, $v0, -1 -/* 190798 80261EB8 AE220070 */ sw $v0, 0x70($s1) -/* 19079C 80261EBC C480000C */ lwc1 $f0, 0xc($a0) -/* 1907A0 80261EC0 44821000 */ mtc1 $v0, $f2 -/* 1907A4 80261EC4 00000000 */ nop -/* 1907A8 80261EC8 468010A0 */ cvt.s.w $f2, $f2 -/* 1907AC 80261ECC 46020000 */ add.s $f0, $f0, $f2 -/* 1907B0 80261ED0 44802000 */ mtc1 $zero, $f4 -/* 1907B4 80261ED4 E480000C */ swc1 $f0, 0xc($a0) -/* 1907B8 80261ED8 C4800008 */ lwc1 $f0, 8($a0) -/* 1907BC 80261EDC 3C013FF8 */ lui $at, 0x3ff8 -/* 1907C0 80261EE0 44811800 */ mtc1 $at, $f3 -/* 1907C4 80261EE4 44801000 */ mtc1 $zero, $f2 -/* 1907C8 80261EE8 46000021 */ cvt.d.s $f0, $f0 -/* 1907CC 80261EEC 46220000 */ add.d $f0, $f0, $f2 -/* 1907D0 80261EF0 C482000C */ lwc1 $f2, 0xc($a0) -/* 1907D4 80261EF4 4604103C */ c.lt.s $f2, $f4 -/* 1907D8 80261EF8 46200020 */ cvt.s.d $f0, $f0 -/* 1907DC 80261EFC 45000027 */ bc1f .L80261F9C -/* 1907E0 80261F00 E4800008 */ swc1 $f0, 8($a0) -/* 1907E4 80261F04 24020004 */ addiu $v0, $zero, 4 -/* 1907E8 80261F08 E484000C */ swc1 $f4, 0xc($a0) -/* 1907EC 80261F0C AE220070 */ sw $v0, 0x70($s1) -/* 1907F0 80261F10 24020002 */ addiu $v0, $zero, 2 -/* 1907F4 80261F14 080987E7 */ j .L80261F9C -/* 1907F8 80261F18 AE220074 */ sw $v0, 0x74($s1) -.L80261F1C: -/* 1907FC 80261F1C 8E220070 */ lw $v0, 0x70($s1) -/* 190800 80261F20 2442FFFF */ addiu $v0, $v0, -1 -/* 190804 80261F24 AE220070 */ sw $v0, 0x70($s1) -/* 190808 80261F28 C480000C */ lwc1 $f0, 0xc($a0) -/* 19080C 80261F2C 44821000 */ mtc1 $v0, $f2 -/* 190810 80261F30 00000000 */ nop -/* 190814 80261F34 468010A0 */ cvt.s.w $f2, $f2 -/* 190818 80261F38 46020000 */ add.s $f0, $f0, $f2 -/* 19081C 80261F3C 44802000 */ mtc1 $zero, $f4 -/* 190820 80261F40 E480000C */ swc1 $f0, 0xc($a0) -/* 190824 80261F44 C4800008 */ lwc1 $f0, 8($a0) -/* 190828 80261F48 3C01802A */ lui $at, %hi(D_8029D598) -/* 19082C 80261F4C D422D598 */ ldc1 $f2, %lo(D_8029D598)($at) -/* 190830 80261F50 46000021 */ cvt.d.s $f0, $f0 -/* 190834 80261F54 46220000 */ add.d $f0, $f0, $f2 -/* 190838 80261F58 C482000C */ lwc1 $f2, 0xc($a0) -/* 19083C 80261F5C 4604103C */ c.lt.s $f2, $f4 -/* 190840 80261F60 46200020 */ cvt.s.d $f0, $f0 -/* 190844 80261F64 4500000D */ bc1f .L80261F9C -/* 190848 80261F68 E4800008 */ swc1 $f0, 8($a0) -/* 19084C 80261F6C 24020003 */ addiu $v0, $zero, 3 -/* 190850 80261F70 E484000C */ swc1 $f4, 0xc($a0) -/* 190854 80261F74 080987E7 */ j .L80261F9C -/* 190858 80261F78 AE220074 */ sw $v0, 0x74($s1) -.L80261F7C: -/* 19085C 80261F7C 24020002 */ addiu $v0, $zero, 2 -/* 190860 80261F80 3C04802A */ lui $a0, %hi(D_8029FBB0) -/* 190864 80261F84 2484FBB0 */ addiu $a0, $a0, %lo(D_8029FBB0) -/* 190868 80261F88 24030014 */ addiu $v1, $zero, 0x14 -/* 19086C 80261F8C AC830000 */ sw $v1, ($a0) -/* 190870 80261F90 AC830004 */ sw $v1, 4($a0) -/* 190874 80261F94 080987E8 */ j .L80261FA0 -/* 190878 80261F98 AC830008 */ sw $v1, 8($a0) -.L80261F9C: -/* 19087C 80261F9C 0000102D */ daddu $v0, $zero, $zero -.L80261FA0: -/* 190880 80261FA0 8FBF0018 */ lw $ra, 0x18($sp) -/* 190884 80261FA4 8FB10014 */ lw $s1, 0x14($sp) -/* 190888 80261FA8 8FB00010 */ lw $s0, 0x10($sp) -/* 19088C 80261FAC 03E00008 */ jr $ra -/* 190890 80261FB0 27BD0020 */ addiu $sp, $sp, 0x20 diff --git a/ver/us/asm/nonmatchings/a5dd0_len_114e0/create_entity.s b/ver/us/asm/nonmatchings/a5dd0_len_114e0/create_entity.s index ea8514ae2c..2cbbd489e2 100644 --- a/ver/us/asm/nonmatchings/a5dd0_len_114e0/create_entity.s +++ b/ver/us/asm/nonmatchings/a5dd0_len_114e0/create_entity.s @@ -25,8 +25,8 @@ glabel create_entity /* A7FF8 801118F8 0C044305 */ jal load_area_specific_entity_data /* A7FFC 801118FC AFA40040 */ sw $a0, 0x40($sp) /* A8000 80111900 27A40054 */ addiu $a0, $sp, 0x54 -/* A8004 80111904 3C038016 */ lui $v1, %hi(CreateEntityVarArgBuffer2) -/* A8008 80111908 2463C7D8 */ addiu $v1, $v1, %lo(CreateEntityVarArgBuffer2) +/* A8004 80111904 3C038016 */ lui $v1, %hi(CreateEntityVarArgBuffer + 0x8) +/* A8008 80111908 2463C7D8 */ addiu $v1, $v1, %lo(CreateEntityVarArgBuffer + 0x8) /* A800C 8011190C C7B60044 */ lwc1 $f22, 0x44($sp) /* A8010 80111910 4680B5A0 */ cvt.s.w $f22, $f22 /* A8014 80111914 C7B80048 */ lwc1 $f24, 0x48($sp) diff --git a/ver/us/asm/nonmatchings/a5dd0_len_114e0/entity_interacts_with_current_partner.s b/ver/us/asm/nonmatchings/a5dd0_len_114e0/entity_interacts_with_current_partner.s deleted file mode 100644 index 48c6834d37..0000000000 --- a/ver/us/asm/nonmatchings/a5dd0_len_114e0/entity_interacts_with_current_partner.s +++ /dev/null @@ -1,70 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -.section .rodata - -dlabel jtbl_8014F768 -.word .L80110A70_A7170, .L80110A70_A7170, .L80110A68_A7168, .L80110A68_A7168, .L80110A70_A7170, .L80110A68_A7168, .L80110A70_A7170, .L80110A70_A7170, .L80110A70_A7170, .L80110A70_A7170, .L80110A70_A7170, .L80110A70_A7170, .L80110A68_A7168, .L80110A70_A7170, .L80110A70_A7170, .L80110A68_A7168, .L80110A68_A7168, .L80110A70_A7170, .L80110A68_A7168, .L80110A68_A7168, .L80110A68_A7168, .L80110A68_A7168, .L80110A68_A7168, .L80110A68_A7168, .L80110A68_A7168, .L80110A68_A7168, .L80110A68_A7168, .L80110A70_A7170, .L80110A68_A7168, .L80110A68_A7168, .L80110A68_A7168, .L80110A70_A7170 - -dlabel jtbl_8014F7E8 -.word .L80110A70_A7170, .L80110A70_A7170, .L80110A68_A7168, .L80110A68_A7168, .L80110A70_A7170, .L80110A68_A7168, .L80110A70_A7170, .L80110A70_A7170, .L80110A70_A7170, .L80110A70_A7170, .L80110A70_A7170, .L80110A70_A7170, .L80110A68_A7168, .L80110A70_A7170, .L80110A68_A7168, .L80110A68_A7168, .L80110A68_A7168, .L80110A68_A7168, .L80110A68_A7168, .L80110A68_A7168, .L80110A70_A7170, .L80110A70_A7170, .L80110A68_A7168, .L80110A68_A7168, .L80110A68_A7168, .L80110A70_A7170, .L80110A68_A7168, .L80110A70_A7170 - -.section .text - -glabel entity_interacts_with_current_partner -/* A70DC 801109DC 27BDFFE0 */ addiu $sp, $sp, -0x20 -/* A70E0 801109E0 AFB20018 */ sw $s2, 0x18($sp) -/* A70E4 801109E4 0080902D */ daddu $s2, $a0, $zero -/* A70E8 801109E8 AFB00010 */ sw $s0, 0x10($sp) -/* A70EC 801109EC 0000802D */ daddu $s0, $zero, $zero -/* A70F0 801109F0 AFBF001C */ sw $ra, 0x1c($sp) -/* A70F4 801109F4 0C0441A9 */ jal get_entity_type -/* A70F8 801109F8 AFB10014 */ sw $s1, 0x14($sp) -/* A70FC 801109FC 0C039422 */ jal get_current_partner_id -/* A7100 80110A00 0040882D */ daddu $s1, $v0, $zero -/* A7104 80110A04 00021600 */ sll $v0, $v0, 0x18 -/* A7108 80110A08 00021E03 */ sra $v1, $v0, 0x18 -/* A710C 80110A0C 24020002 */ addiu $v0, $zero, 2 -/* A7110 80110A10 1062000C */ beq $v1, $v0, .L80110A44 -/* A7114 80110A14 24020003 */ addiu $v0, $zero, 3 -/* A7118 80110A18 1462001E */ bne $v1, $v0, .L80110A94 -/* A711C 80110A1C 0200102D */ daddu $v0, $s0, $zero -/* A7120 80110A20 2623FFF9 */ addiu $v1, $s1, -7 -/* A7124 80110A24 2C620020 */ sltiu $v0, $v1, 0x20 -/* A7128 80110A28 1040000F */ beqz $v0, .L80110A68_A7168 -/* A712C 80110A2C 00031080 */ sll $v0, $v1, 2 -/* A7130 80110A30 3C018015 */ lui $at, %hi(jtbl_8014F768) -/* A7134 80110A34 00220821 */ addu $at, $at, $v0 -/* A7138 80110A38 8C22F768 */ lw $v0, %lo(jtbl_8014F768)($at) -/* A713C 80110A3C 00400008 */ jr $v0 -/* A7140 80110A40 00000000 */ nop -.L80110A44: -/* A7144 80110A44 2623FFF9 */ addiu $v1, $s1, -7 -/* A7148 80110A48 2C62001C */ sltiu $v0, $v1, 0x1c -/* A714C 80110A4C 10400006 */ beqz $v0, .L80110A68_A7168 -/* A7150 80110A50 00031080 */ sll $v0, $v1, 2 -/* A7154 80110A54 3C018015 */ lui $at, %hi(jtbl_8014F7E8) -/* A7158 80110A58 00220821 */ addu $at, $at, $v0 -/* A715C 80110A5C 8C22F7E8 */ lw $v0, %lo(jtbl_8014F7E8)($at) -/* A7160 80110A60 00400008 */ jr $v0 -/* A7164 80110A64 00000000 */ nop -.L80110A68_A7168: -/* A7168 80110A68 080442A5 */ j .L80110A94 -/* A716C 80110A6C 0000102D */ daddu $v0, $zero, $zero -.L80110A70_A7170: -/* A7170 80110A70 0C04417A */ jal get_entity_by_index -/* A7174 80110A74 0240202D */ daddu $a0, $s2, $zero -/* A7178 80110A78 0040202D */ daddu $a0, $v0, $zero -/* A717C 80110A7C 24100001 */ addiu $s0, $zero, 1 -/* A7180 80110A80 8C820000 */ lw $v0, ($a0) -/* A7184 80110A84 3C030002 */ lui $v1, 2 -/* A7188 80110A88 00431025 */ or $v0, $v0, $v1 -/* A718C 80110A8C AC820000 */ sw $v0, ($a0) -/* A7190 80110A90 0200102D */ daddu $v0, $s0, $zero -.L80110A94: -/* A7194 80110A94 8FBF001C */ lw $ra, 0x1c($sp) -/* A7198 80110A98 8FB20018 */ lw $s2, 0x18($sp) -/* A719C 80110A9C 8FB10014 */ lw $s1, 0x14($sp) -/* A71A0 80110AA0 8FB00010 */ lw $s0, 0x10($sp) -/* A71A4 80110AA4 03E00008 */ jr $ra -/* A71A8 80110AA8 27BD0020 */ addiu $sp, $sp, 0x20 diff --git a/ver/us/asm/nonmatchings/a5dd0_len_114e0/func_8011B1D8.s b/ver/us/asm/nonmatchings/a5dd0_len_114e0/func_8011B1D8.s deleted file mode 100644 index 469ccec308..0000000000 --- a/ver/us/asm/nonmatchings/a5dd0_len_114e0/func_8011B1D8.s +++ /dev/null @@ -1,115 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_8011B1D8 -/* B18D8 8011B1D8 27BDFFC8 */ addiu $sp, $sp, -0x38 -/* B18DC 8011B1DC AFB50024 */ sw $s5, 0x24($sp) -/* B18E0 8011B1E0 0080A82D */ daddu $s5, $a0, $zero -/* B18E4 8011B1E4 AFBF0030 */ sw $ra, 0x30($sp) -/* B18E8 8011B1E8 AFB7002C */ sw $s7, 0x2c($sp) -/* B18EC 8011B1EC AFB60028 */ sw $s6, 0x28($sp) -/* B18F0 8011B1F0 AFB40020 */ sw $s4, 0x20($sp) -/* B18F4 8011B1F4 AFB3001C */ sw $s3, 0x1c($sp) -/* B18F8 8011B1F8 AFB20018 */ sw $s2, 0x18($sp) -/* B18FC 8011B1FC AFB10014 */ sw $s1, 0x14($sp) -/* B1900 8011B200 AFB00010 */ sw $s0, 0x10($sp) -/* B1904 8011B204 8EA30000 */ lw $v1, ($s5) -/* B1908 8011B208 24020002 */ addiu $v0, $zero, 2 -/* B190C 8011B20C 14620007 */ bne $v1, $v0, .L8011B22C -/* B1910 8011B210 24020005 */ addiu $v0, $zero, 5 -/* B1914 8011B214 3C028015 */ lui $v0, %hi(D_80153226) -/* B1918 8011B218 94423226 */ lhu $v0, %lo(D_80153226)($v0) -/* B191C 8011B21C 3C018015 */ lui $at, %hi(D_80153376) -/* B1920 8011B220 A4223376 */ sh $v0, %lo(D_80153376)($at) -/* B1924 8011B224 08046CD4 */ j .L8011B350 -/* B1928 8011B228 00000000 */ nop -.L8011B22C: -/* B192C 8011B22C 14620019 */ bne $v1, $v0, .L8011B294 -/* B1930 8011B230 02A0202D */ daddu $a0, $s5, $zero -/* B1934 8011B234 0C0456C3 */ jal get_model_property -/* B1938 8011B238 24050060 */ addiu $a1, $zero, 0x60 -/* B193C 8011B23C 10400015 */ beqz $v0, .L8011B294 -/* B1940 8011B240 00000000 */ nop -/* B1944 8011B244 8C420008 */ lw $v0, 8($v0) -/* B1948 8011B248 10400012 */ beqz $v0, .L8011B294 -/* B194C 8011B24C 00000000 */ nop -/* B1950 8011B250 0C04572A */ jal mdl_get_child_count -/* B1954 8011B254 02A0202D */ daddu $a0, $s5, $zero -/* B1958 8011B258 3C038015 */ lui $v1, %hi(mdl_treeIterPos) -/* B195C 8011B25C 24633224 */ addiu $v1, $v1, %lo(mdl_treeIterPos) -/* B1960 8011B260 8C640000 */ lw $a0, ($v1) -/* B1964 8011B264 00822021 */ addu $a0, $a0, $v0 -/* B1968 8011B268 AC640000 */ sw $a0, ($v1) -/* B196C 8011B26C 94620002 */ lhu $v0, 2($v1) -/* B1970 8011B270 3C018015 */ lui $at, %hi(D_80153376) -/* B1974 8011B274 A4223376 */ sh $v0, %lo(D_80153376)($at) -/* B1978 8011B278 08046CD4 */ j .L8011B350 -/* B197C 8011B27C 00000000 */ nop -.L8011B280: -/* B1980 8011B280 AED00000 */ sw $s0, ($s6) -/* B1984 8011B284 3C018015 */ lui $at, %hi(D_80153374) -/* B1988 8011B288 A4323374 */ sh $s2, %lo(D_80153374)($at) -/* B198C 8011B28C 08046CD4 */ j .L8011B350 -/* B1990 8011B290 00000000 */ nop -.L8011B294: -/* B1994 8011B294 8EA20010 */ lw $v0, 0x10($s5) -/* B1998 8011B298 1040002D */ beqz $v0, .L8011B350 -/* B199C 8011B29C 00000000 */ nop -/* B19A0 8011B2A0 8C53000C */ lw $s3, 0xc($v0) -/* B19A4 8011B2A4 1260002A */ beqz $s3, .L8011B350 -/* B19A8 8011B2A8 00000000 */ nop -/* B19AC 8011B2AC 1A600028 */ blez $s3, .L8011B350 -/* B19B0 8011B2B0 0000882D */ daddu $s1, $zero, $zero -/* B19B4 8011B2B4 3C148015 */ lui $s4, %hi(mdl_treeIterPos) -/* B19B8 8011B2B8 26943224 */ addiu $s4, $s4, %lo(mdl_treeIterPos) -/* B19BC 8011B2BC 24170005 */ addiu $s7, $zero, 5 -/* B19C0 8011B2C0 3C168015 */ lui $s6, %hi(D_80153370) -/* B19C4 8011B2C4 26D63370 */ addiu $s6, $s6, %lo(D_80153370) -.L8011B2C8: -/* B19C8 8011B2C8 8EA20010 */ lw $v0, 0x10($s5) -/* B19CC 8011B2CC 8C430010 */ lw $v1, 0x10($v0) -/* B19D0 8011B2D0 00111080 */ sll $v0, $s1, 2 -/* B19D4 8011B2D4 00431021 */ addu $v0, $v0, $v1 -/* B19D8 8011B2D8 8C500000 */ lw $s0, ($v0) -/* B19DC 8011B2DC 8E020000 */ lw $v0, ($s0) -/* B19E0 8011B2E0 96920002 */ lhu $s2, 2($s4) -/* B19E4 8011B2E4 1457000B */ bne $v0, $s7, .L8011B314 -/* B19E8 8011B2E8 0200202D */ daddu $a0, $s0, $zero -/* B19EC 8011B2EC 0C0456C3 */ jal get_model_property -/* B19F0 8011B2F0 24050060 */ addiu $a1, $zero, 0x60 -/* B19F4 8011B2F4 10400007 */ beqz $v0, .L8011B314 -/* B19F8 8011B2F8 00000000 */ nop -/* B19FC 8011B2FC 8C420008 */ lw $v0, 8($v0) -/* B1A00 8011B300 10400004 */ beqz $v0, .L8011B314 -/* B1A04 8011B304 00000000 */ nop -/* B1A08 8011B308 0C04572A */ jal mdl_get_child_count -/* B1A0C 8011B30C 0200202D */ daddu $a0, $s0, $zero -/* B1A10 8011B310 02429021 */ addu $s2, $s2, $v0 -.L8011B314: -/* B1A14 8011B314 0C046C76 */ jal func_8011B1D8 -/* B1A18 8011B318 0200202D */ daddu $a0, $s0, $zero -/* B1A1C 8011B31C 8EC20000 */ lw $v0, ($s6) -/* B1A20 8011B320 1440000B */ bnez $v0, .L8011B350 -/* B1A24 8011B324 00000000 */ nop -/* B1A28 8011B328 3C028015 */ lui $v0, %hi(D_8015336E) -/* B1A2C 8011B32C 9442336E */ lhu $v0, %lo(D_8015336E)($v0) -/* B1A30 8011B330 8E830000 */ lw $v1, ($s4) -/* B1A34 8011B334 1043FFD2 */ beq $v0, $v1, .L8011B280 -/* B1A38 8011B338 24620001 */ addiu $v0, $v1, 1 -/* B1A3C 8011B33C AE820000 */ sw $v0, ($s4) -/* B1A40 8011B340 26310001 */ addiu $s1, $s1, 1 -/* B1A44 8011B344 0233102A */ slt $v0, $s1, $s3 -/* B1A48 8011B348 1440FFDF */ bnez $v0, .L8011B2C8 -/* B1A4C 8011B34C 00000000 */ nop -.L8011B350: -/* B1A50 8011B350 8FBF0030 */ lw $ra, 0x30($sp) -/* B1A54 8011B354 8FB7002C */ lw $s7, 0x2c($sp) -/* B1A58 8011B358 8FB60028 */ lw $s6, 0x28($sp) -/* B1A5C 8011B35C 8FB50024 */ lw $s5, 0x24($sp) -/* B1A60 8011B360 8FB40020 */ lw $s4, 0x20($sp) -/* B1A64 8011B364 8FB3001C */ lw $s3, 0x1c($sp) -/* B1A68 8011B368 8FB20018 */ lw $s2, 0x18($sp) -/* B1A6C 8011B36C 8FB10014 */ lw $s1, 0x14($sp) -/* B1A70 8011B370 8FB00010 */ lw $s0, 0x10($sp) -/* B1A74 8011B374 03E00008 */ jr $ra -/* B1A78 8011B378 27BD0038 */ addiu $sp, $sp, 0x38 diff --git a/ver/us/asm/nonmatchings/battle/partner/goombario/func_80238BCC_6F1CAC.s b/ver/us/asm/nonmatchings/battle/partner/goombario/func_80238BCC_6F1CAC.s index 0766f8f3e7..4fdf352909 100644 --- a/ver/us/asm/nonmatchings/battle/partner/goombario/func_80238BCC_6F1CAC.s +++ b/ver/us/asm/nonmatchings/battle/partner/goombario/func_80238BCC_6F1CAC.s @@ -129,18 +129,18 @@ glabel func_80238BCC_6F1CAC /* 6F1E8C 80238DAC AE020084 */ sw $v0, 0x84($s0) /* 6F1E90 80238DB0 90820136 */ lbu $v0, 0x136($a0) /* 6F1E94 80238DB4 00021080 */ sll $v0, $v0, 2 -/* 6F1E98 80238DB8 3C038028 */ lui $v1, %hi(D_80282EE9) +/* 6F1E98 80238DB8 3C038028 */ lui $v1, %hi(bActorOffsets + 0x1) /* 6F1E9C 80238DBC 00621821 */ addu $v1, $v1, $v0 -/* 6F1EA0 80238DC0 80632EE9 */ lb $v1, %lo(D_80282EE9)($v1) +/* 6F1EA0 80238DC0 80632EE9 */ lb $v1, %lo(bActorOffsets + 0x1)($v1) /* 6F1EA4 80238DC4 8E020088 */ lw $v0, 0x88($s0) /* 6F1EA8 80238DC8 00431021 */ addu $v0, $v0, $v1 /* 6F1EAC 80238DCC AE020088 */ sw $v0, 0x88($s0) /* 6F1EB0 80238DD0 90820136 */ lbu $v0, 0x136($a0) /* 6F1EB4 80238DD4 8E030090 */ lw $v1, 0x90($s0) /* 6F1EB8 80238DD8 00021080 */ sll $v0, $v0, 2 -/* 6F1EBC 80238DDC 3C048028 */ lui $a0, %hi(D_80282EEA) +/* 6F1EBC 80238DDC 3C048028 */ lui $a0, %hi(bActorOffsets + 0x2) /* 6F1EC0 80238DE0 00822021 */ addu $a0, $a0, $v0 -/* 6F1EC4 80238DE4 80842EEA */ lb $a0, %lo(D_80282EEA)($a0) +/* 6F1EC4 80238DE4 80842EEA */ lb $a0, %lo(bActorOffsets + 0x2)($a0) /* 6F1EC8 80238DE8 00641821 */ addu $v1, $v1, $a0 /* 6F1ECC 80238DEC AE030090 */ sw $v1, 0x90($s0) /* 6F1ED0 80238DF0 8FBF0014 */ lw $ra, 0x14($sp) diff --git a/ver/us/asm/nonmatchings/pause/138CC0/pause_stats_draw_contents.s b/ver/us/asm/nonmatchings/pause/138CC0/pause_stats_draw_contents.s index 79708e9e38..3d318760c2 100644 --- a/ver/us/asm/nonmatchings/pause/138CC0/pause_stats_draw_contents.s +++ b/ver/us/asm/nonmatchings/pause/138CC0/pause_stats_draw_contents.s @@ -680,8 +680,8 @@ glabel pause_stats_draw_contents /* 13971C 802463DC 00108080 */ sll $s0, $s0, 2 /* 139720 802463E0 2610008C */ addiu $s0, $s0, 0x8c /* 139724 802463E4 8FA80084 */ lw $t0, 0x84($sp) -/* 139728 802463E8 3C058025 */ lui $a1, %hi(D_8024F470) -/* 13972C 802463EC 8CA5F470 */ lw $a1, %lo(D_8024F470)($a1) +/* 139728 802463E8 3C058025 */ lui $a1, %hi(D_8024F46C + 0x4) +/* 13972C 802463EC 8CA5F470 */ lw $a1, %lo(D_8024F46C + 0x4)($a1) /* 139730 802463F0 01108021 */ addu $s0, $t0, $s0 /* 139734 802463F4 0C051261 */ jal hud_element_set_render_pos /* 139738 802463F8 02052821 */ addu $a1, $s0, $a1 @@ -711,8 +711,8 @@ glabel pause_stats_draw_contents /* 139790 80246450 00108080 */ sll $s0, $s0, 2 /* 139794 80246454 2610008C */ addiu $s0, $s0, 0x8c /* 139798 80246458 8FA80084 */ lw $t0, 0x84($sp) -/* 13979C 8024645C 3C058025 */ lui $a1, %hi(D_8024F474) -/* 1397A0 80246460 8CA5F474 */ lw $a1, %lo(D_8024F474)($a1) +/* 13979C 8024645C 3C058025 */ lui $a1, %hi(D_8024F46C + 0x8) +/* 1397A0 80246460 8CA5F474 */ lw $a1, %lo(D_8024F46C + 0x8)($a1) /* 1397A4 80246464 01108021 */ addu $s0, $t0, $s0 /* 1397A8 80246468 0C051261 */ jal hud_element_set_render_pos /* 1397AC 8024646C 02052821 */ addu $a1, $s0, $a1 @@ -742,8 +742,8 @@ glabel pause_stats_draw_contents /* 139804 802464C4 00108080 */ sll $s0, $s0, 2 /* 139808 802464C8 2610008C */ addiu $s0, $s0, 0x8c /* 13980C 802464CC 8FA80084 */ lw $t0, 0x84($sp) -/* 139810 802464D0 3C058025 */ lui $a1, %hi(D_8024F478) -/* 139814 802464D4 8CA5F478 */ lw $a1, %lo(D_8024F478)($a1) +/* 139810 802464D0 3C058025 */ lui $a1, %hi(D_8024F46C + 0xC) +/* 139814 802464D4 8CA5F478 */ lw $a1, %lo(D_8024F46C + 0xC)($a1) /* 139818 802464D8 01108021 */ addu $s0, $t0, $s0 /* 13981C 802464DC 0C051261 */ jal hud_element_set_render_pos /* 139820 802464E0 02052821 */ addu $a1, $s0, $a1 @@ -773,8 +773,8 @@ glabel pause_stats_draw_contents /* 139878 80246538 00108080 */ sll $s0, $s0, 2 /* 13987C 8024653C 2610008C */ addiu $s0, $s0, 0x8c /* 139880 80246540 8FA80084 */ lw $t0, 0x84($sp) -/* 139884 80246544 3C058025 */ lui $a1, %hi(D_8024F47C) -/* 139888 80246548 8CA5F47C */ lw $a1, %lo(D_8024F47C)($a1) +/* 139884 80246544 3C058025 */ lui $a1, %hi(D_8024F46C + 0x10) +/* 139888 80246548 8CA5F47C */ lw $a1, %lo(D_8024F46C + 0x10)($a1) /* 13988C 8024654C 01108021 */ addu $s0, $t0, $s0 /* 139890 80246550 0C051261 */ jal hud_element_set_render_pos /* 139894 80246554 02052821 */ addu $a1, $s0, $a1 @@ -804,8 +804,8 @@ glabel pause_stats_draw_contents /* 1398EC 802465AC 00108080 */ sll $s0, $s0, 2 /* 1398F0 802465B0 2610008C */ addiu $s0, $s0, 0x8c /* 1398F4 802465B4 8FA80084 */ lw $t0, 0x84($sp) -/* 1398F8 802465B8 3C058025 */ lui $a1, %hi(D_8024F480) -/* 1398FC 802465BC 8CA5F480 */ lw $a1, %lo(D_8024F480)($a1) +/* 1398F8 802465B8 3C058025 */ lui $a1, %hi(D_8024F46C + 0x14) +/* 1398FC 802465BC 8CA5F480 */ lw $a1, %lo(D_8024F46C + 0x14)($a1) /* 139900 802465C0 01108021 */ addu $s0, $t0, $s0 /* 139904 802465C4 0C051261 */ jal hud_element_set_render_pos /* 139908 802465C8 02052821 */ addu $a1, $s0, $a1 @@ -835,8 +835,8 @@ glabel pause_stats_draw_contents /* 139960 80246620 00108080 */ sll $s0, $s0, 2 /* 139964 80246624 2610008C */ addiu $s0, $s0, 0x8c /* 139968 80246628 8FA80084 */ lw $t0, 0x84($sp) -/* 13996C 8024662C 3C058025 */ lui $a1, %hi(D_8024F484) -/* 139970 80246630 8CA5F484 */ lw $a1, %lo(D_8024F484)($a1) +/* 13996C 8024662C 3C058025 */ lui $a1, %hi(D_8024F46C + 0x18) +/* 139970 80246630 8CA5F484 */ lw $a1, %lo(D_8024F46C + 0x18)($a1) /* 139974 80246634 01108021 */ addu $s0, $t0, $s0 /* 139978 80246638 0C051261 */ jal hud_element_set_render_pos /* 13997C 8024663C 02052821 */ addu $a1, $s0, $a1 diff --git a/ver/us/asm/nonmatchings/world/area_flo/flo_14/CCB310/flo_14_func_80240504_CCB814.s b/ver/us/asm/nonmatchings/world/area_flo/flo_14/CCB310/flo_14_func_80240504_CCB814.s index 0accb15a93..543c0f57a1 100644 --- a/ver/us/asm/nonmatchings/world/area_flo/flo_14/CCB310/flo_14_func_80240504_CCB814.s +++ b/ver/us/asm/nonmatchings/world/area_flo/flo_14/CCB310/flo_14_func_80240504_CCB814.s @@ -9,7 +9,7 @@ dlabel flo_14_D_80245328_CD0638 .double 0.98 .section .text -glabel func_80240504_CCB814 +glabel flo_14_func_80240504_CCB814 /* CCB814 80240504 27BDFF88 */ addiu $sp, $sp, -0x78 /* CCB818 80240508 AFBF0064 */ sw $ra, 0x64($sp) /* CCB81C 8024050C AFB00060 */ sw $s0, 0x60($sp) diff --git a/ver/us/asm/nonmatchings/world/area_hos/hos_00/A0C4B0/func_802407C0_A0C4B0.s b/ver/us/asm/nonmatchings/world/area_hos/hos_00/A0C4B0/func_802407C0_A0C4B0.s deleted file mode 100644 index 376707d277..0000000000 --- a/ver/us/asm/nonmatchings/world/area_hos/hos_00/A0C4B0/func_802407C0_A0C4B0.s +++ /dev/null @@ -1,16 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_802407C0_A0C4B0 -/* A0C4B0 802407C0 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* A0C4B4 802407C4 AFBF0010 */ sw $ra, 0x10($sp) -/* A0C4B8 802407C8 8C82000C */ lw $v0, 0xc($a0) -/* A0C4BC 802407CC 0C0B1EAF */ jal evt_get_variable -/* A0C4C0 802407D0 8C450000 */ lw $a1, ($v0) -/* A0C4C4 802407D4 8FBF0010 */ lw $ra, 0x10($sp) -/* A0C4C8 802407D8 3C018011 */ lui $at, %hi(gPlayerData+0x12) -/* A0C4CC 802407DC A022F2A2 */ sb $v0, %lo(gPlayerData+0x12)($at) -/* A0C4D0 802407E0 24020002 */ addiu $v0, $zero, 2 -/* A0C4D4 802407E4 03E00008 */ jr $ra -/* A0C4D8 802407E8 27BD0018 */ addiu $sp, $sp, 0x18 -/* A0C4DC 802407EC 00000000 */ nop diff --git a/ver/us/asm/nonmatchings/world/area_hos/hos_00/A0C4E0/func_8024091C_A0C60C.s b/ver/us/asm/nonmatchings/world/area_hos/hos_00/A0C4E0/func_8024091C_A0C60C.s deleted file mode 100644 index 1bf4ca1b16..0000000000 --- a/ver/us/asm/nonmatchings/world/area_hos/hos_00/A0C4E0/func_8024091C_A0C60C.s +++ /dev/null @@ -1,34 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_8024091C_A0C60C -/* A0C60C 8024091C 27BDFFD8 */ addiu $sp, $sp, -0x28 -/* A0C610 80240920 AFB10014 */ sw $s1, 0x14($sp) -/* A0C614 80240924 0080882D */ daddu $s1, $a0, $zero -/* A0C618 80240928 AFBF0018 */ sw $ra, 0x18($sp) -/* A0C61C 8024092C AFB00010 */ sw $s0, 0x10($sp) -/* A0C620 80240930 F7B40020 */ sdc1 $f20, 0x20($sp) -/* A0C624 80240934 8E30000C */ lw $s0, 0xc($s1) -/* A0C628 80240938 8E050000 */ lw $a1, ($s0) -/* A0C62C 8024093C 0C0B210B */ jal evt_get_float_variable -/* A0C630 80240940 26100004 */ addiu $s0, $s0, 4 -/* A0C634 80240944 0220202D */ daddu $a0, $s1, $zero -/* A0C638 80240948 8E050000 */ lw $a1, ($s0) -/* A0C63C 8024094C 0C0B210B */ jal evt_get_float_variable -/* A0C640 80240950 46000506 */ mov.s $f20, $f0 -/* A0C644 80240954 0C00A8BB */ jal sin_deg -/* A0C648 80240958 46000306 */ mov.s $f12, $f0 -/* A0C64C 8024095C 4600A502 */ mul.s $f20, $f20, $f0 -/* A0C650 80240960 00000000 */ nop -/* A0C654 80240964 26100004 */ addiu $s0, $s0, 4 -/* A0C658 80240968 8E050000 */ lw $a1, ($s0) -/* A0C65C 8024096C 4406A000 */ mfc1 $a2, $f20 -/* A0C660 80240970 0C0B2190 */ jal evt_set_float_variable -/* A0C664 80240974 0220202D */ daddu $a0, $s1, $zero -/* A0C668 80240978 8FBF0018 */ lw $ra, 0x18($sp) -/* A0C66C 8024097C 8FB10014 */ lw $s1, 0x14($sp) -/* A0C670 80240980 8FB00010 */ lw $s0, 0x10($sp) -/* A0C674 80240984 D7B40020 */ ldc1 $f20, 0x20($sp) -/* A0C678 80240988 24020002 */ addiu $v0, $zero, 2 -/* A0C67C 8024098C 03E00008 */ jr $ra -/* A0C680 80240990 27BD0028 */ addiu $sp, $sp, 0x28 diff --git a/ver/us/asm/nonmatchings/world/area_hos/hos_00/A0C4E0/func_80240994_A0C684.s b/ver/us/asm/nonmatchings/world/area_hos/hos_00/A0C4E0/func_80240994_A0C684.s deleted file mode 100644 index b666068c5b..0000000000 --- a/ver/us/asm/nonmatchings/world/area_hos/hos_00/A0C4E0/func_80240994_A0C684.s +++ /dev/null @@ -1,52 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_80240994_A0C684 -/* A0C684 80240994 27BDFFD8 */ addiu $sp, $sp, -0x28 -/* A0C688 80240998 2404FFFC */ addiu $a0, $zero, -4 -/* A0C68C 8024099C AFBF0020 */ sw $ra, 0x20($sp) -/* A0C690 802409A0 AFB3001C */ sw $s3, 0x1c($sp) -/* A0C694 802409A4 AFB20018 */ sw $s2, 0x18($sp) -/* A0C698 802409A8 AFB10014 */ sw $s1, 0x14($sp) -/* A0C69C 802409AC 0C00EABB */ jal get_npc_unsafe -/* A0C6A0 802409B0 AFB00010 */ sw $s0, 0x10($sp) -/* A0C6A4 802409B4 0000202D */ daddu $a0, $zero, $zero -/* A0C6A8 802409B8 0C00EABB */ jal get_npc_unsafe -/* A0C6AC 802409BC 0040882D */ daddu $s1, $v0, $zero -/* A0C6B0 802409C0 0040802D */ daddu $s0, $v0, $zero -/* A0C6B4 802409C4 C62C0038 */ lwc1 $f12, 0x38($s1) -/* A0C6B8 802409C8 C62E0040 */ lwc1 $f14, 0x40($s1) -/* A0C6BC 802409CC 8E060038 */ lw $a2, 0x38($s0) -/* A0C6C0 802409D0 0C00A720 */ jal atan2 -/* A0C6C4 802409D4 8E070040 */ lw $a3, 0x40($s0) -/* A0C6C8 802409D8 E620000C */ swc1 $f0, 0xc($s1) -/* A0C6CC 802409DC 3C118011 */ lui $s1, %hi(gPlayerStatus) -/* A0C6D0 802409E0 2631EFC8 */ addiu $s1, $s1, %lo(gPlayerStatus) -/* A0C6D4 802409E4 C62C0028 */ lwc1 $f12, 0x28($s1) -/* A0C6D8 802409E8 C62E0030 */ lwc1 $f14, 0x30($s1) -/* A0C6DC 802409EC 8E060038 */ lw $a2, 0x38($s0) -/* A0C6E0 802409F0 0C00A720 */ jal atan2 -/* A0C6E4 802409F4 8E070040 */ lw $a3, 0x40($s0) -/* A0C6E8 802409F8 3C138024 */ lui $s3, %hi(D_80242B9C_A0E88C) -/* A0C6EC 802409FC 26732B9C */ addiu $s3, $s3, %lo(D_80242B9C_A0E88C) -/* A0C6F0 80240A00 3C128024 */ lui $s2, %hi(D_80242BA0_A0E890) -/* A0C6F4 80240A04 26522BA0 */ addiu $s2, $s2, %lo(D_80242BA0_A0E890) -/* A0C6F8 80240A08 C66C0000 */ lwc1 $f12, ($s3) -/* A0C6FC 80240A0C C64E0000 */ lwc1 $f14, ($s2) -/* A0C700 80240A10 E6200080 */ swc1 $f0, 0x80($s1) -/* A0C704 80240A14 8E060038 */ lw $a2, 0x38($s0) -/* A0C708 80240A18 0C00A720 */ jal atan2 -/* A0C70C 80240A1C 8E070040 */ lw $a3, 0x40($s0) -/* A0C710 80240A20 C6020038 */ lwc1 $f2, 0x38($s0) -/* A0C714 80240A24 C6040040 */ lwc1 $f4, 0x40($s0) -/* A0C718 80240A28 E600000C */ swc1 $f0, 0xc($s0) -/* A0C71C 80240A2C E6620000 */ swc1 $f2, ($s3) -/* A0C720 80240A30 E6440000 */ swc1 $f4, ($s2) -/* A0C724 80240A34 8FBF0020 */ lw $ra, 0x20($sp) -/* A0C728 80240A38 8FB3001C */ lw $s3, 0x1c($sp) -/* A0C72C 80240A3C 8FB20018 */ lw $s2, 0x18($sp) -/* A0C730 80240A40 8FB10014 */ lw $s1, 0x14($sp) -/* A0C734 80240A44 8FB00010 */ lw $s0, 0x10($sp) -/* A0C738 80240A48 24020002 */ addiu $v0, $zero, 2 -/* A0C73C 80240A4C 03E00008 */ jr $ra -/* A0C740 80240A50 27BD0028 */ addiu $sp, $sp, 0x28 diff --git a/ver/us/asm/nonmatchings/world/area_hos/hos_00/A0C4E0/func_80240A54_A0C744.s b/ver/us/asm/nonmatchings/world/area_hos/hos_00/A0C4E0/func_80240A54_A0C744.s deleted file mode 100644 index 7a45d2b124..0000000000 --- a/ver/us/asm/nonmatchings/world/area_hos/hos_00/A0C4E0/func_80240A54_A0C744.s +++ /dev/null @@ -1,57 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_80240A54_A0C744 -/* A0C744 80240A54 27BDFFE0 */ addiu $sp, $sp, -0x20 -/* A0C748 80240A58 AFB10014 */ sw $s1, 0x14($sp) -/* A0C74C 80240A5C 0080882D */ daddu $s1, $a0, $zero -/* A0C750 80240A60 24040001 */ addiu $a0, $zero, 1 -/* A0C754 80240A64 AFBF0018 */ sw $ra, 0x18($sp) -/* A0C758 80240A68 0C00EABB */ jal get_npc_unsafe -/* A0C75C 80240A6C AFB00010 */ sw $s0, 0x10($sp) -/* A0C760 80240A70 0040802D */ daddu $s0, $v0, $zero -/* A0C764 80240A74 C602000C */ lwc1 $f2, 0xc($s0) -/* A0C768 80240A78 3C014334 */ lui $at, 0x4334 -/* A0C76C 80240A7C 44810000 */ mtc1 $at, $f0 -/* A0C770 80240A80 00000000 */ nop -/* A0C774 80240A84 4600103C */ c.lt.s $f2, $f0 -/* A0C778 80240A88 00000000 */ nop -/* A0C77C 80240A8C 45000006 */ bc1f .L80240AA8 -/* A0C780 80240A90 00000000 */ nop -/* A0C784 80240A94 C6000038 */ lwc1 $f0, 0x38($s0) -/* A0C788 80240A98 3C014220 */ lui $at, 0x4220 -/* A0C78C 80240A9C 44811000 */ mtc1 $at, $f2 -/* A0C790 80240AA0 080902AF */ j .L80240ABC -/* A0C794 80240AA4 46020001 */ sub.s $f0, $f0, $f2 -.L80240AA8: -/* A0C798 80240AA8 C6000038 */ lwc1 $f0, 0x38($s0) -/* A0C79C 80240AAC 3C014220 */ lui $at, 0x4220 -/* A0C7A0 80240AB0 44811000 */ mtc1 $at, $f2 -/* A0C7A4 80240AB4 00000000 */ nop -/* A0C7A8 80240AB8 46020000 */ add.s $f0, $f0, $f2 -.L80240ABC: -/* A0C7AC 80240ABC 3C014120 */ lui $at, 0x4120 -/* A0C7B0 80240AC0 44811000 */ mtc1 $at, $f2 -/* A0C7B4 80240AC4 4600010D */ trunc.w.s $f4, $f0 -/* A0C7B8 80240AC8 E6240084 */ swc1 $f4, 0x84($s1) -/* A0C7BC 80240ACC C600003C */ lwc1 $f0, 0x3c($s0) -/* A0C7C0 80240AD0 46020000 */ add.s $f0, $f0, $f2 -/* A0C7C4 80240AD4 4600010D */ trunc.w.s $f4, $f0 -/* A0C7C8 80240AD8 E6240088 */ swc1 $f4, 0x88($s1) -/* A0C7CC 80240ADC C6000040 */ lwc1 $f0, 0x40($s0) -/* A0C7D0 80240AE0 4600010D */ trunc.w.s $f4, $f0 -/* A0C7D4 80240AE4 E624008C */ swc1 $f4, 0x8c($s1) -/* A0C7D8 80240AE8 C62C009C */ lwc1 $f12, 0x9c($s1) -/* A0C7DC 80240AEC 46806320 */ cvt.s.w $f12, $f12 -/* A0C7E0 80240AF0 8E060038 */ lw $a2, 0x38($s0) -/* A0C7E4 80240AF4 8E070040 */ lw $a3, 0x40($s0) -/* A0C7E8 80240AF8 C62E00A4 */ lwc1 $f14, 0xa4($s1) -/* A0C7EC 80240AFC 0C00A720 */ jal atan2 -/* A0C7F0 80240B00 468073A0 */ cvt.s.w $f14, $f14 -/* A0C7F4 80240B04 E600000C */ swc1 $f0, 0xc($s0) -/* A0C7F8 80240B08 8FBF0018 */ lw $ra, 0x18($sp) -/* A0C7FC 80240B0C 8FB10014 */ lw $s1, 0x14($sp) -/* A0C800 80240B10 8FB00010 */ lw $s0, 0x10($sp) -/* A0C804 80240B14 24020002 */ addiu $v0, $zero, 2 -/* A0C808 80240B18 03E00008 */ jr $ra -/* A0C80C 80240B1C 27BD0020 */ addiu $sp, $sp, 0x20 diff --git a/ver/us/asm/nonmatchings/world/area_hos/hos_00/A0C4E0/func_80240B3C_A0C82C.s b/ver/us/asm/nonmatchings/world/area_hos/hos_00/A0C4E0/func_80240B3C_A0C82C.s deleted file mode 100644 index 83de5820a4..0000000000 --- a/ver/us/asm/nonmatchings/world/area_hos/hos_00/A0C4E0/func_80240B3C_A0C82C.s +++ /dev/null @@ -1,69 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_80240B3C_A0C82C -/* A0C82C 80240B3C 27BDFFC0 */ addiu $sp, $sp, -0x40 -/* A0C830 80240B40 F7B40020 */ sdc1 $f20, 0x20($sp) -/* A0C834 80240B44 3C01439B */ lui $at, 0x439b -/* A0C838 80240B48 4481A000 */ mtc1 $at, $f20 -/* A0C83C 80240B4C AFB00010 */ sw $s0, 0x10($sp) -/* A0C840 80240B50 0080802D */ daddu $s0, $a0, $zero -/* A0C844 80240B54 AFBF001C */ sw $ra, 0x1c($sp) -/* A0C848 80240B58 AFB20018 */ sw $s2, 0x18($sp) -/* A0C84C 80240B5C AFB10014 */ sw $s1, 0x14($sp) -/* A0C850 80240B60 F7BA0038 */ sdc1 $f26, 0x38($sp) -/* A0C854 80240B64 F7B80030 */ sdc1 $f24, 0x30($sp) -/* A0C858 80240B68 F7B60028 */ sdc1 $f22, 0x28($sp) -/* A0C85C 80240B6C 8E110084 */ lw $s1, 0x84($s0) -/* A0C860 80240B70 8E12008C */ lw $s2, 0x8c($s0) -/* A0C864 80240B74 3C0142C8 */ lui $at, 0x42c8 -/* A0C868 80240B78 4481C000 */ mtc1 $at, $f24 -/* A0C86C 80240B7C 0C00A8BB */ jal sin_deg -/* A0C870 80240B80 4600A306 */ mov.s $f12, $f20 -/* A0C874 80240B84 46180002 */ mul.s $f0, $f0, $f24 -/* A0C878 80240B88 00000000 */ nop -/* A0C87C 80240B8C 4491B000 */ mtc1 $s1, $f22 -/* A0C880 80240B90 00000000 */ nop -/* A0C884 80240B94 4680B5A0 */ cvt.s.w $f22, $f22 -/* A0C888 80240B98 4600B000 */ add.s $f0, $f22, $f0 -/* A0C88C 80240B9C 4600008D */ trunc.w.s $f2, $f0 -/* A0C890 80240BA0 E6020084 */ swc1 $f2, 0x84($s0) -/* A0C894 80240BA4 0C00A8D4 */ jal cos_deg -/* A0C898 80240BA8 4600A306 */ mov.s $f12, $f20 -/* A0C89C 80240BAC 46180002 */ mul.s $f0, $f0, $f24 -/* A0C8A0 80240BB0 00000000 */ nop -/* A0C8A4 80240BB4 4492A000 */ mtc1 $s2, $f20 -/* A0C8A8 80240BB8 00000000 */ nop -/* A0C8AC 80240BBC 4680A520 */ cvt.s.w $f20, $f20 -/* A0C8B0 80240BC0 3C014302 */ lui $at, 0x4302 -/* A0C8B4 80240BC4 4481D000 */ mtc1 $at, $f26 -/* A0C8B8 80240BC8 4600A001 */ sub.s $f0, $f20, $f0 -/* A0C8BC 80240BCC 4600008D */ trunc.w.s $f2, $f0 -/* A0C8C0 80240BD0 E6020088 */ swc1 $f2, 0x88($s0) -/* A0C8C4 80240BD4 0C00A8BB */ jal sin_deg -/* A0C8C8 80240BD8 4600D306 */ mov.s $f12, $f26 -/* A0C8CC 80240BDC 46180002 */ mul.s $f0, $f0, $f24 -/* A0C8D0 80240BE0 00000000 */ nop -/* A0C8D4 80240BE4 4600B580 */ add.s $f22, $f22, $f0 -/* A0C8D8 80240BE8 4600B08D */ trunc.w.s $f2, $f22 -/* A0C8DC 80240BEC E602008C */ swc1 $f2, 0x8c($s0) -/* A0C8E0 80240BF0 0C00A8D4 */ jal cos_deg -/* A0C8E4 80240BF4 4600D306 */ mov.s $f12, $f26 -/* A0C8E8 80240BF8 46180002 */ mul.s $f0, $f0, $f24 -/* A0C8EC 80240BFC 00000000 */ nop -/* A0C8F0 80240C00 4600A501 */ sub.s $f20, $f20, $f0 -/* A0C8F4 80240C04 4600A08D */ trunc.w.s $f2, $f20 -/* A0C8F8 80240C08 E6020090 */ swc1 $f2, 0x90($s0) -/* A0C8FC 80240C0C 8FBF001C */ lw $ra, 0x1c($sp) -/* A0C900 80240C10 8FB20018 */ lw $s2, 0x18($sp) -/* A0C904 80240C14 8FB10014 */ lw $s1, 0x14($sp) -/* A0C908 80240C18 8FB00010 */ lw $s0, 0x10($sp) -/* A0C90C 80240C1C D7BA0038 */ ldc1 $f26, 0x38($sp) -/* A0C910 80240C20 D7B80030 */ ldc1 $f24, 0x30($sp) -/* A0C914 80240C24 D7B60028 */ ldc1 $f22, 0x28($sp) -/* A0C918 80240C28 D7B40020 */ ldc1 $f20, 0x20($sp) -/* A0C91C 80240C2C 24020002 */ addiu $v0, $zero, 2 -/* A0C920 80240C30 03E00008 */ jr $ra -/* A0C924 80240C34 27BD0040 */ addiu $sp, $sp, 0x40 -/* A0C928 80240C38 00000000 */ nop -/* A0C92C 80240C3C 00000000 */ nop diff --git a/ver/us/asm/nonmatchings/world/area_hos/hos_00/A0C930/func_80240C40_A0C930.s b/ver/us/asm/nonmatchings/world/area_hos/hos_00/A0C930/func_80240C40_A0C930.s deleted file mode 100644 index 773cad65a8..0000000000 --- a/ver/us/asm/nonmatchings/world/area_hos/hos_00/A0C930/func_80240C40_A0C930.s +++ /dev/null @@ -1,58 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_80240C40_A0C930 -/* A0C930 80240C40 27BDFFE0 */ addiu $sp, $sp, -0x20 -/* A0C934 80240C44 240201F4 */ addiu $v0, $zero, 0x1f4 -/* A0C938 80240C48 0000202D */ daddu $a0, $zero, $zero -/* A0C93C 80240C4C 0000282D */ daddu $a1, $zero, $zero -/* A0C940 80240C50 3C018011 */ lui $at, %hi(gPlayerStatus+0x28) -/* A0C944 80240C54 C420EFF0 */ lwc1 $f0, %lo(gPlayerStatus+0x28)($at) -/* A0C948 80240C58 3C014348 */ lui $at, 0x4348 -/* A0C94C 80240C5C 44811000 */ mtc1 $at, $f2 -/* A0C950 80240C60 3C064358 */ lui $a2, 0x4358 -/* A0C954 80240C64 46020001 */ sub.s $f0, $f0, $f2 -/* A0C958 80240C68 AFBF0018 */ sw $ra, 0x18($sp) -/* A0C95C 80240C6C 4600010D */ trunc.w.s $f4, $f0 -/* A0C960 80240C70 44072000 */ mfc1 $a3, $f4 -/* A0C964 80240C74 0C00A8ED */ jal update_lerp -/* A0C968 80240C78 AFA20010 */ sw $v0, 0x10($sp) -/* A0C96C 80240C7C 4600010D */ trunc.w.s $f4, $f0 -/* A0C970 80240C80 44082000 */ mfc1 $t0, $f4 -/* A0C974 80240C84 00000000 */ nop -/* A0C978 80240C88 05020001 */ bltzl $t0, .L80240C90 -/* A0C97C 80240C8C 0000402D */ daddu $t0, $zero, $zero -.L80240C90: -/* A0C980 80240C90 290200D9 */ slti $v0, $t0, 0xd9 -/* A0C984 80240C94 50400001 */ beql $v0, $zero, .L80240C9C -/* A0C988 80240C98 240800D8 */ addiu $t0, $zero, 0xd8 -.L80240C9C: -/* A0C98C 80240C9C 3C05E300 */ lui $a1, 0xe300 -/* A0C990 80240CA0 34A50A01 */ ori $a1, $a1, 0xa01 -/* A0C994 80240CA4 3C07FCFF */ lui $a3, 0xfcff -/* A0C998 80240CA8 34E7C7FF */ ori $a3, $a3, 0xc7ff -/* A0C99C 80240CAC 3C06FF8E */ lui $a2, 0xff8e -/* A0C9A0 80240CB0 3C04800A */ lui $a0, %hi(gMasterGfxPos) -/* A0C9A4 80240CB4 2484A66C */ addiu $a0, $a0, %lo(gMasterGfxPos) -/* A0C9A8 80240CB8 8C820000 */ lw $v0, ($a0) -/* A0C9AC 80240CBC 34C67F3F */ ori $a2, $a2, 0x7f3f -/* A0C9B0 80240CC0 0040182D */ daddu $v1, $v0, $zero -/* A0C9B4 80240CC4 24420008 */ addiu $v0, $v0, 8 -/* A0C9B8 80240CC8 AC820000 */ sw $v0, ($a0) -/* A0C9BC 80240CCC AC650000 */ sw $a1, ($v1) -/* A0C9C0 80240CD0 AC600004 */ sw $zero, 4($v1) -/* A0C9C4 80240CD4 24430008 */ addiu $v1, $v0, 8 -/* A0C9C8 80240CD8 AC830000 */ sw $v1, ($a0) -/* A0C9CC 80240CDC 24430010 */ addiu $v1, $v0, 0x10 -/* A0C9D0 80240CE0 AC470000 */ sw $a3, ($v0) -/* A0C9D4 80240CE4 AC460004 */ sw $a2, 4($v0) -/* A0C9D8 80240CE8 AC830000 */ sw $v1, ($a0) -/* A0C9DC 80240CEC 3C03FA00 */ lui $v1, 0xfa00 -/* A0C9E0 80240CF0 AC430008 */ sw $v1, 8($v0) -/* A0C9E4 80240CF4 310300FF */ andi $v1, $t0, 0xff -/* A0C9E8 80240CF8 AC43000C */ sw $v1, 0xc($v0) -/* A0C9EC 80240CFC 8FBF0018 */ lw $ra, 0x18($sp) -/* A0C9F0 80240D00 03E00008 */ jr $ra -/* A0C9F4 80240D04 27BD0020 */ addiu $sp, $sp, 0x20 -/* A0C9F8 80240D08 00000000 */ nop -/* A0C9FC 80240D0C 00000000 */ nop diff --git a/ver/us/asm/nonmatchings/world/area_hos/hos_01/A11020/func_80240CDC_A1155C.s b/ver/us/asm/nonmatchings/world/area_hos/hos_01/A11020/func_80240CDC_A1155C.s deleted file mode 100644 index a123eaac6f..0000000000 --- a/ver/us/asm/nonmatchings/world/area_hos/hos_01/A11020/func_80240CDC_A1155C.s +++ /dev/null @@ -1,65 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_80240CDC_A1155C -/* A1155C 80240CDC 27BDFFD0 */ addiu $sp, $sp, -0x30 -/* A11560 80240CE0 AFB1001C */ sw $s1, 0x1c($sp) -/* A11564 80240CE4 0080882D */ daddu $s1, $a0, $zero -/* A11568 80240CE8 AFBF002C */ sw $ra, 0x2c($sp) -/* A1156C 80240CEC AFB40028 */ sw $s4, 0x28($sp) -/* A11570 80240CF0 AFB30024 */ sw $s3, 0x24($sp) -/* A11574 80240CF4 AFB20020 */ sw $s2, 0x20($sp) -/* A11578 80240CF8 AFB00018 */ sw $s0, 0x18($sp) -/* A1157C 80240CFC 8E30000C */ lw $s0, 0xc($s1) -/* A11580 80240D00 8E050000 */ lw $a1, ($s0) -/* A11584 80240D04 0C0B1EAF */ jal evt_get_variable -/* A11588 80240D08 26100004 */ addiu $s0, $s0, 4 -/* A1158C 80240D0C 8E050000 */ lw $a1, ($s0) -/* A11590 80240D10 26100004 */ addiu $s0, $s0, 4 -/* A11594 80240D14 0220202D */ daddu $a0, $s1, $zero -/* A11598 80240D18 0C0B1EAF */ jal evt_get_variable -/* A1159C 80240D1C 0040A02D */ daddu $s4, $v0, $zero -/* A115A0 80240D20 8E050000 */ lw $a1, ($s0) -/* A115A4 80240D24 26100004 */ addiu $s0, $s0, 4 -/* A115A8 80240D28 0220202D */ daddu $a0, $s1, $zero -/* A115AC 80240D2C 0C0B1EAF */ jal evt_get_variable -/* A115B0 80240D30 0040982D */ daddu $s3, $v0, $zero -/* A115B4 80240D34 8E050000 */ lw $a1, ($s0) -/* A115B8 80240D38 26100004 */ addiu $s0, $s0, 4 -/* A115BC 80240D3C 0220202D */ daddu $a0, $s1, $zero -/* A115C0 80240D40 0C0B1EAF */ jal evt_get_variable -/* A115C4 80240D44 0040902D */ daddu $s2, $v0, $zero -/* A115C8 80240D48 0220202D */ daddu $a0, $s1, $zero -/* A115CC 80240D4C 8E050000 */ lw $a1, ($s0) -/* A115D0 80240D50 0C0B1EAF */ jal evt_get_variable -/* A115D4 80240D54 0040802D */ daddu $s0, $v0, $zero -/* A115D8 80240D58 0280202D */ daddu $a0, $s4, $zero -/* A115DC 80240D5C 44931000 */ mtc1 $s3, $f2 -/* A115E0 80240D60 00000000 */ nop -/* A115E4 80240D64 468010A0 */ cvt.s.w $f2, $f2 -/* A115E8 80240D68 44051000 */ mfc1 $a1, $f2 -/* A115EC 80240D6C 44921000 */ mtc1 $s2, $f2 -/* A115F0 80240D70 00000000 */ nop -/* A115F4 80240D74 468010A0 */ cvt.s.w $f2, $f2 -/* A115F8 80240D78 44061000 */ mfc1 $a2, $f2 -/* A115FC 80240D7C 44901000 */ mtc1 $s0, $f2 -/* A11600 80240D80 00000000 */ nop -/* A11604 80240D84 468010A0 */ cvt.s.w $f2, $f2 -/* A11608 80240D88 44071000 */ mfc1 $a3, $f2 -/* A1160C 80240D8C 44820000 */ mtc1 $v0, $f0 -/* A11610 80240D90 00000000 */ nop -/* A11614 80240D94 46800020 */ cvt.s.w $f0, $f0 -/* A11618 80240D98 0C01BFBC */ jal fx_sparkles -/* A1161C 80240D9C E7A00010 */ swc1 $f0, 0x10($sp) -/* A11620 80240DA0 8FBF002C */ lw $ra, 0x2c($sp) -/* A11624 80240DA4 8FB40028 */ lw $s4, 0x28($sp) -/* A11628 80240DA8 8FB30024 */ lw $s3, 0x24($sp) -/* A1162C 80240DAC 8FB20020 */ lw $s2, 0x20($sp) -/* A11630 80240DB0 8FB1001C */ lw $s1, 0x1c($sp) -/* A11634 80240DB4 8FB00018 */ lw $s0, 0x18($sp) -/* A11638 80240DB8 24020002 */ addiu $v0, $zero, 2 -/* A1163C 80240DBC 03E00008 */ jr $ra -/* A11640 80240DC0 27BD0030 */ addiu $sp, $sp, 0x30 -/* A11644 80240DC4 00000000 */ nop -/* A11648 80240DC8 00000000 */ nop -/* A1164C 80240DCC 00000000 */ nop diff --git a/ver/us/asm/nonmatchings/world/area_hos/hos_05/A2AAC0/func_802428C8_A2CB08.s b/ver/us/asm/nonmatchings/world/area_hos/hos_05/A2AAC0/func_802428C8_A2CB08.s index 6dc5987686..a7b8bd74ca 100644 --- a/ver/us/asm/nonmatchings/world/area_hos/hos_05/A2AAC0/func_802428C8_A2CB08.s +++ b/ver/us/asm/nonmatchings/world/area_hos/hos_05/A2AAC0/func_802428C8_A2CB08.s @@ -166,8 +166,8 @@ glabel func_802428C8_A2CB08 /* A2CD04 80242AC4 08090B41 */ j .L80242D04 /* A2CD08 80242AC8 4600A521 */ cvt.d.s $f20, $f20 .L80242ACC_A2CD0C: -/* A2CD0C 80242ACC 3C108025 */ lui $s0, %hi(D_8024F470) -/* A2CD10 80242AD0 2610F470 */ addiu $s0, $s0, %lo(D_8024F470) +/* A2CD0C 80242ACC 3C108025 */ lui $s0, %hi(D_8024F470_hos_bss) +/* A2CD10 80242AD0 2610F470 */ addiu $s0, $s0, %lo(D_8024F470_hos_bss) /* A2CD14 80242AD4 8E22000C */ lw $v0, 0xc($s1) /* A2CD18 80242AD8 2415001E */ addiu $s5, $zero, 0x1e /* A2CD1C 80242ADC 8C420014 */ lw $v0, 0x14($v0) diff --git a/ver/us/asm/nonmatchings/world/area_hos/hos_20/A45C40/func_80240310_A45C40.s b/ver/us/asm/nonmatchings/world/area_hos/hos_20/A45C40/func_80240310_A45C40.s deleted file mode 100644 index dadd24250d..0000000000 --- a/ver/us/asm/nonmatchings/world/area_hos/hos_20/A45C40/func_80240310_A45C40.s +++ /dev/null @@ -1,26 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_80240310_A45C40 -/* A45C40 80240310 3C038007 */ lui $v1, %hi(gGameStatusPtr) -/* A45C44 80240314 2463419C */ addiu $v1, $v1, %lo(gGameStatusPtr) -/* A45C48 80240318 8C620000 */ lw $v0, ($v1) -/* A45C4C 8024031C AC8000A4 */ sw $zero, 0xa4($a0) -/* A45C50 80240320 8C420010 */ lw $v0, 0x10($v0) -/* A45C54 80240324 30428000 */ andi $v0, $v0, 0x8000 -/* A45C58 80240328 10400002 */ beqz $v0, .L80240334 -/* A45C5C 8024032C 24020001 */ addiu $v0, $zero, 1 -/* A45C60 80240330 AC8200A4 */ sw $v0, 0xa4($a0) -.L80240334: -/* A45C64 80240334 8C620000 */ lw $v0, ($v1) -/* A45C68 80240338 8C420010 */ lw $v0, 0x10($v0) -/* A45C6C 8024033C 30424000 */ andi $v0, $v0, 0x4000 -/* A45C70 80240340 10400002 */ beqz $v0, .L8024034C -/* A45C74 80240344 24020001 */ addiu $v0, $zero, 1 -/* A45C78 80240348 AC8200A4 */ sw $v0, 0xa4($a0) -.L8024034C: -/* A45C7C 8024034C 03E00008 */ jr $ra -/* A45C80 80240350 24020002 */ addiu $v0, $zero, 2 -/* A45C84 80240354 00000000 */ nop -/* A45C88 80240358 00000000 */ nop -/* A45C8C 8024035C 00000000 */ nop diff --git a/ver/us/symbol_addrs.txt b/ver/us/symbol_addrs.txt index b38fb70de0..8259d933fa 100644 --- a/ver/us/symbol_addrs.txt +++ b/ver/us/symbol_addrs.txt @@ -4891,9 +4891,9 @@ bModelSpecialDls = 0x80152010; // rom:0xE8710 update_scripts = 0x802C3D74; // type:func rom:0xE8724 wCustomModelGfxBuilders = 0x80152090; // type:data rom:0xE8790 bCustomModelGfxBuilders = 0x80152110; // type:data rom:0xE8810 -D_80152190 = 0x80152190; // type:data rom:0xE8890 +wModelLocalVtxBuffers = 0x80152190; // type:data rom:0xE8890 func_802C3EE4 = 0x802C3EE4; // type:func rom:0xE8894 -D_801521D0 = 0x801521D0; // type:data rom:0xE88D0 +bModelLocalVtxBuffers = 0x801521D0; // type:data rom:0xE88D0 kill_script = 0x802C3F3C; // type:func rom:0xE88EC gCurrentModelLocalVtxBuffers = 0x80152210; // type:data rom:0xE8910 D_80152214 = 0x80152214; // type:data rom:0xE8914 @@ -7235,7 +7235,7 @@ bPlayerActorBlueprint = 0x802834D8; // type:data rom:0x1B1DB8 bMarioParts = 0x80283500; // type:data rom:0x1B1DE0 btl_actorHomePositions = 0x80283524; // type:data rom:0x1B1E04 D_8028358C = 0x8028358C; // type:data rom:0x1B1E6C -D_802835D0 = 0x802835D0; // type:data rom:0x1B1EB0 +bMsgHeights = 0x802835D0; // type:data rom:0x1B1EB0 D_802835D4 = 0x802835D4; // type:data rom:0x1B1EB4 D_802835D8 = 0x802835D8; // type:data rom:0x1B1EB8 D_802835DC = 0x802835DC; // type:data rom:0x1B1EBC @@ -26805,8 +26805,6 @@ gPauseMapCursorCurrentOptionCopy = 0x80270720; // type:data gPauseMapSpacesInSnapRange = 0x80270724; // type:data D_80280000 = 0x80280000; // type:data D_80281104 = 0x80281104; // type:data -D_80282EE9 = 0x80282EE9; // type:data -D_80282EEA = 0x80282EEA; // type:data bMarioHideAnims = 0x80283370; // type:data D_80283770 = 0x80283770; // type:data ExecutePlayerAction = 0x8028505C; // diff --git a/ver/us/undefined_syms.txt b/ver/us/undefined_syms.txt index 54889a48b1..269e982641 100644 --- a/ver/us/undefined_syms.txt +++ b/ver/us/undefined_syms.txt @@ -315,6 +315,8 @@ D_80079540 = 0x80079540; // TODO below +D_8024F470_hos_bss = 0x8024F470; // ??? is this real + // misc unsorted osTvType = 0x80000300; osRomBase = 0x80000308; @@ -773,8 +775,6 @@ D_802704D2 = 0x802704D2; D_802705C4 = 0x802705C4; D_802705D0 = 0x802705D0; D_80270634 = 0x80270634; -D_80282EE9 = 0x80282EE9; -D_80282EEA = 0x80282EEA; bMarioHideAnims = 0x80283370; D_8029DA30 = 0x8029DA30; D_8029DA33 = 0x8029DA33;