mirror of
https://github.com/pmret/papermario.git
synced 2024-11-08 12:02:30 +01:00
Match two functions in 23680.c (#624)
* Match 2 func's * Delete func_800496B8.s * Delete func_800490B4.s * unk_AC * Change func_800490B4 type * comments
This commit is contained in:
parent
4e33a016eb
commit
b87012a0da
@ -262,7 +262,8 @@ typedef struct Enemy {
|
||||
/* 0x64 */ UNK_PTR unk_64;
|
||||
/* 0x68 */ char unk_68[4];
|
||||
/* 0x6C */ s32 varTable[16];
|
||||
/* 0xAC */ char unk_AC[4];
|
||||
/* 0xAC */ u8 unk_AC;
|
||||
/* 0xAD */ char unk_AD[3];
|
||||
/* 0xB0 */ s32 unk_B0;
|
||||
/* 0xB4 */ s8 unk_B4;
|
||||
/* 0xB5 */ s8 unk_B5;
|
||||
@ -279,7 +280,7 @@ typedef struct Enemy {
|
||||
/* 0xDC */ char unk_DC[20];
|
||||
} Enemy; // size = 0xF0
|
||||
|
||||
s32 func_800490B4(EnemyTerritoryThing* arg0, Enemy* arg1, f32 arg2, f32 arg3, s32 arg4);
|
||||
s32 func_800490B4(EnemyTerritoryThing* arg0, Enemy* arg1, f32 arg2, f32 arg3, s8 arg4);
|
||||
|
||||
/// The default Npc::onUpdate and Npc::onRender callback.
|
||||
void STUB_npc_callback(Npc*);
|
||||
|
166
src/23680.c
166
src/23680.c
@ -121,7 +121,84 @@ s32 is_point_within_region(s32 shape, f32 pointX, f32 pointY, f32 centerX, f32 c
|
||||
}
|
||||
}
|
||||
|
||||
INCLUDE_ASM(s32, "23680", func_800490B4, EnemyTerritoryThing* arg0, Enemy* arg1, f32 arg2, f32 arg3, s32 arg4);
|
||||
s32 func_800490B4(EnemyTerritoryThing* territory, Enemy* enemy, f32 chaseSpeed, f32 arg3, s8 arg4) {
|
||||
Npc* npc = get_npc_unsafe(enemy->npcID);
|
||||
PlayerStatus* playerStatus = &gPlayerStatus;
|
||||
PartnerActionStatus* partnerActionStatus;
|
||||
f32 x, y, z;
|
||||
f32 dist;
|
||||
s32 phi_v0;
|
||||
f32 phi_a3;
|
||||
|
||||
if (enemy->unk_B0 & 2) {
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
partnerActionStatus = &gPartnerActionStatus;
|
||||
if (partnerActionStatus->actionState.b[3] == 9 && partnerActionStatus->actionState.b[0] && !(territory->unk_1C & 1)) {
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if (partnerActionStatus->actionState.b[3] == 7 && partnerActionStatus->actionState.b[0] && !(territory->unk_1C & 1)) {
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if (territory->unk_00 < 0) {
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if (territory->unk_18 <= fabsf(npc->pos.y - playerStatus->position.y) && !(territory->unk_1C & 2)) {
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if (territory->sizeX | territory->sizeZ && is_point_within_region(territory->shape, territory->pointX, territory->pointZ, playerStatus->position.x, playerStatus->position.z, territory->sizeX, territory->sizeZ)) {
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if ((playerStatus->actionState == 0x1D)) {
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if (enemy->unk_AC & 1) {
|
||||
x = npc->pos.x;
|
||||
y = npc->pos.y + npc->collisionHeight * 0.5;
|
||||
z = npc->pos.z;
|
||||
dist = dist2D(npc->pos.x, npc->pos.z, playerStatus->position.x, playerStatus->position.z);
|
||||
if (npc_test_move_simple_with_slipping(0x50000, &x, &y, &z, dist, atan2(npc->pos.x, npc->pos.z, playerStatus->position.x, playerStatus->position.z), 0.1f, 0.1f)) {
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
if (territory->unk_00 == 0) {
|
||||
phi_v0 = 0;
|
||||
} else {
|
||||
phi_v0 = rand_int(territory->unk_00 + 1);
|
||||
}
|
||||
|
||||
if (phi_v0 == 0) {
|
||||
if (enemy->unk_AC & 2) {
|
||||
if (playerStatus->actionState == 1) {
|
||||
chaseSpeed = chaseSpeed * 1.15;
|
||||
} else if (playerStatus->actionState == 2) {
|
||||
chaseSpeed = chaseSpeed * 1.3;
|
||||
}
|
||||
}
|
||||
x = npc->pos.x;
|
||||
z = npc->pos.z;
|
||||
if (arg4 & 0xFF) {
|
||||
phi_a3 = npc->yaw;
|
||||
add_vec2D_polar(&x, &z, arg3, phi_a3);
|
||||
} else {
|
||||
phi_a3 = 270.0f - npc->renderYaw;
|
||||
add_vec2D_polar(&x, &z, arg3, phi_a3);
|
||||
}
|
||||
if (dist2D(x, z, playerStatus->position.x, playerStatus->position.z) <= chaseSpeed) {
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
s32 func_800493EC(Enemy* enemy, s32 arg1, f32 arg2, f32 arg3) {
|
||||
PlayerStatus* playerStatus = &gPlayerStatus;
|
||||
@ -195,7 +272,92 @@ void func_800495A0(Evt* script, NpcAISettings* npcAISettings, EnemyTerritoryThin
|
||||
script->functionTemp[0] = 1;
|
||||
}
|
||||
|
||||
INCLUDE_ASM(s32, "23680", func_800496B8);
|
||||
void func_800496B8(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) {
|
||||
Enemy* enemy = script->owner1.enemy;
|
||||
Npc* npc = get_npc_unsafe(enemy->npcID);
|
||||
s32 phi_s5 = 0;
|
||||
f32 x, y, z;
|
||||
s32 sp34;
|
||||
f32 yaw;
|
||||
|
||||
if (aiSettings->unk_14 >= 0) {
|
||||
if (script->functionTemp[1] <= 0) {
|
||||
script->functionTemp[1] = aiSettings->unk_14;
|
||||
if (func_800490B4(territory, enemy, aiSettings->alertRadius, aiSettings->unk_10.f, 0)) {
|
||||
x = npc->pos.x;
|
||||
y = npc->pos.y;
|
||||
z = npc->pos.z;
|
||||
yaw = atan2(npc->pos.x, npc->pos.z, gPlayerStatusPtr->position.x, gPlayerStatusPtr->position.z);
|
||||
if (!npc_test_move_simple_with_slipping(npc->collisionChannel, &x, &y, &z, aiSettings->chaseSpeed, yaw, npc->collisionHeight, npc->collisionRadius)) {
|
||||
npc->yaw = yaw;
|
||||
ai_enemy_play_sound(npc, 0x2F4, 0x200000);
|
||||
fx_emote(0, npc, 0, npc->collisionHeight, 1.0f, 2.0f, -20.0f, 15, &sp34);
|
||||
enemy->unk_B0 &= ~0x40;
|
||||
enemy->unk_B0 &= ~0x20;
|
||||
|
||||
if (enemy->npcSettings->unk_2A & 1) {
|
||||
script->functionTemp[0] = 10;
|
||||
} else {
|
||||
script->functionTemp[0] = 12;
|
||||
}
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
script->functionTemp[1]--;
|
||||
}
|
||||
|
||||
if (is_point_within_region(enemy->territory->wander.wanderShape,
|
||||
enemy->territory->wander.point.x,
|
||||
enemy->territory->wander.point.z,
|
||||
npc->pos.x,
|
||||
npc->pos.z,
|
||||
enemy->territory->wander.wanderSizeX,
|
||||
enemy->territory->wander.wanderSizeZ)
|
||||
&& npc->moveSpeed < dist2D(enemy->territory->wander.point.x, enemy->territory->wander.point.z, npc->pos.x, npc->pos.z)) {
|
||||
if (!(enemy->unk_B0 & 0x20)) {
|
||||
enemy->unk_B0 |= 0x60;
|
||||
}
|
||||
|
||||
if (enemy->unk_B0 & 0x40) {
|
||||
npc->yaw = clamp_angle(atan2(npc->pos.x, npc->pos.z, enemy->territory->wander.point.x, enemy->territory->wander.point.z));
|
||||
enemy->unk_B0 &= ~0x40;
|
||||
}
|
||||
|
||||
x = npc->pos.x;
|
||||
y = npc->pos.y;
|
||||
z = npc->pos.z;
|
||||
if (npc_test_move_simple_with_slipping(npc->collisionChannel, &x, &y, &z, 2.0 * npc->moveSpeed, npc->yaw, npc->collisionHeight, npc->collisionRadius)) {
|
||||
yaw = clamp_angle(atan2(npc->pos.x, npc->pos.z, enemy->territory->wander.point.x, enemy->territory->wander.point.z));
|
||||
enemy->unk_B0 &= ~0x40;
|
||||
func_8004A784(npc, 5.0f, &yaw, NULL, NULL, NULL);
|
||||
npc->yaw = yaw;
|
||||
}
|
||||
phi_s5 = 1;
|
||||
} else if (enemy->unk_B0 & 0x20) {
|
||||
enemy->unk_B0 &= ~0x20;
|
||||
enemy->unk_B0 &= ~0x40;
|
||||
}
|
||||
|
||||
if (enemy->territory->wander.wanderSizeX | enemy->territory->wander.wanderSizeZ | phi_s5) {
|
||||
if (!npc->turnAroundYawAdjustment) {
|
||||
npc_move_heading(npc, npc->moveSpeed, npc->yaw);
|
||||
} else {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if (aiSettings->moveTime > 0) {
|
||||
npc->duration--;
|
||||
if (npc->duration <= 0) {
|
||||
script->functionTemp[0] = 2;
|
||||
script->functionTemp[1] = rand_int(1000) % 3 + 2;
|
||||
if (aiSettings->unk_2C <= 0 || aiSettings->waitTime <= 0) {
|
||||
script->functionTemp[0] = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#define NAMESPACE base
|
||||
#include "world/common/UnkNpcAIFunc1.inc.c"
|
||||
|
@ -1,234 +0,0 @@
|
||||
.set noat # allow manual use of $at
|
||||
.set noreorder # don't insert nops after branches
|
||||
|
||||
.section .rodata
|
||||
|
||||
dlabel D_80098710
|
||||
.double 1.15
|
||||
|
||||
dlabel D_80098718
|
||||
.double 1.3
|
||||
|
||||
.section .text
|
||||
|
||||
glabel func_800490B4
|
||||
/* 244B4 800490B4 27BDFFA0 */ addiu $sp, $sp, -0x60
|
||||
/* 244B8 800490B8 F7B60050 */ sdc1 $f22, 0x50($sp)
|
||||
/* 244BC 800490BC 4486B000 */ mtc1 $a2, $f22
|
||||
/* 244C0 800490C0 F7B80058 */ sdc1 $f24, 0x58($sp)
|
||||
/* 244C4 800490C4 4487C000 */ mtc1 $a3, $f24
|
||||
/* 244C8 800490C8 AFB10034 */ sw $s1, 0x34($sp)
|
||||
/* 244CC 800490CC 0080882D */ daddu $s1, $a0, $zero
|
||||
/* 244D0 800490D0 AFB3003C */ sw $s3, 0x3c($sp)
|
||||
/* 244D4 800490D4 00A0982D */ daddu $s3, $a1, $zero
|
||||
/* 244D8 800490D8 AFBF0044 */ sw $ra, 0x44($sp)
|
||||
/* 244DC 800490DC AFB40040 */ sw $s4, 0x40($sp)
|
||||
/* 244E0 800490E0 AFB20038 */ sw $s2, 0x38($sp)
|
||||
/* 244E4 800490E4 AFB00030 */ sw $s0, 0x30($sp)
|
||||
/* 244E8 800490E8 F7B40048 */ sdc1 $f20, 0x48($sp)
|
||||
/* 244EC 800490EC 86640008 */ lh $a0, 8($s3)
|
||||
/* 244F0 800490F0 0C00EABB */ jal get_npc_unsafe
|
||||
/* 244F4 800490F4 93B40073 */ lbu $s4, 0x73($sp)
|
||||
/* 244F8 800490F8 0040802D */ daddu $s0, $v0, $zero
|
||||
/* 244FC 800490FC 8E6200B0 */ lw $v0, 0xb0($s3)
|
||||
/* 24500 80049100 3C128011 */ lui $s2, %hi(gPlayerStatus)
|
||||
/* 24504 80049104 2652EFC8 */ addiu $s2, $s2, %lo(gPlayerStatus)
|
||||
/* 24508 80049108 30420002 */ andi $v0, $v0, 2
|
||||
/* 2450C 8004910C 144000AC */ bnez $v0, .L800493C0
|
||||
/* 24510 80049110 0000102D */ daddu $v0, $zero, $zero
|
||||
/* 24514 80049114 3C048011 */ lui $a0, %hi(gPartnerActionStatus)
|
||||
/* 24518 80049118 2484EBB0 */ addiu $a0, $a0, %lo(gPartnerActionStatus)
|
||||
/* 2451C 8004911C 80830003 */ lb $v1, 3($a0)
|
||||
/* 24520 80049120 24020009 */ addiu $v0, $zero, 9
|
||||
/* 24524 80049124 14620008 */ bne $v1, $v0, .L80049148
|
||||
/* 24528 80049128 24020007 */ addiu $v0, $zero, 7
|
||||
/* 2452C 8004912C 80820000 */ lb $v0, ($a0)
|
||||
/* 24530 80049130 10400005 */ beqz $v0, .L80049148
|
||||
/* 24534 80049134 24020007 */ addiu $v0, $zero, 7
|
||||
/* 24538 80049138 9622001C */ lhu $v0, 0x1c($s1)
|
||||
/* 2453C 8004913C 30420001 */ andi $v0, $v0, 1
|
||||
/* 24540 80049140 1040009E */ beqz $v0, .L800493BC
|
||||
/* 24544 80049144 24020007 */ addiu $v0, $zero, 7
|
||||
.L80049148:
|
||||
/* 24548 80049148 14620008 */ bne $v1, $v0, .L8004916C
|
||||
/* 2454C 8004914C 00000000 */ nop
|
||||
/* 24550 80049150 80820000 */ lb $v0, ($a0)
|
||||
/* 24554 80049154 10400005 */ beqz $v0, .L8004916C
|
||||
/* 24558 80049158 00000000 */ nop
|
||||
/* 2455C 8004915C 9622001C */ lhu $v0, 0x1c($s1)
|
||||
/* 24560 80049160 30420001 */ andi $v0, $v0, 1
|
||||
/* 24564 80049164 10400096 */ beqz $v0, .L800493C0
|
||||
/* 24568 80049168 0000102D */ daddu $v0, $zero, $zero
|
||||
.L8004916C:
|
||||
/* 2456C 8004916C 8E220000 */ lw $v0, ($s1)
|
||||
/* 24570 80049170 04400093 */ bltz $v0, .L800493C0
|
||||
/* 24574 80049174 0000102D */ daddu $v0, $zero, $zero
|
||||
/* 24578 80049178 C600003C */ lwc1 $f0, 0x3c($s0)
|
||||
/* 2457C 8004917C C642002C */ lwc1 $f2, 0x2c($s2)
|
||||
/* 24580 80049180 46020001 */ sub.s $f0, $f0, $f2
|
||||
/* 24584 80049184 C6220018 */ lwc1 $f2, 0x18($s1)
|
||||
/* 24588 80049188 46000005 */ abs.s $f0, $f0
|
||||
/* 2458C 8004918C 4600103E */ c.le.s $f2, $f0
|
||||
/* 24590 80049190 00000000 */ nop
|
||||
/* 24594 80049194 45000005 */ bc1f .L800491AC
|
||||
/* 24598 80049198 00000000 */ nop
|
||||
/* 2459C 8004919C 9622001C */ lhu $v0, 0x1c($s1)
|
||||
/* 245A0 800491A0 30420002 */ andi $v0, $v0, 2
|
||||
/* 245A4 800491A4 10400086 */ beqz $v0, .L800493C0
|
||||
/* 245A8 800491A8 0000102D */ daddu $v0, $zero, $zero
|
||||
.L800491AC:
|
||||
/* 245AC 800491AC 8E220010 */ lw $v0, 0x10($s1)
|
||||
/* 245B0 800491B0 8E230014 */ lw $v1, 0x14($s1)
|
||||
/* 245B4 800491B4 00431025 */ or $v0, $v0, $v1
|
||||
/* 245B8 800491B8 10400014 */ beqz $v0, .L8004920C
|
||||
/* 245BC 800491BC 00000000 */ nop
|
||||
/* 245C0 800491C0 C6200008 */ lwc1 $f0, 8($s1)
|
||||
/* 245C4 800491C4 46800020 */ cvt.s.w $f0, $f0
|
||||
/* 245C8 800491C8 44050000 */ mfc1 $a1, $f0
|
||||
/* 245CC 800491CC C620000C */ lwc1 $f0, 0xc($s1)
|
||||
/* 245D0 800491D0 46800020 */ cvt.s.w $f0, $f0
|
||||
/* 245D4 800491D4 44060000 */ mfc1 $a2, $f0
|
||||
/* 245D8 800491D8 C6400030 */ lwc1 $f0, 0x30($s2)
|
||||
/* 245DC 800491DC 8E470028 */ lw $a3, 0x28($s2)
|
||||
/* 245E0 800491E0 E7A00010 */ swc1 $f0, 0x10($sp)
|
||||
/* 245E4 800491E4 C6200010 */ lwc1 $f0, 0x10($s1)
|
||||
/* 245E8 800491E8 46800020 */ cvt.s.w $f0, $f0
|
||||
/* 245EC 800491EC E7A00014 */ swc1 $f0, 0x14($sp)
|
||||
/* 245F0 800491F0 C6200014 */ lwc1 $f0, 0x14($s1)
|
||||
/* 245F4 800491F4 46800020 */ cvt.s.w $f0, $f0
|
||||
/* 245F8 800491F8 E7A00018 */ swc1 $f0, 0x18($sp)
|
||||
/* 245FC 800491FC 0C0123F5 */ jal is_point_within_region
|
||||
/* 24600 80049200 8E240004 */ lw $a0, 4($s1)
|
||||
/* 24604 80049204 1440006E */ bnez $v0, .L800493C0
|
||||
/* 24608 80049208 0000102D */ daddu $v0, $zero, $zero
|
||||
.L8004920C:
|
||||
/* 2460C 8004920C 824300B4 */ lb $v1, 0xb4($s2)
|
||||
/* 24610 80049210 2402001D */ addiu $v0, $zero, 0x1d
|
||||
/* 24614 80049214 1062006A */ beq $v1, $v0, .L800493C0
|
||||
/* 24618 80049218 0000102D */ daddu $v0, $zero, $zero
|
||||
/* 2461C 8004921C 926200AC */ lbu $v0, 0xac($s3)
|
||||
/* 24620 80049220 30420001 */ andi $v0, $v0, 1
|
||||
/* 24624 80049224 1040002C */ beqz $v0, .L800492D8
|
||||
/* 24628 80049228 00000000 */ nop
|
||||
/* 2462C 8004922C C60C0038 */ lwc1 $f12, 0x38($s0)
|
||||
/* 24630 80049230 860200A8 */ lh $v0, 0xa8($s0)
|
||||
/* 24634 80049234 3C013FE0 */ lui $at, 0x3fe0
|
||||
/* 24638 80049238 44810800 */ mtc1 $at, $f1
|
||||
/* 2463C 8004923C 44800000 */ mtc1 $zero, $f0
|
||||
/* 24640 80049240 44821000 */ mtc1 $v0, $f2
|
||||
/* 24644 80049244 00000000 */ nop
|
||||
/* 24648 80049248 468010A1 */ cvt.d.w $f2, $f2
|
||||
/* 2464C 8004924C 46201082 */ mul.d $f2, $f2, $f0
|
||||
/* 24650 80049250 00000000 */ nop
|
||||
/* 24654 80049254 C60E0040 */ lwc1 $f14, 0x40($s0)
|
||||
/* 24658 80049258 8E460028 */ lw $a2, 0x28($s2)
|
||||
/* 2465C 8004925C 8E470030 */ lw $a3, 0x30($s2)
|
||||
/* 24660 80049260 46006106 */ mov.s $f4, $f12
|
||||
/* 24664 80049264 C600003C */ lwc1 $f0, 0x3c($s0)
|
||||
/* 24668 80049268 46007186 */ mov.s $f6, $f14
|
||||
/* 2466C 8004926C 46000021 */ cvt.d.s $f0, $f0
|
||||
/* 24670 80049270 46220000 */ add.d $f0, $f0, $f2
|
||||
/* 24674 80049274 E7A40020 */ swc1 $f4, 0x20($sp)
|
||||
/* 24678 80049278 E7A60028 */ swc1 $f6, 0x28($sp)
|
||||
/* 2467C 8004927C 46200020 */ cvt.s.d $f0, $f0
|
||||
/* 24680 80049280 0C00A7B5 */ jal dist2D
|
||||
/* 24684 80049284 E7A00024 */ swc1 $f0, 0x24($sp)
|
||||
/* 24688 80049288 C60C0038 */ lwc1 $f12, 0x38($s0)
|
||||
/* 2468C 8004928C C60E0040 */ lwc1 $f14, 0x40($s0)
|
||||
/* 24690 80049290 8E460028 */ lw $a2, 0x28($s2)
|
||||
/* 24694 80049294 8E470030 */ lw $a3, 0x30($s2)
|
||||
/* 24698 80049298 0C00A720 */ jal atan2
|
||||
/* 2469C 8004929C 46000506 */ mov.s $f20, $f0
|
||||
/* 246A0 800492A0 3C040005 */ lui $a0, 5
|
||||
/* 246A4 800492A4 27A50020 */ addiu $a1, $sp, 0x20
|
||||
/* 246A8 800492A8 27A60024 */ addiu $a2, $sp, 0x24
|
||||
/* 246AC 800492AC 3C013DCC */ lui $at, 0x3dcc
|
||||
/* 246B0 800492B0 3421CCCD */ ori $at, $at, 0xcccd
|
||||
/* 246B4 800492B4 44811000 */ mtc1 $at, $f2
|
||||
/* 246B8 800492B8 27A70028 */ addiu $a3, $sp, 0x28
|
||||
/* 246BC 800492BC E7B40010 */ swc1 $f20, 0x10($sp)
|
||||
/* 246C0 800492C0 E7A00014 */ swc1 $f0, 0x14($sp)
|
||||
/* 246C4 800492C4 E7A20018 */ swc1 $f2, 0x18($sp)
|
||||
/* 246C8 800492C8 0C037711 */ jal npc_test_move_simple_with_slipping
|
||||
/* 246CC 800492CC E7A2001C */ swc1 $f2, 0x1c($sp)
|
||||
/* 246D0 800492D0 1440003B */ bnez $v0, .L800493C0
|
||||
/* 246D4 800492D4 0000102D */ daddu $v0, $zero, $zero
|
||||
.L800492D8:
|
||||
/* 246D8 800492D8 8E220000 */ lw $v0, ($s1)
|
||||
/* 246DC 800492DC 14400003 */ bnez $v0, .L800492EC
|
||||
/* 246E0 800492E0 00000000 */ nop
|
||||
/* 246E4 800492E4 080124BD */ j .L800492F4
|
||||
/* 246E8 800492E8 0000102D */ daddu $v0, $zero, $zero
|
||||
.L800492EC:
|
||||
/* 246EC 800492EC 0C00A67F */ jal rand_int
|
||||
/* 246F0 800492F0 24440001 */ addiu $a0, $v0, 1
|
||||
.L800492F4:
|
||||
/* 246F4 800492F4 14400032 */ bnez $v0, .L800493C0
|
||||
/* 246F8 800492F8 0000102D */ daddu $v0, $zero, $zero
|
||||
/* 246FC 800492FC 926200AC */ lbu $v0, 0xac($s3)
|
||||
/* 24700 80049300 30420002 */ andi $v0, $v0, 2
|
||||
/* 24704 80049304 10400010 */ beqz $v0, .L80049348
|
||||
/* 24708 80049308 24020001 */ addiu $v0, $zero, 1
|
||||
/* 2470C 8004930C 824300B4 */ lb $v1, 0xb4($s2)
|
||||
/* 24710 80049310 14620005 */ bne $v1, $v0, .L80049328
|
||||
/* 24714 80049314 24020002 */ addiu $v0, $zero, 2
|
||||
/* 24718 80049318 3C01800A */ lui $at, %hi(D_80098710)
|
||||
/* 2471C 8004931C D4228710 */ ldc1 $f2, %lo(D_80098710)($at)
|
||||
/* 24720 80049320 080124CF */ j .L8004933C
|
||||
/* 24724 80049324 4600B021 */ cvt.d.s $f0, $f22
|
||||
.L80049328:
|
||||
/* 24728 80049328 14620007 */ bne $v1, $v0, .L80049348
|
||||
/* 2472C 8004932C 00000000 */ nop
|
||||
/* 24730 80049330 3C01800A */ lui $at, %hi(D_80098718)
|
||||
/* 24734 80049334 D4228718 */ ldc1 $f2, %lo(D_80098718)($at)
|
||||
/* 24738 80049338 4600B021 */ cvt.d.s $f0, $f22
|
||||
.L8004933C:
|
||||
/* 2473C 8004933C 46220002 */ mul.d $f0, $f0, $f2
|
||||
/* 24740 80049340 00000000 */ nop
|
||||
/* 24744 80049344 462005A0 */ cvt.s.d $f22, $f0
|
||||
.L80049348:
|
||||
/* 24748 80049348 C6000038 */ lwc1 $f0, 0x38($s0)
|
||||
/* 2474C 8004934C C6020040 */ lwc1 $f2, 0x40($s0)
|
||||
/* 24750 80049350 328200FF */ andi $v0, $s4, 0xff
|
||||
/* 24754 80049354 E7A00020 */ swc1 $f0, 0x20($sp)
|
||||
/* 24758 80049358 10400005 */ beqz $v0, .L80049370
|
||||
/* 2475C 8004935C E7A20028 */ swc1 $f2, 0x28($sp)
|
||||
/* 24760 80049360 4406C000 */ mfc1 $a2, $f24
|
||||
/* 24764 80049364 8E07000C */ lw $a3, 0xc($s0)
|
||||
/* 24768 80049368 080124E4 */ j .L80049390
|
||||
/* 2476C 8004936C 27A40020 */ addiu $a0, $sp, 0x20
|
||||
.L80049370:
|
||||
/* 24770 80049370 C6020034 */ lwc1 $f2, 0x34($s0)
|
||||
/* 24774 80049374 3C014387 */ lui $at, 0x4387
|
||||
/* 24778 80049378 44810000 */ mtc1 $at, $f0
|
||||
/* 2477C 8004937C 00000000 */ nop
|
||||
/* 24780 80049380 46020001 */ sub.s $f0, $f0, $f2
|
||||
/* 24784 80049384 27A40020 */ addiu $a0, $sp, 0x20
|
||||
/* 24788 80049388 4406C000 */ mfc1 $a2, $f24
|
||||
/* 2478C 8004938C 44070000 */ mfc1 $a3, $f0
|
||||
.L80049390:
|
||||
/* 24790 80049390 0C00A7E7 */ jal add_vec2D_polar
|
||||
/* 24794 80049394 27A50028 */ addiu $a1, $sp, 0x28
|
||||
/* 24798 80049398 C7AC0020 */ lwc1 $f12, 0x20($sp)
|
||||
/* 2479C 8004939C C7AE0028 */ lwc1 $f14, 0x28($sp)
|
||||
/* 247A0 800493A0 8E460028 */ lw $a2, 0x28($s2)
|
||||
/* 247A4 800493A4 0C00A7B5 */ jal dist2D
|
||||
/* 247A8 800493A8 8E470030 */ lw $a3, 0x30($s2)
|
||||
/* 247AC 800493AC 4616003E */ c.le.s $f0, $f22
|
||||
/* 247B0 800493B0 00000000 */ nop
|
||||
/* 247B4 800493B4 45010002 */ bc1t .L800493C0
|
||||
/* 247B8 800493B8 24020001 */ addiu $v0, $zero, 1
|
||||
.L800493BC:
|
||||
/* 247BC 800493BC 0000102D */ daddu $v0, $zero, $zero
|
||||
.L800493C0:
|
||||
/* 247C0 800493C0 8FBF0044 */ lw $ra, 0x44($sp)
|
||||
/* 247C4 800493C4 8FB40040 */ lw $s4, 0x40($sp)
|
||||
/* 247C8 800493C8 8FB3003C */ lw $s3, 0x3c($sp)
|
||||
/* 247CC 800493CC 8FB20038 */ lw $s2, 0x38($sp)
|
||||
/* 247D0 800493D0 8FB10034 */ lw $s1, 0x34($sp)
|
||||
/* 247D4 800493D4 8FB00030 */ lw $s0, 0x30($sp)
|
||||
/* 247D8 800493D8 D7B80058 */ ldc1 $f24, 0x58($sp)
|
||||
/* 247DC 800493DC D7B60050 */ ldc1 $f22, 0x50($sp)
|
||||
/* 247E0 800493E0 D7B40048 */ ldc1 $f20, 0x48($sp)
|
||||
/* 247E4 800493E4 03E00008 */ jr $ra
|
||||
/* 247E8 800493E8 27BD0060 */ addiu $sp, $sp, 0x60
|
@ -1,305 +0,0 @@
|
||||
.set noat # allow manual use of $at
|
||||
.set noreorder # don't insert nops after branches
|
||||
|
||||
glabel func_800496B8
|
||||
/* 24AB8 800496B8 27BDFFA0 */ addiu $sp, $sp, -0x60
|
||||
/* 24ABC 800496BC AFB3004C */ sw $s3, 0x4c($sp)
|
||||
/* 24AC0 800496C0 0080982D */ daddu $s3, $a0, $zero
|
||||
/* 24AC4 800496C4 AFB40050 */ sw $s4, 0x50($sp)
|
||||
/* 24AC8 800496C8 00A0A02D */ daddu $s4, $a1, $zero
|
||||
/* 24ACC 800496CC AFBF0058 */ sw $ra, 0x58($sp)
|
||||
/* 24AD0 800496D0 AFB50054 */ sw $s5, 0x54($sp)
|
||||
/* 24AD4 800496D4 AFB20048 */ sw $s2, 0x48($sp)
|
||||
/* 24AD8 800496D8 AFB10044 */ sw $s1, 0x44($sp)
|
||||
/* 24ADC 800496DC AFB00040 */ sw $s0, 0x40($sp)
|
||||
/* 24AE0 800496E0 8E710148 */ lw $s1, 0x148($s3)
|
||||
/* 24AE4 800496E4 00C0902D */ daddu $s2, $a2, $zero
|
||||
/* 24AE8 800496E8 86240008 */ lh $a0, 8($s1)
|
||||
/* 24AEC 800496EC 0C00EABB */ jal get_npc_unsafe
|
||||
/* 24AF0 800496F0 0000A82D */ daddu $s5, $zero, $zero
|
||||
/* 24AF4 800496F4 8E830014 */ lw $v1, 0x14($s4)
|
||||
/* 24AF8 800496F8 0460005D */ bltz $v1, .L80049870
|
||||
/* 24AFC 800496FC 0040802D */ daddu $s0, $v0, $zero
|
||||
/* 24B00 80049700 8E620074 */ lw $v0, 0x74($s3)
|
||||
/* 24B04 80049704 1C400059 */ bgtz $v0, .L8004986C
|
||||
/* 24B08 80049708 2442FFFF */ addiu $v0, $v0, -1
|
||||
/* 24B0C 8004970C 0240202D */ daddu $a0, $s2, $zero
|
||||
/* 24B10 80049710 AE630074 */ sw $v1, 0x74($s3)
|
||||
/* 24B14 80049714 AFA00010 */ sw $zero, 0x10($sp)
|
||||
/* 24B18 80049718 8E86000C */ lw $a2, 0xc($s4)
|
||||
/* 24B1C 8004971C 8E870010 */ lw $a3, 0x10($s4)
|
||||
/* 24B20 80049720 0C01242D */ jal func_800490B4
|
||||
/* 24B24 80049724 0220282D */ daddu $a1, $s1, $zero
|
||||
/* 24B28 80049728 1040004E */ beqz $v0, .L80049864
|
||||
/* 24B2C 8004972C 00000000 */ nop
|
||||
/* 24B30 80049730 C60C0038 */ lwc1 $f12, 0x38($s0)
|
||||
/* 24B34 80049734 3C02800F */ lui $v0, %hi(gPlayerStatusPtr)
|
||||
/* 24B38 80049738 8C427B30 */ lw $v0, %lo(gPlayerStatusPtr)($v0)
|
||||
/* 24B3C 8004973C C60E0040 */ lwc1 $f14, 0x40($s0)
|
||||
/* 24B40 80049740 C602003C */ lwc1 $f2, 0x3c($s0)
|
||||
/* 24B44 80049744 46006006 */ mov.s $f0, $f12
|
||||
/* 24B48 80049748 8C460028 */ lw $a2, 0x28($v0)
|
||||
/* 24B4C 8004974C 8C470030 */ lw $a3, 0x30($v0)
|
||||
/* 24B50 80049750 46007106 */ mov.s $f4, $f14
|
||||
/* 24B54 80049754 E7A00028 */ swc1 $f0, 0x28($sp)
|
||||
/* 24B58 80049758 E7A2002C */ swc1 $f2, 0x2c($sp)
|
||||
/* 24B5C 8004975C 0C00A720 */ jal atan2
|
||||
/* 24B60 80049760 E7A40030 */ swc1 $f4, 0x30($sp)
|
||||
/* 24B64 80049764 C6820018 */ lwc1 $f2, 0x18($s4)
|
||||
/* 24B68 80049768 E7A00038 */ swc1 $f0, 0x38($sp)
|
||||
/* 24B6C 8004976C E7A00014 */ swc1 $f0, 0x14($sp)
|
||||
/* 24B70 80049770 E7A20010 */ swc1 $f2, 0x10($sp)
|
||||
/* 24B74 80049774 860200A8 */ lh $v0, 0xa8($s0)
|
||||
/* 24B78 80049778 27A50028 */ addiu $a1, $sp, 0x28
|
||||
/* 24B7C 8004977C 44820000 */ mtc1 $v0, $f0
|
||||
/* 24B80 80049780 00000000 */ nop
|
||||
/* 24B84 80049784 46800020 */ cvt.s.w $f0, $f0
|
||||
/* 24B88 80049788 E7A00018 */ swc1 $f0, 0x18($sp)
|
||||
/* 24B8C 8004978C 860200A6 */ lh $v0, 0xa6($s0)
|
||||
/* 24B90 80049790 27A6002C */ addiu $a2, $sp, 0x2c
|
||||
/* 24B94 80049794 44820000 */ mtc1 $v0, $f0
|
||||
/* 24B98 80049798 00000000 */ nop
|
||||
/* 24B9C 8004979C 46800020 */ cvt.s.w $f0, $f0
|
||||
/* 24BA0 800497A0 E7A0001C */ swc1 $f0, 0x1c($sp)
|
||||
/* 24BA4 800497A4 8E040080 */ lw $a0, 0x80($s0)
|
||||
/* 24BA8 800497A8 0C037711 */ jal npc_test_move_simple_with_slipping
|
||||
/* 24BAC 800497AC 27A70030 */ addiu $a3, $sp, 0x30
|
||||
/* 24BB0 800497B0 1440002C */ bnez $v0, .L80049864
|
||||
/* 24BB4 800497B4 0200202D */ daddu $a0, $s0, $zero
|
||||
/* 24BB8 800497B8 240502F4 */ addiu $a1, $zero, 0x2f4
|
||||
/* 24BBC 800497BC C7A00038 */ lwc1 $f0, 0x38($sp)
|
||||
/* 24BC0 800497C0 3C060020 */ lui $a2, 0x20
|
||||
/* 24BC4 800497C4 0C012530 */ jal ai_enemy_play_sound
|
||||
/* 24BC8 800497C8 E600000C */ swc1 $f0, 0xc($s0)
|
||||
/* 24BCC 800497CC 02A0202D */ daddu $a0, $s5, $zero
|
||||
/* 24BD0 800497D0 0200282D */ daddu $a1, $s0, $zero
|
||||
/* 24BD4 800497D4 0000302D */ daddu $a2, $zero, $zero
|
||||
/* 24BD8 800497D8 84A300A8 */ lh $v1, 0xa8($a1)
|
||||
/* 24BDC 800497DC 3C013F80 */ lui $at, 0x3f80
|
||||
/* 24BE0 800497E0 44810000 */ mtc1 $at, $f0
|
||||
/* 24BE4 800497E4 3C014000 */ lui $at, 0x4000
|
||||
/* 24BE8 800497E8 44811000 */ mtc1 $at, $f2
|
||||
/* 24BEC 800497EC 3C01C1A0 */ lui $at, 0xc1a0
|
||||
/* 24BF0 800497F0 44812000 */ mtc1 $at, $f4
|
||||
/* 24BF4 800497F4 2402000F */ addiu $v0, $zero, 0xf
|
||||
/* 24BF8 800497F8 AFA2001C */ sw $v0, 0x1c($sp)
|
||||
/* 24BFC 800497FC 44833000 */ mtc1 $v1, $f6
|
||||
/* 24C00 80049800 00000000 */ nop
|
||||
/* 24C04 80049804 468031A0 */ cvt.s.w $f6, $f6
|
||||
/* 24C08 80049808 44073000 */ mfc1 $a3, $f6
|
||||
/* 24C0C 8004980C 27A20034 */ addiu $v0, $sp, 0x34
|
||||
/* 24C10 80049810 AFA20020 */ sw $v0, 0x20($sp)
|
||||
/* 24C14 80049814 E7A00010 */ swc1 $f0, 0x10($sp)
|
||||
/* 24C18 80049818 E7A20014 */ swc1 $f2, 0x14($sp)
|
||||
/* 24C1C 8004981C 0C01BFA4 */ jal fx_emote
|
||||
/* 24C20 80049820 E7A40018 */ swc1 $f4, 0x18($sp)
|
||||
/* 24C24 80049824 2403FFBF */ addiu $v1, $zero, -0x41
|
||||
/* 24C28 80049828 8E2200B0 */ lw $v0, 0xb0($s1)
|
||||
/* 24C2C 8004982C 8E240018 */ lw $a0, 0x18($s1)
|
||||
/* 24C30 80049830 00431024 */ and $v0, $v0, $v1
|
||||
/* 24C34 80049834 2403FFDF */ addiu $v1, $zero, -0x21
|
||||
/* 24C38 80049838 00431024 */ and $v0, $v0, $v1
|
||||
/* 24C3C 8004983C AE2200B0 */ sw $v0, 0xb0($s1)
|
||||
/* 24C40 80049840 9482002A */ lhu $v0, 0x2a($a0)
|
||||
/* 24C44 80049844 30420001 */ andi $v0, $v0, 1
|
||||
/* 24C48 80049848 10400003 */ beqz $v0, .L80049858
|
||||
/* 24C4C 8004984C 2402000A */ addiu $v0, $zero, 0xa
|
||||
/* 24C50 80049850 080126C8 */ j .L80049B20
|
||||
/* 24C54 80049854 AE620070 */ sw $v0, 0x70($s3)
|
||||
.L80049858:
|
||||
/* 24C58 80049858 2402000C */ addiu $v0, $zero, 0xc
|
||||
/* 24C5C 8004985C 080126C8 */ j .L80049B20
|
||||
/* 24C60 80049860 AE620070 */ sw $v0, 0x70($s3)
|
||||
.L80049864:
|
||||
/* 24C64 80049864 8E620074 */ lw $v0, 0x74($s3)
|
||||
/* 24C68 80049868 2442FFFF */ addiu $v0, $v0, -1
|
||||
.L8004986C:
|
||||
/* 24C6C 8004986C AE620074 */ sw $v0, 0x74($s3)
|
||||
.L80049870:
|
||||
/* 24C70 80049870 8E2300D0 */ lw $v1, 0xd0($s1)
|
||||
/* 24C74 80049874 C6000040 */ lwc1 $f0, 0x40($s0)
|
||||
/* 24C78 80049878 C4620000 */ lwc1 $f2, ($v1)
|
||||
/* 24C7C 8004987C 468010A0 */ cvt.s.w $f2, $f2
|
||||
/* 24C80 80049880 C4640008 */ lwc1 $f4, 8($v1)
|
||||
/* 24C84 80049884 46802120 */ cvt.s.w $f4, $f4
|
||||
/* 24C88 80049888 E7A00010 */ swc1 $f0, 0x10($sp)
|
||||
/* 24C8C 8004988C 8E2200D0 */ lw $v0, 0xd0($s1)
|
||||
/* 24C90 80049890 44051000 */ mfc1 $a1, $f2
|
||||
/* 24C94 80049894 C440000C */ lwc1 $f0, 0xc($v0)
|
||||
/* 24C98 80049898 46800020 */ cvt.s.w $f0, $f0
|
||||
/* 24C9C 8004989C E7A00014 */ swc1 $f0, 0x14($sp)
|
||||
/* 24CA0 800498A0 8E2200D0 */ lw $v0, 0xd0($s1)
|
||||
/* 24CA4 800498A4 44062000 */ mfc1 $a2, $f4
|
||||
/* 24CA8 800498A8 C4400010 */ lwc1 $f0, 0x10($v0)
|
||||
/* 24CAC 800498AC 46800020 */ cvt.s.w $f0, $f0
|
||||
/* 24CB0 800498B0 E7A00018 */ swc1 $f0, 0x18($sp)
|
||||
/* 24CB4 800498B4 8C640018 */ lw $a0, 0x18($v1)
|
||||
/* 24CB8 800498B8 0C0123F5 */ jal is_point_within_region
|
||||
/* 24CBC 800498BC 8E070038 */ lw $a3, 0x38($s0)
|
||||
/* 24CC0 800498C0 10400064 */ beqz $v0, .L80049A54
|
||||
/* 24CC4 800498C4 00000000 */ nop
|
||||
/* 24CC8 800498C8 8E060038 */ lw $a2, 0x38($s0)
|
||||
/* 24CCC 800498CC 8E2200D0 */ lw $v0, 0xd0($s1)
|
||||
/* 24CD0 800498D0 8E070040 */ lw $a3, 0x40($s0)
|
||||
/* 24CD4 800498D4 C44C0000 */ lwc1 $f12, ($v0)
|
||||
/* 24CD8 800498D8 46806320 */ cvt.s.w $f12, $f12
|
||||
/* 24CDC 800498DC C44E0008 */ lwc1 $f14, 8($v0)
|
||||
/* 24CE0 800498E0 0C00A7B5 */ jal dist2D
|
||||
/* 24CE4 800498E4 468073A0 */ cvt.s.w $f14, $f14
|
||||
/* 24CE8 800498E8 C6020018 */ lwc1 $f2, 0x18($s0)
|
||||
/* 24CEC 800498EC 4600103C */ c.lt.s $f2, $f0
|
||||
/* 24CF0 800498F0 00000000 */ nop
|
||||
/* 24CF4 800498F4 45000057 */ bc1f .L80049A54
|
||||
/* 24CF8 800498F8 00000000 */ nop
|
||||
/* 24CFC 800498FC 8E2300B0 */ lw $v1, 0xb0($s1)
|
||||
/* 24D00 80049900 30620020 */ andi $v0, $v1, 0x20
|
||||
/* 24D04 80049904 14400002 */ bnez $v0, .L80049910
|
||||
/* 24D08 80049908 34620060 */ ori $v0, $v1, 0x60
|
||||
/* 24D0C 8004990C AE2200B0 */ sw $v0, 0xb0($s1)
|
||||
.L80049910:
|
||||
/* 24D10 80049910 8E2200B0 */ lw $v0, 0xb0($s1)
|
||||
/* 24D14 80049914 30420040 */ andi $v0, $v0, 0x40
|
||||
/* 24D18 80049918 10400013 */ beqz $v0, .L80049968
|
||||
/* 24D1C 8004991C 00000000 */ nop
|
||||
/* 24D20 80049920 C60C0038 */ lwc1 $f12, 0x38($s0)
|
||||
/* 24D24 80049924 8E2200D0 */ lw $v0, 0xd0($s1)
|
||||
/* 24D28 80049928 C60E0040 */ lwc1 $f14, 0x40($s0)
|
||||
/* 24D2C 8004992C C4460000 */ lwc1 $f6, ($v0)
|
||||
/* 24D30 80049930 468031A0 */ cvt.s.w $f6, $f6
|
||||
/* 24D34 80049934 44063000 */ mfc1 $a2, $f6
|
||||
/* 24D38 80049938 C4460008 */ lwc1 $f6, 8($v0)
|
||||
/* 24D3C 8004993C 468031A0 */ cvt.s.w $f6, $f6
|
||||
/* 24D40 80049940 44073000 */ mfc1 $a3, $f6
|
||||
/* 24D44 80049944 0C00A720 */ jal atan2
|
||||
/* 24D48 80049948 00000000 */ nop
|
||||
/* 24D4C 8004994C 0C00A6C9 */ jal clamp_angle
|
||||
/* 24D50 80049950 46000306 */ mov.s $f12, $f0
|
||||
/* 24D54 80049954 E600000C */ swc1 $f0, 0xc($s0)
|
||||
/* 24D58 80049958 8E2200B0 */ lw $v0, 0xb0($s1)
|
||||
/* 24D5C 8004995C 2403FFBF */ addiu $v1, $zero, -0x41
|
||||
/* 24D60 80049960 00431024 */ and $v0, $v0, $v1
|
||||
/* 24D64 80049964 AE2200B0 */ sw $v0, 0xb0($s1)
|
||||
.L80049968:
|
||||
/* 24D68 80049968 C6000018 */ lwc1 $f0, 0x18($s0)
|
||||
/* 24D6C 8004996C C6020038 */ lwc1 $f2, 0x38($s0)
|
||||
/* 24D70 80049970 46000021 */ cvt.d.s $f0, $f0
|
||||
/* 24D74 80049974 E7A20028 */ swc1 $f2, 0x28($sp)
|
||||
/* 24D78 80049978 C602003C */ lwc1 $f2, 0x3c($s0)
|
||||
/* 24D7C 8004997C C6040040 */ lwc1 $f4, 0x40($s0)
|
||||
/* 24D80 80049980 46200000 */ add.d $f0, $f0, $f0
|
||||
/* 24D84 80049984 E7A2002C */ swc1 $f2, 0x2c($sp)
|
||||
/* 24D88 80049988 E7A40030 */ swc1 $f4, 0x30($sp)
|
||||
/* 24D8C 8004998C 46200020 */ cvt.s.d $f0, $f0
|
||||
/* 24D90 80049990 E7A00010 */ swc1 $f0, 0x10($sp)
|
||||
/* 24D94 80049994 C600000C */ lwc1 $f0, 0xc($s0)
|
||||
/* 24D98 80049998 E7A00014 */ swc1 $f0, 0x14($sp)
|
||||
/* 24D9C 8004999C 860200A8 */ lh $v0, 0xa8($s0)
|
||||
/* 24DA0 800499A0 27A50028 */ addiu $a1, $sp, 0x28
|
||||
/* 24DA4 800499A4 44820000 */ mtc1 $v0, $f0
|
||||
/* 24DA8 800499A8 00000000 */ nop
|
||||
/* 24DAC 800499AC 46800020 */ cvt.s.w $f0, $f0
|
||||
/* 24DB0 800499B0 E7A00018 */ swc1 $f0, 0x18($sp)
|
||||
/* 24DB4 800499B4 860200A6 */ lh $v0, 0xa6($s0)
|
||||
/* 24DB8 800499B8 27A6002C */ addiu $a2, $sp, 0x2c
|
||||
/* 24DBC 800499BC 44820000 */ mtc1 $v0, $f0
|
||||
/* 24DC0 800499C0 00000000 */ nop
|
||||
/* 24DC4 800499C4 46800020 */ cvt.s.w $f0, $f0
|
||||
/* 24DC8 800499C8 E7A0001C */ swc1 $f0, 0x1c($sp)
|
||||
/* 24DCC 800499CC 8E040080 */ lw $a0, 0x80($s0)
|
||||
/* 24DD0 800499D0 0C037711 */ jal npc_test_move_simple_with_slipping
|
||||
/* 24DD4 800499D4 27A70030 */ addiu $a3, $sp, 0x30
|
||||
/* 24DD8 800499D8 10400026 */ beqz $v0, .L80049A74
|
||||
/* 24DDC 800499DC 24150001 */ addiu $s5, $zero, 1
|
||||
/* 24DE0 800499E0 C60C0038 */ lwc1 $f12, 0x38($s0)
|
||||
/* 24DE4 800499E4 8E2200D0 */ lw $v0, 0xd0($s1)
|
||||
/* 24DE8 800499E8 C60E0040 */ lwc1 $f14, 0x40($s0)
|
||||
/* 24DEC 800499EC C4460000 */ lwc1 $f6, ($v0)
|
||||
/* 24DF0 800499F0 468031A0 */ cvt.s.w $f6, $f6
|
||||
/* 24DF4 800499F4 44063000 */ mfc1 $a2, $f6
|
||||
/* 24DF8 800499F8 C4460008 */ lwc1 $f6, 8($v0)
|
||||
/* 24DFC 800499FC 468031A0 */ cvt.s.w $f6, $f6
|
||||
/* 24E00 80049A00 44073000 */ mfc1 $a3, $f6
|
||||
/* 24E04 80049A04 0C00A720 */ jal atan2
|
||||
/* 24E08 80049A08 00000000 */ nop
|
||||
/* 24E0C 80049A0C 0C00A6C9 */ jal clamp_angle
|
||||
/* 24E10 80049A10 46000306 */ mov.s $f12, $f0
|
||||
/* 24E14 80049A14 0200202D */ daddu $a0, $s0, $zero
|
||||
/* 24E18 80049A18 27A60038 */ addiu $a2, $sp, 0x38
|
||||
/* 24E1C 80049A1C 0000382D */ daddu $a3, $zero, $zero
|
||||
/* 24E20 80049A20 2403FFBF */ addiu $v1, $zero, -0x41
|
||||
/* 24E24 80049A24 E7A00038 */ swc1 $f0, 0x38($sp)
|
||||
/* 24E28 80049A28 8E2200B0 */ lw $v0, 0xb0($s1)
|
||||
/* 24E2C 80049A2C 3C0540A0 */ lui $a1, 0x40a0
|
||||
/* 24E30 80049A30 00431024 */ and $v0, $v0, $v1
|
||||
/* 24E34 80049A34 AE2200B0 */ sw $v0, 0xb0($s1)
|
||||
/* 24E38 80049A38 AFA00010 */ sw $zero, 0x10($sp)
|
||||
/* 24E3C 80049A3C 0C0129E1 */ jal func_8004A784
|
||||
/* 24E40 80049A40 AFA00014 */ sw $zero, 0x14($sp)
|
||||
/* 24E44 80049A44 C7A00038 */ lwc1 $f0, 0x38($sp)
|
||||
/* 24E48 80049A48 E600000C */ swc1 $f0, 0xc($s0)
|
||||
/* 24E4C 80049A4C 0801269D */ j .L80049A74
|
||||
/* 24E50 80049A50 24150001 */ addiu $s5, $zero, 1
|
||||
.L80049A54:
|
||||
/* 24E54 80049A54 8E2300B0 */ lw $v1, 0xb0($s1)
|
||||
/* 24E58 80049A58 30620020 */ andi $v0, $v1, 0x20
|
||||
/* 24E5C 80049A5C 10400005 */ beqz $v0, .L80049A74
|
||||
/* 24E60 80049A60 2402FFDF */ addiu $v0, $zero, -0x21
|
||||
/* 24E64 80049A64 00621024 */ and $v0, $v1, $v0
|
||||
/* 24E68 80049A68 2403FFBF */ addiu $v1, $zero, -0x41
|
||||
/* 24E6C 80049A6C 00431024 */ and $v0, $v0, $v1
|
||||
/* 24E70 80049A70 AE2200B0 */ sw $v0, 0xb0($s1)
|
||||
.L80049A74:
|
||||
/* 24E74 80049A74 8E2200D0 */ lw $v0, 0xd0($s1)
|
||||
/* 24E78 80049A78 8C43000C */ lw $v1, 0xc($v0)
|
||||
/* 24E7C 80049A7C 8C420010 */ lw $v0, 0x10($v0)
|
||||
/* 24E80 80049A80 00621825 */ or $v1, $v1, $v0
|
||||
/* 24E84 80049A84 00751825 */ or $v1, $v1, $s5
|
||||
/* 24E88 80049A88 10600008 */ beqz $v1, .L80049AAC
|
||||
/* 24E8C 80049A8C 00000000 */ nop
|
||||
/* 24E90 80049A90 8602008C */ lh $v0, 0x8c($s0)
|
||||
/* 24E94 80049A94 14400022 */ bnez $v0, .L80049B20
|
||||
/* 24E98 80049A98 00000000 */ nop
|
||||
/* 24E9C 80049A9C 8E050018 */ lw $a1, 0x18($s0)
|
||||
/* 24EA0 80049AA0 8E06000C */ lw $a2, 0xc($s0)
|
||||
/* 24EA4 80049AA4 0C00EA95 */ jal npc_move_heading
|
||||
/* 24EA8 80049AA8 0200202D */ daddu $a0, $s0, $zero
|
||||
.L80049AAC:
|
||||
/* 24EAC 80049AAC 8E820004 */ lw $v0, 4($s4)
|
||||
/* 24EB0 80049AB0 1840001B */ blez $v0, .L80049B20
|
||||
/* 24EB4 80049AB4 00000000 */ nop
|
||||
/* 24EB8 80049AB8 9602008E */ lhu $v0, 0x8e($s0)
|
||||
/* 24EBC 80049ABC 2442FFFF */ addiu $v0, $v0, -1
|
||||
/* 24EC0 80049AC0 A602008E */ sh $v0, 0x8e($s0)
|
||||
/* 24EC4 80049AC4 00021400 */ sll $v0, $v0, 0x10
|
||||
/* 24EC8 80049AC8 1C400015 */ bgtz $v0, .L80049B20
|
||||
/* 24ECC 80049ACC 240403E8 */ addiu $a0, $zero, 0x3e8
|
||||
/* 24ED0 80049AD0 24020002 */ addiu $v0, $zero, 2
|
||||
/* 24ED4 80049AD4 0C00A67F */ jal rand_int
|
||||
/* 24ED8 80049AD8 AE620070 */ sw $v0, 0x70($s3)
|
||||
/* 24EDC 80049ADC 3C035555 */ lui $v1, 0x5555
|
||||
/* 24EE0 80049AE0 34635556 */ ori $v1, $v1, 0x5556
|
||||
/* 24EE4 80049AE4 00430018 */ mult $v0, $v1
|
||||
/* 24EE8 80049AE8 000227C3 */ sra $a0, $v0, 0x1f
|
||||
/* 24EEC 80049AEC 00004010 */ mfhi $t0
|
||||
/* 24EF0 80049AF0 01042023 */ subu $a0, $t0, $a0
|
||||
/* 24EF4 80049AF4 00041840 */ sll $v1, $a0, 1
|
||||
/* 24EF8 80049AF8 00641821 */ addu $v1, $v1, $a0
|
||||
/* 24EFC 80049AFC 00431023 */ subu $v0, $v0, $v1
|
||||
/* 24F00 80049B00 24420002 */ addiu $v0, $v0, 2
|
||||
/* 24F04 80049B04 AE620074 */ sw $v0, 0x74($s3)
|
||||
/* 24F08 80049B08 8E82002C */ lw $v0, 0x2c($s4)
|
||||
/* 24F0C 80049B0C 58400004 */ blezl $v0, .L80049B20
|
||||
/* 24F10 80049B10 AE600070 */ sw $zero, 0x70($s3)
|
||||
/* 24F14 80049B14 8E820008 */ lw $v0, 8($s4)
|
||||
/* 24F18 80049B18 58400001 */ blezl $v0, .L80049B20
|
||||
/* 24F1C 80049B1C AE600070 */ sw $zero, 0x70($s3)
|
||||
.L80049B20:
|
||||
/* 24F20 80049B20 8FBF0058 */ lw $ra, 0x58($sp)
|
||||
/* 24F24 80049B24 8FB50054 */ lw $s5, 0x54($sp)
|
||||
/* 24F28 80049B28 8FB40050 */ lw $s4, 0x50($sp)
|
||||
/* 24F2C 80049B2C 8FB3004C */ lw $s3, 0x4c($sp)
|
||||
/* 24F30 80049B30 8FB20048 */ lw $s2, 0x48($sp)
|
||||
/* 24F34 80049B34 8FB10044 */ lw $s1, 0x44($sp)
|
||||
/* 24F38 80049B38 8FB00040 */ lw $s0, 0x40($sp)
|
||||
/* 24F3C 80049B3C 03E00008 */ jr $ra
|
||||
/* 24F40 80049B40 27BD0060 */ addiu $sp, $sp, 0x60
|
Loading…
Reference in New Issue
Block a user