3unks the Threequel (#955)

* Fix modern gcc issue with function call arg evaluation order, shiftability issue with heap, other fixes

* cursed function byebye

* configure cleanup

* npc_do_other_npc_collision & func_80244550_A2E790

* wip

* PR comments
This commit is contained in:
Ethan Roseman 2023-02-24 13:02:57 +09:00 committed by GitHub
parent 8f974438a3
commit ba42928a18
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
27 changed files with 589 additions and 1506 deletions

View File

@ -1947,7 +1947,7 @@ typedef struct Effect65FXData {
/* 0x0C8 */ f32 unk_C8[30]; /* 0x0C8 */ f32 unk_C8[30];
/* 0x140 */ f32 unk_140[30]; /* 0x140 */ f32 unk_140[30];
/* 0x1B8 */ s32 unk_1B8[30]; /* 0x1B8 */ s32 unk_1B8[30];
/* 0x230 */ s32 unk_230[30]; /* 0x230 */ s32 unk_230[30]; // a bool
/* 0x2A8 */ s32 unk_2A8; /* 0x2A8 */ s32 unk_2A8;
/* 0x2AC */ f32 unk_2AC[30]; /* 0x2AC */ f32 unk_2AC[30];
} Effect65FXData; // size = 0x324 } Effect65FXData; // size = 0x324

View File

@ -103,7 +103,7 @@ extern s16 D_800A095E;
extern u8 D_800A095F; extern u8 D_800A095F;
extern s32 D_800A0960; extern s32 D_800A0960;
extern s32 D_800A0964; extern s32 D_800A0964;
extern s8 D_800A0B94; extern s8 gNpcPlayerCollisionsEnabled;
extern s16 D_800A0BB8; extern s16 D_800A0BB8;
extern SpriteShadingProfile* gAuxSpriteShadingProfile; extern SpriteShadingProfile* gAuxSpriteShadingProfile;

View File

@ -8,12 +8,6 @@ extern SpriteShadingProfile wSpriteShadingProfileAux;
extern SpriteShadingProfile bSpriteShadingProfileAux; extern SpriteShadingProfile bSpriteShadingProfileAux;
extern s8 D_80159880[0x20]; extern s8 D_80159880[0x20];
extern int ENVIRONMENT;
extern int COMBINED;
extern int COMBINED_ALPHA;
extern int SHADE;
extern int TEXEL0_ALPHA;
void appendGfx_shading_palette(Matrix4f mtx, s32 uls, s32 ult, s32 lrs, s32 lrt, s32 alpha, void appendGfx_shading_palette(Matrix4f mtx, s32 uls, s32 ult, s32 lrs, s32 lrt, s32 alpha,
f32 shadowX, f32 shadowY, f32 shadowZ, f32 shadowX, f32 shadowY, f32 shadowZ,
s32 shadowR, s32 shadowG, s32 shadowB, s32 shadowR, s32 shadowG, s32 shadowB,

View File

@ -93,13 +93,23 @@ void blast_render(EffectInstance* effect) {
} }
#ifdef NON_MATCHING #ifdef NON_MATCHING
void blast_appendGfx(void* effect) { void blast_appendGfx(void *effect) {
Matrix4f sp18, sp58, sp98; Matrix4f sp18;
BlastFXData* data = ((EffectInstance*)effect)->data.blast; Matrix4f sp58;
Gfx* dlist = D_090017B0_37F180; Matrix4f sp98;
s32 unk_20 = data->unk_20; BlastFXData* data;
f32 unk_20f = unk_20; Gfx* dlist;
s32 envAlpha = (unk_20f - unk_20) * 256.0f; f32 unk_20f;
s32 unk_20;
s32 envAlpha;
f32 two_fifty_six;
data = ((EffectInstance*) effect)->data.blast;
dlist = D_090017B0_37F180;
two_fifty_six = 256.0f;
unk_20 = data->unk_20;
unk_20f = unk_20;
envAlpha = (unk_20f - unk_20) * two_fifty_six;
gDPPipeSync(gMasterGfxPos++); gDPPipeSync(gMasterGfxPos++);
gSPSegment(gMasterGfxPos++, 0x09, VIRTUAL_TO_PHYSICAL(((EffectInstance*)effect)->graphics->data)); gSPSegment(gMasterGfxPos++, 0x09, VIRTUAL_TO_PHYSICAL(((EffectInstance*)effect)->graphics->data));
@ -117,6 +127,7 @@ void blast_appendGfx(void* effect) {
gSPMatrix(gMasterGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], gSPMatrix(gMasterGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++],
G_MTX_PUSH | G_MTX_MUL | G_MTX_MODELVIEW); G_MTX_PUSH | G_MTX_MUL | G_MTX_MODELVIEW);
if (data->unk_20 > 4.0f) { if (data->unk_20 > 4.0f) {
gDPSetPrimColor(gMasterGfxPos++, 0, 0, 255, 255, 255, 127); gDPSetPrimColor(gMasterGfxPos++, 0, 0, 255, 255, 255, 127);
} else { } else {

View File

@ -32,14 +32,14 @@ UnkBulbGlow D_E0078918[] = {
s32 D_E00789A8 = 0; s32 D_E00789A8 = 0;
u8 D_E00789AC[] = { Color_RGB8 D_E00789AC[] = {
255, 255, 255, {255, 255, 255},
255, 255, 128, {255, 255, 128},
255, 128, 255, {255, 128, 255},
128, 255, 255, {128, 255, 255},
255, 128, 128, {255, 128, 128},
128, 255, 128, {128, 255, 128},
128, 128, 255, {128, 128, 255},
}; };
void bulb_glow_init(EffectInstance* effect); void bulb_glow_init(EffectInstance* effect);
@ -151,116 +151,142 @@ void bulb_glow_render(EffectInstance* effect) {
void func_E0078274(void) { void func_E0078274(void) {
} }
#define TMEM_ADDR(x) (x / sizeof(u64))
// wip // wip
#ifdef WIP #ifdef WIP
void bulb_glow_appendGfx(void* effect) { void bulb_glow_appendGfx(void* effect) {
f32 sp18; BulbGlowFXData* data = ((EffectInstance*) effect)->data.bulbGlow; //s0
f32 sp1C; f32 centerX;
s32 sp20; f32 centerY;
s32 sp28; s32 xMin;
s32 sp30; s32 numRects;
BulbGlowFXData* data = ((EffectInstance*) effect)->data.bulbGlow; s32 yMin;
s32 unk_10; s32 temp_s2;
s32 unk_00; s32 rectHeight;
s32 glowExtent;
s32 colorScale;
s32 brightness;
s32 xMax;
s32 yMax;
s32 xStart;
s32 isPointVisible;
s32 yStart;
UnkBulbGlow* temp_s1; UnkBulbGlow* temp_s1;
s32 temp_s3; Color_RGB8* temp_v0;
s32 temp_s6;
s32 i; s32 i;
s32 j; s32 j;
s32 r, g, b;
f32 temp_f0; brightness = data->unk_10;
f32 temp_f4; temp_s2 = data->unk_00;
s32 temp_a0_2; if (brightness > 0x7F) {
s32 temp_f6; brightness = 0x7F;
s32 temp_lo;
s32 temp_s0_2;
s32 temp_s2_2;
s32 temp_t0;
s32 temp_t5;
s32 var_t2;
s32 var_t4;
s32 var_t5;
s32 var_t7;
s32 var_v1;
s32 var_v1_2;
u32 temp_t6;
u8* temp_v0;
unk_10 = data->unk_10;
unk_00 = data->unk_00;
if (unk_10 > 127) {
unk_10 = 127;
} }
gDPPipeSync(gMasterGfxPos++); gDPPipeSync(gMasterGfxPos++);
gSPSegment(gMasterGfxPos++, 0x09, VIRTUAL_TO_PHYSICAL(((EffectInstance*)effect)->graphics->data)); gSPSegment(gMasterGfxPos++, 0x09, VIRTUAL_TO_PHYSICAL(((EffectInstance*)effect)->graphics->data));
temp_s1 = &D_E0078918[unk_00]; temp_s1 = &D_E0078918[temp_s2];
temp_s6 = temp_s1->unk_10; glowExtent = temp_s1->unk_10;
temp_s3 = temp_s1->unk_14; rectHeight = temp_s1->unk_14;
var_v1 = shim_is_point_visible(data->pos.x, data->pos.y, data->pos.z, data->unk_1C, &sp18, &sp1C); isPointVisible = shim_is_point_visible(data->pos.x, data->pos.y, data->pos.z, data->unk_1C, &centerX, &centerY);
if (unk_00 == 5) {
var_v1 = 1; // There are 6 UnkStruct entries in the array at E0078918, so this refers to the last one
if (temp_s2 == 5) {
isPointVisible = TRUE;
} }
if ((var_v1 != 0) && !(sp18 < 0.0f) && !(sp1C < 0.0f) && !(sp18 >= 320.0f) && !(sp1C >= 240.0f)) {
u8 r, g, b;
gSPDisplayList(gMasterGfxPos++, D_E0078900[unk_00]); if (!isPointVisible || centerX < 0.0f || centerY < 0.0f || centerX >= SCREEN_WIDTH || centerY >= SCREEN_HEIGHT) {
return;
}
temp_v0 = &D_E00789AC[data->unk_20 * 3]; gSPDisplayList(gMasterGfxPos++, D_E0078900[temp_s2]);
temp_t0 = unk_10 * 2; temp_v0 = &D_E00789AC[data->unk_20];
colorScale = (brightness * 2);
r = temp_v0->r * colorScale / 255;
g = temp_v0->g * colorScale / 255;
b = temp_v0->b * colorScale / 255;
r = temp_v0[0] * temp_t0 / 255; gDPSetPrimColor(gMasterGfxPos++, 0, 0, r, g, b, 0x7F);
g = temp_v0[1] * temp_t0 / 255;
b = temp_v0[2] * temp_t0 / 255;
gDPSetPrimColor(gMasterGfxPos++, 0, 0, r, g, b, 127); // temp_s1 = E0078948
// unk_00 = 64
// unk_04 = 64
// unk_08 = 1.0f
// unk_0C = 1.0f
// unk_10 = 64 (glow_extent)
// unk_14 = 8 (rect_height)
sp20 = sp18 - temp_s6; // x_center = 247
var_t7 = sp20 + temp_s6 * 2; // y_center = 107
temp_f6 = sp1C - temp_s6; // glow_extent = 64
var_t4 = temp_f6 + temp_s6 * 2; // x_min = 183
// x_max = 311
// y_min = 43
// y_max = 171
var_t5 = 0; xMin = centerX - glowExtent;
if (sp20 < 0) { xMax = xMin + glowExtent * 2;
var_t5 = -sp20; yMin = centerY - glowExtent;
} yMax = yMin + glowExtent * 2;
var_v1_2 = 0;
if (temp_f6 < 0) {
var_v1_2 = -temp_f6;
}
if (var_t7 > 320) {
var_t7 = 319;
}
if (var_t4 > 240) {
var_t4 = 239;
}
temp_lo = (s32) (var_t4 - temp_f6) / temp_s3;
for (i = var_v1_2 / temp_s3; i < temp_lo; i++) { xStart = 0;
if ((i + 1) * temp_s3 + temp_f6 >= 240) { if (xMin < 0) {
break; xStart = -xMin;
} }
yStart = 0;
if (yMin < 0) {
yStart = -yMin;
}
if (xMax > SCREEN_WIDTH) {
xMax = SCREEN_WIDTH - 1;
}
if (yMax > SCREEN_HEIGHT) {
yMax = SCREEN_HEIGHT - 1;
}
gDPSetTileSize(gMasterGfxPos++, G_TX_RENDERTILE, numRects = (yMax - yMin) / rectHeight;
(s32) (sp20 * temp_s1->unk_08) * 4,
(s32) (temp_s1->unk_04 * 0x14 - i * temp_s1->unk_14 * temp_s1->unk_0C) * 4,
(s32) (sp20 * temp_s1->unk_08 + temp_s1->unk_00) * 4,
(s32) (temp_s1->unk_04 * 0x15 - i * temp_s1->unk_14 * temp_s1->unk_0C) * 4);
for (j = 0; j < 1; j++) { for (i = yStart / rectHeight; i < numRects && (i + 1) * rectHeight + yMin < SCREEN_HEIGHT; i++) {
gDPLoadMultiTile(gMasterGfxPos++, VIRTUAL_TO_PHYSICAL(nuGfxCfb_ptr + (i * temp_s3 + temp_f6) * 0x280), gDPSetTileSize(gMasterGfxPos++, G_TX_RENDERTILE,
0x0100, 1, G_IM_FMT_RGBA, G_IM_SIZ_16b, 320, 0, sp20 + var_t5, 0, var_t7 - 1, temp_s3 - 1, // uls = 183 << 2
0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, 9, 8, G_TX_NOLOD, G_TX_NOLOD); (s32) (xMin * temp_s1->unk_08) << 2,
gSPTextureRectangle(gMasterGfxPos++, (sp20 + var_t5) * 4, (i * temp_s3 + temp_f6) * 4, var_t7 * 4, ((i + 1) * temp_s3 + temp_f6) * 4, G_TX_RENDERTILE, sp20 + var_t5, 0, 0x0400, 0x0400); // This code is correct due to being masked to 12 bits
gDPPipeSync(gMasterGfxPos++); // However, the wrapping may not be intended from the developer's perspective so it may be a bug
} // ult = (256 << 2, 248 << 2, 240 << 2, ...)
(s32) (temp_s1->unk_04 * 20 - i * temp_s1->unk_14 * temp_s1->unk_0C) << 2,
// lrs = 247 << 2
(s32) (xMin * temp_s1->unk_08 + temp_s1->unk_00) << 2,
// This code is correct as well, same as above
// lrt = (320 << 2, 312 << 2, 304 << 2, ...)
(s32) (temp_s1->unk_04 * 21 - i * temp_s1->unk_14 * temp_s1->unk_0C) << 2);
for (j = 0; j < 1; j++) {
gDPLoadMultiTile(gMasterGfxPos++,
// Offset the image to the rows being loaded
VIRTUAL_TO_PHYSICAL(nuGfxCfb_ptr + (i * rectHeight + yMin) * (SCREEN_WIDTH * sizeof(u16))),
TMEM_ADDR(TMEM_SIZE/2), G_TX_RENDERTILE + 1, G_IM_FMT_RGBA, G_IM_SIZ_16b, SCREEN_WIDTH, 0,
// uls = 183, ult = 0
(xMin + xStart), 0,
// lrs = 311 - 1, lrt = 8 - 1
xMax - 1, rectHeight - 1,
0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, 9, 8, G_TX_NOLOD, G_TX_NOLOD);
gSPTextureRectangle(gMasterGfxPos++,
// xl = 183 << 2, yl = (43 << 2, 51 << 2, 59 << 2, ...)
(xMin + xStart) << 2, (i * rectHeight + yMin) << 2,
// xr = 311 << 2, yh = (51 << 2, 59 << 2, 67 << 2, ...)
xMax << 2, ((i + 1) * rectHeight + yMin) << 2,
G_TX_RENDERTILE,
// s = 183 << 5, t = 0
((xMin + xStart) & 0x1FF) << 5, 0,
1 << 10, 1 << 10);
gDPPipeSync(gMasterGfxPos++);
} }
} }
} }
#else #else
INCLUDE_ASM(s32, "effects/bulb_glow", bulb_glow_appendGfx); INCLUDE_ASM(s32, "effects/bulb_glow", bulb_glow_appendGfx);
#endif #endif

View File

@ -92,14 +92,14 @@ EffectInstance* fx_65_main(
data->pos.z = arg3; data->pos.z = arg3;
for (i = 0; i < ARRAY_COUNT(data->unk_230); i++) { for (i = 0; i < ARRAY_COUNT(data->unk_230); i++) {
data->unk_230[i] = 0; data->unk_230[i] = FALSE;
} }
data->unk_2A8 = 0; data->unk_2A8 = 0;
data->unk_50[0] = arg1; data->unk_50[0] = arg1;
data->unk_C8[0] = arg2; data->unk_C8[0] = arg2;
data->unk_140[0] = arg3; data->unk_140[0] = arg3;
data->unk_230[0] = 1; data->unk_230[0] = TRUE;
data->unk_1B8[0] = 0; data->unk_1B8[0] = 0;
data->unk_2AC[0] = 0; data->unk_2AC[0] = 0;
data->unk_44 = shim_rand_int(30) + 10; data->unk_44 = shim_rand_int(30) + 10;
@ -165,7 +165,7 @@ void fx_65_update(EffectInstance* effect) {
tempY = data->unk_C8[idx]; tempY = data->unk_C8[idx];
tempZ = data->unk_140[idx]; tempZ = data->unk_140[idx];
if ((posX != tempX) || (posY != tempY) || (posZ != tempZ)) { if (posX != tempX || posY != tempY || posZ != tempZ) {
unk_2AC = data->unk_2AC[idx]; unk_2AC = data->unk_2AC[idx];
data->unk_2A8++; data->unk_2A8++;
@ -175,7 +175,7 @@ void fx_65_update(EffectInstance* effect) {
idx = data->unk_2A8; idx = data->unk_2A8;
data->unk_230[idx] = 1; data->unk_230[idx] = TRUE;
data->unk_50[idx] = posX; data->unk_50[idx] = posX;
data->unk_C8[idx] = posY; data->unk_C8[idx] = posY;
data->unk_140[idx] = posZ; data->unk_140[idx] = posZ;
@ -206,42 +206,43 @@ void fx_65_render(EffectInstance* effect) {
// floats and more // floats and more
#ifdef NON_MATCHING #ifdef NON_MATCHING
void fx_65_appendGfx(void* effect) { void fx_65_appendGfx(void* effect) {
Effect65FXData* data = ((EffectInstance*)effect)->data.unk_65; Effect65FXData* data = ((EffectInstance*)effect)->data.unk_65; //s6
Matrix4f sp10; Matrix4f sp10;
f32 padding[2];
s32 sp50; s32 sp50;
s32 sp54; s32 sp54;
f32 sp58; Vtx_t* sp5C;
Gfx* vtxBuffer; Vtx_t* vtx;
s32 sp60; s32 sp60;
s32 sp64; s32 sp64;
s32 sp68; s32 sp68;
s32 idx; f32 temp_f0;
s32 idx2; f32 temp_f20;
f32 posX, posY, posZ; f32 sp58;
f32 deltaX, deltaY;
Vtx_t* vtx;
s32 i;
f32 temp_f22; f32 temp_f22;
f32 temp_f24;
f32 temp_f26;
f32 temp_f28;
f32 temp_f2; f32 temp_f2;
f32 var_f12; f32 var_f12;
f32 var_f20; f32 var_f20;
f32 var_f30; f32 var_f30;
s32 temp_fp; s32 primAlpha;
s32 temp_s1;
s32 temp_s5;
s32 temp_s5_2; s32 temp_s5_2;
s32 temp_v0;
s32 temp_v1_2;
s32 var_fp; s32 var_fp;
s32 vtxG; s32 temp_s1;
s32 var_s1; s32 a;
s32 vtxB; s32 r, g, b;
s32 vtxR;
s32 vtxA;
s32 idx; //s3
s32 next; //v1
s32 prev;
s32 i;
float new_var;
primAlpha = data->unk_24;
sp50 = data->unk_14; sp50 = data->unk_14;
temp_s5 = data->unk_24;
sp54 = data->unk_00; sp54 = data->unk_00;
sp58 = data->unk_34; sp58 = data->unk_34;
@ -257,124 +258,134 @@ void fx_65_appendGfx(void* effect) {
if (sp54 >= 2) { if (sp54 >= 2) {
gDPSetCombineLERP(gMasterGfxPos++, SHADE, ENVIRONMENT, TEXEL0, ENVIRONMENT, TEXEL0, 0, SHADE, 0, 0, 0, 0, COMBINED, COMBINED, 0, PRIMITIVE, 0); gDPSetCombineLERP(gMasterGfxPos++, SHADE, ENVIRONMENT, TEXEL0, ENVIRONMENT, TEXEL0, 0, SHADE, 0, 0, 0, 0, COMBINED, COMBINED, 0, PRIMITIVE, 0);
} }
var_fp = 0;
gDPSetPrimColor(gMasterGfxPos++, 0, 0, data->unk_18, data->unk_1C, data->unk_20, primAlpha);
gDPSetEnvColor(gMasterGfxPos++, data->unk_28, data->unk_2C, data->unk_30, 0);
gSPBranchList(gMasterGfxPos, gMasterGfxPos + 0x79);
sp5C = (Vtx_t*) (gMasterGfxPos + 1);
sp60 = -1; sp60 = -1;
sp64 = (sp50 & 0x3F) << 5; sp64 = (sp50 & 0x3F) << 5;
gDPSetPrimColor(gMasterGfxPos++, 0, 0, data->unk_18, data->unk_1C, data->unk_20, temp_s5); gMasterGfxPos += 0x79;
gDPSetEnvColor(gMasterGfxPos++, data->unk_28, data->unk_2C, data->unk_30, 0);
gSPBranchList(gMasterGfxPos, &gMasterGfxPos[121]);
vtxBuffer = (Vtx_t*) (gMasterGfxPos + 1); // use i in iteration?
gMasterGfxPos = &gMasterGfxPos[121]; var_fp = 0;
for (i = 0; i < 30; i++) {
for (i = 1; i < 30; i++) { s32 a1 = i + 1;
if (data->unk_230[(data->unk_2A8 + i) % 30] != 0) { s32 idx = (data->unk_2A8 + a1) % 30;
var_fp += 1; if (data->unk_230[idx]) {
var_fp++;
} }
} }
temp_fp = var_fp - 1; var_fp--;
i = 0; if (var_fp > 0) {
if (temp_fp > 0) {
sp68 = 0; sp68 = 0;
for (i = 0; i < 30; i++) {
for (; i < 30; i++) { s32 a1 = i + 1;
Vtx_t* vtx = &vtxBuffer[i * 2]; vtx = &sp5C[i * 2];
prev = sp68 / var_fp;
idx2 = (data->unk_2A8 + (i + 1)) % 30; idx = (data->unk_2A8 + a1) % 30;
vtxA = shim_sin_deg((f32) (sp68 / temp_fp)) * 255.0f; a = shim_sin_deg(prev) * 255.0f;
if (vtxA > 200) { if (a > 200) {
vtxA = 200; a = 200;
} }
if (data->unk_230[idx2] != 0) {
if (data->unk_230[idx]) {
if (sp60 == -1) { if (sp60 == -1) {
idx = idx2 + 1; do {
if (idx >= 30) { next = idx + 1;
idx = 0; if (next >= 30) {
} next = 0;
sp60 = i; }
var_f30 = -shim_atan2(data->unk_C8[idx], -data->unk_50[idx], data->unk_C8[idx2], -data->unk_50[idx2]); sp60 = i;
var_f30 = -shim_atan2(data->unk_C8[next], -data->unk_50[next], data->unk_C8[idx], -data->unk_50[idx]);
} while (0); // TODO required to match
} else { } else {
idx = idx2 + 1; if (i != 29) {
if (i != 0x1D) { next = idx + 1;
var_s1 = idx2 - 1; prev = idx - 1;
if (idx >= 30) { if (next >= 30) {
idx = 0; next = 0;
} }
if (var_s1 < 0) { if (prev < 0) {
var_s1 = 29; prev = 29;
} }
var_f20 = -shim_atan2(data->unk_C8[idx], -data->unk_50[idx], data->unk_C8[idx2], -data->unk_50[idx2]); var_f20 = -shim_atan2(data->unk_C8[next], -data->unk_50[next], data->unk_C8[idx], -data->unk_50[idx]);
var_f12 = -shim_atan2(data->unk_C8[idx2], -data->unk_50[idx2], data->unk_C8[var_s1], -data->unk_50[var_s1]); var_f12 = -shim_atan2(data->unk_C8[idx], -data->unk_50[idx], data->unk_C8[prev], -data->unk_50[prev]);
temp_f2 = var_f12 - var_f20; temp_f2 = var_f12 - var_f20;
if (temp_f2 > 180.0f) { if (temp_f2 > 180.0f) {
var_f20 += 360.0f; var_f20 += 360.0f;
} else if (temp_f2 < -180.0f) { } else if (temp_f2 < -180.0f) {
var_f12 += 360.0f; var_f12 += 360.0f;
} }
var_f30 = (f64) (var_f20 + var_f12) * 0.5; var_f30 = (var_f20 + var_f12);
var_f30 *= 0.5;
} }
} }
temp_v1_2 = data->unk_1B8[idx2]; temp_f24 = data->unk_50[idx];
posX = data->unk_50[idx2]; temp_f26 = data->unk_C8[idx];
posY = data->unk_C8[idx2]; temp_f28 = data->unk_140[idx];
posZ = data->unk_140[idx2]; new_var = 24.0f;
temp_s1 = sp50 - temp_v1_2; //temp_v1 = data->unk_1B8[idx];
//temp_f22 = ((shim_sin_deg(((sp50 - (temp_v1_2 * 80)) * 4)) * 3.0f) + 16.0f + temp_s1) * sp58; temp_s1 = sp50 - data->unk_1B8[idx];
temp_f22 = ((shim_sin_deg((sp50 - (temp_v1_2 * 80)) * 4) * 3.0f) + 16.0f) + temp_s1; temp_f22 = (shim_sin_deg((sp50 - data->unk_1B8[idx] * 80) * 4) * 3.0f + 16.0f + temp_s1) * sp58;
temp_f22 = temp_f22 * sp58; temp_s5_2 = sp64;
temp_s5_2 = (data->unk_2AC[idx2] * 24.0f) + sp64; temp_s5_2 = (data->unk_2AC[idx] * new_var) + temp_s5_2;
do { do {} while (0);
vtxR = 0xFF;
vtxG = 0xFF; r = 255;
vtxB = 0xFF - (temp_s1 * 100); g = 255;
if (vtxB < 0) { b = 255 - temp_s1 * 100;
vtxG = ((f32) vtxB * 0.8) + 255.0; if (b < 0) {
vtxB = 0; g = (f32) b * 0.8 + 255.0;
if (vtxG < 0) { b = 0;
vtxR = ((f32) vtxG * 0.4) + 255.0; if (g < 0) {
vtxG = 0; r = (f32) g * 0.4 + 255.0;
if (vtxR < 0) { g = 0;
vtxR = 0; sp54 = r < 0;
} if (sp54) {
r = 0;
} }
} }
} while (0); }
deltaX = temp_f22 * shim_sin_deg(var_f30); temp_f20 = temp_f22 * shim_sin_deg(var_f30);
deltaY = temp_f22 * shim_cos_deg(var_f30); temp_f0 = temp_f22 * shim_cos_deg(var_f30);
sp68 += 180;
vtx->ob[0] = posX + deltaX; vtx->ob[0] = temp_f24 + temp_f20;
vtx->ob[1] = posY + deltaY; vtx->ob[1] = temp_f26 + temp_f0;
vtx->ob[2] = posZ + 0.0f; vtx->ob[2] = temp_f28 + 0.0f;
vtx->tc[0] = temp_s5_2; vtx->tc[0] = temp_s5_2;
vtx->tc[1] = 0x400; vtx->tc[1] = 0x400;
vtx->cn[0] = vtxR; vtx->cn[0] = r;
vtx->cn[1] = vtxG; vtx->cn[1] = g;
vtx->cn[2] = vtxB; vtx->cn[2] = b;
vtx->cn[3] = vtxA; vtx->cn[3] = a;
vtx++; vtx++;
vtx->ob[0] = posX - deltaX; vtx->ob[0] = temp_f24 - temp_f20;
vtx->ob[1] = posY - deltaY; vtx->ob[1] = temp_f26 - temp_f0;
vtx->ob[2] = posZ + 0.0f; vtx->ob[2] = temp_f28 + 0.0f;
vtx->tc[0] = temp_s5_2; vtx->tc[0] = temp_s5_2;
vtx->tc[1] = 0; vtx->tc[1] = 0;
vtx->cn[0] = vtxR; vtx->cn[0] = r;
vtx->cn[1] = vtxG; vtx->cn[1] = g;
vtx->cn[2] = vtxB; vtx->cn[2] = b;
vtx->cn[3] = vtxA; vtx->cn[3] = a;
vtx++; vtx++;
sp68 += 180;
} }
} }
for (i = sp60; i < 29; i++) { for (i = sp60; i < 29; i++) {
gSPVertex(gMasterGfxPos++, &vtxBuffer[i * 4], 4, 0); gSPVertex(gMasterGfxPos++, &sp5C[i * 2], 4, 0);
gSP2Triangles(gMasterGfxPos++, 0, 2, 1, 0, 1, 2, 3, 0); gSP2Triangles(gMasterGfxPos++, 0, 2, 1, 0, 1, 2, 3, 0);
} }
} }
gSPPopMatrix(gMasterGfxPos++, G_MTX_MODELVIEW); gSPPopMatrix(gMasterGfxPos++, G_MTX_MODELVIEW);
} }
#else #else

View File

@ -214,12 +214,12 @@ void lightning_bolt_appendGfx(void* effect) {
gSPMatrix(gMasterGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_LOAD | G_MTX_MODELVIEW); gSPMatrix(gMasterGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
gDPSetPrimColor(gMasterGfxPos++, 0, 0, data->outerColor.r, data->outerColor.g, data->outerColor.b, temp_s3); gDPSetPrimColor(gMasterGfxPos++, 0, 0, data->outerColor.r, data->outerColor.g, data->outerColor.b, temp_s3);
gDPSetEnvColor(gMasterGfxPos++, data->innerColor.r, data->innerColor.g, data->innerColor.b, 0x80); gDPSetEnvColor(gMasterGfxPos++, data->innerColor.r, data->innerColor.g, data->innerColor.b, 128);
gSPDisplayList(gMasterGfxPos++, D_09001000_3BBEA0); gSPDisplayList(gMasterGfxPos++, D_09001000_3BBEA0);
temp_a0 = temp_s7 - 1; temp_a0 = temp_s7 - 1;
if (temp_s6 != 2) { if (temp_s6 != 2) {
if (temp_a0 < 0xB) { if (temp_a0 <= 10) {
var_s2 = &D_E00BCE40[temp_s6][temp_a0]; var_s2 = &D_E00BCE40[temp_s6][temp_a0];
} else { } else {
var_s2 = &D_E00BCE40[temp_s6][10]; var_s2 = &D_E00BCE40[temp_s6][10];
@ -235,7 +235,7 @@ void lightning_bolt_appendGfx(void* effect) {
for (i = 0; i < 12; i++) { for (i = 0; i < 12; i++) {
temp_f24 = (data->endPos.x - data->startPos.x) * (1 / 11.0f); temp_f24 = (data->endPos.x - data->startPos.x) * (1 / 11.0f);
temp_f22 = (data->endPos.y - data->startPos.y) * (1 / 11.0f); temp_f22 = (data->endPos.y - data->startPos.y) * (1 / 11.0f);
temp_f28 = (data->unk_110 + (i - temp_s7) * 0xA) % 120 - 0x3C; temp_f28 = (data->unk_110 + (i - temp_s7) * 10) % 120 - 60;
temp_f26 = var_s2->unk_00[i]; temp_f26 = var_s2->unk_00[i];
temp_f20 = shim_sin_deg(temp_f28) * temp_f26 * 0.04; temp_f20 = shim_sin_deg(temp_f28) * temp_f26 * 0.04;
@ -262,17 +262,20 @@ void lightning_bolt_appendGfx(void* effect) {
var_f22 = -shim_atan2(data->unk_80[1], -data->unk_50[1], data->unk_80[0], -data->unk_50[0]); var_f22 = -shim_atan2(data->unk_80[1], -data->unk_50[1], data->unk_80[0], -data->unk_50[0]);
} else { } else {
temp_fs2 = 8.0f; temp_fs2 = 8.0f;
if (i == 0xB) { if (i == 11) {
var_f22 = -90.0f; var_f22 = -90.0f;
} else { } else {
var_f20 = -shim_atan2(data->unk_80[i + 1], -data->unk_50[i + 1], data->unk_80[i], -data->unk_50[i]); var_f20 = -shim_atan2(data->unk_80[i + 1], -data->unk_50[i + 1], data->unk_80[i], -data->unk_50[i]);
var_f2 = -shim_atan2(data->unk_80[i], -data->unk_50[i], data->unk_80[i - 1], -data->unk_50[i - 1]); var_f2 = -shim_atan2(data->unk_80[i], -data->unk_50[i], data->unk_80[i - 1], -data->unk_50[i - 1]);
if (var_f2 - var_f20 > 180.0f) { var_f22 = var_f2 - var_f20;
if (var_f22 > 180.0f) {
var_f20 += 360.0f; var_f20 += 360.0f;
} else if (var_f2 - var_f20 < -180.0f) { } else if (var_f22 < -180.0f) {
var_f2 += 360.0f; var_f2 += 360.0f;
} }
var_f22 = (var_f20 + var_f2) * 0.5; //var_f22 = (var_f20 + var_f2) * 0.5;
var_f22 = (var_f20 + var_f2);
var_f22 /= 2.0;
} }
} }

View File

@ -1,9 +1,23 @@
#include "common.h" #include "common.h"
#include "effects_internal.h" #include "effects_internal.h"
#include "nu/nusys.h"
s32 D_E00A29D0[] = { 0x09000200, 0x090002A8, 0x09000358 }; s32 D_E00A29D0[] = { 0x09000200, 0x090002A8, 0x09000358 };
s32 D_E00A29DC[] = { 0x00000010, 0x00000010, 0x3F800000, 0x3F800000, 0x00000008, 0x00000008, 0x00000010, 0x00000010, 0x3F800000, 0x3F800000, 0x00000008, 0x00000008, 0x00000010, 0x00000010, 0x3F800000, 0x3F800000, 0x00000008, 0x00000008 }; typedef struct UnkStruct {
/* 0x00 */ s32 unk_00;
/* 0x04 */ s32 unk_04;
/* 0x08 */ f32 unk_08;
/* 0x0C */ f32 unk_0C;
/* 0x10 */ s32 unk_10;
/* 0x14 */ s32 unk_14;
} UnkStruct; // size = 0x18
UnkStruct D_E00A29DC[] = {
{ 16, 16, 1.0f, 1.0f, 8, 8 },
{ 16, 16, 1.0f, 1.0f, 8, 8 },
{ 16, 16, 1.0f, 1.0f, 8, 8 },
};
s32 D_E00A2A24[] = { 100, 60, 30, 10, 0, 0, 0 }; s32 D_E00A2A24[] = { 100, 60, 30, 10, 0, 0, 0 };
@ -105,4 +119,158 @@ void motion_blur_flame_render(EffectInstance* effect) {
void func_E00A2234(void) { void func_E00A2234(void) {
} }
INCLUDE_ASM(s32, "effects/motion_blur_flame", motion_blur_flame_appendGfx); void motion_blur_flame_appendGfx(void* effect) {
MotionBlurFlameFXData* data = ((EffectInstance*)effect)->data.motionBlurFlame;
s32 temp_a2 = data->unk_00;
f32 sp48;
f32 sp4C;
s32 sp50 = data->unk_4C;
UnkStruct* temp_s1 = &D_E00A29DC[temp_a2];
s32 sp54; // declaration must come after sp50
s32 envR, envG, envB;
s32 sp18[4];
f32 sp28[4];
f32 sp38[4];
s32 i;
s32 t3;
s32 v0;
s32 temp_a0;
s32 s3;
s32 temp_v0_2;
s32 temp_v0_3;
s32 temp_v1;
s32 var_a0;
s32 var_a1;
s32 var_a2;
s32 uly;
s32 var_t2_2;
s32 var_t4;
s32 t6;
s32 var_v1;
gDPPipeSync(gMasterGfxPos++);
gSPSegment(gMasterGfxPos++, 0x09, VIRTUAL_TO_PHYSICAL(((EffectInstance*)effect)->graphics->data));
gSPDisplayList(gMasterGfxPos++, D_E00A29D0[temp_a2]);
for (i = 0; i < 4; i++) {
f32 temp_f12 = data->unk_1C[i];
f32 temp_f14 = data->unk_2C[i];
f32 temp_f0 = data->unk_3C[i];
s32 temp_s5 = temp_s1->unk_10;
s32 height = temp_s1->unk_14;
if (i == 0) {
var_a2 = shim_is_point_visible(temp_f12, temp_f14, temp_f0, -1, &sp48, &sp4C);
} else {
var_a2 = temp_f0;
sp48 = temp_f12;
sp4C = temp_f14;
}
sp18[i] = var_a2;
sp28[i] = sp48;
sp38[i] = sp4C;
if ((var_a2 != 0) && !(sp48 < 0.0f) && !(sp4C < 0.0f) && !(sp48 >= 320.0f) && !(sp4C >= 240.0f)) {
temp_a0 = (sp50 * D_E00A2A24[i]) / 100;
temp_v1 = (data->unk_5C * temp_a0) >> 9;
temp_v0_2 = (data->unk_60 * temp_a0) >> 9;
temp_v0_3 = (data->unk_64 * temp_a0) >> 9;
gDPSetPrimColor(gMasterGfxPos++, 0, 0,
(temp_v1 * temp_a0) >> 8,
(temp_v0_2 * temp_a0) >> 8,
(temp_v0_3 * temp_a0) >> 8,
255
);
envR = temp_v1 + 32;
envG = temp_v0_2 + 32;
envB = temp_v0_3 + 32;
if (envR > 127) {
envR = 127;
}
if (envG > 127) {
envG = 127;
}
if (envB > 127) {
envB = 127;
}
gDPSetEnvColor(gMasterGfxPos++, envR, envG, envB, 0);
s3 = sp48 - temp_s5;
t6 = s3 + temp_s5 * 2;
v0 = sp4C - temp_s5;
var_a0 = v0 + 2 * temp_s5;
t3 = uly = sp4C - temp_s5;
if (s3 < 0) {
var_a1 = -s3;
} else {
var_a1 = 0;
}
if (t3 < 0) {
var_v1 = -uly;
} else {
var_v1 = 0;
}
if (t6 > SCREEN_WIDTH) {
t6 = SCREEN_WIDTH - 1;
}
if (var_a0 > SCREEN_HEIGHT) {
var_a0 = SCREEN_HEIGHT - 1;
}
var_t2_2 = var_v1 / height;
sp54 = (var_a0 - t3) / height;
while (var_t2_2 < sp54) {
uly = t3 + var_t2_2 * height;
if (uly + height >= SCREEN_HEIGHT) {
break;
}
gDPSetTileSize(gMasterGfxPos++, G_TX_RENDERTILE,
(s32) (s3 * temp_s1->unk_08) * 4,
(s32) (temp_s1->unk_04 * 20 - var_t2_2 * temp_s1->unk_14 * temp_s1->unk_0C) * 4,
(s32) (s3 * temp_s1->unk_08 + temp_s1->unk_00) * 4,
(s32) (temp_s1->unk_04 * 21 - var_t2_2 * temp_s1->unk_14 * temp_s1->unk_0C) * 4);
for (var_t4 = 0; var_t4 < 2; var_t4++) {
gDPLoadMultiTile(gMasterGfxPos++, VIRTUAL_TO_PHYSICAL(nuGfxCfb_ptr + uly * SCREEN_WIDTH),
0x0100, 1, G_IM_FMT_RGBA, G_IM_SIZ_16b, SCREEN_WIDTH, SCREEN_HEIGHT,
s3 + var_a1,
0,
t6 - 1,
height - 1,
0,
G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, 9, 8, G_TX_NOLOD, G_TX_NOLOD
);
gSPTextureRectangle(gMasterGfxPos++,
(s3 + var_a1) * 4,
uly * 4,
t6 * 4,
(uly + height) * 4,
G_TX_RENDERTILE,
((u32) (s3 + var_a1) % 0x200) * 32,
0,
0x0400,
0x0400
);
gDPPipeSync(gMasterGfxPos++);
}
var_t2_2++;
}
}
}
for (i = 0; i < ARRAY_COUNT(data->unk_3C) - 1; i++) {
data->unk_3C[i + 1] = sp18[i];
data->unk_1C[i + 1] = sp28[i];
data->unk_2C[i + 1] = sp38[i];
}
}

136
src/npc.c
View File

@ -65,7 +65,7 @@ void clear_npcs(void) {
} }
gNpcCount = 0; gNpcCount = 0;
D_800A0B94 = 1; gNpcPlayerCollisionsEnabled = TRUE;
} }
void init_npc_list(void) { void init_npc_list(void) {
@ -76,7 +76,7 @@ void init_npc_list(void) {
} }
gNpcCount = 0; gNpcCount = 0;
D_800A0B94 = 1; gNpcPlayerCollisionsEnabled = TRUE;
} }
void npc_iter_no_op(void) { void npc_iter_no_op(void) {
@ -381,15 +381,9 @@ void npc_do_world_collision(Npc* npc) {
} }
} }
// float regalloc :(
#ifdef NON_MATCHING
void npc_do_other_npc_collision(Npc* npc) { void npc_do_other_npc_collision(Npc* npc) {
Npc* otherNpc; Npc* otherNpc;
f32 temp_f20_2; f32 angle;
f32 temp_f22_3;
f32 temp_f24_2;
f32 temp_f22_4;
f32 temp_f2;
f32 thisX, thisY, thisZ; f32 thisX, thisY, thisZ;
f32 thisBuf; f32 thisBuf;
f32 otherX, otherZ; f32 otherX, otherZ;
@ -406,7 +400,7 @@ void npc_do_other_npc_collision(Npc* npc) {
thisY = npc->pos.y; thisY = npc->pos.y;
thisZ = npc->pos.z; thisZ = npc->pos.z;
for (i = 0; i < 0x40; i++) { for (i = 0; i < MAX_NPCS; i++) {
otherNpc = get_npc_by_index(i); otherNpc = get_npc_by_index(i);
if (otherNpc != NULL && npc != otherNpc) { if (otherNpc != NULL && npc != otherNpc) {
if (otherNpc->flags != 0 && !(otherNpc->flags & (NPC_FLAG_SUSPENDED | NPC_FLAG_IGNORE_PLAYER_COLLISION))) { if (otherNpc->flags != 0 && !(otherNpc->flags & (NPC_FLAG_SUSPENDED | NPC_FLAG_IGNORE_PLAYER_COLLISION))) {
@ -414,8 +408,8 @@ void npc_do_other_npc_collision(Npc* npc) {
!(thisY + npc->collisionHeight < otherNpc->pos.y)) !(thisY + npc->collisionHeight < otherNpc->pos.y))
{ {
otherX = otherNpc->pos.x; otherX = otherNpc->pos.x;
otherZ = otherNpc->pos.z;
xDiff = otherX - thisX; xDiff = otherX - thisX;
otherZ = otherNpc->pos.z;
zDiff = otherZ - thisZ; zDiff = otherZ - thisZ;
otherBuf = otherNpc->collisionRadius * 0.5f; otherBuf = otherNpc->collisionRadius * 0.5f;
dist = sqrtf(SQ(xDiff) + SQ(zDiff)); dist = sqrtf(SQ(xDiff) + SQ(zDiff));
@ -424,17 +418,19 @@ void npc_do_other_npc_collision(Npc* npc) {
collision = FALSE; collision = FALSE;
if (npc->flags & NPC_FLAG_PARTNER) { if (npc->flags & NPC_FLAG_PARTNER) {
collision = gPartnerActionStatus.partnerActionState == PARTNER_ACTION_NONE; collision = gPartnerActionStatus.partnerActionState == PARTNER_ACTION_NONE;
} else if (!(otherNpc->flags & NPC_FLAG_PARTNER) || gPartnerActionStatus.partnerActionState == PARTNER_ACTION_NONE) { } else if (!(otherNpc->flags & NPC_FLAG_PARTNER) ||
gPartnerActionStatus.partnerActionState == PARTNER_ACTION_NONE)
{
collision = TRUE; collision = TRUE;
} }
if (collision) { if (collision) {
temp_f20_2 = DEG_TO_RAD(atan2(otherX, otherZ, thisX, thisZ)); angle = DEG_TO_RAD(atan2(otherX, otherZ, thisX, thisZ));
temp_f24_2 = thisBuf + otherBuf - dist; dist = (thisBuf + otherBuf) - dist;
temp_f22_3 = temp_f24_2 * sin_rad(temp_f20_2); xDiff = dist * sin_rad(angle);
temp_f22_4 = -temp_f24_2 * cos_rad(temp_f20_2); zDiff = -dist * cos_rad(angle);
thisX += temp_f22_3 * 0.1f; thisX += xDiff * 0.1f;
thisZ += temp_f22_4 * 0.1f; thisZ += zDiff * 0.1f;
} }
npc->flags |= NPC_FLAG_COLLIDING_WITH_NPC; npc->flags |= NPC_FLAG_COLLIDING_WITH_NPC;
} }
@ -446,11 +442,103 @@ void npc_do_other_npc_collision(Npc* npc) {
npc->pos.z = thisZ; npc->pos.z = thisZ;
} }
} }
#else
INCLUDE_ASM(void, "npc", npc_do_other_npc_collision, Npc* npc);
#endif
// float regalloc
#ifdef NON_MATCHING
s32 npc_do_player_collision(Npc* npc) {
PlayerStatus* playerStatus = &gPlayerStatus;
f32 xDiff, zDiff;
f32 npcColliderX, npcColliderZ;
f32 playerX, playerZ;
f32 tempX, tempZ;
f32 temp_f0;
f32 temp_f22_2;
f32 temp_f24;
f32 temp_f24_2;
f32 temp_f28;
if (npc->flags & NPC_FLAG_IGNORE_PLAYER_COLLISION) {
return FALSE;
}
if (npc->flags & PS_FLAG_CAMERA_DOESNT_FOLLOW) {
return FALSE;
}
if (!gNpcPlayerCollisionsEnabled) {
return FALSE;
}
if (playerStatus->position.y + playerStatus->colliderHeight < npc->pos.y) {
return FALSE;
}
if (npc->pos.y + npc->collisionHeight < playerStatus->position.y) {
return FALSE;
}
playerX = playerStatus->position.x;
playerZ = playerStatus->position.z;
tempX = npc->pos.x;
tempZ = npc->pos.z;
xDiff = playerX - tempX;
zDiff = playerZ - tempZ;
temp_f22_2 = (npc->collisionRadius / 2) + (f32)(playerStatus->colliderDiameter / 2);
if (temp_f22_2 < sqrtf(SQ(xDiff) + SQ(zDiff))) {
return FALSE;
}
playerStatus->animFlags |= 0x8000;
//playerX = playerStatus->position.x;
npcColliderX = npc->colliderPos.x;
npcColliderZ = npc->colliderPos.z;
tempX = playerX - npcColliderX;
tempZ = playerZ - npcColliderZ;
//temp_f24 = sqrtf(SQ(tempX) + SQ(tempZ));
xDiff = tempZ;
temp_f24 = sqrtf((tempX * tempX) + (xDiff * xDiff));
temp_f0 = atan2(playerX, playerZ, npcColliderX, npcColliderZ);
temp_f28 = playerStatus->targetYaw;
temp_f24_2 = temp_f22_2 - temp_f24;
temp_f24 = temp_f24_2 * sin_rad(DEG_TO_RAD(temp_f0));
playerZ = -temp_f24_2 * cos_rad(DEG_TO_RAD(temp_f0));
if (playerStatus->animFlags & PA_FLAG_RIDING_PARTNER) {
if (fabsf(get_clamped_angle_diff(temp_f0, temp_f28)) < 45.0f) {
playerStatus->position.x -= temp_f24;
playerStatus->position.z -= playerZ;
wPartnerNpc->pos.x -= temp_f24;
wPartnerNpc->pos.z -= playerZ;
} else {
playerStatus->position.x -= temp_f24 * 0.5f;
playerStatus->position.z -= playerZ * 0.5f;
wPartnerNpc->pos.x -= temp_f24 * 0.5f;
wPartnerNpc->pos.z -= playerZ * 0.5f;
}
} else {
if (playerStatus->flags & (PS_FLAG_JUMPING | PS_FLAG_FALLING)) {
playerStatus->position.x -= temp_f24 * 0.4f;
playerStatus->position.z -= playerZ * 0.4f;
} else if (fabsf(get_clamped_angle_diff(temp_f0, temp_f28)) < 45.0f) {
playerStatus->position.x -= temp_f24;
playerStatus->position.z -= playerZ;
} else {
playerStatus->position.x -= temp_f24 * 0.5f;
playerStatus->position.z -= playerZ * 0.5f;
}
}
npc->pos.x = npc->colliderPos.x;
npc->pos.y = npc->colliderPos.y;
npc->pos.z = npc->colliderPos.z;
return TRUE;
}
#else
INCLUDE_ASM(s32, "npc", npc_do_player_collision, Npc* npc); INCLUDE_ASM(s32, "npc", npc_do_player_collision, Npc* npc);
#endif
void npc_do_gravity(Npc* npc) { void npc_do_gravity(Npc* npc) {
if (npc->flags & NPC_FLAG_GRAVITY) { if (npc->flags & NPC_FLAG_GRAVITY) {
@ -857,7 +945,7 @@ void render_npcs(void) {
for (i = 0; i < MAX_NPCS; i++) { for (i = 0; i < MAX_NPCS; i++) {
Npc* npc = (*gCurrentNpcListPtr)[i]; Npc* npc = (*gCurrentNpcListPtr)[i];
if ((npc != NULL) if ((npc != NULL)
&& (npc->flags != 0) && (npc->flags != 0)
&& !(npc->flags & (NPC_FLAG_SUSPENDED | NPC_FLAG_HAS_NO_SPRITE | NPC_FLAG_INACTIVE | NPC_FLAG_INVISIBLE)) && !(npc->flags & (NPC_FLAG_SUSPENDED | NPC_FLAG_HAS_NO_SPRITE | NPC_FLAG_INACTIVE | NPC_FLAG_INVISIBLE))
) { ) {
@ -1105,11 +1193,11 @@ void appendGfx_npc_blur(void* data) {
} }
void npc_enable_collisions(void) { void npc_enable_collisions(void) {
D_800A0B94 = 1; gNpcPlayerCollisionsEnabled = TRUE;
} }
void npc_disable_collisions(void) { void npc_disable_collisions(void) {
D_800A0B94 = 0; gNpcPlayerCollisionsEnabled = FALSE;
} }
void func_8003B1A8(void) { void func_8003B1A8(void) {

View File

@ -1770,11 +1770,14 @@ API_CALLABLE(N(ForceStarRodAlwaysFaceCamera)) {
return ApiStatus_BLOCK; return ApiStatus_BLOCK;
} }
#ifdef NON_MATCHING
API_CALLABLE(func_80244550_A2E790) { API_CALLABLE(func_80244550_A2E790) {
Npc* kammy = resolve_npc(script, NPC_Kammy); Npc* kammy = resolve_npc(script, NPC_Kammy);
EffectInstance* effect = evt_get_variable(script, ArrayVar(0)); EffectInstance* effect = (EffectInstance*) evt_get_variable(script, ArrayVar(0));
Npc* npc2;
f32 x, y, z; f32 x, y, z;
f32* x2;
f32* y2;
f32* z2;
s32 i; s32 i;
if (isInitialCall) { if (isInitialCall) {
@ -1783,40 +1786,42 @@ API_CALLABLE(func_80244550_A2E790) {
N(D_8024F304) = kammy->pos.z; N(D_8024F304) = kammy->pos.z;
for (i = NPC_Eldstar; i < ARRAY_COUNT(N(StarSpiritsPosX)); i++) { for (i = NPC_Eldstar; i < ARRAY_COUNT(N(StarSpiritsPosX)); i++) {
Npc* npc2 = resolve_npc(script, i); npc2 = resolve_npc(script, i);
N(StarSpiritsPosX)[i] = npc2->pos.x; N(StarSpiritsPosX)[i] = npc2->pos.x;
N(StarSpiritsPosY)[i] = npc2->pos.y; N(StarSpiritsPosY)[i] = npc2->pos.y;
N(StarSpiritsPosZ)[i] = npc2->pos.z; N(StarSpiritsPosZ)[i] = npc2->pos.z;
} }
N(D_8024F308) = effect->data.somethingRotating->unk_04; N(D_8024F308) = effect->data.somethingRotating->pos.x;
N(D_8024F30C) = effect->data.somethingRotating->unk_08; N(D_8024F30C) = effect->data.somethingRotating->pos.y;
N(D_8024F310) = effect->data.somethingRotating->unk_0C; N(D_8024F310) = effect->data.somethingRotating->pos.z;
} }
x = kammy->pos.x - N(D_8024F2FC); x = kammy->pos.x - N(D_8024F2FC);
y = kammy->pos.y - N(D_8024F300); y = kammy->pos.y - N(D_8024F300);
z = kammy->pos.z - N(D_8024F304); z = kammy->pos.z - N(D_8024F304);
for (i = 0; i < ARRAY_COUNT(N(StarSpiritsPosX)); i++) { i = 0;
Npc* npc2 = resolve_npc(script, i); z2 = N(StarSpiritsPosZ);
y2 = N(StarSpiritsPosY);
x2 = N(StarSpiritsPosX);
for (; i < ARRAY_COUNT(N(StarSpiritsPosX)); ) {
npc2 = resolve_npc(script, i);
i++;
npc2->pos.x = *x2++ + x;
npc2->pos.y = *y2++ + y;
npc2->pos.z = *z2++ + z;
npc2->pos.x = N(StarSpiritsPosX)[i] + x;
npc2->pos.y = N(StarSpiritsPosY)[i] + y;
npc2->pos.z = N(StarSpiritsPosZ)[i] + z;
npc2->colliderPos.x = npc2->pos.x; npc2->colliderPos.x = npc2->pos.x;
npc2->colliderPos.y = npc2->pos.y; npc2->colliderPos.y = npc2->pos.y;
npc2->colliderPos.z = npc2->pos.z; npc2->colliderPos.z = npc2->pos.z;
} }
effect->data.somethingRotating->unk_04 = N(D_8024F308) + x;
effect->data.somethingRotating->unk_08 = N(D_8024F30C) + y; effect->data.somethingRotating->pos.x = N(D_8024F308) + x;
effect->data.somethingRotating->unk_0C = N(D_8024F310) + z; effect->data.somethingRotating->pos.y = N(D_8024F30C) + y;
effect->data.somethingRotating->pos.z = N(D_8024F310) + z;
return ApiStatus_BLOCK; return ApiStatus_BLOCK;
} }
#else
API_CALLABLE(func_80244550_A2E790);
INCLUDE_ASM(s32, "world/area_hos/hos_05/A2AAC0", func_80244550_A2E790);
#endif
extern EvtScript N(EVS_Scene_IntroStory); extern EvtScript N(EVS_Scene_IntroStory);

View File

@ -174,7 +174,7 @@ API_CALLABLE(func_80282E30) {
zThing /= BLOCK_GRID_SIZE; zThing /= BLOCK_GRID_SIZE;
varX = xThing; varX = xThing;
varZ = zThing; varZ = entityZ = zThing;
xThing *= BLOCK_GRID_SIZE; xThing *= BLOCK_GRID_SIZE;
yThing *= BLOCK_GRID_SIZE; yThing *= BLOCK_GRID_SIZE;
@ -188,15 +188,14 @@ API_CALLABLE(func_80282E30) {
script->varTable[4] = yThing = entity->position.y; script->varTable[4] = yThing = entity->position.y;
script->varTable[5] = entityZ = entity->position.z; script->varTable[5] = entityZ = entity->position.z;
xThing = (xThing - grid->centerPos.x); xThing = xThing - grid->centerPos.x;
entityZ = entityZ - grid->centerPos.z;
xThing /= BLOCK_GRID_SIZE; xThing /= BLOCK_GRID_SIZE;
var_a1 = xThing - varX; var_a1 = xThing - varX;
entityZ = (entityZ - grid->centerPos.z);
entityZ /= BLOCK_GRID_SIZE; entityZ /= BLOCK_GRID_SIZE;
var_a0_2 = entityZ - varZ; var_a0_2 = entityZ - varZ;
if (var_a1 != 0 && var_a0_2 != 0) { if (var_a1 != 0 && var_a0_2 != 0) {
var_a0_2 = 0; var_a0_2 = var_a1 = 0;
var_a1 = 0;
} }
script->varTable[6] = var_a1; script->varTable[6] = var_a1;
script->varTable[7] = 0; script->varTable[7] = 0;
@ -250,14 +249,14 @@ API_CALLABLE(CanPlayerPushBlock) {
if ((gCollisionStatus.pushingAgainstWall == blockCollider) if ((gCollisionStatus.pushingAgainstWall == blockCollider)
&& (playerStatus->actionState == ACTION_STATE_PUSHING_BLOCK && (playerStatus->actionState == ACTION_STATE_PUSHING_BLOCK
|| playerStatus->actionState == ACTION_STATE_WALK || playerStatus->actionState == ACTION_STATE_WALK
|| playerStatus->actionState == ACTION_STATE_RUN) || playerStatus->actionState == ACTION_STATE_RUN)
&& !(playerStatus->animFlags & PA_FLAG_USING_WATT)) && !(playerStatus->animFlags & PA_FLAG_USING_WATT))
{ {
script->varTable[13] = TRUE; script->varTable[13] = TRUE;
} else { } else {
script->varTable[13] = FALSE; script->varTable[13] = FALSE;
} }
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }

View File

@ -62,7 +62,9 @@ def write_ninja_rules(ninja: ninja_syntax.Writer, cpp: str, extra_cppflags: str,
"-DVERSION=$version -DF3DEX_GBI_2 -D_MIPS_SZLONG=32 -nostdinc" "-DVERSION=$version -DF3DEX_GBI_2 -D_MIPS_SZLONG=32 -nostdinc"
cflags = f"-c -G0 -O2 -gdwarf-2 -x c -B {BUILD_TOOLS}/cc/gcc/ {extra_cflags}" cflags = f"-c -G0 -O2 -gdwarf-2 -x c -B {BUILD_TOOLS}/cc/gcc/ {extra_cflags}"
cflags_modern = f"-c -G0 -O2 -gdwarf-2 -fno-builtin-bcopy -fno-tree-loop-distribute-patterns -funsigned-char -mgp32 -mfp32 -mabi=32 -mfix4300 -march=vr4300 -mno-gpopt -fno-toplevel-reorder -mno-abicalls -fno-pic -fno-exceptions -fno-stack-protector -fno-zero-initialized-in-bss -Wno-builtin-declaration-mismatch -x c {extra_cflags}" cflags_modern = f"-c -G0 -O2 -gdwarf-2 -fno-builtin-bcopy -fno-tree-loop-distribute-patterns -funsigned-char -mgp32 -mfp32 -mabi=32 -mfix4300 -march=vr4300 -mno-gpopt -fno-toplevel-reorder -mno-abicalls -fno-pic -fno-exceptions -fno-stack-protector -fno-zero-initialized-in-bss -Wno-builtin-declaration-mismatch -x c {extra_cflags}"
cflags_272 = f"-c -G0 -mgp32 -mfp32 -mips3 {extra_cflags}" cflags_272 = f"-c -G0 -mgp32 -mfp32 -mips3 {extra_cflags}"
cflags_272 = cflags_272.replace("-ggdb3","-g1") cflags_272 = cflags_272.replace("-ggdb3","-g1")

View File

@ -436,7 +436,7 @@ dlabel gBattleNpcList
dlabel gCurrentNpcListPtr dlabel gCurrentNpcListPtr
.space 4 .space 4
dlabel D_800A0B94 dlabel gNpcPlayerCollisionsEnabled
.space 4 .space 4
dlabel D_800A0B98 dlabel D_800A0B98

View File

@ -1,192 +0,0 @@
.set noat /* allow manual use of $at */
.set noreorder /* don't insert nops after branches */
/* Generated by spimdisasm 1.11.1 */
glabel npc_do_other_npc_collision
/* 13ABC 800386BC 27BDFFA0 */ addiu $sp, $sp, -0x60
/* 13AC0 800386C0 AFB1001C */ sw $s1, 0x1C($sp)
/* 13AC4 800386C4 0080882D */ daddu $s1, $a0, $zero
/* 13AC8 800386C8 AFBF0028 */ sw $ra, 0x28($sp)
/* 13ACC 800386CC AFB30024 */ sw $s3, 0x24($sp)
/* 13AD0 800386D0 AFB20020 */ sw $s2, 0x20($sp)
/* 13AD4 800386D4 AFB00018 */ sw $s0, 0x18($sp)
/* 13AD8 800386D8 F7BE0058 */ sdc1 $f30, 0x58($sp)
/* 13ADC 800386DC F7BC0050 */ sdc1 $f28, 0x50($sp)
/* 13AE0 800386E0 F7BA0048 */ sdc1 $f26, 0x48($sp)
/* 13AE4 800386E4 F7B80040 */ sdc1 $f24, 0x40($sp)
/* 13AE8 800386E8 F7B60038 */ sdc1 $f22, 0x38($sp)
/* 13AEC 800386EC F7B40030 */ sdc1 $f20, 0x30($sp)
/* 13AF0 800386F0 8E230000 */ lw $v1, 0x0($s1)
/* 13AF4 800386F4 30620100 */ andi $v0, $v1, 0x100
/* 13AF8 800386F8 14400096 */ bnez $v0, .LIQUE_80038954
/* 13AFC 800386FC 3C02FDFF */ lui $v0, (0xFDFFFFFF >> 16)
/* 13B00 80038700 3442FFFF */ ori $v0, $v0, (0xFDFFFFFF & 0xFFFF)
/* 13B04 80038704 0000902D */ daddu $s2, $zero, $zero
/* 13B08 80038708 3C130400 */ lui $s3, (0x4000000 >> 16)
/* 13B0C 8003870C C63E0038 */ lwc1 $f30, 0x38($s1)
/* 13B10 80038710 C626003C */ lwc1 $f6, 0x3C($s1)
/* 13B14 80038714 3C013F00 */ lui $at, (0x3F000000 >> 16)
/* 13B18 80038718 44811000 */ mtc1 $at, $f2
/* 13B1C 8003871C 00621024 */ and $v0, $v1, $v0
/* 13B20 80038720 E7A60010 */ swc1 $f6, 0x10($sp)
/* 13B24 80038724 AE220000 */ sw $v0, 0x0($s1)
/* 13B28 80038728 862200A6 */ lh $v0, 0xA6($s1)
/* 13B2C 8003872C C63C0040 */ lwc1 $f28, 0x40($s1)
/* 13B30 80038730 44820000 */ mtc1 $v0, $f0
/* 13B34 80038734 00000000 */ nop
/* 13B38 80038738 46800020 */ cvt.s.w $f0, $f0
/* 13B3C 8003873C 46020002 */ mul.s $f0, $f0, $f2
/* 13B40 80038740 00000000 */ nop
/* 13B44 80038744 E7A00014 */ swc1 $f0, 0x14($sp)
.LIQUE_80038748:
/* 13B48 80038748 0C00E063 */ jal get_npc_by_index
/* 13B4C 8003874C 0240202D */ daddu $a0, $s2, $zero
/* 13B50 80038750 0040802D */ daddu $s0, $v0, $zero
/* 13B54 80038754 5200007A */ beql $s0, $zero, .LIQUE_80038940
/* 13B58 80038758 26520001 */ addiu $s2, $s2, 0x1
/* 13B5C 8003875C 52300078 */ beql $s1, $s0, .LIQUE_80038940
/* 13B60 80038760 26520001 */ addiu $s2, $s2, 0x1
/* 13B64 80038764 8E030000 */ lw $v1, 0x0($s0)
/* 13B68 80038768 50600075 */ beql $v1, $zero, .LIQUE_80038940
/* 13B6C 8003876C 26520001 */ addiu $s2, $s2, 0x1
/* 13B70 80038770 3C028000 */ lui $v0, (0x80000100 >> 16)
/* 13B74 80038774 34420100 */ ori $v0, $v0, (0x80000100 & 0xFFFF)
/* 13B78 80038778 00621024 */ and $v0, $v1, $v0
/* 13B7C 8003877C 54400070 */ bnel $v0, $zero, .LIQUE_80038940
/* 13B80 80038780 26520001 */ addiu $s2, $s2, 0x1
/* 13B84 80038784 860200A8 */ lh $v0, 0xA8($s0)
/* 13B88 80038788 C602003C */ lwc1 $f2, 0x3C($s0)
/* 13B8C 8003878C 44820000 */ mtc1 $v0, $f0
/* 13B90 80038790 00000000 */ nop
/* 13B94 80038794 46800020 */ cvt.s.w $f0, $f0
/* 13B98 80038798 46001000 */ add.s $f0, $f2, $f0
/* 13B9C 8003879C C7A60010 */ lwc1 $f6, 0x10($sp)
/* 13BA0 800387A0 4606003C */ c.lt.s $f0, $f6
/* 13BA4 800387A4 00000000 */ nop
/* 13BA8 800387A8 45030065 */ bc1tl .LIQUE_80038940
/* 13BAC 800387AC 26520001 */ addiu $s2, $s2, 0x1
/* 13BB0 800387B0 862200A8 */ lh $v0, 0xA8($s1)
/* 13BB4 800387B4 44820000 */ mtc1 $v0, $f0
/* 13BB8 800387B8 00000000 */ nop
/* 13BBC 800387BC 46800020 */ cvt.s.w $f0, $f0
/* 13BC0 800387C0 46003000 */ add.s $f0, $f6, $f0
/* 13BC4 800387C4 4602003C */ c.lt.s $f0, $f2
/* 13BC8 800387C8 00000000 */ nop
/* 13BCC 800387CC 4503005C */ bc1tl .LIQUE_80038940
/* 13BD0 800387D0 26520001 */ addiu $s2, $s2, 0x1
/* 13BD4 800387D4 C6140038 */ lwc1 $f20, 0x38($s0)
/* 13BD8 800387D8 461EA581 */ sub.s $f22, $f20, $f30
/* 13BDC 800387DC 4616B082 */ mul.s $f2, $f22, $f22
/* 13BE0 800387E0 00000000 */ nop
/* 13BE4 800387E4 C61A0040 */ lwc1 $f26, 0x40($s0)
/* 13BE8 800387E8 461CD101 */ sub.s $f4, $f26, $f28
/* 13BEC 800387EC 46042002 */ mul.s $f0, $f4, $f4
/* 13BF0 800387F0 00000000 */ nop
/* 13BF4 800387F4 860200A6 */ lh $v0, 0xA6($s0)
/* 13BF8 800387F8 46001300 */ add.s $f12, $f2, $f0
/* 13BFC 800387FC 3C013F00 */ lui $at, (0x3F000000 >> 16)
/* 13C00 80038800 44811000 */ mtc1 $at, $f2
/* 13C04 80038804 44820000 */ mtc1 $v0, $f0
/* 13C08 80038808 00000000 */ nop
/* 13C0C 8003880C 46800020 */ cvt.s.w $f0, $f0
/* 13C10 80038810 46020582 */ mul.s $f22, $f0, $f2
/* 13C14 80038814 00000000 */ nop
/* 13C18 80038818 46006104 */ sqrt.s $f4, $f12
/* 13C1C 8003881C 46042032 */ c.eq.s $f4, $f4
/* 13C20 80038820 00000000 */ nop
/* 13C24 80038824 45010004 */ bc1t .LIQUE_80038838
/* 13C28 80038828 00000000 */ nop
/* 13C2C 8003882C 0C0183A0 */ jal sqrtf
/* 13C30 80038830 00000000 */ nop
/* 13C34 80038834 46000106 */ mov.s $f4, $f0
.LIQUE_80038838:
/* 13C38 80038838 C7A60014 */ lwc1 $f6, 0x14($sp)
/* 13C3C 8003883C 46163000 */ add.s $f0, $f6, $f22
/* 13C40 80038840 46002606 */ mov.s $f24, $f4
/* 13C44 80038844 4618003E */ c.le.s $f0, $f24
/* 13C48 80038848 00000000 */ nop
/* 13C4C 8003884C 4503003C */ bc1tl .LIQUE_80038940
/* 13C50 80038850 26520001 */ addiu $s2, $s2, 0x1
/* 13C54 80038854 8E220000 */ lw $v0, 0x0($s1)
/* 13C58 80038858 00531024 */ and $v0, $v0, $s3
/* 13C5C 8003885C 10400005 */ beqz $v0, .LIQUE_80038874
/* 13C60 80038860 0000182D */ daddu $v1, $zero, $zero
/* 13C64 80038864 3C028011 */ lui $v0, %hi(gPartnerActionStatus)
/* 13C68 80038868 8042CF90 */ lb $v0, %lo(gPartnerActionStatus)($v0)
/* 13C6C 8003886C 0800E225 */ j .LIQUE_80038894
/* 13C70 80038870 2C430001 */ sltiu $v1, $v0, 0x1
.LIQUE_80038874:
/* 13C74 80038874 8E020000 */ lw $v0, 0x0($s0)
/* 13C78 80038878 00531024 */ and $v0, $v0, $s3
/* 13C7C 8003887C 50400005 */ beql $v0, $zero, .LIQUE_80038894
/* 13C80 80038880 24030001 */ addiu $v1, $zero, 0x1
/* 13C84 80038884 3C028011 */ lui $v0, %hi(gPartnerActionStatus)
/* 13C88 80038888 8042CF90 */ lb $v0, %lo(gPartnerActionStatus)($v0)
/* 13C8C 8003888C 50400001 */ beql $v0, $zero, .LIQUE_80038894
/* 13C90 80038890 24030001 */ addiu $v1, $zero, 0x1
.LIQUE_80038894:
/* 13C94 80038894 10600025 */ beqz $v1, .LIQUE_8003892C
/* 13C98 80038898 00000000 */ nop
/* 13C9C 8003889C 4600A306 */ mov.s $f12, $f20
/* 13CA0 800388A0 4406F000 */ mfc1 $a2, $f30
/* 13CA4 800388A4 4407E000 */ mfc1 $a3, $f28
/* 13CA8 800388A8 0C00A654 */ jal atan2
/* 13CAC 800388AC 4600D386 */ mov.s $f14, $f26
/* 13CB0 800388B0 3C0140C9 */ lui $at, (0x40C90FD0 >> 16)
/* 13CB4 800388B4 34210FD0 */ ori $at, $at, (0x40C90FD0 & 0xFFFF)
/* 13CB8 800388B8 44811000 */ mtc1 $at, $f2
/* 13CBC 800388BC 00000000 */ nop
/* 13CC0 800388C0 46020502 */ mul.s $f20, $f0, $f2
/* 13CC4 800388C4 00000000 */ nop
/* 13CC8 800388C8 C7A60014 */ lwc1 $f6, 0x14($sp)
/* 13CCC 800388CC 46163000 */ add.s $f0, $f6, $f22
/* 13CD0 800388D0 3C0143B4 */ lui $at, (0x43B40000 >> 16)
/* 13CD4 800388D4 44811000 */ mtc1 $at, $f2
/* 13CD8 800388D8 46180601 */ sub.s $f24, $f0, $f24
/* 13CDC 800388DC 4602A503 */ div.s $f20, $f20, $f2
/* 13CE0 800388E0 0C00A78F */ jal sin_rad
/* 13CE4 800388E4 4600A306 */ mov.s $f12, $f20
/* 13CE8 800388E8 4600C582 */ mul.s $f22, $f24, $f0
/* 13CEC 800388EC 00000000 */ nop
/* 13CF0 800388F0 0C00A7A8 */ jal cos_rad
/* 13CF4 800388F4 4600A306 */ mov.s $f12, $f20
/* 13CF8 800388F8 4600C087 */ neg.s $f2, $f24
/* 13CFC 800388FC 46001102 */ mul.s $f4, $f2, $f0
/* 13D00 80038900 00000000 */ nop
/* 13D04 80038904 3C013DCC */ lui $at, (0x3DCCCCCD >> 16)
/* 13D08 80038908 3421CCCD */ ori $at, $at, (0x3DCCCCCD & 0xFFFF)
/* 13D0C 8003890C 44813000 */ mtc1 $at, $f6
/* 13D10 80038910 00000000 */ nop
/* 13D14 80038914 4606B002 */ mul.s $f0, $f22, $f6
/* 13D18 80038918 00000000 */ nop
/* 13D1C 8003891C 46062082 */ mul.s $f2, $f4, $f6
/* 13D20 80038920 00000000 */ nop
/* 13D24 80038924 4600F780 */ add.s $f30, $f30, $f0
/* 13D28 80038928 4602E700 */ add.s $f28, $f28, $f2
.LIQUE_8003892C:
/* 13D2C 8003892C 8E220000 */ lw $v0, 0x0($s1)
/* 13D30 80038930 3C030200 */ lui $v1, (0x2000000 >> 16)
/* 13D34 80038934 00431025 */ or $v0, $v0, $v1
/* 13D38 80038938 AE220000 */ sw $v0, 0x0($s1)
/* 13D3C 8003893C 26520001 */ addiu $s2, $s2, 0x1
.LIQUE_80038940:
/* 13D40 80038940 2A420040 */ slti $v0, $s2, 0x40
/* 13D44 80038944 1440FF80 */ bnez $v0, .LIQUE_80038748
/* 13D48 80038948 00000000 */ nop
/* 13D4C 8003894C E63E0038 */ swc1 $f30, 0x38($s1)
/* 13D50 80038950 E63C0040 */ swc1 $f28, 0x40($s1)
.LIQUE_80038954:
/* 13D54 80038954 8FBF0028 */ lw $ra, 0x28($sp)
/* 13D58 80038958 8FB30024 */ lw $s3, 0x24($sp)
/* 13D5C 8003895C 8FB20020 */ lw $s2, 0x20($sp)
/* 13D60 80038960 8FB1001C */ lw $s1, 0x1C($sp)
/* 13D64 80038964 8FB00018 */ lw $s0, 0x18($sp)
/* 13D68 80038968 D7BE0058 */ ldc1 $f30, 0x58($sp)
/* 13D6C 8003896C D7BC0050 */ ldc1 $f28, 0x50($sp)
/* 13D70 80038970 D7BA0048 */ ldc1 $f26, 0x48($sp)
/* 13D74 80038974 D7B80040 */ ldc1 $f24, 0x40($sp)
/* 13D78 80038978 D7B60038 */ ldc1 $f22, 0x38($sp)
/* 13D7C 8003897C D7B40030 */ ldc1 $f20, 0x30($sp)
/* 13D80 80038980 03E00008 */ jr $ra
/* 13D84 80038984 27BD0060 */ addiu $sp, $sp, 0x60

View File

@ -29,8 +29,8 @@ glabel npc_do_player_collision
/* 13DDC 800389DC 0800E343 */ j .LIQUE_80038D0C /* 13DDC 800389DC 0800E343 */ j .LIQUE_80038D0C
/* 13DE0 800389E0 0000102D */ daddu $v0, $zero, $zero /* 13DE0 800389E0 0000102D */ daddu $v0, $zero, $zero
.LIQUE_800389E4: .LIQUE_800389E4:
/* 13DE4 800389E4 3C02800A */ lui $v0, %hi(D_800A0B94) /* 13DE4 800389E4 3C02800A */ lui $v0, %hi(gNpcPlayerCollisionsEnabled)
/* 13DE8 800389E8 8042D5A4 */ lb $v0, %lo(D_800A0B94)($v0) /* 13DE8 800389E8 8042D5A4 */ lb $v0, %lo(gNpcPlayerCollisionsEnabled)($v0)
/* 13DEC 800389EC 504000C7 */ beql $v0, $zero, .LIQUE_80038D0C /* 13DEC 800389EC 504000C7 */ beql $v0, $zero, .LIQUE_80038D0C
/* 13DF0 800389F0 0000102D */ daddu $v0, $zero, $zero /* 13DF0 800389F0 0000102D */ daddu $v0, $zero, $zero
/* 13DF4 800389F4 860200B0 */ lh $v0, 0xB0($s0) /* 13DF4 800389F4 860200B0 */ lh $v0, 0xB0($s0)

View File

@ -61,7 +61,7 @@ __osFlashHandler + 0xC = 0x800D7C2C;
D_800A08E4 = 0x8009d2f4; D_800A08E4 = 0x8009d2f4;
D_800A08E8 = 0x8009d2f8; D_800A08E8 = 0x8009d2f8;
D_800A08EC = 0x8009d2fc; D_800A08EC = 0x8009d2fc;
D_800A0B94 = 0x8009d5a4; gNpcPlayerCollisionsEnabled = 0x8009d5a4;
wPartnerNpc = 0x8010ad10; wPartnerNpc = 0x8010ad10;
gPartnerActionStatus = 0x8010cf90; gPartnerActionStatus = 0x8010cf90;
gPlayerStatus = 0x8010d3a8; gPlayerStatus = 0x8010d3a8;

View File

@ -1036,7 +1036,7 @@ partner_enable_input = 0x800ed9e0;
D_800A08E4 = 0x8009d2f4; D_800A08E4 = 0x8009d2f4;
D_800A08E8 = 0x8009d2f8; D_800A08E8 = 0x8009d2f8;
D_800A08EC = 0x8009d2fc; D_800A08EC = 0x8009d2fc;
D_800A0B94 = 0x8009d5a4; gNpcPlayerCollisionsEnabled = 0x8009d5a4;
wPartnerNpc = 0x8010ad10; wPartnerNpc = 0x8010ad10;
gPartnerActionStatus = 0x8010cf90; gPartnerActionStatus = 0x8010cf90;
gPlayerStatus = 0x8010d3a8; gPlayerStatus = 0x8010d3a8;

View File

@ -352,7 +352,7 @@ dlabel gBattleNpcList
dlabel gCurrentNpcListPtr dlabel gCurrentNpcListPtr
.space 4 .space 4
dlabel D_800A0B94 dlabel gNpcPlayerCollisionsEnabled
.space 12 .space 12
dlabel D_800A0BA0 dlabel D_800A0BA0

View File

@ -1,190 +0,0 @@
.set noat /* allow manual use of $at */
.set noreorder /* don't insert nops after branches */
glabel npc_do_other_npc_collision
/* 140CC 80038CCC 27BDFFA0 */ addiu $sp, $sp, -0x60
/* 140D0 80038CD0 AFB1001C */ sw $s1, 0x1C($sp)
/* 140D4 80038CD4 0080882D */ daddu $s1, $a0, $zero
/* 140D8 80038CD8 AFBF0028 */ sw $ra, 0x28($sp)
/* 140DC 80038CDC AFB30024 */ sw $s3, 0x24($sp)
/* 140E0 80038CE0 AFB20020 */ sw $s2, 0x20($sp)
/* 140E4 80038CE4 AFB00018 */ sw $s0, 0x18($sp)
/* 140E8 80038CE8 F7BE0058 */ sdc1 $f30, 0x58($sp)
/* 140EC 80038CEC F7BC0050 */ sdc1 $f28, 0x50($sp)
/* 140F0 80038CF0 F7BA0048 */ sdc1 $f26, 0x48($sp)
/* 140F4 80038CF4 F7B80040 */ sdc1 $f24, 0x40($sp)
/* 140F8 80038CF8 F7B60038 */ sdc1 $f22, 0x38($sp)
/* 140FC 80038CFC F7B40030 */ sdc1 $f20, 0x30($sp)
/* 14100 80038D00 8E230000 */ lw $v1, 0x0($s1)
/* 14104 80038D04 30620100 */ andi $v0, $v1, 0x100
/* 14108 80038D08 14400096 */ bnez $v0, .LJP_80038F64
/* 1410C 80038D0C 3C02FDFF */ lui $v0, (0xFDFFFFFF >> 16)
/* 14110 80038D10 3442FFFF */ ori $v0, $v0, (0xFDFFFFFF & 0xFFFF)
/* 14114 80038D14 0000902D */ daddu $s2, $zero, $zero
/* 14118 80038D18 3C130400 */ lui $s3, (0x4000000 >> 16)
/* 1411C 80038D1C C63E0038 */ lwc1 $f30, 0x38($s1)
/* 14120 80038D20 C626003C */ lwc1 $f6, 0x3C($s1)
/* 14124 80038D24 3C013F00 */ lui $at, (0x3F000000 >> 16)
/* 14128 80038D28 44811000 */ mtc1 $at, $f2
/* 1412C 80038D2C 00621024 */ and $v0, $v1, $v0
/* 14130 80038D30 E7A60010 */ swc1 $f6, 0x10($sp)
/* 14134 80038D34 AE220000 */ sw $v0, 0x0($s1)
/* 14138 80038D38 862200A6 */ lh $v0, 0xA6($s1)
/* 1413C 80038D3C C63C0040 */ lwc1 $f28, 0x40($s1)
/* 14140 80038D40 44820000 */ mtc1 $v0, $f0
/* 14144 80038D44 00000000 */ nop
/* 14148 80038D48 46800020 */ cvt.s.w $f0, $f0
/* 1414C 80038D4C 46020002 */ mul.s $f0, $f0, $f2
/* 14150 80038D50 00000000 */ nop
/* 14154 80038D54 E7A00014 */ swc1 $f0, 0x14($sp)
.LJP_80038D58:
/* 14158 80038D58 0C00E1E7 */ jal get_npc_by_index
/* 1415C 80038D5C 0240202D */ daddu $a0, $s2, $zero
/* 14160 80038D60 0040802D */ daddu $s0, $v0, $zero
/* 14164 80038D64 5200007A */ beql $s0, $zero, .LJP_80038F50
/* 14168 80038D68 26520001 */ addiu $s2, $s2, 0x1
/* 1416C 80038D6C 52300078 */ beql $s1, $s0, .LJP_80038F50
/* 14170 80038D70 26520001 */ addiu $s2, $s2, 0x1
/* 14174 80038D74 8E030000 */ lw $v1, 0x0($s0)
/* 14178 80038D78 50600075 */ beql $v1, $zero, .LJP_80038F50
/* 1417C 80038D7C 26520001 */ addiu $s2, $s2, 0x1
/* 14180 80038D80 3C028000 */ lui $v0, (0x80000100 >> 16)
/* 14184 80038D84 34420100 */ ori $v0, $v0, (0x80000100 & 0xFFFF)
/* 14188 80038D88 00621024 */ and $v0, $v1, $v0
/* 1418C 80038D8C 54400070 */ bnel $v0, $zero, .LJP_80038F50
/* 14190 80038D90 26520001 */ addiu $s2, $s2, 0x1
/* 14194 80038D94 860200A8 */ lh $v0, 0xA8($s0)
/* 14198 80038D98 C602003C */ lwc1 $f2, 0x3C($s0)
/* 1419C 80038D9C 44820000 */ mtc1 $v0, $f0
/* 141A0 80038DA0 00000000 */ nop
/* 141A4 80038DA4 46800020 */ cvt.s.w $f0, $f0
/* 141A8 80038DA8 46001000 */ add.s $f0, $f2, $f0
/* 141AC 80038DAC C7A60010 */ lwc1 $f6, 0x10($sp)
/* 141B0 80038DB0 4606003C */ c.lt.s $f0, $f6
/* 141B4 80038DB4 00000000 */ nop
/* 141B8 80038DB8 45030065 */ bc1tl .LJP_80038F50
/* 141BC 80038DBC 26520001 */ addiu $s2, $s2, 0x1
/* 141C0 80038DC0 862200A8 */ lh $v0, 0xA8($s1)
/* 141C4 80038DC4 44820000 */ mtc1 $v0, $f0
/* 141C8 80038DC8 00000000 */ nop
/* 141CC 80038DCC 46800020 */ cvt.s.w $f0, $f0
/* 141D0 80038DD0 46003000 */ add.s $f0, $f6, $f0
/* 141D4 80038DD4 4602003C */ c.lt.s $f0, $f2
/* 141D8 80038DD8 00000000 */ nop
/* 141DC 80038DDC 4503005C */ bc1tl .LJP_80038F50
/* 141E0 80038DE0 26520001 */ addiu $s2, $s2, 0x1
/* 141E4 80038DE4 C6140038 */ lwc1 $f20, 0x38($s0)
/* 141E8 80038DE8 461EA581 */ sub.s $f22, $f20, $f30
/* 141EC 80038DEC 4616B082 */ mul.s $f2, $f22, $f22
/* 141F0 80038DF0 00000000 */ nop
/* 141F4 80038DF4 C61A0040 */ lwc1 $f26, 0x40($s0)
/* 141F8 80038DF8 461CD101 */ sub.s $f4, $f26, $f28
/* 141FC 80038DFC 46042002 */ mul.s $f0, $f4, $f4
/* 14200 80038E00 00000000 */ nop
/* 14204 80038E04 860200A6 */ lh $v0, 0xA6($s0)
/* 14208 80038E08 46001300 */ add.s $f12, $f2, $f0
/* 1420C 80038E0C 3C013F00 */ lui $at, (0x3F000000 >> 16)
/* 14210 80038E10 44811000 */ mtc1 $at, $f2
/* 14214 80038E14 44820000 */ mtc1 $v0, $f0
/* 14218 80038E18 00000000 */ nop
/* 1421C 80038E1C 46800020 */ cvt.s.w $f0, $f0
/* 14220 80038E20 46020582 */ mul.s $f22, $f0, $f2
/* 14224 80038E24 00000000 */ nop
/* 14228 80038E28 46006104 */ sqrt.s $f4, $f12
/* 1422C 80038E2C 46042032 */ c.eq.s $f4, $f4
/* 14230 80038E30 00000000 */ nop
/* 14234 80038E34 45010004 */ bc1t .LJP_80038E48
/* 14238 80038E38 00000000 */ nop
/* 1423C 80038E3C 0C0187B0 */ jal sqrtf
/* 14240 80038E40 00000000 */ nop
/* 14244 80038E44 46000106 */ mov.s $f4, $f0
.LJP_80038E48:
/* 14248 80038E48 C7A60014 */ lwc1 $f6, 0x14($sp)
/* 1424C 80038E4C 46163000 */ add.s $f0, $f6, $f22
/* 14250 80038E50 46002606 */ mov.s $f24, $f4
/* 14254 80038E54 4618003E */ c.le.s $f0, $f24
/* 14258 80038E58 00000000 */ nop
/* 1425C 80038E5C 4503003C */ bc1tl .LJP_80038F50
/* 14260 80038E60 26520001 */ addiu $s2, $s2, 0x1
/* 14264 80038E64 8E220000 */ lw $v0, 0x0($s1)
/* 14268 80038E68 00531024 */ and $v0, $v0, $s3
/* 1426C 80038E6C 10400005 */ beqz $v0, .LJP_80038E84
/* 14270 80038E70 0000182D */ daddu $v1, $zero, $zero
/* 14274 80038E74 3C028011 */ lui $v0, %hi(gPartnerActionStatus)
/* 14278 80038E78 8042ED70 */ lb $v0, %lo(gPartnerActionStatus)($v0)
/* 1427C 80038E7C 0800E3A9 */ j .LJP_80038EA4
/* 14280 80038E80 2C430001 */ sltiu $v1, $v0, 0x1
.LJP_80038E84:
/* 14284 80038E84 8E020000 */ lw $v0, 0x0($s0)
/* 14288 80038E88 00531024 */ and $v0, $v0, $s3
/* 1428C 80038E8C 50400005 */ beql $v0, $zero, .LJP_80038EA4
/* 14290 80038E90 24030001 */ addiu $v1, $zero, 0x1
/* 14294 80038E94 3C028011 */ lui $v0, %hi(gPartnerActionStatus)
/* 14298 80038E98 8042ED70 */ lb $v0, %lo(gPartnerActionStatus)($v0)
/* 1429C 80038E9C 50400001 */ beql $v0, $zero, .LJP_80038EA4
/* 142A0 80038EA0 24030001 */ addiu $v1, $zero, 0x1
.LJP_80038EA4:
/* 142A4 80038EA4 10600025 */ beqz $v1, .LJP_80038F3C
/* 142A8 80038EA8 00000000 */ nop
/* 142AC 80038EAC 4600A306 */ mov.s $f12, $f20
/* 142B0 80038EB0 4406F000 */ mfc1 $a2, $f30
/* 142B4 80038EB4 4407E000 */ mfc1 $a3, $f28
/* 142B8 80038EB8 0C00A710 */ jal atan2
/* 142BC 80038EBC 4600D386 */ mov.s $f14, $f26
/* 142C0 80038EC0 3C0140C9 */ lui $at, (0x40C90FD0 >> 16)
/* 142C4 80038EC4 34210FD0 */ ori $at, $at, (0x40C90FD0 & 0xFFFF)
/* 142C8 80038EC8 44811000 */ mtc1 $at, $f2
/* 142CC 80038ECC 00000000 */ nop
/* 142D0 80038ED0 46020502 */ mul.s $f20, $f0, $f2
/* 142D4 80038ED4 00000000 */ nop
/* 142D8 80038ED8 C7A60014 */ lwc1 $f6, 0x14($sp)
/* 142DC 80038EDC 46163000 */ add.s $f0, $f6, $f22
/* 142E0 80038EE0 3C0143B4 */ lui $at, (0x43B40000 >> 16)
/* 142E4 80038EE4 44811000 */ mtc1 $at, $f2
/* 142E8 80038EE8 46180601 */ sub.s $f24, $f0, $f24
/* 142EC 80038EEC 4602A503 */ div.s $f20, $f20, $f2
/* 142F0 80038EF0 0C00A84B */ jal sin_rad
/* 142F4 80038EF4 4600A306 */ mov.s $f12, $f20
/* 142F8 80038EF8 4600C582 */ mul.s $f22, $f24, $f0
/* 142FC 80038EFC 00000000 */ nop
/* 14300 80038F00 0C00A864 */ jal cos_rad
/* 14304 80038F04 4600A306 */ mov.s $f12, $f20
/* 14308 80038F08 4600C087 */ neg.s $f2, $f24
/* 1430C 80038F0C 46001102 */ mul.s $f4, $f2, $f0
/* 14310 80038F10 00000000 */ nop
/* 14314 80038F14 3C013DCC */ lui $at, (0x3DCCCCCD >> 16)
/* 14318 80038F18 3421CCCD */ ori $at, $at, (0x3DCCCCCD & 0xFFFF)
/* 1431C 80038F1C 44813000 */ mtc1 $at, $f6
/* 14320 80038F20 00000000 */ nop
/* 14324 80038F24 4606B002 */ mul.s $f0, $f22, $f6
/* 14328 80038F28 00000000 */ nop
/* 1432C 80038F2C 46062082 */ mul.s $f2, $f4, $f6
/* 14330 80038F30 00000000 */ nop
/* 14334 80038F34 4600F780 */ add.s $f30, $f30, $f0
/* 14338 80038F38 4602E700 */ add.s $f28, $f28, $f2
.LJP_80038F3C:
/* 1433C 80038F3C 8E220000 */ lw $v0, 0x0($s1)
/* 14340 80038F40 3C030200 */ lui $v1, (0x2000000 >> 16)
/* 14344 80038F44 00431025 */ or $v0, $v0, $v1
/* 14348 80038F48 AE220000 */ sw $v0, 0x0($s1)
/* 1434C 80038F4C 26520001 */ addiu $s2, $s2, 0x1
.LJP_80038F50:
/* 14350 80038F50 2A420040 */ slti $v0, $s2, 0x40
/* 14354 80038F54 1440FF80 */ bnez $v0, .LJP_80038D58
/* 14358 80038F58 00000000 */ nop
/* 1435C 80038F5C E63E0038 */ swc1 $f30, 0x38($s1)
/* 14360 80038F60 E63C0040 */ swc1 $f28, 0x40($s1)
.LJP_80038F64:
/* 14364 80038F64 8FBF0028 */ lw $ra, 0x28($sp)
/* 14368 80038F68 8FB30024 */ lw $s3, 0x24($sp)
/* 1436C 80038F6C 8FB20020 */ lw $s2, 0x20($sp)
/* 14370 80038F70 8FB1001C */ lw $s1, 0x1C($sp)
/* 14374 80038F74 8FB00018 */ lw $s0, 0x18($sp)
/* 14378 80038F78 D7BE0058 */ ldc1 $f30, 0x58($sp)
/* 1437C 80038F7C D7BC0050 */ ldc1 $f28, 0x50($sp)
/* 14380 80038F80 D7BA0048 */ ldc1 $f26, 0x48($sp)
/* 14384 80038F84 D7B80040 */ ldc1 $f24, 0x40($sp)
/* 14388 80038F88 D7B60038 */ ldc1 $f22, 0x38($sp)
/* 1438C 80038F8C D7B40030 */ ldc1 $f20, 0x30($sp)
/* 14390 80038F90 03E00008 */ jr $ra
/* 14394 80038F94 27BD0060 */ addiu $sp, $sp, 0x60

View File

@ -27,8 +27,8 @@ glabel npc_do_player_collision
/* 143EC 80038FEC 0800E4C7 */ j .LJP_8003931C /* 143EC 80038FEC 0800E4C7 */ j .LJP_8003931C
/* 143F0 80038FF0 0000102D */ daddu $v0, $zero, $zero /* 143F0 80038FF0 0000102D */ daddu $v0, $zero, $zero
.LJP_80038FF4: .LJP_80038FF4:
/* 143F4 80038FF4 3C02800A */ lui $v0, %hi(D_800A0B94) /* 143F4 80038FF4 3C02800A */ lui $v0, %hi(gNpcPlayerCollisionsEnabled)
/* 143F8 80038FF8 8042E9A4 */ lb $v0, %lo(D_800A0B94)($v0) /* 143F8 80038FF8 8042E9A4 */ lb $v0, %lo(gNpcPlayerCollisionsEnabled)($v0)
/* 143FC 80038FFC 504000C7 */ beql $v0, $zero, .LJP_8003931C /* 143FC 80038FFC 504000C7 */ beql $v0, $zero, .LJP_8003931C
/* 14400 80039000 0000102D */ daddu $v0, $zero, $zero /* 14400 80039000 0000102D */ daddu $v0, $zero, $zero
/* 14404 80039004 860200B0 */ lh $v0, 0xB0($s0) /* 14404 80039004 860200B0 */ lh $v0, 0xB0($s0)

View File

@ -231,7 +231,7 @@ D_8009E6D0 = 0x8009E6B0;
D_800A08E4 = 0x8009E6F4; D_800A08E4 = 0x8009E6F4;
D_800A08E8 = 0x8009E6F8; D_800A08E8 = 0x8009E6F8;
D_800A08EC = 0x8009E6FC; D_800A08EC = 0x8009E6FC;
D_800A0B94 = 0x8009E9A4; gNpcPlayerCollisionsEnabled = 0x8009E9A4;
__osThreadSave = 0x800B0CE8; __osThreadSave = 0x800B0CE8;
gCurrentEncounter = 0x800B0EF0; gCurrentEncounter = 0x800B0EF0;
gCameras = 0x800B1D60; gCameras = 0x800B1D60;

View File

@ -428,7 +428,7 @@ dlabel gBattleNpcList
dlabel gCurrentNpcListPtr dlabel gCurrentNpcListPtr
.space 4 .space 4
dlabel D_800A0B94 dlabel gNpcPlayerCollisionsEnabled
.space 4 .space 4
dlabel D_800A0B98 dlabel D_800A0B98

View File

@ -1,508 +0,0 @@
.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel motion_blur_flame_appendGfx
/* 3A2BCC E00A223C 27BDFF60 */ addiu $sp, $sp, -0xa0
/* 3A2BD0 E00A2240 3C07DB06 */ lui $a3, 0xdb06
/* 3A2BD4 E00A2244 34E70024 */ ori $a3, $a3, 0x24
/* 3A2BD8 E00A2248 3C02800A */ lui $v0, %hi(gMasterGfxPos)
/* 3A2BDC E00A224C 2442A66C */ addiu $v0, $v0, %lo(gMasterGfxPos)
/* 3A2BE0 E00A2250 AFB00078 */ sw $s0, 0x78($sp)
/* 3A2BE4 E00A2254 0040802D */ daddu $s0, $v0, $zero
/* 3A2BE8 E00A2258 AFB60090 */ sw $s6, 0x90($sp)
/* 3A2BEC E00A225C 3C16F510 */ lui $s6, 0xf510
/* 3A2BF0 E00A2260 36D60100 */ ori $s6, $s6, 0x100
/* 3A2BF4 E00A2264 AFBF009C */ sw $ra, 0x9c($sp)
/* 3A2BF8 E00A2268 AFBE0098 */ sw $fp, 0x98($sp)
/* 3A2BFC E00A226C AFB70094 */ sw $s7, 0x94($sp)
/* 3A2C00 E00A2270 AFB5008C */ sw $s5, 0x8c($sp)
/* 3A2C04 E00A2274 AFB40088 */ sw $s4, 0x88($sp)
/* 3A2C08 E00A2278 AFB30084 */ sw $s3, 0x84($sp)
/* 3A2C0C E00A227C AFB20080 */ sw $s2, 0x80($sp)
/* 3A2C10 E00A2280 AFB1007C */ sw $s1, 0x7c($sp)
/* 3A2C14 E00A2284 AFB60060 */ sw $s6, 0x60($sp)
/* 3A2C18 E00A2288 8E050000 */ lw $a1, ($s0)
/* 3A2C1C E00A228C 3C02E700 */ lui $v0, 0xe700
/* 3A2C20 E00A2290 AFA0006C */ sw $zero, 0x6c($sp)
/* 3A2C24 E00A2294 8C94000C */ lw $s4, 0xc($a0)
/* 3A2C28 E00A2298 00A0182D */ daddu $v1, $a1, $zero
/* 3A2C2C E00A229C 24A50008 */ addiu $a1, $a1, 8
/* 3A2C30 E00A22A0 AE050000 */ sw $a1, ($s0)
/* 3A2C34 E00A22A4 8E860000 */ lw $a2, ($s4)
/* 3A2C38 E00A22A8 8E96004C */ lw $s6, 0x4c($s4)
/* 3A2C3C E00A22AC 0280B82D */ daddu $s7, $s4, $zero
/* 3A2C40 E00A22B0 AFB60050 */ sw $s6, 0x50($sp)
/* 3A2C44 E00A22B4 AC620000 */ sw $v0, ($v1)
/* 3A2C48 E00A22B8 24A20008 */ addiu $v0, $a1, 8
/* 3A2C4C E00A22BC AC600004 */ sw $zero, 4($v1)
/* 3A2C50 E00A22C0 AE020000 */ sw $v0, ($s0)
/* 3A2C54 E00A22C4 ACA70000 */ sw $a3, ($a1)
/* 3A2C58 E00A22C8 8C830010 */ lw $v1, 0x10($a0)
/* 3A2C5C E00A22CC 24A20010 */ addiu $v0, $a1, 0x10
/* 3A2C60 E00A22D0 AE020000 */ sw $v0, ($s0)
/* 3A2C64 E00A22D4 3C02DE00 */ lui $v0, 0xde00
/* 3A2C68 E00A22D8 8C63001C */ lw $v1, 0x1c($v1)
/* 3A2C6C E00A22DC 3C04E00A */ lui $a0, %hi(D_E00A29DC)
/* 3A2C70 E00A22E0 248429DC */ addiu $a0, $a0, %lo(D_E00A29DC)
/* 3A2C74 E00A22E4 ACA20008 */ sw $v0, 8($a1)
/* 3A2C78 E00A22E8 3C028000 */ lui $v0, 0x8000
/* 3A2C7C E00A22EC 00621821 */ addu $v1, $v1, $v0
/* 3A2C80 E00A22F0 00061040 */ sll $v0, $a2, 1
/* 3A2C84 E00A22F4 00461021 */ addu $v0, $v0, $a2
/* 3A2C88 E00A22F8 000210C0 */ sll $v0, $v0, 3
/* 3A2C8C E00A22FC 00063080 */ sll $a2, $a2, 2
/* 3A2C90 E00A2300 ACA30004 */ sw $v1, 4($a1)
/* 3A2C94 E00A2304 3C03E00A */ lui $v1, %hi(D_E00A29D0)
/* 3A2C98 E00A2308 00661821 */ addu $v1, $v1, $a2
/* 3A2C9C E00A230C 8C6329D0 */ lw $v1, %lo(D_E00A29D0)($v1)
/* 3A2CA0 E00A2310 00448821 */ addu $s1, $v0, $a0
/* 3A2CA4 E00A2314 ACA3000C */ sw $v1, 0xc($a1)
.LE00A2318:
/* 3A2CA8 E00A2318 C6EC001C */ lwc1 $f12, 0x1c($s7)
/* 3A2CAC E00A231C C6EE002C */ lwc1 $f14, 0x2c($s7)
/* 3A2CB0 E00A2320 C6E0003C */ lwc1 $f0, 0x3c($s7)
/* 3A2CB4 E00A2324 8E350010 */ lw $s5, 0x10($s1)
/* 3A2CB8 E00A2328 8E320014 */ lw $s2, 0x14($s1)
/* 3A2CBC E00A232C 56F4000A */ bnel $s7, $s4, .LE00A2358
/* 3A2CC0 E00A2330 E7AC0048 */ swc1 $f12, 0x48($sp)
/* 3A2CC4 E00A2334 27A20048 */ addiu $v0, $sp, 0x48
/* 3A2CC8 E00A2338 AFA20010 */ sw $v0, 0x10($sp)
/* 3A2CCC E00A233C 27A2004C */ addiu $v0, $sp, 0x4c
/* 3A2CD0 E00A2340 44060000 */ mfc1 $a2, $f0
/* 3A2CD4 E00A2344 2407FFFF */ addiu $a3, $zero, -1
/* 3A2CD8 E00A2348 0C08015C */ jal shim_is_point_visible
/* 3A2CDC E00A234C AFA20014 */ sw $v0, 0x14($sp)
/* 3A2CE0 E00A2350 080288D9 */ j .LE00A2364
/* 3A2CE4 E00A2354 0040302D */ daddu $a2, $v0, $zero
.LE00A2358:
/* 3A2CE8 E00A2358 4600018D */ trunc.w.s $f6, $f0
/* 3A2CEC E00A235C 44063000 */ mfc1 $a2, $f6
/* 3A2CF0 E00A2360 E7AE004C */ swc1 $f14, 0x4c($sp)
.LE00A2364:
/* 3A2CF4 E00A2364 8FB6006C */ lw $s6, 0x6c($sp)
/* 3A2CF8 E00A2368 03B61021 */ addu $v0, $sp, $s6
/* 3A2CFC E00A236C AC460018 */ sw $a2, 0x18($v0)
/* 3A2D00 E00A2370 C7A20048 */ lwc1 $f2, 0x48($sp)
/* 3A2D04 E00A2374 E4420028 */ swc1 $f2, 0x28($v0)
/* 3A2D08 E00A2378 C7A4004C */ lwc1 $f4, 0x4c($sp)
/* 3A2D0C E00A237C 10C0016B */ beqz $a2, .LE00A292C
/* 3A2D10 E00A2380 E4440038 */ swc1 $f4, 0x38($v0)
/* 3A2D14 E00A2384 44800000 */ mtc1 $zero, $f0
/* 3A2D18 E00A2388 00000000 */ nop
/* 3A2D1C E00A238C 4600103C */ c.lt.s $f2, $f0
/* 3A2D20 E00A2390 00000000 */ nop
/* 3A2D24 E00A2394 45030166 */ bc1tl .LE00A2930
/* 3A2D28 E00A2398 26F70004 */ addiu $s7, $s7, 4
/* 3A2D2C E00A239C 4600203C */ c.lt.s $f4, $f0
/* 3A2D30 E00A23A0 00000000 */ nop
/* 3A2D34 E00A23A4 45030162 */ bc1tl .LE00A2930
/* 3A2D38 E00A23A8 26F70004 */ addiu $s7, $s7, 4
/* 3A2D3C E00A23AC 3C0143A0 */ lui $at, 0x43a0
/* 3A2D40 E00A23B0 44810000 */ mtc1 $at, $f0
/* 3A2D44 E00A23B4 00000000 */ nop
/* 3A2D48 E00A23B8 4602003E */ c.le.s $f0, $f2
/* 3A2D4C E00A23BC 00000000 */ nop
/* 3A2D50 E00A23C0 4503015B */ bc1tl .LE00A2930
/* 3A2D54 E00A23C4 26F70004 */ addiu $s7, $s7, 4
/* 3A2D58 E00A23C8 3C014370 */ lui $at, 0x4370
/* 3A2D5C E00A23CC 44810000 */ mtc1 $at, $f0
/* 3A2D60 E00A23D0 00000000 */ nop
/* 3A2D64 E00A23D4 4604003E */ c.le.s $f0, $f4
/* 3A2D68 E00A23D8 00000000 */ nop
/* 3A2D6C E00A23DC 45030154 */ bc1tl .LE00A2930
/* 3A2D70 E00A23E0 26F70004 */ addiu $s7, $s7, 4
/* 3A2D74 E00A23E4 3C02E00A */ lui $v0, %hi(D_E00A2A24)
/* 3A2D78 E00A23E8 00561021 */ addu $v0, $v0, $s6
/* 3A2D7C E00A23EC 8C422A24 */ lw $v0, %lo(D_E00A2A24)($v0)
/* 3A2D80 E00A23F0 8FB60050 */ lw $s6, 0x50($sp)
/* 3A2D84 E00A23F4 02C20018 */ mult $s6, $v0
/* 3A2D88 E00A23F8 00001012 */ mflo $v0
/* 3A2D8C E00A23FC 3C0351EB */ lui $v1, 0x51eb
/* 3A2D90 E00A2400 3463851F */ ori $v1, $v1, 0x851f
/* 3A2D94 E00A2404 00430018 */ mult $v0, $v1
/* 3A2D98 E00A2408 000217C3 */ sra $v0, $v0, 0x1f
/* 3A2D9C E00A240C 00001810 */ mfhi $v1
/* 3A2DA0 E00A2410 00032143 */ sra $a0, $v1, 5
/* 3A2DA4 E00A2414 8E83005C */ lw $v1, 0x5c($s4)
/* 3A2DA8 E00A2418 00822023 */ subu $a0, $a0, $v0
/* 3A2DAC E00A241C 00640018 */ mult $v1, $a0
/* 3A2DB0 E00A2420 00001812 */ mflo $v1
/* 3A2DB4 E00A2424 8E820060 */ lw $v0, 0x60($s4)
/* 3A2DB8 E00A2428 00000000 */ nop
/* 3A2DBC E00A242C 00440018 */ mult $v0, $a0
/* 3A2DC0 E00A2430 00003812 */ mflo $a3
/* 3A2DC4 E00A2434 8E820064 */ lw $v0, 0x64($s4)
/* 3A2DC8 E00A2438 00000000 */ nop
/* 3A2DCC E00A243C 00440018 */ mult $v0, $a0
/* 3A2DD0 E00A2440 00004812 */ mflo $t1
/* 3A2DD4 E00A2444 8E060000 */ lw $a2, ($s0)
/* 3A2DD8 E00A2448 00031A43 */ sra $v1, $v1, 9
/* 3A2DDC E00A244C 00640018 */ mult $v1, $a0
/* 3A2DE0 E00A2450 00C0282D */ daddu $a1, $a2, $zero
/* 3A2DE4 E00A2454 24C60008 */ addiu $a2, $a2, 8
/* 3A2DE8 E00A2458 AE060000 */ sw $a2, ($s0)
/* 3A2DEC E00A245C 3C02FA00 */ lui $v0, 0xfa00
/* 3A2DF0 E00A2460 00005812 */ mflo $t3
/* 3A2DF4 E00A2464 ACA20000 */ sw $v0, ($a1)
/* 3A2DF8 E00A2468 00071243 */ sra $v0, $a3, 9
/* 3A2DFC E00A246C 00440018 */ mult $v0, $a0
/* 3A2E00 E00A2470 246A0020 */ addiu $t2, $v1, 0x20
/* 3A2E04 E00A2474 24480020 */ addiu $t0, $v0, 0x20
/* 3A2E08 E00A2478 00091243 */ sra $v0, $t1, 9
/* 3A2E0C E00A247C 24490020 */ addiu $t1, $v0, 0x20
/* 3A2E10 E00A2480 00003812 */ mflo $a3
/* 3A2E14 E00A2484 000B1A03 */ sra $v1, $t3, 8
/* 3A2E18 E00A2488 00031E00 */ sll $v1, $v1, 0x18
/* 3A2E1C E00A248C 00440018 */ mult $v0, $a0
/* 3A2E20 E00A2490 00071203 */ sra $v0, $a3, 8
/* 3A2E24 E00A2494 304200FF */ andi $v0, $v0, 0xff
/* 3A2E28 E00A2498 00021400 */ sll $v0, $v0, 0x10
/* 3A2E2C E00A249C 00621825 */ or $v1, $v1, $v0
/* 3A2E30 E00A24A0 00005812 */ mflo $t3
/* 3A2E34 E00A24A4 3162FF00 */ andi $v0, $t3, 0xff00
/* 3A2E38 E00A24A8 00621825 */ or $v1, $v1, $v0
/* 3A2E3C E00A24AC 346300FF */ ori $v1, $v1, 0xff
/* 3A2E40 E00A24B0 29420080 */ slti $v0, $t2, 0x80
/* 3A2E44 E00A24B4 14400002 */ bnez $v0, .LE00A24C0
/* 3A2E48 E00A24B8 ACA30004 */ sw $v1, 4($a1)
/* 3A2E4C E00A24BC 240A007F */ addiu $t2, $zero, 0x7f
.LE00A24C0:
/* 3A2E50 E00A24C0 29020080 */ slti $v0, $t0, 0x80
/* 3A2E54 E00A24C4 50400001 */ beql $v0, $zero, .LE00A24CC
/* 3A2E58 E00A24C8 2408007F */ addiu $t0, $zero, 0x7f
.LE00A24CC:
/* 3A2E5C E00A24CC 29220080 */ slti $v0, $t1, 0x80
/* 3A2E60 E00A24D0 50400001 */ beql $v0, $zero, .LE00A24D8
/* 3A2E64 E00A24D4 2409007F */ addiu $t1, $zero, 0x7f
.LE00A24D8:
/* 3A2E68 E00A24D8 0000282D */ daddu $a1, $zero, $zero
/* 3A2E6C E00A24DC 24C20008 */ addiu $v0, $a2, 8
/* 3A2E70 E00A24E0 AE020000 */ sw $v0, ($s0)
/* 3A2E74 E00A24E4 3C02FB00 */ lui $v0, 0xfb00
/* 3A2E78 E00A24E8 000A1E00 */ sll $v1, $t2, 0x18
/* 3A2E7C E00A24EC ACC20000 */ sw $v0, ($a2)
/* 3A2E80 E00A24F0 310200FF */ andi $v0, $t0, 0xff
/* 3A2E84 E00A24F4 00021400 */ sll $v0, $v0, 0x10
/* 3A2E88 E00A24F8 00621825 */ or $v1, $v1, $v0
/* 3A2E8C E00A24FC 312200FF */ andi $v0, $t1, 0xff
/* 3A2E90 E00A2500 00021200 */ sll $v0, $v0, 8
/* 3A2E94 E00A2504 00621825 */ or $v1, $v1, $v0
/* 3A2E98 E00A2508 C7A00048 */ lwc1 $f0, 0x48($sp)
/* 3A2E9C E00A250C 44952000 */ mtc1 $s5, $f4
/* 3A2EA0 E00A2510 00000000 */ nop
/* 3A2EA4 E00A2514 46802120 */ cvt.s.w $f4, $f4
/* 3A2EA8 E00A2518 ACC30004 */ sw $v1, 4($a2)
/* 3A2EAC E00A251C 46040001 */ sub.s $f0, $f0, $f4
/* 3A2EB0 E00A2520 C7A2004C */ lwc1 $f2, 0x4c($sp)
/* 3A2EB4 E00A2524 00151840 */ sll $v1, $s5, 1
/* 3A2EB8 E00A2528 46041081 */ sub.s $f2, $f2, $f4
/* 3A2EBC E00A252C 4600018D */ trunc.w.s $f6, $f0
/* 3A2EC0 E00A2530 44133000 */ mfc1 $s3, $f6
/* 3A2EC4 E00A2534 00000000 */ nop
/* 3A2EC8 E00A2538 02637021 */ addu $t6, $s3, $v1
/* 3A2ECC E00A253C 4600118D */ trunc.w.s $f6, $f2
/* 3A2ED0 E00A2540 44023000 */ mfc1 $v0, $f6
/* 3A2ED4 E00A2544 00000000 */ nop
/* 3A2ED8 E00A2548 00432021 */ addu $a0, $v0, $v1
/* 3A2EDC E00A254C 06610002 */ bgez $s3, .LE00A2558
/* 3A2EE0 E00A2550 0040582D */ daddu $t3, $v0, $zero
/* 3A2EE4 E00A2554 00132823 */ negu $a1, $s3
.LE00A2558:
/* 3A2EE8 E00A2558 05610002 */ bgez $t3, .LE00A2564
/* 3A2EEC E00A255C 0000182D */ daddu $v1, $zero, $zero
/* 3A2EF0 E00A2560 000B1823 */ negu $v1, $t3
.LE00A2564:
/* 3A2EF4 E00A2564 29C20141 */ slti $v0, $t6, 0x141
/* 3A2EF8 E00A2568 50400001 */ beql $v0, $zero, .LE00A2570
/* 3A2EFC E00A256C 240E013F */ addiu $t6, $zero, 0x13f
.LE00A2570:
/* 3A2F00 E00A2570 288200F1 */ slti $v0, $a0, 0xf1
/* 3A2F04 E00A2574 50400001 */ beql $v0, $zero, .LE00A257C
/* 3A2F08 E00A2578 240400EF */ addiu $a0, $zero, 0xef
.LE00A257C:
/* 3A2F0C E00A257C 16400002 */ bnez $s2, .LE00A2588
/* 3A2F10 E00A2580 0072001A */ div $zero, $v1, $s2
/* 3A2F14 E00A2584 0007000D */ break 7
.LE00A2588:
/* 3A2F18 E00A2588 2401FFFF */ addiu $at, $zero, -1
/* 3A2F1C E00A258C 16410004 */ bne $s2, $at, .LE00A25A0
/* 3A2F20 E00A2590 3C018000 */ lui $at, 0x8000
/* 3A2F24 E00A2594 14610002 */ bne $v1, $at, .LE00A25A0
/* 3A2F28 E00A2598 00000000 */ nop
/* 3A2F2C E00A259C 0006000D */ break 6
.LE00A25A0:
/* 3A2F30 E00A25A0 00005012 */ mflo $t2
/* 3A2F34 E00A25A4 008B1023 */ subu $v0, $a0, $t3
/* 3A2F38 E00A25A8 16400002 */ bnez $s2, .LE00A25B4
/* 3A2F3C E00A25AC 0052001A */ div $zero, $v0, $s2
/* 3A2F40 E00A25B0 0007000D */ break 7
.LE00A25B4:
/* 3A2F44 E00A25B4 2401FFFF */ addiu $at, $zero, -1
/* 3A2F48 E00A25B8 16410004 */ bne $s2, $at, .LE00A25CC
/* 3A2F4C E00A25BC 3C018000 */ lui $at, 0x8000
/* 3A2F50 E00A25C0 14410002 */ bne $v0, $at, .LE00A25CC
/* 3A2F54 E00A25C4 00000000 */ nop
/* 3A2F58 E00A25C8 0006000D */ break 6
.LE00A25CC:
/* 3A2F5C E00A25CC 0000B012 */ mflo $s6
/* 3A2F60 E00A25D0 0156102A */ slt $v0, $t2, $s6
/* 3A2F64 E00A25D4 104000D5 */ beqz $v0, .LE00A292C
/* 3A2F68 E00A25D8 AFB60054 */ sw $s6, 0x54($sp)
/* 3A2F6C E00A25DC 01520018 */ mult $t2, $s2
/* 3A2F70 E00A25E0 0265A821 */ addu $s5, $s3, $a1
/* 3A2F74 E00A25E4 01D51023 */ subu $v0, $t6, $s5
/* 3A2F78 E00A25E8 00021040 */ sll $v0, $v0, 1
/* 3A2F7C E00A25EC AFA2005C */ sw $v0, 0x5c($sp)
/* 3A2F80 E00A25F0 0000B012 */ mflo $s6
/* 3A2F84 E00A25F4 02CB4821 */ addu $t1, $s6, $t3
.LE00A25F8:
/* 3A2F88 E00A25F8 01321021 */ addu $v0, $t1, $s2
/* 3A2F8C E00A25FC 284200F0 */ slti $v0, $v0, 0xf0
/* 3A2F90 E00A2600 104000CA */ beqz $v0, .LE00A292C
/* 3A2F94 E00A2604 0120582D */ daddu $t3, $t1, $zero
/* 3A2F98 E00A2608 00093080 */ sll $a2, $t1, 2
/* 3A2F9C E00A260C 00C91021 */ addu $v0, $a2, $t1
/* 3A2FA0 E00A2610 000211C0 */ sll $v0, $v0, 7
/* 3A2FA4 E00A2614 8FB6005C */ lw $s6, 0x5c($sp)
/* 3A2FA8 E00A2618 44932000 */ mtc1 $s3, $f4
/* 3A2FAC E00A261C 00000000 */ nop
/* 3A2FB0 E00A2620 46802120 */ cvt.s.w $f4, $f4
/* 3A2FB4 E00A2624 AFA20058 */ sw $v0, 0x58($sp)
/* 3A2FB8 E00A2628 26C20007 */ addiu $v0, $s6, 7
/* 3A2FBC E00A262C 000210C3 */ sra $v0, $v0, 3
/* 3A2FC0 E00A2630 304201FF */ andi $v0, $v0, 0x1ff
/* 3A2FC4 E00A2634 8FB60060 */ lw $s6, 0x60($sp)
/* 3A2FC8 E00A2638 00021240 */ sll $v0, $v0, 9
/* 3A2FCC E00A263C 00567825 */ or $t7, $v0, $s6
/* 3A2FD0 E00A2640 00151080 */ sll $v0, $s5, 2
/* 3A2FD4 E00A2644 30420FFF */ andi $v0, $v0, 0xfff
/* 3A2FD8 E00A2648 00026B00 */ sll $t5, $v0, 0xc
/* 3A2FDC E00A264C 3C16F400 */ lui $s6, 0xf400
/* 3A2FE0 E00A2650 01B6B025 */ or $s6, $t5, $s6
/* 3A2FE4 E00A2654 25C2FFFF */ addiu $v0, $t6, -1
/* 3A2FE8 E00A2658 00021080 */ sll $v0, $v0, 2
/* 3A2FEC E00A265C 30420FFF */ andi $v0, $v0, 0xfff
/* 3A2FF0 E00A2660 0002CB00 */ sll $t9, $v0, 0xc
/* 3A2FF4 E00A2664 2642FFFF */ addiu $v0, $s2, -1
/* 3A2FF8 E00A2668 00021080 */ sll $v0, $v0, 2
/* 3A2FFC E00A266C 30580FFF */ andi $t8, $v0, 0xfff
/* 3A3000 E00A2670 3C020700 */ lui $v0, 0x700
/* 3A3004 E00A2674 03021025 */ or $v0, $t8, $v0
/* 3A3008 E00A2678 AFB60064 */ sw $s6, 0x64($sp)
/* 3A300C E00A267C C6200008 */ lwc1 $f0, 8($s1)
/* 3A3010 E00A2680 03221025 */ or $v0, $t9, $v0
/* 3A3014 E00A2684 46002002 */ mul.s $f0, $f4, $f0
/* 3A3018 E00A2688 00000000 */ nop
/* 3A301C E00A268C AFA20068 */ sw $v0, 0x68($sp)
/* 3A3020 E00A2690 8E220014 */ lw $v0, 0x14($s1)
/* 3A3024 E00A2694 8E050000 */ lw $a1, ($s0)
/* 3A3028 E00A2698 8E230004 */ lw $v1, 4($s1)
/* 3A302C E00A269C 01420018 */ mult $t2, $v0
/* 3A3030 E00A26A0 00A0382D */ daddu $a3, $a1, $zero
/* 3A3034 E00A26A4 00031080 */ sll $v0, $v1, 2
/* 3A3038 E00A26A8 00431021 */ addu $v0, $v0, $v1
/* 3A303C E00A26AC 4600018D */ trunc.w.s $f6, $f0
/* 3A3040 E00A26B0 44043000 */ mfc1 $a0, $f6
/* 3A3044 E00A26B4 0000B012 */ mflo $s6
/* 3A3048 E00A26B8 C620000C */ lwc1 $f0, 0xc($s1)
/* 3A304C E00A26BC 44961000 */ mtc1 $s6, $f2
/* 3A3050 E00A26C0 00000000 */ nop
/* 3A3054 E00A26C4 468010A0 */ cvt.s.w $f2, $f2
/* 3A3058 E00A26C8 46001082 */ mul.s $f2, $f2, $f0
/* 3A305C E00A26CC 00000000 */ nop
/* 3A3060 E00A26D0 00021080 */ sll $v0, $v0, 2
/* 3A3064 E00A26D4 24A50008 */ addiu $a1, $a1, 8
/* 3A3068 E00A26D8 00042080 */ sll $a0, $a0, 2
/* 3A306C E00A26DC 44820000 */ mtc1 $v0, $f0
/* 3A3070 E00A26E0 00000000 */ nop
/* 3A3074 E00A26E4 46800020 */ cvt.s.w $f0, $f0
/* 3A3078 E00A26E8 46020001 */ sub.s $f0, $f0, $f2
/* 3A307C E00A26EC 30840FFF */ andi $a0, $a0, 0xfff
/* 3A3080 E00A26F0 00042300 */ sll $a0, $a0, 0xc
/* 3A3084 E00A26F4 4600018D */ trunc.w.s $f6, $f0
/* 3A3088 E00A26F8 44023000 */ mfc1 $v0, $f6
/* 3A308C E00A26FC 00000000 */ nop
/* 3A3090 E00A2700 00021080 */ sll $v0, $v0, 2
/* 3A3094 E00A2704 30420FFF */ andi $v0, $v0, 0xfff
/* 3A3098 E00A2708 3C16F200 */ lui $s6, 0xf200
/* 3A309C E00A270C 00561025 */ or $v0, $v0, $s6
/* 3A30A0 E00A2710 00822025 */ or $a0, $a0, $v0
/* 3A30A4 E00A2714 32A201FF */ andi $v0, $s5, 0x1ff
/* 3A30A8 E00A2718 ACE40000 */ sw $a0, ($a3)
/* 3A30AC E00A271C C6200008 */ lwc1 $f0, 8($s1)
/* 3A30B0 E00A2720 00021540 */ sll $v0, $v0, 0x15
/* 3A30B4 E00A2724 AFA20070 */ sw $v0, 0x70($sp)
/* 3A30B8 E00A2728 46002102 */ mul.s $f4, $f4, $f0
/* 3A30BC E00A272C 00000000 */ nop
/* 3A30C0 E00A2730 C6200000 */ lwc1 $f0, ($s1)
/* 3A30C4 E00A2734 46800020 */ cvt.s.w $f0, $f0
/* 3A30C8 E00A2738 AE050000 */ sw $a1, ($s0)
/* 3A30CC E00A273C 8E220014 */ lw $v0, 0x14($s1)
/* 3A30D0 E00A2740 01420018 */ mult $t2, $v0
/* 3A30D4 E00A2744 0000602D */ daddu $t4, $zero, $zero
/* 3A30D8 E00A2748 30C60FFF */ andi $a2, $a2, 0xfff
/* 3A30DC E00A274C 01A6F025 */ or $fp, $t5, $a2
/* 3A30E0 E00A2750 8E240004 */ lw $a0, 4($s1)
/* 3A30E4 E00A2754 46002100 */ add.s $f4, $f4, $f0
/* 3A30E8 E00A2758 00041080 */ sll $v0, $a0, 2
/* 3A30EC E00A275C 00441021 */ addu $v0, $v0, $a0
/* 3A30F0 E00A2760 4600218D */ trunc.w.s $f6, $f4
/* 3A30F4 E00A2764 44033000 */ mfc1 $v1, $f6
/* 3A30F8 E00A2768 0000B012 */ mflo $s6
/* 3A30FC E00A276C C620000C */ lwc1 $f0, 0xc($s1)
/* 3A3100 E00A2770 44961000 */ mtc1 $s6, $f2
/* 3A3104 E00A2774 00000000 */ nop
/* 3A3108 E00A2778 468010A0 */ cvt.s.w $f2, $f2
/* 3A310C E00A277C 46001082 */ mul.s $f2, $f2, $f0
/* 3A3110 E00A2780 00000000 */ nop
/* 3A3114 E00A2784 00021080 */ sll $v0, $v0, 2
/* 3A3118 E00A2788 00441021 */ addu $v0, $v0, $a0
/* 3A311C E00A278C 00031880 */ sll $v1, $v1, 2
/* 3A3120 E00A2790 44820000 */ mtc1 $v0, $f0
/* 3A3124 E00A2794 00000000 */ nop
/* 3A3128 E00A2798 46800020 */ cvt.s.w $f0, $f0
/* 3A312C E00A279C 46020001 */ sub.s $f0, $f0, $f2
/* 3A3130 E00A27A0 30630FFF */ andi $v1, $v1, 0xfff
/* 3A3134 E00A27A4 00031B00 */ sll $v1, $v1, 0xc
/* 3A3138 E00A27A8 4600018D */ trunc.w.s $f6, $f0
/* 3A313C E00A27AC 44023000 */ mfc1 $v0, $f6
/* 3A3140 E00A27B0 00000000 */ nop
/* 3A3144 E00A27B4 00021080 */ sll $v0, $v0, 2
/* 3A3148 E00A27B8 30420FFF */ andi $v0, $v0, 0xfff
/* 3A314C E00A27BC 00621825 */ or $v1, $v1, $v0
/* 3A3150 E00A27C0 ACE30004 */ sw $v1, 4($a3)
.LE00A27C4:
/* 3A3154 E00A27C4 3C02FD10 */ lui $v0, 0xfd10
/* 3A3158 E00A27C8 3442013F */ ori $v0, $v0, 0x13f
/* 3A315C E00A27CC 3C060702 */ lui $a2, 0x702
/* 3A3160 E00A27D0 34C60090 */ ori $a2, $a2, 0x90
/* 3A3164 E00A27D4 3C070102 */ lui $a3, 0x102
/* 3A3168 E00A27D8 34E70090 */ ori $a3, $a3, 0x90
/* 3A316C E00A27DC 3C080400 */ lui $t0, 0x400
/* 3A3170 E00A27E0 35080400 */ ori $t0, $t0, 0x400
/* 3A3174 E00A27E4 258C0001 */ addiu $t4, $t4, 1
/* 3A3178 E00A27E8 8E050000 */ lw $a1, ($s0)
/* 3A317C E00A27EC 3C03800A */ lui $v1, %hi(nuGfxCfb_ptr)
/* 3A3180 E00A27F0 8C63A64C */ lw $v1, %lo(nuGfxCfb_ptr)($v1)
/* 3A3184 E00A27F4 00A0202D */ daddu $a0, $a1, $zero
/* 3A3188 E00A27F8 24A50008 */ addiu $a1, $a1, 8
/* 3A318C E00A27FC AE050000 */ sw $a1, ($s0)
/* 3A3190 E00A2800 AC820000 */ sw $v0, ($a0)
/* 3A3194 E00A2804 8FB60058 */ lw $s6, 0x58($sp)
/* 3A3198 E00A2808 3C028000 */ lui $v0, 0x8000
/* 3A319C E00A280C 00761821 */ addu $v1, $v1, $s6
/* 3A31A0 E00A2810 00621821 */ addu $v1, $v1, $v0
/* 3A31A4 E00A2814 24A20008 */ addiu $v0, $a1, 8
/* 3A31A8 E00A2818 AC830004 */ sw $v1, 4($a0)
/* 3A31AC E00A281C AE020000 */ sw $v0, ($s0)
/* 3A31B0 E00A2820 24A20010 */ addiu $v0, $a1, 0x10
/* 3A31B4 E00A2824 ACAF0000 */ sw $t7, ($a1)
/* 3A31B8 E00A2828 ACA60004 */ sw $a2, 4($a1)
/* 3A31BC E00A282C AE020000 */ sw $v0, ($s0)
/* 3A31C0 E00A2830 3C02E600 */ lui $v0, 0xe600
/* 3A31C4 E00A2834 ACA20008 */ sw $v0, 8($a1)
/* 3A31C8 E00A2838 24A20018 */ addiu $v0, $a1, 0x18
/* 3A31CC E00A283C ACA0000C */ sw $zero, 0xc($a1)
/* 3A31D0 E00A2840 AE020000 */ sw $v0, ($s0)
/* 3A31D4 E00A2844 24A20020 */ addiu $v0, $a1, 0x20
/* 3A31D8 E00A2848 000E2080 */ sll $a0, $t6, 2
/* 3A31DC E00A284C 30840FFF */ andi $a0, $a0, 0xfff
/* 3A31E0 E00A2850 8FB60064 */ lw $s6, 0x64($sp)
/* 3A31E4 E00A2854 00042300 */ sll $a0, $a0, 0xc
/* 3A31E8 E00A2858 ACB60010 */ sw $s6, 0x10($a1)
/* 3A31EC E00A285C 8FB60068 */ lw $s6, 0x68($sp)
/* 3A31F0 E00A2860 3C03E400 */ lui $v1, 0xe400
/* 3A31F4 E00A2864 ACB60014 */ sw $s6, 0x14($a1)
/* 3A31F8 E00A2868 3C16E700 */ lui $s6, 0xe700
/* 3A31FC E00A286C AE020000 */ sw $v0, ($s0)
/* 3A3200 E00A2870 24A20028 */ addiu $v0, $a1, 0x28
/* 3A3204 E00A2874 ACB60018 */ sw $s6, 0x18($a1)
/* 3A3208 E00A2878 ACA0001C */ sw $zero, 0x1c($a1)
/* 3A320C E00A287C AE020000 */ sw $v0, ($s0)
/* 3A3210 E00A2880 24A20030 */ addiu $v0, $a1, 0x30
/* 3A3214 E00A2884 3C16F200 */ lui $s6, 0xf200
/* 3A3218 E00A2888 ACAF0020 */ sw $t7, 0x20($a1)
/* 3A321C E00A288C ACA70024 */ sw $a3, 0x24($a1)
/* 3A3220 E00A2890 AE020000 */ sw $v0, ($s0)
/* 3A3224 E00A2894 01B61025 */ or $v0, $t5, $s6
/* 3A3228 E00A2898 ACA20028 */ sw $v0, 0x28($a1)
/* 3A322C E00A289C 3C020100 */ lui $v0, 0x100
/* 3A3230 E00A28A0 03021025 */ or $v0, $t8, $v0
/* 3A3234 E00A28A4 03221025 */ or $v0, $t9, $v0
/* 3A3238 E00A28A8 ACA2002C */ sw $v0, 0x2c($a1)
/* 3A323C E00A28AC 24A20038 */ addiu $v0, $a1, 0x38
/* 3A3240 E00A28B0 AE020000 */ sw $v0, ($s0)
/* 3A3244 E00A28B4 01721021 */ addu $v0, $t3, $s2
/* 3A3248 E00A28B8 00021080 */ sll $v0, $v0, 2
/* 3A324C E00A28BC 30420FFF */ andi $v0, $v0, 0xfff
/* 3A3250 E00A28C0 00431025 */ or $v0, $v0, $v1
/* 3A3254 E00A28C4 00822025 */ or $a0, $a0, $v0
/* 3A3258 E00A28C8 24A20040 */ addiu $v0, $a1, 0x40
/* 3A325C E00A28CC ACA40030 */ sw $a0, 0x30($a1)
/* 3A3260 E00A28D0 ACBE0034 */ sw $fp, 0x34($a1)
/* 3A3264 E00A28D4 AE020000 */ sw $v0, ($s0)
/* 3A3268 E00A28D8 3C02E100 */ lui $v0, 0xe100
/* 3A326C E00A28DC ACA20038 */ sw $v0, 0x38($a1)
/* 3A3270 E00A28E0 8FB60070 */ lw $s6, 0x70($sp)
/* 3A3274 E00A28E4 24A20048 */ addiu $v0, $a1, 0x48
/* 3A3278 E00A28E8 ACB6003C */ sw $s6, 0x3c($a1)
/* 3A327C E00A28EC AE020000 */ sw $v0, ($s0)
/* 3A3280 E00A28F0 3C02F100 */ lui $v0, 0xf100
/* 3A3284 E00A28F4 ACA20040 */ sw $v0, 0x40($a1)
/* 3A3288 E00A28F8 24A20050 */ addiu $v0, $a1, 0x50
/* 3A328C E00A28FC ACA80044 */ sw $t0, 0x44($a1)
/* 3A3290 E00A2900 AE020000 */ sw $v0, ($s0)
/* 3A3294 E00A2904 3C16E700 */ lui $s6, 0xe700
/* 3A3298 E00A2908 29820002 */ slti $v0, $t4, 2
/* 3A329C E00A290C ACB60048 */ sw $s6, 0x48($a1)
/* 3A32A0 E00A2910 1440FFAC */ bnez $v0, .LE00A27C4
/* 3A32A4 E00A2914 ACA0004C */ sw $zero, 0x4c($a1)
/* 3A32A8 E00A2918 8FB60054 */ lw $s6, 0x54($sp)
/* 3A32AC E00A291C 254A0001 */ addiu $t2, $t2, 1
/* 3A32B0 E00A2920 0156102A */ slt $v0, $t2, $s6
/* 3A32B4 E00A2924 1440FF34 */ bnez $v0, .LE00A25F8
/* 3A32B8 E00A2928 01324821 */ addu $t1, $t1, $s2
.LE00A292C:
/* 3A32BC E00A292C 26F70004 */ addiu $s7, $s7, 4
.LE00A2930:
/* 3A32C0 E00A2930 26820010 */ addiu $v0, $s4, 0x10
/* 3A32C4 E00A2934 8FB6006C */ lw $s6, 0x6c($sp)
/* 3A32C8 E00A2938 02E2102A */ slt $v0, $s7, $v0
/* 3A32CC E00A293C 26D60004 */ addiu $s6, $s6, 4
/* 3A32D0 E00A2940 1440FE75 */ bnez $v0, .LE00A2318
/* 3A32D4 E00A2944 AFB6006C */ sw $s6, 0x6c($sp)
/* 3A32D8 E00A2948 0000182D */ daddu $v1, $zero, $zero
/* 3A32DC E00A294C 27A80018 */ addiu $t0, $sp, 0x18
/* 3A32E0 E00A2950 27A70028 */ addiu $a3, $sp, 0x28
/* 3A32E4 E00A2954 27A60038 */ addiu $a2, $sp, 0x38
.LE00A2958:
/* 3A32E8 E00A2958 24650001 */ addiu $a1, $v1, 1
/* 3A32EC E00A295C 00052080 */ sll $a0, $a1, 2
/* 3A32F0 E00A2960 02842021 */ addu $a0, $s4, $a0
/* 3A32F4 E00A2964 00031880 */ sll $v1, $v1, 2
/* 3A32F8 E00A2968 01031021 */ addu $v0, $t0, $v1
/* 3A32FC E00A296C C4400000 */ lwc1 $f0, ($v0)
/* 3A3300 E00A2970 46800020 */ cvt.s.w $f0, $f0
/* 3A3304 E00A2974 00E31021 */ addu $v0, $a3, $v1
/* 3A3308 E00A2978 E480003C */ swc1 $f0, 0x3c($a0)
/* 3A330C E00A297C C4400000 */ lwc1 $f0, ($v0)
/* 3A3310 E00A2980 00C31821 */ addu $v1, $a2, $v1
/* 3A3314 E00A2984 E480001C */ swc1 $f0, 0x1c($a0)
/* 3A3318 E00A2988 C4600000 */ lwc1 $f0, ($v1)
/* 3A331C E00A298C 00A0182D */ daddu $v1, $a1, $zero
/* 3A3320 E00A2990 28620003 */ slti $v0, $v1, 3
/* 3A3324 E00A2994 1440FFF0 */ bnez $v0, .LE00A2958
/* 3A3328 E00A2998 E480002C */ swc1 $f0, 0x2c($a0)
/* 3A332C E00A299C 8FBF009C */ lw $ra, 0x9c($sp)
/* 3A3330 E00A29A0 8FBE0098 */ lw $fp, 0x98($sp)
/* 3A3334 E00A29A4 8FB70094 */ lw $s7, 0x94($sp)
/* 3A3338 E00A29A8 8FB60090 */ lw $s6, 0x90($sp)
/* 3A333C E00A29AC 8FB5008C */ lw $s5, 0x8c($sp)
/* 3A3340 E00A29B0 8FB40088 */ lw $s4, 0x88($sp)
/* 3A3344 E00A29B4 8FB30084 */ lw $s3, 0x84($sp)
/* 3A3348 E00A29B8 8FB20080 */ lw $s2, 0x80($sp)
/* 3A334C E00A29BC 8FB1007C */ lw $s1, 0x7c($sp)
/* 3A3350 E00A29C0 8FB00078 */ lw $s0, 0x78($sp)
/* 3A3354 E00A29C4 03E00008 */ jr $ra
/* 3A3358 E00A29C8 27BD00A0 */ addiu $sp, $sp, 0xa0
/* 3A335C E00A29CC 00000000 */ nop

View File

@ -1,190 +0,0 @@
.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel npc_do_other_npc_collision
/* 1440C 8003900C 27BDFFA0 */ addiu $sp, $sp, -0x60
/* 14410 80039010 AFB1001C */ sw $s1, 0x1c($sp)
/* 14414 80039014 0080882D */ daddu $s1, $a0, $zero
/* 14418 80039018 AFBF0028 */ sw $ra, 0x28($sp)
/* 1441C 8003901C AFB30024 */ sw $s3, 0x24($sp)
/* 14420 80039020 AFB20020 */ sw $s2, 0x20($sp)
/* 14424 80039024 AFB00018 */ sw $s0, 0x18($sp)
/* 14428 80039028 F7BE0058 */ sdc1 $f30, 0x58($sp)
/* 1442C 8003902C F7BC0050 */ sdc1 $f28, 0x50($sp)
/* 14430 80039030 F7BA0048 */ sdc1 $f26, 0x48($sp)
/* 14434 80039034 F7B80040 */ sdc1 $f24, 0x40($sp)
/* 14438 80039038 F7B60038 */ sdc1 $f22, 0x38($sp)
/* 1443C 8003903C F7B40030 */ sdc1 $f20, 0x30($sp)
/* 14440 80039040 8E230000 */ lw $v1, ($s1)
/* 14444 80039044 30620100 */ andi $v0, $v1, 0x100
/* 14448 80039048 14400096 */ bnez $v0, .L800392A4
/* 1444C 8003904C 3C02FDFF */ lui $v0, 0xfdff
/* 14450 80039050 3442FFFF */ ori $v0, $v0, 0xffff
/* 14454 80039054 0000902D */ daddu $s2, $zero, $zero
/* 14458 80039058 3C130400 */ lui $s3, 0x400
/* 1445C 8003905C C63E0038 */ lwc1 $f30, 0x38($s1)
/* 14460 80039060 C626003C */ lwc1 $f6, 0x3c($s1)
/* 14464 80039064 3C013F00 */ lui $at, 0x3f00
/* 14468 80039068 44811000 */ mtc1 $at, $f2
/* 1446C 8003906C 00621024 */ and $v0, $v1, $v0
/* 14470 80039070 E7A60010 */ swc1 $f6, 0x10($sp)
/* 14474 80039074 AE220000 */ sw $v0, ($s1)
/* 14478 80039078 862200A6 */ lh $v0, 0xa6($s1)
/* 1447C 8003907C C63C0040 */ lwc1 $f28, 0x40($s1)
/* 14480 80039080 44820000 */ mtc1 $v0, $f0
/* 14484 80039084 00000000 */ nop
/* 14488 80039088 46800020 */ cvt.s.w $f0, $f0
/* 1448C 8003908C 46020002 */ mul.s $f0, $f0, $f2
/* 14490 80039090 00000000 */ nop
/* 14494 80039094 E7A00014 */ swc1 $f0, 0x14($sp)
.L80039098:
/* 14498 80039098 0C00E2B7 */ jal get_npc_by_index
/* 1449C 8003909C 0240202D */ daddu $a0, $s2, $zero
/* 144A0 800390A0 0040802D */ daddu $s0, $v0, $zero
/* 144A4 800390A4 5200007A */ beql $s0, $zero, .L80039290
/* 144A8 800390A8 26520001 */ addiu $s2, $s2, 1
/* 144AC 800390AC 52300078 */ beql $s1, $s0, .L80039290
/* 144B0 800390B0 26520001 */ addiu $s2, $s2, 1
/* 144B4 800390B4 8E030000 */ lw $v1, ($s0)
/* 144B8 800390B8 50600075 */ beql $v1, $zero, .L80039290
/* 144BC 800390BC 26520001 */ addiu $s2, $s2, 1
/* 144C0 800390C0 3C028000 */ lui $v0, 0x8000
/* 144C4 800390C4 34420100 */ ori $v0, $v0, 0x100
/* 144C8 800390C8 00621024 */ and $v0, $v1, $v0
/* 144CC 800390CC 54400070 */ bnel $v0, $zero, .L80039290
/* 144D0 800390D0 26520001 */ addiu $s2, $s2, 1
/* 144D4 800390D4 860200A8 */ lh $v0, 0xa8($s0)
/* 144D8 800390D8 C602003C */ lwc1 $f2, 0x3c($s0)
/* 144DC 800390DC 44820000 */ mtc1 $v0, $f0
/* 144E0 800390E0 00000000 */ nop
/* 144E4 800390E4 46800020 */ cvt.s.w $f0, $f0
/* 144E8 800390E8 46001000 */ add.s $f0, $f2, $f0
/* 144EC 800390EC C7A60010 */ lwc1 $f6, 0x10($sp)
/* 144F0 800390F0 4606003C */ c.lt.s $f0, $f6
/* 144F4 800390F4 00000000 */ nop
/* 144F8 800390F8 45030065 */ bc1tl .L80039290
/* 144FC 800390FC 26520001 */ addiu $s2, $s2, 1
/* 14500 80039100 862200A8 */ lh $v0, 0xa8($s1)
/* 14504 80039104 44820000 */ mtc1 $v0, $f0
/* 14508 80039108 00000000 */ nop
/* 1450C 8003910C 46800020 */ cvt.s.w $f0, $f0
/* 14510 80039110 46003000 */ add.s $f0, $f6, $f0
/* 14514 80039114 4602003C */ c.lt.s $f0, $f2
/* 14518 80039118 00000000 */ nop
/* 1451C 8003911C 4503005C */ bc1tl .L80039290
/* 14520 80039120 26520001 */ addiu $s2, $s2, 1
/* 14524 80039124 C6140038 */ lwc1 $f20, 0x38($s0)
/* 14528 80039128 461EA581 */ sub.s $f22, $f20, $f30
/* 1452C 8003912C 4616B082 */ mul.s $f2, $f22, $f22
/* 14530 80039130 00000000 */ nop
/* 14534 80039134 C61A0040 */ lwc1 $f26, 0x40($s0)
/* 14538 80039138 461CD101 */ sub.s $f4, $f26, $f28
/* 1453C 8003913C 46042002 */ mul.s $f0, $f4, $f4
/* 14540 80039140 00000000 */ nop
/* 14544 80039144 860200A6 */ lh $v0, 0xa6($s0)
/* 14548 80039148 46001300 */ add.s $f12, $f2, $f0
/* 1454C 8003914C 3C013F00 */ lui $at, 0x3f00
/* 14550 80039150 44811000 */ mtc1 $at, $f2
/* 14554 80039154 44820000 */ mtc1 $v0, $f0
/* 14558 80039158 00000000 */ nop
/* 1455C 8003915C 46800020 */ cvt.s.w $f0, $f0
/* 14560 80039160 46020582 */ mul.s $f22, $f0, $f2
/* 14564 80039164 00000000 */ nop
/* 14568 80039168 46006104 */ sqrt.s $f4, $f12
/* 1456C 8003916C 46042032 */ c.eq.s $f4, $f4
/* 14570 80039170 00000000 */ nop
/* 14574 80039174 45010004 */ bc1t .L80039188
/* 14578 80039178 00000000 */ nop
/* 1457C 8003917C 0C0187BC */ jal sqrtf
/* 14580 80039180 00000000 */ nop
/* 14584 80039184 46000106 */ mov.s $f4, $f0
.L80039188:
/* 14588 80039188 C7A60014 */ lwc1 $f6, 0x14($sp)
/* 1458C 8003918C 46163000 */ add.s $f0, $f6, $f22
/* 14590 80039190 46002606 */ mov.s $f24, $f4
/* 14594 80039194 4618003E */ c.le.s $f0, $f24
/* 14598 80039198 00000000 */ nop
/* 1459C 8003919C 4503003C */ bc1tl .L80039290
/* 145A0 800391A0 26520001 */ addiu $s2, $s2, 1
/* 145A4 800391A4 8E220000 */ lw $v0, ($s1)
/* 145A8 800391A8 00531024 */ and $v0, $v0, $s3
/* 145AC 800391AC 10400005 */ beqz $v0, .L800391C4
/* 145B0 800391B0 0000182D */ daddu $v1, $zero, $zero
/* 145B4 800391B4 3C028011 */ lui $v0, %hi(gPartnerActionStatus)
/* 145B8 800391B8 8042EBB0 */ lb $v0, %lo(gPartnerActionStatus)($v0)
/* 145BC 800391BC 0800E479 */ j .L800391E4
/* 145C0 800391C0 2C430001 */ sltiu $v1, $v0, 1
.L800391C4:
/* 145C4 800391C4 8E020000 */ lw $v0, ($s0)
/* 145C8 800391C8 00531024 */ and $v0, $v0, $s3
/* 145CC 800391CC 50400005 */ beql $v0, $zero, .L800391E4
/* 145D0 800391D0 24030001 */ addiu $v1, $zero, 1
/* 145D4 800391D4 3C028011 */ lui $v0, %hi(gPartnerActionStatus)
/* 145D8 800391D8 8042EBB0 */ lb $v0, %lo(gPartnerActionStatus)($v0)
/* 145DC 800391DC 50400001 */ beql $v0, $zero, .L800391E4
/* 145E0 800391E0 24030001 */ addiu $v1, $zero, 1
.L800391E4:
/* 145E4 800391E4 10600025 */ beqz $v1, .L8003927C
/* 145E8 800391E8 00000000 */ nop
/* 145EC 800391EC 4600A306 */ mov.s $f12, $f20
/* 145F0 800391F0 4406F000 */ mfc1 $a2, $f30
/* 145F4 800391F4 4407E000 */ mfc1 $a3, $f28
/* 145F8 800391F8 0C00A720 */ jal atan2
/* 145FC 800391FC 4600D386 */ mov.s $f14, $f26
/* 14600 80039200 3C0140C9 */ lui $at, 0x40c9
/* 14604 80039204 34210FD0 */ ori $at, $at, 0xfd0
/* 14608 80039208 44811000 */ mtc1 $at, $f2
/* 1460C 8003920C 00000000 */ nop
/* 14610 80039210 46020502 */ mul.s $f20, $f0, $f2
/* 14614 80039214 00000000 */ nop
/* 14618 80039218 C7A60014 */ lwc1 $f6, 0x14($sp)
/* 1461C 8003921C 46163000 */ add.s $f0, $f6, $f22
/* 14620 80039220 3C0143B4 */ lui $at, 0x43b4
/* 14624 80039224 44811000 */ mtc1 $at, $f2
/* 14628 80039228 46180601 */ sub.s $f24, $f0, $f24
/* 1462C 8003922C 4602A503 */ div.s $f20, $f20, $f2
/* 14630 80039230 0C00A85B */ jal sin_rad
/* 14634 80039234 4600A306 */ mov.s $f12, $f20
/* 14638 80039238 4600C582 */ mul.s $f22, $f24, $f0
/* 1463C 8003923C 00000000 */ nop
/* 14640 80039240 0C00A874 */ jal cos_rad
/* 14644 80039244 4600A306 */ mov.s $f12, $f20
/* 14648 80039248 4600C087 */ neg.s $f2, $f24
/* 1464C 8003924C 46001102 */ mul.s $f4, $f2, $f0
/* 14650 80039250 00000000 */ nop
/* 14654 80039254 3C013DCC */ lui $at, 0x3dcc
/* 14658 80039258 3421CCCD */ ori $at, $at, 0xcccd
/* 1465C 8003925C 44813000 */ mtc1 $at, $f6
/* 14660 80039260 00000000 */ nop
/* 14664 80039264 4606B002 */ mul.s $f0, $f22, $f6
/* 14668 80039268 00000000 */ nop
/* 1466C 8003926C 46062082 */ mul.s $f2, $f4, $f6
/* 14670 80039270 00000000 */ nop
/* 14674 80039274 4600F780 */ add.s $f30, $f30, $f0
/* 14678 80039278 4602E700 */ add.s $f28, $f28, $f2
.L8003927C:
/* 1467C 8003927C 8E220000 */ lw $v0, ($s1)
/* 14680 80039280 3C030200 */ lui $v1, 0x200
/* 14684 80039284 00431025 */ or $v0, $v0, $v1
/* 14688 80039288 AE220000 */ sw $v0, ($s1)
/* 1468C 8003928C 26520001 */ addiu $s2, $s2, 1
.L80039290:
/* 14690 80039290 2A420040 */ slti $v0, $s2, 0x40
/* 14694 80039294 1440FF80 */ bnez $v0, .L80039098
/* 14698 80039298 00000000 */ nop
/* 1469C 8003929C E63E0038 */ swc1 $f30, 0x38($s1)
/* 146A0 800392A0 E63C0040 */ swc1 $f28, 0x40($s1)
.L800392A4:
/* 146A4 800392A4 8FBF0028 */ lw $ra, 0x28($sp)
/* 146A8 800392A8 8FB30024 */ lw $s3, 0x24($sp)
/* 146AC 800392AC 8FB20020 */ lw $s2, 0x20($sp)
/* 146B0 800392B0 8FB1001C */ lw $s1, 0x1c($sp)
/* 146B4 800392B4 8FB00018 */ lw $s0, 0x18($sp)
/* 146B8 800392B8 D7BE0058 */ ldc1 $f30, 0x58($sp)
/* 146BC 800392BC D7BC0050 */ ldc1 $f28, 0x50($sp)
/* 146C0 800392C0 D7BA0048 */ ldc1 $f26, 0x48($sp)
/* 146C4 800392C4 D7B80040 */ ldc1 $f24, 0x40($sp)
/* 146C8 800392C8 D7B60038 */ ldc1 $f22, 0x38($sp)
/* 146CC 800392CC D7B40030 */ ldc1 $f20, 0x30($sp)
/* 146D0 800392D0 03E00008 */ jr $ra
/* 146D4 800392D4 27BD0060 */ addiu $sp, $sp, 0x60

View File

@ -27,8 +27,8 @@ glabel npc_do_player_collision
/* 1472C 8003932C 0800E597 */ j .L8003965C /* 1472C 8003932C 0800E597 */ j .L8003965C
/* 14730 80039330 0000102D */ daddu $v0, $zero, $zero /* 14730 80039330 0000102D */ daddu $v0, $zero, $zero
.L80039334: .L80039334:
/* 14734 80039334 3C02800A */ lui $v0, %hi(D_800A0B94) /* 14734 80039334 3C02800A */ lui $v0, %hi(gNpcPlayerCollisionsEnabled)
/* 14738 80039338 80420B94 */ lb $v0, %lo(D_800A0B94)($v0) /* 14738 80039338 80420B94 */ lb $v0, %lo(gNpcPlayerCollisionsEnabled)($v0)
/* 1473C 8003933C 504000C7 */ beql $v0, $zero, .L8003965C /* 1473C 8003933C 504000C7 */ beql $v0, $zero, .L8003965C
/* 14740 80039340 0000102D */ daddu $v0, $zero, $zero /* 14740 80039340 0000102D */ daddu $v0, $zero, $zero
/* 14744 80039344 860200B0 */ lh $v0, 0xb0($s0) /* 14744 80039344 860200B0 */ lh $v0, 0xb0($s0)

View File

@ -1,144 +0,0 @@
.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel func_80244550_A2E790
/* A2E790 80244550 27BDFFB8 */ addiu $sp, $sp, -0x48
/* A2E794 80244554 AFB60028 */ sw $s6, 0x28($sp)
/* A2E798 80244558 0080B02D */ daddu $s6, $a0, $zero
/* A2E79C 8024455C AFB00010 */ sw $s0, 0x10($sp)
/* A2E7A0 80244560 00A0802D */ daddu $s0, $a1, $zero
/* A2E7A4 80244564 AFBF002C */ sw $ra, 0x2c($sp)
/* A2E7A8 80244568 AFB50024 */ sw $s5, 0x24($sp)
/* A2E7AC 8024456C AFB40020 */ sw $s4, 0x20($sp)
/* A2E7B0 80244570 AFB3001C */ sw $s3, 0x1c($sp)
/* A2E7B4 80244574 AFB20018 */ sw $s2, 0x18($sp)
/* A2E7B8 80244578 AFB10014 */ sw $s1, 0x14($sp)
/* A2E7BC 8024457C F7B80040 */ sdc1 $f24, 0x40($sp)
/* A2E7C0 80244580 F7B60038 */ sdc1 $f22, 0x38($sp)
/* A2E7C4 80244584 F7B40030 */ sdc1 $f20, 0x30($sp)
/* A2E7C8 80244588 0C0B36B0 */ jal resolve_npc
/* A2E7CC 8024458C 24050009 */ addiu $a1, $zero, 9
/* A2E7D0 80244590 02C0202D */ daddu $a0, $s6, $zero
/* A2E7D4 80244594 3C05F4AC */ lui $a1, 0xf4ac
/* A2E7D8 80244598 34A5D480 */ ori $a1, $a1, 0xd480
/* A2E7DC 8024459C 0C0B1EAF */ jal evt_get_variable
/* A2E7E0 802445A0 0040A02D */ daddu $s4, $v0, $zero
/* A2E7E4 802445A4 1200002B */ beqz $s0, .L80244654
/* A2E7E8 802445A8 0040A82D */ daddu $s5, $v0, $zero
/* A2E7EC 802445AC 0000802D */ daddu $s0, $zero, $zero
/* A2E7F0 802445B0 3C138025 */ lui $s3, %hi(hos_05_StarSpiritsPosZ)
/* A2E7F4 802445B4 2673F358 */ addiu $s3, $s3, %lo(hos_05_StarSpiritsPosZ)
/* A2E7F8 802445B8 3C128025 */ lui $s2, %hi(hos_05_StarSpiritsPosY)
/* A2E7FC 802445BC 2652F338 */ addiu $s2, $s2, %lo(hos_05_StarSpiritsPosY)
/* A2E800 802445C0 C6800038 */ lwc1 $f0, 0x38($s4)
/* A2E804 802445C4 C682003C */ lwc1 $f2, 0x3c($s4)
/* A2E808 802445C8 C6840040 */ lwc1 $f4, 0x40($s4)
/* A2E80C 802445CC 3C118025 */ lui $s1, %hi(hos_05_StarSpiritsPosX)
/* A2E810 802445D0 2631F318 */ addiu $s1, $s1, %lo(hos_05_StarSpiritsPosX)
/* A2E814 802445D4 3C018025 */ lui $at, %hi(hos_05_D_8024F2FC)
/* A2E818 802445D8 E420F2FC */ swc1 $f0, %lo(hos_05_D_8024F2FC)($at)
/* A2E81C 802445DC 3C018025 */ lui $at, %hi(hos_05_D_8024F300)
/* A2E820 802445E0 E422F300 */ swc1 $f2, %lo(hos_05_D_8024F300)($at)
/* A2E824 802445E4 3C018025 */ lui $at, %hi(hos_05_D_8024F304)
/* A2E828 802445E8 E424F304 */ swc1 $f4, %lo(hos_05_D_8024F304)($at)
.L802445EC:
/* A2E82C 802445EC 02C0202D */ daddu $a0, $s6, $zero
/* A2E830 802445F0 0C0B36B0 */ jal resolve_npc
/* A2E834 802445F4 0200282D */ daddu $a1, $s0, $zero
/* A2E838 802445F8 C4400038 */ lwc1 $f0, 0x38($v0)
/* A2E83C 802445FC 26100001 */ addiu $s0, $s0, 1
/* A2E840 80244600 E6200000 */ swc1 $f0, ($s1)
/* A2E844 80244604 C440003C */ lwc1 $f0, 0x3c($v0)
/* A2E848 80244608 26310004 */ addiu $s1, $s1, 4
/* A2E84C 8024460C E6400000 */ swc1 $f0, ($s2)
/* A2E850 80244610 26520004 */ addiu $s2, $s2, 4
/* A2E854 80244614 C4400040 */ lwc1 $f0, 0x40($v0)
/* A2E858 80244618 2A020007 */ slti $v0, $s0, 7
/* A2E85C 8024461C E6600000 */ swc1 $f0, ($s3)
/* A2E860 80244620 1440FFF2 */ bnez $v0, .L802445EC
/* A2E864 80244624 26730004 */ addiu $s3, $s3, 4
/* A2E868 80244628 8EA2000C */ lw $v0, 0xc($s5)
/* A2E86C 8024462C 0040182D */ daddu $v1, $v0, $zero
/* A2E870 80244630 C4440004 */ lwc1 $f4, 4($v0)
/* A2E874 80244634 C4400008 */ lwc1 $f0, 8($v0)
/* A2E878 80244638 C462000C */ lwc1 $f2, 0xc($v1)
/* A2E87C 8024463C 3C018025 */ lui $at, %hi(hos_05_D_8024F308)
/* A2E880 80244640 E424F308 */ swc1 $f4, %lo(hos_05_D_8024F308)($at)
/* A2E884 80244644 3C018025 */ lui $at, %hi(hos_05_D_8024F30C)
/* A2E888 80244648 E420F30C */ swc1 $f0, %lo(hos_05_D_8024F30C)($at)
/* A2E88C 8024464C 3C018025 */ lui $at, %hi(hos_05_D_8024F310)
/* A2E890 80244650 E422F310 */ swc1 $f2, %lo(hos_05_D_8024F310)($at)
.L80244654:
/* A2E894 80244654 0000802D */ daddu $s0, $zero, $zero
/* A2E898 80244658 C6820038 */ lwc1 $f2, 0x38($s4)
/* A2E89C 8024465C 3C018025 */ lui $at, %hi(hos_05_D_8024F2FC)
/* A2E8A0 80244660 C420F2FC */ lwc1 $f0, %lo(hos_05_D_8024F2FC)($at)
/* A2E8A4 80244664 3C138025 */ lui $s3, %hi(hos_05_StarSpiritsPosZ)
/* A2E8A8 80244668 2673F358 */ addiu $s3, $s3, %lo(hos_05_StarSpiritsPosZ)
/* A2E8AC 8024466C 46001501 */ sub.s $f20, $f2, $f0
/* A2E8B0 80244670 C682003C */ lwc1 $f2, 0x3c($s4)
/* A2E8B4 80244674 3C018025 */ lui $at, %hi(hos_05_D_8024F300)
/* A2E8B8 80244678 C420F300 */ lwc1 $f0, %lo(hos_05_D_8024F300)($at)
/* A2E8BC 8024467C 3C128025 */ lui $s2, %hi(hos_05_StarSpiritsPosY)
/* A2E8C0 80244680 2652F338 */ addiu $s2, $s2, %lo(hos_05_StarSpiritsPosY)
/* A2E8C4 80244684 46001581 */ sub.s $f22, $f2, $f0
/* A2E8C8 80244688 C6820040 */ lwc1 $f2, 0x40($s4)
/* A2E8CC 8024468C 3C018025 */ lui $at, %hi(hos_05_D_8024F304)
/* A2E8D0 80244690 C420F304 */ lwc1 $f0, %lo(hos_05_D_8024F304)($at)
/* A2E8D4 80244694 3C118025 */ lui $s1, %hi(hos_05_StarSpiritsPosX)
/* A2E8D8 80244698 2631F318 */ addiu $s1, $s1, %lo(hos_05_StarSpiritsPosX)
/* A2E8DC 8024469C 46001601 */ sub.s $f24, $f2, $f0
.L802446A0:
/* A2E8E0 802446A0 02C0202D */ daddu $a0, $s6, $zero
/* A2E8E4 802446A4 0C0B36B0 */ jal resolve_npc
/* A2E8E8 802446A8 0200282D */ daddu $a1, $s0, $zero
/* A2E8EC 802446AC C6200000 */ lwc1 $f0, ($s1)
/* A2E8F0 802446B0 46140000 */ add.s $f0, $f0, $f20
/* A2E8F4 802446B4 E4400038 */ swc1 $f0, 0x38($v0)
/* A2E8F8 802446B8 C6400000 */ lwc1 $f0, ($s2)
/* A2E8FC 802446BC 46160000 */ add.s $f0, $f0, $f22
/* A2E900 802446C0 26100001 */ addiu $s0, $s0, 1
/* A2E904 802446C4 E440003C */ swc1 $f0, 0x3c($v0)
/* A2E908 802446C8 C6600000 */ lwc1 $f0, ($s3)
/* A2E90C 802446CC 26310004 */ addiu $s1, $s1, 4
/* A2E910 802446D0 46180000 */ add.s $f0, $f0, $f24
/* A2E914 802446D4 C442003C */ lwc1 $f2, 0x3c($v0)
/* A2E918 802446D8 26520004 */ addiu $s2, $s2, 4
/* A2E91C 802446DC E4400040 */ swc1 $f0, 0x40($v0)
/* A2E920 802446E0 C4400038 */ lwc1 $f0, 0x38($v0)
/* A2E924 802446E4 C4440040 */ lwc1 $f4, 0x40($v0)
/* A2E928 802446E8 E4420070 */ swc1 $f2, 0x70($v0)
/* A2E92C 802446EC E440006C */ swc1 $f0, 0x6c($v0)
/* A2E930 802446F0 E4440074 */ swc1 $f4, 0x74($v0)
/* A2E934 802446F4 2A020007 */ slti $v0, $s0, 7
/* A2E938 802446F8 1440FFE9 */ bnez $v0, .L802446A0
/* A2E93C 802446FC 26730004 */ addiu $s3, $s3, 4
/* A2E940 80244700 3C018025 */ lui $at, %hi(hos_05_D_8024F308)
/* A2E944 80244704 C420F308 */ lwc1 $f0, %lo(hos_05_D_8024F308)($at)
/* A2E948 80244708 46140000 */ add.s $f0, $f0, $f20
/* A2E94C 8024470C 3C018025 */ lui $at, %hi(hos_05_D_8024F30C)
/* A2E950 80244710 C422F30C */ lwc1 $f2, %lo(hos_05_D_8024F30C)($at)
/* A2E954 80244714 8EA2000C */ lw $v0, 0xc($s5)
/* A2E958 80244718 46161080 */ add.s $f2, $f2, $f22
/* A2E95C 8024471C E4400004 */ swc1 $f0, 4($v0)
/* A2E960 80244720 3C018025 */ lui $at, %hi(hos_05_D_8024F310)
/* A2E964 80244724 C420F310 */ lwc1 $f0, %lo(hos_05_D_8024F310)($at)
/* A2E968 80244728 8EA2000C */ lw $v0, 0xc($s5)
/* A2E96C 8024472C 46180000 */ add.s $f0, $f0, $f24
/* A2E970 80244730 E4420008 */ swc1 $f2, 8($v0)
/* A2E974 80244734 8EA3000C */ lw $v1, 0xc($s5)
/* A2E978 80244738 E460000C */ swc1 $f0, 0xc($v1)
/* A2E97C 8024473C 8FBF002C */ lw $ra, 0x2c($sp)
/* A2E980 80244740 8FB60028 */ lw $s6, 0x28($sp)
/* A2E984 80244744 8FB50024 */ lw $s5, 0x24($sp)
/* A2E988 80244748 8FB40020 */ lw $s4, 0x20($sp)
/* A2E98C 8024474C 8FB3001C */ lw $s3, 0x1c($sp)
/* A2E990 80244750 8FB20018 */ lw $s2, 0x18($sp)
/* A2E994 80244754 8FB10014 */ lw $s1, 0x14($sp)
/* A2E998 80244758 8FB00010 */ lw $s0, 0x10($sp)
/* A2E99C 8024475C D7B80040 */ ldc1 $f24, 0x40($sp)
/* A2E9A0 80244760 D7B60038 */ ldc1 $f22, 0x38($sp)
/* A2E9A4 80244764 D7B40030 */ ldc1 $f20, 0x30($sp)
/* A2E9A8 80244768 0000102D */ daddu $v0, $zero, $zero
/* A2E9AC 8024476C 03E00008 */ jr $ra
/* A2E9B0 80244770 27BD0048 */ addiu $sp, $sp, 0x48

View File

@ -2763,7 +2763,7 @@ gWorldNpcList = 0x800A0990; // rom:0x7BD90
func_800E29C8 = 0x800E29C8; // type:func rom:0x7BE78 func_800E29C8 = 0x800E29C8; // type:func rom:0x7BE78
gBattleNpcList = 0x800A0A90; // rom:0x7BE90 gBattleNpcList = 0x800A0A90; // rom:0x7BE90
gCurrentNpcListPtr = 0x800A0B90; // rom:0x7BF90 gCurrentNpcListPtr = 0x800A0B90; // rom:0x7BF90
D_800A0B94 = 0x800A0B94; // type:data rom:0x7BF94 gNpcPlayerCollisionsEnabled = 0x800A0B94; // type:data rom:0x7BF94
D_800A0B98 = 0x800A0B98; // type:data rom:0x7BF98 D_800A0B98 = 0x800A0B98; // type:data rom:0x7BF98
D_800A0BA0 = 0x800A0BA0; // type:data rom:0x7BFA0 D_800A0BA0 = 0x800A0BA0; // type:data rom:0x7BFA0
D_800A0BA4 = 0x800A0BA4; // type:data rom:0x7BFA4 D_800A0BA4 = 0x800A0BA4; // type:data rom:0x7BFA4