From 08aad505459c8bf864baed91a9c23b2f1ac23acd Mon Sep 17 00:00:00 2001 From: Ethan Roseman Date: Sat, 8 May 2021 14:34:57 +0900 Subject: [PATCH] 50% Functions Decompiled (#292) * part 2 dun * DivActorLevel4 * Dist3D * SetBackgroundAlpha & FreeIcon * update symbol_addrs * UnkBackgroundFunc3 * anudder * UnkFogFunc2 * Disasm most remaining data * model stuff and renames * update symbol_addrs * bss * a5dd0 data migration * entity funcs * render_entities * render_shadows * entity_get_collision_flags * 2 map api * 2 mo * progress * fix 2 non-matchings * clean * pause_draw_menu_label * another * progs * 50% function count * remove commented funcs * symbol_addrs * PR comments --- include/common_structs.h | 27 +- include/functions.h | 4 +- src/102610_len_2330.c | 36 +- src/105700_len_2130.c | 81 +- src/182B30.c | 25 +- src/190A10.c | 4 +- src/1967B0.c | 11 + src/C50A0.c | 17 +- src/a5dd0_len_114e0.c | 817 +++++++++++++++--- src/evt/map_api.c | 291 ++++--- src/pause/1421C0.c | 25 +- src/world/area_tst/tst_11/B1CA50.c | 2 +- src/world/common/reflection.inc.c | 4 +- .../{a5dd0_len_114e0.data.s => E2950.data.s} | 282 ------ .../nonmatchings/182B30/reset_actor_blur.s | 30 - .../asm/nonmatchings/190A10/func_8026220C.s | 18 - .../C50A0/init_item_entity_list.s | 29 - .../entity_get_collision_flags.s | 84 -- .../a5dd0_len_114e0/exec_entity_updatecmd.s | 17 - .../get_background_color_blend.s | 17 - .../a5dd0_len_114e0/render_entities.s | 154 ---- .../a5dd0_len_114e0/render_shadows.s | 100 --- .../set_background_color_blend.s | 13 - ..._updatecmd.s => step_entity_commandlist.s} | 2 +- .../a5dd0_len_114e0/update_entities.s | 269 ------ .../a5dd0_len_114e0/update_shadows.s | 83 -- .../asm/nonmatchings/evt/map_api/ScaleModel.s | 71 -- .../nonmatchings/evt/map_api/SetModelFlags.s | 40 - .../nonmatchings/evt/map_api/SetZoneEnabled.s | 53 -- .../nonmatchings/evt/map_api/TranslateModel.s | 71 -- .../nonmatchings/evt/map_api/func_802C90FC.s | 47 - .../evt/map_api/set_zone_enabled.s | 49 -- .../pause/1421C0/pause_draw_menu_label.s | 60 -- ver/us/splat.yaml | 4 +- ver/us/symbol_addrs.txt | 100 ++- 35 files changed, 1143 insertions(+), 1794 deletions(-) rename ver/us/asm/data/{a5dd0_len_114e0.data.s => E2950.data.s} (67%) delete mode 100644 ver/us/asm/nonmatchings/182B30/reset_actor_blur.s delete mode 100644 ver/us/asm/nonmatchings/190A10/func_8026220C.s delete mode 100644 ver/us/asm/nonmatchings/C50A0/init_item_entity_list.s delete mode 100644 ver/us/asm/nonmatchings/a5dd0_len_114e0/entity_get_collision_flags.s delete mode 100644 ver/us/asm/nonmatchings/a5dd0_len_114e0/exec_entity_updatecmd.s delete mode 100644 ver/us/asm/nonmatchings/a5dd0_len_114e0/get_background_color_blend.s delete mode 100644 ver/us/asm/nonmatchings/a5dd0_len_114e0/render_entities.s delete mode 100644 ver/us/asm/nonmatchings/a5dd0_len_114e0/render_shadows.s delete mode 100644 ver/us/asm/nonmatchings/a5dd0_len_114e0/set_background_color_blend.s rename ver/us/asm/nonmatchings/a5dd0_len_114e0/{step_entity_updatecmd.s => step_entity_commandlist.s} (99%) delete mode 100644 ver/us/asm/nonmatchings/a5dd0_len_114e0/update_entities.s delete mode 100644 ver/us/asm/nonmatchings/a5dd0_len_114e0/update_shadows.s delete mode 100644 ver/us/asm/nonmatchings/evt/map_api/ScaleModel.s delete mode 100644 ver/us/asm/nonmatchings/evt/map_api/SetModelFlags.s delete mode 100644 ver/us/asm/nonmatchings/evt/map_api/SetZoneEnabled.s delete mode 100644 ver/us/asm/nonmatchings/evt/map_api/TranslateModel.s delete mode 100644 ver/us/asm/nonmatchings/evt/map_api/func_802C90FC.s delete mode 100644 ver/us/asm/nonmatchings/evt/map_api/set_zone_enabled.s delete mode 100644 ver/us/asm/nonmatchings/pause/1421C0/pause_draw_menu_label.s diff --git a/include/common_structs.h b/include/common_structs.h index 51a1a5b934..5dc4f0355c 100644 --- a/include/common_structs.h +++ b/include/common_structs.h @@ -315,6 +315,10 @@ typedef struct ScriptInstance { typedef ScriptInstance* ScriptList[MAX_SCRIPTS]; +struct Entity; + +typedef s32 (*EntityCallback)(struct Entity*); + typedef struct Entity { /* 0x00 */ s32 flags; /* 0x04 */ u8 listIndex; @@ -322,7 +326,7 @@ typedef struct Entity { /* 0x06 */ u8 collisionFlags; /* 0x07 */ s8 unk_07; /* 0x08 */ char unk_08; - /* 0x09 */ s8 hasEntityScript; + /* 0x09 */ u8 hasEntityScript; /* 0x0A */ u8 type; /* 0x0B */ u8 alpha; /* 0x0C */ Vec3s aabb; @@ -330,8 +334,8 @@ typedef struct Entity { /* 0x14 */ s16 virtualModelIndex; /* 0x16 */ s16 shadowIndex; /* 0x18 */ s32* scriptReadPos; - /* 0x1C */ UNK_FUN_PTR(updateScriptCallback); - /* 0x20 */ UNK_FUN_PTR(updateMatrixOverride); + /* 0x1C */ EntityCallback updateScriptCallback; + /* 0x20 */ EntityCallback updateMatrixOverride; /* 0x24 */ ScriptInstance* boundScript; /* 0x28 */ Bytecode* boundScriptBytecode; /* 0x2C */ s32* savedReadPos; @@ -368,7 +372,7 @@ typedef struct StaticEntityData { /* 0x08 */ char unk_08[4]; /* 0x0C */ UNK_FUN_PTR(unk_data_func); /* 0x10 */ UNK_PTR unk_data_ptr1; - /* 0x14 */ UNK_PTR unk_data_ptr2; + /* 0x14 */ EntityCallback unk_data_ptr2; /* 0x18 */ s32 dmaStart; /* 0x1C */ s32 dmaEnd; /* 0x20 */ u8 entityType; @@ -756,7 +760,7 @@ typedef struct StaticMove { typedef struct CollisionData { /* 0x00 */ f32* vertices; - /* 0x04 */ Collider* collider_list; + /* 0x04 */ Collider* colliderList; /* 0x08 */ struct ColliderBoundingBox** aabbs; /* 0x0C */ s16 numColliders; /* 0x0E */ char unk_0E[2]; @@ -1125,15 +1129,18 @@ typedef struct PartnerAnimations { typedef struct Shadow { /* 0x00 */ s32 flags; - /* 0x04 */ char unk_04[2]; + /* 0x04 */ u8 listIndex; + /* 0x05 */ u8 unk_05; /* 0x06 */ u8 unk_06; /* 0x07 */ char unk_07; - /* 0x08 */ s16 unk_08; // entity model index? - /* 0x0A */ char unk_0A[6]; + /* 0x08 */ s16 entityModelID; + /* 0x0A */ s16 vertexSegment; + /* 0x0C */ Vtx_tn** vertexArray; /* 0x10 */ struct Vec3f position; /* 0x1C */ struct Vec3f scale; - /* 0x28 */ struct Vec3f unk_28; - /* 0x34 */ char unk_34[0x44]; + /* 0x28 */ struct Vec3f rotation; + /* 0x34 */ char unk_34[0x4]; + /* 0x38 */ Matrix4s transformMatrix; } Shadow; // size = 0x78 typedef Shadow* ShadowList[MAX_SHADOWS]; diff --git a/include/functions.h b/include/functions.h index 760a947b6c..95ee12a6cb 100644 --- a/include/functions.h +++ b/include/functions.h @@ -96,7 +96,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); -void get_model_center_and_size(s32 modelID, f32* centerX, f32* centerY, f32* centerZ, f32* sizeX, f32* sizeY, +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); s32 do_lateral_collision(s32, PlayerStatus*, f32*, f32*, f32*, f32, f32); @@ -229,6 +229,8 @@ 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); + s32 make_item_entity(s32 itemID, f32 x, f32 y, f32 z, s32 itemSpawnMode, s32 pickupDelay, s32 facingAngleSign, s32 pickupVar); s32 make_item_entity_delayed(s32 itemID, f32 x, f32 y, f32 z, s32 itemSpawnMode, s32 pickupDelay, s32 pickupVar); diff --git a/src/102610_len_2330.c b/src/102610_len_2330.c index e51ec0736d..441bd0f8fd 100644 --- a/src/102610_len_2330.c +++ b/src/102610_len_2330.c @@ -1,5 +1,10 @@ #include "common.h" +typedef struct struct802E10F4 { + char unk_0[4]; + s16 angle; +} struct802E10F4; + void create_shadow_callback(Shadow* shadow) { shadow->scale.x = 0.1f; shadow->scale.y = 0.1f; @@ -16,11 +21,6 @@ s32 func_802E0DB0(Shadow* shadow) { INCLUDE_ASM(s32, "102610_len_2330", func_802E0DE0); -typedef struct struct802E10F4 { - char unk_0[4]; - s16 angle; -} struct802E10F4; - void func_802E10F4(Entity* entity) { struct802E10F4* temp; @@ -49,9 +49,8 @@ void save_game_at_player_position(void) { void func_802E1204(Entity* entity) { if (!get_global_flag(SI_SAVE_FLAG(95))) { - s32* temp = &D_802EB390; - *temp = 0; - load_string(0x1D0000, temp); + D_802EB390 = FALSE; + load_string(0x1D0000, &D_802EB390); set_global_flag(SI_SAVE_FLAG(95)); return; } @@ -61,20 +60,16 @@ void func_802E1204(Entity* entity) { } void func_802E1270(Entity* entity) { - s32* temp = &D_802EB390; - - if (*temp != 0) { + if (D_802EB390) { exec_entity_updatecmd(entity); } } void func_802E1298(void) { - s32* temp1 = &D_802EB390; - s32* temp2 = &D_802EB394; - *temp1 = 0; - *temp2 = 0; - D_802EB39C = load_string(0x1D0004, temp2); - D_802EB398 = load_string(0x1E000A, temp1); + D_802EB390 = FALSE; + D_802EB394 = FALSE; + D_802EB39C = load_string(0x1D0004, &D_802EB394); + D_802EB398 = load_string(0x1E000A, &D_802EB390); } void func_802E12F8(void) { @@ -83,16 +78,13 @@ void func_802E12F8(void) { } void func_802E1328(Entity* entity) { - s32* temp = &D_802EB394; - - if (*temp != 0) { + if (D_802EB394) { exec_entity_updatecmd(entity); } } void func_802E1350(Entity* entity) { - s32* temp = &D_802EB390; - if (*temp != 0) { + if (D_802EB390) { if (D_802EB398->currentOption == 1) { set_entity_commandlist(entity, &D_802E99DC); } else { diff --git a/src/105700_len_2130.c b/src/105700_len_2130.c index f844140c83..f58cb10f34 100644 --- a/src/105700_len_2130.c +++ b/src/105700_len_2130.c @@ -13,23 +13,20 @@ void func_802E3E80(Entity* entity) { } void func_802E3E9C(Entity* entity) { - s32 alpha; + s32 alpha = entity->alpha; - alpha = entity->alpha; if (gPlayerStatus.animFlags & 1) { alpha += 32; if (alpha > 192) { alpha = 192; } entity->alpha = alpha; - return; } else { alpha -= 32; if (alpha <= 0) { alpha = 0; } entity->alpha = alpha; - return; } } @@ -46,12 +43,9 @@ void func_802E405C(Entity* entity) { } void func_802E40A0(Entity* entity) { - s32 entityType; - s32 virtualModelIndex; - UNK_PTR ptr; + s32 entityType = get_entity_type(entity->listIndex); - entityType = get_entity_type(entity->listIndex); - if ((entityType == 0x12) || (entityType == 0x14)) { + if (entityType == 0x12 || entityType == 0x14) { play_model_animation(entity->virtualModelIndex, &D_00000094); } else { play_model_animation(entity->virtualModelIndex, &D_00000094_2); @@ -70,11 +64,11 @@ void func_802E4108(Entity* entity) { } void func_802E4154(Entity* entity) { - u16 temp_v1; - UNK_PTR phi_a0; struct802E3F0C* temp = entity->dataBuf; if ((temp->unk_A != 0xFFFF) && get_global_flag(temp->unk_A)) { + UNK_PTR phi_a0; + if (get_entity_type(entity->listIndex) != 0x14) { phi_a0 = &D_802EA07C; } else { @@ -88,61 +82,62 @@ void func_802E4154(Entity* entity) { } void func_802E421C(Entity* entity) { - s32 temp_s2; + s32 entityType = get_entity_type(entity->listIndex); + UNK_PTR entityData = &D_802EA07C; + s32 entityIndex; s32 temp_s0; - s32 temp_v0_2; - s32 temp_v0_5; + s32 entityType2; struct802E3F0C* temp; Entity* entityTemp; Shadow* shadow; - UNK_PTR phi_a0; - temp_v0_2 = get_entity_type(entity->listIndex); - phi_a0 = &D_802EA07C; - if (temp_v0_2 < 0x15) { - phi_a0 = &D_802EA07C; - if (temp_v0_2 >= 0x12) { - phi_a0 = &D_802EA0A0; + if (entityType < 0x15) { + entityData = &D_802EA07C; + if (entityType >= 0x12) { + entityData = &D_802EA0A0; } } - temp_s2 = create_entity(phi_a0, entity->position.x, entity->position.y, entity->position.z, entity->rotation.y, + + entityIndex = create_entity(entityData, entity->position.x, entity->position.y, entity->position.z, entity->rotation.y, 0x80000000); - entityTemp = get_entity_by_index(temp_s2); + entityTemp = get_entity_by_index(entityIndex); entityTemp->flags |= 1; - if ((entity->flags & 0x40000) != 0) { + if (entity->flags & 0x40000) { entityTemp->flags |= 0x40000; } - if ((entity->flags & 4) != 0) { + if (entity->flags & 4) { entityTemp->flags |= 4; } shadow = get_shadow_by_index(entityTemp->shadowIndex); shadow->flags |= 0x400001; temp_s0 = func_80112B20(entity); - temp_v0_5 = get_entity_type(entity->listIndex); - if ((temp_v0_5 == 0x12) || (temp_v0_5 == 0x14)) { - phi_a0 = &D_802EA660; + + entityType2 = get_entity_type(entity->listIndex); + if (entityType2 == 0x12 || entityType2 == 0x14) { + entityData = &D_802EA660; } else if (temp_s0 != 0) { - phi_a0 = &D_802EA618; + entityData = &D_802EA618; } else { - phi_a0 = &D_802EA63C; + entityData = &D_802EA63C; } - entityTemp = get_entity_by_index(create_entity(phi_a0, entity->position.x, entity->position.y, entity->position.z, + entityTemp = get_entity_by_index(create_entity(entityData, entity->position.x, entity->position.y, entity->position.z, entity->rotation.y, 0x80000000)); entityTemp->alpha = entity->alpha; - if (((entity->flags & 1) != 0) || ((u32) entity->alpha < 0xFF)) { + if ((entity->flags & 1) || (entity->alpha < 0xFF)) { entityTemp->alpha = 0x20; } - if ((entity->flags & 0x40000) != 0) { + if (entity->flags & 0x40000) { entityTemp->flags |= 0x40000; } - temp = entityTemp->dataBuf; - temp->unk_12 = temp_s2; - if ((entity->flags & 4) != 0) { + temp = entityTemp->dataBuf; + temp->unk_12 = entityIndex; + + if (entity->flags & 4) { entityTemp->flags |= 4; } @@ -154,11 +149,9 @@ void func_802E421C(Entity* entity) { } void func_802E4484(Entity* entity) { - Shadow* shadow; - - entity->flags = (entity->flags | 1) & ~0x100; - shadow = get_shadow_by_index(entity->shadowIndex); - shadow->flags |= 0x10000001; + entity->flags |= 1; + entity->flags &= ~0x100; + get_shadow_by_index(entity->shadowIndex)->flags |= 0x10000001; } s32 func_802E44CC(Entity* entity) { @@ -171,11 +164,9 @@ s32 func_802E44CC(Entity* entity) { // TODO: new file here? void func_802E44F8(void) { - PlayerStatus* playerStatus = &gPlayerStatus; - disable_player_input(); - playerStatus->currentSpeed = 0.0f; - playerStatus->flags |= 0x800000; + gPlayerStatus.currentSpeed = 0.0f; + gPlayerStatus.flags |= 0x800000; set_action_state(8); gravity_use_fall_params(); } diff --git a/src/182B30.c b/src/182B30.c index 2e1e893606..cd689222ed 100644 --- a/src/182B30.c +++ b/src/182B30.c @@ -28,21 +28,35 @@ void mtx_mirror_y(Matrix4f arg0) { INCLUDE_ASM(s32, "182B30", enable_actor_blur); void disable_actor_blur(Actor* actor) { - ActorPart* part = actor->partsTable; + ActorPart* actorPart = actor->partsTable; - if ((part->idleAnimations != NULL) && !(part->flags & 2)) { - DecorationTable* decorationTable = part->decorationTable; + if ((actorPart->idleAnimations != NULL) && !(actorPart->flags & 2)) { + DecorationTable* decorationTable = actorPart->decorationTable; if (decorationTable->unk_7DB != 0) { decorationTable->unk_7DB--; if (decorationTable->unk_7DB == 0) { - decorationTable->effectType = 0x14; + decorationTable->effectType = 20; } } } } -INCLUDE_ASM(s32, "182B30", reset_actor_blur); +void reset_actor_blur(Actor* actor) { + ActorPart* actorPart = actor->partsTable; + + if ((actorPart->idleAnimations != NULL) && !(actorPart->flags & 2)) { + DecorationTable* decorationTable = actorPart->decorationTable; + + if (decorationTable->unk_7DB != 0) { + decorationTable->unk_7DB--; + if (decorationTable->unk_7DB == 0) { + actor->flags &= ~0x10000000; + decorationTable->effectType = 1; + } + } + } +} void func_80254610(Actor* actor) { ActorPart* actorPart = actor->partsTable; @@ -76,7 +90,6 @@ void enable_player_blur(void) { ActorPart* partsTable = playerActor->partsTable; DecorationTable* decorationTable = partsTable->decorationTable; s32 i; - u8* new_var; decorationTable->effectType = 0; decorationTable->unk_7DB++; diff --git a/src/190A10.c b/src/190A10.c index 497c22cf4c..f35f28d20f 100644 --- a/src/190A10.c +++ b/src/190A10.c @@ -2,4 +2,6 @@ INCLUDE_ASM(s32, "190A10", func_80262130); -INCLUDE_ASM(s32, "190A10", func_8026220C); +s32 func_8026220C(f32 arg0, f32 arg1) { + return (arg1 > 100.0f) ? 28 : 0; +} diff --git a/src/1967B0.c b/src/1967B0.c index f74cdb90dc..218e857f5f 100644 --- a/src/1967B0.c +++ b/src/1967B0.c @@ -2,6 +2,17 @@ INCLUDE_ASM(s32, "1967B0", LoadItemScript); +extern s32 D_80293B80; + +typedef struct BattleItemTableEntry { + /* 0x0 */ u8* romStart; + /* 0x4 */ u8* romEnd; + /* 0x8 */ u8* vramStart; + /* 0xC */ u8* vramEnd; +} BattleItemTableEntry; // size = 0x10 + +extern BattleItemTableEntry gBattleItemTable[]; + INCLUDE_ASM(s32, "1967B0", LoadFreeItemScript); ApiStatus LoadMoveScript(ScriptInstance* script, s32 isInitialCall) { diff --git a/src/C50A0.c b/src/C50A0.c index 78cc7031e8..02d8fa6c53 100644 --- a/src/C50A0.c +++ b/src/C50A0.c @@ -1,6 +1,10 @@ #include "common.h" +extern s32 D_801512F8; +extern s32 D_80155D84; extern s32 D_80155D88; +extern ItemEntity* D_80155DA0; +extern ItemEntity* D_801561A0; ItemEntity** D_801565A0; // item entity list extern s16 D_801565A4; extern s16 D_801565A8; @@ -77,7 +81,18 @@ INCLUDE_ASM(s32, "C50A0", func_80130FAC); INCLUDE_ASM(s32, "C50A0", clear_item_entity_data); -INCLUDE_ASM(s32, "C50A0", init_item_entity_list); +void init_item_entity_list(void) { + if (!gGameStatusPtr->isBattle) { + D_801565A0 = &D_80155DA0; + } else { + D_801565A0 = &D_801561A0; + } + + D_801565A4 = 0; + D_801565A8 = 0; + D_801512F8 = 0; + D_80155D84 = 0; +} INCLUDE_ASM(s32, "C50A0", func_80131128); diff --git a/src/a5dd0_len_114e0.c b/src/a5dd0_len_114e0.c index cb06bf12b7..abd1f89749 100644 --- a/src/a5dd0_len_114e0.c +++ b/src/a5dd0_len_114e0.c @@ -18,32 +18,467 @@ typedef struct RenderTaskEntry { /* 0x0C */ void (*appendGfx)(void*); } RenderTaskEntry; // size = 0x10 +typedef struct GameMode { + /* 0x00 */ u16 flags; + /* 0x04 */ void (*init)(void); + /* 0x08 */ void (*step)(struct GameMode*); + /* 0x0C */ UNK_FUN_PTR(unk_0C); + /* 0x10 */ void (*render)(void); + /* 0x14 */ void (*renderAux)(void); ///< @see func_80112FC4 +} GameMode; // size = 0x18 + typedef Model* SmallModelList[4]; -extern SmallModelList* D_801512E0; +extern s32 D_8014B7F8[]; +extern s32 D_8014B820[]; +extern s32 D_8014B848[]; +extern s32 D_8014B870[]; +extern s32 D_8014B898[]; +extern s32 D_8014B8C0[]; +extern s32 D_8014B8E8[]; +extern s32 D_8014B910[]; +extern s32 D_8014B938[]; +extern s32 D_8014B960[]; +extern s32 D_8014B988[]; +extern s32 D_8014B9B0[]; +extern s32 D_8014B9D8[]; +extern s32 D_8014BA00[]; +extern s32 D_8014BA20[]; +extern s32 D_8014BA48[]; +extern s32 D_8014BA70[]; +extern s32 D_8014BA98[]; +extern s32 D_8014BAC0[]; +extern s32 D_8014BAE8[]; +extern s32 D_8014BB10[]; +extern s32 D_8014BB38[]; +extern s32 D_8014BB60[]; +extern s32 D_8014BB88[]; +extern s32 D_8014BBB0[]; +extern s32 D_8014BBD8[]; +extern s32 D_8014BC00[]; +extern s32 D_8014BC28[]; +extern s32 D_8014BC50[]; +extern s32 D_8014BC78[]; +extern s32 D_8014BCA0[]; +extern s32 D_8014BCC8[]; +extern s32 D_8014BCF8[]; +extern s32 D_8014BD18[]; +extern s32 D_8014BD40[]; +extern s32 D_8014BD68[]; +extern s32 D_8014BD88[]; +extern s32 D_8014BDB0[]; +extern s32 D_8014BDD8[]; +extern s32 D_8014BE00[]; +extern s32 D_8014BE28[]; +extern s32 D_8014BE50[]; +extern s32 D_8014BE78[]; +extern s32 D_8014BEA0[]; +extern s32 D_8014BEC8[]; +extern s32 D_8014BEF0[]; +extern s32 D_8014BF18[]; +extern s32 D_8014BF40[]; +extern s32 D_8014BF68[]; +extern s32 D_8014BF90[]; +extern s32 D_8014BFB8[]; +extern s32 D_8014BFE0[]; +extern s32 D_8014C008[]; +extern s32 D_8014C028[]; +extern s32 D_8014C050[]; +extern s32 D_8014C078[]; +extern s32 D_8014C098[]; +extern s32 D_8014C0C0[]; +extern s32 D_8014C0E8[]; +extern s32 D_8014C110[]; +extern s32 D_8014C138[]; +extern s32 D_8014C160[]; + +s32 D_8014AFB0 = 0xFF; + +s32 D_8014AFB4[] = {0, 0, 0}; + +s32* D_8014AFC0[] = { D_8014B7F8, D_8014B910, D_8014B820, D_8014B938, D_8014B848, D_8014B960, D_8014B870, D_8014B988, D_8014B898, D_8014BA20, D_8014B9B0, D_8014BAC0, D_8014B8C0, D_8014B9D8, D_8014B8E8, D_8014BA00 }; + +s32* D_8014B000[] = { D_8014BB60, D_8014BC78, D_8014BB88, D_8014BCA0, D_8014BBB0, D_8014BCC8, D_8014BBD8, D_8014BCF8, D_8014BC00, D_8014BD88, D_8014BD18, D_8014BC28, D_8014BD40, D_8014BC50, D_8014BD68, D_8014BE78, D_8014BF90, D_8014BEA0, D_8014BFB8, D_8014BEC8, D_8014BFE0, D_8014BEF0, D_8014C008, D_8014BF18, D_8014C098, D_8014C028, D_8014BF40, D_8014C050, D_8014BF68, D_8014C078, D_8014BA48, D_8014BA70, D_8014BA98, D_8014BDB0, D_8014BDD8, D_8014BE00, D_8014C0C0, D_8014C0E8, D_8014C110, D_8014BB10, D_8014BB38, D_8014BE28, D_8014BE50, D_8014C138, D_8014C160, NULL }; + +s32 D_8014B0B8 = 0xFCFFFFFF; + +s32 D_8014B0BC[] = { 0xFFFE793C, 0xFCFFFFFF, 0xFFFE7838, 0xFCFFFFFF, 0xFFFE7838, 0xFC457FFF, 0xFFFDF838, 0xFC41FFFF, 0xFFFEF838, 0xFC121824, 0xFF33FFFF, 0xFC127FFF, 0xFFFFF238, 0xFC1219FF, 0xFFFFFE38, 0xFC127E0A, 0xF3FFF238, 0xFC121803, 0xFFFFFF78, 0xFC147E28, 0x44FE793C, 0xFC147FFF, 0x4FFE7838, 0xFC147FFF, 0x4FFE7838, 0xFC147E0A, 0x4FFE72F8, 0xFC147E03, 0x4FFE7978, 0xFCFFFFFF, 0xFFFCF279, 0xFCFFFFFF, 0xFFFCF238, 0xFCFFFFFF, 0xFFFCF238, 0xFC157FFF, 0xFFFDF238, 0xFCFFFE03, 0xFFFCF378, 0xFC26A004, 0x1F1093FF, 0xFC26A004, 0x1FFC93F8, 0xFC26A004, 0x1F1093FF, 0xFC26A004, 0x1FFC92F8, 0xFC26A003, 0x1FFC9378, 0xFC26A004, 0x1F1093FF, 0xFC26A004, 0x1FFC93F8, 0xFC26A004, 0x1F1093FF, 0xFC26A004, 0x1FFC92F8, 0xFC26A003, 0x1FFC9378, 0xFC26A004, 0x1F1093FF, 0xFC26A004, 0x1FFC93F8, 0xFC26A004, 0x1F1093FF, 0xFC26A004, 0x1FFC92F8, 0xFC26A003, 0x1FFC9378, 0xFC20A204, 0xFF13FFFF, 0xFC111404, 0xFFFFFFF8, 0xFC20A204, 0xFF13FFFF, 0xFC20A204, 0xFF13FFFF, 0xFC20A203, 0xFF13FF7F, 0xFC20A204, 0xFF13FFFF, 0xFC111404, 0xFFFFFFF8, 0xFC20A204, 0xFF13FFFF, 0xFC20A204, 0xFF13FFFF, 0xFC20A203, 0xFF13FF7F, 0xFC20A204, 0xFF13FFFF, 0xFC111404, 0xFFFFFFF8, 0xFC20A204, 0xFF13FFFF, 0xFC20A204, 0xFF13FFFF, 0xFC20A203, 0xFF13FF7F, 0xFC20A204, 0xFF13FFFF, 0xFC111404, 0xFFFFFFF8, 0xFC20A204, 0xFF13FFFF, 0xFC20A204, 0xFF13FFFF, 0xFC20A203, 0xFF13FF7F, 0xFC20A204, 0xFF13FFFF, 0xFC111404, 0xFFFFFFF8, 0xFC20A204, 0xFF13FFFF, 0xFC20A204, 0xFF13FFFF, 0xFC20A203, 0xFF13FF7F, 0xFC20A204, 0xFF13FFFF, 0xFC111404, 0xFFFFFFF8, 0xFC20A204, 0xFF13FFFF, 0xFC20A204, 0xFF13FFFF, 0xFC20A203, 0xFF13FF7F, 0xFCFF99FF, 0xFFFFAF38, 0xFCFF99FF, 0xFFFFAF38, 0xFCFF99FF, 0xFFFFAF38, 0xFCFF99FF, 0xFFFFAF38, 0xFCFF9883, 0xFFFFAF78, 0xFC15FFFF, 0x2FFD7238, 0xFC15FFFF, 0x2FFD7238, 0xFC15FFFF, 0x2FFD7238, 0xFC15FFFF, 0x2FFD7238, 0xFC15FE03, 0x2FFD7378, 0xFC61E4C1, 0x12FC9238, 0xFC61E4C1, 0x12FC9238, 0xFC61E4C1, 0x12FC9238, 0xFC61E4C1, 0x12FC9238, 0xFC61E4C1, 0x12FC9238, 0xFC61FEC3, 0x11FCF279, 0xFC61FFFF, 0x1FFCF238, 0xFC61FFFF, 0x1FFCF238, 0xFC61FFFF, 0x1FFCF238, 0xFC61FE03, 0x1FFCF378, 0xFC10E228, 0x40C8A449, 0xFC10E228, 0x40C8A449, 0xFC10E228, 0x40C8A449, 0xFC10E228, 0x40C8A449, 0xFC10E228, 0x40C8A449, 0xFC75FEEB, 0xFFFFFDFE, 0xFC75FEEB, 0xFFFFFDFE, 0xFC75FEEB, 0xFFFFFDFE, 0xFC75FEEB, 0xFFFFFDFE, 0xFC75FEEB, 0xFFFFFDFE, 0xFC75FEEB, 0xFFFFFDFE, 0xFC75FEEB, 0xFFFFFDFE, 0xFC75FEEB, 0xFFFFFDFE, 0xFC75FEEB, 0xFFFFFDFE, 0xFC75FEEB, 0xFFFFFDFE, 0xFC75FEEB, 0xFFFFFDFE, 0xFC75FEEB, 0xFFFFFDFE, 0xFC75FEEB, 0xFFFFFDFE, 0xFC75FEEB, 0xFFFFFDFE, 0xFC75FEEB, 0xFFFFFDFE, }; + +s32 D_8014B400 = 0xFCFFFFFF; + +s32 D_8014B404[] = { 0xFFFE793C, 0xFCFFFFFF, 0xFFFE7838, 0xFCFFFFFF, 0xFFFE7838, 0xFC457FFF, 0xFFFDF838, 0xFC41FFFF, 0xFFFEF838, 0xFC127E24, 0xFFFFF3F9, 0xFC127FFF, 0xFFFFF238, 0xFC127FFF, 0xFFFFF238, 0xFC127E0A, 0xF3FFF238, 0xFC127E03, 0xFFFFF378, 0xFC147E28, 0x44FE793C, 0xFC147FFF, 0x4FFE7838, 0xFC147FFF, 0x4FFE7838, 0xFC147E0A, 0x4FFE72F8, 0xFC147E03, 0x4FFE7978, 0xFCFFFFFF, 0xFFFCF279, 0xFCFFFFFF, 0xFFFCF238, 0xFCFFFFFF, 0xFFFCF238, 0xFC157FFF, 0xFFFDF238, 0xFCFFFE03, 0xFFFCF378, 0xFC26A004, 0x1FFC93FC, 0xFC26A004, 0x1FFC93F8, 0xFC26A004, 0x1FFC93FC, 0xFC26A004, 0x1FFC92F8, 0xFC26A003, 0x1FFC9378, 0xFC26A004, 0x1F1093FF, 0xFC26A004, 0x1FFC93F8, 0xFC26A004, 0x1F1093FF, 0xFC26A004, 0x1FFC92F8, 0xFC26A003, 0x1FFC9378, 0xFC26A004, 0x1F1093FF, 0xFC26A004, 0x1FFC93F8, 0xFC26A004, 0x1F1093FF, 0xFC26A004, 0x1FFC92F8, 0xFC26A003, 0x1FFC9378, 0xFC20A204, 0xFFFFFFF8, 0xFC111404, 0xFFFFFFF8, 0xFC20A204, 0xFFFFFFF8, 0xFC20A204, 0xFFFFFFF8, 0xFC20A203, 0xFF13FF7F, 0xFC20A204, 0xFFFFFFF8, 0xFC111404, 0xFFFFFFF8, 0xFC20A204, 0xFFFFFFF8, 0xFC20A204, 0xFFFFFFF8, 0xFC20A203, 0xFFFFFF78, 0xFC20A204, 0xFFFFFFF8, 0xFC111404, 0xFFFFFFF8, 0xFC20A204, 0xFFFFFFF8, 0xFC20A204, 0xFFFFFFF8, 0xFC20A203, 0xFFFFFF78, 0xFC20A204, 0xFFFFFFF8, 0xFC111404, 0xFFFFFFF8, 0xFC20A204, 0xFFFFFFF8, 0xFC20A204, 0xFFFFFFF8, 0xFC20A203, 0xFFFFFF78, 0xFC20A204, 0xFFFFFFF8, 0xFC111404, 0xFFFFFFF8, 0xFC20A204, 0xFFFFFFF8, 0xFC20A204, 0xFFFFFFF8, 0xFC20A203, 0xFFFFFF78, 0xFC20A204, 0xFFFFFFF8, 0xFC111404, 0xFFFFFFF8, 0xFC20A204, 0xFFFFFFF8, 0xFC20A204, 0xFFFFFFF8, 0xFC20A203, 0xFFFFFF78, 0xFCFF99FF, 0xFFFFAF38, 0xFCFF99FF, 0xFFFFAF38, 0xFCFF99FF, 0xFFFFAF38, 0xFCFF99FF, 0xFFFFAF38, 0xFCFF9883, 0xFFFFAF78, 0xFC15FFFF, 0x2FFD7238, 0xFC15FFFF, 0x2FFD7238, 0xFC15FFFF, 0x2FFD7238, 0xFC15FFFF, 0x2FFD7238, 0xFC15FE03, 0x2FFD7378, 0xFC61E4C1, 0x12FC9238, 0xFC61E4C1, 0x12FC9238, 0xFC61E4C1, 0x12FC9238, 0xFC61E4C1, 0x12FC9238, 0xFC61E4C1, 0x12FC9238, 0xFC61FEC3, 0x11FCF279, 0xFC61FFFF, 0x1FFCF238, 0xFC61FFFF, 0x1FFCF238, 0xFC61FFFF, 0x1FFCF238, 0xFC61FE03, 0x1FFCF378, 0xFC10E228, 0x40C8A449, 0xFC10E228, 0x40C8A449, 0xFC10E228, 0x40C8A449, 0xFC10E228, 0x40C8A449, 0xFC10E228, 0x40C8A449, 0xFC75FEEB, 0xFFFFFDFE, 0xFC75FEEB, 0xFFFFFDFE, 0xFC75FEEB, 0xFFFFFDFE, 0xFC75FEEB, 0xFFFFFDFE, 0xFC75FEEB, 0xFFFFFDFE, 0xFC75FEEB, 0xFFFFFDFE, 0xFC75FEEB, 0xFFFFFDFE, 0xFC75FEEB, 0xFFFFFDFE, 0xFC75FEEB, 0xFFFFFDFE, 0xFC75FEEB, 0xFFFFFDFE, 0xFC75FEEB, 0xFFFFFDFE, 0xFC75FEEB, 0xFFFFFDFE, 0xFC75FEEB, 0xFFFFFDFE, 0xFC75FEEB, 0xFFFFFDFE, 0xFC75FEEB, 0xFFFFFDFE, }; + +s32 D_8014B748 = 0x8028E000; + +s8 D_8014B74C = 0; +s8 D_8014B74D = 0; +s8 D_8014B74E = 0; +s8 D_8014B74F = 0; +s8 D_8014B750 = 0; +s8 D_8014B751 = 0; +s8 D_8014B752 = 0; +s8 D_8014B753 = 0; +s8 D_8014B754 = 0; +s8 D_8014B755 = 0; +s8 D_8014B756 = 0; +s8 D_8014B757 = 0; +s32 D_8014B758 = 950; +s32 D_8014B75C = 1000; +s8 D_8014B760 = 0xFF; +s8 D_8014B761 = 0xFF; +s8 D_8014B762 = 0xFF; +s8 D_8014B763 = 0; +s8 D_8014B764 = 0; +s8 D_8014B765 = 0; +s8 D_8014B766 = 0; +s8 D_8014B767 = 0; + +Matrix4s D_8014B768 = { + .whole = { + {1, 0, 0, 0}, + {0, 1, 0, 0}, + {0, 0, 1, 0}, + {0, 0, 0, 1} + }, + .frac = { + {0, 0, 0, 0}, + {0, 0, 0, 0}, + {0, 0, 0, 0}, + {0, 0, 0, 0} + } +}; + +s32 D_8014B7A8[] = { 0x00000006, 0x00000000, 0x00000005, 0x00020000, 0x00000004, 0x00030000, 0x00000003, 0x00038000, 0x00000002, 0x0003C000, 0x00000001, 0x0003E000, 0x00000000, 0x0003F000, 0x00000000, 0x0003F800, 0x00000000, 0x00000000, }; + +s32 D_8014B7F0[] = { 0x00000000, 0x00000000, }; + +s32 D_8014B7F8[] = { 0xE200001C, 0x00552078, 0xE3000A01, 0x00000000, 0xD9C0F9FB, 0x00000000, 0xD9FFFFFF, 0x00220405, 0xDF000000, 0x00000000, }; + +s32 D_8014B820[] = { 0xE200001C, 0x00552D58, 0xE3000A01, 0x00000000, 0xD9C0F9FB, 0x00000000, 0xD9FFFFFF, 0x00220405, 0xDF000000, 0x00000000, }; + +s32 D_8014B848[] = { 0xE200001C, 0x00552478, 0xE3000A01, 0x00000000, 0xD9C0F9FB, 0x00000000, 0xD9FFFFFF, 0x00220405, 0xDF000000, 0x00000000, }; + +s32 D_8014B870[] = { 0xE200001C, 0x00553078, 0xE3000A01, 0x00000000, 0xD9C0F9FB, 0x00000000, 0xD9FFFFFF, 0x00220005, 0xDF000000, 0x00000000, }; + +s32 D_8014B898[] = { 0xE200001C, 0x005049D8, 0xE3000A01, 0x00000000, 0xD9C0F9FB, 0x00000000, 0xD9FFFFFF, 0x00220005, 0xDF000000, 0x00000000, }; + +s32 D_8014B8C0[] = { 0xE200001C, 0x00504DD8, 0xE3000A01, 0x00000000, 0xD9C0F9FB, 0x00000000, 0xD9FFFFFF, 0x00220005, 0xDF000000, 0x00000000, }; + +s32 D_8014B8E8[] = { 0xE200001C, 0x005045D8, 0xE3000A01, 0x00000000, 0xD9C0F9FB, 0x00000000, 0xD9FFFFFF, 0x00220005, 0xDF000000, 0x00000000, }; + +s32 D_8014B910[] = { 0xE200001C, 0x00552230, 0xE3000A01, 0x00000000, 0xD9C0F9FB, 0x00000000, 0xD9FFFFFF, 0x00220405, 0xDF000000, 0x00000000, }; + +s32 D_8014B938[] = { 0xE200001C, 0x00552E10, 0xE3000A01, 0x00000000, 0xD9C0F9FB, 0x00000000, 0xD9FFFFFF, 0x00220405, 0xDF000000, 0x00000000, }; + +s32 D_8014B960[] = { 0xE200001C, 0x00552478, 0xD9C0F9FB, 0x00000000, 0xD9FFFFFF, 0x00220405, 0xFCFFFFFF, 0xFFFE793C, 0xDF000000, 0x00000000, }; + +s32 D_8014B988[] = { 0xE200001C, 0x00553078, 0xE3000A01, 0x00000000, 0xD9C0F9FB, 0x00000000, 0xD9FFFFFF, 0x00220405, 0xDF000000, 0x00000000, }; + +s32 D_8014B9B0[] = { 0xE200001C, 0x00504A50, 0xE3000A01, 0x00000000, 0xD9C0F9FB, 0x00000000, 0xD9FFFFFF, 0x00220005, 0xDF000000, 0x00000000, }; + +s32 D_8014B9D8[] = { 0xE200001C, 0x00504F50, 0xE3000A01, 0x00000000, 0xD9C0F9FB, 0x00000000, 0xD9FFFFFF, 0x00220005, 0xDF000000, 0x00000000, }; + +s32 D_8014BA00[] = { 0xE3000A01, 0x00000000, 0xD9C0F9FB, 0x00000000, 0xD9FFFFFF, 0x00220005, 0xDF000000, 0x00000000, }; + +s32 D_8014BA20[] = { 0xE200001C, 0x005049F8, 0xE3000A01, 0x00000000, 0xD9C0F9FB, 0x00000000, 0xD9FFFFFF, 0x00220005, 0xDF000000, 0x00000000, }; + +s32 D_8014BA48[] = { 0xE200001C, 0x00552048, 0xE3000A01, 0x00000000, 0xD9C0F9FA, 0x00000000, 0xD9FFFFFF, 0x00220404, 0xDF000000, 0x00000000, }; + +s32 D_8014BA70[] = { 0xE200001C, 0x00553048, 0xE3000A01, 0x00000000, 0xD9C0F9FA, 0x00000000, 0xD9FFFFFF, 0x00220004, 0xDF000000, 0x00000000, }; + +s32 D_8014BA98[] = { 0xE200001C, 0x005041C8, 0xE3000A01, 0x00000000, 0xD9C0F9FA, 0x00000000, 0xD9FFFFFF, 0x00220004, 0xDF000000, 0x00000000, }; + +s32 D_8014BAC0[] = { 0xE200001C, 0x005049F8, 0xE3000A01, 0x00000000, 0xD9C0F9FB, 0x00000000, 0xD9FFFFFF, 0x00220005, 0xDF000000, 0x00000000, }; + +s32 D_8014BAE8[] = { 0xE200001C, 0x00504B40, 0xE3000A01, 0x00000000, 0xD9C0F9FB, 0x00000000, 0xD9FFFFFF, 0x00220005, 0xDF000000, 0x00000000, }; + +s32 D_8014BB10[] = { 0xE200001C, 0x00504B50, 0xE3000A01, 0x00000000, 0xD9C0F9FB, 0x00000000, 0xD9FFFFFF, 0x00220005, 0xDF000000, 0x00000000, }; + +s32 D_8014BB38[] = { 0xE200001C, 0x00504340, 0xE3000A01, 0x00000000, 0xD9C0F9FB, 0x00000000, 0xD9FFFFFF, 0x00220005, 0xDF000000, 0x00000000, }; + +s32 D_8014BB60[] = { 0xE200001C, 0x0C192078, 0xE3000A01, 0x00100000, 0xD9C0F9FB, 0x00000000, 0xD9FFFFFF, 0x00220405, 0xDF000000, 0x00000000, }; + +s32 D_8014BB88[] = { 0xE200001C, 0x0C192D58, 0xE3000A01, 0x00100000, 0xD9C0F9FB, 0x00000000, 0xD9FFFFFF, 0x00220405, 0xDF000000, 0x00000000, }; + +s32 D_8014BBB0[] = { 0xE200001C, 0x0C192478, 0xE3000A01, 0x00100000, 0xD9C0F9FB, 0x00000000, 0xD9FFFFFF, 0x00220405, 0xDF000000, 0x00000000, }; + +s32 D_8014BBD8[] = { 0xE200001C, 0x0C193078, 0xE3000A01, 0x00100000, 0xD9C0F9FB, 0x00000000, 0xD9FFFFFF, 0x00220005, 0xDF000000, 0x00000000, }; + +s32 D_8014BC00[] = { 0xE200001C, 0x0C1849D8, 0xE3000A01, 0x00100000, 0xD9C0F9FB, 0x00000000, 0xD9FFFFFF, 0x00220005, 0xDF000000, 0x00000000, }; + +s32 D_8014BC28[] = { 0xE200001C, 0x0C184DD8, 0xE3000A01, 0x00100000, 0xD9C0F9FB, 0x00000000, 0xD9FFFFFF, 0x00220005, 0xDF000000, 0x00000000, }; + +s32 D_8014BC50[] = { 0xE200001C, 0x0C1845D8, 0xE3000A01, 0x00100000, 0xD9C0F9FB, 0x00000000, 0xD9FFFFFF, 0x00220005, 0xDF000000, 0x00000000, }; + +s32 D_8014BC78[] = { 0xE200001C, 0x0C192230, 0xE3000A01, 0x00100000, 0xD9C0F9FB, 0x00000000, 0xD9FFFFFF, 0x00220405, 0xDF000000, 0x00000000, }; + +s32 D_8014BCA0[] = { 0xE200001C, 0x0C192E10, 0xE3000A01, 0x00100000, 0xD9C0F9FB, 0x00000000, 0xD9FFFFFF, 0x00220405, 0xDF000000, 0x00000000, }; + +s32 D_8014BCC8[] = { 0xE200001C, 0x0C192478, 0xE3000A01, 0x00100000, 0xD9C0F9FB, 0x00000000, 0xD9FFFFFF, 0x00220405, 0xFCFFFFFF, 0xFFFE793C, 0xDF000000, 0x00000000, }; + +s32 D_8014BCF8[] = { 0xE200001C, 0x0C193078, 0xE3000A01, 0x00100000, 0xD9C0F9FB, 0x00000000, 0xDF000000, 0x00000000, }; + +s32 D_8014BD18[] = { 0xE200001C, 0x0C184A50, 0xE3000A01, 0x00100000, 0xD9C0F9FB, 0x00000000, 0xD9FFFFFF, 0x00220005, 0xDF000000, 0x00000000, }; + +s32 D_8014BD40[] = { 0xE200001C, 0x0C184E50, 0xE3000A01, 0x00100000, 0xD9C0F9FB, 0x00000000, 0xD9FFFFFF, 0x00220005, 0xDF000000, 0x00000000, }; + +s32 D_8014BD68[] = { 0xE3000A01, 0x00100000, 0xD9C0F9FB, 0x00000000, 0xD9FFFFFF, 0x00220005, 0xDF000000, 0x00000000, }; + +s32 D_8014BD88[] = { 0xE200001C, 0x0C1849D8, 0xE3000A01, 0x00100000, 0xD9C0F9FB, 0x00000000, 0xD9FFFFFF, 0x00220005, 0xDF000000, 0x00000000, }; + +s32 D_8014BDB0[] = { 0xE200001C, 0x0C192048, 0xE3000A01, 0x00100000, 0xD9C0F9FA, 0x00000000, 0xD9FFFFFF, 0x00220404, 0xDF000000, 0x00000000, }; + +s32 D_8014BDD8[] = { 0xE200001C, 0x0C193048, 0xE3000A01, 0x00100000, 0xD9C0F9FA, 0x00000000, 0xD9FFFFFF, 0x00220004, 0xDF000000, 0x00000000, }; + +s32 D_8014BE00[] = { 0xE200001C, 0x0C1841C8, 0xE3000A01, 0x00100000, 0xD9C0F9FA, 0x00000000, 0xD9FFFFFF, 0x00220004, 0xDF000000, 0x00000000, }; + +s32 D_8014BE28[] = { 0xE200001C, 0x0C184B50, 0xE3000A01, 0x00100000, 0xD9C0F9FB, 0x00000000, 0xD9FFFFFF, 0x00220005, 0xDF000000, 0x00000000, }; + +s32 D_8014BE50[] = { 0xE200001C, 0x0C184340, 0xE3000A01, 0x00100000, 0xD9C0F9FB, 0x00000000, 0xD9FFFFFF, 0x00220005, 0xDF000000, 0x00000000, }; + +s32 D_8014BE78[] = { 0xE200001C, 0xC8112078, 0xE3000A01, 0x00100000, 0xD9C0F9FB, 0x00000000, 0xD9FFFFFF, 0x00230405, 0xDF000000, 0x00000000, }; + +s32 D_8014BEA0[] = { 0xE200001C, 0xC8112D58, 0xE3000A01, 0x00100000, 0xD9C0F9FB, 0x00000000, 0xD9FFFFFF, 0x00230405, 0xDF000000, 0x00000000, }; + +s32 D_8014BEC8[] = { 0xE200001C, 0xC8112478, 0xE3000A01, 0x00100000, 0xD9C0F9FB, 0x00000000, 0xD9FFFFFF, 0x00230405, 0xDF000000, 0x00000000, }; + +s32 D_8014BEF0[] = { 0xE200001C, 0xC8113078, 0xE3000A01, 0x00100000, 0xD9C0F9FB, 0x00000000, 0xD9FFFFFF, 0x00230005, 0xDF000000, 0x00000000, }; + +s32 D_8014BF18[] = { 0xE200001C, 0xC81049D8, 0xE3000A01, 0x00100000, 0xD9C0F9FB, 0x00000000, 0xD9FFFFFF, 0x00230005, 0xDF000000, 0x00000000, }; + +s32 D_8014BF40[] = { 0xE200001C, 0xC8104DD8, 0xE3000A01, 0x00100000, 0xD9C0F9FB, 0x00000000, 0xD9FFFFFF, 0x00230005, 0xDF000000, 0x00000000, }; + +s32 D_8014BF68[] = { 0xE200001C, 0xC81045D8, 0xE3000A01, 0x00100000, 0xD9C0F9FB, 0x00000000, 0xD9FFFFFF, 0x00230005, 0xDF000000, 0x00000000, }; + +s32 D_8014BF90[] = { 0xE200001C, 0xC8112230, 0xE3000A01, 0x00100000, 0xD9C0F9FB, 0x00000000, 0xD9FFFFFF, 0x00230405, 0xDF000000, 0x00000000, }; + +s32 D_8014BFB8[] = { 0xE200001C, 0xC8112E10, 0xE3000A01, 0x00100000, 0xD9C0F9FB, 0x00000000, 0xD9FFFFFF, 0x00230405, 0xDF000000, 0x00000000, }; + +s32 D_8014BFE0[] = { 0xE200001C, 0xC8112478, 0xE3000A01, 0x00100000, 0xD9C0F9FB, 0x00000000, 0xD9FFFFFF, 0x00230405, 0xDF000000, 0x00000000, }; + +s32 D_8014C008[] = { 0xE200001C, 0xC8113078, 0xE3000A01, 0x00100000, 0xD9C0F9FB, 0x00000000, 0xDF000000, 0x00000000, }; + +s32 D_8014C028[] = { 0xE200001C, 0xC8104A50, 0xE3000A01, 0x00100000, 0xD9C0F9FB, 0x00000000, 0xD9FFFFFF, 0x00230005, 0xDF000000, 0x00000000, }; + +s32 D_8014C050[] = { 0xE200001C, 0xC8104E50, 0xE3000A01, 0x00100000, 0xD9C0F9FB, 0x00000000, 0xD9FFFFFF, 0x00230005, 0xDF000000, 0x00000000, }; + +s32 D_8014C078[] = { 0xE3000A01, 0x00100000, 0xD9C0F9FB, 0x00000000, 0xD9FFFFFF, 0x00230005, 0xDF000000, 0x00000000, }; + +s32 D_8014C098[] = { 0xE200001C, 0xC81049D8, 0xE3000A01, 0x00100000, 0xD9C0F9FB, 0x00000000, 0xD9FFFFFF, 0x00230005, 0xDF000000, 0x00000000, }; + +s32 D_8014C0C0[] = { 0xE200001C, 0xC8112048, 0xE3000A01, 0x00100000, 0xD9C0F9FA, 0x00000000, 0xD9FFFFFF, 0x00230404, 0xDF000000, 0x00000000, }; + +s32 D_8014C0E8[] = { 0xE200001C, 0xC8113048, 0xE3000A01, 0x00100000, 0xD9C0F9FA, 0x00000000, 0xD9FFFFFF, 0x00230004, 0xDF000000, 0x00000000, }; + +s32 D_8014C110[] = { 0xE200001C, 0xC81041C8, 0xE3000A01, 0x00100000, 0xD9C0F9FA, 0x00000000, 0xD9FFFFFF, 0x00230004, 0xDF000000, 0x00000000, }; + +s32 D_8014C138[] = { 0xE200001C, 0xC8104B50, 0xE3000A01, 0x00100000, 0xD9C0F9FB, 0x00000000, 0xD9FFFFFF, 0x00220005, 0xDF000000, 0x00000000, }; + +s32 D_8014C160[] = { 0xE200001C, 0xC8104340, 0xE3000A01, 0x00100000, 0xD9C0F9FB, 0x00000000, 0xD9FFFFFF, 0x00220005, 0xDF000000, 0x00000000, }; + +s32 D_8014C188[] = { 0xFFFE7960, 0x000F4240, 0x000F4240, 0x000F4240, 0x00000000, 0x000F4240, 0x000F4240, 0x000F4240, 0x00000000, 0x000F4240, 0x000F4240, 0x000F4240, 0x00000000, 0x000F4240, 0x000F4240, 0x000F4240, 0x00000000, 0x007A1200, 0x007A1200, 0x007A1200, 0x00000000, 0x007A1200, 0x007270E0, 0x007270E0, 0x007270E0, 0x00000000, 0x006ACFC0, 0x006ACFC0, 0x006ACFC0, 0x006ACFC0, 0x00632EA0, 0x00632EA0, 0x00632EA0, 0x00000000, 0x005B8D80, 0x005B8D80, 0x005B8D80, 0x00000000, 0x0053EC60, 0x0053EC60, 0x0053EC60, 0x007A1200, 0x003D0900, 0x0040D990, 0x0044AA20, 0x0044AA20, 0x007A1200, 0x000AAE60, }; // render mode -> distance map? + +s8 D_8014C248[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }; + +// BSS +static s32 B_801512B0[3]; +static s32 D_801512BC; +static s32 D_801512C0; +static s32 D_801512C4; +static s32 D_801512C8[6]; +static SmallModelList* D_801512E0; +static s8 D_801512E4[0x4]; +static s8 D_801512E8[0x8]; +static s8 B_801512F0[0x410]; +static GameMode gMainGameState[2]; // TODO rename + +extern s32 D_80151324; extern s32 D_8015132C; +extern s32 D_80151330; extern Fog* wFog; - -extern s32 D_801533B0; // num render task entries? -extern s32 D_801533AC; -extern s32 D_8014C188[]; // render mode -> distance map? -extern RenderTaskEntry* D_801533A0[]; - extern s32 texPannerMainU[MAX_TEX_PANNERS]; extern s32 texPannerMainV[MAX_TEX_PANNERS]; extern s32 texPannerAuxU[MAX_TEX_PANNERS]; extern s32 texPannerAuxV[MAX_TEX_PANNERS]; -extern s32 D_8014AFB0; +extern RenderTaskEntry* D_801533A0[]; +extern s32 D_801533AC; +extern s32 D_801533B0; // num render task entries? +extern s8 D_8015A578; -INCLUDE_ASM(s32, "a5dd0_len_114e0", update_entities); +// funcs +void update_shadows(void); +s32 step_entity_commandlist(Entity* entity); +void render_shadows(void); +void update_entity_transform_matrix(Entity* entity); +void update_shadow_transform_matrix(Shadow* shadow); +void update_entity_inverse_rotation_matrix(Entity* entity); +void delete_entity(s32 entityIndex); +void delete_entity_and_unload_data(s32 entityIndex); +void func_8011085C(s32 shadowIndex); +s32 entity_get_collision_flags(Entity *entity); +void func_801117DC(StaticEntityData* data); +void func_80112344(Entity* entity); -INCLUDE_ASM(s32, "a5dd0_len_114e0", update_shadows); +void update_entities(void) { + s32 i; + + D_801512BC = 0; + D_801512C0 = 0; + D_80151330++; + + for (i = 0; i < MAX_ENTITIES; i++) { + Entity* entity = get_entity_by_index(i); + + if (entity != NULL) { + D_801512C0++; + + if (!(entity->flags & 0x40000000)) { + if (entity->flags & 0x1000000) { + entity->flags &= ~0x1000000; + if (!(entity->flags & 0x8000)) { + entity->flags |= 0x2000000; + } + entity->boundScript = start_script(entity->boundScriptBytecode, 0xA, 0x20); + } + + if (entity->flags & 0x2000000) { + if (does_script_exist(entity->boundScript->id)) { + if (entity->flags & 8) { + func_8011E8BC(entity->virtualModelIndex); + } else { + exec_entity_model_commandlist(entity->virtualModelIndex); + } + + if (entity->flags & 0x2000) { + entity->rotation.y = -gCameras[gCurrentCameraID].currentYaw; + } + + if (!(entity->flags & 0x10)) { + update_entity_transform_matrix(entity); + } + continue; + } else { + entity->flags &= ~0x2000000; + } + } + + if (entity->unk_07 == 0) { + entity->collisionFlags = entity_get_collision_flags(entity); + + if (entity->collisionFlags) { + EntityCallback entityCallback = entity->staticData->unk_data_ptr2; + + if (entityCallback != NULL && entityCallback(entity) != 0) { + entity->unk_07 = 0xA; + entity->flags |= 0x10000; + } + } + } else { + entity->unk_07--; + if (entity->flags & 0x40) { + if (entity->unk_07 == 0) { + entity->flags &= ~0x60; + } else { + entity->flags |= 0x20; + } + } else if (entity->unk_07 == 0) { + entity->flags &= ~0x10000; + entity->flags &= ~0x20000; + entity->collisionFlags = 0; + } + } + + if (entity->flags & 0x2000) { + entity->rotation.y = -gCameras[gCurrentCameraID].currentYaw; + } + + if (!gGameStatusPtr->disableScripts) { + if (entity->updateScriptCallback != NULL) { + entity->updateScriptCallback(entity); + } + + if (entity->scriptReadPos != NULL) { + if (entity->hasEntityScript) { + entity->hasEntityScript--; + if (!(entity->hasEntityScript)) { + while (step_entity_commandlist(entity) != 0); + } + } + } + } + + if (!(entity->flags & 0x10)) { + update_entity_transform_matrix(entity); + } + + if (!(entity->flags & 0x20)) { + update_entity_inverse_rotation_matrix(entity); + } + + if (entity->flags & 8) { + func_8011E8BC(entity->virtualModelIndex); + } else { + exec_entity_model_commandlist(entity->virtualModelIndex); + } + + if (entity->shadowIndex >= 0) { + func_80112344(entity); + } + + if (entity->flags & 0x20000000) { + delete_entity(entity->listIndex); + } + + if (entity->flags & 0x4000000) { + delete_entity_and_unload_data(entity->listIndex); + } + } + } + } + + update_shadows(); + D_8015A578 = 0; +} + +void update_shadows(void) { + s32 i; + + D_80151324 = 0; + + for (i = 0; i < MAX_SHADOWS; i++) { + Shadow* shadow = get_shadow_by_index(i); + + if (shadow != NULL) { + D_80151324++; + + if (!(shadow->flags & 0x40000000)) { + if (shadow->flags & 0x2000) { + shadow->rotation.y = -gCameras[gCurrentCameraID].currentYaw; + } + + update_shadow_transform_matrix(shadow); + + if (shadow->flags & 8) { + func_8011E8BC(shadow->entityModelID); + } else { + exec_entity_model_commandlist(shadow->entityModelID); + } + + if (shadow->flags & 0x20000000) { + func_8011085C(shadow->listIndex); + } + } + } + } +} INCLUDE_ASM(s32, "a5dd0_len_114e0", set_entity_commandlist); -INCLUDE_ASM(s32, "a5dd0_len_114e0", step_entity_updatecmd); +INCLUDE_ASM(s32, "a5dd0_len_114e0", step_entity_commandlist, Entity* entity); -INCLUDE_ASM(void, "a5dd0_len_114e0", exec_entity_updatecmd, Entity* entity); +void exec_entity_updatecmd(Entity* entity) { + while (step_entity_commandlist(entity) != 0); +} void func_8010FD98(s32 arg0, s32 alpha) { if (alpha >= 255) { @@ -64,15 +499,134 @@ void entity_model_set_shadow_color(s32 alpha) { gDPSetPrimColor(gMasterGfxPos++, 0, 0, 0x00, 0x00, 0x00, alpha); } -INCLUDE_ASM(s32, "a5dd0_len_114e0", render_entities); +void render_entities(void) { + s32 phi_v0; + s32 i; -INCLUDE_ASM(s32, "a5dd0_len_114e0", render_shadows); + for (i = 0; i < MAX_ENTITIES; i++) { + Entity* entity = get_entity_by_index(i); -INCLUDE_ASM(s32, "a5dd0_len_114e0", update_entity_transform_matrix); + if (entity != NULL) { + if (!gGameStatusPtr->isBattle) { + if (D_80151310 != 0 && + !(entity->flags & 0x80000) && + dist2D(gPlayerStatusPtr->position.x, + gPlayerStatusPtr->position.z, + entity->position.x, + entity->position.z) > 200.0f + ) { + continue; + } -INCLUDE_ASM(s32, "a5dd0_len_114e0", update_shadow_transform_matrix); + if (D_80151310 == 1) { + if (!(entity->flags & 2)) { + continue; + } + } else if (D_80151310 == 2) { + if (!(entity->flags & 0x40000)) { + continue; + } + } + } -INCLUDE_ASM(s32, "a5dd0_len_114e0", update_entity_inverse_rotation_matrix); + if (!(entity->flags & 1)) { + if (entity->flags & 8) { + if (D_8014AFB0 == 0xFF) { + if (entity->renderSetupFunc != NULL) { + func_80120000(entity->virtualModelIndex, entity->listIndex, entity->renderSetupFunc); + } + } else { + func_80120000(entity->virtualModelIndex, entity->listIndex, func_8010FE44); + } + + if (entity->vertexData == NULL) { + func_8011F304(entity->virtualModelIndex, &entity->transformMatrix); + } else { + func_8011F3E8(entity->virtualModelIndex, + &entity->transformMatrix, + entity->vertexSegment, + entity->vertexData); + } + } else { + if (D_8014AFB0 == 0xFF) { + if (entity->renderSetupFunc != NULL) { + bind_entity_model_setupGfx(entity->virtualModelIndex, + entity->listIndex, + entity->renderSetupFunc); + } else { + get_entity_model(entity->virtualModelIndex)->fpSetupGfxCallback = NULL; + } + } else { + bind_entity_model_setupGfx(entity->virtualModelIndex, entity->listIndex, func_8010FE44); + } + + if (entity->vertexData == NULL) { + draw_entity_model_shadow(entity->virtualModelIndex, &entity->transformMatrix); + } else { + draw_entity_model_main(entity->virtualModelIndex, + &entity->transformMatrix, + entity->vertexSegment, + entity->vertexData); + } + } + } + } + } + + render_shadows(); +} + +void render_shadows(void) { + s32 i; + + for (i = 0; i < MAX_SHADOWS; i++) { + Shadow* shadow = get_shadow_by_index(i); + + if (shadow != NULL) { + if (shadow->flags & 1) { + if (shadow->flags & 0x10000000) { + shadow->unk_05 -= 20; + if (shadow->unk_05 <= 20) { + shadow->flags |= 0x20000000; + } + } + } else if (shadow->flags & 8) { + if (shadow->vertexArray == NULL) { + func_8011F304(shadow->entityModelID, &shadow->transformMatrix); + } else { + func_8011F3E8(shadow->entityModelID, + &shadow->transformMatrix, + shadow->vertexSegment, + shadow->vertexArray); + } + } else { + if (shadow->flags & 0x10000000) { + shadow->unk_05 -= 20; + if (shadow->unk_05 <= 20) { + shadow->flags |= 0x20000000; + } + } + + bind_entity_model_setupGfx(shadow->entityModelID, shadow->unk_05, entity_model_set_shadow_color); + + if (shadow->vertexArray == NULL) { + draw_entity_model_shadow(shadow->entityModelID, &shadow->transformMatrix); + } else { + draw_entity_model_main(shadow->entityModelID, + &shadow->transformMatrix, + shadow->vertexSegment, + shadow->vertexArray); + } + } + } + } +} + +INCLUDE_ASM(void, "a5dd0_len_114e0", update_entity_transform_matrix, Entity* entity); + +INCLUDE_ASM(void, "a5dd0_len_114e0", update_shadow_transform_matrix, Shadow* shadow); + +INCLUDE_ASM(void, "a5dd0_len_114e0", update_entity_inverse_rotation_matrix, Entity* entity); Entity* get_entity_by_index(s32 index) { return (*gCurrentEntityListPtr)[index & 0xFFF]; @@ -124,8 +678,6 @@ u32 get_entity_type(s32 index) { void delete_entity(s32 entityIndex) { Entity* entity = get_entity_by_index(entityIndex); - Shadow* shadow; - EntityList** currentEntityListPtrTemp; if (entity->dataBuf != NULL) { heap_free(entity->dataBuf); @@ -138,21 +690,18 @@ void delete_entity(s32 entityIndex) { } if (entity->shadowIndex >= 0) { - shadow = get_shadow_by_index(entity->shadowIndex); + Shadow* shadow = get_shadow_by_index(entity->shadowIndex); + shadow->flags |= 0x10000000; } - currentEntityListPtrTemp = &gCurrentEntityListPtr; - heap_free((**currentEntityListPtrTemp)[entityIndex]); - (**currentEntityListPtrTemp)[entityIndex] = NULL; + heap_free((*gCurrentEntityListPtr)[entityIndex]); + (*gCurrentEntityListPtr)[entityIndex] = NULL; } -s32 delete_entity_and_unload_data(s32 entityIndex) { - Entity* entity; - Shadow* shadow; - EntityList** currentEntityListPtrTemp; +void delete_entity_and_unload_data(s32 entityIndex) { + Entity* entity = get_entity_by_index(entityIndex); - entity = get_entity_by_index(entityIndex); if (entity->dataBuf != NULL) { heap_free(entity->dataBuf); } @@ -162,32 +711,94 @@ s32 delete_entity_and_unload_data(s32 entityIndex) { } else { func_8011E438(get_anim_mesh(entity->virtualModelIndex)); } + func_801117DC(entity->staticData); if (entity->shadowIndex >= 0) { - shadow = get_shadow_by_index(entity->shadowIndex); + Shadow* shadow = get_shadow_by_index(entity->shadowIndex); + shadow->flags |= 0x10000000; } - currentEntityListPtrTemp = &gCurrentEntityListPtr; - heap_free((**currentEntityListPtrTemp)[entityIndex]); - (**currentEntityListPtrTemp)[entityIndex] = NULL; + heap_free((*gCurrentEntityListPtr)[entityIndex]); + (*gCurrentEntityListPtr)[entityIndex] = NULL; } -s32 func_8011085C(s32 shadowIndex) { +void func_8011085C(s32 shadowIndex) { Shadow* shadow = get_shadow_by_index(shadowIndex); - ShadowList** currentShadowListPtr = &gCurrentShadowListPtr; - free_entity_model_by_index(shadow->unk_08); - heap_free((**currentShadowListPtr)[shadowIndex]); - (**currentShadowListPtr)[shadowIndex] = NULL; + free_entity_model_by_index(shadow->entityModelID); + heap_free((*gCurrentShadowListPtr)[shadowIndex]); + (*gCurrentShadowListPtr)[shadowIndex] = NULL; } -INCLUDE_ASM(s32, "a5dd0_len_114e0", entity_get_collision_flags); +s32 entity_get_collision_flags(Entity *entity) { + u32 listIndex = entity->listIndex; + s32 ret = 0; + u32 flag; + + if (entity->flags & 0x20000) { + ret = 0x80; + entity->flags &= ~0x20000; + } + + flag = gCollisionStatus.currentFloor; + if (flag != -1 && (flag & 0x4000) && listIndex == (u8)flag) { + ret |= 1; + } + + flag = gCollisionStatus.lastTouchedFloor; + if (flag != -1 && (flag & 0x4000) && listIndex == (u8)flag) { + ret |= 0x100; + } + + flag = gCollisionStatus.currentCeiling; + if (flag != -1 && (flag & 0x4000) && listIndex == (u8)flag) { + ret |= 0x4; + } + + flag = gCollisionStatus.pushingAgainstWall; + if (flag != -1 && (flag & 0x4000) && listIndex == (u8)flag) { + ret |= 0x10; + } + + flag = gCollisionStatus.lastWallHammered; + if (flag != -1 && (flag & 0x4000) && listIndex == (u8)flag) { + ret |= 0x40; + } + + flag = gCollisionStatus.currentWall; + if (flag != -1 && (flag & 0x4000) && listIndex == (u8)flag && gPlayerStatusPtr->pressedButtons & 0x8000) { + ret |= 8; + } + + return ret; +} INCLUDE_ASM(s32, "a5dd0_len_114e0", func_801109DC); +// float bs +#ifdef NON_MATCHING +s32 test_player_entity_aabb(Entity* entity) { + f32 temp_f4; + f32 colliderDiameter; + + temp_f4 = entity->position.y - (gPlayerStatus.position.y + gPlayerStatus.colliderHeight); + if (temp_f4 > 0.0f || gPlayerStatus.colliderHeight + entity->aabb.y < fabsf(temp_f4)) { + return 0; + } + + if ((gPlayerStatus.colliderDiameter + entity->aabb.x) * 0.5 < fabsf(gPlayerStatus.position.x - entity->position.x)) { + return 0; + } + if ((gPlayerStatus.colliderDiameter + entity->aabb.z) * 0.5 < fabsf(gPlayerStatus.position.z - entity->position.z)) { + return 0; + } + return 1; +} +#else INCLUDE_ASM(s32, "a5dd0_len_114e0", test_player_entity_aabb); +#endif s32 is_player_action_state(ActionState actionState) { return actionState == gPlayerActionState; @@ -213,11 +824,11 @@ void func_80110BF8(Entity *entity) { void load_area_specific_entity_data(void) { if (D_8015132C == 0) { if (gGameStatusPtr->areaID == AREA_JAN || gGameStatusPtr->areaID == AREA_IWA) { - dma_copy(&entity_jan_iwa_ROM_START, &entity_jan_iwa_ROM_END, AREA_SPECIFIC_ENTITY_VRAM); + dma_copy(entity_jan_iwa_ROM_START, entity_jan_iwa_ROM_END, AREA_SPECIFIC_ENTITY_VRAM); } else if (gGameStatusPtr->areaID == AREA_SBK || gGameStatusPtr->areaID == AREA_OMO) { - dma_copy(&entity_sbk_omo_ROM_START, &entity_sbk_omo_ROM_END, AREA_SPECIFIC_ENTITY_VRAM); + dma_copy(entity_sbk_omo_ROM_START, entity_sbk_omo_ROM_END, AREA_SPECIFIC_ENTITY_VRAM); } else { - dma_copy(&entity_default_ROM_START, &entity_default_ROM_END, AREA_SPECIFIC_ENTITY_VRAM); + dma_copy(entity_default_ROM_START, entity_default_ROM_END, AREA_SPECIFIC_ENTITY_VRAM); } D_8015132C = 1; @@ -240,7 +851,7 @@ INCLUDE_ASM(s32, "a5dd0_len_114e0", load_split_entity_data); INCLUDE_ASM(s32, "a5dd0_len_114e0", func_80111790); -INCLUDE_ASM(s32, "a5dd0_len_114e0", func_801117DC); +INCLUDE_ASM(void, "a5dd0_len_114e0", func_801117DC, StaticEntityData* data); INCLUDE_ASM(s32, "a5dd0_len_114e0", create_entity, StaticEntityData* data, s32 x, s32 y, s32 z, s32 arg4, s32 flags); @@ -258,7 +869,7 @@ ApiStatus AssignScript(ScriptInstance* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; if (isInitialCall == TRUE) { - Bytecode* toBind = get_variable(script, *args++); + Bytecode* toBind = (Bytecode*)get_variable(script, *args++); get_entity_by_index(gLastCreatedEntityIndex)->boundScriptBytecode = toBind; return ApiStatus_DONE2; @@ -273,11 +884,11 @@ INCLUDE_ASM(s32, "a5dd0_len_114e0", AssignBlockFlag, ScriptInstance* script, s32 ApiStatus AssignFlag(ScriptInstance* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; - Trigger* trigger; if (isInitialCall == TRUE) { - trigger = (Trigger*)get_entity_by_index(gLastCreatedEntityIndex)->dataBuf; + Trigger* trigger = (Trigger*)get_entity_by_index(gLastCreatedEntityIndex)->dataBuf; trigger->flags.bytes.genericFlagIndex = get_variable_index(script, *args); + return ApiStatus_DONE2; } @@ -296,7 +907,7 @@ void func_80112328(s32 shadowIndex) { func_8011085C(shadowIndex); } -INCLUDE_ASM(s32, "a5dd0_len_114e0", func_80112344); +INCLUDE_ASM(void, "a5dd0_len_114e0", func_80112344, Entity* entity); INCLUDE_ASM(s32, "a5dd0_len_114e0", func_801125E8); @@ -311,18 +922,18 @@ INCLUDE_ASM(s32, "a5dd0_len_114e0", func_80112B20); void NOP_state(void) { } +// ordering +#ifdef NON_MATCHING +void func_80112B98(void) { + s32 i; + + for (i = 0; i < ARRAY_COUNT(gMainGameState); i++) { + gMainGameState[i].flags = 0; + } +} +#else INCLUDE_ASM(s32, "a5dd0_len_114e0", func_80112B98); - -typedef struct GameMode { - /* 0x00 */ u16 flags; - /* 0x04 */ void (*init)(void); - /* 0x08 */ void (*step)(struct GameMode*); - /* 0x0C */ UNK_FUN_PTR(unk_0C); - /* 0x10 */ void (*render)(void); - /* 0x14 */ void (*renderAux)(void); ///< @see func_80112FC4 -} GameMode; // size = 0x18 - -extern GameMode gMainGameState[2]; // TODO rename +#endif // regalloc? #ifndef NON_MATCHING @@ -346,12 +957,12 @@ GameMode* set_next_game_mode(GameMode* arg0) { gameMode->unk_08 = arg0->unk_08; gameMode->render = arg0->render; gameMode->unk_0C = NULL; - if (gameMode->init == NULL) gameMode->init = &NOP_state; - if (gameMode->step == NULL) gameMode->step = &NOP_state; - if (gameMode->unk_0C == NULL) gameMode->unk_0C = &NOP_state; - if (gameMode->render == NULL) gameMode->render = &NOP_state; + if (gameMode->init == NULL) gameMode->init = NOP_state; + if (gameMode->step == NULL) gameMode->step = NOP_state; + if (gameMode->unk_0C == NULL) gameMode->unk_0C = NOP_state; + if (gameMode->render == NULL) gameMode->render = NOP_state; - gameMode->renderAux = &NOP_state; + gameMode->renderAux = NOP_state; gameMode->init(); return gameMode; @@ -359,8 +970,7 @@ GameMode* set_next_game_mode(GameMode* arg0) { #endif GameMode* set_game_mode_slot(s32 i, GameMode* arg0) { - GameMode* gameModes = &gMainGameState; - GameMode* gameMode = &gameModes[i]; + GameMode* gameMode = &gMainGameState[i]; ASSERT(i < ARRAY_COUNT(gMainGameState)); @@ -369,57 +979,45 @@ GameMode* set_game_mode_slot(s32 i, GameMode* arg0) { gameMode->step = arg0->step; gameMode->render = arg0->render; gameMode->unk_0C = NULL; - if (gameMode->init == NULL) gameMode->init = &NOP_state; - if (gameMode->step == NULL) gameMode->step = &NOP_state; - if (gameMode->unk_0C == NULL) gameMode->unk_0C = &NOP_state; - if (gameMode->render == NULL) gameMode->render = &NOP_state; + if (gameMode->init == NULL) gameMode->init = NOP_state; + if (gameMode->step == NULL) gameMode->step = NOP_state; + if (gameMode->unk_0C == NULL) gameMode->unk_0C = NOP_state; + if (gameMode->render == NULL) gameMode->render = NOP_state; - gameMode->renderAux = &NOP_state; + gameMode->renderAux = NOP_state; gameMode->init(); return gameMode; } void func_80112D84(s32 i, void (*fn)(void)) { - GameMode* gameModes = &gMainGameState; - GameMode* gameMode = &gameModes[i]; + GameMode* gameMode = &gMainGameState[i]; ASSERT(i < ARRAY_COUNT(gMainGameState)); gameMode->renderAux = fn; gameMode->flags |= 0x20; + if (fn == NULL) { - gameMode->renderAux = &NOP_state; + gameMode->renderAux = NOP_state; } } void func_80112DD4(s32 i) { - GameMode* gameModes = &gMainGameState; - GameMode* gameMode = &gameModes[i]; - - gameMode->flags |= 4; + gMainGameState[i].flags |= 4; } void func_80112DFC(s32 i) { - GameMode* gameModes = &gMainGameState; - GameMode* gameMode = &gameModes[i]; - - gameMode->flags |= 8; + gMainGameState[i].flags |= 8; } void func_80112E24(s32 i) { - GameMode* gameModes = &gMainGameState; - GameMode* gameMode = &gameModes[i]; - - gameMode->flags &= ~0x1C; + gMainGameState[i].flags &= ~0x1C; } void func_80112E4C(s32 i) { - GameMode* gameModes = &gMainGameState; - GameMode* gameMode = &gameModes[i]; - - gameMode->flags &= ~0x0C; - gameMode->flags |= 0x10; + gMainGameState[i].flags &= ~0x0C; + gMainGameState[i].flags |= 0x10; } #ifndef NON_MATCHING @@ -502,7 +1100,7 @@ INCLUDE_ASM(s32, "a5dd0_len_114e0", get_model_list_index_from_tree_index, s32 tr INCLUDE_ASM(s32, "a5dd0_len_114e0", func_8011B090); -INCLUDE_ASM(void, "a5dd0_len_114e0", get_model_center_and_size, s32 modelID, f32* centerX, f32* centerY, +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) { @@ -518,20 +1116,17 @@ INCLUDE_ASM(s32, "a5dd0_len_114e0", func_8011B5D0); INCLUDE_ASM(s32, "a5dd0_len_114e0", func_8011B660); void clone_model(u16 srcModelID, u16 newModelID) { - ModelList** modelList = &gCurrentModelListPtr; Model* srcModel = get_model_from_list_index(get_model_list_index_from_tree_index(srcModelID)); Model* newModel; s32 i; - for (i = 0; i < ARRAY_COUNT(**modelList); i++) { - Model* model = (**modelList)[i]; - - if (model == NULL) { + for (i = 0; i < ARRAY_COUNT(*gCurrentModelListPtr); i++) { + if ((*gCurrentModelListPtr)[i] == NULL) { break; } } - (**modelList)[i] = newModel = heap_malloc(sizeof(Model)); + (*gCurrentModelListPtr)[i] = newModel = heap_malloc(sizeof(Model)); *newModel = *srcModel; newModel->modelID = newModelID; } @@ -585,19 +1180,15 @@ s32 is_world_fog_enabled(void) { } void get_world_fog_distance(s32* start, s32* end) { - Fog** fog = &wFog; - - *start = (*fog)->startDistance; - *end = (*fog)->endDistance; + *start = wFog->startDistance; + *end = wFog->endDistance; } void get_world_fog_color(s32* r, s32* g, s32* b, s32* a) { - Fog** fog = &wFog; - - *r = (*fog)->r; - *g = (*fog)->g; - *b = (*fog)->b; - *a = (*fog)->a; + *r = wFog->r; + *g = wFog->g; + *b = wFog->b; + *a = wFog->a; } void set_tex_panner(Model* model, s8 texPannerID) { @@ -631,9 +1222,19 @@ INCLUDE_ASM(s32, "a5dd0_len_114e0", func_8011BCEC); /// @returns TRUE if mtx is NULL or identity. INCLUDE_ASM(s32, "a5dd0_len_114e0", is_identity_fixed_mtx); -INCLUDE_ASM(void, "a5dd0_len_114e0", set_background_color_blend, u8 r, u8 g, u8 b, u8 a); +void set_background_color_blend(u8 r, u8 g, u8 b, u8 a) { + D_8014B74D = r; + D_8014B74E = g; + D_8014B74F = b; + D_8014B74C = a; +} -INCLUDE_ASM(s32, "a5dd0_len_114e0", get_background_color_blend); +void get_background_color_blend(u8* r, u8* g, u8* b, u8* a) { + *r = D_8014B74D; + *g = D_8014B74E; + *b = D_8014B74F; + *a = D_8014B74C; +} INCLUDE_ASM(s32, "a5dd0_len_114e0", func_8011BEB4); diff --git a/src/evt/map_api.c b/src/evt/map_api.c index e381ecdf11..a93d6a2769 100644 --- a/src/evt/map_api.c +++ b/src/evt/map_api.c @@ -1,17 +1,29 @@ #include "common.h" -// Works to set model->flags & 0x400 to modelListIndex, but that seems wrong and misleading (fake match) -#ifdef NON_MATCHING +typedef struct TempSetZoneEnabled { + /* 0x00 */ s32 flags; + /* 0x04 */ s16 id1; + /* 0x06 */ s16 id2; + /* 0x08 */ char unk_08[0x14]; +} TempSetZoneEnabled; // size = 0x1C + +extern TempSetZoneEnabled* D_800D91D4; + ApiStatus TranslateModel(ScriptInstance* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; - s32 var1 = get_variable(script, *args++); - s32 modelListIndex = get_model_list_index_from_tree_index(var1); - f32 x = get_float_variable(script, *args++); - f32 y = get_float_variable(script, *args++); - f32 z = get_float_variable(script, *args++); - Model* model = get_model_from_list_index(modelListIndex); + s32 modelIndex = get_variable(script, *args++); + f32 x; + f32 y; + f32 z; + Model* model; - if ((model->flags & 0x400) == 0) { + modelIndex = get_model_list_index_from_tree_index(modelIndex); + x = get_float_variable(script, *args++); + y = get_float_variable(script, *args++); + z = get_float_variable(script, *args++); + model = get_model_from_list_index(modelIndex); + + if (!(model->flags & 0x400)) { guTranslateF(&model->transformMatrix, x, y, z); model->flags |= 0x1400; } else { @@ -23,9 +35,6 @@ ApiStatus TranslateModel(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -#else -INCLUDE_ASM(s32, "evt/map_api", TranslateModel, ScriptInstance* script, s32 isInitialCall); -#endif ApiStatus RotateModel(ScriptInstance* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; @@ -37,7 +46,7 @@ ApiStatus RotateModel(ScriptInstance* script, s32 isInitialCall) { f32 z = get_float_variable(script, *args++); Model* model = get_model_from_list_index(modelListIndex); - if ((model->flags & 0x400) == 0) { + if (!(model->flags & 0x400)) { guRotateF(model->transformMatrix, a, x, y, z); model->flags |= 0x1400; } else { @@ -50,18 +59,21 @@ ApiStatus RotateModel(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -// Same as TranslateModel above -#ifdef NON_MATCHING ApiStatus ScaleModel(ScriptInstance* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; - s32 var1 = get_variable(script, *args++); - s32 modelListIndex = get_model_list_index_from_tree_index(var1); - f32 x = get_float_variable(script, *args++); - f32 y = get_float_variable(script, *args++); - f32 z = get_float_variable(script, *args++); - Model* model = get_model_from_list_index(modelListIndex); + s32 modelIndex = get_variable(script, *args++); + f32 x; + f32 y; + f32 z; + Model* model; - if ((model->flags & 0x400) == 0) { + modelIndex = get_model_list_index_from_tree_index(modelIndex); + x = get_float_variable(script, *args++); + y = get_float_variable(script, *args++); + z = get_float_variable(script, *args++); + model = get_model_from_list_index(modelIndex); + + if (!(model->flags & 0x400)) { guScaleF(&model->transformMatrix, x, y, z); model->flags |= 0x1400; } else { @@ -73,22 +85,19 @@ ApiStatus ScaleModel(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -#else -INCLUDE_ASM(s32, "evt/map_api", ScaleModel, ScriptInstance* script, s32 isInitialCall); -#endif ApiStatus GetModelIndex(ScriptInstance* script, s32 isInitialCall) { - Bytecode* thisPos = script->ptrReadPos; - Bytecode modelID = get_variable(script, *thisPos++); - Bytecode index = *thisPos++; + Bytecode* args = script->ptrReadPos; + Bytecode modelID = get_variable(script, *args++); + Bytecode index = *args++; set_variable(script, index, get_model_list_index_from_tree_index(modelID)); return ApiStatus_DONE2; } ApiStatus func_802C8EE4(ScriptInstance* script, s32 isInitialCall) { - Bytecode* thisPos = script->ptrReadPos; - Bytecode modelID = get_variable(script, *thisPos++); + Bytecode* args = script->ptrReadPos; + Bytecode modelID = get_variable(script, *args++); Model* model = get_model_from_list_index(get_model_list_index_from_tree_index(modelID)); model->flags &= ~0x400; @@ -96,16 +105,16 @@ ApiStatus func_802C8EE4(ScriptInstance* script, s32 isInitialCall) { } ApiStatus CloneModel(ScriptInstance* script, s32 isInitialCall) { - Bytecode* thisPos = script->ptrReadPos; - Bytecode srcModelID = get_variable(script, *thisPos++); - Bytecode newModelID = get_variable(script, *thisPos++); + Bytecode* args = script->ptrReadPos; + Bytecode srcModelID = get_variable(script, *args++); + Bytecode newModelID = get_variable(script, *args++); clone_model(srcModelID, newModelID); return ApiStatus_DONE2; } ApiStatus GetModelCenter(ScriptInstance* script, s32 isInitialCall) { - Bytecode* thisPos = script->ptrReadPos; + Bytecode* args = script->ptrReadPos; f32 centerX; f32 centerY; f32 centerZ; @@ -113,7 +122,7 @@ ApiStatus GetModelCenter(ScriptInstance* script, s32 isInitialCall) { f32 sizeY; f32 sizeZ; - get_model_center_and_size(get_variable(script, *thisPos++) & 0xFFFF, ¢erX, ¢erY, ¢erZ, &sizeX, &sizeY, + get_model_center_and_size(get_variable(script, *args++), ¢erX, ¢erY, ¢erZ, &sizeX, &sizeY, &sizeZ); script->varTable[0] = centerX; script->varTable[1] = centerY; @@ -122,9 +131,9 @@ ApiStatus GetModelCenter(ScriptInstance* script, s32 isInitialCall) { } ApiStatus SetTexPanner(ScriptInstance* script, s32 isInitialCall) { - Bytecode* thisPos = script->ptrReadPos; - s32 treeIndex = get_variable(script, *thisPos++); - s32 var2 = get_variable(script, *thisPos++); + Bytecode* args = script->ptrReadPos; + s32 treeIndex = get_variable(script, *args++); + s32 var2 = get_variable(script, *args++); Model* model = get_model_from_list_index(get_model_list_index_from_tree_index(treeIndex)); set_tex_panner(model, var2); @@ -133,9 +142,9 @@ ApiStatus SetTexPanner(ScriptInstance* script, s32 isInitialCall) { } ApiStatus SetModelFlag10(ScriptInstance* script, s32 isInitialCall) { - Bytecode* thisPos = script->ptrReadPos; - Bytecode treeIndex = get_variable(script, *thisPos++); - Bytecode enable = get_variable(script, *thisPos++); + Bytecode* args = script->ptrReadPos; + Bytecode treeIndex = get_variable(script, *args++); + Bytecode enable = get_variable(script, *args++); Model* model = get_model_from_list_index(get_model_list_index_from_tree_index(treeIndex)); if (enable) { @@ -146,13 +155,15 @@ ApiStatus SetModelFlag10(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -#ifdef NON_MATCHING ApiStatus func_802C90FC(ScriptInstance* script, s32 isInitialCall) { - Bytecode* thisPos = script->ptrReadPos; - s32 treeIndex = get_variable(script, *thisPos++); - s32 var2 = get_variable(script, *thisPos++); - s32 var3 = get_variable(script, *thisPos++); - Model* model = get_model_from_list_index(get_model_list_index_from_tree_index(treeIndex)); + Bytecode* args = script->ptrReadPos; + s32 treeIndex = get_variable(script, *args++); + s32 var2 = get_variable(script, *args++); + s32 var3 = get_variable(script, *args++); + Model* model; + + treeIndex = get_model_list_index_from_tree_index(treeIndex); + model = get_model_from_list_index(treeIndex); func_8011BC7C(model, var2, var3); if (var2 != -1) { @@ -160,23 +171,20 @@ ApiStatus func_802C90FC(ScriptInstance* script, s32 isInitialCall) { } return ApiStatus_DONE2; } -#else -INCLUDE_ASM(ApiStatus, "evt/map_api", func_802C90FC, ScriptInstance* script, s32 isInitialCall); -#endif ApiStatus func_802C91A4(ScriptInstance* script, s32 isInitialCall) { - Bytecode* thisPos = script->ptrReadPos; - Bytecode treeIndex = get_variable(script, *thisPos++); - Bytecode var2 = get_variable(script, *thisPos++); + Bytecode* args = script->ptrReadPos; + Bytecode treeIndex = get_variable(script, *args++); + Bytecode var2 = get_variable(script, *args++); get_model_from_list_index(get_model_list_index_from_tree_index(treeIndex))->unk_A9 = var2; return ApiStatus_DONE2; } ApiStatus EnableTexPanning(ScriptInstance* script, s32 isInitialCall) { - Bytecode* thisPos = script->ptrReadPos; - s32 treeIndex = get_variable(script, *thisPos++); - s32 flag = get_variable(script, *thisPos++); + Bytecode* args = script->ptrReadPos; + s32 treeIndex = get_variable(script, *args++); + s32 flag = get_variable(script, *args++); Model* model = get_model_from_list_index(get_model_list_index_from_tree_index(treeIndex)); if (flag) { @@ -188,9 +196,9 @@ ApiStatus EnableTexPanning(ScriptInstance* script, s32 isInitialCall) { } ApiStatus EnableModel(ScriptInstance* script, s32 isInitialCall) { - Bytecode* thisPos = script->ptrReadPos; - s32 listIndex = get_model_list_index_from_tree_index(get_variable(script, *thisPos++)); - Bytecode flag = get_variable(script, *thisPos++); + Bytecode* args = script->ptrReadPos; + s32 listIndex = get_model_list_index_from_tree_index(get_variable(script, *args++)); + Bytecode flag = get_variable(script, *args++); Model* model = get_model_from_list_index(listIndex); if (flag != 0) { @@ -202,20 +210,20 @@ ApiStatus EnableModel(ScriptInstance* script, s32 isInitialCall) { } ApiStatus SetGroupEnabled(ScriptInstance* script, s32 isInitialCall) { - Bytecode* thisPos = script->ptrReadPos; - Bytecode var1 = get_variable(script, *thisPos++); - Bytecode var2 = get_variable(script, *thisPos++); + Bytecode* args = script->ptrReadPos; + Bytecode var1 = get_variable(script, *args++); + Bytecode var2 = get_variable(script, *args++); func_8011B7C0(var1, 2, var2); return ApiStatus_DONE2; } ApiStatus SetTexPanOffset(ScriptInstance* script, s32 isInitialCall) { - Bytecode* thisPos = script->ptrReadPos; - Bytecode var1 = get_variable(script, *thisPos++); - Bytecode var2 = get_variable(script, *thisPos++); - Bytecode var3 = get_variable(script, *thisPos++); - Bytecode var4 = get_variable(script, *thisPos++); + Bytecode* args = script->ptrReadPos; + Bytecode var1 = get_variable(script, *args++); + Bytecode var2 = get_variable(script, *args++); + Bytecode var3 = get_variable(script, *args++); + Bytecode var4 = get_variable(script, *args++); if (var2 == 0) { set_main_pan_u(var1, var3); @@ -229,33 +237,37 @@ ApiStatus SetTexPanOffset(ScriptInstance* script, s32 isInitialCall) { } ApiStatus func_802C9428(ScriptInstance* script, s32 isInitialCall) { - Bytecode* thisPos = script->ptrReadPos; - s32 var1 = get_variable(script, *thisPos++); - s32 var2 = get_variable(script, *thisPos++); - s32 var3 = get_variable(script, *thisPos++); + Bytecode* args = script->ptrReadPos; + s32 var1 = get_variable(script, *args++); + s32 var2 = get_variable(script, *args++); + s32 var3 = get_variable(script, *args++); func_8011BCB4(var1, var2, var3); return ApiStatus_DONE2; } ApiStatus func_802C94A0(ScriptInstance* script, s32 isInitialCall) { - Bytecode* thisPos = script->ptrReadPos; - s32 var1 = get_variable(script, *thisPos++); - s32 var2 = get_variable(script, *thisPos++); - s32 var3 = get_variable(script, *thisPos++); + Bytecode* args = script->ptrReadPos; + s32 var1 = get_variable(script, *args++); + s32 var2 = get_variable(script, *args++); + s32 var3 = get_variable(script, *args++); func_8011BCD0(var1, var2, var3); return ApiStatus_DONE2; } -#ifdef NON_MATCHING -ApiStatus SetModelFlags(ScriptInstance* script, s32 isInitialCall) { - Bytecode* args = script->ptrReadPos; - s32 treeIndex = get_variable(script, *args++); - s32 listIndex = get_model_list_index_from_tree_index(treeIndex); - s32 a1 = *args++; - s32 enable = get_variable(script, *args++); - Model* model = get_model_from_list_index(listIndex); +ApiStatus SetModelFlags(ScriptInstance *script, s32 isInitialCall) { + Bytecode *args = script->ptrReadPos; + s32 modelIndex; + s32 a1; + s32 enable; + Model* model; + + modelIndex = get_variable(script, *args++); + modelIndex = get_model_list_index_from_tree_index(modelIndex); + a1 = *args++; + enable = get_variable(script, *args++); + model = get_model_from_list_index(modelIndex); if (enable) { model->flags |= a1; @@ -265,9 +277,6 @@ ApiStatus SetModelFlags(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -#else -INCLUDE_ASM(s32, "evt/map_api", SetModelFlags, ScriptInstance* script, s32 isInitialCall); -#endif INCLUDE_ASM(s32, "evt/map_api", func_802C95A0); @@ -277,9 +286,9 @@ ApiStatus func_802C971C(ScriptInstance* script, s32 isInitialCall) { } ApiStatus func_802C9748(ScriptInstance* script, s32 isInitialCall) { - Bytecode* thisPos = script->ptrReadPos; - u16 var1 = get_variable(script, *thisPos++); - s32 var2 = get_variable(script, *thisPos++); + Bytecode* args = script->ptrReadPos; + u16 var1 = get_variable(script, *args++); + s32 var2 = get_variable(script, *args++); if (var2 != 0) { func_8011B5D0(var1); @@ -296,9 +305,9 @@ INCLUDE_ASM(s32, "evt/map_api", RotateGroup, ScriptInstance* script, s32 isIniti INCLUDE_ASM(s32, "evt/map_api", ScaleGroup, ScriptInstance* script, s32 isInitialCall); ApiStatus func_802C9B40(ScriptInstance* script, s32 isInitialCall) { - Bytecode* thisPos = script->ptrReadPos; - s32 var1 = get_variable(script, *thisPos++); - Bytecode var2 = *thisPos++; + Bytecode* args = script->ptrReadPos; + s32 var1 = get_variable(script, *args++); + Bytecode var2 = *args++; set_variable(script, var2, func_8011B090(var1)); return ApiStatus_DONE2; @@ -307,16 +316,48 @@ ApiStatus func_802C9B40(ScriptInstance* script, s32 isInitialCall) { INCLUDE_ASM(s32, "evt/map_api", EnableGroup, ScriptInstance* script, s32 isInitialCall); ApiStatus func_802C9C70(ScriptInstance* script, s32 isInitialCall) { - Bytecode* thisPos = script->ptrReadPos; - s32 var1 = get_variable(script, *thisPos++); - u16 var2 = get_variable(script, *thisPos++); - s32 var3 = get_variable(script, *thisPos++); + Bytecode* args = script->ptrReadPos; + s32 var1 = get_variable(script, *args++); + u16 var2 = get_variable(script, *args++); + s32 var3 = get_variable(script, *args++); func_8011C164(var1, var2, var3); 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]; + + if (collider->nextSibling >= 0) { + modify_collider_family_flags(collider->nextSibling, arg1, arg2); + } + + if (collider->firstChild >= 0) { + modify_collider_family_flags(collider->firstChild, arg1, arg2); + } + + switch (arg2) { + case 0: + collider->flags |= arg1; + break; + case 1: + collider->flags &= ~arg1; + break; + case 2: + collider->flags = arg1; + break; + case 3: + collider->flags &= ~0xFF; + collider->flags |= (u8)arg1; + break; + + } +} +#else INCLUDE_ASM(s32, "evt/map_api", modify_collider_family_flags); +#endif INCLUDE_ASM(s32, "evt/map_api", ModifyColliderFlags, ScriptInstance* script, s32 isInitialCall); @@ -337,9 +378,9 @@ ApiStatus GetColliderCenter(ScriptInstance* script, s32 isInitialCall) { } ApiStatus ParentColliderToModel(ScriptInstance* script, s32 isInitialCall) { - Bytecode* thisPos = script->ptrReadPos; - s16 colliderID = get_variable(script, *thisPos++); - s32 treeIndex = get_variable(script, *thisPos++); + Bytecode* args = script->ptrReadPos; + s16 colliderID = get_variable(script, *args++); + s32 treeIndex = get_variable(script, *args++); parent_collider_to_model(colliderID, get_model_list_index_from_tree_index(treeIndex)); update_collider_transform(colliderID); @@ -351,9 +392,47 @@ ApiStatus UpdateColliderTransform(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -INCLUDE_ASM(s32, "evt/map_api", set_zone_enabled); +void set_zone_enabled(s32 zoneID, s32 enabled) { + TempSetZoneEnabled* unkStruct = &D_800D91D4[zoneID]; -INCLUDE_ASM(ApiStatus, "evt/map_api", SetZoneEnabled, ScriptInstance* script, s32 isInitialCall); + if (unkStruct->id1 >= 0) { + set_zone_enabled(unkStruct->id1, enabled); + } + if (unkStruct->id2 >= 0) { + set_zone_enabled(unkStruct->id2, enabled); + } + + switch (enabled) { + case 0: + unkStruct->flags |= 0x10000; + break; + case 1: + unkStruct->flags &= ~0x10000; + break; + } +} + +ApiStatus SetZoneEnabled(ScriptInstance *script, s32 isInitialCall) { + Bytecode* args = script->ptrReadPos; + s32 idx = get_variable(script, *args++); + s32 enabled = get_variable(script, *args++); + TempSetZoneEnabled* unkStruct = &D_800D91D4[idx]; + + if (unkStruct->id2 >= 0) { + set_zone_enabled(unkStruct->id2, enabled); + } + + switch (enabled) { + case FALSE: + unkStruct->flags |= 0x10000; + break; + case TRUE: + unkStruct->flags &= ~0x10000; + break; + } + + return ApiStatus_DONE2; +} INCLUDE_ASM(s32, "evt/map_api", goto_map); @@ -388,9 +467,9 @@ ApiStatus GetLoadType(ScriptInstance* script, s32 isInitialCall) { } ApiStatus SetRenderMode(ScriptInstance* script, s32 isInitialCall) { - Bytecode* thisPos = script->ptrReadPos; - s32 treeIndex = get_variable(script, *thisPos++); - s8 renderMode = get_variable(script, *thisPos++); + Bytecode* args = script->ptrReadPos; + s32 treeIndex = get_variable(script, *args++); + s8 renderMode = get_variable(script, *args++); get_model_from_list_index(get_model_list_index_from_tree_index(treeIndex))->renderMode = renderMode; @@ -403,9 +482,9 @@ ApiStatus PlaySoundAtModel(ScriptInstance* script, s32 isInitialCall) { SoundID soundID = get_variable(script, *args++); s32 var3 = get_variable(script, *args++); f32 x, y, z; - f32 n1, n2, n3; + f32 sx, sy, sz; - get_model_center_and_size((u16)modelID, &x, &y, &z, &n1, &n2, &n3); + get_model_center_and_size(modelID, &x, &y, &z, &sx, &sy, &sz); sfx_play_sound_at_position(soundID, var3, x, y, z); return ApiStatus_DONE2; diff --git a/src/pause/1421C0.c b/src/pause/1421C0.c index e38a12bd42..3ad0d86cda 100644 --- a/src/pause/1421C0.c +++ b/src/pause/1421C0.c @@ -1,5 +1,7 @@ #include "common.h" +extern s32 D_8026F8D4[]; + // Needs .data section #ifdef NON_MATCHING s32 pause_get_menu_string(s32 index) { @@ -9,4 +11,25 @@ s32 pause_get_menu_string(s32 index) { INCLUDE_ASM(s32, "pause/1421C0", pause_get_menu_string); #endif -INCLUDE_ASM(s32, "pause/1421C0", pause_draw_menu_label); +void pause_draw_menu_label(s32 index, s32 x, s32 y) { + s32 xOffset = 64; + + if (index == 8) { + xOffset = 128; + } + if (index == 3) { + xOffset = 48; + } + if (index == 4) { + xOffset = 48; + } + if (index == 5) { + xOffset = 48; + } + if (index == 6) { + xOffset = 160; + } + + gSPDisplayList(gMasterGfxPos++, D_8026F8D4[index]); + pause_draw_rect(x * 4, y * 4, (x + xOffset) * 4, (y + 16) * 4, 0, 0, 0, 0x400, 0x400); +} diff --git a/src/world/area_tst/tst_11/B1CA50.c b/src/world/area_tst/tst_11/B1CA50.c index 2af30c74b3..6f4286b86e 100644 --- a/src/world/area_tst/tst_11/B1CA50.c +++ b/src/world/area_tst/tst_11/B1CA50.c @@ -22,7 +22,7 @@ void func_8024003C_B1CA8C(void) { s32 screenZ; if (playerStatus->flags & 1) { - entityModel = get_entity_model(get_shadow_by_index(playerStatus->shadowID)->unk_08); + entityModel = get_entity_model(get_shadow_by_index(playerStatus->shadowID)->entityModelID); entityModel->flags |= 0x200; get_screen_coords(gCurrentCamID, playerStatus->position.x, playerStatus->position.y, -playerStatus->position.z, diff --git a/src/world/common/reflection.inc.c b/src/world/common/reflection.inc.c index 5da175232f..dafaf47191 100644 --- a/src/world/common/reflection.inc.c +++ b/src/world/common/reflection.inc.c @@ -79,7 +79,7 @@ void N(reflection_setup_wall)(void) { s32 screenZ; if (playerStatus->flags & 1) { - entityModel = get_entity_model(get_shadow_by_index(playerStatus->shadowID)->unk_08); + entityModel = get_entity_model(get_shadow_by_index(playerStatus->shadowID)->entityModelID); entityModel->flags |= 0x200; get_screen_coords(gCurrentCamID, playerStatus->position.x, playerStatus->position.y, -playerStatus->position.z, @@ -163,7 +163,7 @@ void N(reflection_setup_floor)(void) { s32 screenZ; if (playerStatus->flags & 1) { - entityModel = get_entity_model(get_shadow_by_index(playerStatus->shadowID)->unk_08); + entityModel = get_entity_model(get_shadow_by_index(playerStatus->shadowID)->entityModelID); get_screen_coords(gCurrentCamID, playerStatus->position.x, -playerStatus->position.y, playerStatus->position.z, &screenX, &screenY, &screenZ); diff --git a/ver/us/asm/data/a5dd0_len_114e0.data.s b/ver/us/asm/data/E2950.data.s similarity index 67% rename from ver/us/asm/data/a5dd0_len_114e0.data.s rename to ver/us/asm/data/E2950.data.s index f7140b004b..63884d0d9a 100644 --- a/ver/us/asm/data/a5dd0_len_114e0.data.s +++ b/ver/us/asm/data/E2950.data.s @@ -2,288 +2,6 @@ .section .data -glabel D_8014AFB0 -.word 0x000000FF, 0x00000000, 0x00000000, 0x00000000 - -glabel D_8014AFC0 -.word D_8014B7F8, D_8014B910, D_8014B820, D_8014B938, D_8014B848, D_8014B960, D_8014B870, D_8014B988, D_8014B898, D_8014BA20, D_8014B9B0, D_8014BAC0, D_8014B8C0, D_8014B9D8, D_8014B8E8, D_8014BA00 - -glabel D_8014B000 -.word D_8014BB60, D_8014BC78, D_8014BB88, D_8014BCA0, D_8014BBB0, D_8014BCC8, D_8014BBD8, D_8014BCF8, D_8014BC00, D_8014BD88, D_8014BD18, D_8014BC28, D_8014BD40, D_8014BC50, D_8014BD68, D_8014BE78, D_8014BF90, D_8014BEA0, D_8014BFB8, D_8014BEC8, D_8014BFE0, D_8014BEF0, D_8014C008, D_8014BF18, D_8014C098, D_8014C028, D_8014BF40, D_8014C050, D_8014BF68, D_8014C078, D_8014BA48, D_8014BA70, D_8014BA98, D_8014BDB0, D_8014BDD8, D_8014BE00, D_8014C0C0, D_8014C0E8, D_8014C110, D_8014BB10, D_8014BB38, D_8014BE28, D_8014BE50, D_8014C138, D_8014C160, 0x00000000 - -glabel D_8014B0B8 -.word 0xFCFFFFFF - -glabel D_8014B0BC -.word 0xFFFE793C, 0xFCFFFFFF, 0xFFFE7838, 0xFCFFFFFF, 0xFFFE7838, 0xFC457FFF, 0xFFFDF838, 0xFC41FFFF, 0xFFFEF838, 0xFC121824, 0xFF33FFFF, 0xFC127FFF, 0xFFFFF238, 0xFC1219FF, 0xFFFFFE38, 0xFC127E0A, 0xF3FFF238, 0xFC121803, 0xFFFFFF78, 0xFC147E28, 0x44FE793C, 0xFC147FFF, 0x4FFE7838, 0xFC147FFF, 0x4FFE7838, 0xFC147E0A, 0x4FFE72F8, 0xFC147E03, 0x4FFE7978, 0xFCFFFFFF, 0xFFFCF279, 0xFCFFFFFF, 0xFFFCF238, 0xFCFFFFFF, 0xFFFCF238, 0xFC157FFF, 0xFFFDF238, 0xFCFFFE03, 0xFFFCF378, 0xFC26A004, 0x1F1093FF, 0xFC26A004, 0x1FFC93F8, 0xFC26A004, 0x1F1093FF, 0xFC26A004, 0x1FFC92F8, 0xFC26A003, 0x1FFC9378, 0xFC26A004, 0x1F1093FF, 0xFC26A004, 0x1FFC93F8, 0xFC26A004, 0x1F1093FF, 0xFC26A004, 0x1FFC92F8, 0xFC26A003, 0x1FFC9378, 0xFC26A004, 0x1F1093FF, 0xFC26A004, 0x1FFC93F8, 0xFC26A004, 0x1F1093FF, 0xFC26A004, 0x1FFC92F8, 0xFC26A003, 0x1FFC9378, 0xFC20A204, 0xFF13FFFF, 0xFC111404, 0xFFFFFFF8, 0xFC20A204, 0xFF13FFFF, 0xFC20A204, 0xFF13FFFF, 0xFC20A203, 0xFF13FF7F, 0xFC20A204, 0xFF13FFFF, 0xFC111404, 0xFFFFFFF8, 0xFC20A204, 0xFF13FFFF, 0xFC20A204, 0xFF13FFFF, 0xFC20A203, 0xFF13FF7F, 0xFC20A204, 0xFF13FFFF, 0xFC111404, 0xFFFFFFF8, 0xFC20A204, 0xFF13FFFF, 0xFC20A204, 0xFF13FFFF, 0xFC20A203, 0xFF13FF7F, 0xFC20A204, 0xFF13FFFF, 0xFC111404, 0xFFFFFFF8, 0xFC20A204, 0xFF13FFFF, 0xFC20A204, 0xFF13FFFF, 0xFC20A203, 0xFF13FF7F, 0xFC20A204, 0xFF13FFFF, 0xFC111404, 0xFFFFFFF8, 0xFC20A204, 0xFF13FFFF, 0xFC20A204, 0xFF13FFFF, 0xFC20A203, 0xFF13FF7F, 0xFC20A204, 0xFF13FFFF, 0xFC111404, 0xFFFFFFF8, 0xFC20A204, 0xFF13FFFF, 0xFC20A204, 0xFF13FFFF, 0xFC20A203, 0xFF13FF7F, 0xFCFF99FF, 0xFFFFAF38, 0xFCFF99FF, 0xFFFFAF38, 0xFCFF99FF, 0xFFFFAF38, 0xFCFF99FF, 0xFFFFAF38, 0xFCFF9883, 0xFFFFAF78, 0xFC15FFFF, 0x2FFD7238, 0xFC15FFFF, 0x2FFD7238, 0xFC15FFFF, 0x2FFD7238, 0xFC15FFFF, 0x2FFD7238, 0xFC15FE03, 0x2FFD7378, 0xFC61E4C1, 0x12FC9238, 0xFC61E4C1, 0x12FC9238, 0xFC61E4C1, 0x12FC9238, 0xFC61E4C1, 0x12FC9238, 0xFC61E4C1, 0x12FC9238, 0xFC61FEC3, 0x11FCF279, 0xFC61FFFF, 0x1FFCF238, 0xFC61FFFF, 0x1FFCF238, 0xFC61FFFF, 0x1FFCF238, 0xFC61FE03, 0x1FFCF378, 0xFC10E228, 0x40C8A449, 0xFC10E228, 0x40C8A449, 0xFC10E228, 0x40C8A449, 0xFC10E228, 0x40C8A449, 0xFC10E228, 0x40C8A449, 0xFC75FEEB, 0xFFFFFDFE, 0xFC75FEEB, 0xFFFFFDFE, 0xFC75FEEB, 0xFFFFFDFE, 0xFC75FEEB, 0xFFFFFDFE, 0xFC75FEEB, 0xFFFFFDFE, 0xFC75FEEB, 0xFFFFFDFE, 0xFC75FEEB, 0xFFFFFDFE, 0xFC75FEEB, 0xFFFFFDFE, 0xFC75FEEB, 0xFFFFFDFE, 0xFC75FEEB, 0xFFFFFDFE, 0xFC75FEEB, 0xFFFFFDFE, 0xFC75FEEB, 0xFFFFFDFE, 0xFC75FEEB, 0xFFFFFDFE, 0xFC75FEEB, 0xFFFFFDFE, 0xFC75FEEB, 0xFFFFFDFE - -glabel D_8014B400 -.word 0xFCFFFFFF - -glabel D_8014B404 -.word 0xFFFE793C, 0xFCFFFFFF, 0xFFFE7838, 0xFCFFFFFF, 0xFFFE7838, 0xFC457FFF, 0xFFFDF838, 0xFC41FFFF, 0xFFFEF838, 0xFC127E24, 0xFFFFF3F9, 0xFC127FFF, 0xFFFFF238, 0xFC127FFF, 0xFFFFF238, 0xFC127E0A, 0xF3FFF238, 0xFC127E03, 0xFFFFF378, 0xFC147E28, 0x44FE793C, 0xFC147FFF, 0x4FFE7838, 0xFC147FFF, 0x4FFE7838, 0xFC147E0A, 0x4FFE72F8, 0xFC147E03, 0x4FFE7978, 0xFCFFFFFF, 0xFFFCF279, 0xFCFFFFFF, 0xFFFCF238, 0xFCFFFFFF, 0xFFFCF238, 0xFC157FFF, 0xFFFDF238, 0xFCFFFE03, 0xFFFCF378, 0xFC26A004, 0x1FFC93FC, 0xFC26A004, 0x1FFC93F8, 0xFC26A004, 0x1FFC93FC, 0xFC26A004, 0x1FFC92F8, 0xFC26A003, 0x1FFC9378, 0xFC26A004, 0x1F1093FF, 0xFC26A004, 0x1FFC93F8, 0xFC26A004, 0x1F1093FF, 0xFC26A004, 0x1FFC92F8, 0xFC26A003, 0x1FFC9378, 0xFC26A004, 0x1F1093FF, 0xFC26A004, 0x1FFC93F8, 0xFC26A004, 0x1F1093FF, 0xFC26A004, 0x1FFC92F8, 0xFC26A003, 0x1FFC9378, 0xFC20A204, 0xFFFFFFF8, 0xFC111404, 0xFFFFFFF8, 0xFC20A204, 0xFFFFFFF8, 0xFC20A204, 0xFFFFFFF8, 0xFC20A203, 0xFF13FF7F, 0xFC20A204, 0xFFFFFFF8, 0xFC111404, 0xFFFFFFF8, 0xFC20A204, 0xFFFFFFF8, 0xFC20A204, 0xFFFFFFF8, 0xFC20A203, 0xFFFFFF78, 0xFC20A204, 0xFFFFFFF8, 0xFC111404, 0xFFFFFFF8, 0xFC20A204, 0xFFFFFFF8, 0xFC20A204, 0xFFFFFFF8, 0xFC20A203, 0xFFFFFF78, 0xFC20A204, 0xFFFFFFF8, 0xFC111404, 0xFFFFFFF8, 0xFC20A204, 0xFFFFFFF8, 0xFC20A204, 0xFFFFFFF8, 0xFC20A203, 0xFFFFFF78, 0xFC20A204, 0xFFFFFFF8, 0xFC111404, 0xFFFFFFF8, 0xFC20A204, 0xFFFFFFF8, 0xFC20A204, 0xFFFFFFF8, 0xFC20A203, 0xFFFFFF78, 0xFC20A204, 0xFFFFFFF8, 0xFC111404, 0xFFFFFFF8, 0xFC20A204, 0xFFFFFFF8, 0xFC20A204, 0xFFFFFFF8, 0xFC20A203, 0xFFFFFF78, 0xFCFF99FF, 0xFFFFAF38, 0xFCFF99FF, 0xFFFFAF38, 0xFCFF99FF, 0xFFFFAF38, 0xFCFF99FF, 0xFFFFAF38, 0xFCFF9883, 0xFFFFAF78, 0xFC15FFFF, 0x2FFD7238, 0xFC15FFFF, 0x2FFD7238, 0xFC15FFFF, 0x2FFD7238, 0xFC15FFFF, 0x2FFD7238, 0xFC15FE03, 0x2FFD7378, 0xFC61E4C1, 0x12FC9238, 0xFC61E4C1, 0x12FC9238, 0xFC61E4C1, 0x12FC9238, 0xFC61E4C1, 0x12FC9238, 0xFC61E4C1, 0x12FC9238, 0xFC61FEC3, 0x11FCF279, 0xFC61FFFF, 0x1FFCF238, 0xFC61FFFF, 0x1FFCF238, 0xFC61FFFF, 0x1FFCF238, 0xFC61FE03, 0x1FFCF378, 0xFC10E228, 0x40C8A449, 0xFC10E228, 0x40C8A449, 0xFC10E228, 0x40C8A449, 0xFC10E228, 0x40C8A449, 0xFC10E228, 0x40C8A449, 0xFC75FEEB, 0xFFFFFDFE, 0xFC75FEEB, 0xFFFFFDFE, 0xFC75FEEB, 0xFFFFFDFE, 0xFC75FEEB, 0xFFFFFDFE, 0xFC75FEEB, 0xFFFFFDFE, 0xFC75FEEB, 0xFFFFFDFE, 0xFC75FEEB, 0xFFFFFDFE, 0xFC75FEEB, 0xFFFFFDFE, 0xFC75FEEB, 0xFFFFFDFE, 0xFC75FEEB, 0xFFFFFDFE, 0xFC75FEEB, 0xFFFFFDFE, 0xFC75FEEB, 0xFFFFFDFE, 0xFC75FEEB, 0xFFFFFDFE, 0xFC75FEEB, 0xFFFFFDFE, 0xFC75FEEB, 0xFFFFFDFE - -glabel D_8014B748 -.word 0x8028E000 - -glabel D_8014B74C -.byte 0x00 - -glabel D_8014B74D -.byte 0x00 - -glabel D_8014B74E -.byte 0x00 - -glabel D_8014B74F -.byte 0x00 - -glabel D_8014B750 -.byte 0x00 - -glabel D_8014B751 -.byte 0x00 - -glabel D_8014B752 -.byte 0x00 - -glabel D_8014B753 -.byte 0x00 - -glabel D_8014B754 -.byte 0x00 - -glabel D_8014B755 -.byte 0x00 - -glabel D_8014B756 -.byte 0x00, 0x00 - -glabel D_8014B758 -.word 0x000003B6 - -glabel D_8014B75C -.word 0x000003E8 - -glabel D_8014B760 -.byte 0xFF - -glabel D_8014B761 -.byte 0xFF - -glabel D_8014B762 -.byte 0xFF - -glabel D_8014B763 -.byte 0x00 - -glabel D_8014B764 -.byte 0x00 - -glabel D_8014B765 -.byte 0x00, 0x00, 0x00 - -glabel D_8014B768 -.word 0x00010000, 0x00000000, 0x00000001, 0x00000000, 0x00000000, 0x00010000, 0x00000000, 0x00000001, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000 - -glabel D_8014B7A8 -.word 0x00000006, 0x00000000, 0x00000005, 0x00020000, 0x00000004, 0x00030000, 0x00000003, 0x00038000, 0x00000002, 0x0003C000, 0x00000001, 0x0003E000, 0x00000000, 0x0003F000, 0x00000000, 0x0003F800, 0x00000000, 0x00000000 - -glabel D_8014B7F0 -.word 0x00000000, 0x00000000 - -glabel D_8014B7F8 -.word 0xE200001C, 0x00552078, 0xE3000A01, 0x00000000, 0xD9C0F9FB, 0x00000000, 0xD9FFFFFF, 0x00220405, 0xDF000000, 0x00000000 - -glabel D_8014B820 -.word 0xE200001C, 0x00552D58, 0xE3000A01, 0x00000000, 0xD9C0F9FB, 0x00000000, 0xD9FFFFFF, 0x00220405, 0xDF000000, 0x00000000 - -glabel D_8014B848 -.word 0xE200001C, 0x00552478, 0xE3000A01, 0x00000000, 0xD9C0F9FB, 0x00000000, 0xD9FFFFFF, 0x00220405, 0xDF000000, 0x00000000 - -glabel D_8014B870 -.word 0xE200001C, 0x00553078, 0xE3000A01, 0x00000000, 0xD9C0F9FB, 0x00000000, 0xD9FFFFFF, 0x00220005, 0xDF000000, 0x00000000 - -glabel D_8014B898 -.word 0xE200001C, 0x005049D8, 0xE3000A01, 0x00000000, 0xD9C0F9FB, 0x00000000, 0xD9FFFFFF, 0x00220005, 0xDF000000, 0x00000000 - -glabel D_8014B8C0 -.word 0xE200001C, 0x00504DD8, 0xE3000A01, 0x00000000, 0xD9C0F9FB, 0x00000000, 0xD9FFFFFF, 0x00220005, 0xDF000000, 0x00000000 - -glabel D_8014B8E8 -.word 0xE200001C, 0x005045D8, 0xE3000A01, 0x00000000, 0xD9C0F9FB, 0x00000000, 0xD9FFFFFF, 0x00220005, 0xDF000000, 0x00000000 - -glabel D_8014B910 -.word 0xE200001C, 0x00552230, 0xE3000A01, 0x00000000, 0xD9C0F9FB, 0x00000000, 0xD9FFFFFF, 0x00220405, 0xDF000000, 0x00000000 - -glabel D_8014B938 -.word 0xE200001C, 0x00552E10, 0xE3000A01, 0x00000000, 0xD9C0F9FB, 0x00000000, 0xD9FFFFFF, 0x00220405, 0xDF000000, 0x00000000 - -glabel D_8014B960 -.word 0xE200001C, 0x00552478, 0xD9C0F9FB, 0x00000000, 0xD9FFFFFF, 0x00220405, 0xFCFFFFFF, 0xFFFE793C, 0xDF000000, 0x00000000 - -glabel D_8014B988 -.word 0xE200001C, 0x00553078, 0xE3000A01, 0x00000000, 0xD9C0F9FB, 0x00000000, 0xD9FFFFFF, 0x00220405, 0xDF000000, 0x00000000 - -glabel D_8014B9B0 -.word 0xE200001C, 0x00504A50, 0xE3000A01, 0x00000000, 0xD9C0F9FB, 0x00000000, 0xD9FFFFFF, 0x00220005, 0xDF000000, 0x00000000 - -glabel D_8014B9D8 -.word 0xE200001C, 0x00504F50, 0xE3000A01, 0x00000000, 0xD9C0F9FB, 0x00000000, 0xD9FFFFFF, 0x00220005, 0xDF000000, 0x00000000 - -glabel D_8014BA00 -.word 0xE3000A01, 0x00000000, 0xD9C0F9FB, 0x00000000, 0xD9FFFFFF, 0x00220005, 0xDF000000, 0x00000000 - -glabel D_8014BA20 -.word 0xE200001C, 0x005049F8, 0xE3000A01, 0x00000000, 0xD9C0F9FB, 0x00000000, 0xD9FFFFFF, 0x00220005, 0xDF000000, 0x00000000 - -glabel D_8014BA48 -.word 0xE200001C, 0x00552048, 0xE3000A01, 0x00000000, 0xD9C0F9FA, 0x00000000, 0xD9FFFFFF, 0x00220404, 0xDF000000, 0x00000000 - -glabel D_8014BA70 -.word 0xE200001C, 0x00553048, 0xE3000A01, 0x00000000, 0xD9C0F9FA, 0x00000000, 0xD9FFFFFF, 0x00220004, 0xDF000000, 0x00000000 - -glabel D_8014BA98 -.word 0xE200001C, 0x005041C8, 0xE3000A01, 0x00000000, 0xD9C0F9FA, 0x00000000, 0xD9FFFFFF, 0x00220004, 0xDF000000, 0x00000000 - -glabel D_8014BAC0 -.word 0xE200001C, 0x005049F8, 0xE3000A01, 0x00000000, 0xD9C0F9FB, 0x00000000, 0xD9FFFFFF, 0x00220005, 0xDF000000, 0x00000000 - -glabel D_8014BAE8 -.word 0xE200001C, 0x00504B40, 0xE3000A01, 0x00000000, 0xD9C0F9FB, 0x00000000, 0xD9FFFFFF, 0x00220005, 0xDF000000, 0x00000000 - -glabel D_8014BB10 -.word 0xE200001C, 0x00504B50, 0xE3000A01, 0x00000000, 0xD9C0F9FB, 0x00000000, 0xD9FFFFFF, 0x00220005, 0xDF000000, 0x00000000 - -glabel D_8014BB38 -.word 0xE200001C, 0x00504340, 0xE3000A01, 0x00000000, 0xD9C0F9FB, 0x00000000, 0xD9FFFFFF, 0x00220005, 0xDF000000, 0x00000000 - -glabel D_8014BB60 -.word 0xE200001C, 0x0C192078, 0xE3000A01, 0x00100000, 0xD9C0F9FB, 0x00000000, 0xD9FFFFFF, 0x00220405, 0xDF000000, 0x00000000 - -glabel D_8014BB88 -.word 0xE200001C, 0x0C192D58, 0xE3000A01, 0x00100000, 0xD9C0F9FB, 0x00000000, 0xD9FFFFFF, 0x00220405, 0xDF000000, 0x00000000 - -glabel D_8014BBB0 -.word 0xE200001C, 0x0C192478, 0xE3000A01, 0x00100000, 0xD9C0F9FB, 0x00000000, 0xD9FFFFFF, 0x00220405, 0xDF000000, 0x00000000 - -glabel D_8014BBD8 -.word 0xE200001C, 0x0C193078, 0xE3000A01, 0x00100000, 0xD9C0F9FB, 0x00000000, 0xD9FFFFFF, 0x00220005, 0xDF000000, 0x00000000 - -glabel D_8014BC00 -.word 0xE200001C, 0x0C1849D8, 0xE3000A01, 0x00100000, 0xD9C0F9FB, 0x00000000, 0xD9FFFFFF, 0x00220005, 0xDF000000, 0x00000000 - -glabel D_8014BC28 -.word 0xE200001C, 0x0C184DD8, 0xE3000A01, 0x00100000, 0xD9C0F9FB, 0x00000000, 0xD9FFFFFF, 0x00220005, 0xDF000000, 0x00000000 - -glabel D_8014BC50 -.word 0xE200001C, 0x0C1845D8, 0xE3000A01, 0x00100000, 0xD9C0F9FB, 0x00000000, 0xD9FFFFFF, 0x00220005, 0xDF000000, 0x00000000 - -glabel D_8014BC78 -.word 0xE200001C, 0x0C192230, 0xE3000A01, 0x00100000, 0xD9C0F9FB, 0x00000000, 0xD9FFFFFF, 0x00220405, 0xDF000000, 0x00000000 - -glabel D_8014BCA0 -.word 0xE200001C, 0x0C192E10, 0xE3000A01, 0x00100000, 0xD9C0F9FB, 0x00000000, 0xD9FFFFFF, 0x00220405, 0xDF000000, 0x00000000 - -glabel D_8014BCC8 -.word 0xE200001C, 0x0C192478, 0xE3000A01, 0x00100000, 0xD9C0F9FB, 0x00000000, 0xD9FFFFFF, 0x00220405, 0xFCFFFFFF, 0xFFFE793C, 0xDF000000, 0x00000000 - -glabel D_8014BCF8 -.word 0xE200001C, 0x0C193078, 0xE3000A01, 0x00100000, 0xD9C0F9FB, 0x00000000, 0xDF000000, 0x00000000 - -glabel D_8014BD18 -.word 0xE200001C, 0x0C184A50, 0xE3000A01, 0x00100000, 0xD9C0F9FB, 0x00000000, 0xD9FFFFFF, 0x00220005, 0xDF000000, 0x00000000 - -glabel D_8014BD40 -.word 0xE200001C, 0x0C184E50, 0xE3000A01, 0x00100000, 0xD9C0F9FB, 0x00000000, 0xD9FFFFFF, 0x00220005, 0xDF000000, 0x00000000 - -glabel D_8014BD68 -.word 0xE3000A01, 0x00100000, 0xD9C0F9FB, 0x00000000, 0xD9FFFFFF, 0x00220005, 0xDF000000, 0x00000000 - -glabel D_8014BD88 -.word 0xE200001C, 0x0C1849D8, 0xE3000A01, 0x00100000, 0xD9C0F9FB, 0x00000000, 0xD9FFFFFF, 0x00220005, 0xDF000000, 0x00000000 - -glabel D_8014BDB0 -.word 0xE200001C, 0x0C192048, 0xE3000A01, 0x00100000, 0xD9C0F9FA, 0x00000000, 0xD9FFFFFF, 0x00220404, 0xDF000000, 0x00000000 - -glabel D_8014BDD8 -.word 0xE200001C, 0x0C193048, 0xE3000A01, 0x00100000, 0xD9C0F9FA, 0x00000000, 0xD9FFFFFF, 0x00220004, 0xDF000000, 0x00000000 - -glabel D_8014BE00 -.word 0xE200001C, 0x0C1841C8, 0xE3000A01, 0x00100000, 0xD9C0F9FA, 0x00000000, 0xD9FFFFFF, 0x00220004, 0xDF000000, 0x00000000 - -glabel D_8014BE28 -.word 0xE200001C, 0x0C184B50, 0xE3000A01, 0x00100000, 0xD9C0F9FB, 0x00000000, 0xD9FFFFFF, 0x00220005, 0xDF000000, 0x00000000 - -glabel D_8014BE50 -.word 0xE200001C, 0x0C184340, 0xE3000A01, 0x00100000, 0xD9C0F9FB, 0x00000000, 0xD9FFFFFF, 0x00220005, 0xDF000000, 0x00000000 - -glabel D_8014BE78 -.word 0xE200001C, 0xC8112078, 0xE3000A01, 0x00100000, 0xD9C0F9FB, 0x00000000, 0xD9FFFFFF, 0x00230405, 0xDF000000, 0x00000000 - -glabel D_8014BEA0 -.word 0xE200001C, 0xC8112D58, 0xE3000A01, 0x00100000, 0xD9C0F9FB, 0x00000000, 0xD9FFFFFF, 0x00230405, 0xDF000000, 0x00000000 - -glabel D_8014BEC8 -.word 0xE200001C, 0xC8112478, 0xE3000A01, 0x00100000, 0xD9C0F9FB, 0x00000000, 0xD9FFFFFF, 0x00230405, 0xDF000000, 0x00000000 - -glabel D_8014BEF0 -.word 0xE200001C, 0xC8113078, 0xE3000A01, 0x00100000, 0xD9C0F9FB, 0x00000000, 0xD9FFFFFF, 0x00230005, 0xDF000000, 0x00000000 - -glabel D_8014BF18 -.word 0xE200001C, 0xC81049D8, 0xE3000A01, 0x00100000, 0xD9C0F9FB, 0x00000000, 0xD9FFFFFF, 0x00230005, 0xDF000000, 0x00000000 - -glabel D_8014BF40 -.word 0xE200001C, 0xC8104DD8, 0xE3000A01, 0x00100000, 0xD9C0F9FB, 0x00000000, 0xD9FFFFFF, 0x00230005, 0xDF000000, 0x00000000 - -glabel D_8014BF68 -.word 0xE200001C, 0xC81045D8, 0xE3000A01, 0x00100000, 0xD9C0F9FB, 0x00000000, 0xD9FFFFFF, 0x00230005, 0xDF000000, 0x00000000 - -glabel D_8014BF90 -.word 0xE200001C, 0xC8112230, 0xE3000A01, 0x00100000, 0xD9C0F9FB, 0x00000000, 0xD9FFFFFF, 0x00230405, 0xDF000000, 0x00000000 - -glabel D_8014BFB8 -.word 0xE200001C, 0xC8112E10, 0xE3000A01, 0x00100000, 0xD9C0F9FB, 0x00000000, 0xD9FFFFFF, 0x00230405, 0xDF000000, 0x00000000 - -glabel D_8014BFE0 -.word 0xE200001C, 0xC8112478, 0xE3000A01, 0x00100000, 0xD9C0F9FB, 0x00000000, 0xD9FFFFFF, 0x00230405, 0xDF000000, 0x00000000 - -glabel D_8014C008 -.word 0xE200001C, 0xC8113078, 0xE3000A01, 0x00100000, 0xD9C0F9FB, 0x00000000, 0xDF000000, 0x00000000 - -glabel D_8014C028 -.word 0xE200001C, 0xC8104A50, 0xE3000A01, 0x00100000, 0xD9C0F9FB, 0x00000000, 0xD9FFFFFF, 0x00230005, 0xDF000000, 0x00000000 - -glabel D_8014C050 -.word 0xE200001C, 0xC8104E50, 0xE3000A01, 0x00100000, 0xD9C0F9FB, 0x00000000, 0xD9FFFFFF, 0x00230005, 0xDF000000, 0x00000000 - -glabel D_8014C078 -.word 0xE3000A01, 0x00100000, 0xD9C0F9FB, 0x00000000, 0xD9FFFFFF, 0x00230005, 0xDF000000, 0x00000000 - -glabel D_8014C098 -.word 0xE200001C, 0xC81049D8, 0xE3000A01, 0x00100000, 0xD9C0F9FB, 0x00000000, 0xD9FFFFFF, 0x00230005, 0xDF000000, 0x00000000 - -glabel D_8014C0C0 -.word 0xE200001C, 0xC8112048, 0xE3000A01, 0x00100000, 0xD9C0F9FA, 0x00000000, 0xD9FFFFFF, 0x00230404, 0xDF000000, 0x00000000 - -glabel D_8014C0E8 -.word 0xE200001C, 0xC8113048, 0xE3000A01, 0x00100000, 0xD9C0F9FA, 0x00000000, 0xD9FFFFFF, 0x00230004, 0xDF000000, 0x00000000 - -glabel D_8014C110 -.word 0xE200001C, 0xC81041C8, 0xE3000A01, 0x00100000, 0xD9C0F9FA, 0x00000000, 0xD9FFFFFF, 0x00230004, 0xDF000000, 0x00000000 - -glabel D_8014C138 -.word 0xE200001C, 0xC8104B50, 0xE3000A01, 0x00100000, 0xD9C0F9FB, 0x00000000, 0xD9FFFFFF, 0x00220005, 0xDF000000, 0x00000000 - -glabel D_8014C160 -.word 0xE200001C, 0xC8104340, 0xE3000A01, 0x00100000, 0xD9C0F9FB, 0x00000000, 0xD9FFFFFF, 0x00220005, 0xDF000000, 0x00000000 - -glabel D_8014C188 -.word 0xFFFE7960, 0x000F4240, 0x000F4240, 0x000F4240, 0x00000000, 0x000F4240, 0x000F4240, 0x000F4240, 0x00000000, 0x000F4240, 0x000F4240, 0x000F4240, 0x00000000, 0x000F4240, 0x000F4240, 0x000F4240, 0x00000000, 0x007A1200, 0x007A1200, 0x007A1200, 0x00000000, 0x007A1200, 0x007270E0, 0x007270E0, 0x007270E0, 0x00000000, 0x006ACFC0, 0x006ACFC0, 0x006ACFC0, 0x006ACFC0, 0x00632EA0, 0x00632EA0, 0x00632EA0, 0x00000000, 0x005B8D80, 0x005B8D80, 0x005B8D80, 0x00000000, 0x0053EC60, 0x0053EC60, 0x0053EC60, 0x007A1200, 0x003D0900, 0x0040D990, 0x0044AA20, 0x0044AA20, 0x007A1200, 0x000AAE60 - -glabel D_8014C248 -.byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - glabel D_8014C250 .word 0x0001003C, 0x00000000, 0x00000000, 0x00000000 diff --git a/ver/us/asm/nonmatchings/182B30/reset_actor_blur.s b/ver/us/asm/nonmatchings/182B30/reset_actor_blur.s deleted file mode 100644 index 998a89f6e7..0000000000 --- a/ver/us/asm/nonmatchings/182B30/reset_actor_blur.s +++ /dev/null @@ -1,30 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel reset_actor_blur -/* 182E8C 802545AC 8C8301F4 */ lw $v1, 0x1f4($a0) -/* 182E90 802545B0 8C620094 */ lw $v0, 0x94($v1) -/* 182E94 802545B4 10400014 */ beqz $v0, .L80254608 -/* 182E98 802545B8 00000000 */ nop -/* 182E9C 802545BC 8C620000 */ lw $v0, ($v1) -/* 182EA0 802545C0 30420002 */ andi $v0, $v0, 2 -/* 182EA4 802545C4 14400010 */ bnez $v0, .L80254608 -/* 182EA8 802545C8 00000000 */ nop -/* 182EAC 802545CC 8C6500C0 */ lw $a1, 0xc0($v1) -/* 182EB0 802545D0 80A207DB */ lb $v0, 0x7db($a1) -/* 182EB4 802545D4 90A307DB */ lbu $v1, 0x7db($a1) -/* 182EB8 802545D8 1040000B */ beqz $v0, .L80254608 -/* 182EBC 802545DC 2462FFFF */ addiu $v0, $v1, -1 -/* 182EC0 802545E0 A0A207DB */ sb $v0, 0x7db($a1) -/* 182EC4 802545E4 00021600 */ sll $v0, $v0, 0x18 -/* 182EC8 802545E8 14400007 */ bnez $v0, .L80254608 -/* 182ECC 802545EC 3C02EFFF */ lui $v0, 0xefff -/* 182ED0 802545F0 8C830000 */ lw $v1, ($a0) -/* 182ED4 802545F4 3442FFFF */ ori $v0, $v0, 0xffff -/* 182ED8 802545F8 00621824 */ and $v1, $v1, $v0 -/* 182EDC 802545FC 24020001 */ addiu $v0, $zero, 1 -/* 182EE0 80254600 AC830000 */ sw $v1, ($a0) -/* 182EE4 80254604 A0A208AC */ sb $v0, 0x8ac($a1) -.L80254608: -/* 182EE8 80254608 03E00008 */ jr $ra -/* 182EEC 8025460C 00000000 */ nop diff --git a/ver/us/asm/nonmatchings/190A10/func_8026220C.s b/ver/us/asm/nonmatchings/190A10/func_8026220C.s deleted file mode 100644 index ea38780daf..0000000000 --- a/ver/us/asm/nonmatchings/190A10/func_8026220C.s +++ /dev/null @@ -1,18 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_8026220C -/* 190AEC 8026220C 3C0142C8 */ lui $at, 0x42c8 -/* 190AF0 80262210 44810000 */ mtc1 $at, $f0 -/* 190AF4 80262214 00000000 */ nop -/* 190AF8 80262218 460E003C */ c.lt.s $f0, $f14 -/* 190AFC 8026221C 00000000 */ nop -/* 190B00 80262220 45000002 */ bc1f .L8026222C -/* 190B04 80262224 0000102D */ daddu $v0, $zero, $zero -/* 190B08 80262228 2402001C */ addiu $v0, $zero, 0x1c -.L8026222C: -/* 190B0C 8026222C 03E00008 */ jr $ra -/* 190B10 80262230 00000000 */ nop -/* 190B14 80262234 00000000 */ nop -/* 190B18 80262238 00000000 */ nop -/* 190B1C 8026223C 00000000 */ nop diff --git a/ver/us/asm/nonmatchings/C50A0/init_item_entity_list.s b/ver/us/asm/nonmatchings/C50A0/init_item_entity_list.s deleted file mode 100644 index 566b1b2798..0000000000 --- a/ver/us/asm/nonmatchings/C50A0/init_item_entity_list.s +++ /dev/null @@ -1,29 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel init_item_entity_list -/* C77CC 801310CC 3C028007 */ lui $v0, %hi(gGameStatusPtr) -/* C77D0 801310D0 8C42419C */ lw $v0, %lo(gGameStatusPtr)($v0) -/* C77D4 801310D4 80420070 */ lb $v0, 0x70($v0) -/* C77D8 801310D8 14400005 */ bnez $v0, .L801310F0 -/* C77DC 801310DC 00000000 */ nop -/* C77E0 801310E0 3C028015 */ lui $v0, %hi(D_80155DA0) -/* C77E4 801310E4 24425DA0 */ addiu $v0, $v0, %lo(D_80155DA0) -/* C77E8 801310E8 0804C43E */ j .L801310F8 -/* C77EC 801310EC 00000000 */ nop -.L801310F0: -/* C77F0 801310F0 3C028015 */ lui $v0, %hi(D_801561A0) -/* C77F4 801310F4 244261A0 */ addiu $v0, $v0, %lo(D_801561A0) -.L801310F8: -/* C77F8 801310F8 3C018015 */ lui $at, %hi(D_801565A0) -/* C77FC 801310FC AC2265A0 */ sw $v0, %lo(D_801565A0)($at) -/* C7800 80131100 3C018015 */ lui $at, %hi(D_801565A4) -/* C7804 80131104 A42065A4 */ sh $zero, %lo(D_801565A4)($at) -/* C7808 80131108 3C018015 */ lui $at, %hi(D_801565A8) -/* C780C 8013110C A42065A8 */ sh $zero, %lo(D_801565A8)($at) -/* C7810 80131110 3C018015 */ lui $at, %hi(D_801512F8) -/* C7814 80131114 AC2012F8 */ sw $zero, %lo(D_801512F8)($at) -/* C7818 80131118 3C018015 */ lui $at, %hi(D_80155D84) -/* C781C 8013111C AC205D84 */ sw $zero, %lo(D_80155D84)($at) -/* C7820 80131120 03E00008 */ jr $ra -/* C7824 80131124 00000000 */ nop diff --git a/ver/us/asm/nonmatchings/a5dd0_len_114e0/entity_get_collision_flags.s b/ver/us/asm/nonmatchings/a5dd0_len_114e0/entity_get_collision_flags.s deleted file mode 100644 index 581646c217..0000000000 --- a/ver/us/asm/nonmatchings/a5dd0_len_114e0/entity_get_collision_flags.s +++ /dev/null @@ -1,84 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel entity_get_collision_flags -/* A6FB8 801108B8 3C020002 */ lui $v0, 2 -/* A6FBC 801108BC 8C830000 */ lw $v1, ($a0) -/* A6FC0 801108C0 90860004 */ lbu $a2, 4($a0) -/* A6FC4 801108C4 00621024 */ and $v0, $v1, $v0 -/* A6FC8 801108C8 10400006 */ beqz $v0, .L801108E4 -/* A6FCC 801108CC 0000282D */ daddu $a1, $zero, $zero -/* A6FD0 801108D0 24050080 */ addiu $a1, $zero, 0x80 -/* A6FD4 801108D4 3C02FFFD */ lui $v0, 0xfffd -/* A6FD8 801108D8 3442FFFF */ ori $v0, $v0, 0xffff -/* A6FDC 801108DC 00621024 */ and $v0, $v1, $v0 -/* A6FE0 801108E0 AC820000 */ sw $v0, ($a0) -.L801108E4: -/* A6FE4 801108E4 3C038016 */ lui $v1, %hi(gCollisionStatus+0x2) -/* A6FE8 801108E8 8463A552 */ lh $v1, %lo(gCollisionStatus+0x2)($v1) -/* A6FEC 801108EC 2402FFFF */ addiu $v0, $zero, -1 -/* A6FF0 801108F0 10620005 */ beq $v1, $v0, .L80110908 -/* A6FF4 801108F4 30624000 */ andi $v0, $v1, 0x4000 -/* A6FF8 801108F8 10400003 */ beqz $v0, .L80110908 -/* A6FFC 801108FC 306200FF */ andi $v0, $v1, 0xff -/* A7000 80110900 50C20001 */ beql $a2, $v0, .L80110908 -/* A7004 80110904 34A50001 */ ori $a1, $a1, 1 -.L80110908: -/* A7008 80110908 3C038016 */ lui $v1, %hi(gCollisionStatus+0x4) -/* A700C 8011090C 8463A554 */ lh $v1, %lo(gCollisionStatus+0x4)($v1) -/* A7010 80110910 2402FFFF */ addiu $v0, $zero, -1 -/* A7014 80110914 10620005 */ beq $v1, $v0, .L8011092C -/* A7018 80110918 30624000 */ andi $v0, $v1, 0x4000 -/* A701C 8011091C 10400003 */ beqz $v0, .L8011092C -/* A7020 80110920 306200FF */ andi $v0, $v1, 0xff -/* A7024 80110924 50C20001 */ beql $a2, $v0, .L8011092C -/* A7028 80110928 34A50100 */ ori $a1, $a1, 0x100 -.L8011092C: -/* A702C 8011092C 3C038016 */ lui $v1, %hi(gCollisionStatus+0x8) -/* A7030 80110930 8463A558 */ lh $v1, %lo(gCollisionStatus+0x8)($v1) -/* A7034 80110934 2402FFFF */ addiu $v0, $zero, -1 -/* A7038 80110938 10620005 */ beq $v1, $v0, .L80110950 -/* A703C 8011093C 30624000 */ andi $v0, $v1, 0x4000 -/* A7040 80110940 10400003 */ beqz $v0, .L80110950 -/* A7044 80110944 306200FF */ andi $v0, $v1, 0xff -/* A7048 80110948 50C20001 */ beql $a2, $v0, .L80110950 -/* A704C 8011094C 34A50004 */ ori $a1, $a1, 4 -.L80110950: -/* A7050 80110950 3C038016 */ lui $v1, %hi(gCollisionStatus) -/* A7054 80110954 8463A550 */ lh $v1, %lo(gCollisionStatus)($v1) -/* A7058 80110958 2402FFFF */ addiu $v0, $zero, -1 -/* A705C 8011095C 10620005 */ beq $v1, $v0, .L80110974 -/* A7060 80110960 30624000 */ andi $v0, $v1, 0x4000 -/* A7064 80110964 10400003 */ beqz $v0, .L80110974 -/* A7068 80110968 306200FF */ andi $v0, $v1, 0xff -/* A706C 8011096C 50C20001 */ beql $a2, $v0, .L80110974 -/* A7070 80110970 34A50010 */ ori $a1, $a1, 0x10 -.L80110974: -/* A7074 80110974 3C038016 */ lui $v1, %hi(gCollisionStatus+0x14) -/* A7078 80110978 8463A564 */ lh $v1, %lo(gCollisionStatus+0x14)($v1) -/* A707C 8011097C 2402FFFF */ addiu $v0, $zero, -1 -/* A7080 80110980 10620005 */ beq $v1, $v0, .L80110998 -/* A7084 80110984 30624000 */ andi $v0, $v1, 0x4000 -/* A7088 80110988 10400003 */ beqz $v0, .L80110998 -/* A708C 8011098C 306200FF */ andi $v0, $v1, 0xff -/* A7090 80110990 50C20001 */ beql $a2, $v0, .L80110998 -/* A7094 80110994 34A50040 */ ori $a1, $a1, 0x40 -.L80110998: -/* A7098 80110998 3C038016 */ lui $v1, %hi(gCollisionStatus+0x12) -/* A709C 8011099C 8463A562 */ lh $v1, %lo(gCollisionStatus+0x12)($v1) -/* A70A0 801109A0 2402FFFF */ addiu $v0, $zero, -1 -/* A70A4 801109A4 1062000B */ beq $v1, $v0, .L801109D4 -/* A70A8 801109A8 30624000 */ andi $v0, $v1, 0x4000 -/* A70AC 801109AC 10400009 */ beqz $v0, .L801109D4 -/* A70B0 801109B0 306200FF */ andi $v0, $v1, 0xff -/* A70B4 801109B4 14C20007 */ bne $a2, $v0, .L801109D4 -/* A70B8 801109B8 00000000 */ nop -/* A70BC 801109BC 3C02800F */ lui $v0, %hi(gPlayerStatusPtr) -/* A70C0 801109C0 8C427B30 */ lw $v0, %lo(gPlayerStatusPtr)($v0) -/* A70C4 801109C4 8C4200E0 */ lw $v0, 0xe0($v0) -/* A70C8 801109C8 30428000 */ andi $v0, $v0, 0x8000 -/* A70CC 801109CC 54400001 */ bnel $v0, $zero, .L801109D4 -/* A70D0 801109D0 34A50008 */ ori $a1, $a1, 8 -.L801109D4: -/* A70D4 801109D4 03E00008 */ jr $ra -/* A70D8 801109D8 00A0102D */ daddu $v0, $a1, $zero diff --git a/ver/us/asm/nonmatchings/a5dd0_len_114e0/exec_entity_updatecmd.s b/ver/us/asm/nonmatchings/a5dd0_len_114e0/exec_entity_updatecmd.s deleted file mode 100644 index f531249e69..0000000000 --- a/ver/us/asm/nonmatchings/a5dd0_len_114e0/exec_entity_updatecmd.s +++ /dev/null @@ -1,17 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel exec_entity_updatecmd -/* A6468 8010FD68 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* A646C 8010FD6C AFB00010 */ sw $s0, 0x10($sp) -/* A6470 8010FD70 0080802D */ daddu $s0, $a0, $zero -/* A6474 8010FD74 AFBF0014 */ sw $ra, 0x14($sp) -.L8010FD78: -/* A6478 8010FD78 0C043EF6 */ jal step_entity_updatecmd -/* A647C 8010FD7C 0200202D */ daddu $a0, $s0, $zero -/* A6480 8010FD80 1440FFFD */ bnez $v0, .L8010FD78 -/* A6484 8010FD84 00000000 */ nop -/* A6488 8010FD88 8FBF0014 */ lw $ra, 0x14($sp) -/* A648C 8010FD8C 8FB00010 */ lw $s0, 0x10($sp) -/* A6490 8010FD90 03E00008 */ jr $ra -/* A6494 8010FD94 27BD0018 */ addiu $sp, $sp, 0x18 diff --git a/ver/us/asm/nonmatchings/a5dd0_len_114e0/get_background_color_blend.s b/ver/us/asm/nonmatchings/a5dd0_len_114e0/get_background_color_blend.s deleted file mode 100644 index 08334e2445..0000000000 --- a/ver/us/asm/nonmatchings/a5dd0_len_114e0/get_background_color_blend.s +++ /dev/null @@ -1,17 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel get_background_color_blend -/* B2580 8011BE80 3C028015 */ lui $v0, %hi(D_8014B74D) -/* B2584 8011BE84 9042B74D */ lbu $v0, %lo(D_8014B74D)($v0) -/* B2588 8011BE88 A0820000 */ sb $v0, ($a0) -/* B258C 8011BE8C 3C028015 */ lui $v0, %hi(D_8014B74E) -/* B2590 8011BE90 9042B74E */ lbu $v0, %lo(D_8014B74E)($v0) -/* B2594 8011BE94 A0A20000 */ sb $v0, ($a1) -/* B2598 8011BE98 3C028015 */ lui $v0, %hi(D_8014B74F) -/* B259C 8011BE9C 9042B74F */ lbu $v0, %lo(D_8014B74F)($v0) -/* B25A0 8011BEA0 A0C20000 */ sb $v0, ($a2) -/* B25A4 8011BEA4 3C028015 */ lui $v0, %hi(D_8014B74C) -/* B25A8 8011BEA8 9042B74C */ lbu $v0, %lo(D_8014B74C)($v0) -/* B25AC 8011BEAC 03E00008 */ jr $ra -/* B25B0 8011BEB0 A0E20000 */ sb $v0, ($a3) diff --git a/ver/us/asm/nonmatchings/a5dd0_len_114e0/render_entities.s b/ver/us/asm/nonmatchings/a5dd0_len_114e0/render_entities.s deleted file mode 100644 index 5071fc8641..0000000000 --- a/ver/us/asm/nonmatchings/a5dd0_len_114e0/render_entities.s +++ /dev/null @@ -1,154 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel render_entities -/* A65B4 8010FEB4 27BDFFE0 */ addiu $sp, $sp, -0x20 -/* A65B8 8010FEB8 AFB10014 */ sw $s1, 0x14($sp) -/* A65BC 8010FEBC 0000882D */ daddu $s1, $zero, $zero -/* A65C0 8010FEC0 AFB20018 */ sw $s2, 0x18($sp) -/* A65C4 8010FEC4 241200FF */ addiu $s2, $zero, 0xff -/* A65C8 8010FEC8 AFBF001C */ sw $ra, 0x1c($sp) -/* A65CC 8010FECC AFB00010 */ sw $s0, 0x10($sp) -.L8010FED0: -/* A65D0 8010FED0 0C04417A */ jal get_entity_by_index -/* A65D4 8010FED4 0220202D */ daddu $a0, $s1, $zero -/* A65D8 8010FED8 0040802D */ daddu $s0, $v0, $zero -/* A65DC 8010FEDC 52000070 */ beql $s0, $zero, .L801100A0 -/* A65E0 8010FEE0 26310001 */ addiu $s1, $s1, 1 -/* A65E4 8010FEE4 3C028007 */ lui $v0, %hi(gGameStatusPtr) -/* A65E8 8010FEE8 8C42419C */ lw $v0, %lo(gGameStatusPtr)($v0) -/* A65EC 8010FEEC 80420070 */ lb $v0, 0x70($v0) -/* A65F0 8010FEF0 14400025 */ bnez $v0, .L8010FF88 -/* A65F4 8010FEF4 00000000 */ nop -/* A65F8 8010FEF8 3C028015 */ lui $v0, %hi(D_80151310) -/* A65FC 8010FEFC 8C421310 */ lw $v0, %lo(D_80151310)($v0) -/* A6600 8010FF00 10400013 */ beqz $v0, .L8010FF50 -/* A6604 8010FF04 3C030008 */ lui $v1, 8 -/* A6608 8010FF08 8E020000 */ lw $v0, ($s0) -/* A660C 8010FF0C 00431024 */ and $v0, $v0, $v1 -/* A6610 8010FF10 1440000F */ bnez $v0, .L8010FF50 -/* A6614 8010FF14 00000000 */ nop -/* A6618 8010FF18 8E060048 */ lw $a2, 0x48($s0) -/* A661C 8010FF1C 3C02800F */ lui $v0, %hi(gPlayerStatusPtr) -/* A6620 8010FF20 8C427B30 */ lw $v0, %lo(gPlayerStatusPtr)($v0) -/* A6624 8010FF24 8E070050 */ lw $a3, 0x50($s0) -/* A6628 8010FF28 C44C0028 */ lwc1 $f12, 0x28($v0) -/* A662C 8010FF2C 0C00A7B5 */ jal dist2D -/* A6630 8010FF30 C44E0030 */ lwc1 $f14, 0x30($v0) -/* A6634 8010FF34 3C014348 */ lui $at, 0x4348 -/* A6638 8010FF38 44811000 */ mtc1 $at, $f2 -/* A663C 8010FF3C 00000000 */ nop -/* A6640 8010FF40 4600103C */ c.lt.s $f2, $f0 -/* A6644 8010FF44 00000000 */ nop -/* A6648 8010FF48 45030055 */ bc1tl .L801100A0 -/* A664C 8010FF4C 26310001 */ addiu $s1, $s1, 1 -.L8010FF50: -/* A6650 8010FF50 3C038015 */ lui $v1, %hi(D_80151310) -/* A6654 8010FF54 8C631310 */ lw $v1, %lo(D_80151310)($v1) -/* A6658 8010FF58 24020001 */ addiu $v0, $zero, 1 -/* A665C 8010FF5C 54620004 */ bnel $v1, $v0, .L8010FF70 -/* A6660 8010FF60 24020002 */ addiu $v0, $zero, 2 -/* A6664 8010FF64 8E020000 */ lw $v0, ($s0) -/* A6668 8010FF68 08043FE0 */ j .L8010FF80 -/* A666C 8010FF6C 30420002 */ andi $v0, $v0, 2 -.L8010FF70: -/* A6670 8010FF70 14620005 */ bne $v1, $v0, .L8010FF88 -/* A6674 8010FF74 3C030004 */ lui $v1, 4 -/* A6678 8010FF78 8E020000 */ lw $v0, ($s0) -/* A667C 8010FF7C 00431024 */ and $v0, $v0, $v1 -.L8010FF80: -/* A6680 8010FF80 50400047 */ beql $v0, $zero, .L801100A0 -/* A6684 8010FF84 26310001 */ addiu $s1, $s1, 1 -.L8010FF88: -/* A6688 8010FF88 8E030000 */ lw $v1, ($s0) -/* A668C 8010FF8C 30620001 */ andi $v0, $v1, 1 -/* A6690 8010FF90 54400043 */ bnel $v0, $zero, .L801100A0 -/* A6694 8010FF94 26310001 */ addiu $s1, $s1, 1 -/* A6698 8010FF98 30620008 */ andi $v0, $v1, 8 -/* A669C 8010FF9C 1040001F */ beqz $v0, .L8011001C -/* A66A0 8010FFA0 00000000 */ nop -/* A66A4 8010FFA4 3C028015 */ lui $v0, %hi(D_8014AFB0) -/* A66A8 8010FFA8 8C42AFB0 */ lw $v0, %lo(D_8014AFB0)($v0) -/* A66AC 8010FFAC 14520007 */ bne $v0, $s2, .L8010FFCC -/* A66B0 8010FFB0 00000000 */ nop -/* A66B4 8010FFB4 8E06003C */ lw $a2, 0x3c($s0) -/* A66B8 8010FFB8 10C0000A */ beqz $a2, .L8010FFE4 -/* A66BC 8010FFBC 00000000 */ nop -/* A66C0 8010FFC0 86040014 */ lh $a0, 0x14($s0) -/* A66C4 8010FFC4 08043FF7 */ j .L8010FFDC -/* A66C8 8010FFC8 92050004 */ lbu $a1, 4($s0) -.L8010FFCC: -/* A66CC 8010FFCC 86040014 */ lh $a0, 0x14($s0) -/* A66D0 8010FFD0 92050004 */ lbu $a1, 4($s0) -/* A66D4 8010FFD4 3C068011 */ lui $a2, %hi(func_8010FE44) -/* A66D8 8010FFD8 24C6FE44 */ addiu $a2, $a2, %lo(func_8010FE44) -.L8010FFDC: -/* A66DC 8010FFDC 0C048000 */ jal func_80120000 -/* A66E0 8010FFE0 00000000 */ nop -.L8010FFE4: -/* A66E4 8010FFE4 8E070044 */ lw $a3, 0x44($s0) -/* A66E8 8010FFE8 14E00006 */ bnez $a3, .L80110004 -/* A66EC 8010FFEC 00000000 */ nop -/* A66F0 8010FFF0 86040014 */ lh $a0, 0x14($s0) -/* A66F4 8010FFF4 0C047CC1 */ jal func_8011F304 -/* A66F8 8010FFF8 260500B8 */ addiu $a1, $s0, 0xb8 -/* A66FC 8010FFFC 08044028 */ j .L801100A0 -/* A6700 80110000 26310001 */ addiu $s1, $s1, 1 -.L80110004: -/* A6704 80110004 86040014 */ lh $a0, 0x14($s0) -/* A6708 80110008 86060012 */ lh $a2, 0x12($s0) -/* A670C 8011000C 0C047CFA */ jal func_8011F3E8 -/* A6710 80110010 260500B8 */ addiu $a1, $s0, 0xb8 -/* A6714 80110014 08044028 */ j .L801100A0 -/* A6718 80110018 26310001 */ addiu $s1, $s1, 1 -.L8011001C: -/* A671C 8011001C 3C028015 */ lui $v0, %hi(D_8014AFB0) -/* A6720 80110020 8C42AFB0 */ lw $v0, %lo(D_8014AFB0)($v0) -/* A6724 80110024 1452000B */ bne $v0, $s2, .L80110054 -/* A6728 80110028 00000000 */ nop -/* A672C 8011002C 8E06003C */ lw $a2, 0x3c($s0) -/* A6730 80110030 10C00004 */ beqz $a2, .L80110044 -/* A6734 80110034 00000000 */ nop -/* A6738 80110038 86040014 */ lh $a0, 0x14($s0) -/* A673C 8011003C 08044019 */ j .L80110064 -/* A6740 80110040 92050004 */ lbu $a1, 4($s0) -.L80110044: -/* A6744 80110044 0C048B77 */ jal get_entity_model -/* A6748 80110048 86040014 */ lh $a0, 0x14($s0) -/* A674C 8011004C 0804401B */ j .L8011006C -/* A6750 80110050 AC400060 */ sw $zero, 0x60($v0) -.L80110054: -/* A6754 80110054 86040014 */ lh $a0, 0x14($s0) -/* A6758 80110058 92050004 */ lbu $a1, 4($s0) -/* A675C 8011005C 3C068011 */ lui $a2, %hi(func_8010FE44) -/* A6760 80110060 24C6FE44 */ addiu $a2, $a2, %lo(func_8010FE44) -.L80110064: -/* A6764 80110064 0C048BD9 */ jal bind_entity_model_setupGfx -/* A6768 80110068 00000000 */ nop -.L8011006C: -/* A676C 8011006C 8E070044 */ lw $a3, 0x44($s0) -/* A6770 80110070 14E00006 */ bnez $a3, .L8011008C -/* A6774 80110074 00000000 */ nop -/* A6778 80110078 86040014 */ lh $a0, 0x14($s0) -/* A677C 8011007C 0C04873A */ jal draw_entity_model_shadow -/* A6780 80110080 260500B8 */ addiu $a1, $s0, 0xb8 -/* A6784 80110084 08044028 */ j .L801100A0 -/* A6788 80110088 26310001 */ addiu $s1, $s1, 1 -.L8011008C: -/* A678C 8011008C 86040014 */ lh $a0, 0x14($s0) -/* A6790 80110090 86060012 */ lh $a2, 0x12($s0) -/* A6794 80110094 0C0487AE */ jal draw_entity_model_main -/* A6798 80110098 260500B8 */ addiu $a1, $s0, 0xb8 -/* A679C 8011009C 26310001 */ addiu $s1, $s1, 1 -.L801100A0: -/* A67A0 801100A0 2A22001E */ slti $v0, $s1, 0x1e -/* A67A4 801100A4 1440FF8A */ bnez $v0, .L8010FED0 -/* A67A8 801100A8 00000000 */ nop -/* A67AC 801100AC 0C044033 */ jal render_shadows -/* A67B0 801100B0 00000000 */ nop -/* A67B4 801100B4 8FBF001C */ lw $ra, 0x1c($sp) -/* A67B8 801100B8 8FB20018 */ lw $s2, 0x18($sp) -/* A67BC 801100BC 8FB10014 */ lw $s1, 0x14($sp) -/* A67C0 801100C0 8FB00010 */ lw $s0, 0x10($sp) -/* A67C4 801100C4 03E00008 */ jr $ra -/* A67C8 801100C8 27BD0020 */ addiu $sp, $sp, 0x20 diff --git a/ver/us/asm/nonmatchings/a5dd0_len_114e0/render_shadows.s b/ver/us/asm/nonmatchings/a5dd0_len_114e0/render_shadows.s deleted file mode 100644 index e192f4fd38..0000000000 --- a/ver/us/asm/nonmatchings/a5dd0_len_114e0/render_shadows.s +++ /dev/null @@ -1,100 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel render_shadows -/* A67CC 801100CC 27BDFFD8 */ addiu $sp, $sp, -0x28 -/* A67D0 801100D0 AFB10014 */ sw $s1, 0x14($sp) -/* A67D4 801100D4 0000882D */ daddu $s1, $zero, $zero -/* A67D8 801100D8 AFB3001C */ sw $s3, 0x1c($sp) -/* A67DC 801100DC 3C131000 */ lui $s3, 0x1000 -/* A67E0 801100E0 AFB20018 */ sw $s2, 0x18($sp) -/* A67E4 801100E4 3C122000 */ lui $s2, 0x2000 -/* A67E8 801100E8 AFBF0020 */ sw $ra, 0x20($sp) -/* A67EC 801100EC AFB00010 */ sw $s0, 0x10($sp) -.L801100F0: -/* A67F0 801100F0 0C044181 */ jal get_shadow_by_index -/* A67F4 801100F4 0220202D */ daddu $a0, $s1, $zero -/* A67F8 801100F8 0040802D */ daddu $s0, $v0, $zero -/* A67FC 801100FC 52000041 */ beql $s0, $zero, .L80110204 -/* A6800 80110100 26310001 */ addiu $s1, $s1, 1 -/* A6804 80110104 8E030000 */ lw $v1, ($s0) -/* A6808 80110108 30620001 */ andi $v0, $v1, 1 -/* A680C 8011010C 1040000E */ beqz $v0, .L80110148 -/* A6810 80110110 00731024 */ and $v0, $v1, $s3 -/* A6814 80110114 5040003B */ beql $v0, $zero, .L80110204 -/* A6818 80110118 26310001 */ addiu $s1, $s1, 1 -/* A681C 8011011C 92020005 */ lbu $v0, 5($s0) -/* A6820 80110120 2442FFEC */ addiu $v0, $v0, -0x14 -/* A6824 80110124 A2020005 */ sb $v0, 5($s0) -/* A6828 80110128 304200FF */ andi $v0, $v0, 0xff -/* A682C 8011012C 2C420015 */ sltiu $v0, $v0, 0x15 -/* A6830 80110130 50400034 */ beql $v0, $zero, .L80110204 -/* A6834 80110134 26310001 */ addiu $s1, $s1, 1 -/* A6838 80110138 0060102D */ daddu $v0, $v1, $zero -/* A683C 8011013C 00521025 */ or $v0, $v0, $s2 -/* A6840 80110140 08044080 */ j .L80110200 -/* A6844 80110144 AE020000 */ sw $v0, ($s0) -.L80110148: -/* A6848 80110148 30620008 */ andi $v0, $v1, 8 -/* A684C 8011014C 1040000F */ beqz $v0, .L8011018C -/* A6850 80110150 00731024 */ and $v0, $v1, $s3 -/* A6854 80110154 8E07000C */ lw $a3, 0xc($s0) -/* A6858 80110158 14E00006 */ bnez $a3, .L80110174 -/* A685C 8011015C 00000000 */ nop -/* A6860 80110160 86040008 */ lh $a0, 8($s0) -/* A6864 80110164 0C047CC1 */ jal func_8011F304 -/* A6868 80110168 26050038 */ addiu $a1, $s0, 0x38 -/* A686C 8011016C 08044081 */ j .L80110204 -/* A6870 80110170 26310001 */ addiu $s1, $s1, 1 -.L80110174: -/* A6874 80110174 86040008 */ lh $a0, 8($s0) -/* A6878 80110178 8606000A */ lh $a2, 0xa($s0) -/* A687C 8011017C 0C047CFA */ jal func_8011F3E8 -/* A6880 80110180 26050038 */ addiu $a1, $s0, 0x38 -/* A6884 80110184 08044081 */ j .L80110204 -/* A6888 80110188 26310001 */ addiu $s1, $s1, 1 -.L8011018C: -/* A688C 8011018C 1040000B */ beqz $v0, .L801101BC -/* A6890 80110190 00000000 */ nop -/* A6894 80110194 92020005 */ lbu $v0, 5($s0) -/* A6898 80110198 2442FFEC */ addiu $v0, $v0, -0x14 -/* A689C 8011019C A2020005 */ sb $v0, 5($s0) -/* A68A0 801101A0 304200FF */ andi $v0, $v0, 0xff -/* A68A4 801101A4 2C420015 */ sltiu $v0, $v0, 0x15 -/* A68A8 801101A8 10400004 */ beqz $v0, .L801101BC -/* A68AC 801101AC 00000000 */ nop -/* A68B0 801101B0 8E020000 */ lw $v0, ($s0) -/* A68B4 801101B4 00521025 */ or $v0, $v0, $s2 -/* A68B8 801101B8 AE020000 */ sw $v0, ($s0) -.L801101BC: -/* A68BC 801101BC 86040008 */ lh $a0, 8($s0) -/* A68C0 801101C0 92050005 */ lbu $a1, 5($s0) -/* A68C4 801101C4 3C068011 */ lui $a2, %hi(entity_model_set_shadow_color) -/* A68C8 801101C8 0C048BD9 */ jal bind_entity_model_setupGfx -/* A68CC 801101CC 24C6FE68 */ addiu $a2, $a2, %lo(entity_model_set_shadow_color) -/* A68D0 801101D0 8E07000C */ lw $a3, 0xc($s0) -/* A68D4 801101D4 14E00006 */ bnez $a3, .L801101F0 -/* A68D8 801101D8 00000000 */ nop -/* A68DC 801101DC 86040008 */ lh $a0, 8($s0) -/* A68E0 801101E0 0C04873A */ jal draw_entity_model_shadow -/* A68E4 801101E4 26050038 */ addiu $a1, $s0, 0x38 -/* A68E8 801101E8 08044081 */ j .L80110204 -/* A68EC 801101EC 26310001 */ addiu $s1, $s1, 1 -.L801101F0: -/* A68F0 801101F0 86040008 */ lh $a0, 8($s0) -/* A68F4 801101F4 8606000A */ lh $a2, 0xa($s0) -/* A68F8 801101F8 0C0487AE */ jal draw_entity_model_main -/* A68FC 801101FC 26050038 */ addiu $a1, $s0, 0x38 -.L80110200: -/* A6900 80110200 26310001 */ addiu $s1, $s1, 1 -.L80110204: -/* A6904 80110204 2A22003C */ slti $v0, $s1, 0x3c -/* A6908 80110208 1440FFB9 */ bnez $v0, .L801100F0 -/* A690C 8011020C 00000000 */ nop -/* A6910 80110210 8FBF0020 */ lw $ra, 0x20($sp) -/* A6914 80110214 8FB3001C */ lw $s3, 0x1c($sp) -/* A6918 80110218 8FB20018 */ lw $s2, 0x18($sp) -/* A691C 8011021C 8FB10014 */ lw $s1, 0x14($sp) -/* A6920 80110220 8FB00010 */ lw $s0, 0x10($sp) -/* A6924 80110224 03E00008 */ jr $ra -/* A6928 80110228 27BD0028 */ addiu $sp, $sp, 0x28 diff --git a/ver/us/asm/nonmatchings/a5dd0_len_114e0/set_background_color_blend.s b/ver/us/asm/nonmatchings/a5dd0_len_114e0/set_background_color_blend.s deleted file mode 100644 index 071ff36003..0000000000 --- a/ver/us/asm/nonmatchings/a5dd0_len_114e0/set_background_color_blend.s +++ /dev/null @@ -1,13 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel set_background_color_blend -/* B255C 8011BE5C 3C018015 */ lui $at, %hi(D_8014B74D) -/* B2560 8011BE60 A024B74D */ sb $a0, %lo(D_8014B74D)($at) -/* B2564 8011BE64 3C018015 */ lui $at, %hi(D_8014B74E) -/* B2568 8011BE68 A025B74E */ sb $a1, %lo(D_8014B74E)($at) -/* B256C 8011BE6C 3C018015 */ lui $at, %hi(D_8014B74F) -/* B2570 8011BE70 A026B74F */ sb $a2, %lo(D_8014B74F)($at) -/* B2574 8011BE74 3C018015 */ lui $at, %hi(D_8014B74C) -/* B2578 8011BE78 03E00008 */ jr $ra -/* B257C 8011BE7C A027B74C */ sb $a3, %lo(D_8014B74C)($at) diff --git a/ver/us/asm/nonmatchings/a5dd0_len_114e0/step_entity_updatecmd.s b/ver/us/asm/nonmatchings/a5dd0_len_114e0/step_entity_commandlist.s similarity index 99% rename from ver/us/asm/nonmatchings/a5dd0_len_114e0/step_entity_updatecmd.s rename to ver/us/asm/nonmatchings/a5dd0_len_114e0/step_entity_commandlist.s index efe2ed4065..990828cbb0 100644 --- a/ver/us/asm/nonmatchings/a5dd0_len_114e0/step_entity_updatecmd.s +++ b/ver/us/asm/nonmatchings/a5dd0_len_114e0/step_entity_commandlist.s @@ -8,7 +8,7 @@ glabel jtbl_8014F740 .section .text -glabel step_entity_updatecmd +glabel step_entity_commandlist /* A62D8 8010FBD8 27BDFFE0 */ addiu $sp, $sp, -0x20 /* A62DC 8010FBDC AFB10014 */ sw $s1, 0x14($sp) /* A62E0 8010FBE0 0080882D */ daddu $s1, $a0, $zero diff --git a/ver/us/asm/nonmatchings/a5dd0_len_114e0/update_entities.s b/ver/us/asm/nonmatchings/a5dd0_len_114e0/update_entities.s deleted file mode 100644 index 2078b55c9a..0000000000 --- a/ver/us/asm/nonmatchings/a5dd0_len_114e0/update_entities.s +++ /dev/null @@ -1,269 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel update_entities -/* A5DD0 8010F6D0 27BDFFD8 */ addiu $sp, $sp, -0x28 -/* A5DD4 8010F6D4 AFB10014 */ sw $s1, 0x14($sp) -/* A5DD8 8010F6D8 0000882D */ daddu $s1, $zero, $zero -/* A5DDC 8010F6DC AFB3001C */ sw $s3, 0x1c($sp) -/* A5DE0 8010F6E0 3C130200 */ lui $s3, 0x200 -/* A5DE4 8010F6E4 3C038015 */ lui $v1, %hi(D_80151330) -/* A5DE8 8010F6E8 24631330 */ addiu $v1, $v1, %lo(D_80151330) -/* A5DEC 8010F6EC AFBF0020 */ sw $ra, 0x20($sp) -/* A5DF0 8010F6F0 AFB20018 */ sw $s2, 0x18($sp) -/* A5DF4 8010F6F4 AFB00010 */ sw $s0, 0x10($sp) -/* A5DF8 8010F6F8 8C620000 */ lw $v0, ($v1) -/* A5DFC 8010F6FC 3C12800B */ lui $s2, %hi(gCameras) -/* A5E00 8010F700 26521D80 */ addiu $s2, $s2, %lo(gCameras) -/* A5E04 8010F704 3C018015 */ lui $at, %hi(D_801512BC) -/* A5E08 8010F708 AC2012BC */ sw $zero, %lo(D_801512BC)($at) -/* A5E0C 8010F70C 3C018015 */ lui $at, %hi(D_801512C0) -/* A5E10 8010F710 AC2012C0 */ sw $zero, %lo(D_801512C0)($at) -/* A5E14 8010F714 24420001 */ addiu $v0, $v0, 1 -/* A5E18 8010F718 AC620000 */ sw $v0, ($v1) -.L8010F71C: -/* A5E1C 8010F71C 0C04417A */ jal get_entity_by_index -/* A5E20 8010F720 0220202D */ daddu $a0, $s1, $zero -/* A5E24 8010F724 0040802D */ daddu $s0, $v0, $zero -/* A5E28 8010F728 520000CD */ beql $s0, $zero, .L8010FA60 -/* A5E2C 8010F72C 26310001 */ addiu $s1, $s1, 1 -/* A5E30 8010F730 3C028015 */ lui $v0, %hi(D_801512C0) -/* A5E34 8010F734 244212C0 */ addiu $v0, $v0, %lo(D_801512C0) -/* A5E38 8010F738 8C430000 */ lw $v1, ($v0) -/* A5E3C 8010F73C 24630001 */ addiu $v1, $v1, 1 -/* A5E40 8010F740 AC430000 */ sw $v1, ($v0) -/* A5E44 8010F744 8E030000 */ lw $v1, ($s0) -/* A5E48 8010F748 3C024000 */ lui $v0, 0x4000 -/* A5E4C 8010F74C 00621024 */ and $v0, $v1, $v0 -/* A5E50 8010F750 544000C3 */ bnel $v0, $zero, .L8010FA60 -/* A5E54 8010F754 26310001 */ addiu $s1, $s1, 1 -/* A5E58 8010F758 3C020100 */ lui $v0, 0x100 -/* A5E5C 8010F75C 00621024 */ and $v0, $v1, $v0 -/* A5E60 8010F760 1040000D */ beqz $v0, .L8010F798 -/* A5E64 8010F764 3C02FEFF */ lui $v0, 0xfeff -/* A5E68 8010F768 3442FFFF */ ori $v0, $v0, 0xffff -/* A5E6C 8010F76C 00622024 */ and $a0, $v1, $v0 -/* A5E70 8010F770 30628000 */ andi $v0, $v1, 0x8000 -/* A5E74 8010F774 14400003 */ bnez $v0, .L8010F784 -/* A5E78 8010F778 AE040000 */ sw $a0, ($s0) -/* A5E7C 8010F77C 00931025 */ or $v0, $a0, $s3 -/* A5E80 8010F780 AE020000 */ sw $v0, ($s0) -.L8010F784: -/* A5E84 8010F784 2405000A */ addiu $a1, $zero, 0xa -/* A5E88 8010F788 8E040028 */ lw $a0, 0x28($s0) -/* A5E8C 8010F78C 0C0B0CF8 */ jal start_script -/* A5E90 8010F790 24060020 */ addiu $a2, $zero, 0x20 -/* A5E94 8010F794 AE020024 */ sw $v0, 0x24($s0) -.L8010F798: -/* A5E98 8010F798 8E020000 */ lw $v0, ($s0) -/* A5E9C 8010F79C 00531024 */ and $v0, $v0, $s3 -/* A5EA0 8010F7A0 1040002D */ beqz $v0, .L8010F858 -/* A5EA4 8010F7A4 00000000 */ nop -/* A5EA8 8010F7A8 8E020024 */ lw $v0, 0x24($s0) -/* A5EAC 8010F7AC 0C0B1059 */ jal does_script_exist -/* A5EB0 8010F7B0 8C440144 */ lw $a0, 0x144($v0) -/* A5EB4 8010F7B4 10400024 */ beqz $v0, .L8010F848 -/* A5EB8 8010F7B8 3C03FDFF */ lui $v1, 0xfdff -/* A5EBC 8010F7BC 8E020000 */ lw $v0, ($s0) -/* A5EC0 8010F7C0 30420008 */ andi $v0, $v0, 8 -/* A5EC4 8010F7C4 10400005 */ beqz $v0, .L8010F7DC -/* A5EC8 8010F7C8 00000000 */ nop -/* A5ECC 8010F7CC 0C047A2F */ jal func_8011E8BC -/* A5ED0 8010F7D0 86040014 */ lh $a0, 0x14($s0) -/* A5ED4 8010F7D4 08043DF9 */ j .L8010F7E4 -/* A5ED8 8010F7D8 00000000 */ nop -.L8010F7DC: -/* A5EDC 8010F7DC 0C0483C1 */ jal exec_entity_model_commandlist -/* A5EE0 8010F7E0 86040014 */ lh $a0, 0x14($s0) -.L8010F7E4: -/* A5EE4 8010F7E4 8E020000 */ lw $v0, ($s0) -/* A5EE8 8010F7E8 30422000 */ andi $v0, $v0, 0x2000 -/* A5EEC 8010F7EC 1040000E */ beqz $v0, .L8010F828 -/* A5EF0 8010F7F0 00000000 */ nop -/* A5EF4 8010F7F4 3C038007 */ lui $v1, %hi(gCurrentCameraID) -/* A5EF8 8010F7F8 8C637410 */ lw $v1, %lo(gCurrentCameraID)($v1) -/* A5EFC 8010F7FC 00031080 */ sll $v0, $v1, 2 -/* A5F00 8010F800 00431021 */ addu $v0, $v0, $v1 -/* A5F04 8010F804 00021080 */ sll $v0, $v0, 2 -/* A5F08 8010F808 00431023 */ subu $v0, $v0, $v1 -/* A5F0C 8010F80C 000218C0 */ sll $v1, $v0, 3 -/* A5F10 8010F810 00431021 */ addu $v0, $v0, $v1 -/* A5F14 8010F814 000210C0 */ sll $v0, $v0, 3 -/* A5F18 8010F818 00521021 */ addu $v0, $v0, $s2 -/* A5F1C 8010F81C C440006C */ lwc1 $f0, 0x6c($v0) -/* A5F20 8010F820 46000007 */ neg.s $f0, $f0 -/* A5F24 8010F824 E6000064 */ swc1 $f0, 0x64($s0) -.L8010F828: -/* A5F28 8010F828 8E020000 */ lw $v0, ($s0) -/* A5F2C 8010F82C 30420010 */ andi $v0, $v0, 0x10 -/* A5F30 8010F830 5440008B */ bnel $v0, $zero, .L8010FA60 -/* A5F34 8010F834 26310001 */ addiu $s1, $s1, 1 -/* A5F38 8010F838 0C04408B */ jal update_entity_transform_matrix -/* A5F3C 8010F83C 0200202D */ daddu $a0, $s0, $zero -/* A5F40 8010F840 08043E98 */ j .L8010FA60 -/* A5F44 8010F844 26310001 */ addiu $s1, $s1, 1 -.L8010F848: -/* A5F48 8010F848 8E020000 */ lw $v0, ($s0) -/* A5F4C 8010F84C 3463FFFF */ ori $v1, $v1, 0xffff -/* A5F50 8010F850 00431024 */ and $v0, $v0, $v1 -/* A5F54 8010F854 AE020000 */ sw $v0, ($s0) -.L8010F858: -/* A5F58 8010F858 82020007 */ lb $v0, 7($s0) -/* A5F5C 8010F85C 92030007 */ lbu $v1, 7($s0) -/* A5F60 8010F860 14400015 */ bnez $v0, .L8010F8B8 -/* A5F64 8010F864 2463FFFF */ addiu $v1, $v1, -1 -/* A5F68 8010F868 0C04422E */ jal entity_get_collision_flags -/* A5F6C 8010F86C 0200202D */ daddu $a0, $s0, $zero -/* A5F70 8010F870 A2020006 */ sb $v0, 6($s0) -/* A5F74 8010F874 304200FF */ andi $v0, $v0, 0xff -/* A5F78 8010F878 10400026 */ beqz $v0, .L8010F914 -/* A5F7C 8010F87C 00000000 */ nop -/* A5F80 8010F880 8E020038 */ lw $v0, 0x38($s0) -/* A5F84 8010F884 8C420014 */ lw $v0, 0x14($v0) -/* A5F88 8010F888 10400022 */ beqz $v0, .L8010F914 -/* A5F8C 8010F88C 00000000 */ nop -/* A5F90 8010F890 0040F809 */ jalr $v0 -/* A5F94 8010F894 0200202D */ daddu $a0, $s0, $zero -/* A5F98 8010F898 1040001E */ beqz $v0, .L8010F914 -/* A5F9C 8010F89C 2402000A */ addiu $v0, $zero, 0xa -/* A5FA0 8010F8A0 A2020007 */ sb $v0, 7($s0) -/* A5FA4 8010F8A4 8E020000 */ lw $v0, ($s0) -/* A5FA8 8010F8A8 3C030001 */ lui $v1, 1 -/* A5FAC 8010F8AC 00431025 */ or $v0, $v0, $v1 -/* A5FB0 8010F8B0 08043E45 */ j .L8010F914 -/* A5FB4 8010F8B4 AE020000 */ sw $v0, ($s0) -.L8010F8B8: -/* A5FB8 8010F8B8 8E040000 */ lw $a0, ($s0) -/* A5FBC 8010F8BC 30820040 */ andi $v0, $a0, 0x40 -/* A5FC0 8010F8C0 1040000A */ beqz $v0, .L8010F8EC -/* A5FC4 8010F8C4 A2030007 */ sb $v1, 7($s0) -/* A5FC8 8010F8C8 00031600 */ sll $v0, $v1, 0x18 -/* A5FCC 8010F8CC 14400005 */ bnez $v0, .L8010F8E4 -/* A5FD0 8010F8D0 34820020 */ ori $v0, $a0, 0x20 -/* A5FD4 8010F8D4 2402FF9F */ addiu $v0, $zero, -0x61 -/* A5FD8 8010F8D8 00821024 */ and $v0, $a0, $v0 -/* A5FDC 8010F8DC 08043E45 */ j .L8010F914 -/* A5FE0 8010F8E0 AE020000 */ sw $v0, ($s0) -.L8010F8E4: -/* A5FE4 8010F8E4 08043E45 */ j .L8010F914 -/* A5FE8 8010F8E8 AE020000 */ sw $v0, ($s0) -.L8010F8EC: -/* A5FEC 8010F8EC 00031600 */ sll $v0, $v1, 0x18 -/* A5FF0 8010F8F0 14400008 */ bnez $v0, .L8010F914 -/* A5FF4 8010F8F4 3C02FFFE */ lui $v0, 0xfffe -/* A5FF8 8010F8F8 3442FFFF */ ori $v0, $v0, 0xffff -/* A5FFC 8010F8FC 3C03FFFD */ lui $v1, 0xfffd -/* A6000 8010F900 3463FFFF */ ori $v1, $v1, 0xffff -/* A6004 8010F904 00821024 */ and $v0, $a0, $v0 -/* A6008 8010F908 00431024 */ and $v0, $v0, $v1 -/* A600C 8010F90C AE020000 */ sw $v0, ($s0) -/* A6010 8010F910 A2000006 */ sb $zero, 6($s0) -.L8010F914: -/* A6014 8010F914 8E020000 */ lw $v0, ($s0) -/* A6018 8010F918 30422000 */ andi $v0, $v0, 0x2000 -/* A601C 8010F91C 1040000E */ beqz $v0, .L8010F958 -/* A6020 8010F920 00000000 */ nop -/* A6024 8010F924 3C038007 */ lui $v1, %hi(gCurrentCameraID) -/* A6028 8010F928 8C637410 */ lw $v1, %lo(gCurrentCameraID)($v1) -/* A602C 8010F92C 00031080 */ sll $v0, $v1, 2 -/* A6030 8010F930 00431021 */ addu $v0, $v0, $v1 -/* A6034 8010F934 00021080 */ sll $v0, $v0, 2 -/* A6038 8010F938 00431023 */ subu $v0, $v0, $v1 -/* A603C 8010F93C 000218C0 */ sll $v1, $v0, 3 -/* A6040 8010F940 00431021 */ addu $v0, $v0, $v1 -/* A6044 8010F944 000210C0 */ sll $v0, $v0, 3 -/* A6048 8010F948 00521021 */ addu $v0, $v0, $s2 -/* A604C 8010F94C C440006C */ lwc1 $f0, 0x6c($v0) -/* A6050 8010F950 46000007 */ neg.s $f0, $f0 -/* A6054 8010F954 E6000064 */ swc1 $f0, 0x64($s0) -.L8010F958: -/* A6058 8010F958 3C028007 */ lui $v0, %hi(gGameStatusPtr) -/* A605C 8010F95C 8C42419C */ lw $v0, %lo(gGameStatusPtr)($v0) -/* A6060 8010F960 80420078 */ lb $v0, 0x78($v0) -/* A6064 8010F964 14400014 */ bnez $v0, .L8010F9B8 -/* A6068 8010F968 00000000 */ nop -/* A606C 8010F96C 8E02001C */ lw $v0, 0x1c($s0) -/* A6070 8010F970 10400003 */ beqz $v0, .L8010F980 -/* A6074 8010F974 00000000 */ nop -/* A6078 8010F978 0040F809 */ jalr $v0 -/* A607C 8010F97C 0200202D */ daddu $a0, $s0, $zero -.L8010F980: -/* A6080 8010F980 8E020018 */ lw $v0, 0x18($s0) -/* A6084 8010F984 1040000C */ beqz $v0, .L8010F9B8 -/* A6088 8010F988 00000000 */ nop -/* A608C 8010F98C 92020009 */ lbu $v0, 9($s0) -/* A6090 8010F990 10400009 */ beqz $v0, .L8010F9B8 -/* A6094 8010F994 2442FFFF */ addiu $v0, $v0, -1 -/* A6098 8010F998 A2020009 */ sb $v0, 9($s0) -/* A609C 8010F99C 304200FF */ andi $v0, $v0, 0xff -/* A60A0 8010F9A0 14400005 */ bnez $v0, .L8010F9B8 -/* A60A4 8010F9A4 00000000 */ nop -.L8010F9A8: -/* A60A8 8010F9A8 0C043EF6 */ jal step_entity_updatecmd -/* A60AC 8010F9AC 0200202D */ daddu $a0, $s0, $zero -/* A60B0 8010F9B0 1440FFFD */ bnez $v0, .L8010F9A8 -/* A60B4 8010F9B4 00000000 */ nop -.L8010F9B8: -/* A60B8 8010F9B8 8E020000 */ lw $v0, ($s0) -/* A60BC 8010F9BC 30420010 */ andi $v0, $v0, 0x10 -/* A60C0 8010F9C0 14400003 */ bnez $v0, .L8010F9D0 -/* A60C4 8010F9C4 00000000 */ nop -/* A60C8 8010F9C8 0C04408B */ jal update_entity_transform_matrix -/* A60CC 8010F9CC 0200202D */ daddu $a0, $s0, $zero -.L8010F9D0: -/* A60D0 8010F9D0 8E020000 */ lw $v0, ($s0) -/* A60D4 8010F9D4 30420020 */ andi $v0, $v0, 0x20 -/* A60D8 8010F9D8 14400003 */ bnez $v0, .L8010F9E8 -/* A60DC 8010F9DC 00000000 */ nop -/* A60E0 8010F9E0 0C044129 */ jal update_entity_inverse_rotation_matrix -/* A60E4 8010F9E4 0200202D */ daddu $a0, $s0, $zero -.L8010F9E8: -/* A60E8 8010F9E8 8E020000 */ lw $v0, ($s0) -/* A60EC 8010F9EC 30420008 */ andi $v0, $v0, 8 -/* A60F0 8010F9F0 10400005 */ beqz $v0, .L8010FA08 -/* A60F4 8010F9F4 00000000 */ nop -/* A60F8 8010F9F8 0C047A2F */ jal func_8011E8BC -/* A60FC 8010F9FC 86040014 */ lh $a0, 0x14($s0) -/* A6100 8010FA00 08043E84 */ j .L8010FA10 -/* A6104 8010FA04 00000000 */ nop -.L8010FA08: -/* A6108 8010FA08 0C0483C1 */ jal exec_entity_model_commandlist -/* A610C 8010FA0C 86040014 */ lh $a0, 0x14($s0) -.L8010FA10: -/* A6110 8010FA10 86020016 */ lh $v0, 0x16($s0) -/* A6114 8010FA14 04400003 */ bltz $v0, .L8010FA24 -/* A6118 8010FA18 00000000 */ nop -/* A611C 8010FA1C 0C0448D1 */ jal func_80112344 -/* A6120 8010FA20 0200202D */ daddu $a0, $s0, $zero -.L8010FA24: -/* A6124 8010FA24 8E020000 */ lw $v0, ($s0) -/* A6128 8010FA28 3C032000 */ lui $v1, 0x2000 -/* A612C 8010FA2C 00431024 */ and $v0, $v0, $v1 -/* A6130 8010FA30 10400003 */ beqz $v0, .L8010FA40 -/* A6134 8010FA34 00000000 */ nop -/* A6138 8010FA38 0C0441B4 */ jal delete_entity -/* A613C 8010FA3C 92040004 */ lbu $a0, 4($s0) -.L8010FA40: -/* A6140 8010FA40 8E020000 */ lw $v0, ($s0) -/* A6144 8010FA44 3C030400 */ lui $v1, 0x400 -/* A6148 8010FA48 00431024 */ and $v0, $v0, $v1 -/* A614C 8010FA4C 10400004 */ beqz $v0, .L8010FA60 -/* A6150 8010FA50 26310001 */ addiu $s1, $s1, 1 -/* A6154 8010FA54 92040004 */ lbu $a0, 4($s0) -/* A6158 8010FA58 0C0441E4 */ jal delete_entity_and_unload_data -/* A615C 8010FA5C 00000000 */ nop -.L8010FA60: -/* A6160 8010FA60 2A22001E */ slti $v0, $s1, 0x1e -/* A6164 8010FA64 1440FF2D */ bnez $v0, .L8010F71C -/* A6168 8010FA68 00000000 */ nop -/* A616C 8010FA6C 0C043EA6 */ jal update_shadows -/* A6170 8010FA70 00000000 */ nop -/* A6174 8010FA74 8FBF0020 */ lw $ra, 0x20($sp) -/* A6178 8010FA78 8FB3001C */ lw $s3, 0x1c($sp) -/* A617C 8010FA7C 8FB20018 */ lw $s2, 0x18($sp) -/* A6180 8010FA80 8FB10014 */ lw $s1, 0x14($sp) -/* A6184 8010FA84 8FB00010 */ lw $s0, 0x10($sp) -/* A6188 8010FA88 3C018016 */ lui $at, %hi(D_8015A578) -/* A618C 8010FA8C A020A578 */ sb $zero, %lo(D_8015A578)($at) -/* A6190 8010FA90 03E00008 */ jr $ra -/* A6194 8010FA94 27BD0028 */ addiu $sp, $sp, 0x28 diff --git a/ver/us/asm/nonmatchings/a5dd0_len_114e0/update_shadows.s b/ver/us/asm/nonmatchings/a5dd0_len_114e0/update_shadows.s deleted file mode 100644 index 5a4cfdf08c..0000000000 --- a/ver/us/asm/nonmatchings/a5dd0_len_114e0/update_shadows.s +++ /dev/null @@ -1,83 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel update_shadows -/* A6198 8010FA98 27BDFFD8 */ addiu $sp, $sp, -0x28 -/* A619C 8010FA9C 3C028015 */ lui $v0, %hi(D_80151324) -/* A61A0 8010FAA0 24421324 */ addiu $v0, $v0, %lo(D_80151324) -/* A61A4 8010FAA4 AFB10014 */ sw $s1, 0x14($sp) -/* A61A8 8010FAA8 0000882D */ daddu $s1, $zero, $zero -/* A61AC 8010FAAC AFB20018 */ sw $s2, 0x18($sp) -/* A61B0 8010FAB0 0040902D */ daddu $s2, $v0, $zero -/* A61B4 8010FAB4 AFB40020 */ sw $s4, 0x20($sp) -/* A61B8 8010FAB8 3C144000 */ lui $s4, 0x4000 -/* A61BC 8010FABC AFB3001C */ sw $s3, 0x1c($sp) -/* A61C0 8010FAC0 3C13800B */ lui $s3, %hi(gCameras) -/* A61C4 8010FAC4 26731D80 */ addiu $s3, $s3, %lo(gCameras) -/* A61C8 8010FAC8 AFBF0024 */ sw $ra, 0x24($sp) -/* A61CC 8010FACC AFB00010 */ sw $s0, 0x10($sp) -/* A61D0 8010FAD0 AC400000 */ sw $zero, ($v0) -.L8010FAD4: -/* A61D4 8010FAD4 0C044181 */ jal get_shadow_by_index -/* A61D8 8010FAD8 0220202D */ daddu $a0, $s1, $zero -/* A61DC 8010FADC 0040802D */ daddu $s0, $v0, $zero -/* A61E0 8010FAE0 5200002C */ beql $s0, $zero, .L8010FB94 -/* A61E4 8010FAE4 26310001 */ addiu $s1, $s1, 1 -/* A61E8 8010FAE8 8E420000 */ lw $v0, ($s2) -/* A61EC 8010FAEC 8E030000 */ lw $v1, ($s0) -/* A61F0 8010FAF0 24420001 */ addiu $v0, $v0, 1 -/* A61F4 8010FAF4 AE420000 */ sw $v0, ($s2) -/* A61F8 8010FAF8 00741024 */ and $v0, $v1, $s4 -/* A61FC 8010FAFC 54400025 */ bnel $v0, $zero, .L8010FB94 -/* A6200 8010FB00 26310001 */ addiu $s1, $s1, 1 -/* A6204 8010FB04 30622000 */ andi $v0, $v1, 0x2000 -/* A6208 8010FB08 1040000E */ beqz $v0, .L8010FB44 -/* A620C 8010FB0C 00000000 */ nop -/* A6210 8010FB10 3C038007 */ lui $v1, %hi(gCurrentCameraID) -/* A6214 8010FB14 8C637410 */ lw $v1, %lo(gCurrentCameraID)($v1) -/* A6218 8010FB18 00031080 */ sll $v0, $v1, 2 -/* A621C 8010FB1C 00431021 */ addu $v0, $v0, $v1 -/* A6220 8010FB20 00021080 */ sll $v0, $v0, 2 -/* A6224 8010FB24 00431023 */ subu $v0, $v0, $v1 -/* A6228 8010FB28 000218C0 */ sll $v1, $v0, 3 -/* A622C 8010FB2C 00431021 */ addu $v0, $v0, $v1 -/* A6230 8010FB30 000210C0 */ sll $v0, $v0, 3 -/* A6234 8010FB34 00531021 */ addu $v0, $v0, $s3 -/* A6238 8010FB38 C440006C */ lwc1 $f0, 0x6c($v0) -/* A623C 8010FB3C 46000007 */ neg.s $f0, $f0 -/* A6240 8010FB40 E600002C */ swc1 $f0, 0x2c($s0) -.L8010FB44: -/* A6244 8010FB44 0C0440DD */ jal update_shadow_transform_matrix -/* A6248 8010FB48 0200202D */ daddu $a0, $s0, $zero -/* A624C 8010FB4C 8E020000 */ lw $v0, ($s0) -/* A6250 8010FB50 30420008 */ andi $v0, $v0, 8 -/* A6254 8010FB54 10400005 */ beqz $v0, .L8010FB6C -/* A6258 8010FB58 00000000 */ nop -/* A625C 8010FB5C 0C047A2F */ jal func_8011E8BC -/* A6260 8010FB60 86040008 */ lh $a0, 8($s0) -/* A6264 8010FB64 08043EDD */ j .L8010FB74 -/* A6268 8010FB68 00000000 */ nop -.L8010FB6C: -/* A626C 8010FB6C 0C0483C1 */ jal exec_entity_model_commandlist -/* A6270 8010FB70 86040008 */ lh $a0, 8($s0) -.L8010FB74: -/* A6274 8010FB74 8E020000 */ lw $v0, ($s0) -/* A6278 8010FB78 3C032000 */ lui $v1, 0x2000 -/* A627C 8010FB7C 00431024 */ and $v0, $v0, $v1 -/* A6280 8010FB80 10400004 */ beqz $v0, .L8010FB94 -/* A6284 8010FB84 26310001 */ addiu $s1, $s1, 1 -/* A6288 8010FB88 92040004 */ lbu $a0, 4($s0) -/* A628C 8010FB8C 0C044217 */ jal func_8011085C -/* A6290 8010FB90 00000000 */ nop -.L8010FB94: -/* A6294 8010FB94 2A22003C */ slti $v0, $s1, 0x3c -/* A6298 8010FB98 1440FFCE */ bnez $v0, .L8010FAD4 -/* A629C 8010FB9C 00000000 */ nop -/* A62A0 8010FBA0 8FBF0024 */ lw $ra, 0x24($sp) -/* A62A4 8010FBA4 8FB40020 */ lw $s4, 0x20($sp) -/* A62A8 8010FBA8 8FB3001C */ lw $s3, 0x1c($sp) -/* A62AC 8010FBAC 8FB20018 */ lw $s2, 0x18($sp) -/* A62B0 8010FBB0 8FB10014 */ lw $s1, 0x14($sp) -/* A62B4 8010FBB4 8FB00010 */ lw $s0, 0x10($sp) -/* A62B8 8010FBB8 03E00008 */ jr $ra -/* A62BC 8010FBBC 27BD0028 */ addiu $sp, $sp, 0x28 diff --git a/ver/us/asm/nonmatchings/evt/map_api/ScaleModel.s b/ver/us/asm/nonmatchings/evt/map_api/ScaleModel.s deleted file mode 100644 index 8a49a351e0..0000000000 --- a/ver/us/asm/nonmatchings/evt/map_api/ScaleModel.s +++ /dev/null @@ -1,71 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel ScaleModel -/* ED738 802C8D88 27BDFF88 */ addiu $sp, $sp, -0x78 -/* ED73C 802C8D8C AFB20058 */ sw $s2, 0x58($sp) -/* ED740 802C8D90 0080902D */ daddu $s2, $a0, $zero -/* ED744 802C8D94 AFBF005C */ sw $ra, 0x5c($sp) -/* ED748 802C8D98 AFB10054 */ sw $s1, 0x54($sp) -/* ED74C 802C8D9C AFB00050 */ sw $s0, 0x50($sp) -/* ED750 802C8DA0 F7B80070 */ sdc1 $f24, 0x70($sp) -/* ED754 802C8DA4 F7B60068 */ sdc1 $f22, 0x68($sp) -/* ED758 802C8DA8 F7B40060 */ sdc1 $f20, 0x60($sp) -/* ED75C 802C8DAC 8E50000C */ lw $s0, 0xc($s2) -/* ED760 802C8DB0 8E050000 */ lw $a1, ($s0) -/* ED764 802C8DB4 0C0B1EAF */ jal get_variable -/* ED768 802C8DB8 26100004 */ addiu $s0, $s0, 4 -/* ED76C 802C8DBC 0C046C04 */ jal get_model_list_index_from_tree_index -/* ED770 802C8DC0 0040202D */ daddu $a0, $v0, $zero -/* ED774 802C8DC4 8E050000 */ lw $a1, ($s0) -/* ED778 802C8DC8 26100004 */ addiu $s0, $s0, 4 -/* ED77C 802C8DCC 0240202D */ daddu $a0, $s2, $zero -/* ED780 802C8DD0 0C0B210B */ jal get_float_variable -/* ED784 802C8DD4 0040882D */ daddu $s1, $v0, $zero -/* ED788 802C8DD8 8E050000 */ lw $a1, ($s0) -/* ED78C 802C8DDC 26100004 */ addiu $s0, $s0, 4 -/* ED790 802C8DE0 0240202D */ daddu $a0, $s2, $zero -/* ED794 802C8DE4 0C0B210B */ jal get_float_variable -/* ED798 802C8DE8 46000606 */ mov.s $f24, $f0 -/* ED79C 802C8DEC 0240202D */ daddu $a0, $s2, $zero -/* ED7A0 802C8DF0 8E050000 */ lw $a1, ($s0) -/* ED7A4 802C8DF4 0C0B210B */ jal get_float_variable -/* ED7A8 802C8DF8 46000586 */ mov.s $f22, $f0 -/* ED7AC 802C8DFC 0220202D */ daddu $a0, $s1, $zero -/* ED7B0 802C8E00 0C046B4C */ jal get_model_from_list_index -/* ED7B4 802C8E04 46000506 */ mov.s $f20, $f0 -/* ED7B8 802C8E08 0040802D */ daddu $s0, $v0, $zero -/* ED7BC 802C8E0C 96020000 */ lhu $v0, ($s0) -/* ED7C0 802C8E10 30420400 */ andi $v0, $v0, 0x400 -/* ED7C4 802C8E14 1440000A */ bnez $v0, .L802C8E40 -/* ED7C8 802C8E18 00000000 */ nop -/* ED7CC 802C8E1C 4405C000 */ mfc1 $a1, $f24 -/* ED7D0 802C8E20 4406B000 */ mfc1 $a2, $f22 -/* ED7D4 802C8E24 4407A000 */ mfc1 $a3, $f20 -/* ED7D8 802C8E28 0C019DF0 */ jal guScaleF -/* ED7DC 802C8E2C 26040058 */ addiu $a0, $s0, 0x58 -/* ED7E0 802C8E30 96020000 */ lhu $v0, ($s0) -/* ED7E4 802C8E34 34421400 */ ori $v0, $v0, 0x1400 -/* ED7E8 802C8E38 080B2399 */ j .L802C8E64 -/* ED7EC 802C8E3C A6020000 */ sh $v0, ($s0) -.L802C8E40: -/* ED7F0 802C8E40 4405C000 */ mfc1 $a1, $f24 -/* ED7F4 802C8E44 4406B000 */ mfc1 $a2, $f22 -/* ED7F8 802C8E48 4407A000 */ mfc1 $a3, $f20 -/* ED7FC 802C8E4C 0C019DF0 */ jal guScaleF -/* ED800 802C8E50 27A40010 */ addiu $a0, $sp, 0x10 -/* ED804 802C8E54 27A40010 */ addiu $a0, $sp, 0x10 -/* ED808 802C8E58 26050058 */ addiu $a1, $s0, 0x58 -/* ED80C 802C8E5C 0C019D80 */ jal guMtxCatF -/* ED810 802C8E60 00A0302D */ daddu $a2, $a1, $zero -.L802C8E64: -/* ED814 802C8E64 8FBF005C */ lw $ra, 0x5c($sp) -/* ED818 802C8E68 8FB20058 */ lw $s2, 0x58($sp) -/* ED81C 802C8E6C 8FB10054 */ lw $s1, 0x54($sp) -/* ED820 802C8E70 8FB00050 */ lw $s0, 0x50($sp) -/* ED824 802C8E74 D7B80070 */ ldc1 $f24, 0x70($sp) -/* ED828 802C8E78 D7B60068 */ ldc1 $f22, 0x68($sp) -/* ED82C 802C8E7C D7B40060 */ ldc1 $f20, 0x60($sp) -/* ED830 802C8E80 24020002 */ addiu $v0, $zero, 2 -/* ED834 802C8E84 03E00008 */ jr $ra -/* ED838 802C8E88 27BD0078 */ addiu $sp, $sp, 0x78 diff --git a/ver/us/asm/nonmatchings/evt/map_api/SetModelFlags.s b/ver/us/asm/nonmatchings/evt/map_api/SetModelFlags.s deleted file mode 100644 index 422bdfb4b8..0000000000 --- a/ver/us/asm/nonmatchings/evt/map_api/SetModelFlags.s +++ /dev/null @@ -1,40 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel SetModelFlags -/* EDEC8 802C9518 27BDFFE0 */ addiu $sp, $sp, -0x20 -/* EDECC 802C951C AFB00010 */ sw $s0, 0x10($sp) -/* EDED0 802C9520 0080802D */ daddu $s0, $a0, $zero -/* EDED4 802C9524 AFBF0018 */ sw $ra, 0x18($sp) -/* EDED8 802C9528 AFB10014 */ sw $s1, 0x14($sp) -/* EDEDC 802C952C 8E11000C */ lw $s1, 0xc($s0) -/* EDEE0 802C9530 8E250000 */ lw $a1, ($s1) -/* EDEE4 802C9534 0C0B1EAF */ jal get_variable -/* EDEE8 802C9538 26310004 */ addiu $s1, $s1, 4 -/* EDEEC 802C953C 0C046C04 */ jal get_model_list_index_from_tree_index -/* EDEF0 802C9540 0040202D */ daddu $a0, $v0, $zero -/* EDEF4 802C9544 0200202D */ daddu $a0, $s0, $zero -/* EDEF8 802C9548 8E250004 */ lw $a1, 4($s1) -/* EDEFC 802C954C 8E310000 */ lw $s1, ($s1) -/* EDF00 802C9550 0C0B1EAF */ jal get_variable -/* EDF04 802C9554 0040802D */ daddu $s0, $v0, $zero -/* EDF08 802C9558 0200202D */ daddu $a0, $s0, $zero -/* EDF0C 802C955C 0C046B4C */ jal get_model_from_list_index -/* EDF10 802C9560 0040802D */ daddu $s0, $v0, $zero -/* EDF14 802C9564 12000004 */ beqz $s0, .L802C9578 -/* EDF18 802C9568 0040202D */ daddu $a0, $v0, $zero -/* EDF1C 802C956C 94820000 */ lhu $v0, ($a0) -/* EDF20 802C9570 080B2561 */ j .L802C9584 -/* EDF24 802C9574 00511025 */ or $v0, $v0, $s1 -.L802C9578: -/* EDF28 802C9578 94820000 */ lhu $v0, ($a0) -/* EDF2C 802C957C 00111827 */ nor $v1, $zero, $s1 -/* EDF30 802C9580 00431024 */ and $v0, $v0, $v1 -.L802C9584: -/* EDF34 802C9584 A4820000 */ sh $v0, ($a0) -/* EDF38 802C9588 8FBF0018 */ lw $ra, 0x18($sp) -/* EDF3C 802C958C 8FB10014 */ lw $s1, 0x14($sp) -/* EDF40 802C9590 8FB00010 */ lw $s0, 0x10($sp) -/* EDF44 802C9594 24020002 */ addiu $v0, $zero, 2 -/* EDF48 802C9598 03E00008 */ jr $ra -/* EDF4C 802C959C 27BD0020 */ addiu $sp, $sp, 0x20 diff --git a/ver/us/asm/nonmatchings/evt/map_api/SetZoneEnabled.s b/ver/us/asm/nonmatchings/evt/map_api/SetZoneEnabled.s deleted file mode 100644 index ed210137d3..0000000000 --- a/ver/us/asm/nonmatchings/evt/map_api/SetZoneEnabled.s +++ /dev/null @@ -1,53 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel SetZoneEnabled -/* EEC04 802CA254 27BDFFE0 */ addiu $sp, $sp, -0x20 -/* EEC08 802CA258 AFB10014 */ sw $s1, 0x14($sp) -/* EEC0C 802CA25C 0080882D */ daddu $s1, $a0, $zero -/* EEC10 802CA260 AFBF0018 */ sw $ra, 0x18($sp) -/* EEC14 802CA264 AFB00010 */ sw $s0, 0x10($sp) -/* EEC18 802CA268 8E30000C */ lw $s0, 0xc($s1) -/* EEC1C 802CA26C 8E050000 */ lw $a1, ($s0) -/* EEC20 802CA270 0C0B1EAF */ jal get_variable -/* EEC24 802CA274 26100004 */ addiu $s0, $s0, 4 -/* EEC28 802CA278 0220202D */ daddu $a0, $s1, $zero -/* EEC2C 802CA27C 8E050000 */ lw $a1, ($s0) -/* EEC30 802CA280 0C0B1EAF */ jal get_variable -/* EEC34 802CA284 0040802D */ daddu $s0, $v0, $zero -/* EEC38 802CA288 001018C0 */ sll $v1, $s0, 3 -/* EEC3C 802CA28C 00701823 */ subu $v1, $v1, $s0 -/* EEC40 802CA290 3C04800E */ lui $a0, %hi(D_800D91D4) -/* EEC44 802CA294 8C8491D4 */ lw $a0, %lo(D_800D91D4)($a0) -/* EEC48 802CA298 00031880 */ sll $v1, $v1, 2 -/* EEC4C 802CA29C 00838821 */ addu $s1, $a0, $v1 -/* EEC50 802CA2A0 86240006 */ lh $a0, 6($s1) -/* EEC54 802CA2A4 04800003 */ bltz $a0, .L802CA2B4 -/* EEC58 802CA2A8 0040802D */ daddu $s0, $v0, $zero -/* EEC5C 802CA2AC 0C0B286E */ jal set_zone_enabled -/* EEC60 802CA2B0 0200282D */ daddu $a1, $s0, $zero -.L802CA2B4: -/* EEC64 802CA2B4 12000006 */ beqz $s0, .L802CA2D0 -/* EEC68 802CA2B8 3C030001 */ lui $v1, 1 -/* EEC6C 802CA2BC 24020001 */ addiu $v0, $zero, 1 -/* EEC70 802CA2C0 12020006 */ beq $s0, $v0, .L802CA2DC -/* EEC74 802CA2C4 3C03FFFE */ lui $v1, 0xfffe -/* EEC78 802CA2C8 080B28BB */ j .L802CA2EC -/* EEC7C 802CA2CC 00000000 */ nop -.L802CA2D0: -/* EEC80 802CA2D0 8E220000 */ lw $v0, ($s1) -/* EEC84 802CA2D4 080B28BA */ j .L802CA2E8 -/* EEC88 802CA2D8 00431025 */ or $v0, $v0, $v1 -.L802CA2DC: -/* EEC8C 802CA2DC 8E220000 */ lw $v0, ($s1) -/* EEC90 802CA2E0 3463FFFF */ ori $v1, $v1, 0xffff -/* EEC94 802CA2E4 00431024 */ and $v0, $v0, $v1 -.L802CA2E8: -/* EEC98 802CA2E8 AE220000 */ sw $v0, ($s1) -.L802CA2EC: -/* EEC9C 802CA2EC 8FBF0018 */ lw $ra, 0x18($sp) -/* EECA0 802CA2F0 8FB10014 */ lw $s1, 0x14($sp) -/* EECA4 802CA2F4 8FB00010 */ lw $s0, 0x10($sp) -/* EECA8 802CA2F8 24020002 */ addiu $v0, $zero, 2 -/* EECAC 802CA2FC 03E00008 */ jr $ra -/* EECB0 802CA300 27BD0020 */ addiu $sp, $sp, 0x20 diff --git a/ver/us/asm/nonmatchings/evt/map_api/TranslateModel.s b/ver/us/asm/nonmatchings/evt/map_api/TranslateModel.s deleted file mode 100644 index ac7e22627e..0000000000 --- a/ver/us/asm/nonmatchings/evt/map_api/TranslateModel.s +++ /dev/null @@ -1,71 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel TranslateModel -/* ED510 802C8B60 27BDFF88 */ addiu $sp, $sp, -0x78 -/* ED514 802C8B64 AFB20058 */ sw $s2, 0x58($sp) -/* ED518 802C8B68 0080902D */ daddu $s2, $a0, $zero -/* ED51C 802C8B6C AFBF005C */ sw $ra, 0x5c($sp) -/* ED520 802C8B70 AFB10054 */ sw $s1, 0x54($sp) -/* ED524 802C8B74 AFB00050 */ sw $s0, 0x50($sp) -/* ED528 802C8B78 F7B80070 */ sdc1 $f24, 0x70($sp) -/* ED52C 802C8B7C F7B60068 */ sdc1 $f22, 0x68($sp) -/* ED530 802C8B80 F7B40060 */ sdc1 $f20, 0x60($sp) -/* ED534 802C8B84 8E50000C */ lw $s0, 0xc($s2) -/* ED538 802C8B88 8E050000 */ lw $a1, ($s0) -/* ED53C 802C8B8C 0C0B1EAF */ jal get_variable -/* ED540 802C8B90 26100004 */ addiu $s0, $s0, 4 -/* ED544 802C8B94 0C046C04 */ jal get_model_list_index_from_tree_index -/* ED548 802C8B98 0040202D */ daddu $a0, $v0, $zero -/* ED54C 802C8B9C 8E050000 */ lw $a1, ($s0) -/* ED550 802C8BA0 26100004 */ addiu $s0, $s0, 4 -/* ED554 802C8BA4 0240202D */ daddu $a0, $s2, $zero -/* ED558 802C8BA8 0C0B210B */ jal get_float_variable -/* ED55C 802C8BAC 0040882D */ daddu $s1, $v0, $zero -/* ED560 802C8BB0 8E050000 */ lw $a1, ($s0) -/* ED564 802C8BB4 26100004 */ addiu $s0, $s0, 4 -/* ED568 802C8BB8 0240202D */ daddu $a0, $s2, $zero -/* ED56C 802C8BBC 0C0B210B */ jal get_float_variable -/* ED570 802C8BC0 46000606 */ mov.s $f24, $f0 -/* ED574 802C8BC4 0240202D */ daddu $a0, $s2, $zero -/* ED578 802C8BC8 8E050000 */ lw $a1, ($s0) -/* ED57C 802C8BCC 0C0B210B */ jal get_float_variable -/* ED580 802C8BD0 46000586 */ mov.s $f22, $f0 -/* ED584 802C8BD4 0220202D */ daddu $a0, $s1, $zero -/* ED588 802C8BD8 0C046B4C */ jal get_model_from_list_index -/* ED58C 802C8BDC 46000506 */ mov.s $f20, $f0 -/* ED590 802C8BE0 0040802D */ daddu $s0, $v0, $zero -/* ED594 802C8BE4 96020000 */ lhu $v0, ($s0) -/* ED598 802C8BE8 30420400 */ andi $v0, $v0, 0x400 -/* ED59C 802C8BEC 1440000A */ bnez $v0, .L802C8C18 -/* ED5A0 802C8BF0 00000000 */ nop -/* ED5A4 802C8BF4 4405C000 */ mfc1 $a1, $f24 -/* ED5A8 802C8BF8 4406B000 */ mfc1 $a2, $f22 -/* ED5AC 802C8BFC 4407A000 */ mfc1 $a3, $f20 -/* ED5B0 802C8C00 0C019E40 */ jal guTranslateF -/* ED5B4 802C8C04 26040058 */ addiu $a0, $s0, 0x58 -/* ED5B8 802C8C08 96020000 */ lhu $v0, ($s0) -/* ED5BC 802C8C0C 34421400 */ ori $v0, $v0, 0x1400 -/* ED5C0 802C8C10 080B230F */ j .L802C8C3C -/* ED5C4 802C8C14 A6020000 */ sh $v0, ($s0) -.L802C8C18: -/* ED5C8 802C8C18 4405C000 */ mfc1 $a1, $f24 -/* ED5CC 802C8C1C 4406B000 */ mfc1 $a2, $f22 -/* ED5D0 802C8C20 4407A000 */ mfc1 $a3, $f20 -/* ED5D4 802C8C24 0C019E40 */ jal guTranslateF -/* ED5D8 802C8C28 27A40010 */ addiu $a0, $sp, 0x10 -/* ED5DC 802C8C2C 27A40010 */ addiu $a0, $sp, 0x10 -/* ED5E0 802C8C30 26050058 */ addiu $a1, $s0, 0x58 -/* ED5E4 802C8C34 0C019D80 */ jal guMtxCatF -/* ED5E8 802C8C38 00A0302D */ daddu $a2, $a1, $zero -.L802C8C3C: -/* ED5EC 802C8C3C 8FBF005C */ lw $ra, 0x5c($sp) -/* ED5F0 802C8C40 8FB20058 */ lw $s2, 0x58($sp) -/* ED5F4 802C8C44 8FB10054 */ lw $s1, 0x54($sp) -/* ED5F8 802C8C48 8FB00050 */ lw $s0, 0x50($sp) -/* ED5FC 802C8C4C D7B80070 */ ldc1 $f24, 0x70($sp) -/* ED600 802C8C50 D7B60068 */ ldc1 $f22, 0x68($sp) -/* ED604 802C8C54 D7B40060 */ ldc1 $f20, 0x60($sp) -/* ED608 802C8C58 24020002 */ addiu $v0, $zero, 2 -/* ED60C 802C8C5C 03E00008 */ jr $ra -/* ED610 802C8C60 27BD0078 */ addiu $sp, $sp, 0x78 diff --git a/ver/us/asm/nonmatchings/evt/map_api/func_802C90FC.s b/ver/us/asm/nonmatchings/evt/map_api/func_802C90FC.s deleted file mode 100644 index 98576d21aa..0000000000 --- a/ver/us/asm/nonmatchings/evt/map_api/func_802C90FC.s +++ /dev/null @@ -1,47 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_802C90FC -/* EDAAC 802C90FC 27BDFFE0 */ addiu $sp, $sp, -0x20 -/* EDAB0 802C9100 AFB20018 */ sw $s2, 0x18($sp) -/* EDAB4 802C9104 0080902D */ daddu $s2, $a0, $zero -/* EDAB8 802C9108 AFBF001C */ sw $ra, 0x1c($sp) -/* EDABC 802C910C AFB10014 */ sw $s1, 0x14($sp) -/* EDAC0 802C9110 AFB00010 */ sw $s0, 0x10($sp) -/* EDAC4 802C9114 8E50000C */ lw $s0, 0xc($s2) -/* EDAC8 802C9118 8E050000 */ lw $a1, ($s0) -/* EDACC 802C911C 0C0B1EAF */ jal get_variable -/* EDAD0 802C9120 26100004 */ addiu $s0, $s0, 4 -/* EDAD4 802C9124 8E050000 */ lw $a1, ($s0) -/* EDAD8 802C9128 26100004 */ addiu $s0, $s0, 4 -/* EDADC 802C912C 0240202D */ daddu $a0, $s2, $zero -/* EDAE0 802C9130 0C0B1EAF */ jal get_variable -/* EDAE4 802C9134 0040882D */ daddu $s1, $v0, $zero -/* EDAE8 802C9138 0240202D */ daddu $a0, $s2, $zero -/* EDAEC 802C913C 8E050000 */ lw $a1, ($s0) -/* EDAF0 802C9140 0C0B1EAF */ jal get_variable -/* EDAF4 802C9144 0040902D */ daddu $s2, $v0, $zero -/* EDAF8 802C9148 0220202D */ daddu $a0, $s1, $zero -/* EDAFC 802C914C 0C046C04 */ jal get_model_list_index_from_tree_index -/* EDB00 802C9150 0040802D */ daddu $s0, $v0, $zero -/* EDB04 802C9154 0C046B4C */ jal get_model_from_list_index -/* EDB08 802C9158 0040202D */ daddu $a0, $v0, $zero -/* EDB0C 802C915C 0040882D */ daddu $s1, $v0, $zero -/* EDB10 802C9160 0220202D */ daddu $a0, $s1, $zero -/* EDB14 802C9164 0240282D */ daddu $a1, $s2, $zero -/* EDB18 802C9168 0C046F1F */ jal func_8011BC7C -/* EDB1C 802C916C 0200302D */ daddu $a2, $s0, $zero -/* EDB20 802C9170 2402FFFF */ addiu $v0, $zero, -1 -/* EDB24 802C9174 12420004 */ beq $s2, $v0, .L802C9188 -/* EDB28 802C9178 00000000 */ nop -/* EDB2C 802C917C 96220000 */ lhu $v0, ($s1) -/* EDB30 802C9180 34420010 */ ori $v0, $v0, 0x10 -/* EDB34 802C9184 A6220000 */ sh $v0, ($s1) -.L802C9188: -/* EDB38 802C9188 8FBF001C */ lw $ra, 0x1c($sp) -/* EDB3C 802C918C 8FB20018 */ lw $s2, 0x18($sp) -/* EDB40 802C9190 8FB10014 */ lw $s1, 0x14($sp) -/* EDB44 802C9194 8FB00010 */ lw $s0, 0x10($sp) -/* EDB48 802C9198 24020002 */ addiu $v0, $zero, 2 -/* EDB4C 802C919C 03E00008 */ jr $ra -/* EDB50 802C91A0 27BD0020 */ addiu $sp, $sp, 0x20 diff --git a/ver/us/asm/nonmatchings/evt/map_api/set_zone_enabled.s b/ver/us/asm/nonmatchings/evt/map_api/set_zone_enabled.s deleted file mode 100644 index cd34adb4fd..0000000000 --- a/ver/us/asm/nonmatchings/evt/map_api/set_zone_enabled.s +++ /dev/null @@ -1,49 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel set_zone_enabled -/* EEB68 802CA1B8 27BDFFE0 */ addiu $sp, $sp, -0x20 -/* EEB6C 802CA1BC 000410C0 */ sll $v0, $a0, 3 -/* EEB70 802CA1C0 00441023 */ subu $v0, $v0, $a0 -/* EEB74 802CA1C4 3C03800E */ lui $v1, %hi(D_800D91D4) -/* EEB78 802CA1C8 8C6391D4 */ lw $v1, %lo(D_800D91D4)($v1) -/* EEB7C 802CA1CC 00021080 */ sll $v0, $v0, 2 -/* EEB80 802CA1D0 AFBF0018 */ sw $ra, 0x18($sp) -/* EEB84 802CA1D4 AFB10014 */ sw $s1, 0x14($sp) -/* EEB88 802CA1D8 AFB00010 */ sw $s0, 0x10($sp) -/* EEB8C 802CA1DC 00628021 */ addu $s0, $v1, $v0 -/* EEB90 802CA1E0 86040004 */ lh $a0, 4($s0) -/* EEB94 802CA1E4 04800003 */ bltz $a0, .L802CA1F4 -/* EEB98 802CA1E8 00A0882D */ daddu $s1, $a1, $zero -/* EEB9C 802CA1EC 0C0B286E */ jal set_zone_enabled -/* EEBA0 802CA1F0 00000000 */ nop -.L802CA1F4: -/* EEBA4 802CA1F4 86040006 */ lh $a0, 6($s0) -/* EEBA8 802CA1F8 04800003 */ bltz $a0, .L802CA208 -/* EEBAC 802CA1FC 00000000 */ nop -/* EEBB0 802CA200 0C0B286E */ jal set_zone_enabled -/* EEBB4 802CA204 0220282D */ daddu $a1, $s1, $zero -.L802CA208: -/* EEBB8 802CA208 12200006 */ beqz $s1, .L802CA224 -/* EEBBC 802CA20C 3C030001 */ lui $v1, 1 -/* EEBC0 802CA210 24020001 */ addiu $v0, $zero, 1 -/* EEBC4 802CA214 12220006 */ beq $s1, $v0, .L802CA230 -/* EEBC8 802CA218 3C03FFFE */ lui $v1, 0xfffe -/* EEBCC 802CA21C 080B2890 */ j .L802CA240 -/* EEBD0 802CA220 00000000 */ nop -.L802CA224: -/* EEBD4 802CA224 8E020000 */ lw $v0, ($s0) -/* EEBD8 802CA228 080B288F */ j .L802CA23C -/* EEBDC 802CA22C 00431025 */ or $v0, $v0, $v1 -.L802CA230: -/* EEBE0 802CA230 8E020000 */ lw $v0, ($s0) -/* EEBE4 802CA234 3463FFFF */ ori $v1, $v1, 0xffff -/* EEBE8 802CA238 00431024 */ and $v0, $v0, $v1 -.L802CA23C: -/* EEBEC 802CA23C AE020000 */ sw $v0, ($s0) -.L802CA240: -/* EEBF0 802CA240 8FBF0018 */ lw $ra, 0x18($sp) -/* EEBF4 802CA244 8FB10014 */ lw $s1, 0x14($sp) -/* EEBF8 802CA248 8FB00010 */ lw $s0, 0x10($sp) -/* EEBFC 802CA24C 03E00008 */ jr $ra -/* EEC00 802CA250 27BD0020 */ addiu $sp, $sp, 0x20 diff --git a/ver/us/asm/nonmatchings/pause/1421C0/pause_draw_menu_label.s b/ver/us/asm/nonmatchings/pause/1421C0/pause_draw_menu_label.s deleted file mode 100644 index 07edf96df2..0000000000 --- a/ver/us/asm/nonmatchings/pause/1421C0/pause_draw_menu_label.s +++ /dev/null @@ -1,60 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel pause_draw_menu_label -/* 1421D4 8024EE94 27BDFFD0 */ addiu $sp, $sp, -0x30 -/* 1421D8 8024EE98 AFBF0028 */ sw $ra, 0x28($sp) -/* 1421DC 8024EE9C 0080382D */ daddu $a3, $a0, $zero -/* 1421E0 8024EEA0 00A0402D */ daddu $t0, $a1, $zero -/* 1421E4 8024EEA4 00C0482D */ daddu $t1, $a2, $zero -/* 1421E8 8024EEA8 24020008 */ addiu $v0, $zero, 8 -/* 1421EC 8024EEAC 14E20002 */ bne $a3, $v0, .L8024EEB8 -/* 1421F0 8024EEB0 24060040 */ addiu $a2, $zero, 0x40 -/* 1421F4 8024EEB4 24060080 */ addiu $a2, $zero, 0x80 -.L8024EEB8: -/* 1421F8 8024EEB8 24020003 */ addiu $v0, $zero, 3 -/* 1421FC 8024EEBC 50E20001 */ beql $a3, $v0, .L8024EEC4 -/* 142200 8024EEC0 24060030 */ addiu $a2, $zero, 0x30 -.L8024EEC4: -/* 142204 8024EEC4 24020004 */ addiu $v0, $zero, 4 -/* 142208 8024EEC8 50E20001 */ beql $a3, $v0, .L8024EED0 -/* 14220C 8024EECC 24060030 */ addiu $a2, $zero, 0x30 -.L8024EED0: -/* 142210 8024EED0 24020005 */ addiu $v0, $zero, 5 -/* 142214 8024EED4 50E20001 */ beql $a3, $v0, .L8024EEDC -/* 142218 8024EED8 24060030 */ addiu $a2, $zero, 0x30 -.L8024EEDC: -/* 14221C 8024EEDC 24020006 */ addiu $v0, $zero, 6 -/* 142220 8024EEE0 50E20001 */ beql $a3, $v0, .L8024EEE8 -/* 142224 8024EEE4 240600A0 */ addiu $a2, $zero, 0xa0 -.L8024EEE8: -/* 142228 8024EEE8 3C05800A */ lui $a1, %hi(gMasterGfxPos) -/* 14222C 8024EEEC 24A5A66C */ addiu $a1, $a1, %lo(gMasterGfxPos) -/* 142230 8024EEF0 3C02DE00 */ lui $v0, 0xde00 -/* 142234 8024EEF4 01063021 */ addu $a2, $t0, $a2 -/* 142238 8024EEF8 8CA30000 */ lw $v1, ($a1) -/* 14223C 8024EEFC 00063080 */ sll $a2, $a2, 2 -/* 142240 8024EF00 0060202D */ daddu $a0, $v1, $zero -/* 142244 8024EF04 AC820000 */ sw $v0, ($a0) -/* 142248 8024EF08 00071080 */ sll $v0, $a3, 2 -/* 14224C 8024EF0C 24630008 */ addiu $v1, $v1, 8 -/* 142250 8024EF10 3C018027 */ lui $at, %hi(D_8026F8D4) -/* 142254 8024EF14 00220821 */ addu $at, $at, $v0 -/* 142258 8024EF18 8C22F8D4 */ lw $v0, %lo(D_8026F8D4)($at) -/* 14225C 8024EF1C 25270010 */ addiu $a3, $t1, 0x10 -/* 142260 8024EF20 ACA30000 */ sw $v1, ($a1) -/* 142264 8024EF24 00092880 */ sll $a1, $t1, 2 -/* 142268 8024EF28 00073880 */ sll $a3, $a3, 2 -/* 14226C 8024EF2C AC820004 */ sw $v0, 4($a0) -/* 142270 8024EF30 24020400 */ addiu $v0, $zero, 0x400 -/* 142274 8024EF34 00082080 */ sll $a0, $t0, 2 -/* 142278 8024EF38 AFA00010 */ sw $zero, 0x10($sp) -/* 14227C 8024EF3C AFA00014 */ sw $zero, 0x14($sp) -/* 142280 8024EF40 AFA00018 */ sw $zero, 0x18($sp) -/* 142284 8024EF44 AFA2001C */ sw $v0, 0x1c($sp) -/* 142288 8024EF48 0C091216 */ jal pause_draw_rect -/* 14228C 8024EF4C AFA20020 */ sw $v0, 0x20($sp) -/* 142290 8024EF50 8FBF0028 */ lw $ra, 0x28($sp) -/* 142294 8024EF54 03E00008 */ jr $ra -/* 142298 8024EF58 27BD0030 */ addiu $sp, $sp, 0x30 -/* 14229C 8024EF5C 00000000 */ nop diff --git a/ver/us/splat.yaml b/ver/us/splat.yaml index 47a4a4e57b..02a414e3c8 100644 --- a/ver/us/splat.yaml +++ b/ver/us/splat.yaml @@ -378,7 +378,8 @@ segments: - [0xde740, c, de740_len_23f0] - [0xDF950, c, DF950] - [0xe0b30, c, e0b30_len_b80] - - [0xE16B0, data, a5dd0_len_114e0] + - [0xE16B0, .data, a5dd0_len_114e0] + - [0xE2950, data] - [0xE5510, .data, d0a70_len_4fe0] - [0xE56C0, .data, d5a50_len_5fd0] - [0xE5820, .data, dc470_len_14c0] @@ -399,6 +400,7 @@ segments: - [0xE7940, .rodata, ddaf0_len_c50] - [0xE7950, .rodata, DF950] - [0xE7990, .rodata, e0b30_len_b80] + - [0xE79B0, .bss, a5dd0_len_114e0] - type: code dir: evt start: 0xE79B0 diff --git a/ver/us/symbol_addrs.txt b/ver/us/symbol_addrs.txt index 5a19cb4634..06677baf03 100644 --- a/ver/us/symbol_addrs.txt +++ b/ver/us/symbol_addrs.txt @@ -1871,7 +1871,7 @@ D_8010C320 = 0x8010C320; // type:data rom:0xA57D0 update_entities = 0x8010F6D0; // type:func rom:0xA5DD0 update_shadows = 0x8010FA98; // type:func rom:0xA6198 set_entity_commandlist = 0x8010FBC0; // type:func rom:0xA62C0 -step_entity_updatecmd = 0x8010FBD8; // type:func rom:0xA62D8 +step_entity_commandlist = 0x8010FBD8; // type:func rom:0xA62D8 exec_entity_updatecmd = 0x8010FD68; // type:func rom:0xA6468 func_8010FD98 = 0x8010FD98; // type:func rom:0xA6498 func_8010FE44 = 0x8010FE44; // type:func rom:0xA6544 @@ -2386,6 +2386,104 @@ bgm_pop_battle_song = 0x8014AE6C; // type:func rom:0xE156C bgm_push_battle_song = 0x8014AEF8; // type:func rom:0xE15F8 bgm_set_battle_song = 0x8014AF8C; // type:func rom:0xE168C func_8014AFA0 = 0x8014AFA0; // type:func rom:0xE16A0 +D_8014AFB0 = 0x8014AFB0; // type:data rom:0xE16B0 +D_8014AFB4 = 0x8014AFB4; // type:data rom:0xE16B4 +D_8014AFC0 = 0x8014AFC0; // type:data rom:0xE16C0 +D_8014B000 = 0x8014B000; // type:data rom:0xE1700 +D_8014B0B8 = 0x8014B0B8; // type:data rom:0xE17B8 +D_8014B0BC = 0x8014B0BC; // type:data rom:0xE17BC +D_8014B400 = 0x8014B400; // type:data rom:0xE1B00 +D_8014B404 = 0x8014B404; // type:data rom:0xE1B04 +D_8014B748 = 0x8014B748; // type:data rom:0xE1E48 +D_8014B74C = 0x8014B74C; // type:data rom:0xE1E4C +D_8014B74D = 0x8014B74D; // type:data rom:0xE1E4D +D_8014B74E = 0x8014B74E; // type:data rom:0xE1E4E +D_8014B74F = 0x8014B74F; // type:data rom:0xE1E4F +D_8014B750 = 0x8014B750; // type:data rom:0xE1E50 +D_8014B751 = 0x8014B751; // type:data rom:0xE1E51 +D_8014B752 = 0x8014B752; // type:data rom:0xE1E52 +D_8014B753 = 0x8014B753; // type:data rom:0xE1E53 +D_8014B754 = 0x8014B754; // type:data rom:0xE1E54 +D_8014B755 = 0x8014B755; // type:data rom:0xE1E55 +D_8014B756 = 0x8014B756; // type:data rom:0xE1E56 +D_8014B757 = 0x8014B757; // type:data rom:0xE1E57 +D_8014B758 = 0x8014B758; // type:data rom:0xE1E58 +D_8014B75C = 0x8014B75C; // type:data rom:0xE1E5C +D_8014B760 = 0x8014B760; // type:data rom:0xE1E60 +D_8014B761 = 0x8014B761; // type:data rom:0xE1E61 +D_8014B762 = 0x8014B762; // type:data rom:0xE1E62 +D_8014B763 = 0x8014B763; // type:data rom:0xE1E63 +D_8014B764 = 0x8014B764; // type:data rom:0xE1E64 +D_8014B765 = 0x8014B765; // type:data rom:0xE1E65 +D_8014B766 = 0x8014B766; // type:data rom:0xE1E66 +D_8014B767 = 0x8014B767; // type:data rom:0xE1E67 +D_8014B768 = 0x8014B768; // type:data rom:0xE1E68 +D_8014B7A8 = 0x8014B7A8; // type:data rom:0xE1EA8 +D_8014B7F0 = 0x8014B7F0; // type:data rom:0xE1EF0 +D_8014B7F8 = 0x8014B7F8; // type:data rom:0xE1EF8 +D_8014B820 = 0x8014B820; // type:data rom:0xE1F20 +D_8014B848 = 0x8014B848; // type:data rom:0xE1F48 +D_8014B870 = 0x8014B870; // type:data rom:0xE1F70 +D_8014B898 = 0x8014B898; // type:data rom:0xE1F98 +D_8014B8C0 = 0x8014B8C0; // type:data rom:0xE1FC0 +D_8014B8E8 = 0x8014B8E8; // type:data rom:0xE1FE8 +D_8014B910 = 0x8014B910; // type:data rom:0xE2010 +D_8014B938 = 0x8014B938; // type:data rom:0xE2038 +D_8014B960 = 0x8014B960; // type:data rom:0xE2060 +D_8014B988 = 0x8014B988; // type:data rom:0xE2088 +D_8014B9B0 = 0x8014B9B0; // type:data rom:0xE20B0 +D_8014B9D8 = 0x8014B9D8; // type:data rom:0xE20D8 +D_8014BA00 = 0x8014BA00; // type:data rom:0xE2100 +D_8014BA20 = 0x8014BA20; // type:data rom:0xE2120 +D_8014BA48 = 0x8014BA48; // type:data rom:0xE2148 +D_8014BA70 = 0x8014BA70; // type:data rom:0xE2170 +D_8014BA98 = 0x8014BA98; // type:data rom:0xE2198 +D_8014BAC0 = 0x8014BAC0; // type:data rom:0xE21C0 +D_8014BAE8 = 0x8014BAE8; // type:data rom:0xE21E8 +D_8014BB10 = 0x8014BB10; // type:data rom:0xE2210 +D_8014BB38 = 0x8014BB38; // type:data rom:0xE2238 +D_8014BB60 = 0x8014BB60; // type:data rom:0xE2260 +D_8014BB88 = 0x8014BB88; // type:data rom:0xE2288 +D_8014BBB0 = 0x8014BBB0; // type:data rom:0xE22B0 +D_8014BBD8 = 0x8014BBD8; // type:data rom:0xE22D8 +D_8014BC00 = 0x8014BC00; // type:data rom:0xE2300 +D_8014BC28 = 0x8014BC28; // type:data rom:0xE2328 +D_8014BC50 = 0x8014BC50; // type:data rom:0xE2350 +D_8014BC78 = 0x8014BC78; // type:data rom:0xE2378 +D_8014BCA0 = 0x8014BCA0; // type:data rom:0xE23A0 +D_8014BCC8 = 0x8014BCC8; // type:data rom:0xE23C8 +D_8014BCF8 = 0x8014BCF8; // type:data rom:0xE23F8 +D_8014BD18 = 0x8014BD18; // type:data rom:0xE2418 +D_8014BD40 = 0x8014BD40; // type:data rom:0xE2440 +D_8014BD68 = 0x8014BD68; // type:data rom:0xE2468 +D_8014BD88 = 0x8014BD88; // type:data rom:0xE2488 +D_8014BDB0 = 0x8014BDB0; // type:data rom:0xE24B0 +D_8014BDD8 = 0x8014BDD8; // type:data rom:0xE24D8 +D_8014BE00 = 0x8014BE00; // type:data rom:0xE2500 +D_8014BE28 = 0x8014BE28; // type:data rom:0xE2528 +D_8014BE50 = 0x8014BE50; // type:data rom:0xE2550 +D_8014BE78 = 0x8014BE78; // type:data rom:0xE2578 +D_8014BEA0 = 0x8014BEA0; // type:data rom:0xE25A0 +D_8014BEC8 = 0x8014BEC8; // type:data rom:0xE25C8 +D_8014BEF0 = 0x8014BEF0; // type:data rom:0xE25F0 +D_8014BF18 = 0x8014BF18; // type:data rom:0xE2618 +D_8014BF40 = 0x8014BF40; // type:data rom:0xE2640 +D_8014BF68 = 0x8014BF68; // type:data rom:0xE2668 +D_8014BF90 = 0x8014BF90; // type:data rom:0xE2690 +D_8014BFB8 = 0x8014BFB8; // type:data rom:0xE26B8 +D_8014BFE0 = 0x8014BFE0; // type:data rom:0xE26E0 +D_8014C008 = 0x8014C008; // type:data rom:0xE2708 +D_8014C028 = 0x8014C028; // type:data rom:0xE2728 +D_8014C050 = 0x8014C050; // type:data rom:0xE2750 +D_8014C078 = 0x8014C078; // type:data rom:0xE2778 +D_8014C098 = 0x8014C098; // type:data rom:0xE2798 +D_8014C0C0 = 0x8014C0C0; // type:data rom:0xE27C0 +D_8014C0E8 = 0x8014C0E8; // type:data rom:0xE27E8 +D_8014C110 = 0x8014C110; // type:data rom:0xE2810 +D_8014C138 = 0x8014C138; // type:data rom:0xE2838 +D_8014C160 = 0x8014C160; // type:data rom:0xE2860 +D_8014C188 = 0x8014C188; // type:data rom:0xE2888 +D_8014C248 = 0x8014C248; // type:data rom:0xE2948 D_8014EE10 = 0x8014EE10; // type:data rom:0xE5510 D_8014EE14 = 0x8014EE14; // type:data rom:0xE5514 D_8014EE18 = 0x8014EE18; // type:data rom:0xE5518