From 2f79b35772f214eb90ace23b0447f1a336766a48 Mon Sep 17 00:00:00 2001 From: Unnunu Date: Fri, 13 Jan 2023 10:56:28 +0300 Subject: [PATCH] model functions (#910) * matched appendGfx_model * 3 more * fog modes * cleaning * fix * fixed macro name * FogModes enum * extra tile enum renamed --- include/common_structs.h | 2 +- include/enums.h | 12 +- include/functions.h | 2 +- include/model.h | 12 +- include/variables.h | 2 +- src/18C790.c | 4 +- src/18F340.c | 8 +- src/a5dd0_len_114e0.c | 974 ++++++++- .../area_trd_part_2/actor/fake_bowser.c | 8 +- src/battle/item/shooting_star.c | 4 +- src/battle/star/up_and_away/7952E0.c | 4 +- src/common/FadeBackgroundToBlack.inc.c | 4 +- src/common/UnkBackgroundFunc2.inc.c | 4 +- src/common/UnkBackgroundFunc3.inc.c | 4 +- src/dc470_len_14c0.c | 20 +- src/effects/floating_flower.c | 2 +- src/effects/snowfall.c | 6 +- src/encounter.c | 4 +- src/evt/map_api.c | 2 +- src/world/area_dro/dro_01/dro_01_2_main.c | 4 +- src/world/area_dro/dro_02/dro_02_3_main.c | 4 +- src/world/area_dro/dro_02/npc_merlee.c | 8 +- .../area_end/end_01/end_01_6_shyguy_float.c | 4 +- src/world/area_hos/hos_05/A2AAC0.c | 2 +- src/world/area_hos/hos_06/A3A230.c | 28 +- src/world/area_isk/isk_16/isk_16_3_boss.c | 4 +- src/world/area_jan/jan_02/B2C4A0.c | 4 +- src/world/area_kmr/kmr_00/kmr_00_3_revival.c | 4 +- src/world/area_kmr/kmr_02/kmr_02_3_npc.c | 6 +- src/world/area_kzn/kzn_06/kzn_06_3_extra.c | 12 +- .../area_mac/mac_00/npc/dojo_members.inc.c | 4 +- src/world/area_mac/mac_01/mac_01_9_npc.c | 4 +- .../area_mac/mac_01/npc/read_fortune.inc.c | 12 +- src/world/area_mac/mac_02/mac_02_3_rooms.c | 2 +- src/world/area_mac/mac_04/mac_04_2_main.c | 2 +- src/world/area_mac/mac_04/mac_04_3_rooms.c | 2 +- src/world/area_osr/osr_00/osr_00_5_scenes.c | 6 +- src/world/area_sam/sam_06/D203E0.c | 4 +- src/world/area_sam/sam_11/D3A930.c | 4 +- src/world/area_sbk/sbk_02/sbk_02_3_ruins.c | 16 +- src/world/area_sbk/sbk_30/sbk_30_2_main.c | 4 +- .../common/atomic/LavaGlowLighting.inc.c | 8 +- src/world/common/atomic/Quizmo.inc.c | 8 +- src/world/common/atomic/UnkFunc27.inc.c | 10 +- src/world/common/complete/Quizmo.inc.c | 8 +- src/world/script_api/7E2AA0.c | 4 +- ver/us/asm/bss3.s | 6 +- .../a5dd0_len_114e0/appendGfx_model.s | 1915 ----------------- .../a5dd0_len_114e0/func_80115498.s | 473 ---- .../a5dd0_len_114e0/load_tile_header.s | 522 ----- .../mdl_local_gfx_update_vtx_pointers.s | 27 - ver/us/symbol_addrs.txt | 8 +- 52 files changed, 1061 insertions(+), 3146 deletions(-) delete mode 100644 ver/us/asm/nonmatchings/a5dd0_len_114e0/appendGfx_model.s delete mode 100644 ver/us/asm/nonmatchings/a5dd0_len_114e0/func_80115498.s delete mode 100644 ver/us/asm/nonmatchings/a5dd0_len_114e0/load_tile_header.s delete mode 100644 ver/us/asm/nonmatchings/a5dd0_len_114e0/mdl_local_gfx_update_vtx_pointers.s diff --git a/include/common_structs.h b/include/common_structs.h index 7fe828cf2a..3d4aece6ec 100644 --- a/include/common_structs.h +++ b/include/common_structs.h @@ -981,7 +981,7 @@ typedef struct TextureHeader { /* 0x22 */ u16 mainW; /* 0x24 */ u16 auxH; /* 0x26 */ u16 mainH; - /* 0x28 */ char unk_28; + /* 0x28 */ u8 unk_28; /* 0x29 */ u8 extraTiles; // 0 - none, 1 - mipmap, 2 - ?, 3 - use aux tile /* 0x2A */ u8 colorCombineType : 6; /* 0x2A */ u8 colorCombineSubType : 2; diff --git a/include/enums.h b/include/enums.h index 0fa0a74a54..7f0cb17f06 100644 --- a/include/enums.h +++ b/include/enums.h @@ -4334,7 +4334,7 @@ enum BattleSubStates { BTL_SUBSTATE_CHANGE_PARTNER_UNK_5 = 5, BTL_SUBSTATE_CHANGE_PARTNER_UNK_6 = 6, BTL_SUBSTATE_CHANGE_PARTNER_UNK_7 = 7, - + // BATTLE_STATE_END_TRAINING_BATTLE BTL_SUBSTATE_END_TRAINING_UNK_0 = 0, BTL_SUBSTATE_END_TRAINING_UNK_A = 10, @@ -6218,11 +6218,11 @@ enum BackgroundFlags { BACKGROUND_RENDER_STATE_MASK = 0xF0, }; -enum BackgroundRenderTypes { - BACKGROUND_RENDER_TYPE_0 = 0, - BACKGROUND_RENDER_TYPE_1 = 1, - BACKGROUND_RENDER_TYPE_2 = 2, - BACKGROUND_RENDER_TYPE_3 = 3, +enum FogModes { + FOG_MODE_0 = 0, + FOG_MODE_1 = 1, + FOG_MODE_2 = 2, + FOG_MODE_3 = 3, }; enum EncounterStates { diff --git a/include/functions.h b/include/functions.h index 22233e78da..198b131664 100644 --- a/include/functions.h +++ b/include/functions.h @@ -448,7 +448,7 @@ void set_peach_shadow_scale(Shadow* shadow, f32 scale); s32 is_block_on_ground(Entity* block); void set_animation(s32 actorID, s32, s32 animationIndex); void set_animation_rate(s32 actorID, s32 partIndex, f32 rate); -void func_8011B7C0(u16, s32, s32); +void set_model_flags(u16, s32, s32); void init_enter_world_shared(void); s16 update_enter_map_screen_overlay(s16* progress); s32 update_exit_map_screen_overlay(s16* progress); diff --git a/include/model.h b/include/model.h index ad66d456c1..9572062418 100644 --- a/include/model.h +++ b/include/model.h @@ -99,7 +99,7 @@ typedef ModelLocalVertexCopy* ModelLocalVertexCopyList[16]; typedef struct ModelTreeInfo { /* 0x00 */ u8 modelIndex; /* 0x01 */ u8 treeDepth; - /* 0x02 */ s8 textureID; + /* 0x02 */ u8 textureID; /* 0x03 */ char unk_03; } ModelTreeInfo; // size = 0x04 @@ -142,6 +142,14 @@ typedef enum ShapeTypes { SHAPE_TYPE_SPECIAL_GROUP = 10, } ShapeTypes; +typedef enum ExtraTileTypes { + EXTRA_TILE_NONE = 0, + EXTRA_TILE_MIPMAPS = 1, + EXTRA_TILE_AUX_SAME_AS_MAIN = 2, + EXTRA_TILE_AUX_INDEPENDENT = 3, + EXTRA_TILE_4 = 4, +} ExtraTileTypes; + typedef struct ShapeFile { /* 0x00 */ ModelNode* root; /* 0x04 */ Vtx_t* vertexTable; @@ -165,6 +173,8 @@ void init_model_data(void); void update_model_animator(s32); void update_model_animator_with_transform(s32 animatorID, Mtx* mtx); void set_mdl_custom_gfx_set(Model*, s32, u32); +ModelNodeProperty* get_model_property(ModelNode* node, ModelPropertyKeys key); +void func_80115498(u32 romOffset, s32 textureID, s32 baseOffset, s32 size); s32 step_model_animator(ModelAnimator* animator); AnimatorNode* get_animator_node_for_tree_index(ModelAnimator* animator, s32 treeIndex); AnimatorNode* get_animator_node_with_id(ModelAnimator* animator, s32 id); diff --git a/include/variables.h b/include/variables.h index 4b306b5b34..406419fe8c 100644 --- a/include/variables.h +++ b/include/variables.h @@ -56,7 +56,7 @@ extern CollisionData gCollisionData; extern s8 D_800A0900; extern f32 GravityParamsStartFall[]; extern s16 FootstepSoundSelector; -extern u8* gBgRenderTypePtr; +extern u8* gBackgroundFogModePtr; extern u16 D_80151308; extern s32 gEntityHideMode; diff --git a/src/18C790.c b/src/18C790.c index 6550c9bc73..e29ffa4f38 100644 --- a/src/18C790.c +++ b/src/18C790.c @@ -624,8 +624,8 @@ void btl_state_update_celebration(void) { LevelUpScriptID = LevelUpScriptPtr->id; CelebrateSubstateTime = 25; gBattleSubState = BTL_SUBSTATE_CELEBRATE_LEVEL_UP_CREATE_HUD; - mdl_set_all_fog_mode(1); - *gBgRenderTypePtr = BACKGROUND_RENDER_TYPE_1; + mdl_set_all_fog_mode(FOG_MODE_1); + *gBackgroundFogModePtr = FOG_MODE_1; set_background_color_blend(0, 0, 0, 0); break; case BTL_SUBSTATE_CELEBRATE_LEVEL_UP_CREATE_HUD: diff --git a/src/18F340.c b/src/18F340.c index df2a9854a6..447a3a08b0 100644 --- a/src/18F340.c +++ b/src/18F340.c @@ -217,8 +217,8 @@ ApiStatus N(GiveRefundCleanup)(Evt* script, s32 isInitialCall) { ApiStatus func_802610CC(Evt* script, s32 isInitialCall) { if (isInitialCall) { - mdl_set_all_fog_mode(1); - *gBgRenderTypePtr = BACKGROUND_RENDER_TYPE_1; + mdl_set_all_fog_mode(FOG_MODE_1); + *gBackgroundFogModePtr = FOG_MODE_1; set_background_color_blend(0, 0, 0, 0); script->functionTemp[0] = 20; } @@ -324,8 +324,8 @@ ApiStatus PlayBattleMerleeOrbFX(Evt* script, s32 isInitialCall) { ApiStatus BattleMerleeFadeStageToBlack(Evt* script, s32 isInitialCall) { if (isInitialCall) { - mdl_set_all_fog_mode(1); - *gBgRenderTypePtr = BACKGROUND_RENDER_TYPE_1; + mdl_set_all_fog_mode(FOG_MODE_1); + *gBackgroundFogModePtr = FOG_MODE_1; set_background_color_blend(0, 0, 0, 0); script->functionTemp[0] = 25; } diff --git a/src/a5dd0_len_114e0.c b/src/a5dd0_len_114e0.c index 5e52d768e8..24af857120 100644 --- a/src/a5dd0_len_114e0.c +++ b/src/a5dd0_len_114e0.c @@ -1068,8 +1068,8 @@ extern ModelNode* D_80152218; extern ModelTreeInfoList D_80152220; extern ModelTreeInfoList D_80152A20; -extern s8 wBgRenderType; -extern s8 bBgRenderType; +extern s8 wBackgroundFogMode; +extern s8 bBackgroundFogMode; extern s32 mdl_treeIterPos; extern Fog wFogSettings; extern Fog bFogSettings; @@ -2988,8 +2988,638 @@ void state_render_frontUI(void) { } } -void appendGfx_model(void* data); -INCLUDE_ASM(void, "a5dd0_len_114e0", appendGfx_model, Model*); +void appendGfx_model(void* data) { + Model* model = data; + s32 mtxPushMode; + TextureHandle* textureHandle; + TextureHeader* textureHeader; + u32 extraTileType; + s8 renderMode; + s32 texturingMode; + s32 renderModeIdx; + s32 new_var; + s32 flags = model->flags; + + ModelNode* modelNode; + u16 customGfxIndex; + s32 mtxLoadMode; + s32 combineSubType; + ModelNodeProperty* prop; + s32 temp; + + s32 fogMin, fogMax; + s32 fogR, fogG, fogB, fogA; + Gfx** gfxPos = &gMasterGfxPos; + + mtxPushMode = G_MTX_PUSH; + mtxLoadMode = G_MTX_LOAD; + modelNode = model->modelNode; + + if (model->textureID != 0) { + textureHandle = &mdl_textureHandles[model->textureID + model->textureVariation]; + textureHeader = &textureHandle->header; + + if (textureHandle->gfx != NULL) { + extraTileType = textureHandle->header.extraTiles; + } else { + textureHeader = NULL; + } + } else { + textureHandle = NULL; + textureHeader = NULL; + } + + renderMode = model->renderMode; + combineSubType = 0; + if (textureHeader != NULL) { + switch (extraTileType) { + case EXTRA_TILE_NONE: + texturingMode = 1; + break; + case EXTRA_TILE_MIPMAPS: + case EXTRA_TILE_AUX_SAME_AS_MAIN: + case EXTRA_TILE_AUX_INDEPENDENT: + texturingMode = 2; + break; + default: + texturingMode = 1; + break; + } + } else { + texturingMode = 1; + } + if ((textureHeader != NULL || renderMode <= RENDER_MODE_ALPHATEST_NO_ZB) && gCurrentFogSettings->enabled && !(flags & MODEL_FLAG_FLAG_40)) { + texturingMode = 3; + combineSubType = 1; + } + + // fog mode + switch ((u32)(model->customGfxIndex >> 4)) { + case FOG_MODE_1: + texturingMode += 3; + combineSubType = 2; + break; + case FOG_MODE_2: + if (renderMode <= RENDER_MODE_ALPHATEST_NO_ZB) { + gDPSetPrimColor((*gfxPos)++, 0, 0, mdl_renderModelFogPrimColorR, + mdl_renderModelFogPrimColorG, + mdl_renderModelFogPrimColorB, + mdl_renderModelFogPrimColorA); + gDPSetFogColor((*gfxPos)++, mdl_renderModelFogColorR, + mdl_renderModelFogColorG, + mdl_renderModelFogColorB, 0); + gSPFogPosition((*gfxPos)++, mdl_renderModelFogStart, mdl_renderModelFogEnd); + texturingMode += 9; + combineSubType = 3; + } + break; + case FOG_MODE_3: + texturingMode = 2; + combineSubType = 4; + gDPSetPrimColor((*gfxPos)++, 0, 0, gRenderModelPrimR, + gRenderModelPrimG, + gRenderModelPrimB, 255); + gDPSetEnvColor((*gfxPos)++, gRenderModelEnvR, + gRenderModelEnvG, + gRenderModelEnvB, 255); + break; + } + + gDPPipeSync((*gfxPos)++); + + if (model->groupData != NULL) { + Lightsn* lightningGroup = model->groupData->lightingGroup; + if (model->groupData->lightingGroup != NULL) { + switch (model->groupData->numLights) { + case 0: + gSPSetLights0((*gfxPos)++, lightningGroup[0]); + break; + case 1: + gSPSetLights1((*gfxPos)++, lightningGroup[0]); + break; + case 2: + gSPSetLights2((*gfxPos)++, lightningGroup[0]); + break; + case 3: + gSPSetLights3((*gfxPos)++, lightningGroup[0]); + break; + case 4: + gSPSetLights4((*gfxPos)++, lightningGroup[0]); + break; + case 5: + gSPSetLights5((*gfxPos)++, lightningGroup[0]); + break; + case 6: + gSPSetLights6((*gfxPos)++, lightningGroup[0]); + break; + case 7: + gSPSetLights7((*gfxPos)++, lightningGroup[0]); + break; + } + } + } + + if (textureHeader != NULL) { + switch (extraTileType) { + case EXTRA_TILE_AUX_INDEPENDENT: + case EXTRA_TILE_4: + prop = get_model_property(modelNode, MODEL_PROP_KEY_SPECIAL); + if (prop != NULL) { + s32 v1 = prop->data.s; + u16 a2 = prop->dataType; + s32 a1 = prop->dataType; + func_801180E8(textureHeader, gfxPos, textureHandle->raster, textureHandle->palette, textureHandle->auxRaster, textureHandle->auxPalette, + (v1 >> 12) & 0xF, (v1 >> 16) & 0xF, + a2 & 0xFFF, (a1 >> 12) & 0xFFF); + + } else { + gSPDisplayList((*gfxPos)++, textureHandle->gfx); + } + break; + default: + gSPDisplayList((*gfxPos)++, textureHandle->gfx); + break; + } + } else { + gSPTexture((*gfxPos)++, 0, 0, 0, G_TX_RENDERTILE, G_OFF); + gDPSetCombineMode((*gfxPos)++, G_CC_SHADE, G_CC_SHADE); + gDPSetColorDither((*gfxPos)++, G_CD_MAGICSQ); + gDPSetAlphaDither((*gfxPos)++, G_AD_PATTERN); + } + + if (combineSubType != 0 || renderMode == RENDER_MODE_ALPHATEST || renderMode == RENDER_MODE_ALPHATEST_ONESIDED) { + u32 v1 = 0; + + if (textureHeader != NULL) { + u32 colorCombineType = textureHeader->colorCombineType; + if (colorCombineType >= 3) { + v1 = colorCombineType + 10; + } else { + v1 = extraTileType * 3 + 1 + textureHeader->colorCombineSubType; + } + } + + if (renderMode != RENDER_MODE_ALPHATEST && renderMode != RENDER_MODE_ALPHATEST_ONESIDED) { + *(*gfxPos) = D_8014B0B8[v1][combineSubType]; + } else { + *(*gfxPos) = D_8014B400[v1][combineSubType]; + } + (*gfxPos)++; + } + + switch (texturingMode) { + case 1: + switch (renderMode) { + case RENDER_MODE_SURFACE_OPA: + renderModeIdx = 0; + break; + case RENDER_MODE_SURFACE_OPA_NO_AA: + renderModeIdx = 1; + break; + case RENDER_MODE_DECAL_OPA: + renderModeIdx = 2; + break; + case RENDER_MODE_DECAL_OPA_NO_AA: + renderModeIdx = 3; + break; + case RENDER_MODE_INTERSECTING_OPA: + renderModeIdx = 4; + break; + case RENDER_MODE_ALPHATEST: + renderModeIdx = 6; + break; + case RENDER_MODE_ALPHATEST_ONESIDED: + renderModeIdx = 7; + break; + case RENDER_MODE_SURFXLU_AA_ZB_ZUPD: + renderModeIdx = 9; + break; + case RENDER_MODE_SURFACE_XLU_LAYER1: + case RENDER_MODE_SURFACE_XLU_LAYER2: + case RENDER_MODE_SURFACE_XLU_LAYER3: + renderModeIdx = 8; + break; + case RENDER_MODE_SURFACE_XLU_NO_AA: + renderModeIdx = 10; + break; + case RENDER_MODE_SURFXLU_ZB_ZUPD: + renderModeIdx = 11; + break; + case RENDER_MODE_DECAL_XLU: + renderModeIdx = 12; + break; + case RENDER_MODE_DECAL_XLU_NOAA: + renderModeIdx = 13; + break; + case RENDER_MODE_INTERSECTING_XLU: + renderModeIdx = 14; + break; + case RENDER_MODE_SURFACE_OPA_NO_ZB: + renderModeIdx = 0x2E; + break; + case RENDER_MODE_ALPHATEST_NO_ZB: + renderModeIdx = 0x2F; + break; + case RENDER_MODE_SURFACE_XLU_NO_ZB: + renderModeIdx = 0x30; + break; + case RENDER_MODE_CLOUD: + renderModeIdx = 0x37; + break; + case RENDER_MODE_CLOUD_NO_ZB: + renderModeIdx = 0x38; + break; + default: + renderModeIdx = 0; + break; + } + gSPDisplayList((*gfxPos)++, D_8014AFC0[renderModeIdx]); + break; + case 2: + switch (renderMode) { + case RENDER_MODE_SURFACE_OPA_NO_AA: + renderModeIdx = 0x11; + break; + case RENDER_MODE_DECAL_OPA: + renderModeIdx = 0x12; + break; + case RENDER_MODE_DECAL_OPA_NO_AA: + renderModeIdx = 0x13; + break; + case RENDER_MODE_INTERSECTING_OPA: + renderModeIdx = 0x14; + break; + case RENDER_MODE_ALPHATEST: + renderModeIdx = 0x16; + break; + case RENDER_MODE_ALPHATEST_ONESIDED: + renderModeIdx = 0x17; + break; + case RENDER_MODE_SURFACE_XLU_LAYER1: + case RENDER_MODE_SURFACE_XLU_LAYER2: + case RENDER_MODE_SURFACE_XLU_LAYER3: + renderModeIdx = 0x18; + break; + case RENDER_MODE_SURFXLU_AA_ZB_ZUPD: + renderModeIdx = 0x19; + break; + case RENDER_MODE_SURFACE_XLU_NO_AA: + renderModeIdx = 0x1A; + break; + case RENDER_MODE_DECAL_XLU: + renderModeIdx = 0x1B; + break; + case RENDER_MODE_DECAL_XLU_NOAA: + renderModeIdx = 0x1C; + break; + case RENDER_MODE_INTERSECTING_XLU: + renderModeIdx = 0x1D; + break; + case RENDER_MODE_SURFACE_OPA_NO_ZB: + renderModeIdx = 0x31; + break; + case RENDER_MODE_ALPHATEST_NO_ZB: + renderModeIdx = 0x32; + break; + case RENDER_MODE_SURFACE_XLU_NO_ZB: + renderModeIdx = 0x33; + break; + case RENDER_MODE_CLOUD: + renderModeIdx = 0x39; + break; + case RENDER_MODE_CLOUD_NO_ZB: + renderModeIdx = 0x3A; + break; + case RENDER_MODE_SURFACE_OPA: + renderModeIdx = 0x10; + break; + default: + renderModeIdx = 0x10; + break; + } + gSPDisplayList((*gfxPos)++, D_8014AFC0[renderModeIdx]); + break; + case 3: + temp = 0x25; // required to match + switch (renderMode) { + case RENDER_MODE_SURFACE_OPA_NO_AA: + renderModeIdx = 0x20; + break; + case RENDER_MODE_DECAL_OPA: + renderModeIdx = 0x21; + break; + case RENDER_MODE_DECAL_OPA_NO_AA: + renderModeIdx = 0x22; + break; + case RENDER_MODE_INTERSECTING_OPA: + renderModeIdx = 0x23; + break; + case RENDER_MODE_ALPHATEST: + renderModeIdx = temp; + break; + case RENDER_MODE_ALPHATEST_ONESIDED: + renderModeIdx = 0x26; + break; + case RENDER_MODE_SURFACE_XLU_LAYER1: + case RENDER_MODE_SURFACE_XLU_LAYER2: + case RENDER_MODE_SURFACE_XLU_LAYER3: + renderModeIdx = 0x27; + break; + case RENDER_MODE_SURFXLU_AA_ZB_ZUPD: + renderModeIdx = 0x28; + break; + case RENDER_MODE_SURFACE_XLU_NO_AA: + renderModeIdx = 0x29; + break; + case RENDER_MODE_DECAL_XLU: + renderModeIdx = 0x2A; + break; + case RENDER_MODE_DECAL_XLU_NOAA: + renderModeIdx = 0x2B; + break; + case RENDER_MODE_INTERSECTING_XLU: + renderModeIdx = 0x2C; + break; + case RENDER_MODE_SURFACE_OPA_NO_ZB: + renderModeIdx = 0x34; + break; + case RENDER_MODE_ALPHATEST_NO_ZB: + renderModeIdx = 0x35; + break; + case RENDER_MODE_SURFACE_XLU_NO_ZB: + renderModeIdx = 0x36; + break; + case RENDER_MODE_CLOUD: + renderModeIdx = 0x3B; + break; + case RENDER_MODE_CLOUD_NO_ZB: + renderModeIdx = 0x3C; + break; + case RENDER_MODE_SURFACE_OPA: + renderModeIdx = 0x1F; + break; + default: + renderModeIdx = 0x1F; + break; + } + gSPDisplayList((*gfxPos)++, D_8014AFC0[renderModeIdx]); + gDPSetFogColor((*gfxPos)++, gCurrentFogSettings->r, + gCurrentFogSettings->g, + gCurrentFogSettings->b, + gCurrentFogSettings->a); + gSPFogPosition((*gfxPos)++, gCurrentFogSettings->startDistance, gCurrentFogSettings->endDistance); + break; + case 4: + case 5: + if (mdl_bgMultiplyColorA == 255) { + return; + } + gSPDisplayList((*gfxPos)++, D_8014AFC0[0x10]); + switch (renderMode) { + case RENDER_MODE_SURFACE_OPA: + gDPSetRenderMode(gMasterGfxPos++, GBL_c1(G_BL_CLR_BL, G_BL_A_FOG, G_BL_CLR_IN, G_BL_1MA), G_RM_AA_ZB_OPA_SURF2); + break; + case RENDER_MODE_SURFACE_OPA_NO_AA: + gDPSetRenderMode(gMasterGfxPos++, GBL_c1(G_BL_CLR_BL, G_BL_A_FOG, G_BL_CLR_IN, G_BL_1MA), G_RM_ZB_OPA_SURF2); + break; + case RENDER_MODE_DECAL_OPA: + gDPSetRenderMode(gMasterGfxPos++, GBL_c1(G_BL_CLR_BL, G_BL_A_FOG, G_BL_CLR_IN, G_BL_1MA), G_RM_AA_ZB_OPA_DECAL2); + break; + case RENDER_MODE_DECAL_OPA_NO_AA: + gDPSetRenderMode(gMasterGfxPos++, GBL_c1(G_BL_CLR_BL, G_BL_A_FOG, G_BL_CLR_IN, G_BL_1MA), G_RM_ZB_OPA_DECAL2); + break; + case RENDER_MODE_INTERSECTING_OPA: + gDPSetRenderMode(gMasterGfxPos++, GBL_c1(G_BL_CLR_BL, G_BL_A_FOG, G_BL_CLR_IN, G_BL_1MA), G_RM_AA_ZB_OPA_INTER2); + break; + case RENDER_MODE_ALPHATEST: + gDPSetRenderMode(gMasterGfxPos++, GBL_c1(G_BL_CLR_BL, G_BL_A_FOG, G_BL_CLR_IN, G_BL_1MA), G_RM_AA_ZB_TEX_EDGE2); + break; + case RENDER_MODE_ALPHATEST_ONESIDED: + gDPSetRenderMode(gMasterGfxPos++, GBL_c1(G_BL_CLR_BL, G_BL_A_FOG, G_BL_CLR_IN, G_BL_1MA), G_RM_AA_ZB_TEX_EDGE2); + break; + case RENDER_MODE_SURFACE_XLU_LAYER1: + gDPSetRenderMode(gMasterGfxPos++, GBL_c1(G_BL_CLR_BL, G_BL_A_FOG, G_BL_CLR_IN, G_BL_1MA), G_RM_AA_ZB_XLU_SURF2); + break; + case RENDER_MODE_SURFACE_XLU_LAYER2: + gDPSetRenderMode(gMasterGfxPos++, GBL_c1(G_BL_CLR_BL, G_BL_A_FOG, G_BL_CLR_IN, G_BL_1MA), G_RM_AA_ZB_XLU_SURF2); + break; + case RENDER_MODE_SURFACE_XLU_LAYER3: + gDPSetRenderMode(gMasterGfxPos++, GBL_c1(G_BL_CLR_BL, G_BL_A_FOG, G_BL_CLR_IN, G_BL_1MA), G_RM_AA_ZB_XLU_SURF2); + break; + case RENDER_MODE_SURFACE_XLU_NO_AA: + gDPSetRenderMode(gMasterGfxPos++, GBL_c1(G_BL_CLR_BL, G_BL_A_FOG, G_BL_CLR_IN, G_BL_1MA), G_RM_ZB_XLU_SURF2); + break; + case RENDER_MODE_DECAL_XLU: + gDPSetRenderMode(gMasterGfxPos++, GBL_c1(G_BL_CLR_BL, G_BL_A_FOG, G_BL_CLR_IN, G_BL_1MA), G_RM_AA_ZB_XLU_DECAL2); + break; + case RENDER_MODE_DECAL_XLU_NOAA: + gDPSetRenderMode(gMasterGfxPos++, GBL_c1(G_BL_CLR_BL, G_BL_A_FOG, G_BL_CLR_IN, G_BL_1MA), G_RM_AA_ZB_XLU_DECAL2); + break; + case RENDER_MODE_INTERSECTING_XLU: + gDPSetRenderMode(gMasterGfxPos++, GBL_c1(G_BL_CLR_BL, G_BL_A_FOG, G_BL_CLR_IN, G_BL_1MA), G_RM_AA_ZB_XLU_INTER2); + break; + case RENDER_MODE_SURFACE_OPA_NO_ZB: + gDPSetRenderMode(gMasterGfxPos++, GBL_c1(G_BL_CLR_BL, G_BL_A_FOG, G_BL_CLR_IN, G_BL_1MA), G_RM_AA_OPA_SURF2); + break; + case RENDER_MODE_ALPHATEST_NO_ZB: + gDPSetRenderMode(gMasterGfxPos++, GBL_c1(G_BL_CLR_BL, G_BL_A_FOG, G_BL_CLR_IN, G_BL_1MA), G_RM_AA_TEX_EDGE2); + break; + case RENDER_MODE_SURFACE_XLU_NO_ZB: + gDPSetRenderMode(gMasterGfxPos++, GBL_c1(G_BL_CLR_BL, G_BL_A_FOG, G_BL_CLR_IN, G_BL_1MA), G_RM_AA_XLU_SURF2); + break; + case RENDER_MODE_CLOUD: + gDPSetRenderMode(gMasterGfxPos++, GBL_c1(G_BL_CLR_BL, G_BL_A_FOG, G_BL_CLR_IN, G_BL_1MA), G_RM_ZB_CLD_SURF2); + break; + case RENDER_MODE_CLOUD_NO_ZB: + gDPSetRenderMode(gMasterGfxPos++, GBL_c1(G_BL_CLR_BL, G_BL_A_FOG, G_BL_CLR_IN, G_BL_1MA), G_RM_CLD_SURF2); + break; + } + gDPSetFogColor((*gfxPos)++, gCurrentFogSettings->r, + gCurrentFogSettings->g, + gCurrentFogSettings->b, + mdl_bgMultiplyColorA); + gDPSetBlendColor((*gfxPos)++, mdl_bgMultiplyColorR, + mdl_bgMultiplyColorG, + mdl_bgMultiplyColorB, + 255); + gSPFogPosition((*gfxPos)++, 970, 1000); + break; + case 6: + switch (renderMode) { + case RENDER_MODE_SURFACE_OPA_NO_AA: + renderModeIdx = 0x20; + break; + case RENDER_MODE_DECAL_OPA: + renderModeIdx = 0x21; + break; + case RENDER_MODE_DECAL_OPA_NO_AA: + renderModeIdx = 0x22; + break; + case RENDER_MODE_INTERSECTING_OPA: + renderModeIdx = 0x23; + break; + case RENDER_MODE_ALPHATEST: + renderModeIdx = 0x25; + break; + case RENDER_MODE_ALPHATEST_ONESIDED: + renderModeIdx = 0x26; + break; + case RENDER_MODE_SURFACE_XLU_LAYER1: + case RENDER_MODE_SURFACE_XLU_LAYER2: + case RENDER_MODE_SURFACE_XLU_LAYER3: + renderModeIdx = 0x27; + break; + case RENDER_MODE_SURFXLU_AA_ZB_ZUPD: + renderModeIdx = 0x28; + break; + case RENDER_MODE_SURFACE_XLU_NO_AA: + renderModeIdx = 0x29; + break; + case RENDER_MODE_DECAL_XLU: + renderModeIdx = 0x2A; + break; + case RENDER_MODE_DECAL_XLU_NOAA: + renderModeIdx = 0x2B; + break; + case RENDER_MODE_INTERSECTING_XLU: + renderModeIdx = 0x2C; + break; + case RENDER_MODE_SURFACE_OPA_NO_ZB: + renderModeIdx = 0x34; + break; + case RENDER_MODE_ALPHATEST_NO_ZB: + renderModeIdx = 0x35; + break; + case RENDER_MODE_SURFACE_XLU_NO_ZB: + renderModeIdx = 0x36; + break; + case RENDER_MODE_CLOUD: + renderModeIdx = 0x3B; + break; + case RENDER_MODE_CLOUD_NO_ZB: + renderModeIdx = 0x3C; + break; + case RENDER_MODE_SURFACE_OPA: + renderModeIdx = 0x1F; + break; + default: + renderModeIdx = 0x1F; + break; + } + gSPDisplayList((*gfxPos)++, D_8014AFC0[renderModeIdx]); + + fogR = (gCurrentFogSettings->r * (255 - mdl_bgMultiplyColorA) + mdl_bgMultiplyColorR * mdl_bgMultiplyColorA) / 255; + fogG = (gCurrentFogSettings->g * (255 - mdl_bgMultiplyColorA) + mdl_bgMultiplyColorG * mdl_bgMultiplyColorA) / 255; + fogB = (gCurrentFogSettings->b * (255 - mdl_bgMultiplyColorA) + mdl_bgMultiplyColorB * mdl_bgMultiplyColorA) / 255; + + fogMin = (gCurrentFogSettings->startDistance * (255 - mdl_bgMultiplyColorA) + 900 * mdl_bgMultiplyColorA) / 255; + fogMax = (gCurrentFogSettings->endDistance * (255 - mdl_bgMultiplyColorA) + 1000 * mdl_bgMultiplyColorA) / 255; + + gDPSetFogColor(gMasterGfxPos++, fogR, fogG, fogB, gCurrentFogSettings->a); + gSPFogPosition((*gfxPos)++, fogMin, fogMax); + break; + case 10: + case 11: + switch (renderMode) { + case RENDER_MODE_DECAL_OPA: + renderModeIdx = 0x21; + break; + case RENDER_MODE_INTERSECTING_OPA: + renderModeIdx = 0x23; + break; + case RENDER_MODE_ALPHATEST: + renderModeIdx = 0x25; + break; + case RENDER_MODE_CLOUD: + renderModeIdx = 0x3B; + break; + case RENDER_MODE_CLOUD_NO_ZB: + renderModeIdx = 0x3C; + break; + case RENDER_MODE_SURFACE_OPA: + default: + renderModeIdx = 0x1F; + break; + } + gSPDisplayList((*gfxPos)++, D_8014AFC0[renderModeIdx]); + break; + } + + if (!(flags & MODEL_FLAG_TRANSFORM_GROUP_MEMBER)) { + if (!(flags & MODEL_FLAG_FLAG_2000)) { + gSPMatrix((*gfxPos)++, model->currentSpecialMatrix, mtxLoadMode | mtxPushMode | G_MTX_MODELVIEW); + if (mtxPushMode != G_MTX_NOPUSH) { + mtxPushMode = G_MTX_NOPUSH; + } + if (mtxLoadMode != G_MTX_MUL) { + mtxLoadMode = G_MTX_MUL; + } + } + } else { + mtxLoadMode = G_MTX_MUL; + if (!(flags & MODEL_FLAG_FLAG_2000)) { + gSPMatrix((*gfxPos)++, model->currentSpecialMatrix, mtxLoadMode | mtxPushMode | G_MTX_MODELVIEW); + if (mtxPushMode != G_MTX_NOPUSH) { + mtxPushMode = G_MTX_NOPUSH; + } + } + } + + if (flags & MODEL_FLAG_USES_CUSTOM_GFX) { + customGfxIndex = (model->customGfxIndex & 0xF) * 2; + if ((*gCurrentCustomModelGfxPtr)[customGfxIndex] != NULL) { + gSPDisplayList((*gfxPos)++, (*gCurrentCustomModelGfxPtr)[customGfxIndex]); + } + } + + if (textureHeader != NULL) { + if (flags & MODEL_FLAG_HAS_TEX_PANNER) { + s32 panMainU = texPannerMainU[model->texPannerID] >> 8; + s32 panMainV = texPannerMainV[model->texPannerID] >> 8; + s32 panAuxU = texPannerAuxU[model->texPannerID] >> 8; + s32 panAuxV = texPannerAuxV[model->texPannerID] >> 8; + + switch (extraTileType) { + case EXTRA_TILE_AUX_SAME_AS_MAIN: + gDPSetTileSize((*gfxPos)++, G_TX_RENDERTILE, panMainU, panMainV, (textureHeader->mainW - 1) * 4 + panMainU, (textureHeader->mainH / 2 - 1) * 4 + panMainV); + gDPSetTileSize((*gfxPos)++, G_TX_RENDERTILE + 1, panAuxU, panAuxV, (textureHeader->mainW - 1) * 4 + panAuxU, (textureHeader->mainH / 2 - 1) * 4 + panAuxV); + break; + case EXTRA_TILE_AUX_INDEPENDENT: + gDPSetTileSize((*gfxPos)++, G_TX_RENDERTILE, panMainU, panMainV, (textureHeader->mainW - 1) * 4 + panMainU, (textureHeader->mainH - 1) * 4 + panMainV); + gDPSetTileSize((*gfxPos)++, G_TX_RENDERTILE + 1, panAuxU, panAuxV, (textureHeader->auxW - 1) * 4 + panAuxU, (textureHeader->auxH - 1) * 4 + panAuxV); + break; + default: + gDPSetTileSize((*gfxPos)++, G_TX_RENDERTILE, panMainU, panMainV, (textureHeader->mainW - 1) * 4 + panMainU, (textureHeader->mainH - 1) * 4 + panMainV); + break; + } + } + } + if (flags & MODEL_FLAG_USE_CAMERA_UNK_MATRIX) { + gSPMatrix((*gfxPos)++, gCameras[gCurrentCamID].unkMatrix, mtxLoadMode | mtxPushMode | G_MTX_MODELVIEW); + if (mtxPushMode != G_MTX_NOPUSH) { + mtxPushMode = G_MTX_NOPUSH; + } + if (mtxLoadMode != G_MTX_MUL) { + mtxLoadMode = G_MTX_MUL; + } + } + if (!(flags & MODEL_FLAG_HAS_LOCAL_VERTEX_COPY)) { + gSPDisplayList((*gfxPos)++, modelNode->displayData->displayList); + } + + if (flags & MODEL_FLAG_USES_CUSTOM_GFX) { + customGfxIndex++; + if ((*gCurrentCustomModelGfxPtr)[customGfxIndex] != NULL) { + gSPDisplayList((*gfxPos)++, (*gCurrentCustomModelGfxPtr)[customGfxIndex]); + } + } + + if (mtxPushMode == G_MTX_NOPUSH) { + gSPPopMatrix((*gfxPos)++, G_MTX_MODELVIEW); + } + + gDPPipeSync((*gfxPos)++); +} void func_80114B58(u32 romOffset, TextureHandle* handle, TextureHeader* header, s32 mainSize, s32 mainPalSize, s32 auxSize, s32 auxPalSize) { handle->raster = (IMG_PTR) mdl_nextTextureAddress; @@ -3021,10 +3651,231 @@ void func_80114B58(u32 romOffset, TextureHandle* handle, TextureHeader* header, gSPEndDisplayList(((Gfx*) mdl_nextTextureAddress)++); } -void load_tile_header(char* textureName, s32 romOffset, s32 size); -INCLUDE_ASM(s32, "a5dd0_len_114e0", load_tile_header); +void load_tile_header(ModelNodeProperty* propertyName, s32 romOffset, s32 size) { + char* textureName = (char*)propertyName->data.p; + u32 baseOffset = romOffset; + s32 textureID = 0; + u32 paletteSize; + u32 rasterSize; + u32 auxPaletteSize; + u32 auxRasterSize; + TextureHeader* header; + TextureHandle* textureHandle; + s32 mainSize; -INCLUDE_ASM(s32, "a5dd0_len_114e0", func_80115498); + if (textureName == NULL) { + (*mdl_currentModelTreeNodeInfo)[mdl_treeIterPos].textureID = 0; + return; + } + + while (romOffset < baseOffset + size) { + dma_copy((u8*)romOffset, (u8*)romOffset + sizeof(gCurrentTileDescriptor), &gCurrentTileDescriptor); + header = &gCurrentTileDescriptor; + + rasterSize = header->mainW * header->mainH; + + if (header->mainBitDepth == G_IM_SIZ_4b) { + if (header->extraTiles == EXTRA_TILE_MIPMAPS) { + s32 d = 2; + while (header->mainW / d >= 16 && header->mainH / d > 0) { + rasterSize += header->mainW / d * header->mainH / d; + d *= 2; + } + } + rasterSize /= 2; + } else if (header->mainBitDepth == G_IM_SIZ_8b) { + if (header->extraTiles == EXTRA_TILE_MIPMAPS) { + s32 d = 2; + while (header->mainW / d >= 8 && header->mainH / d > 0) { + rasterSize += header->mainW / d * header->mainH / d; + d *= 2; + } + } + } else { + do {} while (0); + if (header->mainBitDepth == G_IM_SIZ_16b) { + if (header->extraTiles == EXTRA_TILE_MIPMAPS) { + s32 d = 2; + while (header->mainW / d >= 4 && header->mainH / d > 0) { + rasterSize += header->mainW / d * header->mainH / d; + d *= 2; + } + } + rasterSize *= 2; + } else if (header->mainBitDepth == G_IM_SIZ_32b) { + if (header->extraTiles == EXTRA_TILE_MIPMAPS) { + s32 d = 2; + while (header->mainW / d >= 2 && header->mainH / d > 0) { + rasterSize += header->mainW / d * header->mainH / d; + d *= 2; + } + } + rasterSize *= 4; + } + } + + if (header->mainFmt == G_IM_FMT_CI) { + paletteSize = 0x20; + if (header->mainBitDepth == G_IM_SIZ_8b) { + paletteSize = 0x200; + } + } else { + paletteSize = 0; + } + + if (header->extraTiles == EXTRA_TILE_AUX_INDEPENDENT) { + auxRasterSize = header->auxW * header->auxH; + if (header->auxBitDepth == G_IM_SIZ_4b) { + auxRasterSize /= 2; + } else if (header->auxBitDepth == G_IM_SIZ_8b) { + } else if (header->auxBitDepth == G_IM_SIZ_16b) { + auxRasterSize *= 2; + } else { + if (header->auxBitDepth == G_IM_SIZ_32b) { + auxRasterSize *= 4; + } + } + if (header->auxFmt == G_IM_FMT_CI) { + auxPaletteSize = 0x20; + if (header->auxBitDepth == G_IM_SIZ_8b) { + auxPaletteSize = 0x200; + } + } else { + auxPaletteSize = 0; + } + } else { + auxPaletteSize = 0; + auxRasterSize = 0; + } + + if (strcmp(textureName, header->name) == 0) { + break; + } + + textureID++; + mainSize = rasterSize + paletteSize + sizeof(*header); + romOffset += mainSize; + romOffset += auxRasterSize + auxPaletteSize; + } + + if (romOffset >= baseOffset + 0x40000) { + (*mdl_currentModelTreeNodeInfo)[mdl_treeIterPos].textureID = 0; + return; + } + + (*mdl_currentModelTreeNodeInfo)[mdl_treeIterPos].textureID = textureID + 1; + textureHandle = &mdl_textureHandles[(*mdl_currentModelTreeNodeInfo)[mdl_treeIterPos].textureID]; + romOffset += sizeof(*header); + + if (textureHandle->gfx == NULL) { + func_80114B58(romOffset, textureHandle, header, rasterSize, paletteSize, auxRasterSize, auxPaletteSize); + func_80115498(romOffset + rasterSize + paletteSize + auxRasterSize + auxPaletteSize, (*mdl_currentModelTreeNodeInfo)[mdl_treeIterPos].textureID, baseOffset, size); + } + +} + +void func_80115498(u32 romOffset, s32 textureID, s32 baseOffset, s32 size) { + u32 offset; + TextureHeader sp20; + u32 rasterSize; + s32 paletteSize; + u32 auxRasterSize; + u32 auxPaletteSize; + s32 bitDepth; + s32 mainSize; + TextureHeader* header; + s32 currentTextureID = textureID; + + + for (offset = romOffset; offset < baseOffset + size;) { + dma_copy((u8*)offset, (u8*)offset + sizeof(sp20), &sp20); + header = &sp20; + if (header->unk_28 == 0) { + break; + } + + rasterSize = header->mainW * header->mainH; + + if (header->mainBitDepth == G_IM_SIZ_4b) { + if (header->extraTiles == EXTRA_TILE_MIPMAPS) { + s32 d = 2; + while (header->mainW / d >= 16 && header->mainH / d > 0) { + rasterSize += header->mainW / d * header->mainH / d; + d *= 2; + } + } + rasterSize /= 2; + } else if (header->mainBitDepth == G_IM_SIZ_8b) { + if (header->extraTiles == EXTRA_TILE_MIPMAPS) { + s32 d = 2; + while (header->mainW / d >= 8 && header->mainH / d > 0) { + rasterSize += header->mainW / d * header->mainH / d; + d *= 2; + } + } + } else { + do {} while (0); + if (header->mainBitDepth == G_IM_SIZ_16b) { + if (header->extraTiles == EXTRA_TILE_MIPMAPS) { + s32 d = 2; + while (header->mainW / d >= 4 && header->mainH / d > 0) { + rasterSize += header->mainW / d * header->mainH / d; + d *= 2; + } + } + rasterSize *= 2; + } else if (header->mainBitDepth == G_IM_SIZ_32b) { + if (header->extraTiles == EXTRA_TILE_MIPMAPS) { + s32 d = 2; + while (header->mainW / d >= 2 && header->mainH / d > 0) { + rasterSize += header->mainW / d * header->mainH / d; + d *= 2; + } + } + rasterSize *= 4; + } + } + + if (header->mainFmt == G_IM_FMT_CI) { + paletteSize = 0x20; + if (header->mainBitDepth == G_IM_SIZ_8b) { + paletteSize = 0x200; + } + } else { + paletteSize = 0; + } + + if (header->extraTiles == EXTRA_TILE_AUX_INDEPENDENT) { + auxRasterSize = header->auxW * header->auxH; + if (header->auxBitDepth == G_IM_SIZ_4b) { + auxRasterSize /= 2; + } else if (header->auxBitDepth == G_IM_SIZ_8b) { + } else if (header->auxBitDepth == G_IM_SIZ_16b) { + auxRasterSize *= 2; + } else { + if (header->auxBitDepth == G_IM_SIZ_32b) { + auxRasterSize *= 4; + } + } + if (header->auxFmt == G_IM_FMT_CI) { + auxPaletteSize = 0x20; + if (header->auxBitDepth == G_IM_SIZ_8b) { + auxPaletteSize = 0x200; + } + } else { + auxPaletteSize = 0; + } + } else { + auxPaletteSize = 0; + auxRasterSize = 0; + } + currentTextureID = ++textureID; + func_80114B58(offset + sizeof(*header), &mdl_textureHandles[currentTextureID], header, rasterSize, paletteSize, auxRasterSize, auxPaletteSize); + mainSize = rasterSize + paletteSize + sizeof(*header); + offset += mainSize; + offset += auxRasterSize + auxPaletteSize; + } +} // Goofy temps needed to match ModelNodeProperty* get_model_property(ModelNode* node, ModelPropertyKeys key) { @@ -3041,7 +3892,7 @@ ModelNodeProperty* get_model_property(ModelNode* node, ModelPropertyKeys key) { } void _load_model_textures(ModelNode* model, s32 romOffset, s32 size) { - if (model->type != 2) { + if (model->type != SHAPE_TYPE_MODEL) { if (model->groupData != NULL) { s32 numChildren = model->groupData->numChildren; @@ -3054,9 +3905,9 @@ void _load_model_textures(ModelNode* model, s32 romOffset, s32 size) { } } } else { - char* textureName = (char*)get_model_property(model, MODEL_PROP_KEY_TEXTURE_NAME); - if (textureName != NULL) { - load_tile_header(textureName, romOffset, size); + ModelNodeProperty* propTextureName = get_model_property(model, MODEL_PROP_KEY_TEXTURE_NAME); + if (propTextureName != NULL) { + load_tile_header(propTextureName, romOffset, size); } } mdl_treeIterPos++; @@ -3084,7 +3935,7 @@ void load_model_textures(ModelNode* model, s32 romOffset, s32 size) { s32 mdl_get_child_count(ModelNode* model) { s32 ret = 0; - if (model->type != 2 && model->groupData != NULL) { + if (model->type != SHAPE_TYPE_MODEL && model->groupData != NULL) { s32 numChildren = model->groupData->numChildren; if (numChildren != 0) { @@ -3110,7 +3961,7 @@ void clear_model_data(void) { gCurrentModelTreeRoot = &D_80152214; gCurrentModelLocalVtxBuffers = &wModelLocalVtxBuffers; mdl_currentModelTreeNodeInfo = &D_80152220; - gBgRenderTypePtr = &wBgRenderType; + gBackgroundFogModePtr = &wBackgroundFogMode; mdl_bgMultiplyColorA = 0; mdl_bgMultiplyColorR = 0; mdl_bgMultiplyColorG = 0; @@ -3124,7 +3975,7 @@ void clear_model_data(void) { gCurrentModelTreeRoot = &D_80152218; gCurrentModelLocalVtxBuffers = &bModelLocalVtxBuffers; mdl_currentModelTreeNodeInfo = &D_80152A20; - gBgRenderTypePtr = &bBgRenderType; + gBackgroundFogModePtr = &bBackgroundFogMode; gCurrentFogSettings = &bFogSettings; } @@ -3149,7 +4000,7 @@ void clear_model_data(void) { (*mdl_currentModelTreeNodeInfo)[i].textureID = 0; } - *gBgRenderTypePtr = BACKGROUND_RENDER_TYPE_0; + *gBackgroundFogModePtr = FOG_MODE_0; gCurrentFogSettings->r = 10; gCurrentFogSettings->g = 10; gCurrentFogSettings->b = 10; @@ -3175,7 +4026,7 @@ void init_model_data(void) { gCurrentModelTreeRoot = &D_80152214; gCurrentModelLocalVtxBuffers = &wModelLocalVtxBuffers; mdl_currentModelTreeNodeInfo = &D_80152220; - gBgRenderTypePtr = &wBgRenderType; + gBackgroundFogModePtr = &wBackgroundFogMode; gCurrentFogSettings = &wFogSettings; } else { gCurrentModels = &bModelList; @@ -3185,7 +4036,7 @@ void init_model_data(void) { gCurrentModelTreeRoot = &D_80152218; gCurrentModelLocalVtxBuffers = &bModelLocalVtxBuffers; mdl_currentModelTreeNodeInfo = &D_80152A20; - gBgRenderTypePtr = &bBgRenderType; + gBackgroundFogModePtr = &bBackgroundFogMode; gCurrentFogSettings = &bFogSettings; } } @@ -3241,7 +4092,7 @@ void mdl_create_model(ModelBlueprint* bp, s32 arg1) { } (*gCurrentModels)[modelIdx] = model = heap_malloc(sizeof(*model)); - model->flags = bp->flags | 1; + model->flags = bp->flags | MODEL_FLAG_FLAG_1; model->modelID = D_80153226; model->modelNode = bp->mdlNode; model->groupData = bp->groupData; @@ -3268,7 +4119,7 @@ void mdl_create_model(ModelBlueprint* bp, s32 arg1) { if (prop != NULL) { model->renderMode = prop->data.s; } else { - model->renderMode = 1; + model->renderMode = RENDER_MODE_SURFACE_OPA; } model->textureID = (*mdl_currentModelTreeNodeInfo)[mdl_treeIterPos].textureID; @@ -3315,7 +4166,7 @@ void mdl_create_model(ModelBlueprint* bp, s32 arg1) { bb->halfSizeZ = z * 0.5; if (model->currentMatrix == NULL && x < 100.0f && y < 100.0f && z < 100.0f) { - model->flags |= 0x200; + model->flags |= MODEL_FLAG_FLAG_200; } (*mdl_currentModelTreeNodeInfo)[mdl_treeIterPos].modelIndex = modelIdx; } @@ -3347,7 +4198,7 @@ void func_80116698(void) { for (i = 0; i < ARRAY_COUNT(*gCurrentModels); i++) { model = (*gCurrentModels)[i]; - if (model != NULL && (model->flags != 0) && !(model->flags & 4)) { + if (model != NULL && (model->flags != 0) && !(model->flags & MODEL_FLAG_FLAG_4)) { if (!(model->flags & MODEL_FLAG_USES_TRANSFORM_MATRIX)) { if (model->matrixMode != 0) { model->matrixMode--; @@ -3364,7 +4215,7 @@ void func_80116698(void) { model->flags &= ~MODEL_FLAG_USES_TRANSFORM_MATRIX; model->matrixMode = 2; mtx = &gDisplayContext->matrixStack[gMatrixListPos++]; - if (model->currentMatrix == NULL || (model->flags & 8)) { + if (model->currentMatrix == NULL || (model->flags & MODEL_FLAG_TRANSFORM_GROUP_MEMBER)) { guMtxF2L(model->transformMatrix, mtx); } else { guMtxL2F(sp20, model->currentMatrix); @@ -3490,16 +4341,16 @@ void render_models(void) { if (model->flags == 0) { continue; } - if (model->flags & 4) { + if (model->flags & MODEL_FLAG_FLAG_4) { continue; } - if (model->flags & 2) { + if (model->flags & MODEL_FLAG_ENABLED) { continue; } - if (model->flags & 0x20) { + if (model->flags & MODEL_FLAG_FLAG_20) { continue; } - if (model->flags & 8) { + if (model->flags & MODEL_FLAG_TRANSFORM_GROUP_MEMBER) { continue; } @@ -3507,7 +4358,7 @@ void render_models(void) { y = model->center.y; z = model->center.z; - if (model->flags & 0x200) { + if (model->flags & MODEL_FLAG_FLAG_200) { cond = FALSE; boundingBox = (ModelBoundingBox*) model->modelNode->propertyList; bbx = boundingBox->halfSizeX; @@ -3816,7 +4667,7 @@ void func_801180E8(TextureHeader* header, Gfx** gfxPos, IMG_PTR raster, PAL_PTR auxBitDepth = header->auxBitDepth; - if (extraTileType == 3) { + if (extraTileType == EXTRA_TILE_AUX_INDEPENDENT) { if (palette != NULL) { auxPaletteIndex = 1; } else { @@ -3855,7 +4706,7 @@ void func_801180E8(TextureHeader* header, Gfx** gfxPos, IMG_PTR raster, PAL_PTR (*gfxPos)++; switch (extraTileType) { - case 0: + case EXTRA_TILE_NONE: lodMode = G_TL_TILE; gSPTexture((*gfxPos)++, 0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON); switch (mainBitDepth) { @@ -3881,7 +4732,7 @@ void func_801180E8(TextureHeader* header, Gfx** gfxPos, IMG_PTR raster, PAL_PTR break; } break; - case 1: + case EXTRA_TILE_MIPMAPS: lodMode = G_TL_LOD; switch (mainBitDepth) { case G_IM_SIZ_4b: @@ -3929,10 +4780,9 @@ void func_801180E8(TextureHeader* header, Gfx** gfxPos, IMG_PTR raster, PAL_PTR } break; } - // use tile with lowest quality gSPTexture((*gfxPos)++, 0xFFFF, 0xFFFF, lod - 1, G_TX_RENDERTILE, G_ON); break; - case 2: + case EXTRA_TILE_AUX_SAME_AS_MAIN: gSPTexture((*gfxPos)++, 0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON); gDPPipeSync((*gfxPos)++); lodMode = G_TL_TILE; @@ -3959,7 +4809,7 @@ void func_801180E8(TextureHeader* header, Gfx** gfxPos, IMG_PTR raster, PAL_PTR break; } break; - case 3: + case EXTRA_TILE_AUX_INDEPENDENT: gSPTexture((*gfxPos)++, 0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON); lodMode = G_TL_TILE; switch (mainBitDepth) { @@ -4066,7 +4916,7 @@ void load_model_transforms(ModelNode* model, ModelNode* parent, Matrix4f mdlTxMt groupType = groupTypeProperty->data.s; } - if (model->type != 5 || groupType == 0) { + if (model->type != SHAPE_TYPE_GROUP || groupType == 0) { for (i = 0; i < model->groupData->numChildren; i++) { load_model_transforms(model->groupData->childList[i], model, model->groupData->transformMatrix != NULL ? sp10 : mdlTxMtx, treeDepth + 1); @@ -4085,7 +4935,7 @@ void load_model_transforms(ModelNode* model, ModelNode* parent, Matrix4f mdlTxMt modelBPptr->groupData = parent->groupData; modelBPptr->mtx = &sp50; - if (model->type == 5) { + if (model->type == SHAPE_TYPE_GROUP) { s32 childCount = mdl_get_child_count(model); for (i = mdl_treeIterPos; i < mdl_treeIterPos + childCount; i++) { @@ -4168,12 +5018,12 @@ void func_8011B1D8(ModelNode* node) { s32 i; u16 childCount; - if (node->type == 2) { + if (node->type == SHAPE_TYPE_MODEL) { D_80153376 = D_80153226; return; } - if (node->type == 5) { + if (node->type == SHAPE_TYPE_GROUP) { prop = get_model_property(node, MODEL_PROP_KEY_GROUP_TYPE); if (prop != NULL && prop->data.s != 0) { mdl_treeIterPos += mdl_get_child_count(node); @@ -4188,7 +5038,7 @@ void func_8011B1D8(ModelNode* node) { for (i = 0; i < numChildren; i++) { childNode = node->groupData->childList[i]; childCount = mdl_treeIterPos; - if (childNode->type == 5) { + if (childNode->type == SHAPE_TYPE_GROUP) { prop = get_model_property(childNode, MODEL_PROP_KEY_GROUP_TYPE); if (prop != NULL && prop->data.s != 0) { childCount += mdl_get_child_count(childNode); @@ -4334,7 +5184,7 @@ void clone_model(u16 srcModelID, u16 newModelID) { newModel->modelID = newModelID; } -void func_8011B7C0(u16 treeIndex, s32 flags, s32 arg2) { +void set_model_flags(u16 treeIndex, s32 flags, s32 mode) { s32 maxGroupIndex = -1; s32 i; s32 minGroupIndex; @@ -4361,10 +5211,10 @@ void func_8011B7C0(u16 treeIndex, s32 flags, s32 arg2) { } } - if (arg2 < 2) { + if (mode < 2) { for (i = minGroupIndex; i <= maxGroupIndex; i++) { Model* model = (*gCurrentModels)[i]; - if (arg2 != 0) { + if (mode != 0) { model->flags &= ~flags; } else { model->flags |= flags; @@ -4373,7 +5223,7 @@ void func_8011B7C0(u16 treeIndex, s32 flags, s32 arg2) { } else { for (i = 0; i < minGroupIndex; i++) { Model* model = (*gCurrentModels)[i]; - if (arg2 == 3) { + if (mode == 3) { model->flags &= ~flags; } else { model->flags |= flags; @@ -4382,7 +5232,7 @@ void func_8011B7C0(u16 treeIndex, s32 flags, s32 arg2) { for (i = maxGroupIndex + 1; i < 256; i++) { Model* model = (*gCurrentModels)[i]; if (model != NULL) { - if (arg2 == 3) { + if (mode == 3) { model->flags &= ~flags; } else { model->flags |= flags; @@ -4392,7 +5242,7 @@ void func_8011B7C0(u16 treeIndex, s32 flags, s32 arg2) { } } -void func_8011B950(u16 treeIndex, s32 arg1, s32 arg2, s32 arg3) { +void func_8011B950(u16 treeIndex, s32 customGfxIndex, s32 fogType, s32 arg3) { s32 maxGroupIndex = -1; s32 i; s32 minGroupIndex; @@ -4422,17 +5272,17 @@ void func_8011B950(u16 treeIndex, s32 arg1, s32 arg2, s32 arg3) { maskLow = maskHigh = 0; - if (arg1 < 0) { + if (customGfxIndex < 0) { maskLow = 0xF; - arg1 = 0; + customGfxIndex = 0; } - if (arg2 < 0) { + if (fogType < 0) { maskHigh = 0xF0; - arg2 = 0; + fogType = 0; } - newIndex = arg1 + (arg2 << 4); + newIndex = customGfxIndex + (fogType << 4); if (arg3 == 0) { for (i = minGroupIndex; i <= maxGroupIndex; i++) { @@ -4712,29 +5562,21 @@ void mdl_get_vertex_count(Gfx* gfx, s32* numVertices, Vtx** baseVtx, s32* gfxCou } } -void mdl_local_gfx_update_vtx_pointers(Gfx* nodeDlist, Vtx* baseVtx, Gfx* arg2, Vtx* arg3); -#ifdef NON_MATCHING -void mdl_local_gfx_update_vtx_pointers(Gfx* nodeDlist, Vtx* baseVtx, Gfx* arg2, Vtx* arg3) { +void mdl_local_gfx_update_vtx_pointers(Gfx *nodeDlist, Vtx *baseVtx, Gfx *arg2, Vtx *arg3) { u32 w0; - u32 temp_v1; - u32 w1; - + Vtx* w1; do { - w0 = (u32) nodeDlist->words.w0 >> 0; - w1 = nodeDlist->words.w1; - temp_v1 = w0 >> 0x18; - nodeDlist++; - if (temp_v1 == 1) { - w1 = &arg3[(s32) (w1 - (s32)baseVtx) >> 4]; + w0 = (*((unsigned long long*)nodeDlist)) >> 0x20; // TODO required to match + w1 = (Vtx*)nodeDlist->words.w1; + if (w0 >> 0x18 == G_VTX) { + w1 = arg3 + (w1 - baseVtx); } arg2->words.w0 = w0; - arg2->words.w1 = w1; + arg2->words.w1 = (u32)w1; + nodeDlist++; arg2++; - } while (temp_v1 != G_ENDDL); + } while (w0 >> 0x18 != G_ENDDL); } -#else -INCLUDE_ASM(s32, "a5dd0_len_114e0", mdl_local_gfx_update_vtx_pointers); -#endif void mdl_local_gfx_copy_vertices(Vtx* src, s32 num, Vtx* dest) { u32 i; diff --git a/src/battle/area_trd_part_2/actor/fake_bowser.c b/src/battle/area_trd_part_2/actor/fake_bowser.c index 0776765134..49615cc778 100644 --- a/src/battle/area_trd_part_2/actor/fake_bowser.c +++ b/src/battle/area_trd_part_2/actor/fake_bowser.c @@ -1351,13 +1351,13 @@ EvtScript N(handleEvent_8021E6F0) = { EVT_CASE_OR_EQ(EVENT_BURN_DEATH) EVT_CALL(func_8027D32C, ACTOR_SELF) EVT_IF_EQ(LVar0, EVENT_BURN_DEATH) - EVT_CALL(N(UnkFunc27), 0, EVT_PTR(N(D_8021A8FC_48BAEC)), 3) + EVT_CALL(N(UnkFunc27), 0, EVT_PTR(N(D_8021A8FC_48BAEC)), FOG_MODE_3) EVT_CALL(N(UnkFunc26), 3, 35, 35, 35, 0, 0, 0, 0, 0, 0) EVT_END_IF EVT_SET(ArrayVar(0), 2) EVT_WAIT(20) EVT_IF_EQ(LVar0, EVENT_BURN_DEATH) - EVT_CALL(N(UnkFunc27), 0, EVT_PTR(N(D_8021A8FC_48BAEC)), 0) + EVT_CALL(N(UnkFunc27), 0, EVT_PTR(N(D_8021A8FC_48BAEC)), FOG_MODE_0) EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) EVT_CALL(GetActorSize, ACTOR_SELF, LVar3, LVar4) EVT_DIVF(LVar3, EVT_FLOAT(2.0)) @@ -1385,12 +1385,12 @@ EvtScript N(handleEvent_8021E6F0) = { EVT_END_CASE_GROUP EVT_CASE_OR_EQ(EVENT_BURN_CONTACT) EVT_CASE_OR_EQ(EVENT_BURN_HIT) - EVT_CALL(N(UnkFunc27), 0, EVT_PTR(N(D_8021A8FC_48BAEC)), 3) + EVT_CALL(N(UnkFunc27), 0, EVT_PTR(N(D_8021A8FC_48BAEC)), FOG_MODE_3) EVT_CALL(N(UnkFunc26), 3, 35, 35, 35, 0, 0, 0, 0, 0, 0) EVT_SET(ArrayVar(0), 2) EVT_WAIT(20) EVT_SET(ArrayVar(0), 0) - EVT_CALL(N(UnkFunc27), 0, EVT_PTR(N(D_8021A8FC_48BAEC)), 0) + EVT_CALL(N(UnkFunc27), 0, EVT_PTR(N(D_8021A8FC_48BAEC)), FOG_MODE_0) EVT_CALL(GetActorPos, ACTOR_SELF, LVar0, LVar1, LVar2) EVT_CALL(GetActorSize, ACTOR_SELF, LVar3, LVar4) EVT_DIVF(LVar3, EVT_FLOAT(2.0)) diff --git a/src/battle/item/shooting_star.c b/src/battle/item/shooting_star.c index d4b0f524dd..2e5ffcd846 100644 --- a/src/battle/item/shooting_star.c +++ b/src/battle/item/shooting_star.c @@ -35,8 +35,8 @@ ApiStatus N(func_802A1444_71DBB4)(Evt* script, s32 isInitialCall) { s32 ret; if (isInitialCall) { - mdl_set_all_fog_mode(1); - *gBgRenderTypePtr = BACKGROUND_RENDER_TYPE_1; + mdl_set_all_fog_mode(FOG_MODE_1); + *gBackgroundFogModePtr = FOG_MODE_1; set_background_color_blend(0, 0, 0, 0); script->functionTemp[0] = 10; } diff --git a/src/battle/star/up_and_away/7952E0.c b/src/battle/star/up_and_away/7952E0.c index 20b841dc2b..b448790101 100644 --- a/src/battle/star/up_and_away/7952E0.c +++ b/src/battle/star/up_and_away/7952E0.c @@ -13,8 +13,8 @@ extern EntityModelScript D_80283EE8; ApiStatus func_802A1518_7957F8(Evt* script, s32 isInitialCall) { if (isInitialCall) { - mdl_set_all_fog_mode(1); - *gBgRenderTypePtr = BACKGROUND_RENDER_TYPE_1; + mdl_set_all_fog_mode(FOG_MODE_1); + *gBackgroundFogModePtr = FOG_MODE_1; set_background_color_blend(0, 0, 0, 0); script->functionTemp[0] = 200; } diff --git a/src/common/FadeBackgroundToBlack.inc.c b/src/common/FadeBackgroundToBlack.inc.c index 04ccbbbaab..a61ef9b874 100644 --- a/src/common/FadeBackgroundToBlack.inc.c +++ b/src/common/FadeBackgroundToBlack.inc.c @@ -4,8 +4,8 @@ ApiStatus N(FadeBackgroundToBlack)(Evt* script, s32 isInitialCall) { if (isInitialCall) { - mdl_set_all_fog_mode(1); - *gBgRenderTypePtr = BACKGROUND_RENDER_TYPE_1; + mdl_set_all_fog_mode(FOG_MODE_1); + *gBackgroundFogModePtr = FOG_MODE_1; set_background_color_blend(0, 0, 0, 0); script->functionTemp[0] = 20; } diff --git a/src/common/UnkBackgroundFunc2.inc.c b/src/common/UnkBackgroundFunc2.inc.c index a7d952b9df..bd19dcad94 100644 --- a/src/common/UnkBackgroundFunc2.inc.c +++ b/src/common/UnkBackgroundFunc2.inc.c @@ -3,8 +3,8 @@ ApiStatus N(UnkBackgroundFunc2)(Evt* script, s32 isInitialCall) { if (isInitialCall) { - mdl_set_all_fog_mode(1); - *gBgRenderTypePtr = BACKGROUND_RENDER_TYPE_1; + mdl_set_all_fog_mode(FOG_MODE_1); + *gBackgroundFogModePtr = FOG_MODE_1; set_background_color_blend(0, 0, 0, 0); script->functionTemp[0] = 0; } diff --git a/src/common/UnkBackgroundFunc3.inc.c b/src/common/UnkBackgroundFunc3.inc.c index dd130acdc5..87a797dcff 100644 --- a/src/common/UnkBackgroundFunc3.inc.c +++ b/src/common/UnkBackgroundFunc3.inc.c @@ -2,8 +2,8 @@ #include "model.h" ApiStatus N(UnkBackgroundFunc3)(Evt* script, s32 isInitialCall) { - mdl_set_all_fog_mode(1); - *gBgRenderTypePtr = BACKGROUND_RENDER_TYPE_1; + mdl_set_all_fog_mode(FOG_MODE_1); + *gBackgroundFogModePtr = FOG_MODE_1; set_background_color_blend(0, 0, 0, 0); return ApiStatus_DONE2; } diff --git a/src/dc470_len_14c0.c b/src/dc470_len_14c0.c index d7a8035319..cc5e67f67b 100644 --- a/src/dc470_len_14c0.c +++ b/src/dc470_len_14c0.c @@ -89,16 +89,16 @@ void appendGfx_background_texture(void) { fogA = gGameStatusPtr->backgroundDarkness; } - switch (*gBgRenderTypePtr) { - case BACKGROUND_RENDER_TYPE_0: - case BACKGROUND_RENDER_TYPE_1: + switch (*gBackgroundFogModePtr) { + case FOG_MODE_0: + case FOG_MODE_1: get_background_color_blend(&r1, &g1, &b1, &a1); if (a1 != 0) { flags |= 2; } break; - case BACKGROUND_RENDER_TYPE_2: - case BACKGROUND_RENDER_TYPE_3: + case FOG_MODE_2: + case FOG_MODE_3: default: get_model_env_color_parameters(&r1, &g1, &b1, &r2, &g2, &b2); if (!(r1 == 255 && g1 == 255 && b1 == 255 && r2 == 0 && g2 == 0 && b2 == 0)) { @@ -134,9 +134,9 @@ void appendGfx_background_texture(void) { } if (gGameStatusPtr->backgroundFlags & BACKGROUND_FLAG_FOG) { - switch (*gBgRenderTypePtr) { - case BACKGROUND_RENDER_TYPE_0: - case BACKGROUND_RENDER_TYPE_1: + switch (*gBackgroundFogModePtr) { + case FOG_MODE_0: + case FOG_MODE_1: if (fogA == 255) { for (i = 0; i < ARRAY_COUNT(gBackgroundPalette); i++) { gBackgroundPalette[i] = 1; @@ -151,8 +151,8 @@ void appendGfx_background_texture(void) { } } break; - case BACKGROUND_RENDER_TYPE_2: - case BACKGROUND_RENDER_TYPE_3: + case FOG_MODE_2: + case FOG_MODE_3: default: for (i = 0; i < ARRAY_COUNT(gBackgroundPalette); i++) { u16 palColor = gGameStatusPtr->backgroundPalette[i]; diff --git a/src/effects/floating_flower.c b/src/effects/floating_flower.c index 013b700e2c..09e7438a58 100644 --- a/src/effects/floating_flower.c +++ b/src/effects/floating_flower.c @@ -157,7 +157,7 @@ void floating_flower_appendGfx(void* effect) { gSPMatrix(gMasterGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_MUL | G_MTX_MODELVIEW); - if (*gBgRenderTypePtr == BACKGROUND_RENDER_TYPE_1) { + if (*gBackgroundFogModePtr == FOG_MODE_1) { shim_get_background_color_blend(&rgb, &rgb, &rgb, &a); alpha -= a; } diff --git a/src/effects/snowfall.c b/src/effects/snowfall.c index c438054179..fcde1f6af0 100644 --- a/src/effects/snowfall.c +++ b/src/effects/snowfall.c @@ -177,7 +177,7 @@ void snowfall_appendGfx(void* effect) { bgAlpha = 255; unk_2C = data->unk_2C; dlist = D_E008AA50[data->unk_04]; - if (*gBgRenderTypePtr == 1) { + if (*gBackgroundFogModePtr == 1) { shim_get_background_color_blend(&bgRGB, &bgRGB, &bgRGB, &bgAlpha); unk_28 = 255 - bgAlpha; } @@ -193,14 +193,14 @@ void snowfall_appendGfx(void* effect) { shim_guMtxF2L(sp18, &gDisplayContext->matrixStack[gMatrixListPos]); mtx = &gDisplayContext->matrixStack[gMatrixListPos++]; - + data++; for (i = 0; i < unk_2C; i++, data++) { if (data->unk_30 <= 0 && data->unk_28 != 0) { shim_guTranslateF(sp18, data->unk_08, data->unk_0C, data->unk_10); shim_guMtxF2L(sp18, &gDisplayContext->matrixStack[gMatrixListPos]); - gSPMatrix(gMasterGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], + gSPMatrix(gMasterGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_LOAD | G_MTX_MODELVIEW); gSPMatrix(gMasterGfxPos++, mtx, G_MTX_NOPUSH | G_MTX_MUL | G_MTX_MODELVIEW); diff --git a/src/encounter.c b/src/encounter.c index 79c3a7fedc..27fad9679d 100644 --- a/src/encounter.c +++ b/src/encounter.c @@ -237,8 +237,8 @@ ApiStatus ShowMerleeRanOutMessage(Evt* script, s32 isInitialCall) { ApiStatus FadeBackgroundToBlack(Evt* script, s32 isInitialCall) { if (isInitialCall) { - mdl_set_all_fog_mode(1); - *gBgRenderTypePtr = BACKGROUND_RENDER_TYPE_1; + mdl_set_all_fog_mode(FOG_MODE_1); + *gBackgroundFogModePtr = FOG_MODE_1; set_background_color_blend(0, 0, 0, 0); script->functionTemp[0] = 25; } diff --git a/src/evt/map_api.c b/src/evt/map_api.c index 7a5f43dfff..6e1070ba6e 100644 --- a/src/evt/map_api.c +++ b/src/evt/map_api.c @@ -210,7 +210,7 @@ ApiStatus SetGroupEnabled(Evt* script, s32 isInitialCall) { Bytecode var1 = evt_get_variable(script, *args++); Bytecode var2 = evt_get_variable(script, *args++); - func_8011B7C0(var1, 2, var2); + set_model_flags(var1, MODEL_FLAG_ENABLED, var2); return ApiStatus_DONE2; } diff --git a/src/world/area_dro/dro_01/dro_01_2_main.c b/src/world/area_dro/dro_01/dro_01_2_main.c index bdacee9716..19852e95dc 100644 --- a/src/world/area_dro/dro_01/dro_01_2_main.c +++ b/src/world/area_dro/dro_01/dro_01_2_main.c @@ -31,8 +31,8 @@ EvtScript N(EVS_Scene_RuinsRising) = { EVT_CALL(SetPanTarget, CAM_DEFAULT, 175, 0, -201) EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(N(UnkFunc27), 2, 0, 3) - EVT_CALL(N(UnkFunc27), 1, -1, 3) + EVT_CALL(N(UnkFunc27), 2, 0, FOG_MODE_3) + EVT_CALL(N(UnkFunc27), 1, -1, FOG_MODE_3) EVT_CALL(N(UnkFunc26), 3, 44, 32, 177, 0, 0, 0, 0, 0, 0) EVT_CALL(DisablePlayerInput, TRUE) EVT_THREAD diff --git a/src/world/area_dro/dro_02/dro_02_3_main.c b/src/world/area_dro/dro_02/dro_02_3_main.c index 053d122f05..8ca4f60792 100644 --- a/src/world/area_dro/dro_02/dro_02_3_main.c +++ b/src/world/area_dro/dro_02/dro_02_3_main.c @@ -26,8 +26,8 @@ EvtScript N(EVS_EnterMap) = { EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(13.0), EVT_FLOAT(-10.0)) EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(N(UnkFunc27), 2, 0, 3) - EVT_CALL(N(UnkFunc27), 1, -1, 3) + EVT_CALL(N(UnkFunc27), 2, 0, FOG_MODE_3) + EVT_CALL(N(UnkFunc27), 1, -1, FOG_MODE_3) EVT_CALL(N(UnkFunc26), 3, 44, 32, 177, 0, 0, 0, 0, 0, 0) EVT_CALL(DisablePlayerInput, TRUE) EVT_THREAD diff --git a/src/world/area_dro/dro_02/npc_merlee.c b/src/world/area_dro/dro_02/npc_merlee.c index 05c1cbb026..7cd567a0b3 100644 --- a/src/world/area_dro/dro_02/npc_merlee.c +++ b/src/world/area_dro/dro_02/npc_merlee.c @@ -112,8 +112,8 @@ API_CALLABLE(N(DarkenWorld)) { s32 i; if (isInitialCall) { - mdl_set_all_fog_mode(1); - *gBgRenderTypePtr = BACKGROUND_RENDER_TYPE_1; + mdl_set_all_fog_mode(FOG_MODE_1); + *gBackgroundFogModePtr = FOG_MODE_1; set_background_color_blend(0, 0, 0, 0); for (i = 0; i < MAX_NPCS; i++) { @@ -151,8 +151,8 @@ API_CALLABLE(N(UndarkenWorld)) { if (script->functionTemp[0] == 0 && script->functionTemp[1] == 0) { script->functionTemp[1] = 1; } else if (script->functionTemp[1] == 1) { - mdl_set_all_fog_mode(0); - *gBgRenderTypePtr = BACKGROUND_RENDER_TYPE_0; + mdl_set_all_fog_mode(FOG_MODE_0); + *gBackgroundFogModePtr = FOG_MODE_0; for (i = 0; i < MAX_NPCS; i++) { Npc* npc = get_npc_by_index(i); diff --git a/src/world/area_end/end_01/end_01_6_shyguy_float.c b/src/world/area_end/end_01/end_01_6_shyguy_float.c index b4713021db..c278cc11d6 100644 --- a/src/world/area_end/end_01/end_01_6_shyguy_float.c +++ b/src/world/area_end/end_01/end_01_6_shyguy_float.c @@ -32,7 +32,7 @@ EvtScript N(EVS_TexPan_ShyGuyFloat_Top) = { s32 N(ShyGuyFloat_InteriorModels)[] = { MODEL_omo7, MODEL_omo9, MODEL_omo10, MODEL_omo11, - MODEL_omo12, MODEL_omo13, MODEL_omo14, 0x0000FFFF + MODEL_omo12, MODEL_omo13, MODEL_omo14, 0x0000FFFF }; EvtScript N(EVS_ShyGuyFloat_Open) = { @@ -58,7 +58,7 @@ EvtScript N(EVS_ShyGuyFloat_Open) = { EVT_END_IF EVT_END_LOOP EVT_END_THREAD - EVT_CALL(N(UnkFunc27), 0, EVT_PTR(N(ShyGuyFloat_InteriorModels)), 3) + EVT_CALL(N(UnkFunc27), 0, EVT_PTR(N(ShyGuyFloat_InteriorModels)), FOG_MODE_3) EVT_CALL(N(UnkFunc26), 3, 255, 255, 255, 120, 120, 80, 0, 0, 0) EVT_WAIT(30) EVT_CALL(N(UnkFunc26), 3, 255, 255, 255, 0, 0, 0, 0, 0, 0) diff --git a/src/world/area_hos/hos_05/A2AAC0.c b/src/world/area_hos/hos_05/A2AAC0.c index 6afa7678d3..4abfcc333c 100644 --- a/src/world/area_hos/hos_05/A2AAC0.c +++ b/src/world/area_hos/hos_05/A2AAC0.c @@ -211,7 +211,7 @@ ApiStatus func_80240DF8_A2B038(Evt* script, s32 isInitialCall) { } ApiStatus func_80240E30_A2B070(Evt* script, s32 isInitialCall) { - mdl_set_all_fog_mode(3); + mdl_set_all_fog_mode(FOG_MODE_3); return ApiStatus_DONE2; } diff --git a/src/world/area_hos/hos_06/A3A230.c b/src/world/area_hos/hos_06/A3A230.c index 33281ecfeb..4da12c6083 100644 --- a/src/world/area_hos/hos_06/A3A230.c +++ b/src/world/area_hos/hos_06/A3A230.c @@ -268,13 +268,13 @@ ApiStatus func_802418A4_A3AD84(Evt* script, s32 isInitialCall) { ApiStatus func_802418E8_A3ADC8(Evt* script, s32 isInitialCall) { if (isInitialCall) { - set_mdl_custom_gfx_set(get_model_from_list_index(get_model_list_index_from_tree_index(0x79)), -1, 3); - set_mdl_custom_gfx_set(get_model_from_list_index(get_model_list_index_from_tree_index(0x7A)), -1, 3); - set_mdl_custom_gfx_set(get_model_from_list_index(get_model_list_index_from_tree_index(0x7B)), -1, 3); - set_mdl_custom_gfx_set(get_model_from_list_index(get_model_list_index_from_tree_index(0x7C)), -1, 3); - set_mdl_custom_gfx_set(get_model_from_list_index(get_model_list_index_from_tree_index(0x7D)), -1, 3); - set_mdl_custom_gfx_set(get_model_from_list_index(get_model_list_index_from_tree_index(0x7F)), -1, 3); - set_mdl_custom_gfx_set(get_model_from_list_index(get_model_list_index_from_tree_index(0xD0)), -1, 3); + set_mdl_custom_gfx_set(get_model_from_list_index(get_model_list_index_from_tree_index(0x79)), -1, FOG_MODE_3); + set_mdl_custom_gfx_set(get_model_from_list_index(get_model_list_index_from_tree_index(0x7A)), -1, FOG_MODE_3); + set_mdl_custom_gfx_set(get_model_from_list_index(get_model_list_index_from_tree_index(0x7B)), -1, FOG_MODE_3); + set_mdl_custom_gfx_set(get_model_from_list_index(get_model_list_index_from_tree_index(0x7C)), -1, FOG_MODE_3); + set_mdl_custom_gfx_set(get_model_from_list_index(get_model_list_index_from_tree_index(0x7D)), -1, FOG_MODE_3); + set_mdl_custom_gfx_set(get_model_from_list_index(get_model_list_index_from_tree_index(0x7F)), -1, FOG_MODE_3); + set_mdl_custom_gfx_set(get_model_from_list_index(get_model_list_index_from_tree_index(0xD0)), -1, FOG_MODE_3); set_model_env_color_parameters(255, 255, 255, 0, 0, 0); script->functionTemp[0] = 255; } @@ -340,13 +340,13 @@ ApiStatus func_80241B74_A3B054(Evt* script, s32 isInitialCall) { set_model_env_color_parameters(script->functionTemp[0], script->functionTemp[0], script->functionTemp[0], 0, 0, 0); if (script->functionTemp[0] == 255) { - set_mdl_custom_gfx_set(get_model_from_list_index(get_model_list_index_from_tree_index(0x79)), -1, 0); - set_mdl_custom_gfx_set(get_model_from_list_index(get_model_list_index_from_tree_index(0x7A)), -1, 0); - set_mdl_custom_gfx_set(get_model_from_list_index(get_model_list_index_from_tree_index(0x7B)), -1, 0); - set_mdl_custom_gfx_set(get_model_from_list_index(get_model_list_index_from_tree_index(0x7C)), -1, 0); - set_mdl_custom_gfx_set(get_model_from_list_index(get_model_list_index_from_tree_index(0x7D)), -1, 0); - set_mdl_custom_gfx_set(get_model_from_list_index(get_model_list_index_from_tree_index(0x7F)), -1, 0); - set_mdl_custom_gfx_set(get_model_from_list_index(get_model_list_index_from_tree_index(0xD0)), -1, 0); + set_mdl_custom_gfx_set(get_model_from_list_index(get_model_list_index_from_tree_index(0x79)), -1, FOG_MODE_0); + set_mdl_custom_gfx_set(get_model_from_list_index(get_model_list_index_from_tree_index(0x7A)), -1, FOG_MODE_0); + set_mdl_custom_gfx_set(get_model_from_list_index(get_model_list_index_from_tree_index(0x7B)), -1, FOG_MODE_0); + set_mdl_custom_gfx_set(get_model_from_list_index(get_model_list_index_from_tree_index(0x7C)), -1, FOG_MODE_0); + set_mdl_custom_gfx_set(get_model_from_list_index(get_model_list_index_from_tree_index(0x7D)), -1, FOG_MODE_0); + set_mdl_custom_gfx_set(get_model_from_list_index(get_model_list_index_from_tree_index(0x7F)), -1, FOG_MODE_0); + set_mdl_custom_gfx_set(get_model_from_list_index(get_model_list_index_from_tree_index(0xD0)), -1, FOG_MODE_0); return ApiStatus_DONE2; } return ApiStatus_BLOCK; diff --git a/src/world/area_isk/isk_16/isk_16_3_boss.c b/src/world/area_isk/isk_16/isk_16_3_boss.c index b9b3388d9c..4338015b88 100644 --- a/src/world/area_isk/isk_16/isk_16_3_boss.c +++ b/src/world/area_isk/isk_16/isk_16_3_boss.c @@ -5,8 +5,8 @@ EvtScript N(EVS_Scene_TutankoopaAppears) = { EVT_CALL(DisablePlayerInput, TRUE) EVT_CALL(DisablePartnerAI, 0) - EVT_CALL(N(UnkFunc27), 0, -1, 1) - EVT_CALL(N(UnkFunc27), 2, 0, 1) + EVT_CALL(N(UnkFunc27), 0, -1, FOG_MODE_1) + EVT_CALL(N(UnkFunc27), 2, 0, FOG_MODE_1) EVT_CALL(N(UnkFunc26), 1, 0, 0, 0, 255, 0, 0, 0, 0, 0) EVT_CALL(UseSettingsFrom, CAM_DEFAULT, 410, -910, 410) EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(300.0)) diff --git a/src/world/area_jan/jan_02/B2C4A0.c b/src/world/area_jan/jan_02/B2C4A0.c index 4a2227464d..1b2d7319f0 100644 --- a/src/world/area_jan/jan_02/B2C4A0.c +++ b/src/world/area_jan/jan_02/B2C4A0.c @@ -17,12 +17,12 @@ ApiStatus func_80240360_B2C7D0(Evt* script, s32 isInitialCall) { if (D_80242BD8_B2F048 != 0) { if (currentFloor == COLLIDER_o327 || currentFloor == COLLIDER_o330) { - func_8011B7C0(MODEL_g70, 2, 0); + set_model_flags(MODEL_g70, MODEL_FLAG_ENABLED, 0); D_80242BD8_B2F048 = 0; } } else { if (currentFloor == COLLIDER_o319 || currentFloor == COLLIDER_o316) { - func_8011B7C0(MODEL_g70, 2, 1); + set_model_flags(MODEL_g70, MODEL_FLAG_ENABLED, 1); D_80242BD8_B2F048 = 1; } } diff --git a/src/world/area_kmr/kmr_00/kmr_00_3_revival.c b/src/world/area_kmr/kmr_00/kmr_00_3_revival.c index d7c6f0ac9d..c202304643 100644 --- a/src/world/area_kmr/kmr_00/kmr_00_3_revival.c +++ b/src/world/area_kmr/kmr_00/kmr_00_3_revival.c @@ -43,8 +43,8 @@ API_CALLABLE(N(func_80240000_8ABF90)) { } API_CALLABLE(N(func_80240388_8AC318)) { - mdl_set_all_fog_mode(3); - *gBgRenderTypePtr = BACKGROUND_RENDER_TYPE_3; + mdl_set_all_fog_mode(FOG_MODE_3); + *gBackgroundFogModePtr = FOG_MODE_3; return ApiStatus_DONE2; } diff --git a/src/world/area_kmr/kmr_02/kmr_02_3_npc.c b/src/world/area_kmr/kmr_02/kmr_02_3_npc.c index 7dd9a837e7..a9e292006b 100644 --- a/src/world/area_kmr/kmr_02/kmr_02_3_npc.c +++ b/src/world/area_kmr/kmr_02/kmr_02_3_npc.c @@ -1322,7 +1322,7 @@ EvtScript N(EVS_NpcAux_Kammy) = { s32 N(KammyHoverOffsets)[] = { 1, 2, 3, 2, 1, - -1, -2, -3, -2, -1, + -1, -2, -3, -2, -1, }; EvtScript N(EVS_NpcIdle_Kammy) = { @@ -1393,7 +1393,7 @@ INCLUDE_ASM(s32, "world/area_kmr/kmr_02/8B0070", func_8024295C_8B29CC); #endif API_CALLABLE(N(func_80242BA8_8B2C18)) { - *gBgRenderTypePtr = 1; + *gBackgroundFogModePtr = 1; return ApiStatus_DONE2; } @@ -1436,7 +1436,7 @@ API_CALLABLE(N(func_80242BC0_8B2C30)) { } API_CALLABLE(N(func_80242F08_8B2F78)) { - mdl_set_all_fog_mode(3); + mdl_set_all_fog_mode(FOG_MODE_3); return ApiStatus_DONE2; } diff --git a/src/world/area_kzn/kzn_06/kzn_06_3_extra.c b/src/world/area_kzn/kzn_06/kzn_06_3_extra.c index 21e798b5d4..94a9c53d6a 100644 --- a/src/world/area_kzn/kzn_06/kzn_06_3_extra.c +++ b/src/world/area_kzn/kzn_06/kzn_06_3_extra.c @@ -11,7 +11,7 @@ API_CALLABLE(N(AdjustFog)) { s32 duration; s32 mode; s32 i; - + modelIDs = (ModelIDList*) evt_get_variable(script, *args++); colR = evt_get_variable(script, *args++); colG = evt_get_variable(script, *args++); @@ -19,19 +19,19 @@ API_CALLABLE(N(AdjustFog)) { duration = evt_get_variable(script, *args++); mode = evt_get_variable(script, *args++); iterList = modelIDs; - + if (isInitialCall) { for (i = 0; i < iterList->count; i++) { s32 treeIndex = get_model_list_index_from_tree_index(iterList->list[i]); Model* mdl = get_model_from_list_index(treeIndex); - set_mdl_custom_gfx_set(mdl, -1, 3); + set_mdl_custom_gfx_set(mdl, -1, FOG_MODE_3); if (mode) { mdl->flags &= ~MODEL_FLAG_ENABLED; } } script->functionTemp[0] = duration; } - + if (mode) { set_background_color_blend(colR, colG, colB, (script->functionTemp[0] * 255) / duration); @@ -39,13 +39,13 @@ API_CALLABLE(N(AdjustFog)) { set_background_color_blend(colR, colG, colB, 255 - ((script->functionTemp[0] * 255) / duration)); } - + script->functionTemp[0]--; if (script->functionTemp[0] < 0) { for (i = 0; i < iterList->count; i++) { s32 treeIndex = get_model_list_index_from_tree_index(iterList->list[i]); Model* mdl = get_model_from_list_index(treeIndex); - set_mdl_custom_gfx_set(mdl, -1, 0); + set_mdl_custom_gfx_set(mdl, -1, FOG_MODE_0); if (!mode) { mdl->flags |= MODEL_FLAG_ENABLED; } diff --git a/src/world/area_mac/mac_00/npc/dojo_members.inc.c b/src/world/area_mac/mac_00/npc/dojo_members.inc.c index 8ee93ace97..dbb01aa499 100644 --- a/src/world/area_mac/mac_00/npc/dojo_members.inc.c +++ b/src/world/area_mac/mac_00/npc/dojo_members.inc.c @@ -3,7 +3,7 @@ s32 N(DojoBattleIDs)[] = { BTL_MAC_FORMATION_01, BTL_MAC_FORMATION_02, BTL_MAC_FORMATION_03, - BTL_MAC_FORMATION_04 + BTL_MAC_FORMATION_04 }; ApiStatus N(SetDojoBattle)(Evt* script, s32 isInitialCall) { @@ -15,7 +15,7 @@ ApiStatus N(SetDojoBattle)(Evt* script, s32 isInitialCall) { } API_CALLABLE(N(ResetBackgroundPostBattle)) { - func_8011B950(MODEL_minka_1, -1, 1, 1); + func_8011B950(MODEL_minka_1, -1, FOG_MODE_1, 1); set_background_color_blend(0, 0, 0, 255); gCameras[CAM_DEFAULT].bgColor[0] = 0; gCameras[CAM_DEFAULT].bgColor[1] = 0; diff --git a/src/world/area_mac/mac_01/mac_01_9_npc.c b/src/world/area_mac/mac_01/mac_01_9_npc.c index bac2353e8a..a285e9b1be 100644 --- a/src/world/area_mac/mac_01/mac_01_9_npc.c +++ b/src/world/area_mac/mac_01/mac_01_9_npc.c @@ -260,7 +260,7 @@ API_CALLABLE(N(func_802448A0_805120)) { if (isInitialCall) { if (script->varTable[0] == 0) { - func_8011B950(script->varTable[15], -1, 1, 1); + func_8011B950(script->varTable[15], -1, FOG_MODE_1, 1); } script->functionTemp[0] = 0; } @@ -283,7 +283,7 @@ API_CALLABLE(N(func_802448A0_805120)) { if (script->functionTemp[0] >= 255) { if (script->varTable[0] == 3) { - func_8011B950(script->varTable[15], -1, 0, 1); + func_8011B950(script->varTable[15], -1, FOG_MODE_0, 1); } return ApiStatus_DONE2; } diff --git a/src/world/area_mac/mac_01/npc/read_fortune.inc.c b/src/world/area_mac/mac_01/npc/read_fortune.inc.c index 6e6c4fcbbb..73e9eb8dac 100644 --- a/src/world/area_mac/mac_01/npc/read_fortune.inc.c +++ b/src/world/area_mac/mac_01/npc/read_fortune.inc.c @@ -1,8 +1,8 @@ API_CALLABLE(N(func_802440FC_80497C)) { if (isInitialCall) { - set_mdl_custom_gfx_set(get_model_from_list_index(get_model_list_index_from_tree_index(MODEL_o283)), -1, 3); - set_mdl_custom_gfx_set(get_model_from_list_index(get_model_list_index_from_tree_index(MODEL_o279)), -1, 3); - set_mdl_custom_gfx_set(get_model_from_list_index(get_model_list_index_from_tree_index(MODEL_dr_yuka)), -1, 3); + set_mdl_custom_gfx_set(get_model_from_list_index(get_model_list_index_from_tree_index(MODEL_o283)), -1, FOG_MODE_3); + set_mdl_custom_gfx_set(get_model_from_list_index(get_model_list_index_from_tree_index(MODEL_o279)), -1, FOG_MODE_3); + set_mdl_custom_gfx_set(get_model_from_list_index(get_model_list_index_from_tree_index(MODEL_dr_yuka)), -1, FOG_MODE_3); set_model_env_color_parameters(255, 255, 255, 0, 0, 0); script->functionTemp[0] = 255; } @@ -65,9 +65,9 @@ API_CALLABLE(N(func_80244308_804B88)) { } set_model_env_color_parameters(script->functionTemp[0], script->functionTemp[0], script->functionTemp[0], 0, 0, 0); if (script->functionTemp[0] == 255) { - set_mdl_custom_gfx_set(get_model_from_list_index(get_model_list_index_from_tree_index(MODEL_o283)), -1, 0); - set_mdl_custom_gfx_set(get_model_from_list_index(get_model_list_index_from_tree_index(MODEL_o279)), -1, 0); - set_mdl_custom_gfx_set(get_model_from_list_index(get_model_list_index_from_tree_index(MODEL_dr_yuka)), -1, 0); + set_mdl_custom_gfx_set(get_model_from_list_index(get_model_list_index_from_tree_index(MODEL_o283)), -1, FOG_MODE_0); + set_mdl_custom_gfx_set(get_model_from_list_index(get_model_list_index_from_tree_index(MODEL_o279)), -1, FOG_MODE_0); + set_mdl_custom_gfx_set(get_model_from_list_index(get_model_list_index_from_tree_index(MODEL_dr_yuka)), -1, FOG_MODE_0); return ApiStatus_DONE2; } return ApiStatus_BLOCK; diff --git a/src/world/area_mac/mac_02/mac_02_3_rooms.c b/src/world/area_mac/mac_02/mac_02_3_rooms.c index ab87f8e728..4e97db02cf 100644 --- a/src/world/area_mac/mac_02/mac_02_3_rooms.c +++ b/src/world/area_mac/mac_02/mac_02_3_rooms.c @@ -5,7 +5,7 @@ API_CALLABLE(N(InitEntryFromTunnels)) { Npc* npc; s32 i; - func_8011B950(MODEL_souko, -1, 1, 1); + func_8011B950(MODEL_souko, -1, FOG_MODE_1, 1); set_background_color_blend(0, 0, 0, 255); gCameras[CAM_DEFAULT].bgColor[0] = 0; gCameras[CAM_DEFAULT].bgColor[1] = 0; diff --git a/src/world/area_mac/mac_04/mac_04_2_main.c b/src/world/area_mac/mac_04/mac_04_2_main.c index f064f79daf..37f6de40ec 100644 --- a/src/world/area_mac/mac_04/mac_04_2_main.c +++ b/src/world/area_mac/mac_04/mac_04_2_main.c @@ -18,7 +18,7 @@ API_CALLABLE(N(SetNightFogParams)) { } API_CALLABLE(N(SetNightFogMode)) { - mdl_set_all_fog_mode(3); + mdl_set_all_fog_mode(FOG_MODE_3); return ApiStatus_DONE2; } diff --git a/src/world/area_mac/mac_04/mac_04_3_rooms.c b/src/world/area_mac/mac_04/mac_04_3_rooms.c index db644992c7..d22419778a 100644 --- a/src/world/area_mac/mac_04/mac_04_3_rooms.c +++ b/src/world/area_mac/mac_04/mac_04_3_rooms.c @@ -3,7 +3,7 @@ s32 set_background_color_blend(s32, s32, s32, s32); API_CALLABLE(N(InitEntryFromToybox)) { - func_8011B950(MODEL_heiho_house, -1, 1, 1); + func_8011B950(MODEL_heiho_house, -1, FOG_MODE_1, 1); set_background_color_blend(0, 0, 0, 255); gCameras[CAM_DEFAULT].bgColor[0] = 0; gCameras[CAM_DEFAULT].bgColor[1] = 0; diff --git a/src/world/area_osr/osr_00/osr_00_5_scenes.c b/src/world/area_osr/osr_00/osr_00_5_scenes.c index a1c74e4592..1a08d828d7 100644 --- a/src/world/area_osr/osr_00/osr_00_5_scenes.c +++ b/src/world/area_osr/osr_00/osr_00_5_scenes.c @@ -31,7 +31,7 @@ API_CALLABLE(N(func_802406E0_AACF10)) { dma_copy(romStart + (s32)rasterOffset, romStart + (s32)rasterOffset + sizeof(N(PeachLetterImg)), &N(PeachLetterImg)); dma_copy(romStart + (s32)paletteOffset, romStart + (s32)paletteOffset + sizeof(N(PeachLetterPal)), &N(PeachLetterPal)); - + N(MsgImage).raster = N(PeachLetterImg); N(MsgImage).palette = N(PeachLetterPal); N(MsgImage).width = charset_peach_letter_png_width; @@ -50,8 +50,8 @@ EvtScript N(EVS_Scene_ShowInvitation) = { EVT_CALL(SetCamDistance, CAM_DEFAULT, 775) EVT_CALL(SetCamPitch, CAM_DEFAULT, 20, -19) EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(N(UnkFunc27), 2, 0, 3) - EVT_CALL(N(UnkFunc27), 1, -1, 3) + EVT_CALL(N(UnkFunc27), 2, 0, FOG_MODE_3) + EVT_CALL(N(UnkFunc27), 1, -1, FOG_MODE_3) EVT_CALL(N(func_80240678_AACEA8), 200, 200, 200, 40, 40, 40) EVT_CALL(N(func_802406E0_AACF10)) EVT_WAIT(15) diff --git a/src/world/area_sam/sam_06/D203E0.c b/src/world/area_sam/sam_06/D203E0.c index c8e837fac0..0207e5497f 100644 --- a/src/world/area_sam/sam_06/D203E0.c +++ b/src/world/area_sam/sam_06/D203E0.c @@ -75,7 +75,7 @@ ApiStatus func_80242538_D223C8(Evt* script, s32 isInitialCall) { if (isInitialCall) { if (script->varTable[0] == 0) { - func_8011B950(script->varTable[15], -1, 1, 1); + func_8011B950(script->varTable[15], -1, FOG_MODE_1, 1); } script->functionTemp[0] = 0; } @@ -98,7 +98,7 @@ ApiStatus func_80242538_D223C8(Evt* script, s32 isInitialCall) { if (script->functionTemp[0] >= 255) { if (script->varTable[0] == 3) { - func_8011B950(script->varTable[15], -1, 0, 1); + func_8011B950(script->varTable[15], -1, FOG_MODE_0, 1); } return ApiStatus_DONE2; } diff --git a/src/world/area_sam/sam_11/D3A930.c b/src/world/area_sam/sam_11/D3A930.c index 4922361ffe..52adf6b4ec 100644 --- a/src/world/area_sam/sam_11/D3A930.c +++ b/src/world/area_sam/sam_11/D3A930.c @@ -12,7 +12,7 @@ ApiStatus func_80240360_D3A930(Evt* script, s32 isInitialCall) { s32 temp_a2; if (isInitialCall) { - func_8011B950(script->varTable[1], -1, 1, 1); + func_8011B950(script->varTable[1], -1, FOG_MODE_1, 1); script->functionTemp[0] = 0; get_background_color_blend(&r, &g, &b, &a); if ((script->varTable[0] == 0 && a == 255) || (script->varTable[0] == 1 && a == 0)) { @@ -40,7 +40,7 @@ ApiStatus func_80240360_D3A930(Evt* script, s32 isInitialCall) { gCameras[CAM_DEFAULT].bgColor[2] = b; if (script->functionTemp[0] >= 255) { if (script->varTable[0] == 1) { - func_8011B950(script->varTable[1], -1, 0, 1); + func_8011B950(script->varTable[1], -1, FOG_MODE_0, 1); } return ApiStatus_DONE2; diff --git a/src/world/area_sbk/sbk_02/sbk_02_3_ruins.c b/src/world/area_sbk/sbk_02/sbk_02_3_ruins.c index b14a940bb8..132437955d 100644 --- a/src/world/area_sbk/sbk_02/sbk_02_3_ruins.c +++ b/src/world/area_sbk/sbk_02/sbk_02_3_ruins.c @@ -93,10 +93,10 @@ s32 N(ModelList_Translucent)[] = { }; EvtScript N(EVS_DarkenEnvironment) = { - EVT_CALL(N(UnkFunc27), 2, 0, 3) - EVT_CALL(N(UnkFunc27), 1, -1, 3) - EVT_CALL(N(UnkFunc27), 1, EVT_PTR(N(ModelList_Solid)), 0) - EVT_CALL(N(UnkFunc27), 0, EVT_PTR(N(ModelList_Translucent)), 0) + EVT_CALL(N(UnkFunc27), 2, 0, FOG_MODE_3) + EVT_CALL(N(UnkFunc27), 1, -1, FOG_MODE_3) + EVT_CALL(N(UnkFunc27), 1, EVT_PTR(N(ModelList_Solid)), FOG_MODE_0) + EVT_CALL(N(UnkFunc27), 0, EVT_PTR(N(ModelList_Translucent)), FOG_MODE_0) EVT_CALL(N(InterpWorldEnvColor), 255, 255, 255, 0, 0, 0, 0) EVT_WAIT(1) EVT_CALL(N(InterpWorldEnvColor), 44, 32, 177, 0, 0, 0, 60) @@ -695,10 +695,10 @@ EvtScript N(EVS_Ruins_Arise_Continued) = { EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(500.0)) EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(N(UnkFunc27), 2, 0, 3) - EVT_CALL(N(UnkFunc27), 1, -1, 3) - EVT_CALL(N(UnkFunc27), 1, EVT_PTR(N(ModelList_Solid)), 0) - EVT_CALL(N(UnkFunc27), 0, EVT_PTR(N(ModelList_Translucent)), 0) + EVT_CALL(N(UnkFunc27), 2, 0, FOG_MODE_3) + EVT_CALL(N(UnkFunc27), 1, -1, FOG_MODE_3) + EVT_CALL(N(UnkFunc27), 1, EVT_PTR(N(ModelList_Solid)), FOG_MODE_0) + EVT_CALL(N(UnkFunc27), 0, EVT_PTR(N(ModelList_Translucent)), FOG_MODE_0) EVT_CALL(N(InterpWorldEnvColor), 44, 32, 177, 0, 0, 0, 0) EVT_EXEC(N(EVS_Ruins_FinishRising)) EVT_EXEC(N(EVS_Steps_FinishRising)) diff --git a/src/world/area_sbk/sbk_30/sbk_30_2_main.c b/src/world/area_sbk/sbk_30/sbk_30_2_main.c index 7b8547a06c..59e0243813 100644 --- a/src/world/area_sbk/sbk_30/sbk_30_2_main.c +++ b/src/world/area_sbk/sbk_30/sbk_30_2_main.c @@ -44,8 +44,8 @@ EvtScript N(EVS_Scene_RuinsRising) = { EVT_CALL(SetPanTarget, CAM_DEFAULT, 193, 0, -237) EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0)) EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1) - EVT_CALL(N(UnkFunc27), 2, 0, 3) - EVT_CALL(N(UnkFunc27), 1, -1, 3) + EVT_CALL(N(UnkFunc27), 2, 0, FOG_MODE_3) + EVT_CALL(N(UnkFunc27), 1, -1, FOG_MODE_3) EVT_CALL(N(UnkFunc26), 3, 44, 32, 177, 0, 0, 0, 0, 0, 0) EVT_CALL(DisablePlayerInput, TRUE) EVT_THREAD diff --git a/src/world/common/atomic/LavaGlowLighting.inc.c b/src/world/common/atomic/LavaGlowLighting.inc.c index 311ec4450b..1b7e5c1678 100644 --- a/src/world/common/atomic/LavaGlowLighting.inc.c +++ b/src/world/common/atomic/LavaGlowLighting.inc.c @@ -33,14 +33,14 @@ ApiStatus N(ApplyLavaGlowLighting)(Evt* script, s32 isInitialCall) { for (i = 0; i < modelIDs->count; i++, idList++) { s32 treeIndex = get_model_list_index_from_tree_index(*idList); Model* mdl = get_model_from_list_index(treeIndex); - set_mdl_custom_gfx_set(mdl, -1, 2); + set_mdl_custom_gfx_set(mdl, -1, FOG_MODE_2); } } else { // list is NULL -> apply effect to ALL models Model** models = (Model**) gCurrentModels; for (i = 0; i < MAX_MODELS; i++, models++) { if (*models != NULL) { - set_mdl_custom_gfx_set(*models, -1, 2); + set_mdl_custom_gfx_set(*models, -1, FOG_MODE_2); } } } @@ -98,14 +98,14 @@ ApiStatus N(ClearLavaGlowLighting)(Evt* script, s32 isInitialCall) { for (i = 0; i < modelIDs->count; i++, idList++) { s32 treeIndex = get_model_list_index_from_tree_index(*idList); Model* mdl = get_model_from_list_index(treeIndex); - set_mdl_custom_gfx_set(mdl, -1, 0); + set_mdl_custom_gfx_set(mdl, -1, FOG_MODE_0); } } else { // list is NULL -> clear effect from ALL models Model** models = (Model**) gCurrentModels; for (i = 0; i < MAX_MODELS; i++, models++) { if (*models != NULL) { - set_mdl_custom_gfx_set(*models, -1, 0); + set_mdl_custom_gfx_set(*models, -1, FOG_MODE_0); } } } diff --git a/src/world/common/atomic/Quizmo.inc.c b/src/world/common/atomic/Quizmo.inc.c index 4f4076f990..daa4116470 100644 --- a/src/world/common/atomic/Quizmo.inc.c +++ b/src/world/common/atomic/Quizmo.inc.c @@ -136,8 +136,8 @@ ApiStatus N(Quizmo_HideWorld)(Evt* script, s32 isInitialCall) { if (isInitialCall) { s32 i; - mdl_set_all_fog_mode(1); - *gBgRenderTypePtr = BACKGROUND_RENDER_TYPE_1; + mdl_set_all_fog_mode(FOG_MODE_1); + *gBackgroundFogModePtr = FOG_MODE_1; set_background_color_blend(0, 0, 0, 0); for (i = 0; i < MAX_NPCS; i++) { @@ -191,8 +191,8 @@ ApiStatus N(Quizmo_FadeInWorld)(Evt* script, s32 isInitialCall) { if (script->functionTemp[0] == 0 && script->functionTemp[1] == 0) { script->functionTemp[1] = 1; } else if (script->functionTemp[1] == 1) { - mdl_set_all_fog_mode(0); - *gBgRenderTypePtr = BACKGROUND_RENDER_TYPE_0; + mdl_set_all_fog_mode(FOG_MODE_0); + *gBackgroundFogModePtr = FOG_MODE_0; for (i = 0; i < MAX_NPCS; i++) { Npc* npc = get_npc_by_index(i); diff --git a/src/world/common/atomic/UnkFunc27.inc.c b/src/world/common/atomic/UnkFunc27.inc.c index 95334baaf7..7708fb575e 100644 --- a/src/world/common/atomic/UnkFunc27.inc.c +++ b/src/world/common/atomic/UnkFunc27.inc.c @@ -6,13 +6,13 @@ API_CALLABLE(N(UnkFunc27)) { Bytecode* args = script->ptrReadPos; s32 mode = evt_get_variable(script, *args++); s32 testS0 = evt_get_variable(script, *args++); - s32 testS1 = evt_get_variable(script, *args++); + s32 fogType = evt_get_variable(script, *args++); s32* modelIDList = (s32*) testS0; s32 listIndex; Model* mdl; if (modelIDList == PTR_LIST_END) { - mdl_set_all_fog_mode(testS1); + mdl_set_all_fog_mode(fogType); return ApiStatus_DONE2; } @@ -24,7 +24,7 @@ API_CALLABLE(N(UnkFunc27)) { } listIndex = get_model_list_index_from_tree_index(*modelIDList); mdl = get_model_from_list_index(listIndex); - set_mdl_custom_gfx_set(mdl, -1, testS1); + set_mdl_custom_gfx_set(mdl, -1, fogType); modelIDList++; }; break; @@ -34,13 +34,13 @@ API_CALLABLE(N(UnkFunc27)) { if (*modelIDList == 0xFFFF) { break; } - func_8011B950(*modelIDList, -1, testS1, 0); + func_8011B950(*modelIDList, -1, fogType, 0); modelIDList++; }; break; case 2: - *gBgRenderTypePtr = testS1; + *gBackgroundFogModePtr = fogType; break; } diff --git a/src/world/common/complete/Quizmo.inc.c b/src/world/common/complete/Quizmo.inc.c index bb59873f12..5f09e45ca8 100644 --- a/src/world/common/complete/Quizmo.inc.c +++ b/src/world/common/complete/Quizmo.inc.c @@ -216,8 +216,8 @@ API_CALLABLE(N(Quizmo_HideWorld)) { if (isInitialCall) { s32 i; - mdl_set_all_fog_mode(1); - *gBgRenderTypePtr = BACKGROUND_RENDER_TYPE_1; + mdl_set_all_fog_mode(FOG_MODE_1); + *gBackgroundFogModePtr = FOG_MODE_1; set_background_color_blend(0, 0, 0, 0); for (i = 0; i < MAX_NPCS; i++) { @@ -271,8 +271,8 @@ API_CALLABLE(N(Quizmo_FadeInWorld)) { if (script->functionTemp[0] == 0 && script->functionTemp[1] == 0) { script->functionTemp[1] = 1; } else if (script->functionTemp[1] == 1) { - mdl_set_all_fog_mode(0); - *gBgRenderTypePtr = BACKGROUND_RENDER_TYPE_0; + mdl_set_all_fog_mode(FOG_MODE_0); + *gBackgroundFogModePtr = FOG_MODE_0; for (i = 0; i < MAX_NPCS; i++) { Npc* npc = get_npc_by_index(i); diff --git a/src/world/script_api/7E2AA0.c b/src/world/script_api/7E2AA0.c index 9dc3f1b391..06e705a0be 100644 --- a/src/world/script_api/7E2AA0.c +++ b/src/world/script_api/7E2AA0.c @@ -230,7 +230,7 @@ ApiStatus func_80282414(Evt* script, s32 isInitialCall) { if (isInitialCall) { if (script->varTable[0] == 0) { - func_8011B950(script->varTable[15], -1, 1, 1); + func_8011B950(script->varTable[15], -1, FOG_MODE_1, 1); } script->functionTemp[1] = 0; } @@ -253,7 +253,7 @@ ApiStatus func_80282414(Evt* script, s32 isInitialCall) { if (script->functionTemp[1] >= 255) { if (script->varTable[0] == 3) { - func_8011B950(script->varTable[15], -1, 0, 1); + func_8011B950(script->varTable[15], -1, FOG_MODE_0, 1); } return ApiStatus_DONE2; } else { diff --git a/ver/us/asm/bss3.s b/ver/us/asm/bss3.s index 7320eb22cb..ef9ad9fab1 100644 --- a/ver/us/asm/bss3.s +++ b/ver/us/asm/bss3.s @@ -58,7 +58,7 @@ dlabel gCurrentCustomModelGfxPtr dlabel gLastCreatedEntityIndex .space 4 -dlabel gBgRenderTypePtr +dlabel gBackgroundFogModePtr .space 4 dlabel gMsgVarImages @@ -229,10 +229,10 @@ dlabel D_80152220 dlabel D_80152A20 .space 0x00000800 -dlabel wBgRenderType +dlabel wBackgroundFogMode .space 1 -dlabel bBgRenderType +dlabel bBackgroundFogMode .space 1 dlabel D_80153222 diff --git a/ver/us/asm/nonmatchings/a5dd0_len_114e0/appendGfx_model.s b/ver/us/asm/nonmatchings/a5dd0_len_114e0/appendGfx_model.s deleted file mode 100644 index 3fd98ffb8b..0000000000 --- a/ver/us/asm/nonmatchings/a5dd0_len_114e0/appendGfx_model.s +++ /dev/null @@ -1,1915 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -.section .rodata - -dlabel jtbl_8014F990 -.word .L80113428_A9B28, .L80113488_A9B88, .L801134E8_A9BE8, .L80113568_A9C68, .L80113608_A9D08, .L801136C8_A9DC8, .L801137A8_A9EA8, .L801138A8_A9FA8 - -dlabel jtbl_8014F9B0 -.word .L80113C14_AA314, .L80113CD8_AA3D8, .L80113D94_AA494, .L80113F64_AA664, .L80113F64_AA664, .L801142F4_AA9F4, .L80114690_AAD90, .L80114690_AAD90, .L80114690_AAD90, .L8011460C_AAD0C, .L8011460C_AAD0C, 0 - -dlabel jtbl_8014F9E0 -.word .L80113CD0_AA3D0, .L80113CD0_AA3D0, .L80113C40_AA340, .L80113CA8_AA3A8, .L80113C48_AA348, .L80113CD0_AA3D0, .L80113C50_AA350, .L80113CD0_AA3D0, .L80113C58_AA358, .L80113CD0_AA3D0, .L80113CD0_AA3D0, .L80113CD0_AA3D0, .L80113C60_AA360, .L80113CD0_AA3D0, .L80113C68_AA368, .L80113CB0_AA3B0, .L80113C78_AA378, .L80113CD0_AA3D0, .L80113C80_AA380, .L80113CB8_AA3B8, .L80113C88_AA388, .L80113C78_AA378, .L80113CD0_AA3D0, .L80113CD0_AA3D0, .L80113CD0_AA3D0, .L80113C90_AA390, .L80113CD0_AA3D0, .L80113C98_AA398, .L80113CD0_AA3D0, .L80113CD0_AA3D0, .L80113CD0_AA3D0, .L80113CD0_AA3D0, .L80113CD0_AA3D0, .L80113C78_AA378, .L80113CD0_AA3D0, .L80113CD0_AA3D0, .L80113CD0_AA3D0, .L80113CA0_AA3A0, .L80113CD0_AA3D0, .L80113CD0_AA3D0, .L80113C70_AA370, .L80113CD0_AA3D0, .L80113CD0_AA3D0, .L80113CD0_AA3D0, .L80113CD0_AA3D0, .L80113CC0_AA3C0, .L80113CC8_AA3C8, 0 - -dlabel jtbl_8014FAA0 -.word .L80113D8C_AA48C, .L80113D8C_AA48C, .L80113D04_AA404, .L80113D64_AA464, .L80113D0C_AA40C, .L80113D8C_AA48C, .L80113D14_AA414, .L80113D8C_AA48C, .L80113D1C_AA41C, .L80113D8C_AA48C, .L80113D8C_AA48C, .L80113D8C_AA48C, .L80113D24_AA424, .L80113D8C_AA48C, .L80113D2C_AA42C, .L80113D6C_AA46C, .L80113D34_AA434, .L80113D8C_AA48C, .L80113D44_AA444, .L80113D74_AA474, .L80113D8C_AA48C, .L80113D34_AA434, .L80113D8C_AA48C, .L80113D8C_AA48C, .L80113D8C_AA48C, .L80113D4C_AA44C, .L80113D8C_AA48C, .L80113D54_AA454, .L80113D8C_AA48C, .L80113D8C_AA48C, .L80113D8C_AA48C, .L80113D8C_AA48C, .L80113D8C_AA48C, .L80113D34_AA434, .L80113D8C_AA48C, .L80113D8C_AA48C, .L80113D8C_AA48C, .L80113D5C_AA45C, .L80113D8C_AA48C, .L80113D8C_AA48C, .L80113D3C_AA43C, .L80113D8C_AA48C, .L80113D8C_AA48C, .L80113D8C_AA48C, .L80113D8C_AA48C, .L80113D7C_AA47C, .L80113D84_AA484, 0 - -dlabel jtbl_8014FB60 -.word .L80113E48_AA548, .L80113E48_AA548, .L80113DC0_AA4C0, .L80113E20_AA520, .L80113DC8_AA4C8, .L80113E48_AA548, .L80113DD0_AA4D0, .L80113E48_AA548, .L80113DD8_AA4D8, .L80113E48_AA548, .L80113E48_AA548, .L80113E48_AA548, .L80113DE0_AA4E0, .L80113E48_AA548, .L80113DE8_AA4E8, .L80113E28_AA528, .L80113DF0_AA4F0, .L80113E48_AA548, .L80113E00_AA500, .L80113E30_AA530, .L80113E48_AA548, .L80113DF0_AA4F0, .L80113E48_AA548, .L80113E48_AA548, .L80113E48_AA548, .L80113E08_AA508, .L80113E48_AA548, .L80113E10_AA510, .L80113E48_AA548, .L80113E48_AA548, .L80113E48_AA548, .L80113E48_AA548, .L80113E48_AA548, .L80113DF0_AA4F0, .L80113E48_AA548, .L80113E48_AA548, .L80113E48_AA548, .L80113E18_AA518, .L80113E48_AA548, .L80113E48_AA548, .L80113DF8_AA4F8, .L80113E48_AA548, .L80113E48_AA548, .L80113E48_AA548, .L80113E48_AA548, .L80113E38_AA538, .L80113E40_AA540, 0 - -dlabel jtbl_8014FC20 -.word .L80113FC4_AA6C4, .L80114234_AA934, .L80113FE4_AA6E4, .L80114184_AA884, .L80114004_AA704, .L80114234_AA934, .L80114024_AA724, .L80114234_AA934, .L80114044_AA744, .L80114234_AA934, .L80114234_AA934, .L80114234_AA934, .L80114064_AA764, .L80114234_AA934, .L80114084_AA784, .L801141A4_AA8A4, .L801140A4_AA7A4, .L80114234_AA934, .L80114104_AA804, .L801141C4_AA8C4, .L80114234_AA934, .L801140C4_AA7C4, .L80114234_AA934, .L80114234_AA934, .L80114234_AA934, .L80114124_AA824, .L80114234_AA934, .L80114144_AA844, .L80114234_AA934, .L80114234_AA934, .L80114234_AA934, .L80114234_AA934, .L80114234_AA934, .L801140E4_AA7E4, .L80114234_AA934, .L80114234_AA934, .L80114234_AA934, .L80114164_AA864, .L80114234_AA934, .L80114234_AA934, .L80114234_AA934, .L80114234_AA934, .L80114234_AA934, .L80114234_AA934, .L80114234_AA934, .L801141E4_AA8E4, .L80114204_AA904, 0 - -dlabel jtbl_8014FCE0 -.word .L801143A8_AAAA8, .L801143A8_AAAA8, .L80114320_AAA20, .L80114380_AAA80, .L80114328_AAA28, .L801143A8_AAAA8, .L80114330_AAA30, .L801143A8_AAAA8, .L80114338_AAA38, .L801143A8_AAAA8, .L801143A8_AAAA8, .L801143A8_AAAA8, .L80114340_AAA40, .L801143A8_AAAA8, .L80114348_AAA48, .L80114388_AAA88, .L80114350_AAA50, .L801143A8_AAAA8, .L80114360_AAA60, .L80114390_AAA90, .L801143A8_AAAA8, .L80114350_AAA50, .L801143A8_AAAA8, .L801143A8_AAAA8, .L801143A8_AAAA8, .L80114368_AAA68, .L801143A8_AAAA8, .L80114370_AAA70, .L801143A8_AAAA8, .L801143A8_AAAA8, .L801143A8_AAAA8, .L801143A8_AAAA8, .L801143A8_AAAA8, .L80114350_AAA50, .L801143A8_AAAA8, .L801143A8_AAAA8, .L801143A8_AAAA8, .L80114378_AAA78, .L801143A8_AAAA8, .L801143A8_AAAA8, .L80114358_AAA58, .L801143A8_AAAA8, .L801143A8_AAAA8, .L801143A8_AAAA8, .L801143A8_AAAA8, .L80114398_AAA98, .L801143A0_AAAA0, 0 - -dlabel jtbl_8014FDA0 -.word .L80114660_AAD60, .L80114660_AAD60, .L80114660_AAD60, .L80114660_AAD60, .L80114638_AAD38, .L80114660_AAD60, .L80114660_AAD60, .L80114660_AAD60, .L80114640_AAD40, .L80114660_AAD60, .L80114660_AAD60, .L80114660_AAD60, .L80114648_AAD48, .L80114660_AAD60, .L80114660_AAD60, .L80114660_AAD60, .L80114660_AAD60, .L80114660_AAD60, .L80114660_AAD60, .L80114660_AAD60, .L80114660_AAD60, .L80114660_AAD60, .L80114660_AAD60, .L80114660_AAD60, .L80114660_AAD60, .L80114660_AAD60, .L80114660_AAD60, .L80114660_AAD60, .L80114660_AAD60, .L80114660_AAD60, .L80114660_AAD60, .L80114660_AAD60, .L80114660_AAD60, .L80114660_AAD60, .L80114660_AAD60, .L80114660_AAD60, .L80114660_AAD60, .L80114660_AAD60, .L80114660_AAD60, .L80114660_AAD60, .L80114660_AAD60, .L80114660_AAD60, .L80114660_AAD60, .L80114660_AAD60, .L80114660_AAD60, .L80114650_AAD50, .L80114658_AAD58, 0 - -.section .text - -glabel appendGfx_model -/* A9790 80113090 27BDFF88 */ addiu $sp, $sp, -0x78 -/* A9794 80113094 AFB60068 */ sw $s6, 0x68($sp) -/* A9798 80113098 0080B02D */ daddu $s6, $a0, $zero -/* A979C 8011309C AFB7006C */ sw $s7, 0x6c($sp) -/* A97A0 801130A0 24170001 */ addiu $s7, $zero, 1 -/* A97A4 801130A4 240D0002 */ addiu $t5, $zero, 2 -/* A97A8 801130A8 AFBF0074 */ sw $ra, 0x74($sp) -/* A97AC 801130AC AFBE0070 */ sw $fp, 0x70($sp) -/* A97B0 801130B0 AFB50064 */ sw $s5, 0x64($sp) -/* A97B4 801130B4 AFB40060 */ sw $s4, 0x60($sp) -/* A97B8 801130B8 AFB3005C */ sw $s3, 0x5c($sp) -/* A97BC 801130BC AFB20058 */ sw $s2, 0x58($sp) -/* A97C0 801130C0 AFB10054 */ sw $s1, 0x54($sp) -/* A97C4 801130C4 AFB00050 */ sw $s0, 0x50($sp) -/* A97C8 801130C8 AFAD0038 */ sw $t5, 0x38($sp) -/* A97CC 801130CC 96D80000 */ lhu $t8, ($s6) -/* A97D0 801130D0 92C200A8 */ lbu $v0, 0xa8($s6) -/* A97D4 801130D4 8ECF0008 */ lw $t7, 8($s6) -/* A97D8 801130D8 3C10800A */ lui $s0, %hi(gMasterGfxPos) -/* A97DC 801130DC 2610A66C */ addiu $s0, $s0, %lo(gMasterGfxPos) -/* A97E0 801130E0 10400010 */ beqz $v0, .L80113124 -/* A97E4 801130E4 AFAF0028 */ sw $t7, 0x28($sp) -/* A97E8 801130E8 92C300A8 */ lbu $v1, 0xa8($s6) -/* A97EC 801130EC 82C200A9 */ lb $v0, 0xa9($s6) -/* A97F0 801130F0 3C048016 */ lui $a0, %hi(mdl_textureHandles) -/* A97F4 801130F4 2484A590 */ addiu $a0, $a0, %lo(mdl_textureHandles) -/* A97F8 801130F8 00621821 */ addu $v1, $v1, $v0 -/* A97FC 801130FC 00031100 */ sll $v0, $v1, 4 -/* A9800 80113100 00431021 */ addu $v0, $v0, $v1 -/* A9804 80113104 01A21004 */ sllv $v0, $v0, $t5 -/* A9808 80113108 00448821 */ addu $s1, $v0, $a0 -/* A980C 8011310C 8E220000 */ lw $v0, ($s1) -/* A9810 80113110 10400005 */ beqz $v0, .L80113128 -/* A9814 80113114 26320004 */ addiu $s2, $s1, 4 -/* A9818 80113118 923E002D */ lbu $fp, 0x2d($s1) -/* A981C 8011311C 08044C4C */ j .L80113130 -/* A9820 80113120 AFA00044 */ sw $zero, 0x44($sp) -.L80113124: -/* A9824 80113124 0000882D */ daddu $s1, $zero, $zero -.L80113128: -/* A9828 80113128 0000902D */ daddu $s2, $zero, $zero -/* A982C 8011312C AFA00044 */ sw $zero, 0x44($sp) -.L80113130: -/* A9830 80113130 92D400A6 */ lbu $s4, 0xa6($s6) -/* A9834 80113134 12400006 */ beqz $s2, .L80113150 -/* A9838 80113138 24130001 */ addiu $s3, $zero, 1 -/* A983C 8011313C 13C00004 */ beqz $fp, .L80113150 -/* A9840 80113140 2FC20004 */ sltiu $v0, $fp, 4 -/* A9844 80113144 10400002 */ beqz $v0, .L80113150 -/* A9848 80113148 00000000 */ nop -/* A984C 8011314C 24130002 */ addiu $s3, $zero, 2 -.L80113150: -/* A9850 80113150 16400005 */ bnez $s2, .L80113168 -/* A9854 80113154 00141600 */ sll $v0, $s4, 0x18 -/* A9858 80113158 00021603 */ sra $v0, $v0, 0x18 -/* A985C 8011315C 28420011 */ slti $v0, $v0, 0x11 -/* A9860 80113160 1040000B */ beqz $v0, .L80113190 -/* A9864 80113164 00000000 */ nop -.L80113168: -/* A9868 80113168 3C028015 */ lui $v0, %hi(gCurrentFogSettings) -/* A986C 8011316C 8C423264 */ lw $v0, %lo(gCurrentFogSettings)($v0) -/* A9870 80113170 8C420000 */ lw $v0, ($v0) -/* A9874 80113174 10400006 */ beqz $v0, .L80113190 -/* A9878 80113178 33020040 */ andi $v0, $t8, 0x40 -/* A987C 8011317C 14400004 */ bnez $v0, .L80113190 -/* A9880 80113180 00000000 */ nop -/* A9884 80113184 24130003 */ addiu $s3, $zero, 3 -/* A9888 80113188 24150001 */ addiu $s5, $zero, 1 -/* A988C 8011318C AFB50044 */ sw $s5, 0x44($sp) -.L80113190: -/* A9890 80113190 92C200A5 */ lbu $v0, 0xa5($s6) -/* A9894 80113194 00021902 */ srl $v1, $v0, 4 -/* A9898 80113198 24020002 */ addiu $v0, $zero, 2 -/* A989C 8011319C 1062000F */ beq $v1, $v0, .L801131DC -/* A98A0 801131A0 2C620003 */ sltiu $v0, $v1, 3 -/* A98A4 801131A4 10400005 */ beqz $v0, .L801131BC -/* A98A8 801131A8 24020001 */ addiu $v0, $zero, 1 -/* A98AC 801131AC 50620008 */ beql $v1, $v0, .L801131D0 -/* A98B0 801131B0 26730003 */ addiu $s3, $s3, 3 -/* A98B4 801131B4 08044CF5 */ j .L801133D4 -/* A98B8 801131B8 00000000 */ nop -.L801131BC: -/* A98BC 801131BC 24020003 */ addiu $v0, $zero, 3 -/* A98C0 801131C0 5062005C */ beql $v1, $v0, .L80113334 -/* A98C4 801131C4 24130002 */ addiu $s3, $zero, 2 -/* A98C8 801131C8 08044CF5 */ j .L801133D4 -/* A98CC 801131CC 00000000 */ nop -.L801131D0: -/* A98D0 801131D0 24190002 */ addiu $t9, $zero, 2 -/* A98D4 801131D4 08044CF5 */ j .L801133D4 -/* A98D8 801131D8 AFB90044 */ sw $t9, 0x44($sp) -.L801131DC: -/* A98DC 801131DC 00141600 */ sll $v0, $s4, 0x18 -/* A98E0 801131E0 00021603 */ sra $v0, $v0, 0x18 -/* A98E4 801131E4 28420011 */ slti $v0, $v0, 0x11 -/* A98E8 801131E8 1040007A */ beqz $v0, .L801133D4 -/* A98EC 801131EC 3C070001 */ lui $a3, 1 -/* A98F0 801131F0 3C038015 */ lui $v1, %hi(mdl_renderModelFogEnd) -/* A98F4 801131F4 8C63B75C */ lw $v1, %lo(mdl_renderModelFogEnd)($v1) -/* A98F8 801131F8 3C048015 */ lui $a0, %hi(mdl_renderModelFogStart) -/* A98FC 801131FC 8C84B758 */ lw $a0, %lo(mdl_renderModelFogStart)($a0) -/* A9900 80113200 34E7F400 */ ori $a3, $a3, 0xf400 -/* A9904 80113204 00641823 */ subu $v1, $v1, $a0 -/* A9908 80113208 14600002 */ bnez $v1, .L80113214 -/* A990C 8011320C 00E3001A */ div $zero, $a3, $v1 -/* A9910 80113210 0007000D */ break 7 -.L80113214: -/* A9914 80113214 2401FFFF */ addiu $at, $zero, -1 -/* A9918 80113218 14610004 */ bne $v1, $at, .L8011322C -/* A991C 8011321C 3C018000 */ lui $at, 0x8000 -/* A9920 80113220 14E10002 */ bne $a3, $at, .L8011322C -/* A9924 80113224 00000000 */ nop -/* A9928 80113228 0006000D */ break 6 -.L8011322C: -/* A992C 8011322C 00003812 */ mflo $a3 -/* A9930 80113230 26730009 */ addiu $s3, $s3, 9 -/* A9934 80113234 240D0003 */ addiu $t5, $zero, 3 -/* A9938 80113238 240501F4 */ addiu $a1, $zero, 0x1f4 -/* A993C 8011323C 00A42823 */ subu $a1, $a1, $a0 -/* A9940 80113240 00052A00 */ sll $a1, $a1, 8 -/* A9944 80113244 8E020000 */ lw $v0, ($s0) -/* A9948 80113248 14600002 */ bnez $v1, .L80113254 -/* A994C 8011324C 00A3001A */ div $zero, $a1, $v1 -/* A9950 80113250 0007000D */ break 7 -.L80113254: -/* A9954 80113254 2401FFFF */ addiu $at, $zero, -1 -/* A9958 80113258 14610004 */ bne $v1, $at, .L8011326C -/* A995C 8011325C 3C018000 */ lui $at, 0x8000 -/* A9960 80113260 14A10002 */ bne $a1, $at, .L8011326C -/* A9964 80113264 00000000 */ nop -/* A9968 80113268 0006000D */ break 6 -.L8011326C: -/* A996C 8011326C 00002812 */ mflo $a1 -/* A9970 80113270 AFAD0044 */ sw $t5, 0x44($sp) -/* A9974 80113274 0040402D */ daddu $t0, $v0, $zero -/* A9978 80113278 24420008 */ addiu $v0, $v0, 8 -/* A997C 8011327C AE020000 */ sw $v0, ($s0) -/* A9980 80113280 0040302D */ daddu $a2, $v0, $zero -/* A9984 80113284 3C02FA00 */ lui $v0, 0xfa00 -/* A9988 80113288 AD020000 */ sw $v0, ($t0) -/* A998C 8011328C 3C028015 */ lui $v0, %hi(mdl_renderModelFogPrimColorR) -/* A9990 80113290 9042B750 */ lbu $v0, %lo(mdl_renderModelFogPrimColorR)($v0) -/* A9994 80113294 3C038015 */ lui $v1, %hi(mdl_renderModelFogPrimColorG) -/* A9998 80113298 9063B751 */ lbu $v1, %lo(mdl_renderModelFogPrimColorG)($v1) -/* A999C 8011329C 3C048015 */ lui $a0, %hi(mdl_renderModelFogPrimColorB) -/* A99A0 801132A0 9084B752 */ lbu $a0, %lo(mdl_renderModelFogPrimColorB)($a0) -/* A99A4 801132A4 00021600 */ sll $v0, $v0, 0x18 -/* A99A8 801132A8 00031C00 */ sll $v1, $v1, 0x10 -/* A99AC 801132AC 00431025 */ or $v0, $v0, $v1 -/* A99B0 801132B0 00042200 */ sll $a0, $a0, 8 -/* A99B4 801132B4 3C038015 */ lui $v1, %hi(mdl_renderModelFogPrimColorA) -/* A99B8 801132B8 9063B753 */ lbu $v1, %lo(mdl_renderModelFogPrimColorA)($v1) -/* A99BC 801132BC 00441025 */ or $v0, $v0, $a0 -/* A99C0 801132C0 00431025 */ or $v0, $v0, $v1 -/* A99C4 801132C4 AD020004 */ sw $v0, 4($t0) -/* A99C8 801132C8 00C0402D */ daddu $t0, $a2, $zero -/* A99CC 801132CC 24C60008 */ addiu $a2, $a2, 8 -/* A99D0 801132D0 3C02F800 */ lui $v0, 0xf800 -/* A99D4 801132D4 AE060000 */ sw $a2, ($s0) -/* A99D8 801132D8 AD020000 */ sw $v0, ($t0) -/* A99DC 801132DC 3C028015 */ lui $v0, %hi(mdl_renderModelFogColorR) -/* A99E0 801132E0 9042B754 */ lbu $v0, %lo(mdl_renderModelFogColorR)($v0) -/* A99E4 801132E4 3C048015 */ lui $a0, %hi(mdl_renderModelFogColorG) -/* A99E8 801132E8 9084B755 */ lbu $a0, %lo(mdl_renderModelFogColorG)($a0) -/* A99EC 801132EC 3C038015 */ lui $v1, %hi(mdl_renderModelFogColorB) -/* A99F0 801132F0 9063B756 */ lbu $v1, %lo(mdl_renderModelFogColorB)($v1) -/* A99F4 801132F4 00021600 */ sll $v0, $v0, 0x18 -/* A99F8 801132F8 00042400 */ sll $a0, $a0, 0x10 -/* A99FC 801132FC 00441025 */ or $v0, $v0, $a0 -/* A9A00 80113300 00031A00 */ sll $v1, $v1, 8 -/* A9A04 80113304 00431025 */ or $v0, $v0, $v1 -/* A9A08 80113308 00C0182D */ daddu $v1, $a2, $zero -/* A9A0C 8011330C 24C60008 */ addiu $a2, $a2, 8 -/* A9A10 80113310 AD020004 */ sw $v0, 4($t0) -/* A9A14 80113314 3C02DB08 */ lui $v0, 0xdb08 -/* A9A18 80113318 AE060000 */ sw $a2, ($s0) -/* A9A1C 8011331C AC620000 */ sw $v0, ($v1) -/* A9A20 80113320 00073C00 */ sll $a3, $a3, 0x10 -/* A9A24 80113324 30A5FFFF */ andi $a1, $a1, 0xffff -/* A9A28 80113328 00E53825 */ or $a3, $a3, $a1 -/* A9A2C 8011332C 08044CF5 */ j .L801133D4 -/* A9A30 80113330 AC670004 */ sw $a3, 4($v1) -.L80113334: -/* A9A34 80113334 8E020000 */ lw $v0, ($s0) -/* A9A38 80113338 240D0004 */ addiu $t5, $zero, 4 -/* A9A3C 8011333C AFAD0044 */ sw $t5, 0x44($sp) -/* A9A40 80113340 0040302D */ daddu $a2, $v0, $zero -/* A9A44 80113344 24420008 */ addiu $v0, $v0, 8 -/* A9A48 80113348 AE020000 */ sw $v0, ($s0) -/* A9A4C 8011334C 0040282D */ daddu $a1, $v0, $zero -/* A9A50 80113350 3C02FA00 */ lui $v0, 0xfa00 -/* A9A54 80113354 ACC20000 */ sw $v0, ($a2) -/* A9A58 80113358 3C028015 */ lui $v0, %hi(gRenderModelPrimR) -/* A9A5C 8011335C 9042B760 */ lbu $v0, %lo(gRenderModelPrimR)($v0) -/* A9A60 80113360 3C048015 */ lui $a0, %hi(gRenderModelPrimG) -/* A9A64 80113364 9084B761 */ lbu $a0, %lo(gRenderModelPrimG)($a0) -/* A9A68 80113368 3C038015 */ lui $v1, %hi(gRenderModelPrimB) -/* A9A6C 8011336C 9063B762 */ lbu $v1, %lo(gRenderModelPrimB)($v1) -/* A9A70 80113370 00021600 */ sll $v0, $v0, 0x18 -/* A9A74 80113374 00042400 */ sll $a0, $a0, 0x10 -/* A9A78 80113378 00441025 */ or $v0, $v0, $a0 -/* A9A7C 8011337C 00031A00 */ sll $v1, $v1, 8 -/* A9A80 80113380 00431025 */ or $v0, $v0, $v1 -/* A9A84 80113384 344200FF */ ori $v0, $v0, 0xff -/* A9A88 80113388 ACC20004 */ sw $v0, 4($a2) -/* A9A8C 8011338C 00A0302D */ daddu $a2, $a1, $zero -/* A9A90 80113390 24A50008 */ addiu $a1, $a1, 8 -/* A9A94 80113394 3C02FB00 */ lui $v0, 0xfb00 -/* A9A98 80113398 AE050000 */ sw $a1, ($s0) -/* A9A9C 8011339C ACC20000 */ sw $v0, ($a2) -/* A9AA0 801133A0 3C028015 */ lui $v0, %hi(gRenderModelEnvR) -/* A9AA4 801133A4 9042B763 */ lbu $v0, %lo(gRenderModelEnvR)($v0) -/* A9AA8 801133A8 3C048015 */ lui $a0, %hi(gRenderModelEnvG) -/* A9AAC 801133AC 9084B764 */ lbu $a0, %lo(gRenderModelEnvG)($a0) -/* A9AB0 801133B0 3C038015 */ lui $v1, %hi(gRenderModelEnvB) -/* A9AB4 801133B4 9063B765 */ lbu $v1, %lo(gRenderModelEnvB)($v1) -/* A9AB8 801133B8 00021600 */ sll $v0, $v0, 0x18 -/* A9ABC 801133BC 00042400 */ sll $a0, $a0, 0x10 -/* A9AC0 801133C0 00441025 */ or $v0, $v0, $a0 -/* A9AC4 801133C4 00031A00 */ sll $v1, $v1, 8 -/* A9AC8 801133C8 00431025 */ or $v0, $v0, $v1 -/* A9ACC 801133CC 344200FF */ ori $v0, $v0, 0xff -/* A9AD0 801133D0 ACC20004 */ sw $v0, 4($a2) -.L801133D4: -/* A9AD4 801133D4 8E020000 */ lw $v0, ($s0) -/* A9AD8 801133D8 3C03E700 */ lui $v1, 0xe700 -/* A9ADC 801133DC 0040202D */ daddu $a0, $v0, $zero -/* A9AE0 801133E0 AC830000 */ sw $v1, ($a0) -/* A9AE4 801133E4 AC800004 */ sw $zero, 4($a0) -/* A9AE8 801133E8 8EC3000C */ lw $v1, 0xc($s6) -/* A9AEC 801133EC 24420008 */ addiu $v0, $v0, 8 -/* A9AF0 801133F0 10600175 */ beqz $v1, .L801139C8 -/* A9AF4 801133F4 AE020000 */ sw $v0, ($s0) -/* A9AF8 801133F8 8C6E0004 */ lw $t6, 4($v1) -/* A9AFC 801133FC 11C00172 */ beqz $t6, .L801139C8 -/* A9B00 80113400 00000000 */ nop -/* A9B04 80113404 8C630008 */ lw $v1, 8($v1) -/* A9B08 80113408 2C620008 */ sltiu $v0, $v1, 8 -/* A9B0C 8011340C 1040016E */ beqz $v0, .L801139C8 -/* A9B10 80113410 00031080 */ sll $v0, $v1, 2 -/* A9B14 80113414 3C018015 */ lui $at, %hi(jtbl_8014F990) -/* A9B18 80113418 00220821 */ addu $at, $at, $v0 -/* A9B1C 8011341C 8C22F990 */ lw $v0, %lo(jtbl_8014F990)($at) -/* A9B20 80113420 00400008 */ jr $v0 -/* A9B24 80113424 00000000 */ nop -.L80113428_A9B28: -/* A9B28 80113428 3C06DC08 */ lui $a2, 0xdc08 -/* A9B2C 8011342C 34C6060A */ ori $a2, $a2, 0x60a -/* A9B30 80113430 3C07DC08 */ lui $a3, 0xdc08 -/* A9B34 80113434 34E7090A */ ori $a3, $a3, 0x90a -/* A9B38 80113438 8E020000 */ lw $v0, ($s0) -/* A9B3C 8011343C 3C03DB02 */ lui $v1, 0xdb02 -/* A9B40 80113440 0040282D */ daddu $a1, $v0, $zero -/* A9B44 80113444 24420008 */ addiu $v0, $v0, 8 -/* A9B48 80113448 0040202D */ daddu $a0, $v0, $zero -/* A9B4C 8011344C AE020000 */ sw $v0, ($s0) -/* A9B50 80113450 24420008 */ addiu $v0, $v0, 8 -/* A9B54 80113454 ACA30000 */ sw $v1, ($a1) -/* A9B58 80113458 AE020000 */ sw $v0, ($s0) -/* A9B5C 8011345C 0040182D */ daddu $v1, $v0, $zero -/* A9B60 80113460 24020018 */ addiu $v0, $zero, 0x18 -/* A9B64 80113464 ACA20004 */ sw $v0, 4($a1) -/* A9B68 80113468 25C20008 */ addiu $v0, $t6, 8 -/* A9B6C 8011346C AC820004 */ sw $v0, 4($a0) -/* A9B70 80113470 0060102D */ daddu $v0, $v1, $zero -/* A9B74 80113474 24630008 */ addiu $v1, $v1, 8 -/* A9B78 80113478 AC860000 */ sw $a2, ($a0) -/* A9B7C 8011347C AE030000 */ sw $v1, ($s0) -/* A9B80 80113480 08044E71 */ j .L801139C4 -/* A9B84 80113484 AC470000 */ sw $a3, ($v0) -.L80113488_A9B88: -/* A9B88 80113488 3C06DC08 */ lui $a2, 0xdc08 -/* A9B8C 8011348C 34C6060A */ ori $a2, $a2, 0x60a -/* A9B90 80113490 3C07DC08 */ lui $a3, 0xdc08 -/* A9B94 80113494 34E7090A */ ori $a3, $a3, 0x90a -/* A9B98 80113498 8E020000 */ lw $v0, ($s0) -/* A9B9C 8011349C 3C03DB02 */ lui $v1, 0xdb02 -/* A9BA0 801134A0 0040282D */ daddu $a1, $v0, $zero -/* A9BA4 801134A4 24420008 */ addiu $v0, $v0, 8 -/* A9BA8 801134A8 0040202D */ daddu $a0, $v0, $zero -/* A9BAC 801134AC AE020000 */ sw $v0, ($s0) -/* A9BB0 801134B0 24420008 */ addiu $v0, $v0, 8 -/* A9BB4 801134B4 ACA30000 */ sw $v1, ($a1) -/* A9BB8 801134B8 AE020000 */ sw $v0, ($s0) -/* A9BBC 801134BC 0040182D */ daddu $v1, $v0, $zero -/* A9BC0 801134C0 24020018 */ addiu $v0, $zero, 0x18 -/* A9BC4 801134C4 ACA20004 */ sw $v0, 4($a1) -/* A9BC8 801134C8 25C20008 */ addiu $v0, $t6, 8 -/* A9BCC 801134CC AC820004 */ sw $v0, 4($a0) -/* A9BD0 801134D0 0060102D */ daddu $v0, $v1, $zero -/* A9BD4 801134D4 24630008 */ addiu $v1, $v1, 8 -/* A9BD8 801134D8 AC860000 */ sw $a2, ($a0) -/* A9BDC 801134DC AE030000 */ sw $v1, ($s0) -/* A9BE0 801134E0 08044E71 */ j .L801139C4 -/* A9BE4 801134E4 AC470000 */ sw $a3, ($v0) -.L801134E8_A9BE8: -/* A9BE8 801134E8 3C06DC08 */ lui $a2, 0xdc08 -/* A9BEC 801134EC 34C6060A */ ori $a2, $a2, 0x60a -/* A9BF0 801134F0 3C07DC08 */ lui $a3, 0xdc08 -/* A9BF4 801134F4 34E7090A */ ori $a3, $a3, 0x90a -/* A9BF8 801134F8 3C08DC08 */ lui $t0, 0xdc08 -/* A9BFC 801134FC 35080C0A */ ori $t0, $t0, 0xc0a -/* A9C00 80113500 8E020000 */ lw $v0, ($s0) -/* A9C04 80113504 3C03DB02 */ lui $v1, 0xdb02 -/* A9C08 80113508 0040202D */ daddu $a0, $v0, $zero -/* A9C0C 8011350C 24420008 */ addiu $v0, $v0, 8 -/* A9C10 80113510 0040282D */ daddu $a1, $v0, $zero -/* A9C14 80113514 AE020000 */ sw $v0, ($s0) -/* A9C18 80113518 24420008 */ addiu $v0, $v0, 8 -/* A9C1C 8011351C AC830000 */ sw $v1, ($a0) -/* A9C20 80113520 AE020000 */ sw $v0, ($s0) -/* A9C24 80113524 0040182D */ daddu $v1, $v0, $zero -/* A9C28 80113528 24020030 */ addiu $v0, $zero, 0x30 -/* A9C2C 8011352C AC820004 */ sw $v0, 4($a0) -/* A9C30 80113530 0060202D */ daddu $a0, $v1, $zero -/* A9C34 80113534 24630008 */ addiu $v1, $v1, 8 -/* A9C38 80113538 25C20008 */ addiu $v0, $t6, 8 -/* A9C3C 8011353C ACA60000 */ sw $a2, ($a1) -/* A9C40 80113540 AE030000 */ sw $v1, ($s0) -/* A9C44 80113544 ACA20004 */ sw $v0, 4($a1) -/* A9C48 80113548 25C20018 */ addiu $v0, $t6, 0x18 -/* A9C4C 8011354C AC820004 */ sw $v0, 4($a0) -/* A9C50 80113550 0060102D */ daddu $v0, $v1, $zero -/* A9C54 80113554 24630008 */ addiu $v1, $v1, 8 -/* A9C58 80113558 AC870000 */ sw $a3, ($a0) -/* A9C5C 8011355C AE030000 */ sw $v1, ($s0) -/* A9C60 80113560 08044E71 */ j .L801139C4 -/* A9C64 80113564 AC480000 */ sw $t0, ($v0) -.L80113568_A9C68: -/* A9C68 80113568 3C06DC08 */ lui $a2, 0xdc08 -/* A9C6C 8011356C 34C6060A */ ori $a2, $a2, 0x60a -/* A9C70 80113570 3C07DC08 */ lui $a3, 0xdc08 -/* A9C74 80113574 34E7090A */ ori $a3, $a3, 0x90a -/* A9C78 80113578 3C08DC08 */ lui $t0, 0xdc08 -/* A9C7C 8011357C 35080C0A */ ori $t0, $t0, 0xc0a -/* A9C80 80113580 3C09DC08 */ lui $t1, 0xdc08 -/* A9C84 80113584 35290F0A */ ori $t1, $t1, 0xf0a -/* A9C88 80113588 8E020000 */ lw $v0, ($s0) -/* A9C8C 8011358C 3C03DB02 */ lui $v1, 0xdb02 -/* A9C90 80113590 0040202D */ daddu $a0, $v0, $zero -/* A9C94 80113594 24420008 */ addiu $v0, $v0, 8 -/* A9C98 80113598 0040282D */ daddu $a1, $v0, $zero -/* A9C9C 8011359C AE020000 */ sw $v0, ($s0) -/* A9CA0 801135A0 24420008 */ addiu $v0, $v0, 8 -/* A9CA4 801135A4 AC830000 */ sw $v1, ($a0) -/* A9CA8 801135A8 AE020000 */ sw $v0, ($s0) -/* A9CAC 801135AC 0040182D */ daddu $v1, $v0, $zero -/* A9CB0 801135B0 24020048 */ addiu $v0, $zero, 0x48 -/* A9CB4 801135B4 AC820004 */ sw $v0, 4($a0) -/* A9CB8 801135B8 ACA60000 */ sw $a2, ($a1) -/* A9CBC 801135BC 0060302D */ daddu $a2, $v1, $zero -/* A9CC0 801135C0 24630008 */ addiu $v1, $v1, 8 -/* A9CC4 801135C4 25C20008 */ addiu $v0, $t6, 8 -/* A9CC8 801135C8 0060202D */ daddu $a0, $v1, $zero -/* A9CCC 801135CC AE030000 */ sw $v1, ($s0) -/* A9CD0 801135D0 24630008 */ addiu $v1, $v1, 8 -/* A9CD4 801135D4 ACA20004 */ sw $v0, 4($a1) -/* A9CD8 801135D8 25C20018 */ addiu $v0, $t6, 0x18 -/* A9CDC 801135DC ACC70000 */ sw $a3, ($a2) -/* A9CE0 801135E0 AE030000 */ sw $v1, ($s0) -/* A9CE4 801135E4 ACC20004 */ sw $v0, 4($a2) -/* A9CE8 801135E8 25C20028 */ addiu $v0, $t6, 0x28 -/* A9CEC 801135EC AC820004 */ sw $v0, 4($a0) -/* A9CF0 801135F0 0060102D */ daddu $v0, $v1, $zero -/* A9CF4 801135F4 24630008 */ addiu $v1, $v1, 8 -/* A9CF8 801135F8 AC880000 */ sw $t0, ($a0) -/* A9CFC 801135FC AE030000 */ sw $v1, ($s0) -/* A9D00 80113600 08044E71 */ j .L801139C4 -/* A9D04 80113604 AC490000 */ sw $t1, ($v0) -.L80113608_A9D08: -/* A9D08 80113608 3C06DC08 */ lui $a2, 0xdc08 -/* A9D0C 8011360C 34C6060A */ ori $a2, $a2, 0x60a -/* A9D10 80113610 3C07DC08 */ lui $a3, 0xdc08 -/* A9D14 80113614 34E7090A */ ori $a3, $a3, 0x90a -/* A9D18 80113618 3C08DC08 */ lui $t0, 0xdc08 -/* A9D1C 8011361C 35080C0A */ ori $t0, $t0, 0xc0a -/* A9D20 80113620 3C09DC08 */ lui $t1, 0xdc08 -/* A9D24 80113624 35290F0A */ ori $t1, $t1, 0xf0a -/* A9D28 80113628 3C0ADC08 */ lui $t2, 0xdc08 -/* A9D2C 8011362C 354A120A */ ori $t2, $t2, 0x120a -/* A9D30 80113630 8E020000 */ lw $v0, ($s0) -/* A9D34 80113634 3C03DB02 */ lui $v1, 0xdb02 -/* A9D38 80113638 0040202D */ daddu $a0, $v0, $zero -/* A9D3C 8011363C 24420008 */ addiu $v0, $v0, 8 -/* A9D40 80113640 0040282D */ daddu $a1, $v0, $zero -/* A9D44 80113644 AE020000 */ sw $v0, ($s0) -/* A9D48 80113648 24420008 */ addiu $v0, $v0, 8 -/* A9D4C 8011364C AC830000 */ sw $v1, ($a0) -/* A9D50 80113650 AE020000 */ sw $v0, ($s0) -/* A9D54 80113654 0040182D */ daddu $v1, $v0, $zero -/* A9D58 80113658 24020060 */ addiu $v0, $zero, 0x60 -/* A9D5C 8011365C AC820004 */ sw $v0, 4($a0) -/* A9D60 80113660 0060202D */ daddu $a0, $v1, $zero -/* A9D64 80113664 24630008 */ addiu $v1, $v1, 8 -/* A9D68 80113668 25C20008 */ addiu $v0, $t6, 8 -/* A9D6C 8011366C ACA60000 */ sw $a2, ($a1) -/* A9D70 80113670 AE030000 */ sw $v1, ($s0) -/* A9D74 80113674 ACA20004 */ sw $v0, 4($a1) -/* A9D78 80113678 0060282D */ daddu $a1, $v1, $zero -/* A9D7C 8011367C 24630008 */ addiu $v1, $v1, 8 -/* A9D80 80113680 25C20018 */ addiu $v0, $t6, 0x18 -/* A9D84 80113684 AC870000 */ sw $a3, ($a0) -/* A9D88 80113688 AE030000 */ sw $v1, ($s0) -/* A9D8C 8011368C AC820004 */ sw $v0, 4($a0) -/* A9D90 80113690 0060202D */ daddu $a0, $v1, $zero -/* A9D94 80113694 24630008 */ addiu $v1, $v1, 8 -/* A9D98 80113698 25C20028 */ addiu $v0, $t6, 0x28 -/* A9D9C 8011369C ACA80000 */ sw $t0, ($a1) -/* A9DA0 801136A0 AE030000 */ sw $v1, ($s0) -/* A9DA4 801136A4 ACA20004 */ sw $v0, 4($a1) -/* A9DA8 801136A8 25C20038 */ addiu $v0, $t6, 0x38 -/* A9DAC 801136AC AC820004 */ sw $v0, 4($a0) -/* A9DB0 801136B0 0060102D */ daddu $v0, $v1, $zero -/* A9DB4 801136B4 24630008 */ addiu $v1, $v1, 8 -/* A9DB8 801136B8 AC890000 */ sw $t1, ($a0) -/* A9DBC 801136BC AE030000 */ sw $v1, ($s0) -/* A9DC0 801136C0 08044E71 */ j .L801139C4 -/* A9DC4 801136C4 AC4A0000 */ sw $t2, ($v0) -.L801136C8_A9DC8: -/* A9DC8 801136C8 3C06DC08 */ lui $a2, 0xdc08 -/* A9DCC 801136CC 34C6060A */ ori $a2, $a2, 0x60a -/* A9DD0 801136D0 3C07DC08 */ lui $a3, 0xdc08 -/* A9DD4 801136D4 34E7090A */ ori $a3, $a3, 0x90a -/* A9DD8 801136D8 3C08DC08 */ lui $t0, 0xdc08 -/* A9DDC 801136DC 35080C0A */ ori $t0, $t0, 0xc0a -/* A9DE0 801136E0 3C09DC08 */ lui $t1, 0xdc08 -/* A9DE4 801136E4 35290F0A */ ori $t1, $t1, 0xf0a -/* A9DE8 801136E8 3C0ADC08 */ lui $t2, 0xdc08 -/* A9DEC 801136EC 354A120A */ ori $t2, $t2, 0x120a -/* A9DF0 801136F0 3C0BDC08 */ lui $t3, 0xdc08 -/* A9DF4 801136F4 356B150A */ ori $t3, $t3, 0x150a -/* A9DF8 801136F8 8E020000 */ lw $v0, ($s0) -/* A9DFC 801136FC 3C03DB02 */ lui $v1, 0xdb02 -/* A9E00 80113700 0040202D */ daddu $a0, $v0, $zero -/* A9E04 80113704 24420008 */ addiu $v0, $v0, 8 -/* A9E08 80113708 0040282D */ daddu $a1, $v0, $zero -/* A9E0C 8011370C AE020000 */ sw $v0, ($s0) -/* A9E10 80113710 24420008 */ addiu $v0, $v0, 8 -/* A9E14 80113714 AC830000 */ sw $v1, ($a0) -/* A9E18 80113718 AE020000 */ sw $v0, ($s0) -/* A9E1C 8011371C 0040182D */ daddu $v1, $v0, $zero -/* A9E20 80113720 24020078 */ addiu $v0, $zero, 0x78 -/* A9E24 80113724 AC820004 */ sw $v0, 4($a0) -/* A9E28 80113728 0060202D */ daddu $a0, $v1, $zero -/* A9E2C 8011372C 24630008 */ addiu $v1, $v1, 8 -/* A9E30 80113730 25C20008 */ addiu $v0, $t6, 8 -/* A9E34 80113734 ACA60000 */ sw $a2, ($a1) -/* A9E38 80113738 AE030000 */ sw $v1, ($s0) -/* A9E3C 8011373C ACA20004 */ sw $v0, 4($a1) -/* A9E40 80113740 0060282D */ daddu $a1, $v1, $zero -/* A9E44 80113744 24630008 */ addiu $v1, $v1, 8 -/* A9E48 80113748 25C20018 */ addiu $v0, $t6, 0x18 -/* A9E4C 8011374C 0060302D */ daddu $a2, $v1, $zero -/* A9E50 80113750 AC870000 */ sw $a3, ($a0) -/* A9E54 80113754 AE030000 */ sw $v1, ($s0) -/* A9E58 80113758 24630008 */ addiu $v1, $v1, 8 -/* A9E5C 8011375C AC820004 */ sw $v0, 4($a0) -/* A9E60 80113760 25C20028 */ addiu $v0, $t6, 0x28 -/* A9E64 80113764 0060202D */ daddu $a0, $v1, $zero -/* A9E68 80113768 ACA80000 */ sw $t0, ($a1) -/* A9E6C 8011376C AE030000 */ sw $v1, ($s0) -/* A9E70 80113770 24630008 */ addiu $v1, $v1, 8 -/* A9E74 80113774 ACA20004 */ sw $v0, 4($a1) -/* A9E78 80113778 25C20038 */ addiu $v0, $t6, 0x38 -/* A9E7C 8011377C ACC90000 */ sw $t1, ($a2) -/* A9E80 80113780 AE030000 */ sw $v1, ($s0) -/* A9E84 80113784 ACC20004 */ sw $v0, 4($a2) -/* A9E88 80113788 25C20048 */ addiu $v0, $t6, 0x48 -/* A9E8C 8011378C AC820004 */ sw $v0, 4($a0) -/* A9E90 80113790 0060102D */ daddu $v0, $v1, $zero -/* A9E94 80113794 24630008 */ addiu $v1, $v1, 8 -/* A9E98 80113798 AC8A0000 */ sw $t2, ($a0) -/* A9E9C 8011379C AE030000 */ sw $v1, ($s0) -/* A9EA0 801137A0 08044E71 */ j .L801139C4 -/* A9EA4 801137A4 AC4B0000 */ sw $t3, ($v0) -.L801137A8_A9EA8: -/* A9EA8 801137A8 3C06DC08 */ lui $a2, 0xdc08 -/* A9EAC 801137AC 34C6060A */ ori $a2, $a2, 0x60a -/* A9EB0 801137B0 3C07DC08 */ lui $a3, 0xdc08 -/* A9EB4 801137B4 34E7090A */ ori $a3, $a3, 0x90a -/* A9EB8 801137B8 3C08DC08 */ lui $t0, 0xdc08 -/* A9EBC 801137BC 35080C0A */ ori $t0, $t0, 0xc0a -/* A9EC0 801137C0 3C09DC08 */ lui $t1, 0xdc08 -/* A9EC4 801137C4 35290F0A */ ori $t1, $t1, 0xf0a -/* A9EC8 801137C8 3C0ADC08 */ lui $t2, 0xdc08 -/* A9ECC 801137CC 354A120A */ ori $t2, $t2, 0x120a -/* A9ED0 801137D0 3C0BDC08 */ lui $t3, 0xdc08 -/* A9ED4 801137D4 356B150A */ ori $t3, $t3, 0x150a -/* A9ED8 801137D8 3C0CDC08 */ lui $t4, 0xdc08 -/* A9EDC 801137DC 358C180A */ ori $t4, $t4, 0x180a -/* A9EE0 801137E0 8E020000 */ lw $v0, ($s0) -/* A9EE4 801137E4 3C03DB02 */ lui $v1, 0xdb02 -/* A9EE8 801137E8 0040202D */ daddu $a0, $v0, $zero -/* A9EEC 801137EC 24420008 */ addiu $v0, $v0, 8 -/* A9EF0 801137F0 0040282D */ daddu $a1, $v0, $zero -/* A9EF4 801137F4 AE020000 */ sw $v0, ($s0) -/* A9EF8 801137F8 24420008 */ addiu $v0, $v0, 8 -/* A9EFC 801137FC AC830000 */ sw $v1, ($a0) -/* A9F00 80113800 AE020000 */ sw $v0, ($s0) -/* A9F04 80113804 0040182D */ daddu $v1, $v0, $zero -/* A9F08 80113808 24020090 */ addiu $v0, $zero, 0x90 -/* A9F0C 8011380C AC820004 */ sw $v0, 4($a0) -/* A9F10 80113810 0060202D */ daddu $a0, $v1, $zero -/* A9F14 80113814 24630008 */ addiu $v1, $v1, 8 -/* A9F18 80113818 25C20008 */ addiu $v0, $t6, 8 -/* A9F1C 8011381C ACA60000 */ sw $a2, ($a1) -/* A9F20 80113820 AE030000 */ sw $v1, ($s0) -/* A9F24 80113824 ACA20004 */ sw $v0, 4($a1) -/* A9F28 80113828 0060282D */ daddu $a1, $v1, $zero -/* A9F2C 8011382C 24630008 */ addiu $v1, $v1, 8 -/* A9F30 80113830 25C20018 */ addiu $v0, $t6, 0x18 -/* A9F34 80113834 AC870000 */ sw $a3, ($a0) -/* A9F38 80113838 AE030000 */ sw $v1, ($s0) -/* A9F3C 8011383C AC820004 */ sw $v0, 4($a0) -/* A9F40 80113840 0060202D */ daddu $a0, $v1, $zero -/* A9F44 80113844 24630008 */ addiu $v1, $v1, 8 -/* A9F48 80113848 25C20028 */ addiu $v0, $t6, 0x28 -/* A9F4C 8011384C ACA80000 */ sw $t0, ($a1) -/* A9F50 80113850 AE030000 */ sw $v1, ($s0) -/* A9F54 80113854 ACA20004 */ sw $v0, 4($a1) -/* A9F58 80113858 0060282D */ daddu $a1, $v1, $zero -/* A9F5C 8011385C 24630008 */ addiu $v1, $v1, 8 -/* A9F60 80113860 25C20038 */ addiu $v0, $t6, 0x38 -/* A9F64 80113864 AC890000 */ sw $t1, ($a0) -/* A9F68 80113868 AE030000 */ sw $v1, ($s0) -/* A9F6C 8011386C AC820004 */ sw $v0, 4($a0) -/* A9F70 80113870 0060202D */ daddu $a0, $v1, $zero -/* A9F74 80113874 24630008 */ addiu $v1, $v1, 8 -/* A9F78 80113878 25C20048 */ addiu $v0, $t6, 0x48 -/* A9F7C 8011387C ACAA0000 */ sw $t2, ($a1) -/* A9F80 80113880 AE030000 */ sw $v1, ($s0) -/* A9F84 80113884 ACA20004 */ sw $v0, 4($a1) -/* A9F88 80113888 25C20058 */ addiu $v0, $t6, 0x58 -/* A9F8C 8011388C AC820004 */ sw $v0, 4($a0) -/* A9F90 80113890 0060102D */ daddu $v0, $v1, $zero -/* A9F94 80113894 24630008 */ addiu $v1, $v1, 8 -/* A9F98 80113898 AC8B0000 */ sw $t3, ($a0) -/* A9F9C 8011389C AE030000 */ sw $v1, ($s0) -/* A9FA0 801138A0 08044E71 */ j .L801139C4 -/* A9FA4 801138A4 AC4C0000 */ sw $t4, ($v0) -.L801138A8_A9FA8: -/* A9FA8 801138A8 3C06DC08 */ lui $a2, 0xdc08 -/* A9FAC 801138AC 34C6060A */ ori $a2, $a2, 0x60a -/* A9FB0 801138B0 3C07DC08 */ lui $a3, 0xdc08 -/* A9FB4 801138B4 34E7090A */ ori $a3, $a3, 0x90a -/* A9FB8 801138B8 3C08DC08 */ lui $t0, 0xdc08 -/* A9FBC 801138BC 35080C0A */ ori $t0, $t0, 0xc0a -/* A9FC0 801138C0 3C09DC08 */ lui $t1, 0xdc08 -/* A9FC4 801138C4 35290F0A */ ori $t1, $t1, 0xf0a -/* A9FC8 801138C8 3C0ADC08 */ lui $t2, 0xdc08 -/* A9FCC 801138CC 354A120A */ ori $t2, $t2, 0x120a -/* A9FD0 801138D0 3C0BDC08 */ lui $t3, 0xdc08 -/* A9FD4 801138D4 356B150A */ ori $t3, $t3, 0x150a -/* A9FD8 801138D8 3C0CDC08 */ lui $t4, 0xdc08 -/* A9FDC 801138DC 358C180A */ ori $t4, $t4, 0x180a -/* A9FE0 801138E0 3C0DDC08 */ lui $t5, 0xdc08 -/* A9FE4 801138E4 35AD1B0A */ ori $t5, $t5, 0x1b0a -/* A9FE8 801138E8 8E020000 */ lw $v0, ($s0) -/* A9FEC 801138EC 3C03DB02 */ lui $v1, 0xdb02 -/* A9FF0 801138F0 0040202D */ daddu $a0, $v0, $zero -/* A9FF4 801138F4 24420008 */ addiu $v0, $v0, 8 -/* A9FF8 801138F8 0040282D */ daddu $a1, $v0, $zero -/* A9FFC 801138FC AE020000 */ sw $v0, ($s0) -/* AA000 80113900 24420008 */ addiu $v0, $v0, 8 -/* AA004 80113904 AC830000 */ sw $v1, ($a0) -/* AA008 80113908 AE020000 */ sw $v0, ($s0) -/* AA00C 8011390C 0040182D */ daddu $v1, $v0, $zero -/* AA010 80113910 240200A8 */ addiu $v0, $zero, 0xa8 -/* AA014 80113914 AC820004 */ sw $v0, 4($a0) -/* AA018 80113918 0060202D */ daddu $a0, $v1, $zero -/* AA01C 8011391C 24630008 */ addiu $v1, $v1, 8 -/* AA020 80113920 25C20008 */ addiu $v0, $t6, 8 -/* AA024 80113924 ACA60000 */ sw $a2, ($a1) -/* AA028 80113928 AE030000 */ sw $v1, ($s0) -/* AA02C 8011392C ACA20004 */ sw $v0, 4($a1) -/* AA030 80113930 0060282D */ daddu $a1, $v1, $zero -/* AA034 80113934 24630008 */ addiu $v1, $v1, 8 -/* AA038 80113938 25C20018 */ addiu $v0, $t6, 0x18 -/* AA03C 8011393C AC870000 */ sw $a3, ($a0) -/* AA040 80113940 AE030000 */ sw $v1, ($s0) -/* AA044 80113944 AC820004 */ sw $v0, 4($a0) -/* AA048 80113948 0060202D */ daddu $a0, $v1, $zero -/* AA04C 8011394C 24630008 */ addiu $v1, $v1, 8 -/* AA050 80113950 25C20028 */ addiu $v0, $t6, 0x28 -/* AA054 80113954 ACA80000 */ sw $t0, ($a1) -/* AA058 80113958 AE030000 */ sw $v1, ($s0) -/* AA05C 8011395C ACA20004 */ sw $v0, 4($a1) -/* AA060 80113960 0060282D */ daddu $a1, $v1, $zero -/* AA064 80113964 24630008 */ addiu $v1, $v1, 8 -/* AA068 80113968 25C20038 */ addiu $v0, $t6, 0x38 -/* AA06C 8011396C 0060302D */ daddu $a2, $v1, $zero -/* AA070 80113970 AC890000 */ sw $t1, ($a0) -/* AA074 80113974 AE030000 */ sw $v1, ($s0) -/* AA078 80113978 24630008 */ addiu $v1, $v1, 8 -/* AA07C 8011397C AC820004 */ sw $v0, 4($a0) -/* AA080 80113980 25C20048 */ addiu $v0, $t6, 0x48 -/* AA084 80113984 0060202D */ daddu $a0, $v1, $zero -/* AA088 80113988 ACAA0000 */ sw $t2, ($a1) -/* AA08C 8011398C AE030000 */ sw $v1, ($s0) -/* AA090 80113990 24630008 */ addiu $v1, $v1, 8 -/* AA094 80113994 ACA20004 */ sw $v0, 4($a1) -/* AA098 80113998 25C20058 */ addiu $v0, $t6, 0x58 -/* AA09C 8011399C ACCB0000 */ sw $t3, ($a2) -/* AA0A0 801139A0 AE030000 */ sw $v1, ($s0) -/* AA0A4 801139A4 ACC20004 */ sw $v0, 4($a2) -/* AA0A8 801139A8 25C20068 */ addiu $v0, $t6, 0x68 -/* AA0AC 801139AC AC820004 */ sw $v0, 4($a0) -/* AA0B0 801139B0 0060102D */ daddu $v0, $v1, $zero -/* AA0B4 801139B4 24630008 */ addiu $v1, $v1, 8 -/* AA0B8 801139B8 AC8C0000 */ sw $t4, ($a0) -/* AA0BC 801139BC AE030000 */ sw $v1, ($s0) -/* AA0C0 801139C0 AC4D0000 */ sw $t5, ($v0) -.L801139C4: -/* AA0C4 801139C4 AC4E0004 */ sw $t6, 4($v0) -.L801139C8: -/* AA0C8 801139C8 1240002D */ beqz $s2, .L80113A80 -/* AA0CC 801139CC 2FC20005 */ sltiu $v0, $fp, 5 -/* AA0D0 801139D0 10400022 */ beqz $v0, .L80113A5C -/* AA0D4 801139D4 2FC20003 */ sltiu $v0, $fp, 3 -/* AA0D8 801139D8 14400020 */ bnez $v0, .L80113A5C -/* AA0DC 801139DC 2405005F */ addiu $a1, $zero, 0x5f -/* AA0E0 801139E0 8FA40028 */ lw $a0, 0x28($sp) -/* AA0E4 801139E4 0C0456C3 */ jal get_model_property -/* AA0E8 801139E8 AFB80040 */ sw $t8, 0x40($sp) -/* AA0EC 801139EC 8FB80040 */ lw $t8, 0x40($sp) -/* AA0F0 801139F0 1040001A */ beqz $v0, .L80113A5C -/* AA0F4 801139F4 0240202D */ daddu $a0, $s2, $zero -/* AA0F8 801139F8 8C430008 */ lw $v1, 8($v0) -/* AA0FC 801139FC 94460006 */ lhu $a2, 6($v0) -/* AA100 80113A00 8C450004 */ lw $a1, 4($v0) -/* AA104 80113A04 8E22003C */ lw $v0, 0x3c($s1) -/* AA108 80113A08 AFA20010 */ sw $v0, 0x10($sp) -/* AA10C 80113A0C 00031303 */ sra $v0, $v1, 0xc -/* AA110 80113A10 3042000F */ andi $v0, $v0, 0xf -/* AA114 80113A14 00031C03 */ sra $v1, $v1, 0x10 -/* AA118 80113A18 3063000F */ andi $v1, $v1, 0xf -/* AA11C 80113A1C 30C60FFF */ andi $a2, $a2, 0xfff -/* AA120 80113A20 00052B03 */ sra $a1, $a1, 0xc -/* AA124 80113A24 8E270040 */ lw $a3, 0x40($s1) -/* AA128 80113A28 30A50FFF */ andi $a1, $a1, 0xfff -/* AA12C 80113A2C AFA20018 */ sw $v0, 0x18($sp) -/* AA130 80113A30 AFA3001C */ sw $v1, 0x1c($sp) -/* AA134 80113A34 AFA60020 */ sw $a2, 0x20($sp) -/* AA138 80113A38 AFA50024 */ sw $a1, 0x24($sp) -/* AA13C 80113A3C AFA70014 */ sw $a3, 0x14($sp) -/* AA140 80113A40 8E260034 */ lw $a2, 0x34($s1) -/* AA144 80113A44 8E270038 */ lw $a3, 0x38($s1) -/* AA148 80113A48 0C04603A */ jal func_801180E8 -/* AA14C 80113A4C 0200282D */ daddu $a1, $s0, $zero -/* AA150 80113A50 8FB80040 */ lw $t8, 0x40($sp) -/* AA154 80113A54 08044EBF */ j .L80113AFC -/* AA158 80113A58 00000000 */ nop -.L80113A5C: -/* AA15C 80113A5C 8E030000 */ lw $v1, ($s0) -/* AA160 80113A60 3C02DE00 */ lui $v0, 0xde00 -/* AA164 80113A64 0060202D */ daddu $a0, $v1, $zero -/* AA168 80113A68 AC820000 */ sw $v0, ($a0) -/* AA16C 80113A6C 8E220000 */ lw $v0, ($s1) -/* AA170 80113A70 24630008 */ addiu $v1, $v1, 8 -/* AA174 80113A74 AE030000 */ sw $v1, ($s0) -/* AA178 80113A78 08044EBF */ j .L80113AFC -/* AA17C 80113A7C AC820004 */ sw $v0, 4($a0) -.L80113A80: -/* AA180 80113A80 3C0AFCFF */ lui $t2, 0xfcff -/* AA184 80113A84 354AFFFF */ ori $t2, $t2, 0xffff -/* AA188 80113A88 3C09FFFE */ lui $t1, 0xfffe -/* AA18C 80113A8C 3529793C */ ori $t1, $t1, 0x793c -/* AA190 80113A90 3C08E300 */ lui $t0, 0xe300 -/* AA194 80113A94 35081801 */ ori $t0, $t0, 0x1801 -/* AA198 80113A98 3C07E300 */ lui $a3, 0xe300 -/* AA19C 80113A9C 8E020000 */ lw $v0, ($s0) -/* AA1A0 80113AA0 34E71A01 */ ori $a3, $a3, 0x1a01 -/* AA1A4 80113AA4 0040302D */ daddu $a2, $v0, $zero -/* AA1A8 80113AA8 24420008 */ addiu $v0, $v0, 8 -/* AA1AC 80113AAC 0040282D */ daddu $a1, $v0, $zero -/* AA1B0 80113AB0 AE020000 */ sw $v0, ($s0) -/* AA1B4 80113AB4 24420008 */ addiu $v0, $v0, 8 -/* AA1B8 80113AB8 0040202D */ daddu $a0, $v0, $zero -/* AA1BC 80113ABC AE020000 */ sw $v0, ($s0) -/* AA1C0 80113AC0 24420008 */ addiu $v0, $v0, 8 -/* AA1C4 80113AC4 AE020000 */ sw $v0, ($s0) -/* AA1C8 80113AC8 0040182D */ daddu $v1, $v0, $zero -/* AA1CC 80113ACC 3C02D700 */ lui $v0, 0xd700 -/* AA1D0 80113AD0 ACC20000 */ sw $v0, ($a2) -/* AA1D4 80113AD4 0060102D */ daddu $v0, $v1, $zero -/* AA1D8 80113AD8 24630008 */ addiu $v1, $v1, 8 -/* AA1DC 80113ADC ACC00004 */ sw $zero, 4($a2) -/* AA1E0 80113AE0 ACAA0000 */ sw $t2, ($a1) -/* AA1E4 80113AE4 ACA90004 */ sw $t1, 4($a1) -/* AA1E8 80113AE8 AC880000 */ sw $t0, ($a0) -/* AA1EC 80113AEC AC800004 */ sw $zero, 4($a0) -/* AA1F0 80113AF0 AE030000 */ sw $v1, ($s0) -/* AA1F4 80113AF4 AC470000 */ sw $a3, ($v0) -/* AA1F8 80113AF8 AC400004 */ sw $zero, 4($v0) -.L80113AFC: -/* AA1FC 80113AFC 8FAF0044 */ lw $t7, 0x44($sp) -/* AA200 80113B00 15E00007 */ bnez $t7, .L80113B20 -/* AA204 80113B04 00141600 */ sll $v0, $s4, 0x18 -/* AA208 80113B08 00021E03 */ sra $v1, $v0, 0x18 -/* AA20C 80113B0C 2402000D */ addiu $v0, $zero, 0xd -/* AA210 80113B10 10620003 */ beq $v1, $v0, .L80113B20 -/* AA214 80113B14 2402000F */ addiu $v0, $zero, 0xf -/* AA218 80113B18 14620036 */ bne $v1, $v0, .L80113BF4 -/* AA21C 80113B1C 2663FFFF */ addiu $v1, $s3, -1 -.L80113B20: -/* AA220 80113B20 1240000D */ beqz $s2, .L80113B58 -/* AA224 80113B24 0000182D */ daddu $v1, $zero, $zero -/* AA228 80113B28 9644002A */ lhu $a0, 0x2a($s2) -/* AA22C 80113B2C 00041A82 */ srl $v1, $a0, 0xa -/* AA230 80113B30 2C620003 */ sltiu $v0, $v1, 3 -/* AA234 80113B34 54400003 */ bnel $v0, $zero, .L80113B44 -/* AA238 80113B38 001E1840 */ sll $v1, $fp, 1 -/* AA23C 80113B3C 08044ED6 */ j .L80113B58 -/* AA240 80113B40 2463000A */ addiu $v1, $v1, 0xa -.L80113B44: -/* AA244 80113B44 007E1821 */ addu $v1, $v1, $fp -/* AA248 80113B48 00041202 */ srl $v0, $a0, 8 -/* AA24C 80113B4C 30420003 */ andi $v0, $v0, 3 -/* AA250 80113B50 24420001 */ addiu $v0, $v0, 1 -/* AA254 80113B54 00621821 */ addu $v1, $v1, $v0 -.L80113B58: -/* AA258 80113B58 00141600 */ sll $v0, $s4, 0x18 -/* AA25C 80113B5C 00022603 */ sra $a0, $v0, 0x18 -/* AA260 80113B60 2402000D */ addiu $v0, $zero, 0xd -/* AA264 80113B64 10820011 */ beq $a0, $v0, .L80113BAC -/* AA268 80113B68 2402000F */ addiu $v0, $zero, 0xf -/* AA26C 80113B6C 1082000F */ beq $a0, $v0, .L80113BAC -/* AA270 80113B70 00031080 */ sll $v0, $v1, 2 -/* AA274 80113B74 00431021 */ addu $v0, $v0, $v1 -/* AA278 80113B78 8FB50044 */ lw $s5, 0x44($sp) -/* AA27C 80113B7C 8E030000 */ lw $v1, ($s0) -/* AA280 80113B80 00551021 */ addu $v0, $v0, $s5 -/* AA284 80113B84 000210C0 */ sll $v0, $v0, 3 -/* AA288 80113B88 3C198015 */ lui $t9, %hi(D_8014B0B8) -/* AA28C 80113B8C 0322C821 */ addu $t9, $t9, $v0 -/* AA290 80113B90 8F39B0B8 */ lw $t9, %lo(D_8014B0B8)($t9) -/* AA294 80113B94 3C0D8015 */ lui $t5, %hi(D_8014B0B8 + 0x4) -/* AA298 80113B98 01A26821 */ addu $t5, $t5, $v0 -/* AA29C 80113B9C 8DADB0BC */ lw $t5, %lo(D_8014B0B8 + 0x4)($t5) -/* AA2A0 80113BA0 AC790000 */ sw $t9, ($v1) -/* AA2A4 80113BA4 08044EF9 */ j .L80113BE4 -/* AA2A8 80113BA8 AC6D0004 */ sw $t5, 4($v1) -.L80113BAC: -/* AA2AC 80113BAC 00031080 */ sll $v0, $v1, 2 -/* AA2B0 80113BB0 00431021 */ addu $v0, $v0, $v1 -/* AA2B4 80113BB4 8FB90044 */ lw $t9, 0x44($sp) -/* AA2B8 80113BB8 8E030000 */ lw $v1, ($s0) -/* AA2BC 80113BBC 00591021 */ addu $v0, $v0, $t9 -/* AA2C0 80113BC0 000210C0 */ sll $v0, $v0, 3 -/* AA2C4 80113BC4 3C0D8015 */ lui $t5, %hi(D_8014B400) -/* AA2C8 80113BC8 01A26821 */ addu $t5, $t5, $v0 -/* AA2CC 80113BCC 8DADB400 */ lw $t5, %lo(D_8014B400)($t5) -/* AA2D0 80113BD0 3C0F8015 */ lui $t7, %hi(D_8014B400 + 0x4) -/* AA2D4 80113BD4 01E27821 */ addu $t7, $t7, $v0 -/* AA2D8 80113BD8 8DEFB404 */ lw $t7, %lo(D_8014B400 + 0x4)($t7) -/* AA2DC 80113BDC AC6D0000 */ sw $t5, ($v1) -/* AA2E0 80113BE0 AC6F0004 */ sw $t7, 4($v1) -.L80113BE4: -/* AA2E4 80113BE4 8E020000 */ lw $v0, ($s0) -/* AA2E8 80113BE8 24420008 */ addiu $v0, $v0, 8 -/* AA2EC 80113BEC AE020000 */ sw $v0, ($s0) -/* AA2F0 80113BF0 2663FFFF */ addiu $v1, $s3, -1 -.L80113BF4: -/* AA2F4 80113BF4 2C62000B */ sltiu $v0, $v1, 0xb -/* AA2F8 80113BF8 104002A5 */ beqz $v0, .L80114690_AAD90 -/* AA2FC 80113BFC 00031080 */ sll $v0, $v1, 2 -/* AA300 80113C00 3C018015 */ lui $at, %hi(jtbl_8014F9B0) -/* AA304 80113C04 00220821 */ addu $at, $at, $v0 -/* AA308 80113C08 8C22F9B0 */ lw $v0, %lo(jtbl_8014F9B0)($at) -/* AA30C 80113C0C 00400008 */ jr $v0 -/* AA310 80113C10 00000000 */ nop -.L80113C14_AA314: -/* AA314 80113C14 2682FFFF */ addiu $v0, $s4, -1 -/* AA318 80113C18 00021600 */ sll $v0, $v0, 0x18 -/* AA31C 80113C1C 00021E03 */ sra $v1, $v0, 0x18 -/* AA320 80113C20 2C62002F */ sltiu $v0, $v1, 0x2f -/* AA324 80113C24 1040002A */ beqz $v0, .L80113CD0_AA3D0 -/* AA328 80113C28 00031080 */ sll $v0, $v1, 2 -/* AA32C 80113C2C 3C018015 */ lui $at, %hi(jtbl_8014F9E0) -/* AA330 80113C30 00220821 */ addu $at, $at, $v0 -/* AA334 80113C34 8C22F9E0 */ lw $v0, %lo(jtbl_8014F9E0)($at) -/* AA338 80113C38 00400008 */ jr $v0 -/* AA33C 80113C3C 00000000 */ nop -.L80113C40_AA340: -/* AA340 80113C40 08045199 */ j .L80114664 -/* AA344 80113C44 24050001 */ addiu $a1, $zero, 1 -.L80113C48_AA348: -/* AA348 80113C48 08045199 */ j .L80114664 -/* AA34C 80113C4C 24050002 */ addiu $a1, $zero, 2 -.L80113C50_AA350: -/* AA350 80113C50 08045199 */ j .L80114664 -/* AA354 80113C54 24050003 */ addiu $a1, $zero, 3 -.L80113C58_AA358: -/* AA358 80113C58 08045199 */ j .L80114664 -/* AA35C 80113C5C 24050004 */ addiu $a1, $zero, 4 -.L80113C60_AA360: -/* AA360 80113C60 08045199 */ j .L80114664 -/* AA364 80113C64 24050006 */ addiu $a1, $zero, 6 -.L80113C68_AA368: -/* AA368 80113C68 08045199 */ j .L80114664 -/* AA36C 80113C6C 24050007 */ addiu $a1, $zero, 7 -.L80113C70_AA370: -/* AA370 80113C70 08045199 */ j .L80114664 -/* AA374 80113C74 24050009 */ addiu $a1, $zero, 9 -.L80113C78_AA378: -/* AA378 80113C78 08045199 */ j .L80114664 -/* AA37C 80113C7C 24050008 */ addiu $a1, $zero, 8 -.L80113C80_AA380: -/* AA380 80113C80 08045199 */ j .L80114664 -/* AA384 80113C84 2405000A */ addiu $a1, $zero, 0xa -.L80113C88_AA388: -/* AA388 80113C88 08045199 */ j .L80114664 -/* AA38C 80113C8C 2405000B */ addiu $a1, $zero, 0xb -.L80113C90_AA390: -/* AA390 80113C90 08045199 */ j .L80114664 -/* AA394 80113C94 2405000C */ addiu $a1, $zero, 0xc -.L80113C98_AA398: -/* AA398 80113C98 08045199 */ j .L80114664 -/* AA39C 80113C9C 2405000D */ addiu $a1, $zero, 0xd -.L80113CA0_AA3A0: -/* AA3A0 80113CA0 08045199 */ j .L80114664 -/* AA3A4 80113CA4 2405000E */ addiu $a1, $zero, 0xe -.L80113CA8_AA3A8: -/* AA3A8 80113CA8 08045199 */ j .L80114664 -/* AA3AC 80113CAC 2405002E */ addiu $a1, $zero, 0x2e -.L80113CB0_AA3B0: -/* AA3B0 80113CB0 08045199 */ j .L80114664 -/* AA3B4 80113CB4 2405002F */ addiu $a1, $zero, 0x2f -.L80113CB8_AA3B8: -/* AA3B8 80113CB8 08045199 */ j .L80114664 -/* AA3BC 80113CBC 24050030 */ addiu $a1, $zero, 0x30 -.L80113CC0_AA3C0: -/* AA3C0 80113CC0 08045199 */ j .L80114664 -/* AA3C4 80113CC4 24050037 */ addiu $a1, $zero, 0x37 -.L80113CC8_AA3C8: -/* AA3C8 80113CC8 08045199 */ j .L80114664 -/* AA3CC 80113CCC 24050038 */ addiu $a1, $zero, 0x38 -.L80113CD0_AA3D0: -/* AA3D0 80113CD0 08045199 */ j .L80114664 -/* AA3D4 80113CD4 0000282D */ daddu $a1, $zero, $zero -.L80113CD8_AA3D8: -/* AA3D8 80113CD8 2682FFFF */ addiu $v0, $s4, -1 -/* AA3DC 80113CDC 00021600 */ sll $v0, $v0, 0x18 -/* AA3E0 80113CE0 00021E03 */ sra $v1, $v0, 0x18 -/* AA3E4 80113CE4 2C62002F */ sltiu $v0, $v1, 0x2f -/* AA3E8 80113CE8 10400028 */ beqz $v0, .L80113D8C_AA48C -/* AA3EC 80113CEC 00031080 */ sll $v0, $v1, 2 -/* AA3F0 80113CF0 3C018015 */ lui $at, %hi(jtbl_8014FAA0) -/* AA3F4 80113CF4 00220821 */ addu $at, $at, $v0 -/* AA3F8 80113CF8 8C22FAA0 */ lw $v0, %lo(jtbl_8014FAA0)($at) -/* AA3FC 80113CFC 00400008 */ jr $v0 -/* AA400 80113D00 00000000 */ nop -.L80113D04_AA404: -/* AA404 80113D04 08045199 */ j .L80114664 -/* AA408 80113D08 24050011 */ addiu $a1, $zero, 0x11 -.L80113D0C_AA40C: -/* AA40C 80113D0C 08045199 */ j .L80114664 -/* AA410 80113D10 24050012 */ addiu $a1, $zero, 0x12 -.L80113D14_AA414: -/* AA414 80113D14 08045199 */ j .L80114664 -/* AA418 80113D18 24050013 */ addiu $a1, $zero, 0x13 -.L80113D1C_AA41C: -/* AA41C 80113D1C 08045199 */ j .L80114664 -/* AA420 80113D20 24050014 */ addiu $a1, $zero, 0x14 -.L80113D24_AA424: -/* AA424 80113D24 08045199 */ j .L80114664 -/* AA428 80113D28 24050016 */ addiu $a1, $zero, 0x16 -.L80113D2C_AA42C: -/* AA42C 80113D2C 08045199 */ j .L80114664 -/* AA430 80113D30 24050017 */ addiu $a1, $zero, 0x17 -.L80113D34_AA434: -/* AA434 80113D34 08045199 */ j .L80114664 -/* AA438 80113D38 24050018 */ addiu $a1, $zero, 0x18 -.L80113D3C_AA43C: -/* AA43C 80113D3C 08045199 */ j .L80114664 -/* AA440 80113D40 24050019 */ addiu $a1, $zero, 0x19 -.L80113D44_AA444: -/* AA444 80113D44 08045199 */ j .L80114664 -/* AA448 80113D48 2405001A */ addiu $a1, $zero, 0x1a -.L80113D4C_AA44C: -/* AA44C 80113D4C 08045199 */ j .L80114664 -/* AA450 80113D50 2405001B */ addiu $a1, $zero, 0x1b -.L80113D54_AA454: -/* AA454 80113D54 08045199 */ j .L80114664 -/* AA458 80113D58 2405001C */ addiu $a1, $zero, 0x1c -.L80113D5C_AA45C: -/* AA45C 80113D5C 08045199 */ j .L80114664 -/* AA460 80113D60 2405001D */ addiu $a1, $zero, 0x1d -.L80113D64_AA464: -/* AA464 80113D64 08045199 */ j .L80114664 -/* AA468 80113D68 24050031 */ addiu $a1, $zero, 0x31 -.L80113D6C_AA46C: -/* AA46C 80113D6C 08045199 */ j .L80114664 -/* AA470 80113D70 24050032 */ addiu $a1, $zero, 0x32 -.L80113D74_AA474: -/* AA474 80113D74 08045199 */ j .L80114664 -/* AA478 80113D78 24050033 */ addiu $a1, $zero, 0x33 -.L80113D7C_AA47C: -/* AA47C 80113D7C 08045199 */ j .L80114664 -/* AA480 80113D80 24050039 */ addiu $a1, $zero, 0x39 -.L80113D84_AA484: -/* AA484 80113D84 08045199 */ j .L80114664 -/* AA488 80113D88 2405003A */ addiu $a1, $zero, 0x3a -.L80113D8C_AA48C: -/* AA48C 80113D8C 08045199 */ j .L80114664 -/* AA490 80113D90 24050010 */ addiu $a1, $zero, 0x10 -.L80113D94_AA494: -/* AA494 80113D94 2682FFFF */ addiu $v0, $s4, -1 -/* AA498 80113D98 00021600 */ sll $v0, $v0, 0x18 -/* AA49C 80113D9C 00021E03 */ sra $v1, $v0, 0x18 -/* AA4A0 80113DA0 2C62002F */ sltiu $v0, $v1, 0x2f -/* AA4A4 80113DA4 10400028 */ beqz $v0, .L80113E48_AA548 -/* AA4A8 80113DA8 00031080 */ sll $v0, $v1, 2 -/* AA4AC 80113DAC 3C018015 */ lui $at, %hi(jtbl_8014FB60) -/* AA4B0 80113DB0 00220821 */ addu $at, $at, $v0 -/* AA4B4 80113DB4 8C22FB60 */ lw $v0, %lo(jtbl_8014FB60)($at) -/* AA4B8 80113DB8 00400008 */ jr $v0 -/* AA4BC 80113DBC 00000000 */ nop -.L80113DC0_AA4C0: -/* AA4C0 80113DC0 08044F93 */ j .L80113E4C -/* AA4C4 80113DC4 24050020 */ addiu $a1, $zero, 0x20 -.L80113DC8_AA4C8: -/* AA4C8 80113DC8 08044F93 */ j .L80113E4C -/* AA4CC 80113DCC 24050021 */ addiu $a1, $zero, 0x21 -.L80113DD0_AA4D0: -/* AA4D0 80113DD0 08044F93 */ j .L80113E4C -/* AA4D4 80113DD4 24050022 */ addiu $a1, $zero, 0x22 -.L80113DD8_AA4D8: -/* AA4D8 80113DD8 08044F93 */ j .L80113E4C -/* AA4DC 80113DDC 24050023 */ addiu $a1, $zero, 0x23 -.L80113DE0_AA4E0: -/* AA4E0 80113DE0 08044F93 */ j .L80113E4C -/* AA4E4 80113DE4 24050025 */ addiu $a1, $zero, 0x25 -.L80113DE8_AA4E8: -/* AA4E8 80113DE8 08044F93 */ j .L80113E4C -/* AA4EC 80113DEC 24050026 */ addiu $a1, $zero, 0x26 -.L80113DF0_AA4F0: -/* AA4F0 80113DF0 08044F93 */ j .L80113E4C -/* AA4F4 80113DF4 24050027 */ addiu $a1, $zero, 0x27 -.L80113DF8_AA4F8: -/* AA4F8 80113DF8 08044F93 */ j .L80113E4C -/* AA4FC 80113DFC 24050028 */ addiu $a1, $zero, 0x28 -.L80113E00_AA500: -/* AA500 80113E00 08044F93 */ j .L80113E4C -/* AA504 80113E04 24050029 */ addiu $a1, $zero, 0x29 -.L80113E08_AA508: -/* AA508 80113E08 08044F93 */ j .L80113E4C -/* AA50C 80113E0C 2405002A */ addiu $a1, $zero, 0x2a -.L80113E10_AA510: -/* AA510 80113E10 08044F93 */ j .L80113E4C -/* AA514 80113E14 2405002B */ addiu $a1, $zero, 0x2b -.L80113E18_AA518: -/* AA518 80113E18 08044F93 */ j .L80113E4C -/* AA51C 80113E1C 2405002C */ addiu $a1, $zero, 0x2c -.L80113E20_AA520: -/* AA520 80113E20 08044F93 */ j .L80113E4C -/* AA524 80113E24 24050034 */ addiu $a1, $zero, 0x34 -.L80113E28_AA528: -/* AA528 80113E28 08044F93 */ j .L80113E4C -/* AA52C 80113E2C 24050035 */ addiu $a1, $zero, 0x35 -.L80113E30_AA530: -/* AA530 80113E30 08044F93 */ j .L80113E4C -/* AA534 80113E34 24050036 */ addiu $a1, $zero, 0x36 -.L80113E38_AA538: -/* AA538 80113E38 08044F93 */ j .L80113E4C -/* AA53C 80113E3C 2405003B */ addiu $a1, $zero, 0x3b -.L80113E40_AA540: -/* AA540 80113E40 08044F93 */ j .L80113E4C -/* AA544 80113E44 2405003C */ addiu $a1, $zero, 0x3c -.L80113E48_AA548: -/* AA548 80113E48 2405001F */ addiu $a1, $zero, 0x1f -.L80113E4C: -/* AA54C 80113E4C 3C03DE00 */ lui $v1, 0xde00 -/* AA550 80113E50 8E020000 */ lw $v0, ($s0) -/* AA554 80113E54 3C060001 */ lui $a2, 1 -/* AA558 80113E58 0040202D */ daddu $a0, $v0, $zero -/* AA55C 80113E5C 24420008 */ addiu $v0, $v0, 8 -/* AA560 80113E60 0040482D */ daddu $t1, $v0, $zero -/* AA564 80113E64 AE020000 */ sw $v0, ($s0) -/* AA568 80113E68 24420008 */ addiu $v0, $v0, 8 -/* AA56C 80113E6C AC830000 */ sw $v1, ($a0) -/* AA570 80113E70 AE020000 */ sw $v0, ($s0) -/* AA574 80113E74 0040382D */ daddu $a3, $v0, $zero -/* AA578 80113E78 00051080 */ sll $v0, $a1, 2 -/* AA57C 80113E7C 3C018015 */ lui $at, %hi(D_8014AFC0) -/* AA580 80113E80 00220821 */ addu $at, $at, $v0 -/* AA584 80113E84 8C22AFC0 */ lw $v0, %lo(D_8014AFC0)($at) -/* AA588 80113E88 3C088015 */ lui $t0, %hi(gCurrentFogSettings) -/* AA58C 80113E8C 25083264 */ addiu $t0, $t0, %lo(gCurrentFogSettings) -/* AA590 80113E90 AC820004 */ sw $v0, 4($a0) -/* AA594 80113E94 8D050000 */ lw $a1, ($t0) -/* AA598 80113E98 3C02F800 */ lui $v0, 0xf800 -/* AA59C 80113E9C AD220000 */ sw $v0, ($t1) -/* AA5A0 80113EA0 90A20007 */ lbu $v0, 7($a1) -/* AA5A4 80113EA4 90A3000B */ lbu $v1, 0xb($a1) -/* AA5A8 80113EA8 90A4000F */ lbu $a0, 0xf($a1) -/* AA5AC 80113EAC 00021600 */ sll $v0, $v0, 0x18 -/* AA5B0 80113EB0 00031C00 */ sll $v1, $v1, 0x10 -/* AA5B4 80113EB4 00431025 */ or $v0, $v0, $v1 -/* AA5B8 80113EB8 00042200 */ sll $a0, $a0, 8 -/* AA5BC 80113EBC 00441025 */ or $v0, $v0, $a0 -/* AA5C0 80113EC0 90A30013 */ lbu $v1, 0x13($a1) -/* AA5C4 80113EC4 00E0282D */ daddu $a1, $a3, $zero -/* AA5C8 80113EC8 00431025 */ or $v0, $v0, $v1 -/* AA5CC 80113ECC AD220004 */ sw $v0, 4($t1) -/* AA5D0 80113ED0 8D040000 */ lw $a0, ($t0) -/* AA5D4 80113ED4 3C02DB08 */ lui $v0, 0xdb08 -/* AA5D8 80113ED8 ACA20000 */ sw $v0, ($a1) -/* AA5DC 80113EDC 8C830018 */ lw $v1, 0x18($a0) -/* AA5E0 80113EE0 8C840014 */ lw $a0, 0x14($a0) -/* AA5E4 80113EE4 34C6F400 */ ori $a2, $a2, 0xf400 -/* AA5E8 80113EE8 00641823 */ subu $v1, $v1, $a0 -/* AA5EC 80113EEC 14600002 */ bnez $v1, .L80113EF8 -/* AA5F0 80113EF0 00C3001A */ div $zero, $a2, $v1 -/* AA5F4 80113EF4 0007000D */ break 7 -.L80113EF8: -/* AA5F8 80113EF8 2401FFFF */ addiu $at, $zero, -1 -/* AA5FC 80113EFC 14610004 */ bne $v1, $at, .L80113F10 -/* AA600 80113F00 3C018000 */ lui $at, 0x8000 -/* AA604 80113F04 14C10002 */ bne $a2, $at, .L80113F10 -/* AA608 80113F08 00000000 */ nop -/* AA60C 80113F0C 0006000D */ break 6 -.L80113F10: -/* AA610 80113F10 00003012 */ mflo $a2 -/* AA614 80113F14 240201F4 */ addiu $v0, $zero, 0x1f4 -/* AA618 80113F18 00441023 */ subu $v0, $v0, $a0 -/* AA61C 80113F1C 00021200 */ sll $v0, $v0, 8 -/* AA620 80113F20 14600002 */ bnez $v1, .L80113F2C -/* AA624 80113F24 0043001A */ div $zero, $v0, $v1 -/* AA628 80113F28 0007000D */ break 7 -.L80113F2C: -/* AA62C 80113F2C 2401FFFF */ addiu $at, $zero, -1 -/* AA630 80113F30 14610004 */ bne $v1, $at, .L80113F44 -/* AA634 80113F34 3C018000 */ lui $at, 0x8000 -/* AA638 80113F38 14410002 */ bne $v0, $at, .L80113F44 -/* AA63C 80113F3C 00000000 */ nop -/* AA640 80113F40 0006000D */ break 6 -.L80113F44: -/* AA644 80113F44 00001012 */ mflo $v0 -/* AA648 80113F48 24E70008 */ addiu $a3, $a3, 8 -/* AA64C 80113F4C AE070000 */ sw $a3, ($s0) -/* AA650 80113F50 00063400 */ sll $a2, $a2, 0x10 -/* AA654 80113F54 3042FFFF */ andi $v0, $v0, 0xffff -/* AA658 80113F58 00C23025 */ or $a2, $a2, $v0 -/* AA65C 80113F5C 080451A4 */ j .L80114690_AAD90 -/* AA660 80113F60 ACA60004 */ sw $a2, 4($a1) -.L80113F64_AA664: -/* AA664 80113F64 3C038015 */ lui $v1, %hi(mdl_bgMultiplyColorA) -/* AA668 80113F68 9063B74C */ lbu $v1, %lo(mdl_bgMultiplyColorA)($v1) -/* AA66C 80113F6C 240200FF */ addiu $v0, $zero, 0xff -/* AA670 80113F70 106202ED */ beq $v1, $v0, .L80114B28 -/* AA674 80113F74 3C02DE00 */ lui $v0, 0xde00 -/* AA678 80113F78 8E030000 */ lw $v1, ($s0) -/* AA67C 80113F7C 0060202D */ daddu $a0, $v1, $zero -/* AA680 80113F80 AC820000 */ sw $v0, ($a0) -/* AA684 80113F84 3C028015 */ lui $v0, %hi(D_8014AFC0 + 0x40) -/* AA688 80113F88 8C42B000 */ lw $v0, %lo(D_8014AFC0 + 0x40)($v0) -/* AA68C 80113F8C 24630008 */ addiu $v1, $v1, 8 -/* AA690 80113F90 AE030000 */ sw $v1, ($s0) -/* AA694 80113F94 AC820004 */ sw $v0, 4($a0) -/* AA698 80113F98 2682FFFF */ addiu $v0, $s4, -1 -/* AA69C 80113F9C 00021600 */ sll $v0, $v0, 0x18 -/* AA6A0 80113FA0 00021E03 */ sra $v1, $v0, 0x18 -/* AA6A4 80113FA4 2C62002F */ sltiu $v0, $v1, 0x2f -/* AA6A8 80113FA8 104000A2 */ beqz $v0, .L80114234_AA934 -/* AA6AC 80113FAC 00031080 */ sll $v0, $v1, 2 -/* AA6B0 80113FB0 3C018015 */ lui $at, %hi(jtbl_8014FC20) -/* AA6B4 80113FB4 00220821 */ addu $at, $at, $v0 -/* AA6B8 80113FB8 8C22FC20 */ lw $v0, %lo(jtbl_8014FC20)($at) -/* AA6BC 80113FBC 00400008 */ jr $v0 -/* AA6C0 80113FC0 00000000 */ nop -.L80113FC4_AA6C4: -/* AA6C4 80113FC4 3C06E200 */ lui $a2, 0xe200 -/* AA6C8 80113FC8 34C6001C */ ori $a2, $a2, 0x1c -/* AA6CC 80113FCC 3C058411 */ lui $a1, 0x8411 -/* AA6D0 80113FD0 3C04800A */ lui $a0, %hi(gMasterGfxPos) -/* AA6D4 80113FD4 2484A66C */ addiu $a0, $a0, %lo(gMasterGfxPos) -/* AA6D8 80113FD8 8C820000 */ lw $v0, ($a0) -/* AA6DC 80113FDC 08045088 */ j .L80114220 -/* AA6E0 80113FE0 34A52078 */ ori $a1, $a1, 0x2078 -.L80113FE4_AA6E4: -/* AA6E4 80113FE4 3C06E200 */ lui $a2, 0xe200 -/* AA6E8 80113FE8 34C6001C */ ori $a2, $a2, 0x1c -/* AA6EC 80113FEC 3C058411 */ lui $a1, 0x8411 -/* AA6F0 80113FF0 3C04800A */ lui $a0, %hi(gMasterGfxPos) -/* AA6F4 80113FF4 2484A66C */ addiu $a0, $a0, %lo(gMasterGfxPos) -/* AA6F8 80113FF8 8C820000 */ lw $v0, ($a0) -/* AA6FC 80113FFC 08045088 */ j .L80114220 -/* AA700 80114000 34A52230 */ ori $a1, $a1, 0x2230 -.L80114004_AA704: -/* AA704 80114004 3C06E200 */ lui $a2, 0xe200 -/* AA708 80114008 34C6001C */ ori $a2, $a2, 0x1c -/* AA70C 8011400C 3C058411 */ lui $a1, 0x8411 -/* AA710 80114010 3C04800A */ lui $a0, %hi(gMasterGfxPos) -/* AA714 80114014 2484A66C */ addiu $a0, $a0, %lo(gMasterGfxPos) -/* AA718 80114018 8C820000 */ lw $v0, ($a0) -/* AA71C 8011401C 08045088 */ j .L80114220 -/* AA720 80114020 34A52D58 */ ori $a1, $a1, 0x2d58 -.L80114024_AA724: -/* AA724 80114024 3C06E200 */ lui $a2, 0xe200 -/* AA728 80114028 34C6001C */ ori $a2, $a2, 0x1c -/* AA72C 8011402C 3C058411 */ lui $a1, 0x8411 -/* AA730 80114030 3C04800A */ lui $a0, %hi(gMasterGfxPos) -/* AA734 80114034 2484A66C */ addiu $a0, $a0, %lo(gMasterGfxPos) -/* AA738 80114038 8C820000 */ lw $v0, ($a0) -/* AA73C 8011403C 08045088 */ j .L80114220 -/* AA740 80114040 34A52E10 */ ori $a1, $a1, 0x2e10 -.L80114044_AA744: -/* AA744 80114044 3C06E200 */ lui $a2, 0xe200 -/* AA748 80114048 34C6001C */ ori $a2, $a2, 0x1c -/* AA74C 8011404C 3C058411 */ lui $a1, 0x8411 -/* AA750 80114050 3C04800A */ lui $a0, %hi(gMasterGfxPos) -/* AA754 80114054 2484A66C */ addiu $a0, $a0, %lo(gMasterGfxPos) -/* AA758 80114058 8C820000 */ lw $v0, ($a0) -/* AA75C 8011405C 08045088 */ j .L80114220 -/* AA760 80114060 34A52478 */ ori $a1, $a1, 0x2478 -.L80114064_AA764: -/* AA764 80114064 3C06E200 */ lui $a2, 0xe200 -/* AA768 80114068 34C6001C */ ori $a2, $a2, 0x1c -/* AA76C 8011406C 3C058411 */ lui $a1, 0x8411 -/* AA770 80114070 3C04800A */ lui $a0, %hi(gMasterGfxPos) -/* AA774 80114074 2484A66C */ addiu $a0, $a0, %lo(gMasterGfxPos) -/* AA778 80114078 8C820000 */ lw $v0, ($a0) -/* AA77C 8011407C 08045088 */ j .L80114220 -/* AA780 80114080 34A53078 */ ori $a1, $a1, 0x3078 -.L80114084_AA784: -/* AA784 80114084 3C06E200 */ lui $a2, 0xe200 -/* AA788 80114088 34C6001C */ ori $a2, $a2, 0x1c -/* AA78C 8011408C 3C058411 */ lui $a1, 0x8411 -/* AA790 80114090 3C04800A */ lui $a0, %hi(gMasterGfxPos) -/* AA794 80114094 2484A66C */ addiu $a0, $a0, %lo(gMasterGfxPos) -/* AA798 80114098 8C820000 */ lw $v0, ($a0) -/* AA79C 8011409C 08045088 */ j .L80114220 -/* AA7A0 801140A0 34A53078 */ ori $a1, $a1, 0x3078 -.L801140A4_AA7A4: -/* AA7A4 801140A4 3C06E200 */ lui $a2, 0xe200 -/* AA7A8 801140A8 34C6001C */ ori $a2, $a2, 0x1c -/* AA7AC 801140AC 3C058410 */ lui $a1, 0x8410 -/* AA7B0 801140B0 3C04800A */ lui $a0, %hi(gMasterGfxPos) -/* AA7B4 801140B4 2484A66C */ addiu $a0, $a0, %lo(gMasterGfxPos) -/* AA7B8 801140B8 8C820000 */ lw $v0, ($a0) -/* AA7BC 801140BC 08045088 */ j .L80114220 -/* AA7C0 801140C0 34A549D8 */ ori $a1, $a1, 0x49d8 -.L801140C4_AA7C4: -/* AA7C4 801140C4 3C06E200 */ lui $a2, 0xe200 -/* AA7C8 801140C8 34C6001C */ ori $a2, $a2, 0x1c -/* AA7CC 801140CC 3C058410 */ lui $a1, 0x8410 -/* AA7D0 801140D0 3C04800A */ lui $a0, %hi(gMasterGfxPos) -/* AA7D4 801140D4 2484A66C */ addiu $a0, $a0, %lo(gMasterGfxPos) -/* AA7D8 801140D8 8C820000 */ lw $v0, ($a0) -/* AA7DC 801140DC 08045088 */ j .L80114220 -/* AA7E0 801140E0 34A549D8 */ ori $a1, $a1, 0x49d8 -.L801140E4_AA7E4: -/* AA7E4 801140E4 3C06E200 */ lui $a2, 0xe200 -/* AA7E8 801140E8 34C6001C */ ori $a2, $a2, 0x1c -/* AA7EC 801140EC 3C058410 */ lui $a1, 0x8410 -/* AA7F0 801140F0 3C04800A */ lui $a0, %hi(gMasterGfxPos) -/* AA7F4 801140F4 2484A66C */ addiu $a0, $a0, %lo(gMasterGfxPos) -/* AA7F8 801140F8 8C820000 */ lw $v0, ($a0) -/* AA7FC 801140FC 08045088 */ j .L80114220 -/* AA800 80114100 34A549D8 */ ori $a1, $a1, 0x49d8 -.L80114104_AA804: -/* AA804 80114104 3C06E200 */ lui $a2, 0xe200 -/* AA808 80114108 34C6001C */ ori $a2, $a2, 0x1c -/* AA80C 8011410C 3C058410 */ lui $a1, 0x8410 -/* AA810 80114110 3C04800A */ lui $a0, %hi(gMasterGfxPos) -/* AA814 80114114 2484A66C */ addiu $a0, $a0, %lo(gMasterGfxPos) -/* AA818 80114118 8C820000 */ lw $v0, ($a0) -/* AA81C 8011411C 08045088 */ j .L80114220 -/* AA820 80114120 34A54A50 */ ori $a1, $a1, 0x4a50 -.L80114124_AA824: -/* AA824 80114124 3C06E200 */ lui $a2, 0xe200 -/* AA828 80114128 34C6001C */ ori $a2, $a2, 0x1c -/* AA82C 8011412C 3C058410 */ lui $a1, 0x8410 -/* AA830 80114130 3C04800A */ lui $a0, %hi(gMasterGfxPos) -/* AA834 80114134 2484A66C */ addiu $a0, $a0, %lo(gMasterGfxPos) -/* AA838 80114138 8C820000 */ lw $v0, ($a0) -/* AA83C 8011413C 08045088 */ j .L80114220 -/* AA840 80114140 34A54DD8 */ ori $a1, $a1, 0x4dd8 -.L80114144_AA844: -/* AA844 80114144 3C06E200 */ lui $a2, 0xe200 -/* AA848 80114148 34C6001C */ ori $a2, $a2, 0x1c -/* AA84C 8011414C 3C058410 */ lui $a1, 0x8410 -/* AA850 80114150 3C04800A */ lui $a0, %hi(gMasterGfxPos) -/* AA854 80114154 2484A66C */ addiu $a0, $a0, %lo(gMasterGfxPos) -/* AA858 80114158 8C820000 */ lw $v0, ($a0) -/* AA85C 8011415C 08045088 */ j .L80114220 -/* AA860 80114160 34A54DD8 */ ori $a1, $a1, 0x4dd8 -.L80114164_AA864: -/* AA864 80114164 3C06E200 */ lui $a2, 0xe200 -/* AA868 80114168 34C6001C */ ori $a2, $a2, 0x1c -/* AA86C 8011416C 3C058410 */ lui $a1, 0x8410 -/* AA870 80114170 3C04800A */ lui $a0, %hi(gMasterGfxPos) -/* AA874 80114174 2484A66C */ addiu $a0, $a0, %lo(gMasterGfxPos) -/* AA878 80114178 8C820000 */ lw $v0, ($a0) -/* AA87C 8011417C 08045088 */ j .L80114220 -/* AA880 80114180 34A545D8 */ ori $a1, $a1, 0x45d8 -.L80114184_AA884: -/* AA884 80114184 3C06E200 */ lui $a2, 0xe200 -/* AA888 80114188 34C6001C */ ori $a2, $a2, 0x1c -/* AA88C 8011418C 3C058411 */ lui $a1, 0x8411 -/* AA890 80114190 3C04800A */ lui $a0, %hi(gMasterGfxPos) -/* AA894 80114194 2484A66C */ addiu $a0, $a0, %lo(gMasterGfxPos) -/* AA898 80114198 8C820000 */ lw $v0, ($a0) -/* AA89C 8011419C 08045088 */ j .L80114220 -/* AA8A0 801141A0 34A52048 */ ori $a1, $a1, 0x2048 -.L801141A4_AA8A4: -/* AA8A4 801141A4 3C06E200 */ lui $a2, 0xe200 -/* AA8A8 801141A8 34C6001C */ ori $a2, $a2, 0x1c -/* AA8AC 801141AC 3C058411 */ lui $a1, 0x8411 -/* AA8B0 801141B0 3C04800A */ lui $a0, %hi(gMasterGfxPos) -/* AA8B4 801141B4 2484A66C */ addiu $a0, $a0, %lo(gMasterGfxPos) -/* AA8B8 801141B8 8C820000 */ lw $v0, ($a0) -/* AA8BC 801141BC 08045088 */ j .L80114220 -/* AA8C0 801141C0 34A53048 */ ori $a1, $a1, 0x3048 -.L801141C4_AA8C4: -/* AA8C4 801141C4 3C06E200 */ lui $a2, 0xe200 -/* AA8C8 801141C8 34C6001C */ ori $a2, $a2, 0x1c -/* AA8CC 801141CC 3C058410 */ lui $a1, 0x8410 -/* AA8D0 801141D0 3C04800A */ lui $a0, %hi(gMasterGfxPos) -/* AA8D4 801141D4 2484A66C */ addiu $a0, $a0, %lo(gMasterGfxPos) -/* AA8D8 801141D8 8C820000 */ lw $v0, ($a0) -/* AA8DC 801141DC 08045088 */ j .L80114220 -/* AA8E0 801141E0 34A541C8 */ ori $a1, $a1, 0x41c8 -.L801141E4_AA8E4: -/* AA8E4 801141E4 3C06E200 */ lui $a2, 0xe200 -/* AA8E8 801141E8 34C6001C */ ori $a2, $a2, 0x1c -/* AA8EC 801141EC 3C058410 */ lui $a1, 0x8410 -/* AA8F0 801141F0 3C04800A */ lui $a0, %hi(gMasterGfxPos) -/* AA8F4 801141F4 2484A66C */ addiu $a0, $a0, %lo(gMasterGfxPos) -/* AA8F8 801141F8 8C820000 */ lw $v0, ($a0) -/* AA8FC 801141FC 08045088 */ j .L80114220 -/* AA900 80114200 34A54B50 */ ori $a1, $a1, 0x4b50 -.L80114204_AA904: -/* AA904 80114204 3C06E200 */ lui $a2, 0xe200 -/* AA908 80114208 34C6001C */ ori $a2, $a2, 0x1c -/* AA90C 8011420C 3C058410 */ lui $a1, 0x8410 -/* AA910 80114210 3C04800A */ lui $a0, %hi(gMasterGfxPos) -/* AA914 80114214 2484A66C */ addiu $a0, $a0, %lo(gMasterGfxPos) -/* AA918 80114218 8C820000 */ lw $v0, ($a0) -/* AA91C 8011421C 34A54340 */ ori $a1, $a1, 0x4340 -.L80114220: -/* AA920 80114220 0040182D */ daddu $v1, $v0, $zero -/* AA924 80114224 24420008 */ addiu $v0, $v0, 8 -/* AA928 80114228 AC820000 */ sw $v0, ($a0) -/* AA92C 8011422C AC660000 */ sw $a2, ($v1) -/* AA930 80114230 AC650004 */ sw $a1, 4($v1) -.L80114234_AA934: -/* AA934 80114234 3C0910AA */ lui $t1, 0x10aa -/* AA938 80114238 8E020000 */ lw $v0, ($s0) -/* AA93C 8011423C 3529F056 */ ori $t1, $t1, 0xf056 -/* AA940 80114240 0040382D */ daddu $a3, $v0, $zero -/* AA944 80114244 24420008 */ addiu $v0, $v0, 8 -/* AA948 80114248 AE020000 */ sw $v0, ($s0) -/* AA94C 8011424C 0040282D */ daddu $a1, $v0, $zero -/* AA950 80114250 3C02F800 */ lui $v0, 0xf800 -/* AA954 80114254 3C038015 */ lui $v1, %hi(gCurrentFogSettings) -/* AA958 80114258 8C633264 */ lw $v1, %lo(gCurrentFogSettings)($v1) -/* AA95C 8011425C 00A0402D */ daddu $t0, $a1, $zero -/* AA960 80114260 ACE20000 */ sw $v0, ($a3) -/* AA964 80114264 90620007 */ lbu $v0, 7($v1) -/* AA968 80114268 9064000B */ lbu $a0, 0xb($v1) -/* AA96C 8011426C 9066000F */ lbu $a2, 0xf($v1) -/* AA970 80114270 24A50008 */ addiu $a1, $a1, 8 -/* AA974 80114274 AE050000 */ sw $a1, ($s0) -/* AA978 80114278 3C038015 */ lui $v1, %hi(mdl_bgMultiplyColorA) -/* AA97C 8011427C 9063B74C */ lbu $v1, %lo(mdl_bgMultiplyColorA)($v1) -/* AA980 80114280 00021600 */ sll $v0, $v0, 0x18 -/* AA984 80114284 00042400 */ sll $a0, $a0, 0x10 -/* AA988 80114288 00441025 */ or $v0, $v0, $a0 -/* AA98C 8011428C 00063200 */ sll $a2, $a2, 8 -/* AA990 80114290 00461025 */ or $v0, $v0, $a2 -/* AA994 80114294 00431025 */ or $v0, $v0, $v1 -/* AA998 80114298 ACE20004 */ sw $v0, 4($a3) -/* AA99C 8011429C 3C02F900 */ lui $v0, 0xf900 -/* AA9A0 801142A0 AD020000 */ sw $v0, ($t0) -/* AA9A4 801142A4 3C028015 */ lui $v0, %hi(mdl_bgMultiplyColorR) -/* AA9A8 801142A8 9042B74D */ lbu $v0, %lo(mdl_bgMultiplyColorR)($v0) -/* AA9AC 801142AC 3C048015 */ lui $a0, %hi(mdl_bgMultiplyColorG) -/* AA9B0 801142B0 9084B74E */ lbu $a0, %lo(mdl_bgMultiplyColorG)($a0) -/* AA9B4 801142B4 3C038015 */ lui $v1, %hi(mdl_bgMultiplyColorB) -/* AA9B8 801142B8 9063B74F */ lbu $v1, %lo(mdl_bgMultiplyColorB)($v1) -/* AA9BC 801142BC 00021600 */ sll $v0, $v0, 0x18 -/* AA9C0 801142C0 00042400 */ sll $a0, $a0, 0x10 -/* AA9C4 801142C4 00441025 */ or $v0, $v0, $a0 -/* AA9C8 801142C8 00031A00 */ sll $v1, $v1, 8 -/* AA9CC 801142CC 00431025 */ or $v0, $v0, $v1 -/* AA9D0 801142D0 344200FF */ ori $v0, $v0, 0xff -/* AA9D4 801142D4 00A0182D */ daddu $v1, $a1, $zero -/* AA9D8 801142D8 24A50008 */ addiu $a1, $a1, 8 -/* AA9DC 801142DC AD020004 */ sw $v0, 4($t0) -/* AA9E0 801142E0 3C02DB08 */ lui $v0, 0xdb08 -/* AA9E4 801142E4 AE050000 */ sw $a1, ($s0) -/* AA9E8 801142E8 AC620000 */ sw $v0, ($v1) -/* AA9EC 801142EC 080451A4 */ j .L80114690_AAD90 -/* AA9F0 801142F0 AC690004 */ sw $t1, 4($v1) -.L801142F4_AA9F4: -/* AA9F4 801142F4 2682FFFF */ addiu $v0, $s4, -1 -/* AA9F8 801142F8 00021600 */ sll $v0, $v0, 0x18 -/* AA9FC 801142FC 00021E03 */ sra $v1, $v0, 0x18 -/* AAA00 80114300 2C62002F */ sltiu $v0, $v1, 0x2f -/* AAA04 80114304 10400028 */ beqz $v0, .L801143A8_AAAA8 -/* AAA08 80114308 00031080 */ sll $v0, $v1, 2 -/* AAA0C 8011430C 3C018015 */ lui $at, %hi(jtbl_8014FCE0) -/* AAA10 80114310 00220821 */ addu $at, $at, $v0 -/* AAA14 80114314 8C22FCE0 */ lw $v0, %lo(jtbl_8014FCE0)($at) -/* AAA18 80114318 00400008 */ jr $v0 -/* AAA1C 8011431C 00000000 */ nop -.L80114320_AAA20: -/* AAA20 80114320 080450EB */ j .L801143AC -/* AAA24 80114324 24050020 */ addiu $a1, $zero, 0x20 -.L80114328_AAA28: -/* AAA28 80114328 080450EB */ j .L801143AC -/* AAA2C 8011432C 24050021 */ addiu $a1, $zero, 0x21 -.L80114330_AAA30: -/* AAA30 80114330 080450EB */ j .L801143AC -/* AAA34 80114334 24050022 */ addiu $a1, $zero, 0x22 -.L80114338_AAA38: -/* AAA38 80114338 080450EB */ j .L801143AC -/* AAA3C 8011433C 24050023 */ addiu $a1, $zero, 0x23 -.L80114340_AAA40: -/* AAA40 80114340 080450EB */ j .L801143AC -/* AAA44 80114344 24050025 */ addiu $a1, $zero, 0x25 -.L80114348_AAA48: -/* AAA48 80114348 080450EB */ j .L801143AC -/* AAA4C 8011434C 24050026 */ addiu $a1, $zero, 0x26 -.L80114350_AAA50: -/* AAA50 80114350 080450EB */ j .L801143AC -/* AAA54 80114354 24050027 */ addiu $a1, $zero, 0x27 -.L80114358_AAA58: -/* AAA58 80114358 080450EB */ j .L801143AC -/* AAA5C 8011435C 24050028 */ addiu $a1, $zero, 0x28 -.L80114360_AAA60: -/* AAA60 80114360 080450EB */ j .L801143AC -/* AAA64 80114364 24050029 */ addiu $a1, $zero, 0x29 -.L80114368_AAA68: -/* AAA68 80114368 080450EB */ j .L801143AC -/* AAA6C 8011436C 2405002A */ addiu $a1, $zero, 0x2a -.L80114370_AAA70: -/* AAA70 80114370 080450EB */ j .L801143AC -/* AAA74 80114374 2405002B */ addiu $a1, $zero, 0x2b -.L80114378_AAA78: -/* AAA78 80114378 080450EB */ j .L801143AC -/* AAA7C 8011437C 2405002C */ addiu $a1, $zero, 0x2c -.L80114380_AAA80: -/* AAA80 80114380 080450EB */ j .L801143AC -/* AAA84 80114384 24050034 */ addiu $a1, $zero, 0x34 -.L80114388_AAA88: -/* AAA88 80114388 080450EB */ j .L801143AC -/* AAA8C 8011438C 24050035 */ addiu $a1, $zero, 0x35 -.L80114390_AAA90: -/* AAA90 80114390 080450EB */ j .L801143AC -/* AAA94 80114394 24050036 */ addiu $a1, $zero, 0x36 -.L80114398_AAA98: -/* AAA98 80114398 080450EB */ j .L801143AC -/* AAA9C 8011439C 2405003B */ addiu $a1, $zero, 0x3b -.L801143A0_AAAA0: -/* AAAA0 801143A0 080450EB */ j .L801143AC -/* AAAA4 801143A4 2405003C */ addiu $a1, $zero, 0x3c -.L801143A8_AAAA8: -/* AAAA8 801143A8 2405001F */ addiu $a1, $zero, 0x1f -.L801143AC: -/* AAAAC 801143AC 3C02DE00 */ lui $v0, 0xde00 -/* AAAB0 801143B0 8E0B0000 */ lw $t3, ($s0) -/* AAAB4 801143B4 3C0A8015 */ lui $t2, %hi(gCurrentFogSettings) -/* AAAB8 801143B8 8D4A3264 */ lw $t2, %lo(gCurrentFogSettings)($t2) -/* AAABC 801143BC 0160182D */ daddu $v1, $t3, $zero -/* AAAC0 801143C0 AC620000 */ sw $v0, ($v1) -/* AAAC4 801143C4 00051080 */ sll $v0, $a1, 2 -/* AAAC8 801143C8 3C018015 */ lui $at, %hi(D_8014AFC0) -/* AAACC 801143CC 00220821 */ addu $at, $at, $v0 -/* AAAD0 801143D0 8C22AFC0 */ lw $v0, %lo(D_8014AFC0)($at) -/* AAAD4 801143D4 3C058015 */ lui $a1, %hi(mdl_bgMultiplyColorA) -/* AAAD8 801143D8 90A5B74C */ lbu $a1, %lo(mdl_bgMultiplyColorA)($a1) -/* AAADC 801143DC 240700FF */ addiu $a3, $zero, 0xff -/* AAAE0 801143E0 AC620004 */ sw $v0, 4($v1) -/* AAAE4 801143E4 8D420014 */ lw $v0, 0x14($t2) -/* AAAE8 801143E8 00E53823 */ subu $a3, $a3, $a1 -/* AAAEC 801143EC 00470018 */ mult $v0, $a3 -/* AAAF0 801143F0 3C0C8080 */ lui $t4, 0x8080 -/* AAAF4 801143F4 358C8081 */ ori $t4, $t4, 0x8081 -/* AAAF8 801143F8 3C090001 */ lui $t1, 1 -/* AAAFC 801143FC 00004012 */ mflo $t0 -/* AAB00 80114400 8D420018 */ lw $v0, 0x18($t2) -/* AAB04 80114404 3529F400 */ ori $t1, $t1, 0xf400 -/* AAB08 80114408 00470018 */ mult $v0, $a3 -/* AAB0C 8011440C 000518C0 */ sll $v1, $a1, 3 -/* AAB10 80114410 00651823 */ subu $v1, $v1, $a1 -/* AAB14 80114414 00031940 */ sll $v1, $v1, 5 -/* AAB18 80114418 00651821 */ addu $v1, $v1, $a1 -/* AAB1C 8011441C 00003012 */ mflo $a2 -/* AAB20 80114420 00031880 */ sll $v1, $v1, 2 -/* AAB24 80114424 01031821 */ addu $v1, $t0, $v1 -/* AAB28 80114428 006C0018 */ mult $v1, $t4 -/* AAB2C 8011442C 00051140 */ sll $v0, $a1, 5 -/* AAB30 80114430 00451023 */ subu $v0, $v0, $a1 -/* AAB34 80114434 00021080 */ sll $v0, $v0, 2 -/* AAB38 80114438 00451021 */ addu $v0, $v0, $a1 -/* AAB3C 8011443C 00002010 */ mfhi $a0 -/* AAB40 80114440 000210C0 */ sll $v0, $v0, 3 -/* AAB44 80114444 00C21021 */ addu $v0, $a2, $v0 -/* AAB48 80114448 004C0018 */ mult $v0, $t4 -/* AAB4C 8011444C 00832021 */ addu $a0, $a0, $v1 -/* AAB50 80114450 000421C3 */ sra $a0, $a0, 7 -/* AAB54 80114454 00031FC3 */ sra $v1, $v1, 0x1f -/* AAB58 80114458 00832023 */ subu $a0, $a0, $v1 -/* AAB5C 8011445C 00004010 */ mfhi $t0 -/* AAB60 80114460 01021821 */ addu $v1, $t0, $v0 -/* AAB64 80114464 000319C3 */ sra $v1, $v1, 7 -/* AAB68 80114468 000217C3 */ sra $v0, $v0, 0x1f -/* AAB6C 8011446C 00621823 */ subu $v1, $v1, $v0 -/* AAB70 80114470 00641823 */ subu $v1, $v1, $a0 -/* AAB74 80114474 14600002 */ bnez $v1, .L80114480 -/* AAB78 80114478 0123001A */ div $zero, $t1, $v1 -/* AAB7C 8011447C 0007000D */ break 7 -.L80114480: -/* AAB80 80114480 2401FFFF */ addiu $at, $zero, -1 -/* AAB84 80114484 14610004 */ bne $v1, $at, .L80114498 -/* AAB88 80114488 3C018000 */ lui $at, 0x8000 -/* AAB8C 8011448C 15210002 */ bne $t1, $at, .L80114498 -/* AAB90 80114490 00000000 */ nop -/* AAB94 80114494 0006000D */ break 6 -.L80114498: -/* AAB98 80114498 00004812 */ mflo $t1 -/* AAB9C 8011449C 240601F4 */ addiu $a2, $zero, 0x1f4 -/* AABA0 801144A0 00C43023 */ subu $a2, $a2, $a0 -/* AABA4 801144A4 00063200 */ sll $a2, $a2, 8 -/* AABA8 801144A8 14600002 */ bnez $v1, .L801144B4 -/* AABAC 801144AC 00C3001A */ div $zero, $a2, $v1 -/* AABB0 801144B0 0007000D */ break 7 -.L801144B4: -/* AABB4 801144B4 2401FFFF */ addiu $at, $zero, -1 -/* AABB8 801144B8 14610004 */ bne $v1, $at, .L801144CC -/* AABBC 801144BC 3C018000 */ lui $at, 0x8000 -/* AABC0 801144C0 14C10002 */ bne $a2, $at, .L801144CC -/* AABC4 801144C4 00000000 */ nop -/* AABC8 801144C8 0006000D */ break 6 -.L801144CC: -/* AABCC 801144CC 00003012 */ mflo $a2 -/* AABD0 801144D0 8D420004 */ lw $v0, 4($t2) -/* AABD4 801144D4 00000000 */ nop -/* AABD8 801144D8 00470018 */ mult $v0, $a3 -/* AABDC 801144DC 00001812 */ mflo $v1 -/* AABE0 801144E0 3C028015 */ lui $v0, %hi(mdl_bgMultiplyColorR) -/* AABE4 801144E4 9042B74D */ lbu $v0, %lo(mdl_bgMultiplyColorR)($v0) -/* AABE8 801144E8 00450018 */ mult $v0, $a1 -/* AABEC 801144EC 00004012 */ mflo $t0 -/* AABF0 801144F0 00684021 */ addu $t0, $v1, $t0 -/* AABF4 801144F4 00000000 */ nop -/* AABF8 801144F8 010C0018 */ mult $t0, $t4 -/* AABFC 801144FC 256B0008 */ addiu $t3, $t3, 8 -/* AAC00 80114500 AE0B0000 */ sw $t3, ($s0) -/* AAC04 80114504 0000A010 */ mfhi $s4 -/* AAC08 80114508 8D430008 */ lw $v1, 8($t2) -/* AAC0C 8011450C 00000000 */ nop -/* AAC10 80114510 00670018 */ mult $v1, $a3 -/* AAC14 80114514 3C04800A */ lui $a0, %hi(gMasterGfxPos) -/* AAC18 80114518 2484A66C */ addiu $a0, $a0, %lo(gMasterGfxPos) -/* AAC1C 8011451C 00008812 */ mflo $s1 -/* AAC20 80114520 3C038015 */ lui $v1, %hi(mdl_bgMultiplyColorG) -/* AAC24 80114524 9063B74E */ lbu $v1, %lo(mdl_bgMultiplyColorG)($v1) -/* AAC28 80114528 8C820000 */ lw $v0, ($a0) -/* AAC2C 8011452C 00650018 */ mult $v1, $a1 -/* AAC30 80114530 0040582D */ daddu $t3, $v0, $zero -/* AAC34 80114534 24420008 */ addiu $v0, $v0, 8 -/* AAC38 80114538 AC820000 */ sw $v0, ($a0) -/* AAC3C 8011453C 00009812 */ mflo $s3 -/* AAC40 80114540 8D43000C */ lw $v1, 0xc($t2) -/* AAC44 80114544 00000000 */ nop -/* AAC48 80114548 00670018 */ mult $v1, $a3 -/* AAC4C 8011454C 8E020000 */ lw $v0, ($s0) -/* AAC50 80114550 3C04F800 */ lui $a0, 0xf800 -/* AAC54 80114554 AD640000 */ sw $a0, ($t3) -/* AAC58 80114558 02882021 */ addu $a0, $s4, $t0 -/* AAC5C 8011455C 00007012 */ mflo $t6 -/* AAC60 80114560 3C038015 */ lui $v1, %hi(mdl_bgMultiplyColorB) -/* AAC64 80114564 9063B74F */ lbu $v1, %lo(mdl_bgMultiplyColorB)($v1) -/* AAC68 80114568 000421C3 */ sra $a0, $a0, 7 -/* AAC6C 8011456C 00650018 */ mult $v1, $a1 -/* AAC70 80114570 000847C3 */ sra $t0, $t0, 0x1f -/* AAC74 80114574 914A0013 */ lbu $t2, 0x13($t2) -/* AAC78 80114578 0040382D */ daddu $a3, $v0, $zero -/* AAC7C 8011457C 24420008 */ addiu $v0, $v0, 8 -/* AAC80 80114580 00006812 */ mflo $t5 -/* AAC84 80114584 AFAD0048 */ sw $t5, 0x48($sp) -/* AAC88 80114588 AE020000 */ sw $v0, ($s0) -/* AAC8C 8011458C 02331021 */ addu $v0, $s1, $s3 -/* AAC90 80114590 004C0018 */ mult $v0, $t4 -/* AAC94 80114594 00882023 */ subu $a0, $a0, $t0 -/* AAC98 80114598 8FAD0048 */ lw $t5, 0x48($sp) -/* AAC9C 8011459C 00042600 */ sll $a0, $a0, 0x18 -/* AACA0 801145A0 01CD2821 */ addu $a1, $t6, $t5 -/* AACA4 801145A4 00001810 */ mfhi $v1 -/* AACA8 801145A8 00621821 */ addu $v1, $v1, $v0 -/* AACAC 801145AC 000319C3 */ sra $v1, $v1, 7 -/* AACB0 801145B0 000217C3 */ sra $v0, $v0, 0x1f -/* AACB4 801145B4 00621823 */ subu $v1, $v1, $v0 -/* AACB8 801145B8 306300FF */ andi $v1, $v1, 0xff -/* AACBC 801145BC 00031C00 */ sll $v1, $v1, 0x10 -/* AACC0 801145C0 00AC0018 */ mult $a1, $t4 -/* AACC4 801145C4 00832025 */ or $a0, $a0, $v1 -/* AACC8 801145C8 00094C00 */ sll $t1, $t1, 0x10 -/* AACCC 801145CC 30C6FFFF */ andi $a2, $a2, 0xffff -/* AACD0 801145D0 01264825 */ or $t1, $t1, $a2 -/* AACD4 801145D4 00004010 */ mfhi $t0 -/* AACD8 801145D8 01051021 */ addu $v0, $t0, $a1 -/* AACDC 801145DC 000211C3 */ sra $v0, $v0, 7 -/* AACE0 801145E0 00052FC3 */ sra $a1, $a1, 0x1f -/* AACE4 801145E4 00451023 */ subu $v0, $v0, $a1 -/* AACE8 801145E8 304200FF */ andi $v0, $v0, 0xff -/* AACEC 801145EC 00021200 */ sll $v0, $v0, 8 -/* AACF0 801145F0 00822025 */ or $a0, $a0, $v0 -/* AACF4 801145F4 008A2025 */ or $a0, $a0, $t2 -/* AACF8 801145F8 3C02DB08 */ lui $v0, 0xdb08 -/* AACFC 801145FC AD640004 */ sw $a0, 4($t3) -/* AAD00 80114600 ACE20000 */ sw $v0, ($a3) -/* AAD04 80114604 080451A4 */ j .L80114690_AAD90 -/* AAD08 80114608 ACE90004 */ sw $t1, 4($a3) -.L8011460C_AAD0C: -/* AAD0C 8011460C 2682FFFF */ addiu $v0, $s4, -1 -/* AAD10 80114610 00021600 */ sll $v0, $v0, 0x18 -/* AAD14 80114614 00021E03 */ sra $v1, $v0, 0x18 -/* AAD18 80114618 2C62002F */ sltiu $v0, $v1, 0x2f -/* AAD1C 8011461C 10400010 */ beqz $v0, .L80114660_AAD60 -/* AAD20 80114620 00031080 */ sll $v0, $v1, 2 -/* AAD24 80114624 3C018015 */ lui $at, %hi(jtbl_8014FDA0) -/* AAD28 80114628 00220821 */ addu $at, $at, $v0 -/* AAD2C 8011462C 8C22FDA0 */ lw $v0, %lo(jtbl_8014FDA0)($at) -/* AAD30 80114630 00400008 */ jr $v0 -/* AAD34 80114634 00000000 */ nop -.L80114638_AAD38: -/* AAD38 80114638 08045199 */ j .L80114664 -/* AAD3C 8011463C 24050021 */ addiu $a1, $zero, 0x21 -.L80114640_AAD40: -/* AAD40 80114640 08045199 */ j .L80114664 -/* AAD44 80114644 24050023 */ addiu $a1, $zero, 0x23 -.L80114648_AAD48: -/* AAD48 80114648 08045199 */ j .L80114664 -/* AAD4C 8011464C 24050025 */ addiu $a1, $zero, 0x25 -.L80114650_AAD50: -/* AAD50 80114650 08045199 */ j .L80114664 -/* AAD54 80114654 2405003B */ addiu $a1, $zero, 0x3b -.L80114658_AAD58: -/* AAD58 80114658 08045199 */ j .L80114664 -/* AAD5C 8011465C 2405003C */ addiu $a1, $zero, 0x3c -.L80114660_AAD60: -/* AAD60 80114660 2405001F */ addiu $a1, $zero, 0x1f -.L80114664: -/* AAD64 80114664 8E030000 */ lw $v1, ($s0) -/* AAD68 80114668 3C02DE00 */ lui $v0, 0xde00 -/* AAD6C 8011466C 0060202D */ daddu $a0, $v1, $zero -/* AAD70 80114670 AC820000 */ sw $v0, ($a0) -/* AAD74 80114674 00051080 */ sll $v0, $a1, 2 -/* AAD78 80114678 3C018015 */ lui $at, %hi(D_8014AFC0) -/* AAD7C 8011467C 00220821 */ addu $at, $at, $v0 -/* AAD80 80114680 8C22AFC0 */ lw $v0, %lo(D_8014AFC0)($at) -/* AAD84 80114684 24630008 */ addiu $v1, $v1, 8 -/* AAD88 80114688 AE030000 */ sw $v1, ($s0) -/* AAD8C 8011468C AC820004 */ sw $v0, 4($a0) -.L80114690_AAD90: -/* AAD90 80114690 33020008 */ andi $v0, $t8, 8 -/* AAD94 80114694 14400016 */ bnez $v0, .L801146F0 -/* AAD98 80114698 33022000 */ andi $v0, $t8, 0x2000 -/* AAD9C 8011469C 14400023 */ bnez $v0, .L8011472C -/* AADA0 801146A0 33020010 */ andi $v0, $t8, 0x10 -/* AADA4 801146A4 3C03DA38 */ lui $v1, 0xda38 -/* AADA8 801146A8 8E040000 */ lw $a0, ($s0) -/* AADAC 801146AC 8FAD0038 */ lw $t5, 0x38($sp) -/* AADB0 801146B0 0080282D */ daddu $a1, $a0, $zero -/* AADB4 801146B4 01B71025 */ or $v0, $t5, $s7 -/* AADB8 801146B8 38420001 */ xori $v0, $v0, 1 -/* AADBC 801146BC 00431025 */ or $v0, $v0, $v1 -/* AADC0 801146C0 ACA20000 */ sw $v0, ($a1) -/* AADC4 801146C4 8EC20010 */ lw $v0, 0x10($s6) -/* AADC8 801146C8 24840008 */ addiu $a0, $a0, 8 -/* AADCC 801146CC AE040000 */ sw $a0, ($s0) -/* AADD0 801146D0 12E00002 */ beqz $s7, .L801146DC -/* AADD4 801146D4 ACA20004 */ sw $v0, 4($a1) -/* AADD8 801146D8 0000B82D */ daddu $s7, $zero, $zero -.L801146DC: -/* AADDC 801146DC 8FAF0038 */ lw $t7, 0x38($sp) -/* AADE0 801146E0 55E00011 */ bnel $t7, $zero, .L80114728 -/* AADE4 801146E4 AFA00038 */ sw $zero, 0x38($sp) -/* AADE8 801146E8 080451CB */ j .L8011472C -/* AADEC 801146EC 33020010 */ andi $v0, $t8, 0x10 -.L801146F0: -/* AADF0 801146F0 1440000D */ bnez $v0, .L80114728 -/* AADF4 801146F4 AFA00038 */ sw $zero, 0x38($sp) -/* AADF8 801146F8 3AE20001 */ xori $v0, $s7, 1 -/* AADFC 801146FC 3C03DA38 */ lui $v1, 0xda38 -/* AAE00 80114700 8E040000 */ lw $a0, ($s0) -/* AAE04 80114704 00431025 */ or $v0, $v0, $v1 -/* AAE08 80114708 0080282D */ daddu $a1, $a0, $zero -/* AAE0C 8011470C ACA20000 */ sw $v0, ($a1) -/* AAE10 80114710 8EC20010 */ lw $v0, 0x10($s6) -/* AAE14 80114714 24840008 */ addiu $a0, $a0, 8 -/* AAE18 80114718 AE040000 */ sw $a0, ($s0) -/* AAE1C 8011471C 12E00002 */ beqz $s7, .L80114728 -/* AAE20 80114720 ACA20004 */ sw $v0, 4($a1) -/* AAE24 80114724 0000B82D */ daddu $s7, $zero, $zero -.L80114728: -/* AAE28 80114728 33020010 */ andi $v0, $t8, 0x10 -.L8011472C: -/* AAE2C 8011472C 10400018 */ beqz $v0, .L80114790 -/* AAE30 80114730 00000000 */ nop -/* AAE34 80114734 92C200A5 */ lbu $v0, 0xa5($s6) -/* AAE38 80114738 3C038015 */ lui $v1, %hi(gCurrentCustomModelGfxPtr) -/* AAE3C 8011473C 246312E8 */ addiu $v1, $v1, %lo(gCurrentCustomModelGfxPtr) -/* AAE40 80114740 3042000F */ andi $v0, $v0, 0xf -/* AAE44 80114744 00021040 */ sll $v0, $v0, 1 -/* AAE48 80114748 A7A20036 */ sh $v0, 0x36($sp) -/* AAE4C 8011474C 97B50036 */ lhu $s5, 0x36($sp) -/* AAE50 80114750 8C620000 */ lw $v0, ($v1) -/* AAE54 80114754 00153080 */ sll $a2, $s5, 2 -/* AAE58 80114758 00C21021 */ addu $v0, $a2, $v0 -/* AAE5C 8011475C 8C420000 */ lw $v0, ($v0) -/* AAE60 80114760 1040000B */ beqz $v0, .L80114790 -/* AAE64 80114764 00000000 */ nop -/* AAE68 80114768 8E040000 */ lw $a0, ($s0) -/* AAE6C 8011476C 8C620000 */ lw $v0, ($v1) -/* AAE70 80114770 3C03DE00 */ lui $v1, 0xde00 -/* AAE74 80114774 0080282D */ daddu $a1, $a0, $zero -/* AAE78 80114778 00C21021 */ addu $v0, $a2, $v0 -/* AAE7C 8011477C ACA30000 */ sw $v1, ($a1) -/* AAE80 80114780 8C420000 */ lw $v0, ($v0) -/* AAE84 80114784 24840008 */ addiu $a0, $a0, 8 -/* AAE88 80114788 AE040000 */ sw $a0, ($s0) -/* AAE8C 8011478C ACA20004 */ sw $v0, 4($a1) -.L80114790: -/* AAE90 80114790 12400093 */ beqz $s2, .L801149E0 -/* AAE94 80114794 33020800 */ andi $v0, $t8, 0x800 -/* AAE98 80114798 10400092 */ beqz $v0, .L801149E4 -/* AAE9C 8011479C 33020100 */ andi $v0, $t8, 0x100 -/* AAEA0 801147A0 92C200A4 */ lbu $v0, 0xa4($s6) -/* AAEA4 801147A4 00021080 */ sll $v0, $v0, 2 -/* AAEA8 801147A8 3C038015 */ lui $v1, %hi(texPannerMainU) -/* AAEAC 801147AC 00621821 */ addu $v1, $v1, $v0 -/* AAEB0 801147B0 8C633268 */ lw $v1, %lo(texPannerMainU)($v1) -/* AAEB4 801147B4 3C048015 */ lui $a0, %hi(texPannerMainV) -/* AAEB8 801147B8 00822021 */ addu $a0, $a0, $v0 -/* AAEBC 801147BC 8C8432A8 */ lw $a0, %lo(texPannerMainV)($a0) -/* AAEC0 801147C0 00033A03 */ sra $a3, $v1, 8 -/* AAEC4 801147C4 00044203 */ sra $t0, $a0, 8 -/* AAEC8 801147C8 3C038015 */ lui $v1, %hi(texPannerAuxU) -/* AAECC 801147CC 00621821 */ addu $v1, $v1, $v0 -/* AAED0 801147D0 8C6332E8 */ lw $v1, %lo(texPannerAuxU)($v1) -/* AAED4 801147D4 3C018015 */ lui $at, %hi(texPannerAuxV) -/* AAED8 801147D8 00220821 */ addu $at, $at, $v0 -/* AAEDC 801147DC 8C223328 */ lw $v0, %lo(texPannerAuxV)($at) -/* AAEE0 801147E0 00025203 */ sra $t2, $v0, 8 -/* AAEE4 801147E4 24020002 */ addiu $v0, $zero, 2 -/* AAEE8 801147E8 13C20006 */ beq $fp, $v0, .L80114804 -/* AAEEC 801147EC 00034A03 */ sra $t1, $v1, 8 -/* AAEF0 801147F0 24020003 */ addiu $v0, $zero, 3 -/* AAEF4 801147F4 13C20035 */ beq $fp, $v0, .L801148CC -/* AAEF8 801147F8 30E30FFF */ andi $v1, $a3, 0xfff -/* AAEFC 801147FC 08045262 */ j .L80114988 -/* AAF00 80114800 00031B00 */ sll $v1, $v1, 0xc -.L80114804: -/* AAF04 80114804 30E30FFF */ andi $v1, $a3, 0xfff -/* AAF08 80114808 00031B00 */ sll $v1, $v1, 0xc -/* AAF0C 8011480C 8E020000 */ lw $v0, ($s0) -/* AAF10 80114810 3C05F200 */ lui $a1, 0xf200 -/* AAF14 80114814 0040302D */ daddu $a2, $v0, $zero -/* AAF18 80114818 24420008 */ addiu $v0, $v0, 8 -/* AAF1C 8011481C AE020000 */ sw $v0, ($s0) -/* AAF20 80114820 31020FFF */ andi $v0, $t0, 0xfff -/* AAF24 80114824 00451025 */ or $v0, $v0, $a1 -/* AAF28 80114828 00621825 */ or $v1, $v1, $v0 -/* AAF2C 8011482C ACC30000 */ sw $v1, ($a2) -/* AAF30 80114830 96430022 */ lhu $v1, 0x22($s2) -/* AAF34 80114834 8E040000 */ lw $a0, ($s0) -/* AAF38 80114838 96420026 */ lhu $v0, 0x26($s2) -/* AAF3C 8011483C 2463FFFF */ addiu $v1, $v1, -1 -/* AAF40 80114840 00031880 */ sll $v1, $v1, 2 -/* AAF44 80114844 00671821 */ addu $v1, $v1, $a3 -/* AAF48 80114848 30630FFF */ andi $v1, $v1, 0xfff -/* AAF4C 8011484C 00031B00 */ sll $v1, $v1, 0xc -/* AAF50 80114850 00021042 */ srl $v0, $v0, 1 -/* AAF54 80114854 2442FFFF */ addiu $v0, $v0, -1 -/* AAF58 80114858 00021080 */ sll $v0, $v0, 2 -/* AAF5C 8011485C 00481021 */ addu $v0, $v0, $t0 -/* AAF60 80114860 30420FFF */ andi $v0, $v0, 0xfff -/* AAF64 80114864 00621825 */ or $v1, $v1, $v0 -/* AAF68 80114868 ACC30004 */ sw $v1, 4($a2) -/* AAF6C 8011486C 0080302D */ daddu $a2, $a0, $zero -/* AAF70 80114870 31230FFF */ andi $v1, $t1, 0xfff -/* AAF74 80114874 00031B00 */ sll $v1, $v1, 0xc -/* AAF78 80114878 31420FFF */ andi $v0, $t2, 0xfff -/* AAF7C 8011487C 00451025 */ or $v0, $v0, $a1 -/* AAF80 80114880 00621825 */ or $v1, $v1, $v0 -/* AAF84 80114884 ACC30000 */ sw $v1, ($a2) -/* AAF88 80114888 96430022 */ lhu $v1, 0x22($s2) -/* AAF8C 8011488C 24840008 */ addiu $a0, $a0, 8 -/* AAF90 80114890 AE040000 */ sw $a0, ($s0) -/* AAF94 80114894 3C040100 */ lui $a0, 0x100 -/* AAF98 80114898 96420026 */ lhu $v0, 0x26($s2) -/* AAF9C 8011489C 2463FFFF */ addiu $v1, $v1, -1 -/* AAFA0 801148A0 00031880 */ sll $v1, $v1, 2 -/* AAFA4 801148A4 00691821 */ addu $v1, $v1, $t1 -/* AAFA8 801148A8 30630FFF */ andi $v1, $v1, 0xfff -/* AAFAC 801148AC 00031B00 */ sll $v1, $v1, 0xc -/* AAFB0 801148B0 00021042 */ srl $v0, $v0, 1 -/* AAFB4 801148B4 2442FFFF */ addiu $v0, $v0, -1 -/* AAFB8 801148B8 00021080 */ sll $v0, $v0, 2 -/* AAFBC 801148BC 004A1021 */ addu $v0, $v0, $t2 -/* AAFC0 801148C0 30420FFF */ andi $v0, $v0, 0xfff -/* AAFC4 801148C4 08045276 */ j .L801149D8 -/* AAFC8 801148C8 00441025 */ or $v0, $v0, $a0 -.L801148CC: -/* AAFCC 801148CC 00031B00 */ sll $v1, $v1, 0xc -/* AAFD0 801148D0 8E020000 */ lw $v0, ($s0) -/* AAFD4 801148D4 3C05F200 */ lui $a1, 0xf200 -/* AAFD8 801148D8 0040302D */ daddu $a2, $v0, $zero -/* AAFDC 801148DC 24420008 */ addiu $v0, $v0, 8 -/* AAFE0 801148E0 AE020000 */ sw $v0, ($s0) -/* AAFE4 801148E4 31020FFF */ andi $v0, $t0, 0xfff -/* AAFE8 801148E8 00451025 */ or $v0, $v0, $a1 -/* AAFEC 801148EC 00621825 */ or $v1, $v1, $v0 -/* AAFF0 801148F0 ACC30000 */ sw $v1, ($a2) -/* AAFF4 801148F4 96430022 */ lhu $v1, 0x22($s2) -/* AAFF8 801148F8 8E040000 */ lw $a0, ($s0) -/* AAFFC 801148FC 96420026 */ lhu $v0, 0x26($s2) -/* AB000 80114900 2463FFFF */ addiu $v1, $v1, -1 -/* AB004 80114904 00031880 */ sll $v1, $v1, 2 -/* AB008 80114908 00671821 */ addu $v1, $v1, $a3 -/* AB00C 8011490C 30630FFF */ andi $v1, $v1, 0xfff -/* AB010 80114910 00031B00 */ sll $v1, $v1, 0xc -/* AB014 80114914 2442FFFF */ addiu $v0, $v0, -1 -/* AB018 80114918 00021080 */ sll $v0, $v0, 2 -/* AB01C 8011491C 00481021 */ addu $v0, $v0, $t0 -/* AB020 80114920 30420FFF */ andi $v0, $v0, 0xfff -/* AB024 80114924 00621825 */ or $v1, $v1, $v0 -/* AB028 80114928 ACC30004 */ sw $v1, 4($a2) -/* AB02C 8011492C 0080302D */ daddu $a2, $a0, $zero -/* AB030 80114930 31230FFF */ andi $v1, $t1, 0xfff -/* AB034 80114934 00031B00 */ sll $v1, $v1, 0xc -/* AB038 80114938 31420FFF */ andi $v0, $t2, 0xfff -/* AB03C 8011493C 00451025 */ or $v0, $v0, $a1 -/* AB040 80114940 00621825 */ or $v1, $v1, $v0 -/* AB044 80114944 ACC30000 */ sw $v1, ($a2) -/* AB048 80114948 96430020 */ lhu $v1, 0x20($s2) -/* AB04C 8011494C 24840008 */ addiu $a0, $a0, 8 -/* AB050 80114950 AE040000 */ sw $a0, ($s0) -/* AB054 80114954 3C040100 */ lui $a0, 0x100 -/* AB058 80114958 96420024 */ lhu $v0, 0x24($s2) -/* AB05C 8011495C 2463FFFF */ addiu $v1, $v1, -1 -/* AB060 80114960 00031880 */ sll $v1, $v1, 2 -/* AB064 80114964 00691821 */ addu $v1, $v1, $t1 -/* AB068 80114968 30630FFF */ andi $v1, $v1, 0xfff -/* AB06C 8011496C 00031B00 */ sll $v1, $v1, 0xc -/* AB070 80114970 2442FFFF */ addiu $v0, $v0, -1 -/* AB074 80114974 00021080 */ sll $v0, $v0, 2 -/* AB078 80114978 004A1021 */ addu $v0, $v0, $t2 -/* AB07C 8011497C 30420FFF */ andi $v0, $v0, 0xfff -/* AB080 80114980 08045276 */ j .L801149D8 -/* AB084 80114984 00441025 */ or $v0, $v0, $a0 -.L80114988: -/* AB088 80114988 31020FFF */ andi $v0, $t0, 0xfff -/* AB08C 8011498C 3C04F200 */ lui $a0, 0xf200 -/* AB090 80114990 00441025 */ or $v0, $v0, $a0 -/* AB094 80114994 8E050000 */ lw $a1, ($s0) -/* AB098 80114998 00621825 */ or $v1, $v1, $v0 -/* AB09C 8011499C 00A0302D */ daddu $a2, $a1, $zero -/* AB0A0 801149A0 ACC30000 */ sw $v1, ($a2) -/* AB0A4 801149A4 96430022 */ lhu $v1, 0x22($s2) -/* AB0A8 801149A8 24A50008 */ addiu $a1, $a1, 8 -/* AB0AC 801149AC AE050000 */ sw $a1, ($s0) -/* AB0B0 801149B0 96420026 */ lhu $v0, 0x26($s2) -/* AB0B4 801149B4 2463FFFF */ addiu $v1, $v1, -1 -/* AB0B8 801149B8 00031880 */ sll $v1, $v1, 2 -/* AB0BC 801149BC 00671821 */ addu $v1, $v1, $a3 -/* AB0C0 801149C0 30630FFF */ andi $v1, $v1, 0xfff -/* AB0C4 801149C4 00031B00 */ sll $v1, $v1, 0xc -/* AB0C8 801149C8 2442FFFF */ addiu $v0, $v0, -1 -/* AB0CC 801149CC 00021080 */ sll $v0, $v0, 2 -/* AB0D0 801149D0 00481021 */ addu $v0, $v0, $t0 -/* AB0D4 801149D4 30420FFF */ andi $v0, $v0, 0xfff -.L801149D8: -/* AB0D8 801149D8 00621825 */ or $v1, $v1, $v0 -/* AB0DC 801149DC ACC30004 */ sw $v1, 4($a2) -.L801149E0: -/* AB0E0 801149E0 33020100 */ andi $v0, $t8, 0x100 -.L801149E4: -/* AB0E4 801149E4 1040001A */ beqz $v0, .L80114A50 -/* AB0E8 801149E8 3C04DA38 */ lui $a0, 0xda38 -/* AB0EC 801149EC 8E050000 */ lw $a1, ($s0) -/* AB0F0 801149F0 8FB90038 */ lw $t9, 0x38($sp) -/* AB0F4 801149F4 3C03800A */ lui $v1, %hi(gCurrentCamID) -/* AB0F8 801149F8 8463A634 */ lh $v1, %lo(gCurrentCamID)($v1) -/* AB0FC 801149FC 00A0302D */ daddu $a2, $a1, $zero -/* AB100 80114A00 03371025 */ or $v0, $t9, $s7 -/* AB104 80114A04 38420001 */ xori $v0, $v0, 1 -/* AB108 80114A08 00441025 */ or $v0, $v0, $a0 -/* AB10C 80114A0C ACC20000 */ sw $v0, ($a2) -/* AB110 80114A10 00031080 */ sll $v0, $v1, 2 -/* AB114 80114A14 00431021 */ addu $v0, $v0, $v1 -/* AB118 80114A18 00021080 */ sll $v0, $v0, 2 -/* AB11C 80114A1C 00431023 */ subu $v0, $v0, $v1 -/* AB120 80114A20 000218C0 */ sll $v1, $v0, 3 -/* AB124 80114A24 00431021 */ addu $v0, $v0, $v1 -/* AB128 80114A28 000210C0 */ sll $v0, $v0, 3 -/* AB12C 80114A2C 3C01800B */ lui $at, %hi(gCameras+0x204) -/* AB130 80114A30 00220821 */ addu $at, $at, $v0 -/* AB134 80114A34 8C221F84 */ lw $v0, %lo(gCameras+0x204)($at) -/* AB138 80114A38 24A50008 */ addiu $a1, $a1, 8 -/* AB13C 80114A3C AE050000 */ sw $a1, ($s0) -/* AB140 80114A40 12E00002 */ beqz $s7, .L80114A4C -/* AB144 80114A44 ACC20004 */ sw $v0, 4($a2) -/* AB148 80114A48 0000B82D */ daddu $s7, $zero, $zero -.L80114A4C: -/* AB14C 80114A4C 8FAD0038 */ lw $t5, 0x38($sp) -.L80114A50: -/* AB150 80114A50 33020080 */ andi $v0, $t8, 0x80 -/* AB154 80114A54 1440000C */ bnez $v0, .L80114A88 -/* AB158 80114A58 33020010 */ andi $v0, $t8, 0x10 -/* AB15C 80114A5C 8E030000 */ lw $v1, ($s0) -/* AB160 80114A60 3C02DE00 */ lui $v0, 0xde00 -/* AB164 80114A64 0060202D */ daddu $a0, $v1, $zero -/* AB168 80114A68 AC820000 */ sw $v0, ($a0) -/* AB16C 80114A6C 8FAF0028 */ lw $t7, 0x28($sp) -/* AB170 80114A70 8DE20004 */ lw $v0, 4($t7) -/* AB174 80114A74 8C420000 */ lw $v0, ($v0) -/* AB178 80114A78 24630008 */ addiu $v1, $v1, 8 -/* AB17C 80114A7C AE030000 */ sw $v1, ($s0) -/* AB180 80114A80 AC820004 */ sw $v0, 4($a0) -/* AB184 80114A84 33020010 */ andi $v0, $t8, 0x10 -.L80114A88: -/* AB188 80114A88 10400016 */ beqz $v0, .L80114AE4 -/* AB18C 80114A8C 00000000 */ nop -/* AB190 80114A90 97B50036 */ lhu $s5, 0x36($sp) -/* AB194 80114A94 3C078015 */ lui $a3, %hi(gCurrentCustomModelGfxPtr) -/* AB198 80114A98 24E712E8 */ addiu $a3, $a3, %lo(gCurrentCustomModelGfxPtr) -/* AB19C 80114A9C 26B50001 */ addiu $s5, $s5, 1 -/* AB1A0 80114AA0 A7B50036 */ sh $s5, 0x36($sp) -/* AB1A4 80114AA4 32A2FFFF */ andi $v0, $s5, 0xffff -/* AB1A8 80114AA8 8CE30000 */ lw $v1, ($a3) -/* AB1AC 80114AAC 00023080 */ sll $a2, $v0, 2 -/* AB1B0 80114AB0 00C31821 */ addu $v1, $a2, $v1 -/* AB1B4 80114AB4 8C620000 */ lw $v0, ($v1) -/* AB1B8 80114AB8 1040000A */ beqz $v0, .L80114AE4 -/* AB1BC 80114ABC 3C03DE00 */ lui $v1, 0xde00 -/* AB1C0 80114AC0 8E040000 */ lw $a0, ($s0) -/* AB1C4 80114AC4 8CE20000 */ lw $v0, ($a3) -/* AB1C8 80114AC8 0080282D */ daddu $a1, $a0, $zero -/* AB1CC 80114ACC 00C21021 */ addu $v0, $a2, $v0 -/* AB1D0 80114AD0 ACA30000 */ sw $v1, ($a1) -/* AB1D4 80114AD4 8C420000 */ lw $v0, ($v0) -/* AB1D8 80114AD8 24840008 */ addiu $a0, $a0, 8 -/* AB1DC 80114ADC AE040000 */ sw $a0, ($s0) -/* AB1E0 80114AE0 ACA20004 */ sw $v0, 4($a1) -.L80114AE4: -/* AB1E4 80114AE4 16E00009 */ bnez $s7, .L80114B0C -/* AB1E8 80114AE8 3C04D838 */ lui $a0, 0xd838 -/* AB1EC 80114AEC 8E020000 */ lw $v0, ($s0) -/* AB1F0 80114AF0 34840002 */ ori $a0, $a0, 2 -/* AB1F4 80114AF4 0040182D */ daddu $v1, $v0, $zero -/* AB1F8 80114AF8 24420008 */ addiu $v0, $v0, 8 -/* AB1FC 80114AFC AE020000 */ sw $v0, ($s0) -/* AB200 80114B00 24020040 */ addiu $v0, $zero, 0x40 -/* AB204 80114B04 AC640000 */ sw $a0, ($v1) -/* AB208 80114B08 AC620004 */ sw $v0, 4($v1) -.L80114B0C: -/* AB20C 80114B0C 8E020000 */ lw $v0, ($s0) -/* AB210 80114B10 0040182D */ daddu $v1, $v0, $zero -/* AB214 80114B14 24420008 */ addiu $v0, $v0, 8 -/* AB218 80114B18 AE020000 */ sw $v0, ($s0) -/* AB21C 80114B1C 3C02E700 */ lui $v0, 0xe700 -/* AB220 80114B20 AC620000 */ sw $v0, ($v1) -/* AB224 80114B24 AC600004 */ sw $zero, 4($v1) -.L80114B28: -/* AB228 80114B28 8FBF0074 */ lw $ra, 0x74($sp) -/* AB22C 80114B2C 8FBE0070 */ lw $fp, 0x70($sp) -/* AB230 80114B30 8FB7006C */ lw $s7, 0x6c($sp) -/* AB234 80114B34 8FB60068 */ lw $s6, 0x68($sp) -/* AB238 80114B38 8FB50064 */ lw $s5, 0x64($sp) -/* AB23C 80114B3C 8FB40060 */ lw $s4, 0x60($sp) -/* AB240 80114B40 8FB3005C */ lw $s3, 0x5c($sp) -/* AB244 80114B44 8FB20058 */ lw $s2, 0x58($sp) -/* AB248 80114B48 8FB10054 */ lw $s1, 0x54($sp) -/* AB24C 80114B4C 8FB00050 */ lw $s0, 0x50($sp) -/* AB250 80114B50 03E00008 */ jr $ra -/* AB254 80114B54 27BD0078 */ addiu $sp, $sp, 0x78 diff --git a/ver/us/asm/nonmatchings/a5dd0_len_114e0/func_80115498.s b/ver/us/asm/nonmatchings/a5dd0_len_114e0/func_80115498.s deleted file mode 100644 index 82611ef76a..0000000000 --- a/ver/us/asm/nonmatchings/a5dd0_len_114e0/func_80115498.s +++ /dev/null @@ -1,473 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_80115498 -/* ABB98 80115498 27BDFF88 */ addiu $sp, $sp, -0x78 -/* ABB9C 8011549C AFB50064 */ sw $s5, 0x64($sp) -/* ABBA0 801154A0 0080A82D */ daddu $s5, $a0, $zero -/* ABBA4 801154A4 00A0182D */ daddu $v1, $a1, $zero -/* ABBA8 801154A8 AFA60080 */ sw $a2, 0x80($sp) -/* ABBAC 801154AC AFA70084 */ sw $a3, 0x84($sp) -/* ABBB0 801154B0 00C71021 */ addu $v0, $a2, $a3 -/* ABBB4 801154B4 02A2102B */ sltu $v0, $s5, $v0 -/* ABBB8 801154B8 AFBF0074 */ sw $ra, 0x74($sp) -/* ABBBC 801154BC AFBE0070 */ sw $fp, 0x70($sp) -/* ABBC0 801154C0 AFB7006C */ sw $s7, 0x6c($sp) -/* ABBC4 801154C4 AFB60068 */ sw $s6, 0x68($sp) -/* ABBC8 801154C8 AFB40060 */ sw $s4, 0x60($sp) -/* ABBCC 801154CC AFB3005C */ sw $s3, 0x5c($sp) -/* ABBD0 801154D0 AFB20058 */ sw $s2, 0x58($sp) -/* ABBD4 801154D4 AFB10054 */ sw $s1, 0x54($sp) -/* ABBD8 801154D8 10400180 */ beqz $v0, .L80115ADC -/* ABBDC 801154DC AFB00050 */ sw $s0, 0x50($sp) -/* ABBE0 801154E0 27B30020 */ addiu $s3, $sp, 0x20 -/* ABBE4 801154E4 24170001 */ addiu $s7, $zero, 1 -/* ABBE8 801154E8 241E1000 */ addiu $fp, $zero, 0x1000 -/* ABBEC 801154EC 00031100 */ sll $v0, $v1, 4 -/* ABBF0 801154F0 00451021 */ addu $v0, $v0, $a1 -/* ABBF4 801154F4 0002B080 */ sll $s6, $v0, 2 -/* ABBF8 801154F8 02A0202D */ daddu $a0, $s5, $zero -.L801154FC: -/* ABBFC 801154FC 26A50030 */ addiu $a1, $s5, 0x30 -/* ABC00 80115500 0C00A5CF */ jal dma_copy -/* ABC04 80115504 27A60020 */ addiu $a2, $sp, 0x20 -/* ABC08 80115508 93A20048 */ lbu $v0, 0x48($sp) -/* ABC0C 8011550C 10400173 */ beqz $v0, .L80115ADC -/* ABC10 80115510 00000000 */ nop -/* ABC14 80115514 97A40042 */ lhu $a0, 0x42($sp) -/* ABC18 80115518 97A20046 */ lhu $v0, 0x46($sp) -/* ABC1C 8011551C 00820018 */ mult $a0, $v0 -/* ABC20 80115520 97A3004C */ lhu $v1, 0x4c($sp) -/* ABC24 80115524 30630F00 */ andi $v1, $v1, 0xf00 -/* ABC28 80115528 00009012 */ mflo $s2 -/* ABC2C 8011552C 14600049 */ bnez $v1, .L80115654 -/* ABC30 80115530 24080100 */ addiu $t0, $zero, 0x100 -/* ABC34 80115534 93A20049 */ lbu $v0, 0x49($sp) -/* ABC38 80115538 54570125 */ bnel $v0, $s7, .L801159D0 -/* ABC3C 8011553C 00129042 */ srl $s2, $s2, 1 -/* ABC40 80115540 24050002 */ addiu $a1, $zero, 2 -/* ABC44 80115544 14A00002 */ bnez $a1, .L80115550 -/* ABC48 80115548 0085001A */ div $zero, $a0, $a1 -/* ABC4C 8011554C 0007000D */ break 7 -.L80115550: -/* ABC50 80115550 2401FFFF */ addiu $at, $zero, -1 -/* ABC54 80115554 14A10004 */ bne $a1, $at, .L80115568 -/* ABC58 80115558 3C018000 */ lui $at, 0x8000 -/* ABC5C 8011555C 14810002 */ bne $a0, $at, .L80115568 -/* ABC60 80115560 00000000 */ nop -/* ABC64 80115564 0006000D */ break 6 -.L80115568: -/* ABC68 80115568 00001012 */ mflo $v0 -/* ABC6C 8011556C 28420010 */ slti $v0, $v0, 0x10 -/* ABC70 80115570 54400117 */ bnel $v0, $zero, .L801159D0 -/* ABC74 80115574 00129042 */ srl $s2, $s2, 1 -/* ABC78 80115578 96660026 */ lhu $a2, 0x26($s3) -.L8011557C: -/* ABC7C 8011557C 14A00002 */ bnez $a1, .L80115588 -/* ABC80 80115580 00C5001A */ div $zero, $a2, $a1 -/* ABC84 80115584 0007000D */ break 7 -.L80115588: -/* ABC88 80115588 2401FFFF */ addiu $at, $zero, -1 -/* ABC8C 8011558C 14A10004 */ bne $a1, $at, .L801155A0 -/* ABC90 80115590 3C018000 */ lui $at, 0x8000 -/* ABC94 80115594 14C10002 */ bne $a2, $at, .L801155A0 -/* ABC98 80115598 00000000 */ nop -/* ABC9C 8011559C 0006000D */ break 6 -.L801155A0: -/* ABCA0 801155A0 00001012 */ mflo $v0 -/* ABCA4 801155A4 5840010A */ blezl $v0, .L801159D0 -/* ABCA8 801155A8 00129042 */ srl $s2, $s2, 1 -/* ABCAC 801155AC 96630022 */ lhu $v1, 0x22($s3) -/* ABCB0 801155B0 14A00002 */ bnez $a1, .L801155BC -/* ABCB4 801155B4 0065001A */ div $zero, $v1, $a1 -/* ABCB8 801155B8 0007000D */ break 7 -.L801155BC: -/* ABCBC 801155BC 2401FFFF */ addiu $at, $zero, -1 -/* ABCC0 801155C0 14A10004 */ bne $a1, $at, .L801155D4 -/* ABCC4 801155C4 3C018000 */ lui $at, 0x8000 -/* ABCC8 801155C8 14610002 */ bne $v1, $at, .L801155D4 -/* ABCCC 801155CC 00000000 */ nop -/* ABCD0 801155D0 0006000D */ break 6 -.L801155D4: -/* ABCD4 801155D4 00001012 */ mflo $v0 -/* ABCD8 801155D8 00000000 */ nop -/* ABCDC 801155DC 00000000 */ nop -/* ABCE0 801155E0 00460018 */ mult $v0, $a2 -/* ABCE4 801155E4 00005012 */ mflo $t2 -/* ABCE8 801155E8 00000000 */ nop -/* ABCEC 801155EC 14A00002 */ bnez $a1, .L801155F8 -/* ABCF0 801155F0 0145001A */ div $zero, $t2, $a1 -/* ABCF4 801155F4 0007000D */ break 7 -.L801155F8: -/* ABCF8 801155F8 2401FFFF */ addiu $at, $zero, -1 -/* ABCFC 801155FC 14A10004 */ bne $a1, $at, .L80115610 -/* ABD00 80115600 3C018000 */ lui $at, 0x8000 -/* ABD04 80115604 15410002 */ bne $t2, $at, .L80115610 -/* ABD08 80115608 00000000 */ nop -/* ABD0C 8011560C 0006000D */ break 6 -.L80115610: -/* ABD10 80115610 00002012 */ mflo $a0 -/* ABD14 80115614 00052840 */ sll $a1, $a1, 1 -/* ABD18 80115618 14A00002 */ bnez $a1, .L80115624 -/* ABD1C 8011561C 0065001A */ div $zero, $v1, $a1 -/* ABD20 80115620 0007000D */ break 7 -.L80115624: -/* ABD24 80115624 2401FFFF */ addiu $at, $zero, -1 -/* ABD28 80115628 14A10004 */ bne $a1, $at, .L8011563C -/* ABD2C 8011562C 3C018000 */ lui $at, 0x8000 -/* ABD30 80115630 14610002 */ bne $v1, $at, .L8011563C -/* ABD34 80115634 00000000 */ nop -/* ABD38 80115638 0006000D */ break 6 -.L8011563C: -/* ABD3C 8011563C 00001012 */ mflo $v0 -/* ABD40 80115640 28420010 */ slti $v0, $v0, 0x10 -/* ABD44 80115644 1040FFCD */ beqz $v0, .L8011557C -/* ABD48 80115648 02449021 */ addu $s2, $s2, $a0 -/* ABD4C 8011564C 08045674 */ j .L801159D0 -/* ABD50 80115650 00129042 */ srl $s2, $s2, 1 -.L80115654: -/* ABD54 80115654 14680048 */ bne $v1, $t0, .L80115778 -/* ABD58 80115658 00000000 */ nop -/* ABD5C 8011565C 93A20049 */ lbu $v0, 0x49($sp) -/* ABD60 80115660 145700DB */ bne $v0, $s7, .L801159D0 -/* ABD64 80115664 24050002 */ addiu $a1, $zero, 2 -/* ABD68 80115668 14A00002 */ bnez $a1, .L80115674 -/* ABD6C 8011566C 0085001A */ div $zero, $a0, $a1 -/* ABD70 80115670 0007000D */ break 7 -.L80115674: -/* ABD74 80115674 2401FFFF */ addiu $at, $zero, -1 -/* ABD78 80115678 14A10004 */ bne $a1, $at, .L8011568C -/* ABD7C 8011567C 3C018000 */ lui $at, 0x8000 -/* ABD80 80115680 14810002 */ bne $a0, $at, .L8011568C -/* ABD84 80115684 00000000 */ nop -/* ABD88 80115688 0006000D */ break 6 -.L8011568C: -/* ABD8C 8011568C 00001012 */ mflo $v0 -/* ABD90 80115690 28420008 */ slti $v0, $v0, 8 -/* ABD94 80115694 144000CE */ bnez $v0, .L801159D0 -/* ABD98 80115698 00000000 */ nop -/* ABD9C 8011569C 96660026 */ lhu $a2, 0x26($s3) -.L801156A0: -/* ABDA0 801156A0 14A00002 */ bnez $a1, .L801156AC -/* ABDA4 801156A4 00C5001A */ div $zero, $a2, $a1 -/* ABDA8 801156A8 0007000D */ break 7 -.L801156AC: -/* ABDAC 801156AC 2401FFFF */ addiu $at, $zero, -1 -/* ABDB0 801156B0 14A10004 */ bne $a1, $at, .L801156C4 -/* ABDB4 801156B4 3C018000 */ lui $at, 0x8000 -/* ABDB8 801156B8 14C10002 */ bne $a2, $at, .L801156C4 -/* ABDBC 801156BC 00000000 */ nop -/* ABDC0 801156C0 0006000D */ break 6 -.L801156C4: -/* ABDC4 801156C4 00001012 */ mflo $v0 -/* ABDC8 801156C8 184000C1 */ blez $v0, .L801159D0 -/* ABDCC 801156CC 00000000 */ nop -/* ABDD0 801156D0 96630022 */ lhu $v1, 0x22($s3) -/* ABDD4 801156D4 14A00002 */ bnez $a1, .L801156E0 -/* ABDD8 801156D8 0065001A */ div $zero, $v1, $a1 -/* ABDDC 801156DC 0007000D */ break 7 -.L801156E0: -/* ABDE0 801156E0 2401FFFF */ addiu $at, $zero, -1 -/* ABDE4 801156E4 14A10004 */ bne $a1, $at, .L801156F8 -/* ABDE8 801156E8 3C018000 */ lui $at, 0x8000 -/* ABDEC 801156EC 14610002 */ bne $v1, $at, .L801156F8 -/* ABDF0 801156F0 00000000 */ nop -/* ABDF4 801156F4 0006000D */ break 6 -.L801156F8: -/* ABDF8 801156F8 00001012 */ mflo $v0 -/* ABDFC 801156FC 00000000 */ nop -/* ABE00 80115700 00000000 */ nop -/* ABE04 80115704 00460018 */ mult $v0, $a2 -/* ABE08 80115708 00005012 */ mflo $t2 -/* ABE0C 8011570C 00000000 */ nop -/* ABE10 80115710 14A00002 */ bnez $a1, .L8011571C -/* ABE14 80115714 0145001A */ div $zero, $t2, $a1 -/* ABE18 80115718 0007000D */ break 7 -.L8011571C: -/* ABE1C 8011571C 2401FFFF */ addiu $at, $zero, -1 -/* ABE20 80115720 14A10004 */ bne $a1, $at, .L80115734 -/* ABE24 80115724 3C018000 */ lui $at, 0x8000 -/* ABE28 80115728 15410002 */ bne $t2, $at, .L80115734 -/* ABE2C 8011572C 00000000 */ nop -/* ABE30 80115730 0006000D */ break 6 -.L80115734: -/* ABE34 80115734 00002012 */ mflo $a0 -/* ABE38 80115738 00052840 */ sll $a1, $a1, 1 -/* ABE3C 8011573C 14A00002 */ bnez $a1, .L80115748 -/* ABE40 80115740 0065001A */ div $zero, $v1, $a1 -/* ABE44 80115744 0007000D */ break 7 -.L80115748: -/* ABE48 80115748 2401FFFF */ addiu $at, $zero, -1 -/* ABE4C 8011574C 14A10004 */ bne $a1, $at, .L80115760 -/* ABE50 80115750 3C018000 */ lui $at, 0x8000 -/* ABE54 80115754 14610002 */ bne $v1, $at, .L80115760 -/* ABE58 80115758 00000000 */ nop -/* ABE5C 8011575C 0006000D */ break 6 -.L80115760: -/* ABE60 80115760 00001012 */ mflo $v0 -/* ABE64 80115764 28420008 */ slti $v0, $v0, 8 -/* ABE68 80115768 14400099 */ bnez $v0, .L801159D0 -/* ABE6C 8011576C 02449021 */ addu $s2, $s2, $a0 -/* ABE70 80115770 080455A8 */ j .L801156A0 -/* ABE74 80115774 00000000 */ nop -.L80115778: -/* ABE78 80115778 9662002C */ lhu $v0, 0x2c($s3) -/* ABE7C 8011577C 30430F00 */ andi $v1, $v0, 0xf00 -/* ABE80 80115780 24020200 */ addiu $v0, $zero, 0x200 -/* ABE84 80115784 14620049 */ bne $v1, $v0, .L801158AC -/* ABE88 80115788 24020300 */ addiu $v0, $zero, 0x300 -/* ABE8C 8011578C 92620029 */ lbu $v0, 0x29($s3) -/* ABE90 80115790 5457008F */ bnel $v0, $s7, .L801159D0 -/* ABE94 80115794 00129040 */ sll $s2, $s2, 1 -/* ABE98 80115798 96670022 */ lhu $a3, 0x22($s3) -/* ABE9C 8011579C 24040002 */ addiu $a0, $zero, 2 -/* ABEA0 801157A0 14800002 */ bnez $a0, .L801157AC -/* ABEA4 801157A4 00E4001A */ div $zero, $a3, $a0 -/* ABEA8 801157A8 0007000D */ break 7 -.L801157AC: -/* ABEAC 801157AC 2401FFFF */ addiu $at, $zero, -1 -/* ABEB0 801157B0 14810004 */ bne $a0, $at, .L801157C4 -/* ABEB4 801157B4 3C018000 */ lui $at, 0x8000 -/* ABEB8 801157B8 14E10002 */ bne $a3, $at, .L801157C4 -/* ABEBC 801157BC 00000000 */ nop -/* ABEC0 801157C0 0006000D */ break 6 -.L801157C4: -/* ABEC4 801157C4 00001012 */ mflo $v0 -/* ABEC8 801157C8 28420004 */ slti $v0, $v0, 4 -/* ABECC 801157CC 54400080 */ bnel $v0, $zero, .L801159D0 -/* ABED0 801157D0 00129040 */ sll $s2, $s2, 1 -/* ABED4 801157D4 96660026 */ lhu $a2, 0x26($s3) -.L801157D8: -/* ABED8 801157D8 14800002 */ bnez $a0, .L801157E4 -/* ABEDC 801157DC 00C4001A */ div $zero, $a2, $a0 -/* ABEE0 801157E0 0007000D */ break 7 -.L801157E4: -/* ABEE4 801157E4 2401FFFF */ addiu $at, $zero, -1 -/* ABEE8 801157E8 14810004 */ bne $a0, $at, .L801157FC -/* ABEEC 801157EC 3C018000 */ lui $at, 0x8000 -/* ABEF0 801157F0 14C10002 */ bne $a2, $at, .L801157FC -/* ABEF4 801157F4 00000000 */ nop -/* ABEF8 801157F8 0006000D */ break 6 -.L801157FC: -/* ABEFC 801157FC 00001012 */ mflo $v0 -/* ABF00 80115800 58400073 */ blezl $v0, .L801159D0 -/* ABF04 80115804 00129040 */ sll $s2, $s2, 1 -/* ABF08 80115808 14800002 */ bnez $a0, .L80115814 -/* ABF0C 8011580C 00E4001A */ div $zero, $a3, $a0 -/* ABF10 80115810 0007000D */ break 7 -.L80115814: -/* ABF14 80115814 2401FFFF */ addiu $at, $zero, -1 -/* ABF18 80115818 14810004 */ bne $a0, $at, .L8011582C -/* ABF1C 8011581C 3C018000 */ lui $at, 0x8000 -/* ABF20 80115820 14E10002 */ bne $a3, $at, .L8011582C -/* ABF24 80115824 00000000 */ nop -/* ABF28 80115828 0006000D */ break 6 -.L8011582C: -/* ABF2C 8011582C 00001012 */ mflo $v0 -/* ABF30 80115830 00000000 */ nop -/* ABF34 80115834 00000000 */ nop -/* ABF38 80115838 00460018 */ mult $v0, $a2 -/* ABF3C 8011583C 00001812 */ mflo $v1 -/* ABF40 80115840 00000000 */ nop -/* ABF44 80115844 14800002 */ bnez $a0, .L80115850 -/* ABF48 80115848 0064001A */ div $zero, $v1, $a0 -/* ABF4C 8011584C 0007000D */ break 7 -.L80115850: -/* ABF50 80115850 2401FFFF */ addiu $at, $zero, -1 -/* ABF54 80115854 14810004 */ bne $a0, $at, .L80115868 -/* ABF58 80115858 3C018000 */ lui $at, 0x8000 -/* ABF5C 8011585C 14610002 */ bne $v1, $at, .L80115868 -/* ABF60 80115860 00000000 */ nop -/* ABF64 80115864 0006000D */ break 6 -.L80115868: -/* ABF68 80115868 00001812 */ mflo $v1 -/* ABF6C 8011586C 00042040 */ sll $a0, $a0, 1 -/* ABF70 80115870 14800002 */ bnez $a0, .L8011587C -/* ABF74 80115874 00E4001A */ div $zero, $a3, $a0 -/* ABF78 80115878 0007000D */ break 7 -.L8011587C: -/* ABF7C 8011587C 2401FFFF */ addiu $at, $zero, -1 -/* ABF80 80115880 14810004 */ bne $a0, $at, .L80115894 -/* ABF84 80115884 3C018000 */ lui $at, 0x8000 -/* ABF88 80115888 14E10002 */ bne $a3, $at, .L80115894 -/* ABF8C 8011588C 00000000 */ nop -/* ABF90 80115890 0006000D */ break 6 -.L80115894: -/* ABF94 80115894 00001012 */ mflo $v0 -/* ABF98 80115898 28420004 */ slti $v0, $v0, 4 -/* ABF9C 8011589C 1040FFCE */ beqz $v0, .L801157D8 -/* ABFA0 801158A0 02439021 */ addu $s2, $s2, $v1 -/* ABFA4 801158A4 08045674 */ j .L801159D0 -/* ABFA8 801158A8 00129040 */ sll $s2, $s2, 1 -.L801158AC: -/* ABFAC 801158AC 14620048 */ bne $v1, $v0, .L801159D0 -/* ABFB0 801158B0 00000000 */ nop -/* ABFB4 801158B4 92620029 */ lbu $v0, 0x29($s3) -/* ABFB8 801158B8 54570045 */ bnel $v0, $s7, .L801159D0 -/* ABFBC 801158BC 00129080 */ sll $s2, $s2, 2 -/* ABFC0 801158C0 96670022 */ lhu $a3, 0x22($s3) -/* ABFC4 801158C4 24040002 */ addiu $a0, $zero, 2 -/* ABFC8 801158C8 14800002 */ bnez $a0, .L801158D4 -/* ABFCC 801158CC 00E4001A */ div $zero, $a3, $a0 -/* ABFD0 801158D0 0007000D */ break 7 -.L801158D4: -/* ABFD4 801158D4 2401FFFF */ addiu $at, $zero, -1 -/* ABFD8 801158D8 14810004 */ bne $a0, $at, .L801158EC -/* ABFDC 801158DC 3C018000 */ lui $at, 0x8000 -/* ABFE0 801158E0 14E10002 */ bne $a3, $at, .L801158EC -/* ABFE4 801158E4 00000000 */ nop -/* ABFE8 801158E8 0006000D */ break 6 -.L801158EC: -/* ABFEC 801158EC 00001012 */ mflo $v0 -/* ABFF0 801158F0 0044102A */ slt $v0, $v0, $a0 -/* ABFF4 801158F4 54400036 */ bnel $v0, $zero, .L801159D0 -/* ABFF8 801158F8 00129080 */ sll $s2, $s2, 2 -/* ABFFC 801158FC 96660026 */ lhu $a2, 0x26($s3) -.L80115900: -/* AC000 80115900 14800002 */ bnez $a0, .L8011590C -/* AC004 80115904 00C4001A */ div $zero, $a2, $a0 -/* AC008 80115908 0007000D */ break 7 -.L8011590C: -/* AC00C 8011590C 2401FFFF */ addiu $at, $zero, -1 -/* AC010 80115910 14810004 */ bne $a0, $at, .L80115924 -/* AC014 80115914 3C018000 */ lui $at, 0x8000 -/* AC018 80115918 14C10002 */ bne $a2, $at, .L80115924 -/* AC01C 8011591C 00000000 */ nop -/* AC020 80115920 0006000D */ break 6 -.L80115924: -/* AC024 80115924 00001012 */ mflo $v0 -/* AC028 80115928 58400029 */ blezl $v0, .L801159D0 -/* AC02C 8011592C 00129080 */ sll $s2, $s2, 2 -/* AC030 80115930 14800002 */ bnez $a0, .L8011593C -/* AC034 80115934 00E4001A */ div $zero, $a3, $a0 -/* AC038 80115938 0007000D */ break 7 -.L8011593C: -/* AC03C 8011593C 2401FFFF */ addiu $at, $zero, -1 -/* AC040 80115940 14810004 */ bne $a0, $at, .L80115954 -/* AC044 80115944 3C018000 */ lui $at, 0x8000 -/* AC048 80115948 14E10002 */ bne $a3, $at, .L80115954 -/* AC04C 8011594C 00000000 */ nop -/* AC050 80115950 0006000D */ break 6 -.L80115954: -/* AC054 80115954 00001012 */ mflo $v0 -/* AC058 80115958 00000000 */ nop -/* AC05C 8011595C 00000000 */ nop -/* AC060 80115960 00460018 */ mult $v0, $a2 -/* AC064 80115964 00001812 */ mflo $v1 -/* AC068 80115968 00000000 */ nop -/* AC06C 8011596C 14800002 */ bnez $a0, .L80115978 -/* AC070 80115970 0064001A */ div $zero, $v1, $a0 -/* AC074 80115974 0007000D */ break 7 -.L80115978: -/* AC078 80115978 2401FFFF */ addiu $at, $zero, -1 -/* AC07C 8011597C 14810004 */ bne $a0, $at, .L80115990 -/* AC080 80115980 3C018000 */ lui $at, 0x8000 -/* AC084 80115984 14610002 */ bne $v1, $at, .L80115990 -/* AC088 80115988 00000000 */ nop -/* AC08C 8011598C 0006000D */ break 6 -.L80115990: -/* AC090 80115990 00001812 */ mflo $v1 -/* AC094 80115994 00042040 */ sll $a0, $a0, 1 -/* AC098 80115998 14800002 */ bnez $a0, .L801159A4 -/* AC09C 8011599C 00E4001A */ div $zero, $a3, $a0 -/* AC0A0 801159A0 0007000D */ break 7 -.L801159A4: -/* AC0A4 801159A4 2401FFFF */ addiu $at, $zero, -1 -/* AC0A8 801159A8 14810004 */ bne $a0, $at, .L801159BC -/* AC0AC 801159AC 3C018000 */ lui $at, 0x8000 -/* AC0B0 801159B0 14E10002 */ bne $a3, $at, .L801159BC -/* AC0B4 801159B4 00000000 */ nop -/* AC0B8 801159B8 0006000D */ break 6 -.L801159BC: -/* AC0BC 801159BC 00001012 */ mflo $v0 -/* AC0C0 801159C0 28420002 */ slti $v0, $v0, 2 -/* AC0C4 801159C4 1040FFCE */ beqz $v0, .L80115900 -/* AC0C8 801159C8 02439021 */ addu $s2, $s2, $v1 -/* AC0CC 801159CC 00129080 */ sll $s2, $s2, 2 -.L801159D0: -/* AC0D0 801159D0 9662002A */ lhu $v0, 0x2a($s3) -/* AC0D4 801159D4 24030002 */ addiu $v1, $zero, 2 -/* AC0D8 801159D8 3042000F */ andi $v0, $v0, 0xf -/* AC0DC 801159DC 14430007 */ bne $v0, $v1, .L801159FC -/* AC0E0 801159E0 0000A02D */ daddu $s4, $zero, $zero -/* AC0E4 801159E4 9662002C */ lhu $v0, 0x2c($s3) -/* AC0E8 801159E8 24080100 */ addiu $t0, $zero, 0x100 -/* AC0EC 801159EC 30420F00 */ andi $v0, $v0, 0xf00 -/* AC0F0 801159F0 14480002 */ bne $v0, $t0, .L801159FC -/* AC0F4 801159F4 24140020 */ addiu $s4, $zero, 0x20 -/* AC0F8 801159F8 24140200 */ addiu $s4, $zero, 0x200 -.L801159FC: -/* AC0FC 801159FC 92630029 */ lbu $v1, 0x29($s3) -/* AC100 80115A00 24020003 */ addiu $v0, $zero, 3 -/* AC104 80115A04 1462001E */ bne $v1, $v0, .L80115A80 -/* AC108 80115A08 0000882D */ daddu $s1, $zero, $zero -/* AC10C 80115A0C 96640020 */ lhu $a0, 0x20($s3) -/* AC110 80115A10 96620024 */ lhu $v0, 0x24($s3) -/* AC114 80115A14 00820018 */ mult $a0, $v0 -/* AC118 80115A18 9663002C */ lhu $v1, 0x2c($s3) -/* AC11C 80115A1C 3063F000 */ andi $v1, $v1, 0xf000 -/* AC120 80115A20 00008012 */ mflo $s0 -/* AC124 80115A24 14600003 */ bnez $v1, .L80115A34 -/* AC128 80115A28 00000000 */ nop -/* AC12C 80115A2C 08045695 */ j .L80115A54 -/* AC130 80115A30 00108042 */ srl $s0, $s0, 1 -.L80115A34: -/* AC134 80115A34 107E0007 */ beq $v1, $fp, .L80115A54 -/* AC138 80115A38 24022000 */ addiu $v0, $zero, 0x2000 -/* AC13C 80115A3C 14620003 */ bne $v1, $v0, .L80115A4C -/* AC140 80115A40 24023000 */ addiu $v0, $zero, 0x3000 -/* AC144 80115A44 08045695 */ j .L80115A54 -/* AC148 80115A48 00108040 */ sll $s0, $s0, 1 -.L80115A4C: -/* AC14C 80115A4C 50620001 */ beql $v1, $v0, .L80115A54 -/* AC150 80115A50 00108080 */ sll $s0, $s0, 2 -.L80115A54: -/* AC154 80115A54 9662002A */ lhu $v0, 0x2a($s3) -/* AC158 80115A58 24030020 */ addiu $v1, $zero, 0x20 -/* AC15C 80115A5C 304200F0 */ andi $v0, $v0, 0xf0 -/* AC160 80115A60 14430008 */ bne $v0, $v1, .L80115A84 -/* AC164 80115A64 0000882D */ daddu $s1, $zero, $zero -/* AC168 80115A68 9662002C */ lhu $v0, 0x2c($s3) -/* AC16C 80115A6C 3042F000 */ andi $v0, $v0, 0xf000 -/* AC170 80115A70 145E0004 */ bne $v0, $fp, .L80115A84 -/* AC174 80115A74 0060882D */ daddu $s1, $v1, $zero -/* AC178 80115A78 080456A1 */ j .L80115A84 -/* AC17C 80115A7C 24110200 */ addiu $s1, $zero, 0x200 -.L80115A80: -/* AC180 80115A80 0220802D */ daddu $s0, $s1, $zero -.L80115A84: -/* AC184 80115A84 26D60044 */ addiu $s6, $s6, 0x44 -/* AC188 80115A88 26A40030 */ addiu $a0, $s5, 0x30 -/* AC18C 80115A8C 3C058016 */ lui $a1, %hi(mdl_textureHandles) -/* AC190 80115A90 24A5A590 */ addiu $a1, $a1, %lo(mdl_textureHandles) -/* AC194 80115A94 02C52821 */ addu $a1, $s6, $a1 -/* AC198 80115A98 0260302D */ daddu $a2, $s3, $zero -/* AC19C 80115A9C 0240382D */ daddu $a3, $s2, $zero -/* AC1A0 80115AA0 AFB40010 */ sw $s4, 0x10($sp) -/* AC1A4 80115AA4 AFB00014 */ sw $s0, 0x14($sp) -/* AC1A8 80115AA8 0C0452D6 */ jal func_80114B58 -/* AC1AC 80115AAC AFB10018 */ sw $s1, 0x18($sp) -/* AC1B0 80115AB0 02541021 */ addu $v0, $s2, $s4 -/* AC1B4 80115AB4 24420030 */ addiu $v0, $v0, 0x30 -/* AC1B8 80115AB8 02A2A821 */ addu $s5, $s5, $v0 -/* AC1BC 80115ABC 02111021 */ addu $v0, $s0, $s1 -/* AC1C0 80115AC0 8FA80080 */ lw $t0, 0x80($sp) -/* AC1C4 80115AC4 8FA90084 */ lw $t1, 0x84($sp) -/* AC1C8 80115AC8 02A2A821 */ addu $s5, $s5, $v0 -/* AC1CC 80115ACC 01091021 */ addu $v0, $t0, $t1 -/* AC1D0 80115AD0 02A2102B */ sltu $v0, $s5, $v0 -/* AC1D4 80115AD4 1440FE89 */ bnez $v0, .L801154FC -/* AC1D8 80115AD8 02A0202D */ daddu $a0, $s5, $zero -.L80115ADC: -/* AC1DC 80115ADC 8FBF0074 */ lw $ra, 0x74($sp) -/* AC1E0 80115AE0 8FBE0070 */ lw $fp, 0x70($sp) -/* AC1E4 80115AE4 8FB7006C */ lw $s7, 0x6c($sp) -/* AC1E8 80115AE8 8FB60068 */ lw $s6, 0x68($sp) -/* AC1EC 80115AEC 8FB50064 */ lw $s5, 0x64($sp) -/* AC1F0 80115AF0 8FB40060 */ lw $s4, 0x60($sp) -/* AC1F4 80115AF4 8FB3005C */ lw $s3, 0x5c($sp) -/* AC1F8 80115AF8 8FB20058 */ lw $s2, 0x58($sp) -/* AC1FC 80115AFC 8FB10054 */ lw $s1, 0x54($sp) -/* AC200 80115B00 8FB00050 */ lw $s0, 0x50($sp) -/* AC204 80115B04 03E00008 */ jr $ra -/* AC208 80115B08 27BD0078 */ addiu $sp, $sp, 0x78 diff --git a/ver/us/asm/nonmatchings/a5dd0_len_114e0/load_tile_header.s b/ver/us/asm/nonmatchings/a5dd0_len_114e0/load_tile_header.s deleted file mode 100644 index 78f2aebdb4..0000000000 --- a/ver/us/asm/nonmatchings/a5dd0_len_114e0/load_tile_header.s +++ /dev/null @@ -1,522 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel load_tile_header -/* AB46C 80114D6C 27BDFFB0 */ addiu $sp, $sp, -0x50 -/* AB470 80114D70 AFB40038 */ sw $s4, 0x38($sp) -/* AB474 80114D74 00A0A02D */ daddu $s4, $a1, $zero -/* AB478 80114D78 AFBF004C */ sw $ra, 0x4c($sp) -/* AB47C 80114D7C AFBE0048 */ sw $fp, 0x48($sp) -/* AB480 80114D80 AFB70044 */ sw $s7, 0x44($sp) -/* AB484 80114D84 AFB60040 */ sw $s6, 0x40($sp) -/* AB488 80114D88 AFB5003C */ sw $s5, 0x3c($sp) -/* AB48C 80114D8C AFB30034 */ sw $s3, 0x34($sp) -/* AB490 80114D90 AFB20030 */ sw $s2, 0x30($sp) -/* AB494 80114D94 AFB1002C */ sw $s1, 0x2c($sp) -/* AB498 80114D98 AFB00028 */ sw $s0, 0x28($sp) -/* AB49C 80114D9C AFA60058 */ sw $a2, 0x58($sp) -/* AB4A0 80114DA0 AFA00020 */ sw $zero, 0x20($sp) -/* AB4A4 80114DA4 8C970008 */ lw $s7, 8($a0) -/* AB4A8 80114DA8 12E0017B */ beqz $s7, .L80115398 -/* AB4AC 80114DAC 0280F02D */ daddu $fp, $s4, $zero -/* AB4B0 80114DB0 8FA80058 */ lw $t0, 0x58($sp) -/* AB4B4 80114DB4 03C81021 */ addu $v0, $fp, $t0 -/* AB4B8 80114DB8 03C2102B */ sltu $v0, $fp, $v0 -/* AB4BC 80114DBC 10400171 */ beqz $v0, .L80115384 -/* AB4C0 80114DC0 24160001 */ addiu $s6, $zero, 1 -/* AB4C4 80114DC4 3C128015 */ lui $s2, %hi(gCurrentTileDescriptor) -/* AB4C8 80114DC8 26521740 */ addiu $s2, $s2, %lo(gCurrentTileDescriptor) -/* AB4CC 80114DCC 0280202D */ daddu $a0, $s4, $zero -.L80114DD0: -/* AB4D0 80114DD0 3C068015 */ lui $a2, %hi(gCurrentTileDescriptor) -/* AB4D4 80114DD4 24C61740 */ addiu $a2, $a2, %lo(gCurrentTileDescriptor) -/* AB4D8 80114DD8 0C00A5CF */ jal dma_copy -/* AB4DC 80114DDC 26850030 */ addiu $a1, $s4, 0x30 -/* AB4E0 80114DE0 96430022 */ lhu $v1, 0x22($s2) -/* AB4E4 80114DE4 96460026 */ lhu $a2, 0x26($s2) -/* AB4E8 80114DE8 00660018 */ mult $v1, $a2 -/* AB4EC 80114DEC 9642002C */ lhu $v0, 0x2c($s2) -/* AB4F0 80114DF0 30420F00 */ andi $v0, $v0, 0xf00 -/* AB4F4 80114DF4 00008012 */ mflo $s0 -/* AB4F8 80114DF8 14400047 */ bnez $v0, .L80114F18 -/* AB4FC 80114DFC 0060382D */ daddu $a3, $v1, $zero -/* AB500 80114E00 92420029 */ lbu $v0, 0x29($s2) -/* AB504 80114E04 54560120 */ bnel $v0, $s6, .L80115288 -/* AB508 80114E08 00108042 */ srl $s0, $s0, 1 -/* AB50C 80114E0C 24040002 */ addiu $a0, $zero, 2 -/* AB510 80114E10 14800002 */ bnez $a0, .L80114E1C -/* AB514 80114E14 0064001A */ div $zero, $v1, $a0 -/* AB518 80114E18 0007000D */ break 7 -.L80114E1C: -/* AB51C 80114E1C 2401FFFF */ addiu $at, $zero, -1 -/* AB520 80114E20 14810004 */ bne $a0, $at, .L80114E34 -/* AB524 80114E24 3C018000 */ lui $at, 0x8000 -/* AB528 80114E28 14610002 */ bne $v1, $at, .L80114E34 -/* AB52C 80114E2C 00000000 */ nop -/* AB530 80114E30 0006000D */ break 6 -.L80114E34: -/* AB534 80114E34 00001012 */ mflo $v0 -/* AB538 80114E38 28420010 */ slti $v0, $v0, 0x10 -/* AB53C 80114E3C 54400112 */ bnel $v0, $zero, .L80115288 -/* AB540 80114E40 00108042 */ srl $s0, $s0, 1 -.L80114E44: -/* AB544 80114E44 14800002 */ bnez $a0, .L80114E50 -/* AB548 80114E48 00C4001A */ div $zero, $a2, $a0 -/* AB54C 80114E4C 0007000D */ break 7 -.L80114E50: -/* AB550 80114E50 2401FFFF */ addiu $at, $zero, -1 -/* AB554 80114E54 14810004 */ bne $a0, $at, .L80114E68 -/* AB558 80114E58 3C018000 */ lui $at, 0x8000 -/* AB55C 80114E5C 14C10002 */ bne $a2, $at, .L80114E68 -/* AB560 80114E60 00000000 */ nop -/* AB564 80114E64 0006000D */ break 6 -.L80114E68: -/* AB568 80114E68 00001012 */ mflo $v0 -/* AB56C 80114E6C 58400106 */ blezl $v0, .L80115288 -/* AB570 80114E70 00108042 */ srl $s0, $s0, 1 -/* AB574 80114E74 14800002 */ bnez $a0, .L80114E80 -/* AB578 80114E78 00E4001A */ div $zero, $a3, $a0 -/* AB57C 80114E7C 0007000D */ break 7 -.L80114E80: -/* AB580 80114E80 2401FFFF */ addiu $at, $zero, -1 -/* AB584 80114E84 14810004 */ bne $a0, $at, .L80114E98 -/* AB588 80114E88 3C018000 */ lui $at, 0x8000 -/* AB58C 80114E8C 14E10002 */ bne $a3, $at, .L80114E98 -/* AB590 80114E90 00000000 */ nop -/* AB594 80114E94 0006000D */ break 6 -.L80114E98: -/* AB598 80114E98 00001012 */ mflo $v0 -/* AB59C 80114E9C 00000000 */ nop -/* AB5A0 80114EA0 00000000 */ nop -/* AB5A4 80114EA4 00460018 */ mult $v0, $a2 -/* AB5A8 80114EA8 00001812 */ mflo $v1 -/* AB5AC 80114EAC 00000000 */ nop -/* AB5B0 80114EB0 14800002 */ bnez $a0, .L80114EBC -/* AB5B4 80114EB4 0064001A */ div $zero, $v1, $a0 -/* AB5B8 80114EB8 0007000D */ break 7 -.L80114EBC: -/* AB5BC 80114EBC 2401FFFF */ addiu $at, $zero, -1 -/* AB5C0 80114EC0 14810004 */ bne $a0, $at, .L80114ED4 -/* AB5C4 80114EC4 3C018000 */ lui $at, 0x8000 -/* AB5C8 80114EC8 14610002 */ bne $v1, $at, .L80114ED4 -/* AB5CC 80114ECC 00000000 */ nop -/* AB5D0 80114ED0 0006000D */ break 6 -.L80114ED4: -/* AB5D4 80114ED4 00001812 */ mflo $v1 -/* AB5D8 80114ED8 00042040 */ sll $a0, $a0, 1 -/* AB5DC 80114EDC 14800002 */ bnez $a0, .L80114EE8 -/* AB5E0 80114EE0 00E4001A */ div $zero, $a3, $a0 -/* AB5E4 80114EE4 0007000D */ break 7 -.L80114EE8: -/* AB5E8 80114EE8 2401FFFF */ addiu $at, $zero, -1 -/* AB5EC 80114EEC 14810004 */ bne $a0, $at, .L80114F00 -/* AB5F0 80114EF0 3C018000 */ lui $at, 0x8000 -/* AB5F4 80114EF4 14E10002 */ bne $a3, $at, .L80114F00 -/* AB5F8 80114EF8 00000000 */ nop -/* AB5FC 80114EFC 0006000D */ break 6 -.L80114F00: -/* AB600 80114F00 00001012 */ mflo $v0 -/* AB604 80114F04 28420010 */ slti $v0, $v0, 0x10 -/* AB608 80114F08 1040FFCE */ beqz $v0, .L80114E44 -/* AB60C 80114F0C 02038021 */ addu $s0, $s0, $v1 -/* AB610 80114F10 080454A2 */ j .L80115288 -/* AB614 80114F14 00108042 */ srl $s0, $s0, 1 -.L80114F18: -/* AB618 80114F18 24080100 */ addiu $t0, $zero, 0x100 -/* AB61C 80114F1C 14480044 */ bne $v0, $t0, .L80115030 -/* AB620 80114F20 00000000 */ nop -/* AB624 80114F24 92420029 */ lbu $v0, 0x29($s2) -/* AB628 80114F28 145600D7 */ bne $v0, $s6, .L80115288 -/* AB62C 80114F2C 24050002 */ addiu $a1, $zero, 2 -/* AB630 80114F30 14A00002 */ bnez $a1, .L80114F3C -/* AB634 80114F34 0065001A */ div $zero, $v1, $a1 -/* AB638 80114F38 0007000D */ break 7 -.L80114F3C: -/* AB63C 80114F3C 2401FFFF */ addiu $at, $zero, -1 -/* AB640 80114F40 14A10004 */ bne $a1, $at, .L80114F54 -/* AB644 80114F44 3C018000 */ lui $at, 0x8000 -/* AB648 80114F48 14610002 */ bne $v1, $at, .L80114F54 -/* AB64C 80114F4C 00000000 */ nop -/* AB650 80114F50 0006000D */ break 6 -.L80114F54: -/* AB654 80114F54 00001012 */ mflo $v0 -.L80114F58: -/* AB658 80114F58 28420008 */ slti $v0, $v0, 8 -/* AB65C 80114F5C 144000CA */ bnez $v0, .L80115288 -/* AB660 80114F60 00000000 */ nop -/* AB664 80114F64 14A00002 */ bnez $a1, .L80114F70 -/* AB668 80114F68 00C5001A */ div $zero, $a2, $a1 -/* AB66C 80114F6C 0007000D */ break 7 -.L80114F70: -/* AB670 80114F70 2401FFFF */ addiu $at, $zero, -1 -/* AB674 80114F74 14A10004 */ bne $a1, $at, .L80114F88 -/* AB678 80114F78 3C018000 */ lui $at, 0x8000 -/* AB67C 80114F7C 14C10002 */ bne $a2, $at, .L80114F88 -/* AB680 80114F80 00000000 */ nop -/* AB684 80114F84 0006000D */ break 6 -.L80114F88: -/* AB688 80114F88 00001012 */ mflo $v0 -/* AB68C 80114F8C 184000BE */ blez $v0, .L80115288 -/* AB690 80114F90 00000000 */ nop -/* AB694 80114F94 96430022 */ lhu $v1, 0x22($s2) -/* AB698 80114F98 14A00002 */ bnez $a1, .L80114FA4 -/* AB69C 80114F9C 0065001A */ div $zero, $v1, $a1 -/* AB6A0 80114FA0 0007000D */ break 7 -.L80114FA4: -/* AB6A4 80114FA4 2401FFFF */ addiu $at, $zero, -1 -/* AB6A8 80114FA8 14A10004 */ bne $a1, $at, .L80114FBC -/* AB6AC 80114FAC 3C018000 */ lui $at, 0x8000 -/* AB6B0 80114FB0 14610002 */ bne $v1, $at, .L80114FBC -/* AB6B4 80114FB4 00000000 */ nop -/* AB6B8 80114FB8 0006000D */ break 6 -.L80114FBC: -/* AB6BC 80114FBC 00001012 */ mflo $v0 -/* AB6C0 80114FC0 00000000 */ nop -/* AB6C4 80114FC4 00000000 */ nop -/* AB6C8 80114FC8 00460018 */ mult $v0, $a2 -/* AB6CC 80114FCC 00004812 */ mflo $t1 -/* AB6D0 80114FD0 00000000 */ nop -/* AB6D4 80114FD4 14A00002 */ bnez $a1, .L80114FE0 -/* AB6D8 80114FD8 0125001A */ div $zero, $t1, $a1 -/* AB6DC 80114FDC 0007000D */ break 7 -.L80114FE0: -/* AB6E0 80114FE0 2401FFFF */ addiu $at, $zero, -1 -/* AB6E4 80114FE4 14A10004 */ bne $a1, $at, .L80114FF8 -/* AB6E8 80114FE8 3C018000 */ lui $at, 0x8000 -/* AB6EC 80114FEC 15210002 */ bne $t1, $at, .L80114FF8 -/* AB6F0 80114FF0 00000000 */ nop -/* AB6F4 80114FF4 0006000D */ break 6 -.L80114FF8: -/* AB6F8 80114FF8 00002012 */ mflo $a0 -/* AB6FC 80114FFC 00052840 */ sll $a1, $a1, 1 -/* AB700 80115000 14A00002 */ bnez $a1, .L8011500C -/* AB704 80115004 0065001A */ div $zero, $v1, $a1 -/* AB708 80115008 0007000D */ break 7 -.L8011500C: -/* AB70C 8011500C 2401FFFF */ addiu $at, $zero, -1 -/* AB710 80115010 14A10004 */ bne $a1, $at, .L80115024 -/* AB714 80115014 3C018000 */ lui $at, 0x8000 -/* AB718 80115018 14610002 */ bne $v1, $at, .L80115024 -/* AB71C 8011501C 00000000 */ nop -/* AB720 80115020 0006000D */ break 6 -.L80115024: -/* AB724 80115024 00001012 */ mflo $v0 -/* AB728 80115028 080453D6 */ j .L80114F58 -/* AB72C 8011502C 02048021 */ addu $s0, $s0, $a0 -.L80115030: -/* AB730 80115030 9642002C */ lhu $v0, 0x2c($s2) -/* AB734 80115034 30430F00 */ andi $v1, $v0, 0xf00 -/* AB738 80115038 24020200 */ addiu $v0, $zero, 0x200 -/* AB73C 8011503C 14620049 */ bne $v1, $v0, .L80115164 -/* AB740 80115040 24020300 */ addiu $v0, $zero, 0x300 -/* AB744 80115044 92420029 */ lbu $v0, 0x29($s2) -/* AB748 80115048 5456008F */ bnel $v0, $s6, .L80115288 -/* AB74C 8011504C 00108040 */ sll $s0, $s0, 1 -/* AB750 80115050 96470022 */ lhu $a3, 0x22($s2) -/* AB754 80115054 24040002 */ addiu $a0, $zero, 2 -/* AB758 80115058 14800002 */ bnez $a0, .L80115064 -/* AB75C 8011505C 00E4001A */ div $zero, $a3, $a0 -/* AB760 80115060 0007000D */ break 7 -.L80115064: -/* AB764 80115064 2401FFFF */ addiu $at, $zero, -1 -/* AB768 80115068 14810004 */ bne $a0, $at, .L8011507C -/* AB76C 8011506C 3C018000 */ lui $at, 0x8000 -/* AB770 80115070 14E10002 */ bne $a3, $at, .L8011507C -/* AB774 80115074 00000000 */ nop -/* AB778 80115078 0006000D */ break 6 -.L8011507C: -/* AB77C 8011507C 00001012 */ mflo $v0 -/* AB780 80115080 28420004 */ slti $v0, $v0, 4 -/* AB784 80115084 54400080 */ bnel $v0, $zero, .L80115288 -/* AB788 80115088 00108040 */ sll $s0, $s0, 1 -/* AB78C 8011508C 96460026 */ lhu $a2, 0x26($s2) -.L80115090: -/* AB790 80115090 14800002 */ bnez $a0, .L8011509C -/* AB794 80115094 00C4001A */ div $zero, $a2, $a0 -/* AB798 80115098 0007000D */ break 7 -.L8011509C: -/* AB79C 8011509C 2401FFFF */ addiu $at, $zero, -1 -/* AB7A0 801150A0 14810004 */ bne $a0, $at, .L801150B4 -/* AB7A4 801150A4 3C018000 */ lui $at, 0x8000 -/* AB7A8 801150A8 14C10002 */ bne $a2, $at, .L801150B4 -/* AB7AC 801150AC 00000000 */ nop -/* AB7B0 801150B0 0006000D */ break 6 -.L801150B4: -/* AB7B4 801150B4 00001012 */ mflo $v0 -/* AB7B8 801150B8 58400073 */ blezl $v0, .L80115288 -/* AB7BC 801150BC 00108040 */ sll $s0, $s0, 1 -/* AB7C0 801150C0 14800002 */ bnez $a0, .L801150CC -/* AB7C4 801150C4 00E4001A */ div $zero, $a3, $a0 -/* AB7C8 801150C8 0007000D */ break 7 -.L801150CC: -/* AB7CC 801150CC 2401FFFF */ addiu $at, $zero, -1 -/* AB7D0 801150D0 14810004 */ bne $a0, $at, .L801150E4 -/* AB7D4 801150D4 3C018000 */ lui $at, 0x8000 -/* AB7D8 801150D8 14E10002 */ bne $a3, $at, .L801150E4 -/* AB7DC 801150DC 00000000 */ nop -/* AB7E0 801150E0 0006000D */ break 6 -.L801150E4: -/* AB7E4 801150E4 00001012 */ mflo $v0 -/* AB7E8 801150E8 00000000 */ nop -/* AB7EC 801150EC 00000000 */ nop -/* AB7F0 801150F0 00460018 */ mult $v0, $a2 -/* AB7F4 801150F4 00001812 */ mflo $v1 -/* AB7F8 801150F8 00000000 */ nop -/* AB7FC 801150FC 14800002 */ bnez $a0, .L80115108 -/* AB800 80115100 0064001A */ div $zero, $v1, $a0 -/* AB804 80115104 0007000D */ break 7 -.L80115108: -/* AB808 80115108 2401FFFF */ addiu $at, $zero, -1 -/* AB80C 8011510C 14810004 */ bne $a0, $at, .L80115120 -/* AB810 80115110 3C018000 */ lui $at, 0x8000 -/* AB814 80115114 14610002 */ bne $v1, $at, .L80115120 -/* AB818 80115118 00000000 */ nop -/* AB81C 8011511C 0006000D */ break 6 -.L80115120: -/* AB820 80115120 00001812 */ mflo $v1 -/* AB824 80115124 00042040 */ sll $a0, $a0, 1 -/* AB828 80115128 14800002 */ bnez $a0, .L80115134 -/* AB82C 8011512C 00E4001A */ div $zero, $a3, $a0 -/* AB830 80115130 0007000D */ break 7 -.L80115134: -/* AB834 80115134 2401FFFF */ addiu $at, $zero, -1 -/* AB838 80115138 14810004 */ bne $a0, $at, .L8011514C -/* AB83C 8011513C 3C018000 */ lui $at, 0x8000 -/* AB840 80115140 14E10002 */ bne $a3, $at, .L8011514C -/* AB844 80115144 00000000 */ nop -/* AB848 80115148 0006000D */ break 6 -.L8011514C: -/* AB84C 8011514C 00001012 */ mflo $v0 -/* AB850 80115150 28420004 */ slti $v0, $v0, 4 -/* AB854 80115154 1040FFCE */ beqz $v0, .L80115090 -/* AB858 80115158 02038021 */ addu $s0, $s0, $v1 -/* AB85C 8011515C 080454A2 */ j .L80115288 -/* AB860 80115160 00108040 */ sll $s0, $s0, 1 -.L80115164: -/* AB864 80115164 14620048 */ bne $v1, $v0, .L80115288 -/* AB868 80115168 00000000 */ nop -/* AB86C 8011516C 92420029 */ lbu $v0, 0x29($s2) -/* AB870 80115170 54560045 */ bnel $v0, $s6, .L80115288 -/* AB874 80115174 00108080 */ sll $s0, $s0, 2 -/* AB878 80115178 96470022 */ lhu $a3, 0x22($s2) -/* AB87C 8011517C 24040002 */ addiu $a0, $zero, 2 -/* AB880 80115180 14800002 */ bnez $a0, .L8011518C -/* AB884 80115184 00E4001A */ div $zero, $a3, $a0 -/* AB888 80115188 0007000D */ break 7 -.L8011518C: -/* AB88C 8011518C 2401FFFF */ addiu $at, $zero, -1 -/* AB890 80115190 14810004 */ bne $a0, $at, .L801151A4 -/* AB894 80115194 3C018000 */ lui $at, 0x8000 -/* AB898 80115198 14E10002 */ bne $a3, $at, .L801151A4 -/* AB89C 8011519C 00000000 */ nop -/* AB8A0 801151A0 0006000D */ break 6 -.L801151A4: -/* AB8A4 801151A4 00001012 */ mflo $v0 -/* AB8A8 801151A8 0044102A */ slt $v0, $v0, $a0 -/* AB8AC 801151AC 54400036 */ bnel $v0, $zero, .L80115288 -/* AB8B0 801151B0 00108080 */ sll $s0, $s0, 2 -/* AB8B4 801151B4 96460026 */ lhu $a2, 0x26($s2) -.L801151B8: -/* AB8B8 801151B8 14800002 */ bnez $a0, .L801151C4 -/* AB8BC 801151BC 00C4001A */ div $zero, $a2, $a0 -/* AB8C0 801151C0 0007000D */ break 7 -.L801151C4: -/* AB8C4 801151C4 2401FFFF */ addiu $at, $zero, -1 -/* AB8C8 801151C8 14810004 */ bne $a0, $at, .L801151DC -/* AB8CC 801151CC 3C018000 */ lui $at, 0x8000 -/* AB8D0 801151D0 14C10002 */ bne $a2, $at, .L801151DC -/* AB8D4 801151D4 00000000 */ nop -/* AB8D8 801151D8 0006000D */ break 6 -.L801151DC: -/* AB8DC 801151DC 00001012 */ mflo $v0 -/* AB8E0 801151E0 58400029 */ blezl $v0, .L80115288 -/* AB8E4 801151E4 00108080 */ sll $s0, $s0, 2 -/* AB8E8 801151E8 14800002 */ bnez $a0, .L801151F4 -/* AB8EC 801151EC 00E4001A */ div $zero, $a3, $a0 -/* AB8F0 801151F0 0007000D */ break 7 -.L801151F4: -/* AB8F4 801151F4 2401FFFF */ addiu $at, $zero, -1 -/* AB8F8 801151F8 14810004 */ bne $a0, $at, .L8011520C -/* AB8FC 801151FC 3C018000 */ lui $at, 0x8000 -/* AB900 80115200 14E10002 */ bne $a3, $at, .L8011520C -/* AB904 80115204 00000000 */ nop -/* AB908 80115208 0006000D */ break 6 -.L8011520C: -/* AB90C 8011520C 00001012 */ mflo $v0 -/* AB910 80115210 00000000 */ nop -/* AB914 80115214 00000000 */ nop -/* AB918 80115218 00460018 */ mult $v0, $a2 -/* AB91C 8011521C 00001812 */ mflo $v1 -/* AB920 80115220 00000000 */ nop -/* AB924 80115224 14800002 */ bnez $a0, .L80115230 -/* AB928 80115228 0064001A */ div $zero, $v1, $a0 -/* AB92C 8011522C 0007000D */ break 7 -.L80115230: -/* AB930 80115230 2401FFFF */ addiu $at, $zero, -1 -/* AB934 80115234 14810004 */ bne $a0, $at, .L80115248 -/* AB938 80115238 3C018000 */ lui $at, 0x8000 -/* AB93C 8011523C 14610002 */ bne $v1, $at, .L80115248 -/* AB940 80115240 00000000 */ nop -/* AB944 80115244 0006000D */ break 6 -.L80115248: -/* AB948 80115248 00001812 */ mflo $v1 -/* AB94C 8011524C 00042040 */ sll $a0, $a0, 1 -/* AB950 80115250 14800002 */ bnez $a0, .L8011525C -/* AB954 80115254 00E4001A */ div $zero, $a3, $a0 -/* AB958 80115258 0007000D */ break 7 -.L8011525C: -/* AB95C 8011525C 2401FFFF */ addiu $at, $zero, -1 -/* AB960 80115260 14810004 */ bne $a0, $at, .L80115274 -/* AB964 80115264 3C018000 */ lui $at, 0x8000 -/* AB968 80115268 14E10002 */ bne $a3, $at, .L80115274 -/* AB96C 8011526C 00000000 */ nop -/* AB970 80115270 0006000D */ break 6 -.L80115274: -/* AB974 80115274 00001012 */ mflo $v0 -/* AB978 80115278 28420002 */ slti $v0, $v0, 2 -/* AB97C 8011527C 1040FFCE */ beqz $v0, .L801151B8 -/* AB980 80115280 02038021 */ addu $s0, $s0, $v1 -/* AB984 80115284 00108080 */ sll $s0, $s0, 2 -.L80115288: -/* AB988 80115288 9642002A */ lhu $v0, 0x2a($s2) -/* AB98C 8011528C 24030002 */ addiu $v1, $zero, 2 -/* AB990 80115290 3042000F */ andi $v0, $v0, 0xf -/* AB994 80115294 14430007 */ bne $v0, $v1, .L801152B4 -/* AB998 80115298 0000A82D */ daddu $s5, $zero, $zero -/* AB99C 8011529C 9642002C */ lhu $v0, 0x2c($s2) -/* AB9A0 801152A0 24080100 */ addiu $t0, $zero, 0x100 -/* AB9A4 801152A4 30420F00 */ andi $v0, $v0, 0xf00 -/* AB9A8 801152A8 14480002 */ bne $v0, $t0, .L801152B4 -/* AB9AC 801152AC 24150020 */ addiu $s5, $zero, 0x20 -/* AB9B0 801152B0 24150200 */ addiu $s5, $zero, 0x200 -.L801152B4: -/* AB9B4 801152B4 92430029 */ lbu $v1, 0x29($s2) -/* AB9B8 801152B8 24020003 */ addiu $v0, $zero, 3 -/* AB9BC 801152BC 1462001F */ bne $v1, $v0, .L8011533C -/* AB9C0 801152C0 0000982D */ daddu $s3, $zero, $zero -/* AB9C4 801152C4 96440020 */ lhu $a0, 0x20($s2) -/* AB9C8 801152C8 96420024 */ lhu $v0, 0x24($s2) -/* AB9CC 801152CC 00820018 */ mult $a0, $v0 -/* AB9D0 801152D0 9643002C */ lhu $v1, 0x2c($s2) -/* AB9D4 801152D4 3063F000 */ andi $v1, $v1, 0xf000 -/* AB9D8 801152D8 00008812 */ mflo $s1 -/* AB9DC 801152DC 14600003 */ bnez $v1, .L801152EC -/* AB9E0 801152E0 24081000 */ addiu $t0, $zero, 0x1000 -/* AB9E4 801152E4 080454C3 */ j .L8011530C -/* AB9E8 801152E8 00118842 */ srl $s1, $s1, 1 -.L801152EC: -/* AB9EC 801152EC 10680007 */ beq $v1, $t0, .L8011530C -/* AB9F0 801152F0 24022000 */ addiu $v0, $zero, 0x2000 -/* AB9F4 801152F4 14620003 */ bne $v1, $v0, .L80115304 -/* AB9F8 801152F8 24023000 */ addiu $v0, $zero, 0x3000 -/* AB9FC 801152FC 080454C3 */ j .L8011530C -/* ABA00 80115300 00118840 */ sll $s1, $s1, 1 -.L80115304: -/* ABA04 80115304 50620001 */ beql $v1, $v0, .L8011530C -/* ABA08 80115308 00118880 */ sll $s1, $s1, 2 -.L8011530C: -/* ABA0C 8011530C 9642002A */ lhu $v0, 0x2a($s2) -/* ABA10 80115310 24030020 */ addiu $v1, $zero, 0x20 -/* ABA14 80115314 304200F0 */ andi $v0, $v0, 0xf0 -/* ABA18 80115318 14430009 */ bne $v0, $v1, .L80115340 -/* ABA1C 8011531C 0000982D */ daddu $s3, $zero, $zero -/* ABA20 80115320 9642002C */ lhu $v0, 0x2c($s2) -/* ABA24 80115324 24081000 */ addiu $t0, $zero, 0x1000 -/* ABA28 80115328 3042F000 */ andi $v0, $v0, 0xf000 -/* ABA2C 8011532C 14480004 */ bne $v0, $t0, .L80115340 -/* ABA30 80115330 0060982D */ daddu $s3, $v1, $zero -/* ABA34 80115334 080454D0 */ j .L80115340 -/* ABA38 80115338 24130200 */ addiu $s3, $zero, 0x200 -.L8011533C: -/* ABA3C 8011533C 0260882D */ daddu $s1, $s3, $zero -.L80115340: -/* ABA40 80115340 02E0202D */ daddu $a0, $s7, $zero -/* ABA44 80115344 0C01BB5C */ jal strcmp -/* ABA48 80115348 0240282D */ daddu $a1, $s2, $zero -/* ABA4C 8011534C 1040000D */ beqz $v0, .L80115384 -/* ABA50 80115350 02151021 */ addu $v0, $s0, $s5 -/* ABA54 80115354 24420030 */ addiu $v0, $v0, 0x30 -/* ABA58 80115358 0282A021 */ addu $s4, $s4, $v0 -/* ABA5C 8011535C 8FA80020 */ lw $t0, 0x20($sp) -/* ABA60 80115360 02331021 */ addu $v0, $s1, $s3 -/* ABA64 80115364 25080001 */ addiu $t0, $t0, 1 -/* ABA68 80115368 AFA80020 */ sw $t0, 0x20($sp) -/* ABA6C 8011536C 8FA80058 */ lw $t0, 0x58($sp) -/* ABA70 80115370 0282A021 */ addu $s4, $s4, $v0 -/* ABA74 80115374 03C81021 */ addu $v0, $fp, $t0 -/* ABA78 80115378 0282102B */ sltu $v0, $s4, $v0 -/* ABA7C 8011537C 1440FE94 */ bnez $v0, .L80114DD0 -/* ABA80 80115380 0280202D */ daddu $a0, $s4, $zero -.L80115384: -/* ABA84 80115384 3C020004 */ lui $v0, 4 -/* ABA88 80115388 03C21021 */ addu $v0, $fp, $v0 -/* ABA8C 8011538C 0282102B */ sltu $v0, $s4, $v0 -/* ABA90 80115390 14400009 */ bnez $v0, .L801153B8 -/* ABA94 80115394 00000000 */ nop -.L80115398: -/* ABA98 80115398 3C028015 */ lui $v0, %hi(mdl_treeIterPos) -/* ABA9C 8011539C 8C423224 */ lw $v0, %lo(mdl_treeIterPos)($v0) -/* ABAA0 801153A0 3C03800A */ lui $v1, %hi(mdl_currentModelTreeNodeInfo) -/* ABAA4 801153A4 8C63A5F4 */ lw $v1, %lo(mdl_currentModelTreeNodeInfo)($v1) -/* ABAA8 801153A8 00021080 */ sll $v0, $v0, 2 -/* ABAAC 801153AC 00431021 */ addu $v0, $v0, $v1 -/* ABAB0 801153B0 0804551A */ j .L80115468 -/* ABAB4 801153B4 A0400002 */ sb $zero, 2($v0) -.L801153B8: -/* ABAB8 801153B8 3C168015 */ lui $s6, %hi(mdl_treeIterPos) -/* ABABC 801153BC 26D63224 */ addiu $s6, $s6, %lo(mdl_treeIterPos) -/* ABAC0 801153C0 3C17800A */ lui $s7, %hi(mdl_currentModelTreeNodeInfo) -/* ABAC4 801153C4 26F7A5F4 */ addiu $s7, $s7, %lo(mdl_currentModelTreeNodeInfo) -/* ABAC8 801153C8 8EC20000 */ lw $v0, ($s6) -/* ABACC 801153CC 8EE30000 */ lw $v1, ($s7) -/* ABAD0 801153D0 8FA80020 */ lw $t0, 0x20($sp) -/* ABAD4 801153D4 00021080 */ sll $v0, $v0, 2 -/* ABAD8 801153D8 00431021 */ addu $v0, $v0, $v1 -/* ABADC 801153DC 25030001 */ addiu $v1, $t0, 1 -/* ABAE0 801153E0 A0430002 */ sb $v1, 2($v0) -/* ABAE4 801153E4 8EC20000 */ lw $v0, ($s6) -/* ABAE8 801153E8 8EE30000 */ lw $v1, ($s7) -/* ABAEC 801153EC 00021080 */ sll $v0, $v0, 2 -/* ABAF0 801153F0 00431021 */ addu $v0, $v0, $v1 -/* ABAF4 801153F4 90430002 */ lbu $v1, 2($v0) -/* ABAF8 801153F8 3C048016 */ lui $a0, %hi(mdl_textureHandles) -/* ABAFC 801153FC 2484A590 */ addiu $a0, $a0, %lo(mdl_textureHandles) -/* ABB00 80115400 00031100 */ sll $v0, $v1, 4 -/* ABB04 80115404 00431021 */ addu $v0, $v0, $v1 -/* ABB08 80115408 00021080 */ sll $v0, $v0, 2 -/* ABB0C 8011540C 00442821 */ addu $a1, $v0, $a0 -/* ABB10 80115410 8CA20000 */ lw $v0, ($a1) -/* ABB14 80115414 14400014 */ bnez $v0, .L80115468 -/* ABB18 80115418 26940030 */ addiu $s4, $s4, 0x30 -/* ABB1C 8011541C 0280202D */ daddu $a0, $s4, $zero -/* ABB20 80115420 0240302D */ daddu $a2, $s2, $zero -/* ABB24 80115424 0200382D */ daddu $a3, $s0, $zero -/* ABB28 80115428 AFB50010 */ sw $s5, 0x10($sp) -/* ABB2C 8011542C AFB10014 */ sw $s1, 0x14($sp) -/* ABB30 80115430 0C0452D6 */ jal func_80114B58 -/* ABB34 80115434 AFB30018 */ sw $s3, 0x18($sp) -/* ABB38 80115438 02902021 */ addu $a0, $s4, $s0 -/* ABB3C 8011543C 00952021 */ addu $a0, $a0, $s5 -/* ABB40 80115440 00912021 */ addu $a0, $a0, $s1 -/* ABB44 80115444 00932021 */ addu $a0, $a0, $s3 -/* ABB48 80115448 8EC20000 */ lw $v0, ($s6) -/* ABB4C 8011544C 8EE30000 */ lw $v1, ($s7) -/* ABB50 80115450 8FA70058 */ lw $a3, 0x58($sp) -/* ABB54 80115454 00021080 */ sll $v0, $v0, 2 -/* ABB58 80115458 00431021 */ addu $v0, $v0, $v1 -/* ABB5C 8011545C 90450002 */ lbu $a1, 2($v0) -/* ABB60 80115460 0C045526 */ jal func_80115498 -/* ABB64 80115464 03C0302D */ daddu $a2, $fp, $zero -.L80115468: -/* ABB68 80115468 8FBF004C */ lw $ra, 0x4c($sp) -/* ABB6C 8011546C 8FBE0048 */ lw $fp, 0x48($sp) -/* ABB70 80115470 8FB70044 */ lw $s7, 0x44($sp) -/* ABB74 80115474 8FB60040 */ lw $s6, 0x40($sp) -/* ABB78 80115478 8FB5003C */ lw $s5, 0x3c($sp) -/* ABB7C 8011547C 8FB40038 */ lw $s4, 0x38($sp) -/* ABB80 80115480 8FB30034 */ lw $s3, 0x34($sp) -/* ABB84 80115484 8FB20030 */ lw $s2, 0x30($sp) -/* ABB88 80115488 8FB1002C */ lw $s1, 0x2c($sp) -/* ABB8C 8011548C 8FB00028 */ lw $s0, 0x28($sp) -/* ABB90 80115490 03E00008 */ jr $ra -/* ABB94 80115494 27BD0050 */ addiu $sp, $sp, 0x50 diff --git a/ver/us/asm/nonmatchings/a5dd0_len_114e0/mdl_local_gfx_update_vtx_pointers.s b/ver/us/asm/nonmatchings/a5dd0_len_114e0/mdl_local_gfx_update_vtx_pointers.s deleted file mode 100644 index fe542678d6..0000000000 --- a/ver/us/asm/nonmatchings/a5dd0_len_114e0/mdl_local_gfx_update_vtx_pointers.s +++ /dev/null @@ -1,27 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel mdl_local_gfx_update_vtx_pointers -/* B27DC 8011C0DC 0080482D */ daddu $t1, $a0, $zero -/* B27E0 8011C0E0 240D0001 */ addiu $t5, $zero, 1 -/* B27E4 8011C0E4 240C00DF */ addiu $t4, $zero, 0xdf -.L8011C0E8: -/* B27E8 8011C0E8 8D220000 */ lw $v0, ($t1) -/* B27EC 8011C0EC 8D230004 */ lw $v1, 4($t1) -/* B27F0 8011C0F0 8D280004 */ lw $t0, 4($t1) -/* B27F4 8011C0F4 00025802 */ srl $t3, $v0, 0 -/* B27F8 8011C0F8 0000502D */ daddu $t2, $zero, $zero -/* B27FC 8011C0FC 000B1E02 */ srl $v1, $t3, 0x18 -/* B2800 8011C100 146D0005 */ bne $v1, $t5, .L8011C118 -/* B2804 8011C104 25290008 */ addiu $t1, $t1, 8 -/* B2808 8011C108 01051023 */ subu $v0, $t0, $a1 -/* B280C 8011C10C 00021103 */ sra $v0, $v0, 4 -/* B2810 8011C110 00021100 */ sll $v0, $v0, 4 -/* B2814 8011C114 00E24021 */ addu $t0, $a3, $v0 -.L8011C118: -/* B2818 8011C118 ACCB0000 */ sw $t3, ($a2) -/* B281C 8011C11C ACC80004 */ sw $t0, 4($a2) -/* B2820 8011C120 146CFFF1 */ bne $v1, $t4, .L8011C0E8 -/* B2824 8011C124 24C60008 */ addiu $a2, $a2, 8 -/* B2828 8011C128 03E00008 */ jr $ra -/* B282C 8011C12C 00000000 */ nop diff --git a/ver/us/symbol_addrs.txt b/ver/us/symbol_addrs.txt index 2217bf69d8..d869b9d2c7 100644 --- a/ver/us/symbol_addrs.txt +++ b/ver/us/symbol_addrs.txt @@ -4033,7 +4033,7 @@ make_transform_group = 0x8011B37C; // type:func rom:0xB1A7C enable_transform_group = 0x8011B5D0; // type:func rom:0xB1CD0 disable_transform_group = 0x8011B660; // type:func rom:0xB1D60 clone_model = 0x8011B6F0; // type:func rom:0xB1DF0 -func_8011B7C0 = 0x8011B7C0; // type:func rom:0xB1EC0 +set_model_flags = 0x8011B7C0; // type:func rom:0xB1EC0 func_8011B950 = 0x8011B950; // type:func rom:0xB2050 func_8011BAE8 = 0x8011BAE8; // type:func rom:0xB21E8 enable_world_fog = 0x8011BB50; // type:func rom:0xB2250 @@ -4828,7 +4828,7 @@ gCurrentTransformGroups = 0x801512E0; // type:data rom:0xE79E0 gMsgGlobalWaveCounter = 0x801512E4; // type:data rom:0xE79E4 gCurrentCustomModelGfxPtr = 0x801512E8; // rom:0xE79E8 gLastCreatedEntityIndex = 0x801512EC; // rom:0xE79EC -gBgRenderTypePtr = 0x801512F0; // type:data rom:0xE79F0 +gBackgroundFogModePtr = 0x801512F0; // type:data rom:0xE79F0 gMsgVarImages = 0x801512F4; // type:data rom:0xE79F4 ItemEntitiesCreated = 0x801512F8; // type:data rom:0xE79F8 gCurrentModelTreeRoot = 0x801512FC; // type:data rom:0xE79FC @@ -4942,8 +4942,8 @@ evt_handle_if_AND = 0x802C4E90; // type:func rom:0xE9840 evt_handle_if_not_AND = 0x802C4EE8; // type:func rom:0xE9898 evt_handle_else = 0x802C4F40; // type:func rom:0xE98F0 evt_handle_end_if = 0x802C4F6C; // type:func rom:0xE991C -wBgRenderType = 0x80153220; // type:data rom:0xE9920 -bBgRenderType = 0x80153221; // type:data rom:0xE9921 +wBackgroundFogMode = 0x80153220; // type:data rom:0xE9920 +bBackgroundFogMode = 0x80153221; // type:data rom:0xE9921 D_80153222 = 0x80153222; // type:data rom:0xE9922 D_80153223 = 0x80153223; // type:data rom:0xE9923 evt_handle_switch = 0x802C4F74; // type:func rom:0xE9924