From b93928a013801f7a69d868ab2df689b49d990b93 Mon Sep 17 00:00:00 2001 From: Unnunu Date: Thu, 13 Oct 2022 04:16:49 +0300 Subject: [PATCH] two background gfx functions (#819) * matched tattle_cam_pre_render * matched appendGfx_background_texture * cleaning up * fix one warning * made ARRAY_COUNT and removed unnecessary cast --- include/common_structs.h | 4 +- include/enums.h | 16 + include/variables.h | 3 +- src/16F740.c | 4 +- src/16c8e0.c | 151 +- src/18C790.c | 2 +- src/18F340.c | 4 +- src/1a1f0_len_5390.c | 2 +- src/a5dd0_len_114e0.c | 10 +- src/battle/item/shooting_star.c | 2 +- src/battle/star/up_and_away/7952E0.c | 2 +- src/common/FadeBackgroundToBlack.inc.c | 2 +- src/common/UnkBackgroundFunc2.inc.c | 2 +- src/common/UnkBackgroundFunc3.inc.c | 2 +- src/dc470_len_14c0.c | 276 +++- src/effects/floating_flower.c | 2 +- src/main_loop.c | 20 +- src/state_pause.c | 6 +- src/world/area_dro/dro_02/9694C0.c | 4 +- src/world/area_kmr/kmr_00/8ABF90.c | 2 +- src/world/common/atomic/Quizmo.inc.c | 4 +- src/world/common/atomic/UnkFunc27.inc.c | 2 +- ver/us/asm/bss3.s | 6 +- .../asm/nonmatchings/16c8e0/func_8023F088.s | 979 ------------- .../appendGfx_background_texture.s | 1288 ----------------- .../effects/snowfall/snowfall_appendGfx.s | 4 +- .../kmr_02/8B0070/func_80242BA8_8B2C18.s | 4 +- ver/us/symbol_addrs.txt | 20 +- 28 files changed, 465 insertions(+), 2358 deletions(-) delete mode 100644 ver/us/asm/nonmatchings/16c8e0/func_8023F088.s delete mode 100644 ver/us/asm/nonmatchings/dc470_len_14c0/appendGfx_background_texture.s diff --git a/include/common_structs.h b/include/common_structs.h index 1fc481de86..4d9f082b94 100644 --- a/include/common_structs.h +++ b/include/common_structs.h @@ -1425,7 +1425,7 @@ typedef struct GameStatus { /* 0x13E */ char unk_13E[2]; /* 0x140 */ ShopItemEntity* shopItemEntities; /* 0x144 */ struct Shop* mapShop; - /* 0x148 */ s16 backgroundFlags; /* (bit 1 = enable, bit 2 is used for something else) */ + /* 0x148 */ s16 backgroundFlags; /* 0x14A */ s16 backgroundMinX; /* 0x14C */ s16 backgroundMinY; /* 0x14E */ s16 backgroundMaxX; @@ -1433,7 +1433,7 @@ typedef struct GameStatus { /* 0x152 */ s16 backgroundXOffset; /* (used for parallax scroll) */ /* 0x154 */ IMG_PTR backgroundRaster; /* 0x158 */ PAL_PTR backgroundPalette; - /* 0x15C */ s16 backgroundDarkness; // 255 = fully black + /* 0x15C */ u16 backgroundDarkness; // 255 = fully black /* 0x15E */ s16 savedBackgroundDarkness; // used during pause/unpause /* 0x160 */ Vec3s savedPos; /* 0x166 */ u8 saveSlot; diff --git a/include/enums.h b/include/enums.h index d8570a06fd..4ccda51ef0 100644 --- a/include/enums.h +++ b/include/enums.h @@ -5641,4 +5641,20 @@ enum MsgWindowStates { MSG_WINDOW_STATE_E = 0xE, }; +enum BackgroundFlags { + BACKGROUND_FLAG_TEXTURE = 0x01, + BACKGROUND_FLAG_FOG = 0x02, + BACKGROUND_RENDER_STATE_1 = 0x10, + BACKGROUND_RENDER_STATE_2 = 0x20, + BACKGROUND_RENDER_STATE_3 = 0x30, + 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, +}; + #endif diff --git a/include/variables.h b/include/variables.h index 9b0fcac9ba..e83e12ba11 100644 --- a/include/variables.h +++ b/include/variables.h @@ -61,13 +61,12 @@ extern CollisionData gCollisionData; extern s8 D_800A0900; extern f32 GravityParamsStartFall[]; extern s16 FootstepSoundSelector; -extern u8* D_801512F0; +extern u8* gBgRenderTypePtr; extern u16 D_80151308; extern s32 gEntityHideMode; extern s32 D_8010C92C; extern s32 D_8010C950; -extern s32 D_801595A0; extern HiddenPanelsData gCurrentHiddenPanels; extern BackgroundHeader gBackgroundImage; diff --git a/src/16F740.c b/src/16F740.c index 046553f27e..9ac1c2a4ef 100644 --- a/src/16F740.c +++ b/src/16F740.c @@ -8,8 +8,6 @@ extern s32* D_800DC064; -extern BackgroundHeader func_80200000; - extern s16 D_802809F6; extern s16 D_802809F8; extern s32 D_80280A30; @@ -230,7 +228,7 @@ void btl_state_update_normal_start(void) { if (stage->bg != NULL) { load_map_bg(stage->bg); - read_background_size(&func_80200000); + read_background_size(&gBackgroundImage); } if (gGameStatusPtr->demoFlags & 1) { diff --git a/src/16c8e0.c b/src/16c8e0.c index 16acef5f8e..d868177ab9 100644 --- a/src/16c8e0.c +++ b/src/16c8e0.c @@ -11,7 +11,7 @@ s8 D_802809F4 = 0; s8 D_802809F5 = 0; s16 D_802809F6 = -1; s16 D_802809F8 = 0; -u16 D_802809FA = 0; +u16 gTattleBgTextureYOffset = 0; BSS s32 bSavedPartner = 0; BSS s32 bSavedOverrideFlags = 0; @@ -32,7 +32,7 @@ BSS s32 D_8029EFBC; BSS s32 D_8029EFC0[10]; BSS s32 D_8029EFE8[10]; BSS s32 D_8029F010[10]; -BSS s16 D_8029F038[0x100]; +BSS PAL_BIN gTattleBgPalette[0x100]; extern HudScript HES_HPDigit0; extern HudScript HES_HPDigit1; @@ -105,7 +105,7 @@ extern HudScript HES_Item_StarPoint; extern HudScript HES_StatusSPShine; void func_8023ED5C(void); -void func_8023F088(Camera*); +void tattle_cam_pre_render(Camera*); void func_8023FF84(Camera*); void btl_draw_enemy_health_bars(void); void btl_update_starpoints_display(void); @@ -225,7 +225,7 @@ void initialize_battle(void) { hud_element_set_render_depth(hudElemID, 20); } - tattleCam->fpDoPreRender = func_8023F088; + tattleCam->fpDoPreRender = tattle_cam_pre_render; tattleCam->fpDoPostRender = func_8023FF84; if (playerData->battlesCount < 9999) { @@ -713,17 +713,142 @@ void func_8023ED5C(void) { } } -u16 func_8023F060(u16 arg0, s32 arg1, s32 arg2) { - s32 temp_lo; - - temp_lo = (arg1 - arg0) * arg2; - if (temp_lo < 0) { - temp_lo += 0xFF; - } - return (arg0 + (temp_lo >> 8)); +u16 blend_background_channel_COPY(u16 arg0, s32 arg1, s32 alpha) { + return arg0 + (arg1 - arg0) * alpha / 256; } -INCLUDE_ASM(s32, "16c8e0", func_8023F088); +void tattle_cam_pre_render(Camera* camera) { + Camera* cam = &gCameras[gCurrentCamID]; + s32 fogEnabled = FALSE; + u8 r1, g1, b1, a1; + s32 fogR, fogG, fogB, fogA; + s32 i; + + s32 lineHeight; + s32 numLines; + s32 bgWidth, bgHeight; + s32 posX, posY; + s32 texOffsetX; + s32 extraHeight; + s16 texOffsetY; + + hide_foreground_models_unchecked(); + + if (is_world_fog_enabled()) { + fogEnabled = TRUE; + get_world_fog_color(&fogR, &fogG, &fogB, &fogA); + fogA = gGameStatusPtr->backgroundDarkness; + get_background_color_blend(&r1, &g1, &b1, &a1); + if (fogA == 255) { + for (i = 0; i < ARRAY_COUNT(gTattleBgPalette); i++) { + gTattleBgPalette[i] = 1; + } + } else { + for (i = 0; i < ARRAY_COUNT(gTattleBgPalette); i++) { + u16 palColor = gGameStatusPtr->backgroundPalette[i]; + u16 blendedB = blend_background_channel_COPY((palColor >> 1) & 0x1F, fogB >> 3, fogA); + u16 blendedG = blend_background_channel_COPY((palColor >> 6) & 0x1F, fogG >> 3, fogA); + u16 blendedR = blend_background_channel_COPY((palColor >> 11) & 0x1F, fogR >> 3, fogA); + gTattleBgPalette[i] = blendedB << 1 | blendedG << 6 | blendedR << 11 | 1; + } + } + } + + if (gGameStatusPtr->backgroundFlags & BACKGROUND_FLAG_TEXTURE) { + gDPPipeSync(gMasterGfxPos++); + gDPSetCycleType(gMasterGfxPos++, G_CYC_COPY); + gDPSetTexturePersp(gMasterGfxPos++, G_TP_NONE); + gDPSetTextureLUT(gMasterGfxPos++, G_TT_RGBA16); + gDPSetCombineMode(gMasterGfxPos++, G_CC_DECALRGB, G_CC_DECALRGB); + gDPSetRenderMode(gMasterGfxPos++, G_RM_NOOP, G_RM_NOOP2); + gDPSetTextureFilter(gMasterGfxPos++, G_TF_POINT); + gDPSetScissor(gMasterGfxPos++, G_SC_NON_INTERLACE, cam->viewportStartX, cam->viewportStartY, cam->viewportStartX + cam->viewportW - 1, cam->viewportStartY + cam->viewportH - 1); + gDPPipeSync(gMasterGfxPos++); + if (!fogEnabled) { + gDPLoadTLUT_pal256(gMasterGfxPos++, gGameStatusPtr->backgroundPalette); + } else { + gDPLoadTLUT_pal256(gMasterGfxPos++, gTattleBgPalette); + } + bgWidth = gGameStatusPtr->backgroundMaxX; + bgHeight = gGameStatusPtr->backgroundMaxY; + texOffsetX = 0; + lineHeight = 2048 / bgWidth; + numLines = gGameStatusPtr->backgroundMaxY / lineHeight; + extraHeight = gGameStatusPtr->backgroundMaxY % lineHeight; + posX = cam->viewportStartX; + posY = cam->viewportStartY; + for (i = 0; i < numLines; i++) { + texOffsetY = gTattleBgTextureYOffset + lineHeight * i; + if (texOffsetY > gGameStatusPtr->backgroundMaxY) { + texOffsetY -= gGameStatusPtr->backgroundMaxY; + } + gDPLoadTextureTile(gMasterGfxPos++, gGameStatusPtr->backgroundRaster + bgWidth * texOffsetY, + G_IM_FMT_CI, G_IM_SIZ_8b, bgWidth, 6, + 0, 0, 295, 5, 0, + G_TX_WRAP, G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD); + + gSPTextureRectangle(gMasterGfxPos++, posX * 4, (lineHeight * i + posY) * 4, + (texOffsetX + posX - 1) * 4, (lineHeight * i + lineHeight - 1 + posY) * 4, + G_TX_RENDERTILE, bgWidth * 32, 0, 4096, 1024); + gSPTextureRectangle(gMasterGfxPos++, (texOffsetX + posX) * 4, (lineHeight * i + posY) * 4, + (bgWidth + posX - 1) * 4, (lineHeight * i + lineHeight - 1 + posY) * 4, + G_TX_RENDERTILE, 0, 0, 4096, 1024); + } + if (extraHeight != 0) { + texOffsetY = gTattleBgTextureYOffset + lineHeight * i; + if (texOffsetY > gGameStatusPtr->backgroundMaxY) { + texOffsetY -= gGameStatusPtr->backgroundMaxY; + } + gDPLoadTextureTile(gMasterGfxPos++, gGameStatusPtr->backgroundRaster + bgWidth * texOffsetY, + G_IM_FMT_CI, G_IM_SIZ_8b, bgWidth, extraHeight, + 0, 0, 295, extraHeight - 1, 0, + G_TX_WRAP, G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD); + gSPTextureRectangle(gMasterGfxPos++, posX * 4, (i * lineHeight + posY) * 4, + (texOffsetX + posX - 1) * 4, (bgHeight + - 1 + posY) * 4, + G_TX_RENDERTILE, bgWidth * 32, 0, 4096, 1024); + gSPTextureRectangle(gMasterGfxPos++, (texOffsetX + posX) * 4, (i * lineHeight + posY) * 4, + (bgWidth + posX - 1) * 4, (bgHeight - 1 + posY) * 4, + G_TX_RENDERTILE, 0, 0, 4096, 1024); + } + } + + gSPViewport(gMasterGfxPos++, &cam->vp); + gSPClearGeometryMode(gMasterGfxPos++, G_SHADE | G_CULL_BOTH | G_FOG | G_LIGHTING | G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR | G_LOD | G_SHADING_SMOOTH); + gSPTexture(gMasterGfxPos++, 0, 0, 0, G_TX_RENDERTILE, G_OFF); + gDPSetCycleType(gMasterGfxPos++, G_CYC_1CYCLE); + gDPPipelineMode(gMasterGfxPos++, G_PM_NPRIMITIVE); + gDPSetScissorFrac(gMasterGfxPos++, G_SC_NON_INTERLACE, cam->viewportStartX * 4.0f, cam->viewportStartY * 4.0f, (cam->viewportStartX + cam->viewportW) * 4.0f, (cam->viewportStartY + cam->viewportH) * 4.0f); + gDPSetTextureLOD(gMasterGfxPos++, G_TL_TILE); + gDPSetTextureLUT(gMasterGfxPos++, G_TT_NONE); + gDPSetTextureDetail(gMasterGfxPos++, G_TD_CLAMP); + gDPSetTexturePersp(gMasterGfxPos++, G_TP_PERSP); + gDPSetTextureFilter(gMasterGfxPos++, G_TF_BILERP); + gDPSetTextureConvert(gMasterGfxPos++, G_TC_FILT); + gDPSetCombineMode(gMasterGfxPos++, G_CC_SHADE, G_CC_SHADE); + gDPSetCombineKey(gMasterGfxPos++, G_CK_NONE); + gDPSetAlphaCompare(gMasterGfxPos++, G_AC_NONE); + gDPSetRenderMode(gMasterGfxPos++, G_RM_OPA_SURF, G_RM_OPA_SURF2); + gDPSetColorDither(gMasterGfxPos++, G_CD_DISABLE); + gSPClipRatio(gMasterGfxPos++, FRUSTRATIO_2); + gDPPipeSync(gMasterGfxPos++); + gDPSetCycleType(gMasterGfxPos++, G_CYC_FILL); + gDPSetColorImage(gMasterGfxPos++, G_IM_FMT_RGBA, G_IM_SIZ_16b, 320, osVirtualToPhysical(nuGfxZBuffer)); + gDPSetFillColor(gMasterGfxPos++, PACK_FILL_DEPTH(G_MAXFBZ, 0)); + gDPFillRectangle(gMasterGfxPos++, cam->viewportStartX, cam->viewportStartY, cam->viewportStartX + cam->viewportW - 1, cam->viewportStartY + cam->viewportH - 1); + gDPPipeSync(gMasterGfxPos++); + gDPSetColorImage(gMasterGfxPos++, G_IM_FMT_RGBA, G_IM_SIZ_16b, 320, osVirtualToPhysical(nuGfxCfb_ptr)); + + if (!(gGameStatusPtr->backgroundFlags & BACKGROUND_FLAG_TEXTURE)) { + gDPSetCycleType(gMasterGfxPos++, G_CYC_FILL); + gDPSetFillColor(gMasterGfxPos++, PACK_FILL_COLOR(cam->bgColor[0], cam->bgColor[1], cam->bgColor[2], 1)); + gDPFillRectangle(gMasterGfxPos++, cam->viewportStartX, cam->viewportStartY, cam->viewportStartX + cam->viewportW - 1, cam->viewportStartY + cam->viewportH - 1); + } + + gDPPipeSync(gMasterGfxPos++); + gSPPerspNormalize(gMasterGfxPos++, cam->perspNorm); + guMtxF2L(cam->perspectiveMatrix, &gDisplayContext->camPerspMatrix[gCurrentCamID]); + gSPMatrix(gMasterGfxPos++, &gDisplayContext->camPerspMatrix[gCurrentCamID], G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_PROJECTION); +} void func_8023FF84(Camera* camera) { show_foreground_models_unchecked(); diff --git a/src/18C790.c b/src/18C790.c index 076676e710..e415f1a09b 100644 --- a/src/18C790.c +++ b/src/18C790.c @@ -279,7 +279,7 @@ void btl_state_update_celebration(void) { gBattleState2 = BATTLE_STATE2_UNK_6; D_8029FB80 = D_8029FB7C->id; mdl_set_all_fog_mode(1); - *D_801512F0 = 1; + *gBgRenderTypePtr = BACKGROUND_RENDER_TYPE_1; set_background_color_blend(0, 0, 0, 0); break; case BATTLE_STATE2_UNK_6: diff --git a/src/18F340.c b/src/18F340.c index 5bfaa82faf..c1523dd10f 100644 --- a/src/18F340.c +++ b/src/18F340.c @@ -158,7 +158,7 @@ ApiStatus N(GiveRefundCleanup)(Evt* script, s32 isInitialCall) { ApiStatus func_802610CC(Evt* script, s32 isInitialCall) { if (isInitialCall) { mdl_set_all_fog_mode(1); - *D_801512F0 = 1; + *gBgRenderTypePtr = BACKGROUND_RENDER_TYPE_1; set_background_color_blend(0, 0, 0, 0); script->functionTemp[0] = 20; } @@ -265,7 +265,7 @@ ApiStatus PlayBattleMerleeOrbFX(Evt* script, s32 isInitialCall) { ApiStatus BattleMerleeFadeStageToBlack(Evt* script, s32 isInitialCall) { if (isInitialCall) { mdl_set_all_fog_mode(1); - *D_801512F0 = 1; + *gBgRenderTypePtr = BACKGROUND_RENDER_TYPE_1; set_background_color_blend(0, 0, 0, 0); script->functionTemp[0] = 25; } diff --git a/src/1a1f0_len_5390.c b/src/1a1f0_len_5390.c index 520dc5ae0b..ace037c137 100644 --- a/src/1a1f0_len_5390.c +++ b/src/1a1f0_len_5390.c @@ -232,7 +232,7 @@ ApiStatus ShowMerleeRanOutMessage(Evt* script, s32 isInitialCall) { ApiStatus FadeBackgroundToBlack(Evt* script, s32 isInitialCall) { if (isInitialCall) { mdl_set_all_fog_mode(1); - *D_801512F0 = 1; + *gBgRenderTypePtr = BACKGROUND_RENDER_TYPE_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 eb0c0aff52..ceabf9a5ed 100644 --- a/src/a5dd0_len_114e0.c +++ b/src/a5dd0_len_114e0.c @@ -3092,7 +3092,7 @@ void clear_model_data(void) { gCurrentModelTreeRoot = &D_80152214; gCurrentModelLocalVtxBuffers = &wModelLocalVtxBuffers; mdl_currentModelTreeNodeInfo = &D_80152220; - D_801512F0 = &wBgRenderType; + gBgRenderTypePtr = &wBgRenderType; mdl_bgMultiplyColorA = 0; mdl_bgMultiplyColorR = 0; mdl_bgMultiplyColorG = 0; @@ -3106,7 +3106,7 @@ void clear_model_data(void) { gCurrentModelTreeRoot = &D_80152218; gCurrentModelLocalVtxBuffers = &bModelLocalVtxBuffers; mdl_currentModelTreeNodeInfo = &D_80152A20; - D_801512F0 = &bBgRenderType; + gBgRenderTypePtr = &bBgRenderType; gCurrentFogSettings = &bFogSettings; } @@ -3131,7 +3131,7 @@ void clear_model_data(void) { (*mdl_currentModelTreeNodeInfo)[i].textureID = 0; } - *D_801512F0 = 0; + *gBgRenderTypePtr = BACKGROUND_RENDER_TYPE_0; gCurrentFogSettings->r = 10; gCurrentFogSettings->g = 10; gCurrentFogSettings->b = 10; @@ -3157,7 +3157,7 @@ void init_model_data(void) { gCurrentModelTreeRoot = &D_80152214; gCurrentModelLocalVtxBuffers = &wModelLocalVtxBuffers; mdl_currentModelTreeNodeInfo = &D_80152220; - D_801512F0 = &wBgRenderType; + gBgRenderTypePtr = &wBgRenderType; gCurrentFogSettings = &wFogSettings; } else { gCurrentModels = &bModelList; @@ -3167,7 +3167,7 @@ void init_model_data(void) { gCurrentModelTreeRoot = &D_80152218; gCurrentModelLocalVtxBuffers = &bModelLocalVtxBuffers; mdl_currentModelTreeNodeInfo = &D_80152A20; - D_801512F0 = &bBgRenderType; + gBgRenderTypePtr = &bBgRenderType; gCurrentFogSettings = &bFogSettings; } } diff --git a/src/battle/item/shooting_star.c b/src/battle/item/shooting_star.c index ae01b9db90..9e9dbae17a 100644 --- a/src/battle/item/shooting_star.c +++ b/src/battle/item/shooting_star.c @@ -35,7 +35,7 @@ ApiStatus N(func_802A1444_71DBB4)(Evt* script, s32 isInitialCall) { if (isInitialCall) { mdl_set_all_fog_mode(1); - *D_801512F0 = 1; + *gBgRenderTypePtr = BACKGROUND_RENDER_TYPE_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 0b82f9a376..871cdf99c8 100644 --- a/src/battle/star/up_and_away/7952E0.c +++ b/src/battle/star/up_and_away/7952E0.c @@ -10,7 +10,7 @@ ApiStatus func_802A1518_7957F8(Evt* script, s32 isInitialCall) { if (isInitialCall) { mdl_set_all_fog_mode(1); - *D_801512F0 = 1; + *gBgRenderTypePtr = BACKGROUND_RENDER_TYPE_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 b5a9f9dc33..54358c3b92 100644 --- a/src/common/FadeBackgroundToBlack.inc.c +++ b/src/common/FadeBackgroundToBlack.inc.c @@ -4,7 +4,7 @@ ApiStatus N(FadeBackgroundToBlack)(Evt* script, s32 isInitialCall) { if (isInitialCall) { mdl_set_all_fog_mode(1); - *D_801512F0 = 1; + *gBgRenderTypePtr = BACKGROUND_RENDER_TYPE_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 ff7030c142..7127febfb5 100644 --- a/src/common/UnkBackgroundFunc2.inc.c +++ b/src/common/UnkBackgroundFunc2.inc.c @@ -3,7 +3,7 @@ ApiStatus N(UnkBackgroundFunc2)(Evt* script, s32 isInitialCall) { if (isInitialCall) { mdl_set_all_fog_mode(1); - *D_801512F0 = 1; + *gBgRenderTypePtr = BACKGROUND_RENDER_TYPE_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 c3c6ababfc..921daa8b29 100644 --- a/src/common/UnkBackgroundFunc3.inc.c +++ b/src/common/UnkBackgroundFunc3.inc.c @@ -2,7 +2,7 @@ ApiStatus N(UnkBackgroundFunc3)(Evt* script, s32 isInitialCall) { mdl_set_all_fog_mode(1); - *D_801512F0 = 1; + *gBgRenderTypePtr = BACKGROUND_RENDER_TYPE_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 1ab1cadf67..988a00577f 100644 --- a/src/dc470_len_14c0.c +++ b/src/dc470_len_14c0.c @@ -2,9 +2,15 @@ char gCloudyFlowerFieldsBg[] = "fla_bg"; char gSunnyFlowerFieldsBg[] = "flb_bg"; -s8 D_8014F12F = 0; -s32 D_8014F130 = 0; -f32 D_8014F134[] = { 0.0f, 0.0f, 0.0f }; +s8 gBackroundWaveEnabled = FALSE; +s16 gBackroundTextureYOffset = 0; +f32 gBackroundWavePhase = 0.0f; + +// BSS +extern PAL_BIN gBackgroundPalette[256]; +extern f32 gBackroundLastScrollValue; + +void get_model_env_color_parameters(u8* primR, u8* primG, u8* primB, u8* envR, u8* envG, u8* envB); void load_map_bg(char* optAssetName) { if (optAssetName != NULL) { @@ -26,10 +32,10 @@ void load_map_bg(char* optAssetName) { } void reset_background_settings(void) { - D_801595A0 = 0; - D_8014F12F = 0; + gBackroundLastScrollValue = 0; + gBackroundWaveEnabled = FALSE; gGameStatusPtr->backgroundDarkness = 180; - gGameStatusPtr->backgroundFlags &= 0xF0; + gGameStatusPtr->backgroundFlags &= BACKGROUND_RENDER_STATE_MASK; } void read_background_size(BackgroundHeader* bg) { @@ -39,34 +45,264 @@ void read_background_size(BackgroundHeader* bg) { gGameStatusPtr->backgroundMinY = bg->startY; gGameStatusPtr->backgroundRaster = bg->raster; gGameStatusPtr->backgroundPalette = bg->palette; - gGameStatusPtr->backgroundFlags |= 1; + gGameStatusPtr->backgroundFlags |= BACKGROUND_FLAG_TEXTURE; } void set_background_size(s16 startX, s16 startY, s16 sizeX, s16 sizeY) { - gGameStatusPtr->backgroundFlags &= ~1; + gGameStatusPtr->backgroundFlags &= ~BACKGROUND_FLAG_TEXTURE; gGameStatusPtr->backgroundMaxX = startX; gGameStatusPtr->backgroundMaxY = startY; gGameStatusPtr->backgroundMinX = sizeX; gGameStatusPtr->backgroundMinY = sizeY; } -u16 blend_background_channel(s32 arg0, s32 arg1, s32 alpha) { - s32 temp_lo; - - temp_lo = (arg1 - (u16)arg0) * alpha; - if (temp_lo < 0) { - temp_lo = temp_lo + 0xFF; - } - temp_lo = arg0 + (temp_lo >> 8); - return temp_lo; +u16 blend_background_channel(u16 arg0, s32 arg1, s32 alpha) { + return arg0 + (arg1 - arg0) * alpha / 256; } -INCLUDE_ASM(s32, "dc470_len_14c0", appendGfx_background_texture); +void appendGfx_background_texture(void) { + Camera* cam = &gCameras[gCurrentCameraID]; + u16 flags = 0; + s32 fogR, fogG, fogB, fogA; + u8 r1, g1, b1, a1; + u8 r2, g2, b2; + u16 blendedR, blendedG, blendedB; + s32 i; + + f32 theta, sinTheta, cosTheta, scrollValue, f5, waveOffset; + + s32 bgMinX; + s32 bgMinY; + s32 bgMaxX; + s32 bgMaxY; + s32 lineHeight; + s32 numLines; + s32 extraHeight; + + s32 bgXOffset; + s16 texOffsetY; + + u8* newvar; + + if (is_world_fog_enabled()) { + get_world_fog_color(&fogR, &fogG, &fogB, &fogA); + flags = 1; + fogA = gGameStatusPtr->backgroundDarkness; + } + + switch (*gBgRenderTypePtr) { + case BACKGROUND_RENDER_TYPE_0: + case BACKGROUND_RENDER_TYPE_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: + 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)) { + flags |= 4; + } + break; + } + + switch (flags) { + case 0: + gGameStatusPtr->backgroundFlags &= ~BACKGROUND_FLAG_FOG; + break; + case 1: + gGameStatusPtr->backgroundFlags |= BACKGROUND_FLAG_FOG; + break; + case 2: + gGameStatusPtr->backgroundFlags |= BACKGROUND_FLAG_FOG; + fogR = r1; + fogG = g1; + fogB = b1; + fogA = a1; + break; + case 3: + gGameStatusPtr->backgroundFlags |= BACKGROUND_FLAG_FOG; + fogR = (fogR * (255 - a1) + r1 * a1) / 255; + fogG = (fogG * (255 - a1) + g1 * a1) / 255; + fogB = (fogB * (255 - a1) + b1 * a1) / 255; + fogA = (fogA * (255 - a1) + a1 * a1) / 255; + break; + case 4: + gGameStatusPtr->backgroundFlags |= BACKGROUND_FLAG_FOG; + break; + } + + if (gGameStatusPtr->backgroundFlags & BACKGROUND_FLAG_FOG) { + switch (*gBgRenderTypePtr) { + case BACKGROUND_RENDER_TYPE_0: + case BACKGROUND_RENDER_TYPE_1: + if (fogA == 255) { + for (i = 0; i < ARRAY_COUNT(gBackgroundPalette); i++) { + gBackgroundPalette[i] = 1; + } + } else { + for (i = 0; i < ARRAY_COUNT(gBackgroundPalette); i++) { + u16 palColor = gGameStatusPtr->backgroundPalette[i]; + blendedB = blend_background_channel((palColor >> 1) & 0x1F, fogB >> 3, fogA); + blendedG = blend_background_channel((palColor >> 6) & 0x1F, fogG >> 3, fogA); + blendedR = blend_background_channel((palColor >> 11) & 0x1F, fogR >> 3, fogA); + gBackgroundPalette[i] = blendedB << 1 | blendedG << 6 | blendedR << 11 | 1; + } + } + break; + case BACKGROUND_RENDER_TYPE_2: + case BACKGROUND_RENDER_TYPE_3: + default: + for (i = 0; i < ARRAY_COUNT(gBackgroundPalette); i++) { + u16 palColor = gGameStatusPtr->backgroundPalette[i]; + blendedB = (b2 >> 3) + ((((palColor >> 1) & 0x1F) * b1) >> 8); + blendedG = (g2 >> 3) + ((((palColor >> 6) & 0x1F) * g1) >> 8); + blendedR = (r2 >> 3) + ((((palColor >> 11) & 0x1F) * r1) >> 8); + + if (blendedB > 0x1F) { + blendedB = 0x1F; + } + if (blendedG > 0x1F) { + blendedG = 0x1F; + } + if (blendedR > 0x1F) { + blendedR = 0x1F; + } + gBackgroundPalette[i] = blendedB << 1 | blendedG << 6 | blendedR << 11 | 1; + } + break; + } + } + + theta = clamp_angle(-cam->trueRotation.x); + sinTheta = sin_deg(theta); + cosTheta = cos_deg(theta); + f5 = cosTheta * cam->lookAt_obj.x - sinTheta * cam->lookAt_obj.z + cam->leadAmount; + scrollValue = -f5 * 0.25f; + scrollValue += gGameStatusPtr->backgroundMaxX * theta * (1 / 90.0f); + + if (fabsf(scrollValue - gBackroundLastScrollValue) < 0.3f) { + scrollValue = gBackroundLastScrollValue; + } else { + gBackroundLastScrollValue = scrollValue; + } + + while (scrollValue < 0.0f) { + scrollValue += gGameStatusPtr->backgroundMaxX * 32; + } + + bgXOffset =gGameStatusPtr->backgroundXOffset = ((s32)scrollValue) % gGameStatusPtr->backgroundMaxX; + bgMaxX = gGameStatusPtr->backgroundMaxX; + bgMaxY = gGameStatusPtr->backgroundMaxY; + bgMinX = gGameStatusPtr->backgroundMinX; + bgMinY = gGameStatusPtr->backgroundMinY; + + gDPPipeSync(gMasterGfxPos++); + gDPSetCycleType(gMasterGfxPos++, G_CYC_COPY); + gDPSetTexturePersp(gMasterGfxPos++, G_TP_NONE); + gDPSetTextureLUT(gMasterGfxPos++, G_TT_RGBA16); + gDPSetCombineMode(gMasterGfxPos++, G_CC_DECALRGB, G_CC_DECALRGB); + gDPSetRenderMode(gMasterGfxPos++, G_RM_NOOP, G_RM_NOOP2); + gDPSetTextureFilter(gMasterGfxPos++, G_TF_POINT); + gDPPipeSync(gMasterGfxPos++); + + if (!(gGameStatusPtr->backgroundFlags & BACKGROUND_FLAG_FOG)) { + gDPLoadTLUT_pal256(gMasterGfxPos++, gGameStatusPtr->backgroundPalette); + } else { + gDPLoadTLUT_pal256(gMasterGfxPos++, gBackgroundPalette); + } + + if (!gBackroundWaveEnabled) { + lineHeight = 2048 / gGameStatusPtr->backgroundMaxX; + numLines = gGameStatusPtr->backgroundMaxY / lineHeight; + extraHeight = gGameStatusPtr->backgroundMaxY % lineHeight; + for (i = 0; i < numLines; i++) { + texOffsetY = gBackroundTextureYOffset + lineHeight * i; + if (texOffsetY > gGameStatusPtr->backgroundMaxY) { + texOffsetY -= gGameStatusPtr->backgroundMaxY; + } + gDPLoadTextureTile(gMasterGfxPos++, gGameStatusPtr->backgroundRaster + bgMaxX * texOffsetY, + G_IM_FMT_CI, G_IM_SIZ_8b, bgMaxX, 6, + 0, 0, 295, 5, 0, + G_TX_WRAP, G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD); + + gSPTextureRectangle(gMasterGfxPos++, bgMinX * 4, (lineHeight * i + bgMinY) * 4, + (bgXOffset + bgMinX - 1) * 4, (lineHeight * i + lineHeight - 1 + bgMinY) * 4, + G_TX_RENDERTILE, (bgMaxX - bgXOffset) * 32, 0, 4096, 1024); + gSPTextureRectangle(gMasterGfxPos++, (bgXOffset + bgMinX) * 4, (lineHeight * i + bgMinY) * 4, + (bgMaxX + bgMinX - 1) * 4, (lineHeight * i + lineHeight - 1 + bgMinY) * 4, + G_TX_RENDERTILE, 0, 0, 4096, 1024); + } + if (extraHeight != 0) { + texOffsetY = gBackroundTextureYOffset + lineHeight * i; + if (texOffsetY > gGameStatusPtr->backgroundMaxY) { + texOffsetY -= gGameStatusPtr->backgroundMaxY; + } + gDPLoadTextureTile(gMasterGfxPos++, gGameStatusPtr->backgroundRaster + bgMaxX * texOffsetY, + G_IM_FMT_CI, G_IM_SIZ_8b, bgMaxX, extraHeight, + 0, 0, 295, extraHeight - 1, 0, + G_TX_WRAP, G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD); + gSPTextureRectangle(gMasterGfxPos++, bgMinX * 4, (lineHeight * i + bgMinY) * 4, + (bgXOffset + bgMinX - 1) * 4, (bgMaxY - 1 + bgMinY) * 4, + G_TX_RENDERTILE, (bgMaxX - bgXOffset) * 32, 0, 4096, 1024); + gSPTextureRectangle(gMasterGfxPos++, (bgXOffset + bgMinX) * 4, (lineHeight * i + bgMinY) * 4, + (bgMaxX + bgMinX - 1) * 4, (bgMaxY - 1 + bgMinY) * 4, + G_TX_RENDERTILE, 0, 0, 4096, 1024); + } + } else { + lineHeight = 6; + numLines = gGameStatusPtr->backgroundMaxY / lineHeight; + extraHeight = gGameStatusPtr->backgroundMaxY % lineHeight; + gBackroundWavePhase += TAU / 60; // 60 frames period + for (i = 0; i < numLines; i++) { + waveOffset = sin_rad(gBackroundWavePhase + i * (TAU / 15)) * 3.0f; + bgXOffset = 2.0f * (gGameStatusPtr->backgroundXOffset + waveOffset); + texOffsetY = gBackroundTextureYOffset + lineHeight * i; + if (texOffsetY > gGameStatusPtr->backgroundMaxY) { + texOffsetY -= gGameStatusPtr->backgroundMaxY; + } + gDPLoadTextureTile(gMasterGfxPos++, gGameStatusPtr->backgroundRaster + bgMaxX * texOffsetY, + G_IM_FMT_CI, G_IM_SIZ_8b, bgMaxX, 6, + 0, 0, 295, 5, 0, + G_TX_WRAP, G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD); + + gSPTextureRectangle(gMasterGfxPos++, bgMinX * 4, (lineHeight * i + bgMinY) * 4, + (2 * bgXOffset + (bgMinX - 1)) * 4, (lineHeight * i + lineHeight - 1 + bgMinY) * 4, + G_TX_RENDERTILE, bgMaxX * 32 - bgXOffset * 16, 0, 4096, 1024); + gSPTextureRectangle(gMasterGfxPos++, bgXOffset * 2 + bgMinX * 4, (lineHeight * i + bgMinY) * 4, + (bgMaxX + bgMinX - 1) * 4, (lineHeight * i + lineHeight - 1 + bgMinY) * 4, + G_TX_RENDERTILE, 0, 0, 4096, 1024); + } + if (extraHeight != 0) { + waveOffset = sin_rad(gBackroundWavePhase + i * (TAU / 15)) * 3.0f; + bgXOffset = 2.0f * (gGameStatusPtr->backgroundXOffset + waveOffset); + texOffsetY = gBackroundTextureYOffset + lineHeight * i; + if (texOffsetY > gGameStatusPtr->backgroundMaxY) { + texOffsetY -= gGameStatusPtr->backgroundMaxY; + } + gDPLoadTextureTile(gMasterGfxPos++, gGameStatusPtr->backgroundRaster + bgMaxX * texOffsetY, + G_IM_FMT_CI, G_IM_SIZ_8b, bgMaxX, extraHeight, + 0, 0, 295, extraHeight - 1, 0, + G_TX_WRAP, G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD); + gSPTextureRectangle(gMasterGfxPos++, bgMinX * 4, (lineHeight * i + bgMinY) * 4, + (2 * bgXOffset + (bgMinX - 1)) * 4, (bgMaxY - 1 + bgMinY) * 4, // @bug xh = 2 * bgXOffset + (bgMinX - 1) * 4 + G_TX_RENDERTILE, bgMaxX * 32 - bgXOffset * 16, 0, 4096, 1024); + gSPTextureRectangle(gMasterGfxPos++, bgXOffset * 2 + bgMinX * 4, (lineHeight * i + bgMinY) * 4, + (bgMaxX + bgMinX - 1) * 4, (bgMaxY - 1 + bgMinY) * 4, // @bug xh = 2 * bgXOffset + (bgMinX - 1) * 4 + G_TX_RENDERTILE, 0, 0, 4096, 1024); + } + } +} + +// TODO figure out why it is needed +static const f32 rodata_padding[] = { 0.0f, 0.0f }; void enable_background_wave(void) { - D_8014F12F = 1; + gBackroundWaveEnabled = TRUE; } void disable_background_wave(void) { - D_8014F12F = 0; + gBackroundWaveEnabled = FALSE; } diff --git a/src/effects/floating_flower.c b/src/effects/floating_flower.c index b323a53827..013b700e2c 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 (*D_801512F0 == 1) { + if (*gBgRenderTypePtr == BACKGROUND_RENDER_TYPE_1) { shim_get_background_color_blend(&rgb, &rgb, &rgb, &a); alpha -= a; } diff --git a/src/main_loop.c b/src/main_loop.c index ec49407f93..8eabcb51ab 100644 --- a/src/main_loop.c +++ b/src/main_loop.c @@ -458,10 +458,10 @@ void gfx_draw_background(void) { gDPSetScissor(gMasterGfxPos++, G_SC_NON_INTERLACE, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT); camera = &gCameras[gCurrentCameraID]; - bgFlags = gGameStatusPtr->backgroundFlags & 0xF0; + bgFlags = gGameStatusPtr->backgroundFlags & BACKGROUND_RENDER_STATE_MASK; switch (bgFlags) { - case 0x10: + case BACKGROUND_RENDER_STATE_1: // Save coverage to nunGfxCfb[1] using the VISCVG render mode gDPPipeSync(gMasterGfxPos++); gDPSetColorImage(gMasterGfxPos++, G_IM_FMT_RGBA, G_IM_SIZ_16b, SCREEN_WIDTH, nuGfxCfb[1]); @@ -473,17 +473,17 @@ void gfx_draw_background(void) { gDPFillRectangle(gMasterGfxPos++, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT); gDPPipeSync(gMasterGfxPos++); gDPSetDepthSource(gMasterGfxPos++, G_ZS_PIXEL); - gGameStatusPtr->backgroundFlags &= ~0xF0; - gGameStatusPtr->backgroundFlags |= 0x20; + gGameStatusPtr->backgroundFlags &= ~BACKGROUND_RENDER_STATE_MASK; + gGameStatusPtr->backgroundFlags |= BACKGROUND_RENDER_STATE_2; break; - case 0x20: + case BACKGROUND_RENDER_STATE_2: // Save the framebuffer into the depth buffer and run a filter on it based on the saved coverage values gfx_transfer_frame_to_depth(nuGfxCfb[0], nuGfxCfb[1], nuGfxZBuffer); // applies filters to the framebuffer gPauseBackgroundFade = 0; - gGameStatusPtr->backgroundFlags &= ~0xF0; - gGameStatusPtr->backgroundFlags |= 0x30; + gGameStatusPtr->backgroundFlags &= ~BACKGROUND_RENDER_STATE_MASK; + gGameStatusPtr->backgroundFlags |= BACKGROUND_RENDER_STATE_3; // fallthrough - case 0x30: + case BACKGROUND_RENDER_STATE_3: // Draw the saved framebuffer to the background, fading in at a rate of 16 opacity per frame until reaching 128 opacity gPauseBackgroundFade += 16; if (gPauseBackgroundFade > 128) { @@ -596,7 +596,7 @@ void gfx_draw_background(void) { backgroundMaxY = SCREEN_HEIGHT; } - if (!(gGameStatusPtr->backgroundFlags & 1)) { + if (!(gGameStatusPtr->backgroundFlags & BACKGROUND_FLAG_TEXTURE)) { gDPFillRectangle(gMasterGfxPos++, backgroundMinX, backgroundMinY, backgroundMaxX - 1, backgroundMaxY - 1); } else { appendGfx_background_texture(); @@ -623,7 +623,7 @@ void gfx_draw_background(void) { gDPNoOp(gMasterGfxPos++); } - if (backgroundMaxY < 0xF0) { + if (backgroundMaxY < SCREEN_HEIGHT) { gDPFillRectangle(gMasterGfxPos++, 0, backgroundMaxY, SCREEN_WIDTH - 1, SCREEN_HEIGHT - 1); gDPNoOp(gMasterGfxPos++); } diff --git a/src/state_pause.c b/src/state_pause.c index 781193005c..710314f132 100644 --- a/src/state_pause.c +++ b/src/state_pause.c @@ -40,8 +40,8 @@ void state_step_pause(void) { D_800A0920 = 4; D_800A0921 = 2; gOverrideFlags |= GLOBAL_OVERRIDES_8; - gGameStatusPtr->backgroundFlags &= ~0xF0; - gGameStatusPtr->backgroundFlags |= 0x10; + gGameStatusPtr->backgroundFlags &= ~BACKGROUND_RENDER_STATE_MASK; + gGameStatusPtr->backgroundFlags |= BACKGROUND_RENDER_STATE_1; } break; @@ -140,7 +140,7 @@ void state_step_unpause(void) { mapSettings = get_current_map_settings(); mapConfig = &gAreas[gGameStatusPtr->areaID].maps[gGameStatusPtr->mapID]; gGameStatusPtr->isBattle = FALSE; - gGameStatusPtr->backgroundFlags &= ~0xF0; + gGameStatusPtr->backgroundFlags &= ~BACKGROUND_RENDER_STATE_MASK; func_8005AF84(); func_8002ACDC(); nuContRmbForceStopEnd(); diff --git a/src/world/area_dro/dro_02/9694C0.c b/src/world/area_dro/dro_02/9694C0.c index cfff2290d4..31431ef0d6 100644 --- a/src/world/area_dro/dro_02/9694C0.c +++ b/src/world/area_dro/dro_02/9694C0.c @@ -2424,7 +2424,7 @@ ApiStatus N(func_802414C0_96A680)(Evt* script, s32 isInitialCall) { if (isInitialCall) { mdl_set_all_fog_mode(1); - *D_801512F0 = 1; + *gBgRenderTypePtr = BACKGROUND_RENDER_TYPE_1; set_background_color_blend(0, 0, 0, 0); for (i = 0; i < 64; i++) { @@ -2463,7 +2463,7 @@ ApiStatus N(func_802415CC_96A78C)(Evt* script, s32 isInitialCall) { script->functionTemp[1] = 1; } else if (script->functionTemp[1] == 1) { mdl_set_all_fog_mode(0); - *D_801512F0 = 0; + *gBgRenderTypePtr = BACKGROUND_RENDER_TYPE_0; for (i = 0; i < 64; i++) { Npc* npc = get_npc_by_index(i); diff --git a/src/world/area_kmr/kmr_00/8ABF90.c b/src/world/area_kmr/kmr_00/8ABF90.c index 25764e4086..d4477bb401 100644 --- a/src/world/area_kmr/kmr_00/8ABF90.c +++ b/src/world/area_kmr/kmr_00/8ABF90.c @@ -51,7 +51,7 @@ ApiStatus func_80240000_8ABF90(Evt* script, s32 isInitialCall) { ApiStatus func_80240388_8AC318(Evt* script, s32 isInitialCall) { mdl_set_all_fog_mode(3); - *D_801512F0 = 3; + *gBgRenderTypePtr = BACKGROUND_RENDER_TYPE_3; return ApiStatus_DONE2; } diff --git a/src/world/common/atomic/Quizmo.inc.c b/src/world/common/atomic/Quizmo.inc.c index a1866a4189..7b1645a91b 100644 --- a/src/world/common/atomic/Quizmo.inc.c +++ b/src/world/common/atomic/Quizmo.inc.c @@ -136,7 +136,7 @@ ApiStatus N(Quizmo_HideWorld)(Evt* script, s32 isInitialCall) { s32 i; mdl_set_all_fog_mode(1); - D_801512F0[0] = 1; + *gBgRenderTypePtr = BACKGROUND_RENDER_TYPE_1; set_background_color_blend(0, 0, 0, 0); for (i = 0; i < MAX_NPCS; i++) { @@ -191,7 +191,7 @@ ApiStatus N(Quizmo_FadeInWorld)(Evt* script, s32 isInitialCall) { script->functionTemp[1] = 1; } else if (script->functionTemp[1] == 1) { mdl_set_all_fog_mode(0); - *D_801512F0 = 0; + *gBgRenderTypePtr = BACKGROUND_RENDER_TYPE_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 9ac6186d73..da2f03514f 100644 --- a/src/world/common/atomic/UnkFunc27.inc.c +++ b/src/world/common/atomic/UnkFunc27.inc.c @@ -40,7 +40,7 @@ ApiStatus N(UnkFunc27)(Evt* script, s32 isInitialCall) { break; case 2: - *D_801512F0 = testS1; + *gBgRenderTypePtr = testS1; break; } diff --git a/ver/us/asm/bss3.s b/ver/us/asm/bss3.s index 81719c0c83..5c5a061433 100644 --- a/ver/us/asm/bss3.s +++ b/ver/us/asm/bss3.s @@ -58,7 +58,7 @@ dlabel gCurrentCustomModelGfxPtr dlabel gLastCreatedEntityIndex .space 4 -dlabel D_801512F0 +dlabel gBgRenderTypePtr .space 4 dlabel gMsgVarImages @@ -634,13 +634,13 @@ dlabel gCurrentTriggerListPtr dlabel D_80159394 .space 0x0000000c -dlabel D_801593A0 +dlabel gBackgroundPalette .space 0x000001fe dlabel D_8015959E .space 2 -dlabel D_801595A0 +dlabel gBackroundLastScrollValue .space 0x00000020 dlabel D_801595C0 diff --git a/ver/us/asm/nonmatchings/16c8e0/func_8023F088.s b/ver/us/asm/nonmatchings/16c8e0/func_8023F088.s deleted file mode 100644 index e096e6c7ae..0000000000 --- a/ver/us/asm/nonmatchings/16c8e0/func_8023F088.s +++ /dev/null @@ -1,979 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_8023F088 -/* 16D968 8023F088 27BDFF80 */ addiu $sp, $sp, -0x80 -/* 16D96C 8023F08C AFB40068 */ sw $s4, 0x68($sp) -/* 16D970 8023F090 0000A02D */ daddu $s4, $zero, $zero -/* 16D974 8023F094 3C03800A */ lui $v1, %hi(gCurrentCamID) -/* 16D978 8023F098 8463A634 */ lh $v1, %lo(gCurrentCamID)($v1) -/* 16D97C 8023F09C 3C04800B */ lui $a0, %hi(gCameras) -/* 16D980 8023F0A0 24841D80 */ addiu $a0, $a0, %lo(gCameras) -/* 16D984 8023F0A4 AFBF007C */ sw $ra, 0x7c($sp) -/* 16D988 8023F0A8 AFBE0078 */ sw $fp, 0x78($sp) -/* 16D98C 8023F0AC AFB70074 */ sw $s7, 0x74($sp) -/* 16D990 8023F0B0 AFB60070 */ sw $s6, 0x70($sp) -/* 16D994 8023F0B4 AFB5006C */ sw $s5, 0x6c($sp) -/* 16D998 8023F0B8 AFB30064 */ sw $s3, 0x64($sp) -/* 16D99C 8023F0BC AFB20060 */ sw $s2, 0x60($sp) -/* 16D9A0 8023F0C0 AFB1005C */ sw $s1, 0x5c($sp) -/* 16D9A4 8023F0C4 AFB00058 */ sw $s0, 0x58($sp) -/* 16D9A8 8023F0C8 00031080 */ sll $v0, $v1, 2 -/* 16D9AC 8023F0CC 00431021 */ addu $v0, $v0, $v1 -/* 16D9B0 8023F0D0 00021080 */ sll $v0, $v0, 2 -/* 16D9B4 8023F0D4 00431023 */ subu $v0, $v0, $v1 -/* 16D9B8 8023F0D8 000218C0 */ sll $v1, $v0, 3 -/* 16D9BC 8023F0DC 00431021 */ addu $v0, $v0, $v1 -/* 16D9C0 8023F0E0 000210C0 */ sll $v0, $v0, 3 -/* 16D9C4 8023F0E4 0C099EF7 */ jal hide_foreground_models_unchecked -/* 16D9C8 8023F0E8 0044B821 */ addu $s7, $v0, $a0 -/* 16D9CC 8023F0EC 0C046EE9 */ jal is_world_fog_enabled -/* 16D9D0 8023F0F0 00000000 */ nop -/* 16D9D4 8023F0F4 10400043 */ beqz $v0, .L8023F204 -/* 16D9D8 8023F0F8 27A40010 */ addiu $a0, $sp, 0x10 -/* 16D9DC 8023F0FC 24140001 */ addiu $s4, $zero, 1 -/* 16D9E0 8023F100 27A50014 */ addiu $a1, $sp, 0x14 -/* 16D9E4 8023F104 27A60018 */ addiu $a2, $sp, 0x18 -/* 16D9E8 8023F108 0C046EF6 */ jal get_world_fog_color -/* 16D9EC 8023F10C 27A7001C */ addiu $a3, $sp, 0x1c -/* 16D9F0 8023F110 27A40020 */ addiu $a0, $sp, 0x20 -/* 16D9F4 8023F114 27A50021 */ addiu $a1, $sp, 0x21 -/* 16D9F8 8023F118 3C028007 */ lui $v0, %hi(gGameStatusPtr) -/* 16D9FC 8023F11C 8C42419C */ lw $v0, %lo(gGameStatusPtr)($v0) -/* 16DA00 8023F120 27A60022 */ addiu $a2, $sp, 0x22 -/* 16DA04 8023F124 9442015C */ lhu $v0, 0x15c($v0) -/* 16DA08 8023F128 27A70023 */ addiu $a3, $sp, 0x23 -/* 16DA0C 8023F12C 0C046FA0 */ jal get_background_color_blend -/* 16DA10 8023F130 AFA2001C */ sw $v0, 0x1c($sp) -/* 16DA14 8023F134 8FA3001C */ lw $v1, 0x1c($sp) -/* 16DA18 8023F138 240200FF */ addiu $v0, $zero, 0xff -/* 16DA1C 8023F13C 1462000B */ bne $v1, $v0, .L8023F16C -/* 16DA20 8023F140 0000902D */ daddu $s2, $zero, $zero -/* 16DA24 8023F144 0280182D */ daddu $v1, $s4, $zero -/* 16DA28 8023F148 0040902D */ daddu $s2, $v0, $zero -/* 16DA2C 8023F14C 3C02802A */ lui $v0, %hi(D_8029F038+0x1FE) -/* 16DA30 8023F150 2442F236 */ addiu $v0, $v0, %lo(D_8029F038+0x1FE) -.L8023F154: -/* 16DA34 8023F154 A4430000 */ sh $v1, ($v0) -/* 16DA38 8023F158 2652FFFF */ addiu $s2, $s2, -1 -/* 16DA3C 8023F15C 0641FFFD */ bgez $s2, .L8023F154 -/* 16DA40 8023F160 2442FFFE */ addiu $v0, $v0, -2 -/* 16DA44 8023F164 0808FC81 */ j .L8023F204 -/* 16DA48 8023F168 00000000 */ nop -.L8023F16C: -/* 16DA4C 8023F16C 3C13802A */ lui $s3, %hi(D_8029F038) -/* 16DA50 8023F170 2673F038 */ addiu $s3, $s3, %lo(D_8029F038) -.L8023F174: -/* 16DA54 8023F174 00121840 */ sll $v1, $s2, 1 -/* 16DA58 8023F178 26520001 */ addiu $s2, $s2, 1 -/* 16DA5C 8023F17C 3C028007 */ lui $v0, %hi(gGameStatusPtr) -/* 16DA60 8023F180 8C42419C */ lw $v0, %lo(gGameStatusPtr)($v0) -/* 16DA64 8023F184 8FA6001C */ lw $a2, 0x1c($sp) -/* 16DA68 8023F188 8C420158 */ lw $v0, 0x158($v0) -/* 16DA6C 8023F18C 8FA50018 */ lw $a1, 0x18($sp) -/* 16DA70 8023F190 00621821 */ addu $v1, $v1, $v0 -/* 16DA74 8023F194 94700000 */ lhu $s0, ($v1) -/* 16DA78 8023F198 000528C3 */ sra $a1, $a1, 3 -/* 16DA7C 8023F19C 00102042 */ srl $a0, $s0, 1 -/* 16DA80 8023F1A0 0C08FC18 */ jal func_8023F060 -/* 16DA84 8023F1A4 3084001F */ andi $a0, $a0, 0x1f -/* 16DA88 8023F1A8 00102182 */ srl $a0, $s0, 6 -/* 16DA8C 8023F1AC 3084001F */ andi $a0, $a0, 0x1f -/* 16DA90 8023F1B0 0040882D */ daddu $s1, $v0, $zero -/* 16DA94 8023F1B4 8FA50014 */ lw $a1, 0x14($sp) -/* 16DA98 8023F1B8 8FA6001C */ lw $a2, 0x1c($sp) -/* 16DA9C 8023F1BC 0C08FC18 */ jal func_8023F060 -/* 16DAA0 8023F1C0 000528C3 */ sra $a1, $a1, 3 -/* 16DAA4 8023F1C4 001022C2 */ srl $a0, $s0, 0xb -/* 16DAA8 8023F1C8 0040802D */ daddu $s0, $v0, $zero -/* 16DAAC 8023F1CC 8FA50010 */ lw $a1, 0x10($sp) -/* 16DAB0 8023F1D0 8FA6001C */ lw $a2, 0x1c($sp) -/* 16DAB4 8023F1D4 0C08FC18 */ jal func_8023F060 -/* 16DAB8 8023F1D8 000528C3 */ sra $a1, $a1, 3 -/* 16DABC 8023F1DC 00118840 */ sll $s1, $s1, 1 -/* 16DAC0 8023F1E0 00108180 */ sll $s0, $s0, 6 -/* 16DAC4 8023F1E4 02308825 */ or $s1, $s1, $s0 -/* 16DAC8 8023F1E8 000212C0 */ sll $v0, $v0, 0xb -/* 16DACC 8023F1EC 02228825 */ or $s1, $s1, $v0 -/* 16DAD0 8023F1F0 36310001 */ ori $s1, $s1, 1 -/* 16DAD4 8023F1F4 A6710000 */ sh $s1, ($s3) -/* 16DAD8 8023F1F8 2A420100 */ slti $v0, $s2, 0x100 -/* 16DADC 8023F1FC 1440FFDD */ bnez $v0, .L8023F174 -/* 16DAE0 8023F200 26730002 */ addiu $s3, $s3, 2 -.L8023F204: -/* 16DAE4 8023F204 3C0D8007 */ lui $t5, %hi(gGameStatusPtr) -/* 16DAE8 8023F208 8DAD419C */ lw $t5, %lo(gGameStatusPtr)($t5) -/* 16DAEC 8023F20C 95A20148 */ lhu $v0, 0x148($t5) -/* 16DAF0 8023F210 30420001 */ andi $v0, $v0, 1 -/* 16DAF4 8023F214 104001ED */ beqz $v0, .L8023F9CC -/* 16DAF8 8023F218 3C03E300 */ lui $v1, 0xe300 -/* 16DAFC 8023F21C 34630A01 */ ori $v1, $v1, 0xa01 -/* 16DB00 8023F220 3C04E300 */ lui $a0, 0xe300 -/* 16DB04 8023F224 34840C00 */ ori $a0, $a0, 0xc00 -/* 16DB08 8023F228 3C05E300 */ lui $a1, 0xe300 -/* 16DB0C 8023F22C 34A51001 */ ori $a1, $a1, 0x1001 -/* 16DB10 8023F230 3C09FCFF */ lui $t1, 0xfcff -/* 16DB14 8023F234 3529FFFF */ ori $t1, $t1, 0xffff -/* 16DB18 8023F238 3C08FFFC */ lui $t0, 0xfffc -/* 16DB1C 8023F23C 3508F87C */ ori $t0, $t0, 0xf87c -/* 16DB20 8023F240 3C06E200 */ lui $a2, 0xe200 -/* 16DB24 8023F244 34C6001C */ ori $a2, $a2, 0x1c -/* 16DB28 8023F248 3C07E300 */ lui $a3, 0xe300 -/* 16DB2C 8023F24C 3C0B800A */ lui $t3, %hi(gMasterGfxPos) -/* 16DB30 8023F250 256BA66C */ addiu $t3, $t3, %lo(gMasterGfxPos) -/* 16DB34 8023F254 34E71201 */ ori $a3, $a3, 0x1201 -/* 16DB38 8023F258 3C0CE700 */ lui $t4, 0xe700 -/* 16DB3C 8023F25C 8D6A0000 */ lw $t2, ($t3) -/* 16DB40 8023F260 3C014080 */ lui $at, 0x4080 -/* 16DB44 8023F264 44812000 */ mtc1 $at, $f4 -/* 16DB48 8023F268 0140102D */ daddu $v0, $t2, $zero -/* 16DB4C 8023F26C 254A0008 */ addiu $t2, $t2, 8 -/* 16DB50 8023F270 AD6A0000 */ sw $t2, ($t3) -/* 16DB54 8023F274 AC4C0000 */ sw $t4, ($v0) -/* 16DB58 8023F278 AC400004 */ sw $zero, 4($v0) -/* 16DB5C 8023F27C 25420008 */ addiu $v0, $t2, 8 -/* 16DB60 8023F280 AD620000 */ sw $v0, ($t3) -/* 16DB64 8023F284 3C020020 */ lui $v0, 0x20 -/* 16DB68 8023F288 AD420004 */ sw $v0, 4($t2) -/* 16DB6C 8023F28C 25420010 */ addiu $v0, $t2, 0x10 -/* 16DB70 8023F290 AD430000 */ sw $v1, ($t2) -/* 16DB74 8023F294 AD620000 */ sw $v0, ($t3) -/* 16DB78 8023F298 25420018 */ addiu $v0, $t2, 0x18 -/* 16DB7C 8023F29C AD440008 */ sw $a0, 8($t2) -/* 16DB80 8023F2A0 AD40000C */ sw $zero, 0xc($t2) -/* 16DB84 8023F2A4 AD620000 */ sw $v0, ($t3) -/* 16DB88 8023F2A8 34028000 */ ori $v0, $zero, 0x8000 -/* 16DB8C 8023F2AC AD420014 */ sw $v0, 0x14($t2) -/* 16DB90 8023F2B0 25420020 */ addiu $v0, $t2, 0x20 -/* 16DB94 8023F2B4 AD450010 */ sw $a1, 0x10($t2) -/* 16DB98 8023F2B8 AD620000 */ sw $v0, ($t3) -/* 16DB9C 8023F2BC AD490018 */ sw $t1, 0x18($t2) -/* 16DBA0 8023F2C0 AD48001C */ sw $t0, 0x1c($t2) -/* 16DBA4 8023F2C4 AD460020 */ sw $a2, 0x20($t2) -/* 16DBA8 8023F2C8 AD400024 */ sw $zero, 0x24($t2) -/* 16DBAC 8023F2CC AD470028 */ sw $a3, 0x28($t2) -/* 16DBB0 8023F2D0 AD40002C */ sw $zero, 0x2c($t2) -/* 16DBB4 8023F2D4 86E2000E */ lh $v0, 0xe($s7) -/* 16DBB8 8023F2D8 25430028 */ addiu $v1, $t2, 0x28 -/* 16DBBC 8023F2DC AD630000 */ sw $v1, ($t3) -/* 16DBC0 8023F2E0 44821000 */ mtc1 $v0, $f2 -/* 16DBC4 8023F2E4 00000000 */ nop -/* 16DBC8 8023F2E8 468010A0 */ cvt.s.w $f2, $f2 -/* 16DBCC 8023F2EC 46041082 */ mul.s $f2, $f2, $f4 -/* 16DBD0 8023F2F0 00000000 */ nop -/* 16DBD4 8023F2F4 25430030 */ addiu $v1, $t2, 0x30 -/* 16DBD8 8023F2F8 86E20010 */ lh $v0, 0x10($s7) -/* 16DBDC 8023F2FC 3C04ED00 */ lui $a0, 0xed00 -/* 16DBE0 8023F300 44820000 */ mtc1 $v0, $f0 -/* 16DBE4 8023F304 00000000 */ nop -/* 16DBE8 8023F308 46800020 */ cvt.s.w $f0, $f0 -/* 16DBEC 8023F30C 46040002 */ mul.s $f0, $f0, $f4 -/* 16DBF0 8023F310 00000000 */ nop -/* 16DBF4 8023F314 AD630000 */ sw $v1, ($t3) -/* 16DBF8 8023F318 4600118D */ trunc.w.s $f6, $f2 -/* 16DBFC 8023F31C 44023000 */ mfc1 $v0, $f6 -/* 16DC00 8023F320 00000000 */ nop -/* 16DC04 8023F324 30420FFF */ andi $v0, $v0, 0xfff -/* 16DC08 8023F328 00021300 */ sll $v0, $v0, 0xc -/* 16DC0C 8023F32C 4600018D */ trunc.w.s $f6, $f0 -/* 16DC10 8023F330 44033000 */ mfc1 $v1, $f6 -/* 16DC14 8023F334 00000000 */ nop -/* 16DC18 8023F338 30630FFF */ andi $v1, $v1, 0xfff -/* 16DC1C 8023F33C 00641825 */ or $v1, $v1, $a0 -/* 16DC20 8023F340 00431025 */ or $v0, $v0, $v1 -/* 16DC24 8023F344 AD420030 */ sw $v0, 0x30($t2) -/* 16DC28 8023F348 86E2000E */ lh $v0, 0xe($s7) -/* 16DC2C 8023F34C 86E4000A */ lh $a0, 0xa($s7) -/* 16DC30 8023F350 25430038 */ addiu $v1, $t2, 0x38 -/* 16DC34 8023F354 AD630000 */ sw $v1, ($t3) -/* 16DC38 8023F358 86E3000C */ lh $v1, 0xc($s7) -/* 16DC3C 8023F35C 00441021 */ addu $v0, $v0, $a0 -/* 16DC40 8023F360 2442FFFF */ addiu $v0, $v0, -1 -/* 16DC44 8023F364 44821000 */ mtc1 $v0, $f2 -/* 16DC48 8023F368 00000000 */ nop -/* 16DC4C 8023F36C 468010A0 */ cvt.s.w $f2, $f2 -/* 16DC50 8023F370 25440040 */ addiu $a0, $t2, 0x40 -/* 16DC54 8023F374 86E20010 */ lh $v0, 0x10($s7) -/* 16DC58 8023F378 46041082 */ mul.s $f2, $f2, $f4 -/* 16DC5C 8023F37C 00000000 */ nop -/* 16DC60 8023F380 AD640000 */ sw $a0, ($t3) -/* 16DC64 8023F384 00431021 */ addu $v0, $v0, $v1 -/* 16DC68 8023F388 2442FFFF */ addiu $v0, $v0, -1 -/* 16DC6C 8023F38C 44820000 */ mtc1 $v0, $f0 -/* 16DC70 8023F390 00000000 */ nop -/* 16DC74 8023F394 46800020 */ cvt.s.w $f0, $f0 -/* 16DC78 8023F398 46040002 */ mul.s $f0, $f0, $f4 -/* 16DC7C 8023F39C 00000000 */ nop -/* 16DC80 8023F3A0 AD4C0038 */ sw $t4, 0x38($t2) -/* 16DC84 8023F3A4 4600118D */ trunc.w.s $f6, $f2 -/* 16DC88 8023F3A8 44023000 */ mfc1 $v0, $f6 -/* 16DC8C 8023F3AC 00000000 */ nop -/* 16DC90 8023F3B0 30420FFF */ andi $v0, $v0, 0xfff -/* 16DC94 8023F3B4 00021300 */ sll $v0, $v0, 0xc -/* 16DC98 8023F3B8 4600018D */ trunc.w.s $f6, $f0 -/* 16DC9C 8023F3BC 44033000 */ mfc1 $v1, $f6 -/* 16DCA0 8023F3C0 00000000 */ nop -/* 16DCA4 8023F3C4 30630FFF */ andi $v1, $v1, 0xfff -/* 16DCA8 8023F3C8 00431025 */ or $v0, $v0, $v1 -/* 16DCAC 8023F3CC AD420034 */ sw $v0, 0x34($t2) -/* 16DCB0 8023F3D0 16800024 */ bnez $s4, .L8023F464 -/* 16DCB4 8023F3D4 AD40003C */ sw $zero, 0x3c($t2) -/* 16DCB8 8023F3D8 3C03F500 */ lui $v1, 0xf500 -/* 16DCBC 8023F3DC 34630100 */ ori $v1, $v1, 0x100 -/* 16DCC0 8023F3E0 3C05073F */ lui $a1, 0x73f -/* 16DCC4 8023F3E4 34A5C000 */ ori $a1, $a1, 0xc000 -/* 16DCC8 8023F3E8 25420048 */ addiu $v0, $t2, 0x48 -/* 16DCCC 8023F3EC AD620000 */ sw $v0, ($t3) -/* 16DCD0 8023F3F0 3C02FD10 */ lui $v0, 0xfd10 -/* 16DCD4 8023F3F4 AD420040 */ sw $v0, 0x40($t2) -/* 16DCD8 8023F3F8 25420050 */ addiu $v0, $t2, 0x50 -/* 16DCDC 8023F3FC AD620000 */ sw $v0, ($t3) -/* 16DCE0 8023F400 8DA40158 */ lw $a0, 0x158($t5) -/* 16DCE4 8023F404 3C02E800 */ lui $v0, 0xe800 -/* 16DCE8 8023F408 AD420048 */ sw $v0, 0x48($t2) -/* 16DCEC 8023F40C 25420058 */ addiu $v0, $t2, 0x58 -/* 16DCF0 8023F410 AD40004C */ sw $zero, 0x4c($t2) -/* 16DCF4 8023F414 AD620000 */ sw $v0, ($t3) -/* 16DCF8 8023F418 3C020700 */ lui $v0, 0x700 -/* 16DCFC 8023F41C AD420054 */ sw $v0, 0x54($t2) -/* 16DD00 8023F420 25420060 */ addiu $v0, $t2, 0x60 -/* 16DD04 8023F424 AD430050 */ sw $v1, 0x50($t2) -/* 16DD08 8023F428 AD620000 */ sw $v0, ($t3) -/* 16DD0C 8023F42C 3C02E600 */ lui $v0, 0xe600 -/* 16DD10 8023F430 AD420058 */ sw $v0, 0x58($t2) -/* 16DD14 8023F434 25420068 */ addiu $v0, $t2, 0x68 -/* 16DD18 8023F438 AD40005C */ sw $zero, 0x5c($t2) -/* 16DD1C 8023F43C AD620000 */ sw $v0, ($t3) -/* 16DD20 8023F440 3C02F000 */ lui $v0, 0xf000 -/* 16DD24 8023F444 AD420060 */ sw $v0, 0x60($t2) -/* 16DD28 8023F448 25420070 */ addiu $v0, $t2, 0x70 -/* 16DD2C 8023F44C AD450064 */ sw $a1, 0x64($t2) -/* 16DD30 8023F450 AD620000 */ sw $v0, ($t3) -/* 16DD34 8023F454 AD4C0068 */ sw $t4, 0x68($t2) -/* 16DD38 8023F458 AD40006C */ sw $zero, 0x6c($t2) -/* 16DD3C 8023F45C 0808FD3C */ j .L8023F4F0 -/* 16DD40 8023F460 AD440044 */ sw $a0, 0x44($t2) -.L8023F464: -/* 16DD44 8023F464 3C03F500 */ lui $v1, 0xf500 -/* 16DD48 8023F468 34630100 */ ori $v1, $v1, 0x100 -/* 16DD4C 8023F46C 3C04073F */ lui $a0, 0x73f -/* 16DD50 8023F470 3484C000 */ ori $a0, $a0, 0xc000 -/* 16DD54 8023F474 25420048 */ addiu $v0, $t2, 0x48 -/* 16DD58 8023F478 AD620000 */ sw $v0, ($t3) -/* 16DD5C 8023F47C 3C02FD10 */ lui $v0, 0xfd10 -/* 16DD60 8023F480 AD420040 */ sw $v0, 0x40($t2) -/* 16DD64 8023F484 3C02802A */ lui $v0, %hi(D_8029F038) -/* 16DD68 8023F488 2442F038 */ addiu $v0, $v0, %lo(D_8029F038) -/* 16DD6C 8023F48C AD420044 */ sw $v0, 0x44($t2) -/* 16DD70 8023F490 25420050 */ addiu $v0, $t2, 0x50 -/* 16DD74 8023F494 AD620000 */ sw $v0, ($t3) -/* 16DD78 8023F498 3C02E800 */ lui $v0, 0xe800 -/* 16DD7C 8023F49C AD420048 */ sw $v0, 0x48($t2) -/* 16DD80 8023F4A0 25420058 */ addiu $v0, $t2, 0x58 -/* 16DD84 8023F4A4 AD40004C */ sw $zero, 0x4c($t2) -/* 16DD88 8023F4A8 AD620000 */ sw $v0, ($t3) -/* 16DD8C 8023F4AC 3C020700 */ lui $v0, 0x700 -/* 16DD90 8023F4B0 AD420054 */ sw $v0, 0x54($t2) -/* 16DD94 8023F4B4 25420060 */ addiu $v0, $t2, 0x60 -/* 16DD98 8023F4B8 AD430050 */ sw $v1, 0x50($t2) -/* 16DD9C 8023F4BC AD620000 */ sw $v0, ($t3) -/* 16DDA0 8023F4C0 3C02E600 */ lui $v0, 0xe600 -/* 16DDA4 8023F4C4 AD420058 */ sw $v0, 0x58($t2) -/* 16DDA8 8023F4C8 25420068 */ addiu $v0, $t2, 0x68 -/* 16DDAC 8023F4CC AD40005C */ sw $zero, 0x5c($t2) -/* 16DDB0 8023F4D0 AD620000 */ sw $v0, ($t3) -/* 16DDB4 8023F4D4 3C02F000 */ lui $v0, 0xf000 -/* 16DDB8 8023F4D8 AD420060 */ sw $v0, 0x60($t2) -/* 16DDBC 8023F4DC 25420070 */ addiu $v0, $t2, 0x70 -/* 16DDC0 8023F4E0 AD440064 */ sw $a0, 0x64($t2) -/* 16DDC4 8023F4E4 AD620000 */ sw $v0, ($t3) -/* 16DDC8 8023F4E8 AD4C0068 */ sw $t4, 0x68($t2) -/* 16DDCC 8023F4EC AD40006C */ sw $zero, 0x6c($t2) -.L8023F4F0: -/* 16DDD0 8023F4F0 3C038007 */ lui $v1, %hi(gGameStatusPtr) -/* 16DDD4 8023F4F4 8C63419C */ lw $v1, %lo(gGameStatusPtr)($v1) -/* 16DDD8 8023F4F8 846E014E */ lh $t6, 0x14e($v1) -/* 16DDDC 8023F4FC 24020800 */ addiu $v0, $zero, 0x800 -/* 16DDE0 8023F500 15C00002 */ bnez $t6, .L8023F50C -/* 16DDE4 8023F504 004E001A */ div $zero, $v0, $t6 -/* 16DDE8 8023F508 0007000D */ break 7 -.L8023F50C: -/* 16DDEC 8023F50C 2401FFFF */ addiu $at, $zero, -1 -/* 16DDF0 8023F510 15C10004 */ bne $t6, $at, .L8023F524 -/* 16DDF4 8023F514 3C018000 */ lui $at, 0x8000 -/* 16DDF8 8023F518 14410002 */ bne $v0, $at, .L8023F524 -/* 16DDFC 8023F51C 00000000 */ nop -/* 16DE00 8023F520 0006000D */ break 6 -.L8023F524: -/* 16DE04 8023F524 00006812 */ mflo $t5 -/* 16DE08 8023F528 84630150 */ lh $v1, 0x150($v1) -/* 16DE0C 8023F52C 15A00002 */ bnez $t5, .L8023F538 -/* 16DE10 8023F530 006D001A */ div $zero, $v1, $t5 -/* 16DE14 8023F534 0007000D */ break 7 -.L8023F538: -/* 16DE18 8023F538 2401FFFF */ addiu $at, $zero, -1 -/* 16DE1C 8023F53C 15A10004 */ bne $t5, $at, .L8023F550 -/* 16DE20 8023F540 3C018000 */ lui $at, 0x8000 -/* 16DE24 8023F544 14610002 */ bne $v1, $at, .L8023F550 -/* 16DE28 8023F548 00000000 */ nop -/* 16DE2C 8023F54C 0006000D */ break 6 -.L8023F550: -/* 16DE30 8023F550 0000B012 */ mflo $s6 -/* 16DE34 8023F554 0000A810 */ mfhi $s5 -/* 16DE38 8023F558 AFA00028 */ sw $zero, 0x28($sp) -/* 16DE3C 8023F55C AFA30024 */ sw $v1, 0x24($sp) -/* 16DE40 8023F560 AFB5002C */ sw $s5, 0x2c($sp) -/* 16DE44 8023F564 86F8000E */ lh $t8, 0xe($s7) -/* 16DE48 8023F568 86F90010 */ lh $t9, 0x10($s7) -/* 16DE4C 8023F56C 1AC0008F */ blez $s6, .L8023F7AC -/* 16DE50 8023F570 0000902D */ daddu $s2, $zero, $zero -/* 16DE54 8023F574 3C0A800A */ lui $t2, %hi(gMasterGfxPos) -/* 16DE58 8023F578 254AA66C */ addiu $t2, $t2, %lo(gMasterGfxPos) -/* 16DE5C 8023F57C 25C2FFFF */ addiu $v0, $t6, -1 -/* 16DE60 8023F580 30420FFF */ andi $v0, $v0, 0xfff -/* 16DE64 8023F584 3C03FD48 */ lui $v1, 0xfd48 -/* 16DE68 8023F588 00431025 */ or $v0, $v0, $v1 -/* 16DE6C 8023F58C 3C14F548 */ lui $s4, 0xf548 -/* 16DE70 8023F590 36944A00 */ ori $s4, $s4, 0x4a00 -/* 16DE74 8023F594 AFA20030 */ sw $v0, 0x30($sp) -/* 16DE78 8023F598 2702FFFF */ addiu $v0, $t8, -1 -/* 16DE7C 8023F59C 00021080 */ sll $v0, $v0, 2 -/* 16DE80 8023F5A0 30420FFF */ andi $v0, $v0, 0xfff -/* 16DE84 8023F5A4 00021300 */ sll $v0, $v0, 0xc -/* 16DE88 8023F5A8 000EAD40 */ sll $s5, $t6, 0x15 -/* 16DE8C 8023F5AC 3C1EF100 */ lui $fp, 0xf100 -/* 16DE90 8023F5B0 3C131000 */ lui $s3, 0x1000 -/* 16DE94 8023F5B4 36730400 */ ori $s3, $s3, 0x400 -/* 16DE98 8023F5B8 AFA20034 */ sw $v0, 0x34($sp) -/* 16DE9C 8023F5BC 01D81021 */ addu $v0, $t6, $t8 -/* 16DEA0 8023F5C0 2442FFFF */ addiu $v0, $v0, -1 -/* 16DEA4 8023F5C4 00021080 */ sll $v0, $v0, 2 -/* 16DEA8 8023F5C8 30420FFF */ andi $v0, $v0, 0xfff -/* 16DEAC 8023F5CC 00021300 */ sll $v0, $v0, 0xc -/* 16DEB0 8023F5D0 AFA2003C */ sw $v0, 0x3c($sp) -/* 16DEB4 8023F5D4 00181080 */ sll $v0, $t8, 2 -/* 16DEB8 8023F5D8 30420FFF */ andi $v0, $v0, 0xfff -/* 16DEBC 8023F5DC 00021300 */ sll $v0, $v0, 0xc -/* 16DEC0 8023F5E0 AFB50038 */ sw $s5, 0x38($sp) -/* 16DEC4 8023F5E4 0040A82D */ daddu $s5, $v0, $zero -/* 16DEC8 8023F5E8 0320882D */ daddu $s1, $t9, $zero -/* 16DECC 8023F5EC 01A0802D */ daddu $s0, $t5, $zero -/* 16DED0 8023F5F0 0240782D */ daddu $t7, $s2, $zero -/* 16DED4 8023F5F4 AFA20050 */ sw $v0, 0x50($sp) -/* 16DED8 8023F5F8 AFB50040 */ sw $s5, 0x40($sp) -.L8023F5FC: -/* 16DEDC 8023F5FC 3C028028 */ lui $v0, %hi(D_802809FA) -/* 16DEE0 8023F600 944209FA */ lhu $v0, %lo(D_802809FA)($v0) -/* 16DEE4 8023F604 3C0C8007 */ lui $t4, %hi(gGameStatusPtr) -/* 16DEE8 8023F608 8D8C419C */ lw $t4, %lo(gGameStatusPtr)($t4) -/* 16DEEC 8023F60C 004F2021 */ addu $a0, $v0, $t7 -/* 16DEF0 8023F610 00041400 */ sll $v0, $a0, 0x10 -/* 16DEF4 8023F614 85830150 */ lh $v1, 0x150($t4) -/* 16DEF8 8023F618 00021403 */ sra $v0, $v0, 0x10 -/* 16DEFC 8023F61C 0062182A */ slt $v1, $v1, $v0 -/* 16DF00 8023F620 95820150 */ lhu $v0, 0x150($t4) -/* 16DF04 8023F624 10600002 */ beqz $v1, .L8023F630 -/* 16DF08 8023F628 0080582D */ daddu $t3, $a0, $zero -/* 16DF0C 8023F62C 00825823 */ subu $t3, $a0, $v0 -.L8023F630: -/* 16DF10 8023F630 3C080749 */ lui $t0, 0x749 -/* 16DF14 8023F634 3508C014 */ ori $t0, $t0, 0xc014 -/* 16DF18 8023F638 3C090049 */ lui $t1, 0x49 -/* 16DF1C 8023F63C 3529C014 */ ori $t1, $t1, 0xc014 -/* 16DF20 8023F640 00113080 */ sll $a2, $s1, 2 -/* 16DF24 8023F644 022D8821 */ addu $s1, $s1, $t5 -/* 16DF28 8023F648 2725FFFF */ addiu $a1, $t9, -1 -/* 16DF2C 8023F64C 02052821 */ addu $a1, $s0, $a1 -/* 16DF30 8023F650 020D8021 */ addu $s0, $s0, $t5 -/* 16DF34 8023F654 00052880 */ sll $a1, $a1, 2 -/* 16DF38 8023F658 8D430000 */ lw $v1, ($t2) -/* 16DF3C 8023F65C 30A50FFF */ andi $a1, $a1, 0xfff -/* 16DF40 8023F660 0060382D */ daddu $a3, $v1, $zero -/* 16DF44 8023F664 24630008 */ addiu $v1, $v1, 8 -/* 16DF48 8023F668 24620008 */ addiu $v0, $v1, 8 -/* 16DF4C 8023F66C AD430000 */ sw $v1, ($t2) -/* 16DF50 8023F670 8FB50030 */ lw $s5, 0x30($sp) -/* 16DF54 8023F674 24640048 */ addiu $a0, $v1, 0x48 -/* 16DF58 8023F678 ACF50000 */ sw $s5, ($a3) -/* 16DF5C 8023F67C AD420000 */ sw $v0, ($t2) -/* 16DF60 8023F680 24620010 */ addiu $v0, $v1, 0x10 -/* 16DF64 8023F684 AD420000 */ sw $v0, ($t2) -/* 16DF68 8023F688 24620018 */ addiu $v0, $v1, 0x18 -/* 16DF6C 8023F68C AD420000 */ sw $v0, ($t2) -/* 16DF70 8023F690 24620020 */ addiu $v0, $v1, 0x20 -/* 16DF74 8023F694 AD420000 */ sw $v0, ($t2) -/* 16DF78 8023F698 24620028 */ addiu $v0, $v1, 0x28 -/* 16DF7C 8023F69C AD420000 */ sw $v0, ($t2) -/* 16DF80 8023F6A0 24620030 */ addiu $v0, $v1, 0x30 -/* 16DF84 8023F6A4 AD420000 */ sw $v0, ($t2) -/* 16DF88 8023F6A8 24620038 */ addiu $v0, $v1, 0x38 -/* 16DF8C 8023F6AC AD420000 */ sw $v0, ($t2) -/* 16DF90 8023F6B0 24620040 */ addiu $v0, $v1, 0x40 -/* 16DF94 8023F6B4 AD420000 */ sw $v0, ($t2) -/* 16DF98 8023F6B8 000B1400 */ sll $v0, $t3, 0x10 -/* 16DF9C 8023F6BC 00021403 */ sra $v0, $v0, 0x10 -/* 16DFA0 8023F6C0 01C20018 */ mult $t6, $v0 -/* 16DFA4 8023F6C4 AD440000 */ sw $a0, ($t2) -/* 16DFA8 8023F6C8 8D840154 */ lw $a0, 0x154($t4) -/* 16DFAC 8023F6CC 24620050 */ addiu $v0, $v1, 0x50 -/* 16DFB0 8023F6D0 AD420000 */ sw $v0, ($t2) -/* 16DFB4 8023F6D4 3C020700 */ lui $v0, 0x700 -/* 16DFB8 8023F6D8 0000A812 */ mflo $s5 -/* 16DFBC 8023F6DC 00952021 */ addu $a0, $a0, $s5 -/* 16DFC0 8023F6E0 ACE40004 */ sw $a0, 4($a3) -/* 16DFC4 8023F6E4 AC620004 */ sw $v0, 4($v1) -/* 16DFC8 8023F6E8 3C02E600 */ lui $v0, 0xe600 -/* 16DFCC 8023F6EC AC620008 */ sw $v0, 8($v1) -/* 16DFD0 8023F6F0 3C02F400 */ lui $v0, 0xf400 -/* 16DFD4 8023F6F4 AC620010 */ sw $v0, 0x10($v1) -/* 16DFD8 8023F6F8 3C02E700 */ lui $v0, 0xe700 -/* 16DFDC 8023F6FC AC620018 */ sw $v0, 0x18($v1) -/* 16DFE0 8023F700 3C02F200 */ lui $v0, 0xf200 -/* 16DFE4 8023F704 AC620028 */ sw $v0, 0x28($v1) -/* 16DFE8 8023F708 3C02E400 */ lui $v0, 0xe400 -/* 16DFEC 8023F70C AC740000 */ sw $s4, ($v1) -/* 16DFF0 8023F710 AC60000C */ sw $zero, 0xc($v1) -/* 16DFF4 8023F714 AC680014 */ sw $t0, 0x14($v1) -/* 16DFF8 8023F718 AC60001C */ sw $zero, 0x1c($v1) -/* 16DFFC 8023F71C AC740020 */ sw $s4, 0x20($v1) -/* 16E000 8023F720 AC600024 */ sw $zero, 0x24($v1) -/* 16E004 8023F724 AC69002C */ sw $t1, 0x2c($v1) -/* 16E008 8023F728 8FB50034 */ lw $s5, 0x34($sp) -/* 16E00C 8023F72C 00A22825 */ or $a1, $a1, $v0 -/* 16E010 8023F730 02A51025 */ or $v0, $s5, $a1 -/* 16E014 8023F734 AC620030 */ sw $v0, 0x30($v1) -/* 16E018 8023F738 8FB50050 */ lw $s5, 0x50($sp) -/* 16E01C 8023F73C 30C60FFF */ andi $a2, $a2, 0xfff -/* 16E020 8023F740 02A61025 */ or $v0, $s5, $a2 -/* 16E024 8023F744 3C15E100 */ lui $s5, 0xe100 -/* 16E028 8023F748 AC620034 */ sw $v0, 0x34($v1) -/* 16E02C 8023F74C AC750038 */ sw $s5, 0x38($v1) -/* 16E030 8023F750 8FB50038 */ lw $s5, 0x38($sp) -/* 16E034 8023F754 01ED7821 */ addu $t7, $t7, $t5 -/* 16E038 8023F758 AC75003C */ sw $s5, 0x3c($v1) -/* 16E03C 8023F75C AC7E0040 */ sw $fp, 0x40($v1) -/* 16E040 8023F760 AC730044 */ sw $s3, 0x44($v1) -/* 16E044 8023F764 8FB5003C */ lw $s5, 0x3c($sp) -/* 16E048 8023F768 26520001 */ addiu $s2, $s2, 1 -/* 16E04C 8023F76C 02A52825 */ or $a1, $s5, $a1 -/* 16E050 8023F770 AC650048 */ sw $a1, 0x48($v1) -/* 16E054 8023F774 8FB50040 */ lw $s5, 0x40($sp) -/* 16E058 8023F778 24620058 */ addiu $v0, $v1, 0x58 -/* 16E05C 8023F77C 02A63025 */ or $a2, $s5, $a2 -/* 16E060 8023F780 3C15E100 */ lui $s5, 0xe100 -/* 16E064 8023F784 AC66004C */ sw $a2, 0x4c($v1) -/* 16E068 8023F788 AD420000 */ sw $v0, ($t2) -/* 16E06C 8023F78C 24620060 */ addiu $v0, $v1, 0x60 -/* 16E070 8023F790 AC750050 */ sw $s5, 0x50($v1) -/* 16E074 8023F794 AC600054 */ sw $zero, 0x54($v1) -/* 16E078 8023F798 AD420000 */ sw $v0, ($t2) -/* 16E07C 8023F79C 0256102A */ slt $v0, $s2, $s6 -/* 16E080 8023F7A0 AC7E0058 */ sw $fp, 0x58($v1) -/* 16E084 8023F7A4 1440FF95 */ bnez $v0, .L8023F5FC -/* 16E088 8023F7A8 AC73005C */ sw $s3, 0x5c($v1) -.L8023F7AC: -/* 16E08C 8023F7AC 8FB5002C */ lw $s5, 0x2c($sp) -/* 16E090 8023F7B0 12A00086 */ beqz $s5, .L8023F9CC -/* 16E094 8023F7B4 01B20018 */ mult $t5, $s2 -/* 16E098 8023F7B8 3C0C8007 */ lui $t4, %hi(gGameStatusPtr) -/* 16E09C 8023F7BC 8D8C419C */ lw $t4, %lo(gGameStatusPtr)($t4) -/* 16E0A0 8023F7C0 3C028028 */ lui $v0, %hi(D_802809FA) -/* 16E0A4 8023F7C4 944209FA */ lhu $v0, %lo(D_802809FA)($v0) -/* 16E0A8 8023F7C8 85830150 */ lh $v1, 0x150($t4) -/* 16E0AC 8023F7CC 00006812 */ mflo $t5 -/* 16E0B0 8023F7D0 004D2021 */ addu $a0, $v0, $t5 -/* 16E0B4 8023F7D4 00041400 */ sll $v0, $a0, 0x10 -/* 16E0B8 8023F7D8 00021403 */ sra $v0, $v0, 0x10 -/* 16E0BC 8023F7DC 0062182A */ slt $v1, $v1, $v0 -/* 16E0C0 8023F7E0 95820150 */ lhu $v0, 0x150($t4) -/* 16E0C4 8023F7E4 10600002 */ beqz $v1, .L8023F7F0 -/* 16E0C8 8023F7E8 0080582D */ daddu $t3, $a0, $zero -/* 16E0CC 8023F7EC 00825823 */ subu $t3, $a0, $v0 -.L8023F7F0: -/* 16E0D0 8023F7F0 3C08F548 */ lui $t0, 0xf548 -/* 16E0D4 8023F7F4 35084A00 */ ori $t0, $t0, 0x4a00 -/* 16E0D8 8023F7F8 3C050749 */ lui $a1, 0x749 -/* 16E0DC 8023F7FC 34A5C000 */ ori $a1, $a1, 0xc000 -/* 16E0E0 8023F800 3C090049 */ lui $t1, 0x49 -/* 16E0E4 8023F804 3529C000 */ ori $t1, $t1, 0xc000 -/* 16E0E8 8023F808 3C0A1000 */ lui $t2, 0x1000 -/* 16E0EC 8023F80C 3C07800A */ lui $a3, %hi(gMasterGfxPos) -/* 16E0F0 8023F810 24E7A66C */ addiu $a3, $a3, %lo(gMasterGfxPos) -/* 16E0F4 8023F814 354A0400 */ ori $t2, $t2, 0x400 -/* 16E0F8 8023F818 25C2FFFF */ addiu $v0, $t6, -1 -/* 16E0FC 8023F81C 30420FFF */ andi $v0, $v0, 0xfff -/* 16E100 8023F820 3C03FD48 */ lui $v1, 0xfd48 -/* 16E104 8023F824 8CE40000 */ lw $a0, ($a3) -/* 16E108 8023F828 00431025 */ or $v0, $v0, $v1 -/* 16E10C 8023F82C 0080302D */ daddu $a2, $a0, $zero -/* 16E110 8023F830 24840008 */ addiu $a0, $a0, 8 -/* 16E114 8023F834 ACE40000 */ sw $a0, ($a3) -/* 16E118 8023F838 ACC20000 */ sw $v0, ($a2) -/* 16E11C 8023F83C 24820008 */ addiu $v0, $a0, 8 -/* 16E120 8023F840 ACE20000 */ sw $v0, ($a3) -/* 16E124 8023F844 24820010 */ addiu $v0, $a0, 0x10 -/* 16E128 8023F848 ACE20000 */ sw $v0, ($a3) -/* 16E12C 8023F84C 24820018 */ addiu $v0, $a0, 0x18 -/* 16E130 8023F850 ACE20000 */ sw $v0, ($a3) -/* 16E134 8023F854 24820020 */ addiu $v0, $a0, 0x20 -/* 16E138 8023F858 ACE20000 */ sw $v0, ($a3) -/* 16E13C 8023F85C 24820028 */ addiu $v0, $a0, 0x28 -/* 16E140 8023F860 ACE20000 */ sw $v0, ($a3) -/* 16E144 8023F864 24820030 */ addiu $v0, $a0, 0x30 -/* 16E148 8023F868 ACE20000 */ sw $v0, ($a3) -/* 16E14C 8023F86C 24820038 */ addiu $v0, $a0, 0x38 -/* 16E150 8023F870 ACE20000 */ sw $v0, ($a3) -/* 16E154 8023F874 24820040 */ addiu $v0, $a0, 0x40 -/* 16E158 8023F878 ACE20000 */ sw $v0, ($a3) -/* 16E15C 8023F87C 000B1400 */ sll $v0, $t3, 0x10 -/* 16E160 8023F880 00021403 */ sra $v0, $v0, 0x10 -/* 16E164 8023F884 24830048 */ addiu $v1, $a0, 0x48 -/* 16E168 8023F888 01C20018 */ mult $t6, $v0 -/* 16E16C 8023F88C ACE30000 */ sw $v1, ($a3) -/* 16E170 8023F890 8D820154 */ lw $v0, 0x154($t4) -/* 16E174 8023F894 24830050 */ addiu $v1, $a0, 0x50 -/* 16E178 8023F898 ACE30000 */ sw $v1, ($a3) -/* 16E17C 8023F89C 0000A812 */ mflo $s5 -/* 16E180 8023F8A0 00551021 */ addu $v0, $v0, $s5 -/* 16E184 8023F8A4 ACC20004 */ sw $v0, 4($a2) -/* 16E188 8023F8A8 3C020700 */ lui $v0, 0x700 -/* 16E18C 8023F8AC AC820004 */ sw $v0, 4($a0) -/* 16E190 8023F8B0 3C02E600 */ lui $v0, 0xe600 -/* 16E194 8023F8B4 AC820008 */ sw $v0, 8($a0) -/* 16E198 8023F8B8 3C02F400 */ lui $v0, 0xf400 -/* 16E19C 8023F8BC AC880000 */ sw $t0, ($a0) -/* 16E1A0 8023F8C0 AC80000C */ sw $zero, 0xc($a0) -/* 16E1A4 8023F8C4 AC820010 */ sw $v0, 0x10($a0) -/* 16E1A8 8023F8C8 8FB5002C */ lw $s5, 0x2c($sp) -/* 16E1AC 8023F8CC 3C03E700 */ lui $v1, 0xe700 -/* 16E1B0 8023F8D0 26A2FFFF */ addiu $v0, $s5, -1 -/* 16E1B4 8023F8D4 00021080 */ sll $v0, $v0, 2 -/* 16E1B8 8023F8D8 30420FFF */ andi $v0, $v0, 0xfff -/* 16E1BC 8023F8DC 00452825 */ or $a1, $v0, $a1 -/* 16E1C0 8023F8E0 AC830018 */ sw $v1, 0x18($a0) -/* 16E1C4 8023F8E4 3C03F200 */ lui $v1, 0xf200 -/* 16E1C8 8023F8E8 00491025 */ or $v0, $v0, $t1 -/* 16E1CC 8023F8EC AC850014 */ sw $a1, 0x14($a0) -/* 16E1D0 8023F8F0 2725FFFF */ addiu $a1, $t9, -1 -/* 16E1D4 8023F8F4 AC830028 */ sw $v1, 0x28($a0) -/* 16E1D8 8023F8F8 3C03E400 */ lui $v1, 0xe400 -/* 16E1DC 8023F8FC AC880020 */ sw $t0, 0x20($a0) -/* 16E1E0 8023F900 3C08E100 */ lui $t0, 0xe100 -/* 16E1E4 8023F904 AC80001C */ sw $zero, 0x1c($a0) -/* 16E1E8 8023F908 AC800024 */ sw $zero, 0x24($a0) -/* 16E1EC 8023F90C AC82002C */ sw $v0, 0x2c($a0) -/* 16E1F0 8023F910 8FB50028 */ lw $s5, 0x28($sp) -/* 16E1F4 8023F914 3C09F100 */ lui $t1, 0xf100 -/* 16E1F8 8023F918 02B83021 */ addu $a2, $s5, $t8 -/* 16E1FC 8023F91C 24C2FFFF */ addiu $v0, $a2, -1 -/* 16E200 8023F920 00021080 */ sll $v0, $v0, 2 -/* 16E204 8023F924 30420FFF */ andi $v0, $v0, 0xfff -/* 16E208 8023F928 00021300 */ sll $v0, $v0, 0xc -/* 16E20C 8023F92C 00063080 */ sll $a2, $a2, 2 -/* 16E210 8023F930 30C60FFF */ andi $a2, $a2, 0xfff -/* 16E214 8023F934 8FB50024 */ lw $s5, 0x24($sp) -/* 16E218 8023F938 00063300 */ sll $a2, $a2, 0xc -/* 16E21C 8023F93C 02A52821 */ addu $a1, $s5, $a1 -/* 16E220 8023F940 00052880 */ sll $a1, $a1, 2 -/* 16E224 8023F944 30A50FFF */ andi $a1, $a1, 0xfff -/* 16E228 8023F948 00A32825 */ or $a1, $a1, $v1 -/* 16E22C 8023F94C 00451025 */ or $v0, $v0, $a1 -/* 16E230 8023F950 AC820030 */ sw $v0, 0x30($a0) -/* 16E234 8023F954 00181080 */ sll $v0, $t8, 2 -/* 16E238 8023F958 30420FFF */ andi $v0, $v0, 0xfff -/* 16E23C 8023F95C 00021300 */ sll $v0, $v0, 0xc -/* 16E240 8023F960 01B91821 */ addu $v1, $t5, $t9 -/* 16E244 8023F964 00031880 */ sll $v1, $v1, 2 -/* 16E248 8023F968 30630FFF */ andi $v1, $v1, 0xfff -/* 16E24C 8023F96C 00431025 */ or $v0, $v0, $v1 -/* 16E250 8023F970 AC820034 */ sw $v0, 0x34($a0) -/* 16E254 8023F974 000E1540 */ sll $v0, $t6, 0x15 -/* 16E258 8023F978 AC82003C */ sw $v0, 0x3c($a0) -/* 16E25C 8023F97C 01D81021 */ addu $v0, $t6, $t8 -/* 16E260 8023F980 2442FFFF */ addiu $v0, $v0, -1 -/* 16E264 8023F984 00021080 */ sll $v0, $v0, 2 -/* 16E268 8023F988 30420FFF */ andi $v0, $v0, 0xfff -/* 16E26C 8023F98C 00021300 */ sll $v0, $v0, 0xc -/* 16E270 8023F990 00451025 */ or $v0, $v0, $a1 -/* 16E274 8023F994 00C33025 */ or $a2, $a2, $v1 -/* 16E278 8023F998 AC880038 */ sw $t0, 0x38($a0) -/* 16E27C 8023F99C AC890040 */ sw $t1, 0x40($a0) -/* 16E280 8023F9A0 AC8A0044 */ sw $t2, 0x44($a0) -/* 16E284 8023F9A4 AC820048 */ sw $v0, 0x48($a0) -/* 16E288 8023F9A8 24820058 */ addiu $v0, $a0, 0x58 -/* 16E28C 8023F9AC AC86004C */ sw $a2, 0x4c($a0) -/* 16E290 8023F9B0 ACE20000 */ sw $v0, ($a3) -/* 16E294 8023F9B4 24820060 */ addiu $v0, $a0, 0x60 -/* 16E298 8023F9B8 AC880050 */ sw $t0, 0x50($a0) -/* 16E29C 8023F9BC AC800054 */ sw $zero, 0x54($a0) -/* 16E2A0 8023F9C0 ACE20000 */ sw $v0, ($a3) -/* 16E2A4 8023F9C4 AC890058 */ sw $t1, 0x58($a0) -/* 16E2A8 8023F9C8 AC8A005C */ sw $t2, 0x5c($a0) -.L8023F9CC: -/* 16E2AC 8023F9CC 3C02DC08 */ lui $v0, 0xdc08 -/* 16E2B0 8023F9D0 34420008 */ ori $v0, $v0, 8 -/* 16E2B4 8023F9D4 3C04D9C0 */ lui $a0, 0xd9c0 -/* 16E2B8 8023F9D8 3484F9FB */ ori $a0, $a0, 0xf9fb -/* 16E2BC 8023F9DC 3C15E300 */ lui $s5, 0xe300 -/* 16E2C0 8023F9E0 36B50A01 */ ori $s5, $s5, 0xa01 -/* 16E2C4 8023F9E4 3C05E300 */ lui $a1, 0xe300 -/* 16E2C8 8023F9E8 34A50800 */ ori $a1, $a1, 0x800 -/* 16E2CC 8023F9EC 3C07E300 */ lui $a3, 0xe300 -/* 16E2D0 8023F9F0 34E70F00 */ ori $a3, $a3, 0xf00 -/* 16E2D4 8023F9F4 3C08E300 */ lui $t0, 0xe300 -/* 16E2D8 8023F9F8 35081001 */ ori $t0, $t0, 0x1001 -/* 16E2DC 8023F9FC 3C09E300 */ lui $t1, 0xe300 -/* 16E2E0 8023FA00 35290D01 */ ori $t1, $t1, 0xd01 -/* 16E2E4 8023FA04 3C0AE300 */ lui $t2, 0xe300 -/* 16E2E8 8023FA08 354A0C00 */ ori $t2, $t2, 0xc00 -/* 16E2EC 8023FA0C 3C0BE300 */ lui $t3, 0xe300 -/* 16E2F0 8023FA10 356B1201 */ ori $t3, $t3, 0x1201 -/* 16E2F4 8023FA14 3C0CE300 */ lui $t4, 0xe300 -/* 16E2F8 8023FA18 358C1402 */ ori $t4, $t4, 0x1402 -/* 16E2FC 8023FA1C 3C0EFCFF */ lui $t6, 0xfcff -/* 16E300 8023FA20 35CEFFFF */ ori $t6, $t6, 0xffff -/* 16E304 8023FA24 3C0DFFFE */ lui $t5, 0xfffe -/* 16E308 8023FA28 35AD793C */ ori $t5, $t5, 0x793c -/* 16E30C 8023FA2C 3C0FE300 */ lui $t7, 0xe300 -/* 16E310 8023FA30 35EF1700 */ ori $t7, $t7, 0x1700 -/* 16E314 8023FA34 3C11E200 */ lui $s1, 0xe200 -/* 16E318 8023FA38 36311E01 */ ori $s1, $s1, 0x1e01 -/* 16E31C 8023FA3C 3C12E200 */ lui $s2, 0xe200 -/* 16E320 8023FA40 3652001C */ ori $s2, $s2, 0x1c -/* 16E324 8023FA44 3C130F0A */ lui $s3, 0xf0a -/* 16E328 8023FA48 36734000 */ ori $s3, $s3, 0x4000 -/* 16E32C 8023FA4C 3C14E300 */ lui $s4, 0xe300 -/* 16E330 8023FA50 36941801 */ ori $s4, $s4, 0x1801 -/* 16E334 8023FA54 AFB50044 */ sw $s5, 0x44($sp) -/* 16E338 8023FA58 3C15DB04 */ lui $s5, 0xdb04 -/* 16E33C 8023FA5C 36B50004 */ ori $s5, $s5, 4 -/* 16E340 8023FA60 AFB50050 */ sw $s5, 0x50($sp) -/* 16E344 8023FA64 3C15DB04 */ lui $s5, 0xdb04 -/* 16E348 8023FA68 36B5000C */ ori $s5, $s5, 0xc -/* 16E34C 8023FA6C 3C18DB04 */ lui $t8, 0xdb04 -/* 16E350 8023FA70 37180014 */ ori $t8, $t8, 0x14 -/* 16E354 8023FA74 3C19DB04 */ lui $t9, 0xdb04 -/* 16E358 8023FA78 3739001C */ ori $t9, $t9, 0x1c -/* 16E35C 8023FA7C 3C1E800A */ lui $fp, %hi(gMasterGfxPos) -/* 16E360 8023FA80 27DEA66C */ addiu $fp, $fp, %lo(gMasterGfxPos) -/* 16E364 8023FA84 3C16FF10 */ lui $s6, 0xff10 -/* 16E368 8023FA88 36D6013F */ ori $s6, $s6, 0x13f -/* 16E36C 8023FA8C AFB50048 */ sw $s5, 0x48($sp) -/* 16E370 8023FA90 8FD00000 */ lw $s0, ($fp) -/* 16E374 8023FA94 3C014080 */ lui $at, 0x4080 -/* 16E378 8023FA98 44812000 */ mtc1 $at, $f4 -/* 16E37C 8023FA9C 0200182D */ daddu $v1, $s0, $zero -/* 16E380 8023FAA0 26100008 */ addiu $s0, $s0, 8 -/* 16E384 8023FAA4 AFD00000 */ sw $s0, ($fp) -/* 16E388 8023FAA8 AC620000 */ sw $v0, ($v1) -/* 16E38C 8023FAAC 26E200A0 */ addiu $v0, $s7, 0xa0 -/* 16E390 8023FAB0 AC620004 */ sw $v0, 4($v1) -/* 16E394 8023FAB4 26020008 */ addiu $v0, $s0, 8 -/* 16E398 8023FAB8 AFC20000 */ sw $v0, ($fp) -/* 16E39C 8023FABC 26020010 */ addiu $v0, $s0, 0x10 -/* 16E3A0 8023FAC0 AE040000 */ sw $a0, ($s0) -/* 16E3A4 8023FAC4 AE000004 */ sw $zero, 4($s0) -/* 16E3A8 8023FAC8 AFC20000 */ sw $v0, ($fp) -/* 16E3AC 8023FACC 3C02D700 */ lui $v0, 0xd700 -/* 16E3B0 8023FAD0 AE020008 */ sw $v0, 8($s0) -/* 16E3B4 8023FAD4 26020018 */ addiu $v0, $s0, 0x18 -/* 16E3B8 8023FAD8 AE00000C */ sw $zero, 0xc($s0) -/* 16E3BC 8023FADC AFC20000 */ sw $v0, ($fp) -/* 16E3C0 8023FAE0 26020020 */ addiu $v0, $s0, 0x20 -/* 16E3C4 8023FAE4 8FB50044 */ lw $s5, 0x44($sp) -/* 16E3C8 8023FAE8 3C04ED00 */ lui $a0, 0xed00 -/* 16E3CC 8023FAEC AE000014 */ sw $zero, 0x14($s0) -/* 16E3D0 8023FAF0 AE150010 */ sw $s5, 0x10($s0) -/* 16E3D4 8023FAF4 AFC20000 */ sw $v0, ($fp) -/* 16E3D8 8023FAF8 26020028 */ addiu $v0, $s0, 0x28 -/* 16E3DC 8023FAFC AE050018 */ sw $a1, 0x18($s0) -/* 16E3E0 8023FB00 AE00001C */ sw $zero, 0x1c($s0) -/* 16E3E4 8023FB04 AFC20000 */ sw $v0, ($fp) -/* 16E3E8 8023FB08 86E2000E */ lh $v0, 0xe($s7) -/* 16E3EC 8023FB0C 86E30010 */ lh $v1, 0x10($s7) -/* 16E3F0 8023FB10 44821000 */ mtc1 $v0, $f2 -/* 16E3F4 8023FB14 00000000 */ nop -/* 16E3F8 8023FB18 468010A0 */ cvt.s.w $f2, $f2 -/* 16E3FC 8023FB1C 46041082 */ mul.s $f2, $f2, $f4 -/* 16E400 8023FB20 00000000 */ nop -/* 16E404 8023FB24 26020030 */ addiu $v0, $s0, 0x30 -/* 16E408 8023FB28 44830000 */ mtc1 $v1, $f0 -/* 16E40C 8023FB2C 00000000 */ nop -/* 16E410 8023FB30 46800020 */ cvt.s.w $f0, $f0 -/* 16E414 8023FB34 AFC20000 */ sw $v0, ($fp) -/* 16E418 8023FB38 26020038 */ addiu $v0, $s0, 0x38 -/* 16E41C 8023FB3C 46040002 */ mul.s $f0, $f0, $f4 -/* 16E420 8023FB40 00000000 */ nop -/* 16E424 8023FB44 AFC20000 */ sw $v0, ($fp) -/* 16E428 8023FB48 4600118D */ trunc.w.s $f6, $f2 -/* 16E42C 8023FB4C 44023000 */ mfc1 $v0, $f6 -/* 16E430 8023FB50 00000000 */ nop -/* 16E434 8023FB54 30420FFF */ andi $v0, $v0, 0xfff -/* 16E438 8023FB58 00021300 */ sll $v0, $v0, 0xc -/* 16E43C 8023FB5C 4600018D */ trunc.w.s $f6, $f0 -/* 16E440 8023FB60 44033000 */ mfc1 $v1, $f6 -/* 16E444 8023FB64 00000000 */ nop -/* 16E448 8023FB68 30630FFF */ andi $v1, $v1, 0xfff -/* 16E44C 8023FB6C 00641825 */ or $v1, $v1, $a0 -/* 16E450 8023FB70 00431025 */ or $v0, $v0, $v1 -/* 16E454 8023FB74 AE020020 */ sw $v0, 0x20($s0) -/* 16E458 8023FB78 86E3000E */ lh $v1, 0xe($s7) -/* 16E45C 8023FB7C 86E5000A */ lh $a1, 0xa($s7) -/* 16E460 8023FB80 86E40010 */ lh $a0, 0x10($s7) -/* 16E464 8023FB84 86E6000C */ lh $a2, 0xc($s7) -/* 16E468 8023FB88 26020040 */ addiu $v0, $s0, 0x40 -/* 16E46C 8023FB8C AFC20000 */ sw $v0, ($fp) -/* 16E470 8023FB90 AE070028 */ sw $a3, 0x28($s0) -/* 16E474 8023FB94 AE00002C */ sw $zero, 0x2c($s0) -/* 16E478 8023FB98 00651821 */ addu $v1, $v1, $a1 -/* 16E47C 8023FB9C 44831000 */ mtc1 $v1, $f2 -/* 16E480 8023FBA0 00000000 */ nop -/* 16E484 8023FBA4 468010A0 */ cvt.s.w $f2, $f2 -/* 16E488 8023FBA8 46041082 */ mul.s $f2, $f2, $f4 -/* 16E48C 8023FBAC 00000000 */ nop -/* 16E490 8023FBB0 AE080030 */ sw $t0, 0x30($s0) -/* 16E494 8023FBB4 AE000034 */ sw $zero, 0x34($s0) -/* 16E498 8023FBB8 00862021 */ addu $a0, $a0, $a2 -/* 16E49C 8023FBBC 44840000 */ mtc1 $a0, $f0 -/* 16E4A0 8023FBC0 00000000 */ nop -/* 16E4A4 8023FBC4 46800020 */ cvt.s.w $f0, $f0 -/* 16E4A8 8023FBC8 46040002 */ mul.s $f0, $f0, $f4 -/* 16E4AC 8023FBCC 00000000 */ nop -/* 16E4B0 8023FBD0 AE090038 */ sw $t1, 0x38($s0) -/* 16E4B4 8023FBD4 4600118D */ trunc.w.s $f6, $f2 -/* 16E4B8 8023FBD8 44023000 */ mfc1 $v0, $f6 -/* 16E4BC 8023FBDC 00000000 */ nop -/* 16E4C0 8023FBE0 30420FFF */ andi $v0, $v0, 0xfff -/* 16E4C4 8023FBE4 00021300 */ sll $v0, $v0, 0xc -/* 16E4C8 8023FBE8 4600018D */ trunc.w.s $f6, $f0 -/* 16E4CC 8023FBEC 44033000 */ mfc1 $v1, $f6 -/* 16E4D0 8023FBF0 00000000 */ nop -/* 16E4D4 8023FBF4 30630FFF */ andi $v1, $v1, 0xfff -/* 16E4D8 8023FBF8 00431025 */ or $v0, $v0, $v1 -/* 16E4DC 8023FBFC AE020024 */ sw $v0, 0x24($s0) -/* 16E4E0 8023FC00 26020048 */ addiu $v0, $s0, 0x48 -/* 16E4E4 8023FC04 AE00003C */ sw $zero, 0x3c($s0) -/* 16E4E8 8023FC08 AFC20000 */ sw $v0, ($fp) -/* 16E4EC 8023FC0C 3C020008 */ lui $v0, 8 -/* 16E4F0 8023FC10 AE020044 */ sw $v0, 0x44($s0) -/* 16E4F4 8023FC14 26020050 */ addiu $v0, $s0, 0x50 -/* 16E4F8 8023FC18 AE0A0040 */ sw $t2, 0x40($s0) -/* 16E4FC 8023FC1C AFC20000 */ sw $v0, ($fp) -/* 16E500 8023FC20 24022000 */ addiu $v0, $zero, 0x2000 -/* 16E504 8023FC24 AE02004C */ sw $v0, 0x4c($s0) -/* 16E508 8023FC28 26020058 */ addiu $v0, $s0, 0x58 -/* 16E50C 8023FC2C AE0B0048 */ sw $t3, 0x48($s0) -/* 16E510 8023FC30 AFC20000 */ sw $v0, ($fp) -/* 16E514 8023FC34 24020C00 */ addiu $v0, $zero, 0xc00 -/* 16E518 8023FC38 AE020054 */ sw $v0, 0x54($s0) -/* 16E51C 8023FC3C 26020060 */ addiu $v0, $s0, 0x60 -/* 16E520 8023FC40 AE0C0050 */ sw $t4, 0x50($s0) -/* 16E524 8023FC44 AFC20000 */ sw $v0, ($fp) -/* 16E528 8023FC48 26020068 */ addiu $v0, $s0, 0x68 -/* 16E52C 8023FC4C AE0E0058 */ sw $t6, 0x58($s0) -/* 16E530 8023FC50 AE0D005C */ sw $t5, 0x5c($s0) -/* 16E534 8023FC54 AFC20000 */ sw $v0, ($fp) -/* 16E538 8023FC58 26020070 */ addiu $v0, $s0, 0x70 -/* 16E53C 8023FC5C AE0F0060 */ sw $t7, 0x60($s0) -/* 16E540 8023FC60 AE000064 */ sw $zero, 0x64($s0) -/* 16E544 8023FC64 AFC20000 */ sw $v0, ($fp) -/* 16E548 8023FC68 26020078 */ addiu $v0, $s0, 0x78 -/* 16E54C 8023FC6C AE110068 */ sw $s1, 0x68($s0) -/* 16E550 8023FC70 AE00006C */ sw $zero, 0x6c($s0) -/* 16E554 8023FC74 AFC20000 */ sw $v0, ($fp) -/* 16E558 8023FC78 26020080 */ addiu $v0, $s0, 0x80 -/* 16E55C 8023FC7C AE120070 */ sw $s2, 0x70($s0) -/* 16E560 8023FC80 AE130074 */ sw $s3, 0x74($s0) -/* 16E564 8023FC84 AFC20000 */ sw $v0, ($fp) -/* 16E568 8023FC88 240200C0 */ addiu $v0, $zero, 0xc0 -/* 16E56C 8023FC8C AE02007C */ sw $v0, 0x7c($s0) -/* 16E570 8023FC90 26020088 */ addiu $v0, $s0, 0x88 -/* 16E574 8023FC94 24030002 */ addiu $v1, $zero, 2 -/* 16E578 8023FC98 AE140078 */ sw $s4, 0x78($s0) -/* 16E57C 8023FC9C AFC20000 */ sw $v0, ($fp) -/* 16E580 8023FCA0 26020090 */ addiu $v0, $s0, 0x90 -/* 16E584 8023FCA4 3C12E700 */ lui $s2, 0xe700 -/* 16E588 8023FCA8 8FB50050 */ lw $s5, 0x50($sp) -/* 16E58C 8023FCAC 3C130030 */ lui $s3, 0x30 -/* 16E590 8023FCB0 AE150080 */ sw $s5, 0x80($s0) -/* 16E594 8023FCB4 AE030084 */ sw $v1, 0x84($s0) -/* 16E598 8023FCB8 AFC20000 */ sw $v0, ($fp) -/* 16E59C 8023FCBC 8FB50048 */ lw $s5, 0x48($sp) -/* 16E5A0 8023FCC0 26020098 */ addiu $v0, $s0, 0x98 -/* 16E5A4 8023FCC4 AE150088 */ sw $s5, 0x88($s0) -/* 16E5A8 8023FCC8 AE03008C */ sw $v1, 0x8c($s0) -/* 16E5AC 8023FCCC 3403FFFE */ ori $v1, $zero, 0xfffe -/* 16E5B0 8023FCD0 AFC20000 */ sw $v0, ($fp) -/* 16E5B4 8023FCD4 260200A0 */ addiu $v0, $s0, 0xa0 -/* 16E5B8 8023FCD8 AE180090 */ sw $t8, 0x90($s0) -/* 16E5BC 8023FCDC AE030094 */ sw $v1, 0x94($s0) -/* 16E5C0 8023FCE0 AFC20000 */ sw $v0, ($fp) -/* 16E5C4 8023FCE4 3C04800A */ lui $a0, %hi(nuGfxZBuffer) -/* 16E5C8 8023FCE8 8C84A5DC */ lw $a0, %lo(nuGfxZBuffer)($a0) -/* 16E5CC 8023FCEC 260200A8 */ addiu $v0, $s0, 0xa8 -/* 16E5D0 8023FCF0 AE190098 */ sw $t9, 0x98($s0) -/* 16E5D4 8023FCF4 AE03009C */ sw $v1, 0x9c($s0) -/* 16E5D8 8023FCF8 AFC20000 */ sw $v0, ($fp) -/* 16E5DC 8023FCFC 260200B0 */ addiu $v0, $s0, 0xb0 -/* 16E5E0 8023FD00 AE1200A0 */ sw $s2, 0xa0($s0) -/* 16E5E4 8023FD04 AE0000A4 */ sw $zero, 0xa4($s0) -/* 16E5E8 8023FD08 AFC20000 */ sw $v0, ($fp) -/* 16E5EC 8023FD0C 8FB50044 */ lw $s5, 0x44($sp) -/* 16E5F0 8023FD10 260200B8 */ addiu $v0, $s0, 0xb8 -/* 16E5F4 8023FD14 AE1300AC */ sw $s3, 0xac($s0) -/* 16E5F8 8023FD18 AE1500A8 */ sw $s5, 0xa8($s0) -/* 16E5FC 8023FD1C AFC20000 */ sw $v0, ($fp) -/* 16E600 8023FD20 0C0187A4 */ jal osVirtualToPhysical -/* 16E604 8023FD24 AE1600B0 */ sw $s6, 0xb0($s0) -/* 16E608 8023FD28 3C03FFFC */ lui $v1, 0xfffc -/* 16E60C 8023FD2C 8FD10000 */ lw $s1, ($fp) -/* 16E610 8023FD30 3463FFFC */ ori $v1, $v1, 0xfffc -/* 16E614 8023FD34 AE0200B4 */ sw $v0, 0xb4($s0) -/* 16E618 8023FD38 3C10F700 */ lui $s0, 0xf700 -/* 16E61C 8023FD3C 3C14F600 */ lui $s4, 0xf600 -/* 16E620 8023FD40 3C04800A */ lui $a0, %hi(nuGfxCfb_ptr) -/* 16E624 8023FD44 8C84A64C */ lw $a0, %lo(nuGfxCfb_ptr)($a0) -/* 16E628 8023FD48 0220102D */ daddu $v0, $s1, $zero -/* 16E62C 8023FD4C 26310008 */ addiu $s1, $s1, 8 -/* 16E630 8023FD50 AFD10000 */ sw $s1, ($fp) -/* 16E634 8023FD54 AC500000 */ sw $s0, ($v0) -/* 16E638 8023FD58 AC430004 */ sw $v1, 4($v0) -/* 16E63C 8023FD5C 26220008 */ addiu $v0, $s1, 8 -/* 16E640 8023FD60 AFC20000 */ sw $v0, ($fp) -/* 16E644 8023FD64 86E3000E */ lh $v1, 0xe($s7) -/* 16E648 8023FD68 86E5000A */ lh $a1, 0xa($s7) -/* 16E64C 8023FD6C 26220010 */ addiu $v0, $s1, 0x10 -/* 16E650 8023FD70 AFC20000 */ sw $v0, ($fp) -/* 16E654 8023FD74 86E20010 */ lh $v0, 0x10($s7) -/* 16E658 8023FD78 00651821 */ addu $v1, $v1, $a1 -/* 16E65C 8023FD7C 2463FFFF */ addiu $v1, $v1, -1 -/* 16E660 8023FD80 306303FF */ andi $v1, $v1, 0x3ff -/* 16E664 8023FD84 86E5000C */ lh $a1, 0xc($s7) -/* 16E668 8023FD88 00031B80 */ sll $v1, $v1, 0xe -/* 16E66C 8023FD8C 00451021 */ addu $v0, $v0, $a1 -/* 16E670 8023FD90 2442FFFF */ addiu $v0, $v0, -1 -/* 16E674 8023FD94 304203FF */ andi $v0, $v0, 0x3ff -/* 16E678 8023FD98 00021080 */ sll $v0, $v0, 2 -/* 16E67C 8023FD9C 00541025 */ or $v0, $v0, $s4 -/* 16E680 8023FDA0 00621825 */ or $v1, $v1, $v0 -/* 16E684 8023FDA4 AE230000 */ sw $v1, ($s1) -/* 16E688 8023FDA8 96E2000E */ lhu $v0, 0xe($s7) -/* 16E68C 8023FDAC 96E50010 */ lhu $a1, 0x10($s7) -/* 16E690 8023FDB0 26230018 */ addiu $v1, $s1, 0x18 -/* 16E694 8023FDB4 AFC30000 */ sw $v1, ($fp) -/* 16E698 8023FDB8 AE320008 */ sw $s2, 8($s1) -/* 16E69C 8023FDBC AE20000C */ sw $zero, 0xc($s1) -/* 16E6A0 8023FDC0 AE360010 */ sw $s6, 0x10($s1) -/* 16E6A4 8023FDC4 304203FF */ andi $v0, $v0, 0x3ff -/* 16E6A8 8023FDC8 00021380 */ sll $v0, $v0, 0xe -/* 16E6AC 8023FDCC 30A503FF */ andi $a1, $a1, 0x3ff -/* 16E6B0 8023FDD0 00052880 */ sll $a1, $a1, 2 -/* 16E6B4 8023FDD4 00451025 */ or $v0, $v0, $a1 -/* 16E6B8 8023FDD8 0C0187A4 */ jal osVirtualToPhysical -/* 16E6BC 8023FDDC AE220004 */ sw $v0, 4($s1) -/* 16E6C0 8023FDE0 3C038007 */ lui $v1, %hi(gGameStatusPtr) -/* 16E6C4 8023FDE4 8C63419C */ lw $v1, %lo(gGameStatusPtr)($v1) -/* 16E6C8 8023FDE8 AE220014 */ sw $v0, 0x14($s1) -/* 16E6CC 8023FDEC 94620148 */ lhu $v0, 0x148($v1) -/* 16E6D0 8023FDF0 30420001 */ andi $v0, $v0, 1 -/* 16E6D4 8023FDF4 14400034 */ bnez $v0, .L8023FEC8 -/* 16E6D8 8023FDF8 26E400D4 */ addiu $a0, $s7, 0xd4 -/* 16E6DC 8023FDFC 8FC50000 */ lw $a1, ($fp) -/* 16E6E0 8023FE00 00A0102D */ daddu $v0, $a1, $zero -/* 16E6E4 8023FE04 24A50008 */ addiu $a1, $a1, 8 -/* 16E6E8 8023FE08 AC550000 */ sw $s5, ($v0) -/* 16E6EC 8023FE0C AC530004 */ sw $s3, 4($v0) -/* 16E6F0 8023FE10 ACB00000 */ sw $s0, ($a1) -/* 16E6F4 8023FE14 86E4002C */ lh $a0, 0x2c($s7) -/* 16E6F8 8023FE18 AFC50000 */ sw $a1, ($fp) -/* 16E6FC 8023FE1C 86E3002E */ lh $v1, 0x2e($s7) -/* 16E700 8023FE20 96E20030 */ lhu $v0, 0x30($s7) -/* 16E704 8023FE24 00042200 */ sll $a0, $a0, 8 -/* 16E708 8023FE28 3084F800 */ andi $a0, $a0, 0xf800 -/* 16E70C 8023FE2C 000318C0 */ sll $v1, $v1, 3 -/* 16E710 8023FE30 306307C0 */ andi $v1, $v1, 0x7c0 -/* 16E714 8023FE34 00832025 */ or $a0, $a0, $v1 -/* 16E718 8023FE38 00021082 */ srl $v0, $v0, 2 -/* 16E71C 8023FE3C 3042003E */ andi $v0, $v0, 0x3e -/* 16E720 8023FE40 00822025 */ or $a0, $a0, $v0 -/* 16E724 8023FE44 34820001 */ ori $v0, $a0, 1 -/* 16E728 8023FE48 00021400 */ sll $v0, $v0, 0x10 -/* 16E72C 8023FE4C 34420001 */ ori $v0, $v0, 1 -/* 16E730 8023FE50 00441025 */ or $v0, $v0, $a0 -/* 16E734 8023FE54 ACA20004 */ sw $v0, 4($a1) -/* 16E738 8023FE58 86E3000E */ lh $v1, 0xe($s7) -/* 16E73C 8023FE5C 86E4000A */ lh $a0, 0xa($s7) -/* 16E740 8023FE60 24A20008 */ addiu $v0, $a1, 8 -/* 16E744 8023FE64 AFC20000 */ sw $v0, ($fp) -/* 16E748 8023FE68 86E20010 */ lh $v0, 0x10($s7) -/* 16E74C 8023FE6C 00641821 */ addu $v1, $v1, $a0 -/* 16E750 8023FE70 2463FFFF */ addiu $v1, $v1, -1 -/* 16E754 8023FE74 306303FF */ andi $v1, $v1, 0x3ff -/* 16E758 8023FE78 86E4000C */ lh $a0, 0xc($s7) -/* 16E75C 8023FE7C 00031B80 */ sll $v1, $v1, 0xe -/* 16E760 8023FE80 00441021 */ addu $v0, $v0, $a0 -/* 16E764 8023FE84 2442FFFF */ addiu $v0, $v0, -1 -/* 16E768 8023FE88 304203FF */ andi $v0, $v0, 0x3ff -/* 16E76C 8023FE8C 00021080 */ sll $v0, $v0, 2 -/* 16E770 8023FE90 00541025 */ or $v0, $v0, $s4 -/* 16E774 8023FE94 00621825 */ or $v1, $v1, $v0 -/* 16E778 8023FE98 ACA30008 */ sw $v1, 8($a1) -/* 16E77C 8023FE9C 96E3000E */ lhu $v1, 0xe($s7) -/* 16E780 8023FEA0 24A20010 */ addiu $v0, $a1, 0x10 -/* 16E784 8023FEA4 AFC20000 */ sw $v0, ($fp) -/* 16E788 8023FEA8 96E20010 */ lhu $v0, 0x10($s7) -/* 16E78C 8023FEAC 306303FF */ andi $v1, $v1, 0x3ff -/* 16E790 8023FEB0 00031B80 */ sll $v1, $v1, 0xe -/* 16E794 8023FEB4 304203FF */ andi $v0, $v0, 0x3ff -/* 16E798 8023FEB8 00021080 */ sll $v0, $v0, 2 -/* 16E79C 8023FEBC 00621825 */ or $v1, $v1, $v0 -/* 16E7A0 8023FEC0 ACA3000C */ sw $v1, 0xc($a1) -/* 16E7A4 8023FEC4 26E400D4 */ addiu $a0, $s7, 0xd4 -.L8023FEC8: -/* 16E7A8 8023FEC8 3C10800A */ lui $s0, %hi(gCurrentCamID) -/* 16E7AC 8023FECC 2610A634 */ addiu $s0, $s0, %lo(gCurrentCamID) -/* 16E7B0 8023FED0 3C11800A */ lui $s1, %hi(gDisplayContext) -/* 16E7B4 8023FED4 2631A674 */ addiu $s1, $s1, %lo(gDisplayContext) -/* 16E7B8 8023FED8 8FC30000 */ lw $v1, ($fp) -/* 16E7BC 8023FEDC 86050000 */ lh $a1, ($s0) -/* 16E7C0 8023FEE0 8E220000 */ lw $v0, ($s1) -/* 16E7C4 8023FEE4 0060302D */ daddu $a2, $v1, $zero -/* 16E7C8 8023FEE8 24630008 */ addiu $v1, $v1, 8 -/* 16E7CC 8023FEEC 00052980 */ sll $a1, $a1, 6 -/* 16E7D0 8023FEF0 24A50030 */ addiu $a1, $a1, 0x30 -/* 16E7D4 8023FEF4 00452821 */ addu $a1, $v0, $a1 -/* 16E7D8 8023FEF8 3C02DB0E */ lui $v0, 0xdb0e -/* 16E7DC 8023FEFC AFC30000 */ sw $v1, ($fp) -/* 16E7E0 8023FF00 ACD20000 */ sw $s2, ($a2) -/* 16E7E4 8023FF04 ACC00004 */ sw $zero, 4($a2) -/* 16E7E8 8023FF08 AC620000 */ sw $v0, ($v1) -/* 16E7EC 8023FF0C 96E60038 */ lhu $a2, 0x38($s7) -/* 16E7F0 8023FF10 24620008 */ addiu $v0, $v1, 8 -/* 16E7F4 8023FF14 AFC20000 */ sw $v0, ($fp) -/* 16E7F8 8023FF18 0C019D40 */ jal guMtxF2L -/* 16E7FC 8023FF1C AC660004 */ sw $a2, 4($v1) -/* 16E800 8023FF20 3C05DA38 */ lui $a1, 0xda38 -/* 16E804 8023FF24 34A50007 */ ori $a1, $a1, 7 -/* 16E808 8023FF28 8FC20000 */ lw $v0, ($fp) -/* 16E80C 8023FF2C 86030000 */ lh $v1, ($s0) -/* 16E810 8023FF30 0040202D */ daddu $a0, $v0, $zero -/* 16E814 8023FF34 24420008 */ addiu $v0, $v0, 8 -/* 16E818 8023FF38 00031980 */ sll $v1, $v1, 6 -/* 16E81C 8023FF3C AFC20000 */ sw $v0, ($fp) -/* 16E820 8023FF40 AC850000 */ sw $a1, ($a0) -/* 16E824 8023FF44 8E220000 */ lw $v0, ($s1) -/* 16E828 8023FF48 24630030 */ addiu $v1, $v1, 0x30 -/* 16E82C 8023FF4C 00431021 */ addu $v0, $v0, $v1 -/* 16E830 8023FF50 AC820004 */ sw $v0, 4($a0) -/* 16E834 8023FF54 8FBF007C */ lw $ra, 0x7c($sp) -/* 16E838 8023FF58 8FBE0078 */ lw $fp, 0x78($sp) -/* 16E83C 8023FF5C 8FB70074 */ lw $s7, 0x74($sp) -/* 16E840 8023FF60 8FB60070 */ lw $s6, 0x70($sp) -/* 16E844 8023FF64 8FB5006C */ lw $s5, 0x6c($sp) -/* 16E848 8023FF68 8FB40068 */ lw $s4, 0x68($sp) -/* 16E84C 8023FF6C 8FB30064 */ lw $s3, 0x64($sp) -/* 16E850 8023FF70 8FB20060 */ lw $s2, 0x60($sp) -/* 16E854 8023FF74 8FB1005C */ lw $s1, 0x5c($sp) -/* 16E858 8023FF78 8FB00058 */ lw $s0, 0x58($sp) -/* 16E85C 8023FF7C 03E00008 */ jr $ra -/* 16E860 8023FF80 27BD0080 */ addiu $sp, $sp, 0x80 diff --git a/ver/us/asm/nonmatchings/dc470_len_14c0/appendGfx_background_texture.s b/ver/us/asm/nonmatchings/dc470_len_14c0/appendGfx_background_texture.s deleted file mode 100644 index 50ccd85a3b..0000000000 --- a/ver/us/asm/nonmatchings/dc470_len_14c0/appendGfx_background_texture.s +++ /dev/null @@ -1,1288 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -.section .rodata - -dlabel jtbl_80151220 -.word .L80146030_DC730, .L801461A0_DC8A0, .L80146044_DC744, .L8014607C_DC77C, .L801461A0_DC8A0, 0, 0, 0 - -.section .text - -glabel appendGfx_background_texture -/* DC5C0 80145EC0 27BDFF48 */ addiu $sp, $sp, -0xb8 -/* DC5C4 80145EC4 AFB00080 */ sw $s0, 0x80($sp) -/* DC5C8 80145EC8 0000802D */ daddu $s0, $zero, $zero -/* DC5CC 80145ECC 3C038007 */ lui $v1, %hi(gCurrentCameraID) -/* DC5D0 80145ED0 8C637410 */ lw $v1, %lo(gCurrentCameraID)($v1) -/* DC5D4 80145ED4 3C04800B */ lui $a0, %hi(gCameras) -/* DC5D8 80145ED8 24841D80 */ addiu $a0, $a0, %lo(gCameras) -/* DC5DC 80145EDC AFBF00A4 */ sw $ra, 0xa4($sp) -/* DC5E0 80145EE0 AFBE00A0 */ sw $fp, 0xa0($sp) -/* DC5E4 80145EE4 AFB7009C */ sw $s7, 0x9c($sp) -/* DC5E8 80145EE8 AFB60098 */ sw $s6, 0x98($sp) -/* DC5EC 80145EEC AFB50094 */ sw $s5, 0x94($sp) -/* DC5F0 80145EF0 AFB40090 */ sw $s4, 0x90($sp) -/* DC5F4 80145EF4 AFB3008C */ sw $s3, 0x8c($sp) -/* DC5F8 80145EF8 AFB20088 */ sw $s2, 0x88($sp) -/* DC5FC 80145EFC AFB10084 */ sw $s1, 0x84($sp) -/* DC600 80145F00 F7B600B0 */ sdc1 $f22, 0xb0($sp) -/* DC604 80145F04 F7B400A8 */ sdc1 $f20, 0xa8($sp) -/* DC608 80145F08 00031080 */ sll $v0, $v1, 2 -/* DC60C 80145F0C 00431021 */ addu $v0, $v0, $v1 -/* DC610 80145F10 00021080 */ sll $v0, $v0, 2 -/* DC614 80145F14 00431023 */ subu $v0, $v0, $v1 -/* DC618 80145F18 000218C0 */ sll $v1, $v0, 3 -/* DC61C 80145F1C 00431021 */ addu $v0, $v0, $v1 -/* DC620 80145F20 000210C0 */ sll $v0, $v0, 3 -/* DC624 80145F24 0C046EE9 */ jal is_world_fog_enabled -/* DC628 80145F28 0044A821 */ addu $s5, $v0, $a0 -/* DC62C 80145F2C 1040000A */ beqz $v0, .L80145F58 -/* DC630 80145F30 27A40018 */ addiu $a0, $sp, 0x18 -/* DC634 80145F34 27A5001C */ addiu $a1, $sp, 0x1c -/* DC638 80145F38 27A60020 */ addiu $a2, $sp, 0x20 -/* DC63C 80145F3C 0C046EF6 */ jal get_world_fog_color -/* DC640 80145F40 27A70024 */ addiu $a3, $sp, 0x24 -/* DC644 80145F44 3C028007 */ lui $v0, %hi(gGameStatusPtr) -/* DC648 80145F48 8C42419C */ lw $v0, %lo(gGameStatusPtr)($v0) -/* DC64C 80145F4C 9442015C */ lhu $v0, 0x15c($v0) -/* DC650 80145F50 24100001 */ addiu $s0, $zero, 1 -/* DC654 80145F54 AFA20024 */ sw $v0, 0x24($sp) -.L80145F58: -/* DC658 80145F58 3C028015 */ lui $v0, %hi(D_801512F0) -/* DC65C 80145F5C 8C4212F0 */ lw $v0, %lo(D_801512F0)($v0) -/* DC660 80145F60 90420000 */ lbu $v0, ($v0) -/* DC664 80145F64 0440000C */ bltz $v0, .L80145F98 -/* DC668 80145F68 28420002 */ slti $v0, $v0, 2 -/* DC66C 80145F6C 1040000A */ beqz $v0, .L80145F98 -/* DC670 80145F70 27A40028 */ addiu $a0, $sp, 0x28 -/* DC674 80145F74 27A50029 */ addiu $a1, $sp, 0x29 -/* DC678 80145F78 27A6002A */ addiu $a2, $sp, 0x2a -/* DC67C 80145F7C 0C046FA0 */ jal get_background_color_blend -/* DC680 80145F80 27A7002B */ addiu $a3, $sp, 0x2b -/* DC684 80145F84 93A2002B */ lbu $v0, 0x2b($sp) -/* DC688 80145F88 54400020 */ bnel $v0, $zero, .L8014600C -/* DC68C 80145F8C 36100002 */ ori $s0, $s0, 2 -/* DC690 80145F90 08051804 */ j .L80146010 -/* DC694 80145F94 3203FFFF */ andi $v1, $s0, 0xffff -.L80145F98: -/* DC698 80145F98 27A40028 */ addiu $a0, $sp, 0x28 -/* DC69C 80145F9C 27A50029 */ addiu $a1, $sp, 0x29 -/* DC6A0 80145FA0 27A6002A */ addiu $a2, $sp, 0x2a -/* DC6A4 80145FA4 27A7002C */ addiu $a3, $sp, 0x2c -/* DC6A8 80145FA8 27A2002D */ addiu $v0, $sp, 0x2d -/* DC6AC 80145FAC AFA20010 */ sw $v0, 0x10($sp) -/* DC6B0 80145FB0 27A2002E */ addiu $v0, $sp, 0x2e -/* DC6B4 80145FB4 0C046FF5 */ jal get_model_env_color_parameters -/* DC6B8 80145FB8 AFA20014 */ sw $v0, 0x14($sp) -/* DC6BC 80145FBC 93A40028 */ lbu $a0, 0x28($sp) -/* DC6C0 80145FC0 240200FF */ addiu $v0, $zero, 0xff -/* DC6C4 80145FC4 54820011 */ bnel $a0, $v0, .L8014600C -/* DC6C8 80145FC8 36100004 */ ori $s0, $s0, 4 -/* DC6CC 80145FCC 93A30029 */ lbu $v1, 0x29($sp) -/* DC6D0 80145FD0 5464000E */ bnel $v1, $a0, .L8014600C -/* DC6D4 80145FD4 36100004 */ ori $s0, $s0, 4 -/* DC6D8 80145FD8 93A2002A */ lbu $v0, 0x2a($sp) -/* DC6DC 80145FDC 5443000B */ bnel $v0, $v1, .L8014600C -/* DC6E0 80145FE0 36100004 */ ori $s0, $s0, 4 -/* DC6E4 80145FE4 93A2002C */ lbu $v0, 0x2c($sp) -/* DC6E8 80145FE8 54400008 */ bnel $v0, $zero, .L8014600C -/* DC6EC 80145FEC 36100004 */ ori $s0, $s0, 4 -/* DC6F0 80145FF0 93A2002D */ lbu $v0, 0x2d($sp) -/* DC6F4 80145FF4 54400005 */ bnel $v0, $zero, .L8014600C -/* DC6F8 80145FF8 36100004 */ ori $s0, $s0, 4 -/* DC6FC 80145FFC 93A2002E */ lbu $v0, 0x2e($sp) -/* DC700 80146000 10400003 */ beqz $v0, .L80146010 -/* DC704 80146004 3203FFFF */ andi $v1, $s0, 0xffff -/* DC708 80146008 36100004 */ ori $s0, $s0, 4 -.L8014600C: -/* DC70C 8014600C 3203FFFF */ andi $v1, $s0, 0xffff -.L80146010: -/* DC710 80146010 2C620005 */ sltiu $v0, $v1, 5 -/* DC714 80146014 10400067 */ beqz $v0, .L801461B4 -/* DC718 80146018 00031080 */ sll $v0, $v1, 2 -/* DC71C 8014601C 3C018015 */ lui $at, %hi(jtbl_80151220) -/* DC720 80146020 00220821 */ addu $at, $at, $v0 -/* DC724 80146024 8C221220 */ lw $v0, %lo(jtbl_80151220)($at) -/* DC728 80146028 00400008 */ jr $v0 -/* DC72C 8014602C 00000000 */ nop -.L80146030_DC730: -/* DC730 80146030 3C038007 */ lui $v1, %hi(gGameStatusPtr) -/* DC734 80146034 8C63419C */ lw $v1, %lo(gGameStatusPtr)($v1) -/* DC738 80146038 94620148 */ lhu $v0, 0x148($v1) -/* DC73C 8014603C 0805186C */ j .L801461B0 -/* DC740 80146040 3042FFFD */ andi $v0, $v0, 0xfffd -.L80146044_DC744: -/* DC744 80146044 3C078007 */ lui $a3, %hi(gGameStatusPtr) -/* DC748 80146048 8CE7419C */ lw $a3, %lo(gGameStatusPtr)($a3) -/* DC74C 8014604C 93A60028 */ lbu $a2, 0x28($sp) -/* DC750 80146050 93A30029 */ lbu $v1, 0x29($sp) -/* DC754 80146054 93A4002A */ lbu $a0, 0x2a($sp) -/* DC758 80146058 93A5002B */ lbu $a1, 0x2b($sp) -/* DC75C 8014605C 94E20148 */ lhu $v0, 0x148($a3) -/* DC760 80146060 AFA60018 */ sw $a2, 0x18($sp) -/* DC764 80146064 AFA3001C */ sw $v1, 0x1c($sp) -/* DC768 80146068 AFA40020 */ sw $a0, 0x20($sp) -/* DC76C 8014606C AFA50024 */ sw $a1, 0x24($sp) -/* DC770 80146070 34420002 */ ori $v0, $v0, 2 -/* DC774 80146074 0805186D */ j .L801461B4 -/* DC778 80146078 A4E20148 */ sh $v0, 0x148($a3) -.L8014607C_DC77C: -/* DC77C 8014607C 240700FF */ addiu $a3, $zero, 0xff -/* DC780 80146080 93A8002B */ lbu $t0, 0x2b($sp) -/* DC784 80146084 8FA20018 */ lw $v0, 0x18($sp) -/* DC788 80146088 00E83823 */ subu $a3, $a3, $t0 -/* DC78C 8014608C 00470018 */ mult $v0, $a3 -/* DC790 80146090 00001812 */ mflo $v1 -/* DC794 80146094 93A20028 */ lbu $v0, 0x28($sp) -/* DC798 80146098 00000000 */ nop -/* DC79C 8014609C 00480018 */ mult $v0, $t0 -/* DC7A0 801460A0 3C098080 */ lui $t1, 0x8080 -/* DC7A4 801460A4 00005012 */ mflo $t2 -/* DC7A8 801460A8 35298081 */ ori $t1, $t1, 0x8081 -/* DC7AC 801460AC 006A3021 */ addu $a2, $v1, $t2 -/* DC7B0 801460B0 00C90018 */ mult $a2, $t1 -/* DC7B4 801460B4 00005810 */ mfhi $t3 -/* DC7B8 801460B8 8FA2001C */ lw $v0, 0x1c($sp) -/* DC7BC 801460BC 00000000 */ nop -/* DC7C0 801460C0 00470018 */ mult $v0, $a3 -/* DC7C4 801460C4 00002012 */ mflo $a0 -/* DC7C8 801460C8 93A20029 */ lbu $v0, 0x29($sp) -/* DC7CC 801460CC 00000000 */ nop -/* DC7D0 801460D0 00480018 */ mult $v0, $t0 -/* DC7D4 801460D4 00006012 */ mflo $t4 -/* DC7D8 801460D8 8FA20020 */ lw $v0, 0x20($sp) -/* DC7DC 801460DC 00000000 */ nop -/* DC7E0 801460E0 00470018 */ mult $v0, $a3 -/* DC7E4 801460E4 00005012 */ mflo $t2 -/* DC7E8 801460E8 93A2002A */ lbu $v0, 0x2a($sp) -/* DC7EC 801460EC 00000000 */ nop -/* DC7F0 801460F0 00480018 */ mult $v0, $t0 -/* DC7F4 801460F4 00002812 */ mflo $a1 -/* DC7F8 801460F8 008C2021 */ addu $a0, $a0, $t4 -/* DC7FC 801460FC 00000000 */ nop -/* DC800 80146100 00890018 */ mult $a0, $t1 -/* DC804 80146104 00006010 */ mfhi $t4 -/* DC808 80146108 3C038007 */ lui $v1, %hi(gGameStatusPtr) -/* DC80C 8014610C 8C63419C */ lw $v1, %lo(gGameStatusPtr)($v1) -/* DC810 80146110 01452821 */ addu $a1, $t2, $a1 -/* DC814 80146114 00A90018 */ mult $a1, $t1 -/* DC818 80146118 94620148 */ lhu $v0, 0x148($v1) -/* DC81C 8014611C 34420002 */ ori $v0, $v0, 2 -/* DC820 80146120 A4620148 */ sh $v0, 0x148($v1) -/* DC824 80146124 00005010 */ mfhi $t2 -/* DC828 80146128 8FA30024 */ lw $v1, 0x24($sp) -/* DC82C 8014612C 00000000 */ nop -/* DC830 80146130 00670018 */ mult $v1, $a3 -/* DC834 80146134 01661021 */ addu $v0, $t3, $a2 -/* DC838 80146138 000211C3 */ sra $v0, $v0, 7 -/* DC83C 8014613C 000637C3 */ sra $a2, $a2, 0x1f -/* DC840 80146140 00461023 */ subu $v0, $v0, $a2 -/* DC844 80146144 00001812 */ mflo $v1 -/* DC848 80146148 AFA20018 */ sw $v0, 0x18($sp) -/* DC84C 8014614C 01841021 */ addu $v0, $t4, $a0 -/* DC850 80146150 01080018 */ mult $t0, $t0 -/* DC854 80146154 000211C3 */ sra $v0, $v0, 7 -/* DC858 80146158 000427C3 */ sra $a0, $a0, 0x1f -/* DC85C 8014615C 00441023 */ subu $v0, $v0, $a0 -/* DC860 80146160 AFA2001C */ sw $v0, 0x1c($sp) -/* DC864 80146164 00004012 */ mflo $t0 -/* DC868 80146168 01451021 */ addu $v0, $t2, $a1 -/* DC86C 8014616C 00681821 */ addu $v1, $v1, $t0 -/* DC870 80146170 00690018 */ mult $v1, $t1 -/* DC874 80146174 000211C3 */ sra $v0, $v0, 7 -/* DC878 80146178 00052FC3 */ sra $a1, $a1, 0x1f -/* DC87C 8014617C 00451023 */ subu $v0, $v0, $a1 -/* DC880 80146180 AFA20020 */ sw $v0, 0x20($sp) -/* DC884 80146184 00004010 */ mfhi $t0 -/* DC888 80146188 01031021 */ addu $v0, $t0, $v1 -/* DC88C 8014618C 000211C3 */ sra $v0, $v0, 7 -/* DC890 80146190 00031FC3 */ sra $v1, $v1, 0x1f -/* DC894 80146194 00431023 */ subu $v0, $v0, $v1 -/* DC898 80146198 0805186D */ j .L801461B4 -/* DC89C 8014619C AFA20024 */ sw $v0, 0x24($sp) -.L801461A0_DC8A0: -/* DC8A0 801461A0 3C038007 */ lui $v1, %hi(gGameStatusPtr) -/* DC8A4 801461A4 8C63419C */ lw $v1, %lo(gGameStatusPtr)($v1) -/* DC8A8 801461A8 94620148 */ lhu $v0, 0x148($v1) -/* DC8AC 801461AC 34420002 */ ori $v0, $v0, 2 -.L801461B0: -/* DC8B0 801461B0 A4620148 */ sh $v0, 0x148($v1) -.L801461B4: -/* DC8B4 801461B4 3C028007 */ lui $v0, %hi(gGameStatusPtr) -/* DC8B8 801461B8 8C42419C */ lw $v0, %lo(gGameStatusPtr)($v0) -/* DC8BC 801461BC 94420148 */ lhu $v0, 0x148($v0) -/* DC8C0 801461C0 30420002 */ andi $v0, $v0, 2 -/* DC8C4 801461C4 10400077 */ beqz $v0, .L801463A4 -/* DC8C8 801461C8 00000000 */ nop -/* DC8CC 801461CC 3C028015 */ lui $v0, %hi(D_801512F0) -/* DC8D0 801461D0 8C4212F0 */ lw $v0, %lo(D_801512F0)($v0) -/* DC8D4 801461D4 90420000 */ lbu $v0, ($v0) -/* DC8D8 801461D8 04400038 */ bltz $v0, .L801462BC -/* DC8DC 801461DC 28420002 */ slti $v0, $v0, 2 -/* DC8E0 801461E0 10400036 */ beqz $v0, .L801462BC -/* DC8E4 801461E4 240200FF */ addiu $v0, $zero, 0xff -/* DC8E8 801461E8 8FA30024 */ lw $v1, 0x24($sp) -/* DC8EC 801461EC 1462000B */ bne $v1, $v0, .L8014621C -/* DC8F0 801461F0 0000982D */ daddu $s3, $zero, $zero -/* DC8F4 801461F4 24030001 */ addiu $v1, $zero, 1 -/* DC8F8 801461F8 0040982D */ daddu $s3, $v0, $zero -/* DC8FC 801461FC 3C028016 */ lui $v0, %hi(D_8015959E) -/* DC900 80146200 2442959E */ addiu $v0, $v0, %lo(D_8015959E) -.L80146204: -/* DC904 80146204 A4430000 */ sh $v1, ($v0) -/* DC908 80146208 2673FFFF */ addiu $s3, $s3, -1 -/* DC90C 8014620C 0661FFFD */ bgez $s3, .L80146204 -/* DC910 80146210 2442FFFE */ addiu $v0, $v0, -2 -/* DC914 80146214 080518E9 */ j .L801463A4 -/* DC918 80146218 00000000 */ nop -.L8014621C: -/* DC91C 8014621C 3C148016 */ lui $s4, %hi(D_801593A0) -/* DC920 80146220 269493A0 */ addiu $s4, $s4, %lo(D_801593A0) -.L80146224: -/* DC924 80146224 00131840 */ sll $v1, $s3, 1 -/* DC928 80146228 26730001 */ addiu $s3, $s3, 1 -/* DC92C 8014622C 3C028007 */ lui $v0, %hi(gGameStatusPtr) -/* DC930 80146230 8C42419C */ lw $v0, %lo(gGameStatusPtr)($v0) -/* DC934 80146234 8FA60024 */ lw $a2, 0x24($sp) -/* DC938 80146238 8C420158 */ lw $v0, 0x158($v0) -/* DC93C 8014623C 8FA50020 */ lw $a1, 0x20($sp) -/* DC940 80146240 00621821 */ addu $v1, $v1, $v0 -/* DC944 80146244 94700000 */ lhu $s0, ($v1) -/* DC948 80146248 000528C3 */ sra $a1, $a1, 3 -/* DC94C 8014624C 00102042 */ srl $a0, $s0, 1 -/* DC950 80146250 0C0517A6 */ jal blend_background_channel -/* DC954 80146254 3084001F */ andi $a0, $a0, 0x1f -/* DC958 80146258 0040902D */ daddu $s2, $v0, $zero -/* DC95C 8014625C 00102182 */ srl $a0, $s0, 6 -/* DC960 80146260 3084001F */ andi $a0, $a0, 0x1f -/* DC964 80146264 8FA5001C */ lw $a1, 0x1c($sp) -/* DC968 80146268 8FA60024 */ lw $a2, 0x24($sp) -/* DC96C 8014626C 0C0517A6 */ jal blend_background_channel -/* DC970 80146270 000528C3 */ sra $a1, $a1, 3 -/* DC974 80146274 0040882D */ daddu $s1, $v0, $zero -/* DC978 80146278 001022C2 */ srl $a0, $s0, 0xb -/* DC97C 8014627C 8FA50018 */ lw $a1, 0x18($sp) -/* DC980 80146280 8FA60024 */ lw $a2, 0x24($sp) -/* DC984 80146284 0C0517A6 */ jal blend_background_channel -/* DC988 80146288 000528C3 */ sra $a1, $a1, 3 -/* DC98C 8014628C 00121840 */ sll $v1, $s2, 1 -/* DC990 80146290 00112180 */ sll $a0, $s1, 6 -/* DC994 80146294 00641825 */ or $v1, $v1, $a0 -/* DC998 80146298 000212C0 */ sll $v0, $v0, 0xb -/* DC99C 8014629C 00621825 */ or $v1, $v1, $v0 -/* DC9A0 801462A0 34630001 */ ori $v1, $v1, 1 -/* DC9A4 801462A4 A6830000 */ sh $v1, ($s4) -/* DC9A8 801462A8 2A620100 */ slti $v0, $s3, 0x100 -/* DC9AC 801462AC 1440FFDD */ bnez $v0, .L80146224 -/* DC9B0 801462B0 26940002 */ addiu $s4, $s4, 2 -/* DC9B4 801462B4 080518E9 */ j .L801463A4 -/* DC9B8 801462B8 00000000 */ nop -.L801462BC: -/* DC9BC 801462BC 0000982D */ daddu $s3, $zero, $zero -/* DC9C0 801462C0 3C058016 */ lui $a1, %hi(D_801593A0) -/* DC9C4 801462C4 24A593A0 */ addiu $a1, $a1, %lo(D_801593A0) -/* DC9C8 801462C8 3C0C8007 */ lui $t4, %hi(gGameStatusPtr) -/* DC9CC 801462CC 8D8C419C */ lw $t4, %lo(gGameStatusPtr)($t4) -/* DC9D0 801462D0 93AB002A */ lbu $t3, 0x2a($sp) -/* DC9D4 801462D4 93AA0029 */ lbu $t2, 0x29($sp) -/* DC9D8 801462D8 93A2002E */ lbu $v0, 0x2e($sp) -/* DC9DC 801462DC 93A90028 */ lbu $t1, 0x28($sp) -/* DC9E0 801462E0 93A3002C */ lbu $v1, 0x2c($sp) -/* DC9E4 801462E4 000240C2 */ srl $t0, $v0, 3 -/* DC9E8 801462E8 93A2002D */ lbu $v0, 0x2d($sp) -/* DC9EC 801462EC 000330C2 */ srl $a2, $v1, 3 -/* DC9F0 801462F0 000238C2 */ srl $a3, $v0, 3 -.L801462F4: -/* DC9F4 801462F4 8D830158 */ lw $v1, 0x158($t4) -/* DC9F8 801462F8 00131040 */ sll $v0, $s3, 1 -/* DC9FC 801462FC 00431021 */ addu $v0, $v0, $v1 -/* DCA00 80146300 94430000 */ lhu $v1, ($v0) -/* DCA04 80146304 00031042 */ srl $v0, $v1, 1 -/* DCA08 80146308 3042001F */ andi $v0, $v0, 0x1f -/* DCA0C 8014630C 004B0018 */ mult $v0, $t3 -/* DCA10 80146310 00002012 */ mflo $a0 -/* DCA14 80146314 00031182 */ srl $v0, $v1, 6 -/* DCA18 80146318 3042001F */ andi $v0, $v0, 0x1f -/* DCA1C 8014631C 004A0018 */ mult $v0, $t2 -/* DCA20 80146320 00006812 */ mflo $t5 -/* DCA24 80146324 00031AC2 */ srl $v1, $v1, 0xb -/* DCA28 80146328 00000000 */ nop -/* DCA2C 8014632C 00690018 */ mult $v1, $t1 -/* DCA30 80146330 00041203 */ sra $v0, $a0, 8 -/* DCA34 80146334 01029021 */ addu $s2, $t0, $v0 -/* DCA38 80146338 000D1203 */ sra $v0, $t5, 8 -/* DCA3C 8014633C 00E28821 */ addu $s1, $a3, $v0 -/* DCA40 80146340 00001812 */ mflo $v1 -/* DCA44 80146344 00031203 */ sra $v0, $v1, 8 -/* DCA48 80146348 00C22021 */ addu $a0, $a2, $v0 -/* DCA4C 8014634C 2E420020 */ sltiu $v0, $s2, 0x20 -/* DCA50 80146350 50400001 */ beql $v0, $zero, .L80146358 -/* DCA54 80146354 2412001F */ addiu $s2, $zero, 0x1f -.L80146358: -/* DCA58 80146358 3222FFFF */ andi $v0, $s1, 0xffff -/* DCA5C 8014635C 2C420020 */ sltiu $v0, $v0, 0x20 -/* DCA60 80146360 50400001 */ beql $v0, $zero, .L80146368 -/* DCA64 80146364 2411001F */ addiu $s1, $zero, 0x1f -.L80146368: -/* DCA68 80146368 3082FFFF */ andi $v0, $a0, 0xffff -/* DCA6C 8014636C 2C420020 */ sltiu $v0, $v0, 0x20 -/* DCA70 80146370 50400001 */ beql $v0, $zero, .L80146378 -/* DCA74 80146374 2404001F */ addiu $a0, $zero, 0x1f -.L80146378: -/* DCA78 80146378 00121040 */ sll $v0, $s2, 1 -/* DCA7C 8014637C 00111980 */ sll $v1, $s1, 6 -/* DCA80 80146380 00431025 */ or $v0, $v0, $v1 -/* DCA84 80146384 00041AC0 */ sll $v1, $a0, 0xb -/* DCA88 80146388 00431025 */ or $v0, $v0, $v1 -/* DCA8C 8014638C 34420001 */ ori $v0, $v0, 1 -/* DCA90 80146390 A4A20000 */ sh $v0, ($a1) -/* DCA94 80146394 26730001 */ addiu $s3, $s3, 1 -/* DCA98 80146398 2A620100 */ slti $v0, $s3, 0x100 -/* DCA9C 8014639C 1440FFD5 */ bnez $v0, .L801462F4 -/* DCAA0 801463A0 24A50002 */ addiu $a1, $a1, 2 -.L801463A4: -/* DCAA4 801463A4 C6AC0084 */ lwc1 $f12, 0x84($s5) -/* DCAA8 801463A8 0C00A6C9 */ jal clamp_angle -/* DCAAC 801463AC 46006307 */ neg.s $f12, $f12 -/* DCAB0 801463B0 46000586 */ mov.s $f22, $f0 -/* DCAB4 801463B4 0C00A8BB */ jal sin_deg -/* DCAB8 801463B8 4600B306 */ mov.s $f12, $f22 -/* DCABC 801463BC 4600B306 */ mov.s $f12, $f22 -/* DCAC0 801463C0 0C00A8D4 */ jal cos_deg -/* DCAC4 801463C4 46000506 */ mov.s $f20, $f0 -/* DCAC8 801463C8 C6A20048 */ lwc1 $f2, 0x48($s5) -/* DCACC 801463CC 46020002 */ mul.s $f0, $f0, $f2 -/* DCAD0 801463D0 00000000 */ nop -/* DCAD4 801463D4 C6A20050 */ lwc1 $f2, 0x50($s5) -/* DCAD8 801463D8 4602A502 */ mul.s $f20, $f20, $f2 -/* DCADC 801463DC 00000000 */ nop -/* DCAE0 801463E0 46140001 */ sub.s $f0, $f0, $f20 -/* DCAE4 801463E4 C6A2050C */ lwc1 $f2, 0x50c($s5) -/* DCAE8 801463E8 46020000 */ add.s $f0, $f0, $f2 -/* DCAEC 801463EC 3C028007 */ lui $v0, %hi(gGameStatusPtr) -/* DCAF0 801463F0 8C42419C */ lw $v0, %lo(gGameStatusPtr)($v0) -/* DCAF4 801463F4 3C013E80 */ lui $at, 0x3e80 -/* DCAF8 801463F8 44811000 */ mtc1 $at, $f2 -/* DCAFC 801463FC 46000007 */ neg.s $f0, $f0 -/* DCB00 80146400 46020102 */ mul.s $f4, $f0, $f2 -/* DCB04 80146404 00000000 */ nop -/* DCB08 80146408 8442014E */ lh $v0, 0x14e($v0) -/* DCB0C 8014640C 44820000 */ mtc1 $v0, $f0 -/* DCB10 80146410 00000000 */ nop -/* DCB14 80146414 46800020 */ cvt.s.w $f0, $f0 -/* DCB18 80146418 46160002 */ mul.s $f0, $f0, $f22 -/* DCB1C 8014641C 00000000 */ nop -/* DCB20 80146420 3C013C36 */ lui $at, 0x3c36 -/* DCB24 80146424 34210B61 */ ori $at, $at, 0xb61 -/* DCB28 80146428 44811000 */ mtc1 $at, $f2 -/* DCB2C 8014642C 00000000 */ nop -/* DCB30 80146430 46020002 */ mul.s $f0, $f0, $f2 -/* DCB34 80146434 00000000 */ nop -/* DCB38 80146438 3C028016 */ lui $v0, %hi(D_801595A0) -/* DCB3C 8014643C 244295A0 */ addiu $v0, $v0, %lo(D_801595A0) -/* DCB40 80146440 46002100 */ add.s $f4, $f4, $f0 -/* DCB44 80146444 C4460000 */ lwc1 $f6, ($v0) -/* DCB48 80146448 46062001 */ sub.s $f0, $f4, $f6 -/* DCB4C 8014644C 3C013E99 */ lui $at, 0x3e99 -/* DCB50 80146450 3421999A */ ori $at, $at, 0x999a -/* DCB54 80146454 44811000 */ mtc1 $at, $f2 -/* DCB58 80146458 46000005 */ abs.s $f0, $f0 -/* DCB5C 8014645C 4602003C */ c.lt.s $f0, $f2 -/* DCB60 80146460 00000000 */ nop -/* DCB64 80146464 45020002 */ bc1fl .L80146470 -/* DCB68 80146468 E4440000 */ swc1 $f4, ($v0) -/* DCB6C 8014646C 46003106 */ mov.s $f4, $f6 -.L80146470: -/* DCB70 80146470 44801000 */ mtc1 $zero, $f2 -/* DCB74 80146474 00000000 */ nop -/* DCB78 80146478 4602203C */ c.lt.s $f4, $f2 -/* DCB7C 8014647C 00000000 */ nop -/* DCB80 80146480 4500000D */ bc1f .L801464B8 -/* DCB84 80146484 00000000 */ nop -/* DCB88 80146488 3C028007 */ lui $v0, %hi(gGameStatusPtr) -/* DCB8C 8014648C 8C42419C */ lw $v0, %lo(gGameStatusPtr)($v0) -/* DCB90 80146490 8442014E */ lh $v0, 0x14e($v0) -/* DCB94 80146494 00021140 */ sll $v0, $v0, 5 -/* DCB98 80146498 44820000 */ mtc1 $v0, $f0 -/* DCB9C 8014649C 00000000 */ nop -/* DCBA0 801464A0 46800020 */ cvt.s.w $f0, $f0 -/* DCBA4 801464A4 46002100 */ add.s $f4, $f4, $f0 -.L801464A8: -/* DCBA8 801464A8 4602203C */ c.lt.s $f4, $f2 -/* DCBAC 801464AC 00000000 */ nop -/* DCBB0 801464B0 4503FFFD */ bc1tl .L801464A8 -/* DCBB4 801464B4 46002100 */ add.s $f4, $f4, $f0 -.L801464B8: -/* DCBB8 801464B8 3C0E8007 */ lui $t6, %hi(gGameStatusPtr) -/* DCBBC 801464BC 8DCE419C */ lw $t6, %lo(gGameStatusPtr)($t6) -/* DCBC0 801464C0 4600220D */ trunc.w.s $f8, $f4 -/* DCBC4 801464C4 44024000 */ mfc1 $v0, $f8 -/* DCBC8 801464C8 85C3014E */ lh $v1, 0x14e($t6) -/* DCBCC 801464CC 3C05E300 */ lui $a1, 0xe300 -/* DCBD0 801464D0 14600002 */ bnez $v1, .L801464DC -/* DCBD4 801464D4 0043001A */ div $zero, $v0, $v1 -/* DCBD8 801464D8 0007000D */ break 7 -.L801464DC: -/* DCBDC 801464DC 2401FFFF */ addiu $at, $zero, -1 -/* DCBE0 801464E0 14610004 */ bne $v1, $at, .L801464F4 -/* DCBE4 801464E4 3C018000 */ lui $at, 0x8000 -/* DCBE8 801464E8 14410002 */ bne $v0, $at, .L801464F4 -/* DCBEC 801464EC 00000000 */ nop -/* DCBF0 801464F0 0006000D */ break 6 -.L801464F4: -/* DCBF4 801464F4 00001810 */ mfhi $v1 -/* DCBF8 801464F8 34A50A01 */ ori $a1, $a1, 0xa01 -/* DCBFC 801464FC 3C08E300 */ lui $t0, 0xe300 -/* DCC00 80146500 35080C00 */ ori $t0, $t0, 0xc00 -/* DCC04 80146504 3C09E300 */ lui $t1, 0xe300 -/* DCC08 80146508 35291001 */ ori $t1, $t1, 0x1001 -/* DCC0C 8014650C 3C0BFCFF */ lui $t3, 0xfcff -/* DCC10 80146510 356BFFFF */ ori $t3, $t3, 0xffff -/* DCC14 80146514 3C0AFFFC */ lui $t2, 0xfffc -/* DCC18 80146518 354AF87C */ ori $t2, $t2, 0xf87c -/* DCC1C 8014651C 3C06E200 */ lui $a2, 0xe200 -/* DCC20 80146520 34C6001C */ ori $a2, $a2, 0x1c -/* DCC24 80146524 3C07E300 */ lui $a3, 0xe300 -/* DCC28 80146528 3C0D800A */ lui $t5, %hi(gMasterGfxPos) -/* DCC2C 8014652C 25ADA66C */ addiu $t5, $t5, %lo(gMasterGfxPos) -/* DCC30 80146530 34E71201 */ ori $a3, $a3, 0x1201 -/* DCC34 80146534 8DAC0000 */ lw $t4, ($t5) -/* DCC38 80146538 3C10E700 */ lui $s0, 0xe700 -/* DCC3C 8014653C 0180202D */ daddu $a0, $t4, $zero -/* DCC40 80146540 258C0008 */ addiu $t4, $t4, 8 -/* DCC44 80146544 ADAC0000 */ sw $t4, ($t5) -/* DCC48 80146548 25820008 */ addiu $v0, $t4, 8 -/* DCC4C 8014654C ADA20000 */ sw $v0, ($t5) -/* DCC50 80146550 25820010 */ addiu $v0, $t4, 0x10 -/* DCC54 80146554 ADA20000 */ sw $v0, ($t5) -/* DCC58 80146558 25820018 */ addiu $v0, $t4, 0x18 -/* DCC5C 8014655C ADA20000 */ sw $v0, ($t5) -/* DCC60 80146560 25820020 */ addiu $v0, $t4, 0x20 -/* DCC64 80146564 ADA20000 */ sw $v0, ($t5) -/* DCC68 80146568 25820028 */ addiu $v0, $t4, 0x28 -/* DCC6C 8014656C ADA20000 */ sw $v0, ($t5) -/* DCC70 80146570 25820030 */ addiu $v0, $t4, 0x30 -/* DCC74 80146574 ADA20000 */ sw $v0, ($t5) -/* DCC78 80146578 25820038 */ addiu $v0, $t4, 0x38 -/* DCC7C 8014657C ADA20000 */ sw $v0, ($t5) -/* DCC80 80146580 85D2014E */ lh $s2, 0x14e($t6) -/* DCC84 80146584 85CF0150 */ lh $t7, 0x150($t6) -/* DCC88 80146588 3C020020 */ lui $v0, 0x20 -/* DCC8C 8014658C A5C30152 */ sh $v1, 0x152($t6) -/* DCC90 80146590 AFAF0034 */ sw $t7, 0x34($sp) -/* DCC94 80146594 85D9014A */ lh $t9, 0x14a($t6) -/* DCC98 80146598 85D7014C */ lh $s7, 0x14c($t6) -/* DCC9C 8014659C 00031C00 */ sll $v1, $v1, 0x10 -/* DCCA0 801465A0 AFB70030 */ sw $s7, 0x30($sp) -/* DCCA4 801465A4 AC900000 */ sw $s0, ($a0) -/* DCCA8 801465A8 AC800004 */ sw $zero, 4($a0) -/* DCCAC 801465AC AD820004 */ sw $v0, 4($t4) -/* DCCB0 801465B0 34028000 */ ori $v0, $zero, 0x8000 -/* DCCB4 801465B4 AD850000 */ sw $a1, ($t4) -/* DCCB8 801465B8 AD880008 */ sw $t0, 8($t4) -/* DCCBC 801465BC AD80000C */ sw $zero, 0xc($t4) -/* DCCC0 801465C0 AD890010 */ sw $t1, 0x10($t4) -/* DCCC4 801465C4 AD820014 */ sw $v0, 0x14($t4) -/* DCCC8 801465C8 AD8B0018 */ sw $t3, 0x18($t4) -/* DCCCC 801465CC AD8A001C */ sw $t2, 0x1c($t4) -/* DCCD0 801465D0 AD860020 */ sw $a2, 0x20($t4) -/* DCCD4 801465D4 AD800024 */ sw $zero, 0x24($t4) -/* DCCD8 801465D8 AD870028 */ sw $a3, 0x28($t4) -/* DCCDC 801465DC AD80002C */ sw $zero, 0x2c($t4) -/* DCCE0 801465E0 AD900030 */ sw $s0, 0x30($t4) -/* DCCE4 801465E4 AD800034 */ sw $zero, 0x34($t4) -/* DCCE8 801465E8 95C20148 */ lhu $v0, 0x148($t6) -/* DCCEC 801465EC 30420002 */ andi $v0, $v0, 2 -/* DCCF0 801465F0 14400024 */ bnez $v0, .L80146684 -/* DCCF4 801465F4 0003C403 */ sra $t8, $v1, 0x10 -/* DCCF8 801465F8 3C03F500 */ lui $v1, 0xf500 -/* DCCFC 801465FC 34630100 */ ori $v1, $v1, 0x100 -/* DCD00 80146600 3C05073F */ lui $a1, 0x73f -/* DCD04 80146604 34A5C000 */ ori $a1, $a1, 0xc000 -/* DCD08 80146608 25820040 */ addiu $v0, $t4, 0x40 -/* DCD0C 8014660C ADA20000 */ sw $v0, ($t5) -/* DCD10 80146610 3C02FD10 */ lui $v0, 0xfd10 -/* DCD14 80146614 AD820038 */ sw $v0, 0x38($t4) -/* DCD18 80146618 25820048 */ addiu $v0, $t4, 0x48 -/* DCD1C 8014661C ADA20000 */ sw $v0, ($t5) -/* DCD20 80146620 8DC40158 */ lw $a0, 0x158($t6) -/* DCD24 80146624 3C02E800 */ lui $v0, 0xe800 -/* DCD28 80146628 AD820040 */ sw $v0, 0x40($t4) -/* DCD2C 8014662C 25820050 */ addiu $v0, $t4, 0x50 -/* DCD30 80146630 AD800044 */ sw $zero, 0x44($t4) -/* DCD34 80146634 ADA20000 */ sw $v0, ($t5) -/* DCD38 80146638 3C020700 */ lui $v0, 0x700 -/* DCD3C 8014663C AD82004C */ sw $v0, 0x4c($t4) -/* DCD40 80146640 25820058 */ addiu $v0, $t4, 0x58 -/* DCD44 80146644 AD830048 */ sw $v1, 0x48($t4) -/* DCD48 80146648 ADA20000 */ sw $v0, ($t5) -/* DCD4C 8014664C 3C02E600 */ lui $v0, 0xe600 -/* DCD50 80146650 AD820050 */ sw $v0, 0x50($t4) -/* DCD54 80146654 25820060 */ addiu $v0, $t4, 0x60 -/* DCD58 80146658 AD800054 */ sw $zero, 0x54($t4) -/* DCD5C 8014665C ADA20000 */ sw $v0, ($t5) -/* DCD60 80146660 3C02F000 */ lui $v0, 0xf000 -/* DCD64 80146664 AD820058 */ sw $v0, 0x58($t4) -/* DCD68 80146668 25820068 */ addiu $v0, $t4, 0x68 -/* DCD6C 8014666C AD85005C */ sw $a1, 0x5c($t4) -/* DCD70 80146670 ADA20000 */ sw $v0, ($t5) -/* DCD74 80146674 AD900060 */ sw $s0, 0x60($t4) -/* DCD78 80146678 AD800064 */ sw $zero, 0x64($t4) -/* DCD7C 8014667C 080519C4 */ j .L80146710 -/* DCD80 80146680 AD84003C */ sw $a0, 0x3c($t4) -.L80146684: -/* DCD84 80146684 3C03F500 */ lui $v1, 0xf500 -/* DCD88 80146688 34630100 */ ori $v1, $v1, 0x100 -/* DCD8C 8014668C 3C04073F */ lui $a0, 0x73f -/* DCD90 80146690 3484C000 */ ori $a0, $a0, 0xc000 -/* DCD94 80146694 25820040 */ addiu $v0, $t4, 0x40 -/* DCD98 80146698 ADA20000 */ sw $v0, ($t5) -/* DCD9C 8014669C 3C02FD10 */ lui $v0, 0xfd10 -/* DCDA0 801466A0 AD820038 */ sw $v0, 0x38($t4) -/* DCDA4 801466A4 3C028016 */ lui $v0, %hi(D_801593A0) -/* DCDA8 801466A8 244293A0 */ addiu $v0, $v0, %lo(D_801593A0) -/* DCDAC 801466AC AD82003C */ sw $v0, 0x3c($t4) -/* DCDB0 801466B0 25820048 */ addiu $v0, $t4, 0x48 -/* DCDB4 801466B4 ADA20000 */ sw $v0, ($t5) -/* DCDB8 801466B8 3C02E800 */ lui $v0, 0xe800 -/* DCDBC 801466BC AD820040 */ sw $v0, 0x40($t4) -/* DCDC0 801466C0 25820050 */ addiu $v0, $t4, 0x50 -/* DCDC4 801466C4 AD800044 */ sw $zero, 0x44($t4) -/* DCDC8 801466C8 ADA20000 */ sw $v0, ($t5) -/* DCDCC 801466CC 3C020700 */ lui $v0, 0x700 -/* DCDD0 801466D0 AD82004C */ sw $v0, 0x4c($t4) -/* DCDD4 801466D4 25820058 */ addiu $v0, $t4, 0x58 -/* DCDD8 801466D8 AD830048 */ sw $v1, 0x48($t4) -/* DCDDC 801466DC ADA20000 */ sw $v0, ($t5) -/* DCDE0 801466E0 3C02E600 */ lui $v0, 0xe600 -/* DCDE4 801466E4 AD820050 */ sw $v0, 0x50($t4) -/* DCDE8 801466E8 25820060 */ addiu $v0, $t4, 0x60 -/* DCDEC 801466EC AD800054 */ sw $zero, 0x54($t4) -/* DCDF0 801466F0 ADA20000 */ sw $v0, ($t5) -/* DCDF4 801466F4 3C02F000 */ lui $v0, 0xf000 -/* DCDF8 801466F8 AD820058 */ sw $v0, 0x58($t4) -/* DCDFC 801466FC 25820068 */ addiu $v0, $t4, 0x68 -/* DCE00 80146700 AD84005C */ sw $a0, 0x5c($t4) -/* DCE04 80146704 ADA20000 */ sw $v0, ($t5) -/* DCE08 80146708 AD900060 */ sw $s0, 0x60($t4) -/* DCE0C 8014670C AD800064 */ sw $zero, 0x64($t4) -.L80146710: -/* DCE10 80146710 3C028015 */ lui $v0, %hi(D_8014F12F) -/* DCE14 80146714 8042F12F */ lb $v0, %lo(D_8014F12F)($v0) -/* DCE18 80146718 1440013D */ bnez $v0, .L80146C10 -/* DCE1C 8014671C 24110006 */ addiu $s1, $zero, 6 -/* DCE20 80146720 3C048007 */ lui $a0, %hi(gGameStatusPtr) -/* DCE24 80146724 8C84419C */ lw $a0, %lo(gGameStatusPtr)($a0) -/* DCE28 80146728 8483014E */ lh $v1, 0x14e($a0) -/* DCE2C 8014672C 24020800 */ addiu $v0, $zero, 0x800 -/* DCE30 80146730 14600002 */ bnez $v1, .L8014673C -/* DCE34 80146734 0043001A */ div $zero, $v0, $v1 -/* DCE38 80146738 0007000D */ break 7 -.L8014673C: -/* DCE3C 8014673C 2401FFFF */ addiu $at, $zero, -1 -/* DCE40 80146740 14610004 */ bne $v1, $at, .L80146754 -/* DCE44 80146744 3C018000 */ lui $at, 0x8000 -/* DCE48 80146748 14410002 */ bne $v0, $at, .L80146754 -/* DCE4C 8014674C 00000000 */ nop -/* DCE50 80146750 0006000D */ break 6 -.L80146754: -/* DCE54 80146754 00008812 */ mflo $s1 -/* DCE58 80146758 84820150 */ lh $v0, 0x150($a0) -/* DCE5C 8014675C 16200002 */ bnez $s1, .L80146768 -/* DCE60 80146760 0051001A */ div $zero, $v0, $s1 -/* DCE64 80146764 0007000D */ break 7 -.L80146768: -/* DCE68 80146768 2401FFFF */ addiu $at, $zero, -1 -/* DCE6C 8014676C 16210004 */ bne $s1, $at, .L80146780 -/* DCE70 80146770 3C018000 */ lui $at, 0x8000 -/* DCE74 80146774 14410002 */ bne $v0, $at, .L80146780 -/* DCE78 80146778 00000000 */ nop -/* DCE7C 8014677C 0006000D */ break 6 -.L80146780: -/* DCE80 80146780 00007812 */ mflo $t7 -/* DCE84 80146784 0000B810 */ mfhi $s7 -/* DCE88 80146788 0000982D */ daddu $s3, $zero, $zero -/* DCE8C 8014678C AFAF0070 */ sw $t7, 0x70($sp) -/* DCE90 80146790 19E00095 */ blez $t7, .L801469E8 -/* DCE94 80146794 AFB70038 */ sw $s7, 0x38($sp) -/* DCE98 80146798 3C0A800A */ lui $t2, %hi(gMasterGfxPos) -/* DCE9C 8014679C 254AA66C */ addiu $t2, $t2, %lo(gMasterGfxPos) -/* DCEA0 801467A0 2642FFFF */ addiu $v0, $s2, -1 -/* DCEA4 801467A4 30420FFF */ andi $v0, $v0, 0xfff -/* DCEA8 801467A8 3C03FD48 */ lui $v1, 0xfd48 -/* DCEAC 801467AC 00431025 */ or $v0, $v0, $v1 -/* DCEB0 801467B0 3C14F548 */ lui $s4, 0xf548 -/* DCEB4 801467B4 36944A00 */ ori $s4, $s4, 0x4a00 -/* DCEB8 801467B8 03191821 */ addu $v1, $t8, $t9 -/* DCEBC 801467BC AFA2003C */ sw $v0, 0x3c($sp) -/* DCEC0 801467C0 2462FFFF */ addiu $v0, $v1, -1 -/* DCEC4 801467C4 00021080 */ sll $v0, $v0, 2 -/* DCEC8 801467C8 30420FFF */ andi $v0, $v0, 0xfff -/* DCECC 801467CC 00021300 */ sll $v0, $v0, 0xc -/* DCED0 801467D0 AFA20040 */ sw $v0, 0x40($sp) -/* DCED4 801467D4 00191080 */ sll $v0, $t9, 2 -/* DCED8 801467D8 30420FFF */ andi $v0, $v0, 0xfff -/* DCEDC 801467DC 00021300 */ sll $v0, $v0, 0xc -/* DCEE0 801467E0 3C16E100 */ lui $s6, 0xe100 -/* DCEE4 801467E4 AFA20044 */ sw $v0, 0x44($sp) -/* DCEE8 801467E8 02581023 */ subu $v0, $s2, $t8 -/* DCEEC 801467EC 00021540 */ sll $v0, $v0, 0x15 -/* DCEF0 801467F0 3C15F100 */ lui $s5, 0xf100 -/* DCEF4 801467F4 3C101000 */ lui $s0, 0x1000 -/* DCEF8 801467F8 36100400 */ ori $s0, $s0, 0x400 -/* DCEFC 801467FC AFA20048 */ sw $v0, 0x48($sp) -/* DCF00 80146800 02591021 */ addu $v0, $s2, $t9 -/* DCF04 80146804 2442FFFF */ addiu $v0, $v0, -1 -/* DCF08 80146808 00021080 */ sll $v0, $v0, 2 -/* DCF0C 8014680C 30420FFF */ andi $v0, $v0, 0xfff -/* DCF10 80146810 00021300 */ sll $v0, $v0, 0xc -/* DCF14 80146814 00031880 */ sll $v1, $v1, 2 -/* DCF18 80146818 30630FFF */ andi $v1, $v1, 0xfff -/* DCF1C 8014681C 0003F300 */ sll $fp, $v1, 0xc -/* DCF20 80146820 0220702D */ daddu $t6, $s1, $zero -/* DCF24 80146824 8FAF0030 */ lw $t7, 0x30($sp) -/* DCF28 80146828 0260682D */ daddu $t5, $s3, $zero -/* DCF2C 8014682C AFA2004C */ sw $v0, 0x4c($sp) -/* DCF30 80146830 AFAF0078 */ sw $t7, 0x78($sp) -.L80146834: -/* DCF34 80146834 3C028015 */ lui $v0, %hi(D_8014F130) -/* DCF38 80146838 9442F130 */ lhu $v0, %lo(D_8014F130)($v0) -/* DCF3C 8014683C 3C0B8007 */ lui $t3, %hi(gGameStatusPtr) -/* DCF40 80146840 8D6B419C */ lw $t3, %lo(gGameStatusPtr)($t3) -/* DCF44 80146844 004D2021 */ addu $a0, $v0, $t5 -/* DCF48 80146848 00041400 */ sll $v0, $a0, 0x10 -/* DCF4C 8014684C 85630150 */ lh $v1, 0x150($t3) -/* DCF50 80146850 00021403 */ sra $v0, $v0, 0x10 -/* DCF54 80146854 0062182A */ slt $v1, $v1, $v0 -/* DCF58 80146858 95620150 */ lhu $v0, 0x150($t3) -/* DCF5C 8014685C 10600002 */ beqz $v1, .L80146868 -/* DCF60 80146860 0080602D */ daddu $t4, $a0, $zero -/* DCF64 80146864 00826023 */ subu $t4, $a0, $v0 -.L80146868: -/* DCF68 80146868 3C080749 */ lui $t0, 0x749 -/* DCF6C 8014686C 3508C014 */ ori $t0, $t0, 0xc014 -/* DCF70 80146870 3C090049 */ lui $t1, 0x49 -/* DCF74 80146874 3529C014 */ ori $t1, $t1, 0xc014 -/* DCF78 80146878 01B16821 */ addu $t5, $t5, $s1 -/* DCF7C 8014687C 26730001 */ addiu $s3, $s3, 1 -/* DCF80 80146880 8FB70078 */ lw $s7, 0x78($sp) -/* DCF84 80146884 8FAF0030 */ lw $t7, 0x30($sp) -/* DCF88 80146888 00173080 */ sll $a2, $s7, 2 -/* DCF8C 8014688C 02F1B821 */ addu $s7, $s7, $s1 -/* DCF90 80146890 25E5FFFF */ addiu $a1, $t7, -1 -/* DCF94 80146894 01C52821 */ addu $a1, $t6, $a1 -/* DCF98 80146898 00052880 */ sll $a1, $a1, 2 -/* DCF9C 8014689C AFB70078 */ sw $s7, 0x78($sp) -/* DCFA0 801468A0 8D430000 */ lw $v1, ($t2) -/* DCFA4 801468A4 30A50FFF */ andi $a1, $a1, 0xfff -/* DCFA8 801468A8 0060382D */ daddu $a3, $v1, $zero -/* DCFAC 801468AC 24630008 */ addiu $v1, $v1, 8 -/* DCFB0 801468B0 24620008 */ addiu $v0, $v1, 8 -/* DCFB4 801468B4 AD430000 */ sw $v1, ($t2) -/* DCFB8 801468B8 8FB7003C */ lw $s7, 0x3c($sp) -/* DCFBC 801468BC 24640048 */ addiu $a0, $v1, 0x48 -/* DCFC0 801468C0 ACF70000 */ sw $s7, ($a3) -/* DCFC4 801468C4 AD420000 */ sw $v0, ($t2) -/* DCFC8 801468C8 24620010 */ addiu $v0, $v1, 0x10 -/* DCFCC 801468CC AD420000 */ sw $v0, ($t2) -/* DCFD0 801468D0 24620018 */ addiu $v0, $v1, 0x18 -/* DCFD4 801468D4 AD420000 */ sw $v0, ($t2) -/* DCFD8 801468D8 24620020 */ addiu $v0, $v1, 0x20 -/* DCFDC 801468DC AD420000 */ sw $v0, ($t2) -/* DCFE0 801468E0 24620028 */ addiu $v0, $v1, 0x28 -/* DCFE4 801468E4 AD420000 */ sw $v0, ($t2) -/* DCFE8 801468E8 24620030 */ addiu $v0, $v1, 0x30 -/* DCFEC 801468EC AD420000 */ sw $v0, ($t2) -/* DCFF0 801468F0 24620038 */ addiu $v0, $v1, 0x38 -/* DCFF4 801468F4 AD420000 */ sw $v0, ($t2) -/* DCFF8 801468F8 24620040 */ addiu $v0, $v1, 0x40 -/* DCFFC 801468FC AD420000 */ sw $v0, ($t2) -/* DD000 80146900 000C1400 */ sll $v0, $t4, 0x10 -/* DD004 80146904 00021403 */ sra $v0, $v0, 0x10 -/* DD008 80146908 02420018 */ mult $s2, $v0 -/* DD00C 8014690C AD440000 */ sw $a0, ($t2) -/* DD010 80146910 8D640154 */ lw $a0, 0x154($t3) -/* DD014 80146914 24620050 */ addiu $v0, $v1, 0x50 -/* DD018 80146918 AD420000 */ sw $v0, ($t2) -/* DD01C 8014691C 3C020700 */ lui $v0, 0x700 -/* DD020 80146920 00007812 */ mflo $t7 -/* DD024 80146924 008F2021 */ addu $a0, $a0, $t7 -/* DD028 80146928 ACE40004 */ sw $a0, 4($a3) -/* DD02C 8014692C AC620004 */ sw $v0, 4($v1) -/* DD030 80146930 3C02E600 */ lui $v0, 0xe600 -/* DD034 80146934 AC620008 */ sw $v0, 8($v1) -/* DD038 80146938 3C02F400 */ lui $v0, 0xf400 -/* DD03C 8014693C AC620010 */ sw $v0, 0x10($v1) -/* DD040 80146940 3C02E700 */ lui $v0, 0xe700 -/* DD044 80146944 AC620018 */ sw $v0, 0x18($v1) -/* DD048 80146948 3C02F200 */ lui $v0, 0xf200 -/* DD04C 8014694C AC620028 */ sw $v0, 0x28($v1) -/* DD050 80146950 3C02E400 */ lui $v0, 0xe400 -/* DD054 80146954 AC740000 */ sw $s4, ($v1) -/* DD058 80146958 AC60000C */ sw $zero, 0xc($v1) -/* DD05C 8014695C AC680014 */ sw $t0, 0x14($v1) -/* DD060 80146960 AC60001C */ sw $zero, 0x1c($v1) -/* DD064 80146964 AC740020 */ sw $s4, 0x20($v1) -/* DD068 80146968 AC600024 */ sw $zero, 0x24($v1) -/* DD06C 8014696C AC69002C */ sw $t1, 0x2c($v1) -/* DD070 80146970 8FB70040 */ lw $s7, 0x40($sp) -/* DD074 80146974 00A22825 */ or $a1, $a1, $v0 -/* DD078 80146978 02E51025 */ or $v0, $s7, $a1 -/* DD07C 8014697C AC620030 */ sw $v0, 0x30($v1) -/* DD080 80146980 8FAF0044 */ lw $t7, 0x44($sp) -/* DD084 80146984 30C60FFF */ andi $a2, $a2, 0xfff -/* DD088 80146988 01E61025 */ or $v0, $t7, $a2 -/* DD08C 8014698C AC620034 */ sw $v0, 0x34($v1) -/* DD090 80146990 AC760038 */ sw $s6, 0x38($v1) -/* DD094 80146994 8FB70048 */ lw $s7, 0x48($sp) -/* DD098 80146998 03C63025 */ or $a2, $fp, $a2 -/* DD09C 8014699C AC750040 */ sw $s5, 0x40($v1) -/* DD0A0 801469A0 AC700044 */ sw $s0, 0x44($v1) -/* DD0A4 801469A4 AC77003C */ sw $s7, 0x3c($v1) -/* DD0A8 801469A8 8FAF004C */ lw $t7, 0x4c($sp) -/* DD0AC 801469AC 24620058 */ addiu $v0, $v1, 0x58 -/* DD0B0 801469B0 01E52825 */ or $a1, $t7, $a1 -/* DD0B4 801469B4 AC650048 */ sw $a1, 0x48($v1) -/* DD0B8 801469B8 AC66004C */ sw $a2, 0x4c($v1) -/* DD0BC 801469BC AD420000 */ sw $v0, ($t2) -/* DD0C0 801469C0 24620060 */ addiu $v0, $v1, 0x60 -/* DD0C4 801469C4 AC760050 */ sw $s6, 0x50($v1) -/* DD0C8 801469C8 AC600054 */ sw $zero, 0x54($v1) -/* DD0CC 801469CC AD420000 */ sw $v0, ($t2) -/* DD0D0 801469D0 AC750058 */ sw $s5, 0x58($v1) -/* DD0D4 801469D4 AC70005C */ sw $s0, 0x5c($v1) -/* DD0D8 801469D8 8FB70070 */ lw $s7, 0x70($sp) -/* DD0DC 801469DC 0277102A */ slt $v0, $s3, $s7 -/* DD0E0 801469E0 1440FF94 */ bnez $v0, .L80146834 -/* DD0E4 801469E4 01D17021 */ addu $t6, $t6, $s1 -.L801469E8: -/* DD0E8 801469E8 8FAF0038 */ lw $t7, 0x38($sp) -/* DD0EC 801469EC 11E001F9 */ beqz $t7, .L801471D4 -/* DD0F0 801469F0 02330018 */ mult $s1, $s3 -/* DD0F4 801469F4 3C0B8007 */ lui $t3, %hi(gGameStatusPtr) -/* DD0F8 801469F8 8D6B419C */ lw $t3, %lo(gGameStatusPtr)($t3) -/* DD0FC 801469FC 3C028015 */ lui $v0, %hi(D_8014F130) -/* DD100 80146A00 9442F130 */ lhu $v0, %lo(D_8014F130)($v0) -/* DD104 80146A04 85630150 */ lh $v1, 0x150($t3) -/* DD108 80146A08 00006812 */ mflo $t5 -/* DD10C 80146A0C 004D2021 */ addu $a0, $v0, $t5 -/* DD110 80146A10 00041400 */ sll $v0, $a0, 0x10 -/* DD114 80146A14 00021403 */ sra $v0, $v0, 0x10 -/* DD118 80146A18 0062182A */ slt $v1, $v1, $v0 -/* DD11C 80146A1C 95620150 */ lhu $v0, 0x150($t3) -/* DD120 80146A20 10600002 */ beqz $v1, .L80146A2C -/* DD124 80146A24 0080602D */ daddu $t4, $a0, $zero -/* DD128 80146A28 00826023 */ subu $t4, $a0, $v0 -.L80146A2C: -/* DD12C 80146A2C 3C08F548 */ lui $t0, 0xf548 -/* DD130 80146A30 35084A00 */ ori $t0, $t0, 0x4a00 -/* DD134 80146A34 3C050749 */ lui $a1, 0x749 -/* DD138 80146A38 34A5C000 */ ori $a1, $a1, 0xc000 -/* DD13C 80146A3C 3C090049 */ lui $t1, 0x49 -/* DD140 80146A40 3529C000 */ ori $t1, $t1, 0xc000 -/* DD144 80146A44 3C0A1000 */ lui $t2, 0x1000 -/* DD148 80146A48 3C07800A */ lui $a3, %hi(gMasterGfxPos) -/* DD14C 80146A4C 24E7A66C */ addiu $a3, $a3, %lo(gMasterGfxPos) -/* DD150 80146A50 354A0400 */ ori $t2, $t2, 0x400 -/* DD154 80146A54 2642FFFF */ addiu $v0, $s2, -1 -/* DD158 80146A58 30420FFF */ andi $v0, $v0, 0xfff -/* DD15C 80146A5C 3C03FD48 */ lui $v1, 0xfd48 -/* DD160 80146A60 8CE40000 */ lw $a0, ($a3) -/* DD164 80146A64 00431025 */ or $v0, $v0, $v1 -/* DD168 80146A68 0080302D */ daddu $a2, $a0, $zero -/* DD16C 80146A6C 24840008 */ addiu $a0, $a0, 8 -/* DD170 80146A70 ACE40000 */ sw $a0, ($a3) -/* DD174 80146A74 ACC20000 */ sw $v0, ($a2) -/* DD178 80146A78 24820008 */ addiu $v0, $a0, 8 -/* DD17C 80146A7C ACE20000 */ sw $v0, ($a3) -/* DD180 80146A80 24820010 */ addiu $v0, $a0, 0x10 -/* DD184 80146A84 ACE20000 */ sw $v0, ($a3) -/* DD188 80146A88 24820018 */ addiu $v0, $a0, 0x18 -/* DD18C 80146A8C ACE20000 */ sw $v0, ($a3) -/* DD190 80146A90 24820020 */ addiu $v0, $a0, 0x20 -/* DD194 80146A94 ACE20000 */ sw $v0, ($a3) -/* DD198 80146A98 24820028 */ addiu $v0, $a0, 0x28 -/* DD19C 80146A9C ACE20000 */ sw $v0, ($a3) -/* DD1A0 80146AA0 24820030 */ addiu $v0, $a0, 0x30 -/* DD1A4 80146AA4 ACE20000 */ sw $v0, ($a3) -/* DD1A8 80146AA8 24820038 */ addiu $v0, $a0, 0x38 -/* DD1AC 80146AAC ACE20000 */ sw $v0, ($a3) -/* DD1B0 80146AB0 24820040 */ addiu $v0, $a0, 0x40 -/* DD1B4 80146AB4 ACE20000 */ sw $v0, ($a3) -/* DD1B8 80146AB8 000C1400 */ sll $v0, $t4, 0x10 -/* DD1BC 80146ABC 00021403 */ sra $v0, $v0, 0x10 -/* DD1C0 80146AC0 24830048 */ addiu $v1, $a0, 0x48 -/* DD1C4 80146AC4 02420018 */ mult $s2, $v0 -/* DD1C8 80146AC8 ACE30000 */ sw $v1, ($a3) -/* DD1CC 80146ACC 8D620154 */ lw $v0, 0x154($t3) -/* DD1D0 80146AD0 24830050 */ addiu $v1, $a0, 0x50 -/* DD1D4 80146AD4 ACE30000 */ sw $v1, ($a3) -/* DD1D8 80146AD8 3C03E700 */ lui $v1, 0xe700 -/* DD1DC 80146ADC 00007812 */ mflo $t7 -/* DD1E0 80146AE0 004F1021 */ addu $v0, $v0, $t7 -/* DD1E4 80146AE4 ACC20004 */ sw $v0, 4($a2) -/* DD1E8 80146AE8 3C020700 */ lui $v0, 0x700 -/* DD1EC 80146AEC AC820004 */ sw $v0, 4($a0) -/* DD1F0 80146AF0 3C02E600 */ lui $v0, 0xe600 -/* DD1F4 80146AF4 AC820008 */ sw $v0, 8($a0) -/* DD1F8 80146AF8 3C02F400 */ lui $v0, 0xf400 -/* DD1FC 80146AFC AC880000 */ sw $t0, ($a0) -/* DD200 80146B00 AC80000C */ sw $zero, 0xc($a0) -/* DD204 80146B04 AC820010 */ sw $v0, 0x10($a0) -/* DD208 80146B08 8FB70038 */ lw $s7, 0x38($sp) -/* DD20C 80146B0C 03193021 */ addu $a2, $t8, $t9 -/* DD210 80146B10 26E2FFFF */ addiu $v0, $s7, -1 -/* DD214 80146B14 00021080 */ sll $v0, $v0, 2 -/* DD218 80146B18 30420FFF */ andi $v0, $v0, 0xfff -/* DD21C 80146B1C 00452825 */ or $a1, $v0, $a1 -/* DD220 80146B20 AC830018 */ sw $v1, 0x18($a0) -/* DD224 80146B24 3C03F200 */ lui $v1, 0xf200 -/* DD228 80146B28 00491025 */ or $v0, $v0, $t1 -/* DD22C 80146B2C AC82002C */ sw $v0, 0x2c($a0) -/* DD230 80146B30 24C2FFFF */ addiu $v0, $a2, -1 -/* DD234 80146B34 00021080 */ sll $v0, $v0, 2 -/* DD238 80146B38 30420FFF */ andi $v0, $v0, 0xfff -/* DD23C 80146B3C 00021300 */ sll $v0, $v0, 0xc -/* DD240 80146B40 AC830028 */ sw $v1, 0x28($a0) -/* DD244 80146B44 3C03E400 */ lui $v1, 0xe400 -/* DD248 80146B48 3C09E100 */ lui $t1, 0xe100 -/* DD24C 80146B4C AC880020 */ sw $t0, 0x20($a0) -/* DD250 80146B50 3C08F100 */ lui $t0, 0xf100 -/* DD254 80146B54 00063080 */ sll $a2, $a2, 2 -/* DD258 80146B58 30C60FFF */ andi $a2, $a2, 0xfff -/* DD25C 80146B5C 00063300 */ sll $a2, $a2, 0xc -/* DD260 80146B60 AC850014 */ sw $a1, 0x14($a0) -/* DD264 80146B64 AC80001C */ sw $zero, 0x1c($a0) -/* DD268 80146B68 AC800024 */ sw $zero, 0x24($a0) -/* DD26C 80146B6C 8FAF0030 */ lw $t7, 0x30($sp) -/* DD270 80146B70 8FB70034 */ lw $s7, 0x34($sp) -/* DD274 80146B74 25E5FFFF */ addiu $a1, $t7, -1 -/* DD278 80146B78 02E52821 */ addu $a1, $s7, $a1 -/* DD27C 80146B7C 00052880 */ sll $a1, $a1, 2 -/* DD280 80146B80 30A50FFF */ andi $a1, $a1, 0xfff -/* DD284 80146B84 00A32825 */ or $a1, $a1, $v1 -/* DD288 80146B88 00451025 */ or $v0, $v0, $a1 -/* DD28C 80146B8C AC820030 */ sw $v0, 0x30($a0) -/* DD290 80146B90 00191080 */ sll $v0, $t9, 2 -/* DD294 80146B94 30420FFF */ andi $v0, $v0, 0xfff -/* DD298 80146B98 00021300 */ sll $v0, $v0, 0xc -/* DD29C 80146B9C 01AF1821 */ addu $v1, $t5, $t7 -/* DD2A0 80146BA0 00031880 */ sll $v1, $v1, 2 -/* DD2A4 80146BA4 30630FFF */ andi $v1, $v1, 0xfff -/* DD2A8 80146BA8 00431025 */ or $v0, $v0, $v1 -/* DD2AC 80146BAC AC820034 */ sw $v0, 0x34($a0) -/* DD2B0 80146BB0 02581023 */ subu $v0, $s2, $t8 -/* DD2B4 80146BB4 00021540 */ sll $v0, $v0, 0x15 -/* DD2B8 80146BB8 AC82003C */ sw $v0, 0x3c($a0) -/* DD2BC 80146BBC 02591021 */ addu $v0, $s2, $t9 -/* DD2C0 80146BC0 2442FFFF */ addiu $v0, $v0, -1 -/* DD2C4 80146BC4 00021080 */ sll $v0, $v0, 2 -/* DD2C8 80146BC8 30420FFF */ andi $v0, $v0, 0xfff -/* DD2CC 80146BCC 00021300 */ sll $v0, $v0, 0xc -/* DD2D0 80146BD0 00451025 */ or $v0, $v0, $a1 -/* DD2D4 80146BD4 00C33025 */ or $a2, $a2, $v1 -/* DD2D8 80146BD8 AC890038 */ sw $t1, 0x38($a0) -/* DD2DC 80146BDC AC880040 */ sw $t0, 0x40($a0) -/* DD2E0 80146BE0 AC8A0044 */ sw $t2, 0x44($a0) -/* DD2E4 80146BE4 AC820048 */ sw $v0, 0x48($a0) -/* DD2E8 80146BE8 24820058 */ addiu $v0, $a0, 0x58 -/* DD2EC 80146BEC AC86004C */ sw $a2, 0x4c($a0) -/* DD2F0 80146BF0 ACE20000 */ sw $v0, ($a3) -/* DD2F4 80146BF4 24820060 */ addiu $v0, $a0, 0x60 -/* DD2F8 80146BF8 AC890050 */ sw $t1, 0x50($a0) -/* DD2FC 80146BFC AC800054 */ sw $zero, 0x54($a0) -/* DD300 80146C00 ACE20000 */ sw $v0, ($a3) -/* DD304 80146C04 AC880058 */ sw $t0, 0x58($a0) -/* DD308 80146C08 08051C75 */ j .L801471D4 -/* DD30C 80146C0C AC8A005C */ sw $t2, 0x5c($a0) -.L80146C10: -/* DD310 80146C10 3C028007 */ lui $v0, %hi(gGameStatusPtr) -/* DD314 80146C14 8C42419C */ lw $v0, %lo(gGameStatusPtr)($v0) -/* DD318 80146C18 84420150 */ lh $v0, 0x150($v0) -/* DD31C 80146C1C 16200002 */ bnez $s1, .L80146C28 -/* DD320 80146C20 0051001A */ div $zero, $v0, $s1 -/* DD324 80146C24 0007000D */ break 7 -.L80146C28: -/* DD328 80146C28 2401FFFF */ addiu $at, $zero, -1 -/* DD32C 80146C2C 16210004 */ bne $s1, $at, .L80146C40 -/* DD330 80146C30 3C018000 */ lui $at, 0x8000 -/* DD334 80146C34 14410002 */ bne $v0, $at, .L80146C40 -/* DD338 80146C38 00000000 */ nop -/* DD33C 80146C3C 0006000D */ break 6 -.L80146C40: -/* DD340 80146C40 00007812 */ mflo $t7 -/* DD344 80146C44 0000B810 */ mfhi $s7 -/* DD348 80146C48 3C013DD6 */ lui $at, 0x3dd6 -/* DD34C 80146C4C 34217744 */ ori $at, $at, 0x7744 -/* DD350 80146C50 44810000 */ mtc1 $at, $f0 -/* DD354 80146C54 3C028015 */ lui $v0, %hi(D_8014F134) -/* DD358 80146C58 2442F134 */ addiu $v0, $v0, %lo(D_8014F134) -/* DD35C 80146C5C AFAF0070 */ sw $t7, 0x70($sp) -/* DD360 80146C60 AFB70038 */ sw $s7, 0x38($sp) -/* DD364 80146C64 C4420000 */ lwc1 $f2, ($v0) -/* DD368 80146C68 46001080 */ add.s $f2, $f2, $f0 -/* DD36C 80146C6C 0000982D */ daddu $s3, $zero, $zero -/* DD370 80146C70 19E000B1 */ blez $t7, .L80146F38 -/* DD374 80146C74 E4420000 */ swc1 $f2, ($v0) -/* DD378 80146C78 3C10800A */ lui $s0, %hi(gMasterGfxPos) -/* DD37C 80146C7C 2610A66C */ addiu $s0, $s0, %lo(gMasterGfxPos) -/* DD380 80146C80 2642FFFF */ addiu $v0, $s2, -1 -/* DD384 80146C84 30420FFF */ andi $v0, $v0, 0xfff -/* DD388 80146C88 3C03FD48 */ lui $v1, 0xfd48 -/* DD38C 80146C8C 00431025 */ or $v0, $v0, $v1 -/* DD390 80146C90 3C0BF548 */ lui $t3, 0xf548 -/* DD394 80146C94 356B4A00 */ ori $t3, $t3, 0x4a00 -/* DD398 80146C98 00197880 */ sll $t7, $t9, 2 -/* DD39C 80146C9C AFA20050 */ sw $v0, 0x50($sp) -/* DD3A0 80146CA0 31E20FFF */ andi $v0, $t7, 0xfff -/* DD3A4 80146CA4 00021300 */ sll $v0, $v0, 0xc -/* DD3A8 80146CA8 3C0EE100 */ lui $t6, 0xe100 -/* DD3AC 80146CAC 3C0DF100 */ lui $t5, 0xf100 -/* DD3B0 80146CB0 3C1E1000 */ lui $fp, 0x1000 -/* DD3B4 80146CB4 37DE0400 */ ori $fp, $fp, 0x400 -/* DD3B8 80146CB8 0220A82D */ daddu $s5, $s1, $zero -/* DD3BC 80146CBC 8FB60030 */ lw $s6, 0x30($sp) -/* DD3C0 80146CC0 0260A02D */ daddu $s4, $s3, $zero -/* DD3C4 80146CC4 AFAF0054 */ sw $t7, 0x54($sp) -/* DD3C8 80146CC8 AFA20058 */ sw $v0, 0x58($sp) -.L80146CCC: -/* DD3CC 80146CCC 3C013ED6 */ lui $at, 0x3ed6 -/* DD3D0 80146CD0 34217744 */ ori $at, $at, 0x7744 -/* DD3D4 80146CD4 44810000 */ mtc1 $at, $f0 -/* DD3D8 80146CD8 44936000 */ mtc1 $s3, $f12 -/* DD3DC 80146CDC 00000000 */ nop -/* DD3E0 80146CE0 46806320 */ cvt.s.w $f12, $f12 -/* DD3E4 80146CE4 46006302 */ mul.s $f12, $f12, $f0 -/* DD3E8 80146CE8 00000000 */ nop -/* DD3EC 80146CEC 3C018015 */ lui $at, %hi(D_8014F134) -/* DD3F0 80146CF0 C420F134 */ lwc1 $f0, %lo(D_8014F134)($at) -/* DD3F4 80146CF4 AFAB0060 */ sw $t3, 0x60($sp) -/* DD3F8 80146CF8 AFAD0064 */ sw $t5, 0x64($sp) -/* DD3FC 80146CFC 460C0300 */ add.s $f12, $f0, $f12 -/* DD400 80146D00 AFAE0068 */ sw $t6, 0x68($sp) -/* DD404 80146D04 0C00A85B */ jal sin_rad -/* DD408 80146D08 AFB9006C */ sw $t9, 0x6c($sp) -/* DD40C 80146D0C 3C014040 */ lui $at, 0x4040 -/* DD410 80146D10 44811000 */ mtc1 $at, $f2 -/* DD414 80146D14 3C0A8007 */ lui $t2, %hi(gGameStatusPtr) -/* DD418 80146D18 8D4A419C */ lw $t2, %lo(gGameStatusPtr)($t2) -/* DD41C 80146D1C 8FAB0060 */ lw $t3, 0x60($sp) -/* DD420 80146D20 8FAD0064 */ lw $t5, 0x64($sp) -/* DD424 80146D24 8FAE0068 */ lw $t6, 0x68($sp) -/* DD428 80146D28 8FB9006C */ lw $t9, 0x6c($sp) -/* DD42C 80146D2C 85420152 */ lh $v0, 0x152($t2) -/* DD430 80146D30 46020082 */ mul.s $f2, $f0, $f2 -/* DD434 80146D34 00000000 */ nop -/* DD438 80146D38 44820000 */ mtc1 $v0, $f0 -/* DD43C 80146D3C 00000000 */ nop -/* DD440 80146D40 46800020 */ cvt.s.w $f0, $f0 -/* DD444 80146D44 3C028015 */ lui $v0, %hi(D_8014F130) -/* DD448 80146D48 9442F130 */ lhu $v0, %lo(D_8014F130)($v0) -/* DD44C 80146D4C 85430150 */ lh $v1, 0x150($t2) -/* DD450 80146D50 00542021 */ addu $a0, $v0, $s4 -/* DD454 80146D54 46020000 */ add.s $f0, $f0, $f2 -/* DD458 80146D58 00041400 */ sll $v0, $a0, 0x10 -/* DD45C 80146D5C 00021403 */ sra $v0, $v0, 0x10 -/* DD460 80146D60 46000000 */ add.s $f0, $f0, $f0 -/* DD464 80146D64 0062182A */ slt $v1, $v1, $v0 -/* DD468 80146D68 95420150 */ lhu $v0, 0x150($t2) -/* DD46C 80146D6C 4600020D */ trunc.w.s $f8, $f0 -/* DD470 80146D70 44184000 */ mfc1 $t8, $f8 -/* DD474 80146D74 10600002 */ beqz $v1, .L80146D80 -/* DD478 80146D78 0080602D */ daddu $t4, $a0, $zero -/* DD47C 80146D7C 00826023 */ subu $t4, $a0, $v0 -.L80146D80: -/* DD480 80146D80 3C080749 */ lui $t0, 0x749 -/* DD484 80146D84 3508C014 */ ori $t0, $t0, 0xc014 -/* DD488 80146D88 3C090049 */ lui $t1, 0x49 -/* DD48C 80146D8C 3529C014 */ ori $t1, $t1, 0xc014 -/* DD490 80146D90 00163880 */ sll $a3, $s6, 2 -/* DD494 80146D94 02D1B021 */ addu $s6, $s6, $s1 -/* DD498 80146D98 0291A021 */ addu $s4, $s4, $s1 -/* DD49C 80146D9C 26730001 */ addiu $s3, $s3, 1 -/* DD4A0 80146DA0 30E70FFF */ andi $a3, $a3, 0xfff -/* DD4A4 80146DA4 8FB70030 */ lw $s7, 0x30($sp) -/* DD4A8 80146DA8 8E040000 */ lw $a0, ($s0) -/* DD4AC 80146DAC 26E6FFFF */ addiu $a2, $s7, -1 -/* DD4B0 80146DB0 02A63021 */ addu $a2, $s5, $a2 -/* DD4B4 80146DB4 0080282D */ daddu $a1, $a0, $zero -/* DD4B8 80146DB8 24840008 */ addiu $a0, $a0, 8 -/* DD4BC 80146DBC 24820008 */ addiu $v0, $a0, 8 -/* DD4C0 80146DC0 24830048 */ addiu $v1, $a0, 0x48 -/* DD4C4 80146DC4 00063080 */ sll $a2, $a2, 2 -/* DD4C8 80146DC8 AE040000 */ sw $a0, ($s0) -/* DD4CC 80146DCC 8FAF0050 */ lw $t7, 0x50($sp) -/* DD4D0 80146DD0 30C60FFF */ andi $a2, $a2, 0xfff -/* DD4D4 80146DD4 ACAF0000 */ sw $t7, ($a1) -/* DD4D8 80146DD8 AE020000 */ sw $v0, ($s0) -/* DD4DC 80146DDC 24820010 */ addiu $v0, $a0, 0x10 -/* DD4E0 80146DE0 AE020000 */ sw $v0, ($s0) -/* DD4E4 80146DE4 24820018 */ addiu $v0, $a0, 0x18 -/* DD4E8 80146DE8 AE020000 */ sw $v0, ($s0) -/* DD4EC 80146DEC 24820020 */ addiu $v0, $a0, 0x20 -/* DD4F0 80146DF0 AE020000 */ sw $v0, ($s0) -/* DD4F4 80146DF4 24820028 */ addiu $v0, $a0, 0x28 -/* DD4F8 80146DF8 AE020000 */ sw $v0, ($s0) -/* DD4FC 80146DFC 24820030 */ addiu $v0, $a0, 0x30 -/* DD500 80146E00 AE020000 */ sw $v0, ($s0) -/* DD504 80146E04 24820038 */ addiu $v0, $a0, 0x38 -/* DD508 80146E08 AE020000 */ sw $v0, ($s0) -/* DD50C 80146E0C 24820040 */ addiu $v0, $a0, 0x40 -/* DD510 80146E10 AE020000 */ sw $v0, ($s0) -/* DD514 80146E14 000C1400 */ sll $v0, $t4, 0x10 -/* DD518 80146E18 00021403 */ sra $v0, $v0, 0x10 -/* DD51C 80146E1C 02420018 */ mult $s2, $v0 -/* DD520 80146E20 AE030000 */ sw $v1, ($s0) -/* DD524 80146E24 8D430154 */ lw $v1, 0x154($t2) -/* DD528 80146E28 24820050 */ addiu $v0, $a0, 0x50 -/* DD52C 80146E2C AE020000 */ sw $v0, ($s0) -/* DD530 80146E30 3C020700 */ lui $v0, 0x700 -/* DD534 80146E34 00007812 */ mflo $t7 -/* DD538 80146E38 006F1821 */ addu $v1, $v1, $t7 -/* DD53C 80146E3C ACA30004 */ sw $v1, 4($a1) -/* DD540 80146E40 AC820004 */ sw $v0, 4($a0) -/* DD544 80146E44 3C02E600 */ lui $v0, 0xe600 -/* DD548 80146E48 AC820008 */ sw $v0, 8($a0) -/* DD54C 80146E4C 3C02F400 */ lui $v0, 0xf400 -/* DD550 80146E50 AC820010 */ sw $v0, 0x10($a0) -/* DD554 80146E54 3C02E700 */ lui $v0, 0xe700 -/* DD558 80146E58 AC820018 */ sw $v0, 0x18($a0) -/* DD55C 80146E5C 3C02F200 */ lui $v0, 0xf200 -/* DD560 80146E60 00182840 */ sll $a1, $t8, 1 -/* DD564 80146E64 AC820028 */ sw $v0, 0x28($a0) -/* DD568 80146E68 24A2FFFF */ addiu $v0, $a1, -1 -/* DD56C 80146E6C 00591021 */ addu $v0, $v0, $t9 -/* DD570 80146E70 00021080 */ sll $v0, $v0, 2 -/* DD574 80146E74 30420FFF */ andi $v0, $v0, 0xfff -/* DD578 80146E78 00021300 */ sll $v0, $v0, 0xc -/* DD57C 80146E7C 3C03E400 */ lui $v1, 0xe400 -/* DD580 80146E80 00C33025 */ or $a2, $a2, $v1 -/* DD584 80146E84 00461025 */ or $v0, $v0, $a2 -/* DD588 80146E88 AC8B0000 */ sw $t3, ($a0) -/* DD58C 80146E8C AC80000C */ sw $zero, 0xc($a0) -/* DD590 80146E90 AC880014 */ sw $t0, 0x14($a0) -/* DD594 80146E94 AC80001C */ sw $zero, 0x1c($a0) -/* DD598 80146E98 AC8B0020 */ sw $t3, 0x20($a0) -/* DD59C 80146E9C AC800024 */ sw $zero, 0x24($a0) -/* DD5A0 80146EA0 AC89002C */ sw $t1, 0x2c($a0) -/* DD5A4 80146EA4 AC820030 */ sw $v0, 0x30($a0) -/* DD5A8 80146EA8 8FB70058 */ lw $s7, 0x58($sp) -/* DD5AC 80146EAC 00181900 */ sll $v1, $t8, 4 -/* DD5B0 80146EB0 AC8E0038 */ sw $t6, 0x38($a0) -/* DD5B4 80146EB4 02E71025 */ or $v0, $s7, $a3 -/* DD5B8 80146EB8 AC820034 */ sw $v0, 0x34($a0) -/* DD5BC 80146EBC 00121140 */ sll $v0, $s2, 5 -/* DD5C0 80146EC0 00431023 */ subu $v0, $v0, $v1 -/* DD5C4 80146EC4 00021400 */ sll $v0, $v0, 0x10 -/* DD5C8 80146EC8 AC82003C */ sw $v0, 0x3c($a0) -/* DD5CC 80146ECC 02591021 */ addu $v0, $s2, $t9 -/* DD5D0 80146ED0 2442FFFF */ addiu $v0, $v0, -1 -/* DD5D4 80146ED4 00021080 */ sll $v0, $v0, 2 -/* DD5D8 80146ED8 30420FFF */ andi $v0, $v0, 0xfff -/* DD5DC 80146EDC 00021300 */ sll $v0, $v0, 0xc -/* DD5E0 80146EE0 00461025 */ or $v0, $v0, $a2 -/* DD5E4 80146EE4 AC8D0040 */ sw $t5, 0x40($a0) -/* DD5E8 80146EE8 AC9E0044 */ sw $fp, 0x44($a0) -/* DD5EC 80146EEC AC820048 */ sw $v0, 0x48($a0) -/* DD5F0 80146EF0 8FAF0054 */ lw $t7, 0x54($sp) -/* DD5F4 80146EF4 24820058 */ addiu $v0, $a0, 0x58 -/* DD5F8 80146EF8 00AF2821 */ addu $a1, $a1, $t7 -/* DD5FC 80146EFC 30A50FFF */ andi $a1, $a1, 0xfff -/* DD600 80146F00 00052B00 */ sll $a1, $a1, 0xc -/* DD604 80146F04 00A72825 */ or $a1, $a1, $a3 -/* DD608 80146F08 AC85004C */ sw $a1, 0x4c($a0) -/* DD60C 80146F0C AE020000 */ sw $v0, ($s0) -/* DD610 80146F10 24820060 */ addiu $v0, $a0, 0x60 -/* DD614 80146F14 AC8E0050 */ sw $t6, 0x50($a0) -/* DD618 80146F18 AC800054 */ sw $zero, 0x54($a0) -/* DD61C 80146F1C AE020000 */ sw $v0, ($s0) -/* DD620 80146F20 AC8D0058 */ sw $t5, 0x58($a0) -/* DD624 80146F24 AC9E005C */ sw $fp, 0x5c($a0) -/* DD628 80146F28 8FB70070 */ lw $s7, 0x70($sp) -/* DD62C 80146F2C 0277102A */ slt $v0, $s3, $s7 -/* DD630 80146F30 1440FF66 */ bnez $v0, .L80146CCC -/* DD634 80146F34 02B1A821 */ addu $s5, $s5, $s1 -.L80146F38: -/* DD638 80146F38 8FAF0038 */ lw $t7, 0x38($sp) -/* DD63C 80146F3C 11E000A5 */ beqz $t7, .L801471D4 -/* DD640 80146F40 00000000 */ nop -/* DD644 80146F44 3C013ED6 */ lui $at, 0x3ed6 -/* DD648 80146F48 34217744 */ ori $at, $at, 0x7744 -/* DD64C 80146F4C 44810000 */ mtc1 $at, $f0 -/* DD650 80146F50 44936000 */ mtc1 $s3, $f12 -/* DD654 80146F54 00000000 */ nop -/* DD658 80146F58 46806320 */ cvt.s.w $f12, $f12 -/* DD65C 80146F5C 46006302 */ mul.s $f12, $f12, $f0 -/* DD660 80146F60 00000000 */ nop -/* DD664 80146F64 3C018015 */ lui $at, %hi(D_8014F134) -/* DD668 80146F68 C420F134 */ lwc1 $f0, %lo(D_8014F134)($at) -/* DD66C 80146F6C 460C0300 */ add.s $f12, $f0, $f12 -/* DD670 80146F70 0C00A85B */ jal sin_rad -/* DD674 80146F74 AFB9006C */ sw $t9, 0x6c($sp) -/* DD678 80146F78 02330018 */ mult $s1, $s3 -/* DD67C 80146F7C 3C014040 */ lui $at, 0x4040 -/* DD680 80146F80 44811000 */ mtc1 $at, $f2 -/* DD684 80146F84 3C0A8007 */ lui $t2, %hi(gGameStatusPtr) -/* DD688 80146F88 8D4A419C */ lw $t2, %lo(gGameStatusPtr)($t2) -/* DD68C 80146F8C 8FB9006C */ lw $t9, 0x6c($sp) -/* DD690 80146F90 46020082 */ mul.s $f2, $f0, $f2 -/* DD694 80146F94 00000000 */ nop -/* DD698 80146F98 85420152 */ lh $v0, 0x152($t2) -/* DD69C 80146F9C 85430150 */ lh $v1, 0x150($t2) -/* DD6A0 80146FA0 44820000 */ mtc1 $v0, $f0 -/* DD6A4 80146FA4 00000000 */ nop -/* DD6A8 80146FA8 46800020 */ cvt.s.w $f0, $f0 -/* DD6AC 80146FAC 3C028015 */ lui $v0, %hi(D_8014F130) -/* DD6B0 80146FB0 9442F130 */ lhu $v0, %lo(D_8014F130)($v0) -/* DD6B4 80146FB4 00006812 */ mflo $t5 -/* DD6B8 80146FB8 004D2021 */ addu $a0, $v0, $t5 -/* DD6BC 80146FBC 46020000 */ add.s $f0, $f0, $f2 -/* DD6C0 80146FC0 00041400 */ sll $v0, $a0, 0x10 -/* DD6C4 80146FC4 00021403 */ sra $v0, $v0, 0x10 -/* DD6C8 80146FC8 46000000 */ add.s $f0, $f0, $f0 -/* DD6CC 80146FCC 0062182A */ slt $v1, $v1, $v0 -/* DD6D0 80146FD0 95420150 */ lhu $v0, 0x150($t2) -/* DD6D4 80146FD4 4600020D */ trunc.w.s $f8, $f0 -/* DD6D8 80146FD8 44184000 */ mfc1 $t8, $f8 -/* DD6DC 80146FDC 10600002 */ beqz $v1, .L80146FE8 -/* DD6E0 80146FE0 0080602D */ daddu $t4, $a0, $zero -/* DD6E4 80146FE4 00826023 */ subu $t4, $a0, $v0 -.L80146FE8: -/* DD6E8 80146FE8 3C07F548 */ lui $a3, 0xf548 -/* DD6EC 80146FEC 34E74A00 */ ori $a3, $a3, 0x4a00 -/* DD6F0 80146FF0 3C050749 */ lui $a1, 0x749 -/* DD6F4 80146FF4 34A5C000 */ ori $a1, $a1, 0xc000 -/* DD6F8 80146FF8 3C090049 */ lui $t1, 0x49 -/* DD6FC 80146FFC 3529C000 */ ori $t1, $t1, 0xc000 -/* DD700 80147000 3C0B1000 */ lui $t3, 0x1000 -/* DD704 80147004 3C08800A */ lui $t0, %hi(gMasterGfxPos) -/* DD708 80147008 2508A66C */ addiu $t0, $t0, %lo(gMasterGfxPos) -/* DD70C 8014700C 356B0400 */ ori $t3, $t3, 0x400 -/* DD710 80147010 2642FFFF */ addiu $v0, $s2, -1 -/* DD714 80147014 30420FFF */ andi $v0, $v0, 0xfff -/* DD718 80147018 3C03FD48 */ lui $v1, 0xfd48 -/* DD71C 8014701C 8D040000 */ lw $a0, ($t0) -/* DD720 80147020 00431025 */ or $v0, $v0, $v1 -/* DD724 80147024 0080302D */ daddu $a2, $a0, $zero -/* DD728 80147028 24840008 */ addiu $a0, $a0, 8 -/* DD72C 8014702C AD040000 */ sw $a0, ($t0) -/* DD730 80147030 ACC20000 */ sw $v0, ($a2) -/* DD734 80147034 24820008 */ addiu $v0, $a0, 8 -/* DD738 80147038 AD020000 */ sw $v0, ($t0) -/* DD73C 8014703C 24820010 */ addiu $v0, $a0, 0x10 -/* DD740 80147040 AD020000 */ sw $v0, ($t0) -/* DD744 80147044 24820018 */ addiu $v0, $a0, 0x18 -/* DD748 80147048 AD020000 */ sw $v0, ($t0) -/* DD74C 8014704C 24820020 */ addiu $v0, $a0, 0x20 -/* DD750 80147050 AD020000 */ sw $v0, ($t0) -/* DD754 80147054 24820028 */ addiu $v0, $a0, 0x28 -/* DD758 80147058 AD020000 */ sw $v0, ($t0) -/* DD75C 8014705C 24820030 */ addiu $v0, $a0, 0x30 -/* DD760 80147060 AD020000 */ sw $v0, ($t0) -/* DD764 80147064 24820038 */ addiu $v0, $a0, 0x38 -/* DD768 80147068 AD020000 */ sw $v0, ($t0) -/* DD76C 8014706C 24820040 */ addiu $v0, $a0, 0x40 -/* DD770 80147070 AD020000 */ sw $v0, ($t0) -/* DD774 80147074 000C1400 */ sll $v0, $t4, 0x10 -/* DD778 80147078 00021403 */ sra $v0, $v0, 0x10 -/* DD77C 8014707C 24830048 */ addiu $v1, $a0, 0x48 -/* DD780 80147080 02420018 */ mult $s2, $v0 -/* DD784 80147084 AD030000 */ sw $v1, ($t0) -/* DD788 80147088 8D420154 */ lw $v0, 0x154($t2) -/* DD78C 8014708C 24830050 */ addiu $v1, $a0, 0x50 -/* DD790 80147090 AD030000 */ sw $v1, ($t0) -/* DD794 80147094 3C03E700 */ lui $v1, 0xe700 -/* DD798 80147098 00195080 */ sll $t2, $t9, 2 -/* DD79C 8014709C 00007812 */ mflo $t7 -/* DD7A0 801470A0 004F1021 */ addu $v0, $v0, $t7 -/* DD7A4 801470A4 ACC20004 */ sw $v0, 4($a2) -/* DD7A8 801470A8 3C020700 */ lui $v0, 0x700 -/* DD7AC 801470AC AC820004 */ sw $v0, 4($a0) -/* DD7B0 801470B0 3C02E600 */ lui $v0, 0xe600 -/* DD7B4 801470B4 AC820008 */ sw $v0, 8($a0) -/* DD7B8 801470B8 3C02F400 */ lui $v0, 0xf400 -/* DD7BC 801470BC AC870000 */ sw $a3, ($a0) -/* DD7C0 801470C0 AC80000C */ sw $zero, 0xc($a0) -/* DD7C4 801470C4 AC820010 */ sw $v0, 0x10($a0) -/* DD7C8 801470C8 8FB70038 */ lw $s7, 0x38($sp) -/* DD7CC 801470CC 00183040 */ sll $a2, $t8, 1 -/* DD7D0 801470D0 26E2FFFF */ addiu $v0, $s7, -1 -/* DD7D4 801470D4 00021080 */ sll $v0, $v0, 2 -/* DD7D8 801470D8 30420FFF */ andi $v0, $v0, 0xfff -/* DD7DC 801470DC 00452825 */ or $a1, $v0, $a1 -/* DD7E0 801470E0 AC830018 */ sw $v1, 0x18($a0) -/* DD7E4 801470E4 3C03F200 */ lui $v1, 0xf200 -/* DD7E8 801470E8 00491025 */ or $v0, $v0, $t1 -/* DD7EC 801470EC AC82002C */ sw $v0, 0x2c($a0) -/* DD7F0 801470F0 24C2FFFF */ addiu $v0, $a2, -1 -/* DD7F4 801470F4 00591021 */ addu $v0, $v0, $t9 -/* DD7F8 801470F8 00021080 */ sll $v0, $v0, 2 -/* DD7FC 801470FC 30420FFF */ andi $v0, $v0, 0xfff -/* DD800 80147100 00021300 */ sll $v0, $v0, 0xc -/* DD804 80147104 AC830028 */ sw $v1, 0x28($a0) -/* DD808 80147108 3C03E400 */ lui $v1, 0xe400 -/* DD80C 8014710C 3C09E100 */ lui $t1, 0xe100 -/* DD810 80147110 00CA3021 */ addu $a2, $a2, $t2 -/* DD814 80147114 30C60FFF */ andi $a2, $a2, 0xfff -/* DD818 80147118 00063300 */ sll $a2, $a2, 0xc -/* DD81C 8014711C AC850014 */ sw $a1, 0x14($a0) -/* DD820 80147120 AC80001C */ sw $zero, 0x1c($a0) -/* DD824 80147124 AC870020 */ sw $a3, 0x20($a0) -/* DD828 80147128 AC800024 */ sw $zero, 0x24($a0) -/* DD82C 8014712C 8FAF0030 */ lw $t7, 0x30($sp) -/* DD830 80147130 8FB70034 */ lw $s7, 0x34($sp) -/* DD834 80147134 25E5FFFF */ addiu $a1, $t7, -1 -/* DD838 80147138 02E52821 */ addu $a1, $s7, $a1 -/* DD83C 8014713C 00052880 */ sll $a1, $a1, 2 -/* DD840 80147140 30A50FFF */ andi $a1, $a1, 0xfff -/* DD844 80147144 00A32825 */ or $a1, $a1, $v1 -/* DD848 80147148 00451025 */ or $v0, $v0, $a1 -/* DD84C 8014714C AC820030 */ sw $v0, 0x30($a0) -/* DD850 80147150 31420FFF */ andi $v0, $t2, 0xfff -/* DD854 80147154 00021300 */ sll $v0, $v0, 0xc -/* DD858 80147158 01AF3821 */ addu $a3, $t5, $t7 -/* DD85C 8014715C 00073880 */ sll $a3, $a3, 2 -/* DD860 80147160 30E70FFF */ andi $a3, $a3, 0xfff -/* DD864 80147164 00471025 */ or $v0, $v0, $a3 -/* DD868 80147168 AC820034 */ sw $v0, 0x34($a0) -/* DD86C 8014716C 00121140 */ sll $v0, $s2, 5 -/* DD870 80147170 00181900 */ sll $v1, $t8, 4 -/* DD874 80147174 00431023 */ subu $v0, $v0, $v1 -/* DD878 80147178 00021400 */ sll $v0, $v0, 0x10 -/* DD87C 8014717C 3C03F100 */ lui $v1, 0xf100 -/* DD880 80147180 AC82003C */ sw $v0, 0x3c($a0) -/* DD884 80147184 02591021 */ addu $v0, $s2, $t9 -/* DD888 80147188 2442FFFF */ addiu $v0, $v0, -1 -/* DD88C 8014718C 00021080 */ sll $v0, $v0, 2 -/* DD890 80147190 30420FFF */ andi $v0, $v0, 0xfff -/* DD894 80147194 00021300 */ sll $v0, $v0, 0xc -/* DD898 80147198 00451025 */ or $v0, $v0, $a1 -/* DD89C 8014719C 00C73025 */ or $a2, $a2, $a3 -/* DD8A0 801471A0 AC890038 */ sw $t1, 0x38($a0) -/* DD8A4 801471A4 AC830040 */ sw $v1, 0x40($a0) -/* DD8A8 801471A8 AC8B0044 */ sw $t3, 0x44($a0) -/* DD8AC 801471AC AC820048 */ sw $v0, 0x48($a0) -/* DD8B0 801471B0 24820058 */ addiu $v0, $a0, 0x58 -/* DD8B4 801471B4 AC86004C */ sw $a2, 0x4c($a0) -/* DD8B8 801471B8 AD020000 */ sw $v0, ($t0) -/* DD8BC 801471BC 24820060 */ addiu $v0, $a0, 0x60 -/* DD8C0 801471C0 AC890050 */ sw $t1, 0x50($a0) -/* DD8C4 801471C4 AC800054 */ sw $zero, 0x54($a0) -/* DD8C8 801471C8 AD020000 */ sw $v0, ($t0) -/* DD8CC 801471CC AC830058 */ sw $v1, 0x58($a0) -/* DD8D0 801471D0 AC8B005C */ sw $t3, 0x5c($a0) -.L801471D4: -/* DD8D4 801471D4 8FBF00A4 */ lw $ra, 0xa4($sp) -/* DD8D8 801471D8 8FBE00A0 */ lw $fp, 0xa0($sp) -/* DD8DC 801471DC 8FB7009C */ lw $s7, 0x9c($sp) -/* DD8E0 801471E0 8FB60098 */ lw $s6, 0x98($sp) -/* DD8E4 801471E4 8FB50094 */ lw $s5, 0x94($sp) -/* DD8E8 801471E8 8FB40090 */ lw $s4, 0x90($sp) -/* DD8EC 801471EC 8FB3008C */ lw $s3, 0x8c($sp) -/* DD8F0 801471F0 8FB20088 */ lw $s2, 0x88($sp) -/* DD8F4 801471F4 8FB10084 */ lw $s1, 0x84($sp) -/* DD8F8 801471F8 8FB00080 */ lw $s0, 0x80($sp) -/* DD8FC 801471FC D7B600B0 */ ldc1 $f22, 0xb0($sp) -/* DD900 80147200 D7B400A8 */ ldc1 $f20, 0xa8($sp) -/* DD904 80147204 03E00008 */ jr $ra -/* DD908 80147208 27BD00B8 */ addiu $sp, $sp, 0xb8 diff --git a/ver/us/asm/nonmatchings/effects/snowfall/snowfall_appendGfx.s b/ver/us/asm/nonmatchings/effects/snowfall/snowfall_appendGfx.s index 2a22961d8d..39384facd1 100644 --- a/ver/us/asm/nonmatchings/effects/snowfall/snowfall_appendGfx.s +++ b/ver/us/asm/nonmatchings/effects/snowfall/snowfall_appendGfx.s @@ -21,8 +21,8 @@ glabel snowfall_appendGfx /* 38CD58 E008A768 8E690028 */ lw $t1, 0x28($s3) /* 38CD5C E008A76C 8E630004 */ lw $v1, 4($s3) /* 38CD60 E008A770 A3A20059 */ sb $v0, 0x59($sp) -/* 38CD64 E008A774 3C028015 */ lui $v0, %hi(D_801512F0) -/* 38CD68 E008A778 8C4212F0 */ lw $v0, %lo(D_801512F0)($v0) +/* 38CD64 E008A774 3C028015 */ lui $v0, %hi(gBgRenderTypePtr) +/* 38CD68 E008A778 8C4212F0 */ lw $v0, %lo(gBgRenderTypePtr)($v0) /* 38CD6C E008A77C 8E7E002C */ lw $fp, 0x2c($s3) /* 38CD70 E008A780 00031880 */ sll $v1, $v1, 2 /* 38CD74 E008A784 90420000 */ lbu $v0, ($v0) diff --git a/ver/us/asm/nonmatchings/world/area_kmr/kmr_02/8B0070/func_80242BA8_8B2C18.s b/ver/us/asm/nonmatchings/world/area_kmr/kmr_02/8B0070/func_80242BA8_8B2C18.s index 955572ceb0..c5f2ed19be 100644 --- a/ver/us/asm/nonmatchings/world/area_kmr/kmr_02/8B0070/func_80242BA8_8B2C18.s +++ b/ver/us/asm/nonmatchings/world/area_kmr/kmr_02/8B0070/func_80242BA8_8B2C18.s @@ -2,8 +2,8 @@ .set noreorder # don't insert nops after branches glabel btl_state_draw_switch_to_player_8B2C18 -/* 8B2C18 80242BA8 3C038015 */ lui $v1, %hi(D_801512F0) -/* 8B2C1C 80242BAC 8C6312F0 */ lw $v1, %lo(D_801512F0)($v1) +/* 8B2C18 80242BA8 3C038015 */ lui $v1, %hi(gBgRenderTypePtr) +/* 8B2C1C 80242BAC 8C6312F0 */ lw $v1, %lo(gBgRenderTypePtr)($v1) /* 8B2C20 80242BB0 24020001 */ addiu $v0, $zero, 1 /* 8B2C24 80242BB4 A0620000 */ sb $v0, ($v1) /* 8B2C28 80242BB8 03E00008 */ jr $ra diff --git a/ver/us/symbol_addrs.txt b/ver/us/symbol_addrs.txt index a6dd3a00dc..c20023fdb1 100644 --- a/ver/us/symbol_addrs.txt +++ b/ver/us/symbol_addrs.txt @@ -4663,9 +4663,9 @@ D_8014F108 = 0x8014F108; // type:data rom:0xE5808 D_8014F110 = 0x8014F110; // type:data rom:0xE5810 gCloudyFlowerFieldsBg = 0x8014F120; // type:data rom:0xE5820 gSunnyFlowerFieldsBg = 0x8014F128; // type:data rom:0xE5828 -D_8014F12F = 0x8014F12F; // type:data rom:0xE582F -D_8014F130 = 0x8014F130; // type:data rom:0xE5830 -D_8014F134 = 0x8014F134; // type:data rom:0xE5834 +gBackroundWaveEnabled = 0x8014F12F; // type:data rom:0xE582F +gBackroundTextureYOffset = 0x8014F130; // type:data rom:0xE5830 +gBackroundWavePhase = 0x8014F134; // type:data rom:0xE5834 AmbientSound = 0x8014F140; // type:data rom:0xE5840 gWindowStyles = 0x8014F150; // type:data rom:0xE5850 gSimpleWindowUpdates = 0x8014F250; // type:data rom:0xE5950 @@ -4833,7 +4833,7 @@ gCurrentTransformGroups = 0x801512E0; // type:data rom:0xE79E0 gMsgGlobalWaveCounter = 0x801512E4; // type:data rom:0xE79E4 gCurrentCustomModelGfxPtr = 0x801512E8; // rom:0xE79E8 gLastCreatedEntityIndex = 0x801512EC; // rom:0xE79EC -D_801512F0 = 0x801512F0; // type:data rom:0xE79F0 +gBgRenderTypePtr = 0x801512F0; // type:data rom:0xE79F0 gMsgVarImages = 0x801512F4; // type:data rom:0xE79F4 ItemEntitiesCreated = 0x801512F8; // type:data rom:0xE79F8 gCurrentModelTreeRoot = 0x801512FC; // type:data rom:0xE79FC @@ -5238,10 +5238,10 @@ bTriggerList = 0x80159290; // rom:0xEF990 InterpCamTargetPos = 0x802CB008; // type:func rom:0xEF9B8 gCurrentTriggerListPtr = 0x80159390; // rom:0xEFA90 D_80159394 = 0x80159394; // type:data rom:0xEFA94 -D_801593A0 = 0x801593A0; // type:data rom:0xEFAA0 +gBackgroundPalette = 0x801593A0; // type:data rom:0xEFAA0 ShakeCam = 0x802CB2A8; // type:func rom:0xEFC58 D_8015959E = 0x8015959E; // type:data rom:0xEFC9E -D_801595A0 = 0x801595A0; // type:data rom:0xEFCA0 +gBackroundLastScrollValue = 0x801595A0; // type:data rom:0xEFCA0 D_801595C0 = 0x801595C0; // type:data rom:0xEFCC0 D_80159670 = 0x80159670; // type:data rom:0xEFD70 D_80159720 = 0x80159720; // type:data rom:0xEFE20 @@ -6465,8 +6465,8 @@ update_actor_shadows = 0x8023E404; // type:func rom:0x16CCE4 btl_update = 0x8023E438; // type:func rom:0x16CD18 btl_draw_ui = 0x8023EA7C; // type:func rom:0x16D35C func_8023ED5C = 0x8023ED5C; // type:func rom:0x16D63C -func_8023F060 = 0x8023F060; // type:func rom:0x16D940 -func_8023F088 = 0x8023F088; // type:func rom:0x16D968 +blend_background_channel_COPY = 0x8023F060; // type:func rom:0x16D940 +tattle_cam_pre_render = 0x8023F088; // type:func rom:0x16D968 func_8023FF84 = 0x8023FF84; // type:func rom:0x16E864 btl_draw_enemy_health_bars = 0x8023FFA0; // type:func rom:0x16E880 btl_update_starpoints_display = 0x802403BC; // type:func rom:0x16EC9C @@ -7197,7 +7197,7 @@ D_802809F4 = 0x802809F4; // type:data rom:0x1AF2D4 D_802809F5 = 0x802809F5; // type:data rom:0x1AF2D5 D_802809F6 = 0x802809F6; // type:data rom:0x1AF2D6 D_802809F8 = 0x802809F8; // type:data rom:0x1AF2D8 -D_802809FA = 0x802809FA; // type:data rom:0x1AF2DA +gTattleBgTextureYOffset = 0x802809FA; // type:data rom:0x1AF2DA bHPDigitHudScripts = 0x802809FC; // type:data rom:0x1AF2DC D_80280A30 = 0x80280A30; // type:data rom:0x1AF310 BtlPutPartnerAway = 0x80280A34; // rom:0x1AF314 @@ -26743,7 +26743,7 @@ D_8029EFBC = 0x8029EFBC; // type:data D_8029EFC0 = 0x8029EFC0; // type:data D_8029EFE8 = 0x8029EFE8; // type:data D_8029F010 = 0x8029F010; // type:data -D_8029F038 = 0x8029F038; // type:data +gTattleBgPalette = 0x8029F038; // type:data D_8029F240 = 0x8029F240; // type:data D_8029F244 = 0x8029F244; // type:data D_8029F248 = 0x8029F248; // type:data