Partner Funcs + Splupdate (#820)

* progz

* fixies

* git subrepo pull --force tools/splat

subrepo:
  subdir:   "tools/splat"
  merged:   "6c228fc53a"
upstream:
  origin:   "https://github.com/ethteck/splat.git"
  branch:   "master"
  commit:   "6c228fc53a"
git-subrepo:
  version:  "0.4.5"
  origin:   "https://github.com/ingydotnet/git-subrepo"
  commit:   "aa416e4"

* 3

* func_80238000_703AF0

* Force upgrades of requirements in Jenkinsfile

* --amend

* main_loop finished

* PR comments
This commit is contained in:
Ethan Roseman 2022-10-15 07:21:50 +09:00 committed by GitHub
parent b93928a013
commit f12e57b7c4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
42 changed files with 1093 additions and 2821 deletions

2
Jenkinsfile vendored
View File

@ -13,7 +13,7 @@ pipeline {
sh 'curl -L "https://github.com/ethteck/ido-static-recomp/releases/download/per-function/ido-5.3-recomp-ubuntu-latest.tar.gz" | tar zx -C tools/build/cc/ido5.3' sh 'curl -L "https://github.com/ethteck/ido-static-recomp/releases/download/per-function/ido-5.3-recomp-ubuntu-latest.tar.gz" | tar zx -C tools/build/cc/ido5.3'
sh 'curl -L "https://github.com/decompals/mips-gcc-2.7.2/releases/download/main/gcc-2.7.2-linux.tar.gz" | tar zx -C tools/build/cc/gcc2.7.2' sh 'curl -L "https://github.com/decompals/mips-gcc-2.7.2/releases/download/main/gcc-2.7.2-linux.tar.gz" | tar zx -C tools/build/cc/gcc2.7.2'
sh 'curl -L "https://github.com/decompals/mips-binutils-2.6/releases/download/main/binutils-2.6-linux.tar.gz" | tar zx -C tools/build/cc/gcc2.7.2' sh 'curl -L "https://github.com/decompals/mips-binutils-2.6/releases/download/main/binutils-2.6-linux.tar.gz" | tar zx -C tools/build/cc/gcc2.7.2'
sh 'pip install -r requirements.txt' sh 'pip install -U -r requirements.txt'
sh './configure' sh './configure'
} }
} }

View File

@ -1424,7 +1424,9 @@ typedef struct WaterfallFXData {
} WaterfallFXData; // size = unknown } WaterfallFXData; // size = unknown
typedef struct WaterFountainFXData { typedef struct WaterFountainFXData {
/* 0x00 */ char unk_00[0x18]; /* 0x00 */ char unk_00[0x4];
/* 0x04 */ Vec3f unk_04;
/* 0x10 */ char unk_10[0x8];
/* 0x18 */ s32 unk_18; /* 0x18 */ s32 unk_18;
/* 0x1C */ s32 unk_1C; /* 0x1C */ s32 unk_1C;
/* 0x20 */ s32 unk_20; /* 0x20 */ s32 unk_20;
@ -1434,6 +1436,8 @@ typedef struct WaterFountainFXData {
/* 0x30 */ s32 unk_30; /* 0x30 */ s32 unk_30;
/* 0x34 */ char unk_34[0x4]; /* 0x34 */ char unk_34[0x4];
/* 0x38 */ f32 unk_38; /* 0x38 */ f32 unk_38;
/* 0x3C */ f32 unk_3C;
/* 0x40 */ f32 unk_40;
} WaterFountainFXData; // size = ? } WaterFountainFXData; // size = ?
typedef struct UnderwaterFXData { typedef struct UnderwaterFXData {

View File

@ -849,6 +849,9 @@ enum SoundIDs {
SOUND_295 = 0x00000295, SOUND_295 = 0x00000295,
SOUND_299 = 0x00000299, SOUND_299 = 0x00000299,
SOUND_29A = 0x0000029A, SOUND_29A = 0x0000029A,
SOUND_29B = 0x0000029B,
SOUND_29C = 0x0000029C,
SOUND_29D = 0x0000029D,
SOUND_2A0 = 0x000002A0, SOUND_2A0 = 0x000002A0,
SOUND_2A1 = 0x000002A1, SOUND_2A1 = 0x000002A1,
SOUND_2A2 = 0x000002A2, SOUND_2A2 = 0x000002A2,
@ -1111,6 +1114,7 @@ enum SoundIDs {
SOUND_2005 = 0x00002005, SOUND_2005 = 0x00002005,
SOUND_2009 = 0x00002009, SOUND_2009 = 0x00002009,
SOUND_200A = 0x0000200A, SOUND_200A = 0x0000200A,
SOUND_200B = 0x0000200B,
SOUND_200C = 0x0000200C, SOUND_200C = 0x0000200C,
SOUND_200D = 0x0000200D, SOUND_200D = 0x0000200D,
SOUND_BOW_VANISH = 0x0000200E, SOUND_BOW_VANISH = 0x0000200E,

View File

@ -31,8 +31,6 @@ TempE20110* D_802B7CB8_E20DC8 = &D_802B7DA0;
void func_802B7728_E20838(void); void func_802B7728_E20838(void);
void func_802B79C8_E20AD8(void); void func_802B79C8_E20AD8(void);
// floatz
#ifdef NON_MATCHING
void func_802B70B4_E201C4(void) { void func_802B70B4_E201C4(void) {
PlayerStatus* playerStatus = &gPlayerStatus; PlayerStatus* playerStatus = &gPlayerStatus;
f32 new_var; f32 new_var;
@ -40,15 +38,11 @@ void func_802B70B4_E201C4(void) {
if (playerStatus->animFlags & 0x10) { if (playerStatus->animFlags & 0x10) {
mem_clear(D_802B7CB8_E20DC8, sizeof(*D_802B7CB8_E20DC8)); mem_clear(D_802B7CB8_E20DC8, sizeof(*D_802B7CB8_E20DC8));
D_8010C950 = -1; D_8010C950 = -1;
D_802B7CB8_E20DC8->unk_00.x = playerStatus->position.x; D_802B7CB8_E20DC8->pos.x = playerStatus->position.x;
new_var = playerStatus->position.y + playerStatus->colliderHeight; D_802B7CB8_E20DC8->pos.y = playerStatus->position.y + playerStatus->colliderHeight +
if (!(playerStatus->animFlags & 0x1000)) { (!(playerStatus->animFlags & 0x1000) ? 8.0f : 2.0f);
D_802B7CB8_E20DC8->unk_00.y = new_var + 8.0f; D_802B7CB8_E20DC8->pos.z = playerStatus->position.z;
} else { D_802B7CB8_E20DC8->scale = 0.4f;
D_802B7CB8_E20DC8->unk_00.y = new_var + 2.0f;
}
D_802B7CB8_E20DC8->unk_00.z = playerStatus->position.z;
D_802B7CB8_E20DC8->unk_10 = 0.4f;
D_802B7CB8_E20DC8->unk_23 = 0; D_802B7CB8_E20DC8->unk_23 = 0;
D_802B7CB8_E20DC8->unk_0C = -gCameras[gCurrentCameraID].currentYaw; D_802B7CB8_E20DC8->unk_0C = -gCameras[gCurrentCameraID].currentYaw;
D_8010C958 = func_802B7728_E20838; D_8010C958 = func_802B7728_E20838;
@ -56,9 +50,6 @@ void func_802B70B4_E201C4(void) {
D_802B7CB8_E20DC8->unk_1C = 0xFF; D_802B7CB8_E20DC8->unk_1C = 0xFF;
} }
} }
#else
INCLUDE_ASM(s32, "E20110", func_802B70B4_E201C4);
#endif
void func_802B71E8_E202F8(void) { void func_802B71E8_E202F8(void) {
FoldImageRecPart sp20; FoldImageRecPart sp20;

View File

@ -74,7 +74,180 @@ ApiStatus func_802380E4_6F11C4(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
INCLUDE_ASM(s32, "battle/partner/goombario", func_8023817C_6F125C); ApiStatus func_8023817C_6F125C(Evt* script, s32 isInitialCall) {
Bytecode* args = script->ptrReadPos;
BattleStatus* battleStatus = &gBattleStatus;
Actor* actor = battleStatus->partnerActor;
ActorState* state = &actor->state;
f32 stateCurrentX;
f32 stateCurrentZ;
f32 stateGoalX;
f32 stateGoalZ;
f32 oldActorY;
f32 oldActorX;
f64 currentPosX64;
f64 acc1, acc2;
f64 acc3, acc4;
f64 vel1, vel2;
f64 vel3, vel4;
f32 temp;
if (isInitialCall) {
actor->state.moveTime = evt_get_variable(script, *args++);
actor->state.moveArcAmplitude = evt_get_variable(script, *args++);
script->functionTemp[1] = 0;
script->functionTemp[0] = 0;
if (actor->state.moveArcAmplitude == 1) {
script->functionTemp[0] = 2;
}
}
if (script->functionTemp[0] == 0) {
state->currentPos.x = actor->currentPos.x;
state->currentPos.y = actor->currentPos.y;
stateGoalX = state->goalPos.x;
stateGoalZ = state->goalPos.z;
stateCurrentX = state->currentPos.x;
stateCurrentZ = actor->currentPos.z;
state->currentPos.z = stateCurrentZ;
state->angle = atan2(stateCurrentX, stateCurrentZ, stateGoalX, stateGoalZ);
state->distance = dist2D(stateCurrentX, stateCurrentZ, stateGoalX, stateGoalZ);
if (state->moveTime == 0) {
state->moveTime = state->distance / state->speed;
temp = state->distance - (state->moveTime * state->speed);
} else {
state->speed = state->distance / state->moveTime;
temp = state->distance - (state->moveTime * state->speed);
}
if (state->moveTime == 0) {
return ApiStatus_DONE2;
}
state->unk_30.x = (state->goalPos.x - state->currentPos.x) / state->moveTime;
state->unk_30.y = (state->goalPos.y - state->currentPos.y) / state->moveTime;
state->unk_30.z = (state->goalPos.z - state->currentPos.z) / state->moveTime;
state->acceleration = PI_S / state->moveTime;
state->velocity = 0.0f;
state->speed += temp / state->moveTime;
if (state->moveArcAmplitude < 3) {
state->unk_24 = 90.0f;
state->unk_28 = 360 / state->moveTime;
temp = state->distance;
temp -= 20.0;
temp /= 6.0;
temp += 47.0;
state->bounceDivisor = temp;
if (state->moveArcAmplitude == 2) {
state->bounceDivisor *= 1.12;
}
state->unk_18.x = 0.0f;
state->unk_18.y = 0.0f;
vel3 = state->velocity;
acc3 = state->acceleration;
state->velocity = vel3 + ((sin_rad(DEG_TO_RAD(state->unk_24)) * 0.53 * acc3) + acc3);
} else {
state->unk_24 = 90.0f;
state->unk_28 = 360 / state->moveTime;
temp = state->distance;
temp -= 20.0;
temp /= 6.0;
temp += 47.0;
state->bounceDivisor = temp;
if (state->moveArcAmplitude == 4) {
state->bounceDivisor *= 1.25;
}
state->unk_18.x = 0.0f;
state->unk_18.y = 0.0f;
vel4 = state->velocity;
acc4 = state->acceleration;
state->velocity = vel4 + ((sin_rad(DEG_TO_RAD(state->unk_24)) * 0.8 * acc4) + acc4);
}
set_animation(ACTOR_PARTNER, 1, state->animJumpRise);
script->functionTemp[0] = 1;
}
switch (script->functionTemp[0]) {
case 1:
if (state->velocity > PI_S / 2) {
set_animation(ACTOR_PARTNER, 1, state->animJumpFall);
}
oldActorX = actor->currentPos.x;
oldActorY = actor->currentPos.y;
state->currentPos.x += state->unk_30.x;
state->currentPos.y = state->currentPos.y + state->unk_30.y;
state->currentPos.z = state->currentPos.z + state->unk_30.z;
state->unk_18.x = actor->currentPos.y;
actor->currentPos.x = state->currentPos.x;
actor->currentPos.y = state->currentPos.y + (state->bounceDivisor * sin_rad(state->velocity));
actor->currentPos.z = state->currentPos.z;
if (state->goalPos.y > actor->currentPos.y && state->moveTime < 3) {
actor->currentPos.y = state->goalPos.y;
}
actor->rotation.z = -atan2(oldActorX, -oldActorY, actor->currentPos.x, -actor->currentPos.y);
state->unk_18.y = actor->currentPos.y;
if (state->moveArcAmplitude < 3) {
vel1 = state->velocity;
acc1 = state->acceleration;
state->velocity = vel1 + ((sin_rad(DEG_TO_RAD(state->unk_24)) * 0.53 * acc1) + acc1);
} else {
vel2 = state->velocity;
acc2 = state->acceleration;
state->velocity = vel2 + ((sin_rad(DEG_TO_RAD(state->unk_24)) * 0.8 * acc2) + acc2);
}
state->unk_24 += state->unk_28;
state->unk_24 = clamp_angle(state->unk_24);
state->moveTime--;
if (state->moveTime == 0) {
actor->currentPos.y = state->goalPos.y;
state->acceleration = 1.8f;
state->velocity = -(state->unk_18.x - state->unk_18.y);
set_animation(ACTOR_PARTNER, 1, state->animJumpLand);
return ApiStatus_DONE1;
}
break;
case 2:
if (battleStatus->unk_83 == 0) {
return ApiStatus_DONE2;
}
state->moveTime = 1;
state->acceleration = 1.8f;
state->unk_24 = 90.0f;
state->velocity = -(state->unk_18.x - state->unk_18.y);
state->bounceDivisor = fabsf(state->unk_18.x - state->unk_18.y) / 16.5;
state->unk_28 = 360 / state->moveTime;
state->currentPos.x = actor->currentPos.x;
state->currentPos.y = actor->currentPos.y;
state->currentPos.z = actor->currentPos.z;
script->functionTemp[0] = 3;
// fallthrough
case 3:
currentPosX64 = state->currentPos.x; // required to match
state->currentPos.x = currentPosX64 + state->bounceDivisor * sin_rad(DEG_TO_RAD(state->unk_24)) / 33.0;
state->currentPos.y -= state->bounceDivisor * sin_rad(DEG_TO_RAD(state->unk_24));
state->unk_24 += state->unk_28;
state->unk_24 = clamp_angle(state->unk_24);
actor->currentPos.x = state->currentPos.x;
actor->currentPos.y = state->currentPos.y;
actor->currentPos.z = state->currentPos.z;
if (gBattleStatus.flags1 & BS_FLAGS1_2000) {
return ApiStatus_DONE2;
}
state->moveTime--;
if (state->moveTime == 0) {
return ApiStatus_DONE1;
}
break;
}
return ApiStatus_BLOCK;
}
ApiStatus N(func_80238A20_6F1B00)(Evt* script, s32 isInitialCall) { ApiStatus N(func_80238A20_6F1B00)(Evt* script, s32 isInitialCall) {
BattleStatus* battleStatus = &gBattleStatus; BattleStatus* battleStatus = &gBattleStatus;

View File

@ -4,7 +4,16 @@
#include "hud_element.h" #include "hud_element.h"
extern s32 (*D_8023AB80_70E890)[0]; extern s32 (*D_8023AB80_70E890)[0];
extern f32 D_8023D1E0; extern f32 D_8023D1E0;
extern EffectInstance* D_8023D1E4;
extern s32 D_8023D26C;
extern s32 D_8023D270;
extern s32 D_8023D274;
extern s32 D_8023D278;
extern s32 D_8023D27C;
extern s32 D_8023D280;
extern s32 D_8023D284;
extern s32 D_8023D288; extern s32 D_8023D288;
extern s32 D_8023D28C; extern s32 D_8023D28C;
extern s32 D_8023D290; extern s32 D_8023D290;
@ -25,6 +34,7 @@ extern s32 D_8023D2C8;
extern s32 D_8023D2D0[]; extern s32 D_8023D2D0[];
extern s32 D_8023D330; extern s32 D_8023D330;
extern s32 D_8023D334; extern s32 D_8023D334;
extern s32 D_8023D338;
extern HudScript HES_AimReticle; extern HudScript HES_AimReticle;
extern HudScript HES_AimTarget; extern HudScript HES_AimTarget;
@ -142,7 +152,7 @@ ApiStatus func_8023803C_70BD4C(Evt* script, s32 isInitialCall) {
if (D_8023D298 != 0) { if (D_8023D298 != 0) {
D_8023D298--; D_8023D298--;
} else { } else {
D_8023D298 = 0x50; D_8023D298 = 80;
hud_element_set_script(D_8023D2BC, HES_StickTapRight); hud_element_set_script(D_8023D2BC, HES_StickTapRight);
sfx_play_sound_at_position(0x312, 0, 0.0f, 0.0f, 0.0f); sfx_play_sound_at_position(0x312, 0, 0.0f, 0.0f, 0.0f);
script->functionTemp[0] = 2; script->functionTemp[0] = 2;
@ -150,8 +160,8 @@ ApiStatus func_8023803C_70BD4C(Evt* script, s32 isInitialCall) {
break; break;
case 2: case 2:
dpadY = battleStatus->dpadY; dpadY = battleStatus->dpadY;
if (dpadY > 0x50) { if (dpadY > 80) {
dpadY = 0x50; dpadY = 80;
} }
dpadX = battleStatus->dpadX; dpadX = battleStatus->dpadX;
if (dpadY < 35) { if (dpadY < 35) {
@ -490,6 +500,23 @@ ApiStatus func_8023906C_70CD7C(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
typedef struct UnkLak {
/* 0x00 */ char unk_00[0x44];
/* 0x44 */ s16 unk_44;
/* 0x46 */ s16 unk_46;
/* 0x48 */ char unk_48[0xC];
/* 0x54 */ s16 unk_54;
/* 0x56 */ char unk_56[0x4];
/* 0x5A */ s16 unk_5A;
/* 0x5C */ s8 unk_5C;
/* 0x5D */ s8 unk_5D;
/* 0x5E */ char unk_5E[0x12];
/* 0x70 */ s16 unk_70;
/* 0x72 */ s16 unk_72;
} UnkLak;
extern UnkLak* D_8023CCC0_7109D0;
INCLUDE_ASM(s32, "battle/partner/lakilester", func_80239140_70CE50); INCLUDE_ASM(s32, "battle/partner/lakilester", func_80239140_70CE50);
ApiStatus func_80239F84_70DC94(Evt* script, s32 isInitialCall) { ApiStatus func_80239F84_70DC94(Evt* script, s32 isInitialCall) {

View File

@ -3,6 +3,7 @@
#include "hud_element.h" #include "hud_element.h"
#include "effects.h" #include "effects.h"
extern EffectInstance* D_8023BD70;
extern s32 D_8023BD78[7]; extern s32 D_8023BD78[7];
extern s32 D_8023BD98[6]; extern s32 D_8023BD98[6];
extern s32 D_8023BDB4; extern s32 D_8023BDB4;
@ -433,7 +434,152 @@ ApiStatus func_80238E24_700BA4(Evt* evt, s32 isInitialCall) {
return ApiStatus_BLOCK; return ApiStatus_BLOCK;
} }
INCLUDE_ASM(s32, "battle/partner/parakarry", func_802390B4_700E34); ApiStatus func_802390B4_700E34(Evt* script, s32 isInitialCall) {
Actor* partner = gBattleStatus.partnerActor;
ActorState* state = &partner->state;
if (isInitialCall) {
script->functionTemp[0] = 0;
}
switch (script->functionTemp[0]) {
case 0:
state->currentPos.x = partner->currentPos.x;
state->currentPos.y = partner->currentPos.y;
state->currentPos.z = partner->currentPos.z;
state->angle = 60 - rand_int(10);
state->bounceDivisor = 0.0f;
state->moveTime = 90;
state->speed = 48.0f;
script->functionTemp[1] = 0;
script->functionTemp[2] = 0;
script->functionTemp[3] = 0;
D_8023BD70 = fx_65(0, state->currentPos.x, state->currentPos.y, state->currentPos.z, 1.0f, 0);
script->functionTemp[0] = 1;
break;
case 1:
add_vec2D_polar(&state->currentPos.x, &state->currentPos.y, state->speed, state->angle);
D_8023BD70->data.unk_65->pos.x = state->currentPos.x;
D_8023BD70->data.unk_65->pos.y = state->currentPos.y;
D_8023BD70->data.unk_65->pos.z = state->currentPos.z;
if (state->currentPos.x < -190.0f) {
if (script->functionTemp[1] != 0) {
script->functionTemp[0] = 2;
break;
}
if (state->angle >= 270.0f && state->angle < 360.0f) {
state->angle = 90.0f + (90.0f - clamp_angle(state->angle + 180.0f));
state->bounceDivisor = rand_int(4) - 2;
}
if (state->angle >= 180.0f && state->angle < 270.0f) {
state->angle = 90.0f - (clamp_angle(state->angle + 180.0f) - 90.0f);
state->bounceDivisor = rand_int(4) - 2;
}
if (script->functionTemp[3] != 0) {
sfx_play_sound_at_position(SOUND_200A, 0, state->currentPos.x, state->currentPos.y, state->currentPos.z);
} else {
sfx_play_sound_at_position(SOUND_200B, 0, state->currentPos.x, state->currentPos.y, state->currentPos.z);
}
script->functionTemp[3] = 1 - script->functionTemp[3];
}
if (state->currentPos.x > 190.0f) {
if (script->functionTemp[1] != 0) {
script->functionTemp[0] = 2;
break;
}
do {
if (state->angle >= 0.0f && state->angle < 90.0f) {
state->angle = 270.0f + (270.0f - clamp_angle(state->angle + 180.0f));
} else if (state->angle >= 90.0f && state->angle < 180.0f) {
state->angle = 270.0f - (clamp_angle(state->angle + 180.0f) - 270.0f);
}
} while (0);
if (script->functionTemp[3] != 0) {
sfx_play_sound_at_position(SOUND_200A, 0, state->currentPos.x, state->currentPos.y, state->currentPos.z);
} else {
sfx_play_sound_at_position(SOUND_200B, 0, state->currentPos.x, state->currentPos.y, state->currentPos.z);
}
script->functionTemp[3] = 1 - script->functionTemp[3];
}
if (state->currentPos.y < -30.0f) {
if (script->functionTemp[1] != 0) {
script->functionTemp[0] = 2;
break;
}
do {
if (state->angle >= 270.0f && state->angle < 360.0f) {
state->angle = 180.0f + (180.0f - clamp_angle(state->angle + 180.0f));
} else if (state->angle >= 0.0f && state->angle < 90.0f) {
state->angle = 180.0f - (clamp_angle(state->angle + 180.0f) - 180.0f);
}
} while (0); // TODO macro?
if (script->functionTemp[3] != 0) {
sfx_play_sound_at_position(SOUND_200A, 0, state->currentPos.x, state->currentPos.y, state->currentPos.z);
} else {
sfx_play_sound_at_position(SOUND_200B, 0, state->currentPos.x, state->currentPos.y, state->currentPos.z);
}
script->functionTemp[3] = 1 - script->functionTemp[3];
}
if (state->currentPos.y > 160.0f) {
if (script->functionTemp[1] != 0) {
script->functionTemp[0] = 2;
break;
}
do {
if (state->angle >= 90.0f && state->angle < 180.0f) {
state->angle = 360.0f + (360.0f - clamp_angle(state->angle + 180.0f));
} else if (state->angle >= 180.0f && state->angle < 270.0f) {
state->angle = 360.0f - (clamp_angle(state->angle + 180.0f) - 360.0f);
}
} while (0); // TODO macro?
if (script->functionTemp[3] != 0) {
sfx_play_sound_at_position(SOUND_200A, 0, state->currentPos.x, state->currentPos.y, state->currentPos.z);
} else {
sfx_play_sound_at_position(SOUND_200B, 0, state->currentPos.x, state->currentPos.y, state->currentPos.z);
}
script->functionTemp[3] = 1 - script->functionTemp[3];
}
state->angle = clamp_angle(state->angle + (state->bounceDivisor * 0.5));
if (state->moveTime != 0) {
state->moveTime--;
} else {
script->functionTemp[1] = 1;
}
break;
}
switch (script->functionTemp[0]) {
case 2:
state->moveTime = 5;
script->functionTemp[0] = 3;
D_8023BD70->flags |= 0x10;
// fallthrough
case 3:
add_vec2D_polar(&state->currentPos.x, &state->currentPos.y, state->speed, state->angle);
if (state->moveTime == 0) {
partner->rotation.z = 0.0f;
return ApiStatus_DONE2;
}
state->moveTime--;
// fallthrough
default:
partner->currentPos.x = state->currentPos.x;
partner->currentPos.y = state->currentPos.y;
partner->currentPos.z = state->currentPos.z;
return ApiStatus_BLOCK;
}
}
ApiStatus func_802397C8_701548(Evt* script, s32 isInitialCall) { ApiStatus func_802397C8_701548(Evt* script, s32 isInitialCall) {
script->varTable[15] = ((script->varTable[0] * 100) / 2499) + 2; script->varTable[15] = ((script->varTable[0] * 100) / 2499) + 2;

View File

@ -6,8 +6,8 @@ extern EffectInstance* D_8023C070;
ApiStatus func_80238000_707CA0(Evt* script, s32 isInitialCall) { ApiStatus func_80238000_707CA0(Evt* script, s32 isInitialCall) {
ActorPart* targetPart; ActorPart* targetPart;
Actor* partner = gBattleStatus.partnerActor; Actor* partner = gBattleStatus.partnerActor;
set_goal_pos_to_part(&partner->state, partner->targetActorID, partner->targetPartIndex); set_goal_pos_to_part(&partner->state, partner->targetActorID, partner->targetPartIndex);
targetPart = get_actor_part(get_actor(partner->targetActorID), partner->targetPartIndex); targetPart = get_actor_part(get_actor(partner->targetActorID), partner->targetPartIndex);
@ -33,7 +33,58 @@ ApiStatus func_80238000_707CA0(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
INCLUDE_ASM(s32, "battle/partner/sushie", func_80238114_707DB4); ApiStatus func_80238114_707DB4(Evt* script, s32 isInitialCall) {
Actor* partner = gBattleStatus.partnerActor;
s32 vt0 = script->varTable[0];
s32 vt15 = 0;
script->varTable[0] = 0;
switch (partner->actorBlueprint->level) {
case 0:
vt15 = 3;
if (vt0 > 40) {
vt15 = 4;
if (vt0 > 75) {
vt15 = 5;
script->varTable[0] = 1;
}
}
break;
case 1:
vt15 = 3;
if (vt0 > 35) {
vt15 = 4;
if (vt0 > 60) {
vt15 = 5;
if (vt0 > 80) {
vt15 = 6;
script->varTable[0] = 1;
}
}
}
break;
case 2:
vt15 = 3;
if (vt0 > 20) {
vt15 = 4;
if (vt0 > 30) {
vt15 = 5;
if (vt0 > 60) {
vt15 = 6;
if (vt0 > 80) {
vt15 = 7;
script->varTable[0] = 1;
}
}
}
}
break;
}
script->varTable[15] = vt15;
return ApiStatus_DONE2;
}
ApiStatus func_802381EC_707E8C(Evt* script, s32 isInitialCall) { ApiStatus func_802381EC_707E8C(Evt* script, s32 isInitialCall) {
BattleStatus* battleStatus = &gBattleStatus; BattleStatus* battleStatus = &gBattleStatus;
@ -41,7 +92,6 @@ ApiStatus func_802381EC_707E8C(Evt* script, s32 isInitialCall) {
f32 xScale; f32 xScale;
f32 yScale; f32 yScale;
f32 zScale; f32 zScale;
s32 temp_v0;
if (isInitialCall) { if (isInitialCall) {
script->functionTemp[0] = 0; script->functionTemp[0] = 0;
@ -55,17 +105,14 @@ ApiStatus func_802381EC_707E8C(Evt* script, s32 isInitialCall) {
partnerActor->scale.y = yScale + ((1.0 - yScale) / 3.0); partnerActor->scale.y = yScale + ((1.0 - yScale) / 3.0);
partnerActor->scale.z = zScale + ((1.0 - zScale) / 3.0); partnerActor->scale.z = zScale + ((1.0 - zScale) / 3.0);
temp_v0 = script->functionTemp[1]; if (script->functionTemp[1] != 0) {
if (temp_v0) { script->functionTemp[1]--;
script->functionTemp[1] = temp_v0 - 1;
return ApiStatus_BLOCK; return ApiStatus_BLOCK;
} }
partnerActor->scale.x = 1.0f; partnerActor->scale.x = 1.0f;
partnerActor->scale.y = 1.0f; partnerActor->scale.y = 1.0f;
partnerActor->scale.z = 1.0f; partnerActor->scale.z = 1.0f;
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
@ -129,7 +176,178 @@ ApiStatus func_80238480_708120(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
INCLUDE_ASM(s32, "battle/partner/sushie", func_80238540_7081E0); ApiStatus func_80238540_7081E0(Evt* script, s32 isInitialCall) {
Actor* partner = gBattleStatus.partnerActor;
ActorState* state = &partner->state;
f32 x, y;
if (isInitialCall) {
script->functionTemp[0] = 0;
}
switch (script->functionTemp[0]) {
case 0:
state->currentPos.x = partner->currentPos.x;
state->currentPos.y = partner->currentPos.y;
state->currentPos.z = partner->currentPos.z;
state->angle = 315.0f;
state->bounceDivisor = 0.0f;
state->moveTime = 90;
state->speed = 32.0f;
script->functionTemp[1] = 0;
script->functionTemp[2] = 0;
D_8023C070 = fx_water_fountain(1, state->currentPos.x, state->currentPos.y, state->currentPos.z, 1.0f, 0);
D_8023C070->data.waterFountain->unk_38 = state->angle;
D_8023C070->data.waterFountain->unk_3C = partner->scale.x;
D_8023C070->data.waterFountain->unk_40 = partner->scale.x;
script->functionTemp[0] = 1;
break;
case 1:
add_vec2D_polar(&state->currentPos.x, &state->currentPos.y, state->speed, state->angle);
if (state->currentPos.x < -160.0f) {
if (script->functionTemp[1] != 0) {
script->functionTemp[0] = 2;
break;
}
if (state->angle >= 270.0f && state->angle < 360.0f) {
state->angle = 90.0f + (90.0f - clamp_angle(state->angle + 180.0f));
state->bounceDivisor = rand_int(4) - 2;
}
if (state->angle >= 180.0f && state->angle < 270.0f) {
state->angle = 90.0f - (clamp_angle(state->angle + 180.0f) - 90.0f);
state->bounceDivisor = rand_int(4) - 2;
}
}
if (state->currentPos.x > 160.0f) {
if (script->functionTemp[1] != 0) {
script->functionTemp[0] = 2;
break;
}
do {
if (state->angle >= 0.0f && state->angle < 90.0f) {
state->angle = 270.0f + (270.0f - clamp_angle(state->angle + 180.0f));
state->bounceDivisor = rand_int(4) - 2;
} else if (state->angle >= 90.0f && state->angle < 180.0f) {
state->angle = 270.0f - (clamp_angle(state->angle + 180.0f) - 270.0f);
state->bounceDivisor = rand_int(4) - 2;
}
} while (0);
if (script->functionTemp[2] != 0) {
sfx_play_sound_at_position(SOUND_29B, 0, state->currentPos.x, state->currentPos.y, state->currentPos.z);
} else {
sfx_play_sound_at_position(SOUND_29C, 0, state->currentPos.x, state->currentPos.y, state->currentPos.z);
}
script->functionTemp[2] = 1 - script->functionTemp[2];
}
if (state->currentPos.y < 0.0f) {
if (script->functionTemp[1] != 0) {
script->functionTemp[0] = 2;
break;
}
do {
if (state->angle >= 270.0f && state->angle < 360.0f) {
state->angle = 180.0f + (180.0f - clamp_angle(state->angle + 180.0f));
state->bounceDivisor = rand_int(4) - 2;
} else if (state->angle >= 0.0f && state->angle < 90.0f) {
state->angle = 180.0f - (clamp_angle(state->angle + 180.0f) - 180.0f);
state->bounceDivisor = rand_int(4) - 2;
}
} while (0); // TODO macro?
if (script->functionTemp[2] != 0) {
sfx_play_sound_at_position(SOUND_29B, 0, state->currentPos.x, state->currentPos.y, state->currentPos.z);
} else {
sfx_play_sound_at_position(SOUND_29C, 0, state->currentPos.x, state->currentPos.y, state->currentPos.z);
}
script->functionTemp[2] = 1 - script->functionTemp[2];
}
if (state->currentPos.y > 130.0f) {
if (script->functionTemp[1] != 0) {
script->functionTemp[0] = 2;
break;
}
do {
if (state->angle >= 90.0f && state->angle < 180.0f) {
state->angle = 360.0f + (360.0f - clamp_angle(state->angle + 180.0f));
state->bounceDivisor = rand_int(4) - 2;
} else if (state->angle >= 180.0f && state->angle < 270.0f) {
state->angle = 360.0f - (clamp_angle(state->angle + 180.0f) - 360.0f);
state->bounceDivisor = rand_int(4) - 2;
}
} while (0); // TODO macro?
if (script->functionTemp[2] != 0) {
sfx_play_sound_at_position(SOUND_29B, 0, state->currentPos.x, state->currentPos.y, state->currentPos.z);
} else {
sfx_play_sound_at_position(SOUND_29C, 0, state->currentPos.x, state->currentPos.y, state->currentPos.z);
}
script->functionTemp[2] = 1 - script->functionTemp[2];
}
state->angle = clamp_angle(state->angle + (state->bounceDivisor * 0.5));
partner->rotation.z = clamp_angle(state->angle - 315.0f);
partner->scale.z = partner->scale.y = partner->scale.x = partner->scale.x - 0.06;
if (partner->scale.x < 1.0) {
partner->scale.x = 1.0f;
partner->scale.y = 1.0f;
partner->scale.z = 1.0f;
}
x = 0.0f;
y = 0.0f;
add_vec2D_polar(&x, &y, partner->scale.x * -15.0f, state->angle);
D_8023C070->data.waterFountain->unk_04.x = state->currentPos.x + x;
D_8023C070->data.waterFountain->unk_04.y = state->currentPos.y + y;
D_8023C070->data.waterFountain->unk_04.z = state->currentPos.z + 5.0f;
D_8023C070->data.waterFountain->unk_38 = state->angle;
D_8023C070->data.waterFountain->unk_3C = partner->scale.x;
D_8023C070->data.waterFountain->unk_40 = partner->scale.x;
if (state->moveTime == 0x46) {
sfx_play_sound_at_position(SOUND_29D, 0, 0.0f, 0.0f, 0.0f);
fx_underwater(0, -50.0f, 20.0f, 0.0f, 1.0f, 120);
}
if (state->moveTime != 0) {
state->moveTime--;
} else {
script->functionTemp[1] = 1;
}
break;
}
switch (script->functionTemp[0]) {
case 2:
state->moveTime = 5;
script->functionTemp[0] = 3;
case 3:
add_vec2D_polar(&state->currentPos.x, &state->currentPos.y, state->speed, state->angle);
D_8023C070->data.waterFountain->unk_04.x = state->currentPos.x;
D_8023C070->data.waterFountain->unk_04.y = state->currentPos.y;
D_8023C070->data.waterFountain->unk_04.z = state->currentPos.z;
D_8023C070->data.waterFountain->unk_38 = state->angle;
D_8023C070->data.waterFountain->unk_3C = partner->scale.x;
D_8023C070->data.waterFountain->unk_40 = partner->scale.x;
if (state->moveTime == 0) {
partner->rotation.z = 0.0f;
D_8023C070->flags |= ACTOR_FLAG_10;
return ApiStatus_DONE2;
}
state->moveTime--;
default:
partner->currentPos.x = state->currentPos.x;
partner->currentPos.y = state->currentPos.y;
partner->currentPos.z = state->currentPos.z;
fx_water_splash(3, partner->currentPos.x, partner->currentPos.y, partner->currentPos.z, 1.0f, 10);
break;
}
return ApiStatus_BLOCK;
}
ApiStatus func_80238E30_708AD0(Evt* script, s32 isInitialCall) { ApiStatus func_80238E30_708AD0(Evt* script, s32 isInitialCall) {
BattleStatus* battleStatus = &gBattleStatus; BattleStatus* battleStatus = &gBattleStatus;

View File

@ -16,7 +16,77 @@ extern s32 D_8023C1C8;
extern EffectInstance* D_8023C1CC; extern EffectInstance* D_8023C1CC;
extern EffectInstance* D_8023C1D0; extern EffectInstance* D_8023C1D0;
INCLUDE_ASM(s32, "battle/partner/watt", func_80238000_703AF0); ApiStatus func_80238000_703AF0(Evt* script, s32 isInitialCall) {
Actor* partner = gBattleStatus.partnerActor;
f32 x, y, z;
if (isInitialCall) {
D_8023C1BC = 1;
D_8023C1C0 = 0;
D_8023C1C4 = 1;
D_8023C1C8 = 0;
D_8023C1CC = fx_static_status(0, partner->currentPos.x, partner->currentPos.y, partner->currentPos.z, 1.0f, 5, 0);
D_8023C1D0 = fx_static_status(1, partner->currentPos.x, -1000.0f, partner->currentPos.z, 1.0f, 5, 0);
D_8023C1B8 = 1;
}
if (D_8023C1B8 == 0) {
return ApiStatus_DONE2;
}
if (D_8023C1BC != 0) {
D_8023C1C0 += 15;
D_8023C1C0 = clamp_angle(D_8023C1C0);
}
partner->unk_19A = sin_rad(DEG_TO_RAD(D_8023C1C0)) * 3.0f;
x = partner->currentPos.x + partner->headOffset.x;
y = partner->currentPos.y + partner->headOffset.y + partner->unk_19A + 12.0f;
z = partner->currentPos.z + partner->headOffset.z;
if ((gBattleStatus.flags2 & (BS_FLAGS2_10 | BS_FLAGS2_4)) == BS_FLAGS2_4) {
y = -1000.0f;
}
if (D_8023C1C4 != 0) {
switch (D_8023C1C8) {
case 0:
if (D_8023C1CC == NULL) {
D_8023C1CC = fx_static_status(0, x, y, z, 1.0f, 5, 0);
}
if (D_8023C1D0 != NULL) {
D_8023C1D0->flags |= 0x10;
D_8023C1D0 = NULL;
}
D_8023C1CC->data.staticStatus->unk_04 = x;
D_8023C1CC->data.staticStatus->unk_08 = y;
D_8023C1CC->data.staticStatus->unk_0C = z;
break;
case 1:
if (D_8023C1CC != NULL) {
D_8023C1CC->flags |= 0x10;
D_8023C1CC = NULL;
}
if (D_8023C1D0 == NULL) {
D_8023C1D0 = fx_static_status(1, x, y, z, 1.0f, 5, 0);
}
D_8023C1D0->data.staticStatus->unk_04 = x;
D_8023C1D0->data.staticStatus->unk_08 = y;
D_8023C1D0->data.staticStatus->unk_0C = z;
break;
}
} else {
if (D_8023C1CC != NULL) {
D_8023C1CC->flags |= 0x10;
D_8023C1CC = NULL;
}
if (D_8023C1D0 != NULL) {
D_8023C1D0->flags |= 0x10;
D_8023C1D0 = NULL;
}
}
return ApiStatus_BLOCK;
}
ApiStatus func_80238370_703E60(Evt* script, s32 isInitialCall) { ApiStatus func_80238370_703E60(Evt* script, s32 isInitialCall) {
D_8023C1B8 = 0; D_8023C1B8 = 0;

View File

@ -294,6 +294,7 @@ void appendGfx_shading_palette(
f32 var_f8; f32 var_f8;
f32 abc; f32 abc;
f32 ex, ey, ez; f32 ex, ey, ez;
f32 t1;
var_f12 = (shadowX * shadowX) + (shadowY * shadowY) + (shadowZ * shadowZ); var_f12 = (shadowX * shadowX) + (shadowY * shadowY) + (shadowZ * shadowZ);
@ -323,8 +324,10 @@ void appendGfx_shading_palette(
ez = mtx[2][2]; ez = mtx[2][2];
} }
temp_f6 = ex * shadowX;
temp_f6_2 = (shadowX * -camera->perspectiveMatrix[2][2]) + (shadowZ * camera->perspectiveMatrix[0][2]); temp_f6_2 = (shadowX * -camera->perspectiveMatrix[2][2]) + (shadowZ * camera->perspectiveMatrix[0][2]);
if ((ex * shadowX) + (ey * shadowY) + (ez * shadowZ) > 0.0f) { t1 = temp_f6 + (ey * shadowY) + (ez * shadowZ);
if (t1 > 0.0f) {
var_f26 = ambientPower * temp_f6_2; var_f26 = ambientPower * temp_f6_2;
} else { } else {
var_f26 = ambientPower; var_f26 = ambientPower;
@ -406,10 +409,16 @@ void appendGfx_shading_palette(
COMBINED, 0, 0, 0, COMBINED); COMBINED, 0, 0, 0, COMBINED);
} }
// abc = var_f30 * var_f26;
abc = var_f26; abc = var_f26;
abc = var_f30 * abc; abc *= var_f30;
gDPSetTileSize(gMasterGfxPos++, 0, ((uls + 0x100) << 2) + (s32)abc, ((ult + 0x100) << 2) + (s32)temp_f28, ((lrs + 0x100 - 1) << 2) + (s32)abc, ((lrt + 0x100 - 1) << 2) + (s32)temp_f28); gDPSetTileSize(
gMasterGfxPos++,
0,
((uls + 0x100) << 2) + (s32)abc,
((ult + 0x100) << 2) + (s32)temp_f28,
((lrs + 0x100 - 1) << 2) + (s32)abc,
((lrt + 0x100 - 1) << 2) + (s32)temp_f28
);
} }
#else #else
INCLUDE_ASM(s32, "de740_len_23f0", appendGfx_shading_palette); INCLUDE_ASM(s32, "de740_len_23f0", appendGfx_shading_palette);

View File

@ -363,26 +363,213 @@ void gfx_init_state(void) {
gSPDisplayList(gMasterGfxPos++, OS_K0_TO_PHYSICAL(D_80074210)); gSPDisplayList(gMasterGfxPos++, OS_K0_TO_PHYSICAL(D_80074210));
} }
s32 gfx_frame_filter_pass_0(const u16* frameBuffer0, const u16* frameBuffer1, s32 y, s32 x, u8* out) { s32 gfx_frame_filter_pass_0(const u16* frameBuffer0, const u16* frameBuffer1, s32 y, s32 x, Color_RGBA8* out) {
s32 pixel = SCREEN_WIDTH * y + x; s32 pixel = SCREEN_WIDTH * y + x;
out[3] = (frameBuffer1[pixel] >> 2) & 0xF; out->a = (frameBuffer1[pixel] >> 2) & 0xF;
out[0] = frameBuffer0[pixel] >> 11; // red out->r = (frameBuffer0[pixel] >> 11);
out[1] = (frameBuffer0[pixel] >> 6) & 0x1F; // green out->g = (frameBuffer0[pixel] >> 6) & 0x1F;
out[2] = (frameBuffer0[pixel] >> 1) & 0x1F; // blue out->b = (frameBuffer0[pixel] >> 1) & 0x1F;
} }
void gfx_frame_filter_pass_1(u8* filterBuf0, u32 filterBuf1, u16* out); void gfx_frame_filter_pass_1(Color_RGBA8* filterBuf0, Color_RGBA8 filterBuf1, u16* out) {
INCLUDE_ASM(void, "main_loop", gfx_frame_filter_pass_1, u8* filterBuf0, u32 filterBuf1, u16* out); Color_RGBA8 sp0;
Color_RGBA8 sp8;
Color_RGBA8 final;
u8 rs[0x20];
u8 gs[0x20];
u8 bs[0x20];
s32 i;
INCLUDE_ASM(s32, "main_loop", func_80027600); sp8 = filterBuf1;
sp0 = filterBuf1;
INCLUDE_ASM(s32, "main_loop", func_80027774); for (i = 0; i < ARRAY_COUNT(rs); i++) {
rs[i] = 0;
gs[i] = 0;
bs[i] = 0;
}
for (i = 0; i < 6; i++) {
if (filterBuf0[i].a == 8) {
rs[filterBuf0[i].r]++;
gs[filterBuf0[i].g]++;
bs[filterBuf0[i].b]++;
}
}
for (i = 0; i < ARRAY_COUNT(rs); i++) {
if (rs[i] != 0) {
rs[i]--;
break;
}
}
for (; i < ARRAY_COUNT(rs); i++) {
if (rs[i] != 0) {
break;
}
}
if (sp0.r > i) {
sp0.r = i;
}
for (i = 0; i < ARRAY_COUNT(gs); i++) {
if (gs[i] != 0) {
gs[i]--;
break;
}
}
for (; i < ARRAY_COUNT(gs); i++) {
if (gs[i] != 0) {
break;
}
}
if (sp0.g > i) {
sp0.g = i;
}
for (i = 0; i < ARRAY_COUNT(bs); i++) {
if (bs[i] != 0) {
bs[i]--;
break;
}
}
for (; i < ARRAY_COUNT(bs); i++) {
if (bs[i] != 0) {
break;
}
}
if (sp0.b > i) {
sp0.b = i;
}
for (i = ARRAY_COUNT(rs) - 1; i >= 0; i--) {
if (rs[i] != 0) {
break;
}
}
if (sp8.r < i) {
sp8.r = i;
}
for (i = ARRAY_COUNT(gs) - 1; i >= 0; i--) {
if (gs[i] != 0) {
break;
}
}
if (sp8.g < i) {
sp8.g = i;
}
for (i = ARRAY_COUNT(bs) - 1; i >= 0; i--) {
if (bs[i] != 0) {
break;
}
}
if (sp8.b < i) {
sp8.b = i;
}
final.r = (sp8.r + sp0.r) - filterBuf1.r;
final.g = (sp8.g + sp0.g) - filterBuf1.g;
final.b = (sp8.b + sp0.b) - filterBuf1.b;
final.r = ((filterBuf1.r * filterBuf1.a) + (final.r * (8 - filterBuf1.a))) >> 3;
final.g = ((filterBuf1.g * filterBuf1.a) + (final.g * (8 - filterBuf1.a))) >> 3;
final.b = ((filterBuf1.b * filterBuf1.a) + (final.b * (8 - filterBuf1.a))) >> 3;
*out = (final.r << 11) + (final.g << 6) + (final.b << 1) + 1;
}
void func_80027600(Color_RGBA8* arg0, s16* out) {
Color_RGBA8 final;
u8 rs[0x20];
u8 gs[0x20];
u8 bs[0x20];
s32 i;
s32 sum;
for (i = 0; i < ARRAY_COUNT(rs); i++) {
rs[i] = 0;
gs[i] = 0;
bs[i] = 0;
}
for (i = 0; i < 9; i++) {
rs[arg0[i].r]++;
gs[arg0[i].g]++;
bs[arg0[i].b]++;
}
sum = 0;
for (i = 0; i < ARRAY_COUNT(rs); i++) {
sum += rs[i];
if (sum >= 5) {
break;
}
}
final.r = i;
sum = 0;
for (i = 0; i < ARRAY_COUNT(gs); i++) {
sum += gs[i];
if (sum >= 5) {
break;
}
}
final.g = i;
sum = 0;
for (i = 0; i < ARRAY_COUNT(bs); i++) {
sum += bs[i];
if (sum >= 5) {
break;
}
}
final.b = i;
*out = (final.r << 11) + (final.g << 6) + (final.b << 1) + 1;
}
void func_80027774(u16* frameBuffer0, u16* frameBuffer1, u16* zBuffer) {
Color_RGBA8 filterBuf0[9];
s32 x, y;
for (y = 1; y < SCREEN_HEIGHT - 1; y++) {
for (x = 1; x < SCREEN_WIDTH - 1; x++) {
/*
The application of gfx_frame_filter_pass_0 is done to the following pixels, where x is the current pixel.
...
.x.
...
*/
if (
(((frameBuffer1[(SCREEN_WIDTH * y) + x - 1] >> 2) & 0xF) < 8) ||
(((frameBuffer1[(SCREEN_WIDTH * y) + x + 0] >> 2) & 0xF) < 8) ||
(((frameBuffer1[(SCREEN_WIDTH * y) + x + 1] >> 2) & 0xF) < 8))
{
gfx_frame_filter_pass_0(frameBuffer0, frameBuffer1, y - 1, x - 1, &filterBuf0[0]);
gfx_frame_filter_pass_0(frameBuffer0, frameBuffer1, y - 1, x, &filterBuf0[1]);
gfx_frame_filter_pass_0(frameBuffer0, frameBuffer1, y - 1, x + 1, &filterBuf0[2]);
gfx_frame_filter_pass_0(frameBuffer0, frameBuffer1, y , x - 1, &filterBuf0[3]);
gfx_frame_filter_pass_0(frameBuffer0, frameBuffer1, y , x, &filterBuf0[4]);
gfx_frame_filter_pass_0(frameBuffer0, frameBuffer1, y , x + 1, &filterBuf0[5]);
gfx_frame_filter_pass_0(frameBuffer0, frameBuffer1, y + 1, x - 1, &filterBuf0[6]);
gfx_frame_filter_pass_0(frameBuffer0, frameBuffer1, y + 1, x, &filterBuf0[7]);
gfx_frame_filter_pass_0(frameBuffer0, frameBuffer1, y + 1, x + 1, &filterBuf0[8]);
func_80027600(filterBuf0, &zBuffer[(SCREEN_WIDTH * y) + x]);
} else {
zBuffer[(SCREEN_WIDTH * y) + x] = frameBuffer0[(SCREEN_WIDTH * y) + x] | 1;
}
}
}
}
// transfers the framebuffer into the depth buffer and applies filters // transfers the framebuffer into the depth buffer and applies filters
void gfx_transfer_frame_to_depth(u16* frameBuffer0, u16* frameBuffer1, u16* zBuffer) { void gfx_transfer_frame_to_depth(u16* frameBuffer0, u16* frameBuffer1, u16* zBuffer) {
u8 filterBuf0[24]; Color_RGBA8 filterBuf0[6];
u8 filterBuf1[4]; Color_RGBA8 filterBuf1;
s32 y; s32 y;
s32 x; s32 x;
@ -398,16 +585,13 @@ void gfx_transfer_frame_to_depth(u16* frameBuffer0, u16* frameBuffer1, u16* zBuf
*/ */
if (((frameBuffer1[pixel] >> 2) & 0xF) < 8) { if (((frameBuffer1[pixel] >> 2) & 0xF) < 8) {
gfx_frame_filter_pass_0(frameBuffer0, frameBuffer1, y - 1, x - 1, &filterBuf0[0]); gfx_frame_filter_pass_0(frameBuffer0, frameBuffer1, y - 1, x - 1, &filterBuf0[0]);
gfx_frame_filter_pass_0(frameBuffer0, frameBuffer1, y - 1, x + 1, &filterBuf0[4]); gfx_frame_filter_pass_0(frameBuffer0, frameBuffer1, y - 1, x + 1, &filterBuf0[1]);
gfx_frame_filter_pass_0(frameBuffer0, frameBuffer1, y, x - 2, &filterBuf0[8]); gfx_frame_filter_pass_0(frameBuffer0, frameBuffer1, y, x - 2, &filterBuf0[2]);
gfx_frame_filter_pass_0(frameBuffer0, frameBuffer1, y, x + 2, &filterBuf0[12]); gfx_frame_filter_pass_0(frameBuffer0, frameBuffer1, y, x + 2, &filterBuf0[3]);
gfx_frame_filter_pass_0(frameBuffer0, frameBuffer1, y + 1, x - 1, &filterBuf0[16]); gfx_frame_filter_pass_0(frameBuffer0, frameBuffer1, y + 1, x - 1, &filterBuf0[4]);
gfx_frame_filter_pass_0(frameBuffer0, frameBuffer1, y + 1, x + 1, &filterBuf0[20]); gfx_frame_filter_pass_0(frameBuffer0, frameBuffer1, y + 1, x + 1, &filterBuf0[5]);
gfx_frame_filter_pass_0(frameBuffer0, frameBuffer1, y, x, &filterBuf1[0]); gfx_frame_filter_pass_0(frameBuffer0, frameBuffer1, y, x, &filterBuf1);
gfx_frame_filter_pass_1(filterBuf0, (filterBuf1[0] << 24) | gfx_frame_filter_pass_1(filterBuf0, filterBuf1, &zBuffer[pixel]);
(filterBuf1[1] << 16) |
(filterBuf1[2] << 8) |
(filterBuf1[3] << 0), &zBuffer[pixel]);
} else { } else {
// Don't apply any filters to the edges of the screen // Don't apply any filters to the edges of the screen
zBuffer[pixel] = frameBuffer0[pixel] | 1; zBuffer[pixel] = frameBuffer0[pixel] | 1;

View File

@ -1844,41 +1844,46 @@ Npc* npc_find_closest_simple(f32 x, f32 y, f32 z, f32 radius) {
// Needs work // Needs work
#ifdef NON_EQUIVALENT #ifdef NON_EQUIVALENT
s32 npc_find_standing_on_entity(s32 arg0) { s32 npc_find_standing_on_entity(s32 arg0) {
s32 entityIndex = arg0 | 0x4000; Npc* npc;
Entity* entity = get_entity_by_index(entityIndex); s32 y;
s32 y = entity->position.y - 10.0f;
s32 floorID;
s32 i; s32 i;
s32 var_v1;
var_v1 = arg0 | 0x4000;
y = get_entity_by_index(var_v1)->position.y - 10.0f;
for (i = 0; i < ARRAY_COUNT(*gCurrentNpcListPtr); i++) { for (i = 0; i < ARRAY_COUNT(*gCurrentNpcListPtr); i++) {
Npc* npc = (*gCurrentNpcListPtr)[i]; npc = (*gCurrentNpcListPtr)[i];
if (npc != NULL) { if (npc == NULL) {
if (npc->flags != 0) { continue;
if (!(npc->flags & 0x80000004)) { }
if (!(npc->pos.y < y)) { if (npc->flags == 0) {
if (npc->flags & 0x8008) { continue;
floorID = npc_get_collider_below(npc); }
if (floorID == 0) { if (npc->flags & (0x80000000 | 0x4)) {
continue; continue;
} }
} else { if (npc->pos.y < y) {
floorID = npc->currentFloor; continue;
}
if (!(floorID & COLLISION_WITH_ENTITY_BIT)) { if (npc->flags & (0x8000 | 0x8)) {
continue; var_v1 = npc_get_collider_below(npc);
} if (var_v1 != 0) {
} if ((arg0 | 0x4000) == var_v1) {
return i;
if (entityIndex == floorID) {
return i;
}
}
} }
} }
} else {
var_v1 = npc->currentFloor;
if (npc->currentFloor & 0x4000) {
if ((arg0 | 0x4000) == var_v1) {
return i;
}
}
} }
} }
return -1; return -1;
} }
#else #else

View File

@ -2,12 +2,6 @@
void mdl_project_tex_coords(s32 modelID, Gfx* destGfx, Matrix4f destMtx, void* destVertices); void mdl_project_tex_coords(s32 modelID, Gfx* destGfx, Matrix4f destMtx, void* destVertices);
//TODO remove these when splat can deal with vtx arrays better
// also remove them from undefined_syms
extern Vtx D_802423D0[];
extern Vtx D_80242310[];
extern Vtx flo_23_ConsumableChoiceList[];
extern EvtScript N(EVS_Main); extern EvtScript N(EVS_Main);
extern EvtScript N(D_80240510_B1DC70); extern EvtScript N(D_80240510_B1DC70);
extern EvtScript N(D_80240894_B1DFF4); extern EvtScript N(D_80240894_B1DFF4);
@ -489,7 +483,7 @@ Gfx N(dummy_gfx)[] = {
s32 N(D_80242BF8_B20358) = 0; s32 N(D_80242BF8_B20358) = 0;
s32 N(D_80242BFC_B2035C)[] = { s32 N(D_80242BFC_B2035C)[] = {
5, 4, -35, 0, -45, 342 5, 4, -35, 0, -45, 342
}; };
EvtScript N(EVS_Main) = { EvtScript N(EVS_Main) = {

View File

@ -6,7 +6,7 @@
[subrepo] [subrepo]
remote = https://github.com/ethteck/splat.git remote = https://github.com/ethteck/splat.git
branch = master branch = master
commit = 4e5fca24a53f6ec443ed87a6cb365f7985cd6f3a commit = 6c228fc53a8f1da47775c9807401710d06495e71
parent = 59421ff6eeb64cd96ca3ba0699a6d683febcc047 parent = 198ed0efc54dc06e8a86325bd52b29b7a37f39aa
method = merge method = merge
cmdver = 0.4.5 cmdver = 0.4.5

View File

@ -43,6 +43,8 @@ options:
# mips_abi_float_regs: o32 # mips_abi_float_regs: o32
# section_order: [".text", ".data", ".rodata", ".bss"] # section_order: [".text", ".data", ".rodata", ".bss"]
# auto_all_sections: [".data", ".rodata", ".bss"] # auto_all_sections: [".data", ".rodata", ".bss"]
# libultra_symbols: True
# hardware_regs: True
""" """
first_section_end = find_code_length.run(rom_bytes, 0x1000, rom.entry_point) first_section_end = find_code_length.run(rom_bytes, 0x1000, rom.entry_point)

View File

@ -0,0 +1,10 @@
from util import compiler, log, options, palettes, symbols
def init(target_bytes: bytes):
symbols.spim_context.fillDefaultBannedSymbols()
if options.opts.libultra_symbols:
symbols.spim_context.globalSegment.fillLibultraSymbols()
if options.opts.hardware_regs:
symbols.spim_context.globalSegment.fillHardwareRegs(True)

View File

@ -0,0 +1,2 @@
def init(target_bytes: bytes):
pass

View File

@ -15,7 +15,7 @@ class CommonSegAsm(CommonSegCodeSubsegment):
and self.rom_end != "auto" and self.rom_end != "auto"
and self.rom_start != self.rom_end and self.rom_start != self.rom_end
): ):
self.scan_code(rom_bytes, is_asm=True) self.scan_code(rom_bytes)
def get_file_header(self): def get_file_header(self):
return [] return []

View File

@ -55,19 +55,27 @@ class CommonSegCode(CommonSegGroup):
else: else:
return None return None
# Prepare symbol for migration to the function def check_rodata_sym_impl(self, func_addr: int, sym: Symbol, rodata_section: Range):
def check_rodata_sym(self, func_addr: int, sym: Symbol): if rodata_section.is_complete():
if self.section_boundaries[".rodata"].is_complete(): assert rodata_section.start is not None
assert self.section_boundaries[".rodata"].start is not None assert rodata_section.end is not None
assert self.section_boundaries[".rodata"].end is not None
rodata_start: int = self.section_boundaries[".rodata"].start rodata_start: int = rodata_section.start
rodata_end: int = self.section_boundaries[".rodata"].end rodata_end: int = rodata_section.end
if rodata_start <= sym.vram_start < rodata_end: if rodata_start <= sym.vram_start < rodata_end:
if func_addr not in self.rodata_syms: if func_addr not in self.rodata_syms:
self.rodata_syms[func_addr] = [] self.rodata_syms[func_addr] = []
self.rodata_syms[func_addr].append(sym) self.rodata_syms[func_addr].append(sym)
# Prepare symbol for migration to the function
def check_rodata_sym(self, func_addr: int, sym: Symbol):
rodata_section = self.section_boundaries.get(".rodata")
if rodata_section is not None:
self.check_rodata_sym_impl(func_addr, sym, rodata_section)
rodata_section = self.section_boundaries.get(".rdata")
if rodata_section is not None:
self.check_rodata_sym_impl(func_addr, sym, rodata_section)
def handle_alls(self, segs: List[Segment], base_segs) -> bool: def handle_alls(self, segs: List[Segment], base_segs) -> bool:
for i, elem in enumerate(segs): for i, elem in enumerate(segs):
if elem.type.startswith("all_"): if elem.type.startswith("all_"):
@ -137,6 +145,13 @@ class CommonSegCode(CommonSegGroup):
return inserts return inserts
def parse_subsegments(self, segment_yaml) -> List[Segment]: def parse_subsegments(self, segment_yaml) -> List[Segment]:
if "subsegments" not in segment_yaml:
if not self.parent:
raise Exception(
f"No subsegments provided in top-level code segment {self.name}"
)
return []
base_segments: OrderedDict[str, Segment] = OrderedDict() base_segments: OrderedDict[str, Segment] = OrderedDict()
ret = [] ret = []
prev_start: RomAddr = -1 prev_start: RomAddr = -1
@ -155,14 +170,11 @@ class CommonSegCode(CommonSegGroup):
) # Stores yaml index where a section was first found ) # Stores yaml index where a section was first found
found_sections.pop(".text") found_sections.pop(".text")
if "subsegments" not in segment_yaml:
return []
# Mark any manually added dot types # Mark any manually added dot types
cur_section = None cur_section = None
for i, subsection_yaml in enumerate(segment_yaml["subsegments"]): for i, subsection_yaml in enumerate(segment_yaml["subsegments"]):
# rompos marker # endpos marker
if isinstance(subsection_yaml, list) and len(subsection_yaml) == 1: if isinstance(subsection_yaml, list) and len(subsection_yaml) == 1:
continue continue
@ -202,7 +214,7 @@ class CommonSegCode(CommonSegGroup):
inserts = self.find_inserts(found_sections) inserts = self.find_inserts(found_sections)
for i, subsection_yaml in enumerate(segment_yaml["subsegments"]): for i, subsection_yaml in enumerate(segment_yaml["subsegments"]):
# rompos marker # endpos marker
if isinstance(subsection_yaml, list) and len(subsection_yaml) == 1: if isinstance(subsection_yaml, list) and len(subsection_yaml) == 1:
continue continue
@ -308,12 +320,16 @@ class CommonSegCode(CommonSegGroup):
check = self.handle_alls(ret, base_segments) check = self.handle_alls(ret, base_segments)
# TODO why is this necessary? # TODO why is this necessary?
rodata_section = self.section_boundaries.get(
".rodata"
) or self.section_boundaries.get(".rdata")
if ( if (
self.section_boundaries[".rodata"].has_start() rodata_section is not None
and not self.section_boundaries[".rodata"].has_end() and rodata_section.has_start()
and not rodata_section.has_end()
): ):
assert self.vram_end is not None assert self.vram_end is not None
self.section_boundaries[".rodata"].end = self.vram_end rodata_section.end = self.vram_end
return ret return ret

View File

@ -36,7 +36,7 @@ class CommonSegCodeSubsegment(Segment):
def get_linker_section(self) -> str: def get_linker_section(self) -> str:
return ".text" return ".text"
def scan_code(self, rom_bytes, is_asm=False): def scan_code(self, rom_bytes, is_hasm=False):
assert isinstance(self.rom_start, int) assert isinstance(self.rom_start, int)
assert isinstance(self.rom_end, int) assert isinstance(self.rom_end, int)
@ -54,7 +54,7 @@ class CommonSegCodeSubsegment(Segment):
self.get_exclusive_ram_id(), self.get_exclusive_ram_id(),
) )
self.spim_section.isHandwritten = is_asm self.spim_section.isHandwritten = is_hasm
self.spim_section.analyze() self.spim_section.analyze()
self.spim_section.setCommentOffset(self.rom_start) self.spim_section.setCommentOffset(self.rom_start)

View File

@ -43,6 +43,9 @@ class CommonSegData(CommonSegCodeSubsegment, CommonSegGroup):
with open(path, "w", newline="\n") as f: with open(path, "w", newline="\n") as f:
f.write('.include "macro.inc"\n\n') f.write('.include "macro.inc"\n\n')
preamble = options.opts.generated_s_preamble
if preamble:
f.write(preamble + "\n")
f.write(f".section {self.get_linker_section()}\n\n") f.write(f".section {self.get_linker_section()}\n\n")
f.write(self.spim_section.disassemble()) f.write(self.spim_section.disassemble())

View File

@ -43,7 +43,7 @@ class CommonSegGroup(CommonSegment):
prev_start: RomAddr = -1 prev_start: RomAddr = -1
for i, subsection_yaml in enumerate(yaml["subsegments"]): for i, subsection_yaml in enumerate(yaml["subsegments"]):
# End of previous segment # endpos marker
if isinstance(subsection_yaml, list) and len(subsection_yaml) == 1: if isinstance(subsection_yaml, list) and len(subsection_yaml) == 1:
continue continue

View File

@ -2,6 +2,14 @@ from segtypes.common.asm import CommonSegAsm
class CommonSegHasm(CommonSegAsm): class CommonSegHasm(CommonSegAsm):
def scan(self, rom_bytes: bytes):
if (
self.rom_start != "auto"
and self.rom_end != "auto"
and self.rom_start != self.rom_end
):
self.scan_code(rom_bytes, is_hasm=True)
def split(self, rom_bytes: bytes): def split(self, rom_bytes: bytes):
if not self.rom_start == self.rom_end and self.spim_section is not None: if not self.rom_start == self.rom_end and self.spim_section is not None:
out_path = self.out_path() out_path = self.out_path()

View File

@ -1,7 +1,7 @@
import spimdisasm import spimdisasm
from segtypes.common.data import CommonSegData from segtypes.common.data import CommonSegData
from util import symbols, options from util import symbols, options, compiler
class CommonSegRodata(CommonSegData): class CommonSegRodata(CommonSegData):
@ -60,6 +60,10 @@ class CommonSegRodata(CommonSegData):
path = path_folder / f"{rodataSym.getName()}.s" path = path_folder / f"{rodataSym.getName()}.s"
with open(path, "w", newline="\n") as f: with open(path, "w", newline="\n") as f:
f.write('.include "macro.inc"\n\n') if options.opts.compiler.include_macro_inc:
f.write(".section .rodata\n\n") f.write('.include "macro.inc"\n\n')
preamble = options.opts.generated_s_preamble
if preamble:
f.write(preamble + "\n")
f.write(f".section {self.get_linker_section()}\n\n")
f.write(rodataSym.disassemble()) f.write(rodataSym.disassemble())

View File

@ -108,7 +108,7 @@ class LinkerEntry:
class LinkerWriter: class LinkerWriter:
def __init__(self): def __init__(self):
self.linker_discard_section: bool = options.opts.ld_discard_section self.linker_discard_section: bool = options.opts.ld_discard_section
self.entries: List[LinkerEntry] = [] self.entries: List[LinkerEntry] = [] # Used to store all the linker entries - build tools may want this information
self.buffer: List[str] = [] self.buffer: List[str] = []
self.symbols: List[str] = [] self.symbols: List[str] = []
@ -164,7 +164,7 @@ class LinkerWriter:
for entry in entries: for entry in entries:
entering_bss = False entering_bss = False
leaving_bss = False leaving_bss = False
cur_section = entry.section cur_section = entry.section_type
if cur_section == "linker": if cur_section == "linker":
self._end_block() self._end_block()
@ -231,10 +231,10 @@ class LinkerWriter:
section_labels[cur_section].started = True section_labels[cur_section].started = True
# Write THIS linker entry # Write THIS linker entry
self._writeln(f"{entry.object_path}({cur_section});") self._writeln(f"{entry.object_path}({entry.section});")
else: else:
# Write THIS linker entry # Write THIS linker entry
self._writeln(f"{entry.object_path}({cur_section});") self._writeln(f"{entry.object_path}({entry.section});")
# If this is the last entry of its type, add the END marker for the section we're ending # If this is the last entry of its type, add the END marker for the section we're ending
if entry in last_seen_sections: if entry in last_seen_sections:

View File

@ -117,7 +117,7 @@ class N64SegGfx(CommonSegCodeSubsegment):
def vtx_handler(self, addr, count): def vtx_handler(self, addr, count):
sym = self.create_symbol( sym = self.create_symbol(
addr=addr, in_segment=True, type="data", reference=True, offsets=True addr=addr, in_segment=True, type="data", reference=True, search_ranges=True
) )
index = int((addr - sym.vram_start) / 0x10) index = int((addr - sym.vram_start) / 0x10)
gfxd_printf(f"&{sym.name}[{index}]") gfxd_printf(f"&{sym.name}[{index}]")

View File

@ -8,6 +8,7 @@ from util import log
from util import options from util import options
from util import symbols from util import symbols
from util.symbols import Symbol from util.symbols import Symbol
from intervaltree import Interval, IntervalTree
# circular import # circular import
if TYPE_CHECKING: if TYPE_CHECKING:
@ -160,6 +161,12 @@ class Segment:
else: else:
return options.opts.symbol_name_format_no_rom return options.opts.symbol_name_format_no_rom
@staticmethod
def parse_segment_file_path(segment: Union[dict, list]) -> Optional[Path]:
if isinstance(segment, dict) and "path" in segment:
return Path(segment["path"])
return None
def __init__( def __init__(
self, self,
rom_start: RomAddr, rom_start: RomAddr,
@ -184,6 +191,10 @@ class Segment:
# Symbols known to be in this segment # Symbols known to be in this segment
self.given_seg_symbols: Dict[int, List[Symbol]] = {} self.given_seg_symbols: Dict[int, List[Symbol]] = {}
# Ranges for faster symbol lookup
self.symbol_ranges_ram: IntervalTree = IntervalTree()
self.symbol_ranges_rom: IntervalTree = IntervalTree()
self.given_section_order: List[str] = options.opts.section_order self.given_section_order: List[str] = options.opts.section_order
self.follows_vram: Optional[str] = None self.follows_vram: Optional[str] = None
self.follows_vram_symbol: Optional[str] = None self.follows_vram_symbol: Optional[str] = None
@ -196,6 +207,7 @@ class Segment:
self.parent: Optional[Segment] = None self.parent: Optional[Segment] = None
self.sibling: Optional[Segment] = None self.sibling: Optional[Segment] = None
self.follows_vram_segment: Optional[Segment] = None self.follows_vram_segment: Optional[Segment] = None
self.file_path: Optional[Path] = None
self.args: List[str] = args self.args: List[str] = args
self.yaml = yaml self.yaml = yaml
@ -248,6 +260,7 @@ class Segment:
ret.given_symbol_name_format_no_rom = ( ret.given_symbol_name_format_no_rom = (
Segment.parse_segment_symbol_name_format_no_rom(yaml) Segment.parse_segment_symbol_name_format_no_rom(yaml)
) )
ret.file_path = Segment.parse_segment_file_path(yaml)
if not ret.follows_vram: if not ret.follows_vram:
ret.follows_vram = parse_segment_follows_vram(yaml) ret.follows_vram = parse_segment_follows_vram(yaml)
@ -295,6 +308,12 @@ class Segment:
self.given_seg_symbols[symbol.vram_start] = [] self.given_seg_symbols[symbol.vram_start] = []
self.given_seg_symbols[symbol.vram_start].append(symbol) self.given_seg_symbols[symbol.vram_start].append(symbol)
# For larger symbols, add their ranges to interval trees for faster lookup
if symbol.size > 4:
self.symbol_ranges_ram.addi(symbol.vram_start, symbol.vram_end, symbol)
if symbol.rom and isinstance(symbol.rom, int):
self.symbol_ranges_rom.addi(symbol.rom, symbol.rom_end, symbol)
@property @property
def seg_symbols(self) -> Dict[int, List[Symbol]]: def seg_symbols(self) -> Dict[int, List[Symbol]]:
if self.parent: if self.parent:
@ -468,7 +487,7 @@ class Segment:
create: bool = False, create: bool = False,
define: bool = False, define: bool = False,
reference: bool = False, reference: bool = False,
offsets: bool = False, search_ranges: bool = False,
local_only: bool = False, local_only: bool = False,
dead: bool = True, dead: bool = True,
) -> Optional[Symbol]: ) -> Optional[Symbol]:
@ -481,12 +500,25 @@ class Segment:
# If the vram address is within this segment, we can calculate the symbol's rom address # If the vram address is within this segment, we can calculate the symbol's rom address
rom = most_parent.ram_to_rom(addr) rom = most_parent.ram_to_rom(addr)
ret = most_parent.retrieve_symbol(most_parent.seg_symbols, addr) ret = most_parent.retrieve_symbol(most_parent.seg_symbols, addr)
if not ret and search_ranges:
# Search ranges first, starting with rom
if rom is not None:
cands: set[Interval] = most_parent.symbol_ranges_rom[rom]
if cands:
ret = cands.pop().data
# and then vram if we can't find a rom match
if not ret:
cands = most_parent.symbol_ranges_ram[addr]
if cands:
ret = cands.pop().data
elif not local_only: elif not local_only:
ret = most_parent.retrieve_symbol(symbols.all_symbols_dict, addr) ret = most_parent.retrieve_symbol(symbols.all_symbols_dict, addr)
# Search for symbol ranges if not ret and search_ranges:
if not ret and offsets: cands = symbols.all_symbols_ranges[addr]
ret = symbols.retrieve_from_ranges(addr, rom) if cands:
ret = cands.pop().data
# Reject dead symbols unless we allow them # Reject dead symbols unless we allow them
if not dead and ret and ret.dead: if not dead and ret and ret.dead:
@ -525,7 +557,7 @@ class Segment:
type: Optional[str] = None, type: Optional[str] = None,
define: bool = False, define: bool = False,
reference: bool = False, reference: bool = False,
offsets: bool = False, search_ranges: bool = False,
local_only: bool = False, local_only: bool = False,
dead: bool = True, dead: bool = True,
) -> Symbol: ) -> Symbol:
@ -536,7 +568,7 @@ class Segment:
create=True, create=True,
define=define, define=define,
reference=reference, reference=reference,
offsets=offsets, search_ranges=search_ranges,
local_only=local_only, local_only=local_only,
dead=dead, dead=dead,
) )

View File

@ -4,6 +4,7 @@ import argparse
import hashlib import hashlib
import pickle import pickle
from typing import Any, Dict, List, Optional, Set, Union from typing import Any, Dict, List, Optional, Set, Union
import importlib
import rabbitizer import rabbitizer
import spimdisasm import spimdisasm
@ -17,6 +18,8 @@ from segtypes.segment import Segment
from util import compiler, log, options, palettes, symbols from util import compiler, log, options, palettes, symbols
VERSION = "0.12.2" VERSION = "0.12.2"
# This value should be keep in sync with the version listed on requirements.txt
SPIMDISASM_MIN = (1, 5, 6)
parser = argparse.ArgumentParser( parser = argparse.ArgumentParser(
description="Split a rom given a rom, a config, and output directory" description="Split a rom given a rom, a config, and output directory"
@ -55,7 +58,7 @@ def initialize_segments(config_segments: Union[dict, list]) -> List[Segment]:
ret = [] ret = []
for i, seg_yaml in enumerate(config_segments): for i, seg_yaml in enumerate(config_segments):
# rompos marker # end marker
if isinstance(seg_yaml, list) and len(seg_yaml) == 1: if isinstance(seg_yaml, list) and len(seg_yaml) == 1:
continue continue
@ -103,6 +106,9 @@ def initialize_segments(config_segments: Union[dict, list]) -> List[Segment]:
def assign_symbols_to_segments(): def assign_symbols_to_segments():
for symbol in symbols.all_symbols: for symbol in symbols.all_symbols:
if symbol.segment:
continue
if symbol.rom: if symbol.rom:
cands = segment_roms[symbol.rom] cands = segment_roms[symbol.rom]
if len(cands) > 1: if len(cands) > 1:
@ -235,14 +241,11 @@ def configure_disassembler():
spimdisasm.common.GlobalConfig.ASM_TEXT_ENT_LABEL = ".ent" spimdisasm.common.GlobalConfig.ASM_TEXT_ENT_LABEL = ".ent"
spimdisasm.common.GlobalConfig.ASM_TEXT_FUNC_AS_LABEL = True spimdisasm.common.GlobalConfig.ASM_TEXT_FUNC_AS_LABEL = True
if spimdisasm.common.GlobalConfig.ASM_TEXT_LABEL == ".globl": if spimdisasm.common.GlobalConfig.ASM_DATA_LABEL == ".globl":
spimdisasm.common.GlobalConfig.ASM_DATA_SYM_AS_LABEL = True spimdisasm.common.GlobalConfig.ASM_DATA_SYM_AS_LABEL = True
spimdisasm.common.GlobalConfig.LINE_ENDS = options.opts.c_newline spimdisasm.common.GlobalConfig.LINE_ENDS = options.opts.c_newline
if options.opts.platform == "n64":
symbols.spim_context.fillDefaultBannedSymbols()
def brief_seg_name(seg: Segment, limit: int, ellipsis="") -> str: def brief_seg_name(seg: Segment, limit: int, ellipsis="") -> str:
s = seg.name.strip() s = seg.name.strip()
@ -254,6 +257,11 @@ def brief_seg_name(seg: Segment, limit: int, ellipsis="…") -> str:
def main(config_path, modes, verbose, use_cache=True): def main(config_path, modes, verbose, use_cache=True):
global config global config
if spimdisasm.__version_info__ < SPIMDISASM_MIN:
log.error(
f"splat {VERSION} requires as minimum spimdisasm {SPIMDISASM_MIN}, but the installed version is {spimdisasm.__version_info__}"
)
log.write(f"splat {VERSION} (powered by spimdisasm {spimdisasm.__version__})") log.write(f"splat {VERSION} (powered by spimdisasm {spimdisasm.__version__})")
# Load config # Load config
@ -307,6 +315,10 @@ def main(config_path, modes, verbose, use_cache=True):
configure_disassembler() configure_disassembler()
platform_module = importlib.import_module(f"platforms.{options.opts.platform}")
platform_init = getattr(platform_module, "init")
platform_init(rom_bytes)
# Initialize segments # Initialize segments
all_segments = initialize_segments(config["segments"]) all_segments = initialize_segments(config["segments"])
@ -354,35 +366,42 @@ def main(config_path, modes, verbose, use_cache=True):
symbols.mark_c_funcs_as_defined() symbols.mark_c_funcs_as_defined()
# Split # Split
for segment in tqdm.tqdm( split_bar = tqdm.tqdm(
all_segments, all_segments,
total=len(all_segments), total=len(all_segments),
desc=f"Splitting {brief_seg_name(segment, 20)}", )
): for segment in split_bar:
split_bar.set_description(f"Splitting {brief_seg_name(segment, 20)}")
if use_cache: if use_cache:
cached = segment.cache() cached = segment.cache()
if cached == cache.get(segment.unique_id()): if cached == cache.get(segment.unique_id()):
# Cache hit # Cache hit
seg_cached[typ] += 1 if segment.type not in seg_cached:
seg_cached[segment.type] = 0
seg_cached[segment.type] += 1
continue continue
else: else:
# Cache miss; split # Cache miss; split
cache[segment.unique_id()] = cached cache[segment.unique_id()] = cached
if segment.should_split(): if segment.should_split():
segment.split(rom_bytes) segment_bytes = rom_bytes
if segment.file_path:
with open(segment.file_path, "rb") as segment_input_file:
segment_bytes = segment_input_file.read()
segment.split(segment_bytes)
if options.opts.is_mode_active("ld"): if options.opts.is_mode_active("ld"):
global linker_writer global linker_writer
linker_writer = LinkerWriter() linker_writer = LinkerWriter()
for i, segment in enumerate( linker_bar = tqdm.tqdm(
tqdm.tqdm( all_segments,
all_segments, total=len(all_segments),
total=len(all_segments), )
desc=f"Writing linker script {brief_seg_name(segment, 20)}", for i, segment in enumerate(linker_bar):
) linker_bar.set_description(f"Linker script {brief_seg_name(segment, 20)}")
):
next_segment: Optional[Segment] = None next_segment: Optional[Segment] = None
if i < len(all_segments) - 1: if i < len(all_segments) - 1:
next_segment = all_segments[i + 1] next_segment = all_segments[i + 1]

View File

@ -9,6 +9,7 @@ class Compiler:
asm_end_label: str = "" asm_end_label: str = ""
c_newline: str = "\n" c_newline: str = "\n"
asm_inc_header: str = "" asm_inc_header: str = ""
include_macro_inc: bool = True
GCC = Compiler( GCC = Compiler(
@ -22,6 +23,7 @@ SN64 = Compiler(
asm_data_macro=".globl", asm_data_macro=".globl",
asm_end_label=".end", asm_end_label=".end",
c_newline="\r\n", c_newline="\r\n",
include_macro_inc=False,
) )
IDO = Compiler("IDO") IDO = Compiler("IDO")

View File

@ -155,6 +155,10 @@ class SplatOpts:
# Determines the type gfx ucode (used by gfx segments) # Determines the type gfx ucode (used by gfx segments)
# Valid options are ['f3d', 'f3db', 'f3dex', 'f3dexb', 'f3dex2'] # Valid options are ['f3d', 'f3db', 'f3dex', 'f3dexb', 'f3dex2']
gfx_ucode: str gfx_ucode: str
# Use named libultra symbols by default. Those will need to be added to a linker script manually by the user
libultra_symbols: bool
# Use named hardware register symbols by default. Those will need to be added to a linker script manually by the user
hardware_regs: bool
################################################################################ ################################################################################
# Compiler-specific options # Compiler-specific options
@ -366,6 +370,8 @@ def parse_yaml(
["f3d", "f3db", "f3dex", "f3dexb", "f3dex2"], ["f3d", "f3db", "f3dex", "f3dexb", "f3dex2"],
"f3dex2", "f3dex2",
), ),
libultra_symbols=parse_opt(yaml, "libultra_symbols", bool, False),
hardware_regs=parse_opt(yaml, "hardware_regs", bool, False),
use_legacy_include_asm=parse_opt(yaml, "use_legacy_include_asm", bool, True), use_legacy_include_asm=parse_opt(yaml, "use_legacy_include_asm", bool, True),
) )

View File

@ -2,6 +2,7 @@ from typing import Dict, List, Optional, TYPE_CHECKING, Set
import spimdisasm import spimdisasm
import tqdm import tqdm
from dataclasses import dataclass from dataclasses import dataclass
from intervaltree import IntervalTree, Interval
# circular import # circular import
if TYPE_CHECKING: if TYPE_CHECKING:
@ -11,8 +12,8 @@ from util import options, log
all_symbols: List["Symbol"] = [] all_symbols: List["Symbol"] = []
all_symbols_dict: Dict[int, List["Symbol"]] = {} all_symbols_dict: Dict[int, List["Symbol"]] = {}
all_symbols_ranges = IntervalTree()
ignored_addresses: Set[int] = set() ignored_addresses: Set[int] = set()
symbol_ranges: List["Symbol"] = []
to_mark_as_defined: Set[str] = set() to_mark_as_defined: Set[str] = set()
# Initialize a spimdisasm context, used to store symbols and functions # Initialize a spimdisasm context, used to store symbols and functions
@ -37,15 +38,19 @@ def add_symbol(sym: "Symbol"):
all_symbols_dict[sym.vram_start] = [] all_symbols_dict[sym.vram_start] = []
all_symbols_dict[sym.vram_start].append(sym) all_symbols_dict[sym.vram_start].append(sym)
# For larger symbols, add their ranges to interval trees for faster lookup
if sym.size > 4:
all_symbols_ranges.addi(sym.vram_start, sym.vram_end, sym)
def initialize(all_segments: "List[Segment]"): def initialize(all_segments: "List[Segment]"):
global all_symbols global all_symbols
global all_symbols_dict global all_symbols_dict
global symbol_ranges global all_symbols_ranges
all_symbols = [] all_symbols = []
all_symbols_dict = {} all_symbols_dict = {}
symbol_ranges = [] all_symbols_ranges = IntervalTree()
def get_seg_for_name(name: str) -> Optional["Segment"]: def get_seg_for_name(name: str) -> Optional["Segment"]:
for segment in all_segments: for segment in all_segments:
@ -183,10 +188,6 @@ def initialize(all_segments: "List[Segment]"):
sym.user_declared = True sym.user_declared = True
add_symbol(sym) add_symbol(sym)
# Symbol ranges
if sym.size > 4:
symbol_ranges.append(sym)
def initialize_spim_context(all_segments: "List[Segment]") -> None: def initialize_spim_context(all_segments: "List[Segment]") -> None:
global_vrom_start = None global_vrom_start = None
@ -383,6 +384,9 @@ def create_symbol_from_spim_symbol(
context_sym.vram, in_segment, type=sym_type, reference=True context_sym.vram, in_segment, type=sym_type, reference=True
) )
if sym.given_name is None and context_sym.name is not None:
sym.given_name = context_sym.name
# To keep the symbol name in sync between splat and spimdisasm # To keep the symbol name in sync between splat and spimdisasm
context_sym.setNameGetCallback(lambda _: sym.name) context_sym.setNameGetCallback(lambda _: sym.name)
@ -398,25 +402,6 @@ def create_symbol_from_spim_symbol(
return sym return sym
def retrieve_from_ranges(vram, rom=None):
rom_matches = []
ram_matches = []
for symbol in symbol_ranges:
if symbol.contains_vram(vram):
if symbol.rom and rom and symbol.contains_rom(rom):
rom_matches.append(symbol)
else:
ram_matches.append(symbol)
ret = rom_matches + ram_matches
if len(ret) > 0:
return ret[0]
else:
return None
def mark_c_funcs_as_defined(): def mark_c_funcs_as_defined():
for symbol in all_symbols: for symbol in all_symbols:
if len(to_mark_as_defined) == 0: if len(to_mark_as_defined) == 0:
@ -449,6 +434,15 @@ class Symbol:
def __str__(self): def __str__(self):
return self.name return self.name
def __eq__(self, other: object) -> bool:
if not isinstance(other, Symbol):
return False
return self.vram_start == other.vram_start and self.segment == other.segment
# https://stackoverflow.com/a/56915493/6292472
def __hash__(self):
return hash((self.vram_start, self.segment))
def format_name(self, format: str) -> str: def format_name(self, format: str) -> str:
ret = format ret = format

View File

@ -1,83 +0,0 @@
.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel func_802B70B4_E201C4
/* E201C4 802B70B4 27BDFFE0 */ addiu $sp, $sp, -0x20
/* E201C8 802B70B8 AFB10014 */ sw $s1, 0x14($sp)
/* E201CC 802B70BC 3C118011 */ lui $s1, %hi(gPlayerStatus)
/* E201D0 802B70C0 2631EFC8 */ addiu $s1, $s1, %lo(gPlayerStatus)
/* E201D4 802B70C4 AFBF0018 */ sw $ra, 0x18($sp)
/* E201D8 802B70C8 AFB00010 */ sw $s0, 0x10($sp)
/* E201DC 802B70CC 8E220004 */ lw $v0, 4($s1)
/* E201E0 802B70D0 30420010 */ andi $v0, $v0, 0x10
/* E201E4 802B70D4 1040003F */ beqz $v0, .L802B71D4
/* E201E8 802B70D8 00000000 */ nop
/* E201EC 802B70DC 3C10802B */ lui $s0, %hi(D_802B7CB8_E20DC8)
/* E201F0 802B70E0 26107CB8 */ addiu $s0, $s0, %lo(D_802B7CB8_E20DC8)
/* E201F4 802B70E4 8E040000 */ lw $a0, ($s0)
/* E201F8 802B70E8 0C00A580 */ jal mem_clear
/* E201FC 802B70EC 24050028 */ addiu $a1, $zero, 0x28
/* E20200 802B70F0 8E030000 */ lw $v1, ($s0)
/* E20204 802B70F4 C6200028 */ lwc1 $f0, 0x28($s1)
/* E20208 802B70F8 2402FFFF */ addiu $v0, $zero, -1
/* E2020C 802B70FC 3C018011 */ lui $at, %hi(D_8010C950)
/* E20210 802B7100 AC22C950 */ sw $v0, %lo(D_8010C950)($at)
/* E20214 802B7104 E4600000 */ swc1 $f0, ($v1)
/* E20218 802B7108 862200B0 */ lh $v0, 0xb0($s1)
/* E2021C 802B710C C620002C */ lwc1 $f0, 0x2c($s1)
/* E20220 802B7110 44821000 */ mtc1 $v0, $f2
/* E20224 802B7114 00000000 */ nop
/* E20228 802B7118 468010A0 */ cvt.s.w $f2, $f2
/* E2022C 802B711C 8E220004 */ lw $v0, 4($s1)
/* E20230 802B7120 46020080 */ add.s $f2, $f0, $f2
/* E20234 802B7124 30421000 */ andi $v0, $v0, 0x1000
/* E20238 802B7128 3C014000 */ lui $at, 0x4000
/* E2023C 802B712C 44810000 */ mtc1 $at, $f0
/* E20240 802B7130 14400004 */ bnez $v0, .L802B7144
/* E20244 802B7134 24630004 */ addiu $v1, $v1, 4
/* E20248 802B7138 3C014100 */ lui $at, 0x4100
/* E2024C 802B713C 44810000 */ mtc1 $at, $f0
/* E20250 802B7140 00000000 */ nop
.L802B7144:
/* E20254 802B7144 46001000 */ add.s $f0, $f2, $f0
/* E20258 802B7148 3C04802B */ lui $a0, %hi(D_802B7CB8_E20DC8)
/* E2025C 802B714C 24847CB8 */ addiu $a0, $a0, %lo(D_802B7CB8_E20DC8)
/* E20260 802B7150 E4600000 */ swc1 $f0, ($v1)
/* E20264 802B7154 8C820000 */ lw $v0, ($a0)
/* E20268 802B7158 C6200030 */ lwc1 $f0, 0x30($s1)
/* E2026C 802B715C 3C013ECC */ lui $at, 0x3ecc
/* E20270 802B7160 3421CCCD */ ori $at, $at, 0xcccd
/* E20274 802B7164 44811000 */ mtc1 $at, $f2
/* E20278 802B7168 A0400023 */ sb $zero, 0x23($v0)
/* E2027C 802B716C 3C038007 */ lui $v1, %hi(gCurrentCameraID)
/* E20280 802B7170 8C637410 */ lw $v1, %lo(gCurrentCameraID)($v1)
/* E20284 802B7174 E4400008 */ swc1 $f0, 8($v0)
/* E20288 802B7178 E4420010 */ swc1 $f2, 0x10($v0)
/* E2028C 802B717C 3C02802B */ lui $v0, %hi(func_802B7728_E20838)
/* E20290 802B7180 24427728 */ addiu $v0, $v0, %lo(func_802B7728_E20838)
/* E20294 802B7184 3C018011 */ lui $at, %hi(D_8010C958)
/* E20298 802B7188 AC22C958 */ sw $v0, %lo(D_8010C958)($at)
/* E2029C 802B718C 00031080 */ sll $v0, $v1, 2
/* E202A0 802B7190 00431021 */ addu $v0, $v0, $v1
/* E202A4 802B7194 00021080 */ sll $v0, $v0, 2
/* E202A8 802B7198 00431023 */ subu $v0, $v0, $v1
/* E202AC 802B719C 000218C0 */ sll $v1, $v0, 3
/* E202B0 802B71A0 00431021 */ addu $v0, $v0, $v1
/* E202B4 802B71A4 000210C0 */ sll $v0, $v0, 3
/* E202B8 802B71A8 3C01800B */ lui $at, %hi(gCameras+0x6C)
/* E202BC 802B71AC 00220821 */ addu $at, $at, $v0
/* E202C0 802B71B0 C4201DEC */ lwc1 $f0, %lo(gCameras+0x6C)($at)
/* E202C4 802B71B4 240200FF */ addiu $v0, $zero, 0xff
/* E202C8 802B71B8 8C830000 */ lw $v1, ($a0)
/* E202CC 802B71BC 46000007 */ neg.s $f0, $f0
/* E202D0 802B71C0 A0620024 */ sb $v0, 0x24($v1)
/* E202D4 802B71C4 E460000C */ swc1 $f0, 0xc($v1)
/* E202D8 802B71C8 8C830000 */ lw $v1, ($a0)
/* E202DC 802B71CC 240200FF */ addiu $v0, $zero, 0xff
/* E202E0 802B71D0 AC62001C */ sw $v0, 0x1c($v1)
.L802B71D4:
/* E202E4 802B71D4 8FBF0018 */ lw $ra, 0x18($sp)
/* E202E8 802B71D8 8FB10014 */ lw $s1, 0x14($sp)
/* E202EC 802B71DC 8FB00010 */ lw $s0, 0x10($sp)
/* E202F0 802B71E0 03E00008 */ jr $ra
/* E202F4 802B71E4 27BD0020 */ addiu $sp, $sp, 0x20

View File

@ -1,613 +0,0 @@
.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
.section .rodata
dlabel D_8023CD50_6F5E30
.double 47.0
dlabel D_8023CD58_6F5E38
.double 1.12
dlabel D_8023CD60_6F5E40
.double 0.53
dlabel D_8023CD68_6F5E48
.double 47.0
dlabel D_8023CD70_6F5E50
.double 0.8
dlabel D_8023CD78_6F5E58
.double 0.53
dlabel D_8023CD80_6F5E60
.double 0.8
dlabel D_8023CD88_6F5E68
.double 16.5
dlabel D_8023CD90_6F5E70
.double 33.0, 0.0
.section .text
glabel func_8023817C_6F125C
/* 6F125C 8023817C 27BDFFB8 */ addiu $sp, $sp, -0x48
/* 6F1260 80238180 AFB3001C */ sw $s3, 0x1c($sp)
/* 6F1264 80238184 0080982D */ daddu $s3, $a0, $zero
/* 6F1268 80238188 AFB40020 */ sw $s4, 0x20($sp)
/* 6F126C 8023818C 3C14800E */ lui $s4, %hi(gBattleStatus)
/* 6F1270 80238190 2694C070 */ addiu $s4, $s4, %lo(gBattleStatus)
/* 6F1274 80238194 AFBF0024 */ sw $ra, 0x24($sp)
/* 6F1278 80238198 AFB20018 */ sw $s2, 0x18($sp)
/* 6F127C 8023819C AFB10014 */ sw $s1, 0x14($sp)
/* 6F1280 802381A0 AFB00010 */ sw $s0, 0x10($sp)
/* 6F1284 802381A4 F7BA0040 */ sdc1 $f26, 0x40($sp)
/* 6F1288 802381A8 F7B80038 */ sdc1 $f24, 0x38($sp)
/* 6F128C 802381AC F7B60030 */ sdc1 $f22, 0x30($sp)
/* 6F1290 802381B0 F7B40028 */ sdc1 $f20, 0x28($sp)
/* 6F1294 802381B4 8E9200DC */ lw $s2, 0xdc($s4)
/* 6F1298 802381B8 8E71000C */ lw $s1, 0xc($s3)
/* 6F129C 802381BC 10A00010 */ beqz $a1, .L80238200
/* 6F12A0 802381C0 2650000C */ addiu $s0, $s2, 0xc
/* 6F12A4 802381C4 8E250000 */ lw $a1, ($s1)
/* 6F12A8 802381C8 0C0B1EAF */ jal evt_get_variable
/* 6F12AC 802381CC 26310004 */ addiu $s1, $s1, 4
/* 6F12B0 802381D0 A6420070 */ sh $v0, 0x70($s2)
/* 6F12B4 802381D4 8E250000 */ lw $a1, ($s1)
/* 6F12B8 802381D8 0C0B1EAF */ jal evt_get_variable
/* 6F12BC 802381DC 0260202D */ daddu $a0, $s3, $zero
/* 6F12C0 802381E0 A6420072 */ sh $v0, 0x72($s2)
/* 6F12C4 802381E4 AE600074 */ sw $zero, 0x74($s3)
/* 6F12C8 802381E8 AE600070 */ sw $zero, 0x70($s3)
/* 6F12CC 802381EC 86430072 */ lh $v1, 0x72($s2)
/* 6F12D0 802381F0 24020001 */ addiu $v0, $zero, 1
/* 6F12D4 802381F4 14620002 */ bne $v1, $v0, .L80238200
/* 6F12D8 802381F8 24020002 */ addiu $v0, $zero, 2
/* 6F12DC 802381FC AE620070 */ sw $v0, 0x70($s3)
.L80238200:
/* 6F12E0 80238200 8E620070 */ lw $v0, 0x70($s3)
/* 6F12E4 80238204 144000F5 */ bnez $v0, .L802385DC
/* 6F12E8 80238208 00000000 */ nop
/* 6F12EC 8023820C C6400144 */ lwc1 $f0, 0x144($s2)
/* 6F12F0 80238210 C618000C */ lwc1 $f24, 0xc($s0)
/* 6F12F4 80238214 C61A0014 */ lwc1 $f26, 0x14($s0)
/* 6F12F8 80238218 E6000000 */ swc1 $f0, ($s0)
/* 6F12FC 8023821C C6400148 */ lwc1 $f0, 0x148($s2)
/* 6F1300 80238220 4406C000 */ mfc1 $a2, $f24
/* 6F1304 80238224 4407D000 */ mfc1 $a3, $f26
/* 6F1308 80238228 C6160000 */ lwc1 $f22, ($s0)
/* 6F130C 8023822C E6000004 */ swc1 $f0, 4($s0)
/* 6F1310 80238230 C654014C */ lwc1 $f20, 0x14c($s2)
/* 6F1314 80238234 4600B306 */ mov.s $f12, $f22
/* 6F1318 80238238 4600A386 */ mov.s $f14, $f20
/* 6F131C 8023823C 0C00A720 */ jal atan2
/* 6F1320 80238240 E6140008 */ swc1 $f20, 8($s0)
/* 6F1324 80238244 4600B306 */ mov.s $f12, $f22
/* 6F1328 80238248 4406C000 */ mfc1 $a2, $f24
/* 6F132C 8023824C 4407D000 */ mfc1 $a3, $f26
/* 6F1330 80238250 4600A386 */ mov.s $f14, $f20
/* 6F1334 80238254 0C00A7B5 */ jal dist2D
/* 6F1338 80238258 E6000048 */ swc1 $f0, 0x48($s0)
/* 6F133C 8023825C 86020064 */ lh $v0, 0x64($s0)
/* 6F1340 80238260 46000106 */ mov.s $f4, $f0
/* 6F1344 80238264 14400012 */ bnez $v0, .L802382B0
/* 6F1348 80238268 E604004C */ swc1 $f4, 0x4c($s0)
/* 6F134C 8023826C C6000040 */ lwc1 $f0, 0x40($s0)
/* 6F1350 80238270 C6020040 */ lwc1 $f2, 0x40($s0)
/* 6F1354 80238274 46002003 */ div.s $f0, $f4, $f0
/* 6F1358 80238278 4600028D */ trunc.w.s $f10, $f0
/* 6F135C 8023827C 44035000 */ mfc1 $v1, $f10
/* 6F1360 80238280 00000000 */ nop
/* 6F1364 80238284 00031400 */ sll $v0, $v1, 0x10
/* 6F1368 80238288 00021403 */ sra $v0, $v0, 0x10
/* 6F136C 8023828C 44820000 */ mtc1 $v0, $f0
/* 6F1370 80238290 00000000 */ nop
/* 6F1374 80238294 46800020 */ cvt.s.w $f0, $f0
/* 6F1378 80238298 46020002 */ mul.s $f0, $f0, $f2
/* 6F137C 8023829C 00000000 */ nop
/* 6F1380 802382A0 46002086 */ mov.s $f2, $f4
/* 6F1384 802382A4 A6030064 */ sh $v1, 0x64($s0)
/* 6F1388 802382A8 0808E0B9 */ j .L802382E4
/* 6F138C 802382AC 46001201 */ sub.s $f8, $f2, $f0
.L802382B0:
/* 6F1390 802382B0 44821000 */ mtc1 $v0, $f2
/* 6F1394 802382B4 00000000 */ nop
/* 6F1398 802382B8 468010A0 */ cvt.s.w $f2, $f2
/* 6F139C 802382BC 86020064 */ lh $v0, 0x64($s0)
/* 6F13A0 802382C0 46022083 */ div.s $f2, $f4, $f2
/* 6F13A4 802382C4 44820000 */ mtc1 $v0, $f0
/* 6F13A8 802382C8 00000000 */ nop
/* 6F13AC 802382CC 46800020 */ cvt.s.w $f0, $f0
/* 6F13B0 802382D0 46020002 */ mul.s $f0, $f0, $f2
/* 6F13B4 802382D4 00000000 */ nop
/* 6F13B8 802382D8 C604004C */ lwc1 $f4, 0x4c($s0)
/* 6F13BC 802382DC E6020040 */ swc1 $f2, 0x40($s0)
/* 6F13C0 802382E0 46002201 */ sub.s $f8, $f4, $f0
.L802382E4:
/* 6F13C4 802382E4 86030064 */ lh $v1, 0x64($s0)
/* 6F13C8 802382E8 106001C1 */ beqz $v1, .L802389F0
/* 6F13CC 802382EC 24020002 */ addiu $v0, $zero, 2
/* 6F13D0 802382F0 86020064 */ lh $v0, 0x64($s0)
/* 6F13D4 802382F4 C602000C */ lwc1 $f2, 0xc($s0)
/* 6F13D8 802382F8 3C014049 */ lui $at, 0x4049
/* 6F13DC 802382FC 34210FD0 */ ori $at, $at, 0xfd0
/* 6F13E0 80238300 44810000 */ mtc1 $at, $f0
/* 6F13E4 80238304 C6040000 */ lwc1 $f4, ($s0)
/* 6F13E8 80238308 44823000 */ mtc1 $v0, $f6
/* 6F13EC 8023830C 00000000 */ nop
/* 6F13F0 80238310 468031A0 */ cvt.s.w $f6, $f6
/* 6F13F4 80238314 46060003 */ div.s $f0, $f0, $f6
/* 6F13F8 80238318 46041081 */ sub.s $f2, $f2, $f4
/* 6F13FC 8023831C E600003C */ swc1 $f0, 0x3c($s0)
/* 6F1400 80238320 44830000 */ mtc1 $v1, $f0
/* 6F1404 80238324 00000000 */ nop
/* 6F1408 80238328 46800020 */ cvt.s.w $f0, $f0
/* 6F140C 8023832C 46001083 */ div.s $f2, $f2, $f0
/* 6F1410 80238330 C6000010 */ lwc1 $f0, 0x10($s0)
/* 6F1414 80238334 E6020030 */ swc1 $f2, 0x30($s0)
/* 6F1418 80238338 C6020004 */ lwc1 $f2, 4($s0)
/* 6F141C 8023833C AE000044 */ sw $zero, 0x44($s0)
/* 6F1420 80238340 46020001 */ sub.s $f0, $f0, $f2
/* 6F1424 80238344 C6040014 */ lwc1 $f4, 0x14($s0)
/* 6F1428 80238348 46003086 */ mov.s $f2, $f6
/* 6F142C 8023834C 46020003 */ div.s $f0, $f0, $f2
/* 6F1430 80238350 E6000034 */ swc1 $f0, 0x34($s0)
/* 6F1434 80238354 46003006 */ mov.s $f0, $f6
/* 6F1438 80238358 46004003 */ div.s $f0, $f8, $f0
/* 6F143C 8023835C C6020008 */ lwc1 $f2, 8($s0)
/* 6F1440 80238360 86020066 */ lh $v0, 0x66($s0)
/* 6F1444 80238364 46022101 */ sub.s $f4, $f4, $f2
/* 6F1448 80238368 C6020040 */ lwc1 $f2, 0x40($s0)
/* 6F144C 8023836C 28420003 */ slti $v0, $v0, 3
/* 6F1450 80238370 46001080 */ add.s $f2, $f2, $f0
/* 6F1454 80238374 46062103 */ div.s $f4, $f4, $f6
/* 6F1458 80238378 E6040038 */ swc1 $f4, 0x38($s0)
/* 6F145C 8023837C 10400045 */ beqz $v0, .L80238494
/* 6F1460 80238380 E6020040 */ swc1 $f2, 0x40($s0)
/* 6F1464 80238384 86020064 */ lh $v0, 0x64($s0)
/* 6F1468 80238388 24030168 */ addiu $v1, $zero, 0x168
/* 6F146C 8023838C 14400002 */ bnez $v0, .L80238398
/* 6F1470 80238390 0062001A */ div $zero, $v1, $v0
/* 6F1474 80238394 0007000D */ break 7
.L80238398:
/* 6F1478 80238398 2401FFFF */ addiu $at, $zero, -1
/* 6F147C 8023839C 14410004 */ bne $v0, $at, .L802383B0
/* 6F1480 802383A0 3C018000 */ lui $at, 0x8000
/* 6F1484 802383A4 14610002 */ bne $v1, $at, .L802383B0
/* 6F1488 802383A8 00000000 */ nop
/* 6F148C 802383AC 0006000D */ break 6
.L802383B0:
/* 6F1490 802383B0 00001812 */ mflo $v1
/* 6F1494 802383B4 C608004C */ lwc1 $f8, 0x4c($s0)
/* 6F1498 802383B8 3C014034 */ lui $at, 0x4034
/* 6F149C 802383BC 44811800 */ mtc1 $at, $f3
/* 6F14A0 802383C0 44801000 */ mtc1 $zero, $f2
/* 6F14A4 802383C4 46004021 */ cvt.d.s $f0, $f8
/* 6F14A8 802383C8 46220001 */ sub.d $f0, $f0, $f2
/* 6F14AC 802383CC 3C014018 */ lui $at, 0x4018
/* 6F14B0 802383D0 44811800 */ mtc1 $at, $f3
/* 6F14B4 802383D4 44801000 */ mtc1 $zero, $f2
/* 6F14B8 802383D8 46200220 */ cvt.s.d $f8, $f0
/* 6F14BC 802383DC 46004021 */ cvt.d.s $f0, $f8
/* 6F14C0 802383E0 46220003 */ div.d $f0, $f0, $f2
/* 6F14C4 802383E4 46200220 */ cvt.s.d $f8, $f0
/* 6F14C8 802383E8 3C018024 */ lui $at, %hi(D_8023CD50_6F5E30)
/* 6F14CC 802383EC D422CD50 */ ldc1 $f2, %lo(D_8023CD50_6F5E30)($at)
/* 6F14D0 802383F0 46004021 */ cvt.d.s $f0, $f8
/* 6F14D4 802383F4 46220000 */ add.d $f0, $f0, $f2
/* 6F14D8 802383F8 3C0142B4 */ lui $at, 0x42b4
/* 6F14DC 802383FC 44811000 */ mtc1 $at, $f2
/* 6F14E0 80238400 46200220 */ cvt.s.d $f8, $f0
/* 6F14E4 80238404 44830000 */ mtc1 $v1, $f0
/* 6F14E8 80238408 00000000 */ nop
/* 6F14EC 8023840C 46800020 */ cvt.s.w $f0, $f0
/* 6F14F0 80238410 86030066 */ lh $v1, 0x66($s0)
/* 6F14F4 80238414 24020002 */ addiu $v0, $zero, 2
/* 6F14F8 80238418 E6020024 */ swc1 $f2, 0x24($s0)
/* 6F14FC 8023841C E6080050 */ swc1 $f8, 0x50($s0)
/* 6F1500 80238420 14620008 */ bne $v1, $v0, .L80238444
/* 6F1504 80238424 E6000028 */ swc1 $f0, 0x28($s0)
/* 6F1508 80238428 3C018024 */ lui $at, %hi(D_8023CD58_6F5E38)
/* 6F150C 8023842C D422CD58 */ ldc1 $f2, %lo(D_8023CD58_6F5E38)($at)
/* 6F1510 80238430 46004021 */ cvt.d.s $f0, $f8
/* 6F1514 80238434 46220002 */ mul.d $f0, $f0, $f2
/* 6F1518 80238438 00000000 */ nop
/* 6F151C 8023843C 46200020 */ cvt.s.d $f0, $f0
/* 6F1520 80238440 E6000050 */ swc1 $f0, 0x50($s0)
.L80238444:
/* 6F1524 80238444 C60C0024 */ lwc1 $f12, 0x24($s0)
/* 6F1528 80238448 3C0140C9 */ lui $at, 0x40c9
/* 6F152C 8023844C 34210FD0 */ ori $at, $at, 0xfd0
/* 6F1530 80238450 44810000 */ mtc1 $at, $f0
/* 6F1534 80238454 C6140044 */ lwc1 $f20, 0x44($s0)
/* 6F1538 80238458 C616003C */ lwc1 $f22, 0x3c($s0)
/* 6F153C 8023845C AE000018 */ sw $zero, 0x18($s0)
/* 6F1540 80238460 46006302 */ mul.s $f12, $f12, $f0
/* 6F1544 80238464 00000000 */ nop
/* 6F1548 80238468 AE00001C */ sw $zero, 0x1c($s0)
/* 6F154C 8023846C 4600A521 */ cvt.d.s $f20, $f20
/* 6F1550 80238470 3C0143B4 */ lui $at, 0x43b4
/* 6F1554 80238474 44810000 */ mtc1 $at, $f0
/* 6F1558 80238478 4600B5A1 */ cvt.d.s $f22, $f22
/* 6F155C 8023847C 0C00A85B */ jal sin_rad
/* 6F1560 80238480 46006303 */ div.s $f12, $f12, $f0
/* 6F1564 80238484 3C018024 */ lui $at, %hi(D_8023CD60_6F5E40)
/* 6F1568 80238488 D422CD60 */ ldc1 $f2, %lo(D_8023CD60_6F5E40)($at)
/* 6F156C 8023848C 0808E169 */ j .L802385A4
/* 6F1570 80238490 46000021 */ cvt.d.s $f0, $f0
.L80238494:
/* 6F1574 80238494 86020064 */ lh $v0, 0x64($s0)
/* 6F1578 80238498 24030168 */ addiu $v1, $zero, 0x168
/* 6F157C 8023849C 14400002 */ bnez $v0, .L802384A8
/* 6F1580 802384A0 0062001A */ div $zero, $v1, $v0
/* 6F1584 802384A4 0007000D */ break 7
.L802384A8:
/* 6F1588 802384A8 2401FFFF */ addiu $at, $zero, -1
/* 6F158C 802384AC 14410004 */ bne $v0, $at, .L802384C0
/* 6F1590 802384B0 3C018000 */ lui $at, 0x8000
/* 6F1594 802384B4 14610002 */ bne $v1, $at, .L802384C0
/* 6F1598 802384B8 00000000 */ nop
/* 6F159C 802384BC 0006000D */ break 6
.L802384C0:
/* 6F15A0 802384C0 00001812 */ mflo $v1
/* 6F15A4 802384C4 C608004C */ lwc1 $f8, 0x4c($s0)
/* 6F15A8 802384C8 3C014034 */ lui $at, 0x4034
/* 6F15AC 802384CC 44811800 */ mtc1 $at, $f3
/* 6F15B0 802384D0 44801000 */ mtc1 $zero, $f2
/* 6F15B4 802384D4 46004021 */ cvt.d.s $f0, $f8
/* 6F15B8 802384D8 46220001 */ sub.d $f0, $f0, $f2
/* 6F15BC 802384DC 3C014018 */ lui $at, 0x4018
/* 6F15C0 802384E0 44811800 */ mtc1 $at, $f3
/* 6F15C4 802384E4 44801000 */ mtc1 $zero, $f2
/* 6F15C8 802384E8 46200220 */ cvt.s.d $f8, $f0
/* 6F15CC 802384EC 46004021 */ cvt.d.s $f0, $f8
/* 6F15D0 802384F0 46220003 */ div.d $f0, $f0, $f2
/* 6F15D4 802384F4 46200220 */ cvt.s.d $f8, $f0
/* 6F15D8 802384F8 3C018024 */ lui $at, %hi(D_8023CD68_6F5E48)
/* 6F15DC 802384FC D422CD68 */ ldc1 $f2, %lo(D_8023CD68_6F5E48)($at)
/* 6F15E0 80238500 46004021 */ cvt.d.s $f0, $f8
/* 6F15E4 80238504 46220000 */ add.d $f0, $f0, $f2
/* 6F15E8 80238508 3C0142B4 */ lui $at, 0x42b4
/* 6F15EC 8023850C 44811000 */ mtc1 $at, $f2
/* 6F15F0 80238510 46200220 */ cvt.s.d $f8, $f0
/* 6F15F4 80238514 44830000 */ mtc1 $v1, $f0
/* 6F15F8 80238518 00000000 */ nop
/* 6F15FC 8023851C 46800020 */ cvt.s.w $f0, $f0
/* 6F1600 80238520 86030066 */ lh $v1, 0x66($s0)
/* 6F1604 80238524 24020004 */ addiu $v0, $zero, 4
/* 6F1608 80238528 E6020024 */ swc1 $f2, 0x24($s0)
/* 6F160C 8023852C E6080050 */ swc1 $f8, 0x50($s0)
/* 6F1610 80238530 14620009 */ bne $v1, $v0, .L80238558
/* 6F1614 80238534 E6000028 */ swc1 $f0, 0x28($s0)
/* 6F1618 80238538 3C013FF4 */ lui $at, 0x3ff4
/* 6F161C 8023853C 44811800 */ mtc1 $at, $f3
/* 6F1620 80238540 44801000 */ mtc1 $zero, $f2
/* 6F1624 80238544 46004021 */ cvt.d.s $f0, $f8
/* 6F1628 80238548 46220002 */ mul.d $f0, $f0, $f2
/* 6F162C 8023854C 00000000 */ nop
/* 6F1630 80238550 46200020 */ cvt.s.d $f0, $f0
/* 6F1634 80238554 E6000050 */ swc1 $f0, 0x50($s0)
.L80238558:
/* 6F1638 80238558 C60C0024 */ lwc1 $f12, 0x24($s0)
/* 6F163C 8023855C 3C0140C9 */ lui $at, 0x40c9
/* 6F1640 80238560 34210FD0 */ ori $at, $at, 0xfd0
/* 6F1644 80238564 44810000 */ mtc1 $at, $f0
/* 6F1648 80238568 C6140044 */ lwc1 $f20, 0x44($s0)
/* 6F164C 8023856C C616003C */ lwc1 $f22, 0x3c($s0)
/* 6F1650 80238570 AE000018 */ sw $zero, 0x18($s0)
/* 6F1654 80238574 46006302 */ mul.s $f12, $f12, $f0
/* 6F1658 80238578 00000000 */ nop
/* 6F165C 8023857C AE00001C */ sw $zero, 0x1c($s0)
/* 6F1660 80238580 4600A521 */ cvt.d.s $f20, $f20
/* 6F1664 80238584 3C0143B4 */ lui $at, 0x43b4
/* 6F1668 80238588 44810000 */ mtc1 $at, $f0
/* 6F166C 8023858C 4600B5A1 */ cvt.d.s $f22, $f22
/* 6F1670 80238590 0C00A85B */ jal sin_rad
/* 6F1674 80238594 46006303 */ div.s $f12, $f12, $f0
/* 6F1678 80238598 3C018024 */ lui $at, %hi(D_8023CD70_6F5E50)
/* 6F167C 8023859C D422CD70 */ ldc1 $f2, %lo(D_8023CD70_6F5E50)($at)
/* 6F1680 802385A0 46000021 */ cvt.d.s $f0, $f0
.L802385A4:
/* 6F1684 802385A4 46220002 */ mul.d $f0, $f0, $f2
/* 6F1688 802385A8 00000000 */ nop
/* 6F168C 802385AC 46360002 */ mul.d $f0, $f0, $f22
/* 6F1690 802385B0 00000000 */ nop
/* 6F1694 802385B4 46360000 */ add.d $f0, $f0, $f22
/* 6F1698 802385B8 4620A500 */ add.d $f20, $f20, $f0
/* 6F169C 802385BC 4620A520 */ cvt.s.d $f20, $f20
/* 6F16A0 802385C0 E6140044 */ swc1 $f20, 0x44($s0)
/* 6F16A4 802385C4 24040100 */ addiu $a0, $zero, 0x100
/* 6F16A8 802385C8 8E060058 */ lw $a2, 0x58($s0)
/* 6F16AC 802385CC 0C098F3F */ jal set_animation
/* 6F16B0 802385D0 24050001 */ addiu $a1, $zero, 1
/* 6F16B4 802385D4 24020001 */ addiu $v0, $zero, 1
/* 6F16B8 802385D8 AE620070 */ sw $v0, 0x70($s3)
.L802385DC:
/* 6F16BC 802385DC 8E630070 */ lw $v1, 0x70($s3)
/* 6F16C0 802385E0 24020002 */ addiu $v0, $zero, 2
/* 6F16C4 802385E4 10620094 */ beq $v1, $v0, .L80238838
/* 6F16C8 802385E8 28620003 */ slti $v0, $v1, 3
/* 6F16CC 802385EC 10400005 */ beqz $v0, .L80238604
/* 6F16D0 802385F0 24020001 */ addiu $v0, $zero, 1
/* 6F16D4 802385F4 10620008 */ beq $v1, $v0, .L80238618
/* 6F16D8 802385F8 0000102D */ daddu $v0, $zero, $zero
/* 6F16DC 802385FC 0808E27C */ j .L802389F0
/* 6F16E0 80238600 00000000 */ nop
.L80238604:
/* 6F16E4 80238604 24020003 */ addiu $v0, $zero, 3
/* 6F16E8 80238608 106200BD */ beq $v1, $v0, .L80238900
/* 6F16EC 8023860C 0000102D */ daddu $v0, $zero, $zero
/* 6F16F0 80238610 0808E27C */ j .L802389F0
/* 6F16F4 80238614 00000000 */ nop
.L80238618:
/* 6F16F8 80238618 C6020044 */ lwc1 $f2, 0x44($s0)
/* 6F16FC 8023861C 3C013FC9 */ lui $at, 0x3fc9
/* 6F1700 80238620 34210FD0 */ ori $at, $at, 0xfd0
/* 6F1704 80238624 44810000 */ mtc1 $at, $f0
/* 6F1708 80238628 00000000 */ nop
/* 6F170C 8023862C 4602003C */ c.lt.s $f0, $f2
/* 6F1710 80238630 00000000 */ nop
/* 6F1714 80238634 45000004 */ bc1f .L80238648
/* 6F1718 80238638 24040100 */ addiu $a0, $zero, 0x100
/* 6F171C 8023863C 8E06005C */ lw $a2, 0x5c($s0)
/* 6F1720 80238640 0C098F3F */ jal set_animation
/* 6F1724 80238644 24050001 */ addiu $a1, $zero, 1
.L80238648:
/* 6F1728 80238648 C6060000 */ lwc1 $f6, ($s0)
/* 6F172C 8023864C C6000030 */ lwc1 $f0, 0x30($s0)
/* 6F1730 80238650 C6040004 */ lwc1 $f4, 4($s0)
/* 6F1734 80238654 C6560144 */ lwc1 $f22, 0x144($s2)
/* 6F1738 80238658 46003180 */ add.s $f6, $f6, $f0
/* 6F173C 8023865C C6000034 */ lwc1 $f0, 0x34($s0)
/* 6F1740 80238660 C6020038 */ lwc1 $f2, 0x38($s0)
/* 6F1744 80238664 46002100 */ add.s $f4, $f4, $f0
/* 6F1748 80238668 C6000008 */ lwc1 $f0, 8($s0)
/* 6F174C 8023866C C6540148 */ lwc1 $f20, 0x148($s2)
/* 6F1750 80238670 46020000 */ add.s $f0, $f0, $f2
/* 6F1754 80238674 E6060000 */ swc1 $f6, ($s0)
/* 6F1758 80238678 E6040004 */ swc1 $f4, 4($s0)
/* 6F175C 8023867C E6000008 */ swc1 $f0, 8($s0)
/* 6F1760 80238680 C6400148 */ lwc1 $f0, 0x148($s2)
/* 6F1764 80238684 46003086 */ mov.s $f2, $f6
/* 6F1768 80238688 E6000018 */ swc1 $f0, 0x18($s0)
/* 6F176C 8023868C E6420144 */ swc1 $f2, 0x144($s2)
/* 6F1770 80238690 0C00A85B */ jal sin_rad
/* 6F1774 80238694 C60C0044 */ lwc1 $f12, 0x44($s0)
/* 6F1778 80238698 C6020050 */ lwc1 $f2, 0x50($s0)
/* 6F177C 8023869C 46001082 */ mul.s $f2, $f2, $f0
/* 6F1780 802386A0 00000000 */ nop
/* 6F1784 802386A4 C6000004 */ lwc1 $f0, 4($s0)
/* 6F1788 802386A8 46020000 */ add.s $f0, $f0, $f2
/* 6F178C 802386AC E6400148 */ swc1 $f0, 0x148($s2)
/* 6F1790 802386B0 C6000008 */ lwc1 $f0, 8($s0)
/* 6F1794 802386B4 E640014C */ swc1 $f0, 0x14c($s2)
/* 6F1798 802386B8 C6020010 */ lwc1 $f2, 0x10($s0)
/* 6F179C 802386BC C6400148 */ lwc1 $f0, 0x148($s2)
/* 6F17A0 802386C0 4602003C */ c.lt.s $f0, $f2
/* 6F17A4 802386C4 00000000 */ nop
/* 6F17A8 802386C8 45000007 */ bc1f .L802386E8
/* 6F17AC 802386CC 4600B306 */ mov.s $f12, $f22
/* 6F17B0 802386D0 86020064 */ lh $v0, 0x64($s0)
/* 6F17B4 802386D4 28420003 */ slti $v0, $v0, 3
/* 6F17B8 802386D8 54400002 */ bnel $v0, $zero, .L802386E4
/* 6F17BC 802386DC E6420148 */ swc1 $f2, 0x148($s2)
/* 6F17C0 802386E0 4600B306 */ mov.s $f12, $f22
.L802386E4:
/* 6F17C4 802386E4 C6400148 */ lwc1 $f0, 0x148($s2)
.L802386E8:
/* 6F17C8 802386E8 8E460144 */ lw $a2, 0x144($s2)
/* 6F17CC 802386EC 46000007 */ neg.s $f0, $f0
/* 6F17D0 802386F0 44070000 */ mfc1 $a3, $f0
/* 6F17D4 802386F4 0C00A720 */ jal atan2
/* 6F17D8 802386F8 4600A387 */ neg.s $f14, $f20
/* 6F17DC 802386FC 46000007 */ neg.s $f0, $f0
/* 6F17E0 80238700 E6400164 */ swc1 $f0, 0x164($s2)
/* 6F17E4 80238704 86020066 */ lh $v0, 0x66($s0)
/* 6F17E8 80238708 C6400148 */ lwc1 $f0, 0x148($s2)
/* 6F17EC 8023870C 28420003 */ slti $v0, $v0, 3
/* 6F17F0 80238710 10400013 */ beqz $v0, .L80238760
/* 6F17F4 80238714 E600001C */ swc1 $f0, 0x1c($s0)
/* 6F17F8 80238718 C60C0024 */ lwc1 $f12, 0x24($s0)
/* 6F17FC 8023871C 3C0140C9 */ lui $at, 0x40c9
/* 6F1800 80238720 34210FD0 */ ori $at, $at, 0xfd0
/* 6F1804 80238724 44810000 */ mtc1 $at, $f0
/* 6F1808 80238728 C6140044 */ lwc1 $f20, 0x44($s0)
/* 6F180C 8023872C 46006302 */ mul.s $f12, $f12, $f0
/* 6F1810 80238730 00000000 */ nop
/* 6F1814 80238734 C616003C */ lwc1 $f22, 0x3c($s0)
/* 6F1818 80238738 4600A521 */ cvt.d.s $f20, $f20
/* 6F181C 8023873C 3C0143B4 */ lui $at, 0x43b4
/* 6F1820 80238740 44810000 */ mtc1 $at, $f0
/* 6F1824 80238744 4600B5A1 */ cvt.d.s $f22, $f22
/* 6F1828 80238748 0C00A85B */ jal sin_rad
/* 6F182C 8023874C 46006303 */ div.s $f12, $f12, $f0
/* 6F1830 80238750 3C018024 */ lui $at, %hi(D_8023CD78_6F5E58)
/* 6F1834 80238754 D422CD78 */ ldc1 $f2, %lo(D_8023CD78_6F5E58)($at)
/* 6F1838 80238758 0808E1E9 */ j .L802387A4
/* 6F183C 8023875C 46000021 */ cvt.d.s $f0, $f0
.L80238760:
/* 6F1840 80238760 C60C0024 */ lwc1 $f12, 0x24($s0)
/* 6F1844 80238764 3C0140C9 */ lui $at, 0x40c9
/* 6F1848 80238768 34210FD0 */ ori $at, $at, 0xfd0
/* 6F184C 8023876C 44810000 */ mtc1 $at, $f0
/* 6F1850 80238770 C6140044 */ lwc1 $f20, 0x44($s0)
/* 6F1854 80238774 46006302 */ mul.s $f12, $f12, $f0
/* 6F1858 80238778 00000000 */ nop
/* 6F185C 8023877C C616003C */ lwc1 $f22, 0x3c($s0)
/* 6F1860 80238780 4600A521 */ cvt.d.s $f20, $f20
/* 6F1864 80238784 3C0143B4 */ lui $at, 0x43b4
/* 6F1868 80238788 44810000 */ mtc1 $at, $f0
/* 6F186C 8023878C 4600B5A1 */ cvt.d.s $f22, $f22
/* 6F1870 80238790 0C00A85B */ jal sin_rad
/* 6F1874 80238794 46006303 */ div.s $f12, $f12, $f0
/* 6F1878 80238798 3C018024 */ lui $at, %hi(D_8023CD80_6F5E60)
/* 6F187C 8023879C D422CD80 */ ldc1 $f2, %lo(D_8023CD80_6F5E60)($at)
/* 6F1880 802387A0 46000021 */ cvt.d.s $f0, $f0
.L802387A4:
/* 6F1884 802387A4 46220002 */ mul.d $f0, $f0, $f2
/* 6F1888 802387A8 00000000 */ nop
/* 6F188C 802387AC 46360002 */ mul.d $f0, $f0, $f22
/* 6F1890 802387B0 00000000 */ nop
/* 6F1894 802387B4 46360000 */ add.d $f0, $f0, $f22
/* 6F1898 802387B8 4620A500 */ add.d $f20, $f20, $f0
/* 6F189C 802387BC 4620A520 */ cvt.s.d $f20, $f20
/* 6F18A0 802387C0 E6140044 */ swc1 $f20, 0x44($s0)
/* 6F18A4 802387C4 C60C0024 */ lwc1 $f12, 0x24($s0)
/* 6F18A8 802387C8 C6000028 */ lwc1 $f0, 0x28($s0)
/* 6F18AC 802387CC 46006300 */ add.s $f12, $f12, $f0
/* 6F18B0 802387D0 0C00A6C9 */ jal clamp_angle
/* 6F18B4 802387D4 E60C0024 */ swc1 $f12, 0x24($s0)
/* 6F18B8 802387D8 96020064 */ lhu $v0, 0x64($s0)
/* 6F18BC 802387DC E6000024 */ swc1 $f0, 0x24($s0)
/* 6F18C0 802387E0 2442FFFF */ addiu $v0, $v0, -1
/* 6F18C4 802387E4 A6020064 */ sh $v0, 0x64($s0)
/* 6F18C8 802387E8 00021400 */ sll $v0, $v0, 0x10
/* 6F18CC 802387EC 14400080 */ bnez $v0, .L802389F0
/* 6F18D0 802387F0 0000102D */ daddu $v0, $zero, $zero
/* 6F18D4 802387F4 C6000010 */ lwc1 $f0, 0x10($s0)
/* 6F18D8 802387F8 24040100 */ addiu $a0, $zero, 0x100
/* 6F18DC 802387FC E6400148 */ swc1 $f0, 0x148($s2)
/* 6F18E0 80238800 C6000018 */ lwc1 $f0, 0x18($s0)
/* 6F18E4 80238804 C602001C */ lwc1 $f2, 0x1c($s0)
/* 6F18E8 80238808 8E060060 */ lw $a2, 0x60($s0)
/* 6F18EC 8023880C 46020001 */ sub.s $f0, $f0, $f2
/* 6F18F0 80238810 3C013FE6 */ lui $at, 0x3fe6
/* 6F18F4 80238814 34216666 */ ori $at, $at, 0x6666
/* 6F18F8 80238818 44811000 */ mtc1 $at, $f2
/* 6F18FC 8023881C 24050001 */ addiu $a1, $zero, 1
/* 6F1900 80238820 E602003C */ swc1 $f2, 0x3c($s0)
/* 6F1904 80238824 46000007 */ neg.s $f0, $f0
/* 6F1908 80238828 0C098F3F */ jal set_animation
/* 6F190C 8023882C E6000044 */ swc1 $f0, 0x44($s0)
/* 6F1910 80238830 0808E27C */ j .L802389F0
/* 6F1914 80238834 24020001 */ addiu $v0, $zero, 1
.L80238838:
/* 6F1918 80238838 82820083 */ lb $v0, 0x83($s4)
/* 6F191C 8023883C 10400063 */ beqz $v0, .L802389CC
/* 6F1920 80238840 24020001 */ addiu $v0, $zero, 1
/* 6F1924 80238844 A6020064 */ sh $v0, 0x64($s0)
/* 6F1928 80238848 86020064 */ lh $v0, 0x64($s0)
/* 6F192C 8023884C 24030168 */ addiu $v1, $zero, 0x168
/* 6F1930 80238850 14400002 */ bnez $v0, .L8023885C
/* 6F1934 80238854 0062001A */ div $zero, $v1, $v0
/* 6F1938 80238858 0007000D */ break 7
.L8023885C:
/* 6F193C 8023885C 2401FFFF */ addiu $at, $zero, -1
/* 6F1940 80238860 14410004 */ bne $v0, $at, .L80238874
/* 6F1944 80238864 3C018000 */ lui $at, 0x8000
/* 6F1948 80238868 14610002 */ bne $v1, $at, .L80238874
/* 6F194C 8023886C 00000000 */ nop
/* 6F1950 80238870 0006000D */ break 6
.L80238874:
/* 6F1954 80238874 00001812 */ mflo $v1
/* 6F1958 80238878 C6020018 */ lwc1 $f2, 0x18($s0)
/* 6F195C 8023887C C600001C */ lwc1 $f0, 0x1c($s0)
/* 6F1960 80238880 3C013FE6 */ lui $at, 0x3fe6
/* 6F1964 80238884 34216666 */ ori $at, $at, 0x6666
/* 6F1968 80238888 44814000 */ mtc1 $at, $f8
/* 6F196C 8023888C C604001C */ lwc1 $f4, 0x1c($s0)
/* 6F1970 80238890 46001081 */ sub.s $f2, $f2, $f0
/* 6F1974 80238894 C6000018 */ lwc1 $f0, 0x18($s0)
/* 6F1978 80238898 3C0142B4 */ lui $at, 0x42b4
/* 6F197C 8023889C 44813000 */ mtc1 $at, $f6
/* 6F1980 802388A0 46040001 */ sub.s $f0, $f0, $f4
/* 6F1984 802388A4 E608003C */ swc1 $f8, 0x3c($s0)
/* 6F1988 802388A8 E6060024 */ swc1 $f6, 0x24($s0)
/* 6F198C 802388AC 46001087 */ neg.s $f2, $f2
/* 6F1990 802388B0 E6020044 */ swc1 $f2, 0x44($s0)
/* 6F1994 802388B4 3C018024 */ lui $at, %hi(D_8023CD88_6F5E68)
/* 6F1998 802388B8 D422CD88 */ ldc1 $f2, %lo(D_8023CD88_6F5E68)($at)
/* 6F199C 802388BC 46000005 */ abs.s $f0, $f0
/* 6F19A0 802388C0 46000021 */ cvt.d.s $f0, $f0
/* 6F19A4 802388C4 46220003 */ div.d $f0, $f0, $f2
/* 6F19A8 802388C8 46200020 */ cvt.s.d $f0, $f0
/* 6F19AC 802388CC E6000050 */ swc1 $f0, 0x50($s0)
/* 6F19B0 802388D0 44830000 */ mtc1 $v1, $f0
/* 6F19B4 802388D4 00000000 */ nop
/* 6F19B8 802388D8 46800020 */ cvt.s.w $f0, $f0
/* 6F19BC 802388DC E6000028 */ swc1 $f0, 0x28($s0)
/* 6F19C0 802388E0 C6400144 */ lwc1 $f0, 0x144($s2)
/* 6F19C4 802388E4 E6000000 */ swc1 $f0, ($s0)
/* 6F19C8 802388E8 C6400148 */ lwc1 $f0, 0x148($s2)
/* 6F19CC 802388EC E6000004 */ swc1 $f0, 4($s0)
/* 6F19D0 802388F0 C640014C */ lwc1 $f0, 0x14c($s2)
/* 6F19D4 802388F4 24020003 */ addiu $v0, $zero, 3
/* 6F19D8 802388F8 E6000008 */ swc1 $f0, 8($s0)
/* 6F19DC 802388FC AE620070 */ sw $v0, 0x70($s3)
.L80238900:
/* 6F19E0 80238900 C60C0024 */ lwc1 $f12, 0x24($s0)
/* 6F19E4 80238904 3C0140C9 */ lui $at, 0x40c9
/* 6F19E8 80238908 34210FD0 */ ori $at, $at, 0xfd0
/* 6F19EC 8023890C 4481B000 */ mtc1 $at, $f22
/* 6F19F0 80238910 00000000 */ nop
/* 6F19F4 80238914 46166302 */ mul.s $f12, $f12, $f22
/* 6F19F8 80238918 00000000 */ nop
/* 6F19FC 8023891C C6140000 */ lwc1 $f20, ($s0)
/* 6F1A00 80238920 3C0143B4 */ lui $at, 0x43b4
/* 6F1A04 80238924 4481C000 */ mtc1 $at, $f24
/* 6F1A08 80238928 4600A521 */ cvt.d.s $f20, $f20
/* 6F1A0C 8023892C 0C00A85B */ jal sin_rad
/* 6F1A10 80238930 46186303 */ div.s $f12, $f12, $f24
/* 6F1A14 80238934 C6020050 */ lwc1 $f2, 0x50($s0)
/* 6F1A18 80238938 46001082 */ mul.s $f2, $f2, $f0
/* 6F1A1C 8023893C 00000000 */ nop
/* 6F1A20 80238940 C60C0024 */ lwc1 $f12, 0x24($s0)
/* 6F1A24 80238944 46166302 */ mul.s $f12, $f12, $f22
/* 6F1A28 80238948 00000000 */ nop
/* 6F1A2C 8023894C 3C018024 */ lui $at, %hi(D_8023CD90_6F5E70)
/* 6F1A30 80238950 D420CD90 */ ldc1 $f0, %lo(D_8023CD90_6F5E70)($at)
/* 6F1A34 80238954 460010A1 */ cvt.d.s $f2, $f2
/* 6F1A38 80238958 46201083 */ div.d $f2, $f2, $f0
/* 6F1A3C 8023895C 4622A500 */ add.d $f20, $f20, $f2
/* 6F1A40 80238960 46186303 */ div.s $f12, $f12, $f24
/* 6F1A44 80238964 4620A520 */ cvt.s.d $f20, $f20
/* 6F1A48 80238968 0C00A85B */ jal sin_rad
/* 6F1A4C 8023896C E6140000 */ swc1 $f20, ($s0)
/* 6F1A50 80238970 C6020050 */ lwc1 $f2, 0x50($s0)
/* 6F1A54 80238974 46001082 */ mul.s $f2, $f2, $f0
/* 6F1A58 80238978 00000000 */ nop
/* 6F1A5C 8023897C C60C0024 */ lwc1 $f12, 0x24($s0)
/* 6F1A60 80238980 C6000028 */ lwc1 $f0, 0x28($s0)
/* 6F1A64 80238984 46006300 */ add.s $f12, $f12, $f0
/* 6F1A68 80238988 C6000004 */ lwc1 $f0, 4($s0)
/* 6F1A6C 8023898C 46020001 */ sub.s $f0, $f0, $f2
/* 6F1A70 80238990 E60C0024 */ swc1 $f12, 0x24($s0)
/* 6F1A74 80238994 0C00A6C9 */ jal clamp_angle
/* 6F1A78 80238998 E6000004 */ swc1 $f0, 4($s0)
/* 6F1A7C 8023899C C6020000 */ lwc1 $f2, ($s0)
/* 6F1A80 802389A0 E6000024 */ swc1 $f0, 0x24($s0)
/* 6F1A84 802389A4 E6420144 */ swc1 $f2, 0x144($s2)
/* 6F1A88 802389A8 C6000004 */ lwc1 $f0, 4($s0)
/* 6F1A8C 802389AC E6400148 */ swc1 $f0, 0x148($s2)
/* 6F1A90 802389B0 C6000008 */ lwc1 $f0, 8($s0)
/* 6F1A94 802389B4 E640014C */ swc1 $f0, 0x14c($s2)
/* 6F1A98 802389B8 3C02800E */ lui $v0, %hi(gBattleStatus)
/* 6F1A9C 802389BC 8C42C070 */ lw $v0, %lo(gBattleStatus)($v0)
/* 6F1AA0 802389C0 30422000 */ andi $v0, $v0, 0x2000
/* 6F1AA4 802389C4 10400003 */ beqz $v0, .L802389D4
/* 6F1AA8 802389C8 00000000 */ nop
.L802389CC:
/* 6F1AAC 802389CC 0808E27C */ j .L802389F0
/* 6F1AB0 802389D0 24020002 */ addiu $v0, $zero, 2
.L802389D4:
/* 6F1AB4 802389D4 96030064 */ lhu $v1, 0x64($s0)
/* 6F1AB8 802389D8 2463FFFF */ addiu $v1, $v1, -1
/* 6F1ABC 802389DC A6030064 */ sh $v1, 0x64($s0)
/* 6F1AC0 802389E0 00031C00 */ sll $v1, $v1, 0x10
/* 6F1AC4 802389E4 10600002 */ beqz $v1, .L802389F0
/* 6F1AC8 802389E8 24020001 */ addiu $v0, $zero, 1
/* 6F1ACC 802389EC 0000102D */ daddu $v0, $zero, $zero
.L802389F0:
/* 6F1AD0 802389F0 8FBF0024 */ lw $ra, 0x24($sp)
/* 6F1AD4 802389F4 8FB40020 */ lw $s4, 0x20($sp)
/* 6F1AD8 802389F8 8FB3001C */ lw $s3, 0x1c($sp)
/* 6F1ADC 802389FC 8FB20018 */ lw $s2, 0x18($sp)
/* 6F1AE0 80238A00 8FB10014 */ lw $s1, 0x14($sp)
/* 6F1AE4 80238A04 8FB00010 */ lw $s0, 0x10($sp)
/* 6F1AE8 80238A08 D7BA0040 */ ldc1 $f26, 0x40($sp)
/* 6F1AEC 80238A0C D7B80038 */ ldc1 $f24, 0x38($sp)
/* 6F1AF0 80238A10 D7B60030 */ ldc1 $f22, 0x30($sp)
/* 6F1AF4 80238A14 D7B40028 */ ldc1 $f20, 0x28($sp)
/* 6F1AF8 80238A18 03E00008 */ jr $ra
/* 6F1AFC 80238A1C 27BD0048 */ addiu $sp, $sp, 0x48

View File

@ -1,495 +0,0 @@
.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel func_802390B4_700E34
/* 700E34 802390B4 27BDFFD0 */ addiu $sp, $sp, -0x30
/* 700E38 802390B8 AFB1001C */ sw $s1, 0x1c($sp)
/* 700E3C 802390BC 3C11800E */ lui $s1, %hi(gBattleStatus+0xDC)
/* 700E40 802390C0 8E31C14C */ lw $s1, %lo(gBattleStatus+0xDC)($s1)
/* 700E44 802390C4 AFB20020 */ sw $s2, 0x20($sp)
/* 700E48 802390C8 0080902D */ daddu $s2, $a0, $zero
/* 700E4C 802390CC AFBF0024 */ sw $ra, 0x24($sp)
/* 700E50 802390D0 AFB00018 */ sw $s0, 0x18($sp)
/* 700E54 802390D4 F7B40028 */ sdc1 $f20, 0x28($sp)
/* 700E58 802390D8 10A00002 */ beqz $a1, .L802390E4
/* 700E5C 802390DC 2630000C */ addiu $s0, $s1, 0xc
/* 700E60 802390E0 AE400070 */ sw $zero, 0x70($s2)
.L802390E4:
/* 700E64 802390E4 8E430070 */ lw $v1, 0x70($s2)
/* 700E68 802390E8 10600005 */ beqz $v1, .L80239100
/* 700E6C 802390EC 24020001 */ addiu $v0, $zero, 1
/* 700E70 802390F0 10620028 */ beq $v1, $v0, .L80239194
/* 700E74 802390F4 24020002 */ addiu $v0, $zero, 2
/* 700E78 802390F8 0808E5C8 */ j .L80239720
/* 700E7C 802390FC 00000000 */ nop
.L80239100:
/* 700E80 80239100 C6200144 */ lwc1 $f0, 0x144($s1)
/* 700E84 80239104 C6220148 */ lwc1 $f2, 0x148($s1)
/* 700E88 80239108 C624014C */ lwc1 $f4, 0x14c($s1)
/* 700E8C 8023910C 2404000A */ addiu $a0, $zero, 0xa
/* 700E90 80239110 E620000C */ swc1 $f0, 0xc($s1)
/* 700E94 80239114 E6220010 */ swc1 $f2, 0x10($s1)
/* 700E98 80239118 0C00A67F */ jal rand_int
/* 700E9C 8023911C E6240014 */ swc1 $f4, 0x14($s1)
/* 700EA0 80239120 2403003C */ addiu $v1, $zero, 0x3c
/* 700EA4 80239124 00621823 */ subu $v1, $v1, $v0
/* 700EA8 80239128 44830000 */ mtc1 $v1, $f0
/* 700EAC 8023912C 00000000 */ nop
/* 700EB0 80239130 46800020 */ cvt.s.w $f0, $f0
/* 700EB4 80239134 E6200054 */ swc1 $f0, 0x54($s1)
/* 700EB8 80239138 3C014240 */ lui $at, 0x4240
/* 700EBC 8023913C 44810000 */ mtc1 $at, $f0
/* 700EC0 80239140 3C013F80 */ lui $at, 0x3f80
/* 700EC4 80239144 44811000 */ mtc1 $at, $f2
/* 700EC8 80239148 2402005A */ addiu $v0, $zero, 0x5a
/* 700ECC 8023914C AE20005C */ sw $zero, 0x5c($s1)
/* 700ED0 80239150 A6220070 */ sh $v0, 0x70($s1)
/* 700ED4 80239154 E620004C */ swc1 $f0, 0x4c($s1)
/* 700ED8 80239158 AE400074 */ sw $zero, 0x74($s2)
/* 700EDC 8023915C AE400078 */ sw $zero, 0x78($s2)
/* 700EE0 80239160 AE40007C */ sw $zero, 0x7c($s2)
/* 700EE4 80239164 E7A20010 */ swc1 $f2, 0x10($sp)
/* 700EE8 80239168 AFA00014 */ sw $zero, 0x14($sp)
/* 700EEC 8023916C 8E25000C */ lw $a1, 0xc($s1)
/* 700EF0 80239170 8E260010 */ lw $a2, 0x10($s1)
/* 700EF4 80239174 8E270014 */ lw $a3, 0x14($s1)
/* 700EF8 80239178 0C01C79C */ jal fx_65
/* 700EFC 8023917C 0000202D */ daddu $a0, $zero, $zero
/* 700F00 80239180 3C018024 */ lui $at, %hi(D_8023BD70)
/* 700F04 80239184 AC22BD70 */ sw $v0, %lo(D_8023BD70)($at)
/* 700F08 80239188 24020001 */ addiu $v0, $zero, 1
/* 700F0C 8023918C 0808E5C6 */ j .L80239718
/* 700F10 80239190 AE420070 */ sw $v0, 0x70($s2)
.L80239194:
/* 700F14 80239194 0200202D */ daddu $a0, $s0, $zero
/* 700F18 80239198 8E26004C */ lw $a2, 0x4c($s1)
/* 700F1C 8023919C 8E270054 */ lw $a3, 0x54($s1)
/* 700F20 802391A0 0C00A7E7 */ jal add_vec2D_polar
/* 700F24 802391A4 26250010 */ addiu $a1, $s1, 0x10
/* 700F28 802391A8 3C028024 */ lui $v0, %hi(D_8023BD70)
/* 700F2C 802391AC 8C42BD70 */ lw $v0, %lo(D_8023BD70)($v0)
/* 700F30 802391B0 C620000C */ lwc1 $f0, 0xc($s1)
/* 700F34 802391B4 8C43000C */ lw $v1, 0xc($v0)
/* 700F38 802391B8 E4600038 */ swc1 $f0, 0x38($v1)
/* 700F3C 802391BC 8C43000C */ lw $v1, 0xc($v0)
/* 700F40 802391C0 C6200010 */ lwc1 $f0, 0x10($s1)
/* 700F44 802391C4 E460003C */ swc1 $f0, 0x3c($v1)
/* 700F48 802391C8 8C42000C */ lw $v0, 0xc($v0)
/* 700F4C 802391CC C6200014 */ lwc1 $f0, 0x14($s1)
/* 700F50 802391D0 E4400040 */ swc1 $f0, 0x40($v0)
/* 700F54 802391D4 C622000C */ lwc1 $f2, 0xc($s1)
/* 700F58 802391D8 3C01C33E */ lui $at, 0xc33e
/* 700F5C 802391DC 44810000 */ mtc1 $at, $f0
/* 700F60 802391E0 00000000 */ nop
/* 700F64 802391E4 4600103C */ c.lt.s $f2, $f0
/* 700F68 802391E8 00000000 */ nop
/* 700F6C 802391EC 45000053 */ bc1f .L8023933C
/* 700F70 802391F0 00000000 */ nop
/* 700F74 802391F4 8E420074 */ lw $v0, 0x74($s2)
/* 700F78 802391F8 544000F1 */ bnel $v0, $zero, .L802395C0
/* 700F7C 802391FC 24020002 */ addiu $v0, $zero, 2
/* 700F80 80239200 C6220054 */ lwc1 $f2, 0x54($s1)
/* 700F84 80239204 3C014387 */ lui $at, 0x4387
/* 700F88 80239208 44810000 */ mtc1 $at, $f0
/* 700F8C 8023920C 00000000 */ nop
/* 700F90 80239210 4602003E */ c.le.s $f0, $f2
/* 700F94 80239214 00000000 */ nop
/* 700F98 80239218 45000019 */ bc1f .L80239280
/* 700F9C 8023921C 00000000 */ nop
/* 700FA0 80239220 3C0143B4 */ lui $at, 0x43b4
/* 700FA4 80239224 44810000 */ mtc1 $at, $f0
/* 700FA8 80239228 00000000 */ nop
/* 700FAC 8023922C 4600103C */ c.lt.s $f2, $f0
/* 700FB0 80239230 00000000 */ nop
/* 700FB4 80239234 45000012 */ bc1f .L80239280
/* 700FB8 80239238 00000000 */ nop
/* 700FBC 8023923C 3C014334 */ lui $at, 0x4334
/* 700FC0 80239240 44816000 */ mtc1 $at, $f12
/* 700FC4 80239244 0C00A6C9 */ jal clamp_angle
/* 700FC8 80239248 460C1300 */ add.s $f12, $f2, $f12
/* 700FCC 8023924C 3C0142B4 */ lui $at, 0x42b4
/* 700FD0 80239250 44811000 */ mtc1 $at, $f2
/* 700FD4 80239254 00000000 */ nop
/* 700FD8 80239258 46001001 */ sub.s $f0, $f2, $f0
/* 700FDC 8023925C 46020000 */ add.s $f0, $f0, $f2
/* 700FE0 80239260 24040004 */ addiu $a0, $zero, 4
/* 700FE4 80239264 0C00A67F */ jal rand_int
/* 700FE8 80239268 E6200054 */ swc1 $f0, 0x54($s1)
/* 700FEC 8023926C 2442FFFE */ addiu $v0, $v0, -2
/* 700FF0 80239270 44820000 */ mtc1 $v0, $f0
/* 700FF4 80239274 00000000 */ nop
/* 700FF8 80239278 46800020 */ cvt.s.w $f0, $f0
/* 700FFC 8023927C E620005C */ swc1 $f0, 0x5c($s1)
.L80239280:
/* 701000 80239280 C60C0048 */ lwc1 $f12, 0x48($s0)
/* 701004 80239284 3C014334 */ lui $at, 0x4334
/* 701008 80239288 44811000 */ mtc1 $at, $f2
/* 70100C 8023928C 00000000 */ nop
/* 701010 80239290 460C103E */ c.le.s $f2, $f12
/* 701014 80239294 00000000 */ nop
/* 701018 80239298 45000017 */ bc1f .L802392F8
/* 70101C 8023929C 00000000 */ nop
/* 701020 802392A0 3C014387 */ lui $at, 0x4387
/* 701024 802392A4 44810000 */ mtc1 $at, $f0
/* 701028 802392A8 00000000 */ nop
/* 70102C 802392AC 4600603C */ c.lt.s $f12, $f0
/* 701030 802392B0 00000000 */ nop
/* 701034 802392B4 45000010 */ bc1f .L802392F8
/* 701038 802392B8 00000000 */ nop
/* 70103C 802392BC 0C00A6C9 */ jal clamp_angle
/* 701040 802392C0 46026300 */ add.s $f12, $f12, $f2
/* 701044 802392C4 3C0142B4 */ lui $at, 0x42b4
/* 701048 802392C8 44811000 */ mtc1 $at, $f2
/* 70104C 802392CC 00000000 */ nop
/* 701050 802392D0 46020001 */ sub.s $f0, $f0, $f2
/* 701054 802392D4 46001081 */ sub.s $f2, $f2, $f0
/* 701058 802392D8 24040004 */ addiu $a0, $zero, 4
/* 70105C 802392DC 0C00A67F */ jal rand_int
/* 701060 802392E0 E6020048 */ swc1 $f2, 0x48($s0)
/* 701064 802392E4 2442FFFE */ addiu $v0, $v0, -2
/* 701068 802392E8 44820000 */ mtc1 $v0, $f0
/* 70106C 802392EC 00000000 */ nop
/* 701070 802392F0 46800020 */ cvt.s.w $f0, $f0
/* 701074 802392F4 E6000050 */ swc1 $f0, 0x50($s0)
.L802392F8:
/* 701078 802392F8 8E42007C */ lw $v0, 0x7c($s2)
/* 70107C 802392FC 10400004 */ beqz $v0, .L80239310
/* 701080 80239300 2404200A */ addiu $a0, $zero, 0x200a
/* 701084 80239304 C6000008 */ lwc1 $f0, 8($s0)
/* 701088 80239308 0808E4C7 */ j .L8023931C
/* 70108C 8023930C E7A00010 */ swc1 $f0, 0x10($sp)
.L80239310:
/* 701090 80239310 C6000008 */ lwc1 $f0, 8($s0)
/* 701094 80239314 2404200B */ addiu $a0, $zero, 0x200b
/* 701098 80239318 E7A00010 */ swc1 $f0, 0x10($sp)
.L8023931C:
/* 70109C 8023931C 8E060000 */ lw $a2, ($s0)
/* 7010A0 80239320 8E070004 */ lw $a3, 4($s0)
/* 7010A4 80239324 0C052757 */ jal sfx_play_sound_at_position
/* 7010A8 80239328 0000282D */ daddu $a1, $zero, $zero
/* 7010AC 8023932C 8E43007C */ lw $v1, 0x7c($s2)
/* 7010B0 80239330 24020001 */ addiu $v0, $zero, 1
/* 7010B4 80239334 00431023 */ subu $v0, $v0, $v1
/* 7010B8 80239338 AE42007C */ sw $v0, 0x7c($s2)
.L8023933C:
/* 7010BC 8023933C C6020000 */ lwc1 $f2, ($s0)
/* 7010C0 80239340 3C01433E */ lui $at, 0x433e
/* 7010C4 80239344 44810000 */ mtc1 $at, $f0
/* 7010C8 80239348 00000000 */ nop
/* 7010CC 8023934C 4602003C */ c.lt.s $f0, $f2
/* 7010D0 80239350 00000000 */ nop
/* 7010D4 80239354 45000046 */ bc1f .L80239470
/* 7010D8 80239358 00000000 */ nop
/* 7010DC 8023935C 8E420074 */ lw $v0, 0x74($s2)
/* 7010E0 80239360 1040000E */ beqz $v0, .L8023939C
/* 7010E4 80239364 24020002 */ addiu $v0, $zero, 2
/* 7010E8 80239368 0808E5C6 */ j .L80239718
/* 7010EC 8023936C AE420070 */ sw $v0, 0x70($s2)
.L80239370:
/* 7010F0 80239370 3C014334 */ lui $at, 0x4334
/* 7010F4 80239374 44816000 */ mtc1 $at, $f12
/* 7010F8 80239378 0C00A6C9 */ jal clamp_angle
/* 7010FC 8023937C 460C1300 */ add.s $f12, $f2, $f12
/* 701100 80239380 3C014387 */ lui $at, 0x4387
/* 701104 80239384 44811000 */ mtc1 $at, $f2
/* 701108 80239388 00000000 */ nop
/* 70110C 8023938C 46001001 */ sub.s $f0, $f2, $f0
/* 701110 80239390 46020000 */ add.s $f0, $f0, $f2
/* 701114 80239394 0808E50B */ j .L8023942C
/* 701118 80239398 E6000048 */ swc1 $f0, 0x48($s0)
.L8023939C:
/* 70111C 8023939C C6020048 */ lwc1 $f2, 0x48($s0)
/* 701120 802393A0 44800000 */ mtc1 $zero, $f0
/* 701124 802393A4 00000000 */ nop
/* 701128 802393A8 4602003E */ c.le.s $f0, $f2
/* 70112C 802393AC 00000000 */ nop
/* 701130 802393B0 45000008 */ bc1f .L802393D4
/* 701134 802393B4 00000000 */ nop
/* 701138 802393B8 3C0142B4 */ lui $at, 0x42b4
/* 70113C 802393BC 44810000 */ mtc1 $at, $f0
/* 701140 802393C0 00000000 */ nop
/* 701144 802393C4 4600103C */ c.lt.s $f2, $f0
/* 701148 802393C8 00000000 */ nop
/* 70114C 802393CC 4501FFE8 */ bc1t .L80239370
/* 701150 802393D0 00000000 */ nop
.L802393D4:
/* 701154 802393D4 3C0142B4 */ lui $at, 0x42b4
/* 701158 802393D8 44810000 */ mtc1 $at, $f0
/* 70115C 802393DC 00000000 */ nop
/* 701160 802393E0 4602003E */ c.le.s $f0, $f2
/* 701164 802393E4 00000000 */ nop
/* 701168 802393E8 45000010 */ bc1f .L8023942C
/* 70116C 802393EC 00000000 */ nop
/* 701170 802393F0 3C014334 */ lui $at, 0x4334
/* 701174 802393F4 44810000 */ mtc1 $at, $f0
/* 701178 802393F8 00000000 */ nop
/* 70117C 802393FC 4600103C */ c.lt.s $f2, $f0
/* 701180 80239400 00000000 */ nop
/* 701184 80239404 45000009 */ bc1f .L8023942C
/* 701188 80239408 00000000 */ nop
/* 70118C 8023940C 0C00A6C9 */ jal clamp_angle
/* 701190 80239410 46001300 */ add.s $f12, $f2, $f0
/* 701194 80239414 3C014387 */ lui $at, 0x4387
/* 701198 80239418 44811000 */ mtc1 $at, $f2
/* 70119C 8023941C 00000000 */ nop
/* 7011A0 80239420 46020001 */ sub.s $f0, $f0, $f2
/* 7011A4 80239424 46001081 */ sub.s $f2, $f2, $f0
/* 7011A8 80239428 E6020048 */ swc1 $f2, 0x48($s0)
.L8023942C:
/* 7011AC 8023942C 8E42007C */ lw $v0, 0x7c($s2)
/* 7011B0 80239430 10400004 */ beqz $v0, .L80239444
/* 7011B4 80239434 2404200A */ addiu $a0, $zero, 0x200a
/* 7011B8 80239438 C6000008 */ lwc1 $f0, 8($s0)
/* 7011BC 8023943C 0808E514 */ j .L80239450
/* 7011C0 80239440 E7A00010 */ swc1 $f0, 0x10($sp)
.L80239444:
/* 7011C4 80239444 C6000008 */ lwc1 $f0, 8($s0)
/* 7011C8 80239448 2404200B */ addiu $a0, $zero, 0x200b
/* 7011CC 8023944C E7A00010 */ swc1 $f0, 0x10($sp)
.L80239450:
/* 7011D0 80239450 8E060000 */ lw $a2, ($s0)
/* 7011D4 80239454 8E070004 */ lw $a3, 4($s0)
/* 7011D8 80239458 0C052757 */ jal sfx_play_sound_at_position
/* 7011DC 8023945C 0000282D */ daddu $a1, $zero, $zero
/* 7011E0 80239460 8E43007C */ lw $v1, 0x7c($s2)
/* 7011E4 80239464 24020001 */ addiu $v0, $zero, 1
/* 7011E8 80239468 00431023 */ subu $v0, $v0, $v1
/* 7011EC 8023946C AE42007C */ sw $v0, 0x7c($s2)
.L80239470:
/* 7011F0 80239470 C6020004 */ lwc1 $f2, 4($s0)
/* 7011F4 80239474 3C01C1F0 */ lui $at, 0xc1f0
/* 7011F8 80239478 44810000 */ mtc1 $at, $f0
/* 7011FC 8023947C 00000000 */ nop
/* 701200 80239480 4600103C */ c.lt.s $f2, $f0
/* 701204 80239484 00000000 */ nop
/* 701208 80239488 45000043 */ bc1f .L80239598
/* 70120C 8023948C 00000000 */ nop
/* 701210 80239490 8E420074 */ lw $v0, 0x74($s2)
/* 701214 80239494 1040000B */ beqz $v0, .L802394C4
/* 701218 80239498 24020002 */ addiu $v0, $zero, 2
/* 70121C 8023949C 0808E5C6 */ j .L80239718
/* 701220 802394A0 AE420070 */ sw $v0, 0x70($s2)
.L802394A4:
/* 701224 802394A4 3C014334 */ lui $at, 0x4334
/* 701228 802394A8 4481A000 */ mtc1 $at, $f20
/* 70122C 802394AC 0C00A6C9 */ jal clamp_angle
/* 701230 802394B0 46146300 */ add.s $f12, $f12, $f20
/* 701234 802394B4 4600A001 */ sub.s $f0, $f20, $f0
/* 701238 802394B8 46140000 */ add.s $f0, $f0, $f20
/* 70123C 802394BC 0808E554 */ j .L80239550
/* 701240 802394C0 E6000048 */ swc1 $f0, 0x48($s0)
.L802394C4:
/* 701244 802394C4 C60C0048 */ lwc1 $f12, 0x48($s0)
/* 701248 802394C8 3C014387 */ lui $at, 0x4387
/* 70124C 802394CC 44810000 */ mtc1 $at, $f0
/* 701250 802394D0 00000000 */ nop
/* 701254 802394D4 460C003E */ c.le.s $f0, $f12
/* 701258 802394D8 00000000 */ nop
/* 70125C 802394DC 45000008 */ bc1f .L80239500
/* 701260 802394E0 00000000 */ nop
/* 701264 802394E4 3C0143B4 */ lui $at, 0x43b4
/* 701268 802394E8 44810000 */ mtc1 $at, $f0
/* 70126C 802394EC 00000000 */ nop
/* 701270 802394F0 4600603C */ c.lt.s $f12, $f0
/* 701274 802394F4 00000000 */ nop
/* 701278 802394F8 4501FFEA */ bc1t .L802394A4
/* 70127C 802394FC 00000000 */ nop
.L80239500:
/* 701280 80239500 44800000 */ mtc1 $zero, $f0
/* 701284 80239504 00000000 */ nop
/* 701288 80239508 460C003E */ c.le.s $f0, $f12
/* 70128C 8023950C 00000000 */ nop
/* 701290 80239510 4500000F */ bc1f .L80239550
/* 701294 80239514 00000000 */ nop
/* 701298 80239518 3C0142B4 */ lui $at, 0x42b4
/* 70129C 8023951C 44810000 */ mtc1 $at, $f0
/* 7012A0 80239520 00000000 */ nop
/* 7012A4 80239524 4600603C */ c.lt.s $f12, $f0
/* 7012A8 80239528 00000000 */ nop
/* 7012AC 8023952C 45000008 */ bc1f .L80239550
/* 7012B0 80239530 00000000 */ nop
/* 7012B4 80239534 3C014334 */ lui $at, 0x4334
/* 7012B8 80239538 4481A000 */ mtc1 $at, $f20
/* 7012BC 8023953C 0C00A6C9 */ jal clamp_angle
/* 7012C0 80239540 46146300 */ add.s $f12, $f12, $f20
/* 7012C4 80239544 46140001 */ sub.s $f0, $f0, $f20
/* 7012C8 80239548 4600A501 */ sub.s $f20, $f20, $f0
/* 7012CC 8023954C E6140048 */ swc1 $f20, 0x48($s0)
.L80239550:
/* 7012D0 80239550 8E42007C */ lw $v0, 0x7c($s2)
/* 7012D4 80239554 10400004 */ beqz $v0, .L80239568
/* 7012D8 80239558 2404200A */ addiu $a0, $zero, 0x200a
/* 7012DC 8023955C C6000008 */ lwc1 $f0, 8($s0)
/* 7012E0 80239560 0808E55D */ j .L80239574
/* 7012E4 80239564 E7A00010 */ swc1 $f0, 0x10($sp)
.L80239568:
/* 7012E8 80239568 C6000008 */ lwc1 $f0, 8($s0)
/* 7012EC 8023956C 2404200B */ addiu $a0, $zero, 0x200b
/* 7012F0 80239570 E7A00010 */ swc1 $f0, 0x10($sp)
.L80239574:
/* 7012F4 80239574 8E060000 */ lw $a2, ($s0)
/* 7012F8 80239578 8E070004 */ lw $a3, 4($s0)
/* 7012FC 8023957C 0C052757 */ jal sfx_play_sound_at_position
/* 701300 80239580 0000282D */ daddu $a1, $zero, $zero
/* 701304 80239584 8E43007C */ lw $v1, 0x7c($s2)
/* 701308 80239588 24020001 */ addiu $v0, $zero, 1
/* 70130C 8023958C 00431023 */ subu $v0, $v0, $v1
/* 701310 80239590 AE42007C */ sw $v0, 0x7c($s2)
/* 701314 80239594 C6020004 */ lwc1 $f2, 4($s0)
.L80239598:
/* 701318 80239598 3C014320 */ lui $at, 0x4320
/* 70131C 8023959C 44810000 */ mtc1 $at, $f0
/* 701320 802395A0 00000000 */ nop
/* 701324 802395A4 4602003C */ c.lt.s $f0, $f2
/* 701328 802395A8 00000000 */ nop
/* 70132C 802395AC 45000045 */ bc1f .L802396C4
/* 701330 802395B0 00000000 */ nop
/* 701334 802395B4 8E420074 */ lw $v0, 0x74($s2)
/* 701338 802395B8 1040000C */ beqz $v0, .L802395EC
/* 70133C 802395BC 24020002 */ addiu $v0, $zero, 2
.L802395C0:
/* 701340 802395C0 0808E5C6 */ j .L80239718
/* 701344 802395C4 AE420070 */ sw $v0, 0x70($s2)
.L802395C8:
/* 701348 802395C8 0C00A6C9 */ jal clamp_angle
/* 70134C 802395CC 46006300 */ add.s $f12, $f12, $f0
/* 701350 802395D0 3C0143B4 */ lui $at, 0x43b4
/* 701354 802395D4 44811000 */ mtc1 $at, $f2
/* 701358 802395D8 00000000 */ nop
/* 70135C 802395DC 46001001 */ sub.s $f0, $f2, $f0
/* 701360 802395E0 46020000 */ add.s $f0, $f0, $f2
/* 701364 802395E4 0808E5A0 */ j .L80239680
/* 701368 802395E8 E6000048 */ swc1 $f0, 0x48($s0)
.L802395EC:
/* 70136C 802395EC C60C0048 */ lwc1 $f12, 0x48($s0)
/* 701370 802395F0 3C0142B4 */ lui $at, 0x42b4
/* 701374 802395F4 44810000 */ mtc1 $at, $f0
/* 701378 802395F8 00000000 */ nop
/* 70137C 802395FC 460C003E */ c.le.s $f0, $f12
/* 701380 80239600 00000000 */ nop
/* 701384 80239604 45000008 */ bc1f .L80239628
/* 701388 80239608 00000000 */ nop
/* 70138C 8023960C 3C014334 */ lui $at, 0x4334
/* 701390 80239610 44810000 */ mtc1 $at, $f0
/* 701394 80239614 00000000 */ nop
/* 701398 80239618 4600603C */ c.lt.s $f12, $f0
/* 70139C 8023961C 00000000 */ nop
/* 7013A0 80239620 4501FFE9 */ bc1t .L802395C8
/* 7013A4 80239624 00000000 */ nop
.L80239628:
/* 7013A8 80239628 3C014334 */ lui $at, 0x4334
/* 7013AC 8023962C 44811000 */ mtc1 $at, $f2
/* 7013B0 80239630 00000000 */ nop
/* 7013B4 80239634 460C103E */ c.le.s $f2, $f12
/* 7013B8 80239638 00000000 */ nop
/* 7013BC 8023963C 45000010 */ bc1f .L80239680
/* 7013C0 80239640 00000000 */ nop
/* 7013C4 80239644 3C014387 */ lui $at, 0x4387
/* 7013C8 80239648 44810000 */ mtc1 $at, $f0
/* 7013CC 8023964C 00000000 */ nop
/* 7013D0 80239650 4600603C */ c.lt.s $f12, $f0
/* 7013D4 80239654 00000000 */ nop
/* 7013D8 80239658 45000009 */ bc1f .L80239680
/* 7013DC 8023965C 00000000 */ nop
/* 7013E0 80239660 0C00A6C9 */ jal clamp_angle
/* 7013E4 80239664 46026300 */ add.s $f12, $f12, $f2
/* 7013E8 80239668 3C0143B4 */ lui $at, 0x43b4
/* 7013EC 8023966C 44811000 */ mtc1 $at, $f2
/* 7013F0 80239670 00000000 */ nop
/* 7013F4 80239674 46020001 */ sub.s $f0, $f0, $f2
/* 7013F8 80239678 46001081 */ sub.s $f2, $f2, $f0
/* 7013FC 8023967C E6020048 */ swc1 $f2, 0x48($s0)
.L80239680:
/* 701400 80239680 8E42007C */ lw $v0, 0x7c($s2)
/* 701404 80239684 10400004 */ beqz $v0, .L80239698
/* 701408 80239688 2404200A */ addiu $a0, $zero, 0x200a
/* 70140C 8023968C C6000008 */ lwc1 $f0, 8($s0)
/* 701410 80239690 0808E5A9 */ j .L802396A4
/* 701414 80239694 E7A00010 */ swc1 $f0, 0x10($sp)
.L80239698:
/* 701418 80239698 C6000008 */ lwc1 $f0, 8($s0)
/* 70141C 8023969C 2404200B */ addiu $a0, $zero, 0x200b
/* 701420 802396A0 E7A00010 */ swc1 $f0, 0x10($sp)
.L802396A4:
/* 701424 802396A4 8E060000 */ lw $a2, ($s0)
/* 701428 802396A8 8E070004 */ lw $a3, 4($s0)
/* 70142C 802396AC 0C052757 */ jal sfx_play_sound_at_position
/* 701430 802396B0 0000282D */ daddu $a1, $zero, $zero
/* 701434 802396B4 8E43007C */ lw $v1, 0x7c($s2)
/* 701438 802396B8 24020001 */ addiu $v0, $zero, 1
/* 70143C 802396BC 00431023 */ subu $v0, $v0, $v1
/* 701440 802396C0 AE42007C */ sw $v0, 0x7c($s2)
.L802396C4:
/* 701444 802396C4 C6000050 */ lwc1 $f0, 0x50($s0)
/* 701448 802396C8 3C013FE0 */ lui $at, 0x3fe0
/* 70144C 802396CC 44811800 */ mtc1 $at, $f3
/* 701450 802396D0 44801000 */ mtc1 $zero, $f2
/* 701454 802396D4 46000021 */ cvt.d.s $f0, $f0
/* 701458 802396D8 46220002 */ mul.d $f0, $f0, $f2
/* 70145C 802396DC 00000000 */ nop
/* 701460 802396E0 C60C0048 */ lwc1 $f12, 0x48($s0)
/* 701464 802396E4 46006321 */ cvt.d.s $f12, $f12
/* 701468 802396E8 46206300 */ add.d $f12, $f12, $f0
/* 70146C 802396EC 0C00A6C9 */ jal clamp_angle
/* 701470 802396F0 46206320 */ cvt.s.d $f12, $f12
/* 701474 802396F4 86020064 */ lh $v0, 0x64($s0)
/* 701478 802396F8 96030064 */ lhu $v1, 0x64($s0)
/* 70147C 802396FC 10400004 */ beqz $v0, .L80239710
/* 701480 80239700 E6000048 */ swc1 $f0, 0x48($s0)
/* 701484 80239704 2462FFFF */ addiu $v0, $v1, -1
/* 701488 80239708 0808E5C6 */ j .L80239718
/* 70148C 8023970C A6020064 */ sh $v0, 0x64($s0)
.L80239710:
/* 701490 80239710 24020001 */ addiu $v0, $zero, 1
/* 701494 80239714 AE420074 */ sw $v0, 0x74($s2)
.L80239718:
/* 701498 80239718 8E430070 */ lw $v1, 0x70($s2)
/* 70149C 8023971C 24020002 */ addiu $v0, $zero, 2
.L80239720:
/* 7014A0 80239720 10620005 */ beq $v1, $v0, .L80239738
/* 7014A4 80239724 24020003 */ addiu $v0, $zero, 3
/* 7014A8 80239728 1062000D */ beq $v1, $v0, .L80239760
/* 7014AC 8023972C 0200202D */ daddu $a0, $s0, $zero
/* 7014B0 80239730 0808E5E4 */ j .L80239790
/* 7014B4 80239734 00000000 */ nop
.L80239738:
/* 7014B8 80239738 3C038024 */ lui $v1, %hi(D_8023BD70)
/* 7014BC 8023973C 8C63BD70 */ lw $v1, %lo(D_8023BD70)($v1)
/* 7014C0 80239740 24020005 */ addiu $v0, $zero, 5
/* 7014C4 80239744 A6020064 */ sh $v0, 0x64($s0)
/* 7014C8 80239748 24020003 */ addiu $v0, $zero, 3
/* 7014CC 8023974C AE420070 */ sw $v0, 0x70($s2)
/* 7014D0 80239750 8C620000 */ lw $v0, ($v1)
/* 7014D4 80239754 34420010 */ ori $v0, $v0, 0x10
/* 7014D8 80239758 AC620000 */ sw $v0, ($v1)
/* 7014DC 8023975C 0200202D */ daddu $a0, $s0, $zero
.L80239760:
/* 7014E0 80239760 8E060040 */ lw $a2, 0x40($s0)
/* 7014E4 80239764 8E070048 */ lw $a3, 0x48($s0)
/* 7014E8 80239768 0C00A7E7 */ jal add_vec2D_polar
/* 7014EC 8023976C 26050004 */ addiu $a1, $s0, 4
/* 7014F0 80239770 86020064 */ lh $v0, 0x64($s0)
/* 7014F4 80239774 96030064 */ lhu $v1, 0x64($s0)
/* 7014F8 80239778 14400004 */ bnez $v0, .L8023978C
/* 7014FC 8023977C 2462FFFF */ addiu $v0, $v1, -1
/* 701500 80239780 AE200164 */ sw $zero, 0x164($s1)
/* 701504 80239784 0808E5EB */ j .L802397AC
/* 701508 80239788 24020002 */ addiu $v0, $zero, 2
.L8023978C:
/* 70150C 8023978C A6020064 */ sh $v0, 0x64($s0)
.L80239790:
/* 701510 80239790 C6000000 */ lwc1 $f0, ($s0)
/* 701514 80239794 E6200144 */ swc1 $f0, 0x144($s1)
/* 701518 80239798 C6000004 */ lwc1 $f0, 4($s0)
/* 70151C 8023979C E6200148 */ swc1 $f0, 0x148($s1)
/* 701520 802397A0 C6000008 */ lwc1 $f0, 8($s0)
/* 701524 802397A4 0000102D */ daddu $v0, $zero, $zero
/* 701528 802397A8 E620014C */ swc1 $f0, 0x14c($s1)
.L802397AC:
/* 70152C 802397AC 8FBF0024 */ lw $ra, 0x24($sp)
/* 701530 802397B0 8FB20020 */ lw $s2, 0x20($sp)
/* 701534 802397B4 8FB1001C */ lw $s1, 0x1c($sp)
/* 701538 802397B8 8FB00018 */ lw $s0, 0x18($sp)
/* 70153C 802397BC D7B40028 */ ldc1 $f20, 0x28($sp)
/* 701540 802397C0 03E00008 */ jr $ra
/* 701544 802397C4 27BD0030 */ addiu $sp, $sp, 0x30

View File

@ -1,65 +0,0 @@
.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel func_80238114_707DB4
/* 707DB4 80238114 3C02800E */ lui $v0, %hi(gBattleStatus+0xDC)
/* 707DB8 80238118 8C42C14C */ lw $v0, %lo(gBattleStatus+0xDC)($v0)
/* 707DBC 8023811C 8C860084 */ lw $a2, 0x84($a0)
/* 707DC0 80238120 AC800084 */ sw $zero, 0x84($a0)
/* 707DC4 80238124 8C420008 */ lw $v0, 8($v0)
/* 707DC8 80238128 90430006 */ lbu $v1, 6($v0)
/* 707DCC 8023812C 24070001 */ addiu $a3, $zero, 1
/* 707DD0 80238130 10670013 */ beq $v1, $a3, .L80238180
/* 707DD4 80238134 0000282D */ daddu $a1, $zero, $zero
/* 707DD8 80238138 28620002 */ slti $v0, $v1, 2
/* 707DDC 8023813C 10400005 */ beqz $v0, .L80238154
/* 707DE0 80238140 24020002 */ addiu $v0, $zero, 2
/* 707DE4 80238144 10600007 */ beqz $v1, .L80238164
/* 707DE8 80238148 28C20029 */ slti $v0, $a2, 0x29
/* 707DEC 8023814C 0808E079 */ j .L802381E4
/* 707DF0 80238150 AC8500C0 */ sw $a1, 0xc0($a0)
.L80238154:
/* 707DF4 80238154 10620015 */ beq $v1, $v0, .L802381AC
/* 707DF8 80238158 28C20015 */ slti $v0, $a2, 0x15
/* 707DFC 8023815C 03E00008 */ jr $ra
/* 707E00 80238160 AC8500C0 */ sw $a1, 0xc0($a0)
.L80238164:
/* 707E04 80238164 1440001E */ bnez $v0, .L802381E0
/* 707E08 80238168 24050003 */ addiu $a1, $zero, 3
/* 707E0C 8023816C 28C2004C */ slti $v0, $a2, 0x4c
/* 707E10 80238170 1440001B */ bnez $v0, .L802381E0
/* 707E14 80238174 24050004 */ addiu $a1, $zero, 4
/* 707E18 80238178 0808E077 */ j .L802381DC
/* 707E1C 8023817C 24050005 */ addiu $a1, $zero, 5
.L80238180:
/* 707E20 80238180 28C20024 */ slti $v0, $a2, 0x24
/* 707E24 80238184 14400016 */ bnez $v0, .L802381E0
/* 707E28 80238188 24050003 */ addiu $a1, $zero, 3
/* 707E2C 8023818C 28C2003D */ slti $v0, $a2, 0x3d
/* 707E30 80238190 14400013 */ bnez $v0, .L802381E0
/* 707E34 80238194 24050004 */ addiu $a1, $zero, 4
/* 707E38 80238198 28C20051 */ slti $v0, $a2, 0x51
/* 707E3C 8023819C 14400010 */ bnez $v0, .L802381E0
/* 707E40 802381A0 24050005 */ addiu $a1, $zero, 5
/* 707E44 802381A4 0808E077 */ j .L802381DC
/* 707E48 802381A8 24050006 */ addiu $a1, $zero, 6
.L802381AC:
/* 707E4C 802381AC 1440000C */ bnez $v0, .L802381E0
/* 707E50 802381B0 24050003 */ addiu $a1, $zero, 3
/* 707E54 802381B4 28C2001F */ slti $v0, $a2, 0x1f
/* 707E58 802381B8 14400009 */ bnez $v0, .L802381E0
/* 707E5C 802381BC 24050004 */ addiu $a1, $zero, 4
/* 707E60 802381C0 28C2003D */ slti $v0, $a2, 0x3d
/* 707E64 802381C4 14400006 */ bnez $v0, .L802381E0
/* 707E68 802381C8 24050005 */ addiu $a1, $zero, 5
/* 707E6C 802381CC 28C20051 */ slti $v0, $a2, 0x51
/* 707E70 802381D0 14400003 */ bnez $v0, .L802381E0
/* 707E74 802381D4 24050006 */ addiu $a1, $zero, 6
/* 707E78 802381D8 24050007 */ addiu $a1, $zero, 7
.L802381DC:
/* 707E7C 802381DC AC870084 */ sw $a3, 0x84($a0)
.L802381E0:
/* 707E80 802381E0 AC8500C0 */ sw $a1, 0xc0($a0)
.L802381E4:
/* 707E84 802381E4 03E00008 */ jr $ra
/* 707E88 802381E8 24020002 */ addiu $v0, $zero, 2

View File

@ -1,623 +0,0 @@
.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
.section .rodata
dlabel D_8023C068_70BD08
.double 0.06
.section .text
glabel func_80238540_7081E0
/* 7081E0 80238540 27BDFFC8 */ addiu $sp, $sp, -0x38
/* 7081E4 80238544 AFB10024 */ sw $s1, 0x24($sp)
/* 7081E8 80238548 3C11800E */ lui $s1, %hi(gBattleStatus+0xDC)
/* 7081EC 8023854C 8E31C14C */ lw $s1, %lo(gBattleStatus+0xDC)($s1)
/* 7081F0 80238550 AFB20028 */ sw $s2, 0x28($sp)
/* 7081F4 80238554 0080902D */ daddu $s2, $a0, $zero
/* 7081F8 80238558 AFBF002C */ sw $ra, 0x2c($sp)
/* 7081FC 8023855C AFB00020 */ sw $s0, 0x20($sp)
/* 708200 80238560 F7B40030 */ sdc1 $f20, 0x30($sp)
/* 708204 80238564 10A00002 */ beqz $a1, .L80238570
/* 708208 80238568 2630000C */ addiu $s0, $s1, 0xc
/* 70820C 8023856C AE400070 */ sw $zero, 0x70($s2)
.L80238570:
/* 708210 80238570 8E430070 */ lw $v1, 0x70($s2)
/* 708214 80238574 10600005 */ beqz $v1, .L8023858C
/* 708218 80238578 24020001 */ addiu $v0, $zero, 1
/* 70821C 8023857C 1062002C */ beq $v1, $v0, .L80238630
/* 708220 80238580 24020002 */ addiu $v0, $zero, 2
/* 708224 80238584 0808E346 */ j .L80238D18
/* 708228 80238588 00000000 */ nop
.L8023858C:
/* 70822C 8023858C C6200144 */ lwc1 $f0, 0x144($s1)
/* 708230 80238590 C6220148 */ lwc1 $f2, 0x148($s1)
/* 708234 80238594 C624014C */ lwc1 $f4, 0x14c($s1)
/* 708238 80238598 3C01439D */ lui $at, 0x439d
/* 70823C 8023859C 34218000 */ ori $at, $at, 0x8000
/* 708240 802385A0 44813000 */ mtc1 $at, $f6
/* 708244 802385A4 3C014200 */ lui $at, 0x4200
/* 708248 802385A8 44814000 */ mtc1 $at, $f8
/* 70824C 802385AC 3C013F80 */ lui $at, 0x3f80
/* 708250 802385B0 44815000 */ mtc1 $at, $f10
/* 708254 802385B4 2402005A */ addiu $v0, $zero, 0x5a
/* 708258 802385B8 AE20005C */ sw $zero, 0x5c($s1)
/* 70825C 802385BC A6220070 */ sh $v0, 0x70($s1)
/* 708260 802385C0 E620000C */ swc1 $f0, 0xc($s1)
/* 708264 802385C4 E6220010 */ swc1 $f2, 0x10($s1)
/* 708268 802385C8 E6240014 */ swc1 $f4, 0x14($s1)
/* 70826C 802385CC E6260054 */ swc1 $f6, 0x54($s1)
/* 708270 802385D0 E628004C */ swc1 $f8, 0x4c($s1)
/* 708274 802385D4 AE400074 */ sw $zero, 0x74($s2)
/* 708278 802385D8 AE400078 */ sw $zero, 0x78($s2)
/* 70827C 802385DC E7AA0010 */ swc1 $f10, 0x10($sp)
/* 708280 802385E0 AFA00014 */ sw $zero, 0x14($sp)
/* 708284 802385E4 8E25000C */ lw $a1, 0xc($s1)
/* 708288 802385E8 8E260010 */ lw $a2, 0x10($s1)
/* 70828C 802385EC 8E270014 */ lw $a3, 0x14($s1)
/* 708290 802385F0 0C01C6C4 */ jal fx_water_fountain
/* 708294 802385F4 24040001 */ addiu $a0, $zero, 1
/* 708298 802385F8 8C43000C */ lw $v1, 0xc($v0)
/* 70829C 802385FC C6200054 */ lwc1 $f0, 0x54($s1)
/* 7082A0 80238600 E4600038 */ swc1 $f0, 0x38($v1)
/* 7082A4 80238604 8C43000C */ lw $v1, 0xc($v0)
/* 7082A8 80238608 C6200170 */ lwc1 $f0, 0x170($s1)
/* 7082AC 8023860C 3C018024 */ lui $at, %hi(D_8023C070)
/* 7082B0 80238610 AC22C070 */ sw $v0, %lo(D_8023C070)($at)
/* 7082B4 80238614 E460003C */ swc1 $f0, 0x3c($v1)
/* 7082B8 80238618 8C43000C */ lw $v1, 0xc($v0)
/* 7082BC 8023861C C6200170 */ lwc1 $f0, 0x170($s1)
/* 7082C0 80238620 24020001 */ addiu $v0, $zero, 1
/* 7082C4 80238624 E4600040 */ swc1 $f0, 0x40($v1)
/* 7082C8 80238628 0808E344 */ j .L80238D10
/* 7082CC 8023862C AE420070 */ sw $v0, 0x70($s2)
.L80238630:
/* 7082D0 80238630 0200202D */ daddu $a0, $s0, $zero
/* 7082D4 80238634 8E26004C */ lw $a2, 0x4c($s1)
/* 7082D8 80238638 8E270054 */ lw $a3, 0x54($s1)
/* 7082DC 8023863C 0C00A7E7 */ jal add_vec2D_polar
/* 7082E0 80238640 26250010 */ addiu $a1, $s1, 0x10
/* 7082E4 80238644 C622000C */ lwc1 $f2, 0xc($s1)
/* 7082E8 80238648 3C01C320 */ lui $at, 0xc320
/* 7082EC 8023864C 44810000 */ mtc1 $at, $f0
/* 7082F0 80238650 00000000 */ nop
/* 7082F4 80238654 4600103C */ c.lt.s $f2, $f0
/* 7082F8 80238658 00000000 */ nop
/* 7082FC 8023865C 45000042 */ bc1f .L80238768
/* 708300 80238660 00000000 */ nop
/* 708304 80238664 8E420074 */ lw $v0, 0x74($s2)
/* 708308 80238668 544000EF */ bnel $v0, $zero, .L80238A28
/* 70830C 8023866C 24020002 */ addiu $v0, $zero, 2
/* 708310 80238670 C6220054 */ lwc1 $f2, 0x54($s1)
/* 708314 80238674 3C014387 */ lui $at, 0x4387
/* 708318 80238678 44810000 */ mtc1 $at, $f0
/* 70831C 8023867C 00000000 */ nop
/* 708320 80238680 4602003E */ c.le.s $f0, $f2
/* 708324 80238684 00000000 */ nop
/* 708328 80238688 45000019 */ bc1f .L802386F0
/* 70832C 8023868C 00000000 */ nop
/* 708330 80238690 3C0143B4 */ lui $at, 0x43b4
/* 708334 80238694 44810000 */ mtc1 $at, $f0
/* 708338 80238698 00000000 */ nop
/* 70833C 8023869C 4600103C */ c.lt.s $f2, $f0
/* 708340 802386A0 00000000 */ nop
/* 708344 802386A4 45000012 */ bc1f .L802386F0
/* 708348 802386A8 00000000 */ nop
/* 70834C 802386AC 3C014334 */ lui $at, 0x4334
/* 708350 802386B0 44816000 */ mtc1 $at, $f12
/* 708354 802386B4 0C00A6C9 */ jal clamp_angle
/* 708358 802386B8 460C1300 */ add.s $f12, $f2, $f12
/* 70835C 802386BC 3C0142B4 */ lui $at, 0x42b4
/* 708360 802386C0 44811000 */ mtc1 $at, $f2
/* 708364 802386C4 00000000 */ nop
/* 708368 802386C8 46001001 */ sub.s $f0, $f2, $f0
/* 70836C 802386CC 46020000 */ add.s $f0, $f0, $f2
/* 708370 802386D0 24040004 */ addiu $a0, $zero, 4
/* 708374 802386D4 0C00A67F */ jal rand_int
/* 708378 802386D8 E6200054 */ swc1 $f0, 0x54($s1)
/* 70837C 802386DC 2442FFFE */ addiu $v0, $v0, -2
/* 708380 802386E0 44820000 */ mtc1 $v0, $f0
/* 708384 802386E4 00000000 */ nop
/* 708388 802386E8 46800020 */ cvt.s.w $f0, $f0
/* 70838C 802386EC E620005C */ swc1 $f0, 0x5c($s1)
.L802386F0:
/* 708390 802386F0 C60C0048 */ lwc1 $f12, 0x48($s0)
/* 708394 802386F4 3C014334 */ lui $at, 0x4334
/* 708398 802386F8 44811000 */ mtc1 $at, $f2
/* 70839C 802386FC 00000000 */ nop
/* 7083A0 80238700 460C103E */ c.le.s $f2, $f12
/* 7083A4 80238704 00000000 */ nop
/* 7083A8 80238708 45000017 */ bc1f .L80238768
/* 7083AC 8023870C 00000000 */ nop
/* 7083B0 80238710 3C014387 */ lui $at, 0x4387
/* 7083B4 80238714 44810000 */ mtc1 $at, $f0
/* 7083B8 80238718 00000000 */ nop
/* 7083BC 8023871C 4600603C */ c.lt.s $f12, $f0
/* 7083C0 80238720 00000000 */ nop
/* 7083C4 80238724 45000010 */ bc1f .L80238768
/* 7083C8 80238728 00000000 */ nop
/* 7083CC 8023872C 0C00A6C9 */ jal clamp_angle
/* 7083D0 80238730 46026300 */ add.s $f12, $f12, $f2
/* 7083D4 80238734 3C0142B4 */ lui $at, 0x42b4
/* 7083D8 80238738 44811000 */ mtc1 $at, $f2
/* 7083DC 8023873C 00000000 */ nop
/* 7083E0 80238740 46020001 */ sub.s $f0, $f0, $f2
/* 7083E4 80238744 46001081 */ sub.s $f2, $f2, $f0
/* 7083E8 80238748 24040004 */ addiu $a0, $zero, 4
/* 7083EC 8023874C 0C00A67F */ jal rand_int
/* 7083F0 80238750 E6020048 */ swc1 $f2, 0x48($s0)
/* 7083F4 80238754 2442FFFE */ addiu $v0, $v0, -2
/* 7083F8 80238758 44820000 */ mtc1 $v0, $f0
/* 7083FC 8023875C 00000000 */ nop
/* 708400 80238760 46800020 */ cvt.s.w $f0, $f0
/* 708404 80238764 E6000050 */ swc1 $f0, 0x50($s0)
.L80238768:
/* 708408 80238768 C6020000 */ lwc1 $f2, ($s0)
/* 70840C 8023876C 3C014320 */ lui $at, 0x4320
/* 708410 80238770 44810000 */ mtc1 $at, $f0
/* 708414 80238774 00000000 */ nop
/* 708418 80238778 4602003C */ c.lt.s $f0, $f2
/* 70841C 8023877C 00000000 */ nop
/* 708420 80238780 4500004F */ bc1f .L802388C0
/* 708424 80238784 00000000 */ nop
/* 708428 80238788 8E420074 */ lw $v0, 0x74($s2)
/* 70842C 8023878C 1040000F */ beqz $v0, .L802387CC
/* 708430 80238790 24020002 */ addiu $v0, $zero, 2
/* 708434 80238794 0808E344 */ j .L80238D10
/* 708438 80238798 AE420070 */ sw $v0, 0x70($s2)
.L8023879C:
/* 70843C 8023879C 3C014334 */ lui $at, 0x4334
/* 708440 802387A0 44816000 */ mtc1 $at, $f12
/* 708444 802387A4 0C00A6C9 */ jal clamp_angle
/* 708448 802387A8 460C1300 */ add.s $f12, $f2, $f12
/* 70844C 802387AC 3C014387 */ lui $at, 0x4387
/* 708450 802387B0 44811000 */ mtc1 $at, $f2
/* 708454 802387B4 00000000 */ nop
/* 708458 802387B8 46001001 */ sub.s $f0, $f2, $f0
/* 70845C 802387BC 46020000 */ add.s $f0, $f0, $f2
/* 708460 802387C0 24040004 */ addiu $a0, $zero, 4
/* 708464 802387C4 0808E218 */ j .L80238860
/* 708468 802387C8 E6000048 */ swc1 $f0, 0x48($s0)
.L802387CC:
/* 70846C 802387CC C6020048 */ lwc1 $f2, 0x48($s0)
/* 708470 802387D0 44800000 */ mtc1 $zero, $f0
/* 708474 802387D4 00000000 */ nop
/* 708478 802387D8 4602003E */ c.le.s $f0, $f2
/* 70847C 802387DC 00000000 */ nop
/* 708480 802387E0 45000008 */ bc1f .L80238804
/* 708484 802387E4 00000000 */ nop
/* 708488 802387E8 3C0142B4 */ lui $at, 0x42b4
/* 70848C 802387EC 44810000 */ mtc1 $at, $f0
/* 708490 802387F0 00000000 */ nop
/* 708494 802387F4 4600103C */ c.lt.s $f2, $f0
/* 708498 802387F8 00000000 */ nop
/* 70849C 802387FC 4501FFE7 */ bc1t .L8023879C
/* 7084A0 80238800 00000000 */ nop
.L80238804:
/* 7084A4 80238804 3C0142B4 */ lui $at, 0x42b4
/* 7084A8 80238808 44810000 */ mtc1 $at, $f0
/* 7084AC 8023880C 00000000 */ nop
/* 7084B0 80238810 4602003E */ c.le.s $f0, $f2
/* 7084B4 80238814 00000000 */ nop
/* 7084B8 80238818 45000018 */ bc1f .L8023887C
/* 7084BC 8023881C 00000000 */ nop
/* 7084C0 80238820 3C014334 */ lui $at, 0x4334
/* 7084C4 80238824 44810000 */ mtc1 $at, $f0
/* 7084C8 80238828 00000000 */ nop
/* 7084CC 8023882C 4600103C */ c.lt.s $f2, $f0
/* 7084D0 80238830 00000000 */ nop
/* 7084D4 80238834 45000011 */ bc1f .L8023887C
/* 7084D8 80238838 00000000 */ nop
/* 7084DC 8023883C 0C00A6C9 */ jal clamp_angle
/* 7084E0 80238840 46001300 */ add.s $f12, $f2, $f0
/* 7084E4 80238844 3C014387 */ lui $at, 0x4387
/* 7084E8 80238848 44811000 */ mtc1 $at, $f2
/* 7084EC 8023884C 00000000 */ nop
/* 7084F0 80238850 46020001 */ sub.s $f0, $f0, $f2
/* 7084F4 80238854 46001081 */ sub.s $f2, $f2, $f0
/* 7084F8 80238858 24040004 */ addiu $a0, $zero, 4
/* 7084FC 8023885C E6020048 */ swc1 $f2, 0x48($s0)
.L80238860:
/* 708500 80238860 0C00A67F */ jal rand_int
/* 708504 80238864 00000000 */ nop
/* 708508 80238868 2442FFFE */ addiu $v0, $v0, -2
/* 70850C 8023886C 44820000 */ mtc1 $v0, $f0
/* 708510 80238870 00000000 */ nop
/* 708514 80238874 46800020 */ cvt.s.w $f0, $f0
/* 708518 80238878 E6000050 */ swc1 $f0, 0x50($s0)
.L8023887C:
/* 70851C 8023887C 8E420078 */ lw $v0, 0x78($s2)
/* 708520 80238880 10400004 */ beqz $v0, .L80238894
/* 708524 80238884 2404029B */ addiu $a0, $zero, 0x29b
/* 708528 80238888 C6000008 */ lwc1 $f0, 8($s0)
/* 70852C 8023888C 0808E228 */ j .L802388A0
/* 708530 80238890 E7A00010 */ swc1 $f0, 0x10($sp)
.L80238894:
/* 708534 80238894 C6000008 */ lwc1 $f0, 8($s0)
/* 708538 80238898 2404029C */ addiu $a0, $zero, 0x29c
/* 70853C 8023889C E7A00010 */ swc1 $f0, 0x10($sp)
.L802388A0:
/* 708540 802388A0 8E060000 */ lw $a2, ($s0)
/* 708544 802388A4 8E070004 */ lw $a3, 4($s0)
/* 708548 802388A8 0C052757 */ jal sfx_play_sound_at_position
/* 70854C 802388AC 0000282D */ daddu $a1, $zero, $zero
/* 708550 802388B0 8E430078 */ lw $v1, 0x78($s2)
/* 708554 802388B4 24020001 */ addiu $v0, $zero, 1
/* 708558 802388B8 00431023 */ subu $v0, $v0, $v1
/* 70855C 802388BC AE420078 */ sw $v0, 0x78($s2)
.L802388C0:
/* 708560 802388C0 C6000004 */ lwc1 $f0, 4($s0)
/* 708564 802388C4 44801000 */ mtc1 $zero, $f2
/* 708568 802388C8 00000000 */ nop
/* 70856C 802388CC 4602003C */ c.lt.s $f0, $f2
/* 708570 802388D0 00000000 */ nop
/* 708574 802388D4 45000049 */ bc1f .L802389FC
/* 708578 802388D8 00000000 */ nop
/* 70857C 802388DC 8E420074 */ lw $v0, 0x74($s2)
/* 708580 802388E0 1040000C */ beqz $v0, .L80238914
/* 708584 802388E4 24020002 */ addiu $v0, $zero, 2
/* 708588 802388E8 0808E344 */ j .L80238D10
/* 70858C 802388EC AE420070 */ sw $v0, 0x70($s2)
.L802388F0:
/* 708590 802388F0 3C014334 */ lui $at, 0x4334
/* 708594 802388F4 4481A000 */ mtc1 $at, $f20
/* 708598 802388F8 0C00A6C9 */ jal clamp_angle
/* 70859C 802388FC 46146300 */ add.s $f12, $f12, $f20
/* 7085A0 80238900 4600A001 */ sub.s $f0, $f20, $f0
/* 7085A4 80238904 46140000 */ add.s $f0, $f0, $f20
/* 7085A8 80238908 24040004 */ addiu $a0, $zero, 4
/* 7085AC 8023890C 0808E267 */ j .L8023899C
/* 7085B0 80238910 E6000048 */ swc1 $f0, 0x48($s0)
.L80238914:
/* 7085B4 80238914 C60C0048 */ lwc1 $f12, 0x48($s0)
/* 7085B8 80238918 3C014387 */ lui $at, 0x4387
/* 7085BC 8023891C 44810000 */ mtc1 $at, $f0
/* 7085C0 80238920 00000000 */ nop
/* 7085C4 80238924 460C003E */ c.le.s $f0, $f12
/* 7085C8 80238928 00000000 */ nop
/* 7085CC 8023892C 45000008 */ bc1f .L80238950
/* 7085D0 80238930 00000000 */ nop
/* 7085D4 80238934 3C0143B4 */ lui $at, 0x43b4
/* 7085D8 80238938 44810000 */ mtc1 $at, $f0
/* 7085DC 8023893C 00000000 */ nop
/* 7085E0 80238940 4600603C */ c.lt.s $f12, $f0
/* 7085E4 80238944 00000000 */ nop
/* 7085E8 80238948 4501FFE9 */ bc1t .L802388F0
/* 7085EC 8023894C 00000000 */ nop
.L80238950:
/* 7085F0 80238950 460C103E */ c.le.s $f2, $f12
/* 7085F4 80238954 00000000 */ nop
/* 7085F8 80238958 45000017 */ bc1f .L802389B8
/* 7085FC 8023895C 00000000 */ nop
/* 708600 80238960 3C0142B4 */ lui $at, 0x42b4
/* 708604 80238964 44810000 */ mtc1 $at, $f0
/* 708608 80238968 00000000 */ nop
/* 70860C 8023896C 4600603C */ c.lt.s $f12, $f0
/* 708610 80238970 00000000 */ nop
/* 708614 80238974 45000010 */ bc1f .L802389B8
/* 708618 80238978 00000000 */ nop
/* 70861C 8023897C 3C014334 */ lui $at, 0x4334
/* 708620 80238980 4481A000 */ mtc1 $at, $f20
/* 708624 80238984 0C00A6C9 */ jal clamp_angle
/* 708628 80238988 46146300 */ add.s $f12, $f12, $f20
/* 70862C 8023898C 46140001 */ sub.s $f0, $f0, $f20
/* 708630 80238990 4600A501 */ sub.s $f20, $f20, $f0
/* 708634 80238994 24040004 */ addiu $a0, $zero, 4
/* 708638 80238998 E6140048 */ swc1 $f20, 0x48($s0)
.L8023899C:
/* 70863C 8023899C 0C00A67F */ jal rand_int
/* 708640 802389A0 00000000 */ nop
/* 708644 802389A4 2442FFFE */ addiu $v0, $v0, -2
/* 708648 802389A8 44820000 */ mtc1 $v0, $f0
/* 70864C 802389AC 00000000 */ nop
/* 708650 802389B0 46800020 */ cvt.s.w $f0, $f0
/* 708654 802389B4 E6000050 */ swc1 $f0, 0x50($s0)
.L802389B8:
/* 708658 802389B8 8E420078 */ lw $v0, 0x78($s2)
/* 70865C 802389BC 10400004 */ beqz $v0, .L802389D0
/* 708660 802389C0 2404029B */ addiu $a0, $zero, 0x29b
/* 708664 802389C4 C6000008 */ lwc1 $f0, 8($s0)
/* 708668 802389C8 0808E277 */ j .L802389DC
/* 70866C 802389CC E7A00010 */ swc1 $f0, 0x10($sp)
.L802389D0:
/* 708670 802389D0 C6000008 */ lwc1 $f0, 8($s0)
/* 708674 802389D4 2404029C */ addiu $a0, $zero, 0x29c
/* 708678 802389D8 E7A00010 */ swc1 $f0, 0x10($sp)
.L802389DC:
/* 70867C 802389DC 8E060000 */ lw $a2, ($s0)
/* 708680 802389E0 8E070004 */ lw $a3, 4($s0)
/* 708684 802389E4 0C052757 */ jal sfx_play_sound_at_position
/* 708688 802389E8 0000282D */ daddu $a1, $zero, $zero
/* 70868C 802389EC 8E430078 */ lw $v1, 0x78($s2)
/* 708690 802389F0 24020001 */ addiu $v0, $zero, 1
/* 708694 802389F4 00431023 */ subu $v0, $v0, $v1
/* 708698 802389F8 AE420078 */ sw $v0, 0x78($s2)
.L802389FC:
/* 70869C 802389FC C6020004 */ lwc1 $f2, 4($s0)
/* 7086A0 80238A00 3C014302 */ lui $at, 0x4302
/* 7086A4 80238A04 44810000 */ mtc1 $at, $f0
/* 7086A8 80238A08 00000000 */ nop
/* 7086AC 80238A0C 4602003C */ c.lt.s $f0, $f2
/* 7086B0 80238A10 00000000 */ nop
/* 7086B4 80238A14 4500004E */ bc1f .L80238B50
/* 7086B8 80238A18 00000000 */ nop
/* 7086BC 80238A1C 8E420074 */ lw $v0, 0x74($s2)
/* 7086C0 80238A20 1040000D */ beqz $v0, .L80238A58
/* 7086C4 80238A24 24020002 */ addiu $v0, $zero, 2
.L80238A28:
/* 7086C8 80238A28 0808E344 */ j .L80238D10
/* 7086CC 80238A2C AE420070 */ sw $v0, 0x70($s2)
.L80238A30:
/* 7086D0 80238A30 0C00A6C9 */ jal clamp_angle
/* 7086D4 80238A34 46006300 */ add.s $f12, $f12, $f0
/* 7086D8 80238A38 3C0143B4 */ lui $at, 0x43b4
/* 7086DC 80238A3C 44811000 */ mtc1 $at, $f2
/* 7086E0 80238A40 00000000 */ nop
/* 7086E4 80238A44 46001001 */ sub.s $f0, $f2, $f0
/* 7086E8 80238A48 46020000 */ add.s $f0, $f0, $f2
/* 7086EC 80238A4C 24040004 */ addiu $a0, $zero, 4
/* 7086F0 80238A50 0808E2BC */ j .L80238AF0
/* 7086F4 80238A54 E6000048 */ swc1 $f0, 0x48($s0)
.L80238A58:
/* 7086F8 80238A58 C60C0048 */ lwc1 $f12, 0x48($s0)
/* 7086FC 80238A5C 3C0142B4 */ lui $at, 0x42b4
/* 708700 80238A60 44810000 */ mtc1 $at, $f0
/* 708704 80238A64 00000000 */ nop
/* 708708 80238A68 460C003E */ c.le.s $f0, $f12
/* 70870C 80238A6C 00000000 */ nop
/* 708710 80238A70 45000008 */ bc1f .L80238A94
/* 708714 80238A74 00000000 */ nop
/* 708718 80238A78 3C014334 */ lui $at, 0x4334
/* 70871C 80238A7C 44810000 */ mtc1 $at, $f0
/* 708720 80238A80 00000000 */ nop
/* 708724 80238A84 4600603C */ c.lt.s $f12, $f0
/* 708728 80238A88 00000000 */ nop
/* 70872C 80238A8C 4501FFE8 */ bc1t .L80238A30
/* 708730 80238A90 00000000 */ nop
.L80238A94:
/* 708734 80238A94 3C014334 */ lui $at, 0x4334
/* 708738 80238A98 44811000 */ mtc1 $at, $f2
/* 70873C 80238A9C 00000000 */ nop
/* 708740 80238AA0 460C103E */ c.le.s $f2, $f12
/* 708744 80238AA4 00000000 */ nop
/* 708748 80238AA8 45000018 */ bc1f .L80238B0C
/* 70874C 80238AAC 00000000 */ nop
/* 708750 80238AB0 3C014387 */ lui $at, 0x4387
/* 708754 80238AB4 44810000 */ mtc1 $at, $f0
/* 708758 80238AB8 00000000 */ nop
/* 70875C 80238ABC 4600603C */ c.lt.s $f12, $f0
/* 708760 80238AC0 00000000 */ nop
/* 708764 80238AC4 45000011 */ bc1f .L80238B0C
/* 708768 80238AC8 00000000 */ nop
/* 70876C 80238ACC 0C00A6C9 */ jal clamp_angle
/* 708770 80238AD0 46026300 */ add.s $f12, $f12, $f2
/* 708774 80238AD4 3C0143B4 */ lui $at, 0x43b4
/* 708778 80238AD8 44811000 */ mtc1 $at, $f2
/* 70877C 80238ADC 00000000 */ nop
/* 708780 80238AE0 46020001 */ sub.s $f0, $f0, $f2
/* 708784 80238AE4 46001081 */ sub.s $f2, $f2, $f0
/* 708788 80238AE8 24040004 */ addiu $a0, $zero, 4
/* 70878C 80238AEC E6020048 */ swc1 $f2, 0x48($s0)
.L80238AF0:
/* 708790 80238AF0 0C00A67F */ jal rand_int
/* 708794 80238AF4 00000000 */ nop
/* 708798 80238AF8 2442FFFE */ addiu $v0, $v0, -2
/* 70879C 80238AFC 44820000 */ mtc1 $v0, $f0
/* 7087A0 80238B00 00000000 */ nop
/* 7087A4 80238B04 46800020 */ cvt.s.w $f0, $f0
/* 7087A8 80238B08 E6000050 */ swc1 $f0, 0x50($s0)
.L80238B0C:
/* 7087AC 80238B0C 8E420078 */ lw $v0, 0x78($s2)
/* 7087B0 80238B10 10400004 */ beqz $v0, .L80238B24
/* 7087B4 80238B14 2404029B */ addiu $a0, $zero, 0x29b
/* 7087B8 80238B18 C6000008 */ lwc1 $f0, 8($s0)
/* 7087BC 80238B1C 0808E2CC */ j .L80238B30
/* 7087C0 80238B20 E7A00010 */ swc1 $f0, 0x10($sp)
.L80238B24:
/* 7087C4 80238B24 C6000008 */ lwc1 $f0, 8($s0)
/* 7087C8 80238B28 2404029C */ addiu $a0, $zero, 0x29c
/* 7087CC 80238B2C E7A00010 */ swc1 $f0, 0x10($sp)
.L80238B30:
/* 7087D0 80238B30 8E060000 */ lw $a2, ($s0)
/* 7087D4 80238B34 8E070004 */ lw $a3, 4($s0)
/* 7087D8 80238B38 0C052757 */ jal sfx_play_sound_at_position
/* 7087DC 80238B3C 0000282D */ daddu $a1, $zero, $zero
/* 7087E0 80238B40 8E430078 */ lw $v1, 0x78($s2)
/* 7087E4 80238B44 24020001 */ addiu $v0, $zero, 1
/* 7087E8 80238B48 00431023 */ subu $v0, $v0, $v1
/* 7087EC 80238B4C AE420078 */ sw $v0, 0x78($s2)
.L80238B50:
/* 7087F0 80238B50 C6000050 */ lwc1 $f0, 0x50($s0)
/* 7087F4 80238B54 3C013FE0 */ lui $at, 0x3fe0
/* 7087F8 80238B58 44811800 */ mtc1 $at, $f3
/* 7087FC 80238B5C 44801000 */ mtc1 $zero, $f2
/* 708800 80238B60 46000021 */ cvt.d.s $f0, $f0
/* 708804 80238B64 46220002 */ mul.d $f0, $f0, $f2
/* 708808 80238B68 00000000 */ nop
/* 70880C 80238B6C C60C0048 */ lwc1 $f12, 0x48($s0)
/* 708810 80238B70 46006321 */ cvt.d.s $f12, $f12
/* 708814 80238B74 46206300 */ add.d $f12, $f12, $f0
/* 708818 80238B78 0C00A6C9 */ jal clamp_angle
/* 70881C 80238B7C 46206320 */ cvt.s.d $f12, $f12
/* 708820 80238B80 3C01439D */ lui $at, 0x439d
/* 708824 80238B84 34218000 */ ori $at, $at, 0x8000
/* 708828 80238B88 44816000 */ mtc1 $at, $f12
/* 70882C 80238B8C 00000000 */ nop
/* 708830 80238B90 460C0301 */ sub.s $f12, $f0, $f12
/* 708834 80238B94 0C00A6C9 */ jal clamp_angle
/* 708838 80238B98 E6000048 */ swc1 $f0, 0x48($s0)
/* 70883C 80238B9C C6220170 */ lwc1 $f2, 0x170($s1)
/* 708840 80238BA0 3C018024 */ lui $at, %hi(D_8023C068_70BD08)
/* 708844 80238BA4 D424C068 */ ldc1 $f4, %lo(D_8023C068_70BD08)($at)
/* 708848 80238BA8 460010A1 */ cvt.d.s $f2, $f2
/* 70884C 80238BAC 46241081 */ sub.d $f2, $f2, $f4
/* 708850 80238BB0 E6200164 */ swc1 $f0, 0x164($s1)
/* 708854 80238BB4 462010A0 */ cvt.s.d $f2, $f2
/* 708858 80238BB8 E6220170 */ swc1 $f2, 0x170($s1)
/* 70885C 80238BBC 46001006 */ mov.s $f0, $f2
/* 708860 80238BC0 E6220174 */ swc1 $f2, 0x174($s1)
/* 708864 80238BC4 E6220178 */ swc1 $f2, 0x178($s1)
/* 708868 80238BC8 3C013FF0 */ lui $at, 0x3ff0
/* 70886C 80238BCC 44811800 */ mtc1 $at, $f3
/* 708870 80238BD0 44801000 */ mtc1 $zero, $f2
/* 708874 80238BD4 46000021 */ cvt.d.s $f0, $f0
/* 708878 80238BD8 4622003C */ c.lt.d $f0, $f2
/* 70887C 80238BDC 00000000 */ nop
/* 708880 80238BE0 45000007 */ bc1f .L80238C00
/* 708884 80238BE4 00000000 */ nop
/* 708888 80238BE8 3C013F80 */ lui $at, 0x3f80
/* 70888C 80238BEC 44810000 */ mtc1 $at, $f0
/* 708890 80238BF0 00000000 */ nop
/* 708894 80238BF4 E6200170 */ swc1 $f0, 0x170($s1)
/* 708898 80238BF8 E6200174 */ swc1 $f0, 0x174($s1)
/* 70889C 80238BFC E6200178 */ swc1 $f0, 0x178($s1)
.L80238C00:
/* 7088A0 80238C00 C6220170 */ lwc1 $f2, 0x170($s1)
/* 7088A4 80238C04 3C01C170 */ lui $at, 0xc170
/* 7088A8 80238C08 44810000 */ mtc1 $at, $f0
/* 7088AC 80238C0C 00000000 */ nop
/* 7088B0 80238C10 46001082 */ mul.s $f2, $f2, $f0
/* 7088B4 80238C14 00000000 */ nop
/* 7088B8 80238C18 27A40018 */ addiu $a0, $sp, 0x18
/* 7088BC 80238C1C 8E070048 */ lw $a3, 0x48($s0)
/* 7088C0 80238C20 4480A000 */ mtc1 $zero, $f20
/* 7088C4 80238C24 44061000 */ mfc1 $a2, $f2
/* 7088C8 80238C28 27A5001C */ addiu $a1, $sp, 0x1c
/* 7088CC 80238C2C E7B40018 */ swc1 $f20, 0x18($sp)
/* 7088D0 80238C30 0C00A7E7 */ jal add_vec2D_polar
/* 7088D4 80238C34 E7B4001C */ swc1 $f20, 0x1c($sp)
/* 7088D8 80238C38 C6000000 */ lwc1 $f0, ($s0)
/* 7088DC 80238C3C C7A20018 */ lwc1 $f2, 0x18($sp)
/* 7088E0 80238C40 3C038024 */ lui $v1, %hi(D_8023C070)
/* 7088E4 80238C44 8C63C070 */ lw $v1, %lo(D_8023C070)($v1)
/* 7088E8 80238C48 46020000 */ add.s $f0, $f0, $f2
/* 7088EC 80238C4C 8C62000C */ lw $v0, 0xc($v1)
/* 7088F0 80238C50 E4400004 */ swc1 $f0, 4($v0)
/* 7088F4 80238C54 C6000004 */ lwc1 $f0, 4($s0)
/* 7088F8 80238C58 C7A2001C */ lwc1 $f2, 0x1c($sp)
/* 7088FC 80238C5C 8C62000C */ lw $v0, 0xc($v1)
/* 708900 80238C60 46020000 */ add.s $f0, $f0, $f2
/* 708904 80238C64 3C0140A0 */ lui $at, 0x40a0
/* 708908 80238C68 44811000 */ mtc1 $at, $f2
/* 70890C 80238C6C E4400008 */ swc1 $f0, 8($v0)
/* 708910 80238C70 C6000008 */ lwc1 $f0, 8($s0)
/* 708914 80238C74 46020000 */ add.s $f0, $f0, $f2
/* 708918 80238C78 8C62000C */ lw $v0, 0xc($v1)
/* 70891C 80238C7C E440000C */ swc1 $f0, 0xc($v0)
/* 708920 80238C80 8C62000C */ lw $v0, 0xc($v1)
/* 708924 80238C84 C6000048 */ lwc1 $f0, 0x48($s0)
/* 708928 80238C88 E4400038 */ swc1 $f0, 0x38($v0)
/* 70892C 80238C8C 8C62000C */ lw $v0, 0xc($v1)
/* 708930 80238C90 C6200170 */ lwc1 $f0, 0x170($s1)
/* 708934 80238C94 E440003C */ swc1 $f0, 0x3c($v0)
/* 708938 80238C98 8C62000C */ lw $v0, 0xc($v1)
/* 70893C 80238C9C C6200170 */ lwc1 $f0, 0x170($s1)
/* 708940 80238CA0 E4400040 */ swc1 $f0, 0x40($v0)
/* 708944 80238CA4 86030064 */ lh $v1, 0x64($s0)
/* 708948 80238CA8 24020046 */ addiu $v0, $zero, 0x46
/* 70894C 80238CAC 14620010 */ bne $v1, $v0, .L80238CF0
/* 708950 80238CB0 2404029D */ addiu $a0, $zero, 0x29d
/* 708954 80238CB4 4406A000 */ mfc1 $a2, $f20
/* 708958 80238CB8 4407A000 */ mfc1 $a3, $f20
/* 70895C 80238CBC 0000282D */ daddu $a1, $zero, $zero
/* 708960 80238CC0 0C052757 */ jal sfx_play_sound_at_position
/* 708964 80238CC4 E7B40010 */ swc1 $f20, 0x10($sp)
/* 708968 80238CC8 0000202D */ daddu $a0, $zero, $zero
/* 70896C 80238CCC 3C05C248 */ lui $a1, 0xc248
/* 708970 80238CD0 3C0641A0 */ lui $a2, 0x41a0
/* 708974 80238CD4 4407A000 */ mfc1 $a3, $f20
/* 708978 80238CD8 3C013F80 */ lui $at, 0x3f80
/* 70897C 80238CDC 44810000 */ mtc1 $at, $f0
/* 708980 80238CE0 24020078 */ addiu $v0, $zero, 0x78
/* 708984 80238CE4 AFA20014 */ sw $v0, 0x14($sp)
/* 708988 80238CE8 0C01C6DC */ jal fx_underwater
/* 70898C 80238CEC E7A00010 */ swc1 $f0, 0x10($sp)
.L80238CF0:
/* 708990 80238CF0 86020064 */ lh $v0, 0x64($s0)
/* 708994 80238CF4 96030064 */ lhu $v1, 0x64($s0)
/* 708998 80238CF8 10400003 */ beqz $v0, .L80238D08
/* 70899C 80238CFC 2462FFFF */ addiu $v0, $v1, -1
/* 7089A0 80238D00 0808E344 */ j .L80238D10
/* 7089A4 80238D04 A6020064 */ sh $v0, 0x64($s0)
.L80238D08:
/* 7089A8 80238D08 24020001 */ addiu $v0, $zero, 1
/* 7089AC 80238D0C AE420074 */ sw $v0, 0x74($s2)
.L80238D10:
/* 7089B0 80238D10 8E430070 */ lw $v1, 0x70($s2)
/* 7089B4 80238D14 24020002 */ addiu $v0, $zero, 2
.L80238D18:
/* 7089B8 80238D18 10620005 */ beq $v1, $v0, .L80238D30
/* 7089BC 80238D1C 24020003 */ addiu $v0, $zero, 3
/* 7089C0 80238D20 10620008 */ beq $v1, $v0, .L80238D44
/* 7089C4 80238D24 0200202D */ daddu $a0, $s0, $zero
/* 7089C8 80238D28 0808E374 */ j .L80238DD0
/* 7089CC 80238D2C 00000000 */ nop
.L80238D30:
/* 7089D0 80238D30 24020005 */ addiu $v0, $zero, 5
/* 7089D4 80238D34 A6020064 */ sh $v0, 0x64($s0)
/* 7089D8 80238D38 24020003 */ addiu $v0, $zero, 3
/* 7089DC 80238D3C AE420070 */ sw $v0, 0x70($s2)
/* 7089E0 80238D40 0200202D */ daddu $a0, $s0, $zero
.L80238D44:
/* 7089E4 80238D44 8E060040 */ lw $a2, 0x40($s0)
/* 7089E8 80238D48 8E070048 */ lw $a3, 0x48($s0)
/* 7089EC 80238D4C 0C00A7E7 */ jal add_vec2D_polar
/* 7089F0 80238D50 26050004 */ addiu $a1, $s0, 4
/* 7089F4 80238D54 3C048024 */ lui $a0, %hi(D_8023C070)
/* 7089F8 80238D58 8C84C070 */ lw $a0, %lo(D_8023C070)($a0)
/* 7089FC 80238D5C C6000000 */ lwc1 $f0, ($s0)
/* 708A00 80238D60 8C82000C */ lw $v0, 0xc($a0)
/* 708A04 80238D64 E4400004 */ swc1 $f0, 4($v0)
/* 708A08 80238D68 8C82000C */ lw $v0, 0xc($a0)
/* 708A0C 80238D6C C6000004 */ lwc1 $f0, 4($s0)
/* 708A10 80238D70 E4400008 */ swc1 $f0, 8($v0)
/* 708A14 80238D74 8C82000C */ lw $v0, 0xc($a0)
/* 708A18 80238D78 C6000008 */ lwc1 $f0, 8($s0)
/* 708A1C 80238D7C E440000C */ swc1 $f0, 0xc($v0)
/* 708A20 80238D80 8C82000C */ lw $v0, 0xc($a0)
/* 708A24 80238D84 C6000048 */ lwc1 $f0, 0x48($s0)
/* 708A28 80238D88 E4400038 */ swc1 $f0, 0x38($v0)
/* 708A2C 80238D8C 8C82000C */ lw $v0, 0xc($a0)
/* 708A30 80238D90 C6200170 */ lwc1 $f0, 0x170($s1)
/* 708A34 80238D94 E440003C */ swc1 $f0, 0x3c($v0)
/* 708A38 80238D98 8C82000C */ lw $v0, 0xc($a0)
/* 708A3C 80238D9C C6200170 */ lwc1 $f0, 0x170($s1)
/* 708A40 80238DA0 E4400040 */ swc1 $f0, 0x40($v0)
/* 708A44 80238DA4 86020064 */ lh $v0, 0x64($s0)
/* 708A48 80238DA8 96030064 */ lhu $v1, 0x64($s0)
/* 708A4C 80238DAC 14400007 */ bnez $v0, .L80238DCC
/* 708A50 80238DB0 2462FFFF */ addiu $v0, $v1, -1
/* 708A54 80238DB4 AE200164 */ sw $zero, 0x164($s1)
/* 708A58 80238DB8 8C830000 */ lw $v1, ($a0)
/* 708A5C 80238DBC 24020002 */ addiu $v0, $zero, 2
/* 708A60 80238DC0 34630010 */ ori $v1, $v1, 0x10
/* 708A64 80238DC4 0808E385 */ j .L80238E14
/* 708A68 80238DC8 AC830000 */ sw $v1, ($a0)
.L80238DCC:
/* 708A6C 80238DCC A6020064 */ sh $v0, 0x64($s0)
.L80238DD0:
/* 708A70 80238DD0 C6000000 */ lwc1 $f0, ($s0)
/* 708A74 80238DD4 3C013F80 */ lui $at, 0x3f80
/* 708A78 80238DD8 44811000 */ mtc1 $at, $f2
/* 708A7C 80238DDC E6200144 */ swc1 $f0, 0x144($s1)
/* 708A80 80238DE0 C6000004 */ lwc1 $f0, 4($s0)
/* 708A84 80238DE4 E6200148 */ swc1 $f0, 0x148($s1)
/* 708A88 80238DE8 C6000008 */ lwc1 $f0, 8($s0)
/* 708A8C 80238DEC 2402000A */ addiu $v0, $zero, 0xa
/* 708A90 80238DF0 E620014C */ swc1 $f0, 0x14c($s1)
/* 708A94 80238DF4 E7A20010 */ swc1 $f2, 0x10($sp)
/* 708A98 80238DF8 AFA20014 */ sw $v0, 0x14($sp)
/* 708A9C 80238DFC 8E250144 */ lw $a1, 0x144($s1)
/* 708AA0 80238E00 8E260148 */ lw $a2, 0x148($s1)
/* 708AA4 80238E04 8E27014C */ lw $a3, 0x14c($s1)
/* 708AA8 80238E08 0C01C70C */ jal fx_water_splash
/* 708AAC 80238E0C 24040003 */ addiu $a0, $zero, 3
/* 708AB0 80238E10 0000102D */ daddu $v0, $zero, $zero
.L80238E14:
/* 708AB4 80238E14 8FBF002C */ lw $ra, 0x2c($sp)
/* 708AB8 80238E18 8FB20028 */ lw $s2, 0x28($sp)
/* 708ABC 80238E1C 8FB10024 */ lw $s1, 0x24($sp)
/* 708AC0 80238E20 8FB00020 */ lw $s0, 0x20($sp)
/* 708AC4 80238E24 D7B40030 */ ldc1 $f20, 0x30($sp)
/* 708AC8 80238E28 03E00008 */ jr $ra
/* 708ACC 80238E2C 27BD0038 */ addiu $sp, $sp, 0x38

View File

@ -1,236 +0,0 @@
.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel func_80238000_703AF0
/* 703AF0 80238000 27BDFFB0 */ addiu $sp, $sp, -0x50
/* 703AF4 80238004 AFB3002C */ sw $s3, 0x2c($sp)
/* 703AF8 80238008 3C13800E */ lui $s3, %hi(gBattleStatus)
/* 703AFC 8023800C 2673C070 */ addiu $s3, $s3, %lo(gBattleStatus)
/* 703B00 80238010 AFBF0030 */ sw $ra, 0x30($sp)
/* 703B04 80238014 AFB20028 */ sw $s2, 0x28($sp)
/* 703B08 80238018 AFB10024 */ sw $s1, 0x24($sp)
/* 703B0C 8023801C AFB00020 */ sw $s0, 0x20($sp)
/* 703B10 80238020 F7B80048 */ sdc1 $f24, 0x48($sp)
/* 703B14 80238024 F7B60040 */ sdc1 $f22, 0x40($sp)
/* 703B18 80238028 F7B40038 */ sdc1 $f20, 0x38($sp)
/* 703B1C 8023802C 8E7200DC */ lw $s2, 0xdc($s3)
/* 703B20 80238030 10A00022 */ beqz $a1, .L802380BC
/* 703B24 80238034 24110005 */ addiu $s1, $zero, 5
/* 703B28 80238038 3C013F80 */ lui $at, 0x3f80
/* 703B2C 8023803C 4481A000 */ mtc1 $at, $f20
/* 703B30 80238040 AFB10014 */ sw $s1, 0x14($sp)
/* 703B34 80238044 AFA00018 */ sw $zero, 0x18($sp)
/* 703B38 80238048 E7B40010 */ swc1 $f20, 0x10($sp)
/* 703B3C 8023804C 8E450144 */ lw $a1, 0x144($s2)
/* 703B40 80238050 8E460148 */ lw $a2, 0x148($s2)
/* 703B44 80238054 8E47014C */ lw $a3, 0x14c($s2)
/* 703B48 80238058 24100001 */ addiu $s0, $zero, 1
/* 703B4C 8023805C 3C018024 */ lui $at, %hi(D_8023C1BC)
/* 703B50 80238060 AC30C1BC */ sw $s0, %lo(D_8023C1BC)($at)
/* 703B54 80238064 3C018024 */ lui $at, %hi(D_8023C1C0)
/* 703B58 80238068 AC20C1C0 */ sw $zero, %lo(D_8023C1C0)($at)
/* 703B5C 8023806C 3C018024 */ lui $at, %hi(D_8023C1C4)
/* 703B60 80238070 AC30C1C4 */ sw $s0, %lo(D_8023C1C4)($at)
/* 703B64 80238074 3C018024 */ lui $at, %hi(D_8023C1C8)
/* 703B68 80238078 AC20C1C8 */ sw $zero, %lo(D_8023C1C8)($at)
/* 703B6C 8023807C 0C01C8EC */ jal fx_static_status
/* 703B70 80238080 0000202D */ daddu $a0, $zero, $zero
/* 703B74 80238084 E7B40010 */ swc1 $f20, 0x10($sp)
/* 703B78 80238088 AFB10014 */ sw $s1, 0x14($sp)
/* 703B7C 8023808C AFA00018 */ sw $zero, 0x18($sp)
/* 703B80 80238090 8E450144 */ lw $a1, 0x144($s2)
/* 703B84 80238094 3C06C47A */ lui $a2, 0xc47a
/* 703B88 80238098 8E47014C */ lw $a3, 0x14c($s2)
/* 703B8C 8023809C 3C018024 */ lui $at, %hi(D_8023C1CC)
/* 703B90 802380A0 AC22C1CC */ sw $v0, %lo(D_8023C1CC)($at)
/* 703B94 802380A4 0C01C8EC */ jal fx_static_status
/* 703B98 802380A8 0200202D */ daddu $a0, $s0, $zero
/* 703B9C 802380AC 3C018024 */ lui $at, %hi(D_8023C1D0)
/* 703BA0 802380B0 AC22C1D0 */ sw $v0, %lo(D_8023C1D0)($at)
/* 703BA4 802380B4 3C018024 */ lui $at, %hi(D_8023C1B8)
/* 703BA8 802380B8 AC30C1B8 */ sw $s0, %lo(D_8023C1B8)($at)
.L802380BC:
/* 703BAC 802380BC 3C028024 */ lui $v0, %hi(D_8023C1B8)
/* 703BB0 802380C0 8C42C1B8 */ lw $v0, %lo(D_8023C1B8)($v0)
/* 703BB4 802380C4 104000A0 */ beqz $v0, .L80238348
/* 703BB8 802380C8 24020002 */ addiu $v0, $zero, 2
/* 703BBC 802380CC 3C028024 */ lui $v0, %hi(D_8023C1BC)
/* 703BC0 802380D0 8C42C1BC */ lw $v0, %lo(D_8023C1BC)($v0)
/* 703BC4 802380D4 1040000C */ beqz $v0, .L80238108
/* 703BC8 802380D8 00000000 */ nop
/* 703BCC 802380DC 3C108024 */ lui $s0, %hi(D_8023C1C0)
/* 703BD0 802380E0 2610C1C0 */ addiu $s0, $s0, %lo(D_8023C1C0)
/* 703BD4 802380E4 8E020000 */ lw $v0, ($s0)
/* 703BD8 802380E8 2442000F */ addiu $v0, $v0, 0xf
/* 703BDC 802380EC 44826000 */ mtc1 $v0, $f12
/* 703BE0 802380F0 00000000 */ nop
/* 703BE4 802380F4 46806320 */ cvt.s.w $f12, $f12
/* 703BE8 802380F8 0C00A6C9 */ jal clamp_angle
/* 703BEC 802380FC AE020000 */ sw $v0, ($s0)
/* 703BF0 80238100 4600018D */ trunc.w.s $f6, $f0
/* 703BF4 80238104 E6060000 */ swc1 $f6, ($s0)
.L80238108:
/* 703BF8 80238108 3C0140C9 */ lui $at, 0x40c9
/* 703BFC 8023810C 34210FD0 */ ori $at, $at, 0xfd0
/* 703C00 80238110 44810000 */ mtc1 $at, $f0
/* 703C04 80238114 3C018024 */ lui $at, %hi(D_8023C1C0)
/* 703C08 80238118 C42CC1C0 */ lwc1 $f12, %lo(D_8023C1C0)($at)
/* 703C0C 8023811C 46806320 */ cvt.s.w $f12, $f12
/* 703C10 80238120 46006302 */ mul.s $f12, $f12, $f0
/* 703C14 80238124 00000000 */ nop
/* 703C18 80238128 3C0143B4 */ lui $at, 0x43b4
/* 703C1C 8023812C 44810000 */ mtc1 $at, $f0
/* 703C20 80238130 0C00A85B */ jal sin_rad
/* 703C24 80238134 46006303 */ div.s $f12, $f12, $f0
/* 703C28 80238138 3C014040 */ lui $at, 0x4040
/* 703C2C 8023813C 44811000 */ mtc1 $at, $f2
/* 703C30 80238140 00000000 */ nop
/* 703C34 80238144 46020002 */ mul.s $f0, $f0, $f2
/* 703C38 80238148 00000000 */ nop
/* 703C3C 8023814C 86420152 */ lh $v0, 0x152($s2)
/* 703C40 80238150 3C014140 */ lui $at, 0x4140
/* 703C44 80238154 44812000 */ mtc1 $at, $f4
/* 703C48 80238158 44821000 */ mtc1 $v0, $f2
/* 703C4C 8023815C 00000000 */ nop
/* 703C50 80238160 468010A0 */ cvt.s.w $f2, $f2
/* 703C54 80238164 4600018D */ trunc.w.s $f6, $f0
/* 703C58 80238168 44033000 */ mfc1 $v1, $f6
/* 703C5C 8023816C 00000000 */ nop
/* 703C60 80238170 00031600 */ sll $v0, $v1, 0x18
/* 703C64 80238174 C6400148 */ lwc1 $f0, 0x148($s2)
/* 703C68 80238178 00021603 */ sra $v0, $v0, 0x18
/* 703C6C 8023817C A243019A */ sb $v1, 0x19a($s2)
/* 703C70 80238180 46020000 */ add.s $f0, $f0, $f2
/* 703C74 80238184 44821000 */ mtc1 $v0, $f2
/* 703C78 80238188 00000000 */ nop
/* 703C7C 8023818C 468010A0 */ cvt.s.w $f2, $f2
/* 703C80 80238190 86420150 */ lh $v0, 0x150($s2)
/* 703C84 80238194 46020000 */ add.s $f0, $f0, $f2
/* 703C88 80238198 44821000 */ mtc1 $v0, $f2
/* 703C8C 8023819C 00000000 */ nop
/* 703C90 802381A0 468010A0 */ cvt.s.w $f2, $f2
/* 703C94 802381A4 8E620004 */ lw $v0, 4($s3)
/* 703C98 802381A8 86430154 */ lh $v1, 0x154($s2)
/* 703C9C 802381AC 30420014 */ andi $v0, $v0, 0x14
/* 703CA0 802381B0 46040580 */ add.s $f22, $f0, $f4
/* 703CA4 802381B4 C6400144 */ lwc1 $f0, 0x144($s2)
/* 703CA8 802381B8 44832000 */ mtc1 $v1, $f4
/* 703CAC 802381BC 00000000 */ nop
/* 703CB0 802381C0 46802120 */ cvt.s.w $f4, $f4
/* 703CB4 802381C4 46020500 */ add.s $f20, $f0, $f2
/* 703CB8 802381C8 C640014C */ lwc1 $f0, 0x14c($s2)
/* 703CBC 802381CC 24030004 */ addiu $v1, $zero, 4
/* 703CC0 802381D0 14430003 */ bne $v0, $v1, .L802381E0
/* 703CC4 802381D4 46040600 */ add.s $f24, $f0, $f4
/* 703CC8 802381D8 3C01C47A */ lui $at, 0xc47a
/* 703CCC 802381DC 4481B000 */ mtc1 $at, $f22
.L802381E0:
/* 703CD0 802381E0 3C028024 */ lui $v0, %hi(D_8023C1C4)
/* 703CD4 802381E4 8C42C1C4 */ lw $v0, %lo(D_8023C1C4)($v0)
/* 703CD8 802381E8 10400044 */ beqz $v0, .L802382FC
/* 703CDC 802381EC 00000000 */ nop
/* 703CE0 802381F0 3C038024 */ lui $v1, %hi(D_8023C1C8)
/* 703CE4 802381F4 8C63C1C8 */ lw $v1, %lo(D_8023C1C8)($v1)
/* 703CE8 802381F8 10600005 */ beqz $v1, .L80238210
/* 703CEC 802381FC 24020001 */ addiu $v0, $zero, 1
/* 703CF0 80238200 1062001D */ beq $v1, $v0, .L80238278
/* 703CF4 80238204 0000102D */ daddu $v0, $zero, $zero
/* 703CF8 80238208 0808E0D2 */ j .L80238348
/* 703CFC 8023820C 00000000 */ nop
.L80238210:
/* 703D00 80238210 3C108024 */ lui $s0, %hi(D_8023C1CC)
/* 703D04 80238214 2610C1CC */ addiu $s0, $s0, %lo(D_8023C1CC)
/* 703D08 80238218 8E020000 */ lw $v0, ($s0)
/* 703D0C 8023821C 1440000C */ bnez $v0, .L80238250
/* 703D10 80238220 0000202D */ daddu $a0, $zero, $zero
/* 703D14 80238224 4405A000 */ mfc1 $a1, $f20
/* 703D18 80238228 4406B000 */ mfc1 $a2, $f22
/* 703D1C 8023822C 4407C000 */ mfc1 $a3, $f24
/* 703D20 80238230 3C013F80 */ lui $at, 0x3f80
/* 703D24 80238234 44810000 */ mtc1 $at, $f0
/* 703D28 80238238 24020005 */ addiu $v0, $zero, 5
/* 703D2C 8023823C AFA20014 */ sw $v0, 0x14($sp)
/* 703D30 80238240 AFA00018 */ sw $zero, 0x18($sp)
/* 703D34 80238244 0C01C8EC */ jal fx_static_status
/* 703D38 80238248 E7A00010 */ swc1 $f0, 0x10($sp)
/* 703D3C 8023824C AE020000 */ sw $v0, ($s0)
.L80238250:
/* 703D40 80238250 3C048024 */ lui $a0, %hi(D_8023C1D0)
/* 703D44 80238254 2484C1D0 */ addiu $a0, $a0, %lo(D_8023C1D0)
/* 703D48 80238258 8C830000 */ lw $v1, ($a0)
/* 703D4C 8023825C 1060001F */ beqz $v1, .L802382DC
/* 703D50 80238260 00000000 */ nop
/* 703D54 80238264 8C620000 */ lw $v0, ($v1)
/* 703D58 80238268 AC800000 */ sw $zero, ($a0)
/* 703D5C 8023826C 34420010 */ ori $v0, $v0, 0x10
/* 703D60 80238270 0808E0B7 */ j .L802382DC
/* 703D64 80238274 AC620000 */ sw $v0, ($v1)
.L80238278:
/* 703D68 80238278 3C048024 */ lui $a0, %hi(D_8023C1CC)
/* 703D6C 8023827C 2484C1CC */ addiu $a0, $a0, %lo(D_8023C1CC)
/* 703D70 80238280 8C830000 */ lw $v1, ($a0)
/* 703D74 80238284 10600005 */ beqz $v1, .L8023829C
/* 703D78 80238288 00000000 */ nop
/* 703D7C 8023828C 8C620000 */ lw $v0, ($v1)
/* 703D80 80238290 AC800000 */ sw $zero, ($a0)
/* 703D84 80238294 34420010 */ ori $v0, $v0, 0x10
/* 703D88 80238298 AC620000 */ sw $v0, ($v1)
.L8023829C:
/* 703D8C 8023829C 3C108024 */ lui $s0, %hi(D_8023C1D0)
/* 703D90 802382A0 2610C1D0 */ addiu $s0, $s0, %lo(D_8023C1D0)
/* 703D94 802382A4 8E020000 */ lw $v0, ($s0)
/* 703D98 802382A8 1440000C */ bnez $v0, .L802382DC
/* 703D9C 802382AC 24040001 */ addiu $a0, $zero, 1
/* 703DA0 802382B0 4405A000 */ mfc1 $a1, $f20
/* 703DA4 802382B4 4406B000 */ mfc1 $a2, $f22
/* 703DA8 802382B8 4407C000 */ mfc1 $a3, $f24
/* 703DAC 802382BC 3C013F80 */ lui $at, 0x3f80
/* 703DB0 802382C0 44810000 */ mtc1 $at, $f0
/* 703DB4 802382C4 24020005 */ addiu $v0, $zero, 5
/* 703DB8 802382C8 AFA20014 */ sw $v0, 0x14($sp)
/* 703DBC 802382CC AFA00018 */ sw $zero, 0x18($sp)
/* 703DC0 802382D0 0C01C8EC */ jal fx_static_status
/* 703DC4 802382D4 E7A00010 */ swc1 $f0, 0x10($sp)
/* 703DC8 802382D8 AE020000 */ sw $v0, ($s0)
.L802382DC:
/* 703DCC 802382DC 8E030000 */ lw $v1, ($s0)
/* 703DD0 802382E0 8C62000C */ lw $v0, 0xc($v1)
/* 703DD4 802382E4 E4540004 */ swc1 $f20, 4($v0)
/* 703DD8 802382E8 8C62000C */ lw $v0, 0xc($v1)
/* 703DDC 802382EC E4560008 */ swc1 $f22, 8($v0)
/* 703DE0 802382F0 8C62000C */ lw $v0, 0xc($v1)
/* 703DE4 802382F4 0808E0D1 */ j .L80238344
/* 703DE8 802382F8 E458000C */ swc1 $f24, 0xc($v0)
.L802382FC:
/* 703DEC 802382FC 3C048024 */ lui $a0, %hi(D_8023C1CC)
/* 703DF0 80238300 2484C1CC */ addiu $a0, $a0, %lo(D_8023C1CC)
/* 703DF4 80238304 8C830000 */ lw $v1, ($a0)
/* 703DF8 80238308 10600005 */ beqz $v1, .L80238320
/* 703DFC 8023830C 00000000 */ nop
/* 703E00 80238310 8C620000 */ lw $v0, ($v1)
/* 703E04 80238314 AC800000 */ sw $zero, ($a0)
/* 703E08 80238318 34420010 */ ori $v0, $v0, 0x10
/* 703E0C 8023831C AC620000 */ sw $v0, ($v1)
.L80238320:
/* 703E10 80238320 3C048024 */ lui $a0, %hi(D_8023C1D0)
/* 703E14 80238324 2484C1D0 */ addiu $a0, $a0, %lo(D_8023C1D0)
/* 703E18 80238328 8C830000 */ lw $v1, ($a0)
/* 703E1C 8023832C 10600006 */ beqz $v1, .L80238348
/* 703E20 80238330 0000102D */ daddu $v0, $zero, $zero
/* 703E24 80238334 8C620000 */ lw $v0, ($v1)
/* 703E28 80238338 AC800000 */ sw $zero, ($a0)
/* 703E2C 8023833C 34420010 */ ori $v0, $v0, 0x10
/* 703E30 80238340 AC620000 */ sw $v0, ($v1)
.L80238344:
/* 703E34 80238344 0000102D */ daddu $v0, $zero, $zero
.L80238348:
/* 703E38 80238348 8FBF0030 */ lw $ra, 0x30($sp)
/* 703E3C 8023834C 8FB3002C */ lw $s3, 0x2c($sp)
/* 703E40 80238350 8FB20028 */ lw $s2, 0x28($sp)
/* 703E44 80238354 8FB10024 */ lw $s1, 0x24($sp)
/* 703E48 80238358 8FB00020 */ lw $s0, 0x20($sp)
/* 703E4C 8023835C D7B80048 */ ldc1 $f24, 0x48($sp)
/* 703E50 80238360 D7B60040 */ ldc1 $f22, 0x40($sp)
/* 703E54 80238364 D7B40038 */ ldc1 $f20, 0x38($sp)
/* 703E58 80238368 03E00008 */ jr $ra
/* 703E5C 8023836C 27BD0050 */ addiu $sp, $sp, 0x50

View File

@ -1,105 +0,0 @@
.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel func_80027600
/* 2A00 80027600 27BDFF98 */ addiu $sp, $sp, -0x68
/* 2A04 80027604 0080502D */ daddu $t2, $a0, $zero
/* 2A08 80027608 0000302D */ daddu $a2, $zero, $zero
/* 2A0C 8002760C 27A90008 */ addiu $t1, $sp, 8
/* 2A10 80027610 27A80028 */ addiu $t0, $sp, 0x28
/* 2A14 80027614 27A70048 */ addiu $a3, $sp, 0x48
.L80027618:
/* 2A18 80027618 01261021 */ addu $v0, $t1, $a2
/* 2A1C 8002761C 01061821 */ addu $v1, $t0, $a2
/* 2A20 80027620 00E62021 */ addu $a0, $a3, $a2
/* 2A24 80027624 24C60001 */ addiu $a2, $a2, 1
/* 2A28 80027628 A0400000 */ sb $zero, ($v0)
/* 2A2C 8002762C 28C20020 */ slti $v0, $a2, 0x20
/* 2A30 80027630 A0600000 */ sb $zero, ($v1)
/* 2A34 80027634 1440FFF8 */ bnez $v0, .L80027618
/* 2A38 80027638 A0800000 */ sb $zero, ($a0)
/* 2A3C 8002763C 0000302D */ daddu $a2, $zero, $zero
/* 2A40 80027640 27A90008 */ addiu $t1, $sp, 8
/* 2A44 80027644 27A80028 */ addiu $t0, $sp, 0x28
/* 2A48 80027648 27A70048 */ addiu $a3, $sp, 0x48
/* 2A4C 8002764C 0140202D */ daddu $a0, $t2, $zero
.L80027650:
/* 2A50 80027650 90830000 */ lbu $v1, ($a0)
/* 2A54 80027654 01231821 */ addu $v1, $t1, $v1
/* 2A58 80027658 90620000 */ lbu $v0, ($v1)
/* 2A5C 8002765C 24420001 */ addiu $v0, $v0, 1
/* 2A60 80027660 A0620000 */ sb $v0, ($v1)
/* 2A64 80027664 90830001 */ lbu $v1, 1($a0)
/* 2A68 80027668 01031821 */ addu $v1, $t0, $v1
/* 2A6C 8002766C 90620000 */ lbu $v0, ($v1)
/* 2A70 80027670 24420001 */ addiu $v0, $v0, 1
/* 2A74 80027674 A0620000 */ sb $v0, ($v1)
/* 2A78 80027678 90830002 */ lbu $v1, 2($a0)
/* 2A7C 8002767C 24C60001 */ addiu $a2, $a2, 1
/* 2A80 80027680 00E31821 */ addu $v1, $a3, $v1
/* 2A84 80027684 90620000 */ lbu $v0, ($v1)
/* 2A88 80027688 24420001 */ addiu $v0, $v0, 1
/* 2A8C 8002768C A0620000 */ sb $v0, ($v1)
/* 2A90 80027690 28C20009 */ slti $v0, $a2, 9
/* 2A94 80027694 1440FFEE */ bnez $v0, .L80027650
/* 2A98 80027698 24840004 */ addiu $a0, $a0, 4
/* 2A9C 8002769C 0000182D */ daddu $v1, $zero, $zero
/* 2AA0 800276A0 0060302D */ daddu $a2, $v1, $zero
/* 2AA4 800276A4 27A40008 */ addiu $a0, $sp, 8
/* 2AA8 800276A8 00861021 */ addu $v0, $a0, $a2
.L800276AC:
/* 2AAC 800276AC 90420000 */ lbu $v0, ($v0)
/* 2AB0 800276B0 00621821 */ addu $v1, $v1, $v0
/* 2AB4 800276B4 28620005 */ slti $v0, $v1, 5
/* 2AB8 800276B8 50400006 */ beql $v0, $zero, .L800276D4
/* 2ABC 800276BC A3A60000 */ sb $a2, ($sp)
/* 2AC0 800276C0 24C60001 */ addiu $a2, $a2, 1
/* 2AC4 800276C4 28C20020 */ slti $v0, $a2, 0x20
/* 2AC8 800276C8 1440FFF8 */ bnez $v0, .L800276AC
/* 2ACC 800276CC 00861021 */ addu $v0, $a0, $a2
/* 2AD0 800276D0 A3A60000 */ sb $a2, ($sp)
.L800276D4:
/* 2AD4 800276D4 0000182D */ daddu $v1, $zero, $zero
/* 2AD8 800276D8 0060302D */ daddu $a2, $v1, $zero
/* 2ADC 800276DC 27A40028 */ addiu $a0, $sp, 0x28
/* 2AE0 800276E0 00861021 */ addu $v0, $a0, $a2
.L800276E4:
/* 2AE4 800276E4 90420000 */ lbu $v0, ($v0)
/* 2AE8 800276E8 00621821 */ addu $v1, $v1, $v0
/* 2AEC 800276EC 28620005 */ slti $v0, $v1, 5
/* 2AF0 800276F0 50400006 */ beql $v0, $zero, .L8002770C
/* 2AF4 800276F4 A3A60001 */ sb $a2, 1($sp)
/* 2AF8 800276F8 24C60001 */ addiu $a2, $a2, 1
/* 2AFC 800276FC 28C20020 */ slti $v0, $a2, 0x20
/* 2B00 80027700 1440FFF8 */ bnez $v0, .L800276E4
/* 2B04 80027704 00861021 */ addu $v0, $a0, $a2
/* 2B08 80027708 A3A60001 */ sb $a2, 1($sp)
.L8002770C:
/* 2B0C 8002770C 0000182D */ daddu $v1, $zero, $zero
/* 2B10 80027710 0060302D */ daddu $a2, $v1, $zero
/* 2B14 80027714 27A40048 */ addiu $a0, $sp, 0x48
/* 2B18 80027718 00861021 */ addu $v0, $a0, $a2
.L8002771C:
/* 2B1C 8002771C 90420000 */ lbu $v0, ($v0)
/* 2B20 80027720 00621821 */ addu $v1, $v1, $v0
/* 2B24 80027724 28620005 */ slti $v0, $v1, 5
/* 2B28 80027728 50400006 */ beql $v0, $zero, .L80027744
/* 2B2C 8002772C A3A60002 */ sb $a2, 2($sp)
/* 2B30 80027730 24C60001 */ addiu $a2, $a2, 1
/* 2B34 80027734 28C20020 */ slti $v0, $a2, 0x20
/* 2B38 80027738 1440FFF8 */ bnez $v0, .L8002771C
/* 2B3C 8002773C 00861021 */ addu $v0, $a0, $a2
/* 2B40 80027740 A3A60002 */ sb $a2, 2($sp)
.L80027744:
/* 2B44 80027744 30C300FF */ andi $v1, $a2, 0xff
/* 2B48 80027748 00031840 */ sll $v1, $v1, 1
/* 2B4C 8002774C 93A20000 */ lbu $v0, ($sp)
/* 2B50 80027750 93A40001 */ lbu $a0, 1($sp)
/* 2B54 80027754 000212C0 */ sll $v0, $v0, 0xb
/* 2B58 80027758 00042180 */ sll $a0, $a0, 6
/* 2B5C 8002775C 00441021 */ addu $v0, $v0, $a0
/* 2B60 80027760 00431021 */ addu $v0, $v0, $v1
/* 2B64 80027764 24420001 */ addiu $v0, $v0, 1
/* 2B68 80027768 A4A20000 */ sh $v0, ($a1)
/* 2B6C 8002776C 03E00008 */ jr $ra
/* 2B70 80027770 27BD0068 */ addiu $sp, $sp, 0x68

View File

@ -1,153 +0,0 @@
.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel func_80027774
/* 2B74 80027774 27BDFF90 */ addiu $sp, $sp, -0x70
/* 2B78 80027778 AFB40058 */ sw $s4, 0x58($sp)
/* 2B7C 8002777C 0080A02D */ daddu $s4, $a0, $zero
/* 2B80 80027780 AFB5005C */ sw $s5, 0x5c($sp)
/* 2B84 80027784 00A0A82D */ daddu $s5, $a1, $zero
/* 2B88 80027788 AFB30054 */ sw $s3, 0x54($sp)
/* 2B8C 8002778C 24130001 */ addiu $s3, $zero, 1
/* 2B90 80027790 27A80018 */ addiu $t0, $sp, 0x18
/* 2B94 80027794 AFA80040 */ sw $t0, 0x40($sp)
/* 2B98 80027798 24080140 */ addiu $t0, $zero, 0x140
/* 2B9C 8002779C AFBF006C */ sw $ra, 0x6c($sp)
/* 2BA0 800277A0 AFBE0068 */ sw $fp, 0x68($sp)
/* 2BA4 800277A4 AFB70064 */ sw $s7, 0x64($sp)
/* 2BA8 800277A8 AFB60060 */ sw $s6, 0x60($sp)
/* 2BAC 800277AC AFB20050 */ sw $s2, 0x50($sp)
/* 2BB0 800277B0 AFB1004C */ sw $s1, 0x4c($sp)
/* 2BB4 800277B4 AFB00048 */ sw $s0, 0x48($sp)
/* 2BB8 800277B8 AFA60078 */ sw $a2, 0x78($sp)
/* 2BBC 800277BC AFA80044 */ sw $t0, 0x44($sp)
.L800277C0:
/* 2BC0 800277C0 24120001 */ addiu $s2, $zero, 1
/* 2BC4 800277C4 267EFFFF */ addiu $fp, $s3, -1
/* 2BC8 800277C8 8FA80044 */ lw $t0, 0x44($sp)
/* 2BCC 800277CC 0272B821 */ addu $s7, $s3, $s2
/* 2BD0 800277D0 0112B021 */ addu $s6, $t0, $s2
/* 2BD4 800277D4 00161840 */ sll $v1, $s6, 1
.L800277D8:
/* 2BD8 800277D8 00752021 */ addu $a0, $v1, $s5
/* 2BDC 800277DC 9482FFFE */ lhu $v0, -2($a0)
/* 2BE0 800277E0 00021082 */ srl $v0, $v0, 2
/* 2BE4 800277E4 3042000F */ andi $v0, $v0, 0xf
/* 2BE8 800277E8 2C420008 */ sltiu $v0, $v0, 8
/* 2BEC 800277EC 5440000D */ bnel $v0, $zero, .L80027824
/* 2BF0 800277F0 0280202D */ daddu $a0, $s4, $zero
/* 2BF4 800277F4 94820000 */ lhu $v0, ($a0)
/* 2BF8 800277F8 00021082 */ srl $v0, $v0, 2
/* 2BFC 800277FC 3042000F */ andi $v0, $v0, 0xf
/* 2C00 80027800 2C420008 */ sltiu $v0, $v0, 8
/* 2C04 80027804 54400007 */ bnel $v0, $zero, .L80027824
/* 2C08 80027808 0280202D */ daddu $a0, $s4, $zero
/* 2C0C 8002780C 94820002 */ lhu $v0, 2($a0)
/* 2C10 80027810 00021082 */ srl $v0, $v0, 2
/* 2C14 80027814 3042000F */ andi $v0, $v0, 0xf
/* 2C18 80027818 2C420008 */ sltiu $v0, $v0, 8
/* 2C1C 8002781C 10400048 */ beqz $v0, .L80027940
/* 2C20 80027820 0280202D */ daddu $a0, $s4, $zero
.L80027824:
/* 2C24 80027824 02A0282D */ daddu $a1, $s5, $zero
/* 2C28 80027828 03C0302D */ daddu $a2, $fp, $zero
/* 2C2C 8002782C 2650FFFF */ addiu $s0, $s2, -1
/* 2C30 80027830 8FA80040 */ lw $t0, 0x40($sp)
/* 2C34 80027834 0200382D */ daddu $a3, $s0, $zero
/* 2C38 80027838 0C009C7F */ jal gfx_frame_filter_pass_0
/* 2C3C 8002783C AFA80010 */ sw $t0, 0x10($sp)
/* 2C40 80027840 0280202D */ daddu $a0, $s4, $zero
/* 2C44 80027844 02A0282D */ daddu $a1, $s5, $zero
/* 2C48 80027848 03C0302D */ daddu $a2, $fp, $zero
/* 2C4C 8002784C 0240382D */ daddu $a3, $s2, $zero
/* 2C50 80027850 27A2001C */ addiu $v0, $sp, 0x1c
/* 2C54 80027854 0C009C7F */ jal gfx_frame_filter_pass_0
/* 2C58 80027858 AFA20010 */ sw $v0, 0x10($sp)
/* 2C5C 8002785C 0280202D */ daddu $a0, $s4, $zero
/* 2C60 80027860 02A0282D */ daddu $a1, $s5, $zero
/* 2C64 80027864 03C0302D */ daddu $a2, $fp, $zero
/* 2C68 80027868 26510001 */ addiu $s1, $s2, 1
/* 2C6C 8002786C 0220382D */ daddu $a3, $s1, $zero
/* 2C70 80027870 27A20020 */ addiu $v0, $sp, 0x20
/* 2C74 80027874 0C009C7F */ jal gfx_frame_filter_pass_0
/* 2C78 80027878 AFA20010 */ sw $v0, 0x10($sp)
/* 2C7C 8002787C 0280202D */ daddu $a0, $s4, $zero
/* 2C80 80027880 02A0282D */ daddu $a1, $s5, $zero
/* 2C84 80027884 0260302D */ daddu $a2, $s3, $zero
/* 2C88 80027888 0200382D */ daddu $a3, $s0, $zero
/* 2C8C 8002788C 27A20024 */ addiu $v0, $sp, 0x24
/* 2C90 80027890 0C009C7F */ jal gfx_frame_filter_pass_0
/* 2C94 80027894 AFA20010 */ sw $v0, 0x10($sp)
/* 2C98 80027898 0280202D */ daddu $a0, $s4, $zero
/* 2C9C 8002789C 02A0282D */ daddu $a1, $s5, $zero
/* 2CA0 800278A0 0260302D */ daddu $a2, $s3, $zero
/* 2CA4 800278A4 0240382D */ daddu $a3, $s2, $zero
/* 2CA8 800278A8 27A20028 */ addiu $v0, $sp, 0x28
/* 2CAC 800278AC 0C009C7F */ jal gfx_frame_filter_pass_0
/* 2CB0 800278B0 AFA20010 */ sw $v0, 0x10($sp)
/* 2CB4 800278B4 0280202D */ daddu $a0, $s4, $zero
/* 2CB8 800278B8 02A0282D */ daddu $a1, $s5, $zero
/* 2CBC 800278BC 0260302D */ daddu $a2, $s3, $zero
/* 2CC0 800278C0 0220382D */ daddu $a3, $s1, $zero
/* 2CC4 800278C4 27A2002C */ addiu $v0, $sp, 0x2c
/* 2CC8 800278C8 0C009C7F */ jal gfx_frame_filter_pass_0
/* 2CCC 800278CC AFA20010 */ sw $v0, 0x10($sp)
/* 2CD0 800278D0 0280202D */ daddu $a0, $s4, $zero
/* 2CD4 800278D4 02A0282D */ daddu $a1, $s5, $zero
/* 2CD8 800278D8 02E0302D */ daddu $a2, $s7, $zero
/* 2CDC 800278DC 0200382D */ daddu $a3, $s0, $zero
/* 2CE0 800278E0 27A20030 */ addiu $v0, $sp, 0x30
/* 2CE4 800278E4 0C009C7F */ jal gfx_frame_filter_pass_0
/* 2CE8 800278E8 AFA20010 */ sw $v0, 0x10($sp)
/* 2CEC 800278EC 0280202D */ daddu $a0, $s4, $zero
/* 2CF0 800278F0 02A0282D */ daddu $a1, $s5, $zero
/* 2CF4 800278F4 02E0302D */ daddu $a2, $s7, $zero
/* 2CF8 800278F8 0240382D */ daddu $a3, $s2, $zero
/* 2CFC 800278FC 27A20034 */ addiu $v0, $sp, 0x34
/* 2D00 80027900 0C009C7F */ jal gfx_frame_filter_pass_0
/* 2D04 80027904 AFA20010 */ sw $v0, 0x10($sp)
/* 2D08 80027908 0280202D */ daddu $a0, $s4, $zero
/* 2D0C 8002790C 02A0282D */ daddu $a1, $s5, $zero
/* 2D10 80027910 02E0302D */ daddu $a2, $s7, $zero
/* 2D14 80027914 0220382D */ daddu $a3, $s1, $zero
/* 2D18 80027918 27A20038 */ addiu $v0, $sp, 0x38
/* 2D1C 8002791C 0C009C7F */ jal gfx_frame_filter_pass_0
/* 2D20 80027920 AFA20010 */ sw $v0, 0x10($sp)
/* 2D24 80027924 00162840 */ sll $a1, $s6, 1
/* 2D28 80027928 8FA80078 */ lw $t0, 0x78($sp)
/* 2D2C 8002792C 8FA40040 */ lw $a0, 0x40($sp)
/* 2D30 80027930 0C009D80 */ jal func_80027600
/* 2D34 80027934 01052821 */ addu $a1, $t0, $a1
/* 2D38 80027938 08009E57 */ j .L8002795C
/* 2D3C 8002793C 26D60001 */ addiu $s6, $s6, 1
.L80027940:
/* 2D40 80027940 00741021 */ addu $v0, $v1, $s4
/* 2D44 80027944 8FA80078 */ lw $t0, 0x78($sp)
/* 2D48 80027948 94420000 */ lhu $v0, ($v0)
/* 2D4C 8002794C 00681821 */ addu $v1, $v1, $t0
/* 2D50 80027950 34420001 */ ori $v0, $v0, 1
/* 2D54 80027954 A4620000 */ sh $v0, ($v1)
/* 2D58 80027958 26D60001 */ addiu $s6, $s6, 1
.L8002795C:
/* 2D5C 8002795C 26520001 */ addiu $s2, $s2, 1
/* 2D60 80027960 2A42013F */ slti $v0, $s2, 0x13f
/* 2D64 80027964 1440FF9C */ bnez $v0, .L800277D8
/* 2D68 80027968 00161840 */ sll $v1, $s6, 1
/* 2D6C 8002796C 26730001 */ addiu $s3, $s3, 1
/* 2D70 80027970 8FA80044 */ lw $t0, 0x44($sp)
/* 2D74 80027974 2A6200EF */ slti $v0, $s3, 0xef
/* 2D78 80027978 25080140 */ addiu $t0, $t0, 0x140
/* 2D7C 8002797C 1440FF90 */ bnez $v0, .L800277C0
/* 2D80 80027980 AFA80044 */ sw $t0, 0x44($sp)
/* 2D84 80027984 8FBF006C */ lw $ra, 0x6c($sp)
/* 2D88 80027988 8FBE0068 */ lw $fp, 0x68($sp)
/* 2D8C 8002798C 8FB70064 */ lw $s7, 0x64($sp)
/* 2D90 80027990 8FB60060 */ lw $s6, 0x60($sp)
/* 2D94 80027994 8FB5005C */ lw $s5, 0x5c($sp)
/* 2D98 80027998 8FB40058 */ lw $s4, 0x58($sp)
/* 2D9C 8002799C 8FB30054 */ lw $s3, 0x54($sp)
/* 2DA0 800279A0 8FB20050 */ lw $s2, 0x50($sp)
/* 2DA4 800279A4 8FB1004C */ lw $s1, 0x4c($sp)
/* 2DA8 800279A8 8FB00048 */ lw $s0, 0x48($sp)
/* 2DAC 800279AC 03E00008 */ jr $ra
/* 2DB0 800279B0 27BD0070 */ addiu $sp, $sp, 0x70

View File

@ -1,267 +0,0 @@
.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel gfx_frame_filter_pass_1
/* 265C 8002725C 27BDFF88 */ addiu $sp, $sp, -0x78
/* 2660 80027260 0080582D */ daddu $t3, $a0, $zero
/* 2664 80027264 AFA5007C */ sw $a1, 0x7c($sp)
/* 2668 80027268 0000282D */ daddu $a1, $zero, $zero
/* 266C 8002726C 27A90018 */ addiu $t1, $sp, 0x18
/* 2670 80027270 27A80038 */ addiu $t0, $sp, 0x38
/* 2674 80027274 27A70058 */ addiu $a3, $sp, 0x58
/* 2678 80027278 8BAC007C */ lwl $t4, 0x7c($sp)
/* 267C 8002727C 9BAC007F */ lwr $t4, 0x7f($sp)
/* 2680 80027280 ABAC0008 */ swl $t4, 8($sp)
/* 2684 80027284 BBAC000B */ swr $t4, 0xb($sp)
/* 2688 80027288 8BAC007C */ lwl $t4, 0x7c($sp)
/* 268C 8002728C 9BAC007F */ lwr $t4, 0x7f($sp)
/* 2690 80027290 ABAC0000 */ swl $t4, ($sp)
/* 2694 80027294 BBAC0003 */ swr $t4, 3($sp)
.L80027298:
/* 2698 80027298 01251021 */ addu $v0, $t1, $a1
/* 269C 8002729C 01051821 */ addu $v1, $t0, $a1
/* 26A0 800272A0 00E52021 */ addu $a0, $a3, $a1
/* 26A4 800272A4 24A50001 */ addiu $a1, $a1, 1
/* 26A8 800272A8 A0400000 */ sb $zero, ($v0)
/* 26AC 800272AC 28A20020 */ slti $v0, $a1, 0x20
/* 26B0 800272B0 A0600000 */ sb $zero, ($v1)
/* 26B4 800272B4 1440FFF8 */ bnez $v0, .L80027298
/* 26B8 800272B8 A0800000 */ sb $zero, ($a0)
/* 26BC 800272BC 0000282D */ daddu $a1, $zero, $zero
/* 26C0 800272C0 240A0008 */ addiu $t2, $zero, 8
/* 26C4 800272C4 27A90018 */ addiu $t1, $sp, 0x18
/* 26C8 800272C8 27A80038 */ addiu $t0, $sp, 0x38
/* 26CC 800272CC 27A70058 */ addiu $a3, $sp, 0x58
/* 26D0 800272D0 0160202D */ daddu $a0, $t3, $zero
.L800272D4:
/* 26D4 800272D4 90820003 */ lbu $v0, 3($a0)
/* 26D8 800272D8 144A0010 */ bne $v0, $t2, .L8002731C
/* 26DC 800272DC 24A50001 */ addiu $a1, $a1, 1
/* 26E0 800272E0 90830000 */ lbu $v1, ($a0)
/* 26E4 800272E4 01231821 */ addu $v1, $t1, $v1
/* 26E8 800272E8 90620000 */ lbu $v0, ($v1)
/* 26EC 800272EC 24420001 */ addiu $v0, $v0, 1
/* 26F0 800272F0 A0620000 */ sb $v0, ($v1)
/* 26F4 800272F4 90830001 */ lbu $v1, 1($a0)
/* 26F8 800272F8 01031821 */ addu $v1, $t0, $v1
/* 26FC 800272FC 90620000 */ lbu $v0, ($v1)
/* 2700 80027300 24420001 */ addiu $v0, $v0, 1
/* 2704 80027304 A0620000 */ sb $v0, ($v1)
/* 2708 80027308 90830002 */ lbu $v1, 2($a0)
/* 270C 8002730C 00E31821 */ addu $v1, $a3, $v1
/* 2710 80027310 90620000 */ lbu $v0, ($v1)
/* 2714 80027314 24420001 */ addiu $v0, $v0, 1
/* 2718 80027318 A0620000 */ sb $v0, ($v1)
.L8002731C:
/* 271C 8002731C 28A20006 */ slti $v0, $a1, 6
/* 2720 80027320 1440FFEC */ bnez $v0, .L800272D4
/* 2724 80027324 24840004 */ addiu $a0, $a0, 4
/* 2728 80027328 0000282D */ daddu $a1, $zero, $zero
/* 272C 8002732C 27A40018 */ addiu $a0, $sp, 0x18
/* 2730 80027330 00851821 */ addu $v1, $a0, $a1
.L80027334:
/* 2734 80027334 90620000 */ lbu $v0, ($v1)
/* 2738 80027338 50400004 */ beql $v0, $zero, .L8002734C
/* 273C 8002733C 24A50001 */ addiu $a1, $a1, 1
/* 2740 80027340 2442FFFF */ addiu $v0, $v0, -1
/* 2744 80027344 08009CD6 */ j .L80027358
/* 2748 80027348 A0620000 */ sb $v0, ($v1)
.L8002734C:
/* 274C 8002734C 28A20020 */ slti $v0, $a1, 0x20
/* 2750 80027350 1440FFF8 */ bnez $v0, .L80027334
/* 2754 80027354 00851821 */ addu $v1, $a0, $a1
.L80027358:
/* 2758 80027358 28A20020 */ slti $v0, $a1, 0x20
/* 275C 8002735C 10400009 */ beqz $v0, .L80027384
/* 2760 80027360 27A30018 */ addiu $v1, $sp, 0x18
/* 2764 80027364 00651021 */ addu $v0, $v1, $a1
.L80027368:
/* 2768 80027368 90420000 */ lbu $v0, ($v0)
/* 276C 8002736C 14400005 */ bnez $v0, .L80027384
/* 2770 80027370 00000000 */ nop
/* 2774 80027374 24A50001 */ addiu $a1, $a1, 1
/* 2778 80027378 28A20020 */ slti $v0, $a1, 0x20
/* 277C 8002737C 1440FFFA */ bnez $v0, .L80027368
/* 2780 80027380 00651021 */ addu $v0, $v1, $a1
.L80027384:
/* 2784 80027384 93A20000 */ lbu $v0, ($sp)
/* 2788 80027388 00A2102A */ slt $v0, $a1, $v0
/* 278C 8002738C 54400001 */ bnel $v0, $zero, .L80027394
/* 2790 80027390 A3A50000 */ sb $a1, ($sp)
.L80027394:
/* 2794 80027394 0000282D */ daddu $a1, $zero, $zero
/* 2798 80027398 27A40038 */ addiu $a0, $sp, 0x38
/* 279C 8002739C 00851821 */ addu $v1, $a0, $a1
.L800273A0:
/* 27A0 800273A0 90620000 */ lbu $v0, ($v1)
/* 27A4 800273A4 50400004 */ beql $v0, $zero, .L800273B8
/* 27A8 800273A8 24A50001 */ addiu $a1, $a1, 1
/* 27AC 800273AC 2442FFFF */ addiu $v0, $v0, -1
/* 27B0 800273B0 08009CF1 */ j .L800273C4
/* 27B4 800273B4 A0620000 */ sb $v0, ($v1)
.L800273B8:
/* 27B8 800273B8 28A20020 */ slti $v0, $a1, 0x20
/* 27BC 800273BC 1440FFF8 */ bnez $v0, .L800273A0
/* 27C0 800273C0 00851821 */ addu $v1, $a0, $a1
.L800273C4:
/* 27C4 800273C4 28A20020 */ slti $v0, $a1, 0x20
/* 27C8 800273C8 10400009 */ beqz $v0, .L800273F0
/* 27CC 800273CC 27A30038 */ addiu $v1, $sp, 0x38
/* 27D0 800273D0 00651021 */ addu $v0, $v1, $a1
.L800273D4:
/* 27D4 800273D4 90420000 */ lbu $v0, ($v0)
/* 27D8 800273D8 14400005 */ bnez $v0, .L800273F0
/* 27DC 800273DC 00000000 */ nop
/* 27E0 800273E0 24A50001 */ addiu $a1, $a1, 1
/* 27E4 800273E4 28A20020 */ slti $v0, $a1, 0x20
/* 27E8 800273E8 1440FFFA */ bnez $v0, .L800273D4
/* 27EC 800273EC 00651021 */ addu $v0, $v1, $a1
.L800273F0:
/* 27F0 800273F0 93A20001 */ lbu $v0, 1($sp)
/* 27F4 800273F4 00A2102A */ slt $v0, $a1, $v0
/* 27F8 800273F8 54400001 */ bnel $v0, $zero, .L80027400
/* 27FC 800273FC A3A50001 */ sb $a1, 1($sp)
.L80027400:
/* 2800 80027400 0000282D */ daddu $a1, $zero, $zero
/* 2804 80027404 27A40058 */ addiu $a0, $sp, 0x58
/* 2808 80027408 00851821 */ addu $v1, $a0, $a1
.L8002740C:
/* 280C 8002740C 90620000 */ lbu $v0, ($v1)
/* 2810 80027410 50400004 */ beql $v0, $zero, .L80027424
/* 2814 80027414 24A50001 */ addiu $a1, $a1, 1
/* 2818 80027418 2442FFFF */ addiu $v0, $v0, -1
/* 281C 8002741C 08009D0C */ j .L80027430
/* 2820 80027420 A0620000 */ sb $v0, ($v1)
.L80027424:
/* 2824 80027424 28A20020 */ slti $v0, $a1, 0x20
/* 2828 80027428 1440FFF8 */ bnez $v0, .L8002740C
/* 282C 8002742C 00851821 */ addu $v1, $a0, $a1
.L80027430:
/* 2830 80027430 28A20020 */ slti $v0, $a1, 0x20
/* 2834 80027434 10400009 */ beqz $v0, .L8002745C
/* 2838 80027438 27A30058 */ addiu $v1, $sp, 0x58
/* 283C 8002743C 00651021 */ addu $v0, $v1, $a1
.L80027440:
/* 2840 80027440 90420000 */ lbu $v0, ($v0)
/* 2844 80027444 14400005 */ bnez $v0, .L8002745C
/* 2848 80027448 00000000 */ nop
/* 284C 8002744C 24A50001 */ addiu $a1, $a1, 1
/* 2850 80027450 28A20020 */ slti $v0, $a1, 0x20
/* 2854 80027454 1440FFFA */ bnez $v0, .L80027440
/* 2858 80027458 00651021 */ addu $v0, $v1, $a1
.L8002745C:
/* 285C 8002745C 93A20002 */ lbu $v0, 2($sp)
/* 2860 80027460 00A2102A */ slt $v0, $a1, $v0
/* 2864 80027464 54400001 */ bnel $v0, $zero, .L8002746C
/* 2868 80027468 A3A50002 */ sb $a1, 2($sp)
.L8002746C:
/* 286C 8002746C 2405001F */ addiu $a1, $zero, 0x1f
/* 2870 80027470 27A30018 */ addiu $v1, $sp, 0x18
/* 2874 80027474 00651021 */ addu $v0, $v1, $a1
.L80027478:
/* 2878 80027478 90420000 */ lbu $v0, ($v0)
/* 287C 8002747C 14400004 */ bnez $v0, .L80027490
/* 2880 80027480 00000000 */ nop
/* 2884 80027484 24A5FFFF */ addiu $a1, $a1, -1
/* 2888 80027488 04A1FFFB */ bgez $a1, .L80027478
/* 288C 8002748C 00651021 */ addu $v0, $v1, $a1
.L80027490:
/* 2890 80027490 93A20008 */ lbu $v0, 8($sp)
/* 2894 80027494 0045102A */ slt $v0, $v0, $a1
/* 2898 80027498 54400001 */ bnel $v0, $zero, .L800274A0
/* 289C 8002749C A3A50008 */ sb $a1, 8($sp)
.L800274A0:
/* 28A0 800274A0 2405001F */ addiu $a1, $zero, 0x1f
/* 28A4 800274A4 27A30038 */ addiu $v1, $sp, 0x38
/* 28A8 800274A8 00651021 */ addu $v0, $v1, $a1
.L800274AC:
/* 28AC 800274AC 90420000 */ lbu $v0, ($v0)
/* 28B0 800274B0 14400004 */ bnez $v0, .L800274C4
/* 28B4 800274B4 00000000 */ nop
/* 28B8 800274B8 24A5FFFF */ addiu $a1, $a1, -1
/* 28BC 800274BC 04A1FFFB */ bgez $a1, .L800274AC
/* 28C0 800274C0 00651021 */ addu $v0, $v1, $a1
.L800274C4:
/* 28C4 800274C4 93A20009 */ lbu $v0, 9($sp)
/* 28C8 800274C8 0045102A */ slt $v0, $v0, $a1
/* 28CC 800274CC 54400001 */ bnel $v0, $zero, .L800274D4
/* 28D0 800274D0 A3A50009 */ sb $a1, 9($sp)
.L800274D4:
/* 28D4 800274D4 2405001F */ addiu $a1, $zero, 0x1f
/* 28D8 800274D8 27A30058 */ addiu $v1, $sp, 0x58
/* 28DC 800274DC 00651021 */ addu $v0, $v1, $a1
.L800274E0:
/* 28E0 800274E0 90420000 */ lbu $v0, ($v0)
/* 28E4 800274E4 14400004 */ bnez $v0, .L800274F8
/* 28E8 800274E8 00000000 */ nop
/* 28EC 800274EC 24A5FFFF */ addiu $a1, $a1, -1
/* 28F0 800274F0 04A1FFFB */ bgez $a1, .L800274E0
/* 28F4 800274F4 00651021 */ addu $v0, $v1, $a1
.L800274F8:
/* 28F8 800274F8 93A2000A */ lbu $v0, 0xa($sp)
/* 28FC 800274FC 0045102A */ slt $v0, $v0, $a1
/* 2900 80027500 54400001 */ bnel $v0, $zero, .L80027508
/* 2904 80027504 A3A5000A */ sb $a1, 0xa($sp)
.L80027508:
/* 2908 80027508 93A20008 */ lbu $v0, 8($sp)
/* 290C 8002750C 93A30000 */ lbu $v1, ($sp)
/* 2910 80027510 93A4007C */ lbu $a0, 0x7c($sp)
/* 2914 80027514 00431021 */ addu $v0, $v0, $v1
/* 2918 80027518 00441023 */ subu $v0, $v0, $a0
/* 291C 8002751C A3A20010 */ sb $v0, 0x10($sp)
/* 2920 80027520 93A20009 */ lbu $v0, 9($sp)
/* 2924 80027524 93A30001 */ lbu $v1, 1($sp)
/* 2928 80027528 93A4007D */ lbu $a0, 0x7d($sp)
/* 292C 8002752C 00431021 */ addu $v0, $v0, $v1
/* 2930 80027530 00441023 */ subu $v0, $v0, $a0
/* 2934 80027534 A3A20011 */ sb $v0, 0x11($sp)
/* 2938 80027538 93A2000A */ lbu $v0, 0xa($sp)
/* 293C 8002753C 93A30002 */ lbu $v1, 2($sp)
/* 2940 80027540 93A4007E */ lbu $a0, 0x7e($sp)
/* 2944 80027544 00431021 */ addu $v0, $v0, $v1
/* 2948 80027548 00441023 */ subu $v0, $v0, $a0
/* 294C 8002754C A3A20012 */ sb $v0, 0x12($sp)
/* 2950 80027550 93A2007C */ lbu $v0, 0x7c($sp)
/* 2954 80027554 93A4007F */ lbu $a0, 0x7f($sp)
/* 2958 80027558 00440018 */ mult $v0, $a0
/* 295C 8002755C 24030008 */ addiu $v1, $zero, 8
/* 2960 80027560 00002812 */ mflo $a1
/* 2964 80027564 93A20010 */ lbu $v0, 0x10($sp)
/* 2968 80027568 00641823 */ subu $v1, $v1, $a0
/* 296C 8002756C 00430018 */ mult $v0, $v1
/* 2970 80027570 00001012 */ mflo $v0
/* 2974 80027574 00A21021 */ addu $v0, $a1, $v0
/* 2978 80027578 000210C3 */ sra $v0, $v0, 3
/* 297C 8002757C A3A20010 */ sb $v0, 0x10($sp)
/* 2980 80027580 93A2007D */ lbu $v0, 0x7d($sp)
/* 2984 80027584 00440018 */ mult $v0, $a0
/* 2988 80027588 00002812 */ mflo $a1
/* 298C 8002758C 93A20011 */ lbu $v0, 0x11($sp)
/* 2990 80027590 00000000 */ nop
/* 2994 80027594 00430018 */ mult $v0, $v1
/* 2998 80027598 00001012 */ mflo $v0
/* 299C 8002759C 00A21021 */ addu $v0, $a1, $v0
/* 29A0 800275A0 000210C3 */ sra $v0, $v0, 3
/* 29A4 800275A4 A3A20011 */ sb $v0, 0x11($sp)
/* 29A8 800275A8 93A2007E */ lbu $v0, 0x7e($sp)
/* 29AC 800275AC 00440018 */ mult $v0, $a0
/* 29B0 800275B0 00002012 */ mflo $a0
/* 29B4 800275B4 93A20012 */ lbu $v0, 0x12($sp)
/* 29B8 800275B8 00000000 */ nop
/* 29BC 800275BC 00430018 */ mult $v0, $v1
/* 29C0 800275C0 00001012 */ mflo $v0
/* 29C4 800275C4 00821021 */ addu $v0, $a0, $v0
/* 29C8 800275C8 000210C3 */ sra $v0, $v0, 3
/* 29CC 800275CC A3A20012 */ sb $v0, 0x12($sp)
/* 29D0 800275D0 93A20010 */ lbu $v0, 0x10($sp)
/* 29D4 800275D4 93A40011 */ lbu $a0, 0x11($sp)
/* 29D8 800275D8 93A30012 */ lbu $v1, 0x12($sp)
/* 29DC 800275DC 000212C0 */ sll $v0, $v0, 0xb
/* 29E0 800275E0 00042180 */ sll $a0, $a0, 6
/* 29E4 800275E4 00441021 */ addu $v0, $v0, $a0
/* 29E8 800275E8 00031840 */ sll $v1, $v1, 1
/* 29EC 800275EC 00431021 */ addu $v0, $v0, $v1
/* 29F0 800275F0 24420001 */ addiu $v0, $v0, 1
/* 29F4 800275F4 A4C20000 */ sh $v0, ($a2)
/* 29F8 800275F8 03E00008 */ jr $ra
/* 29FC 800275FC 27BD0078 */ addiu $sp, $sp, 0x78

View File

@ -2783,7 +2783,7 @@ D_800A0F44 = 0x800A0F44; // type:data rom:0x7C344
D_800A0F48 = 0x800A0F48; // type:data rom:0x7C348 D_800A0F48 = 0x800A0F48; // type:data rom:0x7C348
D_800A0F50 = 0x800A0F50; // type:data rom:0x7C350 D_800A0F50 = 0x800A0F50; // type:data rom:0x7C350
D_800A0F54 = 0x800A0F54; // type:data rom:0x7C354 D_800A0F54 = 0x800A0F54; // type:data rom:0x7C354
nuAuMgrThread = 0x800A0F58; // type:data rom:0x7C358 nuAuMgrThread = 0x800A0F58; // type:data
phys_init_integrator_for_current_state = 0x800E2F60; // type:func rom:0x7C410 phys_init_integrator_for_current_state = 0x800E2F60; // type:func rom:0x7C410
gravity_use_fall_parms = 0x800E306C; // type:func rom:0x7C51C gravity_use_fall_parms = 0x800E306C; // type:func rom:0x7C51C
phys_update_falling = 0x800E3100; // type:func rom:0x7C5B0 phys_update_falling = 0x800E3100; // type:func rom:0x7C5B0
@ -25659,7 +25659,6 @@ EF2680_set_script_owner_npc_col_height = 0x802424B0; // type:func rom:0xEF4AC0
EF2680_TackleAI_Main = 0x80242530; // type:func rom:0xEF4B40 EF2680_TackleAI_Main = 0x80242530; // type:func rom:0xEF4B40
EF2680_SpinyAI_Main = 0x8024299C; // type:func rom:0xEF4FAC EF2680_SpinyAI_Main = 0x8024299C; // type:func rom:0xEF4FAC
N(FlyingAI_JumpVels) = 0x802444BC; // type:data rom:0xEF6ACC N(FlyingAI_JumpVels) = 0x802444BC; // type:data rom:0xEF6ACC
flo_14_ConsumableChoiceList = 0x802453B0; // type:data rom:0xEF79C0
D_802453B8_EF79C8 = 0x802453B8; // type:data rom:0xEF79C8 D_802453B8_EF79C8 = 0x802453B8; // type:data rom:0xEF79C8
D_802453C0_EF79D0 = 0x802453C0; // type:data rom:0xEF79D0 D_802453C0_EF79D0 = 0x802453C0; // type:data rom:0xEF79D0
D_80245408_EF7A18 = 0x80245408; // type:data rom:0xEF7A18 D_80245408_EF7A18 = 0x80245408; // type:data rom:0xEF7A18
@ -26037,7 +26036,6 @@ flo_09_pad_2004 = 0x80242004; // type:data
D_80242180 = 0x80242180; // D_80242180 = 0x80242180; //
flo_24_pad_21A4 = 0x802421A4; // type:data flo_24_pad_21A4 = 0x802421A4; // type:data
D_80242208 = 0x80242208; // type:data D_80242208 = 0x80242208; // type:data
D_80242310 = 0x80242310; // type:data
D_80242330 = 0x80242330; // type:data D_80242330 = 0x80242330; // type:data
D_80242344 = 0x80242344; // type:data D_80242344 = 0x80242344; // type:data
osr_01_LetterDelivery_SavedNpcAnim = 0x80242344; // type:data osr_01_LetterDelivery_SavedNpcAnim = 0x80242344; // type:data
@ -26045,7 +26043,6 @@ D_80242350 = 0x80242350; // type:data
D_80242370 = 0x80242370; // type:data D_80242370 = 0x80242370; // type:data
D_80242390 = 0x80242390; // type:data D_80242390 = 0x80242390; // type:data
D_802423B0 = 0x802423B0; // type:data D_802423B0 = 0x802423B0; // type:data
D_802423D0 = 0x802423D0; // type:data
D_802423F0 = 0x802423F0; // type:data D_802423F0 = 0x802423F0; // type:data
D_80242410 = 0x80242410; // type:data D_80242410 = 0x80242410; // type:data
D_80242430 = 0x80242430; // type:data D_80242430 = 0x80242430; // type:data
@ -26053,8 +26050,7 @@ D_80242450 = 0x80242450; // type:data
D_802424E0 = 0x802424E0; // type:data D_802424E0 = 0x802424E0; // type:data
D_80242568_filemenu = 0x80242568; // type:data D_80242568_filemenu = 0x80242568; // type:data
flo_23_pad_2598 = 0x80242598; // type:data flo_23_pad_2598 = 0x80242598; // type:data
flo_23_ConsumableChoiceList = 0x802426E0; // type:data flo_23_ItemChoiceList = 0x802426E0; // type:data segment:flo_23
flo_23_ItemChoiceList = 0x802426E0; // type:data
flo_23_D_8024284C_pad = 0x8024284C; // type:data flo_23_D_8024284C_pad = 0x8024284C; // type:data
flo_23_FlowerGuard_ItemChoiceList = 0x80242850; // type:data flo_23_FlowerGuard_ItemChoiceList = 0x80242850; // type:data
flo_09_pad_2874 = 0x80242874; // type:data flo_09_pad_2874 = 0x80242874; // type:data
@ -26142,7 +26138,6 @@ flo_25_pad_4734 = 0x80244734; // type:data
D_802447C0 = 0x802447C0; // type:data D_802447C0 = 0x802447C0; // type:data
arn_03_pad_47DC = 0x802447DC; // type:data arn_03_pad_47DC = 0x802447DC; // type:data
D_80244A20 = 0x80244A20; // type:data D_80244A20 = 0x80244A20; // type:data
arn_03_ConsumableChoiceList = 0x80244A20; // type:data
arn_03_KeyItemChoiceList = 0x80244A20; // type:data arn_03_KeyItemChoiceList = 0x80244A20; // type:data
sbk_30_D_80244C18 = 0x80244C18; // type:data sbk_30_D_80244C18 = 0x80244C18; // type:data
D_80244D88 = 0x80244D88; // type:data D_80244D88 = 0x80244D88; // type:data
@ -26153,7 +26148,6 @@ flo_03_pad_4ECC = 0x80244ECC; // type:data
flo_14_pad_4F24 = 0x80244F24; // type:data flo_14_pad_4F24 = 0x80244F24; // type:data
flo_08_pad_4F3C = 0x80244F3C; // type:data flo_08_pad_4F3C = 0x80244F3C; // type:data
flo_14_pad_4F64 = 0x80244F64; // type:data flo_14_pad_4F64 = 0x80244F64; // type:data
flo_25_ConsumableChoiceList = 0x80244FA0; // type:data
flo_25_ItemChoiceList = 0x80244FA0; // type:data flo_25_ItemChoiceList = 0x80244FA0; // type:data
arn_05_pad_4FF8 = 0x80244FF8; // type:data arn_05_pad_4FF8 = 0x80244FF8; // type:data
flo_25_D_8024510C_pad = 0x8024510C; // type:data flo_25_D_8024510C_pad = 0x8024510C; // type:data

View File

@ -735,8 +735,3 @@ D_8024F580_hos_05 = 0x8024F580;
osr_00_802437C0 = 0x802437C0; osr_00_802437C0 = 0x802437C0;
mim_03_802424E0 = 0x802424E0; mim_03_802424E0 = 0x802424E0;
sam_04_80245210 = 0x80245210; sam_04_80245210 = 0x80245210;
// incorrectly-identified vtx addresses for tst_13
D_802423D0 = 0x802423D0;
D_80242310 = 0x80242310;
flo_23_ConsumableChoiceList = 0x802426E0;