entity models and some gfx functions (#731)

* decomp 7 functions

* match func_80138E54

* matched render_transition_stencil

* renames

* fix warnings

* fix two warnings
This commit is contained in:
Unnunu 2022-06-12 20:22:06 +03:00 committed by GitHub
parent bae34c46ed
commit e324092e0a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
21 changed files with 992 additions and 5331 deletions

View File

@ -2284,6 +2284,13 @@ typedef struct PartnerActionStatus {
/* 0x35C */ char unk_35C[0x4]; /* 0x35C */ char unk_35C[0x4];
} PartnerActionStatus; // size = 0x360 } PartnerActionStatus; // size = 0x360
typedef struct SpriteRasterInfo {
/* 0x00 */ void* raster;
/* 0x04 */ void* defaultPal;
/* 0x08 */ s32 width;
/* 0x0C */ s32 height;
} SpriteRasterInfo; // size = 0x10
typedef struct EntityModel { typedef struct EntityModel {
/* 0x00 */ s32 flags; /* 0x00 */ s32 flags;
/* 0x04 */ s8 renderMode; /* 0x04 */ s8 renderMode;
@ -2293,12 +2300,15 @@ typedef struct EntityModel {
/* 0x08 */ f32 nextFrameTime; ///< Set to 1.0 after each update /* 0x08 */ f32 nextFrameTime; ///< Set to 1.0 after each update
/* 0x0C */ f32 timeScale; ///< Default is 1.0 /* 0x0C */ f32 timeScale; ///< Default is 1.0
/* 0x10 */ s32* cmdListReadPos; /* 0x10 */ s32* cmdListReadPos;
/* 0x14 */ Gfx* displayList; /* 0x14 */ union {
Gfx* displayList;
SpriteRasterInfo* imageData;
} gfx;
/* 0x18 */ Mtx transform; /* 0x18 */ Mtx transform;
/* 0x58 */ s32* cmdListSavedPos; /* 0x58 */ s32* cmdListSavedPos;
/* 0x5C */ Vtx* vertexArray; /* 0x5C */ Vec3s* vertexArray;
/* 0x60 */ UNK_FUN_PTR(fpSetupGfxCallback); /* 0x60 */ void (*fpSetupGfxCallback)(void*);
/* 0x64 */ s32 setupGfxCallbackArg0; /* 0x64 */ void* setupGfxCallbackArg0;
} EntityModel; // size = 0x68 } EntityModel; // size = 0x68
typedef EntityModel* EntityModelList[MAX_ENTITY_MODELS]; typedef EntityModel* EntityModelList[MAX_ENTITY_MODELS];

View File

@ -2214,14 +2214,17 @@ enum RenderMode {
RENDER_MODE_SURFACE_XLU_NO_ZB = 0x00000014, RENDER_MODE_SURFACE_XLU_NO_ZB = 0x00000014,
RENDER_MODE_SURFXLU_ZB_ZUPD = 0x00000015, RENDER_MODE_SURFXLU_ZB_ZUPD = 0x00000015,
RENDER_MODE_SURFACE_XLU_LAYER2 = 0x00000016, RENDER_MODE_SURFACE_XLU_LAYER2 = 0x00000016,
RENDER_MODE_17 = 0x00000017,
RENDER_MODE_DECAL_XLU = 0x0000001A, RENDER_MODE_DECAL_XLU = 0x0000001A,
RENDER_MODE_DECAL_XLU_NOAA = 0x0000001C, RENDER_MODE_DECAL_XLU_NOAA = 0x0000001C,
RENDER_MODE_1E = 0x0000001E,
RENDER_MODE_SHADOW = 0x00000020, RENDER_MODE_SHADOW = 0x00000020,
RENDER_MODE_SURFACE_XLU_LAYER3 = 0x00000022, RENDER_MODE_SURFACE_XLU_LAYER3 = 0x00000022,
RENDER_MODE_INTERSECTING_XLU = 0x00000026, RENDER_MODE_INTERSECTING_XLU = 0x00000026,
RENDER_MODE_28 = 0x00000028, RENDER_MODE_28 = 0x00000028,
RENDER_MODE_SURFXLU_AA_ZB_ZUPD = 0x00000029, RENDER_MODE_SURFXLU_AA_ZB_ZUPD = 0x00000029,
RENDER_MODE_2A = 0x0000002A,
RENDER_MODE_2B = 0x0000002B,
RENDER_MODE_2C = 0x0000002C,
RENDER_MODE_2D = 0x0000002D, RENDER_MODE_2D = 0x0000002D,
RENDER_MODE_CLOUD = 0x0000002E, RENDER_MODE_CLOUD = 0x0000002E,
RENDER_MODE_CLOUD_NO_ZB = 0x0000002F, RENDER_MODE_CLOUD_NO_ZB = 0x0000002F,
@ -3485,24 +3488,24 @@ enum DrawFlags {
}; };
enum EntityModelFlags { enum EntityModelFlags {
ENTITY_MODEL_FLAGS_1 = 0x00000001, ENTITY_MODEL_FLAGS_CAM0 = 0x00000001,
ENTITY_MODEL_FLAGS_2 = 0x00000002, ENTITY_MODEL_FLAGS_CAM1 = 0x00000002,
ENTITY_MODEL_FLAGS_4 = 0x00000004, ENTITY_MODEL_FLAGS_CAM2 = 0x00000004,
ENTITY_MODEL_FLAGS_8 = 0x00000008, ENTITY_MODEL_FLAGS_CAM3 = 0x00000008,
ENTITY_MODEL_FLAGS_10 = 0x00000010, ENTITY_MODEL_FLAGS_ENABLED = 0x00000010,
ENTITY_MODEL_FLAGS_20 = 0x00000020, ENTITY_MODEL_FLAGS_HIDDEN = 0x00000020,
ENTITY_MODEL_FLAGS_40 = 0x00000040, ENTITY_MODEL_FLAGS_40 = 0x00000040,
ENTITY_MODEL_FLAGS_80 = 0x00000080, ENTITY_MODEL_FLAGS_80 = 0x00000080,
ENTITY_MODEL_FLAGS_100 = 0x00000100, ENTITY_MODEL_FLAGS_100 = 0x00000100,
ENTITY_MODEL_FLAGS_200 = 0x00000200, ENTITY_MODEL_FLAGS_200 = 0x00000200,
ENTITY_MODEL_FLAGS_400 = 0x00000400, ENTITY_MODEL_FLAGS_USE_IMAGE = 0x00000400,
ENTITY_MODEL_FLAGS_800 = 0x00000800, ENTITY_MODEL_FLAGS_FOG_DISABLED = 0x00000800,
ENTITY_MODEL_FLAGS_1000 = 0x00001000, ENTITY_MODEL_FLAGS_1000 = 0x00001000,
ENTITY_MODEL_FLAGS_2000 = 0x00002000, ENTITY_MODEL_FLAGS_2000 = 0x00002000,
ENTITY_MODEL_FLAGS_4000 = 0x00004000, ENTITY_MODEL_FLAGS_4000 = 0x00004000,
ENTITY_MODEL_FLAGS_8000 = 0x00008000, ENTITY_MODEL_FLAGS_8000 = 0x00008000,
ENTITY_MODEL_FLAGS_10000 = 0x00010000, ENTITY_MODEL_FLAGS_10000 = 0x00010000,
ENTITY_MODEL_FLAGS_20000 = 0x00020000, ENTITY_MODEL_FLAGS_DISABLE_SCRIPT = 0x00020000,
ENTITY_MODEL_FLAGS_40000 = 0x00040000, ENTITY_MODEL_FLAGS_40000 = 0x00040000,
ENTITY_MODEL_FLAGS_80000 = 0x00080000, ENTITY_MODEL_FLAGS_80000 = 0x00080000,
ENTITY_MODEL_FLAGS_100000 = 0x00100000, ENTITY_MODEL_FLAGS_100000 = 0x00100000,

View File

@ -818,7 +818,7 @@ void btl_set_state(s32 battleState);
void draw_entity_model_A(s32, Mtx*); void draw_entity_model_A(s32, Mtx*);
void draw_entity_model_B(s32, Mtx*, s32, Vec3s*); void draw_entity_model_B(s32, Mtx*, s32, Vec3s*);
void draw_entity_model_C(s32, Mtx*); void draw_entity_model_C(s32, Mtx*);
void draw_entity_model_D(s32, Mtx*, s32, Vtx*); void draw_entity_model_D(s32, Mtx*, s32, Vec3s*);
void draw_entity_model_E(s32, Mtx*); void draw_entity_model_E(s32, Mtx*);
void free_entity_model_by_index(s32 idx); void free_entity_model_by_index(s32 idx);
void btl_cam_use_preset(s32); void btl_cam_use_preset(s32);

View File

@ -11,5 +11,7 @@ typedef struct ScreenOverlay {
} ScreenOverlay; // size = 0x18 } ScreenOverlay; // size = 0x18
void _render_transition_stencil(u8, f32, ScreenOverlay*); void _render_transition_stencil(u8, f32, ScreenOverlay*);
void func_80139F10(s32, s32, f32, s32, s32, s32, s32, s32);
void func_80138E54(s32, s32, s32, f32, f32);
#endif #endif

View File

@ -1,9 +1,275 @@
#include "common.h" #include "common.h"
#include "nu/nusys.h"
INCLUDE_ASM(s32, "CEE40", func_80138740); Gfx D_8014ED90[] = {
gsSPEndDisplayList(),
};
INCLUDE_ASM(void, "CEE40", func_80138D88, s32 param0, s32 param1, s32 param2, s32 param3, f32 param4); Vp D_8014ED98 = {
.vp = {
.vscale = { 128, 128, 511, 0 },
.vtrans = { 128, 128, 511, 0 }
}
};
INCLUDE_ASM(s32, "CEE40", func_80138E54); Vtx D_8014EDA8[4] = {
{{{ -16,-16, 0 }, 0, { 0x0000, 0x0000 }, { 0, 0, 0, 255 }}},
{{{ 16,-16, 0 }, 0, { 0x1000, 0x0000 }, { 0, 0, 0, 255 }}},
{{{ 16, 16, 0 }, 0, { 0x1000, 0x1000 }, { 0, 0, 0, 255 }}},
{{{ -16, 16, 0 }, 0, { 0x0000, 0x1000 }, { 0, 0, 0, 255 }}},
};
INCLUDE_ASM(s32, "CEE40", func_80139F10); Gfx D_8014EDE8[] = {
gsSPVertex(D_8014EDA8, 4, 0),
gsSP2Triangles(0, 1, 2, 0, 0, 2, 3, 0),
gsDPPipeSync(),
gsSPEndDisplayList(),
};
void func_80138740(s32 x1, s32 y1, s32 x2, s32 y2, f32 arg4) {
s32 t9, sp10;
s32 i;
u16* prevGfxCfb = NULL;
x1 -= x1 % 4;
x2 = x2 - x2 % 4 + 4;
t9 = (y2 - y1) / 6;
sp10 = (y2 - y1) % 6;
for (i = 0; i < nuGfxCfbNum; i++) {
if (nuGfxCfb[i] == nuGfxCfb_ptr) {
prevGfxCfb = nuGfxCfb[(i + nuGfxCfbNum - 1) % nuGfxCfbNum];
}
}
gDPSetCycleType(gMasterGfxPos++, G_CYC_1CYCLE);
gDPSetCombineLERP(gMasterGfxPos++, 0, 0, 0, TEXEL0, 0, 0, 0, PRIMITIVE, 0, 0, 0, TEXEL0, 0, 0, 0, PRIMITIVE);
gDPSetRenderMode(gMasterGfxPos++, G_RM_CLD_SURF, G_RM_CLD_SURF2);
gDPSetColorDither(gMasterGfxPos++, G_CD_DISABLE);
gDPSetAlphaDither(gMasterGfxPos++, G_AD_NOISE);
gDPSetTextureFilter(gMasterGfxPos++, G_TF_POINT);
gDPSetTexturePersp(gMasterGfxPos++, G_TP_NONE);
gSPTexture(gMasterGfxPos++, 0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON);
gDPSetTextureLUT(gMasterGfxPos++, G_TT_NONE);
gDPSetTextureDetail(gMasterGfxPos++, G_TD_CLAMP);
gDPSetTextureLOD(gMasterGfxPos++, G_TL_TILE);
gDPSetPrimColor(gMasterGfxPos++, 0, 0, 255, 255, 255, arg4);
for (i = 0; i < t9; i++) {
gDPLoadTextureTile(gMasterGfxPos++, osVirtualToPhysical(prevGfxCfb), G_IM_FMT_RGBA, G_IM_SIZ_16b, 320, 6,
x1, y1 + i * 6, x2 - 1, y1 + i * 6 + 5, 0,
G_TX_WRAP, G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD);
gSPTextureRectangle(gMasterGfxPos++, x1 * 4, (y1 + i * 6) * 4, x2 * 4, (y1 + i * 6 + 6) * 4,
G_TX_RENDERTILE, x1 * 32, (y1 + i * 6) * 32, 1024, 1024);
}
if (sp10 != 0) {
gDPLoadTextureTile(gMasterGfxPos++, osVirtualToPhysical(prevGfxCfb), G_IM_FMT_RGBA, G_IM_SIZ_16b, 320, sp10,
x1, y1 + i * 6, x2 - 1, y1 + i * 6 + sp10 - 1, 0,
G_TX_WRAP, G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD);
gSPTextureRectangle(gMasterGfxPos++, x1 * 4, (y1 + i * 6) * 4, x2 * 4, (y1 + i * 6 + sp10) * 4,
G_TX_RENDERTILE, x1 * 32, (y1 + i * 6) * 32, 1024, 1024);
}
}
void func_80138D88(s32 x1, s32 y1, s32 x2, s32 y2, f32 alpha) {
s32 minX;
s32 minY;
s32 maxX;
s32 maxY;
maxX = x2;
maxY = y2;
if (maxX < x1) {
minX = maxX;
maxX = x1;
} else {
minX = x1;
}
minY = maxY;
if (maxY < y1) {
maxY = y1;
} else {
minY = y1;
}
if (minX < maxX && minY < maxY) {
if (minX < 0) {
minX = 0;
}
if (minY < 0) {
minY = 0;
}
if (maxX < 0) {
maxX = 0;
}
if (maxY < 0) {
maxY = 0;
}
if (minX >= SCREEN_WIDTH) {
minX = SCREEN_WIDTH - 1;
}
if (minY >= SCREEN_HEIGHT) {
minY = SCREEN_HEIGHT - 1;
}
if (maxX >= SCREEN_WIDTH) {
maxX = SCREEN_WIDTH - 1;
}
if (maxY >= SCREEN_HEIGHT) {
maxY = SCREEN_HEIGHT - 1;
}
if (minX != maxX && minY != maxY) {
func_80138740(minX, minY, maxX, maxY, alpha);
}
}
}
void func_80138E54(s32 arg0, s32 arg1, s32 arg2, f32 arg3, f32 arg4) {
Camera* camera = &gCameras[gCurrentCameraID];
f32 texScale, f24;
s32 i;
if (arg3 == 0.0f) {
return;
}
if (arg0 == 0) {
texScale = (255.0f - arg3) * 10.0f / 255.0f + 0.14;
} else {
texScale = 0.5f;
texScale = (255.0f - arg3) * 9.5f / 255.0f + texScale;
arg1 += (camera->viewportW / 2 - arg1) * (255.0f - arg3) / 255.0f;
arg2 += (camera->viewportH / 2 - arg2) * (255.0f - arg3) / 255.0f;
}
guOrtho(&gDisplayContext->matrixStack[gMatrixListPos], -16.0f, 0.0f, 0.0f, 16.0f, -1000.0f, 1000.0f, 1.0f);
gSPMatrix(gMasterGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_PROJECTION);
gDPSetAlphaDither(gMasterGfxPos++, G_AD_PATTERN);
gDPSetTextureFilter(gMasterGfxPos++, G_TF_POINT);
gDPSetTexturePersp(gMasterGfxPos++, G_TP_PERSP);
gDPSetColorImage(gMasterGfxPos++, G_IM_FMT_RGBA, G_IM_SIZ_32b, 64, osVirtualToPhysical(nuGfxZBuffer));
gDPSetScissor(gMasterGfxPos++, G_SC_NON_INTERLACE, 0, 0, 64, 64);
gSPViewport(gMasterGfxPos++, &D_8014ED98);
gDPSetCombineLERP(gMasterGfxPos++, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1);
guRotate(&gDisplayContext->matrixStack[gMatrixListPos], 0.0f, 0.0f, 0.0f, 1.0f);
gSPMatrix(gMasterGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
gSPDisplayList(gMasterGfxPos++, D_8014EDE8);
gSPPopMatrix(gMasterGfxPos++, G_MTX_MODELVIEW);
gDPPipeSync(gMasterGfxPos++);
gDPSetCombineLERP(gMasterGfxPos++, 0, 0, 0, 0, PRIMITIVE, TEXEL0, PRIMITIVE, 0, 0, 0, 0, 0, PRIMITIVE, TEXEL0, PRIMITIVE, 0);
for (i = 0; i < 2; i++) {
f32 f20;
f32 f2;
s32 s0 = 255;
if (i == 0) {
f20 = 0.9 - sin_deg(gGameStatusPtr->frameCounter) * 0.05;
} else {
f20 = 0.9 - sin_deg(gGameStatusPtr->frameCounter * 2 + i * 40) * 0.07;
}
f2 = 0;
if (s0 > 255) {
s0 = 255;
}
gDPSetPrimColor(gMasterGfxPos++, 0, 0, 255, 255, 255, s0);
guRotate(&gDisplayContext->matrixStack[gMatrixListPos], i * 70 + f2, 0.0f, 0.0f, 1.0f);
gSPMatrix(gMasterGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
guScale(&gDisplayContext->matrixStack[gMatrixListPos], f20, f20, 1.0f);
gSPMatrix(gMasterGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_NOPUSH | G_MTX_MUL | G_MTX_MODELVIEW);
gSPDisplayList(gMasterGfxPos++, D_8014EDE8);
gSPPopMatrix(gMasterGfxPos++, G_MTX_MODELVIEW);
}
gDPPipeSync(gMasterGfxPos++);
gDPSetTexturePersp(gMasterGfxPos++, G_TP_NONE);
gDPSetColorImage(gMasterGfxPos++, G_IM_FMT_I, G_IM_SIZ_8b, 64, osVirtualToPhysical(nuGfxZBuffer));
gDPSetScissor(gMasterGfxPos++, G_SC_NON_INTERLACE, 0, 0, 64, 64);
gDPSetCombineLERP(gMasterGfxPos++, 0, 0, 0, TEXEL0, 0, 0, 0, 1, 0, 0, 0, TEXEL0, 0, 0, 0, 1);
for (i = 0; i < 4; i++) {
gDPLoadTextureTile(gMasterGfxPos++, osVirtualToPhysical(&nuGfxZBuffer[i * 2048]), G_IM_FMT_RGBA, G_IM_SIZ_32b, 64, 16, 0, 0, 63, 15, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD);
gDPPipeSync(gMasterGfxPos++);
gSPTextureRectangle(gMasterGfxPos++, 0, (i * 16) * 4, 64 * 4, (i * 16 + 16) * 4, G_TX_RENDERTILE, 0, 0, 0x400, 0x400);
gDPPipeSync(gMasterGfxPos++);
}
gDPLoadTextureTile(gMasterGfxPos++, osVirtualToPhysical(nuGfxZBuffer), G_IM_FMT_I, G_IM_SIZ_8b, 64, 64, 0, 0, 63, 63,
0, G_TX_MIRROR | G_TX_CLAMP, G_TX_MIRROR | G_TX_CLAMP, 6, 6, 15, 15);
gDPSetTileSize(gMasterGfxPos++, G_TX_RENDERTILE, 0, 0, 0x01FC, 0x01FC);
gDPPipeSync(gMasterGfxPos++);
gDPSetCycleType(gMasterGfxPos++, G_CYC_FILL);
gDPSetRenderMode(gMasterGfxPos++, G_RM_NOOP, G_RM_NOOP2);
gDPSetColorImage(gMasterGfxPos++, G_IM_FMT_RGBA, G_IM_SIZ_32b, 64, osVirtualToPhysical(nuGfxZBuffer));
gDPSetFillColor(gMasterGfxPos++, GPACK_ZDZ(G_MAXFBZ, 0)<<16 | GPACK_ZDZ(G_MAXFBZ, 0));
gDPFillRectangle(gMasterGfxPos++, 0, 0, 63, 63);
gDPPipeSync(gMasterGfxPos++);
gDPSetColorImage(gMasterGfxPos++, G_IM_FMT_RGBA, G_IM_SIZ_16b, SCREEN_WIDTH, osVirtualToPhysical(nuGfxCfb_ptr));
gDPSetScissor(gMasterGfxPos++, G_SC_NON_INTERLACE, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT);
gDPSetCycleType(gMasterGfxPos++, G_CYC_1CYCLE);
gDPSetColorDither(gMasterGfxPos++, G_CD_MAGICSQ);
gDPSetAlphaDither(gMasterGfxPos++, G_AD_PATTERN);
gDPSetTextureFilter(gMasterGfxPos++, G_TF_AVERAGE);
gDPSetRenderMode(gMasterGfxPos++, G_RM_CLD_SURF, G_RM_CLD_SURF2);
if (arg3 != 255.0f || arg0 == 1) {
gDPSetCombineLERP(gMasterGfxPos++, 1, TEXEL0, PRIMITIVE, 0, TEXEL0, 0, ENVIRONMENT, PRIMITIVE, 1, TEXEL0, PRIMITIVE, 0, TEXEL0, 0, ENVIRONMENT, PRIMITIVE);
} else {
gDPSetCombineLERP(gMasterGfxPos++, 0, 0, 0, 0, 1, 0, ENVIRONMENT, PRIMITIVE, 0, 0, 0, 0, 1, 0, ENVIRONMENT, PRIMITIVE);
}
arg3 *= 0.5f;
gDPSetPrimColor(gMasterGfxPos++, 0, 0, 0, 0, 0, arg3 * 0.5f * arg4 / 255.0f);
gDPSetEnvColor(gMasterGfxPos++, 255, 255, 255, (255.0f - arg3 * 0.5f) * arg4 / 255.0f);
if (arg0 == 0) {
gSPTextureRectangle(gMasterGfxPos++,
camera->viewportStartX * 4, camera->viewportStartY * 4,
(camera->viewportStartX + camera->viewportW) * 4, (camera->viewportStartY + camera->viewportH) * 4,
G_TX_RENDERTILE,
(12 - arg1) * 32.0f / texScale + 16.0f + 1024.0f, (19 - arg2) * 32.0f / texScale + 16.0f + 1024.0f,
1024.0f / texScale, 1024.0f / texScale);
} else {
gSPTextureRectangle(gMasterGfxPos++,
camera->viewportStartX * 4, camera->viewportStartY * 4,
(camera->viewportStartX + camera->viewportW) * 4, (camera->viewportStartY + camera->viewportH) * 4,
G_TX_RENDERTILE,
(9 - arg1) * 32.0f / texScale + 1024.0f, (32 - arg2) * 32.0f / texScale + 1024.0f,
1024.0f / texScale, 1024.0f / texScale);
}
}
void func_80139F10(s32 arg0, s32 arg1, f32 alpha, s32 primR, s32 primG, s32 primB, s32 primA, s32 camID) {
s32 x1, y1, x2, y2, t5, t6;
f32 texScale;
if (camID >= 0) {
x1 = gCameras[camID].viewportStartX;
y1 = gCameras[camID].viewportStartY;
x2 = gCameras[camID].viewportStartX + gCameras[camID].viewportW;
y2 = gCameras[camID].viewportStartY + gCameras[camID].viewportH;
t5 = x1;
t6 = y1;
} else {
x1 = 0;
y1 = 0;
x2 = SCREEN_WIDTH;
y2 = SCREEN_HEIGHT;
t5 = 0;
t6 = 0;
}
if (alpha == 0.0f) {
return;
}
gDPSetScissor(gMasterGfxPos++, G_SC_NON_INTERLACE, x1, y1, x2, y2);
if (alpha == 255.0f) {
gDPSetCombineLERP(gMasterGfxPos++, 0, 0, 0, PRIMITIVE, 0, 0, 0, 1, 0, 0, 0, PRIMITIVE, 0, 0, 0, 1);
}
gDPSetPrimColor(gMasterGfxPos++, 0, 0, primR, primG, primB, primA);
texScale = (255.0f - alpha) * 10.5f / 255.0f + 0.09; // range from
gSPTextureRectangle(gMasterGfxPos++, x1 * 4, y1 * 4, x2 * 4, y2 * 4, G_TX_RENDERTILE,
(t5 - arg0) * 32.0f / texScale + 16.0f + 1024.0f, (t6 - arg1) * 32.0f / texScale + 16.0f + 1024.0f,
1024.0f / texScale, 1024.0f / texScale);
gDPPipeSync(gMasterGfxPos++);
}

View File

@ -43,22 +43,22 @@ Gfx Gfx_LoadStencilTex_CommonParams[] = {
}; };
Gfx Gfx_LoadStencilTex_SharpCircle[] = { Gfx Gfx_LoadStencilTex_SharpCircle[] = {
gsSPDisplayList(&Gfx_LoadStencilTex_CommonParams), gsSPDisplayList(Gfx_LoadStencilTex_CommonParams),
gsDPSetTextureLUT(G_TT_NONE), gsDPSetTextureLUT(G_TT_NONE),
gsDPLoadTextureTile_4b(ui_stencil_sharp_circle_png, G_IM_FMT_I, 32, 0, 0, 0, 31, 31, 0, G_TX_MIRROR | G_TX_CLAMP, G_TX_MIRROR | G_TX_CLAMP, 5, 5, G_TX_NOLOD, G_TX_NOLOD), gsDPLoadTextureTile_4b(ui_stencil_sharp_circle_png, G_IM_FMT_I, 32, 0, 0, 0, 31, 31, 0, G_TX_MIRROR | G_TX_CLAMP, G_TX_MIRROR | G_TX_CLAMP, 5, 5, G_TX_NOLOD, G_TX_NOLOD),
gsDPSetTileSize(G_TX_RENDERTILE, 0, 0, 0x00FC, 0x00FC), gsDPSetTileSize(G_TX_RENDERTILE, 0, 0, 0x00FC, 0x00FC),
gsSPEndDisplayList() gsSPEndDisplayList()
}; };
Gfx Gfx_LoadStencilTex_Mario[] = { Gfx Gfx_LoadStencilTex_Mario[] = {
gsSPDisplayList(&Gfx_LoadStencilTex_CommonParams), gsSPDisplayList(Gfx_LoadStencilTex_CommonParams),
gsDPSetTextureLUT(G_TT_NONE), gsDPSetTextureLUT(G_TT_NONE),
gsDPLoadTextureTile_4b(ui_stencil_mario_png, G_IM_FMT_I, 64, 0, 0, 0, 63, 63, 0, G_TX_NOMIRROR | G_TX_CLAMP, G_TX_NOMIRROR | G_TX_CLAMP, 6, 6, G_TX_NOLOD, G_TX_NOLOD), gsDPLoadTextureTile_4b(ui_stencil_mario_png, G_IM_FMT_I, 64, 0, 0, 0, 63, 63, 0, G_TX_NOMIRROR | G_TX_CLAMP, G_TX_NOMIRROR | G_TX_CLAMP, 6, 6, G_TX_NOLOD, G_TX_NOLOD),
gsSPEndDisplayList() gsSPEndDisplayList()
}; };
Gfx Gfx_LoadStencilTex_Star[] = { Gfx Gfx_LoadStencilTex_Star[] = {
gsSPDisplayList(&Gfx_LoadStencilTex_CommonParams), gsSPDisplayList(Gfx_LoadStencilTex_CommonParams),
gsDPSetTextureLUT(G_TT_NONE), gsDPSetTextureLUT(G_TT_NONE),
gsDPLoadTextureTile_4b(ui_stencil_star_png, G_IM_FMT_I, 32, 0, 0, 0, 31, 63, 0, G_TX_MIRROR | G_TX_CLAMP, G_TX_NOMIRROR | G_TX_CLAMP, 5, 6, G_TX_NOLOD, G_TX_NOLOD), gsDPLoadTextureTile_4b(ui_stencil_star_png, G_IM_FMT_I, 32, 0, 0, 0, 31, 63, 0, G_TX_MIRROR | G_TX_CLAMP, G_TX_NOMIRROR | G_TX_CLAMP, 5, 6, G_TX_NOLOD, G_TX_NOLOD),
gsDPSetTileSize(G_TX_RENDERTILE, 0, 0, 0x00FC, 0x00FC), gsDPSetTileSize(G_TX_RENDERTILE, 0, 0, 0x00FC, 0x00FC),
@ -66,7 +66,7 @@ Gfx Gfx_LoadStencilTex_Star[] = {
}; };
Gfx Gfx_LoadStencilTex_BlurryCircle[] = { Gfx Gfx_LoadStencilTex_BlurryCircle[] = {
gsSPDisplayList(&Gfx_LoadStencilTex_CommonParams), gsSPDisplayList(Gfx_LoadStencilTex_CommonParams),
gsDPSetTextureLUT(G_TT_NONE), gsDPSetTextureLUT(G_TT_NONE),
gsDPSetTextureImage(G_IM_FMT_I, G_IM_SIZ_8b, 64, ui_stencil_blurry_circle_png), gsDPSetTextureImage(G_IM_FMT_I, G_IM_SIZ_8b, 64, ui_stencil_blurry_circle_png),
gsDPSetTile(G_IM_FMT_I, G_IM_SIZ_8b, 8, 0x0000, G_TX_LOADTILE, 0, G_TX_MIRROR | G_TX_CLAMP, 6, G_TX_NOLOD, G_TX_MIRROR | G_TX_CLAMP, 6, G_TX_NOLOD), gsDPSetTile(G_IM_FMT_I, G_IM_SIZ_8b, 8, 0x0000, G_TX_LOADTILE, 0, G_TX_MIRROR | G_TX_CLAMP, 6, G_TX_NOLOD, G_TX_MIRROR | G_TX_CLAMP, 6, G_TX_NOLOD),
@ -172,7 +172,191 @@ Gfx D_8014EA48[] = {
gsDPSetDepthSource(G_ZS_PIXEL) gsDPSetDepthSource(G_ZS_PIXEL)
}; };
INCLUDE_ASM(void, "cd180_len_38f0", _render_transition_stencil, u8 arg0, f32 arg1, ScreenOverlay* arg2); void _render_transition_stencil(u8 arg0, f32 arg1, ScreenOverlay* overlay) {
Camera* camera = &gCameras[gCurrentCameraID];
u8 s3, s4, s5;
s32 s1, s2, s6, s7;
f32 f28;
s16 v0;
s16 s0;
Mtx* matrixStack = gDisplayContext->matrixStack;
if (arg1 == 0.0f) {
return;
}
if (overlay != NULL) {
s3 = overlay->color.r;
s4 = overlay->color.g;
s5 = overlay->color.b;
s1 = overlay->screenPos[0][0];
s2 = overlay->screenPos[0][1];
s6 = overlay->screenPos[1][0];
s7 = overlay->screenPos[1][1];
f28 = overlay->alpha;
} else {
s3 = s4 = s5 = 0;
s1 = s2 = s6 = s7 = 0;
f28 = 0.0f;
}
switch (arg0) {
case 0:
gDPPipeSync(gMasterGfxPos++);
gDPSetColorDither(gMasterGfxPos++, G_CD_MAGICSQ);
gDPSetAlphaDither(gMasterGfxPos++, G_AD_PATTERN);
gDPSetCycleType(gMasterGfxPos++, G_CYC_1CYCLE);
if (arg1 == 255.0f) {
gDPSetRenderMode(gMasterGfxPos++, CVG_DST_SAVE | G_RM_OPA_SURF, CVG_DST_SAVE | G_RM_OPA_SURF2);
} else {
gDPSetRenderMode(gMasterGfxPos++, G_RM_CLD_SURF, G_RM_CLD_SURF2);
}
gDPSetCombineMode(gMasterGfxPos++, G_CC_PRIMITIVE, G_CC_PRIMITIVE);
gDPSetPrimColor(gMasterGfxPos++, 0, 0, s3, s4, s5, arg1);
gDPSetScissor(gMasterGfxPos++, G_SC_NON_INTERLACE, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT);
gDPFillRectangle(gMasterGfxPos++, 0, 0, SCREEN_WIDTH - 1, SCREEN_HEIGHT - 1);
gDPSetColorDither(gMasterGfxPos++, G_CD_DISABLE);
return;
case 1:
gDPPipeSync(gMasterGfxPos++);
gDPSetColorDither(gMasterGfxPos++, G_CD_MAGICSQ);
gDPSetAlphaDither(gMasterGfxPos++, G_AD_PATTERN);
gDPSetCycleType(gMasterGfxPos++, G_CYC_1CYCLE);
if (arg1 == 255.0f) {
gDPSetRenderMode(gMasterGfxPos++, CVG_DST_SAVE | G_RM_OPA_SURF, CVG_DST_SAVE | G_RM_OPA_SURF2);
} else {
gDPSetRenderMode(gMasterGfxPos++, G_RM_CLD_SURF, G_RM_CLD_SURF2);
}
gDPSetCombineMode(gMasterGfxPos++, G_CC_PRIMITIVE, G_CC_PRIMITIVE);
gDPSetPrimColor(gMasterGfxPos++, 0, 0, s3, s4, s5, arg1);
gDPSetScissor(gMasterGfxPos++, G_SC_NON_INTERLACE, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT);
gDPFillRectangle(gMasterGfxPos++, camera->viewportStartX, camera->viewportStartY,
camera->viewportStartX + camera->viewportW, camera->viewportStartY + camera->viewportH);
gDPSetColorDither(gMasterGfxPos++, G_CD_DISABLE);
return;
}
guOrtho(&matrixStack[gMatrixListPos], 0.0f, 320.0f, 0.0f, 240.0f, -1000.0f, 1000.0f, 1.0f);
gSPMatrix(gMasterGfxPos++, &matrixStack[gMatrixListPos++], G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_PROJECTION);
switch (arg0) {
case 4:
gSPDisplayList(gMasterGfxPos++, Gfx_LoadStencilTex_Mario);
func_80139F10(160, 120, arg1, s3, s4, s5, arg1 * f28 / 255.0f, gCurrentCameraID);
break;
case 7:
gSPDisplayList(gMasterGfxPos++, Gfx_LoadStencilTex_Mario);
func_80139F10(160, 120, arg1, s3, s4, s5, arg1 * f28 / 255.0f, -1);
break;
case 5:
gSPDisplayList(gMasterGfxPos++, Gfx_LoadStencilTex_Star);
func_80139F10(160, 120, arg1, s3, s4, s5, arg1 * f28 / 255.0f, gCurrentCameraID);
break;
case 8:
gSPDisplayList(gMasterGfxPos++, Gfx_LoadStencilTex_Star);
func_80139F10(160, 120, arg1, s3, s4, s5, arg1 * f28 / 255.0f, -1);
break;
case 3:
gSPDisplayList(gMasterGfxPos++, Gfx_LoadStencilTex_SharpCircle);
func_80139F10(s1, s2, arg1, 0, 0, 0, 0, gCurrentCameraID);
break;
case 6:
gSPDisplayList(gMasterGfxPos++, Gfx_LoadStencilTex_SharpCircle);
func_80139F10(s1, s2, arg1, 0, 0, 0, 0, -1);
break;
case 2:
s0 = arg1;
guTranslate(&matrixStack[gMatrixListPos], 80.0f, 120.0f, 0.0f);
gSPMatrix(gMasterGfxPos++, &matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
guScale(&matrixStack[gMatrixListPos], (1.0f - s0 / 255.0f) * 0.8, (1.0f - s0 / 255.0f) * 0.8, 1.0f);
gSPMatrix(gMasterGfxPos++, &matrixStack[gMatrixListPos++], G_MTX_NOPUSH | G_MTX_MUL | G_MTX_MODELVIEW);
guRotate(&matrixStack[gMatrixListPos], s0 * 0.5f, 0.0f, 0.0f, 1.0f);
gSPMatrix(gMasterGfxPos++, &matrixStack[gMatrixListPos++], G_MTX_NOPUSH | G_MTX_MUL | G_MTX_MODELVIEW);
gSPDisplayList(gMasterGfxPos++, D_8014E8F0);
gSPPopMatrix(gMasterGfxPos++, G_MTX_MODELVIEW);
guTranslate(&matrixStack[gMatrixListPos], 240.0f, 120.0f, 0.0f);
gSPMatrix(gMasterGfxPos++, &matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
guScale(&matrixStack[gMatrixListPos], (1.0f - s0 / 255.0f) * 0.8, (1.0f - s0 / 255.0f) * 0.8, 1.0f);
gSPMatrix(gMasterGfxPos++, &matrixStack[gMatrixListPos++], G_MTX_NOPUSH | G_MTX_MUL | G_MTX_MODELVIEW);
guRotate(&matrixStack[gMatrixListPos], s0 * 0.5f, 0.0f, 0.0f, 1.0f);
gSPMatrix(gMasterGfxPos++, &matrixStack[gMatrixListPos++], G_MTX_NOPUSH | G_MTX_MUL | G_MTX_MODELVIEW);
gSPDisplayList(gMasterGfxPos++, D_8014E8F0);
gSPPopMatrix(gMasterGfxPos++, G_MTX_MODELVIEW);
guTranslate(&matrixStack[gMatrixListPos], 0.0f, 0.0f, 0.0f);
gSPMatrix(gMasterGfxPos++, &matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
gSPDisplayList(gMasterGfxPos++, D_8014EA48);
gSPPopMatrix(gMasterGfxPos++, G_MTX_MODELVIEW);
break;
case 9:
s0 = arg1;
gDPSetPrimColor(gMasterGfxPos++, 0, 0, 0, 0, 0, 0);
guTranslate(&matrixStack[gMatrixListPos], s1, SCREEN_HEIGHT - s2, 0.0f);
gSPMatrix(gMasterGfxPos++, &matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
guScale(&matrixStack[gMatrixListPos], (1.0f - s0 / 255.0f) * 0.8, (1.0f - s0 / 255.0f) * 0.8, 1.0f);
gSPMatrix(gMasterGfxPos++, &matrixStack[gMatrixListPos++], G_MTX_NOPUSH | G_MTX_MUL | G_MTX_MODELVIEW);
guRotate(&matrixStack[gMatrixListPos], -s0, 0.0f, 0.0f, 1.0f);
gSPMatrix(gMasterGfxPos++, &matrixStack[gMatrixListPos++], G_MTX_NOPUSH | G_MTX_MUL | G_MTX_MODELVIEW);
gSPDisplayList(gMasterGfxPos++, D_8014E8F0);
gSPPopMatrix(gMasterGfxPos++, G_MTX_MODELVIEW);
guTranslate(&matrixStack[gMatrixListPos], s6, SCREEN_HEIGHT - s7, 0.0f);
gSPMatrix(gMasterGfxPos++, &matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
guScale(&matrixStack[gMatrixListPos], (1.0f - s0 / 255.0f) * 0.8, (1.0f - s0 / 255.0f) * 0.8, 1.0f);
gSPMatrix(gMasterGfxPos++, &matrixStack[gMatrixListPos++], G_MTX_NOPUSH | G_MTX_MUL | G_MTX_MODELVIEW);
guRotate(&matrixStack[gMatrixListPos], -s0, 0.0f, 0.0f, 1.0f);
gSPMatrix(gMasterGfxPos++, &matrixStack[gMatrixListPos++], G_MTX_NOPUSH | G_MTX_MUL | G_MTX_MODELVIEW);
gSPDisplayList(gMasterGfxPos++, D_8014E8F0);
gSPPopMatrix(gMasterGfxPos++, G_MTX_MODELVIEW);
guTranslate(&matrixStack[gMatrixListPos], 0.0f, 0.0f, 0.0f);
gSPMatrix(gMasterGfxPos++, &matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
gDPSetPrimColor(gMasterGfxPos++, 0, 0, 0, 0, 0, f28);
gSPDisplayList(gMasterGfxPos++, D_8014E9A8);
gSPPopMatrix(gMasterGfxPos++, G_MTX_MODELVIEW);
break;
case 10:
s0 = arg1;
gDPSetPrimColor(gMasterGfxPos++, 0, 0, 0, 0, 0, 0);
guTranslate(&matrixStack[gMatrixListPos], s1, SCREEN_HEIGHT - s2, 0.0f);
gSPMatrix(gMasterGfxPos++, &matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
guScale(&matrixStack[gMatrixListPos], (1.0f - s0 / 255.0f) * 0.8, (1.0f - s0 / 255.0f) * 0.8, 1.0f);
gSPMatrix(gMasterGfxPos++, &matrixStack[gMatrixListPos++], G_MTX_NOPUSH | G_MTX_MUL | G_MTX_MODELVIEW);
guRotate(&matrixStack[gMatrixListPos], (f32)(-s0) * 0.5, 0.0f, 0.0f, 1.0f);
gSPMatrix(gMasterGfxPos++, &matrixStack[gMatrixListPos++], G_MTX_NOPUSH | G_MTX_MUL | G_MTX_MODELVIEW);
gSPDisplayList(gMasterGfxPos++, D_8014E8F0);
gSPPopMatrix(gMasterGfxPos++, G_MTX_MODELVIEW);
guTranslate(&matrixStack[gMatrixListPos], 0.0f, 0.0f, 0.0f);
gSPMatrix(gMasterGfxPos++, &matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
gDPSetPrimColor(gMasterGfxPos++, 0, 0, 0, 0, 0, f28);
gSPDisplayList(gMasterGfxPos++, D_8014E9A8);
gSPPopMatrix(gMasterGfxPos++, G_MTX_MODELVIEW);
v0 = arg1 + 40;
if (arg1 > 170) {
v0 = 170;
}
func_80138D88(0, 0, SCREEN_WIDTH - 1, SCREEN_HEIGHT - 1, v0);
break;
case 11:
gSPDisplayList(gMasterGfxPos++, Gfx_LoadStencilTex_BlurryCircle);
func_80138E54(1, s6, s7, f28, arg1);
break;
case 12:
func_80138D88(s1, s2, s6, s7, arg1);
break;
case 13:
gSPDisplayList(gMasterGfxPos++, Gfx_LoadStencilTex_BlurryCircle);
func_80138E54(0, s1, s2, f28, arg1);
break;
case 14:
case 15:
break;
}
gSPMatrix(gMasterGfxPos++, &gDisplayContext->camPerspMatrix[gCurrentCameraID], G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_PROJECTION);
}
void set_screen_overlay_params_front(u8 type, f32 zoom) { void set_screen_overlay_params_front(u8 type, f32 zoom) {
screen_overlay_frontType = type; screen_overlay_frontType = type;
@ -233,7 +417,7 @@ void set_screen_overlay_center_worldpos(s32 idx, s32 posIdx, s32 x, s32 y, s32 z
switch (idx) { switch (idx) {
case 0: case 0:
case 1: case 1:
transform_point(camera->perspectiveMatrix[0], x, y, z, 1.0f, &tx, &ty, &tz, &ts); transform_point(camera->perspectiveMatrix, x, y, z, 1.0f, &tx, &ty, &tz, &ts);
ts = 1.0f / ts; ts = 1.0f / ts;
tx *= ts; tx *= ts;
ty *= -ts; ty *= -ts;
@ -308,25 +492,14 @@ void set_map_transition_effect(s32 arg0) {
D_8014C6F0 = arg0; D_8014C6F0 = arg0;
} }
// r g b register ordering issues
#ifdef NON_EQUIVALENT
s32 update_exit_map_screen_overlay(s16* progress) { s32 update_exit_map_screen_overlay(s16* progress) {
u8 overlayColor; u8 overlayColor;
u8 type; u8 type = 0;
s32 phi_s2; u8 r = 0;
s16 t; u8 g = 0;
u8 r; u8 b = 0;
u8 g; s16 t = 0;
u8 b; s32 amt = 20;
type = 0;
g = 0;
b = 0;
r = 0;
t = 0;
phi_s2 = 20;
switch (D_8014C6F0) { switch (D_8014C6F0) {
case 1: case 1:
@ -335,13 +508,15 @@ s32 update_exit_map_screen_overlay(s16* progress) {
case 3: case 3:
r = g = b = 208; r = g = b = 208;
type = 1; type = 1;
phi_s2 = 10; amt = 10;
if (gGameStatusPtr->demoState == 2) { if (gGameStatusPtr->demoState == 2) {
gGameStatusPtr->nextDemoScene = 18; gGameStatusPtr->nextDemoScene = 18;
} }
break; break;
case 6: case 6:
r = g = b = 208; r = g = b = 208;
type = 1;
break;
case 0: case 0:
type = 1; type = 1;
break; break;
@ -349,19 +524,29 @@ s32 update_exit_map_screen_overlay(s16* progress) {
if (gGameStatusPtr->demoState == 2) { if (gGameStatusPtr->demoState == 2) {
gGameStatusPtr->nextDemoScene = 18; gGameStatusPtr->nextDemoScene = 18;
} }
r = g = b = 208;
type = 1;
amt = 7;
break;
case 11: case 11:
case 15: case 15:
r = g = b = 208; r = g = b = 208;
type = 1;
amt = 7;
break;
case 4: case 4:
case 5: case 5:
type = 1; type = 1;
phi_s2 = 7; amt = 7;
break; break;
case 14: case 14:
r = g = b = 208; r = g = b = 208;
type = 1;
amt = 50;
break;
case 2: case 2:
type = 1; type = 1;
phi_s2 = 50; amt = 50;
break; break;
case 8: case 8:
set_screen_overlay_alpha(0, 0.0f); set_screen_overlay_alpha(0, 0.0f);
@ -369,21 +554,25 @@ s32 update_exit_map_screen_overlay(s16* progress) {
break; break;
case 9: case 9:
r = g = b = 208; r = g = b = 208;
set_screen_overlay_alpha(0, 0.0f);
type = 4;
amt = 7;
break;
case 10: case 10:
set_screen_overlay_alpha(0, 0.0f); set_screen_overlay_alpha(0, 0.0f);
type = 4; type = 4;
phi_s2 = 7; amt = 7;
break; break;
case 12: case 12:
set_screen_overlay_alpha(0, 160.0f); set_screen_overlay_alpha(0, 160.0f);
r = g = b = 208; r = g = b = 208;
type = 5; type = 5;
phi_s2 = 7; amt = 7;
break; break;
case 13: case 13:
set_screen_overlay_alpha(0, 0.0f); set_screen_overlay_alpha(0, 0.0f);
type = 5; type = 5;
phi_s2 = 7; amt = 7;
break; break;
case 16: case 16:
set_screen_overlay_center(0, 0, 15, 28); set_screen_overlay_center(0, 0, 15, 28);
@ -401,7 +590,7 @@ s32 update_exit_map_screen_overlay(s16* progress) {
return 1; return 1;
} }
*progress += phi_s2; *progress += amt;
if (*progress > 0xFF) { if (*progress > 0xFF) {
*progress = 0xFF; *progress = 0xFF;
} }
@ -418,16 +607,13 @@ s32 update_exit_map_screen_overlay(s16* progress) {
return 1; return 1;
} }
*progress += phi_s2; *progress += amt;
if (*progress > 0xFF) { if (*progress > 0xFF) {
*progress = 0xFF; *progress = 0xFF;
} }
} }
return 0; return 0;
} }
#else
INCLUDE_ASM(s32, "cd180_len_38f0", update_exit_map_screen_overlay);
#endif
u8 update_enter_map_screen_overlay(s16* progress) { u8 update_enter_map_screen_overlay(s16* progress) {
u8 frontType = 0; u8 frontType = 0;

View File

@ -1,8 +1,7 @@
#include "common.h" #include "common.h"
s32 D_8014C260[] = { 0x00000000, 0x00000000, 0xFFFFFF00, 0xFFFFFF00 }; s32 D_8014C260[] = { 0x00000000, 0x00000000 };
Lights1 D_8014C268 = gdSPDefLights1(255, 255, 255, 0, 0, 0, 0, 0, 0);
s32 D_8014C270[] = { 0x00000000, 0x00000000, 0x00000000, 0x00000000 };
extern EntityModelList gWorldEntityModelList; extern EntityModelList gWorldEntityModelList;
extern EntityModelList gBattleEntityModelList; extern EntityModelList gBattleEntityModelList;
@ -18,6 +17,29 @@ extern s32 entity_fog_alpha;
extern s32 entity_fog_dist_min; extern s32 entity_fog_dist_min;
extern s32 entity_fog_dist_max; extern s32 entity_fog_dist_max;
extern Gfx D_8014B7F8[];
extern Gfx D_8014B820[];
extern Gfx D_8014B848[];
extern Gfx D_8014B870[];
extern Gfx D_8014B898[];
extern Gfx D_8014B8C0[];
extern Gfx D_8014B8E8[];
extern Gfx D_8014B988[];
extern Gfx D_8014B9B0[];
extern Gfx D_8014B9D8[];
extern Gfx D_8014BA00[];
extern Gfx D_8014BA48[];
extern Gfx D_8014BA70[];
extern Gfx D_8014BA98[];
extern Gfx D_8014BAE8[];
extern Gfx D_8014BE78[];
extern Gfx D_8014BEA0[];
extern Gfx D_8014BEC8[];
extern Gfx D_8014BEF0[];
extern Gfx D_8014BF18[];
extern Gfx D_8014BF40[];
extern Gfx D_8014BF68[];
s32 step_entity_model_commandlist(EntityModel* entityModel); s32 step_entity_model_commandlist(EntityModel* entityModel);
void free_entity_model_by_ref(EntityModel* entityModel); void free_entity_model_by_ref(EntityModel* entityModel);
@ -83,9 +105,9 @@ s32 load_entity_model(s32* cmdList) {
} }
ASSERT(newEntityModel != NULL); ASSERT(newEntityModel != NULL);
newEntityModel->flags = (ENTITY_MODEL_FLAGS_1 | ENTITY_MODEL_FLAGS_2 | ENTITY_MODEL_FLAGS_4 | ENTITY_MODEL_FLAGS_10); newEntityModel->flags = (ENTITY_MODEL_FLAGS_CAM0 | ENTITY_MODEL_FLAGS_CAM1 | ENTITY_MODEL_FLAGS_CAM2 | ENTITY_MODEL_FLAGS_ENABLED);
newEntityModel->renderMode = 1; newEntityModel->renderMode = 1;
newEntityModel->displayList = NULL; newEntityModel->gfx.displayList = NULL;
newEntityModel->cmdListReadPos = cmdList; newEntityModel->cmdListReadPos = cmdList;
newEntityModel->nextFrameTime = 1.0f; newEntityModel->nextFrameTime = 1.0f;
newEntityModel->timeScale = 1.0f; newEntityModel->timeScale = 1.0f;
@ -104,7 +126,7 @@ s32 load_entity_model(s32* cmdList) {
s32 ALT_load_entity_model(s32* cmdList) { s32 ALT_load_entity_model(s32* cmdList) {
EntityModel* newEntityModel; EntityModel* newEntityModel;
Gfx* newDisplayList; SpriteRasterInfo* imageData;
s32 i; s32 i;
for (i = 0; i < MAX_ENTITY_MODELS; i++) { for (i = 0; i < MAX_ENTITY_MODELS; i++) {
@ -123,10 +145,10 @@ s32 ALT_load_entity_model(s32* cmdList) {
ASSERT(newEntityModel != NULL); ASSERT(newEntityModel != NULL);
newEntityModel->displayList = newDisplayList = heap_malloc(sizeof(Gfx) * 2); newEntityModel->gfx.imageData = imageData = heap_malloc(sizeof(*imageData));
ASSERT(newDisplayList != NULL); ASSERT(imageData != NULL);
newEntityModel->flags = (ENTITY_MODEL_FLAGS_1 | ENTITY_MODEL_FLAGS_2 | ENTITY_MODEL_FLAGS_4 | ENTITY_MODEL_FLAGS_10 | ENTITY_MODEL_FLAGS_400); newEntityModel->flags = (ENTITY_MODEL_FLAGS_CAM0 | ENTITY_MODEL_FLAGS_CAM1 | ENTITY_MODEL_FLAGS_CAM2 | ENTITY_MODEL_FLAGS_ENABLED | ENTITY_MODEL_FLAGS_USE_IMAGE);
newEntityModel->renderMode = 1; newEntityModel->renderMode = 1;
newEntityModel->cmdListReadPos = cmdList; newEntityModel->cmdListReadPos = cmdList;
newEntityModel->nextFrameTime = 1.0f; newEntityModel->nextFrameTime = 1.0f;
@ -152,8 +174,8 @@ void exec_entity_model_commandlist(s32 idx) {
idx &= ~BATTLE_ENTITY_ID_MASK; idx &= ~BATTLE_ENTITY_ID_MASK;
entityModel = (*gCurrentEntityModelList)[idx]; entityModel = (*gCurrentEntityModelList)[idx];
if (entityModel != NULL && (entityModel->flags)) { if (entityModel != NULL && (entityModel->flags)) {
if (!(entityModel->flags & ENTITY_MODEL_FLAGS_20)) { if (!(entityModel->flags & ENTITY_MODEL_FLAGS_HIDDEN)) {
if (!(entityModel->flags & ENTITY_MODEL_FLAGS_20000)) { if (!(entityModel->flags & ENTITY_MODEL_FLAGS_DISABLE_SCRIPT)) {
entityModel->flags &= ~ENTITY_MODEL_FLAGS_100; entityModel->flags &= ~ENTITY_MODEL_FLAGS_100;
entityModel->nextFrameTime -= entityModel->timeScale; entityModel->nextFrameTime -= entityModel->timeScale;
if (entityModel->nextFrameTime <= 0.0f) { if (entityModel->nextFrameTime <= 0.0f) {
@ -166,7 +188,7 @@ void exec_entity_model_commandlist(s32 idx) {
} }
s32 step_entity_model_commandlist(EntityModel* entityModel) { s32 step_entity_model_commandlist(EntityModel* entityModel) {
Gfx* displayList; SpriteRasterInfo* imageData;
u32* curPos = entityModel->cmdListReadPos; u32* curPos = entityModel->cmdListReadPos;
switch (*curPos++) { switch (*curPos++) {
@ -175,7 +197,7 @@ s32 step_entity_model_commandlist(EntityModel* entityModel) {
return 1; return 1;
case 1: // set display list ptr case 1: // set display list ptr
entityModel->nextFrameTime = (f32) *curPos++; entityModel->nextFrameTime = (f32) *curPos++;
entityModel->displayList = (Gfx*) *curPos++; entityModel->gfx.displayList = (Gfx*) *curPos++;
entityModel->cmdListReadPos = curPos; entityModel->cmdListReadPos = curPos;
break; break;
case 2: // restore saved position case 2: // restore saved position
@ -196,13 +218,13 @@ s32 step_entity_model_commandlist(EntityModel* entityModel) {
entityModel->flags &= ~*curPos++; entityModel->flags &= ~*curPos++;
entityModel->cmdListReadPos = curPos; entityModel->cmdListReadPos = curPos;
return 1; return 1;
case 7: // populate display list case 7: // set image data
displayList = entityModel->displayList; imageData = entityModel->gfx.imageData;
entityModel->nextFrameTime = *curPos++; entityModel->nextFrameTime = *curPos++;
displayList[0].words.w0 = *curPos++; imageData->raster = (u8*)*curPos++;
displayList[0].words.w1 = *curPos++; imageData->defaultPal = (u8*)*curPos++;
displayList[1].words.w0 = *curPos++; imageData->width = *curPos++;
displayList[1].words.w1 = *curPos++; imageData->height = *curPos++;
entityModel->cmdListReadPos = curPos; entityModel->cmdListReadPos = curPos;
break; break;
} }
@ -217,12 +239,250 @@ void make_entity_model_mtx_flipZ(Matrix4f mtx) {
mtx[3][3] = 1.0f; mtx[3][3] = 1.0f;
} }
void appendGfx_entity_model(void* data); void appendGfx_entity_model(EntityModel* model) {
INCLUDE_ASM(s32, "entity", appendGfx_entity_model); Matrix4f mtx;
Matrix4f mtx2;
FoldImageRecPart foldImage;
Matrix4f foldMtx;
INCLUDE_ASM(s32, "entity", draw_entity_model_A); gDisplayContext->matrixStack[gMatrixListPos] = model->transform;
gSPMatrix(gMasterGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
if (!(model->flags & ENTITY_MODEL_FLAGS_USE_IMAGE)) {
if (!(model->flags & ENTITY_MODEL_FLAGS_10000)) {
s32 cond;
INCLUDE_ASM(s32, "entity", draw_entity_model_B); gDPPipeSync(gMasterGfxPos++);
gDPSetRenderMode(gMasterGfxPos++, G_RM_TEX_EDGE, G_RM_TEX_EDGE2);
gDPSetPrimColor(gMasterGfxPos++, 0, 0, 255, 255, 255, 255);
gDPSetCombineMode(gMasterGfxPos++, G_CC_MODULATEIA_PRIM, G_CC_MODULATEIA_PRIM);
gDPSetAlphaCompare(gMasterGfxPos++, G_AC_NONE);
gSPSetOtherMode(gMasterGfxPos++, G_SETOTHERMODE_H, G_MDSFT_ALPHADITHER, 18, G_AD_DISABLE | G_CD_DISABLE | G_CK_NONE | G_TC_FILT | G_TF_POINT | G_TT_NONE | G_TL_TILE | G_TD_CLAMP | G_TP_NONE | G_CYC_1CYCLE);
cond = FALSE;
if (entity_fog_enabled && !(model->flags & ENTITY_MODEL_FLAGS_FOG_DISABLED)) {
cond = TRUE;
}
switch (cond) {
case FALSE:
switch (model->renderMode) {
case RENDER_MODE_SURFACE_OPA:
gSPDisplayList(gMasterGfxPos++, D_8014B7F8);
break;
case RENDER_MODE_DECAL_OPA:
gSPDisplayList(gMasterGfxPos++, D_8014B820);
break;
case RENDER_MODE_INTERSECTING_OPA:
gSPDisplayList(gMasterGfxPos++, D_8014B848);
break;
case RENDER_MODE_ALPHATEST:
gSPDisplayList(gMasterGfxPos++, D_8014B870);
break;
case RENDER_MODE_SURFACE_XLU_LAYER1:
case RENDER_MODE_SURFACE_XLU_LAYER2:
case RENDER_MODE_SURFACE_XLU_LAYER3:
gSPDisplayList(gMasterGfxPos++, D_8014B898);
break;
case RENDER_MODE_SURFACE_XLU_NO_AA:
gSPDisplayList(gMasterGfxPos++, D_8014B9B0);
break;
case RENDER_MODE_DECAL_XLU:
case RENDER_MODE_1E:
gSPDisplayList(gMasterGfxPos++, D_8014B8C0);
break;
case RENDER_MODE_DECAL_XLU_NOAA:
case RENDER_MODE_SHADOW:
gSPDisplayList(gMasterGfxPos++, D_8014B9D8);
break;
case RENDER_MODE_INTERSECTING_XLU:
gSPDisplayList(gMasterGfxPos++, D_8014B8E8);
break;
case RENDER_MODE_28:
gSPDisplayList(gMasterGfxPos++, D_8014BA00);
break;
case RENDER_MODE_ALPHATEST_ONESIDED:
gSPDisplayList(gMasterGfxPos++, D_8014B988);
break;
case RENDER_MODE_SURFACE_OPA_NO_ZB:
case RENDER_MODE_2A:
gSPDisplayList(gMasterGfxPos++, D_8014BA48);
break;
case RENDER_MODE_ALPHATEST_NO_ZB:
case RENDER_MODE_2B:
gSPDisplayList(gMasterGfxPos++, D_8014BA70);
break;
case RENDER_MODE_SURFACE_XLU_NO_ZB:
case RENDER_MODE_2C:
gSPDisplayList(gMasterGfxPos++, D_8014BA98);
break;
case RENDER_MODE_2D:
gSPDisplayList(gMasterGfxPos++, D_8014BAE8);
break;
}
break;
case TRUE:
switch (model->renderMode) {
case RENDER_MODE_SURFACE_OPA:
gSPDisplayList(gMasterGfxPos++, D_8014BE78);
break;
case RENDER_MODE_DECAL_OPA:
gSPDisplayList(gMasterGfxPos++, D_8014BEA0);
break;
case RENDER_MODE_INTERSECTING_OPA:
gSPDisplayList(gMasterGfxPos++, D_8014BEC8);
break;
case RENDER_MODE_ALPHATEST:
gSPDisplayList(gMasterGfxPos++, D_8014BEF0);
break;
case RENDER_MODE_SURFACE_XLU_LAYER1:
gSPDisplayList(gMasterGfxPos++, D_8014BF18);
break;
case RENDER_MODE_DECAL_XLU:
gSPDisplayList(gMasterGfxPos++, D_8014BF40);
break;
case RENDER_MODE_INTERSECTING_XLU:
gSPDisplayList(gMasterGfxPos++, D_8014BF68);
break;
}
gDPSetFogColor(gMasterGfxPos++, entity_fog_red, entity_fog_green, entity_fog_blue, entity_fog_alpha);
gSPFogPosition(gMasterGfxPos++, entity_fog_dist_min, entity_fog_dist_max);
break;
}
gSPClearGeometryMode(gMasterGfxPos++, G_LIGHTING);
if (!entity_fog_enabled || (model->flags & ENTITY_MODEL_FLAGS_FOG_DISABLED)) {
gDPSetCombineMode(gMasterGfxPos++, G_CC_MODULATEIA, G_CC_MODULATEIA);
} else {
gDPSetCombineLERP(gMasterGfxPos++, TEXEL0, 0, SHADE, 0, TEXEL0, 0, 0, TEXEL0, COMBINED, 0, SHADE, 0, 0, 0, 0, COMBINED);
}
}
if (model->vertexArray != NULL) {
gSPSegment(gMasterGfxPos++, D_80154374, VIRTUAL_TO_PHYSICAL(model->vertexArray));
}
gDPPipeSync(gMasterGfxPos++);
if (model->fpSetupGfxCallback != NULL) {
model->fpSetupGfxCallback(model->setupGfxCallbackArg0);
}
gDPPipeSync(gMasterGfxPos++);
gSPDisplayList(gMasterGfxPos++, model->gfx.displayList);
gSPPopMatrix(gMasterGfxPos++, G_MTX_MODELVIEW);
gDPPipeSync(gMasterGfxPos++);
if (!(model->flags & ENTITY_MODEL_FLAGS_200)) {
return;
}
guMtxL2F(mtx, &model->transform);
make_entity_model_mtx_flipZ(mtx2);
guMtxCatF(mtx, mtx2, mtx);
guMtxF2L(mtx, &model->transform);
gDisplayContext->matrixStack[gMatrixListPos] = model->transform;
gSPMatrix(gMasterGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
gSPDisplayList(gMasterGfxPos++, model->gfx.displayList);
} else {
SpriteRasterInfo* imageData;
gDPPipeSync(gMasterGfxPos++);
gSPClearGeometryMode(gMasterGfxPos++, G_ZBUFFER | G_SHADE | G_CULL_BOTH | G_FOG | G_LIGHTING | G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR | G_LOD | G_SHADING_SMOOTH);
gSPSetGeometryMode(gMasterGfxPos++, G_ZBUFFER | G_SHADE | G_LIGHTING | G_SHADING_SMOOTH);
gSPSetLights1(gMasterGfxPos++, D_8014C268);
gSPTexture(gMasterGfxPos++, -1, -1, 0, G_TX_RENDERTILE, G_ON);
gDPSetAlphaCompare(gMasterGfxPos++, G_AC_NONE);
gSPSetOtherMode(gMasterGfxPos++, G_SETOTHERMODE_H, G_MDSFT_ALPHADITHER, 18, G_AD_DISABLE | G_CD_DISABLE | G_CK_NONE | G_TC_FILT | G_TF_BILERP | G_TT_NONE | G_TL_TILE | G_TD_CLAMP | G_TP_PERSP | G_CYC_1CYCLE);
imageData = model->gfx.imageData;
foldImage.raster = imageData->raster;
foldImage.palette = imageData->defaultPal;
foldImage.width = imageData->width;
foldImage.height = imageData->height;
foldImage.xOffset = -imageData->width / 2;
foldImage.yOffset = imageData->height / 2;
foldImage.unk_10 = 255;
guMtxL2F(foldMtx, &model->transform);
fold_appendGfx_component(0, &foldImage, 0, foldMtx);
}
gSPPopMatrix(gMasterGfxPos++, G_MTX_MODELVIEW);
gDPPipeSync(gMasterGfxPos++);
}
void draw_entity_model_A(s32 modelIdx, Mtx* transformMtx) {
EntityModel* model;
RenderTask rt;
RenderTask* rtPtr = &rt;
Camera* camera = &gCameras[gCurrentCamID];
Matrix4f mtx;
f32 x, y, z, s;
f32 inX, inY, inZ;
if ((gGameStatusPtr->isBattle == 0) || (modelIdx & 0x800)) {
modelIdx &= ~0x800;
model = (*gCurrentEntityModelList)[modelIdx];
if (model != NULL) {
if (model->flags != 0) {
if (!(model->flags & ENTITY_MODEL_FLAGS_100)) {
if (!(model->flags & ENTITY_MODEL_FLAGS_HIDDEN)) {
if (!(model->flags & ENTITY_MODEL_FLAGS_40) && (model->flags & (1 << gCurrentCamID))) {
model->transform = *transformMtx;
model->vertexArray = NULL;
guMtxL2F(mtx, transformMtx);
inX = mtx[3][0];
inY = mtx[3][1];
inZ = mtx[3][2];
transform_point(camera->perspectiveMatrix, inX, inY, inZ, 1.0f, &x, &y, &z, &s);
rtPtr->renderMode = model->renderMode;
rtPtr->appendGfxArg = model;
rtPtr->appendGfx = (void(*)(void*))appendGfx_entity_model;
rtPtr->distance = ((u32)(model->flags & 0xF000) >> 8) + inZ;
queue_render_task(rtPtr);
}
}
}
}
}
}
}
void draw_entity_model_B(s32 modelIdx, Mtx* transformMtx, s32 vertexSegment, Vec3s* vertexArray) {
EntityModel* model;
RenderTask rt;
RenderTask* rtPtr = &rt;
Camera* camera = &gCameras[gCurrentCamID];
Matrix4f mtx;
f32 x, y, z, s;
f32 inX, inY, inZ;
if ((gGameStatusPtr->isBattle == 0) || (modelIdx & 0x800)) {
modelIdx &= ~0x800;
model = (*gCurrentEntityModelList)[modelIdx];
if (model != NULL) {
if (model->flags != 0) {
if (!(model->flags & ENTITY_MODEL_FLAGS_100)) {
if (!(model->flags & ENTITY_MODEL_FLAGS_HIDDEN)) {
if (model->flags & (1 << gCurrentCamID)) {
model->transform = *transformMtx;
D_80154374 = vertexSegment;
model->vertexArray = vertexArray;
guMtxL2F(mtx, transformMtx);
inX = mtx[3][0];
inY = mtx[3][1];
inZ = mtx[3][2];
transform_point(camera->perspectiveMatrix, inX, inY, inZ, 1.0f, &x, &y, &z, &s);
rtPtr->renderMode = model->renderMode;
rtPtr->appendGfxArg = model;
rtPtr->appendGfx = (void(*)(void*))appendGfx_entity_model;
rtPtr->distance = ((u32)(model->flags & 0xF000) >> 8) + inZ;
queue_render_task(rtPtr);
}
}
}
}
}
}
}
void draw_entity_model_C(s32 modelIdx, Mtx* transformMtx) { void draw_entity_model_C(s32 modelIdx, Mtx* transformMtx) {
EntityModel* model; EntityModel* model;
@ -235,15 +495,15 @@ void draw_entity_model_C(s32 modelIdx, Mtx* transformMtx) {
if (model != NULL) { if (model != NULL) {
if (model->flags != 0) { if (model->flags != 0) {
if (!(model->flags & MODEL_FLAGS_USE_CAMERA_UNK_MATRIX)) { if (!(model->flags & ENTITY_MODEL_FLAGS_100)) {
if (!(model->flags & MODEL_FLAGS_FLAG_20)) { if (!(model->flags & ENTITY_MODEL_FLAGS_HIDDEN)) {
if (!(model->flags & MODEL_FLAGS_FLAG_40) && (model->flags & (1 << gCurrentCamID))) { if (!(model->flags & ENTITY_MODEL_FLAGS_40) && (model->flags & (1 << gCurrentCamID))) {
model->flags |= MODEL_FLAGS_FLAG_200; model->flags |= ENTITY_MODEL_FLAGS_200;
model->transform = *transformMtx; model->transform = *transformMtx;
model->vertexArray = NULL; model->vertexArray = NULL;
rtPtr->renderMode = model->renderMode; rtPtr->renderMode = model->renderMode;
rtPtr->appendGfxArg = model; rtPtr->appendGfxArg = model;
rtPtr->appendGfx = appendGfx_entity_model; rtPtr->appendGfx = (void(*)(void*))appendGfx_entity_model;
rtPtr->distance = (u32)(model->flags & 0xF000) >> 8; rtPtr->distance = (u32)(model->flags & 0xF000) >> 8;
queue_render_task(rtPtr); queue_render_task(rtPtr);
} }
@ -254,7 +514,7 @@ void draw_entity_model_C(s32 modelIdx, Mtx* transformMtx) {
} }
} }
void draw_entity_model_D(s32 modelIdx, Mtx* transformMtx, s32 arg2, Vtx* vertexArray) { void draw_entity_model_D(s32 modelIdx, Mtx* transformMtx, s32 arg2, Vec3s* vertexArray) {
EntityModel* model; EntityModel* model;
RenderTask rt; RenderTask rt;
RenderTask* rtPtr = &rt; RenderTask* rtPtr = &rt;
@ -265,16 +525,16 @@ void draw_entity_model_D(s32 modelIdx, Mtx* transformMtx, s32 arg2, Vtx* vertexA
if (model != NULL) { if (model != NULL) {
if (model->flags != 0) { if (model->flags != 0) {
if (!(model->flags & MODEL_FLAGS_USE_CAMERA_UNK_MATRIX)) { if (!(model->flags & ENTITY_MODEL_FLAGS_100)) {
if (!(model->flags & MODEL_FLAGS_FLAG_20)) { if (!(model->flags & ENTITY_MODEL_FLAGS_HIDDEN)) {
if (model->flags & (1 << gCurrentCamID)) { if (model->flags & (1 << gCurrentCamID)) {
model->flags |= MODEL_FLAGS_FLAG_200; model->flags |= ENTITY_MODEL_FLAGS_200;
model->transform = *transformMtx; model->transform = *transformMtx;
D_80154374 = arg2; D_80154374 = arg2;
model->vertexArray = vertexArray; model->vertexArray = vertexArray;
rtPtr->renderMode = model->renderMode; rtPtr->renderMode = model->renderMode;
rtPtr->appendGfxArg = model; rtPtr->appendGfxArg = model;
rtPtr->appendGfx = appendGfx_entity_model; rtPtr->appendGfx = (void(*)(void*))appendGfx_entity_model;
rtPtr->distance = (u32)(model->flags & 0xF000) >> 8; rtPtr->distance = (u32)(model->flags & 0xF000) >> 8;
queue_render_task(rtPtr); queue_render_task(rtPtr);
} }
@ -285,7 +545,175 @@ void draw_entity_model_D(s32 modelIdx, Mtx* transformMtx, s32 arg2, Vtx* vertexA
} }
} }
INCLUDE_ASM(s32, "entity", draw_entity_model_E); void draw_entity_model_E(s32 modelIdx, Mtx* transformMtx) {
EntityModel* model = (*gCurrentEntityModelList)[modelIdx & ~0x800];
Matrix4f mtx;
Matrix4f mtx2;
FoldImageRecPart foldImage;
Matrix4f foldMtx;
if (model == NULL) {
return;
}
if (model->flags == 0) {
return;
}
if (model->flags & ENTITY_MODEL_FLAGS_100) {
return;
}
if (model->flags & ENTITY_MODEL_FLAGS_HIDDEN) {
return;
}
if (model->flags & ENTITY_MODEL_FLAGS_40) {
return;
}
if (!(model->flags & ENTITY_MODEL_FLAGS_CAM3)) {
return;
}
model->transform = *transformMtx;
model->vertexArray = NULL;
gDisplayContext->matrixStack[gMatrixListPos] = model->transform;
gSPMatrix(gMasterGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
if (!(model->flags & ENTITY_MODEL_FLAGS_USE_IMAGE)) {
s32 cond = FALSE;
if (entity_fog_enabled && !(model->flags & ENTITY_MODEL_FLAGS_FOG_DISABLED)) {
cond = TRUE;
}
switch (cond) {
case FALSE:
switch (model->renderMode) {
case RENDER_MODE_SURFACE_OPA:
gSPDisplayList(gMasterGfxPos++, D_8014B7F8);
break;
case RENDER_MODE_DECAL_OPA:
gSPDisplayList(gMasterGfxPos++, D_8014B820);
break;
case RENDER_MODE_INTERSECTING_OPA:
gSPDisplayList(gMasterGfxPos++, D_8014B848);
break;
case RENDER_MODE_ALPHATEST:
gSPDisplayList(gMasterGfxPos++, D_8014B870);
break;
case RENDER_MODE_SURFACE_XLU_LAYER1:
case RENDER_MODE_SURFACE_XLU_LAYER2:
case RENDER_MODE_SURFACE_XLU_LAYER3:
gSPDisplayList(gMasterGfxPos++, D_8014B898);
break;
case RENDER_MODE_SURFACE_XLU_NO_AA:
gSPDisplayList(gMasterGfxPos++, D_8014B9B0);
break;
case RENDER_MODE_DECAL_XLU:
case RENDER_MODE_1E:
gSPDisplayList(gMasterGfxPos++, D_8014B8C0);
break;
case RENDER_MODE_DECAL_XLU_NOAA:
case RENDER_MODE_SHADOW:
gSPDisplayList(gMasterGfxPos++, D_8014B9D8);
break;
case RENDER_MODE_INTERSECTING_XLU:
gSPDisplayList(gMasterGfxPos++, D_8014B8E8);
break;
case RENDER_MODE_28:
gSPDisplayList(gMasterGfxPos++, D_8014BA00);
break;
case RENDER_MODE_ALPHATEST_ONESIDED:
gSPDisplayList(gMasterGfxPos++, D_8014B988);
break;
case RENDER_MODE_SURFACE_OPA_NO_ZB:
case RENDER_MODE_2A:
gSPDisplayList(gMasterGfxPos++, D_8014BA48);
break;
case RENDER_MODE_ALPHATEST_NO_ZB:
case RENDER_MODE_2B:
gSPDisplayList(gMasterGfxPos++, D_8014BA70);
break;
case RENDER_MODE_SURFACE_XLU_NO_ZB:
case RENDER_MODE_2C:
gSPDisplayList(gMasterGfxPos++, D_8014BA98);
break;
case RENDER_MODE_2D:
gSPDisplayList(gMasterGfxPos++, D_8014BAE8);
break;
}
break;
case TRUE:
switch (model->renderMode) {
case RENDER_MODE_SURFACE_OPA:
gSPDisplayList(gMasterGfxPos++, D_8014BE78);
break;
case RENDER_MODE_DECAL_OPA:
gSPDisplayList(gMasterGfxPos++, D_8014BEA0);
break;
case RENDER_MODE_INTERSECTING_OPA:
gSPDisplayList(gMasterGfxPos++, D_8014BEC8);
break;
case RENDER_MODE_ALPHATEST:
gSPDisplayList(gMasterGfxPos++, D_8014BEF0);
break;
case RENDER_MODE_SURFACE_XLU_LAYER1:
gSPDisplayList(gMasterGfxPos++, D_8014BF18);
break;
case RENDER_MODE_DECAL_XLU:
gSPDisplayList(gMasterGfxPos++, D_8014BF40);
break;
case RENDER_MODE_INTERSECTING_XLU:
gSPDisplayList(gMasterGfxPos++, D_8014BF68);
break;
}
gDPSetFogColor(gMasterGfxPos++, entity_fog_red, entity_fog_green, entity_fog_blue, entity_fog_alpha);
gSPFogPosition(gMasterGfxPos++, entity_fog_dist_min, entity_fog_dist_max);
break;
}
gSPClearGeometryMode(gMasterGfxPos++, G_LIGHTING);
if (!entity_fog_enabled || (model->flags & ENTITY_MODEL_FLAGS_FOG_DISABLED)) {
gDPSetCombineMode(gMasterGfxPos++, G_CC_MODULATEIA, G_CC_MODULATEIA);
} else {
gDPSetCombineLERP(gMasterGfxPos++, TEXEL0, 0, SHADE, 0, TEXEL0, 0, 0, TEXEL0, COMBINED, 0, SHADE, 0, 0, 0, 0, COMBINED);
}
if (model->vertexArray != NULL) {
gSPSegment(gMasterGfxPos++, D_80154374, VIRTUAL_TO_PHYSICAL(model->vertexArray));
}
gSPDisplayList(gMasterGfxPos++, model->gfx.displayList);
gSPPopMatrix(gMasterGfxPos++, G_MTX_MODELVIEW);
gDPPipeSync(gMasterGfxPos++);
if (!(model->flags & ENTITY_MODEL_FLAGS_200)) {
return;
}
guMtxL2F(mtx, &model->transform);
make_entity_model_mtx_flipZ(mtx2);
guMtxCatF(mtx, mtx2, mtx);
guMtxF2L(mtx, &model->transform);
gDisplayContext->matrixStack[gMatrixListPos] = model->transform;
gSPMatrix(gMasterGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
gSPDisplayList(gMasterGfxPos++, model->gfx.displayList);
} else {
SpriteRasterInfo* imageData;
gDPPipeSync(gMasterGfxPos++);
gSPClearGeometryMode(gMasterGfxPos++, G_ZBUFFER | G_SHADE | G_CULL_BOTH | G_FOG | G_LIGHTING | G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR | G_LOD | G_SHADING_SMOOTH);
gSPSetGeometryMode(gMasterGfxPos++, G_ZBUFFER | G_SHADE | G_LIGHTING | G_SHADING_SMOOTH);
gSPSetLights1(gMasterGfxPos++, D_8014C268);
gSPTexture(gMasterGfxPos++, -1, -1, 0, G_TX_RENDERTILE, G_ON);
gDPSetAlphaCompare(gMasterGfxPos++, G_AC_NONE);
gSPSetOtherMode(gMasterGfxPos++, G_SETOTHERMODE_H, G_MDSFT_ALPHADITHER, 18, G_AD_DISABLE | G_CD_DISABLE | G_CK_NONE | G_TC_FILT | G_TF_BILERP | G_TT_NONE | G_TL_TILE | G_TD_CLAMP | G_TP_PERSP | G_CYC_1CYCLE);
imageData = model->gfx.imageData;
foldImage.raster = imageData->raster;
foldImage.palette = imageData->defaultPal;
foldImage.width = imageData->width;
foldImage.height = imageData->height;
foldImage.xOffset = -imageData->width / 2;
foldImage.yOffset = imageData->height / 2;
foldImage.unk_10 = 255;
guMtxL2F(foldMtx, &model->transform);
fold_appendGfx_component(0, &foldImage, 0, foldMtx);
}
gSPPopMatrix(gMasterGfxPos++, G_MTX_MODELVIEW);
gDPPipeSync(gMasterGfxPos++);
}
void set_entity_model_render_command_list(s32 idx, u32* commandList) { void set_entity_model_render_command_list(s32 idx, u32* commandList) {
u32* phi_a1; u32* phi_a1;
@ -312,8 +740,8 @@ void free_entity_model_by_index(s32 idx) {
EntityModel* entityModel = (*gCurrentEntityModelList)[index]; EntityModel* entityModel = (*gCurrentEntityModelList)[index];
if (entityModel != NULL && entityModel->flags) { if (entityModel != NULL && entityModel->flags) {
if (entityModel->flags & ENTITY_MODEL_FLAGS_400) { if (entityModel->flags & ENTITY_MODEL_FLAGS_USE_IMAGE) {
heap_free(entityModel->displayList); heap_free(entityModel->gfx.imageData);
} }
{ {
s32* modelCount = &gEntityModelCount; s32* modelCount = &gEntityModelCount;
@ -357,8 +785,8 @@ void clear_entity_model_flags(s32 idx, s32 newFlags) {
void bind_entity_model_setupGfx(s32 idx, s32 setupGfxCallbackArg0, UNK_FUN_PTR(fpSetupGfxCallback)) { void bind_entity_model_setupGfx(s32 idx, s32 setupGfxCallbackArg0, UNK_FUN_PTR(fpSetupGfxCallback)) {
EntityModel* entityModel = (*gCurrentEntityModelList)[idx & ~BATTLE_ENTITY_ID_MASK]; EntityModel* entityModel = (*gCurrentEntityModelList)[idx & ~BATTLE_ENTITY_ID_MASK];
entityModel->fpSetupGfxCallback = fpSetupGfxCallback; entityModel->fpSetupGfxCallback = (void (*)(void*))fpSetupGfxCallback;
entityModel->setupGfxCallbackArg0 = setupGfxCallbackArg0; entityModel->setupGfxCallbackArg0 = (void*)setupGfxCallbackArg0;
} }
void func_80122F8C(s32 idx, s32 newFlags) { void func_80122F8C(s32 idx, s32 newFlags) {
@ -370,7 +798,7 @@ void func_80122F8C(s32 idx, s32 newFlags) {
void func_80122FB8(s32 idx, s32 newFlags) { void func_80122FB8(s32 idx, s32 newFlags) {
EntityModel* entityModel = (*gCurrentEntityModelList)[idx & ~BATTLE_ENTITY_ID_MASK]; EntityModel* entityModel = (*gCurrentEntityModelList)[idx & ~BATTLE_ENTITY_ID_MASK];
entityModel->flags = (entityModel->flags & ~(ENTITY_MODEL_FLAGS_1 | ENTITY_MODEL_FLAGS_2 | ENTITY_MODEL_FLAGS_4 | ENTITY_MODEL_FLAGS_8)) | newFlags; entityModel->flags = (entityModel->flags & ~(ENTITY_MODEL_FLAGS_CAM0 | ENTITY_MODEL_FLAGS_CAM1 | ENTITY_MODEL_FLAGS_CAM2 | ENTITY_MODEL_FLAGS_CAM3)) | newFlags;
} }
void enable_entity_fog(void) { void enable_entity_fog(void) {

View File

@ -885,7 +885,7 @@ void virtual_entity_list_render_world(void) {
for (i = 0; i < ARRAY_COUNT(*D_802DB7C0); i++) { for (i = 0; i < ARRAY_COUNT(*D_802DB7C0); i++) {
virtualEntity = (*D_802DB7C0)[i]; virtualEntity = (*D_802DB7C0)[i];
if (virtualEntity != NULL) { if (virtualEntity != NULL) {
if (!(virtualEntity->entityModelIndex < 0 || get_entity_model(virtualEntity->entityModelIndex)->flags & 8)) { if (!(virtualEntity->entityModelIndex < 0 || get_entity_model(virtualEntity->entityModelIndex)->flags & ENTITY_MODEL_FLAGS_CAM3)) {
guTranslateF(translation, virtualEntity->pos.x, virtualEntity->pos.y, virtualEntity->pos.z); guTranslateF(translation, virtualEntity->pos.x, virtualEntity->pos.y, virtualEntity->pos.z);
guRotateF(xRot, virtualEntity->rot.x, 1.0f, 0.0f, 0.0f); guRotateF(xRot, virtualEntity->rot.x, 1.0f, 0.0f, 0.0f);
guRotateF(yRot, virtualEntity->rot.y, 0.0f, 1.0f, 0.0f); guRotateF(yRot, virtualEntity->rot.y, 0.0f, 1.0f, 0.0f);
@ -918,7 +918,7 @@ void virtual_entity_list_render_UI(void) {
for (i = 0; i < ARRAY_COUNT(*D_802DB7C0); i++) { for (i = 0; i < ARRAY_COUNT(*D_802DB7C0); i++) {
virtualEntity = (*D_802DB7C0)[i]; virtualEntity = (*D_802DB7C0)[i];
if (virtualEntity != NULL) { if (virtualEntity != NULL) {
if (!(virtualEntity->entityModelIndex < 0 || !(get_entity_model(virtualEntity->entityModelIndex)->flags & 8))) { if (!(virtualEntity->entityModelIndex < 0 || !(get_entity_model(virtualEntity->entityModelIndex)->flags & ENTITY_MODEL_FLAGS_CAM3))) {
guTranslateF(translation, virtualEntity->pos.x, virtualEntity->pos.y, virtualEntity->pos.z); guTranslateF(translation, virtualEntity->pos.x, virtualEntity->pos.y, virtualEntity->pos.z);
guRotateF(xRot, virtualEntity->rot.x, 1.0f, 0.0f, 0.0f); guRotateF(xRot, virtualEntity->rot.x, 1.0f, 0.0f, 0.0f);
guRotateF(yRot, virtualEntity->rot.y, 0.0f, 1.0f, 0.0f); guRotateF(yRot, virtualEntity->rot.y, 0.0f, 1.0f, 0.0f);

View File

@ -76,13 +76,6 @@ typedef struct SpriteAnimData {
/* 0x0C */ s32 colorVariations; /* 0x0C */ s32 colorVariations;
} SpriteAnimData; // size = 0x10 } SpriteAnimData; // size = 0x10
typedef struct SpriteRasterInfo {
/* 0x00 */ void* raster;
/* 0x04 */ void* defaultPal;
/* 0x08 */ s32 width;
/* 0x0C */ s32 height;
} SpriteRasterInfo; // size = 0x10
extern Vtx spr_defaultQuad[4]; extern Vtx spr_defaultQuad[4];
extern Vp D_802DF3D0; extern Vp D_802DF3D0;
extern Vp D_802DF3E0; extern Vp D_802DF3E0;

View File

@ -1,15 +0,0 @@
.include "macro.inc"
.section .data
dlabel D_8014ED90
.word 0xDF000000, 0x00000000
dlabel D_8014ED98
.word 0x00800080, 0x01FF0000, 0x00800080, 0x01FF0000
dlabel D_8014EDA8
.word 0xFFF0FFF0, 0x00000000, 0x00000000, 0x000000FF, 0x0010FFF0, 0x00000000, 0x10000000, 0x000000FF, 0x00100010, 0x00000000, 0x10001000, 0x000000FF, 0xFFF00010, 0x00000000, 0x00001000, 0x000000FF
dlabel D_8014EDE8
.word 0x01004008, D_8014EDA8, 0x06000204, 0x00000406, 0xE7000000, 0x00000000, 0xDF000000, 0x00000000, 0x00000000, 0x00000000

View File

@ -1,417 +0,0 @@
.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel func_80138740
/* CEE40 80138740 27BDFFB8 */ addiu $sp, $sp, -0x48
/* CEE44 80138744 AFB50034 */ sw $s5, 0x34($sp)
/* CEE48 80138748 0080A82D */ daddu $s5, $a0, $zero
/* CEE4C 8013874C AFB40030 */ sw $s4, 0x30($sp)
/* CEE50 80138750 00C0A02D */ daddu $s4, $a2, $zero
/* CEE54 80138754 0000C02D */ daddu $t8, $zero, $zero
/* CEE58 80138758 C7A00058 */ lwc1 $f0, 0x58($sp)
/* CEE5C 8013875C 02A0102D */ daddu $v0, $s5, $zero
/* CEE60 80138760 AFBF0044 */ sw $ra, 0x44($sp)
/* CEE64 80138764 AFBE0040 */ sw $fp, 0x40($sp)
/* CEE68 80138768 AFB7003C */ sw $s7, 0x3c($sp)
/* CEE6C 8013876C AFB60038 */ sw $s6, 0x38($sp)
/* CEE70 80138770 AFB3002C */ sw $s3, 0x2c($sp)
/* CEE74 80138774 AFB20028 */ sw $s2, 0x28($sp)
/* CEE78 80138778 AFB10024 */ sw $s1, 0x24($sp)
/* CEE7C 8013877C AFB00020 */ sw $s0, 0x20($sp)
/* CEE80 80138780 06A10002 */ bgez $s5, .L8013878C
/* CEE84 80138784 AFA5004C */ sw $a1, 0x4c($sp)
/* CEE88 80138788 26A20003 */ addiu $v0, $s5, 3
.L8013878C:
/* CEE8C 8013878C 00021083 */ sra $v0, $v0, 2
/* CEE90 80138790 0002A880 */ sll $s5, $v0, 2
/* CEE94 80138794 06810002 */ bgez $s4, .L801387A0
/* CEE98 80138798 0280102D */ daddu $v0, $s4, $zero
/* CEE9C 8013879C 26820003 */ addiu $v0, $s4, 3
.L801387A0:
/* CEEA0 801387A0 3C032AAA */ lui $v1, 0x2aaa
/* CEEA4 801387A4 3463AAAB */ ori $v1, $v1, 0xaaab
/* CEEA8 801387A8 00021083 */ sra $v0, $v0, 2
/* CEEAC 801387AC 8FB9004C */ lw $t9, 0x4c($sp)
/* CEEB0 801387B0 00021080 */ sll $v0, $v0, 2
/* CEEB4 801387B4 00F92023 */ subu $a0, $a3, $t9
/* CEEB8 801387B8 00830018 */ mult $a0, $v1
/* CEEBC 801387BC 24540004 */ addiu $s4, $v0, 4
/* CEEC0 801387C0 0000902D */ daddu $s2, $zero, $zero
/* CEEC4 801387C4 3C058007 */ lui $a1, %hi(nuGfxCfbNum)
/* CEEC8 801387C8 24A573F0 */ addiu $a1, $a1, %lo(nuGfxCfbNum)
/* CEECC 801387CC 000417C3 */ sra $v0, $a0, 0x1f
/* CEED0 801387D0 0000C810 */ mfhi $t9
/* CEED4 801387D4 0322C823 */ subu $t9, $t9, $v0
/* CEED8 801387D8 AFB90010 */ sw $t9, 0x10($sp)
/* CEEDC 801387DC 0320B82D */ daddu $s7, $t9, $zero
/* CEEE0 801387E0 00171040 */ sll $v0, $s7, 1
/* CEEE4 801387E4 00571021 */ addu $v0, $v0, $s7
/* CEEE8 801387E8 00021040 */ sll $v0, $v0, 1
/* CEEEC 801387EC 8CA30000 */ lw $v1, ($a1)
/* CEEF0 801387F0 00822023 */ subu $a0, $a0, $v0
/* CEEF4 801387F4 1060001A */ beqz $v1, .L80138860
/* CEEF8 801387F8 AFA40010 */ sw $a0, 0x10($sp)
/* CEEFC 801387FC 00A0382D */ daddu $a3, $a1, $zero
/* CEF00 80138800 3C05800A */ lui $a1, %hi(nuGfxCfb)
/* CEF04 80138804 8CA5A658 */ lw $a1, %lo(nuGfxCfb)($a1)
/* CEF08 80138808 3C06800A */ lui $a2, %hi(nuGfxCfb_ptr)
/* CEF0C 8013880C 8CC6A64C */ lw $a2, %lo(nuGfxCfb_ptr)($a2)
/* CEF10 80138810 00A0202D */ daddu $a0, $a1, $zero
.L80138814:
/* CEF14 80138814 8C820000 */ lw $v0, ($a0)
/* CEF18 80138818 1446000B */ bne $v0, $a2, .L80138848
/* CEF1C 8013881C 00000000 */ nop
/* CEF20 80138820 8CE30000 */ lw $v1, ($a3)
/* CEF24 80138824 02431021 */ addu $v0, $s2, $v1
/* CEF28 80138828 2442FFFF */ addiu $v0, $v0, -1
/* CEF2C 8013882C 14600002 */ bnez $v1, .L80138838
/* CEF30 80138830 0043001B */ divu $zero, $v0, $v1
/* CEF34 80138834 0007000D */ break 7
.L80138838:
/* CEF38 80138838 00001810 */ mfhi $v1
/* CEF3C 8013883C 00031880 */ sll $v1, $v1, 2
/* CEF40 80138840 00651821 */ addu $v1, $v1, $a1
/* CEF44 80138844 8C780000 */ lw $t8, ($v1)
.L80138848:
/* CEF48 80138848 3C028007 */ lui $v0, %hi(nuGfxCfbNum)
/* CEF4C 8013884C 8C4273F0 */ lw $v0, %lo(nuGfxCfbNum)($v0)
/* CEF50 80138850 26520001 */ addiu $s2, $s2, 1
/* CEF54 80138854 0242102B */ sltu $v0, $s2, $v0
/* CEF58 80138858 1440FFEE */ bnez $v0, .L80138814
/* CEF5C 8013885C 24840004 */ addiu $a0, $a0, 4
.L80138860:
/* CEF60 80138860 3C05E300 */ lui $a1, 0xe300
/* CEF64 80138864 34A50A01 */ ori $a1, $a1, 0xa01
/* CEF68 80138868 3C08FCFF */ lui $t0, 0xfcff
/* CEF6C 8013886C 3508FFFF */ ori $t0, $t0, 0xffff
/* CEF70 80138870 3C06FFFC */ lui $a2, 0xfffc
/* CEF74 80138874 34C6F67B */ ori $a2, $a2, 0xf67b
/* CEF78 80138878 3C09E200 */ lui $t1, 0xe200
/* CEF7C 8013887C 3529001C */ ori $t1, $t1, 0x1c
/* CEF80 80138880 3C070050 */ lui $a3, 0x50
/* CEF84 80138884 34E74340 */ ori $a3, $a3, 0x4340
/* CEF88 80138888 3C0AE300 */ lui $t2, 0xe300
/* CEF8C 8013888C 354A1801 */ ori $t2, $t2, 0x1801
/* CEF90 80138890 3C0BE300 */ lui $t3, 0xe300
/* CEF94 80138894 356B1A01 */ ori $t3, $t3, 0x1a01
/* CEF98 80138898 3C0CE300 */ lui $t4, 0xe300
/* CEF9C 8013889C 358C1201 */ ori $t4, $t4, 0x1201
/* CEFA0 801388A0 3C0DE300 */ lui $t5, 0xe300
/* CEFA4 801388A4 35AD0C00 */ ori $t5, $t5, 0xc00
/* CEFA8 801388A8 3C0ED700 */ lui $t6, 0xd700
/* CEFAC 801388AC 35CE0002 */ ori $t6, $t6, 2
/* CEFB0 801388B0 3C0FE300 */ lui $t7, 0xe300
/* CEFB4 801388B4 35EF1001 */ ori $t7, $t7, 0x1001
/* CEFB8 801388B8 3C10E300 */ lui $s0, 0xe300
/* CEFBC 801388BC 36100D01 */ ori $s0, $s0, 0xd01
/* CEFC0 801388C0 3C11E300 */ lui $s1, 0xe300
/* CEFC4 801388C4 3C04800A */ lui $a0, %hi(gMasterGfxPos)
/* CEFC8 801388C8 2484A66C */ addiu $a0, $a0, %lo(gMasterGfxPos)
/* CEFCC 801388CC 36310F00 */ ori $s1, $s1, 0xf00
/* CEFD0 801388D0 8C820000 */ lw $v0, ($a0)
/* CEFD4 801388D4 3C014F00 */ lui $at, 0x4f00
/* CEFD8 801388D8 44811000 */ mtc1 $at, $f2
/* CEFDC 801388DC 0040182D */ daddu $v1, $v0, $zero
/* CEFE0 801388E0 24420008 */ addiu $v0, $v0, 8
/* CEFE4 801388E4 AC820000 */ sw $v0, ($a0)
/* CEFE8 801388E8 AC650000 */ sw $a1, ($v1)
/* CEFEC 801388EC AC600004 */ sw $zero, 4($v1)
/* CEFF0 801388F0 24430008 */ addiu $v1, $v0, 8
/* CEFF4 801388F4 AC830000 */ sw $v1, ($a0)
/* CEFF8 801388F8 24430010 */ addiu $v1, $v0, 0x10
/* CEFFC 801388FC AC480000 */ sw $t0, ($v0)
/* CF000 80138900 AC460004 */ sw $a2, 4($v0)
/* CF004 80138904 AC830000 */ sw $v1, ($a0)
/* CF008 80138908 24430018 */ addiu $v1, $v0, 0x18
/* CF00C 8013890C AC490008 */ sw $t1, 8($v0)
/* CF010 80138910 AC47000C */ sw $a3, 0xc($v0)
/* CF014 80138914 AC830000 */ sw $v1, ($a0)
/* CF018 80138918 240300C0 */ addiu $v1, $zero, 0xc0
/* CF01C 8013891C AC430014 */ sw $v1, 0x14($v0)
/* CF020 80138920 24430020 */ addiu $v1, $v0, 0x20
/* CF024 80138924 AC4A0010 */ sw $t2, 0x10($v0)
/* CF028 80138928 AC830000 */ sw $v1, ($a0)
/* CF02C 8013892C 24030020 */ addiu $v1, $zero, 0x20
/* CF030 80138930 AC43001C */ sw $v1, 0x1c($v0)
/* CF034 80138934 24430028 */ addiu $v1, $v0, 0x28
/* CF038 80138938 AC4B0018 */ sw $t3, 0x18($v0)
/* CF03C 8013893C AC830000 */ sw $v1, ($a0)
/* CF040 80138940 24430030 */ addiu $v1, $v0, 0x30
/* CF044 80138944 AC4C0020 */ sw $t4, 0x20($v0)
/* CF048 80138948 AC400024 */ sw $zero, 0x24($v0)
/* CF04C 8013894C AC830000 */ sw $v1, ($a0)
/* CF050 80138950 24430038 */ addiu $v1, $v0, 0x38
/* CF054 80138954 AC4D0028 */ sw $t5, 0x28($v0)
/* CF058 80138958 AC40002C */ sw $zero, 0x2c($v0)
/* CF05C 8013895C AC830000 */ sw $v1, ($a0)
/* CF060 80138960 2403FFFF */ addiu $v1, $zero, -1
/* CF064 80138964 AC430034 */ sw $v1, 0x34($v0)
/* CF068 80138968 24430040 */ addiu $v1, $v0, 0x40
/* CF06C 8013896C AC4E0030 */ sw $t6, 0x30($v0)
/* CF070 80138970 AC830000 */ sw $v1, ($a0)
/* CF074 80138974 24430048 */ addiu $v1, $v0, 0x48
/* CF078 80138978 AC4F0038 */ sw $t7, 0x38($v0)
/* CF07C 8013897C AC40003C */ sw $zero, 0x3c($v0)
/* CF080 80138980 AC830000 */ sw $v1, ($a0)
/* CF084 80138984 24430050 */ addiu $v1, $v0, 0x50
/* CF088 80138988 AC500040 */ sw $s0, 0x40($v0)
/* CF08C 8013898C AC400044 */ sw $zero, 0x44($v0)
/* CF090 80138990 AC830000 */ sw $v1, ($a0)
/* CF094 80138994 24430058 */ addiu $v1, $v0, 0x58
/* CF098 80138998 AC510048 */ sw $s1, 0x48($v0)
/* CF09C 8013899C AC40004C */ sw $zero, 0x4c($v0)
/* CF0A0 801389A0 AC830000 */ sw $v1, ($a0)
/* CF0A4 801389A4 3C03FA00 */ lui $v1, 0xfa00
/* CF0A8 801389A8 24440054 */ addiu $a0, $v0, 0x54
/* CF0AC 801389AC 4600103E */ c.le.s $f2, $f0
/* CF0B0 801389B0 00000000 */ nop
/* CF0B4 801389B4 45010005 */ bc1t .L801389CC
/* CF0B8 801389B8 AC430050 */ sw $v1, 0x50($v0)
/* CF0BC 801389BC 4600010D */ trunc.w.s $f4, $f0
/* CF0C0 801389C0 44032000 */ mfc1 $v1, $f4
/* CF0C4 801389C4 0804E27A */ j .L801389E8
/* CF0C8 801389C8 2402FF00 */ addiu $v0, $zero, -0x100
.L801389CC:
/* CF0CC 801389CC 46020001 */ sub.s $f0, $f0, $f2
/* CF0D0 801389D0 3C028000 */ lui $v0, 0x8000
/* CF0D4 801389D4 4600010D */ trunc.w.s $f4, $f0
/* CF0D8 801389D8 44032000 */ mfc1 $v1, $f4
/* CF0DC 801389DC 00000000 */ nop
/* CF0E0 801389E0 00621825 */ or $v1, $v1, $v0
/* CF0E4 801389E4 2402FF00 */ addiu $v0, $zero, -0x100
.L801389E8:
/* CF0E8 801389E8 00621025 */ or $v0, $v1, $v0
/* CF0EC 801389EC AC820000 */ sw $v0, ($a0)
/* CF0F0 801389F0 1AE0006D */ blez $s7, .L80138BA8
/* CF0F4 801389F4 0000902D */ daddu $s2, $zero, $zero
/* CF0F8 801389F8 3C11800A */ lui $s1, %hi(gMasterGfxPos)
/* CF0FC 801389FC 2631A66C */ addiu $s1, $s1, %lo(gMasterGfxPos)
/* CF100 80138A00 02951023 */ subu $v0, $s4, $s5
/* CF104 80138A04 00021040 */ sll $v0, $v0, 1
/* CF108 80138A08 24420007 */ addiu $v0, $v0, 7
/* CF10C 80138A0C 000210C3 */ sra $v0, $v0, 3
/* CF110 80138A10 304201FF */ andi $v0, $v0, 0x1ff
/* CF114 80138A14 00021240 */ sll $v0, $v0, 9
/* CF118 80138A18 3C03F510 */ lui $v1, 0xf510
/* CF11C 80138A1C 0043B025 */ or $s6, $v0, $v1
/* CF120 80138A20 3C1E0700 */ lui $fp, 0x700
/* CF124 80138A24 8FB3004C */ lw $s3, 0x4c($sp)
/* CF128 80138A28 3C03FD10 */ lui $v1, 0xfd10
.L80138A2C:
/* CF12C 80138A2C 3463013F */ ori $v1, $v1, 0x13f
/* CF130 80138A30 0300202D */ daddu $a0, $t8, $zero
/* CF134 80138A34 8E220000 */ lw $v0, ($s1)
/* CF138 80138A38 26520001 */ addiu $s2, $s2, 1
/* CF13C 80138A3C 0040802D */ daddu $s0, $v0, $zero
/* CF140 80138A40 24420008 */ addiu $v0, $v0, 8
/* CF144 80138A44 AE220000 */ sw $v0, ($s1)
/* CF148 80138A48 AE030000 */ sw $v1, ($s0)
/* CF14C 80138A4C 0C0187A4 */ jal osVirtualToPhysical
/* CF150 80138A50 AFB80018 */ sw $t8, 0x18($sp)
/* CF154 80138A54 3C090400 */ lui $t1, 0x400
/* CF158 80138A58 35290400 */ ori $t1, $t1, 0x400
/* CF15C 80138A5C 00133880 */ sll $a3, $s3, 2
/* CF160 80138A60 26640005 */ addiu $a0, $s3, 5
/* CF164 80138A64 26630006 */ addiu $v1, $s3, 6
/* CF168 80138A68 00134140 */ sll $t0, $s3, 5
/* CF16C 80138A6C 0060982D */ daddu $s3, $v1, $zero
/* CF170 80138A70 00153080 */ sll $a2, $s5, 2
/* CF174 80138A74 30C60FFF */ andi $a2, $a2, 0xfff
/* CF178 80138A78 00063300 */ sll $a2, $a2, 0xc
/* CF17C 80138A7C 30E70FFF */ andi $a3, $a3, 0xfff
/* CF180 80138A80 2683FFFF */ addiu $v1, $s4, -1
/* CF184 80138A84 00031880 */ sll $v1, $v1, 2
/* CF188 80138A88 30630FFF */ andi $v1, $v1, 0xfff
/* CF18C 80138A8C 00031B00 */ sll $v1, $v1, 0xc
/* CF190 80138A90 00042080 */ sll $a0, $a0, 2
/* CF194 80138A94 30840FFF */ andi $a0, $a0, 0xfff
/* CF198 80138A98 8E250000 */ lw $a1, ($s1)
/* CF19C 80138A9C 3108FFFF */ andi $t0, $t0, 0xffff
/* CF1A0 80138AA0 AE020004 */ sw $v0, 4($s0)
/* CF1A4 80138AA4 00A0102D */ daddu $v0, $a1, $zero
/* CF1A8 80138AA8 24A50008 */ addiu $a1, $a1, 8
/* CF1AC 80138AAC AE250000 */ sw $a1, ($s1)
/* CF1B0 80138AB0 AC560000 */ sw $s6, ($v0)
/* CF1B4 80138AB4 AC5E0004 */ sw $fp, 4($v0)
/* CF1B8 80138AB8 24A20008 */ addiu $v0, $a1, 8
/* CF1BC 80138ABC AE220000 */ sw $v0, ($s1)
/* CF1C0 80138AC0 3C02E600 */ lui $v0, 0xe600
/* CF1C4 80138AC4 ACA20000 */ sw $v0, ($a1)
/* CF1C8 80138AC8 24A20010 */ addiu $v0, $a1, 0x10
/* CF1CC 80138ACC ACA00004 */ sw $zero, 4($a1)
/* CF1D0 80138AD0 AE220000 */ sw $v0, ($s1)
/* CF1D4 80138AD4 3C02F400 */ lui $v0, 0xf400
/* CF1D8 80138AD8 00E21025 */ or $v0, $a3, $v0
/* CF1DC 80138ADC 00C21025 */ or $v0, $a2, $v0
/* CF1E0 80138AE0 ACA20008 */ sw $v0, 8($a1)
/* CF1E4 80138AE4 009E1025 */ or $v0, $a0, $fp
/* CF1E8 80138AE8 00621025 */ or $v0, $v1, $v0
/* CF1EC 80138AEC ACA2000C */ sw $v0, 0xc($a1)
/* CF1F0 80138AF0 24A20018 */ addiu $v0, $a1, 0x18
/* CF1F4 80138AF4 AE220000 */ sw $v0, ($s1)
/* CF1F8 80138AF8 3C02E700 */ lui $v0, 0xe700
/* CF1FC 80138AFC ACA20010 */ sw $v0, 0x10($a1)
/* CF200 80138B00 24A20020 */ addiu $v0, $a1, 0x20
/* CF204 80138B04 ACA00014 */ sw $zero, 0x14($a1)
/* CF208 80138B08 AE220000 */ sw $v0, ($s1)
/* CF20C 80138B0C 24A20028 */ addiu $v0, $a1, 0x28
/* CF210 80138B10 ACB60018 */ sw $s6, 0x18($a1)
/* CF214 80138B14 ACA0001C */ sw $zero, 0x1c($a1)
/* CF218 80138B18 AE220000 */ sw $v0, ($s1)
/* CF21C 80138B1C 3C02F200 */ lui $v0, 0xf200
/* CF220 80138B20 00E21025 */ or $v0, $a3, $v0
/* CF224 80138B24 00C21025 */ or $v0, $a2, $v0
/* CF228 80138B28 00641825 */ or $v1, $v1, $a0
/* CF22C 80138B2C ACA20020 */ sw $v0, 0x20($a1)
/* CF230 80138B30 24A20030 */ addiu $v0, $a1, 0x30
/* CF234 80138B34 ACA30024 */ sw $v1, 0x24($a1)
/* CF238 80138B38 00141880 */ sll $v1, $s4, 2
/* CF23C 80138B3C 30630FFF */ andi $v1, $v1, 0xfff
/* CF240 80138B40 00031B00 */ sll $v1, $v1, 0xc
/* CF244 80138B44 AE220000 */ sw $v0, ($s1)
/* CF248 80138B48 00131080 */ sll $v0, $s3, 2
/* CF24C 80138B4C 30420FFF */ andi $v0, $v0, 0xfff
/* CF250 80138B50 3C04E400 */ lui $a0, 0xe400
/* CF254 80138B54 00441025 */ or $v0, $v0, $a0
/* CF258 80138B58 00621825 */ or $v1, $v1, $v0
/* CF25C 80138B5C 00C73025 */ or $a2, $a2, $a3
/* CF260 80138B60 24A20038 */ addiu $v0, $a1, 0x38
/* CF264 80138B64 ACA30028 */ sw $v1, 0x28($a1)
/* CF268 80138B68 ACA6002C */ sw $a2, 0x2c($a1)
/* CF26C 80138B6C AE220000 */ sw $v0, ($s1)
/* CF270 80138B70 3C02E100 */ lui $v0, 0xe100
/* CF274 80138B74 ACA20030 */ sw $v0, 0x30($a1)
/* CF278 80138B78 00151540 */ sll $v0, $s5, 0x15
/* CF27C 80138B7C 00481025 */ or $v0, $v0, $t0
/* CF280 80138B80 ACA20034 */ sw $v0, 0x34($a1)
/* CF284 80138B84 24A20040 */ addiu $v0, $a1, 0x40
/* CF288 80138B88 AE220000 */ sw $v0, ($s1)
/* CF28C 80138B8C 3C02F100 */ lui $v0, 0xf100
/* CF290 80138B90 ACA20038 */ sw $v0, 0x38($a1)
/* CF294 80138B94 0257102A */ slt $v0, $s2, $s7
/* CF298 80138B98 ACA9003C */ sw $t1, 0x3c($a1)
/* CF29C 80138B9C 8FB80018 */ lw $t8, 0x18($sp)
/* CF2A0 80138BA0 1440FFA2 */ bnez $v0, .L80138A2C
/* CF2A4 80138BA4 3C03FD10 */ lui $v1, 0xfd10
.L80138BA8:
/* CF2A8 80138BA8 8FB90010 */ lw $t9, 0x10($sp)
/* CF2AC 80138BAC 1320006A */ beqz $t9, .L80138D58
/* CF2B0 80138BB0 3C03FD10 */ lui $v1, 0xfd10
/* CF2B4 80138BB4 3463013F */ ori $v1, $v1, 0x13f
/* CF2B8 80138BB8 3C10800A */ lui $s0, %hi(gMasterGfxPos)
/* CF2BC 80138BBC 2610A66C */ addiu $s0, $s0, %lo(gMasterGfxPos)
/* CF2C0 80138BC0 8E020000 */ lw $v0, ($s0)
/* CF2C4 80138BC4 0300202D */ daddu $a0, $t8, $zero
/* CF2C8 80138BC8 0040882D */ daddu $s1, $v0, $zero
/* CF2CC 80138BCC 24420008 */ addiu $v0, $v0, 8
/* CF2D0 80138BD0 AE020000 */ sw $v0, ($s0)
/* CF2D4 80138BD4 0C0187A4 */ jal osVirtualToPhysical
/* CF2D8 80138BD8 AE230000 */ sw $v1, ($s1)
/* CF2DC 80138BDC 3C0C0400 */ lui $t4, 0x400
/* CF2E0 80138BE0 358C0400 */ ori $t4, $t4, 0x400
/* CF2E4 80138BE4 02952823 */ subu $a1, $s4, $s5
/* CF2E8 80138BE8 00052840 */ sll $a1, $a1, 1
/* CF2EC 80138BEC 24A50007 */ addiu $a1, $a1, 7
/* CF2F0 80138BF0 000528C3 */ sra $a1, $a1, 3
/* CF2F4 80138BF4 30A501FF */ andi $a1, $a1, 0x1ff
/* CF2F8 80138BF8 8E040000 */ lw $a0, ($s0)
/* CF2FC 80138BFC 00052A40 */ sll $a1, $a1, 9
/* CF300 80138C00 AE220004 */ sw $v0, 4($s1)
/* CF304 80138C04 3C02F510 */ lui $v0, 0xf510
/* CF308 80138C08 00A22825 */ or $a1, $a1, $v0
/* CF30C 80138C0C 3C0A0700 */ lui $t2, 0x700
/* CF310 80138C10 00154880 */ sll $t1, $s5, 2
/* CF314 80138C14 31290FFF */ andi $t1, $t1, 0xfff
/* CF318 80138C18 00094B00 */ sll $t1, $t1, 0xc
/* CF31C 80138C1C 00123840 */ sll $a3, $s2, 1
/* CF320 80138C20 00F23821 */ addu $a3, $a3, $s2
/* CF324 80138C24 00073840 */ sll $a3, $a3, 1
/* CF328 80138C28 0080182D */ daddu $v1, $a0, $zero
/* CF32C 80138C2C 24840008 */ addiu $a0, $a0, 8
/* CF330 80138C30 24820008 */ addiu $v0, $a0, 8
/* CF334 80138C34 AE040000 */ sw $a0, ($s0)
/* CF338 80138C38 AC650000 */ sw $a1, ($v1)
/* CF33C 80138C3C AC6A0004 */ sw $t2, 4($v1)
/* CF340 80138C40 AE020000 */ sw $v0, ($s0)
/* CF344 80138C44 3C02E600 */ lui $v0, 0xe600
/* CF348 80138C48 AC820000 */ sw $v0, ($a0)
/* CF34C 80138C4C 24820010 */ addiu $v0, $a0, 0x10
/* CF350 80138C50 AC800004 */ sw $zero, 4($a0)
/* CF354 80138C54 AE020000 */ sw $v0, ($s0)
/* CF358 80138C58 3C02F400 */ lui $v0, 0xf400
/* CF35C 80138C5C 2683FFFF */ addiu $v1, $s4, -1
/* CF360 80138C60 00031880 */ sll $v1, $v1, 2
/* CF364 80138C64 30630FFF */ andi $v1, $v1, 0xfff
/* CF368 80138C68 8FB9004C */ lw $t9, 0x4c($sp)
/* CF36C 80138C6C 00031B00 */ sll $v1, $v1, 0xc
/* CF370 80138C70 03273821 */ addu $a3, $t9, $a3
/* CF374 80138C74 00075880 */ sll $t3, $a3, 2
/* CF378 80138C78 316B0FFF */ andi $t3, $t3, 0xfff
/* CF37C 80138C7C 01621025 */ or $v0, $t3, $v0
/* CF380 80138C80 01221025 */ or $v0, $t1, $v0
/* CF384 80138C84 AC820008 */ sw $v0, 8($a0)
/* CF388 80138C88 8FB90010 */ lw $t9, 0x10($sp)
/* CF38C 80138C8C 24820018 */ addiu $v0, $a0, 0x18
/* CF390 80138C90 00F93021 */ addu $a2, $a3, $t9
/* CF394 80138C94 24C8FFFF */ addiu $t0, $a2, -1
/* CF398 80138C98 00084080 */ sll $t0, $t0, 2
/* CF39C 80138C9C 31080FFF */ andi $t0, $t0, 0xfff
/* CF3A0 80138CA0 010A5025 */ or $t2, $t0, $t2
/* CF3A4 80138CA4 006A5025 */ or $t2, $v1, $t2
/* CF3A8 80138CA8 AC8A000C */ sw $t2, 0xc($a0)
/* CF3AC 80138CAC AE020000 */ sw $v0, ($s0)
/* CF3B0 80138CB0 3C02E700 */ lui $v0, 0xe700
/* CF3B4 80138CB4 AC820010 */ sw $v0, 0x10($a0)
/* CF3B8 80138CB8 24820020 */ addiu $v0, $a0, 0x20
/* CF3BC 80138CBC AC800014 */ sw $zero, 0x14($a0)
/* CF3C0 80138CC0 AE020000 */ sw $v0, ($s0)
/* CF3C4 80138CC4 24820028 */ addiu $v0, $a0, 0x28
/* CF3C8 80138CC8 AC850018 */ sw $a1, 0x18($a0)
/* CF3CC 80138CCC AC80001C */ sw $zero, 0x1c($a0)
/* CF3D0 80138CD0 AE020000 */ sw $v0, ($s0)
/* CF3D4 80138CD4 3C02F200 */ lui $v0, 0xf200
/* CF3D8 80138CD8 01621025 */ or $v0, $t3, $v0
/* CF3DC 80138CDC 01221025 */ or $v0, $t1, $v0
/* CF3E0 80138CE0 00681825 */ or $v1, $v1, $t0
/* CF3E4 80138CE4 AC820020 */ sw $v0, 0x20($a0)
/* CF3E8 80138CE8 24820030 */ addiu $v0, $a0, 0x30
/* CF3EC 80138CEC AC830024 */ sw $v1, 0x24($a0)
/* CF3F0 80138CF0 AE020000 */ sw $v0, ($s0)
/* CF3F4 80138CF4 00141080 */ sll $v0, $s4, 2
/* CF3F8 80138CF8 30420FFF */ andi $v0, $v0, 0xfff
/* CF3FC 80138CFC 00021300 */ sll $v0, $v0, 0xc
/* CF400 80138D00 00063080 */ sll $a2, $a2, 2
/* CF404 80138D04 30C60FFF */ andi $a2, $a2, 0xfff
/* CF408 80138D08 3C03E400 */ lui $v1, 0xe400
/* CF40C 80138D0C 00C33025 */ or $a2, $a2, $v1
/* CF410 80138D10 00461025 */ or $v0, $v0, $a2
/* CF414 80138D14 012B4825 */ or $t1, $t1, $t3
/* CF418 80138D18 AC820028 */ sw $v0, 0x28($a0)
/* CF41C 80138D1C 24820038 */ addiu $v0, $a0, 0x38
/* CF420 80138D20 AC89002C */ sw $t1, 0x2c($a0)
/* CF424 80138D24 AE020000 */ sw $v0, ($s0)
/* CF428 80138D28 3C02E100 */ lui $v0, 0xe100
/* CF42C 80138D2C AC820030 */ sw $v0, 0x30($a0)
/* CF430 80138D30 00151540 */ sll $v0, $s5, 0x15
/* CF434 80138D34 00073940 */ sll $a3, $a3, 5
/* CF438 80138D38 30E7FFFF */ andi $a3, $a3, 0xffff
/* CF43C 80138D3C 00471025 */ or $v0, $v0, $a3
/* CF440 80138D40 AC820034 */ sw $v0, 0x34($a0)
/* CF444 80138D44 24820040 */ addiu $v0, $a0, 0x40
/* CF448 80138D48 AE020000 */ sw $v0, ($s0)
/* CF44C 80138D4C 3C02F100 */ lui $v0, 0xf100
/* CF450 80138D50 AC820038 */ sw $v0, 0x38($a0)
/* CF454 80138D54 AC8C003C */ sw $t4, 0x3c($a0)
.L80138D58:
/* CF458 80138D58 8FBF0044 */ lw $ra, 0x44($sp)
/* CF45C 80138D5C 8FBE0040 */ lw $fp, 0x40($sp)
/* CF460 80138D60 8FB7003C */ lw $s7, 0x3c($sp)
/* CF464 80138D64 8FB60038 */ lw $s6, 0x38($sp)
/* CF468 80138D68 8FB50034 */ lw $s5, 0x34($sp)
/* CF46C 80138D6C 8FB40030 */ lw $s4, 0x30($sp)
/* CF470 80138D70 8FB3002C */ lw $s3, 0x2c($sp)
/* CF474 80138D74 8FB20028 */ lw $s2, 0x28($sp)
/* CF478 80138D78 8FB10024 */ lw $s1, 0x24($sp)
/* CF47C 80138D7C 8FB00020 */ lw $s0, 0x20($sp)
/* CF480 80138D80 03E00008 */ jr $ra
/* CF484 80138D84 27BD0048 */ addiu $sp, $sp, 0x48

View File

@ -1,68 +0,0 @@
.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel func_80138D88
/* CF488 80138D88 27BDFFE0 */ addiu $sp, $sp, -0x20
/* CF48C 80138D8C AFBF0018 */ sw $ra, 0x18($sp)
/* CF490 80138D90 0080182D */ daddu $v1, $a0, $zero
/* CF494 80138D94 00C3102A */ slt $v0, $a2, $v1
/* CF498 80138D98 10400004 */ beqz $v0, .L80138DAC
/* CF49C 80138D9C 00A0402D */ daddu $t0, $a1, $zero
/* CF4A0 80138DA0 00C0202D */ daddu $a0, $a2, $zero
/* CF4A4 80138DA4 0804E36C */ j .L80138DB0
/* CF4A8 80138DA8 0060302D */ daddu $a2, $v1, $zero
.L80138DAC:
/* CF4AC 80138DAC 0060202D */ daddu $a0, $v1, $zero
.L80138DB0:
/* CF4B0 80138DB0 00E8102A */ slt $v0, $a3, $t0
/* CF4B4 80138DB4 10400003 */ beqz $v0, .L80138DC4
/* CF4B8 80138DB8 00E0282D */ daddu $a1, $a3, $zero
/* CF4BC 80138DBC 0804E372 */ j .L80138DC8
/* CF4C0 80138DC0 0100382D */ daddu $a3, $t0, $zero
.L80138DC4:
/* CF4C4 80138DC4 0100282D */ daddu $a1, $t0, $zero
.L80138DC8:
/* CF4C8 80138DC8 0086102A */ slt $v0, $a0, $a2
/* CF4CC 80138DCC 1040001E */ beqz $v0, .L80138E48
/* CF4D0 80138DD0 00A7102A */ slt $v0, $a1, $a3
/* CF4D4 80138DD4 1040001C */ beqz $v0, .L80138E48
/* CF4D8 80138DD8 00000000 */ nop
/* CF4DC 80138DDC 04820001 */ bltzl $a0, .L80138DE4
/* CF4E0 80138DE0 0000202D */ daddu $a0, $zero, $zero
.L80138DE4:
/* CF4E4 80138DE4 04A20001 */ bltzl $a1, .L80138DEC
/* CF4E8 80138DE8 0000282D */ daddu $a1, $zero, $zero
.L80138DEC:
/* CF4EC 80138DEC 04C20001 */ bltzl $a2, .L80138DF4
/* CF4F0 80138DF0 0000302D */ daddu $a2, $zero, $zero
.L80138DF4:
/* CF4F4 80138DF4 04E20001 */ bltzl $a3, .L80138DFC
/* CF4F8 80138DF8 0000382D */ daddu $a3, $zero, $zero
.L80138DFC:
/* CF4FC 80138DFC 28820140 */ slti $v0, $a0, 0x140
/* CF500 80138E00 50400001 */ beql $v0, $zero, .L80138E08
/* CF504 80138E04 2404013F */ addiu $a0, $zero, 0x13f
.L80138E08:
/* CF508 80138E08 28A200F0 */ slti $v0, $a1, 0xf0
/* CF50C 80138E0C 50400001 */ beql $v0, $zero, .L80138E14
/* CF510 80138E10 240500EF */ addiu $a1, $zero, 0xef
.L80138E14:
/* CF514 80138E14 28C20140 */ slti $v0, $a2, 0x140
/* CF518 80138E18 50400001 */ beql $v0, $zero, .L80138E20
/* CF51C 80138E1C 2406013F */ addiu $a2, $zero, 0x13f
.L80138E20:
/* CF520 80138E20 28E200F0 */ slti $v0, $a3, 0xf0
/* CF524 80138E24 50400001 */ beql $v0, $zero, .L80138E2C
/* CF528 80138E28 240700EF */ addiu $a3, $zero, 0xef
.L80138E2C:
/* CF52C 80138E2C 10860006 */ beq $a0, $a2, .L80138E48
/* CF530 80138E30 00000000 */ nop
/* CF534 80138E34 10A70004 */ beq $a1, $a3, .L80138E48
/* CF538 80138E38 00000000 */ nop
/* CF53C 80138E3C C7A00030 */ lwc1 $f0, 0x30($sp)
/* CF540 80138E40 0C04E1D0 */ jal func_80138740
/* CF544 80138E44 E7A00010 */ swc1 $f0, 0x10($sp)
.L80138E48:
/* CF548 80138E48 8FBF0018 */ lw $ra, 0x18($sp)
/* CF54C 80138E4C 03E00008 */ jr $ra
/* CF550 80138E50 27BD0020 */ addiu $sp, $sp, 0x20

File diff suppressed because it is too large Load Diff

View File

@ -1,303 +0,0 @@
.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
.section .rodata
dlabel D_80150FA0
.double 0.09, 0.0
.section .text
glabel func_80139F10
/* D0610 80139F10 0080782D */ daddu $t7, $a0, $zero
/* D0614 80139F14 8FA3001C */ lw $v1, 0x1c($sp)
/* D0618 80139F18 44864000 */ mtc1 $a2, $f8
/* D061C 80139F1C 04600014 */ bltz $v1, .L80139F70
/* D0620 80139F20 00A0C02D */ daddu $t8, $a1, $zero
/* D0624 80139F24 3C04800B */ lui $a0, %hi(gCameras)
/* D0628 80139F28 24841D80 */ addiu $a0, $a0, %lo(gCameras)
/* D062C 80139F2C 00031080 */ sll $v0, $v1, 2
/* D0630 80139F30 00431021 */ addu $v0, $v0, $v1
/* D0634 80139F34 00021080 */ sll $v0, $v0, 2
/* D0638 80139F38 00431023 */ subu $v0, $v0, $v1
/* D063C 80139F3C 000218C0 */ sll $v1, $v0, 3
/* D0640 80139F40 00431021 */ addu $v0, $v0, $v1
/* D0644 80139F44 000210C0 */ sll $v0, $v0, 3
/* D0648 80139F48 00441021 */ addu $v0, $v0, $a0
/* D064C 80139F4C 8449000E */ lh $t1, 0xe($v0)
/* D0650 80139F50 844A0010 */ lh $t2, 0x10($v0)
/* D0654 80139F54 8443000A */ lh $v1, 0xa($v0)
/* D0658 80139F58 8442000C */ lh $v0, 0xc($v0)
/* D065C 80139F5C 01235821 */ addu $t3, $t1, $v1
/* D0660 80139F60 01426021 */ addu $t4, $t2, $v0
/* D0664 80139F64 0120682D */ daddu $t5, $t1, $zero
/* D0668 80139F68 0804E7E2 */ j .L80139F88
/* D066C 80139F6C 0140702D */ daddu $t6, $t2, $zero
.L80139F70:
/* D0670 80139F70 0000482D */ daddu $t1, $zero, $zero
/* D0674 80139F74 0120502D */ daddu $t2, $t1, $zero
/* D0678 80139F78 240B0140 */ addiu $t3, $zero, 0x140
/* D067C 80139F7C 240C00F0 */ addiu $t4, $zero, 0xf0
/* D0680 80139F80 0120682D */ daddu $t5, $t1, $zero
/* D0684 80139F84 0120702D */ daddu $t6, $t1, $zero
.L80139F88:
/* D0688 80139F88 44800000 */ mtc1 $zero, $f0
/* D068C 80139F8C 00000000 */ nop
/* D0690 80139F90 46004032 */ c.eq.s $f8, $f0
/* D0694 80139F94 00000000 */ nop
/* D0698 80139F98 450100F0 */ bc1t .L8013A35C
/* D069C 80139F9C 3C04ED00 */ lui $a0, 0xed00
/* D06A0 80139FA0 3C014080 */ lui $at, 0x4080
/* D06A4 80139FA4 44812000 */ mtc1 $at, $f4
/* D06A8 80139FA8 44891000 */ mtc1 $t1, $f2
/* D06AC 80139FAC 00000000 */ nop
/* D06B0 80139FB0 468010A0 */ cvt.s.w $f2, $f2
/* D06B4 80139FB4 46041082 */ mul.s $f2, $f2, $f4
/* D06B8 80139FB8 00000000 */ nop
/* D06BC 80139FBC 3C08800A */ lui $t0, %hi(gMasterGfxPos)
/* D06C0 80139FC0 2508A66C */ addiu $t0, $t0, %lo(gMasterGfxPos)
/* D06C4 80139FC4 448A0000 */ mtc1 $t2, $f0
/* D06C8 80139FC8 00000000 */ nop
/* D06CC 80139FCC 46800020 */ cvt.s.w $f0, $f0
/* D06D0 80139FD0 8D060000 */ lw $a2, ($t0)
/* D06D4 80139FD4 46040002 */ mul.s $f0, $f0, $f4
/* D06D8 80139FD8 00000000 */ nop
/* D06DC 80139FDC 3C01437F */ lui $at, 0x437f
/* D06E0 80139FE0 44813000 */ mtc1 $at, $f6
/* D06E4 80139FE4 00C0282D */ daddu $a1, $a2, $zero
/* D06E8 80139FE8 24C60008 */ addiu $a2, $a2, 8
/* D06EC 80139FEC AD060000 */ sw $a2, ($t0)
/* D06F0 80139FF0 46064032 */ c.eq.s $f8, $f6
/* D06F4 80139FF4 4600128D */ trunc.w.s $f10, $f2
/* D06F8 80139FF8 44025000 */ mfc1 $v0, $f10
/* D06FC 80139FFC 00000000 */ nop
/* D0700 8013A000 30420FFF */ andi $v0, $v0, 0xfff
/* D0704 8013A004 00021300 */ sll $v0, $v0, 0xc
/* D0708 8013A008 4600028D */ trunc.w.s $f10, $f0
/* D070C 8013A00C 44035000 */ mfc1 $v1, $f10
/* D0710 8013A010 448B1000 */ mtc1 $t3, $f2
/* D0714 8013A014 00000000 */ nop
/* D0718 8013A018 468010A0 */ cvt.s.w $f2, $f2
/* D071C 8013A01C 46041082 */ mul.s $f2, $f2, $f4
/* D0720 8013A020 00000000 */ nop
/* D0724 8013A024 30630FFF */ andi $v1, $v1, 0xfff
/* D0728 8013A028 00641825 */ or $v1, $v1, $a0
/* D072C 8013A02C 00431025 */ or $v0, $v0, $v1
/* D0730 8013A030 448C0000 */ mtc1 $t4, $f0
/* D0734 8013A034 00000000 */ nop
/* D0738 8013A038 46800020 */ cvt.s.w $f0, $f0
/* D073C 8013A03C 46040002 */ mul.s $f0, $f0, $f4
/* D0740 8013A040 00000000 */ nop
/* D0744 8013A044 ACA20000 */ sw $v0, ($a1)
/* D0748 8013A048 4600128D */ trunc.w.s $f10, $f2
/* D074C 8013A04C 44025000 */ mfc1 $v0, $f10
/* D0750 8013A050 00000000 */ nop
/* D0754 8013A054 30420FFF */ andi $v0, $v0, 0xfff
/* D0758 8013A058 00021300 */ sll $v0, $v0, 0xc
/* D075C 8013A05C 4600028D */ trunc.w.s $f10, $f0
/* D0760 8013A060 44035000 */ mfc1 $v1, $f10
/* D0764 8013A064 00000000 */ nop
/* D0768 8013A068 30630FFF */ andi $v1, $v1, 0xfff
/* D076C 8013A06C 00431025 */ or $v0, $v0, $v1
/* D0770 8013A070 45000009 */ bc1f .L8013A098
/* D0774 8013A074 ACA20004 */ sw $v0, 4($a1)
/* D0778 8013A078 3C04FCFF */ lui $a0, 0xfcff
/* D077C 8013A07C 3484FFFF */ ori $a0, $a0, 0xffff
/* D0780 8013A080 3C03FFFD */ lui $v1, 0xfffd
/* D0784 8013A084 3463FCFE */ ori $v1, $v1, 0xfcfe
/* D0788 8013A088 24C20008 */ addiu $v0, $a2, 8
/* D078C 8013A08C AD020000 */ sw $v0, ($t0)
/* D0790 8013A090 ACC40000 */ sw $a0, ($a2)
/* D0794 8013A094 ACC30004 */ sw $v1, 4($a2)
.L8013A098:
/* D0798 8013A098 3C02FA00 */ lui $v0, 0xfa00
/* D079C 8013A09C 00071E00 */ sll $v1, $a3, 0x18
/* D07A0 8013A0A0 46083001 */ sub.s $f0, $f6, $f8
/* D07A4 8013A0A4 8D050000 */ lw $a1, ($t0)
/* D07A8 8013A0A8 3C014128 */ lui $at, 0x4128
/* D07AC 8013A0AC 44811000 */ mtc1 $at, $f2
/* D07B0 8013A0B0 3C014200 */ lui $at, 0x4200
/* D07B4 8013A0B4 44812000 */ mtc1 $at, $f4
/* D07B8 8013A0B8 00A0202D */ daddu $a0, $a1, $zero
/* D07BC 8013A0BC 24A50008 */ addiu $a1, $a1, 8
/* D07C0 8013A0C0 AD050000 */ sw $a1, ($t0)
/* D07C4 8013A0C4 AC820000 */ sw $v0, ($a0)
/* D07C8 8013A0C8 8FA20010 */ lw $v0, 0x10($sp)
/* D07CC 8013A0CC 24A7000C */ addiu $a3, $a1, 0xc
/* D07D0 8013A0D0 304200FF */ andi $v0, $v0, 0xff
/* D07D4 8013A0D4 00021400 */ sll $v0, $v0, 0x10
/* D07D8 8013A0D8 00621825 */ or $v1, $v1, $v0
/* D07DC 8013A0DC 8FA20014 */ lw $v0, 0x14($sp)
/* D07E0 8013A0E0 46020002 */ mul.s $f0, $f0, $f2
/* D07E4 8013A0E4 00000000 */ nop
/* D07E8 8013A0E8 304200FF */ andi $v0, $v0, 0xff
/* D07EC 8013A0EC 00021200 */ sll $v0, $v0, 8
/* D07F0 8013A0F0 00621825 */ or $v1, $v1, $v0
/* D07F4 8013A0F4 8FA20018 */ lw $v0, 0x18($sp)
/* D07F8 8013A0F8 3C018015 */ lui $at, %hi(D_80150FA0)
/* D07FC 8013A0FC D4220FA0 */ ldc1 $f2, %lo(D_80150FA0)($at)
/* D0800 8013A100 304200FF */ andi $v0, $v0, 0xff
/* D0804 8013A104 00621825 */ or $v1, $v1, $v0
/* D0808 8013A108 24A20008 */ addiu $v0, $a1, 8
/* D080C 8013A10C AC830004 */ sw $v1, 4($a0)
/* D0810 8013A110 AD020000 */ sw $v0, ($t0)
/* D0814 8013A114 000B1080 */ sll $v0, $t3, 2
/* D0818 8013A118 30420FFF */ andi $v0, $v0, 0xfff
/* D081C 8013A11C 00021300 */ sll $v0, $v0, 0xc
/* D0820 8013A120 000C2080 */ sll $a0, $t4, 2
/* D0824 8013A124 30840FFF */ andi $a0, $a0, 0xfff
/* D0828 8013A128 3C03E400 */ lui $v1, 0xe400
/* D082C 8013A12C 00832025 */ or $a0, $a0, $v1
/* D0830 8013A130 00441025 */ or $v0, $v0, $a0
/* D0834 8013A134 ACA20000 */ sw $v0, ($a1)
/* D0838 8013A138 00091080 */ sll $v0, $t1, 2
/* D083C 8013A13C 30420FFF */ andi $v0, $v0, 0xfff
/* D0840 8013A140 00021300 */ sll $v0, $v0, 0xc
/* D0844 8013A144 000A1880 */ sll $v1, $t2, 2
/* D0848 8013A148 30630FFF */ andi $v1, $v1, 0xfff
/* D084C 8013A14C 46060003 */ div.s $f0, $f0, $f6
/* D0850 8013A150 46000021 */ cvt.d.s $f0, $f0
/* D0854 8013A154 46220000 */ add.d $f0, $f0, $f2
/* D0858 8013A158 01AF2023 */ subu $a0, $t5, $t7
/* D085C 8013A15C 44841000 */ mtc1 $a0, $f2
/* D0860 8013A160 00000000 */ nop
/* D0864 8013A164 468010A0 */ cvt.s.w $f2, $f2
/* D0868 8013A168 46041082 */ mul.s $f2, $f2, $f4
/* D086C 8013A16C 00000000 */ nop
/* D0870 8013A170 00431025 */ or $v0, $v0, $v1
/* D0874 8013A174 ACA20004 */ sw $v0, 4($a1)
/* D0878 8013A178 46200120 */ cvt.s.d $f4, $f0
/* D087C 8013A17C 3C014180 */ lui $at, 0x4180
/* D0880 8013A180 44810000 */ mtc1 $at, $f0
/* D0884 8013A184 46041083 */ div.s $f2, $f2, $f4
/* D0888 8013A188 46001080 */ add.s $f2, $f2, $f0
/* D088C 8013A18C 3C014480 */ lui $at, 0x4480
/* D0890 8013A190 44810000 */ mtc1 $at, $f0
/* D0894 8013A194 24A20010 */ addiu $v0, $a1, 0x10
/* D0898 8013A198 AD020000 */ sw $v0, ($t0)
/* D089C 8013A19C 46001000 */ add.s $f0, $f2, $f0
/* D08A0 8013A1A0 3C014F00 */ lui $at, 0x4f00
/* D08A4 8013A1A4 44811000 */ mtc1 $at, $f2
/* D08A8 8013A1A8 3C02E100 */ lui $v0, 0xe100
/* D08AC 8013A1AC 4600103E */ c.le.s $f2, $f0
/* D08B0 8013A1B0 00000000 */ nop
/* D08B4 8013A1B4 45010005 */ bc1t .L8013A1CC
/* D08B8 8013A1B8 ACA20008 */ sw $v0, 8($a1)
/* D08BC 8013A1BC 4600028D */ trunc.w.s $f10, $f0
/* D08C0 8013A1C0 44035000 */ mfc1 $v1, $f10
/* D08C4 8013A1C4 0804E87A */ j .L8013A1E8
/* D08C8 8013A1C8 01D81023 */ subu $v0, $t6, $t8
.L8013A1CC:
/* D08CC 8013A1CC 46020001 */ sub.s $f0, $f0, $f2
/* D08D0 8013A1D0 3C028000 */ lui $v0, 0x8000
/* D08D4 8013A1D4 4600028D */ trunc.w.s $f10, $f0
/* D08D8 8013A1D8 44035000 */ mfc1 $v1, $f10
/* D08DC 8013A1DC 00000000 */ nop
/* D08E0 8013A1E0 00621825 */ or $v1, $v1, $v0
/* D08E4 8013A1E4 01D81023 */ subu $v0, $t6, $t8
.L8013A1E8:
/* D08E8 8013A1E8 3C014200 */ lui $at, 0x4200
/* D08EC 8013A1EC 44811000 */ mtc1 $at, $f2
/* D08F0 8013A1F0 44820000 */ mtc1 $v0, $f0
/* D08F4 8013A1F4 00000000 */ nop
/* D08F8 8013A1F8 46800020 */ cvt.s.w $f0, $f0
/* D08FC 8013A1FC 46020002 */ mul.s $f0, $f0, $f2
/* D0900 8013A200 00000000 */ nop
/* D0904 8013A204 3C014180 */ lui $at, 0x4180
/* D0908 8013A208 44811000 */ mtc1 $at, $f2
/* D090C 8013A20C 46040003 */ div.s $f0, $f0, $f4
/* D0910 8013A210 46020000 */ add.s $f0, $f0, $f2
/* D0914 8013A214 3C014480 */ lui $at, 0x4480
/* D0918 8013A218 44811000 */ mtc1 $at, $f2
/* D091C 8013A21C 00000000 */ nop
/* D0920 8013A220 46020000 */ add.s $f0, $f0, $f2
/* D0924 8013A224 3C014F00 */ lui $at, 0x4f00
/* D0928 8013A228 44811000 */ mtc1 $at, $f2
/* D092C 8013A22C 00000000 */ nop
/* D0930 8013A230 4600103E */ c.le.s $f2, $f0
/* D0934 8013A234 00000000 */ nop
/* D0938 8013A238 45010005 */ bc1t .L8013A250
/* D093C 8013A23C 00033400 */ sll $a2, $v1, 0x10
/* D0940 8013A240 4600028D */ trunc.w.s $f10, $f0
/* D0944 8013A244 44045000 */ mfc1 $a0, $f10
/* D0948 8013A248 0804E89A */ j .L8013A268
/* D094C 8013A24C 00000000 */ nop
.L8013A250:
/* D0950 8013A250 46020001 */ sub.s $f0, $f0, $f2
/* D0954 8013A254 3C028000 */ lui $v0, 0x8000
/* D0958 8013A258 4600028D */ trunc.w.s $f10, $f0
/* D095C 8013A25C 44045000 */ mfc1 $a0, $f10
/* D0960 8013A260 00000000 */ nop
/* D0964 8013A264 00822025 */ or $a0, $a0, $v0
.L8013A268:
/* D0968 8013A268 3C05800A */ lui $a1, %hi(gMasterGfxPos)
/* D096C 8013A26C 24A5A66C */ addiu $a1, $a1, %lo(gMasterGfxPos)
/* D0970 8013A270 3082FFFF */ andi $v0, $a0, 0xffff
/* D0974 8013A274 8CA30000 */ lw $v1, ($a1)
/* D0978 8013A278 00C21025 */ or $v0, $a2, $v0
/* D097C 8013A27C ACE20000 */ sw $v0, ($a3)
/* D0980 8013A280 3C02F100 */ lui $v0, 0xf100
/* D0984 8013A284 3C014480 */ lui $at, 0x4480
/* D0988 8013A288 44810000 */ mtc1 $at, $f0
/* D098C 8013A28C 3C014F00 */ lui $at, 0x4f00
/* D0990 8013A290 44811000 */ mtc1 $at, $f2
/* D0994 8013A294 0060202D */ daddu $a0, $v1, $zero
/* D0998 8013A298 24630008 */ addiu $v1, $v1, 8
/* D099C 8013A29C 46040003 */ div.s $f0, $f0, $f4
/* D09A0 8013A2A0 ACA30000 */ sw $v1, ($a1)
/* D09A4 8013A2A4 AC820000 */ sw $v0, ($a0)
/* D09A8 8013A2A8 4600103E */ c.le.s $f2, $f0
/* D09AC 8013A2AC 00000000 */ nop
/* D09B0 8013A2B0 45010005 */ bc1t .L8013A2C8
/* D09B4 8013A2B4 24840004 */ addiu $a0, $a0, 4
/* D09B8 8013A2B8 4600028D */ trunc.w.s $f10, $f0
/* D09BC 8013A2BC 44035000 */ mfc1 $v1, $f10
/* D09C0 8013A2C0 0804E8B9 */ j .L8013A2E4
/* D09C4 8013A2C4 00033C00 */ sll $a3, $v1, 0x10
.L8013A2C8:
/* D09C8 8013A2C8 46020001 */ sub.s $f0, $f0, $f2
/* D09CC 8013A2CC 3C028000 */ lui $v0, 0x8000
/* D09D0 8013A2D0 4600028D */ trunc.w.s $f10, $f0
/* D09D4 8013A2D4 44035000 */ mfc1 $v1, $f10
/* D09D8 8013A2D8 00000000 */ nop
/* D09DC 8013A2DC 00621825 */ or $v1, $v1, $v0
/* D09E0 8013A2E0 00033C00 */ sll $a3, $v1, 0x10
.L8013A2E4:
/* D09E4 8013A2E4 3C014480 */ lui $at, 0x4480
/* D09E8 8013A2E8 44810000 */ mtc1 $at, $f0
/* D09EC 8013A2EC 3C014F00 */ lui $at, 0x4f00
/* D09F0 8013A2F0 44811000 */ mtc1 $at, $f2
/* D09F4 8013A2F4 46040003 */ div.s $f0, $f0, $f4
/* D09F8 8013A2F8 4600103E */ c.le.s $f2, $f0
/* D09FC 8013A2FC 00000000 */ nop
/* D0A00 8013A300 45030005 */ bc1tl .L8013A318
/* D0A04 8013A304 46020001 */ sub.s $f0, $f0, $f2
/* D0A08 8013A308 4600028D */ trunc.w.s $f10, $f0
/* D0A0C 8013A30C 44065000 */ mfc1 $a2, $f10
/* D0A10 8013A310 0804E8CB */ j .L8013A32C
/* D0A14 8013A314 00000000 */ nop
.L8013A318:
/* D0A18 8013A318 3C028000 */ lui $v0, 0x8000
/* D0A1C 8013A31C 4600028D */ trunc.w.s $f10, $f0
/* D0A20 8013A320 44065000 */ mfc1 $a2, $f10
/* D0A24 8013A324 00000000 */ nop
/* D0A28 8013A328 00C23025 */ or $a2, $a2, $v0
.L8013A32C:
/* D0A2C 8013A32C 3C05800A */ lui $a1, %hi(gMasterGfxPos)
/* D0A30 8013A330 24A5A66C */ addiu $a1, $a1, %lo(gMasterGfxPos)
/* D0A34 8013A334 30C2FFFF */ andi $v0, $a2, 0xffff
/* D0A38 8013A338 8CA30000 */ lw $v1, ($a1)
/* D0A3C 8013A33C 00E21025 */ or $v0, $a3, $v0
/* D0A40 8013A340 AC820000 */ sw $v0, ($a0)
/* D0A44 8013A344 3C02E700 */ lui $v0, 0xe700
/* D0A48 8013A348 0060202D */ daddu $a0, $v1, $zero
/* D0A4C 8013A34C 24630008 */ addiu $v1, $v1, 8
/* D0A50 8013A350 ACA30000 */ sw $v1, ($a1)
/* D0A54 8013A354 AC820000 */ sw $v0, ($a0)
/* D0A58 8013A358 AC800004 */ sw $zero, 4($a0)
.L8013A35C:
/* D0A5C 8013A35C 03E00008 */ jr $ra
/* D0A60 8013A360 00000000 */ nop
/* D0A64 8013A364 00000000 */ nop
/* D0A68 8013A368 00000000 */ nop
/* D0A6C 8013A36C 00000000 */ nop

View File

@ -1,237 +0,0 @@
.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
.section .rodata
dlabel jtbl_80150EF0
.word .L80138358_CEA58, .L80138310_CEA10, .L801383A4_CEAA4, .L80138318_CEA18, .L8013838C_CEA8C, .L8013838C_CEA8C, .L8013834C_CEA4C, .L80138360_CEA60, .L801383B0_CEAB0, .L801383C4_CEAC4, .L801383D0_CEAD0, .L80138380_CEA80, .L801383E8_CEAE8, .L80138410_CEB10, .L80138398_CEA98, .L80138380_CEA80, .L80138428_CEB28, 0
.section .text
glabel update_exit_map_screen_overlay
/* CE9AC 801382AC 3C038015 */ lui $v1, %hi(D_8014C6F0)
/* CE9B0 801382B0 8C63C6F0 */ lw $v1, %lo(D_8014C6F0)($v1)
/* CE9B4 801382B4 27BDFFD0 */ addiu $sp, $sp, -0x30
/* CE9B8 801382B8 AFB60028 */ sw $s6, 0x28($sp)
/* CE9BC 801382BC 0080B02D */ daddu $s6, $a0, $zero
/* CE9C0 801382C0 AFB10014 */ sw $s1, 0x14($sp)
/* CE9C4 801382C4 0000882D */ daddu $s1, $zero, $zero
/* CE9C8 801382C8 AFB3001C */ sw $s3, 0x1c($sp)
/* CE9CC 801382CC 0220982D */ daddu $s3, $s1, $zero
/* CE9D0 801382D0 AFB40020 */ sw $s4, 0x20($sp)
/* CE9D4 801382D4 0220A02D */ daddu $s4, $s1, $zero
/* CE9D8 801382D8 AFB50024 */ sw $s5, 0x24($sp)
/* CE9DC 801382DC 0220A82D */ daddu $s5, $s1, $zero
/* CE9E0 801382E0 AFB20018 */ sw $s2, 0x18($sp)
/* CE9E4 801382E4 24120014 */ addiu $s2, $zero, 0x14
/* CE9E8 801382E8 AFBF002C */ sw $ra, 0x2c($sp)
/* CE9EC 801382EC 2C620011 */ sltiu $v0, $v1, 0x11
/* CE9F0 801382F0 1040005E */ beqz $v0, .L8013846C
/* CE9F4 801382F4 AFB00010 */ sw $s0, 0x10($sp)
/* CE9F8 801382F8 00031080 */ sll $v0, $v1, 2
/* CE9FC 801382FC 3C018015 */ lui $at, %hi(jtbl_80150EF0)
/* CEA00 80138300 00220821 */ addu $at, $at, $v0
/* CEA04 80138304 8C220EF0 */ lw $v0, %lo(jtbl_80150EF0)($at)
/* CEA08 80138308 00400008 */ jr $v0
/* CEA0C 8013830C 00000000 */ nop
.L80138310_CEA10:
/* CEA10 80138310 0804E11B */ j .L8013846C
/* CEA14 80138314 0000882D */ daddu $s1, $zero, $zero
.L80138318_CEA18:
/* CEA18 80138318 241500D0 */ addiu $s5, $zero, 0xd0
/* CEA1C 8013831C 02A0A02D */ daddu $s4, $s5, $zero
/* CEA20 80138320 02A0982D */ daddu $s3, $s5, $zero
/* CEA24 80138324 24110001 */ addiu $s1, $zero, 1
/* CEA28 80138328 3C048007 */ lui $a0, %hi(gGameStatusPtr)
/* CEA2C 8013832C 8C84419C */ lw $a0, %lo(gGameStatusPtr)($a0)
/* CEA30 80138330 80830071 */ lb $v1, 0x71($a0)
/* CEA34 80138334 24020002 */ addiu $v0, $zero, 2
/* CEA38 80138338 1462004C */ bne $v1, $v0, .L8013846C
/* CEA3C 8013833C 2412000A */ addiu $s2, $zero, 0xa
/* CEA40 80138340 24020012 */ addiu $v0, $zero, 0x12
/* CEA44 80138344 0804E11B */ j .L8013846C
/* CEA48 80138348 A0820072 */ sb $v0, 0x72($a0)
.L8013834C_CEA4C:
/* CEA4C 8013834C 241500D0 */ addiu $s5, $zero, 0xd0
/* CEA50 80138350 02A0A02D */ daddu $s4, $s5, $zero
/* CEA54 80138354 02A0982D */ daddu $s3, $s5, $zero
.L80138358_CEA58:
/* CEA58 80138358 0804E11B */ j .L8013846C
/* CEA5C 8013835C 24110001 */ addiu $s1, $zero, 1
.L80138360_CEA60:
/* CEA60 80138360 3C048007 */ lui $a0, %hi(gGameStatusPtr)
/* CEA64 80138364 8C84419C */ lw $a0, %lo(gGameStatusPtr)($a0)
/* CEA68 80138368 80830071 */ lb $v1, 0x71($a0)
/* CEA6C 8013836C 24020002 */ addiu $v0, $zero, 2
/* CEA70 80138370 14620004 */ bne $v1, $v0, .L80138384
/* CEA74 80138374 241500D0 */ addiu $s5, $zero, 0xd0
/* CEA78 80138378 24020012 */ addiu $v0, $zero, 0x12
/* CEA7C 8013837C A0820072 */ sb $v0, 0x72($a0)
.L80138380_CEA80:
/* CEA80 80138380 241500D0 */ addiu $s5, $zero, 0xd0
.L80138384:
/* CEA84 80138384 02A0A02D */ daddu $s4, $s5, $zero
/* CEA88 80138388 02A0982D */ daddu $s3, $s5, $zero
.L8013838C_CEA8C:
/* CEA8C 8013838C 24110001 */ addiu $s1, $zero, 1
/* CEA90 80138390 0804E11B */ j .L8013846C
/* CEA94 80138394 24120007 */ addiu $s2, $zero, 7
.L80138398_CEA98:
/* CEA98 80138398 241500D0 */ addiu $s5, $zero, 0xd0
/* CEA9C 8013839C 02A0A02D */ daddu $s4, $s5, $zero
/* CEAA0 801383A0 02A0982D */ daddu $s3, $s5, $zero
.L801383A4_CEAA4:
/* CEAA4 801383A4 24110001 */ addiu $s1, $zero, 1
/* CEAA8 801383A8 0804E11B */ j .L8013846C
/* CEAAC 801383AC 24120032 */ addiu $s2, $zero, 0x32
.L801383B0_CEAB0:
/* CEAB0 801383B0 0000202D */ daddu $a0, $zero, $zero
/* CEAB4 801383B4 0C04E035 */ jal set_screen_overlay_alpha
/* CEAB8 801383B8 0000282D */ daddu $a1, $zero, $zero
/* CEABC 801383BC 0804E11B */ j .L8013846C
/* CEAC0 801383C0 24110004 */ addiu $s1, $zero, 4
.L801383C4_CEAC4:
/* CEAC4 801383C4 241500D0 */ addiu $s5, $zero, 0xd0
/* CEAC8 801383C8 02A0A02D */ daddu $s4, $s5, $zero
/* CEACC 801383CC 02A0982D */ daddu $s3, $s5, $zero
.L801383D0_CEAD0:
/* CEAD0 801383D0 0000202D */ daddu $a0, $zero, $zero
/* CEAD4 801383D4 0C04E035 */ jal set_screen_overlay_alpha
/* CEAD8 801383D8 0000282D */ daddu $a1, $zero, $zero
/* CEADC 801383DC 24110004 */ addiu $s1, $zero, 4
/* CEAE0 801383E0 0804E11B */ j .L8013846C
/* CEAE4 801383E4 24120007 */ addiu $s2, $zero, 7
.L801383E8_CEAE8:
/* CEAE8 801383E8 0000202D */ daddu $a0, $zero, $zero
/* CEAEC 801383EC 3C054320 */ lui $a1, 0x4320
/* CEAF0 801383F0 241500D0 */ addiu $s5, $zero, 0xd0
/* CEAF4 801383F4 02A0A02D */ daddu $s4, $s5, $zero
/* CEAF8 801383F8 02A0982D */ daddu $s3, $s5, $zero
/* CEAFC 801383FC 24110005 */ addiu $s1, $zero, 5
/* CEB00 80138400 0C04E035 */ jal set_screen_overlay_alpha
/* CEB04 80138404 24120007 */ addiu $s2, $zero, 7
/* CEB08 80138408 0804E11B */ j .L8013846C
/* CEB0C 8013840C 00000000 */ nop
.L80138410_CEB10:
/* CEB10 80138410 0000202D */ daddu $a0, $zero, $zero
/* CEB14 80138414 0C04E035 */ jal set_screen_overlay_alpha
/* CEB18 80138418 0000282D */ daddu $a1, $zero, $zero
/* CEB1C 8013841C 24110005 */ addiu $s1, $zero, 5
/* CEB20 80138420 0804E11B */ j .L8013846C
/* CEB24 80138424 24120007 */ addiu $s2, $zero, 7
.L80138428_CEB28:
/* CEB28 80138428 0000202D */ daddu $a0, $zero, $zero
/* CEB2C 8013842C 0080282D */ daddu $a1, $a0, $zero
/* CEB30 80138430 2406000F */ addiu $a2, $zero, 0xf
/* CEB34 80138434 0C04DF93 */ jal set_screen_overlay_center
/* CEB38 80138438 2407001C */ addiu $a3, $zero, 0x1c
/* CEB3C 8013843C 0000202D */ daddu $a0, $zero, $zero
/* CEB40 80138440 24050001 */ addiu $a1, $zero, 1
/* CEB44 80138444 24060131 */ addiu $a2, $zero, 0x131
/* CEB48 80138448 0C04DF93 */ jal set_screen_overlay_center
/* CEB4C 8013844C 2407009C */ addiu $a3, $zero, 0x9c
/* CEB50 80138450 3C05437F */ lui $a1, 0x437f
/* CEB54 80138454 0C04DF62 */ jal set_screen_overlay_params_front
/* CEB58 80138458 2404000C */ addiu $a0, $zero, 0xc
/* CEB5C 8013845C 24020001 */ addiu $v0, $zero, 1
/* CEB60 80138460 240300FF */ addiu $v1, $zero, 0xff
/* CEB64 80138464 0804E16B */ j .L801385AC
/* CEB68 80138468 A6C30000 */ sh $v1, ($s6)
.L8013846C:
/* CEB6C 8013846C 3C038015 */ lui $v1, %hi(D_8014C6F0)
/* CEB70 80138470 8C63C6F0 */ lw $v1, %lo(D_8014C6F0)($v1)
/* CEB74 80138474 24020005 */ addiu $v0, $zero, 5
/* CEB78 80138478 14620025 */ bne $v1, $v0, .L80138510
/* CEB7C 8013847C 0000802D */ daddu $s0, $zero, $zero
/* CEB80 80138480 3C048080 */ lui $a0, 0x8080
/* CEB84 80138484 34848081 */ ori $a0, $a0, 0x8081
/* CEB88 80138488 86C30000 */ lh $v1, ($s6)
/* CEB8C 8013848C 241000FF */ addiu $s0, $zero, 0xff
/* CEB90 80138490 02031823 */ subu $v1, $s0, $v1
/* CEB94 80138494 00031040 */ sll $v0, $v1, 1
/* CEB98 80138498 00431021 */ addu $v0, $v0, $v1
/* CEB9C 8013849C 00021080 */ sll $v0, $v0, 2
/* CEBA0 801384A0 00431021 */ addu $v0, $v0, $v1
/* CEBA4 801384A4 00021100 */ sll $v0, $v0, 4
/* CEBA8 801384A8 00440018 */ mult $v0, $a0
/* CEBAC 801384AC 0000202D */ daddu $a0, $zero, $zero
/* CEBB0 801384B0 00004010 */ mfhi $t0
/* CEBB4 801384B4 01022821 */ addu $a1, $t0, $v0
/* CEBB8 801384B8 000529C3 */ sra $a1, $a1, 7
/* CEBBC 801384BC 000217C3 */ sra $v0, $v0, 0x1f
/* CEBC0 801384C0 00A22823 */ subu $a1, $a1, $v0
/* CEBC4 801384C4 30A500FF */ andi $a1, $a1, 0xff
/* CEBC8 801384C8 00A0302D */ daddu $a2, $a1, $zero
/* CEBCC 801384CC 0C04DF84 */ jal set_screen_overlay_color
/* CEBD0 801384D0 00A0382D */ daddu $a3, $a1, $zero
/* CEBD4 801384D4 3C05437F */ lui $a1, 0x437f
/* CEBD8 801384D8 0C04DF62 */ jal set_screen_overlay_params_front
/* CEBDC 801384DC 0220202D */ daddu $a0, $s1, $zero
/* CEBE0 801384E0 86C20000 */ lh $v0, ($s6)
/* CEBE4 801384E4 96C30000 */ lhu $v1, ($s6)
/* CEBE8 801384E8 10500027 */ beq $v0, $s0, .L80138588
/* CEBEC 801384EC 00721021 */ addu $v0, $v1, $s2
/* CEBF0 801384F0 A6C20000 */ sh $v0, ($s6)
/* CEBF4 801384F4 00021400 */ sll $v0, $v0, 0x10
/* CEBF8 801384F8 00021403 */ sra $v0, $v0, 0x10
/* CEBFC 801384FC 28420100 */ slti $v0, $v0, 0x100
/* CEC00 80138500 50400029 */ beql $v0, $zero, .L801385A8
/* CEC04 80138504 A6D00000 */ sh $s0, ($s6)
/* CEC08 80138508 0804E16B */ j .L801385AC
/* CEC0C 8013850C 0000102D */ daddu $v0, $zero, $zero
.L80138510:
/* CEC10 80138510 00108400 */ sll $s0, $s0, 0x10
/* CEC14 80138514 00108403 */ sra $s0, $s0, 0x10
/* CEC18 80138518 0200202D */ daddu $a0, $s0, $zero
/* CEC1C 8013851C 0260282D */ daddu $a1, $s3, $zero
/* CEC20 80138520 0280302D */ daddu $a2, $s4, $zero
/* CEC24 80138524 0C04DF84 */ jal set_screen_overlay_color
/* CEC28 80138528 02A0382D */ daddu $a3, $s5, $zero
/* CEC2C 8013852C 1600000A */ bnez $s0, .L80138558
/* CEC30 80138530 00000000 */ nop
/* CEC34 80138534 86C20000 */ lh $v0, ($s6)
/* CEC38 80138538 44820000 */ mtc1 $v0, $f0
/* CEC3C 8013853C 00000000 */ nop
/* CEC40 80138540 46800020 */ cvt.s.w $f0, $f0
/* CEC44 80138544 44050000 */ mfc1 $a1, $f0
/* CEC48 80138548 0C04DF62 */ jal set_screen_overlay_params_front
/* CEC4C 8013854C 0220202D */ daddu $a0, $s1, $zero
/* CEC50 80138550 0804E15E */ j .L80138578
/* CEC54 80138554 240400FF */ addiu $a0, $zero, 0xff
.L80138558:
/* CEC58 80138558 86C20000 */ lh $v0, ($s6)
/* CEC5C 8013855C 44820000 */ mtc1 $v0, $f0
/* CEC60 80138560 00000000 */ nop
/* CEC64 80138564 46800020 */ cvt.s.w $f0, $f0
/* CEC68 80138568 44050000 */ mfc1 $a1, $f0
/* CEC6C 8013856C 0C04DF69 */ jal set_screen_overlay_params_back
/* CEC70 80138570 0220202D */ daddu $a0, $s1, $zero
/* CEC74 80138574 240400FF */ addiu $a0, $zero, 0xff
.L80138578:
/* CEC78 80138578 86C20000 */ lh $v0, ($s6)
/* CEC7C 8013857C 96C30000 */ lhu $v1, ($s6)
/* CEC80 80138580 14440003 */ bne $v0, $a0, .L80138590
/* CEC84 80138584 00721021 */ addu $v0, $v1, $s2
.L80138588:
/* CEC88 80138588 0804E16B */ j .L801385AC
/* CEC8C 8013858C 24020001 */ addiu $v0, $zero, 1
.L80138590:
/* CEC90 80138590 A6C20000 */ sh $v0, ($s6)
/* CEC94 80138594 00021400 */ sll $v0, $v0, 0x10
/* CEC98 80138598 00021403 */ sra $v0, $v0, 0x10
/* CEC9C 8013859C 28420100 */ slti $v0, $v0, 0x100
/* CECA0 801385A0 50400001 */ beql $v0, $zero, .L801385A8
/* CECA4 801385A4 A6C40000 */ sh $a0, ($s6)
.L801385A8:
/* CECA8 801385A8 0000102D */ daddu $v0, $zero, $zero
.L801385AC:
/* CECAC 801385AC 8FBF002C */ lw $ra, 0x2c($sp)
/* CECB0 801385B0 8FB60028 */ lw $s6, 0x28($sp)
/* CECB4 801385B4 8FB50024 */ lw $s5, 0x24($sp)
/* CECB8 801385B8 8FB40020 */ lw $s4, 0x20($sp)
/* CECBC 801385BC 8FB3001C */ lw $s3, 0x1c($sp)
/* CECC0 801385C0 8FB20018 */ lw $s2, 0x18($sp)
/* CECC4 801385C4 8FB10014 */ lw $s1, 0x14($sp)
/* CECC8 801385C8 8FB00010 */ lw $s0, 0x10($sp)
/* CECCC 801385CC 03E00008 */ jr $ra
/* CECD0 801385D0 27BD0030 */ addiu $sp, $sp, 0x30

View File

@ -1,785 +0,0 @@
.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
.section .rodata
dlabel jtbl_801500D0
.word .L8012136C_B7A6C, .L801218AC_B7FAC, .L801218AC_B7FAC, .L8012157C_B7C7C, .L8012139C_B7A9C, .L801218AC_B7FAC, .L801218AC_B7FAC, .L801218AC_B7FAC, .L801213CC_B7ACC, .L801218AC_B7FAC, .L801218AC_B7FAC, .L801218AC_B7FAC, .L801213FC_B7AFC, .L801218AC_B7FAC, .L8012154C_B7C4C, .L801215AC_B7CAC, .L8012142C_B7B2C, .L801218AC_B7FAC, .L8012145C_B7B5C, .L801215DC_B7CDC, .L801218AC_B7FAC, .L8012142C_B7B2C, .L801218AC_B7FAC, .L801218AC_B7FAC, .L801218AC_B7FAC, .L8012148C_B7B8C, .L801218AC_B7FAC, .L801214BC_B7BBC, .L801218AC_B7FAC, .L8012148C_B7B8C, .L801218AC_B7FAC, .L801214BC_B7BBC, .L801218AC_B7FAC, .L8012142C_B7B2C, .L801218AC_B7FAC, .L801218AC_B7FAC, .L801218AC_B7FAC, .L801214EC_B7BEC, .L801218AC_B7FAC, .L8012151C_B7C1C, .L801218AC_B7FAC, .L8012157C_B7C7C, .L801215AC_B7CAC, .L801215DC_B7CDC, .L8012160C_B7D0C, 0
dlabel jtbl_80150188
.word .L8012166C_B7D6C, .L801217B8_B7EB8, .L801217B8_B7EB8, .L801217B8_B7EB8, .L8012169C_B7D9C, .L801217B8_B7EB8, .L801217B8_B7EB8, .L801217B8_B7EB8, .L801216CC_B7DCC, .L801217B8_B7EB8, .L801217B8_B7EB8, .L801217B8_B7EB8, .L801216FC_B7DFC, .L801217B8_B7EB8, .L801217B8_B7EB8, .L801217B8_B7EB8, .L8012172C_B7E2C, .L801217B8_B7EB8, .L801217B8_B7EB8, .L801217B8_B7EB8, .L801217B8_B7EB8, .L801217B8_B7EB8, .L801217B8_B7EB8, .L801217B8_B7EB8, .L801217B8_B7EB8, .L8012175C_B7E5C, .L801217B8_B7EB8, .L801217B8_B7EB8, .L801217B8_B7EB8, .L801217B8_B7EB8, .L801217B8_B7EB8, .L801217B8_B7EB8, .L801217B8_B7EB8, .L801217B8_B7EB8, .L801217B8_B7EB8, .L801217B8_B7EB8, .L801217B8_B7EB8, .L8012178C_B7E8C
.section .text
glabel appendGfx_entity_model
/* B7884 80121184 27BDFF08 */ addiu $sp, $sp, -0xf8
/* B7888 80121188 AFB200F0 */ sw $s2, 0xf0($sp)
/* B788C 8012118C 0080902D */ daddu $s2, $a0, $zero
/* B7890 80121190 3C020001 */ lui $v0, 1
/* B7894 80121194 34421630 */ ori $v0, $v0, 0x1630
/* B7898 80121198 26450018 */ addiu $a1, $s2, 0x18
/* B789C 8012119C 3C038007 */ lui $v1, %hi(gMatrixListPos)
/* B78A0 801211A0 946341F0 */ lhu $v1, %lo(gMatrixListPos)($v1)
/* B78A4 801211A4 3C04800A */ lui $a0, %hi(gDisplayContext)
/* B78A8 801211A8 8C84A674 */ lw $a0, %lo(gDisplayContext)($a0)
/* B78AC 801211AC 26460058 */ addiu $a2, $s2, 0x58
/* B78B0 801211B0 AFBF00F4 */ sw $ra, 0xf4($sp)
/* B78B4 801211B4 AFB100EC */ sw $s1, 0xec($sp)
/* B78B8 801211B8 AFB000E8 */ sw $s0, 0xe8($sp)
/* B78BC 801211BC 00031980 */ sll $v1, $v1, 6
/* B78C0 801211C0 00832021 */ addu $a0, $a0, $v1
/* B78C4 801211C4 00822021 */ addu $a0, $a0, $v0
.L801211C8:
/* B78C8 801211C8 8CAE0000 */ lw $t6, ($a1)
/* B78CC 801211CC 8CAF0004 */ lw $t7, 4($a1)
/* B78D0 801211D0 8CB80008 */ lw $t8, 8($a1)
/* B78D4 801211D4 8CB9000C */ lw $t9, 0xc($a1)
/* B78D8 801211D8 AC8E0000 */ sw $t6, ($a0)
/* B78DC 801211DC AC8F0004 */ sw $t7, 4($a0)
/* B78E0 801211E0 AC980008 */ sw $t8, 8($a0)
/* B78E4 801211E4 AC99000C */ sw $t9, 0xc($a0)
/* B78E8 801211E8 24A50010 */ addiu $a1, $a1, 0x10
/* B78EC 801211EC 14A6FFF6 */ bne $a1, $a2, .L801211C8
/* B78F0 801211F0 24840010 */ addiu $a0, $a0, 0x10
/* B78F4 801211F4 3C02DA38 */ lui $v0, 0xda38
/* B78F8 801211F8 34420002 */ ori $v0, $v0, 2
/* B78FC 801211FC 3C070001 */ lui $a3, 1
/* B7900 80121200 3C0D800A */ lui $t5, %hi(gMasterGfxPos)
/* B7904 80121204 25ADA66C */ addiu $t5, $t5, %lo(gMasterGfxPos)
/* B7908 80121208 34E71630 */ ori $a3, $a3, 0x1630
/* B790C 8012120C 3C068007 */ lui $a2, %hi(gMatrixListPos)
/* B7910 80121210 24C641F0 */ addiu $a2, $a2, %lo(gMatrixListPos)
/* B7914 80121214 8DAC0000 */ lw $t4, ($t5)
/* B7918 80121218 94C40000 */ lhu $a0, ($a2)
/* B791C 8012121C 0180282D */ daddu $a1, $t4, $zero
/* B7920 80121220 258C0008 */ addiu $t4, $t4, 8
/* B7924 80121224 ADAC0000 */ sw $t4, ($t5)
/* B7928 80121228 ACA20000 */ sw $v0, ($a1)
/* B792C 8012122C 3082FFFF */ andi $v0, $a0, 0xffff
/* B7930 80121230 00021180 */ sll $v0, $v0, 6
/* B7934 80121234 3C03800A */ lui $v1, %hi(gDisplayContext)
/* B7938 80121238 8C63A674 */ lw $v1, %lo(gDisplayContext)($v1)
/* B793C 8012123C 00471021 */ addu $v0, $v0, $a3
/* B7940 80121240 00621821 */ addu $v1, $v1, $v0
/* B7944 80121244 ACA30004 */ sw $v1, 4($a1)
/* B7948 80121248 8E430000 */ lw $v1, ($s2)
/* B794C 8012124C 24840001 */ addiu $a0, $a0, 1
/* B7950 80121250 30620400 */ andi $v0, $v1, 0x400
/* B7954 80121254 14400232 */ bnez $v0, .L80121B20
/* B7958 80121258 A4C40000 */ sh $a0, ($a2)
/* B795C 8012125C 3C020001 */ lui $v0, 1
/* B7960 80121260 00621024 */ and $v0, $v1, $v0
/* B7964 80121264 144001B1 */ bnez $v0, .L8012192C
/* B7968 80121268 3C04E200 */ lui $a0, 0xe200
/* B796C 8012126C 3484001C */ ori $a0, $a0, 0x1c
/* B7970 80121270 3C030F0A */ lui $v1, 0xf0a
/* B7974 80121274 34637008 */ ori $v1, $v1, 0x7008
/* B7978 80121278 3C06FC11 */ lui $a2, 0xfc11
/* B797C 8012127C 34C69623 */ ori $a2, $a2, 0x9623
/* B7980 80121280 3C05FF2F */ lui $a1, 0xff2f
/* B7984 80121284 34A5FFFF */ ori $a1, $a1, 0xffff
/* B7988 80121288 3C07E200 */ lui $a3, 0xe200
/* B798C 8012128C 34E71E01 */ ori $a3, $a3, 0x1e01
/* B7990 80121290 3C08E300 */ lui $t0, 0xe300
/* B7994 80121294 35080A11 */ ori $t0, $t0, 0xa11
/* B7998 80121298 0000482D */ daddu $t1, $zero, $zero
/* B799C 8012129C 25820008 */ addiu $v0, $t4, 8
/* B79A0 801212A0 ADA20000 */ sw $v0, ($t5)
/* B79A4 801212A4 3C02E700 */ lui $v0, 0xe700
/* B79A8 801212A8 AD820000 */ sw $v0, ($t4)
/* B79AC 801212AC 25820010 */ addiu $v0, $t4, 0x10
/* B79B0 801212B0 AD800004 */ sw $zero, 4($t4)
/* B79B4 801212B4 ADA20000 */ sw $v0, ($t5)
/* B79B8 801212B8 25820018 */ addiu $v0, $t4, 0x18
/* B79BC 801212BC AD840008 */ sw $a0, 8($t4)
/* B79C0 801212C0 AD83000C */ sw $v1, 0xc($t4)
/* B79C4 801212C4 ADA20000 */ sw $v0, ($t5)
/* B79C8 801212C8 3C02FA00 */ lui $v0, 0xfa00
/* B79CC 801212CC AD820010 */ sw $v0, 0x10($t4)
/* B79D0 801212D0 2402FFFF */ addiu $v0, $zero, -1
/* B79D4 801212D4 AD820014 */ sw $v0, 0x14($t4)
/* B79D8 801212D8 25820020 */ addiu $v0, $t4, 0x20
/* B79DC 801212DC ADA20000 */ sw $v0, ($t5)
/* B79E0 801212E0 25820028 */ addiu $v0, $t4, 0x28
/* B79E4 801212E4 AD860018 */ sw $a2, 0x18($t4)
/* B79E8 801212E8 AD85001C */ sw $a1, 0x1c($t4)
/* B79EC 801212EC ADA20000 */ sw $v0, ($t5)
/* B79F0 801212F0 25820030 */ addiu $v0, $t4, 0x30
/* B79F4 801212F4 AD870020 */ sw $a3, 0x20($t4)
/* B79F8 801212F8 AD800024 */ sw $zero, 0x24($t4)
/* B79FC 801212FC ADA20000 */ sw $v0, ($t5)
/* B7A00 80121300 3C038015 */ lui $v1, %hi(entity_fog_enabled)
/* B7A04 80121304 8C634378 */ lw $v1, %lo(entity_fog_enabled)($v1)
/* B7A08 80121308 24020CF0 */ addiu $v0, $zero, 0xcf0
/* B7A0C 8012130C AD880028 */ sw $t0, 0x28($t4)
/* B7A10 80121310 10600004 */ beqz $v1, .L80121324
/* B7A14 80121314 AD82002C */ sw $v0, 0x2c($t4)
/* B7A18 80121318 8E420000 */ lw $v0, ($s2)
/* B7A1C 8012131C 30420800 */ andi $v0, $v0, 0x800
/* B7A20 80121320 2C490001 */ sltiu $t1, $v0, 1
.L80121324:
/* B7A24 80121324 11200005 */ beqz $t1, .L8012133C
/* B7A28 80121328 24020001 */ addiu $v0, $zero, 1
/* B7A2C 8012132C 112200C3 */ beq $t1, $v0, .L8012163C
/* B7A30 80121330 3C02D9FD */ lui $v0, %hi(D_D9FCFFFF)
/* B7A34 80121334 0804862C */ j .L801218B0
/* B7A38 80121338 00000000 */ nop
.L8012133C:
/* B7A3C 8012133C 92420004 */ lbu $v0, 4($s2)
/* B7A40 80121340 2442FFFF */ addiu $v0, $v0, %lo(D_D9FCFFFF)
/* B7A44 80121344 00021600 */ sll $v0, $v0, 0x18
/* B7A48 80121348 00021E03 */ sra $v1, $v0, 0x18
/* B7A4C 8012134C 2C62002D */ sltiu $v0, $v1, 0x2d
/* B7A50 80121350 10400156 */ beqz $v0, .L801218AC_B7FAC
/* B7A54 80121354 00031080 */ sll $v0, $v1, 2
/* B7A58 80121358 3C018015 */ lui $at, %hi(jtbl_801500D0)
/* B7A5C 8012135C 00220821 */ addu $at, $at, $v0
/* B7A60 80121360 8C2200D0 */ lw $v0, %lo(jtbl_801500D0)($at)
/* B7A64 80121364 00400008 */ jr $v0
/* B7A68 80121368 00000000 */ nop
.L8012136C_B7A6C:
/* B7A6C 8012136C 3C03800A */ lui $v1, %hi(gMasterGfxPos)
/* B7A70 80121370 2463A66C */ addiu $v1, $v1, %lo(gMasterGfxPos)
/* B7A74 80121374 8C620000 */ lw $v0, ($v1)
/* B7A78 80121378 0040202D */ daddu $a0, $v0, $zero
/* B7A7C 8012137C 24420008 */ addiu $v0, $v0, 8
/* B7A80 80121380 AC620000 */ sw $v0, ($v1)
/* B7A84 80121384 3C02DE00 */ lui $v0, 0xde00
/* B7A88 80121388 AC820000 */ sw $v0, ($a0)
/* B7A8C 8012138C 3C028015 */ lui $v0, %hi(D_8014B7F8)
/* B7A90 80121390 2442B7F8 */ addiu $v0, $v0, %lo(D_8014B7F8)
/* B7A94 80121394 0804862B */ j .L801218AC_B7FAC
/* B7A98 80121398 AC820004 */ sw $v0, 4($a0)
.L8012139C_B7A9C:
/* B7A9C 8012139C 3C03800A */ lui $v1, %hi(gMasterGfxPos)
/* B7AA0 801213A0 2463A66C */ addiu $v1, $v1, %lo(gMasterGfxPos)
/* B7AA4 801213A4 8C620000 */ lw $v0, ($v1)
/* B7AA8 801213A8 0040202D */ daddu $a0, $v0, $zero
/* B7AAC 801213AC 24420008 */ addiu $v0, $v0, 8
/* B7AB0 801213B0 AC620000 */ sw $v0, ($v1)
/* B7AB4 801213B4 3C02DE00 */ lui $v0, 0xde00
/* B7AB8 801213B8 AC820000 */ sw $v0, ($a0)
/* B7ABC 801213BC 3C028015 */ lui $v0, %hi(D_8014B820)
/* B7AC0 801213C0 2442B820 */ addiu $v0, $v0, %lo(D_8014B820)
/* B7AC4 801213C4 0804862B */ j .L801218AC_B7FAC
/* B7AC8 801213C8 AC820004 */ sw $v0, 4($a0)
.L801213CC_B7ACC:
/* B7ACC 801213CC 3C03800A */ lui $v1, %hi(gMasterGfxPos)
/* B7AD0 801213D0 2463A66C */ addiu $v1, $v1, %lo(gMasterGfxPos)
/* B7AD4 801213D4 8C620000 */ lw $v0, ($v1)
/* B7AD8 801213D8 0040202D */ daddu $a0, $v0, $zero
/* B7ADC 801213DC 24420008 */ addiu $v0, $v0, 8
/* B7AE0 801213E0 AC620000 */ sw $v0, ($v1)
/* B7AE4 801213E4 3C02DE00 */ lui $v0, 0xde00
/* B7AE8 801213E8 AC820000 */ sw $v0, ($a0)
/* B7AEC 801213EC 3C028015 */ lui $v0, %hi(D_8014B848)
/* B7AF0 801213F0 2442B848 */ addiu $v0, $v0, %lo(D_8014B848)
/* B7AF4 801213F4 0804862B */ j .L801218AC_B7FAC
/* B7AF8 801213F8 AC820004 */ sw $v0, 4($a0)
.L801213FC_B7AFC:
/* B7AFC 801213FC 3C03800A */ lui $v1, %hi(gMasterGfxPos)
/* B7B00 80121400 2463A66C */ addiu $v1, $v1, %lo(gMasterGfxPos)
/* B7B04 80121404 8C620000 */ lw $v0, ($v1)
/* B7B08 80121408 0040202D */ daddu $a0, $v0, $zero
/* B7B0C 8012140C 24420008 */ addiu $v0, $v0, 8
/* B7B10 80121410 AC620000 */ sw $v0, ($v1)
/* B7B14 80121414 3C02DE00 */ lui $v0, 0xde00
/* B7B18 80121418 AC820000 */ sw $v0, ($a0)
/* B7B1C 8012141C 3C028015 */ lui $v0, %hi(D_8014B870)
/* B7B20 80121420 2442B870 */ addiu $v0, $v0, %lo(D_8014B870)
/* B7B24 80121424 0804862B */ j .L801218AC_B7FAC
/* B7B28 80121428 AC820004 */ sw $v0, 4($a0)
.L8012142C_B7B2C:
/* B7B2C 8012142C 3C03800A */ lui $v1, %hi(gMasterGfxPos)
/* B7B30 80121430 2463A66C */ addiu $v1, $v1, %lo(gMasterGfxPos)
/* B7B34 80121434 8C620000 */ lw $v0, ($v1)
/* B7B38 80121438 0040202D */ daddu $a0, $v0, $zero
/* B7B3C 8012143C 24420008 */ addiu $v0, $v0, 8
/* B7B40 80121440 AC620000 */ sw $v0, ($v1)
/* B7B44 80121444 3C02DE00 */ lui $v0, 0xde00
/* B7B48 80121448 AC820000 */ sw $v0, ($a0)
/* B7B4C 8012144C 3C028015 */ lui $v0, %hi(D_8014B898)
/* B7B50 80121450 2442B898 */ addiu $v0, $v0, %lo(D_8014B898)
/* B7B54 80121454 0804862B */ j .L801218AC_B7FAC
/* B7B58 80121458 AC820004 */ sw $v0, 4($a0)
.L8012145C_B7B5C:
/* B7B5C 8012145C 3C03800A */ lui $v1, %hi(gMasterGfxPos)
/* B7B60 80121460 2463A66C */ addiu $v1, $v1, %lo(gMasterGfxPos)
/* B7B64 80121464 8C620000 */ lw $v0, ($v1)
/* B7B68 80121468 0040202D */ daddu $a0, $v0, $zero
/* B7B6C 8012146C 24420008 */ addiu $v0, $v0, 8
/* B7B70 80121470 AC620000 */ sw $v0, ($v1)
/* B7B74 80121474 3C02DE00 */ lui $v0, 0xde00
/* B7B78 80121478 AC820000 */ sw $v0, ($a0)
/* B7B7C 8012147C 3C028015 */ lui $v0, %hi(D_8014B9B0)
/* B7B80 80121480 2442B9B0 */ addiu $v0, $v0, %lo(D_8014B9B0)
/* B7B84 80121484 0804862B */ j .L801218AC_B7FAC
/* B7B88 80121488 AC820004 */ sw $v0, 4($a0)
.L8012148C_B7B8C:
/* B7B8C 8012148C 3C03800A */ lui $v1, %hi(gMasterGfxPos)
/* B7B90 80121490 2463A66C */ addiu $v1, $v1, %lo(gMasterGfxPos)
/* B7B94 80121494 8C620000 */ lw $v0, ($v1)
/* B7B98 80121498 0040202D */ daddu $a0, $v0, $zero
/* B7B9C 8012149C 24420008 */ addiu $v0, $v0, 8
/* B7BA0 801214A0 AC620000 */ sw $v0, ($v1)
/* B7BA4 801214A4 3C02DE00 */ lui $v0, 0xde00
/* B7BA8 801214A8 AC820000 */ sw $v0, ($a0)
/* B7BAC 801214AC 3C028015 */ lui $v0, %hi(D_8014B8C0)
/* B7BB0 801214B0 2442B8C0 */ addiu $v0, $v0, %lo(D_8014B8C0)
/* B7BB4 801214B4 0804862B */ j .L801218AC_B7FAC
/* B7BB8 801214B8 AC820004 */ sw $v0, 4($a0)
.L801214BC_B7BBC:
/* B7BBC 801214BC 3C03800A */ lui $v1, %hi(gMasterGfxPos)
/* B7BC0 801214C0 2463A66C */ addiu $v1, $v1, %lo(gMasterGfxPos)
/* B7BC4 801214C4 8C620000 */ lw $v0, ($v1)
/* B7BC8 801214C8 0040202D */ daddu $a0, $v0, $zero
/* B7BCC 801214CC 24420008 */ addiu $v0, $v0, 8
/* B7BD0 801214D0 AC620000 */ sw $v0, ($v1)
/* B7BD4 801214D4 3C02DE00 */ lui $v0, 0xde00
/* B7BD8 801214D8 AC820000 */ sw $v0, ($a0)
/* B7BDC 801214DC 3C028015 */ lui $v0, %hi(D_8014B9D8)
/* B7BE0 801214E0 2442B9D8 */ addiu $v0, $v0, %lo(D_8014B9D8)
/* B7BE4 801214E4 0804862B */ j .L801218AC_B7FAC
/* B7BE8 801214E8 AC820004 */ sw $v0, 4($a0)
.L801214EC_B7BEC:
/* B7BEC 801214EC 3C03800A */ lui $v1, %hi(gMasterGfxPos)
/* B7BF0 801214F0 2463A66C */ addiu $v1, $v1, %lo(gMasterGfxPos)
/* B7BF4 801214F4 8C620000 */ lw $v0, ($v1)
/* B7BF8 801214F8 0040202D */ daddu $a0, $v0, $zero
/* B7BFC 801214FC 24420008 */ addiu $v0, $v0, 8
/* B7C00 80121500 AC620000 */ sw $v0, ($v1)
/* B7C04 80121504 3C02DE00 */ lui $v0, 0xde00
/* B7C08 80121508 AC820000 */ sw $v0, ($a0)
/* B7C0C 8012150C 3C028015 */ lui $v0, %hi(D_8014B8E8)
/* B7C10 80121510 2442B8E8 */ addiu $v0, $v0, %lo(D_8014B8E8)
/* B7C14 80121514 0804862B */ j .L801218AC_B7FAC
/* B7C18 80121518 AC820004 */ sw $v0, 4($a0)
.L8012151C_B7C1C:
/* B7C1C 8012151C 3C03800A */ lui $v1, %hi(gMasterGfxPos)
/* B7C20 80121520 2463A66C */ addiu $v1, $v1, %lo(gMasterGfxPos)
/* B7C24 80121524 8C620000 */ lw $v0, ($v1)
/* B7C28 80121528 0040202D */ daddu $a0, $v0, $zero
/* B7C2C 8012152C 24420008 */ addiu $v0, $v0, 8
/* B7C30 80121530 AC620000 */ sw $v0, ($v1)
/* B7C34 80121534 3C02DE00 */ lui $v0, 0xde00
/* B7C38 80121538 AC820000 */ sw $v0, ($a0)
/* B7C3C 8012153C 3C028015 */ lui $v0, %hi(D_8014BA00)
/* B7C40 80121540 2442BA00 */ addiu $v0, $v0, %lo(D_8014BA00)
/* B7C44 80121544 0804862B */ j .L801218AC_B7FAC
/* B7C48 80121548 AC820004 */ sw $v0, 4($a0)
.L8012154C_B7C4C:
/* B7C4C 8012154C 3C03800A */ lui $v1, %hi(gMasterGfxPos)
/* B7C50 80121550 2463A66C */ addiu $v1, $v1, %lo(gMasterGfxPos)
/* B7C54 80121554 8C620000 */ lw $v0, ($v1)
/* B7C58 80121558 0040202D */ daddu $a0, $v0, $zero
/* B7C5C 8012155C 24420008 */ addiu $v0, $v0, 8
/* B7C60 80121560 AC620000 */ sw $v0, ($v1)
/* B7C64 80121564 3C02DE00 */ lui $v0, 0xde00
/* B7C68 80121568 AC820000 */ sw $v0, ($a0)
/* B7C6C 8012156C 3C028015 */ lui $v0, %hi(D_8014B988)
/* B7C70 80121570 2442B988 */ addiu $v0, $v0, %lo(D_8014B988)
/* B7C74 80121574 0804862B */ j .L801218AC_B7FAC
/* B7C78 80121578 AC820004 */ sw $v0, 4($a0)
.L8012157C_B7C7C:
/* B7C7C 8012157C 3C03800A */ lui $v1, %hi(gMasterGfxPos)
/* B7C80 80121580 2463A66C */ addiu $v1, $v1, %lo(gMasterGfxPos)
/* B7C84 80121584 8C620000 */ lw $v0, ($v1)
/* B7C88 80121588 0040202D */ daddu $a0, $v0, $zero
/* B7C8C 8012158C 24420008 */ addiu $v0, $v0, 8
/* B7C90 80121590 AC620000 */ sw $v0, ($v1)
/* B7C94 80121594 3C02DE00 */ lui $v0, 0xde00
/* B7C98 80121598 AC820000 */ sw $v0, ($a0)
/* B7C9C 8012159C 3C028015 */ lui $v0, %hi(D_8014BA48)
/* B7CA0 801215A0 2442BA48 */ addiu $v0, $v0, %lo(D_8014BA48)
/* B7CA4 801215A4 0804862B */ j .L801218AC_B7FAC
/* B7CA8 801215A8 AC820004 */ sw $v0, 4($a0)
.L801215AC_B7CAC:
/* B7CAC 801215AC 3C03800A */ lui $v1, %hi(gMasterGfxPos)
/* B7CB0 801215B0 2463A66C */ addiu $v1, $v1, %lo(gMasterGfxPos)
/* B7CB4 801215B4 8C620000 */ lw $v0, ($v1)
/* B7CB8 801215B8 0040202D */ daddu $a0, $v0, $zero
/* B7CBC 801215BC 24420008 */ addiu $v0, $v0, 8
/* B7CC0 801215C0 AC620000 */ sw $v0, ($v1)
/* B7CC4 801215C4 3C02DE00 */ lui $v0, 0xde00
/* B7CC8 801215C8 AC820000 */ sw $v0, ($a0)
/* B7CCC 801215CC 3C028015 */ lui $v0, %hi(D_8014BA70)
/* B7CD0 801215D0 2442BA70 */ addiu $v0, $v0, %lo(D_8014BA70)
/* B7CD4 801215D4 0804862B */ j .L801218AC_B7FAC
/* B7CD8 801215D8 AC820004 */ sw $v0, 4($a0)
.L801215DC_B7CDC:
/* B7CDC 801215DC 3C03800A */ lui $v1, %hi(gMasterGfxPos)
/* B7CE0 801215E0 2463A66C */ addiu $v1, $v1, %lo(gMasterGfxPos)
/* B7CE4 801215E4 8C620000 */ lw $v0, ($v1)
/* B7CE8 801215E8 0040202D */ daddu $a0, $v0, $zero
/* B7CEC 801215EC 24420008 */ addiu $v0, $v0, 8
/* B7CF0 801215F0 AC620000 */ sw $v0, ($v1)
/* B7CF4 801215F4 3C02DE00 */ lui $v0, 0xde00
/* B7CF8 801215F8 AC820000 */ sw $v0, ($a0)
/* B7CFC 801215FC 3C028015 */ lui $v0, %hi(D_8014BA98)
/* B7D00 80121600 2442BA98 */ addiu $v0, $v0, %lo(D_8014BA98)
/* B7D04 80121604 0804862B */ j .L801218AC_B7FAC
/* B7D08 80121608 AC820004 */ sw $v0, 4($a0)
.L8012160C_B7D0C:
/* B7D0C 8012160C 3C03800A */ lui $v1, %hi(gMasterGfxPos)
/* B7D10 80121610 2463A66C */ addiu $v1, $v1, %lo(gMasterGfxPos)
/* B7D14 80121614 8C620000 */ lw $v0, ($v1)
/* B7D18 80121618 0040202D */ daddu $a0, $v0, $zero
/* B7D1C 8012161C 24420008 */ addiu $v0, $v0, 8
/* B7D20 80121620 AC620000 */ sw $v0, ($v1)
/* B7D24 80121624 3C02DE00 */ lui $v0, 0xde00
/* B7D28 80121628 AC820000 */ sw $v0, ($a0)
/* B7D2C 8012162C 3C028015 */ lui $v0, %hi(D_8014BAE8)
/* B7D30 80121630 2442BAE8 */ addiu $v0, $v0, %lo(D_8014BAE8)
/* B7D34 80121634 0804862B */ j .L801218AC_B7FAC
/* B7D38 80121638 AC820004 */ sw $v0, 4($a0)
.L8012163C:
/* B7D3C 8012163C 92420004 */ lbu $v0, 4($s2)
/* B7D40 80121640 2442FFFF */ addiu $v0, $v0, -1
/* B7D44 80121644 00021600 */ sll $v0, $v0, 0x18
/* B7D48 80121648 00021E03 */ sra $v1, $v0, 0x18
/* B7D4C 8012164C 2C620026 */ sltiu $v0, $v1, 0x26
/* B7D50 80121650 10400059 */ beqz $v0, .L801217B8_B7EB8
/* B7D54 80121654 00031080 */ sll $v0, $v1, 2
/* B7D58 80121658 3C018015 */ lui $at, %hi(jtbl_80150188)
/* B7D5C 8012165C 00220821 */ addu $at, $at, $v0
/* B7D60 80121660 8C220188 */ lw $v0, %lo(jtbl_80150188)($at)
/* B7D64 80121664 00400008 */ jr $v0
/* B7D68 80121668 00000000 */ nop
.L8012166C_B7D6C:
/* B7D6C 8012166C 3C03800A */ lui $v1, %hi(gMasterGfxPos)
/* B7D70 80121670 2463A66C */ addiu $v1, $v1, %lo(gMasterGfxPos)
/* B7D74 80121674 8C620000 */ lw $v0, ($v1)
/* B7D78 80121678 0040202D */ daddu $a0, $v0, $zero
/* B7D7C 8012167C 24420008 */ addiu $v0, $v0, 8
/* B7D80 80121680 AC620000 */ sw $v0, ($v1)
/* B7D84 80121684 3C02DE00 */ lui $v0, 0xde00
/* B7D88 80121688 AC820000 */ sw $v0, ($a0)
/* B7D8C 8012168C 3C028015 */ lui $v0, %hi(D_8014BE78)
/* B7D90 80121690 2442BE78 */ addiu $v0, $v0, %lo(D_8014BE78)
/* B7D94 80121694 080485EE */ j .L801217B8_B7EB8
/* B7D98 80121698 AC820004 */ sw $v0, 4($a0)
.L8012169C_B7D9C:
/* B7D9C 8012169C 3C03800A */ lui $v1, %hi(gMasterGfxPos)
/* B7DA0 801216A0 2463A66C */ addiu $v1, $v1, %lo(gMasterGfxPos)
/* B7DA4 801216A4 8C620000 */ lw $v0, ($v1)
/* B7DA8 801216A8 0040202D */ daddu $a0, $v0, $zero
/* B7DAC 801216AC 24420008 */ addiu $v0, $v0, 8
/* B7DB0 801216B0 AC620000 */ sw $v0, ($v1)
/* B7DB4 801216B4 3C02DE00 */ lui $v0, 0xde00
/* B7DB8 801216B8 AC820000 */ sw $v0, ($a0)
/* B7DBC 801216BC 3C028015 */ lui $v0, %hi(D_8014BEA0)
/* B7DC0 801216C0 2442BEA0 */ addiu $v0, $v0, %lo(D_8014BEA0)
/* B7DC4 801216C4 080485EE */ j .L801217B8_B7EB8
/* B7DC8 801216C8 AC820004 */ sw $v0, 4($a0)
.L801216CC_B7DCC:
/* B7DCC 801216CC 3C03800A */ lui $v1, %hi(gMasterGfxPos)
/* B7DD0 801216D0 2463A66C */ addiu $v1, $v1, %lo(gMasterGfxPos)
/* B7DD4 801216D4 8C620000 */ lw $v0, ($v1)
/* B7DD8 801216D8 0040202D */ daddu $a0, $v0, $zero
/* B7DDC 801216DC 24420008 */ addiu $v0, $v0, 8
/* B7DE0 801216E0 AC620000 */ sw $v0, ($v1)
/* B7DE4 801216E4 3C02DE00 */ lui $v0, 0xde00
/* B7DE8 801216E8 AC820000 */ sw $v0, ($a0)
/* B7DEC 801216EC 3C028015 */ lui $v0, %hi(D_8014BEC8)
/* B7DF0 801216F0 2442BEC8 */ addiu $v0, $v0, %lo(D_8014BEC8)
/* B7DF4 801216F4 080485EE */ j .L801217B8_B7EB8
/* B7DF8 801216F8 AC820004 */ sw $v0, 4($a0)
.L801216FC_B7DFC:
/* B7DFC 801216FC 3C03800A */ lui $v1, %hi(gMasterGfxPos)
/* B7E00 80121700 2463A66C */ addiu $v1, $v1, %lo(gMasterGfxPos)
/* B7E04 80121704 8C620000 */ lw $v0, ($v1)
/* B7E08 80121708 0040202D */ daddu $a0, $v0, $zero
/* B7E0C 8012170C 24420008 */ addiu $v0, $v0, 8
/* B7E10 80121710 AC620000 */ sw $v0, ($v1)
/* B7E14 80121714 3C02DE00 */ lui $v0, 0xde00
/* B7E18 80121718 AC820000 */ sw $v0, ($a0)
/* B7E1C 8012171C 3C028015 */ lui $v0, %hi(D_8014BEF0)
/* B7E20 80121720 2442BEF0 */ addiu $v0, $v0, %lo(D_8014BEF0)
/* B7E24 80121724 080485EE */ j .L801217B8_B7EB8
/* B7E28 80121728 AC820004 */ sw $v0, 4($a0)
.L8012172C_B7E2C:
/* B7E2C 8012172C 3C03800A */ lui $v1, %hi(gMasterGfxPos)
/* B7E30 80121730 2463A66C */ addiu $v1, $v1, %lo(gMasterGfxPos)
/* B7E34 80121734 8C620000 */ lw $v0, ($v1)
/* B7E38 80121738 0040202D */ daddu $a0, $v0, $zero
/* B7E3C 8012173C 24420008 */ addiu $v0, $v0, 8
/* B7E40 80121740 AC620000 */ sw $v0, ($v1)
/* B7E44 80121744 3C02DE00 */ lui $v0, 0xde00
/* B7E48 80121748 AC820000 */ sw $v0, ($a0)
/* B7E4C 8012174C 3C028015 */ lui $v0, %hi(D_8014BF18)
/* B7E50 80121750 2442BF18 */ addiu $v0, $v0, %lo(D_8014BF18)
/* B7E54 80121754 080485EE */ j .L801217B8_B7EB8
/* B7E58 80121758 AC820004 */ sw $v0, 4($a0)
.L8012175C_B7E5C:
/* B7E5C 8012175C 3C03800A */ lui $v1, %hi(gMasterGfxPos)
/* B7E60 80121760 2463A66C */ addiu $v1, $v1, %lo(gMasterGfxPos)
/* B7E64 80121764 8C620000 */ lw $v0, ($v1)
/* B7E68 80121768 0040202D */ daddu $a0, $v0, $zero
/* B7E6C 8012176C 24420008 */ addiu $v0, $v0, 8
/* B7E70 80121770 AC620000 */ sw $v0, ($v1)
/* B7E74 80121774 3C02DE00 */ lui $v0, 0xde00
/* B7E78 80121778 AC820000 */ sw $v0, ($a0)
/* B7E7C 8012177C 3C028015 */ lui $v0, %hi(D_8014BF40)
/* B7E80 80121780 2442BF40 */ addiu $v0, $v0, %lo(D_8014BF40)
/* B7E84 80121784 080485EE */ j .L801217B8_B7EB8
/* B7E88 80121788 AC820004 */ sw $v0, 4($a0)
.L8012178C_B7E8C:
/* B7E8C 8012178C 3C03800A */ lui $v1, %hi(gMasterGfxPos)
/* B7E90 80121790 2463A66C */ addiu $v1, $v1, %lo(gMasterGfxPos)
/* B7E94 80121794 8C620000 */ lw $v0, ($v1)
/* B7E98 80121798 0040202D */ daddu $a0, $v0, $zero
/* B7E9C 8012179C 24420008 */ addiu $v0, $v0, 8
/* B7EA0 801217A0 AC620000 */ sw $v0, ($v1)
/* B7EA4 801217A4 3C02DE00 */ lui $v0, 0xde00
/* B7EA8 801217A8 AC820000 */ sw $v0, ($a0)
/* B7EAC 801217AC 3C028015 */ lui $v0, %hi(D_8014BF68)
/* B7EB0 801217B0 2442BF68 */ addiu $v0, $v0, %lo(D_8014BF68)
/* B7EB4 801217B4 AC820004 */ sw $v0, 4($a0)
.L801217B8_B7EB8:
/* B7EB8 801217B8 3C070001 */ lui $a3, 1
/* B7EBC 801217BC 3C028015 */ lui $v0, %hi(entity_fog_dist_max)
/* B7EC0 801217C0 8C424390 */ lw $v0, %lo(entity_fog_dist_max)($v0)
/* B7EC4 801217C4 3C038015 */ lui $v1, %hi(entity_fog_dist_min)
/* B7EC8 801217C8 8C63438C */ lw $v1, %lo(entity_fog_dist_min)($v1)
/* B7ECC 801217CC 34E7F400 */ ori $a3, $a3, 0xf400
/* B7ED0 801217D0 00431023 */ subu $v0, $v0, $v1
/* B7ED4 801217D4 14400002 */ bnez $v0, .L801217E0
/* B7ED8 801217D8 00E2001A */ div $zero, $a3, $v0
/* B7EDC 801217DC 0007000D */ break 7
.L801217E0:
/* B7EE0 801217E0 2401FFFF */ addiu $at, $zero, -1
/* B7EE4 801217E4 14410004 */ bne $v0, $at, .L801217F8
/* B7EE8 801217E8 3C018000 */ lui $at, 0x8000
/* B7EEC 801217EC 14E10002 */ bne $a3, $at, .L801217F8
/* B7EF0 801217F0 00000000 */ nop
/* B7EF4 801217F4 0006000D */ break 6
.L801217F8:
/* B7EF8 801217F8 00003812 */ mflo $a3
/* B7EFC 801217FC 240501F4 */ addiu $a1, $zero, 0x1f4
/* B7F00 80121800 00A32823 */ subu $a1, $a1, $v1
/* B7F04 80121804 00052A00 */ sll $a1, $a1, 8
/* B7F08 80121808 14400002 */ bnez $v0, .L80121814
/* B7F0C 8012180C 00A2001A */ div $zero, $a1, $v0
/* B7F10 80121810 0007000D */ break 7
.L80121814:
/* B7F14 80121814 2401FFFF */ addiu $at, $zero, -1
/* B7F18 80121818 14410004 */ bne $v0, $at, .L8012182C
/* B7F1C 8012181C 3C018000 */ lui $at, 0x8000
/* B7F20 80121820 14A10002 */ bne $a1, $at, .L8012182C
/* B7F24 80121824 00000000 */ nop
/* B7F28 80121828 0006000D */ break 6
.L8012182C:
/* B7F2C 8012182C 00002812 */ mflo $a1
/* B7F30 80121830 3C08800A */ lui $t0, %hi(gMasterGfxPos)
/* B7F34 80121834 2508A66C */ addiu $t0, $t0, %lo(gMasterGfxPos)
/* B7F38 80121838 8D060000 */ lw $a2, ($t0)
/* B7F3C 8012183C 00C0482D */ daddu $t1, $a2, $zero
/* B7F40 80121840 24C60008 */ addiu $a2, $a2, 8
/* B7F44 80121844 3C02F800 */ lui $v0, 0xf800
/* B7F48 80121848 AD060000 */ sw $a2, ($t0)
/* B7F4C 8012184C AD220000 */ sw $v0, ($t1)
/* B7F50 80121850 3C028015 */ lui $v0, %hi(D_8015437F)
/* B7F54 80121854 9042437F */ lbu $v0, %lo(D_8015437F)($v0)
/* B7F58 80121858 3C038015 */ lui $v1, %hi(D_80154383)
/* B7F5C 8012185C 90634383 */ lbu $v1, %lo(D_80154383)($v1)
/* B7F60 80121860 3C048015 */ lui $a0, %hi(D_80154387)
/* B7F64 80121864 90844387 */ lbu $a0, %lo(D_80154387)($a0)
/* B7F68 80121868 00021600 */ sll $v0, $v0, 0x18
/* B7F6C 8012186C 00031C00 */ sll $v1, $v1, 0x10
/* B7F70 80121870 00431025 */ or $v0, $v0, $v1
/* B7F74 80121874 00042200 */ sll $a0, $a0, 8
/* B7F78 80121878 3C038015 */ lui $v1, %hi(D_8015438B)
/* B7F7C 8012187C 9063438B */ lbu $v1, %lo(D_8015438B)($v1)
/* B7F80 80121880 00441025 */ or $v0, $v0, $a0
/* B7F84 80121884 00431025 */ or $v0, $v0, $v1
/* B7F88 80121888 AD220004 */ sw $v0, 4($t1)
/* B7F8C 8012188C 24C20008 */ addiu $v0, $a2, 8
/* B7F90 80121890 AD020000 */ sw $v0, ($t0)
/* B7F94 80121894 3C02DB08 */ lui $v0, 0xdb08
/* B7F98 80121898 ACC20000 */ sw $v0, ($a2)
/* B7F9C 8012189C 00073C00 */ sll $a3, $a3, 0x10
/* B7FA0 801218A0 30A5FFFF */ andi $a1, $a1, 0xffff
/* B7FA4 801218A4 00E53825 */ or $a3, $a3, $a1
/* B7FA8 801218A8 ACC70004 */ sw $a3, 4($a2)
.L801218AC_B7FAC:
/* B7FAC 801218AC 3C02D9FD */ lui $v0, 0xd9fd
.L801218B0:
/* B7FB0 801218B0 3C06800A */ lui $a2, %hi(gMasterGfxPos)
/* B7FB4 801218B4 24C6A66C */ addiu $a2, $a2, %lo(gMasterGfxPos)
/* B7FB8 801218B8 3442FFFF */ ori $v0, $v0, 0xffff
/* B7FBC 801218BC 8CC50000 */ lw $a1, ($a2)
/* B7FC0 801218C0 3C048015 */ lui $a0, %hi(entity_fog_enabled)
/* B7FC4 801218C4 8C844378 */ lw $a0, %lo(entity_fog_enabled)($a0)
/* B7FC8 801218C8 00A0182D */ daddu $v1, $a1, $zero
/* B7FCC 801218CC 24A50008 */ addiu $a1, $a1, 8
/* B7FD0 801218D0 ACC50000 */ sw $a1, ($a2)
/* B7FD4 801218D4 AC620000 */ sw $v0, ($v1)
/* B7FD8 801218D8 10800005 */ beqz $a0, .L801218F0
/* B7FDC 801218DC AC600004 */ sw $zero, 4($v1)
/* B7FE0 801218E0 8E420000 */ lw $v0, ($s2)
/* B7FE4 801218E4 30420800 */ andi $v0, $v0, 0x800
/* B7FE8 801218E8 1040000A */ beqz $v0, .L80121914
/* B7FEC 801218EC 3C02FC12 */ lui $v0, 0xfc12
.L801218F0:
/* B7FF0 801218F0 3C04FC12 */ lui $a0, 0xfc12
/* B7FF4 801218F4 34841824 */ ori $a0, $a0, 0x1824
/* B7FF8 801218F8 3C03FF33 */ lui $v1, 0xff33
/* B7FFC 801218FC 3463FFFF */ ori $v1, $v1, 0xffff
/* B8000 80121900 24A20008 */ addiu $v0, $a1, 8
/* B8004 80121904 ACC20000 */ sw $v0, ($a2)
/* B8008 80121908 ACA40000 */ sw $a0, ($a1)
/* B800C 8012190C 0804864B */ j .L8012192C
/* B8010 80121910 ACA30004 */ sw $v1, 4($a1)
.L80121914:
/* B8014 80121914 34421E04 */ ori $v0, $v0, 0x1e04
/* B8018 80121918 24A30008 */ addiu $v1, $a1, 8
/* B801C 8012191C ACC30000 */ sw $v1, ($a2)
/* B8020 80121920 ACA20000 */ sw $v0, ($a1)
/* B8024 80121924 2402F3F8 */ addiu $v0, $zero, -0xc08
/* B8028 80121928 ACA20004 */ sw $v0, 4($a1)
.L8012192C:
/* B802C 8012192C 8E42005C */ lw $v0, 0x5c($s2)
/* B8030 80121930 10400012 */ beqz $v0, .L8012197C
/* B8034 80121934 00000000 */ nop
/* B8038 80121938 3C04800A */ lui $a0, %hi(gMasterGfxPos)
/* B803C 8012193C 2484A66C */ addiu $a0, $a0, %lo(gMasterGfxPos)
/* B8040 80121940 8C830000 */ lw $v1, ($a0)
/* B8044 80121944 3C028015 */ lui $v0, %hi(D_80154374)
/* B8048 80121948 8C424374 */ lw $v0, %lo(D_80154374)($v0)
/* B804C 8012194C 0060282D */ daddu $a1, $v1, $zero
/* B8050 80121950 24630008 */ addiu $v1, $v1, 8
/* B8054 80121954 00021080 */ sll $v0, $v0, 2
/* B8058 80121958 3042FFFF */ andi $v0, $v0, 0xffff
/* B805C 8012195C AC830000 */ sw $v1, ($a0)
/* B8060 80121960 3C03DB06 */ lui $v1, 0xdb06
/* B8064 80121964 00431025 */ or $v0, $v0, $v1
/* B8068 80121968 ACA20000 */ sw $v0, ($a1)
/* B806C 8012196C 8E42005C */ lw $v0, 0x5c($s2)
/* B8070 80121970 3C038000 */ lui $v1, 0x8000
/* B8074 80121974 00431021 */ addu $v0, $v0, $v1
/* B8078 80121978 ACA20004 */ sw $v0, 4($a1)
.L8012197C:
/* B807C 8012197C 3C10800A */ lui $s0, %hi(gMasterGfxPos)
/* B8080 80121980 2610A66C */ addiu $s0, $s0, %lo(gMasterGfxPos)
/* B8084 80121984 8E020000 */ lw $v0, ($s0)
/* B8088 80121988 3C11E700 */ lui $s1, 0xe700
/* B808C 8012198C 0040182D */ daddu $v1, $v0, $zero
/* B8090 80121990 AC710000 */ sw $s1, ($v1)
/* B8094 80121994 AC600004 */ sw $zero, 4($v1)
/* B8098 80121998 8E430060 */ lw $v1, 0x60($s2)
/* B809C 8012199C 24420008 */ addiu $v0, $v0, 8
/* B80A0 801219A0 10600004 */ beqz $v1, .L801219B4
/* B80A4 801219A4 AE020000 */ sw $v0, ($s0)
/* B80A8 801219A8 8E440064 */ lw $a0, 0x64($s2)
/* B80AC 801219AC 0060F809 */ jalr $v1
/* B80B0 801219B0 00000000 */ nop
.L801219B4:
/* B80B4 801219B4 3C05D838 */ lui $a1, 0xd838
/* B80B8 801219B8 8E020000 */ lw $v0, ($s0)
/* B80BC 801219BC 34A50002 */ ori $a1, $a1, 2
/* B80C0 801219C0 0040182D */ daddu $v1, $v0, $zero
/* B80C4 801219C4 24420008 */ addiu $v0, $v0, 8
/* B80C8 801219C8 AE020000 */ sw $v0, ($s0)
/* B80CC 801219CC AC710000 */ sw $s1, ($v1)
/* B80D0 801219D0 AC600004 */ sw $zero, 4($v1)
/* B80D4 801219D4 24430008 */ addiu $v1, $v0, 8
/* B80D8 801219D8 AE030000 */ sw $v1, ($s0)
/* B80DC 801219DC 3C03DE00 */ lui $v1, 0xde00
/* B80E0 801219E0 AC430000 */ sw $v1, ($v0)
/* B80E4 801219E4 8E440014 */ lw $a0, 0x14($s2)
/* B80E8 801219E8 24430010 */ addiu $v1, $v0, 0x10
/* B80EC 801219EC AE030000 */ sw $v1, ($s0)
/* B80F0 801219F0 24030040 */ addiu $v1, $zero, 0x40
/* B80F4 801219F4 AC450008 */ sw $a1, 8($v0)
/* B80F8 801219F8 AC43000C */ sw $v1, 0xc($v0)
/* B80FC 801219FC AC510010 */ sw $s1, 0x10($v0)
/* B8100 80121A00 AC400014 */ sw $zero, 0x14($v0)
/* B8104 80121A04 AC440004 */ sw $a0, 4($v0)
/* B8108 80121A08 8E430000 */ lw $v1, ($s2)
/* B810C 80121A0C 24420018 */ addiu $v0, $v0, 0x18
/* B8110 80121A10 30630200 */ andi $v1, $v1, 0x200
/* B8114 80121A14 106000AE */ beqz $v1, .L80121CD0
/* B8118 80121A18 AE020000 */ sw $v0, ($s0)
/* B811C 80121A1C 27A40010 */ addiu $a0, $sp, 0x10
/* B8120 80121A20 26510018 */ addiu $s1, $s2, 0x18
/* B8124 80121A24 0C019D60 */ jal guMtxL2F
/* B8128 80121A28 0220282D */ daddu $a1, $s1, $zero
/* B812C 80121A2C 27B00050 */ addiu $s0, $sp, 0x50
/* B8130 80121A30 0C048450 */ jal make_entity_model_mtx_flipZ
/* B8134 80121A34 0200202D */ daddu $a0, $s0, $zero
/* B8138 80121A38 27A40010 */ addiu $a0, $sp, 0x10
/* B813C 80121A3C 0200282D */ daddu $a1, $s0, $zero
/* B8140 80121A40 0C019D80 */ jal guMtxCatF
/* B8144 80121A44 0080302D */ daddu $a2, $a0, $zero
/* B8148 80121A48 27A40010 */ addiu $a0, $sp, 0x10
/* B814C 80121A4C 0C019D40 */ jal guMtxF2L
/* B8150 80121A50 0220282D */ daddu $a1, $s1, $zero
/* B8154 80121A54 3C040001 */ lui $a0, 1
/* B8158 80121A58 34841630 */ ori $a0, $a0, 0x1630
/* B815C 80121A5C 26450058 */ addiu $a1, $s2, 0x58
/* B8160 80121A60 3C028007 */ lui $v0, %hi(gMatrixListPos)
/* B8164 80121A64 944241F0 */ lhu $v0, %lo(gMatrixListPos)($v0)
/* B8168 80121A68 3C03800A */ lui $v1, %hi(gDisplayContext)
/* B816C 80121A6C 8C63A674 */ lw $v1, %lo(gDisplayContext)($v1)
/* B8170 80121A70 00021180 */ sll $v0, $v0, 6
/* B8174 80121A74 00621821 */ addu $v1, $v1, $v0
/* B8178 80121A78 00641821 */ addu $v1, $v1, $a0
.L80121A7C:
/* B817C 80121A7C 8E2E0000 */ lw $t6, ($s1)
/* B8180 80121A80 8E2F0004 */ lw $t7, 4($s1)
/* B8184 80121A84 8E380008 */ lw $t8, 8($s1)
/* B8188 80121A88 8E39000C */ lw $t9, 0xc($s1)
/* B818C 80121A8C AC6E0000 */ sw $t6, ($v1)
/* B8190 80121A90 AC6F0004 */ sw $t7, 4($v1)
/* B8194 80121A94 AC780008 */ sw $t8, 8($v1)
/* B8198 80121A98 AC79000C */ sw $t9, 0xc($v1)
/* B819C 80121A9C 26310010 */ addiu $s1, $s1, 0x10
/* B81A0 80121AA0 1625FFF6 */ bne $s1, $a1, .L80121A7C
/* B81A4 80121AA4 24630010 */ addiu $v1, $v1, 0x10
/* B81A8 80121AA8 3C03DA38 */ lui $v1, 0xda38
/* B81AC 80121AAC 34630002 */ ori $v1, $v1, 2
/* B81B0 80121AB0 3C080001 */ lui $t0, 1
/* B81B4 80121AB4 3C06800A */ lui $a2, %hi(gMasterGfxPos)
/* B81B8 80121AB8 24C6A66C */ addiu $a2, $a2, %lo(gMasterGfxPos)
/* B81BC 80121ABC 35081630 */ ori $t0, $t0, 0x1630
/* B81C0 80121AC0 3C058007 */ lui $a1, %hi(gMatrixListPos)
/* B81C4 80121AC4 24A541F0 */ addiu $a1, $a1, %lo(gMatrixListPos)
/* B81C8 80121AC8 8CC40000 */ lw $a0, ($a2)
/* B81CC 80121ACC 94A20000 */ lhu $v0, ($a1)
/* B81D0 80121AD0 0080382D */ daddu $a3, $a0, $zero
/* B81D4 80121AD4 24840008 */ addiu $a0, $a0, 8
/* B81D8 80121AD8 ACC40000 */ sw $a0, ($a2)
/* B81DC 80121ADC ACE30000 */ sw $v1, ($a3)
/* B81E0 80121AE0 24430001 */ addiu $v1, $v0, 1
/* B81E4 80121AE4 3042FFFF */ andi $v0, $v0, 0xffff
/* B81E8 80121AE8 00021180 */ sll $v0, $v0, 6
/* B81EC 80121AEC A4A30000 */ sh $v1, ($a1)
/* B81F0 80121AF0 3C03800A */ lui $v1, %hi(gDisplayContext)
/* B81F4 80121AF4 8C63A674 */ lw $v1, %lo(gDisplayContext)($v1)
/* B81F8 80121AF8 00481021 */ addu $v0, $v0, $t0
/* B81FC 80121AFC 00621821 */ addu $v1, $v1, $v0
/* B8200 80121B00 3C02DE00 */ lui $v0, 0xde00
/* B8204 80121B04 ACE30004 */ sw $v1, 4($a3)
/* B8208 80121B08 AC820000 */ sw $v0, ($a0)
/* B820C 80121B0C 8E430014 */ lw $v1, 0x14($s2)
/* B8210 80121B10 24820008 */ addiu $v0, $a0, 8
/* B8214 80121B14 ACC20000 */ sw $v0, ($a2)
/* B8218 80121B18 08048724 */ j .L80121C90
/* B821C 80121B1C AC830004 */ sw $v1, 4($a0)
.L80121B20:
/* B8220 80121B20 3C03D9C0 */ lui $v1, 0xd9c0
/* B8224 80121B24 3463F9FA */ ori $v1, $v1, 0xf9fa
/* B8228 80121B28 3C05D9FF */ lui $a1, 0xd9ff
/* B822C 80121B2C 34A5FFFF */ ori $a1, $a1, 0xffff
/* B8230 80121B30 3C040022 */ lui $a0, 0x22
/* B8234 80121B34 34840005 */ ori $a0, $a0, 5
/* B8238 80121B38 3C06DC08 */ lui $a2, 0xdc08
/* B823C 80121B3C 34C6060A */ ori $a2, $a2, 0x60a
/* B8240 80121B40 3C07DC08 */ lui $a3, 0xdc08
/* B8244 80121B44 34E7090A */ ori $a3, $a3, 0x90a
/* B8248 80121B48 3C08D700 */ lui $t0, 0xd700
/* B824C 80121B4C 35080002 */ ori $t0, $t0, 2
/* B8250 80121B50 3C0AE200 */ lui $t2, 0xe200
/* B8254 80121B54 354A1E01 */ ori $t2, $t2, 0x1e01
/* B8258 80121B58 3C0BE300 */ lui $t3, 0xe300
/* B825C 80121B5C 356B0A11 */ ori $t3, $t3, 0xa11
/* B8260 80121B60 3C090008 */ lui $t1, 8
/* B8264 80121B64 35292CF0 */ ori $t1, $t1, 0x2cf0
/* B8268 80121B68 25820008 */ addiu $v0, $t4, 8
/* B826C 80121B6C ADA20000 */ sw $v0, ($t5)
/* B8270 80121B70 3C02E700 */ lui $v0, 0xe700
/* B8274 80121B74 AD820000 */ sw $v0, ($t4)
/* B8278 80121B78 25820010 */ addiu $v0, $t4, 0x10
/* B827C 80121B7C AD800004 */ sw $zero, 4($t4)
/* B8280 80121B80 ADA20000 */ sw $v0, ($t5)
/* B8284 80121B84 25820018 */ addiu $v0, $t4, 0x18
/* B8288 80121B88 AD830008 */ sw $v1, 8($t4)
/* B828C 80121B8C AD80000C */ sw $zero, 0xc($t4)
/* B8290 80121B90 ADA20000 */ sw $v0, ($t5)
/* B8294 80121B94 25820020 */ addiu $v0, $t4, 0x20
/* B8298 80121B98 AD850010 */ sw $a1, 0x10($t4)
/* B829C 80121B9C AD840014 */ sw $a0, 0x14($t4)
/* B82A0 80121BA0 ADA20000 */ sw $v0, ($t5)
/* B82A4 80121BA4 3C02DB02 */ lui $v0, 0xdb02
/* B82A8 80121BA8 AD820018 */ sw $v0, 0x18($t4)
/* B82AC 80121BAC 24020018 */ addiu $v0, $zero, 0x18
/* B82B0 80121BB0 AD82001C */ sw $v0, 0x1c($t4)
/* B82B4 80121BB4 25820028 */ addiu $v0, $t4, 0x28
/* B82B8 80121BB8 ADA20000 */ sw $v0, ($t5)
/* B82BC 80121BBC 3C028015 */ lui $v0, %hi(D_8014C270)
/* B82C0 80121BC0 2442C270 */ addiu $v0, $v0, %lo(D_8014C270)
/* B82C4 80121BC4 AD820024 */ sw $v0, 0x24($t4)
/* B82C8 80121BC8 2442FFF8 */ addiu $v0, $v0, -8
/* B82CC 80121BCC AD82002C */ sw $v0, 0x2c($t4)
/* B82D0 80121BD0 2402FFFF */ addiu $v0, $zero, -1
/* B82D4 80121BD4 AD860020 */ sw $a2, 0x20($t4)
/* B82D8 80121BD8 AD870028 */ sw $a3, 0x28($t4)
/* B82DC 80121BDC AD880030 */ sw $t0, 0x30($t4)
/* B82E0 80121BE0 AD820034 */ sw $v0, 0x34($t4)
/* B82E4 80121BE4 AD8A0038 */ sw $t2, 0x38($t4)
/* B82E8 80121BE8 AD80003C */ sw $zero, 0x3c($t4)
/* B82EC 80121BEC AD8B0040 */ sw $t3, 0x40($t4)
/* B82F0 80121BF0 AD890044 */ sw $t1, 0x44($t4)
/* B82F4 80121BF4 8E460014 */ lw $a2, 0x14($s2)
/* B82F8 80121BF8 25820030 */ addiu $v0, $t4, 0x30
/* B82FC 80121BFC ADA20000 */ sw $v0, ($t5)
/* B8300 80121C00 25820038 */ addiu $v0, $t4, 0x38
/* B8304 80121C04 8CC30000 */ lw $v1, ($a2)
/* B8308 80121C08 27B000A8 */ addiu $s0, $sp, 0xa8
/* B830C 80121C0C ADA20000 */ sw $v0, ($t5)
/* B8310 80121C10 AFA30090 */ sw $v1, 0x90($sp)
/* B8314 80121C14 8CC30004 */ lw $v1, 4($a2)
/* B8318 80121C18 25820040 */ addiu $v0, $t4, 0x40
/* B831C 80121C1C ADA20000 */ sw $v0, ($t5)
/* B8320 80121C20 AFA30094 */ sw $v1, 0x94($sp)
/* B8324 80121C24 94C3000A */ lhu $v1, 0xa($a2)
/* B8328 80121C28 25820048 */ addiu $v0, $t4, 0x48
/* B832C 80121C2C ADA20000 */ sw $v0, ($t5)
/* B8330 80121C30 A7A30098 */ sh $v1, 0x98($sp)
/* B8334 80121C34 94C2000E */ lhu $v0, 0xe($a2)
/* B8338 80121C38 0200202D */ daddu $a0, $s0, $zero
/* B833C 80121C3C A7A2009A */ sh $v0, 0x9a($sp)
/* B8340 80121C40 8CC20008 */ lw $v0, 8($a2)
/* B8344 80121C44 26450018 */ addiu $a1, $s2, 0x18
/* B8348 80121C48 00021023 */ negu $v0, $v0
/* B834C 80121C4C 00021FC2 */ srl $v1, $v0, 0x1f
/* B8350 80121C50 00431021 */ addu $v0, $v0, $v1
/* B8354 80121C54 00021043 */ sra $v0, $v0, 1
/* B8358 80121C58 A7A2009C */ sh $v0, 0x9c($sp)
/* B835C 80121C5C 8CC2000C */ lw $v0, 0xc($a2)
/* B8360 80121C60 240300FF */ addiu $v1, $zero, 0xff
/* B8364 80121C64 A3A300A0 */ sb $v1, 0xa0($sp)
/* B8368 80121C68 00021FC2 */ srl $v1, $v0, 0x1f
/* B836C 80121C6C 00431021 */ addu $v0, $v0, $v1
/* B8370 80121C70 00021043 */ sra $v0, $v0, 1
/* B8374 80121C74 0C019D60 */ jal guMtxL2F
/* B8378 80121C78 A7A2009E */ sh $v0, 0x9e($sp)
/* B837C 80121C7C 0000202D */ daddu $a0, $zero, $zero
/* B8380 80121C80 27A50090 */ addiu $a1, $sp, 0x90
/* B8384 80121C84 0080302D */ daddu $a2, $a0, $zero
/* B8388 80121C88 0C04EBDC */ jal fold_appendGfx_component
/* B838C 80121C8C 0200382D */ daddu $a3, $s0, $zero
.L80121C90:
/* B8390 80121C90 3C03D838 */ lui $v1, 0xd838
/* B8394 80121C94 3C04800A */ lui $a0, %hi(gMasterGfxPos)
/* B8398 80121C98 2484A66C */ addiu $a0, $a0, %lo(gMasterGfxPos)
/* B839C 80121C9C 8C820000 */ lw $v0, ($a0)
/* B83A0 80121CA0 34630002 */ ori $v1, $v1, 2
/* B83A4 80121CA4 0040282D */ daddu $a1, $v0, $zero
/* B83A8 80121CA8 24420008 */ addiu $v0, $v0, 8
/* B83AC 80121CAC AC820000 */ sw $v0, ($a0)
/* B83B0 80121CB0 ACA30000 */ sw $v1, ($a1)
/* B83B4 80121CB4 24030040 */ addiu $v1, $zero, 0x40
/* B83B8 80121CB8 ACA30004 */ sw $v1, 4($a1)
/* B83BC 80121CBC 24430008 */ addiu $v1, $v0, 8
/* B83C0 80121CC0 AC830000 */ sw $v1, ($a0)
/* B83C4 80121CC4 3C03E700 */ lui $v1, 0xe700
/* B83C8 80121CC8 AC430000 */ sw $v1, ($v0)
/* B83CC 80121CCC AC400004 */ sw $zero, 4($v0)
.L80121CD0:
/* B83D0 80121CD0 8FBF00F4 */ lw $ra, 0xf4($sp)
/* B83D4 80121CD4 8FB200F0 */ lw $s2, 0xf0($sp)
/* B83D8 80121CD8 8FB100EC */ lw $s1, 0xec($sp)
/* B83DC 80121CDC 8FB000E8 */ lw $s0, 0xe8($sp)
/* B83E0 80121CE0 03E00008 */ jr $ra
/* B83E4 80121CE4 27BD00F8 */ addiu $sp, $sp, 0xf8

View File

@ -1,124 +0,0 @@
.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel draw_entity_model_A
/* B83E8 80121CE8 27BDFF60 */ addiu $sp, $sp, -0xa0
/* B83EC 80121CEC 0080302D */ daddu $a2, $a0, $zero
/* B83F0 80121CF0 AFB1008C */ sw $s1, 0x8c($sp)
/* B83F4 80121CF4 27B10028 */ addiu $s1, $sp, 0x28
/* B83F8 80121CF8 3C07800A */ lui $a3, %hi(gCurrentCamID)
/* B83FC 80121CFC 84E7A634 */ lh $a3, %lo(gCurrentCamID)($a3)
/* B8400 80121D00 3C04800B */ lui $a0, %hi(gCameras)
/* B8404 80121D04 24841D80 */ addiu $a0, $a0, %lo(gCameras)
/* B8408 80121D08 AFBF0094 */ sw $ra, 0x94($sp)
/* B840C 80121D0C AFB20090 */ sw $s2, 0x90($sp)
/* B8410 80121D10 AFB00088 */ sw $s0, 0x88($sp)
/* B8414 80121D14 F7B40098 */ sdc1 $f20, 0x98($sp)
/* B8418 80121D18 00071080 */ sll $v0, $a3, 2
/* B841C 80121D1C 00471021 */ addu $v0, $v0, $a3
/* B8420 80121D20 00021080 */ sll $v0, $v0, 2
/* B8424 80121D24 00471023 */ subu $v0, $v0, $a3
/* B8428 80121D28 000218C0 */ sll $v1, $v0, 3
/* B842C 80121D2C 00431021 */ addu $v0, $v0, $v1
/* B8430 80121D30 3C038007 */ lui $v1, %hi(gGameStatusPtr)
/* B8434 80121D34 8C63419C */ lw $v1, %lo(gGameStatusPtr)($v1)
/* B8438 80121D38 000210C0 */ sll $v0, $v0, 3
/* B843C 80121D3C 80630070 */ lb $v1, 0x70($v1)
/* B8440 80121D40 10600004 */ beqz $v1, .L80121D54
/* B8444 80121D44 00449021 */ addu $s2, $v0, $a0
/* B8448 80121D48 30C20800 */ andi $v0, $a2, 0x800
/* B844C 80121D4C 10400053 */ beqz $v0, .L80121E9C
/* B8450 80121D50 00000000 */ nop
.L80121D54:
/* B8454 80121D54 2402F7FF */ addiu $v0, $zero, -0x801
/* B8458 80121D58 00C23024 */ and $a2, $a2, $v0
/* B845C 80121D5C 3C038015 */ lui $v1, %hi(gCurrentEntityModelList)
/* B8460 80121D60 8C634370 */ lw $v1, %lo(gCurrentEntityModelList)($v1)
/* B8464 80121D64 00061080 */ sll $v0, $a2, 2
/* B8468 80121D68 00431021 */ addu $v0, $v0, $v1
/* B846C 80121D6C 8C500000 */ lw $s0, ($v0)
/* B8470 80121D70 1200004A */ beqz $s0, .L80121E9C
/* B8474 80121D74 00000000 */ nop
/* B8478 80121D78 8E030000 */ lw $v1, ($s0)
/* B847C 80121D7C 10600047 */ beqz $v1, .L80121E9C
/* B8480 80121D80 30620100 */ andi $v0, $v1, 0x100
/* B8484 80121D84 14400045 */ bnez $v0, .L80121E9C
/* B8488 80121D88 30620020 */ andi $v0, $v1, 0x20
/* B848C 80121D8C 14400043 */ bnez $v0, .L80121E9C
/* B8490 80121D90 30620040 */ andi $v0, $v1, 0x40
/* B8494 80121D94 14400041 */ bnez $v0, .L80121E9C
/* B8498 80121D98 24020001 */ addiu $v0, $zero, 1
/* B849C 80121D9C 00E21004 */ sllv $v0, $v0, $a3
/* B84A0 80121DA0 00621024 */ and $v0, $v1, $v0
/* B84A4 80121DA4 1040003D */ beqz $v0, .L80121E9C
/* B84A8 80121DA8 26030018 */ addiu $v1, $s0, 0x18
/* B84AC 80121DAC 00A0102D */ daddu $v0, $a1, $zero
/* B84B0 80121DB0 24A40040 */ addiu $a0, $a1, 0x40
.L80121DB4:
/* B84B4 80121DB4 8C480000 */ lw $t0, ($v0)
/* B84B8 80121DB8 8C490004 */ lw $t1, 4($v0)
/* B84BC 80121DBC 8C4A0008 */ lw $t2, 8($v0)
/* B84C0 80121DC0 8C4B000C */ lw $t3, 0xc($v0)
/* B84C4 80121DC4 AC680000 */ sw $t0, ($v1)
/* B84C8 80121DC8 AC690004 */ sw $t1, 4($v1)
/* B84CC 80121DCC AC6A0008 */ sw $t2, 8($v1)
/* B84D0 80121DD0 AC6B000C */ sw $t3, 0xc($v1)
/* B84D4 80121DD4 24420010 */ addiu $v0, $v0, 0x10
/* B84D8 80121DD8 1444FFF6 */ bne $v0, $a0, .L80121DB4
/* B84DC 80121DDC 24630010 */ addiu $v1, $v1, 0x10
/* B84E0 80121DE0 27A40038 */ addiu $a0, $sp, 0x38
/* B84E4 80121DE4 0C019D60 */ jal guMtxL2F
/* B84E8 80121DE8 AE00005C */ sw $zero, 0x5c($s0)
/* B84EC 80121DEC 264400D4 */ addiu $a0, $s2, 0xd4
/* B84F0 80121DF0 C7A00068 */ lwc1 $f0, 0x68($sp)
/* B84F4 80121DF4 C7A2006C */ lwc1 $f2, 0x6c($sp)
/* B84F8 80121DF8 C7B40070 */ lwc1 $f20, 0x70($sp)
/* B84FC 80121DFC 27A20078 */ addiu $v0, $sp, 0x78
/* B8500 80121E00 AFA20014 */ sw $v0, 0x14($sp)
/* B8504 80121E04 27A2007C */ addiu $v0, $sp, 0x7c
/* B8508 80121E08 AFA20018 */ sw $v0, 0x18($sp)
/* B850C 80121E0C 27A20080 */ addiu $v0, $sp, 0x80
/* B8510 80121E10 AFA2001C */ sw $v0, 0x1c($sp)
/* B8514 80121E14 44050000 */ mfc1 $a1, $f0
/* B8518 80121E18 3C013F80 */ lui $at, 0x3f80
/* B851C 80121E1C 44810000 */ mtc1 $at, $f0
/* B8520 80121E20 44061000 */ mfc1 $a2, $f2
/* B8524 80121E24 4407A000 */ mfc1 $a3, $f20
/* B8528 80121E28 27A20084 */ addiu $v0, $sp, 0x84
/* B852C 80121E2C AFA20020 */ sw $v0, 0x20($sp)
/* B8530 80121E30 0C00A588 */ jal transform_point
/* B8534 80121E34 E7A00010 */ swc1 $f0, 0x10($sp)
/* B8538 80121E38 82030004 */ lb $v1, 4($s0)
/* B853C 80121E3C 3C028012 */ lui $v0, %hi(appendGfx_entity_model)
/* B8540 80121E40 24421184 */ addiu $v0, $v0, %lo(appendGfx_entity_model)
/* B8544 80121E44 AE300008 */ sw $s0, 8($s1)
/* B8548 80121E48 AE22000C */ sw $v0, 0xc($s1)
/* B854C 80121E4C AE230000 */ sw $v1, ($s1)
/* B8550 80121E50 8E020000 */ lw $v0, ($s0)
/* B8554 80121E54 3042F000 */ andi $v0, $v0, 0xf000
/* B8558 80121E58 00021202 */ srl $v0, $v0, 8
/* B855C 80121E5C 44821000 */ mtc1 $v0, $f2
/* B8560 80121E60 00000000 */ nop
/* B8564 80121E64 468010A1 */ cvt.d.w $f2, $f2
/* B8568 80121E68 04430007 */ bgezl $v0, .L80121E88
/* B856C 80121E6C 46201020 */ cvt.s.d $f0, $f2
/* B8570 80121E70 3C0141F0 */ lui $at, 0x41f0
/* B8574 80121E74 44810800 */ mtc1 $at, $f1
/* B8578 80121E78 44800000 */ mtc1 $zero, $f0
/* B857C 80121E7C 00000000 */ nop
/* B8580 80121E80 46201080 */ add.d $f2, $f2, $f0
/* B8584 80121E84 46201020 */ cvt.s.d $f0, $f2
.L80121E88:
/* B8588 80121E88 46140000 */ add.s $f0, $f0, $f20
/* B858C 80121E8C 0220202D */ daddu $a0, $s1, $zero
/* B8590 80121E90 4600010D */ trunc.w.s $f4, $f0
/* B8594 80121E94 0C047644 */ jal queue_render_task
/* B8598 80121E98 E4840004 */ swc1 $f4, 4($a0)
.L80121E9C:
/* B859C 80121E9C 8FBF0094 */ lw $ra, 0x94($sp)
/* B85A0 80121EA0 8FB20090 */ lw $s2, 0x90($sp)
/* B85A4 80121EA4 8FB1008C */ lw $s1, 0x8c($sp)
/* B85A8 80121EA8 8FB00088 */ lw $s0, 0x88($sp)
/* B85AC 80121EAC D7B40098 */ ldc1 $f20, 0x98($sp)
/* B85B0 80121EB0 03E00008 */ jr $ra
/* B85B4 80121EB4 27BD00A0 */ addiu $sp, $sp, 0xa0

View File

@ -1,124 +0,0 @@
.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel draw_entity_model_B
/* B85B8 80121EB8 27BDFF60 */ addiu $sp, $sp, -0xa0
/* B85BC 80121EBC 0080402D */ daddu $t0, $a0, $zero
/* B85C0 80121EC0 AFB1008C */ sw $s1, 0x8c($sp)
/* B85C4 80121EC4 27B10028 */ addiu $s1, $sp, 0x28
/* B85C8 80121EC8 3C09800A */ lui $t1, %hi(gCurrentCamID)
/* B85CC 80121ECC 8529A634 */ lh $t1, %lo(gCurrentCamID)($t1)
/* B85D0 80121ED0 3C04800B */ lui $a0, %hi(gCameras)
/* B85D4 80121ED4 24841D80 */ addiu $a0, $a0, %lo(gCameras)
/* B85D8 80121ED8 AFBF0094 */ sw $ra, 0x94($sp)
/* B85DC 80121EDC AFB20090 */ sw $s2, 0x90($sp)
/* B85E0 80121EE0 AFB00088 */ sw $s0, 0x88($sp)
/* B85E4 80121EE4 F7B40098 */ sdc1 $f20, 0x98($sp)
/* B85E8 80121EE8 00091080 */ sll $v0, $t1, 2
/* B85EC 80121EEC 00491021 */ addu $v0, $v0, $t1
/* B85F0 80121EF0 00021080 */ sll $v0, $v0, 2
/* B85F4 80121EF4 00491023 */ subu $v0, $v0, $t1
/* B85F8 80121EF8 000218C0 */ sll $v1, $v0, 3
/* B85FC 80121EFC 00431021 */ addu $v0, $v0, $v1
/* B8600 80121F00 3C038007 */ lui $v1, %hi(gGameStatusPtr)
/* B8604 80121F04 8C63419C */ lw $v1, %lo(gGameStatusPtr)($v1)
/* B8608 80121F08 000210C0 */ sll $v0, $v0, 3
/* B860C 80121F0C 80630070 */ lb $v1, 0x70($v1)
/* B8610 80121F10 10600004 */ beqz $v1, .L80121F24
/* B8614 80121F14 00449021 */ addu $s2, $v0, $a0
/* B8618 80121F18 31020800 */ andi $v0, $t0, 0x800
/* B861C 80121F1C 10400053 */ beqz $v0, .L8012206C
/* B8620 80121F20 00000000 */ nop
.L80121F24:
/* B8624 80121F24 2402F7FF */ addiu $v0, $zero, -0x801
/* B8628 80121F28 01024024 */ and $t0, $t0, $v0
/* B862C 80121F2C 3C038015 */ lui $v1, %hi(gCurrentEntityModelList)
/* B8630 80121F30 8C634370 */ lw $v1, %lo(gCurrentEntityModelList)($v1)
/* B8634 80121F34 00081080 */ sll $v0, $t0, 2
/* B8638 80121F38 00431021 */ addu $v0, $v0, $v1
/* B863C 80121F3C 8C500000 */ lw $s0, ($v0)
/* B8640 80121F40 1200004A */ beqz $s0, .L8012206C
/* B8644 80121F44 00000000 */ nop
/* B8648 80121F48 8E030000 */ lw $v1, ($s0)
/* B864C 80121F4C 10600047 */ beqz $v1, .L8012206C
/* B8650 80121F50 30620100 */ andi $v0, $v1, 0x100
/* B8654 80121F54 14400045 */ bnez $v0, .L8012206C
/* B8658 80121F58 30620020 */ andi $v0, $v1, 0x20
/* B865C 80121F5C 14400043 */ bnez $v0, .L8012206C
/* B8660 80121F60 24020001 */ addiu $v0, $zero, 1
/* B8664 80121F64 01221004 */ sllv $v0, $v0, $t1
/* B8668 80121F68 00621024 */ and $v0, $v1, $v0
/* B866C 80121F6C 1040003F */ beqz $v0, .L8012206C
/* B8670 80121F70 26030018 */ addiu $v1, $s0, 0x18
/* B8674 80121F74 00A0102D */ daddu $v0, $a1, $zero
/* B8678 80121F78 24A40040 */ addiu $a0, $a1, 0x40
.L80121F7C:
/* B867C 80121F7C 8C4A0000 */ lw $t2, ($v0)
/* B8680 80121F80 8C4B0004 */ lw $t3, 4($v0)
/* B8684 80121F84 8C4C0008 */ lw $t4, 8($v0)
/* B8688 80121F88 8C4D000C */ lw $t5, 0xc($v0)
/* B868C 80121F8C AC6A0000 */ sw $t2, ($v1)
/* B8690 80121F90 AC6B0004 */ sw $t3, 4($v1)
/* B8694 80121F94 AC6C0008 */ sw $t4, 8($v1)
/* B8698 80121F98 AC6D000C */ sw $t5, 0xc($v1)
/* B869C 80121F9C 24420010 */ addiu $v0, $v0, 0x10
/* B86A0 80121FA0 1444FFF6 */ bne $v0, $a0, .L80121F7C
/* B86A4 80121FA4 24630010 */ addiu $v1, $v1, 0x10
/* B86A8 80121FA8 27A40038 */ addiu $a0, $sp, 0x38
/* B86AC 80121FAC 3C018015 */ lui $at, %hi(D_80154374)
/* B86B0 80121FB0 AC264374 */ sw $a2, %lo(D_80154374)($at)
/* B86B4 80121FB4 0C019D60 */ jal guMtxL2F
/* B86B8 80121FB8 AE07005C */ sw $a3, 0x5c($s0)
/* B86BC 80121FBC 264400D4 */ addiu $a0, $s2, 0xd4
/* B86C0 80121FC0 C7A00068 */ lwc1 $f0, 0x68($sp)
/* B86C4 80121FC4 C7A2006C */ lwc1 $f2, 0x6c($sp)
/* B86C8 80121FC8 C7B40070 */ lwc1 $f20, 0x70($sp)
/* B86CC 80121FCC 27A20078 */ addiu $v0, $sp, 0x78
/* B86D0 80121FD0 AFA20014 */ sw $v0, 0x14($sp)
/* B86D4 80121FD4 27A2007C */ addiu $v0, $sp, 0x7c
/* B86D8 80121FD8 AFA20018 */ sw $v0, 0x18($sp)
/* B86DC 80121FDC 27A20080 */ addiu $v0, $sp, 0x80
/* B86E0 80121FE0 AFA2001C */ sw $v0, 0x1c($sp)
/* B86E4 80121FE4 44050000 */ mfc1 $a1, $f0
/* B86E8 80121FE8 3C013F80 */ lui $at, 0x3f80
/* B86EC 80121FEC 44810000 */ mtc1 $at, $f0
/* B86F0 80121FF0 44061000 */ mfc1 $a2, $f2
/* B86F4 80121FF4 4407A000 */ mfc1 $a3, $f20
/* B86F8 80121FF8 27A20084 */ addiu $v0, $sp, 0x84
/* B86FC 80121FFC AFA20020 */ sw $v0, 0x20($sp)
/* B8700 80122000 0C00A588 */ jal transform_point
/* B8704 80122004 E7A00010 */ swc1 $f0, 0x10($sp)
/* B8708 80122008 82030004 */ lb $v1, 4($s0)
/* B870C 8012200C 3C028012 */ lui $v0, %hi(appendGfx_entity_model)
/* B8710 80122010 24421184 */ addiu $v0, $v0, %lo(appendGfx_entity_model)
/* B8714 80122014 AE300008 */ sw $s0, 8($s1)
/* B8718 80122018 AE22000C */ sw $v0, 0xc($s1)
/* B871C 8012201C AE230000 */ sw $v1, ($s1)
/* B8720 80122020 8E020000 */ lw $v0, ($s0)
/* B8724 80122024 3042F000 */ andi $v0, $v0, 0xf000
/* B8728 80122028 00021202 */ srl $v0, $v0, 8
/* B872C 8012202C 44821000 */ mtc1 $v0, $f2
/* B8730 80122030 00000000 */ nop
/* B8734 80122034 468010A1 */ cvt.d.w $f2, $f2
/* B8738 80122038 04430007 */ bgezl $v0, .L80122058
/* B873C 8012203C 46201020 */ cvt.s.d $f0, $f2
/* B8740 80122040 3C0141F0 */ lui $at, 0x41f0
/* B8744 80122044 44810800 */ mtc1 $at, $f1
/* B8748 80122048 44800000 */ mtc1 $zero, $f0
/* B874C 8012204C 00000000 */ nop
/* B8750 80122050 46201080 */ add.d $f2, $f2, $f0
/* B8754 80122054 46201020 */ cvt.s.d $f0, $f2
.L80122058:
/* B8758 80122058 46140000 */ add.s $f0, $f0, $f20
/* B875C 8012205C 0220202D */ daddu $a0, $s1, $zero
/* B8760 80122060 4600010D */ trunc.w.s $f4, $f0
/* B8764 80122064 0C047644 */ jal queue_render_task
/* B8768 80122068 E4840004 */ swc1 $f4, 4($a0)
.L8012206C:
/* B876C 8012206C 8FBF0094 */ lw $ra, 0x94($sp)
/* B8770 80122070 8FB20090 */ lw $s2, 0x90($sp)
/* B8774 80122074 8FB1008C */ lw $s1, 0x8c($sp)
/* B8778 80122078 8FB00088 */ lw $s0, 0x88($sp)
/* B877C 8012207C D7B40098 */ ldc1 $f20, 0x98($sp)
/* B8780 80122080 03E00008 */ jr $ra
/* B8784 80122084 27BD00A0 */ addiu $sp, $sp, 0xa0

View File

@ -1,757 +0,0 @@
.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
.section .rodata
dlabel jtbl_80150220
.word .L80122440_B8B40, .L80122980_B9080, .L80122980_B9080, .L80122650_B8D50, .L80122470_B8B70, .L80122980_B9080, .L80122980_B9080, .L80122980_B9080, .L801224A0_B8BA0, .L80122980_B9080, .L80122980_B9080, .L80122980_B9080, .L801224D0_B8BD0, .L80122980_B9080, .L80122620_B8D20, .L80122680_B8D80, .L80122500_B8C00, .L80122980_B9080, .L80122530_B8C30, .L801226B0_B8DB0, .L80122980_B9080, .L80122500_B8C00, .L80122980_B9080, .L80122980_B9080, .L80122980_B9080, .L80122560_B8C60, .L80122980_B9080, .L80122590_B8C90, .L80122980_B9080, .L80122560_B8C60, .L80122980_B9080, .L80122590_B8C90, .L80122980_B9080, .L80122500_B8C00, .L80122980_B9080, .L80122980_B9080, .L80122980_B9080, .L801225C0_B8CC0, .L80122980_B9080, .L801225F0_B8CF0, .L80122980_B9080, .L80122650_B8D50, .L80122680_B8D80, .L801226B0_B8DB0, .L801226E0_B8DE0, 0
dlabel jtbl_801502D8
.word .L80122740_B8E40, .L8012288C_B8F8C, .L8012288C_B8F8C, .L8012288C_B8F8C, .L80122770_B8E70, .L8012288C_B8F8C, .L8012288C_B8F8C, .L8012288C_B8F8C, .L801227A0_B8EA0, .L8012288C_B8F8C, .L8012288C_B8F8C, .L8012288C_B8F8C, .L801227D0_B8ED0, .L8012288C_B8F8C, .L8012288C_B8F8C, .L8012288C_B8F8C, .L80122800_B8F00, .L8012288C_B8F8C, .L8012288C_B8F8C, .L8012288C_B8F8C, .L8012288C_B8F8C, .L8012288C_B8F8C, .L8012288C_B8F8C, .L8012288C_B8F8C, .L8012288C_B8F8C, .L80122830_B8F30, .L8012288C_B8F8C, .L8012288C_B8F8C, .L8012288C_B8F8C, .L8012288C_B8F8C, .L8012288C_B8F8C, .L8012288C_B8F8C, .L8012288C_B8F8C, .L8012288C_B8F8C, .L8012288C_B8F8C, .L8012288C_B8F8C, .L8012288C_B8F8C, .L80122860_B8F60
.section .text
glabel draw_entity_model_E
/* B8988 80122288 27BDFF08 */ addiu $sp, $sp, -0xf8
/* B898C 8012228C 2402F7FF */ addiu $v0, $zero, -0x801
/* B8990 80122290 00822024 */ and $a0, $a0, $v0
/* B8994 80122294 3C028015 */ lui $v0, %hi(gCurrentEntityModelList)
/* B8998 80122298 8C424370 */ lw $v0, %lo(gCurrentEntityModelList)($v0)
/* B899C 8012229C 00042080 */ sll $a0, $a0, 2
/* B89A0 801222A0 AFBF00F4 */ sw $ra, 0xf4($sp)
/* B89A4 801222A4 AFB200F0 */ sw $s2, 0xf0($sp)
/* B89A8 801222A8 AFB100EC */ sw $s1, 0xec($sp)
/* B89AC 801222AC AFB000E8 */ sw $s0, 0xe8($sp)
/* B89B0 801222B0 00822021 */ addu $a0, $a0, $v0
/* B89B4 801222B4 8C920000 */ lw $s2, ($a0)
/* B89B8 801222B8 124002AA */ beqz $s2, .L80122D64
/* B89BC 801222BC 00000000 */ nop
/* B89C0 801222C0 8E430000 */ lw $v1, ($s2)
/* B89C4 801222C4 106002A7 */ beqz $v1, .L80122D64
/* B89C8 801222C8 30620100 */ andi $v0, $v1, 0x100
/* B89CC 801222CC 144002A5 */ bnez $v0, .L80122D64
/* B89D0 801222D0 30620020 */ andi $v0, $v1, 0x20
/* B89D4 801222D4 144002A3 */ bnez $v0, .L80122D64
/* B89D8 801222D8 30620040 */ andi $v0, $v1, 0x40
/* B89DC 801222DC 144002A1 */ bnez $v0, .L80122D64
/* B89E0 801222E0 30620008 */ andi $v0, $v1, 8
/* B89E4 801222E4 1040029F */ beqz $v0, .L80122D64
/* B89E8 801222E8 26420018 */ addiu $v0, $s2, 0x18
/* B89EC 801222EC 24A30040 */ addiu $v1, $a1, 0x40
.L801222F0:
/* B89F0 801222F0 8CAE0000 */ lw $t6, ($a1)
/* B89F4 801222F4 8CAF0004 */ lw $t7, 4($a1)
/* B89F8 801222F8 8CB80008 */ lw $t8, 8($a1)
/* B89FC 801222FC 8CB9000C */ lw $t9, 0xc($a1)
/* B8A00 80122300 AC4E0000 */ sw $t6, ($v0)
/* B8A04 80122304 AC4F0004 */ sw $t7, 4($v0)
/* B8A08 80122308 AC580008 */ sw $t8, 8($v0)
/* B8A0C 8012230C AC59000C */ sw $t9, 0xc($v0)
/* B8A10 80122310 24A50010 */ addiu $a1, $a1, 0x10
/* B8A14 80122314 14A3FFF6 */ bne $a1, $v1, .L801222F0
/* B8A18 80122318 24420010 */ addiu $v0, $v0, 0x10
/* B8A1C 8012231C 3C020001 */ lui $v0, 1
/* B8A20 80122320 34421630 */ ori $v0, $v0, 0x1630
/* B8A24 80122324 26450018 */ addiu $a1, $s2, 0x18
/* B8A28 80122328 3C038007 */ lui $v1, %hi(gMatrixListPos)
/* B8A2C 8012232C 946341F0 */ lhu $v1, %lo(gMatrixListPos)($v1)
/* B8A30 80122330 3C04800A */ lui $a0, %hi(gDisplayContext)
/* B8A34 80122334 8C84A674 */ lw $a0, %lo(gDisplayContext)($a0)
/* B8A38 80122338 26460058 */ addiu $a2, $s2, 0x58
/* B8A3C 8012233C AE40005C */ sw $zero, 0x5c($s2)
/* B8A40 80122340 00031980 */ sll $v1, $v1, 6
/* B8A44 80122344 00832021 */ addu $a0, $a0, $v1
/* B8A48 80122348 00822021 */ addu $a0, $a0, $v0
.L8012234C:
/* B8A4C 8012234C 8CAE0000 */ lw $t6, ($a1)
/* B8A50 80122350 8CAF0004 */ lw $t7, 4($a1)
/* B8A54 80122354 8CB80008 */ lw $t8, 8($a1)
/* B8A58 80122358 8CB9000C */ lw $t9, 0xc($a1)
/* B8A5C 8012235C AC8E0000 */ sw $t6, ($a0)
/* B8A60 80122360 AC8F0004 */ sw $t7, 4($a0)
/* B8A64 80122364 AC980008 */ sw $t8, 8($a0)
/* B8A68 80122368 AC99000C */ sw $t9, 0xc($a0)
/* B8A6C 8012236C 24A50010 */ addiu $a1, $a1, 0x10
/* B8A70 80122370 14A6FFF6 */ bne $a1, $a2, .L8012234C
/* B8A74 80122374 24840010 */ addiu $a0, $a0, 0x10
/* B8A78 80122378 3C02DA38 */ lui $v0, 0xda38
/* B8A7C 8012237C 34420002 */ ori $v0, $v0, 2
/* B8A80 80122380 3C070001 */ lui $a3, 1
/* B8A84 80122384 3C0D800A */ lui $t5, %hi(gMasterGfxPos)
/* B8A88 80122388 25ADA66C */ addiu $t5, $t5, %lo(gMasterGfxPos)
/* B8A8C 8012238C 34E71630 */ ori $a3, $a3, 0x1630
/* B8A90 80122390 3C068007 */ lui $a2, %hi(gMatrixListPos)
/* B8A94 80122394 24C641F0 */ addiu $a2, $a2, %lo(gMatrixListPos)
/* B8A98 80122398 8DAC0000 */ lw $t4, ($t5)
/* B8A9C 8012239C 94C40000 */ lhu $a0, ($a2)
/* B8AA0 801223A0 0180282D */ daddu $a1, $t4, $zero
/* B8AA4 801223A4 258C0008 */ addiu $t4, $t4, 8
/* B8AA8 801223A8 ADAC0000 */ sw $t4, ($t5)
/* B8AAC 801223AC ACA20000 */ sw $v0, ($a1)
/* B8AB0 801223B0 3082FFFF */ andi $v0, $a0, 0xffff
/* B8AB4 801223B4 00021180 */ sll $v0, $v0, 6
/* B8AB8 801223B8 3C03800A */ lui $v1, %hi(gDisplayContext)
/* B8ABC 801223BC 8C63A674 */ lw $v1, %lo(gDisplayContext)($v1)
/* B8AC0 801223C0 00471021 */ addu $v0, $v0, $a3
/* B8AC4 801223C4 00621821 */ addu $v1, $v1, $v0
/* B8AC8 801223C8 ACA30004 */ sw $v1, 4($a1)
/* B8ACC 801223CC 8E450000 */ lw $a1, ($s2)
/* B8AD0 801223D0 24840001 */ addiu $a0, $a0, 1
/* B8AD4 801223D4 30A20400 */ andi $v0, $a1, 0x400
/* B8AD8 801223D8 144001F6 */ bnez $v0, .L80122BB4
/* B8ADC 801223DC A4C40000 */ sh $a0, ($a2)
/* B8AE0 801223E0 3C028015 */ lui $v0, %hi(entity_fog_enabled)
/* B8AE4 801223E4 8C424378 */ lw $v0, %lo(entity_fog_enabled)($v0)
/* B8AE8 801223E8 10400003 */ beqz $v0, .L801223F8
/* B8AEC 801223EC 0000182D */ daddu $v1, $zero, $zero
/* B8AF0 801223F0 30A20800 */ andi $v0, $a1, 0x800
/* B8AF4 801223F4 2C430001 */ sltiu $v1, $v0, 1
.L801223F8:
/* B8AF8 801223F8 10600005 */ beqz $v1, .L80122410
/* B8AFC 801223FC 24020001 */ addiu $v0, $zero, 1
/* B8B00 80122400 106200C3 */ beq $v1, $v0, .L80122710
/* B8B04 80122404 3C02D9FD */ lui $v0, %hi(D_D9FCFFFF)
/* B8B08 80122408 08048A61 */ j .L80122984
/* B8B0C 8012240C 00000000 */ nop
.L80122410:
/* B8B10 80122410 92420004 */ lbu $v0, 4($s2)
/* B8B14 80122414 2442FFFF */ addiu $v0, $v0, %lo(D_D9FCFFFF)
/* B8B18 80122418 00021600 */ sll $v0, $v0, 0x18
/* B8B1C 8012241C 00021E03 */ sra $v1, $v0, 0x18
/* B8B20 80122420 2C62002D */ sltiu $v0, $v1, 0x2d
/* B8B24 80122424 10400156 */ beqz $v0, .L80122980_B9080
/* B8B28 80122428 00031080 */ sll $v0, $v1, 2
/* B8B2C 8012242C 3C018015 */ lui $at, %hi(jtbl_80150220)
/* B8B30 80122430 00220821 */ addu $at, $at, $v0
/* B8B34 80122434 8C220220 */ lw $v0, %lo(jtbl_80150220)($at)
/* B8B38 80122438 00400008 */ jr $v0
/* B8B3C 8012243C 00000000 */ nop
.L80122440_B8B40:
/* B8B40 80122440 3C03800A */ lui $v1, %hi(gMasterGfxPos)
/* B8B44 80122444 2463A66C */ addiu $v1, $v1, %lo(gMasterGfxPos)
/* B8B48 80122448 8C620000 */ lw $v0, ($v1)
/* B8B4C 8012244C 0040202D */ daddu $a0, $v0, $zero
/* B8B50 80122450 24420008 */ addiu $v0, $v0, 8
/* B8B54 80122454 AC620000 */ sw $v0, ($v1)
/* B8B58 80122458 3C02DE00 */ lui $v0, 0xde00
/* B8B5C 8012245C AC820000 */ sw $v0, ($a0)
/* B8B60 80122460 3C028015 */ lui $v0, %hi(D_8014B7F8)
/* B8B64 80122464 2442B7F8 */ addiu $v0, $v0, %lo(D_8014B7F8)
/* B8B68 80122468 08048A60 */ j .L80122980_B9080
/* B8B6C 8012246C AC820004 */ sw $v0, 4($a0)
.L80122470_B8B70:
/* B8B70 80122470 3C03800A */ lui $v1, %hi(gMasterGfxPos)
/* B8B74 80122474 2463A66C */ addiu $v1, $v1, %lo(gMasterGfxPos)
/* B8B78 80122478 8C620000 */ lw $v0, ($v1)
/* B8B7C 8012247C 0040202D */ daddu $a0, $v0, $zero
/* B8B80 80122480 24420008 */ addiu $v0, $v0, 8
/* B8B84 80122484 AC620000 */ sw $v0, ($v1)
/* B8B88 80122488 3C02DE00 */ lui $v0, 0xde00
/* B8B8C 8012248C AC820000 */ sw $v0, ($a0)
/* B8B90 80122490 3C028015 */ lui $v0, %hi(D_8014B820)
/* B8B94 80122494 2442B820 */ addiu $v0, $v0, %lo(D_8014B820)
/* B8B98 80122498 08048A60 */ j .L80122980_B9080
/* B8B9C 8012249C AC820004 */ sw $v0, 4($a0)
.L801224A0_B8BA0:
/* B8BA0 801224A0 3C03800A */ lui $v1, %hi(gMasterGfxPos)
/* B8BA4 801224A4 2463A66C */ addiu $v1, $v1, %lo(gMasterGfxPos)
/* B8BA8 801224A8 8C620000 */ lw $v0, ($v1)
/* B8BAC 801224AC 0040202D */ daddu $a0, $v0, $zero
/* B8BB0 801224B0 24420008 */ addiu $v0, $v0, 8
/* B8BB4 801224B4 AC620000 */ sw $v0, ($v1)
/* B8BB8 801224B8 3C02DE00 */ lui $v0, 0xde00
/* B8BBC 801224BC AC820000 */ sw $v0, ($a0)
/* B8BC0 801224C0 3C028015 */ lui $v0, %hi(D_8014B848)
/* B8BC4 801224C4 2442B848 */ addiu $v0, $v0, %lo(D_8014B848)
/* B8BC8 801224C8 08048A60 */ j .L80122980_B9080
/* B8BCC 801224CC AC820004 */ sw $v0, 4($a0)
.L801224D0_B8BD0:
/* B8BD0 801224D0 3C03800A */ lui $v1, %hi(gMasterGfxPos)
/* B8BD4 801224D4 2463A66C */ addiu $v1, $v1, %lo(gMasterGfxPos)
/* B8BD8 801224D8 8C620000 */ lw $v0, ($v1)
/* B8BDC 801224DC 0040202D */ daddu $a0, $v0, $zero
/* B8BE0 801224E0 24420008 */ addiu $v0, $v0, 8
/* B8BE4 801224E4 AC620000 */ sw $v0, ($v1)
/* B8BE8 801224E8 3C02DE00 */ lui $v0, 0xde00
/* B8BEC 801224EC AC820000 */ sw $v0, ($a0)
/* B8BF0 801224F0 3C028015 */ lui $v0, %hi(D_8014B870)
/* B8BF4 801224F4 2442B870 */ addiu $v0, $v0, %lo(D_8014B870)
/* B8BF8 801224F8 08048A60 */ j .L80122980_B9080
/* B8BFC 801224FC AC820004 */ sw $v0, 4($a0)
.L80122500_B8C00:
/* B8C00 80122500 3C03800A */ lui $v1, %hi(gMasterGfxPos)
/* B8C04 80122504 2463A66C */ addiu $v1, $v1, %lo(gMasterGfxPos)
/* B8C08 80122508 8C620000 */ lw $v0, ($v1)
/* B8C0C 8012250C 0040202D */ daddu $a0, $v0, $zero
/* B8C10 80122510 24420008 */ addiu $v0, $v0, 8
/* B8C14 80122514 AC620000 */ sw $v0, ($v1)
/* B8C18 80122518 3C02DE00 */ lui $v0, 0xde00
/* B8C1C 8012251C AC820000 */ sw $v0, ($a0)
/* B8C20 80122520 3C028015 */ lui $v0, %hi(D_8014B898)
/* B8C24 80122524 2442B898 */ addiu $v0, $v0, %lo(D_8014B898)
/* B8C28 80122528 08048A60 */ j .L80122980_B9080
/* B8C2C 8012252C AC820004 */ sw $v0, 4($a0)
.L80122530_B8C30:
/* B8C30 80122530 3C03800A */ lui $v1, %hi(gMasterGfxPos)
/* B8C34 80122534 2463A66C */ addiu $v1, $v1, %lo(gMasterGfxPos)
/* B8C38 80122538 8C620000 */ lw $v0, ($v1)
/* B8C3C 8012253C 0040202D */ daddu $a0, $v0, $zero
/* B8C40 80122540 24420008 */ addiu $v0, $v0, 8
/* B8C44 80122544 AC620000 */ sw $v0, ($v1)
/* B8C48 80122548 3C02DE00 */ lui $v0, 0xde00
/* B8C4C 8012254C AC820000 */ sw $v0, ($a0)
/* B8C50 80122550 3C028015 */ lui $v0, %hi(D_8014B9B0)
/* B8C54 80122554 2442B9B0 */ addiu $v0, $v0, %lo(D_8014B9B0)
/* B8C58 80122558 08048A60 */ j .L80122980_B9080
/* B8C5C 8012255C AC820004 */ sw $v0, 4($a0)
.L80122560_B8C60:
/* B8C60 80122560 3C03800A */ lui $v1, %hi(gMasterGfxPos)
/* B8C64 80122564 2463A66C */ addiu $v1, $v1, %lo(gMasterGfxPos)
/* B8C68 80122568 8C620000 */ lw $v0, ($v1)
/* B8C6C 8012256C 0040202D */ daddu $a0, $v0, $zero
/* B8C70 80122570 24420008 */ addiu $v0, $v0, 8
/* B8C74 80122574 AC620000 */ sw $v0, ($v1)
/* B8C78 80122578 3C02DE00 */ lui $v0, 0xde00
/* B8C7C 8012257C AC820000 */ sw $v0, ($a0)
/* B8C80 80122580 3C028015 */ lui $v0, %hi(D_8014B8C0)
/* B8C84 80122584 2442B8C0 */ addiu $v0, $v0, %lo(D_8014B8C0)
/* B8C88 80122588 08048A60 */ j .L80122980_B9080
/* B8C8C 8012258C AC820004 */ sw $v0, 4($a0)
.L80122590_B8C90:
/* B8C90 80122590 3C03800A */ lui $v1, %hi(gMasterGfxPos)
/* B8C94 80122594 2463A66C */ addiu $v1, $v1, %lo(gMasterGfxPos)
/* B8C98 80122598 8C620000 */ lw $v0, ($v1)
/* B8C9C 8012259C 0040202D */ daddu $a0, $v0, $zero
/* B8CA0 801225A0 24420008 */ addiu $v0, $v0, 8
/* B8CA4 801225A4 AC620000 */ sw $v0, ($v1)
/* B8CA8 801225A8 3C02DE00 */ lui $v0, 0xde00
/* B8CAC 801225AC AC820000 */ sw $v0, ($a0)
/* B8CB0 801225B0 3C028015 */ lui $v0, %hi(D_8014B9D8)
/* B8CB4 801225B4 2442B9D8 */ addiu $v0, $v0, %lo(D_8014B9D8)
/* B8CB8 801225B8 08048A60 */ j .L80122980_B9080
/* B8CBC 801225BC AC820004 */ sw $v0, 4($a0)
.L801225C0_B8CC0:
/* B8CC0 801225C0 3C03800A */ lui $v1, %hi(gMasterGfxPos)
/* B8CC4 801225C4 2463A66C */ addiu $v1, $v1, %lo(gMasterGfxPos)
/* B8CC8 801225C8 8C620000 */ lw $v0, ($v1)
/* B8CCC 801225CC 0040202D */ daddu $a0, $v0, $zero
/* B8CD0 801225D0 24420008 */ addiu $v0, $v0, 8
/* B8CD4 801225D4 AC620000 */ sw $v0, ($v1)
/* B8CD8 801225D8 3C02DE00 */ lui $v0, 0xde00
/* B8CDC 801225DC AC820000 */ sw $v0, ($a0)
/* B8CE0 801225E0 3C028015 */ lui $v0, %hi(D_8014B8E8)
/* B8CE4 801225E4 2442B8E8 */ addiu $v0, $v0, %lo(D_8014B8E8)
/* B8CE8 801225E8 08048A60 */ j .L80122980_B9080
/* B8CEC 801225EC AC820004 */ sw $v0, 4($a0)
.L801225F0_B8CF0:
/* B8CF0 801225F0 3C03800A */ lui $v1, %hi(gMasterGfxPos)
/* B8CF4 801225F4 2463A66C */ addiu $v1, $v1, %lo(gMasterGfxPos)
/* B8CF8 801225F8 8C620000 */ lw $v0, ($v1)
/* B8CFC 801225FC 0040202D */ daddu $a0, $v0, $zero
/* B8D00 80122600 24420008 */ addiu $v0, $v0, 8
/* B8D04 80122604 AC620000 */ sw $v0, ($v1)
/* B8D08 80122608 3C02DE00 */ lui $v0, 0xde00
/* B8D0C 8012260C AC820000 */ sw $v0, ($a0)
/* B8D10 80122610 3C028015 */ lui $v0, %hi(D_8014BA00)
/* B8D14 80122614 2442BA00 */ addiu $v0, $v0, %lo(D_8014BA00)
/* B8D18 80122618 08048A60 */ j .L80122980_B9080
/* B8D1C 8012261C AC820004 */ sw $v0, 4($a0)
.L80122620_B8D20:
/* B8D20 80122620 3C03800A */ lui $v1, %hi(gMasterGfxPos)
/* B8D24 80122624 2463A66C */ addiu $v1, $v1, %lo(gMasterGfxPos)
/* B8D28 80122628 8C620000 */ lw $v0, ($v1)
/* B8D2C 8012262C 0040202D */ daddu $a0, $v0, $zero
/* B8D30 80122630 24420008 */ addiu $v0, $v0, 8
/* B8D34 80122634 AC620000 */ sw $v0, ($v1)
/* B8D38 80122638 3C02DE00 */ lui $v0, 0xde00
/* B8D3C 8012263C AC820000 */ sw $v0, ($a0)
/* B8D40 80122640 3C028015 */ lui $v0, %hi(D_8014B988)
/* B8D44 80122644 2442B988 */ addiu $v0, $v0, %lo(D_8014B988)
/* B8D48 80122648 08048A60 */ j .L80122980_B9080
/* B8D4C 8012264C AC820004 */ sw $v0, 4($a0)
.L80122650_B8D50:
/* B8D50 80122650 3C03800A */ lui $v1, %hi(gMasterGfxPos)
/* B8D54 80122654 2463A66C */ addiu $v1, $v1, %lo(gMasterGfxPos)
/* B8D58 80122658 8C620000 */ lw $v0, ($v1)
/* B8D5C 8012265C 0040202D */ daddu $a0, $v0, $zero
/* B8D60 80122660 24420008 */ addiu $v0, $v0, 8
/* B8D64 80122664 AC620000 */ sw $v0, ($v1)
/* B8D68 80122668 3C02DE00 */ lui $v0, 0xde00
/* B8D6C 8012266C AC820000 */ sw $v0, ($a0)
/* B8D70 80122670 3C028015 */ lui $v0, %hi(D_8014BA48)
/* B8D74 80122674 2442BA48 */ addiu $v0, $v0, %lo(D_8014BA48)
/* B8D78 80122678 08048A60 */ j .L80122980_B9080
/* B8D7C 8012267C AC820004 */ sw $v0, 4($a0)
.L80122680_B8D80:
/* B8D80 80122680 3C03800A */ lui $v1, %hi(gMasterGfxPos)
/* B8D84 80122684 2463A66C */ addiu $v1, $v1, %lo(gMasterGfxPos)
/* B8D88 80122688 8C620000 */ lw $v0, ($v1)
/* B8D8C 8012268C 0040202D */ daddu $a0, $v0, $zero
/* B8D90 80122690 24420008 */ addiu $v0, $v0, 8
/* B8D94 80122694 AC620000 */ sw $v0, ($v1)
/* B8D98 80122698 3C02DE00 */ lui $v0, 0xde00
/* B8D9C 8012269C AC820000 */ sw $v0, ($a0)
/* B8DA0 801226A0 3C028015 */ lui $v0, %hi(D_8014BA70)
/* B8DA4 801226A4 2442BA70 */ addiu $v0, $v0, %lo(D_8014BA70)
/* B8DA8 801226A8 08048A60 */ j .L80122980_B9080
/* B8DAC 801226AC AC820004 */ sw $v0, 4($a0)
.L801226B0_B8DB0:
/* B8DB0 801226B0 3C03800A */ lui $v1, %hi(gMasterGfxPos)
/* B8DB4 801226B4 2463A66C */ addiu $v1, $v1, %lo(gMasterGfxPos)
/* B8DB8 801226B8 8C620000 */ lw $v0, ($v1)
/* B8DBC 801226BC 0040202D */ daddu $a0, $v0, $zero
/* B8DC0 801226C0 24420008 */ addiu $v0, $v0, 8
/* B8DC4 801226C4 AC620000 */ sw $v0, ($v1)
/* B8DC8 801226C8 3C02DE00 */ lui $v0, 0xde00
/* B8DCC 801226CC AC820000 */ sw $v0, ($a0)
/* B8DD0 801226D0 3C028015 */ lui $v0, %hi(D_8014BA98)
/* B8DD4 801226D4 2442BA98 */ addiu $v0, $v0, %lo(D_8014BA98)
/* B8DD8 801226D8 08048A60 */ j .L80122980_B9080
/* B8DDC 801226DC AC820004 */ sw $v0, 4($a0)
.L801226E0_B8DE0:
/* B8DE0 801226E0 3C03800A */ lui $v1, %hi(gMasterGfxPos)
/* B8DE4 801226E4 2463A66C */ addiu $v1, $v1, %lo(gMasterGfxPos)
/* B8DE8 801226E8 8C620000 */ lw $v0, ($v1)
/* B8DEC 801226EC 0040202D */ daddu $a0, $v0, $zero
/* B8DF0 801226F0 24420008 */ addiu $v0, $v0, 8
/* B8DF4 801226F4 AC620000 */ sw $v0, ($v1)
/* B8DF8 801226F8 3C02DE00 */ lui $v0, 0xde00
/* B8DFC 801226FC AC820000 */ sw $v0, ($a0)
/* B8E00 80122700 3C028015 */ lui $v0, %hi(D_8014BAE8)
/* B8E04 80122704 2442BAE8 */ addiu $v0, $v0, %lo(D_8014BAE8)
/* B8E08 80122708 08048A60 */ j .L80122980_B9080
/* B8E0C 8012270C AC820004 */ sw $v0, 4($a0)
.L80122710:
/* B8E10 80122710 92420004 */ lbu $v0, 4($s2)
/* B8E14 80122714 2442FFFF */ addiu $v0, $v0, -1
/* B8E18 80122718 00021600 */ sll $v0, $v0, 0x18
/* B8E1C 8012271C 00021E03 */ sra $v1, $v0, 0x18
/* B8E20 80122720 2C620026 */ sltiu $v0, $v1, 0x26
/* B8E24 80122724 10400059 */ beqz $v0, .L8012288C_B8F8C
/* B8E28 80122728 00031080 */ sll $v0, $v1, 2
/* B8E2C 8012272C 3C018015 */ lui $at, %hi(jtbl_801502D8)
/* B8E30 80122730 00220821 */ addu $at, $at, $v0
/* B8E34 80122734 8C2202D8 */ lw $v0, %lo(jtbl_801502D8)($at)
/* B8E38 80122738 00400008 */ jr $v0
/* B8E3C 8012273C 00000000 */ nop
.L80122740_B8E40:
/* B8E40 80122740 3C03800A */ lui $v1, %hi(gMasterGfxPos)
/* B8E44 80122744 2463A66C */ addiu $v1, $v1, %lo(gMasterGfxPos)
/* B8E48 80122748 8C620000 */ lw $v0, ($v1)
/* B8E4C 8012274C 0040202D */ daddu $a0, $v0, $zero
/* B8E50 80122750 24420008 */ addiu $v0, $v0, 8
/* B8E54 80122754 AC620000 */ sw $v0, ($v1)
/* B8E58 80122758 3C02DE00 */ lui $v0, 0xde00
/* B8E5C 8012275C AC820000 */ sw $v0, ($a0)
/* B8E60 80122760 3C028015 */ lui $v0, %hi(D_8014BE78)
/* B8E64 80122764 2442BE78 */ addiu $v0, $v0, %lo(D_8014BE78)
/* B8E68 80122768 08048A23 */ j .L8012288C_B8F8C
/* B8E6C 8012276C AC820004 */ sw $v0, 4($a0)
.L80122770_B8E70:
/* B8E70 80122770 3C03800A */ lui $v1, %hi(gMasterGfxPos)
/* B8E74 80122774 2463A66C */ addiu $v1, $v1, %lo(gMasterGfxPos)
/* B8E78 80122778 8C620000 */ lw $v0, ($v1)
/* B8E7C 8012277C 0040202D */ daddu $a0, $v0, $zero
/* B8E80 80122780 24420008 */ addiu $v0, $v0, 8
/* B8E84 80122784 AC620000 */ sw $v0, ($v1)
/* B8E88 80122788 3C02DE00 */ lui $v0, 0xde00
/* B8E8C 8012278C AC820000 */ sw $v0, ($a0)
/* B8E90 80122790 3C028015 */ lui $v0, %hi(D_8014BEA0)
/* B8E94 80122794 2442BEA0 */ addiu $v0, $v0, %lo(D_8014BEA0)
/* B8E98 80122798 08048A23 */ j .L8012288C_B8F8C
/* B8E9C 8012279C AC820004 */ sw $v0, 4($a0)
.L801227A0_B8EA0:
/* B8EA0 801227A0 3C03800A */ lui $v1, %hi(gMasterGfxPos)
/* B8EA4 801227A4 2463A66C */ addiu $v1, $v1, %lo(gMasterGfxPos)
/* B8EA8 801227A8 8C620000 */ lw $v0, ($v1)
/* B8EAC 801227AC 0040202D */ daddu $a0, $v0, $zero
/* B8EB0 801227B0 24420008 */ addiu $v0, $v0, 8
/* B8EB4 801227B4 AC620000 */ sw $v0, ($v1)
/* B8EB8 801227B8 3C02DE00 */ lui $v0, 0xde00
/* B8EBC 801227BC AC820000 */ sw $v0, ($a0)
/* B8EC0 801227C0 3C028015 */ lui $v0, %hi(D_8014BEC8)
/* B8EC4 801227C4 2442BEC8 */ addiu $v0, $v0, %lo(D_8014BEC8)
/* B8EC8 801227C8 08048A23 */ j .L8012288C_B8F8C
/* B8ECC 801227CC AC820004 */ sw $v0, 4($a0)
.L801227D0_B8ED0:
/* B8ED0 801227D0 3C03800A */ lui $v1, %hi(gMasterGfxPos)
/* B8ED4 801227D4 2463A66C */ addiu $v1, $v1, %lo(gMasterGfxPos)
/* B8ED8 801227D8 8C620000 */ lw $v0, ($v1)
/* B8EDC 801227DC 0040202D */ daddu $a0, $v0, $zero
/* B8EE0 801227E0 24420008 */ addiu $v0, $v0, 8
/* B8EE4 801227E4 AC620000 */ sw $v0, ($v1)
/* B8EE8 801227E8 3C02DE00 */ lui $v0, 0xde00
/* B8EEC 801227EC AC820000 */ sw $v0, ($a0)
/* B8EF0 801227F0 3C028015 */ lui $v0, %hi(D_8014BEF0)
/* B8EF4 801227F4 2442BEF0 */ addiu $v0, $v0, %lo(D_8014BEF0)
/* B8EF8 801227F8 08048A23 */ j .L8012288C_B8F8C
/* B8EFC 801227FC AC820004 */ sw $v0, 4($a0)
.L80122800_B8F00:
/* B8F00 80122800 3C03800A */ lui $v1, %hi(gMasterGfxPos)
/* B8F04 80122804 2463A66C */ addiu $v1, $v1, %lo(gMasterGfxPos)
/* B8F08 80122808 8C620000 */ lw $v0, ($v1)
/* B8F0C 8012280C 0040202D */ daddu $a0, $v0, $zero
/* B8F10 80122810 24420008 */ addiu $v0, $v0, 8
/* B8F14 80122814 AC620000 */ sw $v0, ($v1)
/* B8F18 80122818 3C02DE00 */ lui $v0, 0xde00
/* B8F1C 8012281C AC820000 */ sw $v0, ($a0)
/* B8F20 80122820 3C028015 */ lui $v0, %hi(D_8014BF18)
/* B8F24 80122824 2442BF18 */ addiu $v0, $v0, %lo(D_8014BF18)
/* B8F28 80122828 08048A23 */ j .L8012288C_B8F8C
/* B8F2C 8012282C AC820004 */ sw $v0, 4($a0)
.L80122830_B8F30:
/* B8F30 80122830 3C03800A */ lui $v1, %hi(gMasterGfxPos)
/* B8F34 80122834 2463A66C */ addiu $v1, $v1, %lo(gMasterGfxPos)
/* B8F38 80122838 8C620000 */ lw $v0, ($v1)
/* B8F3C 8012283C 0040202D */ daddu $a0, $v0, $zero
/* B8F40 80122840 24420008 */ addiu $v0, $v0, 8
/* B8F44 80122844 AC620000 */ sw $v0, ($v1)
/* B8F48 80122848 3C02DE00 */ lui $v0, 0xde00
/* B8F4C 8012284C AC820000 */ sw $v0, ($a0)
/* B8F50 80122850 3C028015 */ lui $v0, %hi(D_8014BF40)
/* B8F54 80122854 2442BF40 */ addiu $v0, $v0, %lo(D_8014BF40)
/* B8F58 80122858 08048A23 */ j .L8012288C_B8F8C
/* B8F5C 8012285C AC820004 */ sw $v0, 4($a0)
.L80122860_B8F60:
/* B8F60 80122860 3C03800A */ lui $v1, %hi(gMasterGfxPos)
/* B8F64 80122864 2463A66C */ addiu $v1, $v1, %lo(gMasterGfxPos)
/* B8F68 80122868 8C620000 */ lw $v0, ($v1)
/* B8F6C 8012286C 0040202D */ daddu $a0, $v0, $zero
/* B8F70 80122870 24420008 */ addiu $v0, $v0, 8
/* B8F74 80122874 AC620000 */ sw $v0, ($v1)
/* B8F78 80122878 3C02DE00 */ lui $v0, 0xde00
/* B8F7C 8012287C AC820000 */ sw $v0, ($a0)
/* B8F80 80122880 3C028015 */ lui $v0, %hi(D_8014BF68)
/* B8F84 80122884 2442BF68 */ addiu $v0, $v0, %lo(D_8014BF68)
/* B8F88 80122888 AC820004 */ sw $v0, 4($a0)
.L8012288C_B8F8C:
/* B8F8C 8012288C 3C070001 */ lui $a3, 1
/* B8F90 80122890 3C028015 */ lui $v0, %hi(entity_fog_dist_max)
/* B8F94 80122894 8C424390 */ lw $v0, %lo(entity_fog_dist_max)($v0)
/* B8F98 80122898 3C038015 */ lui $v1, %hi(entity_fog_dist_min)
/* B8F9C 8012289C 8C63438C */ lw $v1, %lo(entity_fog_dist_min)($v1)
/* B8FA0 801228A0 34E7F400 */ ori $a3, $a3, 0xf400
/* B8FA4 801228A4 00431023 */ subu $v0, $v0, $v1
/* B8FA8 801228A8 14400002 */ bnez $v0, .L801228B4
/* B8FAC 801228AC 00E2001A */ div $zero, $a3, $v0
/* B8FB0 801228B0 0007000D */ break 7
.L801228B4:
/* B8FB4 801228B4 2401FFFF */ addiu $at, $zero, -1
/* B8FB8 801228B8 14410004 */ bne $v0, $at, .L801228CC
/* B8FBC 801228BC 3C018000 */ lui $at, 0x8000
/* B8FC0 801228C0 14E10002 */ bne $a3, $at, .L801228CC
/* B8FC4 801228C4 00000000 */ nop
/* B8FC8 801228C8 0006000D */ break 6
.L801228CC:
/* B8FCC 801228CC 00003812 */ mflo $a3
/* B8FD0 801228D0 240501F4 */ addiu $a1, $zero, 0x1f4
/* B8FD4 801228D4 00A32823 */ subu $a1, $a1, $v1
/* B8FD8 801228D8 00052A00 */ sll $a1, $a1, 8
/* B8FDC 801228DC 14400002 */ bnez $v0, .L801228E8
/* B8FE0 801228E0 00A2001A */ div $zero, $a1, $v0
/* B8FE4 801228E4 0007000D */ break 7
.L801228E8:
/* B8FE8 801228E8 2401FFFF */ addiu $at, $zero, -1
/* B8FEC 801228EC 14410004 */ bne $v0, $at, .L80122900
/* B8FF0 801228F0 3C018000 */ lui $at, 0x8000
/* B8FF4 801228F4 14A10002 */ bne $a1, $at, .L80122900
/* B8FF8 801228F8 00000000 */ nop
/* B8FFC 801228FC 0006000D */ break 6
.L80122900:
/* B9000 80122900 00002812 */ mflo $a1
/* B9004 80122904 3C08800A */ lui $t0, %hi(gMasterGfxPos)
/* B9008 80122908 2508A66C */ addiu $t0, $t0, %lo(gMasterGfxPos)
/* B900C 8012290C 8D060000 */ lw $a2, ($t0)
/* B9010 80122910 00C0482D */ daddu $t1, $a2, $zero
/* B9014 80122914 24C60008 */ addiu $a2, $a2, 8
/* B9018 80122918 3C02F800 */ lui $v0, 0xf800
/* B901C 8012291C AD060000 */ sw $a2, ($t0)
/* B9020 80122920 AD220000 */ sw $v0, ($t1)
/* B9024 80122924 3C028015 */ lui $v0, %hi(D_8015437F)
/* B9028 80122928 9042437F */ lbu $v0, %lo(D_8015437F)($v0)
/* B902C 8012292C 3C038015 */ lui $v1, %hi(D_80154383)
/* B9030 80122930 90634383 */ lbu $v1, %lo(D_80154383)($v1)
/* B9034 80122934 3C048015 */ lui $a0, %hi(D_80154387)
/* B9038 80122938 90844387 */ lbu $a0, %lo(D_80154387)($a0)
/* B903C 8012293C 00021600 */ sll $v0, $v0, 0x18
/* B9040 80122940 00031C00 */ sll $v1, $v1, 0x10
/* B9044 80122944 00431025 */ or $v0, $v0, $v1
/* B9048 80122948 00042200 */ sll $a0, $a0, 8
/* B904C 8012294C 3C038015 */ lui $v1, %hi(D_8015438B)
/* B9050 80122950 9063438B */ lbu $v1, %lo(D_8015438B)($v1)
/* B9054 80122954 00441025 */ or $v0, $v0, $a0
/* B9058 80122958 00431025 */ or $v0, $v0, $v1
/* B905C 8012295C AD220004 */ sw $v0, 4($t1)
/* B9060 80122960 24C20008 */ addiu $v0, $a2, 8
/* B9064 80122964 AD020000 */ sw $v0, ($t0)
/* B9068 80122968 3C02DB08 */ lui $v0, 0xdb08
/* B906C 8012296C ACC20000 */ sw $v0, ($a2)
/* B9070 80122970 00073C00 */ sll $a3, $a3, 0x10
/* B9074 80122974 30A5FFFF */ andi $a1, $a1, 0xffff
/* B9078 80122978 00E53825 */ or $a3, $a3, $a1
/* B907C 8012297C ACC70004 */ sw $a3, 4($a2)
.L80122980_B9080:
/* B9080 80122980 3C02D9FD */ lui $v0, 0xd9fd
.L80122984:
/* B9084 80122984 3C06800A */ lui $a2, %hi(gMasterGfxPos)
/* B9088 80122988 24C6A66C */ addiu $a2, $a2, %lo(gMasterGfxPos)
/* B908C 8012298C 3442FFFF */ ori $v0, $v0, 0xffff
/* B9090 80122990 8CC50000 */ lw $a1, ($a2)
/* B9094 80122994 3C048015 */ lui $a0, %hi(entity_fog_enabled)
/* B9098 80122998 8C844378 */ lw $a0, %lo(entity_fog_enabled)($a0)
/* B909C 8012299C 00A0182D */ daddu $v1, $a1, $zero
/* B90A0 801229A0 24A50008 */ addiu $a1, $a1, 8
/* B90A4 801229A4 ACC50000 */ sw $a1, ($a2)
/* B90A8 801229A8 AC620000 */ sw $v0, ($v1)
/* B90AC 801229AC 10800005 */ beqz $a0, .L801229C4
/* B90B0 801229B0 AC600004 */ sw $zero, 4($v1)
/* B90B4 801229B4 8E420000 */ lw $v0, ($s2)
/* B90B8 801229B8 30420800 */ andi $v0, $v0, 0x800
/* B90BC 801229BC 1040000A */ beqz $v0, .L801229E8
/* B90C0 801229C0 3C02FC12 */ lui $v0, 0xfc12
.L801229C4:
/* B90C4 801229C4 3C04FC12 */ lui $a0, 0xfc12
/* B90C8 801229C8 34841824 */ ori $a0, $a0, 0x1824
/* B90CC 801229CC 3C03FF33 */ lui $v1, 0xff33
/* B90D0 801229D0 3463FFFF */ ori $v1, $v1, 0xffff
/* B90D4 801229D4 24A20008 */ addiu $v0, $a1, 8
/* B90D8 801229D8 ACC20000 */ sw $v0, ($a2)
/* B90DC 801229DC ACA40000 */ sw $a0, ($a1)
/* B90E0 801229E0 08048A80 */ j .L80122A00
/* B90E4 801229E4 ACA30004 */ sw $v1, 4($a1)
.L801229E8:
/* B90E8 801229E8 34421E04 */ ori $v0, $v0, 0x1e04
/* B90EC 801229EC 24A30008 */ addiu $v1, $a1, 8
/* B90F0 801229F0 ACC30000 */ sw $v1, ($a2)
/* B90F4 801229F4 ACA20000 */ sw $v0, ($a1)
/* B90F8 801229F8 2402F3F8 */ addiu $v0, $zero, -0xc08
/* B90FC 801229FC ACA20004 */ sw $v0, 4($a1)
.L80122A00:
/* B9100 80122A00 8E42005C */ lw $v0, 0x5c($s2)
/* B9104 80122A04 10400012 */ beqz $v0, .L80122A50
/* B9108 80122A08 3C07D838 */ lui $a3, 0xd838
/* B910C 80122A0C 3C04800A */ lui $a0, %hi(gMasterGfxPos)
/* B9110 80122A10 2484A66C */ addiu $a0, $a0, %lo(gMasterGfxPos)
/* B9114 80122A14 8C830000 */ lw $v1, ($a0)
/* B9118 80122A18 3C028015 */ lui $v0, %hi(D_80154374)
/* B911C 80122A1C 8C424374 */ lw $v0, %lo(D_80154374)($v0)
/* B9120 80122A20 0060282D */ daddu $a1, $v1, $zero
/* B9124 80122A24 24630008 */ addiu $v1, $v1, 8
/* B9128 80122A28 00021080 */ sll $v0, $v0, 2
/* B912C 80122A2C 3042FFFF */ andi $v0, $v0, 0xffff
/* B9130 80122A30 AC830000 */ sw $v1, ($a0)
/* B9134 80122A34 3C03DB06 */ lui $v1, 0xdb06
/* B9138 80122A38 00431025 */ or $v0, $v0, $v1
/* B913C 80122A3C ACA20000 */ sw $v0, ($a1)
/* B9140 80122A40 8E42005C */ lw $v0, 0x5c($s2)
/* B9144 80122A44 3C038000 */ lui $v1, 0x8000
/* B9148 80122A48 00431021 */ addu $v0, $v0, $v1
/* B914C 80122A4C ACA20004 */ sw $v0, 4($a1)
.L80122A50:
/* B9150 80122A50 3C05800A */ lui $a1, %hi(gMasterGfxPos)
/* B9154 80122A54 24A5A66C */ addiu $a1, $a1, %lo(gMasterGfxPos)
/* B9158 80122A58 34E70002 */ ori $a3, $a3, 2
/* B915C 80122A5C 8CA20000 */ lw $v0, ($a1)
/* B9160 80122A60 3C03DE00 */ lui $v1, 0xde00
/* B9164 80122A64 0040302D */ daddu $a2, $v0, $zero
/* B9168 80122A68 24420008 */ addiu $v0, $v0, 8
/* B916C 80122A6C ACA20000 */ sw $v0, ($a1)
/* B9170 80122A70 ACC30000 */ sw $v1, ($a2)
/* B9174 80122A74 8E440014 */ lw $a0, 0x14($s2)
/* B9178 80122A78 24430008 */ addiu $v1, $v0, 8
/* B917C 80122A7C ACA30000 */ sw $v1, ($a1)
/* B9180 80122A80 24030040 */ addiu $v1, $zero, 0x40
/* B9184 80122A84 ACC40004 */ sw $a0, 4($a2)
/* B9188 80122A88 AC430004 */ sw $v1, 4($v0)
/* B918C 80122A8C 3C03E700 */ lui $v1, 0xe700
/* B9190 80122A90 AC470000 */ sw $a3, ($v0)
/* B9194 80122A94 AC430008 */ sw $v1, 8($v0)
/* B9198 80122A98 AC40000C */ sw $zero, 0xc($v0)
/* B919C 80122A9C 8E430000 */ lw $v1, ($s2)
/* B91A0 80122AA0 24420010 */ addiu $v0, $v0, 0x10
/* B91A4 80122AA4 30630200 */ andi $v1, $v1, 0x200
/* B91A8 80122AA8 106000AE */ beqz $v1, .L80122D64
/* B91AC 80122AAC ACA20000 */ sw $v0, ($a1)
/* B91B0 80122AB0 27A40010 */ addiu $a0, $sp, 0x10
/* B91B4 80122AB4 26510018 */ addiu $s1, $s2, 0x18
/* B91B8 80122AB8 0C019D60 */ jal guMtxL2F
/* B91BC 80122ABC 0220282D */ daddu $a1, $s1, $zero
/* B91C0 80122AC0 27B00050 */ addiu $s0, $sp, 0x50
/* B91C4 80122AC4 0C048450 */ jal make_entity_model_mtx_flipZ
/* B91C8 80122AC8 0200202D */ daddu $a0, $s0, $zero
/* B91CC 80122ACC 27A40010 */ addiu $a0, $sp, 0x10
/* B91D0 80122AD0 0200282D */ daddu $a1, $s0, $zero
/* B91D4 80122AD4 0C019D80 */ jal guMtxCatF
/* B91D8 80122AD8 0080302D */ daddu $a2, $a0, $zero
/* B91DC 80122ADC 27A40010 */ addiu $a0, $sp, 0x10
/* B91E0 80122AE0 0C019D40 */ jal guMtxF2L
/* B91E4 80122AE4 0220282D */ daddu $a1, $s1, $zero
/* B91E8 80122AE8 3C040001 */ lui $a0, 1
/* B91EC 80122AEC 34841630 */ ori $a0, $a0, 0x1630
/* B91F0 80122AF0 26450058 */ addiu $a1, $s2, 0x58
/* B91F4 80122AF4 3C028007 */ lui $v0, %hi(gMatrixListPos)
/* B91F8 80122AF8 944241F0 */ lhu $v0, %lo(gMatrixListPos)($v0)
/* B91FC 80122AFC 3C03800A */ lui $v1, %hi(gDisplayContext)
/* B9200 80122B00 8C63A674 */ lw $v1, %lo(gDisplayContext)($v1)
/* B9204 80122B04 00021180 */ sll $v0, $v0, 6
/* B9208 80122B08 00621821 */ addu $v1, $v1, $v0
/* B920C 80122B0C 00641821 */ addu $v1, $v1, $a0
.L80122B10:
/* B9210 80122B10 8E2E0000 */ lw $t6, ($s1)
/* B9214 80122B14 8E2F0004 */ lw $t7, 4($s1)
/* B9218 80122B18 8E380008 */ lw $t8, 8($s1)
/* B921C 80122B1C 8E39000C */ lw $t9, 0xc($s1)
/* B9220 80122B20 AC6E0000 */ sw $t6, ($v1)
/* B9224 80122B24 AC6F0004 */ sw $t7, 4($v1)
/* B9228 80122B28 AC780008 */ sw $t8, 8($v1)
/* B922C 80122B2C AC79000C */ sw $t9, 0xc($v1)
/* B9230 80122B30 26310010 */ addiu $s1, $s1, 0x10
/* B9234 80122B34 1625FFF6 */ bne $s1, $a1, .L80122B10
/* B9238 80122B38 24630010 */ addiu $v1, $v1, 0x10
/* B923C 80122B3C 3C03DA38 */ lui $v1, 0xda38
/* B9240 80122B40 34630002 */ ori $v1, $v1, 2
/* B9244 80122B44 3C080001 */ lui $t0, 1
/* B9248 80122B48 3C06800A */ lui $a2, %hi(gMasterGfxPos)
/* B924C 80122B4C 24C6A66C */ addiu $a2, $a2, %lo(gMasterGfxPos)
/* B9250 80122B50 35081630 */ ori $t0, $t0, 0x1630
/* B9254 80122B54 3C058007 */ lui $a1, %hi(gMatrixListPos)
/* B9258 80122B58 24A541F0 */ addiu $a1, $a1, %lo(gMatrixListPos)
/* B925C 80122B5C 8CC40000 */ lw $a0, ($a2)
/* B9260 80122B60 94A20000 */ lhu $v0, ($a1)
/* B9264 80122B64 0080382D */ daddu $a3, $a0, $zero
/* B9268 80122B68 24840008 */ addiu $a0, $a0, 8
/* B926C 80122B6C ACC40000 */ sw $a0, ($a2)
/* B9270 80122B70 ACE30000 */ sw $v1, ($a3)
/* B9274 80122B74 24430001 */ addiu $v1, $v0, 1
/* B9278 80122B78 3042FFFF */ andi $v0, $v0, 0xffff
/* B927C 80122B7C 00021180 */ sll $v0, $v0, 6
/* B9280 80122B80 A4A30000 */ sh $v1, ($a1)
/* B9284 80122B84 3C03800A */ lui $v1, %hi(gDisplayContext)
/* B9288 80122B88 8C63A674 */ lw $v1, %lo(gDisplayContext)($v1)
/* B928C 80122B8C 00481021 */ addu $v0, $v0, $t0
/* B9290 80122B90 00621821 */ addu $v1, $v1, $v0
/* B9294 80122B94 3C02DE00 */ lui $v0, 0xde00
/* B9298 80122B98 ACE30004 */ sw $v1, 4($a3)
/* B929C 80122B9C AC820000 */ sw $v0, ($a0)
/* B92A0 80122BA0 8E430014 */ lw $v1, 0x14($s2)
/* B92A4 80122BA4 24820008 */ addiu $v0, $a0, 8
/* B92A8 80122BA8 ACC20000 */ sw $v0, ($a2)
/* B92AC 80122BAC 08048B49 */ j .L80122D24
/* B92B0 80122BB0 AC830004 */ sw $v1, 4($a0)
.L80122BB4:
/* B92B4 80122BB4 3C03D9C0 */ lui $v1, 0xd9c0
/* B92B8 80122BB8 3463F9FA */ ori $v1, $v1, 0xf9fa
/* B92BC 80122BBC 3C05D9FF */ lui $a1, 0xd9ff
/* B92C0 80122BC0 34A5FFFF */ ori $a1, $a1, 0xffff
/* B92C4 80122BC4 3C040022 */ lui $a0, 0x22
/* B92C8 80122BC8 34840005 */ ori $a0, $a0, 5
/* B92CC 80122BCC 3C06DC08 */ lui $a2, 0xdc08
/* B92D0 80122BD0 34C6060A */ ori $a2, $a2, 0x60a
/* B92D4 80122BD4 3C07DC08 */ lui $a3, 0xdc08
/* B92D8 80122BD8 34E7090A */ ori $a3, $a3, 0x90a
/* B92DC 80122BDC 3C08D700 */ lui $t0, 0xd700
/* B92E0 80122BE0 35080002 */ ori $t0, $t0, 2
/* B92E4 80122BE4 3C0AE200 */ lui $t2, 0xe200
/* B92E8 80122BE8 354A1E01 */ ori $t2, $t2, 0x1e01
/* B92EC 80122BEC 3C0BE300 */ lui $t3, 0xe300
/* B92F0 80122BF0 356B0A11 */ ori $t3, $t3, 0xa11
/* B92F4 80122BF4 3C090008 */ lui $t1, 8
/* B92F8 80122BF8 35292CF0 */ ori $t1, $t1, 0x2cf0
/* B92FC 80122BFC 25820008 */ addiu $v0, $t4, 8
/* B9300 80122C00 ADA20000 */ sw $v0, ($t5)
/* B9304 80122C04 3C02E700 */ lui $v0, 0xe700
/* B9308 80122C08 AD820000 */ sw $v0, ($t4)
/* B930C 80122C0C 25820010 */ addiu $v0, $t4, 0x10
/* B9310 80122C10 AD800004 */ sw $zero, 4($t4)
/* B9314 80122C14 ADA20000 */ sw $v0, ($t5)
/* B9318 80122C18 25820018 */ addiu $v0, $t4, 0x18
/* B931C 80122C1C AD830008 */ sw $v1, 8($t4)
/* B9320 80122C20 AD80000C */ sw $zero, 0xc($t4)
/* B9324 80122C24 ADA20000 */ sw $v0, ($t5)
/* B9328 80122C28 25820020 */ addiu $v0, $t4, 0x20
/* B932C 80122C2C AD850010 */ sw $a1, 0x10($t4)
/* B9330 80122C30 AD840014 */ sw $a0, 0x14($t4)
/* B9334 80122C34 ADA20000 */ sw $v0, ($t5)
/* B9338 80122C38 3C02DB02 */ lui $v0, 0xdb02
/* B933C 80122C3C AD820018 */ sw $v0, 0x18($t4)
/* B9340 80122C40 24020018 */ addiu $v0, $zero, 0x18
/* B9344 80122C44 AD82001C */ sw $v0, 0x1c($t4)
/* B9348 80122C48 25820028 */ addiu $v0, $t4, 0x28
/* B934C 80122C4C ADA20000 */ sw $v0, ($t5)
/* B9350 80122C50 3C028015 */ lui $v0, %hi(D_8014C270)
/* B9354 80122C54 2442C270 */ addiu $v0, $v0, %lo(D_8014C270)
/* B9358 80122C58 AD820024 */ sw $v0, 0x24($t4)
/* B935C 80122C5C 2442FFF8 */ addiu $v0, $v0, -8
/* B9360 80122C60 AD82002C */ sw $v0, 0x2c($t4)
/* B9364 80122C64 2402FFFF */ addiu $v0, $zero, -1
/* B9368 80122C68 AD860020 */ sw $a2, 0x20($t4)
/* B936C 80122C6C AD870028 */ sw $a3, 0x28($t4)
/* B9370 80122C70 AD880030 */ sw $t0, 0x30($t4)
/* B9374 80122C74 AD820034 */ sw $v0, 0x34($t4)
/* B9378 80122C78 AD8A0038 */ sw $t2, 0x38($t4)
/* B937C 80122C7C AD80003C */ sw $zero, 0x3c($t4)
/* B9380 80122C80 AD8B0040 */ sw $t3, 0x40($t4)
/* B9384 80122C84 AD890044 */ sw $t1, 0x44($t4)
/* B9388 80122C88 8E460014 */ lw $a2, 0x14($s2)
/* B938C 80122C8C 25820030 */ addiu $v0, $t4, 0x30
/* B9390 80122C90 ADA20000 */ sw $v0, ($t5)
/* B9394 80122C94 25820038 */ addiu $v0, $t4, 0x38
/* B9398 80122C98 8CC30000 */ lw $v1, ($a2)
/* B939C 80122C9C 27B000A8 */ addiu $s0, $sp, 0xa8
/* B93A0 80122CA0 ADA20000 */ sw $v0, ($t5)
/* B93A4 80122CA4 AFA30090 */ sw $v1, 0x90($sp)
/* B93A8 80122CA8 8CC30004 */ lw $v1, 4($a2)
/* B93AC 80122CAC 25820040 */ addiu $v0, $t4, 0x40
/* B93B0 80122CB0 ADA20000 */ sw $v0, ($t5)
/* B93B4 80122CB4 AFA30094 */ sw $v1, 0x94($sp)
/* B93B8 80122CB8 94C3000A */ lhu $v1, 0xa($a2)
/* B93BC 80122CBC 25820048 */ addiu $v0, $t4, 0x48
/* B93C0 80122CC0 ADA20000 */ sw $v0, ($t5)
/* B93C4 80122CC4 A7A30098 */ sh $v1, 0x98($sp)
/* B93C8 80122CC8 94C2000E */ lhu $v0, 0xe($a2)
/* B93CC 80122CCC 0200202D */ daddu $a0, $s0, $zero
/* B93D0 80122CD0 A7A2009A */ sh $v0, 0x9a($sp)
/* B93D4 80122CD4 8CC20008 */ lw $v0, 8($a2)
/* B93D8 80122CD8 26450018 */ addiu $a1, $s2, 0x18
/* B93DC 80122CDC 00021023 */ negu $v0, $v0
/* B93E0 80122CE0 00021FC2 */ srl $v1, $v0, 0x1f
/* B93E4 80122CE4 00431021 */ addu $v0, $v0, $v1
/* B93E8 80122CE8 00021043 */ sra $v0, $v0, 1
/* B93EC 80122CEC A7A2009C */ sh $v0, 0x9c($sp)
/* B93F0 80122CF0 8CC2000C */ lw $v0, 0xc($a2)
/* B93F4 80122CF4 240300FF */ addiu $v1, $zero, 0xff
/* B93F8 80122CF8 A3A300A0 */ sb $v1, 0xa0($sp)
/* B93FC 80122CFC 00021FC2 */ srl $v1, $v0, 0x1f
/* B9400 80122D00 00431021 */ addu $v0, $v0, $v1
/* B9404 80122D04 00021043 */ sra $v0, $v0, 1
/* B9408 80122D08 0C019D60 */ jal guMtxL2F
/* B940C 80122D0C A7A2009E */ sh $v0, 0x9e($sp)
/* B9410 80122D10 0000202D */ daddu $a0, $zero, $zero
/* B9414 80122D14 27A50090 */ addiu $a1, $sp, 0x90
/* B9418 80122D18 0080302D */ daddu $a2, $a0, $zero
/* B941C 80122D1C 0C04EBDC */ jal fold_appendGfx_component
/* B9420 80122D20 0200382D */ daddu $a3, $s0, $zero
.L80122D24:
/* B9424 80122D24 3C03D838 */ lui $v1, 0xd838
/* B9428 80122D28 3C04800A */ lui $a0, %hi(gMasterGfxPos)
/* B942C 80122D2C 2484A66C */ addiu $a0, $a0, %lo(gMasterGfxPos)
/* B9430 80122D30 8C820000 */ lw $v0, ($a0)
/* B9434 80122D34 34630002 */ ori $v1, $v1, 2
/* B9438 80122D38 0040282D */ daddu $a1, $v0, $zero
/* B943C 80122D3C 24420008 */ addiu $v0, $v0, 8
/* B9440 80122D40 AC820000 */ sw $v0, ($a0)
/* B9444 80122D44 ACA30000 */ sw $v1, ($a1)
/* B9448 80122D48 24030040 */ addiu $v1, $zero, 0x40
/* B944C 80122D4C ACA30004 */ sw $v1, 4($a1)
/* B9450 80122D50 24430008 */ addiu $v1, $v0, 8
/* B9454 80122D54 AC830000 */ sw $v1, ($a0)
/* B9458 80122D58 3C03E700 */ lui $v1, 0xe700
/* B945C 80122D5C AC430000 */ sw $v1, ($v0)
/* B9460 80122D60 AC400004 */ sw $zero, 4($v0)
.L80122D64:
/* B9464 80122D64 8FBF00F4 */ lw $ra, 0xf4($sp)
/* B9468 80122D68 8FB200F0 */ lw $s2, 0xf0($sp)
/* B946C 80122D6C 8FB100EC */ lw $s1, 0xec($sp)
/* B9470 80122D70 8FB000E8 */ lw $s0, 0xe8($sp)
/* B9474 80122D74 03E00008 */ jr $ra
/* B9478 80122D78 27BD00F8 */ addiu $sp, $sp, 0xf8

View File

@ -815,7 +815,7 @@ segments:
- [0xE4CA0] - [0xE4CA0]
- [0xE4E70, vtx, vtx/stencil2] - [0xE4E70, vtx, vtx/stencil2]
- [0xE4FF0] - [0xE4FF0]
- [0xE5490, data] - [0xE5490, .data, CEE40]
- [0xE5510, .data, d0a70_len_4fe0] - [0xE5510, .data, d0a70_len_4fe0]
- [0xE56C0, .data, hud_element] - [0xE56C0, .data, hud_element]
- [0xE5820, .data, dc470_len_14c0] - [0xE5820, .data, dc470_len_14c0]