Match func_802552EC (#573)

* Match func_802552EC

* Delete func_802552EC.s

* Clean-up

* actor

* Update functions.h

* oops

* Match update_actor_shadow
This commit is contained in:
JoshDuMan 2021-12-27 21:55:35 -05:00 committed by GitHub
parent 2f23f46775
commit fe374e5fb1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 289 additions and 830 deletions

View File

@ -86,7 +86,7 @@ void func_80257B28(s32);
void func_8025595C(Actor*);
void func_80257B68(Actor*);
void func_80257B48(s32);
void func_8025599C(s32);
void func_8025599C(Actor*);
void func_80257B88(void);
void func_80257DA4(void);
void func_80254C50(Actor*);

View File

@ -1,5 +1,6 @@
#include "common.h"
#include "sprite.h"
#include "battle/battle.h"
s32 func_80254250(void) {
s32 ret;
@ -354,25 +355,300 @@ void func_802550BC(s32 arg0, Actor* actor) {
}
}
INCLUDE_ASM(s32, "182B30", func_802552EC);
void func_802552EC(s32 arg0, Actor* actor) {
DecorationTable* decorationTable;
ActorPart* partTable;
Matrix4f sp18;
Matrix4f sp58;
Matrix4f sp98;
Matrix4f spD8;
Matrix4f sp118;
Matrix4f sp158;
Matrix4f sp198;
Matrix4f sp1D8;
Matrix4f sp218;
Matrix4f sp258;
Matrix4f sp298;
Matrix4f sp2D8;
s32 numParts;
s32 i, j, k, l;
f32 x, y, z;
f32 rotX, rotY, rotZ;
s32 scale;
s32 opacity;
s32 pivotX;
s32 pivotY;
s32 phi_fp;
s32 phi_s6;
s32 temp;
s32 flags;
void func_8025593C(s32 arg0) {
func_802550BC(0, arg0);
guRotateF(sp18, actor->rotation.x, 1.0f, 0.0f, 0.0f);
guRotateF(sp58, actor->rotation.y, 0.0f, 1.0f, 0.0f);
guRotateF(sp98, actor->rotation.z, 0.0f, 0.0f, 1.0f);
guMtxCatF(sp18, sp58, sp198);
guMtxCatF(sp198, sp98, spD8);
guScaleF(sp118, actor->scale.x * (5.0 / 7.0) * actor->scalingFactor,
actor->scale.y * (5.0 / 7.0) * actor->scalingFactor,
actor->scale.z * (5.0 / 7.0));
guMtxCatF(sp118, spD8, sp298);
numParts = actor->numParts;
partTable = actor->partsTable;
for (i = 0; i < numParts; i++) {
if ((partTable->idleAnimations == NULL) || (partTable->flags & ACTOR_PART_FLAG_2)) {
partTable = partTable->nextPart;
continue;
}
decorationTable = partTable->decorationTable;
if (decorationTable->effectType != 0) {
decorationTable->effectType--;
if (decorationTable->effectType == 0) {
actor->flags &= ~ACTOR_FLAG_10000000;
partTable = partTable->nextPart;
continue;
}
}
if (partTable->flags & ACTOR_PART_FLAG_INVISIBLE) {
partTable = partTable->nextPart;
continue;
}
if (partTable->flags & ACTOR_PART_FLAG_100000) {
guScaleF(sp2D8, actor->scale.x * (5.0 / 7.0), actor->scale.y * (5.0 / 7.0), actor->scale.z * (5.0 / 7.0));
}
j = decorationTable->unk_7D9;
k = 0;
l = 0;
while (1) {
j--;
k++;
if (j < 0) {
j = 15;
}
if (j == decorationTable->unk_7D9) {
break;
}
if (k < 3) {
continue;
}
k = 0;
l++;
if (decorationTable->unk_7DA < l) {
break;
}
opacity = partTable->opacity;
x = decorationTable->posX[j];
y = decorationTable->posY[j];
z = decorationTable->posZ[j];
scale = decorationTable->scale[j];
pivotX = decorationTable->rotationPivotOffsetX[j];
pivotY = decorationTable->rotationPivotOffsetY[j];
rotX = decorationTable->rotX[j] * 2;
rotY = decorationTable->rotY[j] * 2;
rotZ = decorationTable->rotZ[j] * 2;
phi_fp = 120;
phi_s6 = 20;
if (opacity < 50) {
phi_fp = 50;
phi_s6 = 8;
} else if (opacity < 100) {
phi_fp = 70;
phi_s6 = 10;
} else if (opacity < 150) {
phi_fp = 100;
phi_s6 = 15;
}
if (!(actor->flags & ACTOR_FLAG_HP_OFFSET_BELOW)) {
guTranslateF(sp218, -pivotX, -pivotY, 0.0f);
guTranslateF(sp258, pivotX, pivotY, 0.0f);
} else {
guTranslateF(sp218, -pivotX, pivotY, 0.0f);
guTranslateF(sp258, pivotX, -pivotY, 0.0f);
}
guTranslateF(sp158, x, y, z);
guRotateF(sp18, rotX, 1.0f, 0.0f, 0.0f);
guRotateF(sp58, rotY, 0.0f, 1.0f, 0.0f);
guRotateF(sp98, rotZ, 0.0f, 0.0f, 1.0f);
guMtxCatF(sp58, sp18, sp198);
guMtxCatF(sp198, sp98, spD8);
guScaleF(sp118, partTable->scale.x, partTable->scale.y * partTable->verticalStretch, partTable->scale.z);
guMtxCatF(sp118, sp218, sp1D8);
guMtxCatF(sp1D8, spD8, sp198);
guMtxCatF(sp198, sp258, sp1D8);
if (!(partTable->flags & ACTOR_PART_FLAG_100000)) {
guMtxCatF(sp1D8, sp298, sp198);
} else {
guMtxCatF(sp1D8, sp2D8, sp198);
}
guMtxCatF(sp198, sp158, sp1D8);
flags = ACTOR_PART_FLAG_80000000;
temp = phi_fp - l * phi_s6;
if (arg0 == 0) {
spr_draw_npc_sprite(partTable->unk_84 | flags, scale, temp, 0, sp1D8);
} else {
spr_draw_npc_sprite(partTable->unk_84 | flags, clamp_angle(scale + 0xB4), temp, 0, sp1D8);
}
}
}
}
void func_8025593C(Actor* actor) {
func_802550BC(0, actor);
}
void func_8025595C(Actor* actor) {
func_802552EC(0, actor);
}
void func_8025597C(s32 arg0) {
func_802550BC(1, arg0);
void func_8025597C(Actor* actor) {
func_802550BC(1, actor);
}
void func_8025599C(s32 arg0) {
func_802552EC(1, arg0);
void func_8025599C(Actor* actor) {
func_802552EC(1, actor);
}
INCLUDE_ASM(s32, "182B30", update_actor_shadow);
void update_actor_shadow(s32 arg0, Actor* actor) {
Camera* camera = &gCameras[1];
ActorPart* actorPart;
Shadow* shadow;
s32 numParts;
f32 x1, y1, z1;
f32 x2, y2, z2;
f32 dist;
s32 spriteID;
f32 yaw;
s32 i;
if (actor != NULL) {
shadow = get_shadow_by_index((s32) actor->shadow);
shadow->flags |= SHADOW_FLAGS_1;
if (!(actor->flags & ACTOR_FLAG_DISABLED)) {
if (actor->flags & ACTOR_FLAG_10000000) {
if (arg0 == 0) {
func_8025593C(actor);
} else {
func_8025597C(actor);
}
}
actor->renderMode = RENDER_MODE_ALPHATEST;
x1 = actor->currentPos.x + actor->headOffset.x;
if (!(actor->flags & ACTOR_FLAG_HP_OFFSET_BELOW)) {
y1 = actor->currentPos.y + actor->headOffset.y;
} else {
y1 = actor->currentPos.y - actor->headOffset.y;
}
z1 = actor->currentPos.z + actor->headOffset.z;
numParts = actor->numParts;
actorPart = actor->partsTable;
for (i = 0; i < numParts; i++) {
if (!(actorPart->flags & ACTOR_PART_FLAG_INVISIBLE) && actorPart->idleAnimations != NULL) {
spriteID = actorPart->unk_84;
if (spriteID >= 0) {
spr_update_sprite(spriteID, actorPart->currentAnimation, actorPart->animationRate);
actorPart->unk_8C = func_802DE5C8(actorPart->unk_84);
}
if (!(actorPart->flags & ACTOR_PART_FLAG_100000)) {
x2 = x1 + actorPart->partOffset.x + actorPart->visualOffset.x;
if (!(actor->flags & ACTOR_FLAG_HP_OFFSET_BELOW)) {
y2 = y1 + actorPart->partOffset.y + actorPart->visualOffset.y;
} else {
y2 = y1 - actorPart->partOffset.y - actorPart->visualOffset.y;
}
z2 = z1 + actorPart->partOffset.z + actorPart->visualOffset.z;
yaw = actorPart->yaw = actor->yaw;
} else {
x2 = actorPart->absolutePosition.x + actorPart->visualOffset.x;
y2 = actorPart->absolutePosition.y + actorPart->visualOffset.y;
z2 = actorPart->absolutePosition.z + actorPart->visualOffset.z;
yaw = actorPart->yaw;
}
actorPart->currentPos.x = x2;
actorPart->currentPos.y = y2;
actorPart->currentPos.z = z2;
if (!(actorPart->flags & SHADOW_FLAGS_4)) {
shadow = get_shadow_by_index(actorPart->shadowIndex);
shadow->flags &= ~SHADOW_FLAGS_1;
x1 = actorPart->currentPos.x;
if (!(actor->flags & ACTOR_FLAG_HP_OFFSET_BELOW)) {
y1 = actorPart->currentPos.y + 12.0;
} else {
y1 = actorPart->currentPos.y - 12.0;
}
z1 = actorPart->currentPos.z;
dist = 32767.0f;
npc_raycast_down_sides(0, &x1, &y1, &z1, &dist);
if (200.0f < dist) {
shadow->flags |= SHADOW_FLAGS_1;
}
shadow->position.x = x1;
shadow->position.y = y1;
shadow->position.z = z1;
shadow->rotation.y = clamp_angle(yaw - camera->currentYaw);
set_standard_shadow_scale(shadow, dist);
shadow->scale.x *= actorPart->shadowScale;
}
if (actorPart->opacity < 255 || actorPart->flags & ACTOR_PART_FLAG_100) {
actor->renderMode = RENDER_MODE_SURFACE_XLU_LAYER3;
}
}
actorPart = actorPart->nextPart;
}
shadow = get_shadow_by_index((s32) actor->shadow);
if (!(actor->flags & ACTOR_FLAG_NO_SHADOW)) {
shadow->flags &= ~ACTOR_FLAG_DISABLED;
}
x1 = actor->currentPos.x + actor->headOffset.x;
if (!(actor->flags & ACTOR_FLAG_HP_OFFSET_BELOW)) {
y1 = actor->currentPos.y + actor->headOffset.y + 12.0;
} else {
y1 = actor->currentPos.y - actor->headOffset.y + 12.0;
}
z1 = actor->currentPos.z + actor->headOffset.z;
dist = 32767.0f;
npc_raycast_down_sides(0, &x1, &y1, &z1, &dist);
if (200.0f < dist) {
shadow->flags |= SHADOW_FLAGS_1;
}
shadow->position.x = x1;
shadow->position.y = y1;
shadow->position.z = z1 + bActorOffsets[actor->actorType].shadow;
shadow->rotation.y = clamp_angle(actor->yaw - camera->currentYaw);
set_standard_shadow_scale(shadow, dist);
shadow->scale.x *= actor->shadowScale * actor->scalingFactor;
}
}
}
s32 update_enemy_shadows(void) {
BattleStatus* battleStatus = &gBattleStatus;
@ -383,6 +659,8 @@ s32 update_enemy_shadows(void) {
}
}
void update_player_actor_shadow(void);
void update_hero_shadows(void) {
update_actor_shadow(1, gBattleStatus.partnerActor);
update_player_actor_shadow();

View File

@ -348,4 +348,6 @@ typedef struct ActorOffsets {
extern BattleList* D_800DC4FC;
extern ActorOffsets bActorOffsets[ACTOR_TYPE_COUNT];
#endif

View File

@ -1,435 +0,0 @@
.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
.section .rodata
dlabel D_8029D358
.double 0.7142857142857143
dlabel D_8029D360
.double 0.7142857142857143
.section .text
glabel func_802552EC
/* 183BCC 802552EC 27BDFC68 */ addiu $sp, $sp, -0x398
/* 183BD0 802552F0 F7B60370 */ sdc1 $f22, 0x370($sp)
/* 183BD4 802552F4 4480B000 */ mtc1 $zero, $f22
/* 183BD8 802552F8 F7B80378 */ sdc1 $f24, 0x378($sp)
/* 183BDC 802552FC 3C013F80 */ lui $at, 0x3f80
/* 183BE0 80255300 4481C000 */ mtc1 $at, $f24
/* 183BE4 80255304 00A0402D */ daddu $t0, $a1, $zero
/* 183BE8 80255308 AFBF0364 */ sw $ra, 0x364($sp)
/* 183BEC 8025530C AFBE0360 */ sw $fp, 0x360($sp)
/* 183BF0 80255310 AFB7035C */ sw $s7, 0x35c($sp)
/* 183BF4 80255314 AFB60358 */ sw $s6, 0x358($sp)
/* 183BF8 80255318 AFB50354 */ sw $s5, 0x354($sp)
/* 183BFC 8025531C AFB40350 */ sw $s4, 0x350($sp)
/* 183C00 80255320 AFB3034C */ sw $s3, 0x34c($sp)
/* 183C04 80255324 AFB20348 */ sw $s2, 0x348($sp)
/* 183C08 80255328 AFB10344 */ sw $s1, 0x344($sp)
/* 183C0C 8025532C AFB00340 */ sw $s0, 0x340($sp)
/* 183C10 80255330 F7BE0390 */ sdc1 $f30, 0x390($sp)
/* 183C14 80255334 F7BC0388 */ sdc1 $f28, 0x388($sp)
/* 183C18 80255338 F7BA0380 */ sdc1 $f26, 0x380($sp)
/* 183C1C 8025533C F7B40368 */ sdc1 $f20, 0x368($sp)
/* 183C20 80255340 AFA40398 */ sw $a0, 0x398($sp)
/* 183C24 80255344 AFA5039C */ sw $a1, 0x39c($sp)
/* 183C28 80255348 E7B60010 */ swc1 $f22, 0x10($sp)
/* 183C2C 8025534C 8D05015C */ lw $a1, 0x15c($t0)
/* 183C30 80255350 4406C000 */ mfc1 $a2, $f24
/* 183C34 80255354 4407B000 */ mfc1 $a3, $f22
/* 183C38 80255358 0C019EC8 */ jal guRotateF
/* 183C3C 8025535C 27A40018 */ addiu $a0, $sp, 0x18
/* 183C40 80255360 8FA9039C */ lw $t1, 0x39c($sp)
/* 183C44 80255364 4406B000 */ mfc1 $a2, $f22
/* 183C48 80255368 4407C000 */ mfc1 $a3, $f24
/* 183C4C 8025536C 27B50058 */ addiu $s5, $sp, 0x58
/* 183C50 80255370 E7B60010 */ swc1 $f22, 0x10($sp)
/* 183C54 80255374 8D250160 */ lw $a1, 0x160($t1)
/* 183C58 80255378 0C019EC8 */ jal guRotateF
/* 183C5C 8025537C 02A0202D */ daddu $a0, $s5, $zero
/* 183C60 80255380 8FA8039C */ lw $t0, 0x39c($sp)
/* 183C64 80255384 4406B000 */ mfc1 $a2, $f22
/* 183C68 80255388 4407B000 */ mfc1 $a3, $f22
/* 183C6C 8025538C 27B40098 */ addiu $s4, $sp, 0x98
/* 183C70 80255390 E7B80010 */ swc1 $f24, 0x10($sp)
/* 183C74 80255394 8D050164 */ lw $a1, 0x164($t0)
/* 183C78 80255398 0C019EC8 */ jal guRotateF
/* 183C7C 8025539C 0280202D */ daddu $a0, $s4, $zero
/* 183C80 802553A0 27A40018 */ addiu $a0, $sp, 0x18
/* 183C84 802553A4 02A0282D */ daddu $a1, $s5, $zero
/* 183C88 802553A8 27B30198 */ addiu $s3, $sp, 0x198
/* 183C8C 802553AC 0C019D80 */ jal guMtxCatF
/* 183C90 802553B0 0260302D */ daddu $a2, $s3, $zero
/* 183C94 802553B4 0260202D */ daddu $a0, $s3, $zero
/* 183C98 802553B8 0280282D */ daddu $a1, $s4, $zero
/* 183C9C 802553BC 27B100D8 */ addiu $s1, $sp, 0xd8
/* 183CA0 802553C0 0C019D80 */ jal guMtxCatF
/* 183CA4 802553C4 0220302D */ daddu $a2, $s1, $zero
/* 183CA8 802553C8 8FA9039C */ lw $t1, 0x39c($sp)
/* 183CAC 802553CC C5240170 */ lwc1 $f4, 0x170($t1)
/* 183CB0 802553D0 3C01802A */ lui $at, %hi(D_8029D358)
/* 183CB4 802553D4 D434D358 */ ldc1 $f20, %lo(D_8029D358)($at)
/* 183CB8 802553D8 46002121 */ cvt.d.s $f4, $f4
/* 183CBC 802553DC 46342102 */ mul.d $f4, $f4, $f20
/* 183CC0 802553E0 00000000 */ nop
/* 183CC4 802553E4 C5200174 */ lwc1 $f0, 0x174($t1)
/* 183CC8 802553E8 46000021 */ cvt.d.s $f0, $f0
/* 183CCC 802553EC 46340002 */ mul.d $f0, $f0, $f20
/* 183CD0 802553F0 00000000 */ nop
/* 183CD4 802553F4 C5220178 */ lwc1 $f2, 0x178($t1)
/* 183CD8 802553F8 460010A1 */ cvt.d.s $f2, $f2
/* 183CDC 802553FC 46341082 */ mul.d $f2, $f2, $f20
/* 183CE0 80255400 00000000 */ nop
/* 183CE4 80255404 C5260188 */ lwc1 $f6, 0x188($t1)
/* 183CE8 80255408 460031A1 */ cvt.d.s $f6, $f6
/* 183CEC 8025540C 46262102 */ mul.d $f4, $f4, $f6
/* 183CF0 80255410 00000000 */ nop
/* 183CF4 80255414 46260002 */ mul.d $f0, $f0, $f6
/* 183CF8 80255418 00000000 */ nop
/* 183CFC 8025541C 27B00118 */ addiu $s0, $sp, 0x118
/* 183D00 80255420 462010A0 */ cvt.s.d $f2, $f2
/* 183D04 80255424 44071000 */ mfc1 $a3, $f2
/* 183D08 80255428 46202120 */ cvt.s.d $f4, $f4
/* 183D0C 8025542C 46200020 */ cvt.s.d $f0, $f0
/* 183D10 80255430 44052000 */ mfc1 $a1, $f4
/* 183D14 80255434 44060000 */ mfc1 $a2, $f0
/* 183D18 80255438 0200202D */ daddu $a0, $s0, $zero
/* 183D1C 8025543C 0C019DF0 */ jal guScaleF
/* 183D20 80255440 AFA0031C */ sw $zero, 0x31c($sp)
/* 183D24 80255444 0200202D */ daddu $a0, $s0, $zero
/* 183D28 80255448 0220282D */ daddu $a1, $s1, $zero
/* 183D2C 8025544C 0C019D80 */ jal guMtxCatF
/* 183D30 80255450 27A60298 */ addiu $a2, $sp, 0x298
/* 183D34 80255454 8FA8039C */ lw $t0, 0x39c($sp)
/* 183D38 80255458 8FA9039C */ lw $t1, 0x39c($sp)
/* 183D3C 8025545C 810801F3 */ lb $t0, 0x1f3($t0)
/* 183D40 80255460 AFA80318 */ sw $t0, 0x318($sp)
/* 183D44 80255464 8D3201F4 */ lw $s2, 0x1f4($t1)
/* 183D48 80255468 19000122 */ blez $t0, .L802558F4
/* 183D4C 8025546C 4600B506 */ mov.s $f20, $f22
/* 183D50 80255470 0260B82D */ daddu $s7, $s3, $zero
/* 183D54 80255474 AFB50330 */ sw $s5, 0x330($sp)
/* 183D58 80255478 AFB40334 */ sw $s4, 0x334($sp)
.L8025547C:
/* 183D5C 8025547C 8E420094 */ lw $v0, 0x94($s2)
/* 183D60 80255480 10400013 */ beqz $v0, .L802554D0
/* 183D64 80255484 00000000 */ nop
/* 183D68 80255488 8E420000 */ lw $v0, ($s2)
/* 183D6C 8025548C 30420002 */ andi $v0, $v0, 2
/* 183D70 80255490 1440000F */ bnez $v0, .L802554D0
/* 183D74 80255494 00000000 */ nop
/* 183D78 80255498 8E5500C0 */ lw $s5, 0xc0($s2)
/* 183D7C 8025549C 82A208AC */ lb $v0, 0x8ac($s5)
/* 183D80 802554A0 92A308AC */ lbu $v1, 0x8ac($s5)
/* 183D84 802554A4 1040000C */ beqz $v0, .L802554D8
/* 183D88 802554A8 2462FFFF */ addiu $v0, $v1, -1
/* 183D8C 802554AC A2A208AC */ sb $v0, 0x8ac($s5)
/* 183D90 802554B0 00021600 */ sll $v0, $v0, 0x18
/* 183D94 802554B4 14400008 */ bnez $v0, .L802554D8
/* 183D98 802554B8 3C03EFFF */ lui $v1, 0xefff
/* 183D9C 802554BC 8FA8039C */ lw $t0, 0x39c($sp)
/* 183DA0 802554C0 8D020000 */ lw $v0, ($t0)
/* 183DA4 802554C4 3463FFFF */ ori $v1, $v1, 0xffff
/* 183DA8 802554C8 00431024 */ and $v0, $v0, $v1
/* 183DAC 802554CC AD020000 */ sw $v0, ($t0)
.L802554D0:
/* 183DB0 802554D0 08095637 */ j .L802558DC
/* 183DB4 802554D4 8E52000C */ lw $s2, 0xc($s2)
.L802554D8:
/* 183DB8 802554D8 8E430000 */ lw $v1, ($s2)
/* 183DBC 802554DC 30620001 */ andi $v0, $v1, 1
/* 183DC0 802554E0 1440FFFB */ bnez $v0, .L802554D0
/* 183DC4 802554E4 3C020010 */ lui $v0, 0x10
/* 183DC8 802554E8 00621024 */ and $v0, $v1, $v0
/* 183DCC 802554EC 10400019 */ beqz $v0, .L80255554
/* 183DD0 802554F0 27A800D8 */ addiu $t0, $sp, 0xd8
/* 183DD4 802554F4 8FA9039C */ lw $t1, 0x39c($sp)
/* 183DD8 802554F8 C5240170 */ lwc1 $f4, 0x170($t1)
/* 183DDC 802554FC 3C01802A */ lui $at, %hi(D_8029D360)
/* 183DE0 80255500 D428D360 */ ldc1 $f8, %lo(D_8029D360)($at)
/* 183DE4 80255504 46002121 */ cvt.d.s $f4, $f4
/* 183DE8 80255508 46282102 */ mul.d $f4, $f4, $f8
/* 183DEC 8025550C 00000000 */ nop
/* 183DF0 80255510 C5220174 */ lwc1 $f2, 0x174($t1)
/* 183DF4 80255514 460010A1 */ cvt.d.s $f2, $f2
/* 183DF8 80255518 46281082 */ mul.d $f2, $f2, $f8
/* 183DFC 8025551C 00000000 */ nop
/* 183E00 80255520 C5200178 */ lwc1 $f0, 0x178($t1)
/* 183E04 80255524 46000021 */ cvt.d.s $f0, $f0
/* 183E08 80255528 46280002 */ mul.d $f0, $f0, $f8
/* 183E0C 8025552C 00000000 */ nop
/* 183E10 80255530 46202120 */ cvt.s.d $f4, $f4
/* 183E14 80255534 462010A0 */ cvt.s.d $f2, $f2
/* 183E18 80255538 46200020 */ cvt.s.d $f0, $f0
/* 183E1C 8025553C 44052000 */ mfc1 $a1, $f4
/* 183E20 80255540 44061000 */ mfc1 $a2, $f2
/* 183E24 80255544 44070000 */ mfc1 $a3, $f0
/* 183E28 80255548 0C019DF0 */ jal guScaleF
/* 183E2C 8025554C 27A402D8 */ addiu $a0, $sp, 0x2d8
/* 183E30 80255550 27A800D8 */ addiu $t0, $sp, 0xd8
.L80255554:
/* 183E34 80255554 27A90118 */ addiu $t1, $sp, 0x118
/* 183E38 80255558 82B407D9 */ lb $s4, 0x7d9($s5)
/* 183E3C 8025555C 27B301D8 */ addiu $s3, $sp, 0x1d8
/* 183E40 80255560 AFA00320 */ sw $zero, 0x320($sp)
/* 183E44 80255564 AFA00324 */ sw $zero, 0x324($sp)
/* 183E48 80255568 AFA80338 */ sw $t0, 0x338($sp)
/* 183E4C 8025556C AFA9033C */ sw $t1, 0x33c($sp)
.L80255570:
/* 183E50 80255570 8FA80320 */ lw $t0, 0x320($sp)
/* 183E54 80255574 2694FFFF */ addiu $s4, $s4, -1
/* 183E58 80255578 25080001 */ addiu $t0, $t0, 1
/* 183E5C 8025557C 06810002 */ bgez $s4, .L80255588
/* 183E60 80255580 AFA80320 */ sw $t0, 0x320($sp)
/* 183E64 80255584 2414000F */ addiu $s4, $zero, 0xf
.L80255588:
/* 183E68 80255588 82A207D9 */ lb $v0, 0x7d9($s5)
/* 183E6C 8025558C 128200D3 */ beq $s4, $v0, .L802558DC
/* 183E70 80255590 00000000 */ nop
/* 183E74 80255594 8FA90320 */ lw $t1, 0x320($sp)
/* 183E78 80255598 29220003 */ slti $v0, $t1, 3
/* 183E7C 8025559C 1440FFF4 */ bnez $v0, .L80255570
/* 183E80 802555A0 00000000 */ nop
/* 183E84 802555A4 8FA80324 */ lw $t0, 0x324($sp)
/* 183E88 802555A8 AFA00320 */ sw $zero, 0x320($sp)
/* 183E8C 802555AC 82A207DA */ lb $v0, 0x7da($s5)
/* 183E90 802555B0 25080001 */ addiu $t0, $t0, 1
/* 183E94 802555B4 0048102A */ slt $v0, $v0, $t0
/* 183E98 802555B8 144000C8 */ bnez $v0, .L802558DC
/* 183E9C 802555BC AFA80324 */ sw $t0, 0x324($sp)
/* 183EA0 802555C0 241E0078 */ addiu $fp, $zero, 0x78
/* 183EA4 802555C4 00142840 */ sll $a1, $s4, 1
/* 183EA8 802555C8 02A52821 */ addu $a1, $s5, $a1
/* 183EAC 802555CC 02B42021 */ addu $a0, $s5, $s4
/* 183EB0 802555D0 84A207FC */ lh $v0, 0x7fc($a1)
/* 183EB4 802555D4 84A3081C */ lh $v1, 0x81c($a1)
/* 183EB8 802555D8 4482D000 */ mtc1 $v0, $f26
/* 183EBC 802555DC 00000000 */ nop
/* 183EC0 802555E0 4680D6A0 */ cvt.s.w $f26, $f26
/* 183EC4 802555E4 4483E000 */ mtc1 $v1, $f28
/* 183EC8 802555E8 00000000 */ nop
/* 183ECC 802555EC 4680E720 */ cvt.s.w $f28, $f28
/* 183ED0 802555F0 84A3083C */ lh $v1, 0x83c($a1)
/* 183ED4 802555F4 9082087C */ lbu $v0, 0x87c($a0)
/* 183ED8 802555F8 4483B000 */ mtc1 $v1, $f22
/* 183EDC 802555FC 00000000 */ nop
/* 183EE0 80255600 4680B5A0 */ cvt.s.w $f22, $f22
/* 183EE4 80255604 00021040 */ sll $v0, $v0, 1
/* 183EE8 80255608 4482C000 */ mtc1 $v0, $f24
/* 183EEC 8025560C 00000000 */ nop
/* 183EF0 80255610 4680C620 */ cvt.s.w $f24, $f24
/* 183EF4 80255614 9083088C */ lbu $v1, 0x88c($a0)
/* 183EF8 80255618 9082089C */ lbu $v0, 0x89c($a0)
/* 183EFC 8025561C 00031840 */ sll $v1, $v1, 1
/* 183F00 80255620 4483F000 */ mtc1 $v1, $f30
/* 183F04 80255624 00000000 */ nop
/* 183F08 80255628 4680F7A0 */ cvt.s.w $f30, $f30
/* 183F0C 8025562C 00021040 */ sll $v0, $v0, 1
/* 183F10 80255630 86430098 */ lh $v1, 0x98($s2)
/* 183F14 80255634 44824000 */ mtc1 $v0, $f8
/* 183F18 80255638 00000000 */ nop
/* 183F1C 8025563C 46804220 */ cvt.s.w $f8, $f8
/* 183F20 80255640 E7A80328 */ swc1 $f8, 0x328($sp)
/* 183F24 80255644 84A507DC */ lh $a1, 0x7dc($a1)
/* 183F28 80255648 28620032 */ slti $v0, $v1, 0x32
/* 183F2C 8025564C AFA5032C */ sw $a1, 0x32c($sp)
/* 183F30 80255650 8090085C */ lb $s0, 0x85c($a0)
/* 183F34 80255654 8091086C */ lb $s1, 0x86c($a0)
/* 183F38 80255658 10400004 */ beqz $v0, .L8025566C
/* 183F3C 8025565C 24160014 */ addiu $s6, $zero, 0x14
/* 183F40 80255660 241E0032 */ addiu $fp, $zero, 0x32
/* 183F44 80255664 080955A5 */ j .L80255694
/* 183F48 80255668 24160008 */ addiu $s6, $zero, 8
.L8025566C:
/* 183F4C 8025566C 28620064 */ slti $v0, $v1, 0x64
/* 183F50 80255670 10400004 */ beqz $v0, .L80255684
/* 183F54 80255674 28620096 */ slti $v0, $v1, 0x96
/* 183F58 80255678 241E0046 */ addiu $fp, $zero, 0x46
/* 183F5C 8025567C 080955A5 */ j .L80255694
/* 183F60 80255680 2416000A */ addiu $s6, $zero, 0xa
.L80255684:
/* 183F64 80255684 10400003 */ beqz $v0, .L80255694
/* 183F68 80255688 00000000 */ nop
/* 183F6C 8025568C 241E0064 */ addiu $fp, $zero, 0x64
/* 183F70 80255690 2416000F */ addiu $s6, $zero, 0xf
.L80255694:
/* 183F74 80255694 8FA8039C */ lw $t0, 0x39c($sp)
/* 183F78 80255698 8D020000 */ lw $v0, ($t0)
/* 183F7C 8025569C 30420800 */ andi $v0, $v0, 0x800
/* 183F80 802556A0 14400015 */ bnez $v0, .L802556F8
/* 183F84 802556A4 00101023 */ negu $v0, $s0
/* 183F88 802556A8 44824000 */ mtc1 $v0, $f8
/* 183F8C 802556AC 00000000 */ nop
/* 183F90 802556B0 46804220 */ cvt.s.w $f8, $f8
/* 183F94 802556B4 00111023 */ negu $v0, $s1
/* 183F98 802556B8 44054000 */ mfc1 $a1, $f8
/* 183F9C 802556BC 44824000 */ mtc1 $v0, $f8
/* 183FA0 802556C0 00000000 */ nop
/* 183FA4 802556C4 46804220 */ cvt.s.w $f8, $f8
/* 183FA8 802556C8 4407A000 */ mfc1 $a3, $f20
/* 183FAC 802556CC 44064000 */ mfc1 $a2, $f8
/* 183FB0 802556D0 0C019E40 */ jal guTranslateF
/* 183FB4 802556D4 27A40218 */ addiu $a0, $sp, 0x218
/* 183FB8 802556D8 44904000 */ mtc1 $s0, $f8
/* 183FBC 802556DC 00000000 */ nop
/* 183FC0 802556E0 46804220 */ cvt.s.w $f8, $f8
/* 183FC4 802556E4 44054000 */ mfc1 $a1, $f8
/* 183FC8 802556E8 44914000 */ mtc1 $s1, $f8
/* 183FCC 802556EC 00000000 */ nop
/* 183FD0 802556F0 080955D1 */ j .L80255744
/* 183FD4 802556F4 46804220 */ cvt.s.w $f8, $f8
.L802556F8:
/* 183FD8 802556F8 44824000 */ mtc1 $v0, $f8
/* 183FDC 802556FC 00000000 */ nop
/* 183FE0 80255700 46804220 */ cvt.s.w $f8, $f8
/* 183FE4 80255704 44054000 */ mfc1 $a1, $f8
/* 183FE8 80255708 44914000 */ mtc1 $s1, $f8
/* 183FEC 8025570C 00000000 */ nop
/* 183FF0 80255710 46804220 */ cvt.s.w $f8, $f8
/* 183FF4 80255714 4407A000 */ mfc1 $a3, $f20
/* 183FF8 80255718 44064000 */ mfc1 $a2, $f8
/* 183FFC 8025571C 0C019E40 */ jal guTranslateF
/* 184000 80255720 27A40218 */ addiu $a0, $sp, 0x218
/* 184004 80255724 44904000 */ mtc1 $s0, $f8
/* 184008 80255728 00000000 */ nop
/* 18400C 8025572C 46804220 */ cvt.s.w $f8, $f8
/* 184010 80255730 00111023 */ negu $v0, $s1
/* 184014 80255734 44054000 */ mfc1 $a1, $f8
/* 184018 80255738 44824000 */ mtc1 $v0, $f8
/* 18401C 8025573C 00000000 */ nop
/* 184020 80255740 46804220 */ cvt.s.w $f8, $f8
.L80255744:
/* 184024 80255744 4407A000 */ mfc1 $a3, $f20
/* 184028 80255748 44064000 */ mfc1 $a2, $f8
/* 18402C 8025574C 0C019E40 */ jal guTranslateF
/* 184030 80255750 27A40258 */ addiu $a0, $sp, 0x258
/* 184034 80255754 4405D000 */ mfc1 $a1, $f26
/* 184038 80255758 4406E000 */ mfc1 $a2, $f28
/* 18403C 8025575C 4407B000 */ mfc1 $a3, $f22
/* 184040 80255760 0C019E40 */ jal guTranslateF
/* 184044 80255764 27A40158 */ addiu $a0, $sp, 0x158
/* 184048 80255768 4405C000 */ mfc1 $a1, $f24
/* 18404C 8025576C 3C063F80 */ lui $a2, 0x3f80
/* 184050 80255770 4407A000 */ mfc1 $a3, $f20
/* 184054 80255774 27A40018 */ addiu $a0, $sp, 0x18
/* 184058 80255778 0C019EC8 */ jal guRotateF
/* 18405C 8025577C E7B40010 */ swc1 $f20, 0x10($sp)
/* 184060 80255780 4405F000 */ mfc1 $a1, $f30
/* 184064 80255784 4406A000 */ mfc1 $a2, $f20
/* 184068 80255788 3C073F80 */ lui $a3, 0x3f80
/* 18406C 8025578C 8FA40330 */ lw $a0, 0x330($sp)
/* 184070 80255790 0C019EC8 */ jal guRotateF
/* 184074 80255794 E7B40010 */ swc1 $f20, 0x10($sp)
/* 184078 80255798 3C013F80 */ lui $at, 0x3f80
/* 18407C 8025579C 44814000 */ mtc1 $at, $f8
/* 184080 802557A0 8FA50328 */ lw $a1, 0x328($sp)
/* 184084 802557A4 4406A000 */ mfc1 $a2, $f20
/* 184088 802557A8 4407A000 */ mfc1 $a3, $f20
/* 18408C 802557AC 8FA40334 */ lw $a0, 0x334($sp)
/* 184090 802557B0 0C019EC8 */ jal guRotateF
/* 184094 802557B4 E7A80010 */ swc1 $f8, 0x10($sp)
/* 184098 802557B8 27A50018 */ addiu $a1, $sp, 0x18
/* 18409C 802557BC 8FA40330 */ lw $a0, 0x330($sp)
/* 1840A0 802557C0 0C019D80 */ jal guMtxCatF
/* 1840A4 802557C4 02E0302D */ daddu $a2, $s7, $zero
/* 1840A8 802557C8 8FA50334 */ lw $a1, 0x334($sp)
/* 1840AC 802557CC 8FA60338 */ lw $a2, 0x338($sp)
/* 1840B0 802557D0 0C019D80 */ jal guMtxCatF
/* 1840B4 802557D4 02E0202D */ daddu $a0, $s7, $zero
/* 1840B8 802557D8 82420074 */ lb $v0, 0x74($s2)
/* 1840BC 802557DC C6420050 */ lwc1 $f2, 0x50($s2)
/* 1840C0 802557E0 44820000 */ mtc1 $v0, $f0
/* 1840C4 802557E4 00000000 */ nop
/* 1840C8 802557E8 46800020 */ cvt.s.w $f0, $f0
/* 1840CC 802557EC 46001082 */ mul.s $f2, $f2, $f0
/* 1840D0 802557F0 00000000 */ nop
/* 1840D4 802557F4 8E45004C */ lw $a1, 0x4c($s2)
/* 1840D8 802557F8 8E470054 */ lw $a3, 0x54($s2)
/* 1840DC 802557FC 8FA4033C */ lw $a0, 0x33c($sp)
/* 1840E0 80255800 44061000 */ mfc1 $a2, $f2
/* 1840E4 80255804 0C019DF0 */ jal guScaleF
/* 1840E8 80255808 00000000 */ nop
/* 1840EC 8025580C 27A50218 */ addiu $a1, $sp, 0x218
/* 1840F0 80255810 8FA4033C */ lw $a0, 0x33c($sp)
/* 1840F4 80255814 0C019D80 */ jal guMtxCatF
/* 1840F8 80255818 0260302D */ daddu $a2, $s3, $zero
/* 1840FC 8025581C 0260202D */ daddu $a0, $s3, $zero
/* 184100 80255820 8FA50338 */ lw $a1, 0x338($sp)
/* 184104 80255824 0C019D80 */ jal guMtxCatF
/* 184108 80255828 02E0302D */ daddu $a2, $s7, $zero
/* 18410C 8025582C 02E0202D */ daddu $a0, $s7, $zero
/* 184110 80255830 27A50258 */ addiu $a1, $sp, 0x258
/* 184114 80255834 0C019D80 */ jal guMtxCatF
/* 184118 80255838 0260302D */ daddu $a2, $s3, $zero
/* 18411C 8025583C 8E420000 */ lw $v0, ($s2)
/* 184120 80255840 3C030010 */ lui $v1, 0x10
/* 184124 80255844 00431024 */ and $v0, $v0, $v1
/* 184128 80255848 14400003 */ bnez $v0, .L80255858
/* 18412C 8025584C 0260202D */ daddu $a0, $s3, $zero
/* 184130 80255850 08095617 */ j .L8025585C
/* 184134 80255854 27A50298 */ addiu $a1, $sp, 0x298
.L80255858:
/* 184138 80255858 27A502D8 */ addiu $a1, $sp, 0x2d8
.L8025585C:
/* 18413C 8025585C 0C019D80 */ jal guMtxCatF
/* 184140 80255860 02E0302D */ daddu $a2, $s7, $zero
/* 184144 80255864 27A40198 */ addiu $a0, $sp, 0x198
/* 184148 80255868 27A50158 */ addiu $a1, $sp, 0x158
/* 18414C 8025586C 0C019D80 */ jal guMtxCatF
/* 184150 80255870 0260302D */ daddu $a2, $s3, $zero
/* 184154 80255874 8FA80324 */ lw $t0, 0x324($sp)
/* 184158 80255878 01160018 */ mult $t0, $s6
/* 18415C 8025587C 3C118000 */ lui $s1, 0x8000
/* 184160 80255880 8FA80398 */ lw $t0, 0x398($sp)
/* 184164 80255884 00004812 */ mflo $t1
/* 184168 80255888 15000004 */ bnez $t0, .L8025589C
/* 18416C 8025588C 03C98023 */ subu $s0, $fp, $t1
/* 184170 80255890 8FA5032C */ lw $a1, 0x32c($sp)
/* 184174 80255894 08095630 */ j .L802558C0
/* 184178 80255898 0200302D */ daddu $a2, $s0, $zero
.L8025589C:
/* 18417C 8025589C 8FA9032C */ lw $t1, 0x32c($sp)
/* 184180 802558A0 252200B4 */ addiu $v0, $t1, 0xb4
/* 184184 802558A4 44826000 */ mtc1 $v0, $f12
/* 184188 802558A8 00000000 */ nop
/* 18418C 802558AC 0C00A6C9 */ jal clamp_angle
/* 184190 802558B0 46806320 */ cvt.s.w $f12, $f12
/* 184194 802558B4 4600020D */ trunc.w.s $f8, $f0
/* 184198 802558B8 44054000 */ mfc1 $a1, $f8
/* 18419C 802558BC 0200302D */ daddu $a2, $s0, $zero
.L802558C0:
/* 1841A0 802558C0 8E440084 */ lw $a0, 0x84($s2)
/* 1841A4 802558C4 0000382D */ daddu $a3, $zero, $zero
/* 1841A8 802558C8 AFB30010 */ sw $s3, 0x10($sp)
/* 1841AC 802558CC 0C0B78F6 */ jal spr_draw_npc_sprite
/* 1841B0 802558D0 00912025 */ or $a0, $a0, $s1
/* 1841B4 802558D4 0809555C */ j .L80255570
/* 1841B8 802558D8 00000000 */ nop
.L802558DC:
/* 1841BC 802558DC 8FA9031C */ lw $t1, 0x31c($sp)
/* 1841C0 802558E0 8FA80318 */ lw $t0, 0x318($sp)
/* 1841C4 802558E4 25290001 */ addiu $t1, $t1, 1
/* 1841C8 802558E8 0128102A */ slt $v0, $t1, $t0
/* 1841CC 802558EC 1440FEE3 */ bnez $v0, .L8025547C
/* 1841D0 802558F0 AFA9031C */ sw $t1, 0x31c($sp)
.L802558F4:
/* 1841D4 802558F4 8FBF0364 */ lw $ra, 0x364($sp)
/* 1841D8 802558F8 8FBE0360 */ lw $fp, 0x360($sp)
/* 1841DC 802558FC 8FB7035C */ lw $s7, 0x35c($sp)
/* 1841E0 80255900 8FB60358 */ lw $s6, 0x358($sp)
/* 1841E4 80255904 8FB50354 */ lw $s5, 0x354($sp)
/* 1841E8 80255908 8FB40350 */ lw $s4, 0x350($sp)
/* 1841EC 8025590C 8FB3034C */ lw $s3, 0x34c($sp)
/* 1841F0 80255910 8FB20348 */ lw $s2, 0x348($sp)
/* 1841F4 80255914 8FB10344 */ lw $s1, 0x344($sp)
/* 1841F8 80255918 8FB00340 */ lw $s0, 0x340($sp)
/* 1841FC 8025591C D7BE0390 */ ldc1 $f30, 0x390($sp)
/* 184200 80255920 D7BC0388 */ ldc1 $f28, 0x388($sp)
/* 184204 80255924 D7BA0380 */ ldc1 $f26, 0x380($sp)
/* 184208 80255928 D7B80378 */ ldc1 $f24, 0x378($sp)
/* 18420C 8025592C D7B60370 */ ldc1 $f22, 0x370($sp)
/* 184210 80255930 D7B40368 */ ldc1 $f20, 0x368($sp)
/* 184214 80255934 03E00008 */ jr $ra
/* 184218 80255938 27BD0398 */ addiu $sp, $sp, 0x398

View File

@ -1,386 +0,0 @@
.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel update_actor_shadow
/* 18429C 802559BC 27BDFFA8 */ addiu $sp, $sp, -0x58
/* 1842A0 802559C0 AFB00028 */ sw $s0, 0x28($sp)
/* 1842A4 802559C4 AFB20030 */ sw $s2, 0x30($sp)
/* 1842A8 802559C8 00A0902D */ daddu $s2, $a1, $zero
/* 1842AC 802559CC AFB5003C */ sw $s5, 0x3c($sp)
/* 1842B0 802559D0 3C15800B */ lui $s5, %hi(gCameras+0x558)
/* 1842B4 802559D4 26B522D8 */ addiu $s5, $s5, %lo(gCameras+0x558)
/* 1842B8 802559D8 AFBF0040 */ sw $ra, 0x40($sp)
/* 1842BC 802559DC AFB40038 */ sw $s4, 0x38($sp)
/* 1842C0 802559E0 AFB30034 */ sw $s3, 0x34($sp)
/* 1842C4 802559E4 AFB1002C */ sw $s1, 0x2c($sp)
/* 1842C8 802559E8 F7B60050 */ sdc1 $f22, 0x50($sp)
/* 1842CC 802559EC F7B40048 */ sdc1 $f20, 0x48($sp)
/* 1842D0 802559F0 1240014F */ beqz $s2, .L80255F30
/* 1842D4 802559F4 0080802D */ daddu $s0, $a0, $zero
/* 1842D8 802559F8 8E44042C */ lw $a0, 0x42c($s2)
/* 1842DC 802559FC 0C044181 */ jal get_shadow_by_index
/* 1842E0 80255A00 00000000 */ nop
/* 1842E4 80255A04 0040882D */ daddu $s1, $v0, $zero
/* 1842E8 80255A08 8E220000 */ lw $v0, ($s1)
/* 1842EC 80255A0C 34420001 */ ori $v0, $v0, 1
/* 1842F0 80255A10 AE220000 */ sw $v0, ($s1)
/* 1842F4 80255A14 8E430000 */ lw $v1, ($s2)
/* 1842F8 80255A18 30620001 */ andi $v0, $v1, 1
/* 1842FC 80255A1C 14400144 */ bnez $v0, .L80255F30
/* 184300 80255A20 3C021000 */ lui $v0, 0x1000
/* 184304 80255A24 00621024 */ and $v0, $v1, $v0
/* 184308 80255A28 10400009 */ beqz $v0, .L80255A50
/* 18430C 80255A2C 00000000 */ nop
/* 184310 80255A30 16000005 */ bnez $s0, .L80255A48
/* 184314 80255A34 00000000 */ nop
/* 184318 80255A38 0C09564F */ jal func_8025593C
/* 18431C 80255A3C 0240202D */ daddu $a0, $s2, $zero
/* 184320 80255A40 08095694 */ j .L80255A50
/* 184324 80255A44 00000000 */ nop
.L80255A48:
/* 184328 80255A48 0C09565F */ jal func_8025597C
/* 18432C 80255A4C 0240202D */ daddu $a0, $s2, $zero
.L80255A50:
/* 184330 80255A50 86420150 */ lh $v0, 0x150($s2)
/* 184334 80255A54 C6420144 */ lwc1 $f2, 0x144($s2)
/* 184338 80255A58 8E430000 */ lw $v1, ($s2)
/* 18433C 80255A5C 44820000 */ mtc1 $v0, $f0
/* 184340 80255A60 00000000 */ nop
/* 184344 80255A64 46800020 */ cvt.s.w $f0, $f0
/* 184348 80255A68 2402000D */ addiu $v0, $zero, 0xd
/* 18434C 80255A6C 46001080 */ add.s $f2, $f2, $f0
/* 184350 80255A70 30630800 */ andi $v1, $v1, 0x800
/* 184354 80255A74 A6420434 */ sh $v0, 0x434($s2)
/* 184358 80255A78 14600008 */ bnez $v1, .L80255A9C
/* 18435C 80255A7C E7A20018 */ swc1 $f2, 0x18($sp)
/* 184360 80255A80 86420152 */ lh $v0, 0x152($s2)
/* 184364 80255A84 C6400148 */ lwc1 $f0, 0x148($s2)
/* 184368 80255A88 44821000 */ mtc1 $v0, $f2
/* 18436C 80255A8C 00000000 */ nop
/* 184370 80255A90 468010A0 */ cvt.s.w $f2, $f2
/* 184374 80255A94 080956AD */ j .L80255AB4
/* 184378 80255A98 46020000 */ add.s $f0, $f0, $f2
.L80255A9C:
/* 18437C 80255A9C 86420152 */ lh $v0, 0x152($s2)
/* 184380 80255AA0 C6400148 */ lwc1 $f0, 0x148($s2)
/* 184384 80255AA4 44821000 */ mtc1 $v0, $f2
/* 184388 80255AA8 00000000 */ nop
/* 18438C 80255AAC 468010A0 */ cvt.s.w $f2, $f2
/* 184390 80255AB0 46020001 */ sub.s $f0, $f0, $f2
.L80255AB4:
/* 184394 80255AB4 E7A0001C */ swc1 $f0, 0x1c($sp)
/* 184398 80255AB8 86420154 */ lh $v0, 0x154($s2)
/* 18439C 80255ABC C642014C */ lwc1 $f2, 0x14c($s2)
/* 1843A0 80255AC0 44820000 */ mtc1 $v0, $f0
/* 1843A4 80255AC4 00000000 */ nop
/* 1843A8 80255AC8 46800020 */ cvt.s.w $f0, $f0
/* 1843AC 80255ACC 46001080 */ add.s $f2, $f2, $f0
/* 1843B0 80255AD0 E7A20020 */ swc1 $f2, 0x20($sp)
/* 1843B4 80255AD4 825401F3 */ lb $s4, 0x1f3($s2)
/* 1843B8 80255AD8 8E5001F4 */ lw $s0, 0x1f4($s2)
/* 1843BC 80255ADC 1A8000B0 */ blez $s4, .L80255DA0
/* 1843C0 80255AE0 0000982D */ daddu $s3, $zero, $zero
/* 1843C4 80255AE4 3C014028 */ lui $at, 0x4028
/* 1843C8 80255AE8 4481B800 */ mtc1 $at, $f23
/* 1843CC 80255AEC 4480B000 */ mtc1 $zero, $f22
.L80255AF0:
/* 1843D0 80255AF0 8E020000 */ lw $v0, ($s0)
/* 1843D4 80255AF4 30420001 */ andi $v0, $v0, 1
/* 1843D8 80255AF8 144000A4 */ bnez $v0, .L80255D8C
/* 1843DC 80255AFC 00000000 */ nop
/* 1843E0 80255B00 8E020094 */ lw $v0, 0x94($s0)
/* 1843E4 80255B04 104000A1 */ beqz $v0, .L80255D8C
/* 1843E8 80255B08 00000000 */ nop
/* 1843EC 80255B0C 8E040084 */ lw $a0, 0x84($s0)
/* 1843F0 80255B10 04800007 */ bltz $a0, .L80255B30
/* 1843F4 80255B14 00000000 */ nop
/* 1843F8 80255B18 8E050088 */ lw $a1, 0x88($s0)
/* 1843FC 80255B1C 0C0B78AB */ jal spr_update_sprite
/* 184400 80255B20 8E060090 */ lw $a2, 0x90($s0)
/* 184404 80255B24 0C0B7972 */ jal func_802DE5C8
/* 184408 80255B28 8E040084 */ lw $a0, 0x84($s0)
/* 18440C 80255B2C AE02008C */ sw $v0, 0x8c($s0)
.L80255B30:
/* 184410 80255B30 8E020000 */ lw $v0, ($s0)
/* 184414 80255B34 3C030010 */ lui $v1, 0x10
/* 184418 80255B38 00431024 */ and $v0, $v0, $v1
/* 18441C 80255B3C 14400031 */ bnez $v0, .L80255C04
/* 184420 80255B40 00000000 */ nop
/* 184424 80255B44 86020014 */ lh $v0, 0x14($s0)
/* 184428 80255B48 C7A00018 */ lwc1 $f0, 0x18($sp)
/* 18442C 80255B4C 44821000 */ mtc1 $v0, $f2
/* 184430 80255B50 00000000 */ nop
/* 184434 80255B54 468010A0 */ cvt.s.w $f2, $f2
/* 184438 80255B58 8602001A */ lh $v0, 0x1a($s0)
/* 18443C 80255B5C 46020000 */ add.s $f0, $f0, $f2
/* 184440 80255B60 44821000 */ mtc1 $v0, $f2
/* 184444 80255B64 00000000 */ nop
/* 184448 80255B68 468010A0 */ cvt.s.w $f2, $f2
/* 18444C 80255B6C 8E420000 */ lw $v0, ($s2)
/* 184450 80255B70 30420800 */ andi $v0, $v0, 0x800
/* 184454 80255B74 1440000D */ bnez $v0, .L80255BAC
/* 184458 80255B78 46020180 */ add.s $f6, $f0, $f2
/* 18445C 80255B7C 86020016 */ lh $v0, 0x16($s0)
/* 184460 80255B80 C7A2001C */ lwc1 $f2, 0x1c($sp)
/* 184464 80255B84 44820000 */ mtc1 $v0, $f0
/* 184468 80255B88 00000000 */ nop
/* 18446C 80255B8C 46800020 */ cvt.s.w $f0, $f0
/* 184470 80255B90 8602001C */ lh $v0, 0x1c($s0)
/* 184474 80255B94 46001080 */ add.s $f2, $f2, $f0
/* 184478 80255B98 44820000 */ mtc1 $v0, $f0
/* 18447C 80255B9C 00000000 */ nop
/* 184480 80255BA0 46800020 */ cvt.s.w $f0, $f0
/* 184484 80255BA4 080956F6 */ j .L80255BD8
/* 184488 80255BA8 46001100 */ add.s $f4, $f2, $f0
.L80255BAC:
/* 18448C 80255BAC 86020016 */ lh $v0, 0x16($s0)
/* 184490 80255BB0 C7A2001C */ lwc1 $f2, 0x1c($sp)
/* 184494 80255BB4 44820000 */ mtc1 $v0, $f0
/* 184498 80255BB8 00000000 */ nop
/* 18449C 80255BBC 46800020 */ cvt.s.w $f0, $f0
/* 1844A0 80255BC0 8602001C */ lh $v0, 0x1c($s0)
/* 1844A4 80255BC4 46001081 */ sub.s $f2, $f2, $f0
/* 1844A8 80255BC8 44820000 */ mtc1 $v0, $f0
/* 1844AC 80255BCC 00000000 */ nop
/* 1844B0 80255BD0 46800020 */ cvt.s.w $f0, $f0
/* 1844B4 80255BD4 46001101 */ sub.s $f4, $f2, $f0
.L80255BD8:
/* 1844B8 80255BD8 C640018C */ lwc1 $f0, 0x18c($s2)
/* 1844BC 80255BDC 86020018 */ lh $v0, 0x18($s0)
/* 1844C0 80255BE0 C7A20020 */ lwc1 $f2, 0x20($sp)
/* 1844C4 80255BE4 46000506 */ mov.s $f20, $f0
/* 1844C8 80255BE8 44820000 */ mtc1 $v0, $f0
/* 1844CC 80255BEC 00000000 */ nop
/* 1844D0 80255BF0 46800020 */ cvt.s.w $f0, $f0
/* 1844D4 80255BF4 8602001E */ lh $v0, 0x1e($s0)
/* 1844D8 80255BF8 46001080 */ add.s $f2, $f2, $f0
/* 1844DC 80255BFC 08095710 */ j .L80255C40
/* 1844E0 80255C00 E6140064 */ swc1 $f20, 0x64($s0)
.L80255C04:
/* 1844E4 80255C04 C6140064 */ lwc1 $f20, 0x64($s0)
/* 1844E8 80255C08 8602001A */ lh $v0, 0x1a($s0)
/* 1844EC 80255C0C C602002C */ lwc1 $f2, 0x2c($s0)
/* 1844F0 80255C10 44820000 */ mtc1 $v0, $f0
/* 1844F4 80255C14 00000000 */ nop
/* 1844F8 80255C18 46800020 */ cvt.s.w $f0, $f0
/* 1844FC 80255C1C 46001180 */ add.s $f6, $f2, $f0
/* 184500 80255C20 8602001C */ lh $v0, 0x1c($s0)
/* 184504 80255C24 C6020030 */ lwc1 $f2, 0x30($s0)
/* 184508 80255C28 44820000 */ mtc1 $v0, $f0
/* 18450C 80255C2C 00000000 */ nop
/* 184510 80255C30 46800020 */ cvt.s.w $f0, $f0
/* 184514 80255C34 46001100 */ add.s $f4, $f2, $f0
/* 184518 80255C38 8602001E */ lh $v0, 0x1e($s0)
/* 18451C 80255C3C C6020034 */ lwc1 $f2, 0x34($s0)
.L80255C40:
/* 184520 80255C40 44820000 */ mtc1 $v0, $f0
/* 184524 80255C44 00000000 */ nop
/* 184528 80255C48 46800020 */ cvt.s.w $f0, $f0
/* 18452C 80255C4C 46001080 */ add.s $f2, $f2, $f0
/* 184530 80255C50 8E020000 */ lw $v0, ($s0)
/* 184534 80255C54 E6060058 */ swc1 $f6, 0x58($s0)
/* 184538 80255C58 E604005C */ swc1 $f4, 0x5c($s0)
/* 18453C 80255C5C 30420004 */ andi $v0, $v0, 4
/* 184540 80255C60 14400041 */ bnez $v0, .L80255D68
/* 184544 80255C64 E6020060 */ swc1 $f2, 0x60($s0)
/* 184548 80255C68 8E04009C */ lw $a0, 0x9c($s0)
/* 18454C 80255C6C 0C044181 */ jal get_shadow_by_index
/* 184550 80255C70 00000000 */ nop
/* 184554 80255C74 0040882D */ daddu $s1, $v0, $zero
/* 184558 80255C78 8E220000 */ lw $v0, ($s1)
/* 18455C 80255C7C 2403FFFE */ addiu $v1, $zero, -2
/* 184560 80255C80 00431024 */ and $v0, $v0, $v1
/* 184564 80255C84 AE220000 */ sw $v0, ($s1)
/* 184568 80255C88 8E420000 */ lw $v0, ($s2)
/* 18456C 80255C8C C6000058 */ lwc1 $f0, 0x58($s0)
/* 184570 80255C90 30420800 */ andi $v0, $v0, 0x800
/* 184574 80255C94 14400005 */ bnez $v0, .L80255CAC
/* 184578 80255C98 E7A00018 */ swc1 $f0, 0x18($sp)
/* 18457C 80255C9C C600005C */ lwc1 $f0, 0x5c($s0)
/* 184580 80255CA0 46000021 */ cvt.d.s $f0, $f0
/* 184584 80255CA4 0809572E */ j .L80255CB8
/* 184588 80255CA8 46360000 */ add.d $f0, $f0, $f22
.L80255CAC:
/* 18458C 80255CAC C600005C */ lwc1 $f0, 0x5c($s0)
/* 184590 80255CB0 46000021 */ cvt.d.s $f0, $f0
/* 184594 80255CB4 46360001 */ sub.d $f0, $f0, $f22
.L80255CB8:
/* 184598 80255CB8 46200020 */ cvt.s.d $f0, $f0
/* 18459C 80255CBC E7A0001C */ swc1 $f0, 0x1c($sp)
/* 1845A0 80255CC0 0000202D */ daddu $a0, $zero, $zero
/* 1845A4 80255CC4 27A50018 */ addiu $a1, $sp, 0x18
/* 1845A8 80255CC8 27A6001C */ addiu $a2, $sp, 0x1c
/* 1845AC 80255CCC 27A70020 */ addiu $a3, $sp, 0x20
/* 1845B0 80255CD0 C6000060 */ lwc1 $f0, 0x60($s0)
/* 1845B4 80255CD4 3C0146FF */ lui $at, 0x46ff
/* 1845B8 80255CD8 3421FE00 */ ori $at, $at, 0xfe00
/* 1845BC 80255CDC 44811000 */ mtc1 $at, $f2
/* 1845C0 80255CE0 27A20024 */ addiu $v0, $sp, 0x24
/* 1845C4 80255CE4 E7A00020 */ swc1 $f0, 0x20($sp)
/* 1845C8 80255CE8 E7A20024 */ swc1 $f2, 0x24($sp)
/* 1845CC 80255CEC 0C0372DF */ jal npc_raycast_down_sides
/* 1845D0 80255CF0 AFA20010 */ sw $v0, 0x10($sp)
/* 1845D4 80255CF4 C7A20024 */ lwc1 $f2, 0x24($sp)
/* 1845D8 80255CF8 3C014348 */ lui $at, 0x4348
/* 1845DC 80255CFC 44810000 */ mtc1 $at, $f0
/* 1845E0 80255D00 00000000 */ nop
/* 1845E4 80255D04 4602003C */ c.lt.s $f0, $f2
/* 1845E8 80255D08 00000000 */ nop
/* 1845EC 80255D0C 45000004 */ bc1f .L80255D20
/* 1845F0 80255D10 00000000 */ nop
/* 1845F4 80255D14 8E220000 */ lw $v0, ($s1)
/* 1845F8 80255D18 34420001 */ ori $v0, $v0, 1
/* 1845FC 80255D1C AE220000 */ sw $v0, ($s1)
.L80255D20:
/* 184600 80255D20 C7A00018 */ lwc1 $f0, 0x18($sp)
/* 184604 80255D24 C7A2001C */ lwc1 $f2, 0x1c($sp)
/* 184608 80255D28 C7A40020 */ lwc1 $f4, 0x20($sp)
/* 18460C 80255D2C E6200010 */ swc1 $f0, 0x10($s1)
/* 184610 80255D30 E6220014 */ swc1 $f2, 0x14($s1)
/* 184614 80255D34 E6240018 */ swc1 $f4, 0x18($s1)
/* 184618 80255D38 C6AC006C */ lwc1 $f12, 0x6c($s5)
/* 18461C 80255D3C 0C00A6C9 */ jal clamp_angle
/* 184620 80255D40 460CA301 */ sub.s $f12, $f20, $f12
/* 184624 80255D44 8FA50024 */ lw $a1, 0x24($sp)
/* 184628 80255D48 0220202D */ daddu $a0, $s1, $zero
/* 18462C 80255D4C 0C044A17 */ jal set_standard_shadow_scale
/* 184630 80255D50 E620002C */ swc1 $f0, 0x2c($s1)
/* 184634 80255D54 C620001C */ lwc1 $f0, 0x1c($s1)
/* 184638 80255D58 C60200A0 */ lwc1 $f2, 0xa0($s0)
/* 18463C 80255D5C 46020002 */ mul.s $f0, $f0, $f2
/* 184640 80255D60 00000000 */ nop
/* 184644 80255D64 E620001C */ swc1 $f0, 0x1c($s1)
.L80255D68:
/* 184648 80255D68 86020098 */ lh $v0, 0x98($s0)
/* 18464C 80255D6C 284200FF */ slti $v0, $v0, 0xff
/* 184650 80255D70 14400005 */ bnez $v0, .L80255D88
/* 184654 80255D74 24020022 */ addiu $v0, $zero, 0x22
/* 184658 80255D78 8E020000 */ lw $v0, ($s0)
/* 18465C 80255D7C 30420100 */ andi $v0, $v0, 0x100
/* 184660 80255D80 10400002 */ beqz $v0, .L80255D8C
/* 184664 80255D84 24020022 */ addiu $v0, $zero, 0x22
.L80255D88:
/* 184668 80255D88 A6420434 */ sh $v0, 0x434($s2)
.L80255D8C:
/* 18466C 80255D8C 8E10000C */ lw $s0, 0xc($s0)
/* 184670 80255D90 26730001 */ addiu $s3, $s3, 1
/* 184674 80255D94 0274102A */ slt $v0, $s3, $s4
/* 184678 80255D98 1440FF55 */ bnez $v0, .L80255AF0
/* 18467C 80255D9C 00000000 */ nop
.L80255DA0:
/* 184680 80255DA0 0C044181 */ jal get_shadow_by_index
/* 184684 80255DA4 8E44042C */ lw $a0, 0x42c($s2)
/* 184688 80255DA8 8E430000 */ lw $v1, ($s2)
/* 18468C 80255DAC 30630004 */ andi $v1, $v1, 4
/* 184690 80255DB0 14600005 */ bnez $v1, .L80255DC8
/* 184694 80255DB4 0040882D */ daddu $s1, $v0, $zero
/* 184698 80255DB8 8E220000 */ lw $v0, ($s1)
/* 18469C 80255DBC 2403FFFE */ addiu $v1, $zero, -2
/* 1846A0 80255DC0 00431024 */ and $v0, $v0, $v1
/* 1846A4 80255DC4 AE220000 */ sw $v0, ($s1)
.L80255DC8:
/* 1846A8 80255DC8 86420150 */ lh $v0, 0x150($s2)
/* 1846AC 80255DCC C6400144 */ lwc1 $f0, 0x144($s2)
/* 1846B0 80255DD0 44821000 */ mtc1 $v0, $f2
/* 1846B4 80255DD4 00000000 */ nop
/* 1846B8 80255DD8 468010A0 */ cvt.s.w $f2, $f2
/* 1846BC 80255DDC 46020000 */ add.s $f0, $f0, $f2
/* 1846C0 80255DE0 8E420000 */ lw $v0, ($s2)
/* 1846C4 80255DE4 30420800 */ andi $v0, $v0, 0x800
/* 1846C8 80255DE8 14400008 */ bnez $v0, .L80255E0C
/* 1846CC 80255DEC E7A00018 */ swc1 $f0, 0x18($sp)
/* 1846D0 80255DF0 86420152 */ lh $v0, 0x152($s2)
/* 1846D4 80255DF4 C6400148 */ lwc1 $f0, 0x148($s2)
/* 1846D8 80255DF8 44821000 */ mtc1 $v0, $f2
/* 1846DC 80255DFC 00000000 */ nop
/* 1846E0 80255E00 468010A0 */ cvt.s.w $f2, $f2
/* 1846E4 80255E04 08095789 */ j .L80255E24
/* 1846E8 80255E08 46020000 */ add.s $f0, $f0, $f2
.L80255E0C:
/* 1846EC 80255E0C 86420152 */ lh $v0, 0x152($s2)
/* 1846F0 80255E10 C6400148 */ lwc1 $f0, 0x148($s2)
/* 1846F4 80255E14 44821000 */ mtc1 $v0, $f2
/* 1846F8 80255E18 00000000 */ nop
/* 1846FC 80255E1C 468010A0 */ cvt.s.w $f2, $f2
/* 184700 80255E20 46020001 */ sub.s $f0, $f0, $f2
.L80255E24:
/* 184704 80255E24 3C014028 */ lui $at, 0x4028
/* 184708 80255E28 44811800 */ mtc1 $at, $f3
/* 18470C 80255E2C 44801000 */ mtc1 $zero, $f2
/* 184710 80255E30 46000021 */ cvt.d.s $f0, $f0
/* 184714 80255E34 46220000 */ add.d $f0, $f0, $f2
/* 184718 80255E38 46200020 */ cvt.s.d $f0, $f0
/* 18471C 80255E3C E7A0001C */ swc1 $f0, 0x1c($sp)
/* 184720 80255E40 0000202D */ daddu $a0, $zero, $zero
/* 184724 80255E44 27A50018 */ addiu $a1, $sp, 0x18
/* 184728 80255E48 27A6001C */ addiu $a2, $sp, 0x1c
/* 18472C 80255E4C 27A70020 */ addiu $a3, $sp, 0x20
/* 184730 80255E50 86420154 */ lh $v0, 0x154($s2)
/* 184734 80255E54 C642014C */ lwc1 $f2, 0x14c($s2)
/* 184738 80255E58 44820000 */ mtc1 $v0, $f0
/* 18473C 80255E5C 00000000 */ nop
/* 184740 80255E60 46800020 */ cvt.s.w $f0, $f0
/* 184744 80255E64 46001080 */ add.s $f2, $f2, $f0
/* 184748 80255E68 3C0146FF */ lui $at, 0x46ff
/* 18474C 80255E6C 3421FE00 */ ori $at, $at, 0xfe00
/* 184750 80255E70 44810000 */ mtc1 $at, $f0
/* 184754 80255E74 27A20024 */ addiu $v0, $sp, 0x24
/* 184758 80255E78 E7A00024 */ swc1 $f0, 0x24($sp)
/* 18475C 80255E7C E7A20020 */ swc1 $f2, 0x20($sp)
/* 184760 80255E80 0C0372DF */ jal npc_raycast_down_sides
/* 184764 80255E84 AFA20010 */ sw $v0, 0x10($sp)
/* 184768 80255E88 C7A20024 */ lwc1 $f2, 0x24($sp)
/* 18476C 80255E8C 3C014348 */ lui $at, 0x4348
/* 184770 80255E90 44810000 */ mtc1 $at, $f0
/* 184774 80255E94 00000000 */ nop
/* 184778 80255E98 4602003C */ c.lt.s $f0, $f2
/* 18477C 80255E9C 00000000 */ nop
/* 184780 80255EA0 45000004 */ bc1f .L80255EB4
/* 184784 80255EA4 00000000 */ nop
/* 184788 80255EA8 8E220000 */ lw $v0, ($s1)
/* 18478C 80255EAC 34420001 */ ori $v0, $v0, 1
/* 184790 80255EB0 AE220000 */ sw $v0, ($s1)
.L80255EB4:
/* 184794 80255EB4 C7A00018 */ lwc1 $f0, 0x18($sp)
/* 184798 80255EB8 C7A2001C */ lwc1 $f2, 0x1c($sp)
/* 18479C 80255EBC E6200010 */ swc1 $f0, 0x10($s1)
/* 1847A0 80255EC0 E6220014 */ swc1 $f2, 0x14($s1)
/* 1847A4 80255EC4 92420136 */ lbu $v0, 0x136($s2)
/* 1847A8 80255EC8 00021080 */ sll $v0, $v0, 2
/* 1847AC 80255ECC 3C018028 */ lui $at, %hi(bActorOffsets+0x3)
/* 1847B0 80255ED0 00220821 */ addu $at, $at, $v0
/* 1847B4 80255ED4 80222EEB */ lb $v0, %lo(bActorOffsets+0x3)($at)
/* 1847B8 80255ED8 C7A00020 */ lwc1 $f0, 0x20($sp)
/* 1847BC 80255EDC 44821000 */ mtc1 $v0, $f2
/* 1847C0 80255EE0 00000000 */ nop
/* 1847C4 80255EE4 468010A0 */ cvt.s.w $f2, $f2
/* 1847C8 80255EE8 46020000 */ add.s $f0, $f0, $f2
/* 1847CC 80255EEC E6200018 */ swc1 $f0, 0x18($s1)
/* 1847D0 80255EF0 C640018C */ lwc1 $f0, 0x18c($s2)
/* 1847D4 80255EF4 C6AC006C */ lwc1 $f12, 0x6c($s5)
/* 1847D8 80255EF8 0C00A6C9 */ jal clamp_angle
/* 1847DC 80255EFC 460C0301 */ sub.s $f12, $f0, $f12
/* 1847E0 80255F00 8FA50024 */ lw $a1, 0x24($sp)
/* 1847E4 80255F04 0220202D */ daddu $a0, $s1, $zero
/* 1847E8 80255F08 0C044A17 */ jal set_standard_shadow_scale
/* 1847EC 80255F0C E620002C */ swc1 $f0, 0x2c($s1)
/* 1847F0 80255F10 C6420430 */ lwc1 $f2, 0x430($s2)
/* 1847F4 80255F14 C6400188 */ lwc1 $f0, 0x188($s2)
/* 1847F8 80255F18 46001082 */ mul.s $f2, $f2, $f0
/* 1847FC 80255F1C 00000000 */ nop
/* 184800 80255F20 C620001C */ lwc1 $f0, 0x1c($s1)
/* 184804 80255F24 46020002 */ mul.s $f0, $f0, $f2
/* 184808 80255F28 00000000 */ nop
/* 18480C 80255F2C E620001C */ swc1 $f0, 0x1c($s1)
.L80255F30:
/* 184810 80255F30 8FBF0040 */ lw $ra, 0x40($sp)
/* 184814 80255F34 8FB5003C */ lw $s5, 0x3c($sp)
/* 184818 80255F38 8FB40038 */ lw $s4, 0x38($sp)
/* 18481C 80255F3C 8FB30034 */ lw $s3, 0x34($sp)
/* 184820 80255F40 8FB20030 */ lw $s2, 0x30($sp)
/* 184824 80255F44 8FB1002C */ lw $s1, 0x2c($sp)
/* 184828 80255F48 8FB00028 */ lw $s0, 0x28($sp)
/* 18482C 80255F4C D7B60050 */ ldc1 $f22, 0x50($sp)
/* 184830 80255F50 D7B40048 */ ldc1 $f20, 0x48($sp)
/* 184834 80255F54 03E00008 */ jr $ra
/* 184838 80255F58 27BD0058 */ addiu $sp, $sp, 0x58