diff --git a/include/camera.h b/include/camera.h new file mode 100644 index 0000000000..77e4cd7eb9 --- /dev/null +++ b/include/camera.h @@ -0,0 +1,6 @@ +#ifndef _CAMERA_H_ +#define _CAMERA_H_ + +extern f32 D_8009A5EC; + +#endif diff --git a/include/common_structs.h b/include/common_structs.h index a0b8842b7b..186f31900b 100644 --- a/include/common_structs.h +++ b/include/common_structs.h @@ -496,14 +496,27 @@ typedef struct Collider { /* 0x0C */ struct ColliderTriangle* triangleTable; /* 0x10 */ struct ColliderBoundingBox* aabb; /* 0x14 */ char unk_14[4]; - /* 0x18 */ f32* vertexTable[3]; + /* 0x18 */ f32* vertexTable; // 3? } Collider; // size = 0x1C +typedef struct CameraInitData { + /* 0x00 */ s16 flags; + /* 0x02 */ s8 type; + /* 0x03 */ char unk_03; + /* 0x04 */ s16 viewWidth; + /* 0x06 */ s16 viewHeight; + /* 0x08 */ s16 viewStartX; + /* 0x0A */ s16 viewStartY; + /* 0x0C */ s16 nearClip; + /* 0x0E */ s16 farClip; + /* 0x10 */ s16 vfov; +} CameraInitData; // size = 0x12; + typedef struct Camera { /* 0x000 */ s16 flags; /* 0x002 */ s16 moveFlags; /* 0x004 */ s16 mode; - /* 0x006 */ u16 unk_06; + /* 0x006 */ s16 unk_06; /* 0x008 */ u16 unk_08; /* 0x00A */ s16 viewportW; /* 0x00C */ s16 viewportH; @@ -525,7 +538,7 @@ typedef struct Camera { /* 0x032 */ s16 targetScreenCoords[3]; /* 0x038 */ s16 perspNorm; /* 0x03A */ char unk_3A[2]; - /* 0x03C */ f32 lookAt_eye[3]; + /* 0x03C */ Vec3f lookAt_eye; /* 0x048 */ Vec3f lookAt_obj; /* 0x054 */ f32 unk_54; /* 0x058 */ f32 unk_58; @@ -786,35 +799,70 @@ typedef struct CollisionData { /* 0x0E */ char unk_0E[2]; } CollisionData; // size = 0x10 +typedef struct ModelGroupData { + /* 0x00 */ UNK_PTR transformMatrix; + /* 0x04 */ UNK_PTR lightingGroup; + /* 0x08 */ s32 numLights; + /* 0x0C */ s32 numChildren; + /* 0x10 */ struct ModelNode** childList; +} ModelGroupData; // size = 0x14 + +typedef struct ModelDisplayData { + /* 0x0 */ Gfx* displayList; + /* 0x4 */ char unk_00[0x4]; +} ModelDisplayData; // size = 0x8 + +typedef struct ModelNodeProperty { + /* 0x0 */ s32 key; + /* 0x4 */ s32 dataType; + /* 0x8 */ s32 data; +} ModelNodeProperty; // size = 0x8; + typedef struct ModelNode { /* 0x00 */ s32 type; /* 2 = model */ - /* 0x04 */ UNK_PTR displayList; + /* 0x04 */ ModelDisplayData* displayData; /* 0x08 */ s32 numProperties; - /* 0x0C */ UNK_PTR propertyList; + /* 0x0C */ ModelNodeProperty* propertyList; /* 0x10 */ struct ModelGroupData* groupData; } ModelNode; // size = 0x14 typedef struct Model { /* 0x00 */ u16 flags; /* 0x02 */ s16 modelID; - /* 0x04 */ char unk_04[4]; - /* 0x08 */ struct ModelNode** modelNode; - /* 0x0C */ struct ModelGroupData* groupData; + /* 0x04 */ Matrix4s* currentMatrix; + /* 0x08 */ ModelNode* modelNode; + /* 0x0C */ ModelGroupData* groupData; /* 0x10 */ s32* currentSpecialMatrix; /* 0x14 */ char unk_14[4]; - /* 0x18 */ struct Matrix4s specialMatrix; + /* 0x18 */ Matrix4s specialMatrix; /* 0x58 */ Matrix4f transformMatrix; - /* 0x98 */ f32 center[3]; + /* 0x98 */ Vec3f center; /* 0xA4 */ u8 texPannerID; /* 0xA5 */ u8 specialDisplayListID; - /* 0xA6 */ u8 renderMode; + /* 0xA6 */ s8 renderMode; /* 0xA7 */ char unk_A7; /* 0xA8 */ u8 textureID; /* 0xA9 */ u8 unk_A9; /* 0xAA */ char unk_AA[6]; } Model; // size = 0xB0 +typedef struct ModelTransformGroup { + /* 0x00 */ u16 flags; + /* 0x02 */ s16 groupModelID; + /* 0x04 */ Matrix4s* matrixRDP_N; + /* 0x08 */ ModelNode* modelNode; + /* 0x0C */ Matrix4s* transformMtx; + /* 0x10 */ Matrix4f matrixA; + /* 0x50 */ Matrix4f matrixB; + /* 0x90 */ Vec3f center; + /* 0x9C */ u8 minChildModelIndex; + /* 0x9D */ u8 maxChildModelIndex; + /* 0x9E */ u8 renderMode; + /* 0x9F */ s8 matrixMode; +} ModelTransformGroup; // size = 0xA0 + typedef Model* ModelList[MAX_MODELS]; +typedef ModelTransformGroup* ModelTransformGroupList[MAX_MODEL_TRANSFORM_GROUPS]; typedef struct AnimatedMesh { /* 0x000 */ s32 flags; @@ -823,7 +871,7 @@ typedef struct AnimatedMesh { /* 0x008 */ u32* animation1; /* 0x00C */ u32* animation2; /* 0x010 */ char unk_10[136]; - /* 0x098 */ struct Matrix4s mtx; + /* 0x098 */ Matrix4s mtx; /* 0x0D8 */ char unk_D8[500]; /* 0x2CC */ s32 time; /* 0x2D0 */ char unk_2D0[4]; @@ -1145,17 +1193,7 @@ typedef struct GameStatus { /* 0x16C */ char unk_16C[12]; } GameStatus; // size = 0x178 -/* -still; -walk; -jump; -fall; -fly; -idle; -run; -talk; -hurt; -*/ +// PartnerAnims typedef struct PartnerAnimations { /* 0x00 */ UNK_PTR anims[9]; } PartnerAnimations; // size = 0x24 @@ -1169,9 +1207,9 @@ typedef struct Shadow { /* 0x08 */ s16 entityModelID; /* 0x0A */ s16 vertexSegment; /* 0x0C */ Vtx_tn** vertexArray; - /* 0x10 */ struct Vec3f position; - /* 0x1C */ struct Vec3f scale; - /* 0x28 */ struct Vec3f rotation; + /* 0x10 */ Vec3f position; + /* 0x1C */ Vec3f scale; + /* 0x28 */ Vec3f rotation; /* 0x34 */ char unk_34[0x4]; /* 0x38 */ Matrix4s transformMatrix; } Shadow; // size = 0x78 @@ -1464,7 +1502,7 @@ typedef struct AnimatedModel { /* 0x04 */ Vec3f pos; /* 0x10 */ Vec3f rot; /* 0x1C */ Vec3f scale; - /* 0x28 */ struct Matrix4s* mtx; + /* 0x28 */ Matrix4s* mtx; /* 0x2C */ char unk_2C[60]; /* 0x68 */ u32 currentAnimData; /* 0x6C */ char unk_6C[4]; @@ -1657,14 +1695,6 @@ typedef struct BackgroundHeader { /* 0x0E */ u16 height; } BackgroundHeader; // size = 0x10 -typedef struct ModelGroupData { - /* 0x00 */ UNK_PTR transformMatrix; - /* 0x04 */ UNK_PTR lightingGroup; - /* 0x08 */ s32 numLights; - /* 0x0C */ s32 numChildren; - /* 0x10 */ struct ModelNode** childList; -} ModelGroupData; // size = 0x14 - typedef struct FontData { /* 0x00 */ char unk_00[24]; } FontData; // size = 0x18 diff --git a/include/enums.h b/include/enums.h index 50c2612efe..e6ebffe44e 100644 --- a/include/enums.h +++ b/include/enums.h @@ -1641,4 +1641,16 @@ enum ActorEventFlags { EVENT_FLAG_POWER_BOUNCE = 0x00100000, ///< Actor listens for Power Bounce events. }; +enum PartnerAnims { + PARTNER_ANIM_STILL, + PARTNER_ANIM_WALK, + PARTNER_ANIM_JUMP, + PARTNER_ANIM_FALL, + PARTNER_ANIM_FLY, + PARTNER_ANIM_IDLE, + PARTNER_ANIM_RUN, + PARTNER_ANIM_TALK, + PARTNER_ANIM_HURT, +}; + #endif diff --git a/include/functions.h b/include/functions.h index e2ca6d4180..29759f0ddf 100644 --- a/include/functions.h +++ b/include/functions.h @@ -110,6 +110,7 @@ void parent_collider_to_model(s32 colliderID, s16 modelIndex); void clone_model(u16 srcModelID, u16 newModelID); Model* get_model_from_list_index(s32 listIndex); s32 get_model_list_index_from_tree_index(s32 treeIndex); +s32 func_8011B090(s32); void get_model_center_and_size(u16 modelID, f32* centerX, f32* centerY, f32* centerZ, f32* sizeX, f32* sizeY, f32* sizeZ); s32 collision_main_above(void); @@ -122,22 +123,11 @@ s32 disable_player_input(void); void func_80027088(s32); void set_time_freeze_mode(s32); +s32 get_map_IDs_by_name(const char* mapName, s16* areaID, s16* mapID); + void get_dpad_input_radial(f32* angle, f32* magnitude); void transform_point(Matrix4f mtx, f32 inX, f32 inY, f32 inZ, f32 inS, f32* outX, f32* outY, f32* outZ, f32* outS); -void func_8006F8F0(f32, f32, f32); -void func_8006FEF0(s32, f32, f32, f32, f32); -void func_80070190(s32, f32, f32, f32, s32, f32, s32, s32); -void func_80070F70(s32 var1, f32 var2, f32 var3, f32 var4, f32 var5, f32 var6, f32 var7, s32 var8, s32* unk); -void func_80071090(s32, f32, f32, f32, s32); -EffectInstance* func_80071750(s32, f32, f32, f32, f32, s32); -Effect* func_800720B0(s32, f32, f32, f32, f32, s32); -void func_80072950(s32, f32, f32, f32, f32, s32 time); -Effect* func_800715D0(s32, f32, f32, f32); -Effect* func_80071810(s32, f32, f32, f32); -Effect* func_80072890(s32, f32, f32, f32, f32, s32); -Effect* func_800716F0(s32, f32, f32, f32, f32, s32); -void func_80071690(s32, f32, f32, f32); void func_800F4E40(void*); s32 func_800DDCEC(s32, f32*, f32*, f32*, f32, f32, f32, f32); @@ -233,6 +223,7 @@ void func_8011B7C0(u16, s32, s32); AnimatedMesh* get_anim_mesh(s32 arg0); void set_transition_stencil_zoom_0(u8, f32); void set_transition_stencil_zoom_1(s32, f32); +void set_transition_stencil_alpha(s32, f32); void func_80137DC0(s32, f32*, f32*); s32 set_transition_stencil_color(s32, u8, u8, u8); void set_transition_stencil_center(s32, s32, s32, s32); @@ -246,7 +237,7 @@ void enable_world_fog(void); void set_world_fog_dist(s32 start, s32 end); void set_world_fog_color(s32 r, s32 g, s32 b, s32 a); -Model* func_8011B1C0(s32 index); +ModelTransformGroup* func_8011B1C0(s32 index); s32 make_item_entity(s32 itemID, f32 x, f32 y, f32 z, s32 itemSpawnMode, s32 pickupDelay, s32 facingAngleSign, s32 pickupVar); @@ -306,6 +297,12 @@ void create_part_shadow_by_ref(UNK_TYPE arg0, ActorPart* part); // arg0 unused ScriptInstance* get_script_by_index(s32 index); +void set_action_state(s32 actionState); +s32 get_collider_type_by_id(s32 colliderID); +void func_800DFF78(s32 arg0); +void subtract_hp(s32 amt); +void open_status_menu_long(void); + void suspend_all_group(s32 groupFlags); void kill_script(ScriptInstance* instanceToKill); void exec_entity_updatecmd(Entity* entity); @@ -333,8 +330,25 @@ void play_movement_dust_effects(s32 var0, f32 xPos, f32 yPos, f32 zPos, f32 angl void fx_walk_large(s32, f32, f32, f32, f32); void func_80138D88(s32, s32, s32, s32, f32); -s32 func_80071030(s32 a0, f32 a1, f32 a2, f32 a3, s32 a4); + +// Effect funcs +void func_8006F8F0(f32, f32, f32); +void func_8006FEF0(s32, f32, f32, f32, f32); +void func_80070190(s32, f32, f32, f32, s32, f32, s32, s32); +void func_80070F70(s32 var1, f32 var2, f32 var3, f32 var4, f32 var5, f32 var6, f32 var7, s32 var8, s32* unk); +void func_80071090(s32, f32, f32, f32, s32); +EffectInstance* func_80071750(s32, f32, f32, f32, f32, s32); +EffectInstance* func_800720B0(s32, f32, f32, f32, f32, s32); +//EffectInstance* func_80072950(s32, f32, f32, f32, f32, s32 time); +EffectInstance* func_800715D0(s32, f32, f32, f32); +EffectInstance* func_80071810(s32, f32, f32, f32); +EffectInstance* func_80072890(s32, f32, f32, f32, f32, s32); +EffectInstance* func_800716F0(s32, f32, f32, f32, f32, s32); +void func_80071690(s32, f32, f32, f32); +EffectInstance* func_80071030(s32 a0, f32 a1, f32 a2, f32 a3, s32 a4); void func_80070CD0(s32, f32, f32, f32, f32, f32); +void* func_800729B0(s32 arg0, f32 arg1, f32 arg2, f32 arg3, f32 arg4, s32 arg5); +void* func_800726B0(s32 arg0, f32 arg1, f32 arg2, f32 arg3, f32 arg4, s32 arg5); void func_802B2078(void); extern f32 gCurtainScale; @@ -373,8 +387,6 @@ f32 func_800E5938(s32 lag, s32* x, s32* y, s32* z); void sfx_get_spatialized_sound_params(f32 arg0, f32 arg1, f32 arg2, s16* arg3, s16* arg4, s32 arg5); void sfx_play_sound_with_params(s32 arg0, u8 arg1, u8 arg2, s16 arg3); -void* func_800729B0(s32 arg0, f32 arg1, f32 arg2, f32 arg3, f32 arg4, s32 arg5); -void* func_800726B0(s32 arg0, f32 arg1, f32 arg2, f32 arg3, f32 arg4, s32 arg5); void func_8004A784(Npc* npc, f32 arg1, f32* arg2, s32* arg3, s32* arg4, s32* arg5); void base_UnkNpcAIFunc1(ScriptInstance* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory); diff --git a/include/macros.h b/include/macros.h index 98bd1f5f90..fde7eeceed 100644 --- a/include/macros.h +++ b/include/macros.h @@ -30,6 +30,7 @@ #define MAX_ANIMATED_MESHES 16 #define MAX_ENTITY_MODELS 256 #define MAX_MODELS 256 +#define MAX_MODEL_TRANSFORM_GROUPS 4 #define MAX_SCRIPTS 128 #define MAX_NPCS 64 #define MAX_TRIGGERS 64 diff --git a/include/si.h b/include/si.h index 752082ba6d..935c67352d 100644 --- a/include/si.h +++ b/include/si.h @@ -96,7 +96,11 @@ typedef enum ScriptOpcode { ScriptOpcode_END_SPAWN_THREAD, ScriptOpcode_PARALLEL_THREAD, ///< Parallel threads are killed as soon as the parent script returns. ScriptOpcode_END_PARALLEL_THREAD, - ScriptOpcode_DEBUG_PRINT = 0x5B, ///< Args: expression + ScriptOpcode_90, + ScriptOpcode_DEBUG_PRINT, ///< Args: expression + ScriptOpcode_92, + ScriptOpcode_93, + ScriptOpcode_94, } ScriptOpcode; #define SI_VAR(v) ((v - 30000000)) diff --git a/src/10400_len_d30.c b/src/10400_len_d30.c index cc41f7bbd8..671e2d1e88 100644 --- a/src/10400_len_d30.c +++ b/src/10400_len_d30.c @@ -29,9 +29,9 @@ void state_init_file_select(void) { gCameras[0].vfov = 25.0f; set_cam_viewport(0, 12, 28, 296, 184); gCameras[0].unk_1E = 40; - gCameras[0].lookAt_eye[0] = 500.0f; - gCameras[0].lookAt_eye[1] = 1000.0f; - gCameras[0].lookAt_eye[2] = 1500.0f; + gCameras[0].lookAt_eye.x = 500.0f; + gCameras[0].lookAt_eye.y = 1000.0f; + gCameras[0].lookAt_eye.z = 1500.0f; gCameras[0].unk_5C = 150.0f; gCameras[0].backgroundColor[0] = 0; gCameras[0].backgroundColor[1] = 0; diff --git a/src/18F340.c b/src/18F340.c index 2477282a6e..a883e9dfd5 100644 --- a/src/18F340.c +++ b/src/18F340.c @@ -5,8 +5,8 @@ extern s32 D_80108AD4; extern s32 D_8029FB90; extern f32 D_8029FB94; -extern Effect* D_8029FB98; -extern Effect* D_8029FB9C; +extern EffectInstance* D_8029FB98; +extern EffectInstance* D_8029FB9C; extern HudElement* D_8029FBA0; extern s16 D_8029FBA4; extern s32 D_8029FBA8; @@ -340,26 +340,26 @@ ApiStatus func_802616F4(ScriptInstance* script, s32 isInitialCall) { script->functionTemp[1].s += 10; script->functionTemp[1].s = clamp_angle(script->functionTemp[1].s); - effectInstanceData = D_8029FB98->instanceData; + effectInstanceData = D_8029FB98->data; effectInstanceData->pos.x = merlee->pos.x; effectInstanceData->pos.y = merlee->pos.y + 16.0f; effectInstanceData->pos.z = merlee->pos.z; - effectInstanceData = D_8029FB9C->instanceData; + effectInstanceData = D_8029FB9C->data; effectInstanceData->pos.x = merlee->pos.x; effectInstanceData->pos.y = merlee->pos.y + 16.0f; effectInstanceData->pos.z = merlee->pos.z + 5.0f; if (D_8029FBA4 == 2) { - D_8029FB98->instanceData->unk_30 = 0.00001f; - D_8029FB9C->instanceData->unk_30 = 0.00001f; + D_8029FB98->data->unk_30 = 0.00001f; + D_8029FB9C->data->unk_30 = 0.00001f; D_8029FB98->flags |= 0x10; D_8029FB9C->flags |= 0x10; return ApiStatus_DONE1; } if (D_8029FBA4 == 1) { - effectInstanceData = D_8029FB98->instanceData; + effectInstanceData = D_8029FB98->data; effectInstanceData->unk_30 += 0.35; if (effectInstanceData->unk_30 > 3.5) { effectInstanceData->unk_30 = 3.5f; @@ -368,7 +368,7 @@ ApiStatus func_802616F4(ScriptInstance* script, s32 isInitialCall) { if (D_8029FB90 != 0) { D_8029FB90--; } else { - effectInstanceData = D_8029FB9C->instanceData; + effectInstanceData = D_8029FB9C->data; effectInstanceData->unk_30 += 0.5; if (effectInstanceData->unk_30 > 5.0) { D_8029FBA4 = 2; diff --git a/src/19FAF0.c b/src/19FAF0.c index b630717f7c..031cb9f484 100644 --- a/src/19FAF0.c +++ b/src/19FAF0.c @@ -12,20 +12,25 @@ ApiStatus func_80271258(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -INCLUDE_ASM(s32, "19FAF0", func_802712A0); +ApiStatus func_802712A0(ScriptInstance* script, s32 isInitialCall); +INCLUDE_ASM(ApiStatus, "19FAF0", func_802712A0, ScriptInstance* script, s32 isInitialCall); -INCLUDE_ASM(s32, "19FAF0", func_80271328); +ApiStatus func_80271328(ScriptInstance* script, s32 isInitialCall); +INCLUDE_ASM(ApiStatus, "19FAF0", func_80271328, ScriptInstance* script, s32 isInitialCall); -INCLUDE_ASM(s32, "19FAF0", func_802713B0); +ApiStatus func_802713B0(ScriptInstance* script, s32 isInitialCall); +INCLUDE_ASM(ApiStatus, "19FAF0", func_802713B0, ScriptInstance* script, s32 isInitialCall); ApiStatus func_8027143C(ScriptInstance* script, s32 isInitialCall) { func_80070A90(0, script->varTable[0], script->varTable[1], script->varTable[2]); return ApiStatus_DONE2; } -INCLUDE_ASM(s32, "19FAF0", func_80271484); +ApiStatus func_80271484(ScriptInstance* script, s32 isInitialCall); +INCLUDE_ASM(ApiStatus, "19FAF0", func_80271484, ScriptInstance* script, s32 isInitialCall); -INCLUDE_ASM(s32, "19FAF0", func_80271588); +ApiStatus func_80271588(ScriptInstance* script, s32 isInitialCall); +INCLUDE_ASM(ApiStatus, "19FAF0", func_80271588, ScriptInstance* script, s32 isInitialCall); void dispatch_event_player(s32 eventType) { Actor* player = gBattleStatus.playerActor; @@ -217,7 +222,23 @@ INCLUDE_ASM(s32, "19FAF0", func_802752AC); INCLUDE_ASM(s32, "19FAF0", func_80275F00); -INCLUDE_ASM(s32, "19FAF0", DidActionSucceed, ScriptInstance* script, s32 isInitialCall); +ApiStatus DidActionSucceed(ScriptInstance* script, s32 isInitialCall) { + Bytecode* args = script->ptrReadPos; + s32 outVar = *args++; + s32 actionSuccess = gBattleStatus.actionSuccess; + s32 actionSucceeded = 0; + + if (actionSuccess < 0) { + actionSuccess = 0; + } + + if (actionSucceeded < actionSuccess) { + actionSucceeded = actionSuccess; + } + + set_variable(script, outVar, actionSucceeded); + return ApiStatus_DONE2; +} ApiStatus func_80276EFC(ScriptInstance* script, s32 isInitialCall) { gBattleStatus.flags1 |= 0x200000; diff --git a/src/1a1f0_len_5390.c b/src/1a1f0_len_5390.c index 55201842bb..1f9bd9f7a0 100644 --- a/src/1a1f0_len_5390.c +++ b/src/1a1f0_len_5390.c @@ -1,6 +1,11 @@ #include "common.h" #include "map.h" +extern s32 D_800A0BA0; +extern f32 D_800A0BA4; +extern EffectInstance* D_800A0BA8; +extern EffectInstance* D_800A0BAC; + s32 get_defeated(s32 mapID, s32 encounterID) { EncounterStatus* currentEncounter = &gCurrentEncounter; s32 encounterIdx = encounterID / 32; @@ -101,7 +106,63 @@ ApiStatus FadeOutMerlee(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_BLOCK; } -INCLUDE_ASM(s32, "1a1f0_len_5390", MerleeUpdateFX); +// same as func_802616F4 aside from syms +ApiStatus MerleeUpdateFX(ScriptInstance* script, s32 isInitialCall) { + Npc* merlee = get_npc_unsafe(NPC_BTL_MERLEE); + EffectInstanceData* effectInstanceData; + + if (isInitialCall) { + script->functionTemp[1].s = 0; + D_800A0BA4 = merlee->pos.y; + D_800A0BA8 = func_80071750(0, merlee->pos.x, merlee->pos.y, merlee->pos.z, 0.4f, 0); + D_800A0BAC = func_80071750(3, merlee->pos.x, merlee->pos.y, merlee->pos.z, 0.00001f, 0); + D_800A0BB8 = 0; + D_800A0BA0 = 12; + sfx_play_sound(0x2074); + } + + merlee->pos.y = D_800A0BA4 + (sin_rad((script->functionTemp[1].s * TAU) / 360.0f) * 3.0f); + + script->functionTemp[1].s += 10; + script->functionTemp[1].s = clamp_angle(script->functionTemp[1].s); + + effectInstanceData = D_800A0BA8->data; + effectInstanceData->pos.x = merlee->pos.x; + effectInstanceData->pos.y = merlee->pos.y + 16.0f; + effectInstanceData->pos.z = merlee->pos.z; + + effectInstanceData = D_800A0BAC->data; + effectInstanceData->pos.x = merlee->pos.x; + effectInstanceData->pos.y = merlee->pos.y + 16.0f; + effectInstanceData->pos.z = merlee->pos.z + 5.0f; + + if (D_800A0BB8 == 2) { + D_800A0BA8->data->unk_30 = 0.00001f; + D_800A0BAC->data->unk_30 = 0.00001f; + D_800A0BA8->flags |= 0x10; + D_800A0BAC->flags |= 0x10; + return ApiStatus_DONE1; + } + + if (D_800A0BB8 == 1) { + effectInstanceData = D_800A0BA8->data; + effectInstanceData->unk_30 += 0.35; + if (effectInstanceData->unk_30 > 3.5) { + effectInstanceData->unk_30 = 3.5f; + } + + if (D_800A0BA0 != 0) { + D_800A0BA0--; + } else { + effectInstanceData = D_800A0BAC->data; + effectInstanceData->unk_30 += 0.5; + if (effectInstanceData->unk_30 > 5.0) { + D_800A0BB8 = 2; + } + } + } + return ApiStatus_BLOCK; +} ApiStatus MerleeStopFX(ScriptInstance* script, s32 isInitialCall) { D_800A0BB8 = 1; @@ -217,7 +278,63 @@ void draw_encounters_neutral() { INCLUDE_ASM(s32, "1a1f0_len_5390", update_encounters_pre_battle); -INCLUDE_ASM(s32, "1a1f0_len_5390", draw_encounters_pre_battle); +void draw_encounters_pre_battle(void) { + EncounterStatus* encounter = &gCurrentEncounter; + Npc* npc = get_npc_unsafe(encounter->currentEnemy->npcID); + PlayerStatus* playerStatus = &gPlayerStatus; + + if (encounter->unk_94 != 0) { + f32 playerX, playerY, playerZ; + f32 otherX, otherY, otherZ; + s32 pScreenX, pScreenY, pScreenZ; + s32 oScreenX, oScreenY, oScreenZ; + + if (encounter->fadeOutAmount != 255) { + encounter->fadeOutAccel++; + if (encounter->fadeOutAccel > 10) { + encounter->fadeOutAccel = 10; + } + + encounter->fadeOutAmount += encounter->fadeOutAccel; + if (encounter->fadeOutAmount > 255) { + encounter->fadeOutAmount = 255; + } + + playerX = playerStatus->position.x; + playerY = playerStatus->position.y; + playerZ = playerStatus->position.z; + + otherX = npc->pos.x; + otherY = npc->pos.y; + otherZ = npc->pos.z; + if (otherY < -990.0f) { + otherX = playerX; + otherY = playerY; + otherZ = playerZ; + } + + if (gGameStatusPtr->demoState == 2) { + set_transition_stencil_zoom_1(10, encounter->fadeOutAmount); + set_transition_stencil_alpha(1, 255.0f); + set_transition_stencil_color(1, 0, 0, 0); + get_screen_coords(gCurrentCameraID, playerX, playerY + 20.0f, playerZ, &pScreenX, &pScreenY, &pScreenZ); + get_screen_coords(gCurrentCameraID, otherX, otherY + 15.0f, otherZ, &oScreenX, &oScreenY, &oScreenZ); + set_transition_stencil_center(1, 0, (pScreenX - oScreenX) / 2 + oScreenX, + (pScreenY - oScreenY) / 2 + oScreenY); + } else { + set_transition_stencil_zoom_0(10, encounter->fadeOutAmount); + set_transition_stencil_alpha(0, 255.0f); + set_transition_stencil_color(0, 0, 0, 0); + get_screen_coords(gCurrentCameraID, playerX, playerY + 20.0f, playerZ, &pScreenX, &pScreenY, &pScreenZ); + get_screen_coords(gCurrentCameraID, otherX, otherY + 15.0f, otherZ, &oScreenX, &oScreenY, &oScreenZ); + set_transition_stencil_center(0, 0, (pScreenX - oScreenX) / 2 + oScreenX, + (pScreenY - oScreenY) / 2 + oScreenY); + } + } + } +} + +extern s16 D_8009A668; INCLUDE_ASM(s32, "1a1f0_len_5390", show_first_strike_message); diff --git a/src/341d0.c b/src/341d0.c index e0af6e4a4f..2b130e3ede 100644 --- a/src/341d0.c +++ b/src/341d0.c @@ -1,4 +1,5 @@ #include "common.h" +#include "ld_addrs.h" typedef s32 TlbEntry[0x1000 / 4]; typedef TlbEntry TlbMappablePage[15]; @@ -8,9 +9,10 @@ extern EffectTableEntry gEffectTable[135]; #define EFFECT_LOADED 1 -extern EffectInstance* D_800B4398[96]; //effectInstanceList -extern Effect D_800A4000[15]; extern void* D_80059C80; +extern Effect D_800A4000[15]; +extern EffectInstance* D_800B4398[96]; //effectInstanceList +extern s32 D_801A6000; INCLUDE_ASM(s32, "341d0", func_80058DD0); @@ -34,9 +36,29 @@ INCLUDE_ASM(s32, "341d0", func_80059BD4); void stub_effect_delegate(EffectInstance* effectInst) { } -INCLUDE_ASM(s32, "341d0", set_effect_pos_offset); +void set_effect_pos_offset(Effect* effect, f32 x, f32 y, f32 z) { + EffectInstanceData* instanceData = effect->instanceData; -INCLUDE_ASM(s32, "341d0", clear_effect_data); + instanceData->pos.x = x; + instanceData->pos.y = y; + instanceData->pos.z = z; +} + +void clear_effect_data(void) { + s32 i; + + for (i = 0; i < ARRAY_COUNT(D_800A4000); i++) { + D_800A4000[i].flags = 0; + } + + for (i = 0; i < ARRAY_COUNT(D_800B4398); i++) { + D_800B4398[i] = 0; + } + + osUnmapTLBAll(); + osMapTLB(0x10, NULL, _325AD0_VRAM, (s32)&D_801A6000 & 0xFFFFFF, -1, -1); + dma_copy(_325AD0_ROM_START, _325AD0_ROM_END, _325AD0_VRAM); +} void func_80059D48(void) { } diff --git a/src/4ac90_len_3910.c b/src/4ac90_len_3910.c index d4bb405195..581a5dda0f 100644 --- a/src/4ac90_len_3910.c +++ b/src/4ac90_len_3910.c @@ -2,17 +2,17 @@ extern EffectTableEntry gEffectTable[135]; -INCLUDE_ASM(s32, "4ac90_len_3910", func_8006F890); +INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", func_8006F890); INCLUDE_ASM(void, "4ac90_len_3910", func_8006F8F0, f32 arg0, f32 arg1, f32 arg2); -INCLUDE_ASM(s32, "4ac90_len_3910", func_8006F950); +INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", func_8006F950); -INCLUDE_ASM(s32, "4ac90_len_3910", func_8006F9B0); +INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", func_8006F9B0); -INCLUDE_ASM(s32, "4ac90_len_3910", func_8006FA10); +INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", func_8006FA10); -INCLUDE_ASM(s32, "4ac90_len_3910", func_8006FA70); +INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", func_8006FA70); INCLUDE_ASM(void, "4ac90_len_3910", fx_walk_large, s32 arg0, f32 arg1, f32 arg2, f32 arg3, f32 arg4); @@ -22,15 +22,15 @@ INCLUDE_ASM(void, "4ac90_len_3910", func_8006FB90, f32 arg0, f32 arg1, f32 arg2, INCLUDE_ASM(void, "4ac90_len_3910", func_8006FBF0, s32 arg0, f32 arg1, f32 arg2, f32 arg3, f32 arg4, f32 arg5); -INCLUDE_ASM(s32, "4ac90_len_3910", func_8006FC50); +INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", func_8006FC50); -INCLUDE_ASM(s32, "4ac90_len_3910", func_8006FCB0); +INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", func_8006FCB0); -INCLUDE_ASM(s32, "4ac90_len_3910", func_8006FD10); +INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", func_8006FD10); -INCLUDE_ASM(s32, "4ac90_len_3910", func_8006FD70); +INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", func_8006FD70); -INCLUDE_ASM(s32, "4ac90_len_3910", func_8006FDD0); +INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", func_8006FDD0); INCLUDE_ASM(void, "4ac90_len_3910", func_8006FE30, s32 arg0, f32 arg1, f32 arg2, f32 arg3, f32 arg4, f32 arg5, f32 arg6, f32 arg7); @@ -40,15 +40,15 @@ INCLUDE_ASM(void, "4ac90_len_3910", fx_emote, s32 arg0, Npc* arg1, f32 arg2, f32 INCLUDE_ASM(void, "4ac90_len_3910", func_8006FEF0, s32 a0, f32 a1, f32 a2, f32 a3, f32 a4); -INCLUDE_ASM(s32, "4ac90_len_3910", func_8006FF50); +INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", func_8006FF50); -INCLUDE_ASM(s32, "4ac90_len_3910", func_8006FFB0); +INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", func_8006FFB0); -INCLUDE_ASM(s32, "4ac90_len_3910", func_80070010); +INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", func_80070010); -INCLUDE_ASM(s32, "4ac90_len_3910", func_80070070); +INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", func_80070070); -INCLUDE_ASM(s32, "4ac90_len_3910", func_800700D0); +INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", func_800700D0); INCLUDE_ASM(void, "4ac90_len_3910", func_80070130, s32 arg0, f32 arg1, f32 arg2, f32 arg3); @@ -57,44 +57,44 @@ INCLUDE_ASM(void, "4ac90_len_3910", func_80070190, s32 arg0, f32 arg1, f32 arg2, INCLUDE_ASM(void, "4ac90_len_3910", func_800701F0, s32 arg0, f32 arg1, f32 arg2, f32 arg3); -INCLUDE_ASM(s32, "4ac90_len_3910", func_80070250); +INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", func_80070250); -INCLUDE_ASM(s32, "4ac90_len_3910", func_800702B0); +INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", func_800702B0); -INCLUDE_ASM(s32, "4ac90_len_3910", func_80070310); +INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", func_80070310); INCLUDE_ASM(void, "4ac90_len_3910", func_80070370, s32 arg0, f32 arg1, f32 arg2, f32 arg3, f32 arg4, s32 arg5, s32 arg6, s32 arg7); -INCLUDE_ASM(s32, "4ac90_len_3910", func_800703D0); +INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", func_800703D0); -INCLUDE_ASM(s32, "4ac90_len_3910", func_80070430); +INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", func_80070430); -INCLUDE_ASM(s32, "4ac90_len_3910", func_80070490); +INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", func_80070490); -INCLUDE_ASM(s32, "4ac90_len_3910", func_800704F0); +INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", func_800704F0); INCLUDE_ASM(void, "4ac90_len_3910", func_80070550, s32 arg0, f32 arg1, f32 arg2, f32 arg3, f32 arg4, f32 arg5, s32 arg6, s32 arg7); -INCLUDE_ASM(s32, "4ac90_len_3910", func_800705B0); +INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", func_800705B0); -INCLUDE_ASM(s32, "4ac90_len_3910", func_80070610); +INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", func_80070610); -INCLUDE_ASM(s32, "4ac90_len_3910", func_80070670); +INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", func_80070670); INCLUDE_ASM(void, "4ac90_len_3910", func_800706D0, s32 arg0, f32 arg1, f32 arg2, f32 arg3); -INCLUDE_ASM(s32, "4ac90_len_3910", func_80070730); +INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", func_80070730); INCLUDE_ASM(void, "4ac90_len_3910", fx_sweat, s32 arg0, f32 arg1, f32 arg2, f32 arg3, f32 arg4, f32 arg5, s32 arg6); -INCLUDE_ASM(s32, "4ac90_len_3910", fx_sleep_bubble); +INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", fx_sleep_bubble); -INCLUDE_ASM(s32, "4ac90_len_3910", func_80070850); +INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", func_80070850); -INCLUDE_ASM(s32, "4ac90_len_3910", func_800708B0); +INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", func_800708B0); -INCLUDE_ASM(s32, "4ac90_len_3910", func_80070910); +INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", func_80070910); INCLUDE_ASM(void, "4ac90_len_3910", func_80070970, s32 arg0, f32 arg1, f32 arg2, f32 arg3, s32 arg4, s32 arg5); @@ -110,171 +110,171 @@ INCLUDE_ASM(void, "4ac90_len_3910", func_80070B50, s32 arg0, f32 arg1, f32 arg2, INCLUDE_ASM(void, "4ac90_len_3910", func_80070BB0, s32 arg0, f32 arg1, f32 arg2, f32 arg3, f32 arg4, s32 arg5); -INCLUDE_ASM(s32, "4ac90_len_3910", func_80070C10); +INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", func_80070C10); -INCLUDE_ASM(s32, "4ac90_len_3910", func_80070C70); +INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", func_80070C70); INCLUDE_ASM(void, "4ac90_len_3910", func_80070CD0, s32 arg0, f32 arg1, f32 arg2, f32 arg3, f32 arg4, f32 arg5); -INCLUDE_ASM(s32, "4ac90_len_3910", func_80070D30); +INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", func_80070D30); -INCLUDE_ASM(s32, "4ac90_len_3910", func_80070D90); +INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", func_80070D90); -INCLUDE_ASM(s32, "4ac90_len_3910", func_80070DF0); +INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", func_80070DF0); -INCLUDE_ASM(s32, "4ac90_len_3910", func_80070E50); +INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", func_80070E50); INCLUDE_ASM(void, "4ac90_len_3910", func_80070EB0, s32 arg0, f32 arg1, f32 arg2, f32 arg3, f32 arg4, EffectInstanceData** arg5); -INCLUDE_ASM(s32, "4ac90_len_3910", func_80070F10); +INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", func_80070F10); INCLUDE_ASM(void, "4ac90_len_3910", func_80070F70, s32 arg0, f32 arg1, f32 arg2, f32 arg3, f32 arg4, f32 arg5, f32 arg6, s32 arg7, s32* arg8); -INCLUDE_ASM(s32, "4ac90_len_3910", func_80070FD0); +INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", func_80070FD0); -INCLUDE_ASM(s32, "4ac90_len_3910", func_80071030, s32 a0, f32 a1, f32 a2, f32 a3, s32 a4); +INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", func_80071030, s32 a0, f32 a1, f32 a2, f32 a3, s32 a4); INCLUDE_ASM(void, "4ac90_len_3910", func_80071090, s32 a0, f32 a1, f32 a2, f32 a3, s32 a4); -INCLUDE_ASM(s32, "4ac90_len_3910", func_800710F0); +INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", func_800710F0); -INCLUDE_ASM(s32, "4ac90_len_3910", func_80071150); +INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", func_80071150); -INCLUDE_ASM(s32, "4ac90_len_3910", func_800711B0); +INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", func_800711B0); -INCLUDE_ASM(s32, "4ac90_len_3910", func_80071210); +INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", func_80071210); -INCLUDE_ASM(s32, "4ac90_len_3910", func_80071270); +INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", func_80071270); -INCLUDE_ASM(s32, "4ac90_len_3910", func_800712D0); +INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", func_800712D0); -INCLUDE_ASM(s32, "4ac90_len_3910", func_80071330); +INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", func_80071330); -INCLUDE_ASM(s32, "4ac90_len_3910", func_80071390); +INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", func_80071390); -INCLUDE_ASM(s32, "4ac90_len_3910", func_800713F0); +INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", func_800713F0); -INCLUDE_ASM(s32, "4ac90_len_3910", func_80071450); +INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", func_80071450); -INCLUDE_ASM(s32, "4ac90_len_3910", func_800714B0); +INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", func_800714B0); -INCLUDE_ASM(s32, "4ac90_len_3910", func_80071510); +INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", func_80071510); -INCLUDE_ASM(s32, "4ac90_len_3910", func_80071570); +INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", func_80071570); -INCLUDE_ASM(Effect*, "4ac90_len_3910", func_800715D0, s32 arg0, f32 arg1, f32 arg2, f32 arg3); +INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", func_800715D0, s32 arg0, f32 arg1, f32 arg2, f32 arg3); -INCLUDE_ASM(s32, "4ac90_len_3910", func_80071630); +INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", func_80071630); INCLUDE_ASM(void, "4ac90_len_3910", func_80071690, s32 arg0, f32 arg1, f32 arg2, f32 arg3); -INCLUDE_ASM(Effect*, "4ac90_len_3910", func_800716F0, s32 arg0, f32 arg1, f32 arg2, f32 arg3, f32 arg4, s32 arg5); +INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", func_800716F0, s32 arg0, f32 arg1, f32 arg2, f32 arg3, f32 arg4, s32 arg5); INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", func_80071750, s32 a0, f32 a1, f32 a2, f32 a3, f32 a4, s32 a5); -INCLUDE_ASM(s32, "4ac90_len_3910", func_800717B0); +INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", func_800717B0); -INCLUDE_ASM(Effect*, "4ac90_len_3910", func_80071810, s32 arg0, f32 arg1, f32 arg2, f32 arg3); +INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", func_80071810, s32 arg0, f32 arg1, f32 arg2, f32 arg3); -INCLUDE_ASM(s32, "4ac90_len_3910", func_80071870); +INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", func_80071870); INCLUDE_ASM(void, "4ac90_len_3910", func_800718D0, s32 arg0, f32 arg1, f32 arg2, f32 arg3, f32 arg4, s32 arg5); -INCLUDE_ASM(s32, "4ac90_len_3910", func_80071930); +INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", func_80071930); -INCLUDE_ASM(s32, "4ac90_len_3910", func_80071990); +INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", func_80071990); -INCLUDE_ASM(s32, "4ac90_len_3910", func_800719F0); +INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", func_800719F0); -INCLUDE_ASM(s32, "4ac90_len_3910", func_80071A50); +INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", func_80071A50); -INCLUDE_ASM(s32, "4ac90_len_3910", func_80071AB0); +INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", func_80071AB0); -INCLUDE_ASM(s32, "4ac90_len_3910", func_80071B10); +INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", func_80071B10); -INCLUDE_ASM(s32, "4ac90_len_3910", func_80071B70); +INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", func_80071B70); -INCLUDE_ASM(s32, "4ac90_len_3910", func_80071BD0); +INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", func_80071BD0); -INCLUDE_ASM(s32, "4ac90_len_3910", func_80071C30); +INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", func_80071C30); -INCLUDE_ASM(s32, "4ac90_len_3910", func_80071C90); +INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", func_80071C90); -INCLUDE_ASM(s32, "4ac90_len_3910", func_80071CF0); +INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", func_80071CF0); -INCLUDE_ASM(s32, "4ac90_len_3910", func_80071D50); +INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", func_80071D50); -INCLUDE_ASM(s32, "4ac90_len_3910", func_80071DB0); +INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", func_80071DB0); -INCLUDE_ASM(s32, "4ac90_len_3910", func_80071E10); +INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", func_80071E10); -INCLUDE_ASM(s32, "4ac90_len_3910", func_80071E70); +INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", func_80071E70); -INCLUDE_ASM(s32, "4ac90_len_3910", func_80071ED0); +INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", func_80071ED0); -INCLUDE_ASM(s32, "4ac90_len_3910", func_80071F30); +INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", func_80071F30); -INCLUDE_ASM(s32, "4ac90_len_3910", func_80071F90); +INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", func_80071F90); INCLUDE_ASM(void, "4ac90_len_3910", func_80071FF0, s32 arg0, f32 arg1, f32 arg2, f32 arg3, f32 arg4, s32 arg5); -INCLUDE_ASM(s32, "4ac90_len_3910", func_80072050); +INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", func_80072050); -INCLUDE_ASM(Effect*, "4ac90_len_3910", func_800720B0, s32 a0, f32 a1, f32 a2, f32 a3, f32 a4, s32 a5); +INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", func_800720B0, s32 a0, f32 a1, f32 a2, f32 a3, f32 a4, s32 a5); -INCLUDE_ASM(s32, "4ac90_len_3910", func_80072110); +INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", func_80072110); -INCLUDE_ASM(s32, "4ac90_len_3910", func_80072170); +INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", func_80072170); -INCLUDE_ASM(s32, "4ac90_len_3910", func_800721D0); +INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", func_800721D0); INCLUDE_ASM(UNK_TYPE, "4ac90_len_3910", func_80072230, s32 arg0, f32 arg1, f32 arg2, f32 arg3, f32 arg4, s32 arg5); -INCLUDE_ASM(s32, "4ac90_len_3910", func_80072290); +INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", func_80072290); -INCLUDE_ASM(s32, "4ac90_len_3910", func_800722F0); +INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", func_800722F0); INCLUDE_ASM(UNK_TYPE, "4ac90_len_3910", func_80072350, s32 arg0, f32 arg1, f32 arg2, f32 arg3, f32 arg4, f32 arg5, f32 arg6, s32 arg7, s32 arg8); -INCLUDE_ASM(s32, "4ac90_len_3910", func_800723B0); +INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", func_800723B0); -INCLUDE_ASM(s32, "4ac90_len_3910", func_80072410); +INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", func_80072410); -INCLUDE_ASM(s32, "4ac90_len_3910", func_80072470); +INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", func_80072470); -INCLUDE_ASM(s32, "4ac90_len_3910", func_800724D0); +INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", func_800724D0); -INCLUDE_ASM(s32, "4ac90_len_3910", func_80072530); +INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", func_80072530); -INCLUDE_ASM(s32, "4ac90_len_3910", func_80072590); +INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", func_80072590); -INCLUDE_ASM(s32, "4ac90_len_3910", func_800725F0); +INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", func_800725F0); -INCLUDE_ASM(s32, "4ac90_len_3910", func_80072650); +INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", func_80072650); INCLUDE_ASM(void*, "4ac90_len_3910", func_800726B0, s32 arg0, f32 arg1, f32 arg2, f32 arg3, f32 arg4, s32 arg5); -INCLUDE_ASM(s32, "4ac90_len_3910", func_80072710); +INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", func_80072710); -INCLUDE_ASM(s32, "4ac90_len_3910", func_80072770); +INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", func_80072770); -INCLUDE_ASM(s32, "4ac90_len_3910", func_800727D0); +INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", func_800727D0); -INCLUDE_ASM(s32, "4ac90_len_3910", func_80072830); +INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", func_80072830); -INCLUDE_ASM(Effect*, "4ac90_len_3910", func_80072890, s32 arg0, f32 arg1, f32 arg2, f32 arg3, f32 arg4, s32 arg5); +INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", func_80072890, s32 arg0, f32 arg1, f32 arg2, f32 arg3, f32 arg4, s32 arg5); -INCLUDE_ASM(s32, "4ac90_len_3910", func_800728F0); +INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", func_800728F0); -INCLUDE_ASM(void, "4ac90_len_3910", func_80072950, s32 arg0, f32 arg1, f32 arg2, f32 arg3, f32 arg4, s32 time); +INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", func_80072950, s32 arg0, f32 arg1, f32 arg2, f32 arg3, f32 arg4, s32 time); INCLUDE_ASM(void*, "4ac90_len_3910", func_800729B0, s32 arg0, f32 arg1, f32 arg2, f32 arg3, f32 arg4, s32 arg5); -INCLUDE_ASM(s32, "4ac90_len_3910", func_80072A10); +INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", func_80072A10); -INCLUDE_ASM(s32, "4ac90_len_3910", func_80072A70); +INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", func_80072A70); -INCLUDE_ASM(s32, "4ac90_len_3910", func_80072AD0); +INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", func_80072AD0); diff --git a/src/8800.c b/src/8800.c index e2ac725f76..db355db838 100644 --- a/src/8800.c +++ b/src/8800.c @@ -1,14 +1,125 @@ #include "common.h" +#include "camera.h" + +// D_8009A5EC bss here + +void initialize_next_camera(CameraInitData* data); INCLUDE_ASM(s32, "8800", update_cameras); -INCLUDE_ASM(s32, "8800", render_frame); +INCLUDE_ASM(void, "8800", render_frame); -INCLUDE_ASM(s32, "8800", create_cameras_a); +void create_cameras_a(void) { + CameraInitData camData; + CameraInitData* camDataPtr = &camData; + s32 i; -INCLUDE_ASM(s32, "8800", create_cameras_b); + D_8009A5EC = 1.0f; -INCLUDE_ASM(s32, "8800", initialize_next_camera); + for (i = 0; i < ARRAY_COUNT(gCameras); i++) { + gCameras[i].flags = 0; + } + + camDataPtr->flags = 2; + camDataPtr->type = 0; + camDataPtr->viewWidth = 160; + camDataPtr->viewHeight = 120; + camDataPtr->viewStartX = 0; + camDataPtr->viewStartY = 0; + camDataPtr->nearClip = 8; + camDataPtr->farClip = 16384; + camDataPtr->vfov = 50; + initialize_next_camera(camDataPtr); + + camDataPtr->flags = 2; + camDataPtr->type = 0; + camDataPtr->viewWidth = 160; + camDataPtr->viewHeight = 120; + camDataPtr->viewStartX = 160; + camDataPtr->viewStartY = 0; + camDataPtr->nearClip = 8; + camDataPtr->farClip = 16384; + camDataPtr->vfov = 50; + initialize_next_camera(camDataPtr); + + camDataPtr->flags = 2; + camDataPtr->type = 0; + camDataPtr->viewWidth = 160; + camDataPtr->viewHeight = 120; + camDataPtr->viewStartX = 0; + camDataPtr->viewStartY = 120; + camDataPtr->nearClip = 8; + camDataPtr->farClip = 16384; + camDataPtr->vfov = 50; + initialize_next_camera(camDataPtr); + + camDataPtr->flags = 2; + camDataPtr->type = 0; + camDataPtr->viewWidth = 160; + camDataPtr->viewHeight = 120; + camDataPtr->viewStartX = 160; + camDataPtr->viewStartY = 120; + camDataPtr->nearClip = 8; + camDataPtr->farClip = 16384; + camDataPtr->vfov = 50; + initialize_next_camera(camDataPtr); +} + +void create_cameras_b(void) { + CameraInitData camData; + CameraInitData* camDataPtr = &camData; + s32 i; + + for (i = 0; i < ARRAY_COUNT(gCameras); i++) { + gCameras[i].flags = 0; + } + + camDataPtr->flags = 2; + camDataPtr->type = 0; + camDataPtr->viewWidth = 160; + camDataPtr->viewHeight = 120; + camDataPtr->viewStartX = 0; + camDataPtr->viewStartY = 0; + camDataPtr->nearClip = 8; + camDataPtr->farClip = 16384; + camDataPtr->vfov = 50; + initialize_next_camera(camDataPtr); + + camDataPtr->flags = 2; + camDataPtr->type = 0; + camDataPtr->viewWidth = 160; + camDataPtr->viewHeight = 120; + camDataPtr->viewStartX = 160; + camDataPtr->viewStartY = 0; + camDataPtr->nearClip = 8; + camDataPtr->farClip = 16384; + camDataPtr->vfov = 50; + initialize_next_camera(camDataPtr); + + camDataPtr->flags = 2; + camDataPtr->type = 0; + camDataPtr->viewWidth = 160; + camDataPtr->viewHeight = 120; + camDataPtr->viewStartX = 0; + camDataPtr->viewStartY = 120; + camDataPtr->nearClip = 8; + camDataPtr->farClip = 16384; + camDataPtr->vfov = 50; + initialize_next_camera(camDataPtr); + + camDataPtr->flags = 2; + camDataPtr->type = 0; + camDataPtr->viewWidth = 160; + camDataPtr->viewHeight = 120; + camDataPtr->viewStartX = 160; + camDataPtr->viewStartY = 120; + camDataPtr->nearClip = 8; + camDataPtr->farClip = 16384; + camDataPtr->vfov = 50; + initialize_next_camera(camDataPtr); +} + +INCLUDE_ASM(void, "8800", initialize_next_camera, CameraInitData* data); INCLUDE_ASM(void, "8800", set_cam_viewport, s16 id, s16 x, s16 y, s16 width, s16 height); diff --git a/src/9d10_len_1080.c b/src/9d10_len_1080.c index 74e06a3410..aea51da7e9 100644 --- a/src/9d10_len_1080.c +++ b/src/9d10_len_1080.c @@ -1,9 +1,34 @@ #include "common.h" +#include "camera.h" -INCLUDE_ASM(s32, "9d10_len_1080", do_camera_type_4); +void do_camera_type_0(Camera*); -INCLUDE_ASM(s32, "9d10_len_1080", do_camera_type_2); +INCLUDE_ASM(void, "9d10_len_1080", do_camera_type_4, Camera* camera); -INCLUDE_ASM(s32, "9d10_len_1080", do_camera_type_1); +INCLUDE_ASM(void, "9d10_len_1080", do_camera_type_2, Camera* camera); -INCLUDE_ASM(s32, "9d10_len_1080", do_camera_type_0); +INCLUDE_ASM(void, "9d10_len_1080", do_camera_type_1, Camera* camera); + +void do_camera_type_0(Camera* camera) { + f32 xTemp; + f32 yTemp; + f32 zTemp; + + if (camera->unk_06 != 0) { + camera->lookAt_obj.x = 0.0f; + camera->lookAt_obj.y = 0.0f; + camera->lookAt_obj.z = 0.0f; + camera->unk_06 = 0; + camera->lookAt_eye.x = camera->lookAt_obj.x; + camera->lookAt_eye.y = camera->lookAt_obj.y; + camera->lookAt_eye.z = camera->lookAt_obj.z - (1000.0f / D_8009A5EC); + } + + camera->currentYaw = atan2(camera->lookAt_eye.x, camera->lookAt_eye.z, camera->lookAt_obj.x, camera->lookAt_obj.z); + xTemp = camera->lookAt_obj.x - camera->lookAt_eye.x; + yTemp = camera->lookAt_obj.y - camera->lookAt_eye.y; + zTemp = camera->lookAt_obj.z - camera->lookAt_eye.z; + camera->currentBlendedYawNegated = -atan2(0.0f, 0.0f, xTemp, zTemp); + xTemp = -sqrtf(SQ(xTemp) + SQ(zTemp)); + camera->currentPitch = atan2(0.0f, 0.0f, yTemp, xTemp); +} diff --git a/src/a5dd0_len_114e0.c b/src/a5dd0_len_114e0.c index 831311afd1..30b08ec92c 100644 --- a/src/a5dd0_len_114e0.c +++ b/src/a5dd0_len_114e0.c @@ -27,8 +27,6 @@ typedef struct GameMode { /* 0x14 */ void (*renderAux)(void); ///< @see func_80112FC4 } GameMode; // size = 0x18 -typedef Model* SmallModelList[4]; - extern s32 D_8014B7F8[]; extern s32 D_8014B820[]; extern s32 D_8014B848[]; @@ -286,7 +284,7 @@ static s32 D_801512BC; static s32 D_801512C0; static s32 D_801512C4; static s32 D_801512C8[6]; -static SmallModelList* D_801512E0; +static ModelTransformGroupList* gCurrentTransformGroups; static s8 D_801512E4[0x4]; static s8 D_801512E8[0x8]; static s8 B_801512F0[0x410]; @@ -472,7 +470,7 @@ void update_shadows(void) { } } -INCLUDE_ASM(s32, "a5dd0_len_114e0", set_entity_commandlist); +INCLUDE_ASM(void, "a5dd0_len_114e0", set_entity_commandlist, Entity* entity, s32* entityScript); INCLUDE_ASM(s32, "a5dd0_len_114e0", step_entity_commandlist, Entity* entity); @@ -1048,7 +1046,7 @@ INCLUDE_ASM(s32, "a5dd0_len_114e0", render_ui); // calls renderAux and render INCLUDE_ASM(s32, "a5dd0_len_114e0", func_80112FC4); -INCLUDE_ASM(s32, "a5dd0_len_114e0", appendGfx_model); +INCLUDE_ASM(void, "a5dd0_len_114e0", appendGfx_model, Model*); INCLUDE_ASM(s32, "a5dd0_len_114e0", func_80114B58); @@ -1078,13 +1076,306 @@ INCLUDE_ASM(s32, "a5dd0_len_114e0", func_80116698); INCLUDE_ASM(s32, "a5dd0_len_114e0", render_models); -INCLUDE_ASM(s32, "a5dd0_len_114e0", appendGfx_model_group); +void appendGfx_model_group(Model*); +void appendGfx_model(Model*); +void func_8011800C(Model*); + +// void render_models(void) { +// Camera* camera = &gCameras[gCurrentCameraID]; +// f32 cam00 = camera->perspectiveMatrix[0][0]; +// f32 cam01 = camera->perspectiveMatrix[0][1]; +// f32 cam02 = camera->perspectiveMatrix[0][2]; +// f32 cam03 = camera->perspectiveMatrix[0][3]; +// f32 cam10 = camera->perspectiveMatrix[1][0]; +// f32 cam11 = camera->perspectiveMatrix[1][1]; +// f32 cam12 = camera->perspectiveMatrix[1][2]; +// f32 cam13 = camera->perspectiveMatrix[1][3]; +// f32 cam20 = camera->perspectiveMatrix[2][0]; +// f32 cam21 = camera->perspectiveMatrix[2][1]; +// f32 cam22 = camera->perspectiveMatrix[2][2]; +// f32 cam23 = camera->perspectiveMatrix[2][3]; +// f32 cam30 = camera->perspectiveMatrix[3][0]; +// f32 cam31 = camera->perspectiveMatrix[3][1]; +// f32 cam32 = camera->perspectiveMatrix[3][2]; +// f32 cam33 = camera->perspectiveMatrix[3][3]; +// f32 modelCenterX; +// f32 modelCenterY; +// f32 modelCenterZ; + +// f32 someX; +// f32 someY; +// f32 someZ; + +// Model* model; + +// s32 i; +// s32 skip; +// ModelNodeProperty* propertyList; +// s32 distance; + + +// f32 xDelta; +// f32 yDelta; +// f32 zDelta; + +// f32 row0; +// f32 row1; +// f32 row2; +// f32 row3; + +// f32 row0x3; +// f32 row1x3; + +// RenderTask renderTask; +// RenderTask* renderTaskPtr; + +// ModelTransformGroup* modelTransformGroup; + +// renderTaskPtr = &renderTask; + +// for (i = 0; i < ARRAY_COUNT(*gCurrentModelListPtr); i++) { +// model = (*gCurrentModelListPtr)[i]; + +// if (model != NULL) { +// s32 mflags = model->flags; // todo this is needed to trick the compiler :/ ugly + +// if (model->flags == 0 || mflags & 0x4 || model->flags & 0x2 || mflags & 0x20 || model->flags & 0x8) { +// continue; +// } + +// modelCenterX = model->center.x; +// modelCenterY = model->center.y; +// modelCenterZ = model->center.z; + +// if (model->flags & 0x200) { +// skip = 0; + +// propertyList = model->modelNode->propertyList; +// someX = propertyList[0].dataType; +// someY = propertyList[1].dataType; +// someZ = propertyList[2].dataType; + +// xDelta = modelCenterX - someX; +// yDelta = modelCenterY - someY; +// zDelta = modelCenterZ - someZ; +// row0 = (cam00 * xDelta) + (cam10 * yDelta) + (cam20 * zDelta) + cam30; +// row1 = (cam01 * xDelta) + (cam11 * yDelta) + (cam21 * zDelta) + cam31; +// row2 = (cam02 * xDelta) + (cam12 * yDelta) + (cam22 * zDelta) + cam32; +// row3 = (cam03 * xDelta) + (cam13 * yDelta) + (cam23 * zDelta) + cam33; + + +// if (row3 != 0.0f) { +// row3 = 1.0f / row3; +// row0x3 = row0 * row3; +// row1x3 = row1 * row3; + +// if (!((row2 * row3) > -1.0f) || !(row0x3 >= -1.0f) || !(row0x3 <= 1.0f) || !(row1x3 >= -1.0f) || !(row1x3 <= 1.0f)) { +// if (someX == 0.0f) { +// goto block_21; +// } +// xDelta = modelCenterX + someX; +// yDelta = modelCenterY - someY; +// zDelta = modelCenterZ - someZ; +// row0 = (cam00 * xDelta) + (cam10 * yDelta) + (cam20 * zDelta) + cam30; +// row1 = (cam01 * xDelta) + (cam11 * yDelta) + (cam21 * zDelta) + cam31; +// row2 = (cam02 * xDelta) + (cam12 * yDelta) + (cam22 * zDelta) + cam32; +// row3 = (cam03 * xDelta) + (cam13 * yDelta) + (cam23 * zDelta) + cam33; + +// if (row3 != 0.0f) { +// row3 = 1.0f / row3; +// row0x3 = row0 * row3; +// row1x3 = row1 * row3; + +// if (!((row2 * row3) > -1.0f) || !(row0x3 >= -1.0f) || !(row0x3 <= 1.0f) || !(row1x3 >= -1.0f) || !(row1x3 <= 1.0f)) { +// block_21: +// if (someY == 0.0f) { +// goto block_28; +// } +// xDelta = modelCenterX - someX; +// yDelta = modelCenterY + someY; +// zDelta = modelCenterZ - someZ; +// row0 = (cam00 * xDelta) + (cam10 * yDelta) + (cam20 * zDelta) + cam30; +// row1 = (cam01 * xDelta) + (cam11 * yDelta) + (cam21 * zDelta) + cam31; +// row2 = (cam02 * xDelta) + (cam12 * yDelta) + (cam22 * zDelta) + cam32; +// row3 = (cam03 * xDelta) + (cam13 * yDelta) + (cam23 * zDelta) + cam33; + +// if (row3 != 0.0f) { +// row3 = 1.0f / row3; +// row0x3 = row0 * row3; +// row1x3 = row1 * row3; + +// if (!((row2 * row3) > -1.0f) || !(row0x3 >= -1.0f) || !(row0x3 <= 1.0f) || !(row1x3 >= -1.0f) || !(row1x3 <= 1.0f)) { +// block_28: +// if (!((someX != 0.0f) && (someY != 0.0f))) { +// goto block_36; +// } +// xDelta = modelCenterX + someX; +// yDelta = modelCenterY + someY; +// zDelta = modelCenterZ - someZ; +// row0 = (cam00 * xDelta) + (cam10 * yDelta) + (cam20 * zDelta) + cam30; +// row1 = (cam01 * xDelta) + (cam11 * yDelta) + (cam21 * zDelta) + cam31; +// row2 = (cam02 * xDelta) + (cam12 * yDelta) + (cam22 * zDelta) + cam32; +// row3 = (cam03 * xDelta) + (cam13 * yDelta) + (cam23 * zDelta) + cam33; + +// if (row3 != 0.0f) { +// row3 = 1.0f / row3; +// row0x3 = row0 * row3; +// row1x3 = row1 * row3; + +// if (!(((row2 * row3) > -1.0f) && (row0x3 >= -1.0f) && (row0x3 <= 1.0f) && (row1x3 >= -1.0f))) { +// goto block_37; +// } +// if (!(row1x3 <= 1.0f)) { +// block_36: +// block_37: +// if (someZ == 0.0f) { +// goto block_44; +// } +// xDelta = modelCenterX - someX; +// yDelta = modelCenterY - someY; +// zDelta = modelCenterZ + someZ; +// row0 = (cam00 * xDelta) + (cam10 * yDelta) + (cam20 * zDelta) + cam30; +// row1 = (cam01 * xDelta) + (cam11 * yDelta) + (cam21 * zDelta) + cam31; +// row2 = (cam02 * xDelta) + (cam12 * yDelta) + (cam22 * zDelta) + cam32; +// row3 = (cam03 * xDelta) + (cam13 * yDelta) + (cam23 * zDelta) + cam33; + +// if (row3 != 0.0f) { +// row3 = 1.0f / row3; +// row0x3 = row0 * row3; +// row1x3 = row1 * row3; + +// if (!((row2 * row3) > -1.0f) || !(row0x3 >= -1.0f) || !(row0x3 <= 1.0f) || !(row1x3 >= -1.0f) || !(row1x3 <= 1.0f)) { +// block_44: +// if (!((someX != 0.0f) && (someZ != 0.0f))) { +// goto block_52; +// } +// xDelta = modelCenterX + someX; +// yDelta = modelCenterY - someY; +// zDelta = modelCenterZ + someZ; +// row0 = (cam00 * xDelta) + (cam10 * yDelta) + (cam20 * zDelta) + cam30; +// row1 = (cam01 * xDelta) + (cam11 * yDelta) + (cam21 * zDelta) + cam31; +// row2 = (cam02 * xDelta) + (cam12 * yDelta) + (cam22 * zDelta) + cam32; +// row3 = (cam03 * xDelta) + (cam13 * yDelta) + (cam23 * zDelta) + cam33; + +// if (row3 != 0.0f) { +// row3 = 1.0f / row3; +// row0x3 = row0 * row3; +// row1x3 = row1 * row3; +// if (!((row2 * row3) > -1.0f) || !(row0x3 >= -1.0f) || !(row0x3 <= 1.0f) || !(row1x3 >= -1.0f) || !(row1x3 <= 1.0f)) { +// block_52: +// if (((someY == 0.0f) || (someZ == 0.0f))) { +// goto block_60; +// } +// xDelta = modelCenterX - someX; +// yDelta = modelCenterY + someY; +// zDelta = modelCenterZ + someZ; +// row0 = (cam00 * xDelta) + (cam10 * yDelta) + (cam20 * zDelta) + cam30; +// row1 = (cam01 * xDelta) + (cam11 * yDelta) + (cam21 * zDelta) + cam31; +// row2 = (cam02 * xDelta) + (cam12 * yDelta) + (cam22 * zDelta) + cam32; +// row3 = (cam03 * xDelta) + (cam13 * yDelta) + (cam23 * zDelta) + cam33; + +// if (row3 != 0.0f) { +// row3 = 1.0f / row3; +// row0x3 = row0 * row3; +// row1x3 = row1 * row3; +// if (!((row2 * row3) > -1.0f) || !(row0x3 >= -1.0f) || !(row0x3 <= 1.0f) || !(row1x3 >= -1.0f) || !(row1x3 <= 1.0f)) { +// block_60: +// if (!((someX != 0.0f) && (someY != 0.0f) && (someZ != 0.0f))) { +// goto block_69; +// } else { +// xDelta = modelCenterX + someX; +// yDelta = modelCenterY + someY; +// zDelta = modelCenterZ + someZ; +// row0 = (cam00 * xDelta) + (cam10 * yDelta) + (cam20 * zDelta) + cam30; +// row1 = (cam01 * xDelta) + (cam11 * yDelta) + (cam21 * zDelta) + cam31; +// row2 = (cam02 * xDelta) + (cam12 * yDelta) + (cam22 * zDelta) + cam32; +// row3 = (cam03 * xDelta) + (cam13 * yDelta) + (cam23 * zDelta) + cam33; + +// if (row3 != 0.0f) { +// row3 = 1.0f / row3; +// row0x3 = row0 * row3; +// row1x3 = row1 * row3; + +// if (!((row2 * row3) > -1.0f) || !(row0x3 >= -1.0f) || !(row0x3 <= 1.0f) || !(row1x3 >= -1.0f) || !(row1x3 <= 1.0f)) { +// block_69: +// skip = 1; +// } +// } +// } +// } +// } +// } +// } +// } +// } +// } +// } +// } +// } +// } +// } +// } +// } + +// if (skip) { +// continue; +// } +// } + +// transform_point(camera->perspectiveMatrix, modelCenterX, modelCenterY, modelCenterZ, 1.0f, &row0, &row1, &row2, &row3); +// distance = row2 + 5000.0f; +// if (distance < 0) { +// distance = 0; +// } else if (distance > 10000) { +// distance = 10000; +// } + +// renderTaskPtr->appendGfxArg = model; + +// if (model->modelNode->type == 5) { // todo create type enum, 5 being group +// renderTaskPtr->appendGfx = appendGfx_model_group; +// } else { +// renderTaskPtr->appendGfx = appendGfx_model; +// } + +// renderTaskPtr->distance = -distance; +// renderTaskPtr->renderMode = model->renderMode; +// queue_render_task(renderTaskPtr); +// } +// } + +// for (i = 0; i < ARRAY_COUNT(*gCurrentTransformGroups); i++) { +// modelTransformGroup = (*gCurrentTransformGroups)[i]; +// if (modelTransformGroup != NULL && modelTransformGroup->flags != 0 && !(modelTransformGroup->flags & 4)) { +// f32 cx = modelTransformGroup->center.x; +// f32 cy = modelTransformGroup->center.y; +// f32 cz = modelTransformGroup->center.z; + +// transform_point(camera->perspectiveMatrix, cx, cy, cz, 1.0f, &row0, &row1, &row2, &row3); +// if (row3 == 0.0f) { +// row3 = 1.0f; +// } + +// distance = (row2 / row3) * 10000.0f; + +// if (!(modelTransformGroup->flags & 2)) { +// renderTaskPtr->appendGfx = func_8011800C; +// renderTaskPtr->appendGfxArg = modelTransformGroup; +// renderTaskPtr->distance = -distance; +// renderTaskPtr->renderMode = modelTransformGroup->renderMode; +// queue_render_task(renderTaskPtr); +// } +// } +// } +// } + +INCLUDE_ASM(void, "a5dd0_len_114e0", appendGfx_model_group, Model*); INCLUDE_ASM(s32, "a5dd0_len_114e0", func_80117D00); INCLUDE_ASM(s32, "a5dd0_len_114e0", func_80117E74); -INCLUDE_ASM(s32, "a5dd0_len_114e0", func_8011800C); +INCLUDE_ASM(void, "a5dd0_len_114e0", func_8011800C, Model*); INCLUDE_ASM(s32, "a5dd0_len_114e0", func_801180E8); @@ -1098,13 +1389,13 @@ INCLUDE_ASM(s32, "a5dd0_len_114e0", load_model_transforms); INCLUDE_ASM(s32, "a5dd0_len_114e0", get_model_list_index_from_tree_index, s32 treeIndex); -INCLUDE_ASM(s32, "a5dd0_len_114e0", func_8011B090); +INCLUDE_ASM(s32, "a5dd0_len_114e0", func_8011B090, s32 arg0); INCLUDE_ASM(void, "a5dd0_len_114e0", get_model_center_and_size, u16 modelID, f32* centerX, f32* centerY, f32* centerZ, f32* sizeX, f32* sizeY, f32* sizeZ); -Model* func_8011B1C0(s32 index) { - return (*D_801512E0)[index]; +ModelTransformGroup* func_8011B1C0(s32 index) { + return (*gCurrentTransformGroups)[index]; } INCLUDE_ASM(s32, "a5dd0_len_114e0", func_8011B1D8); @@ -1146,11 +1437,11 @@ void func_8011BAE8(void) { } } - for (i = 0; i < ARRAY_COUNT(*D_801512E0); i++) { - Model* model = (*D_801512E0)[i]; + for (i = 0; i < ARRAY_COUNT(*gCurrentTransformGroups); i++) { + ModelTransformGroup* transformGroup = (*gCurrentTransformGroups)[i]; - if (model != NULL) { - model->flags &= ~0x0400; + if (transformGroup != NULL) { + transformGroup->flags &= ~0x0400; } } } diff --git a/src/cd180_len_38f0.c b/src/cd180_len_38f0.c index 8123284f0d..ad20cfc23e 100644 --- a/src/cd180_len_38f0.c +++ b/src/cd180_len_38f0.c @@ -14,7 +14,7 @@ INCLUDE_ASM(void, "cd180_len_38f0", set_transition_stencil_center, s32 arg0, s32 INCLUDE_ASM(s32, "cd180_len_38f0", set_transition_stencil_center_worldpos); -INCLUDE_ASM(s32, "cd180_len_38f0", set_transition_stencil_alpha); +INCLUDE_ASM(void, "cd180_len_38f0", set_transition_stencil_alpha, s32 arg0, f32 arg1); INCLUDE_ASM(s32, "cd180_len_38f0", clear_transition_stencil); diff --git a/src/evt/cam_api.c b/src/evt/cam_api.c index 360e83d8c3..2fc1f90403 100644 --- a/src/evt/cam_api.c +++ b/src/evt/cam_api.c @@ -81,9 +81,9 @@ ApiStatus func_802CA988(ScriptInstance* script, s32 isInitialCall) { CAM(id)->unk_1C = -round(CAM(id)->currentPitch); CAM(id)->unk_1E = -CAM(id)->currentBlendedYawNegated; - temp1 = CAM(id)->lookAt_obj.x - CAM(id)->lookAt_eye[0]; - temp2 = CAM(id)->lookAt_obj.y - CAM(id)->lookAt_eye[1]; - temp3 = CAM(id)->lookAt_obj.z - CAM(id)->lookAt_eye[2]; + temp1 = CAM(id)->lookAt_obj.x - CAM(id)->lookAt_eye.x; + temp2 = CAM(id)->lookAt_obj.y - CAM(id)->lookAt_eye.y; + temp3 = CAM(id)->lookAt_obj.z - CAM(id)->lookAt_eye.z; CAM(id)->unk_20 = round(sqrtf(SQ(temp1) + SQ(temp2) + SQ(temp3))); CAM(id)->unk_22 = 0; diff --git a/src/evt/map_api.c b/src/evt/map_api.c index 3a339f57f1..123e552e13 100644 --- a/src/evt/map_api.c +++ b/src/evt/map_api.c @@ -7,7 +7,14 @@ typedef struct TempSetZoneEnabled { /* 0x08 */ char unk_08[0x14]; } TempSetZoneEnabled; // size = 0x1C +typedef struct LavaReset { + /* 0x00 */ s32 colliderID; + /* 0x04 */ Vec3f pos; +} LavaReset; // size = 0x10; + extern TempSetZoneEnabled* D_800D91D4; +extern LavaReset* gLavaResetList; +extern s32 D_802DADA4; ApiStatus TranslateModel(ScriptInstance* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; @@ -24,13 +31,13 @@ ApiStatus TranslateModel(ScriptInstance* script, s32 isInitialCall) { model = get_model_from_list_index(modelIndex); if (!(model->flags & 0x400)) { - guTranslateF(&model->transformMatrix, x, y, z); + guTranslateF(model->transformMatrix, x, y, z); model->flags |= 0x1400; } else { Matrix4f mtx; - guTranslateF(&mtx, x, y, z); - guMtxCatF(&mtx, &model->transformMatrix, &model->transformMatrix); + guTranslateF(mtx, x, y, z); + guMtxCatF(mtx, model->transformMatrix, model->transformMatrix); } return ApiStatus_DONE2; @@ -74,13 +81,13 @@ ApiStatus ScaleModel(ScriptInstance* script, s32 isInitialCall) { model = get_model_from_list_index(modelIndex); if (!(model->flags & 0x400)) { - guScaleF(&model->transformMatrix, x, y, z); + guScaleF(model->transformMatrix, x, y, z); model->flags |= 0x1400; } else { Matrix4f mtx; - guScaleF(&mtx, x, y, z); - guMtxCatF(&mtx, &model->transformMatrix, &model->transformMatrix); + guScaleF(mtx, x, y, z); + guMtxCatF(mtx, model->transformMatrix, model->transformMatrix); } return ApiStatus_DONE2; @@ -298,11 +305,106 @@ ApiStatus func_802C9748(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -INCLUDE_ASM(s32, "evt/map_api", TranslateGroup, ScriptInstance* script, s32 isInitialCall); +ApiStatus TranslateGroup(ScriptInstance* script, s32 isInitialCall) { + Bytecode* args = script->ptrReadPos; + s32 var1 = get_variable(script, *args); + s32 index = func_8011B090(var1); + ModelTransformGroup* transformGroup; + f32 x, y, z; -INCLUDE_ASM(s32, "evt/map_api", RotateGroup, ScriptInstance* script, s32 isInitialCall); + if (index == -1) { + func_802C95A0(TranslateModel, script); + return ApiStatus_DONE2; + } -INCLUDE_ASM(s32, "evt/map_api", ScaleGroup, ScriptInstance* script, s32 isInitialCall); + args++; + + x = get_float_variable(script, *args++); + y = get_float_variable(script, *args++); + z = get_float_variable(script, *args++); + + transformGroup = func_8011B1C0(index); + + index = transformGroup->flags & 0x400; // TODO fix weird match + if (!index) { + guTranslateF(transformGroup->matrixB, x, y, z); + transformGroup->flags |= 0x1400; + } else { + Matrix4f mtx; + + guTranslateF(mtx, x, y, z); + guMtxCatF(mtx, transformGroup->matrixB, transformGroup->matrixB); + } + + return ApiStatus_DONE2; +} + +ApiStatus RotateGroup(ScriptInstance* script, s32 isInitialCall) { + Bytecode* args = script->ptrReadPos; + s32 index = func_8011B090(get_variable(script, *args)); + ModelTransformGroup* transformGroup; + f32 a, x, y, z; + + if (index == -1) { + func_802C95A0(RotateModel, script); + return ApiStatus_DONE2; + } + + args++; + + a = get_float_variable(script, *args++); + x = get_float_variable(script, *args++); + y = get_float_variable(script, *args++); + z = get_float_variable(script, *args++); + + transformGroup = func_8011B1C0(index); + + if (!(transformGroup->flags & 0x400)) { + guRotateF(transformGroup->matrixB, a, x, y, z); + transformGroup->flags |= 0x1400; + } else { + Matrix4f mtx; + + guRotateF(mtx, a, x, y, z); + guMtxCatF(mtx, transformGroup->matrixB, transformGroup->matrixB); + } + + return ApiStatus_DONE2; +} + +ApiStatus ScaleGroup(ScriptInstance* script, s32 isInitialCall) { + Bytecode* args = script->ptrReadPos; + s32 var1 = get_variable(script, *args); + s32 index = func_8011B090(var1); + ModelTransformGroup* transformGroup; + f32 x, y, z; + + if (index == -1) { + func_802C95A0(ScaleModel, script); + return ApiStatus_DONE2; + } + + args++; + + x = get_float_variable(script, *args++); + y = get_float_variable(script, *args++); + z = get_float_variable(script, *args++); + + transformGroup = func_8011B1C0(index); + + index = transformGroup->flags & 0x400; // TODO fix weird match + if (!(index)) { + guScaleF(transformGroup->matrixB, x, y, z); + transformGroup->flags |= 0x1400; + } else { + Matrix4f mtx; + + guScaleF(mtx, x, y, z); + guMtxCatF(mtx, transformGroup->matrixB, transformGroup->matrixB); + } + + return ApiStatus_DONE2; +} ApiStatus func_802C9B40(ScriptInstance* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; @@ -313,7 +415,33 @@ ApiStatus func_802C9B40(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -INCLUDE_ASM(s32, "evt/map_api", EnableGroup, ScriptInstance* script, s32 isInitialCall); +ApiStatus EnableGroup(ScriptInstance* script, s32 isInitialCall) { + Bytecode* args = script->ptrReadPos; + s32 index = func_8011B090(get_variable(script, *args)); + s32 flagUnset; + ModelTransformGroup* transformGroup; + + if (index == -1) { + func_802C95A0(EnableModel, script); + return ApiStatus_DONE2; + } + + args++; + + flagUnset = get_variable(script, *args++); + transformGroup = func_8011B1C0(index); + + for (index = transformGroup->minChildModelIndex; index <= transformGroup->maxChildModelIndex; index++) { + Model* model = get_model_from_list_index(index); + if (flagUnset) { + model->flags &= ~0x2; + } else { + model->flags |= 0x2; + } + } + + return ApiStatus_DONE2; +} ApiStatus func_802C9C70(ScriptInstance* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; @@ -325,45 +453,128 @@ ApiStatus func_802C9C70(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -// Sub vs add at the beginning with the colliderList access -#ifdef NON_MATCHING -void modify_collider_family_flags(s32 arg0, s32 arg1, s32 arg2) { - Collider* collider = &gCollisionData.colliderList[arg0]; +void modify_collider_family_flags(s32 index, s32 flags, s32 mode) { + Collider* collider = &gCollisionData.colliderList[index]; if (collider->nextSibling >= 0) { - modify_collider_family_flags(collider->nextSibling, arg1, arg2); + modify_collider_family_flags(collider->nextSibling, flags, mode); } if (collider->firstChild >= 0) { - modify_collider_family_flags(collider->firstChild, arg1, arg2); + modify_collider_family_flags(collider->firstChild, flags, mode); } - switch (arg2) { + switch (mode) { case 0: - collider->flags |= arg1; + collider->flags |= flags; break; case 1: - collider->flags &= ~arg1; + collider->flags &= ~flags; break; case 2: - collider->flags = arg1; + collider->flags = flags; break; case 3: collider->flags &= ~0xFF; - collider->flags |= (u8)arg1; + collider->flags |= flags & 0xFF; break; } } -#else -INCLUDE_ASM(s32, "evt/map_api", modify_collider_family_flags); -#endif -INCLUDE_ASM(s32, "evt/map_api", ModifyColliderFlags, ScriptInstance* script, s32 isInitialCall); +ApiStatus ModifyColliderFlags(ScriptInstance* script, s32 isInitialCall) { + Bytecode* args = script->ptrReadPos; + s32 mode = get_variable(script, *args++); + s32 index = get_variable(script, *args++); + s32 flags = get_variable(script, *args++); + Collider* collider = &gCollisionData.colliderList[index]; -INCLUDE_ASM(s32, "evt/map_api", ResetFromLava, ScriptInstance* script, s32 isInitialCall); + if (collider->firstChild >= 0) { + modify_collider_family_flags(collider->firstChild, flags, mode); + } -INCLUDE_ASM(s32, "evt/map_api", func_802C9FD4); + switch (mode) { + case 0: + collider->flags |= flags; + break; + case 1: + collider->flags &= ~flags; + break; + case 2: + collider->flags = flags; + break; + case 3: + collider->flags &= ~0xFF; + collider->flags |= flags & 0xFF; + break; + } + + return ApiStatus_DONE2; +} + +ApiStatus ResetFromLava(ScriptInstance* script, s32 isInitialCall) { + Bytecode* args = script->ptrReadPos; + CollisionStatus* collisionStatus = &gCollisionStatus; + Collider* collider; + LavaReset* lavaReset; + + if (isInitialCall) { + lavaReset = gLavaResetList = get_variable(script, *args++); + + while (TRUE) { + if (lavaReset->colliderID == -1) { + break; + } + collider = &gCollisionData.colliderList[lavaReset->colliderID]; + if (collider->firstChild >= 0) { + modify_collider_family_flags(collider->firstChild, 0x100, 0); + } + collider->flags |= 0x100; + lavaReset++; + } + + D_802DADA4 = -1; + } + + if (!(collisionStatus->currentFloor & 0x4000)) { + collider = &gCollisionData.colliderList[collisionStatus->currentFloor]; + if (collider->flags & 0x100) { + D_802DADA4 = collisionStatus->currentFloor; + return ApiStatus_BLOCK; + } + } + + return ApiStatus_BLOCK; +} + +s32 func_802C9FD4(f32* outX, f32* outY, f32* outZ) { + Vec4f *temp_v0; + s32 temp_a0; + LavaReset* lavaReset = gLavaResetList; + + if (D_802DADA4 == -1) { + temp_v0 = &(*get_current_map_header()->entryList)[gGameStatusPtr->entryID]; + *outX = temp_v0->x; + *outY = temp_v0->y; + *outZ = temp_v0->z; + return -1; + } + + while (TRUE) { + if (lavaReset->colliderID == -1) { + break; + } + + if (lavaReset->colliderID == D_802DADA4) { + *outX = lavaReset->pos.x; + *outY = lavaReset->pos.y; + *outZ = lavaReset->pos.z; + return 1; + } + lavaReset++; + } + return 0; +} ApiStatus GetColliderCenter(ScriptInstance* script, s32 isInitialCall) { f32 x, y, z; @@ -434,7 +645,30 @@ ApiStatus SetZoneEnabled(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -INCLUDE_ASM(s32, "evt/map_api", goto_map); +void goto_map(ScriptInstance* script, s32 mode) { + Bytecode* args = script->ptrReadPos; + s16 mapID; + s16 areaID; + s16 mapTransitionEffect = 0; + + if (mode == 2) { + areaID = get_variable(script, *args++); + mapID = get_variable(script, *args++); + } else { + get_map_IDs_by_name(get_variable(script, *args++), &areaID, &mapID); + } + + gGameStatusPtr->areaID = areaID; + gGameStatusPtr->mapID = mapID; + gGameStatusPtr->entryID = get_variable(script, *args++); + + if (mode == 1) { + mapTransitionEffect = get_variable(script, *args++); + } + + set_map_transition_effect(mapTransitionEffect); + set_game_mode(5); +} ApiStatus GotoMap(ScriptInstance* script, s32 isInitialCall) { goto_map(script, 0); diff --git a/src/evt/npc_api.c b/src/evt/npc_api.c index 8a384500e2..dc51a482e0 100644 --- a/src/evt/npc_api.c +++ b/src/evt/npc_api.c @@ -1,5 +1,9 @@ #include "common.h" #include "map.h" +#include "npc.h" + +extern s32 D_802DAE40; +extern s32 D_802DAE44; Npc* resolve_npc(ScriptInstance* script, NpcID npcIdOrPtr) { if (npcIdOrPtr == NPC_SELF) { @@ -23,8 +27,23 @@ void set_npc_animation(Npc* npc, u32 arg1) { } } -/// Used in battle scripts. -INCLUDE_ASM(ApiStatus, "evt/npc_api", CreateNpc, ScriptInstance* script, s32 isInitialCall); +ApiStatus CreateNpc(ScriptInstance* script, s32 isInitialCall) { + Bytecode* args = script->ptrReadPos; + NpcID npcID = get_variable(script, *args++); + s32 initialAnim = get_variable(script, *args++); + NpcBlueprint blueprint; + Npc *npc; + + blueprint.flags = 0; + blueprint.initialAnim = initialAnim; + blueprint.onUpdate = NULL; + blueprint.onRender = NULL; + + npc = get_npc_by_index(npc_create_basic(&blueprint)); + npc->npcID = npcID; + disable_npc_shadow(npc); + return ApiStatus_DONE2; +} ApiStatus DeleteNpc(ScriptInstance* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; @@ -207,9 +226,136 @@ ApiStatus SetNpcAnimationSpeed(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -INCLUDE_ASM(s32, "evt/npc_api", NpcMoveTo, ScriptInstance* script, s32 isInitialCall); +ApiStatus NpcMoveTo(ScriptInstance* script, s32 isInitialCall) { + Bytecode* args = script->ptrReadPos; + Npc* npc; + f32 dist; + f32 moveSpeed; -INCLUDE_ASM(s32, "evt/npc_api", _npc_jump_to); + if (isInitialCall) { + script->functionTemp[0].s = 0; + } + + if (script->functionTemp[0].s == 0) { + NpcID npcID = get_variable(script, *args++); + f32 targetX = get_variable(script, *args++); + f32 targetZ = get_variable(script, *args++); + s32 duration = get_variable(script, *args++); + + npc = resolve_npc(script, npcID); + if (npc == NULL) { + return ApiStatus_DONE2; + } + + script->functionTemp[1].s = (s32)npc; + npc->moveToPos.x = targetX; + npc->moveToPos.z = targetZ; + npc->duration = duration; + dist = dist2D(npc->pos.x, npc->pos.z, npc->moveToPos.x, npc->moveToPos.z); + + if (npc->duration == 0) { + npc->duration = dist / npc->moveSpeed; + } else { + npc->moveSpeed = dist / npc->duration; + } + if (npc->duration == 0) { + npc->duration = 1; + } + script->functionTemp[0].s = 1; + } + + npc = (Npc*)script->functionTemp[1].s; + npc->yaw = atan2(npc->pos.x, npc->pos.z, npc->moveToPos.x, npc->moveToPos.z); + npc_move_heading(npc, npc->moveSpeed, npc->yaw); + + if (npc->moveSpeed < 4.0) { + func_8003D660(npc, 0); + } else { + func_8003D660(npc, 1); + } + + dist = dist2D(npc->pos.x, npc->pos.z, npc->moveToPos.x, npc->moveToPos.z); + + moveSpeed = npc->moveSpeed; + if (moveSpeed < 1.0) { + moveSpeed = 1.0f; + } + + if (dist <= moveSpeed) { + return ApiStatus_DONE1; + } + return ApiStatus_BLOCK; +} + +ApiStatus _npc_jump_to(ScriptInstance* script, s32 isInitialCall, s32 snapYaw) { + Bytecode* args = script->ptrReadPos; + f32* yaw = &script->functionTemp[2].f; + Npc* npc; + + if (isInitialCall) { + script->functionTemp[0].s = 0; + } + + if (script->functionTemp[0].s == 0) { + NpcID npcID = get_variable(script, *args++); + f32 xTemp = get_variable(script, *args++); + f32 yTemp = get_variable(script, *args++); + f32 zTemp = get_variable(script, *args++); + s32 duration = get_variable(script, *args++); + f32 dist; + + npc = resolve_npc(script, npcID); + + if (npc == NULL) { + return ApiStatus_DONE2; + } + + script->functionTemp[1].s = (s32)npc; + npc->moveToPos.x = xTemp; + npc->moveToPos.y = yTemp; + npc->moveToPos.z = zTemp; + + npc->duration = duration; + dist = dist2D(npc->pos.x, npc->pos.z, npc->moveToPos.x, npc->moveToPos.z); + *yaw = 0.0f; + if (dist > 2.0) { + *yaw = atan2(npc->pos.x, npc->pos.z, npc->moveToPos.x, npc->moveToPos.z); + if (snapYaw == 0) { + npc->yaw = *yaw; + } + } + + yTemp = npc->moveToPos.y - npc->pos.y; + + if (npc->duration == 0) { + npc->duration = dist / npc->moveSpeed; + } else { + npc->moveSpeed = dist / npc->duration; + } + + npc->flags |= 0x800; + npc->jumpVelocity = (npc->jumpScale * npc->duration * 0.5f) + (yTemp / npc->duration); + script->functionTemp[0].s =1; + } + + npc = (Npc*)script->functionTemp[1].s; + npc_move_heading(npc, npc->moveSpeed, *yaw); + + npc->pos.y += npc->jumpVelocity; + npc->jumpVelocity -= npc->jumpScale; + + npc->duration--; + if (npc->duration < 0) { + npc->jumpVelocity = 0.0f; + npc->pos.x = npc->moveToPos.x; + npc->pos.y = npc->moveToPos.y; + npc->pos.z = npc->moveToPos.z; + npc->flags &= ~0x800; + func_8003D660(npc, 2); + return ApiStatus_DONE1; + } + return ApiStatus_BLOCK; +} ApiStatus NpcJump0(ScriptInstance* script, s32 isInitialCall) { return _npc_jump_to(script, isInitialCall, 0); @@ -219,7 +365,77 @@ ApiStatus NpcJump1(ScriptInstance* script, s32 isInitialCall) { return _npc_jump_to(script, isInitialCall, 1); } -INCLUDE_ASM(s32, "evt/npc_api", NpcFlyTo, ScriptInstance* script, s32 isInitialCall); +ApiStatus NpcFlyTo(ScriptInstance* script, s32 isInitialCall) { + Bytecode* args = script->ptrReadPos; + f32* outX = (f32*)&script->varTable[3]; + f32* outY = (f32*)&script->varTable[4]; + f32* outZ = (f32*)&script->varTable[5]; + Npc* npc; + f32 dist; + f32 yDelta; + + if (isInitialCall) { + npc = resolve_npc(script, get_variable(script, *args++)); + if (npc == NULL) { + return ApiStatus_DONE2; + } + + script->functionTemp[1].s = (s32)npc; + npc->moveToPos.x = get_float_variable(script, *args++); + npc->moveToPos.y = get_float_variable(script, *args++); + npc->moveToPos.z = get_float_variable(script, *args++); + script->varTable[6] = get_variable(script, *args++); + script->functionTemp[2].s = get_variable(script, *args++); + script->functionTemp[3].s = get_variable(script, *args++); + npc->duration = 0; + *outX = npc->pos.x; + *outY = npc->pos.y; + *outZ = npc->pos.z; + npc->yaw = atan2(npc->pos.x, npc->pos.z, npc->moveToPos.x, npc->moveToPos.z); + dist = dist2D(npc->pos.x, npc->pos.z, npc->moveToPos.x, npc->moveToPos.z); + npc->planarFlyDist = dist; + + if (script->varTable[6] == 0) { + script->varTable[6] = (dist / npc->moveSpeed); + } else { + npc->moveSpeed = dist / script->varTable[6]; + } + } + + npc = (Npc*)script->functionTemp[1].s; + npc->pos.x = update_lerp(script->functionTemp[3].s, *outX, npc->moveToPos.x, npc->duration, script->varTable[6]); + npc->pos.y = update_lerp(script->functionTemp[3].s, *outY, npc->moveToPos.y, npc->duration, script->varTable[6]); + npc->pos.z = update_lerp(script->functionTemp[3].s, *outZ, npc->moveToPos.z, npc->duration, script->varTable[6]); + + npc->duration++; + if (npc->duration >= script->varTable[6]) { + npc->pos.x = npc->moveToPos.x; + npc->pos.y = npc->moveToPos.y; + npc->pos.z = npc->moveToPos.z; + return ApiStatus_DONE2; + } + + dist = dist2D(npc->pos.x, npc->pos.z, npc->moveToPos.x, npc->moveToPos.z); + if (dist == 0.0f) { + dist = 1.0f; + } + if (npc->planarFlyDist == 0.0f) { + npc->planarFlyDist = 1.0f; + } + + yDelta = sin_deg((1.0 - (dist / npc->planarFlyDist)) * 180.0); + if (script->functionTemp[2].s == 0) { + yDelta = 0.0f; + } + if (script->functionTemp[2].s < 0) { + yDelta = -yDelta * -script->functionTemp[2].s; + } + if (script->functionTemp[2].s > 0) { + yDelta *= script->functionTemp[2].s; + } + npc->pos.y += yDelta; + return ApiStatus_BLOCK; +} ApiStatus GetNpcYaw(ScriptInstance* script, s32 isInitialCall) { Bytecode* ptrReadPos = script->ptrReadPos; @@ -248,11 +464,143 @@ ApiStatus SetNpcYaw(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -INCLUDE_ASM(s32, "evt/npc_api", InterpNpcYaw, ScriptInstance* script, s32 isInitialCall); +ApiStatus InterpNpcYaw(ScriptInstance* script, s32 isInitialCall) { + PlayerStatus* playerStatus = &gPlayerStatus; + Bytecode* args = script->ptrReadPos; + f32* t1 = &script->functionTemp[1].f; + f32* t2 = &script->functionTemp[2].f; + s32* t3 = &script->functionTemp[3].s; + Npc* npc; -INCLUDE_ASM(s32, "evt/npc_api", NpcFacePlayer, ScriptInstance* script, s32 isInitialCall); + if (isInitialCall) { + NpcID npcID = get_variable(script, *args++); -INCLUDE_ASM(s32, "evt/npc_api", NpcFaceNpc, ScriptInstance* script, s32 isInitialCall); + npc = resolve_npc(script, npcID); + if (npc == NULL) { + return ApiStatus_DONE2; + } + + *t1 = npc->yaw; + *t2 = get_variable(script, *args++) - *t1; + script->functionTemp[0].s = (s32)npc; + *t3 = get_variable(script, *args++); + + if (*t3 == 0) { + npc->yaw += *t2; + return ApiStatus_DONE2; + } + + npc->duration = 0; + + if (*t2 < -180.0f) { + *t2 += 360.0f; + } + if (*t2 > 180.0f) { + *t2 -= 360.0f; + } + } + + npc = (Npc*)script->functionTemp[0].s; + if (*t3 > 0) { + npc->duration++; + npc->yaw = *t1 + ((*t2 * npc->duration) / *t3); + npc->yaw = clamp_angle(npc->yaw); + return !(npc->duration < *t3) * ApiStatus_DONE1; + } + + npc->yaw += *t2; + return ApiStatus_DONE2; +} + +ApiStatus NpcFacePlayer(ScriptInstance* script, s32 isInitialCall) { + PlayerStatus* playerStatus = &gPlayerStatus; + Bytecode* args = script->ptrReadPos; + f32* t1 = &script->functionTemp[1].f; + f32* t2 = &script->functionTemp[2].f; + s32* t3 = &script->functionTemp[3].s; + Npc* npc; + + if (isInitialCall) { + NpcID npcID = get_variable(script, *args++); + + npc = resolve_npc(script, npcID); + if (npc == NULL) { + return ApiStatus_DONE2; + } + + *t1 = npc->yaw; + *t2 = atan2(npc->pos.x, npc->pos.z, playerStatus->position.x, playerStatus->position.z) - *t1; + script->functionTemp[0].s = (s32)npc; + *t3 = get_variable(script, *args++); + npc->duration = 0; + + if (*t2 < -180.0f) { + *t2 += 360.0f; + } + if (*t2 > 180.0f) { + *t2 -= 360.0f; + } + } + + npc = (Npc*)script->functionTemp[0].s; + if (*t3 > 0) { + npc->duration++; + npc->yaw = *t1 + ((*t2 * npc->duration) / *t3); + npc->yaw = clamp_angle(npc->yaw); + return !(npc->duration < *t3) * ApiStatus_DONE1; + } + + npc->yaw += *t2; + return ApiStatus_DONE2; +} + +ApiStatus NpcFaceNpc(ScriptInstance* script, s32 isInitialCall) { + Bytecode* args = script->ptrReadPos; + f32* t1 = &script->functionTemp[1].f; + f32* t2 = &script->functionTemp[2].f; + s32* t3 = &script->functionTemp[3].s; + Npc* npc; + Npc* npc2; + + if (isInitialCall) { + NpcID npcID = get_variable(script, *args++); + NpcID npcID2 = get_variable(script, *args++); + + npc = resolve_npc(script, npcID2); + if (npc == NULL) { + return ApiStatus_DONE2; + } + + npc2 = resolve_npc(script, npcID); + if (npc2 == NULL) { + return ApiStatus_DONE2; + } + + *t1 = npc2->yaw; + *t2 = atan2(npc2->pos.x, npc2->pos.z, npc->pos.x, npc->pos.z) - *t1; + script->functionTemp[0].s = (s32)npc2; + *t3 = get_variable(script, *args++); + npc2->duration = 0; + + if (*t2 < -180.0f) { + *t2 += 360.0f; + } + if (*t2 > 180.0f) { + *t2 -= 360.0f; + } + } + + npc2 = (Npc*)script->functionTemp[0].s; + if (*t3 > 0) { + npc2->duration++; + npc2->yaw = *t1 + ((*t2 * npc2->duration) / *t3); + npc2->yaw = clamp_angle(npc2->yaw); + return !(npc2->duration < *t3) * ApiStatus_DONE1; + } + + npc2->yaw += *t2; + return ApiStatus_DONE2; +} ApiStatus SetNpcFlagBits(ScriptInstance* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; @@ -432,9 +780,171 @@ ApiStatus func_802CF56C(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -INCLUDE_ASM(ApiStatus, "evt/npc_api", BringPartnerOut, ScriptInstance* script, s32 isInitialCall); +s32 BringPartnerOut(ScriptInstance *script, s32 isInitialCall) { + Bytecode* args = script->ptrReadPos; + NpcBlueprint bp; + NpcBlueprint* bpPointer = &bp; + PlayerData* playerData = &gPlayerData; + PlayerStatus* playerStatus = &gPlayerStatus; + Npc* partner; + Npc* npc; + f32 duration; + f32 playerZ; + f32 targetZ; + f32 playerX; + f32 targetX; + f32 targetY; + f32 playerY; -INCLUDE_ASM(ApiStatus, "evt/npc_api", PutPartnerAway, ScriptInstance* script, s32 isInitialCall); + if (isInitialCall) { + D_802DAE40 = get_variable(script, *args++); + if (playerData->currentPartner == D_802DAE40) { + D_802DAE40 = 0; + return ApiStatus_DONE2; + } + + partner = get_npc_unsafe(NPC_PARTNER); + partner->npcID = -5; + + bpPointer->flags = NPC_FLAG_100; + bpPointer->initialAnim = gPartnerAnimations[D_802DAE40].anims[PARTNER_ANIM_FLY]; + bpPointer->onUpdate = NULL; + bpPointer->onRender = NULL; + + D_802DAE44 = npc_create_basic(bpPointer); + npc = get_npc_by_index(D_802DAE44); + npc->collisionRadius = 10; + npc->collisionHeight = 10; + npc->npcID = NPC_PARTNER; + npc->scale.x = 0.0f; + npc->scale.y = 0.0f; + npc->scale.z = 0.0f; + + npc->moveToPos.x = targetX = partner->pos.x; + playerY = playerStatus->position.y; + npc->moveToPos.y = playerStatus->position.y; + npc->moveToPos.z = targetZ = partner->pos.z + 30.0f; + npc->pos.x = playerX = playerStatus->position.x; + npc->pos.y = targetY = playerStatus->position.y + (playerStatus->colliderHeight / 2); + playerZ = playerStatus->position.z; + npc->moveSpeed = 4.0f; + npc->jumpScale = 1.6f; + npc->pos.z = playerZ; + + npc->planarFlyDist = dist2D(playerX, npc->pos.z, targetX, targetZ); + npc->yaw = atan2(playerX, playerZ, targetX, targetZ); + npc->duration = npc->planarFlyDist / npc->moveSpeed; + + if (npc->duration < 10) { + npc->duration = 10; + npc->moveSpeed = npc->planarFlyDist / npc->duration; + } + + npc->jumpVelocity = ((playerY - targetY) + (npc->jumpScale * npc->duration * npc->duration * 0.5f)) / npc->duration; + npc->currentAnim.w = gPartnerAnimations[D_802DAE40].anims[PARTNER_ANIM_WALK]; + return ApiStatus_BLOCK; + } + + npc = get_npc_by_index(D_802DAE44); + npc->jumpVelocity -= npc->jumpScale; + npc->pos.y += npc->jumpVelocity; + if (npc->jumpVelocity <= 0.0f) { + npc->currentAnim.w = gPartnerAnimations[D_802DAE40].anims[PARTNER_ANIM_JUMP]; + } + npc_move_heading(npc, npc->moveSpeed, npc->yaw); + duration = npc->duration; + if (duration > 10.0f) { + duration = 10.0f; + } + npc->scale.x = (10.0f - duration) / 10.0f; + npc->scale.y = npc->scale.x; + npc->scale.z = npc->scale.x; + + npc->duration--; + if (npc->duration < 0) { + npc->currentAnim.w = gPartnerAnimations[D_802DAE40].anims[PARTNER_ANIM_IDLE]; + npc->jumpVelocity = 0.0f; + npc->pos.y = npc->moveToPos.y; + npc->scale.x = 1.0f; + npc->scale.y = 1.0f; + npc->scale.z = 1.0f; + npc->yaw = clamp_angle(npc->yaw + 180.0f); + return ApiStatus_DONE2; + } + return ApiStatus_BLOCK; +} + +ApiStatus PutPartnerAway(ScriptInstance* script, s32 isInitialCall) { + Npc* partner = get_npc_unsafe(NPC_PARTNER); + PlayerStatus* playerStatus = &gPlayerStatus; + f32 scale; + f32 targetX; + f32 targetY; + f32 targetZ; + f32 partnerX; + f32 partnerY; + f32 partnerZ; + + if (isInitialCall) { + if (D_802DAE40 != 0) { + partner->flags &= ~0x200; + partner->flags &= ~8; + targetX = playerStatus->position.x; + partner->moveToPos.x = targetX; + partnerX = partner->pos.x; + targetY = playerStatus->position.y + (playerStatus->colliderHeight / 2); + partner->moveToPos.y = targetY; + partnerY = partner->pos.y; + targetZ = playerStatus->position.z; + partner->moveToPos.z = targetZ; + partnerZ = partner->pos.z; + partner->moveSpeed = 4.0f; + partner->jumpScale = 2.6f; + partner->planarFlyDist = dist2D(partnerX, partnerZ, targetX, targetZ); + partner->yaw = atan2(partnerX, partnerZ, targetX, targetZ); + partner->duration = partner->planarFlyDist / partner->moveSpeed; + + if (partner->duration < 10) { + partner->duration = 10; + partner->moveSpeed = partner->planarFlyDist / partner->duration; + } + + partnerY = targetY - partnerY; + partner->jumpVelocity = (partnerY + (partner->jumpScale * partner->duration * partner->duration * 0.5f)) / partner->duration; + partner->currentAnim.w = gPartnerAnimations[D_802DAE40].anims[PARTNER_ANIM_WALK]; + return ApiStatus_BLOCK; + } else { + return ApiStatus_DONE2; + } + } + + partner->jumpVelocity -= partner->jumpScale; + partner->pos.y += partner->jumpVelocity; + if (partner->jumpVelocity <= 0.0f) { + partner->currentAnim.w = gPartnerAnimations[D_802DAE40].anims[PARTNER_ANIM_JUMP]; + } + npc_move_heading(partner, partner->moveSpeed, partner->yaw); + + scale = partner->duration; + if (scale > 10.0f) { + scale = 10.0f; + } + + partner->scale.x = scale / 10.0f; + partner->scale.y = partner->scale.x; + partner->scale.z = partner->scale.x; + + partner->duration--; + if (partner->duration < 0) { + partner->currentAnim.w = gPartnerAnimations[D_802DAE40].anims[PARTNER_ANIM_FALL]; + partner->jumpVelocity = 0.0f; + partner->pos.y = partner->moveToPos.y; + npc_free_by_index(D_802DAE44); + get_npc_unsafe(-5)->npcID = NPC_PARTNER; + return ApiStatus_DONE2; + } + return ApiStatus_BLOCK; +} ApiStatus GetCurrentPartnerID(ScriptInstance* script, s32 isInitialCall) { set_variable(script, *script->ptrReadPos, gPlayerData.currentPartner); diff --git a/src/evt/script_list.c b/src/evt/script_list.c index 109bf6923a..c78efb5d34 100644 --- a/src/evt/script_list.c +++ b/src/evt/script_list.c @@ -418,7 +418,44 @@ ScriptInstance* restart_script(ScriptInstance* script) { return script; } -INCLUDE_ASM(s32, "evt/script_list", update_scripts); +void update_scripts(void) { + if (gGameStatusPtr->disableScripts != TRUE) { + s32 i; + + gIsUpdatingScripts = TRUE; + sort_scripts(); + + for (i = 0; i < gScriptListCount; i++) { + ScriptInstance* script = (*gCurrentScriptListPtr)[gScriptIndexList[i]]; + + if (script != NULL && script->id == gScriptIdList[i] && script->state != 0 && !(script->state & 0x92)) { + s32 stop = FALSE; + s32 status; + + script->frameCounter += script->timeScale; + + do { + if (script->frameCounter < 1.0) { + // Continue to next script + break; + }; + + script->frameCounter -= 1.0; + status = si_execute_next_command(script); + if (status == 1) { + stop = TRUE; + break; + } + } while (status != -1); + + if (stop) { + break; + } + } + } + gIsUpdatingScripts = FALSE; + } +} // this function is evil. INCLUDE_ASM(s32, "evt/script_list", func_802C3EE4); diff --git a/src/evt/si.c b/src/evt/si.c index 7bb08f730d..016aea510c 100644 --- a/src/evt/si.c +++ b/src/evt/si.c @@ -1135,14 +1135,16 @@ ApiStatus si_handle_bind_lock(ScriptInstance* script) { return ApiStatus_DONE2; } -INCLUDE_ASM(s32, "evt/si", si_handle_spawn_thread, ScriptInstance* script, s32 isInitialCall); +ApiStatus si_handle_spawn_thread(ScriptInstance* script); +INCLUDE_ASM(s32, "evt/si", si_handle_spawn_thread, ScriptInstance* script); ApiStatus si_handle_end_spawn_thread(ScriptInstance* script) { kill_script(script); return ApiStatus_FINISH; } -INCLUDE_ASM(s32, "evt/si", si_handle_parallel_thread, ScriptInstance* script, s32 isInitialCall); +ApiStatus si_handle_parallel_thread(ScriptInstance* script); +INCLUDE_ASM(ApiStatus, "evt/si", si_handle_parallel_thread, ScriptInstance* script); ApiStatus si_handle_end_parallel_thread(ScriptInstance* script) { kill_script(script); @@ -1153,7 +1155,8 @@ ApiStatus func_802C6E14(ScriptInstance* script) { return ApiStatus_DONE2; } -INCLUDE_ASM(s32, "evt/si", si_handle_print_debug_var, ScriptInstance* script, s32 isInitialCall); +ApiStatus si_handle_print_debug_var(ScriptInstance* script); +INCLUDE_ASM(ApiStatus, "evt/si", si_handle_print_debug_var, ScriptInstance* script); ApiStatus func_802C739C(ScriptInstance* script) { script->ptrSavedPosition = (Bytecode*)*script->ptrReadPos; @@ -1175,7 +1178,339 @@ s32 func_802C73B8(ScriptInstance* script) { return 1; } -INCLUDE_ASM(s32, "evt/si", si_execute_next_command); +s32 si_execute_next_command(ScriptInstance *script) { + while (TRUE) { + s32 status = ApiStatus_DONE2; + s32* lines; + s32 nargs; + + switch (script->currentOpcode) { + case 0: + script->ptrCurrentLine = script->ptrNextLine; + lines = script->ptrNextLine; + script->currentOpcode = *lines++; + nargs = *lines++; + script->ptrReadPos = lines; + script->blocked = FALSE; + script->currentArgc = nargs; + lines = &lines[nargs]; + script->ptrNextLine = lines; + status = ApiStatus_REPEAT; + break; + case ScriptOpcode_RETURN: + status = si_handle_return(script); + break; + case ScriptOpcode_LABEL: + status = si_handle_label(script); + break; + case ScriptOpcode_GOTO: + status = si_handle_goto(script); + break; + case ScriptOpcode_LOOP: + status = si_handle_loop(script); + break; + case ScriptOpcode_END_LOOP: + status = si_handle_end_loop(script); + break; + case ScriptOpcode_BREAK_LOOP: + status = si_handle_break_loop(script); + break; + case ScriptOpcode_SLEEP_FRAMES: + status = si_handle_sleep_frames(script); + break; + case ScriptOpcode_SLEEP_SECS: + status = si_handle_sleep_seconds(script); + break; + case ScriptOpcode_IF_EQ: + status = si_handle_if_equal(script); + break; + case ScriptOpcode_IF_NE: + status = si_handle_if_not_equal(script); + break; + case ScriptOpcode_IF_LT: + status = si_handle_if_less(script); + break; + case ScriptOpcode_IF_GT: + status = si_handle_if_greater(script); + break; + case ScriptOpcode_IF_LE: + status = si_handle_if_less_equal(script); + break; + case ScriptOpcode_IF_GE: + status = si_handle_if_greater_equal(script); + break; + case ScriptOpcode_IF_FLAG: + status = si_handle_if_flag(script); + break; + case ScriptOpcode_IF_NOT_FLAG: + status = si_handle_if_not_flag(script); + break; + case ScriptOpcode_ELSE: + status = si_handle_else(script); + break; + case ScriptOpcode_END_IF: + status = si_handle_end_if(script); + break; + case ScriptOpcode_MATCH: + status = si_handle_match(script); + break; + case ScriptOpcode_MATCH_CONST: + status = si_handle_match_const(script); + break; + case ScriptOpcode_CASE_EQ: + status = si_handle_case_equal(script); + break; + case ScriptOpcode_CASE_NE: + status = si_handle_case_not_equal(script); + break; + case ScriptOpcode_CASE_LT: + status = si_handle_case_less(script); + break; + case ScriptOpcode_CASE_LE: + status = si_handle_case_less_equal(script); + break; + case ScriptOpcode_CASE_GT: + status = si_handle_case_greater(script); + break; + case ScriptOpcode_CASE_GE: + status = si_handle_case_greater_equal(script); + break; + case ScriptOpcode_CASE_ELSE: + status = si_handle_case_else(script); + break; + case ScriptOpcode_BREAK_MATCH: + status = si_handle_break_match(script); + break; + case ScriptOpcode_CASE_MULTI_OR_EQ: + status = si_handle_case_multi_or_equal(script); + break; + case ScriptOpcode_END_CASE_MULTI: + status = si_handle_end_case_multi(script); + break; + case ScriptOpcode_CASE_MULTI_AND_EQ: + status = si_handle_case_multi_and_equal(script); + break; + case ScriptOpcode_CASE_FLAG: + status = si_handle_case_flag(script); + break; + case ScriptOpcode_CASE_RANGE: + status = si_handle_case_range(script); + break; + case ScriptOpcode_END_MATCH: + status = si_handle_end_match(script); + break; + case ScriptOpcode_SET: + status = si_handle_set_var(script); + break; + case ScriptOpcode_SET_CONST: + status = si_handle_set_const(script); + break; + case ScriptOpcode_SET_F: + status = si_handle_set_float(script); + break; + case ScriptOpcode_ADD: + status = si_handle_add(script); + break; + case ScriptOpcode_SUB: + status = si_handle_subtract(script); + break; + case ScriptOpcode_MUL: + status = si_handle_multiply(script); + break; + case ScriptOpcode_DIV: + status = si_handle_divide(script); + break; + case ScriptOpcode_MOD: + status = si_handle_mod(script); + break; + case ScriptOpcode_ADD_F: + status = si_handle_addF(script); + break; + case ScriptOpcode_SUB_F: + status = si_handle_subtractF(script); + break; + case ScriptOpcode_MUL_F: + status = si_handle_multiplyF(script); + break; + case ScriptOpcode_DIV_F: + status = si_handle_divideF(script); + break; + case ScriptOpcode_USE_BUFFER: + status = si_handle_set_int_buffer_ptr(script); + break; + case ScriptOpcode_BUFFER_READ_1: + status = si_handle_get_1_word(script); + break; + case ScriptOpcode_BUFFER_READ_2: + status = si_handle_get_2_word(script); + break; + case ScriptOpcode_BUFFER_READ_3: + status = si_handle_get_3_word(script); + break; + case ScriptOpcode_BUFFER_READ_4: + status = si_handle_get_4_word(script); + break; + case ScriptOpcode_BUFFER_PEEK: + status = si_handle_get_Nth_word(script); + break; + case ScriptOpcode_USE_BUFFER_F: + status = si_handle_set_float_buffer_ptr(script); + break; + case ScriptOpcode_BUFFER_READ_1_F: + status = si_handle_get_1_float(script); + break; + case ScriptOpcode_BUFFER_READ_2_F: + status = si_handle_get_2_float(script); + break; + case ScriptOpcode_BUFFER_READ_3_F: + status = si_handle_get_3_float(script); + break; + case ScriptOpcode_BUFFER_READ_4_F: + status = si_handle_get_4_float(script); + break; + case ScriptOpcode_BUFFER_PEEK_F: + status = si_handle_get_Nth_float(script); + break; + case ScriptOpcode_USE_ARRAY: + status = si_handle_set_array(script); + break; + case ScriptOpcode_USE_FLAGS: + status = si_handle_set_flag_array(script); + break; + case ScriptOpcode_NEW_ARRAY: + status = si_handle_allocate_array(script); + break; + case ScriptOpcode_KILL_SCRIPT: + status = si_handle_kill_script(script); + break; + case ScriptOpcode_AND: + status = si_handle_AND(script); + break; + case ScriptOpcode_AND_CONST: + status = si_handle_AND_const(script); + break; + case ScriptOpcode_OR: + status = si_handle_OR(script); + break; + case ScriptOpcode_OR_CONST: + status = si_handle_OR_const(script); + break; + case ScriptOpcode_CALL: + status = si_handle_call(script); + break; + case ScriptOpcode_SPAWN_SCRIPT: + status = si_handle_spawn_script(script); + break; + case ScriptOpcode_SPAWN_GET_ID: + status = si_handle_spawn_script_get_id(script); + break; + case ScriptOpcode_AWAIT_SCRIPT: + status = si_handle_await_script(script); + break; + case ScriptOpcode_BIND_TRIGGER: + status = si_handle_bind_trigger(script); + break; + case ScriptOpcode_UNBIND: + status = si_handle_unbind(script); + break; + case ScriptOpcode_SET_PRIORITY: + status = si_handle_set_priority(script); + break; + case ScriptOpcode_SET_TIMESCALE: + status = si_handle_set_timescale(script); + break; + case ScriptOpcode_SET_GROUP: + status = si_handle_set_group(script); + break; + case ScriptOpcode_JUMP: + status = si_handle_jump(script); + break; + case ScriptOpcode_BIND_PADLOCK: + status = si_handle_bind_lock(script); + break; + case ScriptOpcode_SUSPEND_GROUP: + status = si_handle_suspend_all(script); + break; + case ScriptOpcode_RESUME_GROUP: + status = si_handle_resume_all(script); + break; + case ScriptOpcode_SUSPEND_OTHERS: + status = si_handle_suspend_others(script); + break; + case ScriptOpcode_RESUME_OTHERS: + status = si_handle_resume_others(script); + break; + case ScriptOpcode_SUSPEND_SCRIPT: + status = si_handle_suspend_script(script); + break; + case ScriptOpcode_RESUME_SCRIPT: + status = si_handle_resume_script(script); + break; + case ScriptOpcode_SCRIPT_EXISTS: + status = si_handle_does_script_exist(script); + break; + case ScriptOpcode_SPAWN_THREAD: + status = si_handle_spawn_thread(script); + break; + case ScriptOpcode_END_SPAWN_THREAD: + status = si_handle_end_spawn_thread(script); + break; + case ScriptOpcode_PARALLEL_THREAD: + status = si_handle_parallel_thread(script); + break; + case ScriptOpcode_END_PARALLEL_THREAD: + status = si_handle_end_parallel_thread(script); + break; + case ScriptOpcode_90: + status = func_802C6E14(script); + break; + case ScriptOpcode_DEBUG_PRINT: + status = si_handle_print_debug_var(script); + break; + case ScriptOpcode_92: + status = func_802C739C(script); + break; + case ScriptOpcode_93: + status = func_802C73B0(script); + break; + case ScriptOpcode_94: + status = func_802C73B8(script); + case ScriptOpcode_END: + break; + default: + PANIC(); + } + + if (status == ApiStatus_REPEAT) { + continue; + } + + if (status == ApiStatus_FINISH) { + return -1; + } + + if (status < 0) { + return 1; + } + + // TODO: this may be able to be a switch but I couldn't get it + if (status == ApiStatus_BLOCK) { + // return 0 + } else if (status == ApiStatus_DONE1) { + script->currentOpcode = 0; + // return 0 + } else if (status == ApiStatus_DONE2) { + script->currentOpcode = 0; + if (gGameStatusPtr->disableScripts != status) { + continue; + } + // return 0 + } else { + continue; + } + return 0; + } +} // TODO: consider renaming to si_get_variable #ifdef NON_MATCHING @@ -1395,9 +1730,7 @@ Bytecode* si_find_label(ScriptInstance* script, s32 arg1) { return ret; } -INCLUDE_ASM(Bytecode*, "evt/si", si_skip_if, ScriptInstance* script); -// Matching but needs rodata support -/*Bytecode* si_skip_if(ScriptInstance* script) { +Bytecode* si_skip_if(ScriptInstance* script) { s32 nestedIfDepth = 0; Bytecode* pos = script->ptrNextLine; Bytecode opcode; @@ -1407,37 +1740,36 @@ INCLUDE_ASM(Bytecode*, "evt/si", si_skip_if, ScriptInstance* script); opcode = *pos++; nargs = *pos++; pos += nargs; + switch(opcode) { - case 1: + case ScriptOpcode_END: PANIC(); - case 10: - case 11: - case 12: - case 13: - case 14: - case 15: - case 16: - case 19: + case ScriptOpcode_END_IF: nestedIfDepth--; if (nestedIfDepth < 0) { return pos; } break; - case 17: + case ScriptOpcode_IF_EQ: + case ScriptOpcode_IF_NE: + case ScriptOpcode_IF_LT: + case ScriptOpcode_IF_GT: + case ScriptOpcode_IF_LE: + case ScriptOpcode_IF_GE: + case ScriptOpcode_IF_FLAG: + case ScriptOpcode_IF_NOT_FLAG: nestedIfDepth++; break; - case 18: + case ScriptOpcode_ELSE: if (nestedIfDepth == 0) { return pos; } break; } } while(1); -}*/ +} -INCLUDE_ASM(Bytecode*, "evt/si", si_skip_else, ScriptInstance* script); -// Matching but needs rodata support -/*Bytecode* si_skip_else(ScriptInstance* script) { +Bytecode* si_skip_else(ScriptInstance* script) { s32 nestedIfDepth = 0; Bytecode* pos = script->ptrNextLine; Bytecode opcode; @@ -1447,32 +1779,88 @@ INCLUDE_ASM(Bytecode*, "evt/si", si_skip_else, ScriptInstance* script); opcode = *pos++; nargs = *pos++; pos += nargs; + switch(opcode) { - case 1: + case ScriptOpcode_END: PANIC(); - case 10: - case 11: - case 12: - case 13: - case 14: - case 15: - case 16: - case 19: + case ScriptOpcode_END_IF: nestedIfDepth--; if (nestedIfDepth < 0) { return pos; } break; - case 17: + // If this isn't copy-pasted at least once, the function breaks, so + // might as well be consistent + case ScriptOpcode_IF_EQ: + nestedIfDepth++; + break; + case ScriptOpcode_IF_NE: + nestedIfDepth++; + break; + case ScriptOpcode_IF_LT: + nestedIfDepth++; + break; + case ScriptOpcode_IF_GT: + nestedIfDepth++; + break; + case ScriptOpcode_IF_LE: + nestedIfDepth++; + break; + case ScriptOpcode_IF_GE: + nestedIfDepth++; + break; + case ScriptOpcode_IF_FLAG: + nestedIfDepth++; + break; + case ScriptOpcode_IF_NOT_FLAG: nestedIfDepth++; break; - } } while(1); -}*/ +} INCLUDE_ASM(Bytecode*, "evt/si", si_goto_end_case, ScriptInstance* script); -INCLUDE_ASM(Bytecode*, "evt/si", si_goto_next_case, ScriptInstance* script); +Bytecode* si_goto_next_case(ScriptInstance* script) { + s32 switchDepth = 1; + Bytecode* pos = script->ptrNextLine; + s32* opcode; + s32* nargs; + + do { + opcode = pos++; + nargs = pos++; + pos += *nargs; + + switch (*opcode) { + case ScriptOpcode_END: + PANIC(); + case ScriptOpcode_MATCH: + switchDepth++; + break; + case ScriptOpcode_END_MATCH: + switchDepth--; + if (switchDepth == 0) { + return opcode; + } + break; + case ScriptOpcode_CASE_EQ: + case ScriptOpcode_CASE_NE: + case ScriptOpcode_CASE_LT: + case ScriptOpcode_CASE_GT: + case ScriptOpcode_CASE_LE: + case ScriptOpcode_CASE_GE: + case ScriptOpcode_CASE_ELSE: + case ScriptOpcode_CASE_MULTI_OR_EQ: + case ScriptOpcode_CASE_MULTI_AND_EQ: + case ScriptOpcode_END_CASE_MULTI: + case ScriptOpcode_CASE_RANGE: + if (switchDepth == 1) { + return opcode; + } + break; + } + } while(1); +} INCLUDE_ASM(Bytecode*, "evt/si", si_goto_end_loop, ScriptInstance* script); diff --git a/src/f270_len_1190.c b/src/f270_len_1190.c index bc6d8d8192..9b5b4e5118 100644 --- a/src/f270_len_1190.c +++ b/src/f270_len_1190.c @@ -88,9 +88,9 @@ void state_init_logos(void) { gCameras[0].unk_1C = 0; gCameras[0].unk_20 = 100; gCameras[0].unk_22 = 0; - gCameras[0].lookAt_eye[0] = 500.0f; - gCameras[0].lookAt_eye[1] = 1000.0f; - gCameras[0].lookAt_eye[2] = 1500.0f; + gCameras[0].lookAt_eye.x = 500.0f; + gCameras[0].lookAt_eye.y = 1000.0f; + gCameras[0].lookAt_eye.z = 1500.0f; gCameras[0].unk_5C = 150.0f; clear_script_list(); clear_dynamic_entity_list(); diff --git a/src/npc.c b/src/npc.c index 452a26f749..096dc0457c 100644 --- a/src/npc.c +++ b/src/npc.c @@ -163,8 +163,8 @@ s32 npc_create(NpcBlueprint* blueprint, NpcAnimID** animList, s32 skipLoadingAni return i; } -void npc_create_basic(NpcBlueprint* blueprint) { - npc_create(blueprint, NULL, FALSE); +s32 npc_create_basic(NpcBlueprint* blueprint) { + return npc_create(blueprint, NULL, FALSE); } void npc_create_standard(NpcBlueprint* blueprint, NpcAnimID** animList) { @@ -804,7 +804,7 @@ INCLUDE_ASM(s32, "npc", func_8003BA60); INCLUDE_ASM(s32, "npc", func_8003BED8); -void func_8003C3D8(Npc* npc, s32 idx, s8 decorationType) { +void func_8003C3D8(Npc* npc, s32 idx, s32 decorationType) { func_8003C53C(npc, idx); npc->decorationType[idx] = decorationType; npc->changedDecoration[idx] = 1; @@ -1240,7 +1240,7 @@ void func_8003D3BC(Npc* npc) { INCLUDE_ASM(void, "npc", func_8003D3BC, Npc* npc); #endif -void func_8003D624(Npc* npc, s16 arg1, s16 arg2, s16 arg3, s32 arg4, s32 arg5, s32 arg6) { +void func_8003D624(Npc* npc, s32 arg1, s32 arg2, s32 arg3, s32 arg4, s32 arg5, s32 arg6) { npc->unk_98 = arg1; npc->unk_9A = arg2; npc->unk_9C = arg3; @@ -1731,7 +1731,7 @@ Enemy* get_enemy_safe(s32 npcID) { for (i = 0; i < currentEncounterStatus->numEncounters; i++) { Encounter* currentEncounter = currentEncounterStatus->encounterList[i]; - + if (currentEncounter != NULL) { for (j = 0; j < currentEncounter->count; j++) { Enemy* currentEnemy = currentEncounter->enemy[j]; diff --git a/src/npc.h b/src/npc.h index 40dfec494a..cd6c80fca1 100644 --- a/src/npc.h +++ b/src/npc.h @@ -22,7 +22,7 @@ void npc_iter_no_op(void); s32 npc_create(NpcBlueprint* blueprint, NpcAnimID** animList, s32 skipLoadingAnims); -void npc_create_basic(NpcBlueprint* blueprint); +s32 npc_create_basic(NpcBlueprint* blueprint); void npc_create_standard(NpcBlueprint* blueprint, NpcAnimID** animList); @@ -102,7 +102,7 @@ s32 func_8003BA60(); s32 func_8003BED8(); -void func_8003C3D8(Npc* npc, s32 idx, s8 decorationType); +void func_8003C3D8(Npc* npc, s32 idx, s32 decorationType); void func_8003C428(Npc* npc, s32 idx); @@ -174,7 +174,7 @@ s32 func_8003D2F8(Npc* npc); void func_8003D3BC(Npc* npc); -void func_8003D624(Npc* npc, s16 arg1, s16 arg2, s16 arg3, s32 arg4, s32 arg5, s32 arg6); +void func_8003D624(Npc* npc, s32 arg1, s32 arg2, s32 arg3, s32 arg4, s32 arg5, s32 arg6); void func_8003D660(Npc* npc, s32 arg1); @@ -252,16 +252,16 @@ void bind_npc_aux(s32 npcID, Script* npcAuxBytecode); void bind_npc_interact(s32 npcID, Script* npcInteractBytecode); /// Looks for an enemy matching the specified npcID. -/// +/// /// @param npcID ID of the npc bound to the desired enemy. -/// +/// /// @returns pointer to Enemy struct, if one is found. If one is not found, a panic occurs. Enemy* get_enemy(NpcID npcID); /// Same as get_enemy(), with the exception of always returning a value if an enemy is not found. /// /// @param npcID ID of the npc bound to the desired enemy. -/// +/// /// @returns pointer to Enemy struct, if one is found. Otherwise, NULL. Enemy* get_enemy_safe(s32 npcID); diff --git a/src/world/action/hammer.c b/src/world/action/hammer.c index 388c83ab7b..a377fe3f12 100644 --- a/src/world/action/hammer.c +++ b/src/world/action/hammer.c @@ -1,6 +1,15 @@ #include "common.h" -extern Vec3f* D_802B6DB0_E25C80; +typedef struct HammerUnk { + /* 0x00 */ Vec3f unk_00; + /* 0x0C */ s32 unk_0C; + /* 0x10 */ s32 unk_10; + /* 0x14 */ s32 unk_14; + /* 0x18 */ s32 unk_18; + /* 0x1C */ s32 unk_1C; +} HammerUnk; + +extern HammerUnk* D_802B6DB0_E25C80; s32 func_802B6000_E24ED0(s32 arg0) { if (arg0 & 0x1000000) { @@ -61,9 +70,9 @@ void func_802B6048_E24F18(s32 arg0) { zTemp = playerStatus->position.z + cosTheta; } else { phi_s3 = 3; - xTemp = D_802B6DB0_E25C80->x + sinTheta; - yTemp = D_802B6DB0_E25C80->y + playerStatus->colliderHeight - 5.0f; - zTemp = D_802B6DB0_E25C80->z + cosTheta; + xTemp = D_802B6DB0_E25C80->unk_00.x + sinTheta; + yTemp = D_802B6DB0_E25C80->unk_00.y + playerStatus->colliderHeight - 5.0f; + zTemp = D_802B6DB0_E25C80->unk_00.z + cosTheta; phi_s1 = 1; } @@ -97,6 +106,60 @@ void func_802B6048_E24F18(s32 arg0) { INCLUDE_ASM(s32, "world/action/hammer", func_802B62A4_E25174); -INCLUDE_ASM(void, "world/action/hammer", func_802B66A8_E25578, void); +void func_802B66A8_E25578(void) { + PlayerStatus* playerStatus = &gPlayerStatus; + + D_802B6DB0_E25C80->unk_1C = 0; + + if (playerStatus->flags < 0) { + s32 animID; + s32 soundID; + + playerStatus->flags &= ~0x80000000; + playerStatus->flags |= 0x200000; + D_802B6DB0_E25C80->unk_18 = 0; + playerStatus->fallState = 0; + playerStatus->currentSpeed = 0.0f; + playerStatus->unk_BC = 0; + D_802B6DB0_E25C80->unk_10 = func_802B62A4_E25174(D_802B6DB0_E25C80); + + if (gPlayerData.hammerLevel == 2) { + soundID = 0x2117; + animID = 0x6001A; + if (D_802B6DB0_E25C80->unk_10 < 0) { + animID = 0x60018; + soundID = 0x2117; + } + } else if (gPlayerData.hammerLevel == 1) { + soundID = 0x2116; + animID = 0x60016; + if (D_802B6DB0_E25C80->unk_10 < 0) { + soundID = 0x2116; + animID = 0x60014; + } + } else { + soundID = 0x2115; + animID = 0x60012; + if (D_802B6DB0_E25C80->unk_10 < 0) { + soundID = 0x2115; + animID = 0x60010; + } + } + + func_800DFEFC(animID); + sfx_play_sound_at_player(soundID, 0); + D_802B6DB0_E25C80->unk_0C = 0; + D_802B6DB0_E25C80->unk_14 = 0; + } + + playerStatus->flags &= ~0x1000000; + if (D_802B6DB0_E25C80->unk_18 < 3 && (playerStatus->flags & 0x40000)) { + playerStatus->flags |= 0x20000000; + } else if (D_802B6DB0_E25C80->unk_18 < 2) { + D_802B6DB0_E25C80->unk_18++; + } else { + func_802B6820_E256F0(D_802B6DB0_E25C80); + } +} INCLUDE_ASM(s32, "world/action/hammer", func_802B6820_E256F0); diff --git a/src/world/action/hit_fire.c b/src/world/action/hit_fire.c index 8686a3bab7..e8622863f7 100644 --- a/src/world/action/hit_fire.c +++ b/src/world/action/hit_fire.c @@ -1,3 +1,59 @@ #include "common.h" -INCLUDE_ASM(void, "world/action/hit_fire", func_802B6000_E27C90, void); +extern f32 D_802B62B0; + +void func_802B6000_E27C90(void) { + PlayerStatus* playerStatus = &gPlayerStatus; + f32 sinTheta; + f32 cosTheta; + f32 speed; + + if (playerStatus->flags < 0) { + playerStatus->flags &= ~0x80000000; + playerStatus->animFlags |= 4; + playerStatus->flags |= (0x800 | 0x8); + func_800DFF78(0x10019); + playerStatus->fallState = 0; + playerStatus->gravityIntegrator[0] = 18.3473f; + playerStatus->gravityIntegrator[1] = -3.738f; + playerStatus->gravityIntegrator[2] = 0.8059f; + playerStatus->gravityIntegrator[3] = -0.0987f; + gCameras->moveFlags |= 1; + D_802B62B0 = atan2(playerStatus->position.x, playerStatus->position.z, playerStatus->lastGoodPosition.x, playerStatus->lastGoodPosition.z); + playerStatus->currentSpeed = func_800E0088(playerStatus->lastGoodPosition.x, playerStatus->lastGoodPosition.z) / 18.0f; + subtract_hp(1); + open_status_menu_long(); + gOverrideFlags |= 0x40; + } + + sin_cos_rad(D_802B62B0 * TAU / 360.0f, &sinTheta, &cosTheta); + speed = playerStatus->currentSpeed; + + if (playerStatus->flags & 0x40000) { + speed *= 0.5; + } + + playerStatus->position.x += speed * sinTheta; + playerStatus->position.z -= speed * cosTheta; + + if (playerStatus->fallState == 0) { + integrate_gravity(); + playerStatus->position.y += playerStatus->gravityIntegrator[0]; + if (playerStatus->gravityIntegrator[0] < 0.0f) { + playerStatus->fallState = 1; + playerStatus->flags |= 4; + } + } else { + s32 collider; + + playerStatus->position.y = func_800E3514(func_800E34D8(), &collider); + if (collider >= 0) { + collider = get_collider_type_by_id(collider); + set_action_state(ACTION_STATE_LAND); + playerStatus->unk_10 = 60; + playerStatus->unk_BF = 0; + playerStatus->flags &= ~0x800; + gOverrideFlags &= ~0x40; + } + } +} diff --git a/src/world/action/sneaky_parasol.c b/src/world/action/sneaky_parasol.c index 0bb402f4b9..cb8ff2aa44 100644 --- a/src/world/action/sneaky_parasol.c +++ b/src/world/action/sneaky_parasol.c @@ -1,7 +1,63 @@ #include "common.h" +#include "npc.h" -INCLUDE_ASM(s32, "world/action/sneaky_parasol", func_802B6000_E2A6B0); +typedef struct SneakyParasolUnk { + /* 0x00 */ Vec3f unk_00; + /* 0x0C */ s32 unk_0C; + /* 0x10 */ s32 unk_10; + /* 0x14 */ s32 unk_14; + /* 0x18 */ s32 unk_18; + /* 0x1C */ f32 unk_1C; + /* 0x20 */ f32 unk_20; +} SneakyParasolUnk; + +extern SneakyParasolUnk D_802B6E80; + +f64 fabs(f64 f); + +#ifdef NON_MATCHING +Npc* func_802B6000_E2A6B0(void) { + PlayerStatus* playerStatus = &gPlayerStatus; + f32 angle; + Npc* ret = NULL; + + if (playerStatus->unk_0D != 0) { + if (gGameStatusPtr->peachFlags & 8) { + gGameStatusPtr->peachFlags &= ~0x8; + } else { + ret = npc_find_near(playerStatus->position.x, playerStatus->position.y, playerStatus->position.z, 100.0f); + + if (ret != NULL) { + if (fabs(ret->pos.y - playerStatus->position.y) - 1.0 > 0.0) { + ret = NULL; + } else { + angle = clamp_angle(atan2(playerStatus->position.x, playerStatus->position.z, ret->pos.x, ret->pos.z)); + if (fabs(angle - func_800E5348()) > 30.0) { + ret = NULL; + } + } + } + } + } + + return ret; +} +#else +INCLUDE_ASM(Npc*, "world/action/sneaky_parasol", func_802B6000_E2A6B0, void); +#endif INCLUDE_ASM(s32, "world/action/sneaky_parasol", func_802B6120_E2A7D0); -INCLUDE_ASM(s32, "world/action/sneaky_parasol", func_802B6CF0_E2B3A0); +void func_802B6CF0_E2B3A0(void) { + PlayerStatus* playerStatus = &gPlayerStatus; + SneakyParasolUnk* temp = &D_802B6E80; + + temp->unk_20 += temp->unk_1C; + if (temp->unk_20 > 50.0f) { + temp->unk_20 = 50.0f; + } else if (temp->unk_20 < -50.0f) { + temp->unk_20 = -50.0f; + } + + playerStatus->spriteFacingAngle = clamp_angle(playerStatus->spriteFacingAngle + temp->unk_20); +} diff --git a/src/world/area_flo/flo_10/CB96B0.c b/src/world/area_flo/flo_10/CB96B0.c index daed381dfb..2f54fb71e1 100644 --- a/src/world/area_flo/flo_10/CB96B0.c +++ b/src/world/area_flo/flo_10/CB96B0.c @@ -171,7 +171,7 @@ void N(func_80240A98_CB9C98)(void) { sp38 = unk1->unk_1C; transform_point(camera->perspectiveMatrix, - model->center[0] - sp3C, model->center[1], model->center[2] - sp38, 1.0f, + model->center.x - sp3C, model->center.y, model->center.z - sp38, 1.0f, &sp28, &sp2C, &sp30, &sp34); sp28 = sp28 * (1.0f / sp34); @@ -187,7 +187,7 @@ void N(func_80240A98_CB9C98)(void) { temp_f22 = sp2C; transform_point(camera->perspectiveMatrix, - model->center[0] - sp3C, model->center[1], model->center[2] + sp38, 1.0f, + model->center.x - sp3C, model->center.y, model->center.z + sp38, 1.0f, &sp28, &sp2C, &sp30, &sp34); sp28 = sp28 * (1.0f / sp34); @@ -219,7 +219,7 @@ void N(func_80240A98_CB9C98)(void) { } transform_point(camera->perspectiveMatrix, - model->center[0] + sp3C, model->center[1], model->center[2] + sp38, 1.0f, + model->center.x + sp3C, model->center.y, model->center.z + sp38, 1.0f, &sp28, &sp2C, &sp30, &sp34); sp28 = sp28 * (1.0f / sp34); @@ -249,7 +249,7 @@ void N(func_80240A98_CB9C98)(void) { } transform_point(camera->perspectiveMatrix, - model->center[0] + sp3C, model->center[1], model->center[2] - sp38, 1.0f, + model->center.x + sp3C, model->center.y, model->center.z - sp38, 1.0f, &sp28, &sp2C, &sp30, &sp34); sp28 = sp28 * (1.0f / sp34); @@ -297,7 +297,7 @@ void N(func_80240A98_CB9C98)(void) { gDPSetPrimColor(gMasterGfxPos++, 0, 0, 248, 240, 240, 0); gDPPipeSync(gMasterGfxPos++); - gSPDisplayList(gMasterGfxPos++, model->modelNode[1]->type); + gSPDisplayList(gMasterGfxPos++, model->modelNode->displayData->displayList); gDPPipeSync(gMasterGfxPos++); gDPSetColorImage(gMasterGfxPos++, G_IM_FMT_RGBA, G_IM_SIZ_16b, 320, osVirtualToPhysical(D_8009A64C)); diff --git a/src/world/common/SpawnSunEffect.inc.c b/src/world/common/SpawnSunEffect.inc.c index 1baba309d2..a93611338f 100644 --- a/src/world/common/SpawnSunEffect.inc.c +++ b/src/world/common/SpawnSunEffect.inc.c @@ -1,6 +1,8 @@ #include "common.h" #include "map.h" +void func_80072950(s32, f32, f32, f32, f32, s32); + ApiStatus N(SpawnSunEffect)(ScriptInstance* script, s32 isInitialCall) { func_80072950(0, 0.0f, 0.0f, 0.0f, 0.0f, 0); return ApiStatus_DONE2; diff --git a/tools/asm_sizes.py b/tools/asm_sizes.py index 4b3e3ee6b2..20daeb6e41 100755 --- a/tools/asm_sizes.py +++ b/tools/asm_sizes.py @@ -2,10 +2,13 @@ import glob import os -import re + +print_funcs = True sizes = {} +funcs = {} + def calc_insns(f_path): ret = 0 with open(f_path) as f: @@ -13,6 +16,7 @@ def calc_insns(f_path): for line in f_lines: if line.startswith("/* "): ret += 1 + funcs[f_path.split("/")[-1][:-2]] = ret return ret def do_dir(root, dir): @@ -47,3 +51,6 @@ for thing in sorted(sizes.keys(), key=lambda x: sizes[x][2]): val = sizes[thing][2] if val > 0: print(thing.ljust(25) + str(val)) + +if print_funcs: + print(dict(sorted(funcs.items(), key=lambda f: f[1]))) diff --git a/tools/build/configure.py b/tools/build/configure.py index 3433e0ee99..a767cd7b16 100755 --- a/tools/build/configure.py +++ b/tools/build/configure.py @@ -17,6 +17,8 @@ CFLAGS = "-O2 -quiet -G0 -mcpu=vr4300 -mfix4300 -mips3 -mgp32 -mfp32 -W CFLAGS_NUSYS = "-O2 -quiet -G0 -mcpu=vr4300 -mfix4300 -mips3 -mgp32 -mfp32 -Wuninitialized -Wshadow -Wmissing-braces" CFLAGS_LIBULTRA = "-O2 -quiet -G0 -mcpu=vr4300 -mfix4300 -mips3 -mgp32 -mfp32 -Wuninitialized -Wshadow -Wmissing-braces" +ASFLAGS = "-EB -G 0" + # Paths: ROOT = Path(__file__).parent.parent.parent BUILD_TOOLS = ROOT / "tools" / "build" # directory where this file is (TODO: use relative_to) @@ -58,6 +60,9 @@ def write_ninja_rules(ninja: ninja_syntax.Writer, cpp: str): cross = "mips-linux-gnu-" + cc1 = f"{BUILD_TOOLS}/{os_dir}/cc1" + nu64as = f"{BUILD_TOOLS}/{os_dir}/mips-nintendo-nu64-as" + ninja.variable("python", sys.executable) ninja.rule("ld", @@ -70,41 +75,35 @@ def write_ninja_rules(ninja: ninja_syntax.Writer, cpp: str): command=f"{cross}objcopy $in $out -O binary && {BUILD_TOOLS}/rom/n64crc $out", ) - if DO_SHA1_CHECK: - ninja.rule("sha1sum", - description="check $in", - command=f"sha1sum -c $in && touch $out", - ) - else: - ninja.rule("sha1sum", - description="check $in", - command=f"touch $out", - ) + ninja.rule("sha1sum", + description="check $in", + command="sha1sum -c $in && touch $out" if DO_SHA1_CHECK else "touch $out", + ) ninja.rule("cc", description="cc($version) $in", - command=f"bash -o pipefail -c '{cpp} {CPPFLAGS} $in -o - | {iconv} | {BUILD_TOOLS}/{os_dir}/cc1 {CFLAGS} -o - | {BUILD_TOOLS}/{os_dir}/mips-nintendo-nu64-as -EB -G 0 - -o $out'", + command=f"bash -o pipefail -c '{cpp} {CPPFLAGS} $in -o - | {iconv} | {cc1} {CFLAGS} -o - | {nu64as} {ASFLAGS} - -o $out'", depfile="$out.d", deps="gcc", ) ninja.rule("cc_nusys", description="cc($version) $in", - command=f"bash -o pipefail -c '{cpp} {CPPFLAGS} $in -o - | {iconv} | {BUILD_TOOLS}/{os_dir}/cc1 {CFLAGS_NUSYS} -o - | {BUILD_TOOLS}/{os_dir}/mips-nintendo-nu64-as -EB -G 0 - -o $out'", + command=f"bash -o pipefail -c '{cpp} {CPPFLAGS} $in -o - | {iconv} | {cc1} {CFLAGS_NUSYS} -o - | {nu64as} {ASFLAGS} - -o $out'", depfile="$out.d", deps="gcc", ) ninja.rule("cc_libultra", description="cc($version) $in", - command=f"bash -o pipefail -c '{cpp} {CPPFLAGS} $in -o - | {iconv} | {BUILD_TOOLS}/{os_dir}/cc1 {CFLAGS_LIBULTRA} -o - | {BUILD_TOOLS}/{os_dir}/mips-nintendo-nu64-as -EB -G 0 - -o $out'", + command=f"bash -o pipefail -c '{cpp} {CPPFLAGS} $in -o - | {iconv} | {cc1} {CFLAGS_LIBULTRA} -o - | {nu64as} {ASFLAGS} - -o $out'", depfile="$out.d", deps="gcc", ) ninja.rule("cc_dsl", description="cc_dsl($version) $in", - command=f"bash -o pipefail -c '{cpp} {CPPFLAGS} $in -o - | $python {BUILD_TOOLS}/cc_dsl/compile_script.py | {iconv} | {BUILD_TOOLS}/{os_dir}/cc1 {CFLAGS} -o - | {BUILD_TOOLS}/{os_dir}/mips-nintendo-nu64-as -EB -G 0 - -o $out'", + command=f"bash -o pipefail -c '{cpp} {CPPFLAGS} $in -o - | $python {BUILD_TOOLS}/cc_dsl/compile_script.py | {iconv} | {cc1} {CFLAGS} -o - | {nu64as} {ASFLAGS} - -o $out'", depfile="$out.d", deps="gcc", ) @@ -527,7 +526,7 @@ if __name__ == "__main__": print("error: system C preprocessor is not GNU!") print("This is a known issue on macOS - only clang's cpp is installed by default.") print("Use 'brew' to obtain GNU cpp, then run this script again with the --cpp option, e.g.") - print(" ./configure --cpp cpp-10") + print(" ./configure --cpp cpp-11") exit(1) # default version behaviour is to only do those that exist diff --git a/ver/us/asm/data/world/action/sneaky_parasol.data.s b/ver/us/asm/data/world/action/sneaky_parasol.data.s index f1078aa17d..c67170540e 100644 --- a/ver/us/asm/data/world/action/sneaky_parasol.data.s +++ b/ver/us/asm/data/world/action/sneaky_parasol.data.s @@ -2,5 +2,5 @@ .section .data -glabel D_802B6D70_E2B420 -.word 0x27BD0018, 0x00000000, 0x00000000, 0x00000000, D_802B6E80, 0x00000000, 0x00000000, 0x00000000 +glabel D_802B6D80_E2B430 +.word D_802B6E80, 0x00000000, 0x00000000, 0x00000000 diff --git a/ver/us/asm/nonmatchings/19FAF0/DidActionSucceed.s b/ver/us/asm/nonmatchings/19FAF0/DidActionSucceed.s deleted file mode 100644 index d11d5a9d96..0000000000 --- a/ver/us/asm/nonmatchings/19FAF0/DidActionSucceed.s +++ /dev/null @@ -1,24 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel DidActionSucceed -/* 1A5794 80276EB4 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* 1A5798 80276EB8 AFBF0010 */ sw $ra, 0x10($sp) -/* 1A579C 80276EBC 8C82000C */ lw $v0, 0xc($a0) -/* 1A57A0 80276EC0 3C03800E */ lui $v1, %hi(gBattleStatus+0x81) -/* 1A57A4 80276EC4 8063C0F1 */ lb $v1, %lo(gBattleStatus+0x81)($v1) -/* 1A57A8 80276EC8 8C450000 */ lw $a1, ($v0) -/* 1A57AC 80276ECC 04610002 */ bgez $v1, .L80276ED8 -/* 1A57B0 80276ED0 0000302D */ daddu $a2, $zero, $zero -/* 1A57B4 80276ED4 00C0182D */ daddu $v1, $a2, $zero -.L80276ED8: -/* 1A57B8 80276ED8 00C3102A */ slt $v0, $a2, $v1 -/* 1A57BC 80276EDC 54400001 */ bnel $v0, $zero, .L80276EE4 -/* 1A57C0 80276EE0 0060302D */ daddu $a2, $v1, $zero -.L80276EE4: -/* 1A57C4 80276EE4 0C0B2026 */ jal set_variable -/* 1A57C8 80276EE8 00000000 */ nop -/* 1A57CC 80276EEC 8FBF0010 */ lw $ra, 0x10($sp) -/* 1A57D0 80276EF0 24020002 */ addiu $v0, $zero, 2 -/* 1A57D4 80276EF4 03E00008 */ jr $ra -/* 1A57D8 80276EF8 27BD0018 */ addiu $sp, $sp, 0x18 diff --git a/ver/us/asm/nonmatchings/1a1f0_len_5390/MerleeUpdateFX.s b/ver/us/asm/nonmatchings/1a1f0_len_5390/MerleeUpdateFX.s deleted file mode 100644 index 0fb97dbfb3..0000000000 --- a/ver/us/asm/nonmatchings/1a1f0_len_5390/MerleeUpdateFX.s +++ /dev/null @@ -1,193 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -.section .rodata - -glabel D_800985F0 -.double 0.35 - -.section .text - -glabel MerleeUpdateFX -/* 1A4C4 8003F0C4 27BDFFD8 */ addiu $sp, $sp, -0x28 -/* 1A4C8 8003F0C8 AFB20020 */ sw $s2, 0x20($sp) -/* 1A4CC 8003F0CC 0080902D */ daddu $s2, $a0, $zero -/* 1A4D0 8003F0D0 AFB00018 */ sw $s0, 0x18($sp) -/* 1A4D4 8003F0D4 00A0802D */ daddu $s0, $a1, $zero -/* 1A4D8 8003F0D8 2404FFF6 */ addiu $a0, $zero, -0xa -/* 1A4DC 8003F0DC AFBF0024 */ sw $ra, 0x24($sp) -/* 1A4E0 8003F0E0 0C00EABB */ jal get_npc_unsafe -/* 1A4E4 8003F0E4 AFB1001C */ sw $s1, 0x1c($sp) -/* 1A4E8 8003F0E8 12000024 */ beqz $s0, .L8003F17C -/* 1A4EC 8003F0EC 0040882D */ daddu $s1, $v0, $zero -/* 1A4F0 8003F0F0 AE400074 */ sw $zero, 0x74($s2) -/* 1A4F4 8003F0F4 C622003C */ lwc1 $f2, 0x3c($s1) -/* 1A4F8 8003F0F8 3C013ECC */ lui $at, 0x3ecc -/* 1A4FC 8003F0FC 3421CCCD */ ori $at, $at, 0xcccd -/* 1A500 8003F100 44810000 */ mtc1 $at, $f0 -/* 1A504 8003F104 AFA00014 */ sw $zero, 0x14($sp) -/* 1A508 8003F108 E7A00010 */ swc1 $f0, 0x10($sp) -/* 1A50C 8003F10C 8E250038 */ lw $a1, 0x38($s1) -/* 1A510 8003F110 8E26003C */ lw $a2, 0x3c($s1) -/* 1A514 8003F114 8E270040 */ lw $a3, 0x40($s1) -/* 1A518 8003F118 3C01800A */ lui $at, %hi(D_800A0BA4) -/* 1A51C 8003F11C E4220BA4 */ swc1 $f2, %lo(D_800A0BA4)($at) -/* 1A520 8003F120 0C01C5D4 */ jal func_80071750 -/* 1A524 8003F124 0000202D */ daddu $a0, $zero, $zero -/* 1A528 8003F128 3C013727 */ lui $at, 0x3727 -/* 1A52C 8003F12C 3421C5AC */ ori $at, $at, 0xc5ac -/* 1A530 8003F130 44810000 */ mtc1 $at, $f0 -/* 1A534 8003F134 AFA00014 */ sw $zero, 0x14($sp) -/* 1A538 8003F138 E7A00010 */ swc1 $f0, 0x10($sp) -/* 1A53C 8003F13C 8E250038 */ lw $a1, 0x38($s1) -/* 1A540 8003F140 8E26003C */ lw $a2, 0x3c($s1) -/* 1A544 8003F144 8E270040 */ lw $a3, 0x40($s1) -/* 1A548 8003F148 3C01800A */ lui $at, %hi(D_800A0BA8) -/* 1A54C 8003F14C AC220BA8 */ sw $v0, %lo(D_800A0BA8)($at) -/* 1A550 8003F150 0C01C5D4 */ jal func_80071750 -/* 1A554 8003F154 24040003 */ addiu $a0, $zero, 3 -/* 1A558 8003F158 3C01800A */ lui $at, %hi(D_800A0BAC) -/* 1A55C 8003F15C AC220BAC */ sw $v0, %lo(D_800A0BAC)($at) -/* 1A560 8003F160 2402000C */ addiu $v0, $zero, 0xc -/* 1A564 8003F164 3C01800A */ lui $at, %hi(D_800A0BB8) -/* 1A568 8003F168 A4200BB8 */ sh $zero, %lo(D_800A0BB8)($at) -/* 1A56C 8003F16C 3C01800A */ lui $at, %hi(D_800A0BA0) -/* 1A570 8003F170 AC220BA0 */ sw $v0, %lo(D_800A0BA0)($at) -/* 1A574 8003F174 0C05272D */ jal sfx_play_sound -/* 1A578 8003F178 24042074 */ addiu $a0, $zero, 0x2074 -.L8003F17C: -/* 1A57C 8003F17C 3C0140C9 */ lui $at, 0x40c9 -/* 1A580 8003F180 34210FD0 */ ori $at, $at, 0xfd0 -/* 1A584 8003F184 44810000 */ mtc1 $at, $f0 -/* 1A588 8003F188 C64C0074 */ lwc1 $f12, 0x74($s2) -/* 1A58C 8003F18C 46806320 */ cvt.s.w $f12, $f12 -/* 1A590 8003F190 46006302 */ mul.s $f12, $f12, $f0 -/* 1A594 8003F194 00000000 */ nop -/* 1A598 8003F198 3C0143B4 */ lui $at, 0x43b4 -/* 1A59C 8003F19C 44810000 */ mtc1 $at, $f0 -/* 1A5A0 8003F1A0 0C00A85B */ jal sin_rad -/* 1A5A4 8003F1A4 46006303 */ div.s $f12, $f12, $f0 -/* 1A5A8 8003F1A8 3C014040 */ lui $at, 0x4040 -/* 1A5AC 8003F1AC 44811000 */ mtc1 $at, $f2 -/* 1A5B0 8003F1B0 00000000 */ nop -/* 1A5B4 8003F1B4 46020002 */ mul.s $f0, $f0, $f2 -/* 1A5B8 8003F1B8 00000000 */ nop -/* 1A5BC 8003F1BC 3C01800A */ lui $at, %hi(D_800A0BA4) -/* 1A5C0 8003F1C0 C4220BA4 */ lwc1 $f2, %lo(D_800A0BA4)($at) -/* 1A5C4 8003F1C4 46001080 */ add.s $f2, $f2, $f0 -/* 1A5C8 8003F1C8 E622003C */ swc1 $f2, 0x3c($s1) -/* 1A5CC 8003F1CC 8E420074 */ lw $v0, 0x74($s2) -/* 1A5D0 8003F1D0 2442000A */ addiu $v0, $v0, 0xa -/* 1A5D4 8003F1D4 44826000 */ mtc1 $v0, $f12 -/* 1A5D8 8003F1D8 00000000 */ nop -/* 1A5DC 8003F1DC 46806320 */ cvt.s.w $f12, $f12 -/* 1A5E0 8003F1E0 0C00A6C9 */ jal clamp_angle -/* 1A5E4 8003F1E4 AE420074 */ sw $v0, 0x74($s2) -/* 1A5E8 8003F1E8 4600018D */ trunc.w.s $f6, $f0 -/* 1A5EC 8003F1EC E6460074 */ swc1 $f6, 0x74($s2) -/* 1A5F0 8003F1F0 3C05800A */ lui $a1, %hi(D_800A0BA8) -/* 1A5F4 8003F1F4 8CA50BA8 */ lw $a1, %lo(D_800A0BA8)($a1) -/* 1A5F8 8003F1F8 C6200038 */ lwc1 $f0, 0x38($s1) -/* 1A5FC 8003F1FC 3C014180 */ lui $at, 0x4180 -/* 1A600 8003F200 44811000 */ mtc1 $at, $f2 -/* 1A604 8003F204 8CA2000C */ lw $v0, 0xc($a1) -/* 1A608 8003F208 E4400004 */ swc1 $f0, 4($v0) -/* 1A60C 8003F20C C620003C */ lwc1 $f0, 0x3c($s1) -/* 1A610 8003F210 46020000 */ add.s $f0, $f0, $f2 -/* 1A614 8003F214 3C08800A */ lui $t0, %hi(D_800A0BAC) -/* 1A618 8003F218 25080BAC */ addiu $t0, $t0, %lo(D_800A0BAC) -/* 1A61C 8003F21C E4400008 */ swc1 $f0, 8($v0) -/* 1A620 8003F220 C6200040 */ lwc1 $f0, 0x40($s1) -/* 1A624 8003F224 8D040000 */ lw $a0, ($t0) -/* 1A628 8003F228 E440000C */ swc1 $f0, 0xc($v0) -/* 1A62C 8003F22C 8C82000C */ lw $v0, 0xc($a0) -/* 1A630 8003F230 C6200038 */ lwc1 $f0, 0x38($s1) -/* 1A634 8003F234 E4400004 */ swc1 $f0, 4($v0) -/* 1A638 8003F238 C620003C */ lwc1 $f0, 0x3c($s1) -/* 1A63C 8003F23C 46020000 */ add.s $f0, $f0, $f2 -/* 1A640 8003F240 3C0140A0 */ lui $at, 0x40a0 -/* 1A644 8003F244 44811000 */ mtc1 $at, $f2 -/* 1A648 8003F248 E4400008 */ swc1 $f0, 8($v0) -/* 1A64C 8003F24C C6200040 */ lwc1 $f0, 0x40($s1) -/* 1A650 8003F250 46020000 */ add.s $f0, $f0, $f2 -/* 1A654 8003F254 3C07800A */ lui $a3, %hi(D_800A0BB8) -/* 1A658 8003F258 24E70BB8 */ addiu $a3, $a3, %lo(D_800A0BB8) -/* 1A65C 8003F25C E440000C */ swc1 $f0, 0xc($v0) -/* 1A660 8003F260 84E30000 */ lh $v1, ($a3) -/* 1A664 8003F264 24060002 */ addiu $a2, $zero, 2 -/* 1A668 8003F268 14660011 */ bne $v1, $a2, .L8003F2B0 -/* 1A66C 8003F26C 24020001 */ addiu $v0, $zero, 1 -/* 1A670 8003F270 8CA2000C */ lw $v0, 0xc($a1) -/* 1A674 8003F274 3C013727 */ lui $at, 0x3727 -/* 1A678 8003F278 3421C5AC */ ori $at, $at, 0xc5ac -/* 1A67C 8003F27C 44810000 */ mtc1 $at, $f0 -/* 1A680 8003F280 00000000 */ nop -/* 1A684 8003F284 E4400030 */ swc1 $f0, 0x30($v0) -/* 1A688 8003F288 8C82000C */ lw $v0, 0xc($a0) -/* 1A68C 8003F28C E4400030 */ swc1 $f0, 0x30($v0) -/* 1A690 8003F290 8CA20000 */ lw $v0, ($a1) -/* 1A694 8003F294 34420010 */ ori $v0, $v0, 0x10 -/* 1A698 8003F298 ACA20000 */ sw $v0, ($a1) -/* 1A69C 8003F29C 8C830000 */ lw $v1, ($a0) -/* 1A6A0 8003F2A0 24020001 */ addiu $v0, $zero, 1 -/* 1A6A4 8003F2A4 34630010 */ ori $v1, $v1, 0x10 -/* 1A6A8 8003F2A8 0800FCDB */ j .L8003F36C -/* 1A6AC 8003F2AC AC830000 */ sw $v1, ($a0) -.L8003F2B0: -/* 1A6B0 8003F2B0 1462002E */ bne $v1, $v0, .L8003F36C -/* 1A6B4 8003F2B4 0000102D */ daddu $v0, $zero, $zero -/* 1A6B8 8003F2B8 8CA2000C */ lw $v0, 0xc($a1) -/* 1A6BC 8003F2BC C4400030 */ lwc1 $f0, 0x30($v0) -/* 1A6C0 8003F2C0 3C01800A */ lui $at, %hi(D_800985F0) -/* 1A6C4 8003F2C4 D42285F0 */ ldc1 $f2, %lo(D_800985F0)($at) -/* 1A6C8 8003F2C8 46000021 */ cvt.d.s $f0, $f0 -/* 1A6CC 8003F2CC 46220000 */ add.d $f0, $f0, $f2 -/* 1A6D0 8003F2D0 3C01400C */ lui $at, 0x400c -/* 1A6D4 8003F2D4 44812800 */ mtc1 $at, $f5 -/* 1A6D8 8003F2D8 44802000 */ mtc1 $zero, $f4 -/* 1A6DC 8003F2DC 46200020 */ cvt.s.d $f0, $f0 -/* 1A6E0 8003F2E0 460000A1 */ cvt.d.s $f2, $f0 -/* 1A6E4 8003F2E4 4622203C */ c.lt.d $f4, $f2 -/* 1A6E8 8003F2E8 00000000 */ nop -/* 1A6EC 8003F2EC 45000005 */ bc1f .L8003F304 -/* 1A6F0 8003F2F0 E4400030 */ swc1 $f0, 0x30($v0) -/* 1A6F4 8003F2F4 3C014060 */ lui $at, 0x4060 -/* 1A6F8 8003F2F8 44810000 */ mtc1 $at, $f0 -/* 1A6FC 8003F2FC 00000000 */ nop -/* 1A700 8003F300 E4400030 */ swc1 $f0, 0x30($v0) -.L8003F304: -/* 1A704 8003F304 3C03800A */ lui $v1, %hi(D_800A0BA0) -/* 1A708 8003F308 24630BA0 */ addiu $v1, $v1, %lo(D_800A0BA0) -/* 1A70C 8003F30C 8C620000 */ lw $v0, ($v1) -/* 1A710 8003F310 10400003 */ beqz $v0, .L8003F320 -/* 1A714 8003F314 2442FFFF */ addiu $v0, $v0, -1 -/* 1A718 8003F318 0800FCDA */ j .L8003F368 -/* 1A71C 8003F31C AC620000 */ sw $v0, ($v1) -.L8003F320: -/* 1A720 8003F320 8D020000 */ lw $v0, ($t0) -/* 1A724 8003F324 8C42000C */ lw $v0, 0xc($v0) -/* 1A728 8003F328 C4400030 */ lwc1 $f0, 0x30($v0) -/* 1A72C 8003F32C 3C013FE0 */ lui $at, 0x3fe0 -/* 1A730 8003F330 44811800 */ mtc1 $at, $f3 -/* 1A734 8003F334 44801000 */ mtc1 $zero, $f2 -/* 1A738 8003F338 46000021 */ cvt.d.s $f0, $f0 -/* 1A73C 8003F33C 46220000 */ add.d $f0, $f0, $f2 -/* 1A740 8003F340 3C014014 */ lui $at, 0x4014 -/* 1A744 8003F344 44812800 */ mtc1 $at, $f5 -/* 1A748 8003F348 44802000 */ mtc1 $zero, $f4 -/* 1A74C 8003F34C 46200020 */ cvt.s.d $f0, $f0 -/* 1A750 8003F350 460000A1 */ cvt.d.s $f2, $f0 -/* 1A754 8003F354 4622203C */ c.lt.d $f4, $f2 -/* 1A758 8003F358 00000000 */ nop -/* 1A75C 8003F35C 45000002 */ bc1f .L8003F368 -/* 1A760 8003F360 E4400030 */ swc1 $f0, 0x30($v0) -/* 1A764 8003F364 A4E60000 */ sh $a2, ($a3) -.L8003F368: -/* 1A768 8003F368 0000102D */ daddu $v0, $zero, $zero -.L8003F36C: -/* 1A76C 8003F36C 8FBF0024 */ lw $ra, 0x24($sp) -/* 1A770 8003F370 8FB20020 */ lw $s2, 0x20($sp) -/* 1A774 8003F374 8FB1001C */ lw $s1, 0x1c($sp) -/* 1A778 8003F378 8FB00018 */ lw $s0, 0x18($sp) -/* 1A77C 8003F37C 03E00008 */ jr $ra -/* 1A780 8003F380 27BD0028 */ addiu $sp, $sp, 0x28 diff --git a/ver/us/asm/nonmatchings/1a1f0_len_5390/draw_encounters_pre_battle.s b/ver/us/asm/nonmatchings/1a1f0_len_5390/draw_encounters_pre_battle.s deleted file mode 100644 index 615c0157fb..0000000000 --- a/ver/us/asm/nonmatchings/1a1f0_len_5390/draw_encounters_pre_battle.s +++ /dev/null @@ -1,200 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel draw_encounters_pre_battle -/* 1CD64 80041964 27BDFF88 */ addiu $sp, $sp, -0x78 -/* 1CD68 80041968 AFB00038 */ sw $s0, 0x38($sp) -/* 1CD6C 8004196C 3C10800B */ lui $s0, %hi(gCurrentEncounter) -/* 1CD70 80041970 26100F10 */ addiu $s0, $s0, %lo(gCurrentEncounter) -/* 1CD74 80041974 AFBF0040 */ sw $ra, 0x40($sp) -/* 1CD78 80041978 AFB1003C */ sw $s1, 0x3c($sp) -/* 1CD7C 8004197C F7BE0070 */ sdc1 $f30, 0x70($sp) -/* 1CD80 80041980 F7BC0068 */ sdc1 $f28, 0x68($sp) -/* 1CD84 80041984 F7BA0060 */ sdc1 $f26, 0x60($sp) -/* 1CD88 80041988 F7B80058 */ sdc1 $f24, 0x58($sp) -/* 1CD8C 8004198C F7B60050 */ sdc1 $f22, 0x50($sp) -/* 1CD90 80041990 F7B40048 */ sdc1 $f20, 0x48($sp) -/* 1CD94 80041994 8E02008C */ lw $v0, 0x8c($s0) -/* 1CD98 80041998 84440008 */ lh $a0, 8($v0) -/* 1CD9C 8004199C 0C00EABB */ jal get_npc_unsafe -/* 1CDA0 800419A0 0200882D */ daddu $s1, $s0, $zero -/* 1CDA4 800419A4 0040382D */ daddu $a3, $v0, $zero -/* 1CDA8 800419A8 8E020094 */ lw $v0, 0x94($s0) -/* 1CDAC 800419AC 3C048011 */ lui $a0, %hi(gPlayerStatus) -/* 1CDB0 800419B0 2484EFC8 */ addiu $a0, $a0, %lo(gPlayerStatus) -/* 1CDB4 800419B4 1040009E */ beqz $v0, .L80041C30 -/* 1CDB8 800419B8 240500FF */ addiu $a1, $zero, 0xff -/* 1CDBC 800419BC 8E030090 */ lw $v1, 0x90($s0) -/* 1CDC0 800419C0 1065009B */ beq $v1, $a1, .L80041C30 -/* 1CDC4 800419C4 00000000 */ nop -/* 1CDC8 800419C8 8E020098 */ lw $v0, 0x98($s0) -/* 1CDCC 800419CC 24420001 */ addiu $v0, $v0, 1 -/* 1CDD0 800419D0 AE020098 */ sw $v0, 0x98($s0) -/* 1CDD4 800419D4 2842000B */ slti $v0, $v0, 0xb -/* 1CDD8 800419D8 14400002 */ bnez $v0, .L800419E4 -/* 1CDDC 800419DC 2402000A */ addiu $v0, $zero, 0xa -/* 1CDE0 800419E0 AE020098 */ sw $v0, 0x98($s0) -.L800419E4: -/* 1CDE4 800419E4 8E020098 */ lw $v0, 0x98($s0) -/* 1CDE8 800419E8 00621021 */ addu $v0, $v1, $v0 -/* 1CDEC 800419EC AE020090 */ sw $v0, 0x90($s0) -/* 1CDF0 800419F0 28420100 */ slti $v0, $v0, 0x100 -/* 1CDF4 800419F4 50400001 */ beql $v0, $zero, .L800419FC -/* 1CDF8 800419F8 AE050090 */ sw $a1, 0x90($s0) -.L800419FC: -/* 1CDFC 800419FC C4FE0038 */ lwc1 $f30, 0x38($a3) -/* 1CE00 80041A00 C4FA003C */ lwc1 $f26, 0x3c($a3) -/* 1CE04 80041A04 3C01C477 */ lui $at, 0xc477 -/* 1CE08 80041A08 34218000 */ ori $at, $at, 0x8000 -/* 1CE0C 80041A0C 44810000 */ mtc1 $at, $f0 -/* 1CE10 80041A10 C4FC0040 */ lwc1 $f28, 0x40($a3) -/* 1CE14 80041A14 C4940028 */ lwc1 $f20, 0x28($a0) -/* 1CE18 80041A18 C498002C */ lwc1 $f24, 0x2c($a0) -/* 1CE1C 80041A1C C4960030 */ lwc1 $f22, 0x30($a0) -/* 1CE20 80041A20 4600D03C */ c.lt.s $f26, $f0 -/* 1CE24 80041A24 00000000 */ nop -/* 1CE28 80041A28 45000004 */ bc1f .L80041A3C -/* 1CE2C 80041A2C 00000000 */ nop -/* 1CE30 80041A30 4600A786 */ mov.s $f30, $f20 -/* 1CE34 80041A34 4600C686 */ mov.s $f26, $f24 -/* 1CE38 80041A38 4600B706 */ mov.s $f28, $f22 -.L80041A3C: -/* 1CE3C 80041A3C 3C028007 */ lui $v0, %hi(gGameStatusPtr) -/* 1CE40 80041A40 8C42419C */ lw $v0, %lo(gGameStatusPtr)($v0) -/* 1CE44 80041A44 80430071 */ lb $v1, 0x71($v0) -/* 1CE48 80041A48 24020002 */ addiu $v0, $zero, 2 -/* 1CE4C 80041A4C 1462003C */ bne $v1, $v0, .L80041B40 -/* 1CE50 80041A50 00000000 */ nop -/* 1CE54 80041A54 C6020090 */ lwc1 $f2, 0x90($s0) -/* 1CE58 80041A58 468010A0 */ cvt.s.w $f2, $f2 -/* 1CE5C 80041A5C 44051000 */ mfc1 $a1, $f2 -/* 1CE60 80041A60 0C04DF69 */ jal set_transition_stencil_zoom_1 -/* 1CE64 80041A64 2404000A */ addiu $a0, $zero, 0xa -/* 1CE68 80041A68 3C05437F */ lui $a1, 0x437f -/* 1CE6C 80041A6C 0C04E035 */ jal set_transition_stencil_alpha -/* 1CE70 80041A70 24040001 */ addiu $a0, $zero, 1 -/* 1CE74 80041A74 24040001 */ addiu $a0, $zero, 1 -/* 1CE78 80041A78 0000282D */ daddu $a1, $zero, $zero -/* 1CE7C 80041A7C 00A0302D */ daddu $a2, $a1, $zero -/* 1CE80 80041A80 0C04DF84 */ jal set_transition_stencil_color -/* 1CE84 80041A84 00A0382D */ daddu $a3, $a1, $zero -/* 1CE88 80041A88 3C108007 */ lui $s0, %hi(gCurrentCameraID) -/* 1CE8C 80041A8C 26107410 */ addiu $s0, $s0, %lo(gCurrentCameraID) -/* 1CE90 80041A90 8E040000 */ lw $a0, ($s0) -/* 1CE94 80041A94 4405A000 */ mfc1 $a1, $f20 -/* 1CE98 80041A98 4407B000 */ mfc1 $a3, $f22 -/* 1CE9C 80041A9C 3C0141A0 */ lui $at, 0x41a0 -/* 1CEA0 80041AA0 44810000 */ mtc1 $at, $f0 -/* 1CEA4 80041AA4 27A20020 */ addiu $v0, $sp, 0x20 -/* 1CEA8 80041AA8 AFA20010 */ sw $v0, 0x10($sp) -/* 1CEAC 80041AAC 4600C600 */ add.s $f24, $f24, $f0 -/* 1CEB0 80041AB0 27A20024 */ addiu $v0, $sp, 0x24 -/* 1CEB4 80041AB4 AFA20014 */ sw $v0, 0x14($sp) -/* 1CEB8 80041AB8 4406C000 */ mfc1 $a2, $f24 -/* 1CEBC 80041ABC 27A20028 */ addiu $v0, $sp, 0x28 -/* 1CEC0 80041AC0 0C00B94E */ jal get_screen_coords -/* 1CEC4 80041AC4 AFA20018 */ sw $v0, 0x18($sp) -/* 1CEC8 80041AC8 8E040000 */ lw $a0, ($s0) -/* 1CECC 80041ACC 4405F000 */ mfc1 $a1, $f30 -/* 1CED0 80041AD0 4407E000 */ mfc1 $a3, $f28 -/* 1CED4 80041AD4 3C014170 */ lui $at, 0x4170 -/* 1CED8 80041AD8 44810000 */ mtc1 $at, $f0 -/* 1CEDC 80041ADC 27A2002C */ addiu $v0, $sp, 0x2c -/* 1CEE0 80041AE0 AFA20010 */ sw $v0, 0x10($sp) -/* 1CEE4 80041AE4 4600D680 */ add.s $f26, $f26, $f0 -/* 1CEE8 80041AE8 27A20030 */ addiu $v0, $sp, 0x30 -/* 1CEEC 80041AEC AFA20014 */ sw $v0, 0x14($sp) -/* 1CEF0 80041AF0 4406D000 */ mfc1 $a2, $f26 -/* 1CEF4 80041AF4 27A20034 */ addiu $v0, $sp, 0x34 -/* 1CEF8 80041AF8 0C00B94E */ jal get_screen_coords -/* 1CEFC 80041AFC AFA20018 */ sw $v0, 0x18($sp) -/* 1CF00 80041B00 24040001 */ addiu $a0, $zero, 1 -/* 1CF04 80041B04 0000282D */ daddu $a1, $zero, $zero -/* 1CF08 80041B08 8FA60020 */ lw $a2, 0x20($sp) -/* 1CF0C 80041B0C 8FA8002C */ lw $t0, 0x2c($sp) -/* 1CF10 80041B10 8FA70024 */ lw $a3, 0x24($sp) -/* 1CF14 80041B14 8FA30030 */ lw $v1, 0x30($sp) -/* 1CF18 80041B18 00C83023 */ subu $a2, $a2, $t0 -/* 1CF1C 80041B1C 000617C2 */ srl $v0, $a2, 0x1f -/* 1CF20 80041B20 00C23021 */ addu $a2, $a2, $v0 -/* 1CF24 80041B24 00863007 */ srav $a2, $a2, $a0 -/* 1CF28 80041B28 00C83021 */ addu $a2, $a2, $t0 -/* 1CF2C 80041B2C 00E33823 */ subu $a3, $a3, $v1 -/* 1CF30 80041B30 000717C2 */ srl $v0, $a3, 0x1f -/* 1CF34 80041B34 00E23821 */ addu $a3, $a3, $v0 -/* 1CF38 80041B38 0801070A */ j .L80041C28 -/* 1CF3C 80041B3C 00873807 */ srav $a3, $a3, $a0 -.L80041B40: -/* 1CF40 80041B40 C6220090 */ lwc1 $f2, 0x90($s1) -/* 1CF44 80041B44 468010A0 */ cvt.s.w $f2, $f2 -/* 1CF48 80041B48 44051000 */ mfc1 $a1, $f2 -/* 1CF4C 80041B4C 0C04DF62 */ jal set_transition_stencil_zoom_0 -/* 1CF50 80041B50 2404000A */ addiu $a0, $zero, 0xa -/* 1CF54 80041B54 3C05437F */ lui $a1, 0x437f -/* 1CF58 80041B58 0C04E035 */ jal set_transition_stencil_alpha -/* 1CF5C 80041B5C 0000202D */ daddu $a0, $zero, $zero -/* 1CF60 80041B60 0000202D */ daddu $a0, $zero, $zero -/* 1CF64 80041B64 0080282D */ daddu $a1, $a0, $zero -/* 1CF68 80041B68 0080302D */ daddu $a2, $a0, $zero -/* 1CF6C 80041B6C 0C04DF84 */ jal set_transition_stencil_color -/* 1CF70 80041B70 0080382D */ daddu $a3, $a0, $zero -/* 1CF74 80041B74 3C108007 */ lui $s0, %hi(gCurrentCameraID) -/* 1CF78 80041B78 26107410 */ addiu $s0, $s0, %lo(gCurrentCameraID) -/* 1CF7C 80041B7C 8E040000 */ lw $a0, ($s0) -/* 1CF80 80041B80 4405A000 */ mfc1 $a1, $f20 -/* 1CF84 80041B84 4407B000 */ mfc1 $a3, $f22 -/* 1CF88 80041B88 3C0141A0 */ lui $at, 0x41a0 -/* 1CF8C 80041B8C 44810000 */ mtc1 $at, $f0 -/* 1CF90 80041B90 27A20020 */ addiu $v0, $sp, 0x20 -/* 1CF94 80041B94 AFA20010 */ sw $v0, 0x10($sp) -/* 1CF98 80041B98 4600C600 */ add.s $f24, $f24, $f0 -/* 1CF9C 80041B9C 27A20024 */ addiu $v0, $sp, 0x24 -/* 1CFA0 80041BA0 AFA20014 */ sw $v0, 0x14($sp) -/* 1CFA4 80041BA4 4406C000 */ mfc1 $a2, $f24 -/* 1CFA8 80041BA8 27A20028 */ addiu $v0, $sp, 0x28 -/* 1CFAC 80041BAC 0C00B94E */ jal get_screen_coords -/* 1CFB0 80041BB0 AFA20018 */ sw $v0, 0x18($sp) -/* 1CFB4 80041BB4 8E040000 */ lw $a0, ($s0) -/* 1CFB8 80041BB8 4405F000 */ mfc1 $a1, $f30 -/* 1CFBC 80041BBC 4407E000 */ mfc1 $a3, $f28 -/* 1CFC0 80041BC0 3C014170 */ lui $at, 0x4170 -/* 1CFC4 80041BC4 44810000 */ mtc1 $at, $f0 -/* 1CFC8 80041BC8 27A2002C */ addiu $v0, $sp, 0x2c -/* 1CFCC 80041BCC AFA20010 */ sw $v0, 0x10($sp) -/* 1CFD0 80041BD0 4600D680 */ add.s $f26, $f26, $f0 -/* 1CFD4 80041BD4 27A20030 */ addiu $v0, $sp, 0x30 -/* 1CFD8 80041BD8 AFA20014 */ sw $v0, 0x14($sp) -/* 1CFDC 80041BDC 4406D000 */ mfc1 $a2, $f26 -/* 1CFE0 80041BE0 27A20034 */ addiu $v0, $sp, 0x34 -/* 1CFE4 80041BE4 0C00B94E */ jal get_screen_coords -/* 1CFE8 80041BE8 AFA20018 */ sw $v0, 0x18($sp) -/* 1CFEC 80041BEC 0000202D */ daddu $a0, $zero, $zero -/* 1CFF0 80041BF0 0080282D */ daddu $a1, $a0, $zero -/* 1CFF4 80041BF4 8FA60020 */ lw $a2, 0x20($sp) -/* 1CFF8 80041BF8 8FA8002C */ lw $t0, 0x2c($sp) -/* 1CFFC 80041BFC 8FA70024 */ lw $a3, 0x24($sp) -/* 1D000 80041C00 8FA30030 */ lw $v1, 0x30($sp) -/* 1D004 80041C04 00C83023 */ subu $a2, $a2, $t0 -/* 1D008 80041C08 000617C2 */ srl $v0, $a2, 0x1f -/* 1D00C 80041C0C 00C23021 */ addu $a2, $a2, $v0 -/* 1D010 80041C10 00063043 */ sra $a2, $a2, 1 -/* 1D014 80041C14 00C83021 */ addu $a2, $a2, $t0 -/* 1D018 80041C18 00E33823 */ subu $a3, $a3, $v1 -/* 1D01C 80041C1C 000717C2 */ srl $v0, $a3, 0x1f -/* 1D020 80041C20 00E23821 */ addu $a3, $a3, $v0 -/* 1D024 80041C24 00073843 */ sra $a3, $a3, 1 -.L80041C28: -/* 1D028 80041C28 0C04DF93 */ jal set_transition_stencil_center -/* 1D02C 80041C2C 00E33821 */ addu $a3, $a3, $v1 -.L80041C30: -/* 1D030 80041C30 8FBF0040 */ lw $ra, 0x40($sp) -/* 1D034 80041C34 8FB1003C */ lw $s1, 0x3c($sp) -/* 1D038 80041C38 8FB00038 */ lw $s0, 0x38($sp) -/* 1D03C 80041C3C D7BE0070 */ ldc1 $f30, 0x70($sp) -/* 1D040 80041C40 D7BC0068 */ ldc1 $f28, 0x68($sp) -/* 1D044 80041C44 D7BA0060 */ ldc1 $f26, 0x60($sp) -/* 1D048 80041C48 D7B80058 */ ldc1 $f24, 0x58($sp) -/* 1D04C 80041C4C D7B60050 */ ldc1 $f22, 0x50($sp) -/* 1D050 80041C50 D7B40048 */ ldc1 $f20, 0x48($sp) -/* 1D054 80041C54 03E00008 */ jr $ra -/* 1D058 80041C58 27BD0078 */ addiu $sp, $sp, 0x78 diff --git a/ver/us/asm/nonmatchings/341d0/clear_effect_data.s b/ver/us/asm/nonmatchings/341d0/clear_effect_data.s deleted file mode 100644 index 881795ef4b..0000000000 --- a/ver/us/asm/nonmatchings/341d0/clear_effect_data.s +++ /dev/null @@ -1,49 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel clear_effect_data -/* 3509C 80059C9C 27BDFFE0 */ addiu $sp, $sp, -0x20 -/* 350A0 80059CA0 2402000E */ addiu $v0, $zero, 0xe -/* 350A4 80059CA4 3C03800A */ lui $v1, %hi(D_800A41C0) -/* 350A8 80059CA8 246341C0 */ addiu $v1, $v1, %lo(D_800A41C0) -/* 350AC 80059CAC AFBF001C */ sw $ra, 0x1c($sp) -/* 350B0 80059CB0 AFB00018 */ sw $s0, 0x18($sp) -.L80059CB4: -/* 350B4 80059CB4 AC600000 */ sw $zero, ($v1) -/* 350B8 80059CB8 2442FFFF */ addiu $v0, $v0, -1 -/* 350BC 80059CBC 0441FFFD */ bgez $v0, .L80059CB4 -/* 350C0 80059CC0 2463FFE0 */ addiu $v1, $v1, -0x20 -/* 350C4 80059CC4 2402005F */ addiu $v0, $zero, 0x5f -/* 350C8 80059CC8 3C03800B */ lui $v1, %hi(D_800B4514) -/* 350CC 80059CCC 24634514 */ addiu $v1, $v1, %lo(D_800B4514) -.L80059CD0: -/* 350D0 80059CD0 AC600000 */ sw $zero, ($v1) -/* 350D4 80059CD4 2442FFFF */ addiu $v0, $v0, -1 -/* 350D8 80059CD8 0441FFFD */ bgez $v0, .L80059CD0 -/* 350DC 80059CDC 2463FFFC */ addiu $v1, $v1, -4 -/* 350E0 80059CE0 0C019A58 */ jal osUnmapTLBAll -/* 350E4 80059CE4 00000000 */ nop -/* 350E8 80059CE8 3C0300FF */ lui $v1, 0xff -/* 350EC 80059CEC 3463FFFF */ ori $v1, $v1, 0xffff -/* 350F0 80059CF0 24040010 */ addiu $a0, $zero, 0x10 -/* 350F4 80059CF4 0000282D */ daddu $a1, $zero, $zero -/* 350F8 80059CF8 3C10E020 */ lui $s0, %hi(func_E0200000) -/* 350FC 80059CFC 26100000 */ addiu $s0, $s0, %lo(func_E0200000) -/* 35100 80059D00 0200302D */ daddu $a2, $s0, $zero -/* 35104 80059D04 2402FFFF */ addiu $v0, $zero, -1 -/* 35108 80059D08 3C07801A */ lui $a3, %hi(D_801A6000) -/* 3510C 80059D0C 24E76000 */ addiu $a3, $a3, %lo(D_801A6000) -/* 35110 80059D10 00E33824 */ and $a3, $a3, $v1 -/* 35114 80059D14 AFA20010 */ sw $v0, 0x10($sp) -/* 35118 80059D18 0C0199E8 */ jal osMapTLB -/* 3511C 80059D1C AFA20014 */ sw $v0, 0x14($sp) -/* 35120 80059D20 3C040032 */ lui $a0, 0x32 -/* 35124 80059D24 24845AD0 */ addiu $a0, $a0, 0x5ad0 -/* 35128 80059D28 3C050032 */ lui $a1, 0x32 -/* 3512C 80059D2C 24A56410 */ addiu $a1, $a1, 0x6410 -/* 35130 80059D30 0C00A5CF */ jal dma_copy -/* 35134 80059D34 0200302D */ daddu $a2, $s0, $zero -/* 35138 80059D38 8FBF001C */ lw $ra, 0x1c($sp) -/* 3513C 80059D3C 8FB00018 */ lw $s0, 0x18($sp) -/* 35140 80059D40 03E00008 */ jr $ra -/* 35144 80059D44 27BD0020 */ addiu $sp, $sp, 0x20 diff --git a/ver/us/asm/nonmatchings/341d0/set_effect_pos_offset.s b/ver/us/asm/nonmatchings/341d0/set_effect_pos_offset.s deleted file mode 100644 index 74e23b3c0c..0000000000 --- a/ver/us/asm/nonmatchings/341d0/set_effect_pos_offset.s +++ /dev/null @@ -1,9 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel set_effect_pos_offset -/* 35088 80059C88 8C82000C */ lw $v0, 0xc($a0) -/* 3508C 80059C8C AC450004 */ sw $a1, 4($v0) -/* 35090 80059C90 AC460008 */ sw $a2, 8($v0) -/* 35094 80059C94 03E00008 */ jr $ra -/* 35098 80059C98 AC47000C */ sw $a3, 0xc($v0) diff --git a/ver/us/asm/nonmatchings/8800/create_cameras_a.s b/ver/us/asm/nonmatchings/8800/create_cameras_a.s deleted file mode 100644 index c18324b0d8..0000000000 --- a/ver/us/asm/nonmatchings/8800/create_cameras_a.s +++ /dev/null @@ -1,86 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel create_cameras_a -/* 92F4 8002DEF4 27BDFFB8 */ addiu $sp, $sp, -0x48 -/* 92F8 8002DEF8 AFB60040 */ sw $s6, 0x40($sp) -/* 92FC 8002DEFC 27B60010 */ addiu $s6, $sp, 0x10 -/* 9300 8002DF00 24030003 */ addiu $v1, $zero, 3 -/* 9304 8002DF04 3C013F80 */ lui $at, 0x3f80 -/* 9308 8002DF08 44810000 */ mtc1 $at, $f0 -/* 930C 8002DF0C 3C02800B */ lui $v0, %hi(gCameras+0x1008) -/* 9310 8002DF10 24422D88 */ addiu $v0, $v0, %lo(gCameras+0x1008) -/* 9314 8002DF14 AFBF0044 */ sw $ra, 0x44($sp) -/* 9318 8002DF18 AFB5003C */ sw $s5, 0x3c($sp) -/* 931C 8002DF1C AFB40038 */ sw $s4, 0x38($sp) -/* 9320 8002DF20 AFB30034 */ sw $s3, 0x34($sp) -/* 9324 8002DF24 AFB20030 */ sw $s2, 0x30($sp) -/* 9328 8002DF28 AFB1002C */ sw $s1, 0x2c($sp) -/* 932C 8002DF2C AFB00028 */ sw $s0, 0x28($sp) -/* 9330 8002DF30 3C01800A */ lui $at, %hi(D_8009A5EC) -/* 9334 8002DF34 E420A5EC */ swc1 $f0, %lo(D_8009A5EC)($at) -.L8002DF38: -/* 9338 8002DF38 A4400000 */ sh $zero, ($v0) -/* 933C 8002DF3C 2463FFFF */ addiu $v1, $v1, -1 -/* 9340 8002DF40 0461FFFD */ bgez $v1, .L8002DF38 -/* 9344 8002DF44 2442FAA8 */ addiu $v0, $v0, -0x558 -/* 9348 8002DF48 02C0202D */ daddu $a0, $s6, $zero -/* 934C 8002DF4C 24150002 */ addiu $s5, $zero, 2 -/* 9350 8002DF50 241100A0 */ addiu $s1, $zero, 0xa0 -/* 9354 8002DF54 24100078 */ addiu $s0, $zero, 0x78 -/* 9358 8002DF58 24140008 */ addiu $s4, $zero, 8 -/* 935C 8002DF5C 24134000 */ addiu $s3, $zero, 0x4000 -/* 9360 8002DF60 24120032 */ addiu $s2, $zero, 0x32 -/* 9364 8002DF64 A6D50000 */ sh $s5, ($s6) -/* 9368 8002DF68 A2C00002 */ sb $zero, 2($s6) -/* 936C 8002DF6C A6D10004 */ sh $s1, 4($s6) -/* 9370 8002DF70 A6D00006 */ sh $s0, 6($s6) -/* 9374 8002DF74 A6C00008 */ sh $zero, 8($s6) -/* 9378 8002DF78 A6C0000A */ sh $zero, 0xa($s6) -/* 937C 8002DF7C A6D4000C */ sh $s4, 0xc($s6) -/* 9380 8002DF80 A6D3000E */ sh $s3, 0xe($s6) -/* 9384 8002DF84 0C00B85B */ jal initialize_next_camera -/* 9388 8002DF88 A6D20010 */ sh $s2, 0x10($s6) -/* 938C 8002DF8C 02C0202D */ daddu $a0, $s6, $zero -/* 9390 8002DF90 A6D50000 */ sh $s5, ($s6) -/* 9394 8002DF94 A2C00002 */ sb $zero, 2($s6) -/* 9398 8002DF98 A6D10004 */ sh $s1, 4($s6) -/* 939C 8002DF9C A6D00006 */ sh $s0, 6($s6) -/* 93A0 8002DFA0 A6D10008 */ sh $s1, 8($s6) -/* 93A4 8002DFA4 A6C0000A */ sh $zero, 0xa($s6) -/* 93A8 8002DFA8 A6D4000C */ sh $s4, 0xc($s6) -/* 93AC 8002DFAC A6D3000E */ sh $s3, 0xe($s6) -/* 93B0 8002DFB0 0C00B85B */ jal initialize_next_camera -/* 93B4 8002DFB4 A6D20010 */ sh $s2, 0x10($s6) -/* 93B8 8002DFB8 02C0202D */ daddu $a0, $s6, $zero -/* 93BC 8002DFBC A6D50000 */ sh $s5, ($s6) -/* 93C0 8002DFC0 A2C00002 */ sb $zero, 2($s6) -/* 93C4 8002DFC4 A6D10004 */ sh $s1, 4($s6) -/* 93C8 8002DFC8 A6D00006 */ sh $s0, 6($s6) -/* 93CC 8002DFCC A6C00008 */ sh $zero, 8($s6) -/* 93D0 8002DFD0 A6D0000A */ sh $s0, 0xa($s6) -/* 93D4 8002DFD4 A6D4000C */ sh $s4, 0xc($s6) -/* 93D8 8002DFD8 A6D3000E */ sh $s3, 0xe($s6) -/* 93DC 8002DFDC 0C00B85B */ jal initialize_next_camera -/* 93E0 8002DFE0 A6D20010 */ sh $s2, 0x10($s6) -/* 93E4 8002DFE4 02C0202D */ daddu $a0, $s6, $zero -/* 93E8 8002DFE8 A4950000 */ sh $s5, ($a0) -/* 93EC 8002DFEC A0800002 */ sb $zero, 2($a0) -/* 93F0 8002DFF0 A4910004 */ sh $s1, 4($a0) -/* 93F4 8002DFF4 A4900006 */ sh $s0, 6($a0) -/* 93F8 8002DFF8 A4910008 */ sh $s1, 8($a0) -/* 93FC 8002DFFC A490000A */ sh $s0, 0xa($a0) -/* 9400 8002E000 A494000C */ sh $s4, 0xc($a0) -/* 9404 8002E004 A493000E */ sh $s3, 0xe($a0) -/* 9408 8002E008 0C00B85B */ jal initialize_next_camera -/* 940C 8002E00C A4920010 */ sh $s2, 0x10($a0) -/* 9410 8002E010 8FBF0044 */ lw $ra, 0x44($sp) -/* 9414 8002E014 8FB60040 */ lw $s6, 0x40($sp) -/* 9418 8002E018 8FB5003C */ lw $s5, 0x3c($sp) -/* 941C 8002E01C 8FB40038 */ lw $s4, 0x38($sp) -/* 9420 8002E020 8FB30034 */ lw $s3, 0x34($sp) -/* 9424 8002E024 8FB20030 */ lw $s2, 0x30($sp) -/* 9428 8002E028 8FB1002C */ lw $s1, 0x2c($sp) -/* 942C 8002E02C 8FB00028 */ lw $s0, 0x28($sp) -/* 9430 8002E030 03E00008 */ jr $ra -/* 9434 8002E034 27BD0048 */ addiu $sp, $sp, 0x48 diff --git a/ver/us/asm/nonmatchings/8800/create_cameras_b.s b/ver/us/asm/nonmatchings/8800/create_cameras_b.s deleted file mode 100644 index 49bfb3fbe2..0000000000 --- a/ver/us/asm/nonmatchings/8800/create_cameras_b.s +++ /dev/null @@ -1,82 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel create_cameras_b -/* 9438 8002E038 27BDFFB8 */ addiu $sp, $sp, -0x48 -/* 943C 8002E03C AFB60040 */ sw $s6, 0x40($sp) -/* 9440 8002E040 27B60010 */ addiu $s6, $sp, 0x10 -/* 9444 8002E044 24030003 */ addiu $v1, $zero, 3 -/* 9448 8002E048 3C02800B */ lui $v0, %hi(gCameras+0x1008) -/* 944C 8002E04C 24422D88 */ addiu $v0, $v0, %lo(gCameras+0x1008) -/* 9450 8002E050 AFBF0044 */ sw $ra, 0x44($sp) -/* 9454 8002E054 AFB5003C */ sw $s5, 0x3c($sp) -/* 9458 8002E058 AFB40038 */ sw $s4, 0x38($sp) -/* 945C 8002E05C AFB30034 */ sw $s3, 0x34($sp) -/* 9460 8002E060 AFB20030 */ sw $s2, 0x30($sp) -/* 9464 8002E064 AFB1002C */ sw $s1, 0x2c($sp) -/* 9468 8002E068 AFB00028 */ sw $s0, 0x28($sp) -.L8002E06C: -/* 946C 8002E06C A4400000 */ sh $zero, ($v0) -/* 9470 8002E070 2463FFFF */ addiu $v1, $v1, -1 -/* 9474 8002E074 0461FFFD */ bgez $v1, .L8002E06C -/* 9478 8002E078 2442FAA8 */ addiu $v0, $v0, -0x558 -/* 947C 8002E07C 02C0202D */ daddu $a0, $s6, $zero -/* 9480 8002E080 24150002 */ addiu $s5, $zero, 2 -/* 9484 8002E084 241100A0 */ addiu $s1, $zero, 0xa0 -/* 9488 8002E088 24100078 */ addiu $s0, $zero, 0x78 -/* 948C 8002E08C 24140008 */ addiu $s4, $zero, 8 -/* 9490 8002E090 24134000 */ addiu $s3, $zero, 0x4000 -/* 9494 8002E094 24120032 */ addiu $s2, $zero, 0x32 -/* 9498 8002E098 A6D50000 */ sh $s5, ($s6) -/* 949C 8002E09C A2C00002 */ sb $zero, 2($s6) -/* 94A0 8002E0A0 A6D10004 */ sh $s1, 4($s6) -/* 94A4 8002E0A4 A6D00006 */ sh $s0, 6($s6) -/* 94A8 8002E0A8 A6C00008 */ sh $zero, 8($s6) -/* 94AC 8002E0AC A6C0000A */ sh $zero, 0xa($s6) -/* 94B0 8002E0B0 A6D4000C */ sh $s4, 0xc($s6) -/* 94B4 8002E0B4 A6D3000E */ sh $s3, 0xe($s6) -/* 94B8 8002E0B8 0C00B85B */ jal initialize_next_camera -/* 94BC 8002E0BC A6D20010 */ sh $s2, 0x10($s6) -/* 94C0 8002E0C0 02C0202D */ daddu $a0, $s6, $zero -/* 94C4 8002E0C4 A6D50000 */ sh $s5, ($s6) -/* 94C8 8002E0C8 A2C00002 */ sb $zero, 2($s6) -/* 94CC 8002E0CC A6D10004 */ sh $s1, 4($s6) -/* 94D0 8002E0D0 A6D00006 */ sh $s0, 6($s6) -/* 94D4 8002E0D4 A6D10008 */ sh $s1, 8($s6) -/* 94D8 8002E0D8 A6C0000A */ sh $zero, 0xa($s6) -/* 94DC 8002E0DC A6D4000C */ sh $s4, 0xc($s6) -/* 94E0 8002E0E0 A6D3000E */ sh $s3, 0xe($s6) -/* 94E4 8002E0E4 0C00B85B */ jal initialize_next_camera -/* 94E8 8002E0E8 A6D20010 */ sh $s2, 0x10($s6) -/* 94EC 8002E0EC 02C0202D */ daddu $a0, $s6, $zero -/* 94F0 8002E0F0 A6D50000 */ sh $s5, ($s6) -/* 94F4 8002E0F4 A2C00002 */ sb $zero, 2($s6) -/* 94F8 8002E0F8 A6D10004 */ sh $s1, 4($s6) -/* 94FC 8002E0FC A6D00006 */ sh $s0, 6($s6) -/* 9500 8002E100 A6C00008 */ sh $zero, 8($s6) -/* 9504 8002E104 A6D0000A */ sh $s0, 0xa($s6) -/* 9508 8002E108 A6D4000C */ sh $s4, 0xc($s6) -/* 950C 8002E10C A6D3000E */ sh $s3, 0xe($s6) -/* 9510 8002E110 0C00B85B */ jal initialize_next_camera -/* 9514 8002E114 A6D20010 */ sh $s2, 0x10($s6) -/* 9518 8002E118 02C0202D */ daddu $a0, $s6, $zero -/* 951C 8002E11C A4950000 */ sh $s5, ($a0) -/* 9520 8002E120 A0800002 */ sb $zero, 2($a0) -/* 9524 8002E124 A4910004 */ sh $s1, 4($a0) -/* 9528 8002E128 A4900006 */ sh $s0, 6($a0) -/* 952C 8002E12C A4910008 */ sh $s1, 8($a0) -/* 9530 8002E130 A490000A */ sh $s0, 0xa($a0) -/* 9534 8002E134 A494000C */ sh $s4, 0xc($a0) -/* 9538 8002E138 A493000E */ sh $s3, 0xe($a0) -/* 953C 8002E13C 0C00B85B */ jal initialize_next_camera -/* 9540 8002E140 A4920010 */ sh $s2, 0x10($a0) -/* 9544 8002E144 8FBF0044 */ lw $ra, 0x44($sp) -/* 9548 8002E148 8FB60040 */ lw $s6, 0x40($sp) -/* 954C 8002E14C 8FB5003C */ lw $s5, 0x3c($sp) -/* 9550 8002E150 8FB40038 */ lw $s4, 0x38($sp) -/* 9554 8002E154 8FB30034 */ lw $s3, 0x34($sp) -/* 9558 8002E158 8FB20030 */ lw $s2, 0x30($sp) -/* 955C 8002E15C 8FB1002C */ lw $s1, 0x2c($sp) -/* 9560 8002E160 8FB00028 */ lw $s0, 0x28($sp) -/* 9564 8002E164 03E00008 */ jr $ra -/* 9568 8002E168 27BD0048 */ addiu $sp, $sp, 0x48 diff --git a/ver/us/asm/nonmatchings/9d10_len_1080/do_camera_type_0.s b/ver/us/asm/nonmatchings/9d10_len_1080/do_camera_type_0.s deleted file mode 100644 index 17935413b6..0000000000 --- a/ver/us/asm/nonmatchings/9d10_len_1080/do_camera_type_0.s +++ /dev/null @@ -1,86 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel do_camera_type_0 -/* AC50 8002F850 27BDFFC8 */ addiu $sp, $sp, -0x38 -/* AC54 8002F854 AFB00010 */ sw $s0, 0x10($sp) -/* AC58 8002F858 0080802D */ daddu $s0, $a0, $zero -/* AC5C 8002F85C AFBF0014 */ sw $ra, 0x14($sp) -/* AC60 8002F860 F7BA0030 */ sdc1 $f26, 0x30($sp) -/* AC64 8002F864 F7B80028 */ sdc1 $f24, 0x28($sp) -/* AC68 8002F868 F7B60020 */ sdc1 $f22, 0x20($sp) -/* AC6C 8002F86C F7B40018 */ sdc1 $f20, 0x18($sp) -/* AC70 8002F870 86020006 */ lh $v0, 6($s0) -/* AC74 8002F874 10400011 */ beqz $v0, .L8002F8BC -/* AC78 8002F878 00000000 */ nop -/* AC7C 8002F87C 3C01800A */ lui $at, %hi(D_8009A5EC) -/* AC80 8002F880 C420A5EC */ lwc1 $f0, %lo(D_8009A5EC)($at) -/* AC84 8002F884 3C01447A */ lui $at, 0x447a -/* AC88 8002F888 44811000 */ mtc1 $at, $f2 -/* AC8C 8002F88C AE000048 */ sw $zero, 0x48($s0) -/* AC90 8002F890 C6060048 */ lwc1 $f6, 0x48($s0) -/* AC94 8002F894 AE00004C */ sw $zero, 0x4c($s0) -/* AC98 8002F898 C604004C */ lwc1 $f4, 0x4c($s0) -/* AC9C 8002F89C AE000050 */ sw $zero, 0x50($s0) -/* ACA0 8002F8A0 46001083 */ div.s $f2, $f2, $f0 -/* ACA4 8002F8A4 C6000050 */ lwc1 $f0, 0x50($s0) -/* ACA8 8002F8A8 A6000006 */ sh $zero, 6($s0) -/* ACAC 8002F8AC 46020001 */ sub.s $f0, $f0, $f2 -/* ACB0 8002F8B0 E606003C */ swc1 $f6, 0x3c($s0) -/* ACB4 8002F8B4 E6040040 */ swc1 $f4, 0x40($s0) -/* ACB8 8002F8B8 E6000044 */ swc1 $f0, 0x44($s0) -.L8002F8BC: -/* ACBC 8002F8BC C60C003C */ lwc1 $f12, 0x3c($s0) -/* ACC0 8002F8C0 C60E0044 */ lwc1 $f14, 0x44($s0) -/* ACC4 8002F8C4 8E060048 */ lw $a2, 0x48($s0) -/* ACC8 8002F8C8 8E070050 */ lw $a3, 0x50($s0) -/* ACCC 8002F8CC 4480C000 */ mtc1 $zero, $f24 -/* ACD0 8002F8D0 0C00A720 */ jal atan2 -/* ACD4 8002F8D4 00000000 */ nop -/* ACD8 8002F8D8 4600C306 */ mov.s $f12, $f24 -/* ACDC 8002F8DC 4600C386 */ mov.s $f14, $f24 -/* ACE0 8002F8E0 C6040048 */ lwc1 $f4, 0x48($s0) -/* ACE4 8002F8E4 C602003C */ lwc1 $f2, 0x3c($s0) -/* ACE8 8002F8E8 C6140050 */ lwc1 $f20, 0x50($s0) -/* ACEC 8002F8EC 46022581 */ sub.s $f22, $f4, $f2 -/* ACF0 8002F8F0 C6020044 */ lwc1 $f2, 0x44($s0) -/* ACF4 8002F8F4 C604004C */ lwc1 $f4, 0x4c($s0) -/* ACF8 8002F8F8 4602A501 */ sub.s $f20, $f20, $f2 -/* ACFC 8002F8FC C6020040 */ lwc1 $f2, 0x40($s0) -/* AD00 8002F900 4406B000 */ mfc1 $a2, $f22 -/* AD04 8002F904 4407A000 */ mfc1 $a3, $f20 -/* AD08 8002F908 46022681 */ sub.s $f26, $f4, $f2 -/* AD0C 8002F90C 0C00A720 */ jal atan2 -/* AD10 8002F910 E600006C */ swc1 $f0, 0x6c($s0) -/* AD14 8002F914 4616B082 */ mul.s $f2, $f22, $f22 -/* AD18 8002F918 00000000 */ nop -/* AD1C 8002F91C 4614A502 */ mul.s $f20, $f20, $f20 -/* AD20 8002F920 00000000 */ nop -/* AD24 8002F924 46141300 */ add.s $f12, $f2, $f20 -/* AD28 8002F928 46000007 */ neg.s $f0, $f0 -/* AD2C 8002F92C E6000090 */ swc1 $f0, 0x90($s0) -/* AD30 8002F930 46006004 */ sqrt.s $f0, $f12 -/* AD34 8002F934 46000032 */ c.eq.s $f0, $f0 -/* AD38 8002F938 00000000 */ nop -/* AD3C 8002F93C 45030004 */ bc1tl .L8002F950 -/* AD40 8002F940 4600C306 */ mov.s $f12, $f24 -/* AD44 8002F944 0C0187BC */ jal sqrtf -/* AD48 8002F948 00000000 */ nop -/* AD4C 8002F94C 4600C306 */ mov.s $f12, $f24 -.L8002F950: -/* AD50 8002F950 46000007 */ neg.s $f0, $f0 -/* AD54 8002F954 4406D000 */ mfc1 $a2, $f26 -/* AD58 8002F958 44070000 */ mfc1 $a3, $f0 -/* AD5C 8002F95C 0C00A720 */ jal atan2 -/* AD60 8002F960 46006386 */ mov.s $f14, $f12 -/* AD64 8002F964 E6000094 */ swc1 $f0, 0x94($s0) -/* AD68 8002F968 8FBF0014 */ lw $ra, 0x14($sp) -/* AD6C 8002F96C 8FB00010 */ lw $s0, 0x10($sp) -/* AD70 8002F970 D7BA0030 */ ldc1 $f26, 0x30($sp) -/* AD74 8002F974 D7B80028 */ ldc1 $f24, 0x28($sp) -/* AD78 8002F978 D7B60020 */ ldc1 $f22, 0x20($sp) -/* AD7C 8002F97C D7B40018 */ ldc1 $f20, 0x18($sp) -/* AD80 8002F980 03E00008 */ jr $ra -/* AD84 8002F984 27BD0038 */ addiu $sp, $sp, 0x38 -/* AD88 8002F988 00000000 */ nop -/* AD8C 8002F98C 00000000 */ nop diff --git a/ver/us/asm/nonmatchings/a5dd0_len_114e0/clear_model_data.s b/ver/us/asm/nonmatchings/a5dd0_len_114e0/clear_model_data.s index e0bfc3d4b6..eb68c931d1 100644 --- a/ver/us/asm/nonmatchings/a5dd0_len_114e0/clear_model_data.s +++ b/ver/us/asm/nonmatchings/a5dd0_len_114e0/clear_model_data.s @@ -13,8 +13,8 @@ glabel clear_model_data /* AC464 80115D64 AC2212CC */ sw $v0, %lo(gCurrentModelListPtr)($at) /* AC468 80115D68 3C028015 */ lui $v0, %hi(D_80151F70) /* AC46C 80115D6C 24421F70 */ addiu $v0, $v0, %lo(D_80151F70) -/* AC470 80115D70 3C018015 */ lui $at, %hi(D_801512E0) -/* AC474 80115D74 AC2212E0 */ sw $v0, %lo(D_801512E0)($at) +/* AC470 80115D70 3C018015 */ lui $at, %hi(gCurrentTransformGroups) +/* AC474 80115D74 AC2212E0 */ sw $v0, %lo(gCurrentTransformGroups)($at) /* AC478 80115D78 3C028015 */ lui $v0, %hi(gWorldModelSpecialDls) /* AC47C 80115D7C 24421F90 */ addiu $v0, $v0, %lo(gWorldModelSpecialDls) /* AC480 80115D80 3C018015 */ lui $at, %hi(gCurrentModelSpecialDlsPtr) @@ -57,8 +57,8 @@ glabel clear_model_data /* AC510 80115E10 AC2212CC */ sw $v0, %lo(gCurrentModelListPtr)($at) /* AC514 80115E14 3C028015 */ lui $v0, %hi(D_80151F80) /* AC518 80115E18 24421F80 */ addiu $v0, $v0, %lo(D_80151F80) -/* AC51C 80115E1C 3C018015 */ lui $at, %hi(D_801512E0) -/* AC520 80115E20 AC2212E0 */ sw $v0, %lo(D_801512E0)($at) +/* AC51C 80115E1C 3C018015 */ lui $at, %hi(gCurrentTransformGroups) +/* AC520 80115E20 AC2212E0 */ sw $v0, %lo(gCurrentTransformGroups)($at) /* AC524 80115E24 3C028015 */ lui $v0, %hi(gBattleModelSpecialDls) /* AC528 80115E28 24422010 */ addiu $v0, $v0, %lo(gBattleModelSpecialDls) /* AC52C 80115E2C 3C018015 */ lui $at, %hi(gCurrentModelSpecialDlsPtr) @@ -97,8 +97,8 @@ glabel clear_model_data /* AC5A8 80115EA8 2484FFFF */ addiu $a0, $a0, -1 /* AC5AC 80115EAC 0481FFFD */ bgez $a0, .L80115EA4 /* AC5B0 80115EB0 2442FFFC */ addiu $v0, $v0, -4 -/* AC5B4 80115EB4 3C028015 */ lui $v0, %hi(D_801512E0) -/* AC5B8 80115EB8 8C4212E0 */ lw $v0, %lo(D_801512E0)($v0) +/* AC5B4 80115EB4 3C028015 */ lui $v0, %hi(gCurrentTransformGroups) +/* AC5B8 80115EB8 8C4212E0 */ lw $v0, %lo(gCurrentTransformGroups)($v0) /* AC5BC 80115EBC 24040003 */ addiu $a0, $zero, 3 /* AC5C0 80115EC0 2442000C */ addiu $v0, $v0, 0xc .L80115EC4: diff --git a/ver/us/asm/nonmatchings/a5dd0_len_114e0/func_80116698.s b/ver/us/asm/nonmatchings/a5dd0_len_114e0/func_80116698.s index c8fbfeddec..2e3b1378ef 100644 --- a/ver/us/asm/nonmatchings/a5dd0_len_114e0/func_80116698.s +++ b/ver/us/asm/nonmatchings/a5dd0_len_114e0/func_80116698.s @@ -182,8 +182,8 @@ glabel func_80116698 /* AD030 80116930 3C013F00 */ lui $at, 0x3f00 /* AD034 80116934 4481A000 */ mtc1 $at, $f20 .L80116938: -/* AD038 80116938 3C038015 */ lui $v1, %hi(D_801512E0) -/* AD03C 8011693C 8C6312E0 */ lw $v1, %lo(D_801512E0)($v1) +/* AD038 80116938 3C038015 */ lui $v1, %hi(gCurrentTransformGroups) +/* AD03C 8011693C 8C6312E0 */ lw $v1, %lo(gCurrentTransformGroups)($v1) /* AD040 80116940 00121080 */ sll $v0, $s2, 2 /* AD044 80116944 00431021 */ addu $v0, $v0, $v1 /* AD048 80116948 8C500000 */ lw $s0, ($v0) diff --git a/ver/us/asm/nonmatchings/a5dd0_len_114e0/func_8011B37C.s b/ver/us/asm/nonmatchings/a5dd0_len_114e0/func_8011B37C.s index ec28292230..ee1343dd0c 100644 --- a/ver/us/asm/nonmatchings/a5dd0_len_114e0/func_8011B37C.s +++ b/ver/us/asm/nonmatchings/a5dd0_len_114e0/func_8011B37C.s @@ -27,8 +27,8 @@ glabel func_8011B37C /* B1AD4 8011B3D4 8E020000 */ lw $v0, ($s0) /* B1AD8 8011B3D8 10400077 */ beqz $v0, .L8011B5B8 /* B1ADC 8011B3DC 0000802D */ daddu $s0, $zero, $zero -/* B1AE0 8011B3E0 3C118015 */ lui $s1, %hi(D_801512E0) -/* B1AE4 8011B3E4 263112E0 */ addiu $s1, $s1, %lo(D_801512E0) +/* B1AE0 8011B3E0 3C118015 */ lui $s1, %hi(gCurrentTransformGroups) +/* B1AE4 8011B3E4 263112E0 */ addiu $s1, $s1, %lo(gCurrentTransformGroups) /* B1AE8 8011B3E8 8E230000 */ lw $v1, ($s1) .L8011B3EC: /* B1AEC 8011B3EC 8C620000 */ lw $v0, ($v1) diff --git a/ver/us/asm/nonmatchings/a5dd0_len_114e0/init_model_data.s b/ver/us/asm/nonmatchings/a5dd0_len_114e0/init_model_data.s index 3ccfab8e37..9349cde72d 100644 --- a/ver/us/asm/nonmatchings/a5dd0_len_114e0/init_model_data.s +++ b/ver/us/asm/nonmatchings/a5dd0_len_114e0/init_model_data.s @@ -13,8 +13,8 @@ glabel init_model_data /* AC708 80116008 AC2212CC */ sw $v0, %lo(gCurrentModelListPtr)($at) /* AC70C 8011600C 3C028015 */ lui $v0, %hi(D_80151F70) /* AC710 80116010 24421F70 */ addiu $v0, $v0, %lo(D_80151F70) -/* AC714 80116014 3C018015 */ lui $at, %hi(D_801512E0) -/* AC718 80116018 AC2212E0 */ sw $v0, %lo(D_801512E0)($at) +/* AC714 80116014 3C018015 */ lui $at, %hi(gCurrentTransformGroups) +/* AC718 80116018 AC2212E0 */ sw $v0, %lo(gCurrentTransformGroups)($at) /* AC71C 8011601C 3C028015 */ lui $v0, %hi(gWorldModelSpecialDls) /* AC720 80116020 24421F90 */ addiu $v0, $v0, %lo(gWorldModelSpecialDls) /* AC724 80116024 3C018015 */ lui $at, %hi(gCurrentModelSpecialDlsPtr) @@ -52,8 +52,8 @@ glabel init_model_data /* AC7A0 801160A0 AC2212CC */ sw $v0, %lo(gCurrentModelListPtr)($at) /* AC7A4 801160A4 3C028015 */ lui $v0, %hi(D_80151F80) /* AC7A8 801160A8 24421F80 */ addiu $v0, $v0, %lo(D_80151F80) -/* AC7AC 801160AC 3C018015 */ lui $at, %hi(D_801512E0) -/* AC7B0 801160B0 AC2212E0 */ sw $v0, %lo(D_801512E0)($at) +/* AC7AC 801160AC 3C018015 */ lui $at, %hi(gCurrentTransformGroups) +/* AC7B0 801160B0 AC2212E0 */ sw $v0, %lo(gCurrentTransformGroups)($at) /* AC7B4 801160B4 3C028015 */ lui $v0, %hi(gBattleModelSpecialDls) /* AC7B8 801160B8 24422010 */ addiu $v0, $v0, %lo(gBattleModelSpecialDls) /* AC7BC 801160BC 3C018015 */ lui $at, %hi(gCurrentModelSpecialDlsPtr) diff --git a/ver/us/asm/nonmatchings/a5dd0_len_114e0/render_models.s b/ver/us/asm/nonmatchings/a5dd0_len_114e0/render_models.s index fb88fd53f1..5ffd2708a8 100644 --- a/ver/us/asm/nonmatchings/a5dd0_len_114e0/render_models.s +++ b/ver/us/asm/nonmatchings/a5dd0_len_114e0/render_models.s @@ -1031,8 +1031,8 @@ glabel render_models /* AE254 80117B54 3C013F80 */ lui $at, 0x3f80 /* AE258 80117B58 4481B000 */ mtc1 $at, $f22 .L80117B5C: -/* AE25C 80117B5C 3C038015 */ lui $v1, %hi(D_801512E0) -/* AE260 80117B60 8C6312E0 */ lw $v1, %lo(D_801512E0)($v1) +/* AE25C 80117B5C 3C038015 */ lui $v1, %hi(gCurrentTransformGroups) +/* AE260 80117B60 8C6312E0 */ lw $v1, %lo(gCurrentTransformGroups)($v1) /* AE264 80117B64 00131080 */ sll $v0, $s3, 2 /* AE268 80117B68 00431021 */ addu $v0, $v0, $v1 /* AE26C 80117B6C 8C500000 */ lw $s0, ($v0) diff --git a/ver/us/asm/nonmatchings/evt/map_api/EnableGroup.s b/ver/us/asm/nonmatchings/evt/map_api/EnableGroup.s deleted file mode 100644 index a888d3bd00..0000000000 --- a/ver/us/asm/nonmatchings/evt/map_api/EnableGroup.s +++ /dev/null @@ -1,63 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel EnableGroup -/* EE548 802C9B98 27BDFFE0 */ addiu $sp, $sp, -0x20 -/* EE54C 802C9B9C AFB20018 */ sw $s2, 0x18($sp) -/* EE550 802C9BA0 0080902D */ daddu $s2, $a0, $zero -/* EE554 802C9BA4 AFBF001C */ sw $ra, 0x1c($sp) -/* EE558 802C9BA8 AFB10014 */ sw $s1, 0x14($sp) -/* EE55C 802C9BAC AFB00010 */ sw $s0, 0x10($sp) -/* EE560 802C9BB0 8E51000C */ lw $s1, 0xc($s2) -/* EE564 802C9BB4 0C0B1EAF */ jal get_variable -/* EE568 802C9BB8 8E250000 */ lw $a1, ($s1) -/* EE56C 802C9BBC 0C046C24 */ jal func_8011B090 -/* EE570 802C9BC0 0040202D */ daddu $a0, $v0, $zero -/* EE574 802C9BC4 0040802D */ daddu $s0, $v0, $zero -/* EE578 802C9BC8 2402FFFF */ addiu $v0, $zero, -1 -/* EE57C 802C9BCC 16020007 */ bne $s0, $v0, .L802C9BEC -/* EE580 802C9BD0 00000000 */ nop -/* EE584 802C9BD4 3C04802D */ lui $a0, %hi(EnableModel) -/* EE588 802C9BD8 24849288 */ addiu $a0, $a0, %lo(EnableModel) -/* EE58C 802C9BDC 0C0B2568 */ jal func_802C95A0 -/* EE590 802C9BE0 0240282D */ daddu $a1, $s2, $zero -/* EE594 802C9BE4 080B2716 */ j .L802C9C58 -/* EE598 802C9BE8 24020002 */ addiu $v0, $zero, 2 -.L802C9BEC: -/* EE59C 802C9BEC 8E250004 */ lw $a1, 4($s1) -/* EE5A0 802C9BF0 0C0B1EAF */ jal get_variable -/* EE5A4 802C9BF4 0240202D */ daddu $a0, $s2, $zero -/* EE5A8 802C9BF8 0200202D */ daddu $a0, $s0, $zero -/* EE5AC 802C9BFC 0C046C70 */ jal func_8011B1C0 -/* EE5B0 802C9C00 0040902D */ daddu $s2, $v0, $zero -/* EE5B4 802C9C04 0040882D */ daddu $s1, $v0, $zero -/* EE5B8 802C9C08 9230009C */ lbu $s0, 0x9c($s1) -/* EE5BC 802C9C0C 9222009D */ lbu $v0, 0x9d($s1) -/* EE5C0 802C9C10 0050102A */ slt $v0, $v0, $s0 -/* EE5C4 802C9C14 14400010 */ bnez $v0, .L802C9C58 -/* EE5C8 802C9C18 24020002 */ addiu $v0, $zero, 2 -.L802C9C1C: -/* EE5CC 802C9C1C 0C046B4C */ jal get_model_from_list_index -/* EE5D0 802C9C20 0200202D */ daddu $a0, $s0, $zero -/* EE5D4 802C9C24 12400004 */ beqz $s2, .L802C9C38 -/* EE5D8 802C9C28 0040182D */ daddu $v1, $v0, $zero -/* EE5DC 802C9C2C 94620000 */ lhu $v0, ($v1) -/* EE5E0 802C9C30 080B2710 */ j .L802C9C40 -/* EE5E4 802C9C34 3042FFFD */ andi $v0, $v0, 0xfffd -.L802C9C38: -/* EE5E8 802C9C38 94620000 */ lhu $v0, ($v1) -/* EE5EC 802C9C3C 34420002 */ ori $v0, $v0, 2 -.L802C9C40: -/* EE5F0 802C9C40 A4620000 */ sh $v0, ($v1) -/* EE5F4 802C9C44 9222009D */ lbu $v0, 0x9d($s1) -/* EE5F8 802C9C48 26100001 */ addiu $s0, $s0, 1 -/* EE5FC 802C9C4C 0050102A */ slt $v0, $v0, $s0 -/* EE600 802C9C50 1040FFF2 */ beqz $v0, .L802C9C1C -/* EE604 802C9C54 24020002 */ addiu $v0, $zero, 2 -.L802C9C58: -/* EE608 802C9C58 8FBF001C */ lw $ra, 0x1c($sp) -/* EE60C 802C9C5C 8FB20018 */ lw $s2, 0x18($sp) -/* EE610 802C9C60 8FB10014 */ lw $s1, 0x14($sp) -/* EE614 802C9C64 8FB00010 */ lw $s0, 0x10($sp) -/* EE618 802C9C68 03E00008 */ jr $ra -/* EE61C 802C9C6C 27BD0020 */ addiu $sp, $sp, 0x20 diff --git a/ver/us/asm/nonmatchings/evt/map_api/ModifyColliderFlags.s b/ver/us/asm/nonmatchings/evt/map_api/ModifyColliderFlags.s deleted file mode 100644 index 8574e4295c..0000000000 --- a/ver/us/asm/nonmatchings/evt/map_api/ModifyColliderFlags.s +++ /dev/null @@ -1,79 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel ModifyColliderFlags -/* EE77C 802C9DCC 27BDFFE0 */ addiu $sp, $sp, -0x20 -/* EE780 802C9DD0 AFB10014 */ sw $s1, 0x14($sp) -/* EE784 802C9DD4 0080882D */ daddu $s1, $a0, $zero -/* EE788 802C9DD8 AFBF001C */ sw $ra, 0x1c($sp) -/* EE78C 802C9DDC AFB20018 */ sw $s2, 0x18($sp) -/* EE790 802C9DE0 AFB00010 */ sw $s0, 0x10($sp) -/* EE794 802C9DE4 8E30000C */ lw $s0, 0xc($s1) -/* EE798 802C9DE8 8E050000 */ lw $a1, ($s0) -/* EE79C 802C9DEC 0C0B1EAF */ jal get_variable -/* EE7A0 802C9DF0 26100004 */ addiu $s0, $s0, 4 -/* EE7A4 802C9DF4 8E050000 */ lw $a1, ($s0) -/* EE7A8 802C9DF8 26100004 */ addiu $s0, $s0, 4 -/* EE7AC 802C9DFC 0220202D */ daddu $a0, $s1, $zero -/* EE7B0 802C9E00 0C0B1EAF */ jal get_variable -/* EE7B4 802C9E04 0040902D */ daddu $s2, $v0, $zero -/* EE7B8 802C9E08 0220202D */ daddu $a0, $s1, $zero -/* EE7BC 802C9E0C 8E050000 */ lw $a1, ($s0) -/* EE7C0 802C9E10 0C0B1EAF */ jal get_variable -/* EE7C4 802C9E14 0040802D */ daddu $s0, $v0, $zero -/* EE7C8 802C9E18 001018C0 */ sll $v1, $s0, 3 -/* EE7CC 802C9E1C 00701823 */ subu $v1, $v1, $s0 -/* EE7D0 802C9E20 3C04800B */ lui $a0, %hi(gCollisionData+0x4) -/* EE7D4 802C9E24 8C8442E4 */ lw $a0, %lo(gCollisionData+0x4)($a0) -/* EE7D8 802C9E28 00031880 */ sll $v1, $v1, 2 -/* EE7DC 802C9E2C 00838021 */ addu $s0, $a0, $v1 -/* EE7E0 802C9E30 86040006 */ lh $a0, 6($s0) -/* EE7E4 802C9E34 04800004 */ bltz $a0, .L802C9E48 -/* EE7E8 802C9E38 0040882D */ daddu $s1, $v0, $zero -/* EE7EC 802C9E3C 0220282D */ daddu $a1, $s1, $zero -/* EE7F0 802C9E40 0C0B273A */ jal modify_collider_family_flags -/* EE7F4 802C9E44 0240302D */ daddu $a2, $s2, $zero -.L802C9E48: -/* EE7F8 802C9E48 24020001 */ addiu $v0, $zero, 1 -/* EE7FC 802C9E4C 12420011 */ beq $s2, $v0, .L802C9E94 -/* EE800 802C9E50 00111827 */ nor $v1, $zero, $s1 -/* EE804 802C9E54 2A420002 */ slti $v0, $s2, 2 -/* EE808 802C9E58 50400005 */ beql $v0, $zero, .L802C9E70 -/* EE80C 802C9E5C 24020002 */ addiu $v0, $zero, 2 -/* EE810 802C9E60 12400009 */ beqz $s2, .L802C9E88 -/* EE814 802C9E64 00000000 */ nop -/* EE818 802C9E68 080B27AF */ j .L802C9EBC -/* EE81C 802C9E6C 00000000 */ nop -.L802C9E70: -/* EE820 802C9E70 1242000B */ beq $s2, $v0, .L802C9EA0 -/* EE824 802C9E74 24020003 */ addiu $v0, $zero, 3 -/* EE828 802C9E78 1242000B */ beq $s2, $v0, .L802C9EA8 -/* EE82C 802C9E7C 2403FF00 */ addiu $v1, $zero, -0x100 -/* EE830 802C9E80 080B27AF */ j .L802C9EBC -/* EE834 802C9E84 00000000 */ nop -.L802C9E88: -/* EE838 802C9E88 8E020000 */ lw $v0, ($s0) -/* EE83C 802C9E8C 080B27AE */ j .L802C9EB8 -/* EE840 802C9E90 00511025 */ or $v0, $v0, $s1 -.L802C9E94: -/* EE844 802C9E94 8E020000 */ lw $v0, ($s0) -/* EE848 802C9E98 080B27AE */ j .L802C9EB8 -/* EE84C 802C9E9C 00431024 */ and $v0, $v0, $v1 -.L802C9EA0: -/* EE850 802C9EA0 080B27AF */ j .L802C9EBC -/* EE854 802C9EA4 AE110000 */ sw $s1, ($s0) -.L802C9EA8: -/* EE858 802C9EA8 8E020000 */ lw $v0, ($s0) -/* EE85C 802C9EAC 00431024 */ and $v0, $v0, $v1 -/* EE860 802C9EB0 322300FF */ andi $v1, $s1, 0xff -/* EE864 802C9EB4 00431025 */ or $v0, $v0, $v1 -.L802C9EB8: -/* EE868 802C9EB8 AE020000 */ sw $v0, ($s0) -.L802C9EBC: -/* EE86C 802C9EBC 8FBF001C */ lw $ra, 0x1c($sp) -/* EE870 802C9EC0 8FB20018 */ lw $s2, 0x18($sp) -/* EE874 802C9EC4 8FB10014 */ lw $s1, 0x14($sp) -/* EE878 802C9EC8 8FB00010 */ lw $s0, 0x10($sp) -/* EE87C 802C9ECC 24020002 */ addiu $v0, $zero, 2 -/* EE880 802C9ED0 03E00008 */ jr $ra -/* EE884 802C9ED4 27BD0020 */ addiu $sp, $sp, 0x20 diff --git a/ver/us/asm/nonmatchings/evt/map_api/ResetFromLava.s b/ver/us/asm/nonmatchings/evt/map_api/ResetFromLava.s deleted file mode 100644 index 4234d0bf02..0000000000 --- a/ver/us/asm/nonmatchings/evt/map_api/ResetFromLava.s +++ /dev/null @@ -1,72 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel ResetFromLava -/* EE888 802C9ED8 27BDFFD8 */ addiu $sp, $sp, -0x28 -/* EE88C 802C9EDC AFBF0020 */ sw $ra, 0x20($sp) -/* EE890 802C9EE0 AFB3001C */ sw $s3, 0x1c($sp) -/* EE894 802C9EE4 AFB20018 */ sw $s2, 0x18($sp) -/* EE898 802C9EE8 AFB10014 */ sw $s1, 0x14($sp) -/* EE89C 802C9EEC AFB00010 */ sw $s0, 0x10($sp) -/* EE8A0 802C9EF0 10A0001D */ beqz $a1, .L802C9F68 -/* EE8A4 802C9EF4 8C82000C */ lw $v0, 0xc($a0) -/* EE8A8 802C9EF8 8C450000 */ lw $a1, ($v0) -/* EE8AC 802C9EFC 3C12800B */ lui $s2, %hi(gCollisionData) -/* EE8B0 802C9F00 265242E0 */ addiu $s2, $s2, %lo(gCollisionData) -/* EE8B4 802C9F04 0C0B1EAF */ jal get_variable -/* EE8B8 802C9F08 2413FFFF */ addiu $s3, $zero, -1 -/* EE8BC 802C9F0C 0040882D */ daddu $s1, $v0, $zero -/* EE8C0 802C9F10 3C01802E */ lui $at, %hi(D_802DADA0) -/* EE8C4 802C9F14 AC31ADA0 */ sw $s1, %lo(D_802DADA0)($at) -.L802C9F18: -/* EE8C8 802C9F18 8E230000 */ lw $v1, ($s1) -/* EE8CC 802C9F1C 1073000F */ beq $v1, $s3, .L802C9F5C -/* EE8D0 802C9F20 000310C0 */ sll $v0, $v1, 3 -/* EE8D4 802C9F24 00431023 */ subu $v0, $v0, $v1 -/* EE8D8 802C9F28 8E430004 */ lw $v1, 4($s2) -/* EE8DC 802C9F2C 00021080 */ sll $v0, $v0, 2 -/* EE8E0 802C9F30 00628021 */ addu $s0, $v1, $v0 -/* EE8E4 802C9F34 86040006 */ lh $a0, 6($s0) -/* EE8E8 802C9F38 04800003 */ bltz $a0, .L802C9F48 -/* EE8EC 802C9F3C 24050100 */ addiu $a1, $zero, 0x100 -/* EE8F0 802C9F40 0C0B273A */ jal modify_collider_family_flags -/* EE8F4 802C9F44 0000302D */ daddu $a2, $zero, $zero -.L802C9F48: -/* EE8F8 802C9F48 8E020000 */ lw $v0, ($s0) -/* EE8FC 802C9F4C 26310010 */ addiu $s1, $s1, 0x10 -/* EE900 802C9F50 34420100 */ ori $v0, $v0, 0x100 -/* EE904 802C9F54 080B27C6 */ j .L802C9F18 -/* EE908 802C9F58 AE020000 */ sw $v0, ($s0) -.L802C9F5C: -/* EE90C 802C9F5C 2402FFFF */ addiu $v0, $zero, -1 -/* EE910 802C9F60 3C01802E */ lui $at, %hi(D_802DADA4) -/* EE914 802C9F64 AC22ADA4 */ sw $v0, %lo(D_802DADA4)($at) -.L802C9F68: -/* EE918 802C9F68 3C028016 */ lui $v0, %hi(gCollisionStatus) -/* EE91C 802C9F6C 2442A550 */ addiu $v0, $v0, %lo(gCollisionStatus) -/* EE920 802C9F70 94430002 */ lhu $v1, 2($v0) -/* EE924 802C9F74 30624000 */ andi $v0, $v1, 0x4000 -/* EE928 802C9F78 1440000F */ bnez $v0, .L802C9FB8 -/* EE92C 802C9F7C 0000102D */ daddu $v0, $zero, $zero -/* EE930 802C9F80 00031400 */ sll $v0, $v1, 0x10 -/* EE934 802C9F84 00022403 */ sra $a0, $v0, 0x10 -/* EE938 802C9F88 000410C0 */ sll $v0, $a0, 3 -/* EE93C 802C9F8C 00441023 */ subu $v0, $v0, $a0 -/* EE940 802C9F90 3C03800B */ lui $v1, %hi(gCollisionData+0x4) -/* EE944 802C9F94 8C6342E4 */ lw $v1, %lo(gCollisionData+0x4)($v1) -/* EE948 802C9F98 00021080 */ sll $v0, $v0, 2 -/* EE94C 802C9F9C 00628021 */ addu $s0, $v1, $v0 -/* EE950 802C9FA0 8E020000 */ lw $v0, ($s0) -/* EE954 802C9FA4 30420100 */ andi $v0, $v0, 0x100 -/* EE958 802C9FA8 10400003 */ beqz $v0, .L802C9FB8 -/* EE95C 802C9FAC 0000102D */ daddu $v0, $zero, $zero -/* EE960 802C9FB0 3C01802E */ lui $at, %hi(D_802DADA4) -/* EE964 802C9FB4 AC24ADA4 */ sw $a0, %lo(D_802DADA4)($at) -.L802C9FB8: -/* EE968 802C9FB8 8FBF0020 */ lw $ra, 0x20($sp) -/* EE96C 802C9FBC 8FB3001C */ lw $s3, 0x1c($sp) -/* EE970 802C9FC0 8FB20018 */ lw $s2, 0x18($sp) -/* EE974 802C9FC4 8FB10014 */ lw $s1, 0x14($sp) -/* EE978 802C9FC8 8FB00010 */ lw $s0, 0x10($sp) -/* EE97C 802C9FCC 03E00008 */ jr $ra -/* EE980 802C9FD0 27BD0028 */ addiu $sp, $sp, 0x28 diff --git a/ver/us/asm/nonmatchings/evt/map_api/RotateGroup.s b/ver/us/asm/nonmatchings/evt/map_api/RotateGroup.s deleted file mode 100644 index 48266e33cb..0000000000 --- a/ver/us/asm/nonmatchings/evt/map_api/RotateGroup.s +++ /dev/null @@ -1,89 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel RotateGroup -/* EE288 802C98D8 27BDFF78 */ addiu $sp, $sp, -0x88 -/* EE28C 802C98DC AFB1005C */ sw $s1, 0x5c($sp) -/* EE290 802C98E0 0080882D */ daddu $s1, $a0, $zero -/* EE294 802C98E4 AFBF0064 */ sw $ra, 0x64($sp) -/* EE298 802C98E8 AFB20060 */ sw $s2, 0x60($sp) -/* EE29C 802C98EC AFB00058 */ sw $s0, 0x58($sp) -/* EE2A0 802C98F0 F7BA0080 */ sdc1 $f26, 0x80($sp) -/* EE2A4 802C98F4 F7B80078 */ sdc1 $f24, 0x78($sp) -/* EE2A8 802C98F8 F7B60070 */ sdc1 $f22, 0x70($sp) -/* EE2AC 802C98FC F7B40068 */ sdc1 $f20, 0x68($sp) -/* EE2B0 802C9900 8E30000C */ lw $s0, 0xc($s1) -/* EE2B4 802C9904 0C0B1EAF */ jal get_variable -/* EE2B8 802C9908 8E050000 */ lw $a1, ($s0) -/* EE2BC 802C990C 0C046C24 */ jal func_8011B090 -/* EE2C0 802C9910 0040202D */ daddu $a0, $v0, $zero -/* EE2C4 802C9914 0040902D */ daddu $s2, $v0, $zero -/* EE2C8 802C9918 2402FFFF */ addiu $v0, $zero, -1 -/* EE2CC 802C991C 16420007 */ bne $s2, $v0, .L802C993C -/* EE2D0 802C9920 26100004 */ addiu $s0, $s0, 4 -/* EE2D4 802C9924 3C04802D */ lui $a0, %hi(RotateModel) -/* EE2D8 802C9928 24848C64 */ addiu $a0, $a0, %lo(RotateModel) -/* EE2DC 802C992C 0C0B2568 */ jal func_802C95A0 -/* EE2E0 802C9930 0220282D */ daddu $a1, $s1, $zero -/* EE2E4 802C9934 080B267D */ j .L802C99F4 -/* EE2E8 802C9938 24020002 */ addiu $v0, $zero, 2 -.L802C993C: -/* EE2EC 802C993C 8E050000 */ lw $a1, ($s0) -/* EE2F0 802C9940 26100004 */ addiu $s0, $s0, 4 -/* EE2F4 802C9944 0C0B210B */ jal get_float_variable -/* EE2F8 802C9948 0220202D */ daddu $a0, $s1, $zero -/* EE2FC 802C994C 8E050000 */ lw $a1, ($s0) -/* EE300 802C9950 26100004 */ addiu $s0, $s0, 4 -/* EE304 802C9954 0220202D */ daddu $a0, $s1, $zero -/* EE308 802C9958 0C0B210B */ jal get_float_variable -/* EE30C 802C995C 46000686 */ mov.s $f26, $f0 -/* EE310 802C9960 8E050000 */ lw $a1, ($s0) -/* EE314 802C9964 26100004 */ addiu $s0, $s0, 4 -/* EE318 802C9968 0220202D */ daddu $a0, $s1, $zero -/* EE31C 802C996C 0C0B210B */ jal get_float_variable -/* EE320 802C9970 46000606 */ mov.s $f24, $f0 -/* EE324 802C9974 0220202D */ daddu $a0, $s1, $zero -/* EE328 802C9978 8E050000 */ lw $a1, ($s0) -/* EE32C 802C997C 0C0B210B */ jal get_float_variable -/* EE330 802C9980 46000506 */ mov.s $f20, $f0 -/* EE334 802C9984 0240202D */ daddu $a0, $s2, $zero -/* EE338 802C9988 0C046C70 */ jal func_8011B1C0 -/* EE33C 802C998C 46000586 */ mov.s $f22, $f0 -/* EE340 802C9990 0040802D */ daddu $s0, $v0, $zero -/* EE344 802C9994 96020000 */ lhu $v0, ($s0) -/* EE348 802C9998 30420400 */ andi $v0, $v0, 0x400 -/* EE34C 802C999C 1440000B */ bnez $v0, .L802C99CC -/* EE350 802C99A0 27A40018 */ addiu $a0, $sp, 0x18 -/* EE354 802C99A4 4405D000 */ mfc1 $a1, $f26 -/* EE358 802C99A8 4406C000 */ mfc1 $a2, $f24 -/* EE35C 802C99AC 4407A000 */ mfc1 $a3, $f20 -/* EE360 802C99B0 26040050 */ addiu $a0, $s0, 0x50 -/* EE364 802C99B4 0C019EC8 */ jal guRotateF -/* EE368 802C99B8 E7B60010 */ swc1 $f22, 0x10($sp) -/* EE36C 802C99BC 96020000 */ lhu $v0, ($s0) -/* EE370 802C99C0 34421400 */ ori $v0, $v0, 0x1400 -/* EE374 802C99C4 080B267C */ j .L802C99F0 -/* EE378 802C99C8 A6020000 */ sh $v0, ($s0) -.L802C99CC: -/* EE37C 802C99CC 4405D000 */ mfc1 $a1, $f26 -/* EE380 802C99D0 4406C000 */ mfc1 $a2, $f24 -/* EE384 802C99D4 4407A000 */ mfc1 $a3, $f20 -/* EE388 802C99D8 0C019EC8 */ jal guRotateF -/* EE38C 802C99DC E7B60010 */ swc1 $f22, 0x10($sp) -/* EE390 802C99E0 27A40018 */ addiu $a0, $sp, 0x18 -/* EE394 802C99E4 26050050 */ addiu $a1, $s0, 0x50 -/* EE398 802C99E8 0C019D80 */ jal guMtxCatF -/* EE39C 802C99EC 00A0302D */ daddu $a2, $a1, $zero -.L802C99F0: -/* EE3A0 802C99F0 24020002 */ addiu $v0, $zero, 2 -.L802C99F4: -/* EE3A4 802C99F4 8FBF0064 */ lw $ra, 0x64($sp) -/* EE3A8 802C99F8 8FB20060 */ lw $s2, 0x60($sp) -/* EE3AC 802C99FC 8FB1005C */ lw $s1, 0x5c($sp) -/* EE3B0 802C9A00 8FB00058 */ lw $s0, 0x58($sp) -/* EE3B4 802C9A04 D7BA0080 */ ldc1 $f26, 0x80($sp) -/* EE3B8 802C9A08 D7B80078 */ ldc1 $f24, 0x78($sp) -/* EE3BC 802C9A0C D7B60070 */ ldc1 $f22, 0x70($sp) -/* EE3C0 802C9A10 D7B40068 */ ldc1 $f20, 0x68($sp) -/* EE3C4 802C9A14 03E00008 */ jr $ra -/* EE3C8 802C9A18 27BD0088 */ addiu $sp, $sp, 0x88 diff --git a/ver/us/asm/nonmatchings/evt/map_api/ScaleGroup.s b/ver/us/asm/nonmatchings/evt/map_api/ScaleGroup.s deleted file mode 100644 index 1854e58707..0000000000 --- a/ver/us/asm/nonmatchings/evt/map_api/ScaleGroup.s +++ /dev/null @@ -1,81 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel ScaleGroup -/* EE3CC 802C9A1C 27BDFF88 */ addiu $sp, $sp, -0x78 -/* EE3D0 802C9A20 AFB20058 */ sw $s2, 0x58($sp) -/* EE3D4 802C9A24 0080902D */ daddu $s2, $a0, $zero -/* EE3D8 802C9A28 AFBF005C */ sw $ra, 0x5c($sp) -/* EE3DC 802C9A2C AFB10054 */ sw $s1, 0x54($sp) -/* EE3E0 802C9A30 AFB00050 */ sw $s0, 0x50($sp) -/* EE3E4 802C9A34 F7B80070 */ sdc1 $f24, 0x70($sp) -/* EE3E8 802C9A38 F7B60068 */ sdc1 $f22, 0x68($sp) -/* EE3EC 802C9A3C F7B40060 */ sdc1 $f20, 0x60($sp) -/* EE3F0 802C9A40 8E50000C */ lw $s0, 0xc($s2) -/* EE3F4 802C9A44 0C0B1EAF */ jal get_variable -/* EE3F8 802C9A48 8E050000 */ lw $a1, ($s0) -/* EE3FC 802C9A4C 0C046C24 */ jal func_8011B090 -/* EE400 802C9A50 0040202D */ daddu $a0, $v0, $zero -/* EE404 802C9A54 0040882D */ daddu $s1, $v0, $zero -/* EE408 802C9A58 2402FFFF */ addiu $v0, $zero, -1 -/* EE40C 802C9A5C 16220007 */ bne $s1, $v0, .L802C9A7C -/* EE410 802C9A60 26100004 */ addiu $s0, $s0, 4 -/* EE414 802C9A64 3C04802D */ lui $a0, %hi(ScaleModel) -/* EE418 802C9A68 24848D88 */ addiu $a0, $a0, %lo(ScaleModel) -/* EE41C 802C9A6C 0C0B2568 */ jal func_802C95A0 -/* EE420 802C9A70 0240282D */ daddu $a1, $s2, $zero -/* EE424 802C9A74 080B26C7 */ j .L802C9B1C -/* EE428 802C9A78 24020002 */ addiu $v0, $zero, 2 -.L802C9A7C: -/* EE42C 802C9A7C 8E050000 */ lw $a1, ($s0) -/* EE430 802C9A80 26100004 */ addiu $s0, $s0, 4 -/* EE434 802C9A84 0C0B210B */ jal get_float_variable -/* EE438 802C9A88 0240202D */ daddu $a0, $s2, $zero -/* EE43C 802C9A8C 8E050000 */ lw $a1, ($s0) -/* EE440 802C9A90 26100004 */ addiu $s0, $s0, 4 -/* EE444 802C9A94 0240202D */ daddu $a0, $s2, $zero -/* EE448 802C9A98 0C0B210B */ jal get_float_variable -/* EE44C 802C9A9C 46000606 */ mov.s $f24, $f0 -/* EE450 802C9AA0 0240202D */ daddu $a0, $s2, $zero -/* EE454 802C9AA4 8E050000 */ lw $a1, ($s0) -/* EE458 802C9AA8 0C0B210B */ jal get_float_variable -/* EE45C 802C9AAC 46000586 */ mov.s $f22, $f0 -/* EE460 802C9AB0 0220202D */ daddu $a0, $s1, $zero -/* EE464 802C9AB4 0C046C70 */ jal func_8011B1C0 -/* EE468 802C9AB8 46000506 */ mov.s $f20, $f0 -/* EE46C 802C9ABC 0040802D */ daddu $s0, $v0, $zero -/* EE470 802C9AC0 96020000 */ lhu $v0, ($s0) -/* EE474 802C9AC4 30420400 */ andi $v0, $v0, 0x400 -/* EE478 802C9AC8 1440000A */ bnez $v0, .L802C9AF4 -/* EE47C 802C9ACC 00000000 */ nop -/* EE480 802C9AD0 4405C000 */ mfc1 $a1, $f24 -/* EE484 802C9AD4 4406B000 */ mfc1 $a2, $f22 -/* EE488 802C9AD8 4407A000 */ mfc1 $a3, $f20 -/* EE48C 802C9ADC 0C019DF0 */ jal guScaleF -/* EE490 802C9AE0 26040050 */ addiu $a0, $s0, 0x50 -/* EE494 802C9AE4 96020000 */ lhu $v0, ($s0) -/* EE498 802C9AE8 34421400 */ ori $v0, $v0, 0x1400 -/* EE49C 802C9AEC 080B26C6 */ j .L802C9B18 -/* EE4A0 802C9AF0 A6020000 */ sh $v0, ($s0) -.L802C9AF4: -/* EE4A4 802C9AF4 4405C000 */ mfc1 $a1, $f24 -/* EE4A8 802C9AF8 4406B000 */ mfc1 $a2, $f22 -/* EE4AC 802C9AFC 4407A000 */ mfc1 $a3, $f20 -/* EE4B0 802C9B00 0C019DF0 */ jal guScaleF -/* EE4B4 802C9B04 27A40010 */ addiu $a0, $sp, 0x10 -/* EE4B8 802C9B08 27A40010 */ addiu $a0, $sp, 0x10 -/* EE4BC 802C9B0C 26050050 */ addiu $a1, $s0, 0x50 -/* EE4C0 802C9B10 0C019D80 */ jal guMtxCatF -/* EE4C4 802C9B14 00A0302D */ daddu $a2, $a1, $zero -.L802C9B18: -/* EE4C8 802C9B18 24020002 */ addiu $v0, $zero, 2 -.L802C9B1C: -/* EE4CC 802C9B1C 8FBF005C */ lw $ra, 0x5c($sp) -/* EE4D0 802C9B20 8FB20058 */ lw $s2, 0x58($sp) -/* EE4D4 802C9B24 8FB10054 */ lw $s1, 0x54($sp) -/* EE4D8 802C9B28 8FB00050 */ lw $s0, 0x50($sp) -/* EE4DC 802C9B2C D7B80070 */ ldc1 $f24, 0x70($sp) -/* EE4E0 802C9B30 D7B60068 */ ldc1 $f22, 0x68($sp) -/* EE4E4 802C9B34 D7B40060 */ ldc1 $f20, 0x60($sp) -/* EE4E8 802C9B38 03E00008 */ jr $ra -/* EE4EC 802C9B3C 27BD0078 */ addiu $sp, $sp, 0x78 diff --git a/ver/us/asm/nonmatchings/evt/map_api/TranslateGroup.s b/ver/us/asm/nonmatchings/evt/map_api/TranslateGroup.s deleted file mode 100644 index 42d85bb3a8..0000000000 --- a/ver/us/asm/nonmatchings/evt/map_api/TranslateGroup.s +++ /dev/null @@ -1,81 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel TranslateGroup -/* EE164 802C97B4 27BDFF88 */ addiu $sp, $sp, -0x78 -/* EE168 802C97B8 AFB20058 */ sw $s2, 0x58($sp) -/* EE16C 802C97BC 0080902D */ daddu $s2, $a0, $zero -/* EE170 802C97C0 AFBF005C */ sw $ra, 0x5c($sp) -/* EE174 802C97C4 AFB10054 */ sw $s1, 0x54($sp) -/* EE178 802C97C8 AFB00050 */ sw $s0, 0x50($sp) -/* EE17C 802C97CC F7B80070 */ sdc1 $f24, 0x70($sp) -/* EE180 802C97D0 F7B60068 */ sdc1 $f22, 0x68($sp) -/* EE184 802C97D4 F7B40060 */ sdc1 $f20, 0x60($sp) -/* EE188 802C97D8 8E50000C */ lw $s0, 0xc($s2) -/* EE18C 802C97DC 0C0B1EAF */ jal get_variable -/* EE190 802C97E0 8E050000 */ lw $a1, ($s0) -/* EE194 802C97E4 0C046C24 */ jal func_8011B090 -/* EE198 802C97E8 0040202D */ daddu $a0, $v0, $zero -/* EE19C 802C97EC 0040882D */ daddu $s1, $v0, $zero -/* EE1A0 802C97F0 2402FFFF */ addiu $v0, $zero, -1 -/* EE1A4 802C97F4 16220007 */ bne $s1, $v0, .L802C9814 -/* EE1A8 802C97F8 26100004 */ addiu $s0, $s0, 4 -/* EE1AC 802C97FC 3C04802D */ lui $a0, %hi(TranslateModel) -/* EE1B0 802C9800 24848B60 */ addiu $a0, $a0, %lo(TranslateModel) -/* EE1B4 802C9804 0C0B2568 */ jal func_802C95A0 -/* EE1B8 802C9808 0240282D */ daddu $a1, $s2, $zero -/* EE1BC 802C980C 080B262D */ j .L802C98B4 -/* EE1C0 802C9810 24020002 */ addiu $v0, $zero, 2 -.L802C9814: -/* EE1C4 802C9814 8E050000 */ lw $a1, ($s0) -/* EE1C8 802C9818 26100004 */ addiu $s0, $s0, 4 -/* EE1CC 802C981C 0C0B210B */ jal get_float_variable -/* EE1D0 802C9820 0240202D */ daddu $a0, $s2, $zero -/* EE1D4 802C9824 8E050000 */ lw $a1, ($s0) -/* EE1D8 802C9828 26100004 */ addiu $s0, $s0, 4 -/* EE1DC 802C982C 0240202D */ daddu $a0, $s2, $zero -/* EE1E0 802C9830 0C0B210B */ jal get_float_variable -/* EE1E4 802C9834 46000606 */ mov.s $f24, $f0 -/* EE1E8 802C9838 0240202D */ daddu $a0, $s2, $zero -/* EE1EC 802C983C 8E050000 */ lw $a1, ($s0) -/* EE1F0 802C9840 0C0B210B */ jal get_float_variable -/* EE1F4 802C9844 46000586 */ mov.s $f22, $f0 -/* EE1F8 802C9848 0220202D */ daddu $a0, $s1, $zero -/* EE1FC 802C984C 0C046C70 */ jal func_8011B1C0 -/* EE200 802C9850 46000506 */ mov.s $f20, $f0 -/* EE204 802C9854 0040802D */ daddu $s0, $v0, $zero -/* EE208 802C9858 96020000 */ lhu $v0, ($s0) -/* EE20C 802C985C 30420400 */ andi $v0, $v0, 0x400 -/* EE210 802C9860 1440000A */ bnez $v0, .L802C988C -/* EE214 802C9864 00000000 */ nop -/* EE218 802C9868 4405C000 */ mfc1 $a1, $f24 -/* EE21C 802C986C 4406B000 */ mfc1 $a2, $f22 -/* EE220 802C9870 4407A000 */ mfc1 $a3, $f20 -/* EE224 802C9874 0C019E40 */ jal guTranslateF -/* EE228 802C9878 26040050 */ addiu $a0, $s0, 0x50 -/* EE22C 802C987C 96020000 */ lhu $v0, ($s0) -/* EE230 802C9880 34421400 */ ori $v0, $v0, 0x1400 -/* EE234 802C9884 080B262C */ j .L802C98B0 -/* EE238 802C9888 A6020000 */ sh $v0, ($s0) -.L802C988C: -/* EE23C 802C988C 4405C000 */ mfc1 $a1, $f24 -/* EE240 802C9890 4406B000 */ mfc1 $a2, $f22 -/* EE244 802C9894 4407A000 */ mfc1 $a3, $f20 -/* EE248 802C9898 0C019E40 */ jal guTranslateF -/* EE24C 802C989C 27A40010 */ addiu $a0, $sp, 0x10 -/* EE250 802C98A0 27A40010 */ addiu $a0, $sp, 0x10 -/* EE254 802C98A4 26050050 */ addiu $a1, $s0, 0x50 -/* EE258 802C98A8 0C019D80 */ jal guMtxCatF -/* EE25C 802C98AC 00A0302D */ daddu $a2, $a1, $zero -.L802C98B0: -/* EE260 802C98B0 24020002 */ addiu $v0, $zero, 2 -.L802C98B4: -/* EE264 802C98B4 8FBF005C */ lw $ra, 0x5c($sp) -/* EE268 802C98B8 8FB20058 */ lw $s2, 0x58($sp) -/* EE26C 802C98BC 8FB10054 */ lw $s1, 0x54($sp) -/* EE270 802C98C0 8FB00050 */ lw $s0, 0x50($sp) -/* EE274 802C98C4 D7B80070 */ ldc1 $f24, 0x70($sp) -/* EE278 802C98C8 D7B60068 */ ldc1 $f22, 0x68($sp) -/* EE27C 802C98CC D7B40060 */ ldc1 $f20, 0x60($sp) -/* EE280 802C98D0 03E00008 */ jr $ra -/* EE284 802C98D4 27BD0078 */ addiu $sp, $sp, 0x78 diff --git a/ver/us/asm/nonmatchings/evt/map_api/func_802C9FD4.s b/ver/us/asm/nonmatchings/evt/map_api/func_802C9FD4.s deleted file mode 100644 index cd6aafef5e..0000000000 --- a/ver/us/asm/nonmatchings/evt/map_api/func_802C9FD4.s +++ /dev/null @@ -1,62 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_802C9FD4 -/* EE984 802C9FD4 27BDFFE0 */ addiu $sp, $sp, -0x20 -/* EE988 802C9FD8 AFB00010 */ sw $s0, 0x10($sp) -/* EE98C 802C9FDC 0080802D */ daddu $s0, $a0, $zero -/* EE990 802C9FE0 AFB10014 */ sw $s1, 0x14($sp) -/* EE994 802C9FE4 00A0882D */ daddu $s1, $a1, $zero -/* EE998 802C9FE8 AFB20018 */ sw $s2, 0x18($sp) -/* EE99C 802C9FEC 3C04802E */ lui $a0, %hi(D_802DADA4) -/* EE9A0 802C9FF0 2484ADA4 */ addiu $a0, $a0, %lo(D_802DADA4) -/* EE9A4 802C9FF4 2402FFFF */ addiu $v0, $zero, -1 -/* EE9A8 802C9FF8 AFBF001C */ sw $ra, 0x1c($sp) -/* EE9AC 802C9FFC 8C830000 */ lw $v1, ($a0) -/* EE9B0 802CA000 3C05802E */ lui $a1, %hi(D_802DADA0) -/* EE9B4 802CA004 8CA5ADA0 */ lw $a1, %lo(D_802DADA0)($a1) -/* EE9B8 802CA008 14620018 */ bne $v1, $v0, .L802CA06C -/* EE9BC 802CA00C 00C0902D */ daddu $s2, $a2, $zero -/* EE9C0 802CA010 0C016AFA */ jal get_current_map_header -/* EE9C4 802CA014 00000000 */ nop -/* EE9C8 802CA018 3C038007 */ lui $v1, %hi(gGameStatusPtr) -/* EE9CC 802CA01C 8C63419C */ lw $v1, %lo(gGameStatusPtr)($v1) -/* EE9D0 802CA020 8463008E */ lh $v1, 0x8e($v1) -/* EE9D4 802CA024 8C420014 */ lw $v0, 0x14($v0) -/* EE9D8 802CA028 00031900 */ sll $v1, $v1, 4 -/* EE9DC 802CA02C 00431021 */ addu $v0, $v0, $v1 -/* EE9E0 802CA030 C4400000 */ lwc1 $f0, ($v0) -/* EE9E4 802CA034 E6000000 */ swc1 $f0, ($s0) -/* EE9E8 802CA038 C4400004 */ lwc1 $f0, 4($v0) -/* EE9EC 802CA03C E6200000 */ swc1 $f0, ($s1) -/* EE9F0 802CA040 C4400008 */ lwc1 $f0, 8($v0) -/* EE9F4 802CA044 2402FFFF */ addiu $v0, $zero, -1 -/* EE9F8 802CA048 080B2825 */ j .L802CA094 -/* EE9FC 802CA04C E6400000 */ swc1 $f0, ($s2) -.L802CA050: -/* EEA00 802CA050 C4A00004 */ lwc1 $f0, 4($a1) -/* EEA04 802CA054 E6000000 */ swc1 $f0, ($s0) -/* EEA08 802CA058 C4A00008 */ lwc1 $f0, 8($a1) -/* EEA0C 802CA05C E6200000 */ swc1 $f0, ($s1) -/* EEA10 802CA060 C4A0000C */ lwc1 $f0, 0xc($a1) -/* EEA14 802CA064 080B2825 */ j .L802CA094 -/* EEA18 802CA068 E6400000 */ swc1 $f0, ($s2) -.L802CA06C: -/* EEA1C 802CA06C 2406FFFF */ addiu $a2, $zero, -1 -/* EEA20 802CA070 0080182D */ daddu $v1, $a0, $zero -.L802CA074: -/* EEA24 802CA074 8CA40000 */ lw $a0, ($a1) -/* EEA28 802CA078 10860006 */ beq $a0, $a2, .L802CA094 -/* EEA2C 802CA07C 0000102D */ daddu $v0, $zero, $zero -/* EEA30 802CA080 8C620000 */ lw $v0, ($v1) -/* EEA34 802CA084 1082FFF2 */ beq $a0, $v0, .L802CA050 -/* EEA38 802CA088 24020001 */ addiu $v0, $zero, 1 -/* EEA3C 802CA08C 080B281D */ j .L802CA074 -/* EEA40 802CA090 24A50010 */ addiu $a1, $a1, 0x10 -.L802CA094: -/* EEA44 802CA094 8FBF001C */ lw $ra, 0x1c($sp) -/* EEA48 802CA098 8FB20018 */ lw $s2, 0x18($sp) -/* EEA4C 802CA09C 8FB10014 */ lw $s1, 0x14($sp) -/* EEA50 802CA0A0 8FB00010 */ lw $s0, 0x10($sp) -/* EEA54 802CA0A4 03E00008 */ jr $ra -/* EEA58 802CA0A8 27BD0020 */ addiu $sp, $sp, 0x20 diff --git a/ver/us/asm/nonmatchings/evt/map_api/goto_map.s b/ver/us/asm/nonmatchings/evt/map_api/goto_map.s deleted file mode 100644 index d4c5faa26c..0000000000 --- a/ver/us/asm/nonmatchings/evt/map_api/goto_map.s +++ /dev/null @@ -1,70 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel goto_map -/* EECB4 802CA304 27BDFFD0 */ addiu $sp, $sp, -0x30 -/* EECB8 802CA308 AFB20020 */ sw $s2, 0x20($sp) -/* EECBC 802CA30C 0080902D */ daddu $s2, $a0, $zero -/* EECC0 802CA310 AFB40028 */ sw $s4, 0x28($sp) -/* EECC4 802CA314 00A0A02D */ daddu $s4, $a1, $zero -/* EECC8 802CA318 AFB30024 */ sw $s3, 0x24($sp) -/* EECCC 802CA31C 24020002 */ addiu $v0, $zero, 2 -/* EECD0 802CA320 AFBF002C */ sw $ra, 0x2c($sp) -/* EECD4 802CA324 AFB1001C */ sw $s1, 0x1c($sp) -/* EECD8 802CA328 AFB00018 */ sw $s0, 0x18($sp) -/* EECDC 802CA32C 8E51000C */ lw $s1, 0xc($s2) -/* EECE0 802CA330 1682000B */ bne $s4, $v0, .L802CA360 -/* EECE4 802CA334 0000982D */ daddu $s3, $zero, $zero -/* EECE8 802CA338 8E250000 */ lw $a1, ($s1) -/* EECEC 802CA33C 0C0B1EAF */ jal get_variable -/* EECF0 802CA340 26310004 */ addiu $s1, $s1, 4 -/* EECF4 802CA344 A7A20010 */ sh $v0, 0x10($sp) -/* EECF8 802CA348 8E250000 */ lw $a1, ($s1) -/* EECFC 802CA34C 26310004 */ addiu $s1, $s1, 4 -/* EED00 802CA350 0C0B1EAF */ jal get_variable -/* EED04 802CA354 0240202D */ daddu $a0, $s2, $zero -/* EED08 802CA358 080B28E0 */ j .L802CA380 -/* EED0C 802CA35C A7A20012 */ sh $v0, 0x12($sp) -.L802CA360: -/* EED10 802CA360 8E250000 */ lw $a1, ($s1) -/* EED14 802CA364 26310004 */ addiu $s1, $s1, 4 -/* EED18 802CA368 0C0B1EAF */ jal get_variable -/* EED1C 802CA36C 0240202D */ daddu $a0, $s2, $zero -/* EED20 802CA370 0040202D */ daddu $a0, $v0, $zero -/* EED24 802CA374 27A50010 */ addiu $a1, $sp, 0x10 -/* EED28 802CA378 0C016AFE */ jal get_map_IDs_by_name -/* EED2C 802CA37C 27A60012 */ addiu $a2, $sp, 0x12 -.L802CA380: -/* EED30 802CA380 3C108007 */ lui $s0, %hi(gGameStatusPtr) -/* EED34 802CA384 2610419C */ addiu $s0, $s0, %lo(gGameStatusPtr) -/* EED38 802CA388 8E040000 */ lw $a0, ($s0) -/* EED3C 802CA38C 97A20010 */ lhu $v0, 0x10($sp) -/* EED40 802CA390 97A30012 */ lhu $v1, 0x12($sp) -/* EED44 802CA394 A4820086 */ sh $v0, 0x86($a0) -/* EED48 802CA398 A483008C */ sh $v1, 0x8c($a0) -/* EED4C 802CA39C 8E250000 */ lw $a1, ($s1) -/* EED50 802CA3A0 0C0B1EAF */ jal get_variable -/* EED54 802CA3A4 0240202D */ daddu $a0, $s2, $zero -/* EED58 802CA3A8 8E030000 */ lw $v1, ($s0) -/* EED5C 802CA3AC A462008E */ sh $v0, 0x8e($v1) -/* EED60 802CA3B0 24020001 */ addiu $v0, $zero, 1 -/* EED64 802CA3B4 16820005 */ bne $s4, $v0, .L802CA3CC -/* EED68 802CA3B8 26310004 */ addiu $s1, $s1, 4 -/* EED6C 802CA3BC 8E250000 */ lw $a1, ($s1) -/* EED70 802CA3C0 0C0B1EAF */ jal get_variable -/* EED74 802CA3C4 0240202D */ daddu $a0, $s2, $zero -/* EED78 802CA3C8 0040982D */ daddu $s3, $v0, $zero -.L802CA3CC: -/* EED7C 802CA3CC 00132400 */ sll $a0, $s3, 0x10 -/* EED80 802CA3D0 0C04E0A8 */ jal set_map_transition_effect -/* EED84 802CA3D4 00042403 */ sra $a0, $a0, 0x10 -/* EED88 802CA3D8 0C00CD3C */ jal set_game_mode -/* EED8C 802CA3DC 24040005 */ addiu $a0, $zero, 5 -/* EED90 802CA3E0 8FBF002C */ lw $ra, 0x2c($sp) -/* EED94 802CA3E4 8FB40028 */ lw $s4, 0x28($sp) -/* EED98 802CA3E8 8FB30024 */ lw $s3, 0x24($sp) -/* EED9C 802CA3EC 8FB20020 */ lw $s2, 0x20($sp) -/* EEDA0 802CA3F0 8FB1001C */ lw $s1, 0x1c($sp) -/* EEDA4 802CA3F4 8FB00018 */ lw $s0, 0x18($sp) -/* EEDA8 802CA3F8 03E00008 */ jr $ra -/* EEDAC 802CA3FC 27BD0030 */ addiu $sp, $sp, 0x30 diff --git a/ver/us/asm/nonmatchings/evt/map_api/modify_collider_family_flags.s b/ver/us/asm/nonmatchings/evt/map_api/modify_collider_family_flags.s deleted file mode 100644 index 4bd8d70d08..0000000000 --- a/ver/us/asm/nonmatchings/evt/map_api/modify_collider_family_flags.s +++ /dev/null @@ -1,70 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel modify_collider_family_flags -/* EE698 802C9CE8 27BDFFE0 */ addiu $sp, $sp, -0x20 -/* EE69C 802C9CEC AFB20018 */ sw $s2, 0x18($sp) -/* EE6A0 802C9CF0 00A0902D */ daddu $s2, $a1, $zero -/* EE6A4 802C9CF4 000410C0 */ sll $v0, $a0, 3 -/* EE6A8 802C9CF8 00441023 */ subu $v0, $v0, $a0 -/* EE6AC 802C9CFC 3C03800B */ lui $v1, %hi(gCollisionData+0x4) -/* EE6B0 802C9D00 8C6342E4 */ lw $v1, %lo(gCollisionData+0x4)($v1) -/* EE6B4 802C9D04 00021080 */ sll $v0, $v0, 2 -/* EE6B8 802C9D08 AFBF001C */ sw $ra, 0x1c($sp) -/* EE6BC 802C9D0C AFB10014 */ sw $s1, 0x14($sp) -/* EE6C0 802C9D10 AFB00010 */ sw $s0, 0x10($sp) -/* EE6C4 802C9D14 00628021 */ addu $s0, $v1, $v0 -/* EE6C8 802C9D18 86040004 */ lh $a0, 4($s0) -/* EE6CC 802C9D1C 04800003 */ bltz $a0, .L802C9D2C -/* EE6D0 802C9D20 00C0882D */ daddu $s1, $a2, $zero -/* EE6D4 802C9D24 0C0B273A */ jal modify_collider_family_flags -/* EE6D8 802C9D28 00000000 */ nop -.L802C9D2C: -/* EE6DC 802C9D2C 86040006 */ lh $a0, 6($s0) -/* EE6E0 802C9D30 04800003 */ bltz $a0, .L802C9D40 -/* EE6E4 802C9D34 0240282D */ daddu $a1, $s2, $zero -/* EE6E8 802C9D38 0C0B273A */ jal modify_collider_family_flags -/* EE6EC 802C9D3C 0220302D */ daddu $a2, $s1, $zero -.L802C9D40: -/* EE6F0 802C9D40 24020001 */ addiu $v0, $zero, 1 -/* EE6F4 802C9D44 12220011 */ beq $s1, $v0, .L802C9D8C -/* EE6F8 802C9D48 00121827 */ nor $v1, $zero, $s2 -/* EE6FC 802C9D4C 2A220002 */ slti $v0, $s1, 2 -/* EE700 802C9D50 50400005 */ beql $v0, $zero, .L802C9D68 -/* EE704 802C9D54 24020002 */ addiu $v0, $zero, 2 -/* EE708 802C9D58 12200009 */ beqz $s1, .L802C9D80 -/* EE70C 802C9D5C 00000000 */ nop -/* EE710 802C9D60 080B276D */ j .L802C9DB4 -/* EE714 802C9D64 00000000 */ nop -.L802C9D68: -/* EE718 802C9D68 1222000B */ beq $s1, $v0, .L802C9D98 -/* EE71C 802C9D6C 24020003 */ addiu $v0, $zero, 3 -/* EE720 802C9D70 1222000B */ beq $s1, $v0, .L802C9DA0 -/* EE724 802C9D74 2403FF00 */ addiu $v1, $zero, -0x100 -/* EE728 802C9D78 080B276D */ j .L802C9DB4 -/* EE72C 802C9D7C 00000000 */ nop -.L802C9D80: -/* EE730 802C9D80 8E020000 */ lw $v0, ($s0) -/* EE734 802C9D84 080B276C */ j .L802C9DB0 -/* EE738 802C9D88 00521025 */ or $v0, $v0, $s2 -.L802C9D8C: -/* EE73C 802C9D8C 8E020000 */ lw $v0, ($s0) -/* EE740 802C9D90 080B276C */ j .L802C9DB0 -/* EE744 802C9D94 00431024 */ and $v0, $v0, $v1 -.L802C9D98: -/* EE748 802C9D98 080B276D */ j .L802C9DB4 -/* EE74C 802C9D9C AE120000 */ sw $s2, ($s0) -.L802C9DA0: -/* EE750 802C9DA0 8E020000 */ lw $v0, ($s0) -/* EE754 802C9DA4 00431024 */ and $v0, $v0, $v1 -/* EE758 802C9DA8 324300FF */ andi $v1, $s2, 0xff -/* EE75C 802C9DAC 00431025 */ or $v0, $v0, $v1 -.L802C9DB0: -/* EE760 802C9DB0 AE020000 */ sw $v0, ($s0) -.L802C9DB4: -/* EE764 802C9DB4 8FBF001C */ lw $ra, 0x1c($sp) -/* EE768 802C9DB8 8FB20018 */ lw $s2, 0x18($sp) -/* EE76C 802C9DBC 8FB10014 */ lw $s1, 0x14($sp) -/* EE770 802C9DC0 8FB00010 */ lw $s0, 0x10($sp) -/* EE774 802C9DC4 03E00008 */ jr $ra -/* EE778 802C9DC8 27BD0020 */ addiu $sp, $sp, 0x20 diff --git a/ver/us/asm/nonmatchings/evt/npc_api/BringPartnerOut.s b/ver/us/asm/nonmatchings/evt/npc_api/BringPartnerOut.s deleted file mode 100644 index cf66be9001..0000000000 --- a/ver/us/asm/nonmatchings/evt/npc_api/BringPartnerOut.s +++ /dev/null @@ -1,255 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel BringPartnerOut -/* F3F68 802CF5B8 27BDFF98 */ addiu $sp, $sp, -0x68 -/* F3F6C 802CF5BC AFB10024 */ sw $s1, 0x24($sp) -/* F3F70 802CF5C0 AFB20028 */ sw $s2, 0x28($sp) -/* F3F74 802CF5C4 3C128011 */ lui $s2, %hi(gPlayerStatus) -/* F3F78 802CF5C8 2652EFC8 */ addiu $s2, $s2, %lo(gPlayerStatus) -/* F3F7C 802CF5CC AFBF0034 */ sw $ra, 0x34($sp) -/* F3F80 802CF5D0 AFB40030 */ sw $s4, 0x30($sp) -/* F3F84 802CF5D4 AFB3002C */ sw $s3, 0x2c($sp) -/* F3F88 802CF5D8 AFB00020 */ sw $s0, 0x20($sp) -/* F3F8C 802CF5DC F7BE0060 */ sdc1 $f30, 0x60($sp) -/* F3F90 802CF5E0 F7BC0058 */ sdc1 $f28, 0x58($sp) -/* F3F94 802CF5E4 F7BA0050 */ sdc1 $f26, 0x50($sp) -/* F3F98 802CF5E8 F7B80048 */ sdc1 $f24, 0x48($sp) -/* F3F9C 802CF5EC F7B60040 */ sdc1 $f22, 0x40($sp) -/* F3FA0 802CF5F0 F7B40038 */ sdc1 $f20, 0x38($sp) -/* F3FA4 802CF5F4 8C82000C */ lw $v0, 0xc($a0) -/* F3FA8 802CF5F8 10A00089 */ beqz $a1, .L802CF820 -/* F3FAC 802CF5FC 27B10010 */ addiu $s1, $sp, 0x10 -/* F3FB0 802CF600 8C450000 */ lw $a1, ($v0) -/* F3FB4 802CF604 0C0B1EAF */ jal get_variable -/* F3FB8 802CF608 00000000 */ nop -/* F3FBC 802CF60C 3C038011 */ lui $v1, %hi(gPlayerData) -/* F3FC0 802CF610 2463F290 */ addiu $v1, $v1, %lo(gPlayerData) -/* F3FC4 802CF614 80630012 */ lb $v1, 0x12($v1) -/* F3FC8 802CF618 3C14802E */ lui $s4, %hi(D_802DAE40) -/* F3FCC 802CF61C 2694AE40 */ addiu $s4, $s4, %lo(D_802DAE40) -/* F3FD0 802CF620 14620004 */ bne $v1, $v0, .L802CF634 -/* F3FD4 802CF624 AE820000 */ sw $v0, ($s4) -/* F3FD8 802CF628 AE800000 */ sw $zero, ($s4) -/* F3FDC 802CF62C 080B3E54 */ j .L802CF950 -/* F3FE0 802CF630 24020002 */ addiu $v0, $zero, 2 -.L802CF634: -/* F3FE4 802CF634 0C00EABB */ jal get_npc_unsafe -/* F3FE8 802CF638 2404FFFC */ addiu $a0, $zero, -4 -/* F3FEC 802CF63C 0040802D */ daddu $s0, $v0, $zero -/* F3FF0 802CF640 2402FFFB */ addiu $v0, $zero, -5 -/* F3FF4 802CF644 A20200A4 */ sb $v0, 0xa4($s0) -/* F3FF8 802CF648 8E830000 */ lw $v1, ($s4) -/* F3FFC 802CF64C 24020100 */ addiu $v0, $zero, 0x100 -/* F4000 802CF650 AFA20010 */ sw $v0, 0x10($sp) -/* F4004 802CF654 000310C0 */ sll $v0, $v1, 3 -/* F4008 802CF658 00431021 */ addu $v0, $v0, $v1 -/* F400C 802CF65C 00021080 */ sll $v0, $v0, 2 -/* F4010 802CF660 3C018010 */ lui $at, %hi(gPartnerAnimations+0x10) -/* F4014 802CF664 00220821 */ addu $at, $at, $v0 -/* F4018 802CF668 8C228358 */ lw $v0, %lo(gPartnerAnimations+0x10)($at) -/* F401C 802CF66C 0220202D */ daddu $a0, $s1, $zero -/* F4020 802CF670 AFA00018 */ sw $zero, 0x18($sp) -/* F4024 802CF674 AFA0001C */ sw $zero, 0x1c($sp) -/* F4028 802CF678 0C00E211 */ jal npc_create_basic -/* F402C 802CF67C AFA20014 */ sw $v0, 0x14($sp) -/* F4030 802CF680 0040202D */ daddu $a0, $v0, $zero -/* F4034 802CF684 3C01802E */ lui $at, %hi(D_802DAE44) -/* F4038 802CF688 AC24AE44 */ sw $a0, %lo(D_802DAE44)($at) -/* F403C 802CF68C 0C00E2B7 */ jal get_npc_by_index -/* F4040 802CF690 2413000A */ addiu $s3, $zero, 0xa -/* F4044 802CF694 0040882D */ daddu $s1, $v0, $zero -/* F4048 802CF698 2402FFFC */ addiu $v0, $zero, -4 -/* F404C 802CF69C A63300A6 */ sh $s3, 0xa6($s1) -/* F4050 802CF6A0 A63300A8 */ sh $s3, 0xa8($s1) -/* F4054 802CF6A4 A22200A4 */ sb $v0, 0xa4($s1) -/* F4058 802CF6A8 AE200054 */ sw $zero, 0x54($s1) -/* F405C 802CF6AC AE200058 */ sw $zero, 0x58($s1) -/* F4060 802CF6B0 AE20005C */ sw $zero, 0x5c($s1) -/* F4064 802CF6B4 C61A0038 */ lwc1 $f26, 0x38($s0) -/* F4068 802CF6B8 3C0141F0 */ lui $at, 0x41f0 -/* F406C 802CF6BC 44810000 */ mtc1 $at, $f0 -/* F4070 802CF6C0 E63A0060 */ swc1 $f26, 0x60($s1) -/* F4074 802CF6C4 C65E002C */ lwc1 $f30, 0x2c($s2) -/* F4078 802CF6C8 E63E0064 */ swc1 $f30, 0x64($s1) -/* F407C 802CF6CC C6160040 */ lwc1 $f22, 0x40($s0) -/* F4080 802CF6D0 4600B580 */ add.s $f22, $f22, $f0 -/* F4084 802CF6D4 4406D000 */ mfc1 $a2, $f26 -/* F4088 802CF6D8 E6360068 */ swc1 $f22, 0x68($s1) -/* F408C 802CF6DC C6580028 */ lwc1 $f24, 0x28($s2) -/* F4090 802CF6E0 4407B000 */ mfc1 $a3, $f22 -/* F4094 802CF6E4 E6380038 */ swc1 $f24, 0x38($s1) -/* F4098 802CF6E8 964200B0 */ lhu $v0, 0xb0($s2) -/* F409C 802CF6EC C642002C */ lwc1 $f2, 0x2c($s2) -/* F40A0 802CF6F0 00021400 */ sll $v0, $v0, 0x10 -/* F40A4 802CF6F4 00021C03 */ sra $v1, $v0, 0x10 -/* F40A8 802CF6F8 000217C2 */ srl $v0, $v0, 0x1f -/* F40AC 802CF6FC 00621821 */ addu $v1, $v1, $v0 -/* F40B0 802CF700 00031843 */ sra $v1, $v1, 1 -/* F40B4 802CF704 44830000 */ mtc1 $v1, $f0 -/* F40B8 802CF708 00000000 */ nop -/* F40BC 802CF70C 46800020 */ cvt.s.w $f0, $f0 -/* F40C0 802CF710 46001700 */ add.s $f28, $f2, $f0 -/* F40C4 802CF714 3C014080 */ lui $at, 0x4080 -/* F40C8 802CF718 44810000 */ mtc1 $at, $f0 -/* F40CC 802CF71C 3C013FCC */ lui $at, 0x3fcc -/* F40D0 802CF720 3421CCCD */ ori $at, $at, 0xcccd -/* F40D4 802CF724 44811000 */ mtc1 $at, $f2 -/* F40D8 802CF728 E63C003C */ swc1 $f28, 0x3c($s1) -/* F40DC 802CF72C C6540030 */ lwc1 $f20, 0x30($s2) -/* F40E0 802CF730 4600C306 */ mov.s $f12, $f24 -/* F40E4 802CF734 E6200018 */ swc1 $f0, 0x18($s1) -/* F40E8 802CF738 E6220014 */ swc1 $f2, 0x14($s1) -/* F40EC 802CF73C 4600A386 */ mov.s $f14, $f20 -/* F40F0 802CF740 0C00A7B5 */ jal dist2D -/* F40F4 802CF744 E6340040 */ swc1 $f20, 0x40($s1) -/* F40F8 802CF748 4600C306 */ mov.s $f12, $f24 -/* F40FC 802CF74C 4406D000 */ mfc1 $a2, $f26 -/* F4100 802CF750 4407B000 */ mfc1 $a3, $f22 -/* F4104 802CF754 4600A386 */ mov.s $f14, $f20 -/* F4108 802CF758 0C00A720 */ jal atan2 -/* F410C 802CF75C E6200010 */ swc1 $f0, 0x10($s1) -/* F4110 802CF760 C6220010 */ lwc1 $f2, 0x10($s1) -/* F4114 802CF764 C6240018 */ lwc1 $f4, 0x18($s1) -/* F4118 802CF768 3C108010 */ lui $s0, %hi(gPartnerAnimations) -/* F411C 802CF76C 26108348 */ addiu $s0, $s0, %lo(gPartnerAnimations) -/* F4120 802CF770 E620000C */ swc1 $f0, 0xc($s1) -/* F4124 802CF774 46041083 */ div.s $f2, $f2, $f4 -/* F4128 802CF778 4600118D */ trunc.w.s $f6, $f2 -/* F412C 802CF77C 44023000 */ mfc1 $v0, $f6 -/* F4130 802CF780 00000000 */ nop -/* F4134 802CF784 A622008E */ sh $v0, 0x8e($s1) -/* F4138 802CF788 00021400 */ sll $v0, $v0, 0x10 -/* F413C 802CF78C 00021403 */ sra $v0, $v0, 0x10 -/* F4140 802CF790 2842000A */ slti $v0, $v0, 0xa -/* F4144 802CF794 10400007 */ beqz $v0, .L802CF7B4 -/* F4148 802CF798 00000000 */ nop -/* F414C 802CF79C 3C014120 */ lui $at, 0x4120 -/* F4150 802CF7A0 44811000 */ mtc1 $at, $f2 -/* F4154 802CF7A4 C6200010 */ lwc1 $f0, 0x10($s1) -/* F4158 802CF7A8 A633008E */ sh $s3, 0x8e($s1) -/* F415C 802CF7AC 46020003 */ div.s $f0, $f0, $f2 -/* F4160 802CF7B0 E6200018 */ swc1 $f0, 0x18($s1) -.L802CF7B4: -/* F4164 802CF7B4 8622008E */ lh $v0, 0x8e($s1) -/* F4168 802CF7B8 C6200014 */ lwc1 $f0, 0x14($s1) -/* F416C 802CF7BC 44822000 */ mtc1 $v0, $f4 -/* F4170 802CF7C0 00000000 */ nop -/* F4174 802CF7C4 46802120 */ cvt.s.w $f4, $f4 -/* F4178 802CF7C8 46040002 */ mul.s $f0, $f0, $f4 -/* F417C 802CF7CC 00000000 */ nop -/* F4180 802CF7D0 46040002 */ mul.s $f0, $f0, $f4 -/* F4184 802CF7D4 00000000 */ nop -/* F4188 802CF7D8 3C013F00 */ lui $at, 0x3f00 -/* F418C 802CF7DC 44811000 */ mtc1 $at, $f2 -/* F4190 802CF7E0 00000000 */ nop -/* F4194 802CF7E4 46020002 */ mul.s $f0, $f0, $f2 -/* F4198 802CF7E8 00000000 */ nop -/* F419C 802CF7EC 8E830000 */ lw $v1, ($s4) -/* F41A0 802CF7F0 461CF081 */ sub.s $f2, $f30, $f28 -/* F41A4 802CF7F4 000310C0 */ sll $v0, $v1, 3 -/* F41A8 802CF7F8 00431021 */ addu $v0, $v0, $v1 -/* F41AC 802CF7FC 46001080 */ add.s $f2, $f2, $f0 -/* F41B0 802CF800 00021080 */ sll $v0, $v0, 2 -/* F41B4 802CF804 00501021 */ addu $v0, $v0, $s0 -/* F41B8 802CF808 46041083 */ div.s $f2, $f2, $f4 -/* F41BC 802CF80C E622001C */ swc1 $f2, 0x1c($s1) -/* F41C0 802CF810 8C430004 */ lw $v1, 4($v0) -/* F41C4 802CF814 0000102D */ daddu $v0, $zero, $zero -/* F41C8 802CF818 080B3E54 */ j .L802CF950 -/* F41CC 802CF81C AE230028 */ sw $v1, 0x28($s1) -.L802CF820: -/* F41D0 802CF820 3C04802E */ lui $a0, %hi(D_802DAE44) -/* F41D4 802CF824 8C84AE44 */ lw $a0, %lo(D_802DAE44)($a0) -/* F41D8 802CF828 0C00E2B7 */ jal get_npc_by_index -/* F41DC 802CF82C 00000000 */ nop -/* F41E0 802CF830 0040882D */ daddu $s1, $v0, $zero -/* F41E4 802CF834 C620001C */ lwc1 $f0, 0x1c($s1) -/* F41E8 802CF838 C6220014 */ lwc1 $f2, 0x14($s1) -/* F41EC 802CF83C 46020001 */ sub.s $f0, $f0, $f2 -/* F41F0 802CF840 C622003C */ lwc1 $f2, 0x3c($s1) -/* F41F4 802CF844 46001080 */ add.s $f2, $f2, $f0 -/* F41F8 802CF848 4480A000 */ mtc1 $zero, $f20 -/* F41FC 802CF84C 00000000 */ nop -/* F4200 802CF850 4614003E */ c.le.s $f0, $f20 -/* F4204 802CF854 E620001C */ swc1 $f0, 0x1c($s1) -/* F4208 802CF858 4500000A */ bc1f .L802CF884 -/* F420C 802CF85C E622003C */ swc1 $f2, 0x3c($s1) -/* F4210 802CF860 3C02802E */ lui $v0, %hi(D_802DAE40) -/* F4214 802CF864 8C42AE40 */ lw $v0, %lo(D_802DAE40)($v0) -/* F4218 802CF868 000218C0 */ sll $v1, $v0, 3 -/* F421C 802CF86C 00621821 */ addu $v1, $v1, $v0 -/* F4220 802CF870 00031880 */ sll $v1, $v1, 2 -/* F4224 802CF874 3C028010 */ lui $v0, %hi(gPartnerAnimations+0x8) -/* F4228 802CF878 00431021 */ addu $v0, $v0, $v1 -/* F422C 802CF87C 8C428350 */ lw $v0, %lo(gPartnerAnimations+0x8)($v0) -/* F4230 802CF880 AE220028 */ sw $v0, 0x28($s1) -.L802CF884: -/* F4234 802CF884 8E250018 */ lw $a1, 0x18($s1) -/* F4238 802CF888 8E26000C */ lw $a2, 0xc($s1) -/* F423C 802CF88C 0C00EA95 */ jal npc_move_heading -/* F4240 802CF890 0220202D */ daddu $a0, $s1, $zero -/* F4244 802CF894 8622008E */ lh $v0, 0x8e($s1) -/* F4248 802CF898 3C014120 */ lui $at, 0x4120 -/* F424C 802CF89C 44811000 */ mtc1 $at, $f2 -/* F4250 802CF8A0 44820000 */ mtc1 $v0, $f0 -/* F4254 802CF8A4 00000000 */ nop -/* F4258 802CF8A8 46800020 */ cvt.s.w $f0, $f0 -/* F425C 802CF8AC 4600103C */ c.lt.s $f2, $f0 -/* F4260 802CF8B0 00000000 */ nop -/* F4264 802CF8B4 45030001 */ bc1tl .L802CF8BC -/* F4268 802CF8B8 46001006 */ mov.s $f0, $f2 -.L802CF8BC: -/* F426C 802CF8BC 9622008E */ lhu $v0, 0x8e($s1) -/* F4270 802CF8C0 46001001 */ sub.s $f0, $f2, $f0 -/* F4274 802CF8C4 2442FFFF */ addiu $v0, $v0, -1 -/* F4278 802CF8C8 A622008E */ sh $v0, 0x8e($s1) -/* F427C 802CF8CC 00021400 */ sll $v0, $v0, 0x10 -/* F4280 802CF8D0 46020003 */ div.s $f0, $f0, $f2 -/* F4284 802CF8D4 E6200054 */ swc1 $f0, 0x54($s1) -/* F4288 802CF8D8 46000086 */ mov.s $f2, $f0 -/* F428C 802CF8DC E6200058 */ swc1 $f0, 0x58($s1) -/* F4290 802CF8E0 04400003 */ bltz $v0, .L802CF8F0 -/* F4294 802CF8E4 E622005C */ swc1 $f2, 0x5c($s1) -/* F4298 802CF8E8 080B3E54 */ j .L802CF950 -/* F429C 802CF8EC 0000102D */ daddu $v0, $zero, $zero -.L802CF8F0: -/* F42A0 802CF8F0 3C03802E */ lui $v1, %hi(D_802DAE40) -/* F42A4 802CF8F4 8C63AE40 */ lw $v1, %lo(D_802DAE40)($v1) -/* F42A8 802CF8F8 C6240064 */ lwc1 $f4, 0x64($s1) -/* F42AC 802CF8FC C622000C */ lwc1 $f2, 0xc($s1) -/* F42B0 802CF900 3C014334 */ lui $at, 0x4334 -/* F42B4 802CF904 44816000 */ mtc1 $at, $f12 -/* F42B8 802CF908 3C013F80 */ lui $at, 0x3f80 -/* F42BC 802CF90C 44810000 */ mtc1 $at, $f0 -/* F42C0 802CF910 000310C0 */ sll $v0, $v1, 3 -/* F42C4 802CF914 00431021 */ addu $v0, $v0, $v1 -/* F42C8 802CF918 00021080 */ sll $v0, $v0, 2 -/* F42CC 802CF91C 3C018010 */ lui $at, %hi(gPartnerAnimations+0x14) -/* F42D0 802CF920 00220821 */ addu $at, $at, $v0 -/* F42D4 802CF924 8C22835C */ lw $v0, %lo(gPartnerAnimations+0x14)($at) -/* F42D8 802CF928 460C1300 */ add.s $f12, $f2, $f12 -/* F42DC 802CF92C E634001C */ swc1 $f20, 0x1c($s1) -/* F42E0 802CF930 E624003C */ swc1 $f4, 0x3c($s1) -/* F42E4 802CF934 E6200054 */ swc1 $f0, 0x54($s1) -/* F42E8 802CF938 E6200058 */ swc1 $f0, 0x58($s1) -/* F42EC 802CF93C E620005C */ swc1 $f0, 0x5c($s1) -/* F42F0 802CF940 0C00A6C9 */ jal clamp_angle -/* F42F4 802CF944 AE220028 */ sw $v0, 0x28($s1) -/* F42F8 802CF948 24020002 */ addiu $v0, $zero, 2 -/* F42FC 802CF94C E620000C */ swc1 $f0, 0xc($s1) -.L802CF950: -/* F4300 802CF950 8FBF0034 */ lw $ra, 0x34($sp) -/* F4304 802CF954 8FB40030 */ lw $s4, 0x30($sp) -/* F4308 802CF958 8FB3002C */ lw $s3, 0x2c($sp) -/* F430C 802CF95C 8FB20028 */ lw $s2, 0x28($sp) -/* F4310 802CF960 8FB10024 */ lw $s1, 0x24($sp) -/* F4314 802CF964 8FB00020 */ lw $s0, 0x20($sp) -/* F4318 802CF968 D7BE0060 */ ldc1 $f30, 0x60($sp) -/* F431C 802CF96C D7BC0058 */ ldc1 $f28, 0x58($sp) -/* F4320 802CF970 D7BA0050 */ ldc1 $f26, 0x50($sp) -/* F4324 802CF974 D7B80048 */ ldc1 $f24, 0x48($sp) -/* F4328 802CF978 D7B60040 */ ldc1 $f22, 0x40($sp) -/* F432C 802CF97C D7B40038 */ ldc1 $f20, 0x38($sp) -/* F4330 802CF980 03E00008 */ jr $ra -/* F4334 802CF984 27BD0068 */ addiu $sp, $sp, 0x68 diff --git a/ver/us/asm/nonmatchings/evt/npc_api/CreateNpc.s b/ver/us/asm/nonmatchings/evt/npc_api/CreateNpc.s deleted file mode 100644 index b89bbef5c3..0000000000 --- a/ver/us/asm/nonmatchings/evt/npc_api/CreateNpc.s +++ /dev/null @@ -1,34 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel CreateNpc -/* F2554 802CDBA4 27BDFFD0 */ addiu $sp, $sp, -0x30 -/* F2558 802CDBA8 AFB10024 */ sw $s1, 0x24($sp) -/* F255C 802CDBAC 0080882D */ daddu $s1, $a0, $zero -/* F2560 802CDBB0 AFBF0028 */ sw $ra, 0x28($sp) -/* F2564 802CDBB4 AFB00020 */ sw $s0, 0x20($sp) -/* F2568 802CDBB8 8E30000C */ lw $s0, 0xc($s1) -/* F256C 802CDBBC 8E050000 */ lw $a1, ($s0) -/* F2570 802CDBC0 0C0B1EAF */ jal get_variable -/* F2574 802CDBC4 26100004 */ addiu $s0, $s0, 4 -/* F2578 802CDBC8 0220202D */ daddu $a0, $s1, $zero -/* F257C 802CDBCC 8E050000 */ lw $a1, ($s0) -/* F2580 802CDBD0 0C0B1EAF */ jal get_variable -/* F2584 802CDBD4 0040802D */ daddu $s0, $v0, $zero -/* F2588 802CDBD8 27A40010 */ addiu $a0, $sp, 0x10 -/* F258C 802CDBDC AFA00010 */ sw $zero, 0x10($sp) -/* F2590 802CDBE0 AFA20014 */ sw $v0, 0x14($sp) -/* F2594 802CDBE4 AFA00018 */ sw $zero, 0x18($sp) -/* F2598 802CDBE8 0C00E211 */ jal npc_create_basic -/* F259C 802CDBEC AFA0001C */ sw $zero, 0x1c($sp) -/* F25A0 802CDBF0 0C00E2B7 */ jal get_npc_by_index -/* F25A4 802CDBF4 0040202D */ daddu $a0, $v0, $zero -/* F25A8 802CDBF8 0040202D */ daddu $a0, $v0, $zero -/* F25AC 802CDBFC 0C00EAFF */ jal disable_npc_shadow -/* F25B0 802CDC00 A09000A4 */ sb $s0, 0xa4($a0) -/* F25B4 802CDC04 8FBF0028 */ lw $ra, 0x28($sp) -/* F25B8 802CDC08 8FB10024 */ lw $s1, 0x24($sp) -/* F25BC 802CDC0C 8FB00020 */ lw $s0, 0x20($sp) -/* F25C0 802CDC10 24020002 */ addiu $v0, $zero, 2 -/* F25C4 802CDC14 03E00008 */ jr $ra -/* F25C8 802CDC18 27BD0030 */ addiu $sp, $sp, 0x30 diff --git a/ver/us/asm/nonmatchings/evt/npc_api/InterpNpcYaw.s b/ver/us/asm/nonmatchings/evt/npc_api/InterpNpcYaw.s deleted file mode 100644 index 92fa38a57f..0000000000 --- a/ver/us/asm/nonmatchings/evt/npc_api/InterpNpcYaw.s +++ /dev/null @@ -1,123 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel InterpNpcYaw -/* F34B4 802CEB04 27BDFFD0 */ addiu $sp, $sp, -0x30 -/* F34B8 802CEB08 AFB20018 */ sw $s2, 0x18($sp) -/* F34BC 802CEB0C 0080902D */ daddu $s2, $a0, $zero -/* F34C0 802CEB10 AFB50024 */ sw $s5, 0x24($sp) -/* F34C4 802CEB14 26550074 */ addiu $s5, $s2, 0x74 -/* F34C8 802CEB18 AFB40020 */ sw $s4, 0x20($sp) -/* F34CC 802CEB1C 26540078 */ addiu $s4, $s2, 0x78 -/* F34D0 802CEB20 AFB3001C */ sw $s3, 0x1c($sp) -/* F34D4 802CEB24 AFBF0028 */ sw $ra, 0x28($sp) -/* F34D8 802CEB28 AFB10014 */ sw $s1, 0x14($sp) -/* F34DC 802CEB2C AFB00010 */ sw $s0, 0x10($sp) -/* F34E0 802CEB30 8E51000C */ lw $s1, 0xc($s2) -/* F34E4 802CEB34 10A0003B */ beqz $a1, .L802CEC24 -/* F34E8 802CEB38 2653007C */ addiu $s3, $s2, 0x7c -/* F34EC 802CEB3C 8E250000 */ lw $a1, ($s1) -/* F34F0 802CEB40 0C0B1EAF */ jal get_variable -/* F34F4 802CEB44 26310004 */ addiu $s1, $s1, 4 -/* F34F8 802CEB48 0240202D */ daddu $a0, $s2, $zero -/* F34FC 802CEB4C 0C0B36B0 */ jal resolve_npc -/* F3500 802CEB50 0040282D */ daddu $a1, $v0, $zero -/* F3504 802CEB54 0040802D */ daddu $s0, $v0, $zero -/* F3508 802CEB58 12000052 */ beqz $s0, .L802CECA4 -/* F350C 802CEB5C 24020002 */ addiu $v0, $zero, 2 -/* F3510 802CEB60 C600000C */ lwc1 $f0, 0xc($s0) -/* F3514 802CEB64 E6400074 */ swc1 $f0, 0x74($s2) -/* F3518 802CEB68 8E250000 */ lw $a1, ($s1) -/* F351C 802CEB6C 0C0B1EAF */ jal get_variable -/* F3520 802CEB70 0240202D */ daddu $a0, $s2, $zero -/* F3524 802CEB74 C6420074 */ lwc1 $f2, 0x74($s2) -/* F3528 802CEB78 44820000 */ mtc1 $v0, $f0 -/* F352C 802CEB7C 00000000 */ nop -/* F3530 802CEB80 46800020 */ cvt.s.w $f0, $f0 -/* F3534 802CEB84 46020001 */ sub.s $f0, $f0, $f2 -/* F3538 802CEB88 26310004 */ addiu $s1, $s1, 4 -/* F353C 802CEB8C AE500070 */ sw $s0, 0x70($s2) -/* F3540 802CEB90 E6400078 */ swc1 $f0, 0x78($s2) -/* F3544 802CEB94 8E250000 */ lw $a1, ($s1) -/* F3548 802CEB98 0C0B1EAF */ jal get_variable -/* F354C 802CEB9C 0240202D */ daddu $a0, $s2, $zero -/* F3550 802CEBA0 14400005 */ bnez $v0, .L802CEBB8 -/* F3554 802CEBA4 AE42007C */ sw $v0, 0x7c($s2) -/* F3558 802CEBA8 C600000C */ lwc1 $f0, 0xc($s0) -/* F355C 802CEBAC C6420078 */ lwc1 $f2, 0x78($s2) -/* F3560 802CEBB0 080B3B0F */ j .L802CEC3C -/* F3564 802CEBB4 46020000 */ add.s $f0, $f0, $f2 -.L802CEBB8: -/* F3568 802CEBB8 A600008E */ sh $zero, 0x8e($s0) -/* F356C 802CEBBC C6420078 */ lwc1 $f2, 0x78($s2) -/* F3570 802CEBC0 3C01C334 */ lui $at, 0xc334 -/* F3574 802CEBC4 44810000 */ mtc1 $at, $f0 -/* F3578 802CEBC8 00000000 */ nop -/* F357C 802CEBCC 4600103C */ c.lt.s $f2, $f0 -/* F3580 802CEBD0 00000000 */ nop -/* F3584 802CEBD4 45000007 */ bc1f .L802CEBF4 -/* F3588 802CEBD8 00000000 */ nop -/* F358C 802CEBDC 3C0143B4 */ lui $at, 0x43b4 -/* F3590 802CEBE0 44810000 */ mtc1 $at, $f0 -/* F3594 802CEBE4 00000000 */ nop -/* F3598 802CEBE8 46001000 */ add.s $f0, $f2, $f0 -/* F359C 802CEBEC E6400078 */ swc1 $f0, 0x78($s2) -/* F35A0 802CEBF0 C6420078 */ lwc1 $f2, 0x78($s2) -.L802CEBF4: -/* F35A4 802CEBF4 3C014334 */ lui $at, 0x4334 -/* F35A8 802CEBF8 44810000 */ mtc1 $at, $f0 -/* F35AC 802CEBFC 00000000 */ nop -/* F35B0 802CEC00 4602003C */ c.lt.s $f0, $f2 -/* F35B4 802CEC04 00000000 */ nop -/* F35B8 802CEC08 45000006 */ bc1f .L802CEC24 -/* F35BC 802CEC0C 00000000 */ nop -/* F35C0 802CEC10 3C0143B4 */ lui $at, 0x43b4 -/* F35C4 802CEC14 44810000 */ mtc1 $at, $f0 -/* F35C8 802CEC18 00000000 */ nop -/* F35CC 802CEC1C 46001001 */ sub.s $f0, $f2, $f0 -/* F35D0 802CEC20 E6400078 */ swc1 $f0, 0x78($s2) -.L802CEC24: -/* F35D4 802CEC24 8E620000 */ lw $v0, ($s3) -/* F35D8 802CEC28 1C400007 */ bgtz $v0, .L802CEC48 -/* F35DC 802CEC2C 8E500070 */ lw $s0, 0x70($s2) -/* F35E0 802CEC30 C600000C */ lwc1 $f0, 0xc($s0) -/* F35E4 802CEC34 C6820000 */ lwc1 $f2, ($s4) -/* F35E8 802CEC38 46020000 */ add.s $f0, $f0, $f2 -.L802CEC3C: -/* F35EC 802CEC3C 24020002 */ addiu $v0, $zero, 2 -/* F35F0 802CEC40 080B3B29 */ j .L802CECA4 -/* F35F4 802CEC44 E600000C */ swc1 $f0, 0xc($s0) -.L802CEC48: -/* F35F8 802CEC48 9602008E */ lhu $v0, 0x8e($s0) -/* F35FC 802CEC4C 24420001 */ addiu $v0, $v0, 1 -/* F3600 802CEC50 A602008E */ sh $v0, 0x8e($s0) -/* F3604 802CEC54 00021400 */ sll $v0, $v0, 0x10 -/* F3608 802CEC58 00021403 */ sra $v0, $v0, 0x10 -/* F360C 802CEC5C C6800000 */ lwc1 $f0, ($s4) -/* F3610 802CEC60 44821000 */ mtc1 $v0, $f2 -/* F3614 802CEC64 00000000 */ nop -/* F3618 802CEC68 468010A0 */ cvt.s.w $f2, $f2 -/* F361C 802CEC6C 46020002 */ mul.s $f0, $f0, $f2 -/* F3620 802CEC70 00000000 */ nop -/* F3624 802CEC74 C6AC0000 */ lwc1 $f12, ($s5) -/* F3628 802CEC78 C6620000 */ lwc1 $f2, ($s3) -/* F362C 802CEC7C 468010A0 */ cvt.s.w $f2, $f2 -/* F3630 802CEC80 46020003 */ div.s $f0, $f0, $f2 -/* F3634 802CEC84 46006300 */ add.s $f12, $f12, $f0 -/* F3638 802CEC88 0C00A6C9 */ jal clamp_angle -/* F363C 802CEC8C E60C000C */ swc1 $f12, 0xc($s0) -/* F3640 802CEC90 8602008E */ lh $v0, 0x8e($s0) -/* F3644 802CEC94 E600000C */ swc1 $f0, 0xc($s0) -/* F3648 802CEC98 8E630000 */ lw $v1, ($s3) -/* F364C 802CEC9C 0043102A */ slt $v0, $v0, $v1 -/* F3650 802CECA0 38420001 */ xori $v0, $v0, 1 -.L802CECA4: -/* F3654 802CECA4 8FBF0028 */ lw $ra, 0x28($sp) -/* F3658 802CECA8 8FB50024 */ lw $s5, 0x24($sp) -/* F365C 802CECAC 8FB40020 */ lw $s4, 0x20($sp) -/* F3660 802CECB0 8FB3001C */ lw $s3, 0x1c($sp) -/* F3664 802CECB4 8FB20018 */ lw $s2, 0x18($sp) -/* F3668 802CECB8 8FB10014 */ lw $s1, 0x14($sp) -/* F366C 802CECBC 8FB00010 */ lw $s0, 0x10($sp) -/* F3670 802CECC0 03E00008 */ jr $ra -/* F3674 802CECC4 27BD0030 */ addiu $sp, $sp, 0x30 diff --git a/ver/us/asm/nonmatchings/evt/npc_api/NpcFaceNpc.s b/ver/us/asm/nonmatchings/evt/npc_api/NpcFaceNpc.s deleted file mode 100644 index 502706d5a4..0000000000 --- a/ver/us/asm/nonmatchings/evt/npc_api/NpcFaceNpc.s +++ /dev/null @@ -1,130 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel NpcFaceNpc -/* F3830 802CEE80 27BDFFD0 */ addiu $sp, $sp, -0x30 -/* F3834 802CEE84 AFB10014 */ sw $s1, 0x14($sp) -/* F3838 802CEE88 0080882D */ daddu $s1, $a0, $zero -/* F383C 802CEE8C AFB60028 */ sw $s6, 0x28($sp) -/* F3840 802CEE90 26360074 */ addiu $s6, $s1, 0x74 -/* F3844 802CEE94 AFB50024 */ sw $s5, 0x24($sp) -/* F3848 802CEE98 26350078 */ addiu $s5, $s1, 0x78 -/* F384C 802CEE9C AFB40020 */ sw $s4, 0x20($sp) -/* F3850 802CEEA0 AFBF002C */ sw $ra, 0x2c($sp) -/* F3854 802CEEA4 AFB3001C */ sw $s3, 0x1c($sp) -/* F3858 802CEEA8 AFB20018 */ sw $s2, 0x18($sp) -/* F385C 802CEEAC AFB00010 */ sw $s0, 0x10($sp) -/* F3860 802CEEB0 8E32000C */ lw $s2, 0xc($s1) -/* F3864 802CEEB4 10A00040 */ beqz $a1, .L802CEFB8 -/* F3868 802CEEB8 2634007C */ addiu $s4, $s1, 0x7c -/* F386C 802CEEBC 8E450000 */ lw $a1, ($s2) -/* F3870 802CEEC0 0C0B1EAF */ jal get_variable -/* F3874 802CEEC4 26520004 */ addiu $s2, $s2, 4 -/* F3878 802CEEC8 8E450000 */ lw $a1, ($s2) -/* F387C 802CEECC 26520004 */ addiu $s2, $s2, 4 -/* F3880 802CEED0 0220202D */ daddu $a0, $s1, $zero -/* F3884 802CEED4 0C0B1EAF */ jal get_variable -/* F3888 802CEED8 0040802D */ daddu $s0, $v0, $zero -/* F388C 802CEEDC 0220202D */ daddu $a0, $s1, $zero -/* F3890 802CEEE0 0C0B36B0 */ jal resolve_npc -/* F3894 802CEEE4 0040282D */ daddu $a1, $v0, $zero -/* F3898 802CEEE8 0040982D */ daddu $s3, $v0, $zero -/* F389C 802CEEEC 12600006 */ beqz $s3, .L802CEF08 -/* F38A0 802CEEF0 0220202D */ daddu $a0, $s1, $zero -/* F38A4 802CEEF4 0C0B36B0 */ jal resolve_npc -/* F38A8 802CEEF8 0200282D */ daddu $a1, $s0, $zero -/* F38AC 802CEEFC 0040802D */ daddu $s0, $v0, $zero -/* F38B0 802CEF00 16000003 */ bnez $s0, .L802CEF10 -/* F38B4 802CEF04 00000000 */ nop -.L802CEF08: -/* F38B8 802CEF08 080B3C0E */ j .L802CF038 -/* F38BC 802CEF0C 24020002 */ addiu $v0, $zero, 2 -.L802CEF10: -/* F38C0 802CEF10 C600000C */ lwc1 $f0, 0xc($s0) -/* F38C4 802CEF14 E6200074 */ swc1 $f0, 0x74($s1) -/* F38C8 802CEF18 C60C0038 */ lwc1 $f12, 0x38($s0) -/* F38CC 802CEF1C C60E0040 */ lwc1 $f14, 0x40($s0) -/* F38D0 802CEF20 8E660038 */ lw $a2, 0x38($s3) -/* F38D4 802CEF24 0C00A720 */ jal atan2 -/* F38D8 802CEF28 8E670040 */ lw $a3, 0x40($s3) -/* F38DC 802CEF2C C6220074 */ lwc1 $f2, 0x74($s1) -/* F38E0 802CEF30 46020001 */ sub.s $f0, $f0, $f2 -/* F38E4 802CEF34 AE300070 */ sw $s0, 0x70($s1) -/* F38E8 802CEF38 E6200078 */ swc1 $f0, 0x78($s1) -/* F38EC 802CEF3C 8E450000 */ lw $a1, ($s2) -/* F38F0 802CEF40 0C0B1EAF */ jal get_variable -/* F38F4 802CEF44 0220202D */ daddu $a0, $s1, $zero -/* F38F8 802CEF48 AE22007C */ sw $v0, 0x7c($s1) -/* F38FC 802CEF4C A600008E */ sh $zero, 0x8e($s0) -/* F3900 802CEF50 C6220078 */ lwc1 $f2, 0x78($s1) -/* F3904 802CEF54 3C01C334 */ lui $at, 0xc334 -/* F3908 802CEF58 44810000 */ mtc1 $at, $f0 -/* F390C 802CEF5C 00000000 */ nop -/* F3910 802CEF60 4600103C */ c.lt.s $f2, $f0 -/* F3914 802CEF64 00000000 */ nop -/* F3918 802CEF68 45000007 */ bc1f .L802CEF88 -/* F391C 802CEF6C 00000000 */ nop -/* F3920 802CEF70 3C0143B4 */ lui $at, 0x43b4 -/* F3924 802CEF74 44810000 */ mtc1 $at, $f0 -/* F3928 802CEF78 00000000 */ nop -/* F392C 802CEF7C 46001000 */ add.s $f0, $f2, $f0 -/* F3930 802CEF80 E6200078 */ swc1 $f0, 0x78($s1) -/* F3934 802CEF84 C6220078 */ lwc1 $f2, 0x78($s1) -.L802CEF88: -/* F3938 802CEF88 3C014334 */ lui $at, 0x4334 -/* F393C 802CEF8C 44810000 */ mtc1 $at, $f0 -/* F3940 802CEF90 00000000 */ nop -/* F3944 802CEF94 4602003C */ c.lt.s $f0, $f2 -/* F3948 802CEF98 00000000 */ nop -/* F394C 802CEF9C 45000006 */ bc1f .L802CEFB8 -/* F3950 802CEFA0 00000000 */ nop -/* F3954 802CEFA4 3C0143B4 */ lui $at, 0x43b4 -/* F3958 802CEFA8 44810000 */ mtc1 $at, $f0 -/* F395C 802CEFAC 00000000 */ nop -/* F3960 802CEFB0 46001001 */ sub.s $f0, $f2, $f0 -/* F3964 802CEFB4 E6200078 */ swc1 $f0, 0x78($s1) -.L802CEFB8: -/* F3968 802CEFB8 8E820000 */ lw $v0, ($s4) -/* F396C 802CEFBC 8E300070 */ lw $s0, 0x70($s1) -/* F3970 802CEFC0 1C400006 */ bgtz $v0, .L802CEFDC -/* F3974 802CEFC4 24020002 */ addiu $v0, $zero, 2 -/* F3978 802CEFC8 C600000C */ lwc1 $f0, 0xc($s0) -/* F397C 802CEFCC C6A20000 */ lwc1 $f2, ($s5) -/* F3980 802CEFD0 46020000 */ add.s $f0, $f0, $f2 -/* F3984 802CEFD4 080B3C0E */ j .L802CF038 -/* F3988 802CEFD8 E600000C */ swc1 $f0, 0xc($s0) -.L802CEFDC: -/* F398C 802CEFDC 9602008E */ lhu $v0, 0x8e($s0) -/* F3990 802CEFE0 24420001 */ addiu $v0, $v0, 1 -/* F3994 802CEFE4 A602008E */ sh $v0, 0x8e($s0) -/* F3998 802CEFE8 00021400 */ sll $v0, $v0, 0x10 -/* F399C 802CEFEC 00021403 */ sra $v0, $v0, 0x10 -/* F39A0 802CEFF0 C6A00000 */ lwc1 $f0, ($s5) -/* F39A4 802CEFF4 44821000 */ mtc1 $v0, $f2 -/* F39A8 802CEFF8 00000000 */ nop -/* F39AC 802CEFFC 468010A0 */ cvt.s.w $f2, $f2 -/* F39B0 802CF000 46020002 */ mul.s $f0, $f0, $f2 -/* F39B4 802CF004 00000000 */ nop -/* F39B8 802CF008 C6CC0000 */ lwc1 $f12, ($s6) -/* F39BC 802CF00C C6820000 */ lwc1 $f2, ($s4) -/* F39C0 802CF010 468010A0 */ cvt.s.w $f2, $f2 -/* F39C4 802CF014 46020003 */ div.s $f0, $f0, $f2 -/* F39C8 802CF018 46006300 */ add.s $f12, $f12, $f0 -/* F39CC 802CF01C 0C00A6C9 */ jal clamp_angle -/* F39D0 802CF020 E60C000C */ swc1 $f12, 0xc($s0) -/* F39D4 802CF024 8602008E */ lh $v0, 0x8e($s0) -/* F39D8 802CF028 E600000C */ swc1 $f0, 0xc($s0) -/* F39DC 802CF02C 8E830000 */ lw $v1, ($s4) -/* F39E0 802CF030 0043102A */ slt $v0, $v0, $v1 -/* F39E4 802CF034 38420001 */ xori $v0, $v0, 1 -.L802CF038: -/* F39E8 802CF038 8FBF002C */ lw $ra, 0x2c($sp) -/* F39EC 802CF03C 8FB60028 */ lw $s6, 0x28($sp) -/* F39F0 802CF040 8FB50024 */ lw $s5, 0x24($sp) -/* F39F4 802CF044 8FB40020 */ lw $s4, 0x20($sp) -/* F39F8 802CF048 8FB3001C */ lw $s3, 0x1c($sp) -/* F39FC 802CF04C 8FB20018 */ lw $s2, 0x18($sp) -/* F3A00 802CF050 8FB10014 */ lw $s1, 0x14($sp) -/* F3A04 802CF054 8FB00010 */ lw $s0, 0x10($sp) -/* F3A08 802CF058 03E00008 */ jr $ra -/* F3A0C 802CF05C 27BD0030 */ addiu $sp, $sp, 0x30 diff --git a/ver/us/asm/nonmatchings/evt/npc_api/NpcFacePlayer.s b/ver/us/asm/nonmatchings/evt/npc_api/NpcFacePlayer.s deleted file mode 100644 index cdc130c24d..0000000000 --- a/ver/us/asm/nonmatchings/evt/npc_api/NpcFacePlayer.s +++ /dev/null @@ -1,118 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel NpcFacePlayer -/* F3678 802CECC8 27BDFFD0 */ addiu $sp, $sp, -0x30 -/* F367C 802CECCC AFB10014 */ sw $s1, 0x14($sp) -/* F3680 802CECD0 0080882D */ daddu $s1, $a0, $zero -/* F3684 802CECD4 AFB40020 */ sw $s4, 0x20($sp) -/* F3688 802CECD8 3C148011 */ lui $s4, %hi(gPlayerStatus) -/* F368C 802CECDC 2694EFC8 */ addiu $s4, $s4, %lo(gPlayerStatus) -/* F3690 802CECE0 AFB60028 */ sw $s6, 0x28($sp) -/* F3694 802CECE4 26360074 */ addiu $s6, $s1, 0x74 -/* F3698 802CECE8 AFB50024 */ sw $s5, 0x24($sp) -/* F369C 802CECEC 26350078 */ addiu $s5, $s1, 0x78 -/* F36A0 802CECF0 AFB3001C */ sw $s3, 0x1c($sp) -/* F36A4 802CECF4 AFBF002C */ sw $ra, 0x2c($sp) -/* F36A8 802CECF8 AFB20018 */ sw $s2, 0x18($sp) -/* F36AC 802CECFC AFB00010 */ sw $s0, 0x10($sp) -/* F36B0 802CED00 8E32000C */ lw $s2, 0xc($s1) -/* F36B4 802CED04 10A00034 */ beqz $a1, .L802CEDD8 -/* F36B8 802CED08 2633007C */ addiu $s3, $s1, 0x7c -/* F36BC 802CED0C 8E450000 */ lw $a1, ($s2) -/* F36C0 802CED10 0C0B1EAF */ jal get_variable -/* F36C4 802CED14 26520004 */ addiu $s2, $s2, 4 -/* F36C8 802CED18 0220202D */ daddu $a0, $s1, $zero -/* F36CC 802CED1C 0C0B36B0 */ jal resolve_npc -/* F36D0 802CED20 0040282D */ daddu $a1, $v0, $zero -/* F36D4 802CED24 0040802D */ daddu $s0, $v0, $zero -/* F36D8 802CED28 1200004B */ beqz $s0, .L802CEE58 -/* F36DC 802CED2C 24020002 */ addiu $v0, $zero, 2 -/* F36E0 802CED30 C600000C */ lwc1 $f0, 0xc($s0) -/* F36E4 802CED34 E6200074 */ swc1 $f0, 0x74($s1) -/* F36E8 802CED38 C60C0038 */ lwc1 $f12, 0x38($s0) -/* F36EC 802CED3C C60E0040 */ lwc1 $f14, 0x40($s0) -/* F36F0 802CED40 8E860028 */ lw $a2, 0x28($s4) -/* F36F4 802CED44 0C00A720 */ jal atan2 -/* F36F8 802CED48 8E870030 */ lw $a3, 0x30($s4) -/* F36FC 802CED4C C6220074 */ lwc1 $f2, 0x74($s1) -/* F3700 802CED50 46020001 */ sub.s $f0, $f0, $f2 -/* F3704 802CED54 AE300070 */ sw $s0, 0x70($s1) -/* F3708 802CED58 E6200078 */ swc1 $f0, 0x78($s1) -/* F370C 802CED5C 8E450000 */ lw $a1, ($s2) -/* F3710 802CED60 0C0B1EAF */ jal get_variable -/* F3714 802CED64 0220202D */ daddu $a0, $s1, $zero -/* F3718 802CED68 AE22007C */ sw $v0, 0x7c($s1) -/* F371C 802CED6C A600008E */ sh $zero, 0x8e($s0) -/* F3720 802CED70 C6220078 */ lwc1 $f2, 0x78($s1) -/* F3724 802CED74 3C01C334 */ lui $at, 0xc334 -/* F3728 802CED78 44810000 */ mtc1 $at, $f0 -/* F372C 802CED7C 00000000 */ nop -/* F3730 802CED80 4600103C */ c.lt.s $f2, $f0 -/* F3734 802CED84 00000000 */ nop -/* F3738 802CED88 45000007 */ bc1f .L802CEDA8 -/* F373C 802CED8C 00000000 */ nop -/* F3740 802CED90 3C0143B4 */ lui $at, 0x43b4 -/* F3744 802CED94 44810000 */ mtc1 $at, $f0 -/* F3748 802CED98 00000000 */ nop -/* F374C 802CED9C 46001000 */ add.s $f0, $f2, $f0 -/* F3750 802CEDA0 E6200078 */ swc1 $f0, 0x78($s1) -/* F3754 802CEDA4 C6220078 */ lwc1 $f2, 0x78($s1) -.L802CEDA8: -/* F3758 802CEDA8 3C014334 */ lui $at, 0x4334 -/* F375C 802CEDAC 44810000 */ mtc1 $at, $f0 -/* F3760 802CEDB0 00000000 */ nop -/* F3764 802CEDB4 4602003C */ c.lt.s $f0, $f2 -/* F3768 802CEDB8 00000000 */ nop -/* F376C 802CEDBC 45000006 */ bc1f .L802CEDD8 -/* F3770 802CEDC0 00000000 */ nop -/* F3774 802CEDC4 3C0143B4 */ lui $at, 0x43b4 -/* F3778 802CEDC8 44810000 */ mtc1 $at, $f0 -/* F377C 802CEDCC 00000000 */ nop -/* F3780 802CEDD0 46001001 */ sub.s $f0, $f2, $f0 -/* F3784 802CEDD4 E6200078 */ swc1 $f0, 0x78($s1) -.L802CEDD8: -/* F3788 802CEDD8 8E620000 */ lw $v0, ($s3) -/* F378C 802CEDDC 8E300070 */ lw $s0, 0x70($s1) -/* F3790 802CEDE0 1C400006 */ bgtz $v0, .L802CEDFC -/* F3794 802CEDE4 24020002 */ addiu $v0, $zero, 2 -/* F3798 802CEDE8 C600000C */ lwc1 $f0, 0xc($s0) -/* F379C 802CEDEC C6A20000 */ lwc1 $f2, ($s5) -/* F37A0 802CEDF0 46020000 */ add.s $f0, $f0, $f2 -/* F37A4 802CEDF4 080B3B96 */ j .L802CEE58 -/* F37A8 802CEDF8 E600000C */ swc1 $f0, 0xc($s0) -.L802CEDFC: -/* F37AC 802CEDFC 9602008E */ lhu $v0, 0x8e($s0) -/* F37B0 802CEE00 24420001 */ addiu $v0, $v0, 1 -/* F37B4 802CEE04 A602008E */ sh $v0, 0x8e($s0) -/* F37B8 802CEE08 00021400 */ sll $v0, $v0, 0x10 -/* F37BC 802CEE0C 00021403 */ sra $v0, $v0, 0x10 -/* F37C0 802CEE10 C6A00000 */ lwc1 $f0, ($s5) -/* F37C4 802CEE14 44821000 */ mtc1 $v0, $f2 -/* F37C8 802CEE18 00000000 */ nop -/* F37CC 802CEE1C 468010A0 */ cvt.s.w $f2, $f2 -/* F37D0 802CEE20 46020002 */ mul.s $f0, $f0, $f2 -/* F37D4 802CEE24 00000000 */ nop -/* F37D8 802CEE28 C6CC0000 */ lwc1 $f12, ($s6) -/* F37DC 802CEE2C C6620000 */ lwc1 $f2, ($s3) -/* F37E0 802CEE30 468010A0 */ cvt.s.w $f2, $f2 -/* F37E4 802CEE34 46020003 */ div.s $f0, $f0, $f2 -/* F37E8 802CEE38 46006300 */ add.s $f12, $f12, $f0 -/* F37EC 802CEE3C 0C00A6C9 */ jal clamp_angle -/* F37F0 802CEE40 E60C000C */ swc1 $f12, 0xc($s0) -/* F37F4 802CEE44 8602008E */ lh $v0, 0x8e($s0) -/* F37F8 802CEE48 E600000C */ swc1 $f0, 0xc($s0) -/* F37FC 802CEE4C 8E630000 */ lw $v1, ($s3) -/* F3800 802CEE50 0043102A */ slt $v0, $v0, $v1 -/* F3804 802CEE54 38420001 */ xori $v0, $v0, 1 -.L802CEE58: -/* F3808 802CEE58 8FBF002C */ lw $ra, 0x2c($sp) -/* F380C 802CEE5C 8FB60028 */ lw $s6, 0x28($sp) -/* F3810 802CEE60 8FB50024 */ lw $s5, 0x24($sp) -/* F3814 802CEE64 8FB40020 */ lw $s4, 0x20($sp) -/* F3818 802CEE68 8FB3001C */ lw $s3, 0x1c($sp) -/* F381C 802CEE6C 8FB20018 */ lw $s2, 0x18($sp) -/* F3820 802CEE70 8FB10014 */ lw $s1, 0x14($sp) -/* F3824 802CEE74 8FB00010 */ lw $s0, 0x10($sp) -/* F3828 802CEE78 03E00008 */ jr $ra -/* F382C 802CEE7C 27BD0030 */ addiu $sp, $sp, 0x30 diff --git a/ver/us/asm/nonmatchings/evt/npc_api/NpcFlyTo.s b/ver/us/asm/nonmatchings/evt/npc_api/NpcFlyTo.s deleted file mode 100644 index 16953e08ea..0000000000 --- a/ver/us/asm/nonmatchings/evt/npc_api/NpcFlyTo.s +++ /dev/null @@ -1,218 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -.section .rodata - -glabel D_802DA1E0 -.double 180.0, 0.0 - -.section .text - -glabel NpcFlyTo -/* F30AC 802CE6FC 27BDFFC0 */ addiu $sp, $sp, -0x40 -/* F30B0 802CE700 AFB20020 */ sw $s2, 0x20($sp) -/* F30B4 802CE704 0080902D */ daddu $s2, $a0, $zero -/* F30B8 802CE708 AFB30024 */ sw $s3, 0x24($sp) -/* F30BC 802CE70C 26530090 */ addiu $s3, $s2, 0x90 -/* F30C0 802CE710 AFB40028 */ sw $s4, 0x28($sp) -/* F30C4 802CE714 26540094 */ addiu $s4, $s2, 0x94 -/* F30C8 802CE718 AFB5002C */ sw $s5, 0x2c($sp) -/* F30CC 802CE71C AFBF0030 */ sw $ra, 0x30($sp) -/* F30D0 802CE720 AFB1001C */ sw $s1, 0x1c($sp) -/* F30D4 802CE724 AFB00018 */ sw $s0, 0x18($sp) -/* F30D8 802CE728 F7B40038 */ sdc1 $f20, 0x38($sp) -/* F30DC 802CE72C 8E50000C */ lw $s0, 0xc($s2) -/* F30E0 802CE730 10A0004A */ beqz $a1, .L802CE85C -/* F30E4 802CE734 26550098 */ addiu $s5, $s2, 0x98 -/* F30E8 802CE738 8E050000 */ lw $a1, ($s0) -/* F30EC 802CE73C 0C0B1EAF */ jal get_variable -/* F30F0 802CE740 26100004 */ addiu $s0, $s0, 4 -/* F30F4 802CE744 0240202D */ daddu $a0, $s2, $zero -/* F30F8 802CE748 0C0B36B0 */ jal resolve_npc -/* F30FC 802CE74C 0040282D */ daddu $a1, $v0, $zero -/* F3100 802CE750 0040882D */ daddu $s1, $v0, $zero -/* F3104 802CE754 56200003 */ bnel $s1, $zero, .L802CE764 -/* F3108 802CE758 AE510074 */ sw $s1, 0x74($s2) -/* F310C 802CE75C 080B3A7A */ j .L802CE9E8 -/* F3110 802CE760 24020002 */ addiu $v0, $zero, 2 -.L802CE764: -/* F3114 802CE764 8E050000 */ lw $a1, ($s0) -/* F3118 802CE768 26100004 */ addiu $s0, $s0, 4 -/* F311C 802CE76C 0C0B210B */ jal get_float_variable -/* F3120 802CE770 0240202D */ daddu $a0, $s2, $zero -/* F3124 802CE774 E6200060 */ swc1 $f0, 0x60($s1) -/* F3128 802CE778 8E050000 */ lw $a1, ($s0) -/* F312C 802CE77C 26100004 */ addiu $s0, $s0, 4 -/* F3130 802CE780 0C0B210B */ jal get_float_variable -/* F3134 802CE784 0240202D */ daddu $a0, $s2, $zero -/* F3138 802CE788 E6200064 */ swc1 $f0, 0x64($s1) -/* F313C 802CE78C 8E050000 */ lw $a1, ($s0) -/* F3140 802CE790 26100004 */ addiu $s0, $s0, 4 -/* F3144 802CE794 0C0B210B */ jal get_float_variable -/* F3148 802CE798 0240202D */ daddu $a0, $s2, $zero -/* F314C 802CE79C E6200068 */ swc1 $f0, 0x68($s1) -/* F3150 802CE7A0 8E050000 */ lw $a1, ($s0) -/* F3154 802CE7A4 26100004 */ addiu $s0, $s0, 4 -/* F3158 802CE7A8 0C0B1EAF */ jal get_variable -/* F315C 802CE7AC 0240202D */ daddu $a0, $s2, $zero -/* F3160 802CE7B0 AE42009C */ sw $v0, 0x9c($s2) -/* F3164 802CE7B4 8E050000 */ lw $a1, ($s0) -/* F3168 802CE7B8 26100004 */ addiu $s0, $s0, 4 -/* F316C 802CE7BC 0C0B1EAF */ jal get_variable -/* F3170 802CE7C0 0240202D */ daddu $a0, $s2, $zero -/* F3174 802CE7C4 AE420078 */ sw $v0, 0x78($s2) -/* F3178 802CE7C8 8E050000 */ lw $a1, ($s0) -/* F317C 802CE7CC 0C0B1EAF */ jal get_variable -/* F3180 802CE7D0 0240202D */ daddu $a0, $s2, $zero -/* F3184 802CE7D4 AE42007C */ sw $v0, 0x7c($s2) -/* F3188 802CE7D8 C6200038 */ lwc1 $f0, 0x38($s1) -/* F318C 802CE7DC A620008E */ sh $zero, 0x8e($s1) -/* F3190 802CE7E0 E6400090 */ swc1 $f0, 0x90($s2) -/* F3194 802CE7E4 C620003C */ lwc1 $f0, 0x3c($s1) -/* F3198 802CE7E8 E6400094 */ swc1 $f0, 0x94($s2) -/* F319C 802CE7EC C6200040 */ lwc1 $f0, 0x40($s1) -/* F31A0 802CE7F0 E6400098 */ swc1 $f0, 0x98($s2) -/* F31A4 802CE7F4 C62C0038 */ lwc1 $f12, 0x38($s1) -/* F31A8 802CE7F8 C62E0040 */ lwc1 $f14, 0x40($s1) -/* F31AC 802CE7FC 8E260060 */ lw $a2, 0x60($s1) -/* F31B0 802CE800 0C00A720 */ jal atan2 -/* F31B4 802CE804 8E270068 */ lw $a3, 0x68($s1) -/* F31B8 802CE808 C62C0038 */ lwc1 $f12, 0x38($s1) -/* F31BC 802CE80C C62E0040 */ lwc1 $f14, 0x40($s1) -/* F31C0 802CE810 8E260060 */ lw $a2, 0x60($s1) -/* F31C4 802CE814 8E270068 */ lw $a3, 0x68($s1) -/* F31C8 802CE818 0C00A7B5 */ jal dist2D -/* F31CC 802CE81C E620000C */ swc1 $f0, 0xc($s1) -/* F31D0 802CE820 46000086 */ mov.s $f2, $f0 -/* F31D4 802CE824 E6220010 */ swc1 $f2, 0x10($s1) -/* F31D8 802CE828 8E42009C */ lw $v0, 0x9c($s2) -/* F31DC 802CE82C 14400006 */ bnez $v0, .L802CE848 -/* F31E0 802CE830 00000000 */ nop -/* F31E4 802CE834 C6200018 */ lwc1 $f0, 0x18($s1) -/* F31E8 802CE838 46001003 */ div.s $f0, $f2, $f0 -/* F31EC 802CE83C 4600018D */ trunc.w.s $f6, $f0 -/* F31F0 802CE840 080B3A17 */ j .L802CE85C -/* F31F4 802CE844 E646009C */ swc1 $f6, 0x9c($s2) -.L802CE848: -/* F31F8 802CE848 44820000 */ mtc1 $v0, $f0 -/* F31FC 802CE84C 00000000 */ nop -/* F3200 802CE850 46800020 */ cvt.s.w $f0, $f0 -/* F3204 802CE854 46001003 */ div.s $f0, $f2, $f0 -/* F3208 802CE858 E6200018 */ swc1 $f0, 0x18($s1) -.L802CE85C: -/* F320C 802CE85C 8E510074 */ lw $s1, 0x74($s2) -/* F3210 802CE860 8E42009C */ lw $v0, 0x9c($s2) -/* F3214 802CE864 8627008E */ lh $a3, 0x8e($s1) -/* F3218 802CE868 AFA20010 */ sw $v0, 0x10($sp) -/* F321C 802CE86C 8E44007C */ lw $a0, 0x7c($s2) -/* F3220 802CE870 8E650000 */ lw $a1, ($s3) -/* F3224 802CE874 0C00A8ED */ jal update_lerp -/* F3228 802CE878 8E260060 */ lw $a2, 0x60($s1) -/* F322C 802CE87C E6200038 */ swc1 $f0, 0x38($s1) -/* F3230 802CE880 8E42009C */ lw $v0, 0x9c($s2) -/* F3234 802CE884 8627008E */ lh $a3, 0x8e($s1) -/* F3238 802CE888 AFA20010 */ sw $v0, 0x10($sp) -/* F323C 802CE88C 8E44007C */ lw $a0, 0x7c($s2) -/* F3240 802CE890 8E850000 */ lw $a1, ($s4) -/* F3244 802CE894 0C00A8ED */ jal update_lerp -/* F3248 802CE898 8E260064 */ lw $a2, 0x64($s1) -/* F324C 802CE89C E620003C */ swc1 $f0, 0x3c($s1) -/* F3250 802CE8A0 8E42009C */ lw $v0, 0x9c($s2) -/* F3254 802CE8A4 8627008E */ lh $a3, 0x8e($s1) -/* F3258 802CE8A8 AFA20010 */ sw $v0, 0x10($sp) -/* F325C 802CE8AC 8E44007C */ lw $a0, 0x7c($s2) -/* F3260 802CE8B0 8EA50000 */ lw $a1, ($s5) -/* F3264 802CE8B4 0C00A8ED */ jal update_lerp -/* F3268 802CE8B8 8E260068 */ lw $a2, 0x68($s1) -/* F326C 802CE8BC 9622008E */ lhu $v0, 0x8e($s1) -/* F3270 802CE8C0 E6200040 */ swc1 $f0, 0x40($s1) -/* F3274 802CE8C4 24420001 */ addiu $v0, $v0, 1 -/* F3278 802CE8C8 A622008E */ sh $v0, 0x8e($s1) -/* F327C 802CE8CC 00021400 */ sll $v0, $v0, 0x10 -/* F3280 802CE8D0 8E43009C */ lw $v1, 0x9c($s2) -/* F3284 802CE8D4 00021403 */ sra $v0, $v0, 0x10 -/* F3288 802CE8D8 0043102A */ slt $v0, $v0, $v1 -/* F328C 802CE8DC 14400008 */ bnez $v0, .L802CE900 -/* F3290 802CE8E0 24020002 */ addiu $v0, $zero, 2 -/* F3294 802CE8E4 C6200060 */ lwc1 $f0, 0x60($s1) -/* F3298 802CE8E8 C6220064 */ lwc1 $f2, 0x64($s1) -/* F329C 802CE8EC C6240068 */ lwc1 $f4, 0x68($s1) -/* F32A0 802CE8F0 E6200038 */ swc1 $f0, 0x38($s1) -/* F32A4 802CE8F4 E622003C */ swc1 $f2, 0x3c($s1) -/* F32A8 802CE8F8 080B3A7A */ j .L802CE9E8 -/* F32AC 802CE8FC E6240040 */ swc1 $f4, 0x40($s1) -.L802CE900: -/* F32B0 802CE900 C62C0038 */ lwc1 $f12, 0x38($s1) -/* F32B4 802CE904 C62E0040 */ lwc1 $f14, 0x40($s1) -/* F32B8 802CE908 8E260060 */ lw $a2, 0x60($s1) -/* F32BC 802CE90C 0C00A7B5 */ jal dist2D -/* F32C0 802CE910 8E270068 */ lw $a3, 0x68($s1) -/* F32C4 802CE914 4480A000 */ mtc1 $zero, $f20 -/* F32C8 802CE918 00000000 */ nop -/* F32CC 802CE91C 46140032 */ c.eq.s $f0, $f20 -/* F32D0 802CE920 00000000 */ nop -/* F32D4 802CE924 45000003 */ bc1f .L802CE934 -/* F32D8 802CE928 46000086 */ mov.s $f2, $f0 -/* F32DC 802CE92C 3C013F80 */ lui $at, 0x3f80 -/* F32E0 802CE930 44811000 */ mtc1 $at, $f2 -.L802CE934: -/* F32E4 802CE934 C6200010 */ lwc1 $f0, 0x10($s1) -/* F32E8 802CE938 46140032 */ c.eq.s $f0, $f20 -/* F32EC 802CE93C 00000000 */ nop -/* F32F0 802CE940 45000006 */ bc1f .L802CE95C -/* F32F4 802CE944 00000000 */ nop -/* F32F8 802CE948 3C013F80 */ lui $at, 0x3f80 -/* F32FC 802CE94C 44810000 */ mtc1 $at, $f0 -/* F3300 802CE950 00000000 */ nop -/* F3304 802CE954 E6200010 */ swc1 $f0, 0x10($s1) -/* F3308 802CE958 C6200010 */ lwc1 $f0, 0x10($s1) -.L802CE95C: -/* F330C 802CE95C 3C013FF0 */ lui $at, 0x3ff0 -/* F3310 802CE960 44816800 */ mtc1 $at, $f13 -/* F3314 802CE964 44806000 */ mtc1 $zero, $f12 -/* F3318 802CE968 46001003 */ div.s $f0, $f2, $f0 -/* F331C 802CE96C 46000021 */ cvt.d.s $f0, $f0 -/* F3320 802CE970 46206301 */ sub.d $f12, $f12, $f0 -/* F3324 802CE974 3C01802E */ lui $at, %hi(D_802DA1E0) -/* F3328 802CE978 D420A1E0 */ ldc1 $f0, %lo(D_802DA1E0)($at) -/* F332C 802CE97C 46206302 */ mul.d $f12, $f12, $f0 -/* F3330 802CE980 00000000 */ nop -/* F3334 802CE984 0C00A8BB */ jal sin_deg -/* F3338 802CE988 46206320 */ cvt.s.d $f12, $f12 -/* F333C 802CE98C 8E440078 */ lw $a0, 0x78($s2) -/* F3340 802CE990 14800002 */ bnez $a0, .L802CE99C -/* F3344 802CE994 46000106 */ mov.s $f4, $f0 -/* F3348 802CE998 4600A106 */ mov.s $f4, $f20 -.L802CE99C: -/* F334C 802CE99C 04810007 */ bgez $a0, .L802CE9BC -/* F3350 802CE9A0 00041023 */ negu $v0, $a0 -/* F3354 802CE9A4 44821000 */ mtc1 $v0, $f2 -/* F3358 802CE9A8 00000000 */ nop -/* F335C 802CE9AC 468010A0 */ cvt.s.w $f2, $f2 -/* F3360 802CE9B0 46002007 */ neg.s $f0, $f4 -/* F3364 802CE9B4 46020102 */ mul.s $f4, $f0, $f2 -/* F3368 802CE9B8 00000000 */ nop -.L802CE9BC: -/* F336C 802CE9BC 18800006 */ blez $a0, .L802CE9D8 -/* F3370 802CE9C0 00000000 */ nop -/* F3374 802CE9C4 44840000 */ mtc1 $a0, $f0 -/* F3378 802CE9C8 00000000 */ nop -/* F337C 802CE9CC 46800020 */ cvt.s.w $f0, $f0 -/* F3380 802CE9D0 46002102 */ mul.s $f4, $f4, $f0 -/* F3384 802CE9D4 00000000 */ nop -.L802CE9D8: -/* F3388 802CE9D8 C620003C */ lwc1 $f0, 0x3c($s1) -/* F338C 802CE9DC 46040000 */ add.s $f0, $f0, $f4 -/* F3390 802CE9E0 0000102D */ daddu $v0, $zero, $zero -/* F3394 802CE9E4 E620003C */ swc1 $f0, 0x3c($s1) -.L802CE9E8: -/* F3398 802CE9E8 8FBF0030 */ lw $ra, 0x30($sp) -/* F339C 802CE9EC 8FB5002C */ lw $s5, 0x2c($sp) -/* F33A0 802CE9F0 8FB40028 */ lw $s4, 0x28($sp) -/* F33A4 802CE9F4 8FB30024 */ lw $s3, 0x24($sp) -/* F33A8 802CE9F8 8FB20020 */ lw $s2, 0x20($sp) -/* F33AC 802CE9FC 8FB1001C */ lw $s1, 0x1c($sp) -/* F33B0 802CEA00 8FB00018 */ lw $s0, 0x18($sp) -/* F33B4 802CEA04 D7B40038 */ ldc1 $f20, 0x38($sp) -/* F33B8 802CEA08 03E00008 */ jr $ra -/* F33BC 802CEA0C 27BD0040 */ addiu $sp, $sp, 0x40 diff --git a/ver/us/asm/nonmatchings/evt/npc_api/NpcMoveTo.s b/ver/us/asm/nonmatchings/evt/npc_api/NpcMoveTo.s deleted file mode 100644 index 367c0951de..0000000000 --- a/ver/us/asm/nonmatchings/evt/npc_api/NpcMoveTo.s +++ /dev/null @@ -1,144 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel NpcMoveTo -/* F2BDC 802CE22C 27BDFFD0 */ addiu $sp, $sp, -0x30 -/* F2BE0 802CE230 AFB20018 */ sw $s2, 0x18($sp) -/* F2BE4 802CE234 0080902D */ daddu $s2, $a0, $zero -/* F2BE8 802CE238 AFBF001C */ sw $ra, 0x1c($sp) -/* F2BEC 802CE23C AFB10014 */ sw $s1, 0x14($sp) -/* F2BF0 802CE240 AFB00010 */ sw $s0, 0x10($sp) -/* F2BF4 802CE244 F7B60028 */ sdc1 $f22, 0x28($sp) -/* F2BF8 802CE248 F7B40020 */ sdc1 $f20, 0x20($sp) -/* F2BFC 802CE24C 8E51000C */ lw $s1, 0xc($s2) -/* F2C00 802CE250 54A00001 */ bnel $a1, $zero, .L802CE258 -/* F2C04 802CE254 AE400070 */ sw $zero, 0x70($s2) -.L802CE258: -/* F2C08 802CE258 8E420070 */ lw $v0, 0x70($s2) -/* F2C0C 802CE25C 1440003D */ bnez $v0, .L802CE354 -/* F2C10 802CE260 00000000 */ nop -/* F2C14 802CE264 8E250000 */ lw $a1, ($s1) -/* F2C18 802CE268 26310004 */ addiu $s1, $s1, 4 -/* F2C1C 802CE26C 0C0B1EAF */ jal get_variable -/* F2C20 802CE270 0240202D */ daddu $a0, $s2, $zero -/* F2C24 802CE274 8E250000 */ lw $a1, ($s1) -/* F2C28 802CE278 26310004 */ addiu $s1, $s1, 4 -/* F2C2C 802CE27C 0240202D */ daddu $a0, $s2, $zero -/* F2C30 802CE280 0C0B1EAF */ jal get_variable -/* F2C34 802CE284 0040802D */ daddu $s0, $v0, $zero -/* F2C38 802CE288 8E250000 */ lw $a1, ($s1) -/* F2C3C 802CE28C 26310004 */ addiu $s1, $s1, 4 -/* F2C40 802CE290 4482B000 */ mtc1 $v0, $f22 -/* F2C44 802CE294 00000000 */ nop -/* F2C48 802CE298 4680B5A0 */ cvt.s.w $f22, $f22 -/* F2C4C 802CE29C 0C0B1EAF */ jal get_variable -/* F2C50 802CE2A0 0240202D */ daddu $a0, $s2, $zero -/* F2C54 802CE2A4 8E250000 */ lw $a1, ($s1) -/* F2C58 802CE2A8 4482A000 */ mtc1 $v0, $f20 -/* F2C5C 802CE2AC 00000000 */ nop -/* F2C60 802CE2B0 4680A520 */ cvt.s.w $f20, $f20 -/* F2C64 802CE2B4 0C0B1EAF */ jal get_variable -/* F2C68 802CE2B8 0240202D */ daddu $a0, $s2, $zero -/* F2C6C 802CE2BC 0240202D */ daddu $a0, $s2, $zero -/* F2C70 802CE2C0 0200282D */ daddu $a1, $s0, $zero -/* F2C74 802CE2C4 0C0B36B0 */ jal resolve_npc -/* F2C78 802CE2C8 0040882D */ daddu $s1, $v0, $zero -/* F2C7C 802CE2CC 0040802D */ daddu $s0, $v0, $zero -/* F2C80 802CE2D0 56000003 */ bnel $s0, $zero, .L802CE2E0 -/* F2C84 802CE2D4 AE500074 */ sw $s0, 0x74($s2) -/* F2C88 802CE2D8 080B3905 */ j .L802CE414 -/* F2C8C 802CE2DC 24020002 */ addiu $v0, $zero, 2 -.L802CE2E0: -/* F2C90 802CE2E0 C60C0038 */ lwc1 $f12, 0x38($s0) -/* F2C94 802CE2E4 C60E0040 */ lwc1 $f14, 0x40($s0) -/* F2C98 802CE2E8 E6160060 */ swc1 $f22, 0x60($s0) -/* F2C9C 802CE2EC 4406B000 */ mfc1 $a2, $f22 -/* F2CA0 802CE2F0 E6140068 */ swc1 $f20, 0x68($s0) -/* F2CA4 802CE2F4 4407A000 */ mfc1 $a3, $f20 -/* F2CA8 802CE2F8 0C00A7B5 */ jal dist2D -/* F2CAC 802CE2FC A611008E */ sh $s1, 0x8e($s0) -/* F2CB0 802CE300 8602008E */ lh $v0, 0x8e($s0) -/* F2CB4 802CE304 14400007 */ bnez $v0, .L802CE324 -/* F2CB8 802CE308 46000186 */ mov.s $f6, $f0 -/* F2CBC 802CE30C C6000018 */ lwc1 $f0, 0x18($s0) -/* F2CC0 802CE310 46003003 */ div.s $f0, $f6, $f0 -/* F2CC4 802CE314 4600020D */ trunc.w.s $f8, $f0 -/* F2CC8 802CE318 44024000 */ mfc1 $v0, $f8 -/* F2CCC 802CE31C 080B38CE */ j .L802CE338 -/* F2CD0 802CE320 A602008E */ sh $v0, 0x8e($s0) -.L802CE324: -/* F2CD4 802CE324 44820000 */ mtc1 $v0, $f0 -/* F2CD8 802CE328 00000000 */ nop -/* F2CDC 802CE32C 46800020 */ cvt.s.w $f0, $f0 -/* F2CE0 802CE330 46003003 */ div.s $f0, $f6, $f0 -/* F2CE4 802CE334 E6000018 */ swc1 $f0, 0x18($s0) -.L802CE338: -/* F2CE8 802CE338 8602008E */ lh $v0, 0x8e($s0) -/* F2CEC 802CE33C 14400004 */ bnez $v0, .L802CE350 -/* F2CF0 802CE340 24020001 */ addiu $v0, $zero, 1 -/* F2CF4 802CE344 24020001 */ addiu $v0, $zero, 1 -/* F2CF8 802CE348 A602008E */ sh $v0, 0x8e($s0) -/* F2CFC 802CE34C 24020001 */ addiu $v0, $zero, 1 -.L802CE350: -/* F2D00 802CE350 AE420070 */ sw $v0, 0x70($s2) -.L802CE354: -/* F2D04 802CE354 8E500074 */ lw $s0, 0x74($s2) -/* F2D08 802CE358 C60C0038 */ lwc1 $f12, 0x38($s0) -/* F2D0C 802CE35C C60E0040 */ lwc1 $f14, 0x40($s0) -/* F2D10 802CE360 8E060060 */ lw $a2, 0x60($s0) -/* F2D14 802CE364 0C00A720 */ jal atan2 -/* F2D18 802CE368 8E070068 */ lw $a3, 0x68($s0) -/* F2D1C 802CE36C 8E050018 */ lw $a1, 0x18($s0) -/* F2D20 802CE370 44060000 */ mfc1 $a2, $f0 -/* F2D24 802CE374 0200202D */ daddu $a0, $s0, $zero -/* F2D28 802CE378 0C00EA95 */ jal npc_move_heading -/* F2D2C 802CE37C AE06000C */ sw $a2, 0xc($s0) -/* F2D30 802CE380 C6000018 */ lwc1 $f0, 0x18($s0) -/* F2D34 802CE384 3C014010 */ lui $at, 0x4010 -/* F2D38 802CE388 44811800 */ mtc1 $at, $f3 -/* F2D3C 802CE38C 44801000 */ mtc1 $zero, $f2 -/* F2D40 802CE390 46000021 */ cvt.d.s $f0, $f0 -/* F2D44 802CE394 4622003C */ c.lt.d $f0, $f2 -/* F2D48 802CE398 00000000 */ nop -/* F2D4C 802CE39C 45000003 */ bc1f .L802CE3AC -/* F2D50 802CE3A0 0200202D */ daddu $a0, $s0, $zero -/* F2D54 802CE3A4 080B38EC */ j .L802CE3B0 -/* F2D58 802CE3A8 0000282D */ daddu $a1, $zero, $zero -.L802CE3AC: -/* F2D5C 802CE3AC 24050001 */ addiu $a1, $zero, 1 -.L802CE3B0: -/* F2D60 802CE3B0 0C00F598 */ jal func_8003D660 -/* F2D64 802CE3B4 00000000 */ nop -/* F2D68 802CE3B8 C60C0038 */ lwc1 $f12, 0x38($s0) -/* F2D6C 802CE3BC C60E0040 */ lwc1 $f14, 0x40($s0) -/* F2D70 802CE3C0 8E060060 */ lw $a2, 0x60($s0) -/* F2D74 802CE3C4 0C00A7B5 */ jal dist2D -/* F2D78 802CE3C8 8E070068 */ lw $a3, 0x68($s0) -/* F2D7C 802CE3CC 46000186 */ mov.s $f6, $f0 -/* F2D80 802CE3D0 C6040018 */ lwc1 $f4, 0x18($s0) -/* F2D84 802CE3D4 3C013FF0 */ lui $at, 0x3ff0 -/* F2D88 802CE3D8 44811800 */ mtc1 $at, $f3 -/* F2D8C 802CE3DC 44801000 */ mtc1 $zero, $f2 -/* F2D90 802CE3E0 46002021 */ cvt.d.s $f0, $f4 -/* F2D94 802CE3E4 4622003C */ c.lt.d $f0, $f2 -/* F2D98 802CE3E8 00000000 */ nop -/* F2D9C 802CE3EC 45000004 */ bc1f .L802CE400 -/* F2DA0 802CE3F0 00000000 */ nop -/* F2DA4 802CE3F4 3C013F80 */ lui $at, 0x3f80 -/* F2DA8 802CE3F8 44812000 */ mtc1 $at, $f4 -/* F2DAC 802CE3FC 00000000 */ nop -.L802CE400: -/* F2DB0 802CE400 4604303E */ c.le.s $f6, $f4 -/* F2DB4 802CE404 00000000 */ nop -/* F2DB8 802CE408 45010002 */ bc1t .L802CE414 -/* F2DBC 802CE40C 24020001 */ addiu $v0, $zero, 1 -/* F2DC0 802CE410 0000102D */ daddu $v0, $zero, $zero -.L802CE414: -/* F2DC4 802CE414 8FBF001C */ lw $ra, 0x1c($sp) -/* F2DC8 802CE418 8FB20018 */ lw $s2, 0x18($sp) -/* F2DCC 802CE41C 8FB10014 */ lw $s1, 0x14($sp) -/* F2DD0 802CE420 8FB00010 */ lw $s0, 0x10($sp) -/* F2DD4 802CE424 D7B60028 */ ldc1 $f22, 0x28($sp) -/* F2DD8 802CE428 D7B40020 */ ldc1 $f20, 0x20($sp) -/* F2DDC 802CE42C 03E00008 */ jr $ra -/* F2DE0 802CE430 27BD0030 */ addiu $sp, $sp, 0x30 diff --git a/ver/us/asm/nonmatchings/evt/npc_api/PutPartnerAway.s b/ver/us/asm/nonmatchings/evt/npc_api/PutPartnerAway.s deleted file mode 100644 index 2b4ad916bd..0000000000 --- a/ver/us/asm/nonmatchings/evt/npc_api/PutPartnerAway.s +++ /dev/null @@ -1,197 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel PutPartnerAway -/* F4338 802CF988 27BDFFB0 */ addiu $sp, $sp, -0x50 -/* F433C 802CF98C AFB00010 */ sw $s0, 0x10($sp) -/* F4340 802CF990 00A0802D */ daddu $s0, $a1, $zero -/* F4344 802CF994 AFBF0018 */ sw $ra, 0x18($sp) -/* F4348 802CF998 AFB10014 */ sw $s1, 0x14($sp) -/* F434C 802CF99C F7BE0048 */ sdc1 $f30, 0x48($sp) -/* F4350 802CF9A0 F7BC0040 */ sdc1 $f28, 0x40($sp) -/* F4354 802CF9A4 F7BA0038 */ sdc1 $f26, 0x38($sp) -/* F4358 802CF9A8 F7B80030 */ sdc1 $f24, 0x30($sp) -/* F435C 802CF9AC F7B60028 */ sdc1 $f22, 0x28($sp) -/* F4360 802CF9B0 F7B40020 */ sdc1 $f20, 0x20($sp) -/* F4364 802CF9B4 0C00EABB */ jal get_npc_unsafe -/* F4368 802CF9B8 2404FFFC */ addiu $a0, $zero, -4 -/* F436C 802CF9BC 3C048011 */ lui $a0, %hi(gPlayerStatus) -/* F4370 802CF9C0 2484EFC8 */ addiu $a0, $a0, %lo(gPlayerStatus) -/* F4374 802CF9C4 1200005F */ beqz $s0, .L802CFB44 -/* F4378 802CF9C8 0040882D */ daddu $s1, $v0, $zero -/* F437C 802CF9CC 3C10802E */ lui $s0, %hi(D_802DAE40) -/* F4380 802CF9D0 2610AE40 */ addiu $s0, $s0, %lo(D_802DAE40) -/* F4384 802CF9D4 8E020000 */ lw $v0, ($s0) -/* F4388 802CF9D8 1040009A */ beqz $v0, .L802CFC44 -/* F438C 802CF9DC 2403FDFF */ addiu $v1, $zero, -0x201 -/* F4390 802CF9E0 8E220000 */ lw $v0, ($s1) -/* F4394 802CF9E4 C63A0038 */ lwc1 $f26, 0x38($s1) -/* F4398 802CF9E8 C63C003C */ lwc1 $f28, 0x3c($s1) -/* F439C 802CF9EC C6380040 */ lwc1 $f24, 0x40($s1) -/* F43A0 802CF9F0 00431024 */ and $v0, $v0, $v1 -/* F43A4 802CF9F4 2403FFF7 */ addiu $v1, $zero, -9 -/* F43A8 802CF9F8 00431024 */ and $v0, $v0, $v1 -/* F43AC 802CF9FC AE220000 */ sw $v0, ($s1) -/* F43B0 802CFA00 C4960028 */ lwc1 $f22, 0x28($a0) -/* F43B4 802CFA04 E6360060 */ swc1 $f22, 0x60($s1) -/* F43B8 802CFA08 948200B0 */ lhu $v0, 0xb0($a0) -/* F43BC 802CFA0C C482002C */ lwc1 $f2, 0x2c($a0) -/* F43C0 802CFA10 4406B000 */ mfc1 $a2, $f22 -/* F43C4 802CFA14 00021400 */ sll $v0, $v0, 0x10 -/* F43C8 802CFA18 00021C03 */ sra $v1, $v0, 0x10 -/* F43CC 802CFA1C 000217C2 */ srl $v0, $v0, 0x1f -/* F43D0 802CFA20 00621821 */ addu $v1, $v1, $v0 -/* F43D4 802CFA24 00031843 */ sra $v1, $v1, 1 -/* F43D8 802CFA28 44830000 */ mtc1 $v1, $f0 -/* F43DC 802CFA2C 00000000 */ nop -/* F43E0 802CFA30 46800020 */ cvt.s.w $f0, $f0 -/* F43E4 802CFA34 46001780 */ add.s $f30, $f2, $f0 -/* F43E8 802CFA38 3C014080 */ lui $at, 0x4080 -/* F43EC 802CFA3C 44810000 */ mtc1 $at, $f0 -/* F43F0 802CFA40 4600D306 */ mov.s $f12, $f26 -/* F43F4 802CFA44 E63E0064 */ swc1 $f30, 0x64($s1) -/* F43F8 802CFA48 C4940030 */ lwc1 $f20, 0x30($a0) -/* F43FC 802CFA4C 3C014026 */ lui $at, 0x4026 -/* F4400 802CFA50 34216666 */ ori $at, $at, 0x6666 -/* F4404 802CFA54 44811000 */ mtc1 $at, $f2 -/* F4408 802CFA58 4407A000 */ mfc1 $a3, $f20 -/* F440C 802CFA5C 4600C386 */ mov.s $f14, $f24 -/* F4410 802CFA60 E6200018 */ swc1 $f0, 0x18($s1) -/* F4414 802CFA64 E6220014 */ swc1 $f2, 0x14($s1) -/* F4418 802CFA68 0C00A7B5 */ jal dist2D -/* F441C 802CFA6C E6340068 */ swc1 $f20, 0x68($s1) -/* F4420 802CFA70 4600D306 */ mov.s $f12, $f26 -/* F4424 802CFA74 4406B000 */ mfc1 $a2, $f22 -/* F4428 802CFA78 4407A000 */ mfc1 $a3, $f20 -/* F442C 802CFA7C 4600C386 */ mov.s $f14, $f24 -/* F4430 802CFA80 0C00A720 */ jal atan2 -/* F4434 802CFA84 E6200010 */ swc1 $f0, 0x10($s1) -/* F4438 802CFA88 C6220010 */ lwc1 $f2, 0x10($s1) -/* F443C 802CFA8C C6240018 */ lwc1 $f4, 0x18($s1) -/* F4440 802CFA90 E620000C */ swc1 $f0, 0xc($s1) -/* F4444 802CFA94 46041083 */ div.s $f2, $f2, $f4 -/* F4448 802CFA98 4600118D */ trunc.w.s $f6, $f2 -/* F444C 802CFA9C 44023000 */ mfc1 $v0, $f6 -/* F4450 802CFAA0 00000000 */ nop -/* F4454 802CFAA4 A622008E */ sh $v0, 0x8e($s1) -/* F4458 802CFAA8 00021400 */ sll $v0, $v0, 0x10 -/* F445C 802CFAAC 00021403 */ sra $v0, $v0, 0x10 -/* F4460 802CFAB0 2842000A */ slti $v0, $v0, 0xa -/* F4464 802CFAB4 10400007 */ beqz $v0, .L802CFAD4 -/* F4468 802CFAB8 2402000A */ addiu $v0, $zero, 0xa -/* F446C 802CFABC 3C014120 */ lui $at, 0x4120 -/* F4470 802CFAC0 44810000 */ mtc1 $at, $f0 -/* F4474 802CFAC4 C6220010 */ lwc1 $f2, 0x10($s1) -/* F4478 802CFAC8 A622008E */ sh $v0, 0x8e($s1) -/* F447C 802CFACC 46001083 */ div.s $f2, $f2, $f0 -/* F4480 802CFAD0 E6220018 */ swc1 $f2, 0x18($s1) -.L802CFAD4: -/* F4484 802CFAD4 8622008E */ lh $v0, 0x8e($s1) -/* F4488 802CFAD8 C6200014 */ lwc1 $f0, 0x14($s1) -/* F448C 802CFADC 44822000 */ mtc1 $v0, $f4 -/* F4490 802CFAE0 00000000 */ nop -/* F4494 802CFAE4 46802120 */ cvt.s.w $f4, $f4 -/* F4498 802CFAE8 46040002 */ mul.s $f0, $f0, $f4 -/* F449C 802CFAEC 00000000 */ nop -/* F44A0 802CFAF0 46040002 */ mul.s $f0, $f0, $f4 -/* F44A4 802CFAF4 00000000 */ nop -/* F44A8 802CFAF8 3C013F00 */ lui $at, 0x3f00 -/* F44AC 802CFAFC 44811000 */ mtc1 $at, $f2 -/* F44B0 802CFB00 00000000 */ nop -/* F44B4 802CFB04 46020002 */ mul.s $f0, $f0, $f2 -/* F44B8 802CFB08 00000000 */ nop -/* F44BC 802CFB0C 8E030000 */ lw $v1, ($s0) -/* F44C0 802CFB10 461CF701 */ sub.s $f28, $f30, $f28 -/* F44C4 802CFB14 000310C0 */ sll $v0, $v1, 3 -/* F44C8 802CFB18 4600E000 */ add.s $f0, $f28, $f0 -/* F44CC 802CFB1C 00431021 */ addu $v0, $v0, $v1 -/* F44D0 802CFB20 00021080 */ sll $v0, $v0, 2 -/* F44D4 802CFB24 46040003 */ div.s $f0, $f0, $f4 -/* F44D8 802CFB28 E620001C */ swc1 $f0, 0x1c($s1) -/* F44DC 802CFB2C 3C038010 */ lui $v1, %hi(gPartnerAnimations+0x4) -/* F44E0 802CFB30 00621821 */ addu $v1, $v1, $v0 -/* F44E4 802CFB34 8C63834C */ lw $v1, %lo(gPartnerAnimations+0x4)($v1) -/* F44E8 802CFB38 0000102D */ daddu $v0, $zero, $zero -/* F44EC 802CFB3C 080B3F12 */ j .L802CFC48 -/* F44F0 802CFB40 AE230028 */ sw $v1, 0x28($s1) -.L802CFB44: -/* F44F4 802CFB44 C620001C */ lwc1 $f0, 0x1c($s1) -/* F44F8 802CFB48 C6220014 */ lwc1 $f2, 0x14($s1) -/* F44FC 802CFB4C 46020001 */ sub.s $f0, $f0, $f2 -/* F4500 802CFB50 C622003C */ lwc1 $f2, 0x3c($s1) -/* F4504 802CFB54 46001080 */ add.s $f2, $f2, $f0 -/* F4508 802CFB58 4480A000 */ mtc1 $zero, $f20 -/* F450C 802CFB5C 00000000 */ nop -/* F4510 802CFB60 4614003E */ c.le.s $f0, $f20 -/* F4514 802CFB64 E620001C */ swc1 $f0, 0x1c($s1) -/* F4518 802CFB68 4500000A */ bc1f .L802CFB94 -/* F451C 802CFB6C E622003C */ swc1 $f2, 0x3c($s1) -/* F4520 802CFB70 3C02802E */ lui $v0, %hi(D_802DAE40) -/* F4524 802CFB74 8C42AE40 */ lw $v0, %lo(D_802DAE40)($v0) -/* F4528 802CFB78 000218C0 */ sll $v1, $v0, 3 -/* F452C 802CFB7C 00621821 */ addu $v1, $v1, $v0 -/* F4530 802CFB80 00031880 */ sll $v1, $v1, 2 -/* F4534 802CFB84 3C028010 */ lui $v0, %hi(gPartnerAnimations+0x8) -/* F4538 802CFB88 00431021 */ addu $v0, $v0, $v1 -/* F453C 802CFB8C 8C428350 */ lw $v0, %lo(gPartnerAnimations+0x8)($v0) -/* F4540 802CFB90 AE220028 */ sw $v0, 0x28($s1) -.L802CFB94: -/* F4544 802CFB94 8E26000C */ lw $a2, 0xc($s1) -/* F4548 802CFB98 8E250018 */ lw $a1, 0x18($s1) -/* F454C 802CFB9C 0C00EA95 */ jal npc_move_heading -/* F4550 802CFBA0 0220202D */ daddu $a0, $s1, $zero -/* F4554 802CFBA4 8622008E */ lh $v0, 0x8e($s1) -/* F4558 802CFBA8 3C014120 */ lui $at, 0x4120 -/* F455C 802CFBAC 44811000 */ mtc1 $at, $f2 -/* F4560 802CFBB0 44820000 */ mtc1 $v0, $f0 -/* F4564 802CFBB4 00000000 */ nop -/* F4568 802CFBB8 46800020 */ cvt.s.w $f0, $f0 -/* F456C 802CFBBC 4600103C */ c.lt.s $f2, $f0 -/* F4570 802CFBC0 00000000 */ nop -/* F4574 802CFBC4 45030001 */ bc1tl .L802CFBCC -/* F4578 802CFBC8 46001006 */ mov.s $f0, $f2 -.L802CFBCC: -/* F457C 802CFBCC 9622008E */ lhu $v0, 0x8e($s1) -/* F4580 802CFBD0 46020003 */ div.s $f0, $f0, $f2 -/* F4584 802CFBD4 E6200054 */ swc1 $f0, 0x54($s1) -/* F4588 802CFBD8 46000086 */ mov.s $f2, $f0 -/* F458C 802CFBDC E6200058 */ swc1 $f0, 0x58($s1) -/* F4590 802CFBE0 E622005C */ swc1 $f2, 0x5c($s1) -/* F4594 802CFBE4 2442FFFF */ addiu $v0, $v0, -1 -/* F4598 802CFBE8 A622008E */ sh $v0, 0x8e($s1) -/* F459C 802CFBEC 00021400 */ sll $v0, $v0, 0x10 -/* F45A0 802CFBF0 04410015 */ bgez $v0, .L802CFC48 -/* F45A4 802CFBF4 0000102D */ daddu $v0, $zero, $zero -/* F45A8 802CFBF8 3C03802E */ lui $v1, %hi(D_802DAE40) -/* F45AC 802CFBFC 8C63AE40 */ lw $v1, %lo(D_802DAE40)($v1) -/* F45B0 802CFC00 3C04802E */ lui $a0, %hi(D_802DAE44) -/* F45B4 802CFC04 8C84AE44 */ lw $a0, %lo(D_802DAE44)($a0) -/* F45B8 802CFC08 C6200064 */ lwc1 $f0, 0x64($s1) -/* F45BC 802CFC0C 000310C0 */ sll $v0, $v1, 3 -/* F45C0 802CFC10 00431021 */ addu $v0, $v0, $v1 -/* F45C4 802CFC14 00021080 */ sll $v0, $v0, 2 -/* F45C8 802CFC18 3C018010 */ lui $at, %hi(gPartnerAnimations+0xC) -/* F45CC 802CFC1C 00220821 */ addu $at, $at, $v0 -/* F45D0 802CFC20 8C228354 */ lw $v0, %lo(gPartnerAnimations+0xC)($at) -/* F45D4 802CFC24 E634001C */ swc1 $f20, 0x1c($s1) -/* F45D8 802CFC28 E620003C */ swc1 $f0, 0x3c($s1) -/* F45DC 802CFC2C 0C00E228 */ jal npc_free_by_index -/* F45E0 802CFC30 AE220028 */ sw $v0, 0x28($s1) -/* F45E4 802CFC34 0C00EABB */ jal get_npc_unsafe -/* F45E8 802CFC38 2404FFFB */ addiu $a0, $zero, -5 -/* F45EC 802CFC3C 2403FFFC */ addiu $v1, $zero, -4 -/* F45F0 802CFC40 A04300A4 */ sb $v1, 0xa4($v0) -.L802CFC44: -/* F45F4 802CFC44 24020002 */ addiu $v0, $zero, 2 -.L802CFC48: -/* F45F8 802CFC48 8FBF0018 */ lw $ra, 0x18($sp) -/* F45FC 802CFC4C 8FB10014 */ lw $s1, 0x14($sp) -/* F4600 802CFC50 8FB00010 */ lw $s0, 0x10($sp) -/* F4604 802CFC54 D7BE0048 */ ldc1 $f30, 0x48($sp) -/* F4608 802CFC58 D7BC0040 */ ldc1 $f28, 0x40($sp) -/* F460C 802CFC5C D7BA0038 */ ldc1 $f26, 0x38($sp) -/* F4610 802CFC60 D7B80030 */ ldc1 $f24, 0x30($sp) -/* F4614 802CFC64 D7B60028 */ ldc1 $f22, 0x28($sp) -/* F4618 802CFC68 D7B40020 */ ldc1 $f20, 0x20($sp) -/* F461C 802CFC6C 03E00008 */ jr $ra -/* F4620 802CFC70 27BD0050 */ addiu $sp, $sp, 0x50 diff --git a/ver/us/asm/nonmatchings/evt/npc_api/_npc_jump_to.s b/ver/us/asm/nonmatchings/evt/npc_api/_npc_jump_to.s deleted file mode 100644 index 92e6f1052c..0000000000 --- a/ver/us/asm/nonmatchings/evt/npc_api/_npc_jump_to.s +++ /dev/null @@ -1,176 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel _npc_jump_to -/* F2DE4 802CE434 27BDFFC0 */ addiu $sp, $sp, -0x40 -/* F2DE8 802CE438 AFB20018 */ sw $s2, 0x18($sp) -/* F2DEC 802CE43C 0080902D */ daddu $s2, $a0, $zero -/* F2DF0 802CE440 AFB40020 */ sw $s4, 0x20($sp) -/* F2DF4 802CE444 00C0A02D */ daddu $s4, $a2, $zero -/* F2DF8 802CE448 AFB3001C */ sw $s3, 0x1c($sp) -/* F2DFC 802CE44C AFBF0024 */ sw $ra, 0x24($sp) -/* F2E00 802CE450 AFB10014 */ sw $s1, 0x14($sp) -/* F2E04 802CE454 AFB00010 */ sw $s0, 0x10($sp) -/* F2E08 802CE458 F7B80038 */ sdc1 $f24, 0x38($sp) -/* F2E0C 802CE45C F7B60030 */ sdc1 $f22, 0x30($sp) -/* F2E10 802CE460 F7B40028 */ sdc1 $f20, 0x28($sp) -/* F2E14 802CE464 8E51000C */ lw $s1, 0xc($s2) -/* F2E18 802CE468 10A00002 */ beqz $a1, .L802CE474 -/* F2E1C 802CE46C 26530078 */ addiu $s3, $s2, 0x78 -/* F2E20 802CE470 AE400070 */ sw $zero, 0x70($s2) -.L802CE474: -/* F2E24 802CE474 8E420070 */ lw $v0, 0x70($s2) -/* F2E28 802CE478 14400065 */ bnez $v0, .L802CE610 -/* F2E2C 802CE47C 00000000 */ nop -/* F2E30 802CE480 8E250000 */ lw $a1, ($s1) -/* F2E34 802CE484 26310004 */ addiu $s1, $s1, 4 -/* F2E38 802CE488 0C0B1EAF */ jal get_variable -/* F2E3C 802CE48C 0240202D */ daddu $a0, $s2, $zero -/* F2E40 802CE490 8E250000 */ lw $a1, ($s1) -/* F2E44 802CE494 26310004 */ addiu $s1, $s1, 4 -/* F2E48 802CE498 0240202D */ daddu $a0, $s2, $zero -/* F2E4C 802CE49C 0C0B1EAF */ jal get_variable -/* F2E50 802CE4A0 0040802D */ daddu $s0, $v0, $zero -/* F2E54 802CE4A4 8E250000 */ lw $a1, ($s1) -/* F2E58 802CE4A8 26310004 */ addiu $s1, $s1, 4 -/* F2E5C 802CE4AC 4482C000 */ mtc1 $v0, $f24 -/* F2E60 802CE4B0 00000000 */ nop -/* F2E64 802CE4B4 4680C620 */ cvt.s.w $f24, $f24 -/* F2E68 802CE4B8 0C0B1EAF */ jal get_variable -/* F2E6C 802CE4BC 0240202D */ daddu $a0, $s2, $zero -/* F2E70 802CE4C0 4482B000 */ mtc1 $v0, $f22 -/* F2E74 802CE4C4 00000000 */ nop -/* F2E78 802CE4C8 4680B5A0 */ cvt.s.w $f22, $f22 -/* F2E7C 802CE4CC 8E250000 */ lw $a1, ($s1) -/* F2E80 802CE4D0 26310004 */ addiu $s1, $s1, 4 -/* F2E84 802CE4D4 0C0B1EAF */ jal get_variable -/* F2E88 802CE4D8 0240202D */ daddu $a0, $s2, $zero -/* F2E8C 802CE4DC 8E250000 */ lw $a1, ($s1) -/* F2E90 802CE4E0 4482A000 */ mtc1 $v0, $f20 -/* F2E94 802CE4E4 00000000 */ nop -/* F2E98 802CE4E8 4680A520 */ cvt.s.w $f20, $f20 -/* F2E9C 802CE4EC 0C0B1EAF */ jal get_variable -/* F2EA0 802CE4F0 0240202D */ daddu $a0, $s2, $zero -/* F2EA4 802CE4F4 0240202D */ daddu $a0, $s2, $zero -/* F2EA8 802CE4F8 0200282D */ daddu $a1, $s0, $zero -/* F2EAC 802CE4FC 0C0B36B0 */ jal resolve_npc -/* F2EB0 802CE500 0040882D */ daddu $s1, $v0, $zero -/* F2EB4 802CE504 0040802D */ daddu $s0, $v0, $zero -/* F2EB8 802CE508 56000003 */ bnel $s0, $zero, .L802CE518 -/* F2EBC 802CE50C AE500074 */ sw $s0, 0x74($s2) -/* F2EC0 802CE510 080B39A6 */ j .L802CE698 -/* F2EC4 802CE514 24020002 */ addiu $v0, $zero, 2 -.L802CE518: -/* F2EC8 802CE518 C60C0038 */ lwc1 $f12, 0x38($s0) -/* F2ECC 802CE51C C60E0040 */ lwc1 $f14, 0x40($s0) -/* F2ED0 802CE520 E6180060 */ swc1 $f24, 0x60($s0) -/* F2ED4 802CE524 4406C000 */ mfc1 $a2, $f24 -/* F2ED8 802CE528 E6140068 */ swc1 $f20, 0x68($s0) -/* F2EDC 802CE52C 4407A000 */ mfc1 $a3, $f20 -/* F2EE0 802CE530 E6160064 */ swc1 $f22, 0x64($s0) -/* F2EE4 802CE534 0C00A7B5 */ jal dist2D -/* F2EE8 802CE538 A611008E */ sh $s1, 0x8e($s0) -/* F2EEC 802CE53C 46000506 */ mov.s $f20, $f0 -/* F2EF0 802CE540 3C014000 */ lui $at, 0x4000 -/* F2EF4 802CE544 44811800 */ mtc1 $at, $f3 -/* F2EF8 802CE548 44801000 */ mtc1 $zero, $f2 -/* F2EFC 802CE54C 4600A021 */ cvt.d.s $f0, $f20 -/* F2F00 802CE550 4620103C */ c.lt.d $f2, $f0 -/* F2F04 802CE554 00000000 */ nop -/* F2F08 802CE558 45000009 */ bc1f .L802CE580 -/* F2F0C 802CE55C AE400078 */ sw $zero, 0x78($s2) -/* F2F10 802CE560 C60C0038 */ lwc1 $f12, 0x38($s0) -/* F2F14 802CE564 C60E0040 */ lwc1 $f14, 0x40($s0) -/* F2F18 802CE568 8E060060 */ lw $a2, 0x60($s0) -/* F2F1C 802CE56C 0C00A720 */ jal atan2 -/* F2F20 802CE570 8E070068 */ lw $a3, 0x68($s0) -/* F2F24 802CE574 16800002 */ bnez $s4, .L802CE580 -/* F2F28 802CE578 E6400078 */ swc1 $f0, 0x78($s2) -/* F2F2C 802CE57C E600000C */ swc1 $f0, 0xc($s0) -.L802CE580: -/* F2F30 802CE580 C6020064 */ lwc1 $f2, 0x64($s0) -/* F2F34 802CE584 C600003C */ lwc1 $f0, 0x3c($s0) -/* F2F38 802CE588 8602008E */ lh $v0, 0x8e($s0) -/* F2F3C 802CE58C 14400007 */ bnez $v0, .L802CE5AC -/* F2F40 802CE590 46001581 */ sub.s $f22, $f2, $f0 -/* F2F44 802CE594 C6000018 */ lwc1 $f0, 0x18($s0) -/* F2F48 802CE598 4600A003 */ div.s $f0, $f20, $f0 -/* F2F4C 802CE59C 4600018D */ trunc.w.s $f6, $f0 -/* F2F50 802CE5A0 44023000 */ mfc1 $v0, $f6 -/* F2F54 802CE5A4 080B3970 */ j .L802CE5C0 -/* F2F58 802CE5A8 A602008E */ sh $v0, 0x8e($s0) -.L802CE5AC: -/* F2F5C 802CE5AC 44820000 */ mtc1 $v0, $f0 -/* F2F60 802CE5B0 00000000 */ nop -/* F2F64 802CE5B4 46800020 */ cvt.s.w $f0, $f0 -/* F2F68 802CE5B8 4600A003 */ div.s $f0, $f20, $f0 -/* F2F6C 802CE5BC E6000018 */ swc1 $f0, 0x18($s0) -.L802CE5C0: -/* F2F70 802CE5C0 8602008E */ lh $v0, 0x8e($s0) -/* F2F74 802CE5C4 C6000014 */ lwc1 $f0, 0x14($s0) -/* F2F78 802CE5C8 44822000 */ mtc1 $v0, $f4 -/* F2F7C 802CE5CC 00000000 */ nop -/* F2F80 802CE5D0 46802120 */ cvt.s.w $f4, $f4 -/* F2F84 802CE5D4 46040002 */ mul.s $f0, $f0, $f4 -/* F2F88 802CE5D8 00000000 */ nop -/* F2F8C 802CE5DC 3C013F00 */ lui $at, 0x3f00 -/* F2F90 802CE5E0 44811000 */ mtc1 $at, $f2 -/* F2F94 802CE5E4 00000000 */ nop -/* F2F98 802CE5E8 46020002 */ mul.s $f0, $f0, $f2 -/* F2F9C 802CE5EC 00000000 */ nop -/* F2FA0 802CE5F0 8E020000 */ lw $v0, ($s0) -/* F2FA4 802CE5F4 4604B103 */ div.s $f4, $f22, $f4 -/* F2FA8 802CE5F8 34420800 */ ori $v0, $v0, 0x800 -/* F2FAC 802CE5FC 46040000 */ add.s $f0, $f0, $f4 -/* F2FB0 802CE600 AE020000 */ sw $v0, ($s0) -/* F2FB4 802CE604 24020001 */ addiu $v0, $zero, 1 -/* F2FB8 802CE608 E600001C */ swc1 $f0, 0x1c($s0) -/* F2FBC 802CE60C AE420070 */ sw $v0, 0x70($s2) -.L802CE610: -/* F2FC0 802CE610 8E500074 */ lw $s0, 0x74($s2) -/* F2FC4 802CE614 8E660000 */ lw $a2, ($s3) -/* F2FC8 802CE618 8E050018 */ lw $a1, 0x18($s0) -/* F2FCC 802CE61C 0C00EA95 */ jal npc_move_heading -/* F2FD0 802CE620 0200202D */ daddu $a0, $s0, $zero -/* F2FD4 802CE624 C604003C */ lwc1 $f4, 0x3c($s0) -/* F2FD8 802CE628 C600001C */ lwc1 $f0, 0x1c($s0) -/* F2FDC 802CE62C 9602008E */ lhu $v0, 0x8e($s0) -/* F2FE0 802CE630 46002100 */ add.s $f4, $f4, $f0 -/* F2FE4 802CE634 C6020014 */ lwc1 $f2, 0x14($s0) -/* F2FE8 802CE638 2442FFFF */ addiu $v0, $v0, -1 -/* F2FEC 802CE63C 46020001 */ sub.s $f0, $f0, $f2 -/* F2FF0 802CE640 A602008E */ sh $v0, 0x8e($s0) -/* F2FF4 802CE644 00021400 */ sll $v0, $v0, 0x10 -/* F2FF8 802CE648 E604003C */ swc1 $f4, 0x3c($s0) -/* F2FFC 802CE64C 04400003 */ bltz $v0, .L802CE65C -/* F3000 802CE650 E600001C */ swc1 $f0, 0x1c($s0) -/* F3004 802CE654 080B39A6 */ j .L802CE698 -/* F3008 802CE658 0000102D */ daddu $v0, $zero, $zero -.L802CE65C: -/* F300C 802CE65C 0200202D */ daddu $a0, $s0, $zero -/* F3010 802CE660 24050002 */ addiu $a1, $zero, 2 -/* F3014 802CE664 C4800060 */ lwc1 $f0, 0x60($a0) -/* F3018 802CE668 C4820064 */ lwc1 $f2, 0x64($a0) -/* F301C 802CE66C C4840068 */ lwc1 $f4, 0x68($a0) -/* F3020 802CE670 8C820000 */ lw $v0, ($a0) -/* F3024 802CE674 2403F7FF */ addiu $v1, $zero, -0x801 -/* F3028 802CE678 AC80001C */ sw $zero, 0x1c($a0) -/* F302C 802CE67C 00431024 */ and $v0, $v0, $v1 -/* F3030 802CE680 E4800038 */ swc1 $f0, 0x38($a0) -/* F3034 802CE684 E482003C */ swc1 $f2, 0x3c($a0) -/* F3038 802CE688 E4840040 */ swc1 $f4, 0x40($a0) -/* F303C 802CE68C 0C00F598 */ jal func_8003D660 -/* F3040 802CE690 AC820000 */ sw $v0, ($a0) -/* F3044 802CE694 24020001 */ addiu $v0, $zero, 1 -.L802CE698: -/* F3048 802CE698 8FBF0024 */ lw $ra, 0x24($sp) -/* F304C 802CE69C 8FB40020 */ lw $s4, 0x20($sp) -/* F3050 802CE6A0 8FB3001C */ lw $s3, 0x1c($sp) -/* F3054 802CE6A4 8FB20018 */ lw $s2, 0x18($sp) -/* F3058 802CE6A8 8FB10014 */ lw $s1, 0x14($sp) -/* F305C 802CE6AC 8FB00010 */ lw $s0, 0x10($sp) -/* F3060 802CE6B0 D7B80038 */ ldc1 $f24, 0x38($sp) -/* F3064 802CE6B4 D7B60030 */ ldc1 $f22, 0x30($sp) -/* F3068 802CE6B8 D7B40028 */ ldc1 $f20, 0x28($sp) -/* F306C 802CE6BC 03E00008 */ jr $ra -/* F3070 802CE6C0 27BD0040 */ addiu $sp, $sp, 0x40 diff --git a/ver/us/asm/nonmatchings/evt/script_list/update_scripts.s b/ver/us/asm/nonmatchings/evt/script_list/update_scripts.s deleted file mode 100644 index c872cd651f..0000000000 --- a/ver/us/asm/nonmatchings/evt/script_list/update_scripts.s +++ /dev/null @@ -1,103 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel update_scripts -/* E8724 802C3D74 3C028007 */ lui $v0, %hi(gGameStatusPtr) -/* E8728 802C3D78 8C42419C */ lw $v0, %lo(gGameStatusPtr)($v0) -/* E872C 802C3D7C 27BDFFC8 */ addiu $sp, $sp, -0x38 -/* E8730 802C3D80 AFBF002C */ sw $ra, 0x2c($sp) -/* E8734 802C3D84 AFB60028 */ sw $s6, 0x28($sp) -/* E8738 802C3D88 AFB50024 */ sw $s5, 0x24($sp) -/* E873C 802C3D8C AFB40020 */ sw $s4, 0x20($sp) -/* E8740 802C3D90 AFB3001C */ sw $s3, 0x1c($sp) -/* E8744 802C3D94 AFB20018 */ sw $s2, 0x18($sp) -/* E8748 802C3D98 AFB10014 */ sw $s1, 0x14($sp) -/* E874C 802C3D9C AFB00010 */ sw $s0, 0x10($sp) -/* E8750 802C3DA0 F7B40030 */ sdc1 $f20, 0x30($sp) -/* E8754 802C3DA4 80420078 */ lb $v0, 0x78($v0) -/* E8758 802C3DA8 24030001 */ addiu $v1, $zero, 1 -/* E875C 802C3DAC 10430042 */ beq $v0, $v1, .L802C3EB8 -/* E8760 802C3DB0 00000000 */ nop -/* E8764 802C3DB4 3C01802E */ lui $at, %hi(gIsUpdatingScripts) -/* E8768 802C3DB8 AC239CA4 */ sw $v1, %lo(gIsUpdatingScripts)($at) -/* E876C 802C3DBC 0C0B0C00 */ jal sort_scripts -/* E8770 802C3DC0 0000902D */ daddu $s2, $zero, $zero -/* E8774 802C3DC4 3C02802E */ lui $v0, %hi(gScriptListCount) -/* E8778 802C3DC8 8C42AC98 */ lw $v0, %lo(gScriptListCount)($v0) -/* E877C 802C3DCC 18400038 */ blez $v0, .L802C3EB0 -/* E8780 802C3DD0 24160001 */ addiu $s6, $zero, 1 -/* E8784 802C3DD4 3C013FF0 */ lui $at, 0x3ff0 -/* E8788 802C3DD8 4481A800 */ mtc1 $at, $f21 -/* E878C 802C3DDC 4480A000 */ mtc1 $zero, $f20 -/* E8790 802C3DE0 2415FFFF */ addiu $s5, $zero, -1 -/* E8794 802C3DE4 3C14802E */ lui $s4, %hi(gScriptIdList) -/* E8798 802C3DE8 2694AA98 */ addiu $s4, $s4, %lo(gScriptIdList) -/* E879C 802C3DEC 3C13802E */ lui $s3, %hi(gScriptIndexList) -/* E87A0 802C3DF0 2673A898 */ addiu $s3, $s3, %lo(gScriptIndexList) -.L802C3DF4: -/* E87A4 802C3DF4 8E620000 */ lw $v0, ($s3) -/* E87A8 802C3DF8 3C03802E */ lui $v1, %hi(gCurrentScriptListPtr) -/* E87AC 802C3DFC 8C63A890 */ lw $v1, %lo(gCurrentScriptListPtr)($v1) -/* E87B0 802C3E00 00021080 */ sll $v0, $v0, 2 -/* E87B4 802C3E04 00431021 */ addu $v0, $v0, $v1 -/* E87B8 802C3E08 8C500000 */ lw $s0, ($v0) -/* E87BC 802C3E0C 52000022 */ beql $s0, $zero, .L802C3E98 -/* E87C0 802C3E10 26940004 */ addiu $s4, $s4, 4 -/* E87C4 802C3E14 8E030144 */ lw $v1, 0x144($s0) -/* E87C8 802C3E18 8E820000 */ lw $v0, ($s4) -/* E87CC 802C3E1C 5462001E */ bnel $v1, $v0, .L802C3E98 -/* E87D0 802C3E20 26940004 */ addiu $s4, $s4, 4 -/* E87D4 802C3E24 92020000 */ lbu $v0, ($s0) -/* E87D8 802C3E28 5040001B */ beql $v0, $zero, .L802C3E98 -/* E87DC 802C3E2C 26940004 */ addiu $s4, $s4, 4 -/* E87E0 802C3E30 30420092 */ andi $v0, $v0, 0x92 -/* E87E4 802C3E34 54400018 */ bnel $v0, $zero, .L802C3E98 -/* E87E8 802C3E38 26940004 */ addiu $s4, $s4, 4 -/* E87EC 802C3E3C C6020154 */ lwc1 $f2, 0x154($s0) -/* E87F0 802C3E40 C6000150 */ lwc1 $f0, 0x150($s0) -/* E87F4 802C3E44 46001080 */ add.s $f2, $f2, $f0 -/* E87F8 802C3E48 0000882D */ daddu $s1, $zero, $zero -/* E87FC 802C3E4C E6020154 */ swc1 $f2, 0x154($s0) -.L802C3E50: -/* E8800 802C3E50 C6000154 */ lwc1 $f0, 0x154($s0) -/* E8804 802C3E54 46000021 */ cvt.d.s $f0, $f0 -/* E8808 802C3E58 4634003C */ c.lt.d $f0, $f20 -/* E880C 802C3E5C 00000000 */ nop -/* E8810 802C3E60 4501000B */ bc1t .L802C3E90 -/* E8814 802C3E64 0200202D */ daddu $a0, $s0, $zero -/* E8818 802C3E68 46340001 */ sub.d $f0, $f0, $f20 -/* E881C 802C3E6C 46200020 */ cvt.s.d $f0, $f0 -/* E8820 802C3E70 0C0B1D01 */ jal si_execute_next_command -/* E8824 802C3E74 E6000154 */ swc1 $f0, 0x154($s0) -/* E8828 802C3E78 14560003 */ bne $v0, $s6, .L802C3E88 -/* E882C 802C3E7C 00000000 */ nop -/* E8830 802C3E80 080B0FA4 */ j .L802C3E90 -/* E8834 802C3E84 24110001 */ addiu $s1, $zero, 1 -.L802C3E88: -/* E8838 802C3E88 1455FFF1 */ bne $v0, $s5, .L802C3E50 -/* E883C 802C3E8C 00000000 */ nop -.L802C3E90: -/* E8840 802C3E90 16200007 */ bnez $s1, .L802C3EB0 -/* E8844 802C3E94 26940004 */ addiu $s4, $s4, 4 -.L802C3E98: -/* E8848 802C3E98 3C02802E */ lui $v0, %hi(gScriptListCount) -/* E884C 802C3E9C 8C42AC98 */ lw $v0, %lo(gScriptListCount)($v0) -/* E8850 802C3EA0 26520001 */ addiu $s2, $s2, 1 -/* E8854 802C3EA4 0242102A */ slt $v0, $s2, $v0 -/* E8858 802C3EA8 1440FFD2 */ bnez $v0, .L802C3DF4 -/* E885C 802C3EAC 26730004 */ addiu $s3, $s3, 4 -.L802C3EB0: -/* E8860 802C3EB0 3C01802E */ lui $at, %hi(gIsUpdatingScripts) -/* E8864 802C3EB4 AC209CA4 */ sw $zero, %lo(gIsUpdatingScripts)($at) -.L802C3EB8: -/* E8868 802C3EB8 8FBF002C */ lw $ra, 0x2c($sp) -/* E886C 802C3EBC 8FB60028 */ lw $s6, 0x28($sp) -/* E8870 802C3EC0 8FB50024 */ lw $s5, 0x24($sp) -/* E8874 802C3EC4 8FB40020 */ lw $s4, 0x20($sp) -/* E8878 802C3EC8 8FB3001C */ lw $s3, 0x1c($sp) -/* E887C 802C3ECC 8FB20018 */ lw $s2, 0x18($sp) -/* E8880 802C3ED0 8FB10014 */ lw $s1, 0x14($sp) -/* E8884 802C3ED4 8FB00010 */ lw $s0, 0x10($sp) -/* E8888 802C3ED8 D7B40030 */ ldc1 $f20, 0x30($sp) -/* E888C 802C3EDC 03E00008 */ jr $ra -/* E8890 802C3EE0 27BD0038 */ addiu $sp, $sp, 0x38 diff --git a/ver/us/asm/nonmatchings/evt/si/si_execute_next_command.s b/ver/us/asm/nonmatchings/evt/si/si_execute_next_command.s deleted file mode 100644 index 183d227db5..0000000000 --- a/ver/us/asm/nonmatchings/evt/si/si_execute_next_command.s +++ /dev/null @@ -1,541 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -.section .rodata - -glabel jtbl_802D9F20 -.word L802C743C_EBDEC, L802C7A54_EC404, L802C747C_EBE2C, L802C748C_EBE3C, L802C749C_EBE4C, L802C74AC_EBE5C, L802C74BC_EBE6C, L802C74CC_EBE7C, L802C74DC_EBE8C, L802C74EC_EBE9C, L802C74FC_EBEAC, L802C750C_EBEBC, L802C751C_EBECC, L802C752C_EBEDC, L802C753C_EBEEC, L802C754C_EBEFC, L802C755C_EBF0C, L802C756C_EBF1C, L802C757C_EBF2C, L802C758C_EBF3C, L802C759C_EBF4C, L802C75AC_EBF5C, L802C75BC_EBF6C, L802C75CC_EBF7C, L802C75DC_EBF8C, L802C75FC_EBFAC, L802C75EC_EBF9C, L802C760C_EBFBC, L802C761C_EBFCC, L802C763C_EBFEC, L802C765C_EC00C, L802C766C_EC01C, L802C764C_EBFFC, L802C767C_EC02C, L802C762C_EBFDC, L802C768C_EC03C, L802C769C_EC04C, L802C76AC_EC05C, L802C76BC_EC06C, L802C76CC_EC07C, L802C76DC_EC08C, L802C76EC_EC09C, L802C76FC_EC0AC, L802C770C_EC0BC, L802C771C_EC0CC, L802C772C_EC0DC, L802C773C_EC0EC, L802C774C_EC0FC, L802C775C_EC10C, L802C776C_EC11C, L802C777C_EC12C, L802C778C_EC13C, L802C779C_EC14C, L802C77AC_EC15C, L802C77BC_EC16C, L802C77CC_EC17C, L802C77DC_EC18C, L802C77EC_EC19C, L802C77FC_EC1AC, L802C780C_EC1BC, L802C781C_EC1CC, L802C782C_EC1DC, L802C783C_EC1EC, L802C785C_EC20C, L802C786C_EC21C, L802C787C_EC22C, L802C788C_EC23C, L802C789C_EC24C, L802C78AC_EC25C, L802C78BC_EC26C, L802C78CC_EC27C, L802C78DC_EC28C, L802C78EC_EC29C, L802C784C_EC1FC, L802C792C_EC2DC, L802C78FC_EC2AC, L802C790C_EC2BC, L802C791C_EC2CC, L802C793C_EC2EC, L802C794C_EC2FC, L802C795C_EC30C, L802C796C_EC31C, L802C797C_EC32C, L802C798C_EC33C, L802C799C_EC34C, L802C79AC_EC35C, L802C79BC_EC36C, L802C79CC_EC37C, L802C79DC_EC38C, L802C79EC_EC39C, L802C79FC_EC3AC, L802C7A0C_EC3BC, L802C7A1C_EC3CC, L802C7A2C_EC3DC, L802C7A3C_EC3EC, 0 - -.section .text - -glabel si_execute_next_command -/* EBDB4 802C7404 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* EBDB8 802C7408 AFB00010 */ sw $s0, 0x10($sp) -/* EBDBC 802C740C 0080802D */ daddu $s0, $a0, $zero -/* EBDC0 802C7410 AFBF0014 */ sw $ra, 0x14($sp) -.L802C7414: -/* EBDC4 802C7414 92030002 */ lbu $v1, 2($s0) -/* EBDC8 802C7418 2C62005F */ sltiu $v0, $v1, 0x5f -/* EBDCC 802C741C 1040018B */ beqz $v0, .L802C7A4C -/* EBDD0 802C7420 24050002 */ addiu $a1, $zero, 2 -/* EBDD4 802C7424 00A31004 */ sllv $v0, $v1, $a1 -/* EBDD8 802C7428 3C01802E */ lui $at, %hi(jtbl_802D9F20) -/* EBDDC 802C742C 00220821 */ addu $at, $at, $v0 -/* EBDE0 802C7430 8C229F20 */ lw $v0, %lo(jtbl_802D9F20)($at) -/* EBDE4 802C7434 00400008 */ jr $v0 -/* EBDE8 802C7438 00000000 */ nop -glabel L802C743C_EBDEC -/* EBDEC 802C743C 8E030008 */ lw $v1, 8($s0) -/* EBDF0 802C7440 24050003 */ addiu $a1, $zero, 3 -/* EBDF4 802C7444 0060102D */ daddu $v0, $v1, $zero -/* EBDF8 802C7448 AE020164 */ sw $v0, 0x164($s0) -/* EBDFC 802C744C 90620003 */ lbu $v0, 3($v1) -/* EBE00 802C7450 24630004 */ addiu $v1, $v1, 4 -/* EBE04 802C7454 A2020002 */ sb $v0, 2($s0) -/* EBE08 802C7458 8C640000 */ lw $a0, ($v1) -/* EBE0C 802C745C 24630004 */ addiu $v1, $v1, 4 -/* EBE10 802C7460 AE03000C */ sw $v1, 0xc($s0) -/* EBE14 802C7464 A2000005 */ sb $zero, 5($s0) -/* EBE18 802C7468 00041080 */ sll $v0, $a0, 2 -/* EBE1C 802C746C 00621821 */ addu $v1, $v1, $v0 -/* EBE20 802C7470 A2040001 */ sb $a0, 1($s0) -/* EBE24 802C7474 080B1E95 */ j L802C7A54_EC404 -/* EBE28 802C7478 AE030008 */ sw $v1, 8($s0) -glabel L802C747C_EBE2C -/* EBE2C 802C747C 0C0B1266 */ jal si_handle_return -/* EBE30 802C7480 0200202D */ daddu $a0, $s0, $zero -/* EBE34 802C7484 080B1E95 */ j L802C7A54_EC404 -/* EBE38 802C7488 0040282D */ daddu $a1, $v0, $zero -glabel L802C748C_EBE3C -/* EBE3C 802C748C 0C0B126E */ jal si_handle_label -/* EBE40 802C7490 0200202D */ daddu $a0, $s0, $zero -/* EBE44 802C7494 080B1E95 */ j L802C7A54_EC404 -/* EBE48 802C7498 0040282D */ daddu $a1, $v0, $zero -glabel L802C749C_EBE4C -/* EBE4C 802C749C 0C0B1270 */ jal si_handle_goto -/* EBE50 802C74A0 0200202D */ daddu $a0, $s0, $zero -/* EBE54 802C74A4 080B1E95 */ j L802C7A54_EC404 -/* EBE58 802C74A8 0040282D */ daddu $a1, $v0, $zero -glabel L802C74AC_EBE5C -/* EBE5C 802C74AC 0C0B1280 */ jal si_handle_loop -/* EBE60 802C74B0 0200202D */ daddu $a0, $s0, $zero -/* EBE64 802C74B4 080B1E95 */ j L802C7A54_EC404 -/* EBE68 802C74B8 0040282D */ daddu $a1, $v0, $zero -glabel L802C74BC_EBE6C -/* EBE6C 802C74BC 0C0B1292 */ jal si_handle_end_loop -/* EBE70 802C74C0 0200202D */ daddu $a0, $s0, $zero -/* EBE74 802C74C4 080B1E95 */ j L802C7A54_EC404 -/* EBE78 802C74C8 0040282D */ daddu $a1, $v0, $zero -glabel L802C74CC_EBE7C -/* EBE7C 802C74CC 0C0B12C3 */ jal si_handle_break_loop -/* EBE80 802C74D0 0200202D */ daddu $a0, $s0, $zero -/* EBE84 802C74D4 080B1E95 */ j L802C7A54_EC404 -/* EBE88 802C74D8 0040282D */ daddu $a1, $v0, $zero -glabel L802C74DC_EBE8C -/* EBE8C 802C74DC 0C0B12D7 */ jal si_handle_sleep_frames -/* EBE90 802C74E0 0200202D */ daddu $a0, $s0, $zero -/* EBE94 802C74E4 080B1E95 */ j L802C7A54_EC404 -/* EBE98 802C74E8 0040282D */ daddu $a1, $v0, $zero -glabel L802C74EC_EBE9C -/* EBE9C 802C74EC 0C0B12EE */ jal si_handle_sleep_seconds -/* EBEA0 802C74F0 0200202D */ daddu $a0, $s0, $zero -/* EBEA4 802C74F4 080B1E95 */ j L802C7A54_EC404 -/* EBEA8 802C74F8 0040282D */ daddu $a1, $v0, $zero -glabel L802C74FC_EBEAC -/* EBEAC 802C74FC 0C0B1310 */ jal si_handle_if_equal -/* EBEB0 802C7500 0200202D */ daddu $a0, $s0, $zero -/* EBEB4 802C7504 080B1E95 */ j L802C7A54_EC404 -/* EBEB8 802C7508 0040282D */ daddu $a1, $v0, $zero -glabel L802C750C_EBEBC -/* EBEBC 802C750C 0C0B1328 */ jal si_handle_if_not_equal -/* EBEC0 802C7510 0200202D */ daddu $a0, $s0, $zero -/* EBEC4 802C7514 080B1E95 */ j L802C7A54_EC404 -/* EBEC8 802C7518 0040282D */ daddu $a1, $v0, $zero -glabel L802C751C_EBECC -/* EBECC 802C751C 0C0B1340 */ jal si_handle_if_less -/* EBED0 802C7520 0200202D */ daddu $a0, $s0, $zero -/* EBED4 802C7524 080B1E95 */ j L802C7A54_EC404 -/* EBED8 802C7528 0040282D */ daddu $a1, $v0, $zero -glabel L802C752C_EBEDC -/* EBEDC 802C752C 0C0B1359 */ jal si_handle_if_greater -/* EBEE0 802C7530 0200202D */ daddu $a0, $s0, $zero -/* EBEE4 802C7534 080B1E95 */ j L802C7A54_EC404 -/* EBEE8 802C7538 0040282D */ daddu $a1, $v0, $zero -glabel L802C753C_EBEEC -/* EBEEC 802C753C 0C0B1372 */ jal si_handle_if_less_equal -/* EBEF0 802C7540 0200202D */ daddu $a0, $s0, $zero -/* EBEF4 802C7544 080B1E95 */ j L802C7A54_EC404 -/* EBEF8 802C7548 0040282D */ daddu $a1, $v0, $zero -glabel L802C754C_EBEFC -/* EBEFC 802C754C 0C0B138B */ jal si_handle_if_greater_equal -/* EBF00 802C7550 0200202D */ daddu $a0, $s0, $zero -/* EBF04 802C7554 080B1E95 */ j L802C7A54_EC404 -/* EBF08 802C7558 0040282D */ daddu $a1, $v0, $zero -glabel L802C755C_EBF0C -/* EBF0C 802C755C 0C0B13A4 */ jal si_handle_if_flag -/* EBF10 802C7560 0200202D */ daddu $a0, $s0, $zero -/* EBF14 802C7564 080B1E95 */ j L802C7A54_EC404 -/* EBF18 802C7568 0040282D */ daddu $a1, $v0, $zero -glabel L802C756C_EBF1C -/* EBF1C 802C756C 0C0B13BA */ jal si_handle_if_not_flag -/* EBF20 802C7570 0200202D */ daddu $a0, $s0, $zero -/* EBF24 802C7574 080B1E95 */ j L802C7A54_EC404 -/* EBF28 802C7578 0040282D */ daddu $a1, $v0, $zero -glabel L802C757C_EBF2C -/* EBF2C 802C757C 0C0B13D0 */ jal si_handle_else -/* EBF30 802C7580 0200202D */ daddu $a0, $s0, $zero -/* EBF34 802C7584 080B1E95 */ j L802C7A54_EC404 -/* EBF38 802C7588 0040282D */ daddu $a1, $v0, $zero -glabel L802C758C_EBF3C -/* EBF3C 802C758C 0C0B13DB */ jal si_handle_end_if -/* EBF40 802C7590 0200202D */ daddu $a0, $s0, $zero -/* EBF44 802C7594 080B1E95 */ j L802C7A54_EC404 -/* EBF48 802C7598 0040282D */ daddu $a1, $v0, $zero -glabel L802C759C_EBF4C -/* EBF4C 802C759C 0C0B13DD */ jal si_handle_match -/* EBF50 802C75A0 0200202D */ daddu $a0, $s0, $zero -/* EBF54 802C75A4 080B1E95 */ j L802C7A54_EC404 -/* EBF58 802C75A8 0040282D */ daddu $a1, $v0, $zero -glabel L802C75AC_EBF5C -/* EBF5C 802C75AC 0C0B13F9 */ jal si_handle_match_const -/* EBF60 802C75B0 0200202D */ daddu $a0, $s0, $zero -/* EBF64 802C75B4 080B1E95 */ j L802C7A54_EC404 -/* EBF68 802C75B8 0040282D */ daddu $a1, $v0, $zero -glabel L802C75BC_EBF6C -/* EBF6C 802C75BC 0C0B140C */ jal si_handle_case_equal -/* EBF70 802C75C0 0200202D */ daddu $a0, $s0, $zero -/* EBF74 802C75C4 080B1E95 */ j L802C7A54_EC404 -/* EBF78 802C75C8 0040282D */ daddu $a1, $v0, $zero -glabel L802C75CC_EBF7C -/* EBF7C 802C75CC 0C0B142F */ jal si_handle_case_not_equal -/* EBF80 802C75D0 0200202D */ daddu $a0, $s0, $zero -/* EBF84 802C75D4 080B1E95 */ j L802C7A54_EC404 -/* EBF88 802C75D8 0040282D */ daddu $a1, $v0, $zero -glabel L802C75DC_EBF8C -/* EBF8C 802C75DC 0C0B1452 */ jal si_handle_case_less -/* EBF90 802C75E0 0200202D */ daddu $a0, $s0, $zero -/* EBF94 802C75E4 080B1E95 */ j L802C7A54_EC404 -/* EBF98 802C75E8 0040282D */ daddu $a1, $v0, $zero -glabel L802C75EC_EBF9C -/* EBF9C 802C75EC 0C0B1476 */ jal si_handle_case_less_equal -/* EBFA0 802C75F0 0200202D */ daddu $a0, $s0, $zero -/* EBFA4 802C75F4 080B1E95 */ j L802C7A54_EC404 -/* EBFA8 802C75F8 0040282D */ daddu $a1, $v0, $zero -glabel L802C75FC_EBFAC -/* EBFAC 802C75FC 0C0B149A */ jal si_handle_case_greater -/* EBFB0 802C7600 0200202D */ daddu $a0, $s0, $zero -/* EBFB4 802C7604 080B1E95 */ j L802C7A54_EC404 -/* EBFB8 802C7608 0040282D */ daddu $a1, $v0, $zero -glabel L802C760C_EBFBC -/* EBFBC 802C760C 0C0B14BE */ jal si_handle_case_greater_equal -/* EBFC0 802C7610 0200202D */ daddu $a0, $s0, $zero -/* EBFC4 802C7614 080B1E95 */ j L802C7A54_EC404 -/* EBFC8 802C7618 0040282D */ daddu $a1, $v0, $zero -glabel L802C761C_EBFCC -/* EBFCC 802C761C 0C0B1511 */ jal si_handle_case_else -/* EBFD0 802C7620 0200202D */ daddu $a0, $s0, $zero -/* EBFD4 802C7624 080B1E95 */ j L802C7A54_EC404 -/* EBFD8 802C7628 0040282D */ daddu $a1, $v0, $zero -glabel L802C762C_EBFDC -/* EBFDC 802C762C 0C0B15B5 */ jal si_handle_break_match -/* EBFE0 802C7630 0200202D */ daddu $a0, $s0, $zero -/* EBFE4 802C7634 080B1E95 */ j L802C7A54_EC404 -/* EBFE8 802C7638 0040282D */ daddu $a1, $v0, $zero -glabel L802C763C_EBFEC -/* EBFEC 802C763C 0C0B1546 */ jal si_handle_case_multi_or_equal -/* EBFF0 802C7640 0200202D */ daddu $a0, $s0, $zero -/* EBFF4 802C7644 080B1E95 */ j L802C7A54_EC404 -/* EBFF8 802C7648 0040282D */ daddu $a1, $v0, $zero -glabel L802C764C_EBFFC -/* EBFFC 802C764C 0C0B1597 */ jal si_handle_end_case_multi -/* EC000 802C7650 0200202D */ daddu $a0, $s0, $zero -/* EC004 802C7654 080B1E95 */ j L802C7A54_EC404 -/* EC008 802C7658 0040282D */ daddu $a1, $v0, $zero -glabel L802C765C_EC00C -/* EC00C 802C765C 0C0B156E */ jal si_handle_case_multi_and_equal -/* EC010 802C7660 0200202D */ daddu $a0, $s0, $zero -/* EC014 802C7664 080B1E95 */ j L802C7A54_EC404 -/* EC018 802C7668 0040282D */ daddu $a1, $v0, $zero -glabel L802C766C_EC01C -/* EC01C 802C766C 0C0B1527 */ jal si_handle_case_flag -/* EC020 802C7670 0200202D */ daddu $a0, $s0, $zero -/* EC024 802C7674 080B1E95 */ j L802C7A54_EC404 -/* EC028 802C7678 0040282D */ daddu $a1, $v0, $zero -glabel L802C767C_EC02C -/* EC02C 802C767C 0C0B14E2 */ jal si_handle_case_range -/* EC030 802C7680 0200202D */ daddu $a0, $s0, $zero -/* EC034 802C7684 080B1E95 */ j L802C7A54_EC404 -/* EC038 802C7688 0040282D */ daddu $a1, $v0, $zero -glabel L802C768C_EC03C -/* EC03C 802C768C 0C0B15C6 */ jal si_handle_end_match -/* EC040 802C7690 0200202D */ daddu $a0, $s0, $zero -/* EC044 802C7694 080B1E95 */ j L802C7A54_EC404 -/* EC048 802C7698 0040282D */ daddu $a1, $v0, $zero -glabel L802C769C_EC04C -/* EC04C 802C769C 0C0B15D1 */ jal si_handle_set_var -/* EC050 802C76A0 0200202D */ daddu $a0, $s0, $zero -/* EC054 802C76A4 080B1E95 */ j L802C7A54_EC404 -/* EC058 802C76A8 0040282D */ daddu $a1, $v0, $zero -glabel L802C76AC_EC05C -/* EC05C 802C76AC 0C0B15E4 */ jal si_handle_set_const -/* EC060 802C76B0 0200202D */ daddu $a0, $s0, $zero -/* EC064 802C76B4 080B1E95 */ j L802C7A54_EC404 -/* EC068 802C76B8 0040282D */ daddu $a1, $v0, $zero -glabel L802C76BC_EC06C -/* EC06C 802C76BC 0C0B15EE */ jal si_handle_set_float -/* EC070 802C76C0 0200202D */ daddu $a0, $s0, $zero -/* EC074 802C76C4 080B1E95 */ j L802C7A54_EC404 -/* EC078 802C76C8 0040282D */ daddu $a1, $v0, $zero -glabel L802C76CC_EC07C -/* EC07C 802C76CC 0C0B1601 */ jal si_handle_add -/* EC080 802C76D0 0200202D */ daddu $a0, $s0, $zero -/* EC084 802C76D4 080B1E95 */ j L802C7A54_EC404 -/* EC088 802C76D8 0040282D */ daddu $a1, $v0, $zero -glabel L802C76DC_EC08C -/* EC08C 802C76DC 0C0B161A */ jal si_handle_subtract -/* EC090 802C76E0 0200202D */ daddu $a0, $s0, $zero -/* EC094 802C76E4 080B1E95 */ j L802C7A54_EC404 -/* EC098 802C76E8 0040282D */ daddu $a1, $v0, $zero -glabel L802C76EC_EC09C -/* EC09C 802C76EC 0C0B1633 */ jal si_handle_multiply -/* EC0A0 802C76F0 0200202D */ daddu $a0, $s0, $zero -/* EC0A4 802C76F4 080B1E95 */ j L802C7A54_EC404 -/* EC0A8 802C76F8 0040282D */ daddu $a1, $v0, $zero -glabel L802C76FC_EC0AC -/* EC0AC 802C76FC 0C0B164D */ jal si_handle_divide -/* EC0B0 802C7700 0200202D */ daddu $a0, $s0, $zero -/* EC0B4 802C7704 080B1E95 */ j L802C7A54_EC404 -/* EC0B8 802C7708 0040282D */ daddu $a1, $v0, $zero -glabel L802C770C_EC0BC -/* EC0BC 802C770C 0C0B166F */ jal si_handle_mod -/* EC0C0 802C7710 0200202D */ daddu $a0, $s0, $zero -/* EC0C4 802C7714 080B1E95 */ j L802C7A54_EC404 -/* EC0C8 802C7718 0040282D */ daddu $a1, $v0, $zero -glabel L802C771C_EC0CC -/* EC0CC 802C771C 0C0B16A1 */ jal si_handle_addF -/* EC0D0 802C7720 0200202D */ daddu $a0, $s0, $zero -/* EC0D4 802C7724 080B1E95 */ j L802C7A54_EC404 -/* EC0D8 802C7728 0040282D */ daddu $a1, $v0, $zero -glabel L802C772C_EC0DC -/* EC0DC 802C772C 0C0B16BB */ jal si_handle_subtractF -/* EC0E0 802C7730 0200202D */ daddu $a0, $s0, $zero -/* EC0E4 802C7734 080B1E95 */ j L802C7A54_EC404 -/* EC0E8 802C7738 0040282D */ daddu $a1, $v0, $zero -glabel L802C773C_EC0EC -/* EC0EC 802C773C 0C0B16D5 */ jal si_handle_multiplyF -/* EC0F0 802C7740 0200202D */ daddu $a0, $s0, $zero -/* EC0F4 802C7744 080B1E95 */ j L802C7A54_EC404 -/* EC0F8 802C7748 0040282D */ daddu $a1, $v0, $zero -glabel L802C774C_EC0FC -/* EC0FC 802C774C 0C0B16F0 */ jal si_handle_divideF -/* EC100 802C7750 0200202D */ daddu $a0, $s0, $zero -/* EC104 802C7754 080B1E95 */ j L802C7A54_EC404 -/* EC108 802C7758 0040282D */ daddu $a1, $v0, $zero -glabel L802C775C_EC10C -/* EC10C 802C775C 0C0B170A */ jal si_handle_set_int_buffer_ptr -/* EC110 802C7760 0200202D */ daddu $a0, $s0, $zero -/* EC114 802C7764 080B1E95 */ j L802C7A54_EC404 -/* EC118 802C7768 0040282D */ daddu $a1, $v0, $zero -glabel L802C776C_EC11C -/* EC11C 802C776C 0C0B1724 */ jal si_handle_get_1_word -/* EC120 802C7770 0200202D */ daddu $a0, $s0, $zero -/* EC124 802C7774 080B1E95 */ j L802C7A54_EC404 -/* EC128 802C7778 0040282D */ daddu $a1, $v0, $zero -glabel L802C777C_EC12C -/* EC12C 802C777C 0C0B1731 */ jal si_handle_get_2_word -/* EC130 802C7780 0200202D */ daddu $a0, $s0, $zero -/* EC134 802C7784 080B1E95 */ j L802C7A54_EC404 -/* EC138 802C7788 0040282D */ daddu $a1, $v0, $zero -glabel L802C778C_EC13C -/* EC13C 802C778C 0C0B174B */ jal si_handle_get_3_word -/* EC140 802C7790 0200202D */ daddu $a0, $s0, $zero -/* EC144 802C7794 080B1E95 */ j L802C7A54_EC404 -/* EC148 802C7798 0040282D */ daddu $a1, $v0, $zero -glabel L802C779C_EC14C -/* EC14C 802C779C 0C0B176D */ jal si_handle_get_4_word -/* EC150 802C77A0 0200202D */ daddu $a0, $s0, $zero -/* EC154 802C77A4 080B1E95 */ j L802C7A54_EC404 -/* EC158 802C77A8 0040282D */ daddu $a1, $v0, $zero -glabel L802C77AC_EC15C -/* EC15C 802C77AC 0C0B1797 */ jal si_handle_get_Nth_word -/* EC160 802C77B0 0200202D */ daddu $a0, $s0, $zero -/* EC164 802C77B4 080B1E95 */ j L802C7A54_EC404 -/* EC168 802C77B8 0040282D */ daddu $a1, $v0, $zero -glabel L802C77BC_EC16C -/* EC16C 802C77BC 0C0B1717 */ jal si_handle_set_float_buffer_ptr -/* EC170 802C77C0 0200202D */ daddu $a0, $s0, $zero -/* EC174 802C77C4 080B1E95 */ j L802C7A54_EC404 -/* EC178 802C77C8 0040282D */ daddu $a1, $v0, $zero -glabel L802C77CC_EC17C -/* EC17C 802C77CC 0C0B17AD */ jal si_handle_get_1_float -/* EC180 802C77D0 0200202D */ daddu $a0, $s0, $zero -/* EC184 802C77D4 080B1E95 */ j L802C7A54_EC404 -/* EC188 802C77D8 0040282D */ daddu $a1, $v0, $zero -glabel L802C77DC_EC18C -/* EC18C 802C77DC 0C0B17C3 */ jal si_handle_get_2_float -/* EC190 802C77E0 0200202D */ daddu $a0, $s0, $zero -/* EC194 802C77E4 080B1E95 */ j L802C7A54_EC404 -/* EC198 802C77E8 0040282D */ daddu $a1, $v0, $zero -glabel L802C77EC_EC19C -/* EC19C 802C77EC 0C0B17E7 */ jal si_handle_get_3_float -/* EC1A0 802C77F0 0200202D */ daddu $a0, $s0, $zero -/* EC1A4 802C77F4 080B1E95 */ j L802C7A54_EC404 -/* EC1A8 802C77F8 0040282D */ daddu $a1, $v0, $zero -glabel L802C77FC_EC1AC -/* EC1AC 802C77FC 0C0B1817 */ jal si_handle_get_4_float -/* EC1B0 802C7800 0200202D */ daddu $a0, $s0, $zero -/* EC1B4 802C7804 080B1E95 */ j L802C7A54_EC404 -/* EC1B8 802C7808 0040282D */ daddu $a1, $v0, $zero -glabel L802C780C_EC1BC -/* EC1BC 802C780C 0C0B1853 */ jal si_handle_get_Nth_float -/* EC1C0 802C7810 0200202D */ daddu $a0, $s0, $zero -/* EC1C4 802C7814 080B1E95 */ j L802C7A54_EC404 -/* EC1C8 802C7818 0040282D */ daddu $a1, $v0, $zero -glabel L802C781C_EC1CC -/* EC1CC 802C781C 0C0B186B */ jal si_handle_set_array -/* EC1D0 802C7820 0200202D */ daddu $a0, $s0, $zero -/* EC1D4 802C7824 080B1E95 */ j L802C7A54_EC404 -/* EC1D8 802C7828 0040282D */ daddu $a1, $v0, $zero -glabel L802C782C_EC1DC -/* EC1DC 802C782C 0C0B1878 */ jal si_handle_set_flag_array -/* EC1E0 802C7830 0200202D */ daddu $a0, $s0, $zero -/* EC1E4 802C7834 080B1E95 */ j L802C7A54_EC404 -/* EC1E8 802C7838 0040282D */ daddu $a1, $v0, $zero -glabel L802C783C_EC1EC -/* EC1EC 802C783C 0C0B1885 */ jal si_handle_allocate_array -/* EC1F0 802C7840 0200202D */ daddu $a0, $s0, $zero -/* EC1F4 802C7844 080B1E95 */ j L802C7A54_EC404 -/* EC1F8 802C7848 0040282D */ daddu $a1, $v0, $zero -glabel L802C784C_EC1FC -/* EC1FC 802C784C 0C0B1A1C */ jal si_handle_kill_script -/* EC200 802C7850 0200202D */ daddu $a0, $s0, $zero -/* EC204 802C7854 080B1E95 */ j L802C7A54_EC404 -/* EC208 802C7858 0040282D */ daddu $a1, $v0, $zero -glabel L802C785C_EC20C -/* EC20C 802C785C 0C0B189C */ jal si_handle_AND -/* EC210 802C7860 0200202D */ daddu $a0, $s0, $zero -/* EC214 802C7864 080B1E95 */ j L802C7A54_EC404 -/* EC218 802C7868 0040282D */ daddu $a1, $v0, $zero -glabel L802C786C_EC21C -/* EC21C 802C786C 0C0B18B5 */ jal si_handle_AND_const -/* EC220 802C7870 0200202D */ daddu $a0, $s0, $zero -/* EC224 802C7874 080B1E95 */ j L802C7A54_EC404 -/* EC228 802C7878 0040282D */ daddu $a1, $v0, $zero -glabel L802C787C_EC22C -/* EC22C 802C787C 0C0B18CB */ jal si_handle_OR -/* EC230 802C7880 0200202D */ daddu $a0, $s0, $zero -/* EC234 802C7884 080B1E95 */ j L802C7A54_EC404 -/* EC238 802C7888 0040282D */ daddu $a1, $v0, $zero -glabel L802C788C_EC23C -/* EC23C 802C788C 0C0B18E4 */ jal si_handle_OR_const -/* EC240 802C7890 0200202D */ daddu $a0, $s0, $zero -/* EC244 802C7894 080B1E95 */ j L802C7A54_EC404 -/* EC248 802C7898 0040282D */ daddu $a1, $v0, $zero -glabel L802C789C_EC24C -/* EC24C 802C789C 0C0B18FA */ jal si_handle_call -/* EC250 802C78A0 0200202D */ daddu $a0, $s0, $zero -/* EC254 802C78A4 080B1E95 */ j L802C7A54_EC404 -/* EC258 802C78A8 0040282D */ daddu $a1, $v0, $zero -glabel L802C78AC_EC25C -/* EC25C 802C78AC 0C0B191B */ jal si_handle_spawn_script -/* EC260 802C78B0 0200202D */ daddu $a0, $s0, $zero -/* EC264 802C78B4 080B1E95 */ j L802C7A54_EC404 -/* EC268 802C78B8 0040282D */ daddu $a1, $v0, $zero -glabel L802C78BC_EC26C -/* EC26C 802C78BC 0C0B1949 */ jal si_handle_spawn_script_get_id -/* EC270 802C78C0 0200202D */ daddu $a0, $s0, $zero -/* EC274 802C78C4 080B1E95 */ j L802C7A54_EC404 -/* EC278 802C78C8 0040282D */ daddu $a1, $v0, $zero -glabel L802C78CC_EC27C -/* EC27C 802C78CC 0C0B197F */ jal si_handle_await_script -/* EC280 802C78D0 0200202D */ daddu $a0, $s0, $zero -/* EC284 802C78D4 080B1E95 */ j L802C7A54_EC404 -/* EC288 802C78D8 0040282D */ daddu $a1, $v0, $zero -glabel L802C78DC_EC28C -/* EC28C 802C78DC 0C0B19C5 */ jal si_handle_bind_trigger -/* EC290 802C78E0 0200202D */ daddu $a0, $s0, $zero -/* EC294 802C78E4 080B1E95 */ j L802C7A54_EC404 -/* EC298 802C78E8 0040282D */ daddu $a1, $v0, $zero -glabel L802C78EC_EC29C -/* EC29C 802C78EC 0C0B1A14 */ jal si_handle_unbind -/* EC2A0 802C78F0 0200202D */ daddu $a0, $s0, $zero -/* EC2A4 802C78F4 080B1E95 */ j L802C7A54_EC404 -/* EC2A8 802C78F8 0040282D */ daddu $a1, $v0, $zero -glabel L802C78FC_EC2AC -/* EC2AC 802C78FC 0C0B1A27 */ jal si_handle_set_priority -/* EC2B0 802C7900 0200202D */ daddu $a0, $s0, $zero -/* EC2B4 802C7904 080B1E95 */ j L802C7A54_EC404 -/* EC2B8 802C7908 0040282D */ daddu $a1, $v0, $zero -glabel L802C790C_EC2BC -/* EC2BC 802C790C 0C0B1A36 */ jal si_handle_set_timescale -/* EC2C0 802C7910 0200202D */ daddu $a0, $s0, $zero -/* EC2C4 802C7914 080B1E95 */ j L802C7A54_EC404 -/* EC2C8 802C7918 0040282D */ daddu $a1, $v0, $zero -glabel L802C791C_EC2CC -/* EC2CC 802C791C 0C0B1A45 */ jal si_handle_set_group -/* EC2D0 802C7920 0200202D */ daddu $a0, $s0, $zero -/* EC2D4 802C7924 080B1E95 */ j L802C7A54_EC404 -/* EC2D8 802C7928 0040282D */ daddu $a1, $v0, $zero -glabel L802C792C_EC2DC -/* EC2DC 802C792C 0C0B1990 */ jal si_handle_jump -/* EC2E0 802C7930 0200202D */ daddu $a0, $s0, $zero -/* EC2E4 802C7934 080B1E95 */ j L802C7A54_EC404 -/* EC2E8 802C7938 0040282D */ daddu $a1, $v0, $zero -glabel L802C793C_EC2EC -/* EC2EC 802C793C 0C0B1AD5 */ jal si_handle_bind_lock -/* EC2F0 802C7940 0200202D */ daddu $a0, $s0, $zero -/* EC2F4 802C7944 080B1E95 */ j L802C7A54_EC404 -/* EC2F8 802C7948 0040282D */ daddu $a1, $v0, $zero -glabel L802C794C_EC2FC -/* EC2FC 802C794C 0C0B1A54 */ jal si_handle_suspend_all -/* EC300 802C7950 0200202D */ daddu $a0, $s0, $zero -/* EC304 802C7954 080B1E95 */ j L802C7A54_EC404 -/* EC308 802C7958 0040282D */ daddu $a1, $v0, $zero -glabel L802C795C_EC30C -/* EC30C 802C795C 0C0B1A5F */ jal si_handle_resume_all -/* EC310 802C7960 0200202D */ daddu $a0, $s0, $zero -/* EC314 802C7964 080B1E95 */ j L802C7A54_EC404 -/* EC318 802C7968 0040282D */ daddu $a1, $v0, $zero -glabel L802C796C_EC31C -/* EC31C 802C796C 0C0B1A6A */ jal si_handle_suspend_others -/* EC320 802C7970 0200202D */ daddu $a0, $s0, $zero -/* EC324 802C7974 080B1E95 */ j L802C7A54_EC404 -/* EC328 802C7978 0040282D */ daddu $a1, $v0, $zero -glabel L802C797C_EC32C -/* EC32C 802C797C 0C0B1A79 */ jal si_handle_resume_others -/* EC330 802C7980 0200202D */ daddu $a0, $s0, $zero -/* EC334 802C7984 080B1E95 */ j L802C7A54_EC404 -/* EC338 802C7988 0040282D */ daddu $a1, $v0, $zero -glabel L802C798C_EC33C -/* EC33C 802C798C 0C0B1A88 */ jal si_handle_suspend_script -/* EC340 802C7990 0200202D */ daddu $a0, $s0, $zero -/* EC344 802C7994 080B1E95 */ j L802C7A54_EC404 -/* EC348 802C7998 0040282D */ daddu $a1, $v0, $zero -glabel L802C799C_EC34C -/* EC34C 802C799C 0C0B1A93 */ jal si_handle_resume_script -/* EC350 802C79A0 0200202D */ daddu $a0, $s0, $zero -/* EC354 802C79A4 080B1E95 */ j L802C7A54_EC404 -/* EC358 802C79A8 0040282D */ daddu $a1, $v0, $zero -glabel L802C79AC_EC35C -/* EC35C 802C79AC 0C0B1A9E */ jal si_handle_does_script_exist -/* EC360 802C79B0 0200202D */ daddu $a0, $s0, $zero -/* EC364 802C79B4 080B1E95 */ j L802C7A54_EC404 -/* EC368 802C79B8 0040282D */ daddu $a1, $v0, $zero -glabel L802C79BC_EC36C -/* EC36C 802C79BC 0C0B1B1E */ jal si_handle_spawn_thread -/* EC370 802C79C0 0200202D */ daddu $a0, $s0, $zero -/* EC374 802C79C4 080B1E95 */ j L802C7A54_EC404 -/* EC378 802C79C8 0040282D */ daddu $a1, $v0, $zero -glabel L802C79CC_EC37C -/* EC37C 802C79CC 0C0B1B53 */ jal si_handle_end_spawn_thread -/* EC380 802C79D0 0200202D */ daddu $a0, $s0, $zero -/* EC384 802C79D4 080B1E95 */ j L802C7A54_EC404 -/* EC388 802C79D8 0040282D */ daddu $a1, $v0, $zero -glabel L802C79DC_EC38C -/* EC38C 802C79DC 0C0B1B5B */ jal si_handle_parallel_thread -/* EC390 802C79E0 0200202D */ daddu $a0, $s0, $zero -/* EC394 802C79E4 080B1E95 */ j L802C7A54_EC404 -/* EC398 802C79E8 0040282D */ daddu $a1, $v0, $zero -glabel L802C79EC_EC39C -/* EC39C 802C79EC 0C0B1B7D */ jal si_handle_end_parallel_thread -/* EC3A0 802C79F0 0200202D */ daddu $a0, $s0, $zero -/* EC3A4 802C79F4 080B1E95 */ j L802C7A54_EC404 -/* EC3A8 802C79F8 0040282D */ daddu $a1, $v0, $zero -glabel L802C79FC_EC3AC -/* EC3AC 802C79FC 0C0B1B85 */ jal func_802C6E14 -/* EC3B0 802C7A00 0200202D */ daddu $a0, $s0, $zero -/* EC3B4 802C7A04 080B1E95 */ j L802C7A54_EC404 -/* EC3B8 802C7A08 0040282D */ daddu $a1, $v0, $zero -glabel L802C7A0C_EC3BC -/* EC3BC 802C7A0C 0C0B1B87 */ jal si_handle_print_debug_var -/* EC3C0 802C7A10 0200202D */ daddu $a0, $s0, $zero -/* EC3C4 802C7A14 080B1E95 */ j L802C7A54_EC404 -/* EC3C8 802C7A18 0040282D */ daddu $a1, $v0, $zero -glabel L802C7A1C_EC3CC -/* EC3CC 802C7A1C 0C0B1CE7 */ jal func_802C739C -/* EC3D0 802C7A20 0200202D */ daddu $a0, $s0, $zero -/* EC3D4 802C7A24 080B1E95 */ j L802C7A54_EC404 -/* EC3D8 802C7A28 0040282D */ daddu $a1, $v0, $zero -glabel L802C7A2C_EC3DC -/* EC3DC 802C7A2C 0C0B1CEC */ jal func_802C73B0 -/* EC3E0 802C7A30 0200202D */ daddu $a0, $s0, $zero -/* EC3E4 802C7A34 080B1E95 */ j L802C7A54_EC404 -/* EC3E8 802C7A38 0040282D */ daddu $a1, $v0, $zero -glabel L802C7A3C_EC3EC -/* EC3EC 802C7A3C 0C0B1CEE */ jal func_802C73B8 -/* EC3F0 802C7A40 0200202D */ daddu $a0, $s0, $zero -/* EC3F4 802C7A44 080B1E95 */ j L802C7A54_EC404 -/* EC3F8 802C7A48 0040282D */ daddu $a1, $v0, $zero -.L802C7A4C: -/* EC3FC 802C7A4C 080B1E93 */ j .L802C7A4C -/* EC400 802C7A50 00000000 */ nop -glabel L802C7A54_EC404 -/* EC404 802C7A54 24020003 */ addiu $v0, $zero, 3 -/* EC408 802C7A58 10A2FE6E */ beq $a1, $v0, .L802C7414 -/* EC40C 802C7A5C 240200FF */ addiu $v0, $zero, 0xff -/* EC410 802C7A60 10A20012 */ beq $a1, $v0, .L802C7AAC -/* EC414 802C7A64 2402FFFF */ addiu $v0, $zero, -1 -/* EC418 802C7A68 04A00010 */ bltz $a1, .L802C7AAC -/* EC41C 802C7A6C 24020001 */ addiu $v0, $zero, 1 -/* EC420 802C7A70 50A0000E */ beql $a1, $zero, .L802C7AAC -/* EC424 802C7A74 0000102D */ daddu $v0, $zero, $zero -/* EC428 802C7A78 14A20003 */ bne $a1, $v0, .L802C7A88 -/* EC42C 802C7A7C 24020002 */ addiu $v0, $zero, 2 -/* EC430 802C7A80 080B1EAA */ j .L802C7AA8 -/* EC434 802C7A84 A2000002 */ sb $zero, 2($s0) -.L802C7A88: -/* EC438 802C7A88 14A2FE62 */ bne $a1, $v0, .L802C7414 -/* EC43C 802C7A8C 00000000 */ nop -/* EC440 802C7A90 A2000002 */ sb $zero, 2($s0) -/* EC444 802C7A94 3C028007 */ lui $v0, %hi(gGameStatusPtr) -/* EC448 802C7A98 8C42419C */ lw $v0, %lo(gGameStatusPtr)($v0) -/* EC44C 802C7A9C 80420078 */ lb $v0, 0x78($v0) -/* EC450 802C7AA0 1445FE5C */ bne $v0, $a1, .L802C7414 -/* EC454 802C7AA4 00000000 */ nop -.L802C7AA8: -/* EC458 802C7AA8 0000102D */ daddu $v0, $zero, $zero -.L802C7AAC: -/* EC45C 802C7AAC 8FBF0014 */ lw $ra, 0x14($sp) -/* EC460 802C7AB0 8FB00010 */ lw $s0, 0x10($sp) -/* EC464 802C7AB4 03E00008 */ jr $ra -/* EC468 802C7AB8 27BD0018 */ addiu $sp, $sp, 0x18 diff --git a/ver/us/asm/nonmatchings/evt/si/si_goto_next_case.s b/ver/us/asm/nonmatchings/evt/si/si_goto_next_case.s deleted file mode 100644 index e959e82e12..0000000000 --- a/ver/us/asm/nonmatchings/evt/si/si_goto_next_case.s +++ /dev/null @@ -1,47 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -.section .rodata - -glabel D_802DA140 -.word 0x802C8AB0, 0x802C8A74, 0x802C8A74, 0x802C8A74, 0x802C8A74, 0x802C8A74, 0x802C8A74, 0x802C8A74, 0x802C8A74, 0x802C8A74, 0x802C8A74, 0x802C8A74, 0x802C8A74, 0x802C8A74, 0x802C8A74, 0x802C8A74, 0x802C8A74, 0x802C8A74, 0x802C8A74, 0x802C8AB8, 0x802C8A74, 0x802C8AD4, 0x802C8AD4, 0x802C8AD4, 0x802C8AD4, 0x802C8AD4, 0x802C8AD4, 0x802C8AD4, 0x802C8AD4, 0x802C8AD4, 0x802C8A74, 0x802C8AD4, 0x802C8AD4, 0x802C8A74, 0x802C8AC0, 0x00000000 - -.section .text - -glabel si_goto_next_case -/* ED410 802C8A60 24050001 */ addiu $a1, $zero, 1 -/* ED414 802C8A64 8C860008 */ lw $a2, 8($a0) -/* ED418 802C8A68 3C08802E */ lui $t0, %hi(D_802DA140) -/* ED41C 802C8A6C 2508A140 */ addiu $t0, $t0, %lo(D_802DA140) -/* ED420 802C8A70 00A0382D */ daddu $a3, $a1, $zero -.L802C8A74: -/* ED424 802C8A74 00C0202D */ daddu $a0, $a2, $zero -.L802C8A78: -/* ED428 802C8A78 24860008 */ addiu $a2, $a0, 8 -/* ED42C 802C8A7C 8C820004 */ lw $v0, 4($a0) -/* ED430 802C8A80 8C830000 */ lw $v1, ($a0) -/* ED434 802C8A84 00021080 */ sll $v0, $v0, 2 -/* ED438 802C8A88 00C23021 */ addu $a2, $a2, $v0 -/* ED43C 802C8A8C 2463FFFF */ addiu $v1, $v1, -1 -/* ED440 802C8A90 2C620023 */ sltiu $v0, $v1, 0x23 -/* ED444 802C8A94 5040FFF8 */ beql $v0, $zero, .L802C8A78 -/* ED448 802C8A98 00C0202D */ daddu $a0, $a2, $zero -/* ED44C 802C8A9C 00031080 */ sll $v0, $v1, 2 -/* ED450 802C8AA0 00481021 */ addu $v0, $v0, $t0 -/* ED454 802C8AA4 8C420000 */ lw $v0, ($v0) -/* ED458 802C8AA8 00400008 */ jr $v0 -/* ED45C 802C8AAC 00000000 */ nop -.L802C8AB0: -/* ED460 802C8AB0 080B22AC */ j .L802C8AB0 -/* ED464 802C8AB4 00000000 */ nop -/* ED468 802C8AB8 080B229D */ j .L802C8A74 -/* ED46C 802C8ABC 24A50001 */ addiu $a1, $a1, 1 -/* ED470 802C8AC0 24A5FFFF */ addiu $a1, $a1, -1 -/* ED474 802C8AC4 54A0FFEC */ bnel $a1, $zero, .L802C8A78 -/* ED478 802C8AC8 00C0202D */ daddu $a0, $a2, $zero -/* ED47C 802C8ACC 03E00008 */ jr $ra -/* ED480 802C8AD0 0080102D */ daddu $v0, $a0, $zero -/* ED484 802C8AD4 54A7FFE8 */ bnel $a1, $a3, .L802C8A78 -/* ED488 802C8AD8 00C0202D */ daddu $a0, $a2, $zero -/* ED48C 802C8ADC 03E00008 */ jr $ra -/* ED490 802C8AE0 0080102D */ daddu $v0, $a0, $zero diff --git a/ver/us/asm/nonmatchings/evt/si/si_skip_else.s b/ver/us/asm/nonmatchings/evt/si/si_skip_else.s deleted file mode 100644 index 06a3be900e..0000000000 --- a/ver/us/asm/nonmatchings/evt/si/si_skip_else.s +++ /dev/null @@ -1,40 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -.section .rodata - -glabel D_802DA0F0 -.word 0x802C89C0, 0x802C8988, 0x802C8988, 0x802C8988, 0x802C8988, 0x802C8988, 0x802C8988, 0x802C8988, 0x802C8988, 0x802C89DC, 0x802C89DC, 0x802C89DC, 0x802C89DC, 0x802C89DC, 0x802C89DC, 0x802C89DC, 0x802C89DC, 0x802C8988, 0x802C89C8, 0x00000000 - -.section .text - -glabel si_skip_else -/* ED328 802C8978 0000282D */ daddu $a1, $zero, $zero -/* ED32C 802C897C 8C840008 */ lw $a0, 8($a0) -/* ED330 802C8980 3C06802E */ lui $a2, %hi(D_802DA0F0) -/* ED334 802C8984 24C6A0F0 */ addiu $a2, $a2, %lo(D_802DA0F0) -.L802C8988: -/* ED338 802C8988 8C820000 */ lw $v0, ($a0) -/* ED33C 802C898C 24840004 */ addiu $a0, $a0, 4 -/* ED340 802C8990 8C830000 */ lw $v1, ($a0) -/* ED344 802C8994 24840004 */ addiu $a0, $a0, 4 -/* ED348 802C8998 00031880 */ sll $v1, $v1, 2 -/* ED34C 802C899C 00832021 */ addu $a0, $a0, $v1 -/* ED350 802C89A0 2443FFFF */ addiu $v1, $v0, -1 -/* ED354 802C89A4 2C620013 */ sltiu $v0, $v1, 0x13 -/* ED358 802C89A8 1040FFF7 */ beqz $v0, .L802C8988 -/* ED35C 802C89AC 00031080 */ sll $v0, $v1, 2 -/* ED360 802C89B0 00461021 */ addu $v0, $v0, $a2 -/* ED364 802C89B4 8C420000 */ lw $v0, ($v0) -/* ED368 802C89B8 00400008 */ jr $v0 -/* ED36C 802C89BC 00000000 */ nop -.L802C89C0: -/* ED370 802C89C0 080B2270 */ j .L802C89C0 -/* ED374 802C89C4 00000000 */ nop -/* ED378 802C89C8 24A5FFFF */ addiu $a1, $a1, -1 -/* ED37C 802C89CC 04A1FFEE */ bgez $a1, .L802C8988 -/* ED380 802C89D0 0080102D */ daddu $v0, $a0, $zero -/* ED384 802C89D4 03E00008 */ jr $ra -/* ED388 802C89D8 00000000 */ nop -/* ED38C 802C89DC 080B2262 */ j .L802C8988 -/* ED390 802C89E0 24A50001 */ addiu $a1, $a1, 1 diff --git a/ver/us/asm/nonmatchings/evt/si/si_skip_if.s b/ver/us/asm/nonmatchings/evt/si/si_skip_if.s deleted file mode 100644 index 72067edf7f..0000000000 --- a/ver/us/asm/nonmatchings/evt/si/si_skip_if.s +++ /dev/null @@ -1,44 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -.section .rodata - -glabel D_802DA0A0 -.word 0x802C8944, 0x802C890C, 0x802C890C, 0x802C890C, 0x802C890C, 0x802C890C, 0x802C890C, 0x802C890C, 0x802C890C, 0x802C8960, 0x802C8960, 0x802C8960, 0x802C8960, 0x802C8960, 0x802C8960, 0x802C8960, 0x802C8960, 0x802C8968, 0x802C894C, 0x00000000 - -.section .text - -glabel si_skip_if -/* ED2AC 802C88FC 0000282D */ daddu $a1, $zero, $zero -/* ED2B0 802C8900 8C840008 */ lw $a0, 8($a0) -/* ED2B4 802C8904 3C06802E */ lui $a2, %hi(D_802DA0A0) -/* ED2B8 802C8908 24C6A0A0 */ addiu $a2, $a2, %lo(D_802DA0A0) -.L802C890C: -/* ED2BC 802C890C 8C820000 */ lw $v0, ($a0) -/* ED2C0 802C8910 24840004 */ addiu $a0, $a0, 4 -/* ED2C4 802C8914 8C830000 */ lw $v1, ($a0) -/* ED2C8 802C8918 24840004 */ addiu $a0, $a0, 4 -/* ED2CC 802C891C 00031880 */ sll $v1, $v1, 2 -/* ED2D0 802C8920 00832021 */ addu $a0, $a0, $v1 -/* ED2D4 802C8924 2443FFFF */ addiu $v1, $v0, -1 -/* ED2D8 802C8928 2C620013 */ sltiu $v0, $v1, 0x13 -/* ED2DC 802C892C 1040FFF7 */ beqz $v0, .L802C890C -/* ED2E0 802C8930 00031080 */ sll $v0, $v1, 2 -/* ED2E4 802C8934 00461021 */ addu $v0, $v0, $a2 -/* ED2E8 802C8938 8C420000 */ lw $v0, ($v0) -/* ED2EC 802C893C 00400008 */ jr $v0 -/* ED2F0 802C8940 00000000 */ nop -.L802C8944: -/* ED2F4 802C8944 080B2251 */ j .L802C8944 -/* ED2F8 802C8948 00000000 */ nop -/* ED2FC 802C894C 24A5FFFF */ addiu $a1, $a1, -1 -/* ED300 802C8950 04A1FFEE */ bgez $a1, .L802C890C -/* ED304 802C8954 0080102D */ daddu $v0, $a0, $zero -/* ED308 802C8958 03E00008 */ jr $ra -/* ED30C 802C895C 00000000 */ nop -/* ED310 802C8960 080B2243 */ j .L802C890C -/* ED314 802C8964 24A50001 */ addiu $a1, $a1, 1 -/* ED318 802C8968 14A0FFE8 */ bnez $a1, .L802C890C -/* ED31C 802C896C 0080102D */ daddu $v0, $a0, $zero -/* ED320 802C8970 03E00008 */ jr $ra -/* ED324 802C8974 00000000 */ nop diff --git a/ver/us/asm/nonmatchings/world/action/hammer/func_802B66A8_E25578.s b/ver/us/asm/nonmatchings/world/action/hammer/func_802B66A8_E25578.s deleted file mode 100644 index 96a3a230a6..0000000000 --- a/ver/us/asm/nonmatchings/world/action/hammer/func_802B66A8_E25578.s +++ /dev/null @@ -1,105 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_802B66A8_E25578 -/* E25578 802B66A8 27BDFFE0 */ addiu $sp, $sp, -0x20 -/* E2557C 802B66AC AFB00010 */ sw $s0, 0x10($sp) -/* E25580 802B66B0 3C10802B */ lui $s0, %hi(D_802B6DB0_E25C80) -/* E25584 802B66B4 26106DB0 */ addiu $s0, $s0, %lo(D_802B6DB0_E25C80) -/* E25588 802B66B8 AFBF0018 */ sw $ra, 0x18($sp) -/* E2558C 802B66BC AFB10014 */ sw $s1, 0x14($sp) -/* E25590 802B66C0 8E040000 */ lw $a0, ($s0) -/* E25594 802B66C4 3C118011 */ lui $s1, %hi(gPlayerStatus) -/* E25598 802B66C8 2631EFC8 */ addiu $s1, $s1, %lo(gPlayerStatus) -/* E2559C 802B66CC AC80001C */ sw $zero, 0x1c($a0) -/* E255A0 802B66D0 8E230000 */ lw $v1, ($s1) -/* E255A4 802B66D4 04630033 */ bgezl $v1, .L802B67A4 -/* E255A8 802B66D8 3C04FEFF */ lui $a0, 0xfeff -/* E255AC 802B66DC 3C027FFF */ lui $v0, 0x7fff -/* E255B0 802B66E0 3442FFFF */ ori $v0, $v0, 0xffff -/* E255B4 802B66E4 00621024 */ and $v0, $v1, $v0 -/* E255B8 802B66E8 3C030020 */ lui $v1, 0x20 -/* E255BC 802B66EC 00431025 */ or $v0, $v0, $v1 -/* E255C0 802B66F0 AE220000 */ sw $v0, ($s1) -/* E255C4 802B66F4 AC800018 */ sw $zero, 0x18($a0) -/* E255C8 802B66F8 A22000B6 */ sb $zero, 0xb6($s1) -/* E255CC 802B66FC AE200054 */ sw $zero, 0x54($s1) -/* E255D0 802B6700 0C0AD8A9 */ jal func_802B62A4_E25174 -/* E255D4 802B6704 A62000BC */ sh $zero, 0xbc($s1) -/* E255D8 802B6708 8E030000 */ lw $v1, ($s0) -/* E255DC 802B670C 0040282D */ daddu $a1, $v0, $zero -/* E255E0 802B6710 AC650010 */ sw $a1, 0x10($v1) -/* E255E4 802B6714 3C038011 */ lui $v1, %hi(gPlayerData+0x1) -/* E255E8 802B6718 8063F291 */ lb $v1, %lo(gPlayerData+0x1)($v1) -/* E255EC 802B671C 24020002 */ addiu $v0, $zero, 2 -/* E255F0 802B6720 14620008 */ bne $v1, $v0, .L802B6744 -/* E255F4 802B6724 24020001 */ addiu $v0, $zero, 1 -/* E255F8 802B6728 24102117 */ addiu $s0, $zero, 0x2117 -/* E255FC 802B672C 3C040006 */ lui $a0, 6 -/* E25600 802B6730 04A10012 */ bgez $a1, .L802B677C -/* E25604 802B6734 3484001A */ ori $a0, $a0, 0x1a -/* E25608 802B6738 3C040006 */ lui $a0, 6 -/* E2560C 802B673C 080AD9DF */ j .L802B677C -/* E25610 802B6740 34840018 */ ori $a0, $a0, 0x18 -.L802B6744: -/* E25614 802B6744 14620008 */ bne $v1, $v0, .L802B6768 -/* E25618 802B6748 24102115 */ addiu $s0, $zero, 0x2115 -/* E2561C 802B674C 24102116 */ addiu $s0, $zero, 0x2116 -/* E25620 802B6750 3C040006 */ lui $a0, 6 -/* E25624 802B6754 04A10009 */ bgez $a1, .L802B677C -/* E25628 802B6758 34840016 */ ori $a0, $a0, 0x16 -/* E2562C 802B675C 3C040006 */ lui $a0, 6 -/* E25630 802B6760 080AD9DF */ j .L802B677C -/* E25634 802B6764 34840014 */ ori $a0, $a0, 0x14 -.L802B6768: -/* E25638 802B6768 3C040006 */ lui $a0, 6 -/* E2563C 802B676C 04A10003 */ bgez $a1, .L802B677C -/* E25640 802B6770 34840012 */ ori $a0, $a0, 0x12 -/* E25644 802B6774 3C040006 */ lui $a0, 6 -/* E25648 802B6778 34840010 */ ori $a0, $a0, 0x10 -.L802B677C: -/* E2564C 802B677C 0C037FBF */ jal func_800DFEFC -/* E25650 802B6780 00000000 */ nop -/* E25654 802B6784 0200202D */ daddu $a0, $s0, $zero -/* E25658 802B6788 0C052736 */ jal sfx_play_sound_at_player -/* E2565C 802B678C 0000282D */ daddu $a1, $zero, $zero -/* E25660 802B6790 3C02802B */ lui $v0, %hi(D_802B6DB0_E25C80) -/* E25664 802B6794 8C426DB0 */ lw $v0, %lo(D_802B6DB0_E25C80)($v0) -/* E25668 802B6798 AC40000C */ sw $zero, 0xc($v0) -/* E2566C 802B679C AC400014 */ sw $zero, 0x14($v0) -/* E25670 802B67A0 3C04FEFF */ lui $a0, 0xfeff -.L802B67A4: -/* E25674 802B67A4 3484FFFF */ ori $a0, $a0, 0xffff -/* E25678 802B67A8 8E220000 */ lw $v0, ($s1) -/* E2567C 802B67AC 3C03802B */ lui $v1, %hi(D_802B6DB0_E25C80) -/* E25680 802B67B0 8C636DB0 */ lw $v1, %lo(D_802B6DB0_E25C80)($v1) -/* E25684 802B67B4 00442024 */ and $a0, $v0, $a0 -/* E25688 802B67B8 AE240000 */ sw $a0, ($s1) -/* E2568C 802B67BC 8C620018 */ lw $v0, 0x18($v1) -/* E25690 802B67C0 28420003 */ slti $v0, $v0, 3 -/* E25694 802B67C4 10400007 */ beqz $v0, .L802B67E4 -/* E25698 802B67C8 3C020004 */ lui $v0, 4 -/* E2569C 802B67CC 00821024 */ and $v0, $a0, $v0 -/* E256A0 802B67D0 10400004 */ beqz $v0, .L802B67E4 -/* E256A4 802B67D4 3C022000 */ lui $v0, 0x2000 -/* E256A8 802B67D8 00821025 */ or $v0, $a0, $v0 -/* E256AC 802B67DC 080ADA03 */ j .L802B680C -/* E256B0 802B67E0 AE220000 */ sw $v0, ($s1) -.L802B67E4: -/* E256B4 802B67E4 3C04802B */ lui $a0, %hi(D_802B6DB0_E25C80) -/* E256B8 802B67E8 8C846DB0 */ lw $a0, %lo(D_802B6DB0_E25C80)($a0) -/* E256BC 802B67EC 8C830018 */ lw $v1, 0x18($a0) -/* E256C0 802B67F0 28620002 */ slti $v0, $v1, 2 -/* E256C4 802B67F4 10400003 */ beqz $v0, .L802B6804 -/* E256C8 802B67F8 24620001 */ addiu $v0, $v1, 1 -/* E256CC 802B67FC 080ADA03 */ j .L802B680C -/* E256D0 802B6800 AC820018 */ sw $v0, 0x18($a0) -.L802B6804: -/* E256D4 802B6804 0C0ADA08 */ jal func_802B6820_E256F0 -/* E256D8 802B6808 00000000 */ nop -.L802B680C: -/* E256DC 802B680C 8FBF0018 */ lw $ra, 0x18($sp) -/* E256E0 802B6810 8FB10014 */ lw $s1, 0x14($sp) -/* E256E4 802B6814 8FB00010 */ lw $s0, 0x10($sp) -/* E256E8 802B6818 03E00008 */ jr $ra -/* E256EC 802B681C 27BD0020 */ addiu $sp, $sp, 0x20 diff --git a/ver/us/asm/nonmatchings/world/action/hit_fire/func_802B6000_E27C90.s b/ver/us/asm/nonmatchings/world/action/hit_fire/func_802B6000_E27C90.s deleted file mode 100644 index e3ce27b3da..0000000000 --- a/ver/us/asm/nonmatchings/world/action/hit_fire/func_802B6000_E27C90.s +++ /dev/null @@ -1,180 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_802B6000_E27C90 -/* E27C90 802B6000 27BDFFD0 */ addiu $sp, $sp, -0x30 -/* E27C94 802B6004 AFB00020 */ sw $s0, 0x20($sp) -/* E27C98 802B6008 3C108011 */ lui $s0, %hi(gPlayerStatus) -/* E27C9C 802B600C 2610EFC8 */ addiu $s0, $s0, %lo(gPlayerStatus) -/* E27CA0 802B6010 AFBF0028 */ sw $ra, 0x28($sp) -/* E27CA4 802B6014 AFB10024 */ sw $s1, 0x24($sp) -/* E27CA8 802B6018 8E020000 */ lw $v0, ($s0) -/* E27CAC 802B601C 04410048 */ bgez $v0, .L802B6140 -/* E27CB0 802B6020 0200882D */ daddu $s1, $s0, $zero -/* E27CB4 802B6024 3C037FFF */ lui $v1, 0x7fff -/* E27CB8 802B6028 3463FFFF */ ori $v1, $v1, 0xffff -/* E27CBC 802B602C 3C040001 */ lui $a0, 1 -/* E27CC0 802B6030 00431824 */ and $v1, $v0, $v1 -/* E27CC4 802B6034 8E020004 */ lw $v0, 4($s0) -/* E27CC8 802B6038 34840019 */ ori $a0, $a0, 0x19 -/* E27CCC 802B603C AE030000 */ sw $v1, ($s0) -/* E27CD0 802B6040 34630808 */ ori $v1, $v1, 0x808 -/* E27CD4 802B6044 AE030000 */ sw $v1, ($s0) -/* E27CD8 802B6048 34420004 */ ori $v0, $v0, 4 -/* E27CDC 802B604C 0C037FDE */ jal func_800DFF78 -/* E27CE0 802B6050 AE020004 */ sw $v0, 4($s0) -/* E27CE4 802B6054 C60C0028 */ lwc1 $f12, 0x28($s0) -/* E27CE8 802B6058 C60E0030 */ lwc1 $f14, 0x30($s0) -/* E27CEC 802B605C 3C014192 */ lui $at, 0x4192 -/* E27CF0 802B6060 3421C745 */ ori $at, $at, 0xc745 -/* E27CF4 802B6064 44811000 */ mtc1 $at, $f2 -/* E27CF8 802B6068 3C01C06F */ lui $at, 0xc06f -/* E27CFC 802B606C 34213B64 */ ori $at, $at, 0x3b64 -/* E27D00 802B6070 44812000 */ mtc1 $at, $f4 -/* E27D04 802B6074 3C013F4E */ lui $at, 0x3f4e -/* E27D08 802B6078 34214F76 */ ori $at, $at, 0x4f76 -/* E27D0C 802B607C 44813000 */ mtc1 $at, $f6 -/* E27D10 802B6080 86020016 */ lh $v0, 0x16($s0) -/* E27D14 802B6084 3C01BDCA */ lui $at, 0xbdca -/* E27D18 802B6088 3421233A */ ori $at, $at, 0x233a -/* E27D1C 802B608C 44810000 */ mtc1 $at, $f0 -/* E27D20 802B6090 8604001A */ lh $a0, 0x1a($s0) -/* E27D24 802B6094 3C03800B */ lui $v1, %hi(gCameras) -/* E27D28 802B6098 24631D80 */ addiu $v1, $v1, %lo(gCameras) -/* E27D2C 802B609C A20000B6 */ sb $zero, 0xb6($s0) -/* E27D30 802B60A0 44824000 */ mtc1 $v0, $f8 -/* E27D34 802B60A4 00000000 */ nop -/* E27D38 802B60A8 46804220 */ cvt.s.w $f8, $f8 -/* E27D3C 802B60AC 44064000 */ mfc1 $a2, $f8 -/* E27D40 802B60B0 44844000 */ mtc1 $a0, $f8 -/* E27D44 802B60B4 00000000 */ nop -/* E27D48 802B60B8 46804220 */ cvt.s.w $f8, $f8 -/* E27D4C 802B60BC E6020070 */ swc1 $f2, 0x70($s0) -/* E27D50 802B60C0 E6040074 */ swc1 $f4, 0x74($s0) -/* E27D54 802B60C4 E6060078 */ swc1 $f6, 0x78($s0) -/* E27D58 802B60C8 E600007C */ swc1 $f0, 0x7c($s0) -/* E27D5C 802B60CC 94620002 */ lhu $v0, 2($v1) -/* E27D60 802B60D0 44074000 */ mfc1 $a3, $f8 -/* E27D64 802B60D4 34420001 */ ori $v0, $v0, 1 -/* E27D68 802B60D8 0C00A720 */ jal atan2 -/* E27D6C 802B60DC A4620002 */ sh $v0, 2($v1) -/* E27D70 802B60E0 86020016 */ lh $v0, 0x16($s0) -/* E27D74 802B60E4 8603001A */ lh $v1, 0x1a($s0) -/* E27D78 802B60E8 3C01802B */ lui $at, %hi(D_802B62B0) -/* E27D7C 802B60EC E42062B0 */ swc1 $f0, %lo(D_802B62B0)($at) -/* E27D80 802B60F0 44826000 */ mtc1 $v0, $f12 -/* E27D84 802B60F4 00000000 */ nop -/* E27D88 802B60F8 46806320 */ cvt.s.w $f12, $f12 -/* E27D8C 802B60FC 44837000 */ mtc1 $v1, $f14 -/* E27D90 802B6100 00000000 */ nop -/* E27D94 802B6104 0C038022 */ jal func_800E0088 -/* E27D98 802B6108 468073A0 */ cvt.s.w $f14, $f14 -/* E27D9C 802B610C 3C014190 */ lui $at, 0x4190 -/* E27DA0 802B6110 44811000 */ mtc1 $at, $f2 -/* E27DA4 802B6114 24040001 */ addiu $a0, $zero, 1 -/* E27DA8 802B6118 46020003 */ div.s $f0, $f0, $f2 -/* E27DAC 802B611C 0C03A8CD */ jal subtract_hp -/* E27DB0 802B6120 E6000054 */ swc1 $f0, 0x54($s0) -/* E27DB4 802B6124 0C03A5D8 */ jal open_status_menu_long -/* E27DB8 802B6128 00000000 */ nop -/* E27DBC 802B612C 3C03800A */ lui $v1, %hi(gOverrideFlags) -/* E27DC0 802B6130 2463A650 */ addiu $v1, $v1, %lo(gOverrideFlags) -/* E27DC4 802B6134 8C620000 */ lw $v0, ($v1) -/* E27DC8 802B6138 34420040 */ ori $v0, $v0, 0x40 -/* E27DCC 802B613C AC620000 */ sw $v0, ($v1) -.L802B6140: -/* E27DD0 802B6140 3C01802B */ lui $at, %hi(D_802B62B0) -/* E27DD4 802B6144 C42C62B0 */ lwc1 $f12, %lo(D_802B62B0)($at) -/* E27DD8 802B6148 3C0140C9 */ lui $at, 0x40c9 -/* E27DDC 802B614C 34210FD0 */ ori $at, $at, 0xfd0 -/* E27DE0 802B6150 44810000 */ mtc1 $at, $f0 -/* E27DE4 802B6154 00000000 */ nop -/* E27DE8 802B6158 46006302 */ mul.s $f12, $f12, $f0 -/* E27DEC 802B615C 00000000 */ nop -/* E27DF0 802B6160 27A50010 */ addiu $a1, $sp, 0x10 -/* E27DF4 802B6164 3C0143B4 */ lui $at, 0x43b4 -/* E27DF8 802B6168 44810000 */ mtc1 $at, $f0 -/* E27DFC 802B616C 27A60014 */ addiu $a2, $sp, 0x14 -/* E27E00 802B6170 0C00A82D */ jal sin_cos_rad -/* E27E04 802B6174 46006303 */ div.s $f12, $f12, $f0 -/* E27E08 802B6178 3C030004 */ lui $v1, 4 -/* E27E0C 802B617C 8E020000 */ lw $v0, ($s0) -/* E27E10 802B6180 C6060054 */ lwc1 $f6, 0x54($s0) -/* E27E14 802B6184 00431024 */ and $v0, $v0, $v1 -/* E27E18 802B6188 10400008 */ beqz $v0, .L802B61AC -/* E27E1C 802B618C 00000000 */ nop -/* E27E20 802B6190 3C013FE0 */ lui $at, 0x3fe0 -/* E27E24 802B6194 44811800 */ mtc1 $at, $f3 -/* E27E28 802B6198 44801000 */ mtc1 $zero, $f2 -/* E27E2C 802B619C 46003021 */ cvt.d.s $f0, $f6 -/* E27E30 802B61A0 46220002 */ mul.d $f0, $f0, $f2 -/* E27E34 802B61A4 00000000 */ nop -/* E27E38 802B61A8 462001A0 */ cvt.s.d $f6, $f0 -.L802B61AC: -/* E27E3C 802B61AC C7A00010 */ lwc1 $f0, 0x10($sp) -/* E27E40 802B61B0 46003002 */ mul.s $f0, $f6, $f0 -/* E27E44 802B61B4 00000000 */ nop -/* E27E48 802B61B8 C7A40014 */ lwc1 $f4, 0x14($sp) -/* E27E4C 802B61BC 46043102 */ mul.s $f4, $f6, $f4 -/* E27E50 802B61C0 00000000 */ nop -/* E27E54 802B61C4 C6020028 */ lwc1 $f2, 0x28($s0) -/* E27E58 802B61C8 46001080 */ add.s $f2, $f2, $f0 -/* E27E5C 802B61CC C6000030 */ lwc1 $f0, 0x30($s0) -/* E27E60 802B61D0 820200B6 */ lb $v0, 0xb6($s0) -/* E27E64 802B61D4 46040001 */ sub.s $f0, $f0, $f4 -/* E27E68 802B61D8 E6020028 */ swc1 $f2, 0x28($s0) -/* E27E6C 802B61DC 14400012 */ bnez $v0, .L802B6228 -/* E27E70 802B61E0 E6000030 */ swc1 $f0, 0x30($s0) -/* E27E74 802B61E4 0C038D12 */ jal integrate_gravity -/* E27E78 802B61E8 00000000 */ nop -/* E27E7C 802B61EC C600002C */ lwc1 $f0, 0x2c($s0) -/* E27E80 802B61F0 C6040070 */ lwc1 $f4, 0x70($s0) -/* E27E84 802B61F4 46040000 */ add.s $f0, $f0, $f4 -/* E27E88 802B61F8 44801000 */ mtc1 $zero, $f2 -/* E27E8C 802B61FC 00000000 */ nop -/* E27E90 802B6200 4602203C */ c.lt.s $f4, $f2 -/* E27E94 802B6204 00000000 */ nop -/* E27E98 802B6208 45000021 */ bc1f .L802B6290 -/* E27E9C 802B620C E600002C */ swc1 $f0, 0x2c($s0) -/* E27EA0 802B6210 8E020000 */ lw $v0, ($s0) -/* E27EA4 802B6214 24030001 */ addiu $v1, $zero, 1 -/* E27EA8 802B6218 A20300B6 */ sb $v1, 0xb6($s0) -/* E27EAC 802B621C 34420004 */ ori $v0, $v0, 4 -/* E27EB0 802B6220 080AD8A4 */ j .L802B6290 -/* E27EB4 802B6224 AE020000 */ sw $v0, ($s0) -.L802B6228: -/* E27EB8 802B6228 0C038D36 */ jal func_800E34D8 -/* E27EBC 802B622C 00000000 */ nop -/* E27EC0 802B6230 46000306 */ mov.s $f12, $f0 -/* E27EC4 802B6234 0C038D45 */ jal func_800E3514 -/* E27EC8 802B6238 27A50018 */ addiu $a1, $sp, 0x18 -/* E27ECC 802B623C 8FA40018 */ lw $a0, 0x18($sp) -/* E27ED0 802B6240 04800013 */ bltz $a0, .L802B6290 -/* E27ED4 802B6244 E620002C */ swc1 $f0, 0x2c($s1) -/* E27ED8 802B6248 0C016F6A */ jal get_collider_type_by_id -/* E27EDC 802B624C 00000000 */ nop -/* E27EE0 802B6250 2404000A */ addiu $a0, $zero, 0xa -/* E27EE4 802B6254 0C039769 */ jal set_action_state -/* E27EE8 802B6258 AFA20018 */ sw $v0, 0x18($sp) -/* E27EEC 802B625C 2402003C */ addiu $v0, $zero, 0x3c -/* E27EF0 802B6260 2403F7FF */ addiu $v1, $zero, -0x801 -/* E27EF4 802B6264 A6220010 */ sh $v0, 0x10($s1) -/* E27EF8 802B6268 8E220000 */ lw $v0, ($s1) -/* E27EFC 802B626C 3C04800A */ lui $a0, %hi(gOverrideFlags) -/* E27F00 802B6270 2484A650 */ addiu $a0, $a0, %lo(gOverrideFlags) -/* E27F04 802B6274 A22000BF */ sb $zero, 0xbf($s1) -/* E27F08 802B6278 00431024 */ and $v0, $v0, $v1 -/* E27F0C 802B627C AE220000 */ sw $v0, ($s1) -/* E27F10 802B6280 8C820000 */ lw $v0, ($a0) -/* E27F14 802B6284 2403FFBF */ addiu $v1, $zero, -0x41 -/* E27F18 802B6288 00431024 */ and $v0, $v0, $v1 -/* E27F1C 802B628C AC820000 */ sw $v0, ($a0) -.L802B6290: -/* E27F20 802B6290 8FBF0028 */ lw $ra, 0x28($sp) -/* E27F24 802B6294 8FB10024 */ lw $s1, 0x24($sp) -/* E27F28 802B6298 8FB00020 */ lw $s0, 0x20($sp) -/* E27F2C 802B629C 03E00008 */ jr $ra -/* E27F30 802B62A0 27BD0030 */ addiu $sp, $sp, 0x30 -/* E27F34 802B62A4 00000000 */ nop -/* E27F38 802B62A8 00000000 */ nop -/* E27F3C 802B62AC 00000000 */ nop diff --git a/ver/us/asm/nonmatchings/world/action/sneaky_parasol/func_802B6CF0_E2B3A0.s b/ver/us/asm/nonmatchings/world/action/sneaky_parasol/func_802B6CF0_E2B3A0.s deleted file mode 100644 index 531dec33da..0000000000 --- a/ver/us/asm/nonmatchings/world/action/sneaky_parasol/func_802B6CF0_E2B3A0.s +++ /dev/null @@ -1,38 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_802B6CF0_E2B3A0 -/* E2B3A0 802B6CF0 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* E2B3A4 802B6CF4 3C02802B */ lui $v0, %hi(D_802B6E80) -/* E2B3A8 802B6CF8 24426E80 */ addiu $v0, $v0, %lo(D_802B6E80) -/* E2B3AC 802B6CFC AFBF0014 */ sw $ra, 0x14($sp) -/* E2B3B0 802B6D00 AFB00010 */ sw $s0, 0x10($sp) -/* E2B3B4 802B6D04 C4420020 */ lwc1 $f2, 0x20($v0) -/* E2B3B8 802B6D08 C440001C */ lwc1 $f0, 0x1c($v0) -/* E2B3BC 802B6D0C 46001080 */ add.s $f2, $f2, $f0 -/* E2B3C0 802B6D10 3C014248 */ lui $at, 0x4248 -/* E2B3C4 802B6D14 44810000 */ mtc1 $at, $f0 -/* E2B3C8 802B6D18 3C108011 */ lui $s0, %hi(gPlayerStatus) -/* E2B3CC 802B6D1C 2610EFC8 */ addiu $s0, $s0, %lo(gPlayerStatus) -/* E2B3D0 802B6D20 4602003C */ c.lt.s $f0, $f2 -/* E2B3D4 802B6D24 00000000 */ nop -/* E2B3D8 802B6D28 45010008 */ bc1t .L802B6D4C -/* E2B3DC 802B6D2C E4420020 */ swc1 $f2, 0x20($v0) -/* E2B3E0 802B6D30 3C01C248 */ lui $at, 0xc248 -/* E2B3E4 802B6D34 44810000 */ mtc1 $at, $f0 -/* E2B3E8 802B6D38 00000000 */ nop -/* E2B3EC 802B6D3C 4600103C */ c.lt.s $f2, $f0 -/* E2B3F0 802B6D40 00000000 */ nop -/* E2B3F4 802B6D44 45000002 */ bc1f .L802B6D50 -/* E2B3F8 802B6D48 00000000 */ nop -.L802B6D4C: -/* E2B3FC 802B6D4C E4400020 */ swc1 $f0, 0x20($v0) -.L802B6D50: -/* E2B400 802B6D50 C60000A8 */ lwc1 $f0, 0xa8($s0) -/* E2B404 802B6D54 C44C0020 */ lwc1 $f12, 0x20($v0) -/* E2B408 802B6D58 0C00A6C9 */ jal clamp_angle -/* E2B40C 802B6D5C 460C0300 */ add.s $f12, $f0, $f12 -/* E2B410 802B6D60 E60000A8 */ swc1 $f0, 0xa8($s0) -/* E2B414 802B6D64 8FBF0014 */ lw $ra, 0x14($sp) -/* E2B418 802B6D68 8FB00010 */ lw $s0, 0x10($sp) -/* E2B41C 802B6D6C 03E00008 */ jr $ra diff --git a/ver/us/splat.yaml b/ver/us/splat.yaml index 0c724f9c4d..9845477f53 100644 --- a/ver/us/splat.yaml +++ b/ver/us/splat.yaml @@ -10140,7 +10140,7 @@ segments: overlay: True subsegments: - [0xE2A6B0, c, sneaky_parasol] - - [0xE2B420, data, sneaky_parasol] + - [0xE2B430, data, sneaky_parasol] - [0xE2B440, .rodata, sneaky_parasol] - type: code dir: entity/default diff --git a/ver/us/symbol_addrs.txt b/ver/us/symbol_addrs.txt index 7796f3e0c0..0b93496f1a 100644 --- a/ver/us/symbol_addrs.txt +++ b/ver/us/symbol_addrs.txt @@ -10732,7 +10732,7 @@ D_80244C48_A3E128 = 0x80244C48; // type:data rom:0xA3E128 D_80244C4C_A3E12C = 0x80244C4C; // type:data rom:0xA3E12C D_80245E80_A3F360 = 0x80245E80; // type:data rom:0xA3F360 D_80245EEC_A3F3CC = 0x80245EEC; // type:data rom:0xA3F3CC -func_80240000_A3F740 = 0x80240000; // type:func rom:0xA3F740 +hos_10_SetPlayerSpriteSet2 = 0x80240000; // type:func rom:0xA3F740 hos_10_UnkTexturePanFunc = 0x80240020; // type:func rom:0xA3F760 hos_10_UnkTexturePanFunc2 = 0x80240144; // type:func rom:0xA3F884 func_8024032C_A3FA6C = 0x8024032C; // type:func rom:0xA3FA6C @@ -11274,12 +11274,12 @@ D_802411B8_AB11A8 = 0x802411B8; // type:data rom:0xAB11A8 D_8024121C_AB120C = 0x8024121C; // type:data rom:0xAB120C D_80241220_AB1210 = 0x80241220; // type:data rom:0xAB1210 D_80242160_AB2150 = 0x80242160; // type:data rom:0xAB2150 -func_80240000_AB2170 = 0x80240000; // type:func rom:0xAB2170 +osr_02_SetPlayerSpriteSet2 = 0x80240000; // type:func rom:0xAB2170 func_80240020_AB2190 = 0x80240020; // type:func rom:0xAB2190 func_80240060_AB21D0 = 0x80240060; // type:func rom:0xAB21D0 func_80240120_AB2290 = 0x80240120; // type:func rom:0xAB2290 D_8024253C_AB46AC = 0x8024253C; // type:data rom:0xAB46AC -func_80240000_AB6290 = 0x80240000; // type:func rom:0xAB6290 +osr_03_SetPlayerSpriteSet2 = 0x80240000; // type:func rom:0xAB6290 func_80240020_AB62B0 = 0x80240020; // type:func rom:0xAB62B0 func_80240090_AB6320 = 0x80240090; // type:func rom:0xAB6320 func_802400C4_AB6354 = 0x802400C4; // type:func rom:0xAB6354 @@ -11322,7 +11322,7 @@ kkj_01_UnkFunc16 = 0x80240AD4; // type:func rom:0xAC5C44 func_80240B94_AC5D04 = 0x80240B94; // type:func rom:0xAC5D04 D_80243A10_AC8B80 = 0x80243A10; // type:data rom:0xAC8B80 D_80243A18_AC8B88 = 0x80243A18; // type:data rom:0xAC8B88 -func_80240000_AC9710 = 0x80240000; // type:func rom:0xAC9710 +kkj_03_SetPlayerSpriteSet2 = 0x80240000; // type:func rom:0xAC9710 kkj_03_UnkTexturePanFunc = 0x80240020; // type:func rom:0xAC9730 kkj_03_UnkTexturePanFunc2 = 0x80240144; // type:func rom:0xAC9854 func_80240000_ACAB20 = 0x80240000; // type:func rom:0xACAB20 @@ -11380,7 +11380,7 @@ func_8024089C_AD492C = 0x8024089C; // type:func rom:0xAD492C D_80241E20_AD5EB0 = 0x80241E20; // type:data rom:0xAD5EB0 D_80241E28_AD5EB8 = 0x80241E28; // type:data rom:0xAD5EB8 D_80241E30_AD5EC0 = 0x80241E30; // type:data rom:0xAD5EC0 -func_80240000_AD5ED0 = 0x80240000; // type:func rom:0xAD5ED0 +kkj_13_SetPlayerSpriteSet2 = 0x80240000; // type:func rom:0xAD5ED0 kkj_13_UnkTexturePanFunc = 0x80240020; // type:func rom:0xAD5EF0 kkj_13_UnkTexturePanFunc2 = 0x80240144; // type:func rom:0xAD6014 func_80240330_AD6200 = 0x80240330; // type:func rom:0xAD6200 @@ -11501,7 +11501,7 @@ kkj_20_Call800EB168 = 0x80240584; // type:func rom:0xAFE0C4 kkj_20_UnkFunc36 = 0x802405B4; // type:func rom:0xAFE0F4 func_802405BC_AFE0FC = 0x802405BC; // type:func rom:0xAFE0FC D_80240880_AFE3C0 = 0x80240880; // type:data rom:0xAFE3C0 -func_80240000_B02880 = 0x80240000; // type:func rom:0xB02880 +kkj_23_SetPlayerSpriteSet2 = 0x80240000; // type:func rom:0xB02880 func_80240020_B028A0 = 0x80240020; // type:func rom:0xB028A0 func_80240048_B028C8 = 0x80240048; // type:func rom:0xB028C8 func_80240080_B02900 = 0x80240080; // type:func rom:0xB02900 @@ -11518,7 +11518,7 @@ D_80243CD0_B06550 = 0x80243CD0; // type:data rom:0xB06550 D_80243CD8_B06558 = 0x80243CD8; // type:data rom:0xB06558 D_80243CE0_B06560 = 0x80243CE0; // type:data rom:0xB06560 func_80240000_B06570 = 0x80240000; // type:func rom:0xB06570 -func_80240000_B06A00 = 0x80240000; // type:func rom:0xB06A00 +kkj_25_SetPlayerSpriteSet2 = 0x80240000; // type:func rom:0xB06A00 func_80240020_B06A20 = 0x80240020; // type:func rom:0xB06A20 kkj_25_UnkFunc1 = 0x80240050; // type:func rom:0xB06A50 kkj_25_GetFloorCollider = 0x80240080; // type:func rom:0xB06A80 @@ -18632,7 +18632,7 @@ D_801512D0 = 0x801512D0; // type:data D_801512D4 = 0x801512D4; // type:data D_801512D8 = 0x801512D8; // type:data D_801512DA = 0x801512DA; // type:data -D_801512E0 = 0x801512E0; // type:data +gCurrentTransformGroups = 0x801512E0; // type:data D_801512E4 = 0x801512E4; // type:data gCurrentModelSpecialDlsPtr = 0x801512E8; // gLastCreatedEntityIndex = 0x801512EC; // @@ -20043,7 +20043,7 @@ gScriptIndexList = 0x802DA898; // gScriptIdList = 0x802DAA98; // gScriptListCount = 0x802DAC98; // D_802DACA0 = 0x802DACA0; // type:data -D_802DADA0 = 0x802DADA0; // type:data +gLavaResetList = 0x802DADA0; // type:data D_802DADA4 = 0x802DADA4; // type:data gBattleMeshAnimationList = 0x802DADB0; // size:0x40 gWorldMeshAnimationList = 0x802DADF0; // size:0x40 diff --git a/ver/us/undefined_syms.txt b/ver/us/undefined_syms.txt index 7a3630e78b..054628abde 100644 --- a/ver/us/undefined_syms.txt +++ b/ver/us/undefined_syms.txt @@ -57,8 +57,6 @@ broken_kmr_04_function_addr = 0x80243770; D_802442D0 = 0x802442D0; trd_06_fake_sym = 0x802491C0; jan_05_temp_bss = 0x80247AF0; -D_80244F98_EC7198 = 0x80244F98; -func_802A123C_73153C = 0x802A123C; D_80097E30 = 0x80097E30; D_802AB513 = 0x802AB513; D_802E9904 = 0x802E9904; diff --git a/ver/us/undefined_syms_auto.txt b/ver/us/undefined_syms_auto.txt index dff22393bd..20a12ef9c5 100644 --- a/ver/us/undefined_syms_auto.txt +++ b/ver/us/undefined_syms_auto.txt @@ -1,4 +1,3 @@ -osExceptionPreamble = 0x8006AA00; D_80000000 = 0x80000000; osTvType = 0x80000300; D_80000308 = 0x80000308; @@ -7,10 +6,6 @@ D_80000318 = 0x80000318; D_8000031C = 0x8000031C; D_80026AC7 = 0x80026AC7; D_8004AA85 = 0x8004AA85; -D_80099E40 = 0x80099E40; -D_80099F40 = 0x80099F40; -D_8009A040 = 0x8009A040; -D_8009A140 = 0x8009A140; D_8009A5B0 = 0x8009A5B0; D_8009A5B8 = 0x8009A5B8; D_8009A5C0 = 0x8009A5C0; @@ -476,7 +471,7 @@ D_801512D0 = 0x801512D0; D_801512D4 = 0x801512D4; D_801512D8 = 0x801512D8; D_801512DA = 0x801512DA; -D_801512E0 = 0x801512E0; +gCurrentTransformGroups = 0x801512E0; D_801512E4 = 0x801512E4; gCurrentModelSpecialDlsPtr = 0x801512E8; gLastCreatedEntityIndex = 0x801512EC; @@ -1592,7 +1587,7 @@ gScriptIndexList = 0x802DA898; gScriptIdList = 0x802DAA98; gScriptListCount = 0x802DAC98; D_802DACA0 = 0x802DACA0; -D_802DADA0 = 0x802DADA0; +gLavaResetList = 0x802DADA0; D_802DADA4 = 0x802DADA4; gBattleMeshAnimationList = 0x802DADB0; gWorldMeshAnimationList = 0x802DADF0;