matched 4 obk functions (#896)

This commit is contained in:
Unnunu 2022-12-28 17:30:30 +03:00 committed by GitHub
parent cbdce77daf
commit 207f4400b6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
14 changed files with 360 additions and 995 deletions

View File

@ -220,6 +220,8 @@ typedef struct Npc {
NpcChompBlur* chomp;
NpcQuizmoBlur* quizmo;
Unk2A4Blur* unk2A4;
struct Npc* keepAwayNpc;
s32* keepAwayStarted;
} blur;
/* 0x024 */ s32 spriteInstanceID;
/* 0x028 */ AnimID currentAnim;

View File

@ -1483,6 +1483,7 @@ enum SoundIDs {
SOUND_B000000C = 0xB000000C,
SOUND_B000000D = 0xB000000D,
SOUND_B000000E = 0xB000000E,
SOUND_B000000F = 0xB000000F,
SOUND_B0000010 = 0xB0000010,
SOUND_B0000011 = 0xB0000011,
SOUND_B0000012 = 0xB0000012,

View File

@ -27,7 +27,7 @@ enum {
AF_OBK03_HitFirstSwitch = AreaFlag(5),
AF_OBK03_HitSecondSwitch = AreaFlag(6),
AF_OBK03_HitThirdSwitch = AreaFlag(7),
AF_OBK_08 = AreaFlag(8),
AF_OBK08_KeepAwayStarted = AreaFlag(8),
};
extern MapSettings obk_01_settings;

View File

@ -27,10 +27,10 @@ enum {
};
enum {
MV_KeepAwayItem = MapVar(0), // item entity ID
MV_Unk_01 = MapVar(1),
MV_Unk_02 = MapVar(2),
MV_Unk_03 = MapVar(3),
MV_KeepAwayItem = MapVar(0), // item entity ID
MV_KeepAwayStarted = MapVar(1), //
MV_Unk_02 = MapVar(2), //
MV_KeepAwayMovement = MapVar(3), //
MV_KeepAwayTarget = MapVar(4), // npcID to throw item to
MV_ThrowTargetNpc = MapVar(5), // npcID the item is thrown to (redundant)
MV_KeepAwayResult = MapVar(6), // did the player hit the correct boo?
@ -49,6 +49,13 @@ enum KeepAwayResult {
KEEP_AWAY_WRONG = 2,
};
enum KeepAwayMoveState {
KEEP_AWAY_CLOCKWISE = 0,
KEEP_AWAY_STOP = 1,
KEEP_AWAY_COUNTER_CLOCKWISE = 2,
KEEP_AWAY_SPIRAL = 3,
};
#define NAMESPACE obk_04
extern EvtScript N(EVS_Main);

View File

@ -3,6 +3,7 @@
enum {
RING_STATE_0 = 0,
RING_STATE_1 = 1,
RING_STATE_2 = 2,
RING_STATE_10 = 10,
RING_STATE_11 = 11,
RING_STATE_12 = 12,
@ -14,13 +15,13 @@ enum {
#include "world/common/npc/Boo.inc.c"
API_CALLABLE(N(func_80240050_BC7EB0)) {
API_CALLABLE(N(InitHiddenBoo)) {
Npc* npc = get_npc_unsafe(script->owner2.npcID);
s32* ptr = heap_malloc(sizeof(s32)); // todo what is this
s32* isGameStarted = heap_malloc(sizeof(s32));
npc->blur.any = ptr;
*ptr = NULL;
npc->planarFlyDist = 125.0f;
npc->blur.keepAwayStarted = isGameStarted;
*isGameStarted = FALSE;
npc->planarFlyDist = 125.0f; // default ring radius
npc->yaw = 0.0f;
npc->pos.x = 0.0f;
npc->pos.y = -875.0f;
@ -64,34 +65,34 @@ void N(func_8024022C_BC808C)(void) {
get_npc_unsafe(NPC_KeepAwayBoo8)->unk_A2 = 0;
}
s32 N(func_802402A0_BC8100)(s32 arg0) {
s32 ret = 12;
s32 N(SetRingMovement)(s32 arg0) {
s32 ret = RING_STATE_12;
switch (arg0) {
case 0:
ret = 12;
case KEEP_AWAY_CLOCKWISE:
ret = RING_STATE_12;
break;
case 1:
ret = 100;
case KEEP_AWAY_STOP:
ret = RING_STATE_100;
break;
case 2:
ret = 13;
case KEEP_AWAY_COUNTER_CLOCKWISE:
ret = RING_STATE_13;
break;
case 3:
ret = 14;
case KEEP_AWAY_SPIRAL:
ret = RING_STATE_14;
break;
}
return ret;
}
API_CALLABLE(N(func_802402F4_BC8154)) {
API_CALLABLE(N(UpdateHiddenBoo)) {
Npc* npc = get_npc_unsafe(script->owner2.npcID);
s32* temp_s3 = npc->blur.any;
s32 temp_v0;
switch (script->functionTemp[1]) {
case RING_STATE_0:
temp_v0 = evt_get_variable(script, MV_Unk_01);
temp_v0 = evt_get_variable(script, MV_KeepAwayStarted);
if (temp_v0 == 1) {
*temp_s3 = temp_v0;
script->functionTemp[1] = RING_STATE_10;
@ -119,15 +120,15 @@ API_CALLABLE(N(func_802402F4_BC8154)) {
}
break;
case RING_STATE_12:
script->functionTemp[1] = N(func_802402A0_BC8100)(evt_get_variable(script, MV_Unk_03));
script->functionTemp[1] = N(SetRingMovement)(evt_get_variable(script, MV_KeepAwayMovement));
npc->yaw = clamp_angle(npc->yaw + 2.0f);
break;
case RING_STATE_13:
script->functionTemp[1] = N(func_802402A0_BC8100)(evt_get_variable(script, MV_Unk_03));
script->functionTemp[1] = N(SetRingMovement)(evt_get_variable(script, MV_KeepAwayMovement));
npc->yaw = clamp_angle(npc->yaw - 2.0f);
break;
case RING_STATE_14:
evt_set_variable(script, MV_Unk_03, 0);
evt_set_variable(script, MV_KeepAwayMovement, KEEP_AWAY_CLOCKWISE);
npc->duration++;
if (npc->duration == 50) {
script->functionTemp[1] = RING_STATE_15;
@ -144,109 +145,106 @@ API_CALLABLE(N(func_802402F4_BC8154)) {
npc->yaw = clamp_angle(npc->yaw + 2.0f);
break;
case RING_STATE_100:
script->functionTemp[1] = N(func_802402A0_BC8100)(evt_get_variable(script, MV_Unk_03));
script->functionTemp[1] = N(SetRingMovement)(evt_get_variable(script, MV_KeepAwayMovement));
break;
}
return ApiStatus_DONE2;
}
API_CALLABLE(N(func_802405B4_BC8414)) {
API_CALLABLE(N(InitKeepAwayBoo)) {
Npc* npc = get_npc_unsafe(script->owner2.npcID);
npc->blur.any = get_npc_unsafe(NPC_Boo_01); // TODO what is this?
script->functionTemp[2] = script->owner2.npcID * 45;
npc->blur.keepAwayNpc = get_npc_unsafe(NPC_Boo_01);
script->functionTemp[2] = script->owner2.npcID * 45; // starting yaw
npc->flags |= NPC_FLAG_40000;
script->functionTemp[1] = RING_STATE_0;
return ApiStatus_DONE2;
}
API_CALLABLE(func_80240624_BC8484);
// float regalloc
#ifdef NON_MATCHING
API_CALLABLE(N(func_80240624_BC8484)) {
API_CALLABLE(N(UpdateKeepAwayBoo)) {
Npc* npc = get_npc_unsafe(script->owner2.npcID);
Npc* npc2 = npc->blur.any;
f32 temp_f10;
f32 temp_f12;
f32 temp_f14;
f32 temp_f2;
f32 temp_f4;
f32 temp_f6;
s32* temp_s2;
Npc* hiddenBoo = npc->blur.keepAwayNpc;
f32 posX, posY, posZ;
f32 interpAlpha, alphaSquared, alphaCubed;
f32 deltaX, deltaZ;
s32* isGameStarted;
f32 yaw;
f32 new_var;
f32 f1;
temp_s2 = npc2->blur.any;
isGameStarted = hiddenBoo->blur.keepAwayStarted;
switch (script->functionTemp[1]) {
case 0:
npc->yaw = clamp_angle(script->functionTemp[2] + npc2->yaw);
if (*temp_s2 == 1) {
script->functionTemp[1] = 1;
case RING_STATE_0:
npc->yaw = clamp_angle(script->functionTemp[2] + hiddenBoo->yaw);
if (*isGameStarted == TRUE) {
script->functionTemp[1] = RING_STATE_1;
npc->duration = rand_int(20) + 10;
}
break;
case 1:
npc->yaw = clamp_angle(script->functionTemp[2] + npc2->yaw);
case RING_STATE_1:
yaw = clamp_angle(script->functionTemp[2] + hiddenBoo->yaw);
npc->yaw = yaw;
npc->duration--;
if (npc->duration == 0) {
sfx_play_sound_at_position(0xB000000F, 0, npc->pos.x, npc->pos.y, npc->pos.z);
script->functionTemp[1] = 2;
sfx_play_sound_at_position(SOUND_B000000F, 0, npc->pos.x, npc->pos.y, npc->pos.z);
script->functionTemp[1] = RING_STATE_2;
npc->duration = 0;
npc->moveToPos.x = npc->pos.x;
npc->moveToPos.y = npc->pos.y;
npc->moveToPos.z = npc->pos.z;
}
break;
case 2:
npc->yaw = clamp_angle(script->functionTemp[2] + npc2->yaw);
new_var = npc->yaw;
npc->pos.x = npc2->pos.x;
npc->pos.z = npc2->pos.z;
npc_move_heading(npc, npc2->planarFlyDist, new_var);
temp_f4 = (40.0f - npc->duration) / 40.0f;
temp_f12 = npc->pos.z;
f1 = (npc->pos.x - npc->moveToPos.x) * (temp_f4 * temp_f4);
temp_f6 = (npc->pos.z - npc->moveToPos.z) * (temp_f4 * temp_f4);
temp_f2 = npc2->pos.y + 1000.0f;
npc->pos.x -= f1;
npc->pos.y = temp_f2;
npc->pos.y -= (npc->pos.y - npc->moveToPos.y) * ((temp_f4 * temp_f4) * temp_f4);
npc->pos.z = temp_f12 - temp_f6;
case RING_STATE_2:
// here `moveToPos` is original position
yaw = clamp_angle(script->functionTemp[2] + hiddenBoo->yaw);
npc->yaw = yaw;
npc->pos.x = hiddenBoo->pos.x;
npc->pos.z = hiddenBoo->pos.z;
npc_move_heading(npc, hiddenBoo->planarFlyDist, yaw);
interpAlpha = (40.0f - npc->duration) / 40.0f;
alphaSquared = interpAlpha * interpAlpha;
alphaCubed = interpAlpha * interpAlpha * interpAlpha;
posX = npc->pos.x;
posZ = npc->pos.z;
deltaX = (npc->pos.x - npc->moveToPos.x) * alphaSquared;
deltaZ = (npc->pos.z - npc->moveToPos.z) * alphaSquared;
posY = hiddenBoo->pos.y + 1000.0f;
npc->pos.y = posY;
npc->pos.x = posX - deltaX;
npc->pos.y -= (npc->pos.y - npc->moveToPos.y) * alphaCubed;
npc->pos.z = posZ - deltaZ;
npc->duration++;
if (npc->duration == 40) {
script->functionTemp[1] = 12;
script->functionTemp[1] = RING_STATE_12;
}
break;
case 12:
case 13:
case 14:
yaw = clamp_angle(script->functionTemp[2] + npc2->yaw);
// at this stage, the movement of the ring is controlled by MV_KeepAwayMovement
case RING_STATE_12:
case RING_STATE_13:
case RING_STATE_14:
yaw = clamp_angle(script->functionTemp[2] + hiddenBoo->yaw);
npc->yaw = yaw;
script->functionTemp[1] = N(func_802402A0_BC8100)(evt_get_variable(script, MV_Unk_03));
npc->pos.x = npc2->pos.x;
npc->pos.z = npc2->pos.z;
npc_move_heading(npc, npc2->planarFlyDist, yaw);
npc->pos.y = npc2->pos.y + 1000.0f;
script->functionTemp[1] = N(SetRingMovement)(evt_get_variable(script, MV_KeepAwayMovement));
npc->pos.x = hiddenBoo->pos.x;
npc->pos.z = hiddenBoo->pos.z;
npc_move_heading(npc, hiddenBoo->planarFlyDist, yaw);
npc->pos.y = hiddenBoo->pos.y + 1000.0f;
break;
case 100:
script->functionTemp[1] = N(func_802402A0_BC8100)(evt_get_variable(script, MV_Unk_03));
case RING_STATE_100:
script->functionTemp[1] = N(SetRingMovement)(evt_get_variable(script, MV_KeepAwayMovement));
break;
}
return ApiStatus_DONE2;
}
#else
INCLUDE_ASM(s32, "world/area_obk/obk_04/BC7EB0", func_80240624_BC8484);
#endif
EvtScript N(EVS_NpcIdle_Boo_01) = {
EVT_WAIT(4)
EVT_CALL(N(func_80240050_BC7EB0))
EVT_CALL(N(InitHiddenBoo))
EVT_LABEL(10)
EVT_CALL(N(func_802402F4_BC8154))
EVT_CALL(N(UpdateHiddenBoo))
EVT_WAIT(1)
EVT_GOTO(10)
EVT_RETURN
@ -255,9 +253,9 @@ EvtScript N(EVS_NpcIdle_Boo_01) = {
EvtScript N(EVS_NpcIdle_KeepAwayBoo) = {
EVT_WAIT(5)
EVT_CALL(N(func_802405B4_BC8414))
EVT_CALL(N(InitKeepAwayBoo))
EVT_LABEL(10)
EVT_CALL(func_80240624_BC8484)
EVT_CALL(N(UpdateKeepAwayBoo))
EVT_WAIT(1)
EVT_GOTO(10)
EVT_RETURN

View File

@ -275,7 +275,7 @@ EvtScript N(EVS_Scene_BoosUnleashed) = {
EVT_EXEC(N(EVS_TetherItemToDummy))
EVT_WAIT(1)
EVT_EXEC(N(EVS_IntroduceAndHideBoots))
EVT_SET(MV_Unk_01, 1)
EVT_SET(MV_KeepAwayStarted, TRUE)
EVT_WAIT(30)
EVT_CALL(SetPlayerAnimation, ANIM_Mario_1002B)
EVT_WAIT(20)
@ -370,7 +370,7 @@ EvtScript N(EVS_Scene_BoosUnleashed) = {
EVT_BREAK_LOOP
EVT_END_IF
EVT_END_LOOP
EVT_SET(MV_Unk_03, 3)
EVT_SET(MV_KeepAwayMovement, KEEP_AWAY_SPIRAL)
EVT_CALL(RandInt, 50, LVar0)
EVT_ADD(LVar0, 100)
EVT_WAIT(LVar0)
@ -392,7 +392,7 @@ EvtScript N(EVS_Scene_BoosUnleashed) = {
EVT_BREAK_LOOP
EVT_END_IF
EVT_END_LOOP
EVT_SET(MV_Unk_03, 1)
EVT_SET(MV_KeepAwayMovement, KEEP_AWAY_STOP)
EVT_CALL(DisablePlayerInput, TRUE)
EVT_IF_EQ(MV_KeepAwayResult, KEEP_AWAY_WRONG)
// player hit the wrong Boo, begin another round
@ -420,7 +420,7 @@ EvtScript N(EVS_Scene_BoosUnleashed) = {
EVT_CALL(NpcJump0, NPC_DummyBoo, 0, 65, 0, 10)
EVT_CALL(SpeakToPlayer, NPC_LeaderBoo, ANIM_Boo_Talk, ANIM_Boo_Idle, 5, MSG_CH3_003B)
EVT_SET(MV_KeepAwayResult, KEEP_AWAY_WAITING)
EVT_SET(MV_Unk_03, 0)
EVT_SET(MV_KeepAwayMovement, KEEP_AWAY_CLOCKWISE)
EVT_CALL(N(GetPlayerPosOutsideKeepAwayRing))
EVT_CALL(SetPlayerSpeed, EVT_FLOAT(4.0))
EVT_CALL(PlayerMoveTo, LVar0, LVar2, 0)

View File

@ -20,9 +20,9 @@ s32 N(SongList)[] = {
};
typedef struct PhonographData {
/* 0x000 */ s32 unk_00;
/* 0x004 */ s32 unk_04;
/* 0x008 */ s32 unk_08;
/* 0x000 */ s32 mashMeterSmoothDivisor;
/* 0x004 */ s32 fillValue;
/* 0x008 */ s32 barFillWidth;
/* 0x00C */ s32 songName;
/* 0x010 */ s32 mashMeterDividers[6];
/* 0x028 */ s32 mashMeterIntervals;
@ -66,12 +66,123 @@ PhonographData* N(GetPhonographData)(void) {
return (PhonographData*) evt_get_variable(NULL, MV_PhonographDataPtr);
}
void func_80240564_BCF154(s32, s32, s32);
INCLUDE_ASM(s32, "world/area_obk/obk_07/BCF0F0", func_80240564_BCF154);
u8 N(mashMeter_bgColors)[] = {
33, 33, 117,
29, 35, 163,
70, 12, 180,
107, 0, 120,
115, 13, 19,
};
void N(func_80240A10_BCF600)(s32 arg0, s32 arg1, s32 arg2, s32 arg3) {
N(GetPhonographData)()->unk_00 = arg3;
func_80240564_BCF154(arg0, arg1, arg2);
u8 N(mashMeter_fillColors)[] = {
0, 228, 134,
46, 180, 242,
117, 112, 255,
243, 4, 188,
247, 13, 5,
};
u8 N(mashMeter_cutOffColors)[] = {
45, 56, 210,
84, 40, 209,
125, 44, 181,
161, 27, 85,
255, 255, 255,
};
// similar to draw_mash_meter
void N(DrawMashMeter)(s32 posX, s32 posY, s32 fillValue) {
PhonographData* data = N(GetPhonographData)();
s32 maxCutoff;
s32 width;
s32 i;
s32 cutOff;
s32 offsetX;
s32 s2;
s32 filledWidth;
s32 r, g, b;
posX -= 28;
posY -= 4;
maxCutoff = data->mashMeterDividers[data->mashMeterIntervals];
if (fillValue < 0) {
fillValue = 0;
}
width = 0;
for (i = 0; i < data->mashMeterIntervals; i++) {
cutOff = data->mashMeterDividers[i + 1];
if (cutOff > fillValue) {
cutOff = fillValue;
}
width = cutOff * 60 / maxCutoff * 100;
if (fillValue == cutOff) {
break;
}
}
offsetX = 0;
data->barFillWidth += (width - data->barFillWidth) / data->mashMeterSmoothDivisor;
for (i = 0; i < data->mashMeterIntervals; i++) {
cutOff = data->mashMeterDividers[i + 1];
width = cutOff * 60 / maxCutoff - offsetX;
r = N(mashMeter_bgColors)[i * 3 + 0];
g = N(mashMeter_bgColors)[i * 3 + 1];
b = N(mashMeter_bgColors)[i * 3 + 2];
startup_draw_prim_rect_COPY(posX + offsetX, posY, posX + offsetX + width, posY + 5, r, g, b, 255);
if (i >= data->mashMeterIntervals - 1) {
break;
}
r = N(mashMeter_cutOffColors)[i * 3 + 0];
g = N(mashMeter_cutOffColors)[i * 3 + 1];
b = N(mashMeter_cutOffColors)[i * 3 + 2];
startup_draw_prim_rect_COPY(posX + offsetX + width, posY, posX + offsetX + width, posY + 5, r, g, b, 255);
offsetX += width;
}
offsetX = 0;
for (i = 0; i < data->mashMeterIntervals; i++) {
r = N(mashMeter_fillColors)[i * 3 + 0];
g = N(mashMeter_fillColors)[i * 3 + 1];
b = N(mashMeter_fillColors)[i * 3 + 2];
cutOff = data->mashMeterDividers[i + 1];
if (cutOff > fillValue) {
cutOff = fillValue;
}
width = data->barFillWidth / 100 - offsetX;
filledWidth = cutOff * 60 / maxCutoff - offsetX;
if (width < 0) {
break;
}
if (filledWidth == 0) {
filledWidth = width;
} else if (cutOff == fillValue) {
filledWidth = width;
} else if (filledWidth < width) {
width = filledWidth;
}
startup_draw_prim_rect_COPY(posX + offsetX, posY, posX + offsetX + width, posY + 5, r, g, b, 255);
if (i >= data->mashMeterIntervals - 1) {
break;
}
r = N(mashMeter_cutOffColors)[i * 3 + 0];
g = N(mashMeter_cutOffColors)[i * 3 + 1];
b = N(mashMeter_cutOffColors)[i * 3 + 2];
startup_draw_prim_rect_COPY(posX + offsetX + width, posY, posX + offsetX + width, posY + 5, r, g, b, 255);
offsetX += filledWidth;
}
}
void N(DrawMashMeterWithDivisor)(s32 baseX, s32 baseY, s32 fillValue, s32 smoothDivisor) {
N(GetPhonographData)()->mashMeterSmoothDivisor = smoothDivisor;
N(DrawMashMeter)(baseX, baseY, fillValue);
}
void N(worker_update_phonograph_hud)(void) {
@ -119,7 +230,7 @@ void N(worker_update_phonograph_hud)(void) {
arrCount = ARRAY_COUNT(data->inputBuffer);
idx = data->inputBufferPos;
idx -= arrCount;
data->unk_04 = 0;
data->fillValue = 0;
if (idx < 0) {
idx += arrCount;
}
@ -134,15 +245,15 @@ void N(worker_update_phonograph_hud)(void) {
}
}
evt_set_variable(NULL, MV_MashInputsAmount, mashInputsCount * 1000);
data->unk_04 = (mashInputsCount * 100) / 22;
if (data->unk_04 < 0) {
data->unk_04 = 0;
data->fillValue = (mashInputsCount * 100) / 22;
if (data->fillValue < 0) {
data->fillValue = 0;
}
if (data->unk_04 > 100) {
data->unk_04 = 100;
if (data->fillValue > 100) {
data->fillValue = 100;
}
id = data->unk_08 / 60; // TODO use of id required to match - weird
id = data->barFillWidth / 60; // TODO use of id required to match - weird
if (id <= 50) {
temp = 50.0f;
temp *= sin_rad((((id * 90) / 50) * TAU) / 360.0f);
@ -187,7 +298,7 @@ void N(worker_draw_phonograph_hud)(void) {
hudElemIndex = data->hudElemBlueMeter;
hud_element_draw_clipped(hudElemIndex);
hud_element_get_render_pos(hudElemIndex, &x, &y);
N(func_80240A10_BCF600)(x, y, data->unk_04, 2);
N(DrawMashMeterWithDivisor)(x, y, data->fillValue, 2);
hudElemIndex = data->hudElemOK;
hud_element_draw_clipped(hudElemIndex);
@ -218,8 +329,8 @@ API_CALLABLE(N(CreatePhonographHudData)) {
gOverrideFlags |= GLOBAL_OVERRIDES_10;
data->hudWorker = create_worker_frontUI(N(worker_update_phonograph_hud), N(worker_draw_phonograph_hud));
data->state = PHONOGRAPH_HUD_STATE_INIT;
data->unk_04 = 0;
data->unk_08 = 0;
data->fillValue = 0;
data->barFillWidth = 0;
data->mashMeterDividers[0] = 0;
data->mashMeterDividers[1] = 20;
data->mashMeterDividers[2] = 40;
@ -363,62 +474,51 @@ API_CALLABLE(N(GuardBooDoNothing)) {
return ApiStatus_DONE2;
}
API_CALLABLE(func_80241790_BD0380);
API_CALLABLE(N(func_80241790_BD0380)) {
PhonographData* data = N(GetPhonographData)();
s32 distFromCenter = abs(data->fillValue - 50);
s32 v1, v0;
#ifdef NON_MATCHING // various issues
ApiStatus func_80241790_BD0380(Evt* script) {
UnkObk07* temp_v0 = N(GetPhonographData)();
s32 temp_v0_2 = abs(temp_v0->unk_04 - 50);
s32 var_a0;
s32 var_v0;
s32 var_v1;
var_v1 = -temp_v0_2;
if (temp_v0_2 >= 10) {
var_v0 = temp_v0_2 * 4;
} else {
goto moved;
}
after:
temp_v0->meterFillAmount += (var_v0 + var_v1) * 2;
if (temp_v0->unk_04 != 0) {
temp_v0->unk_1DC = 1;
}
if (temp_v0->unk_1DC == 1) {
var_v1 = temp_v0->unk_04;
if (var_v1 <= 0) {
temp_v0->unk_1D8++;
while (TRUE) {
if (distFromCenter < 10) {
v1 = 10;
v1 -= distFromCenter;
v0 = v1 * 24;
} else {
temp_v0->unk_1D8 = 0;
v1 = -distFromCenter;
v0 = v1 * 4;
}
break;
}
distFromCenter = (v0 + v1) * 2;
data->meterFillAmount += distFromCenter;
if (data->fillValue != 0) {
data->unk_1DC = 1;
}
if (data->unk_1DC == 1) {
if (data->fillValue <= 0) {
data->unk_1D8++;
} else {
data->unk_1D8 = 0;
}
}
if (FALSE) {
moved:
var_v1 = 10;
var_v1 -= temp_v0_2;
var_v0 = var_v1 * 24;
goto after;
if (data->meterFillAmount > 10000) {
data->meterFillAmount = 10000;
}
if (temp_v0->meterFillAmount > 10000) {
temp_v0->meterFillAmount = 10000;
}
if (temp_v0->meterFillAmount < 0) {
temp_v0->meterFillAmount = 0;
if (data->meterFillAmount < 0) {
data->meterFillAmount = 0;
}
script->varTable[0] = 0;
if (temp_v0->unk_1D8 >= 46 || (gGameStatusPtr->pressedButtons[0] & BUTTON_B)) {
if (data->unk_1D8 >= 46 || (gGameStatusPtr->pressedButtons[0] & BUTTON_B)) {
script->varTable[0] = 1;
return ApiStatus_DONE2;
}
return ApiStatus_DONE2;
}
#else
INCLUDE_ASM(s32, "world/area_obk/obk_07/BCF0F0", func_80241790_BD0380);
#endif
API_CALLABLE(N(InitPhonographHud)) {
PhonographData* data = N(GetPhonographData)();
@ -426,7 +526,7 @@ API_CALLABLE(N(InitPhonographHud)) {
data->meterFillAmount = 0;
data->unk_1D8 = 0;
data->unk_1DC = 0;
data->unk_04 = 0;
data->fillValue = 0;
data->state = PHONOGRAPH_HUD_STATE_INIT;
script->varTable[10] = 0;
script->varTable[11] = 0;
@ -509,27 +609,6 @@ API_CALLABLE(N(InitGuardBooAlpha)) {
return ApiStatus_DONE2;
}
u8 N(D_802430A0_BD1C90)[] = {
0x21, 0x21, 0x75, 0x1D,
0x23, 0xA3, 0x46, 0x0C,
0xB4, 0x6B, 0x00, 0x78,
0x73, 0x0D, 0x13, 0x00,
};
u8 N(D_802430B0_BD1CA0)[] = {
0x00, 0xE4, 0x86, 0x2E,
0xB4, 0xF2, 0x75, 0x70,
0xFF, 0xF3, 0x04, 0xBC,
0xF7, 0x0D, 0x05, 0x00,
};
u8 N(D_802430C0_BD1CB0)[] = {
0x2D, 0x38, 0xD2, 0x54,
0x28, 0xD1, 0x7D, 0x2C,
0xB5, 0xA1, 0x1B, 0x55,
0xFF, 0xFF, 0xFF, 0x00,
};
EvtScript N(EVS_UpdatePhonographScale) = {
EVT_LABEL(30)
EVT_CALL(MakeLerp, 100, 200, 30, EASING_COS_IN_OUT)
@ -746,7 +825,7 @@ EvtScript N(EVS_PlayPhonograph) = {
EVT_EXEC_GET_TID(N(EVS_SetRecordRotation), MV_SetRecordScript)
EVT_CALL(N(SavePhonographUpdateScriptIDs))
EVT_LOOP(0)
EVT_CALL(func_80241790_BD0380)
EVT_CALL(N(func_80241790_BD0380))
EVT_IF_EQ(LVar0, 1)
EVT_CALL(N(DestroyPhonographHudData))
EVT_WAIT(1)

View File

@ -47,7 +47,7 @@ EvtScript N(EVS_Main) = {
EVT_SETUP_CAMERA_NO_LEAD()
EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(DefaultNPCs)))
EVT_EXEC_WAIT(N(EVS_MakeEntities))
EVT_SET(AF_OBK_08, FALSE)
EVT_SET(AF_OBK08_KeepAwayStarted, FALSE)
EVT_EXEC(N(EVS_SetupCabinets))
EVT_EXEC(N(EVS_ManageWindows))
EVT_EXEC(N(EVS_TexPan_Fog))

View File

@ -194,7 +194,7 @@ EvtScript N(EVS_Interact_MiddleCabinet) = {
EVT_CALL(DeleteTrigger, MV_Trigger_FarCabinet)
EVT_EXEC(N(EVS_Scene_BoosUnleashed))
EVT_EXEC_WAIT(N(EVS_MiddleCabinet_OpenDoors))
EVT_SET(AF_OBK_08, TRUE)
EVT_SET(AF_OBK08_KeepAwayStarted, TRUE)
EVT_WAIT(50)
EVT_EXEC_WAIT(N(EVS_MiddleCabinet_CloseDoors))
EVT_ELSE

View File

@ -3,6 +3,7 @@
enum {
RING_STATE_0 = 0,
RING_STATE_1 = 1,
RING_STATE_2 = 2,
RING_STATE_10 = 10,
RING_STATE_11 = 11,
RING_STATE_12 = 12,
@ -16,10 +17,10 @@ enum {
API_CALLABLE(N(func_802408A0_BD4110)) {
Npc* npc = get_npc_unsafe(script->owner2.npcID);
s32* ptr = heap_malloc(sizeof(s32)); // todo what is this
s32* isGameStarted = heap_malloc(sizeof(s32)); // todo what is this
npc->blur.any = ptr;
*ptr = NULL;
npc->blur.keepAwayStarted = isGameStarted;
*isGameStarted = NULL;
npc->planarFlyDist = 125.0f;
npc->yaw = 0.0f;
npc->pos.x = 0.0f;
@ -66,25 +67,25 @@ void func_80240A7C_BD42EC(void) {
API_CALLABLE(N(func_80240AF0_BD4360)) {
Npc* npc = get_npc_unsafe(script->owner2.npcID);
s32* temp_s2 = npc->blur.any;
s32* isGameStarted = npc->blur.keepAwayStarted;
s32 temp_v0;
switch (script->functionTemp[1]) {
case 0:
temp_v0 = evt_get_variable(script, AF_OBK_08);
if (temp_v0 == 1) {
*temp_s2 = temp_v0;
script->functionTemp[1] = 10;
case RING_STATE_0:
temp_v0 = evt_get_variable(script, AF_OBK08_KeepAwayStarted);
if (temp_v0 == TRUE) {
*isGameStarted = temp_v0;
script->functionTemp[1] = RING_STATE_10;
}
break;
case 10:
case RING_STATE_10:
npc->yaw = clamp_angle(npc->yaw + 2.0f);
npc->duration--;
if (npc->duration == 0) {
script->functionTemp[1] = 11;
script->functionTemp[1] = RING_STATE_11;
}
break;
case 11:
case RING_STATE_11:
if (npc->pos.y <= -920.0f) {
func_802409E8_BD4258();
}
@ -93,18 +94,18 @@ API_CALLABLE(N(func_80240AF0_BD4360)) {
if (npc->pos.y <= -988.0f) {
evt_set_variable(script, MV_Unk_01, 1);
func_80240A7C_BD42EC();
script->functionTemp[1] = 12;
script->functionTemp[1] = RING_STATE_12;
}
break;
case 12:
case RING_STATE_12:
if (evt_get_variable(script, MV_Unk_02) == 1) {
script->functionTemp[1] = 13;
script->functionTemp[1] = RING_STATE_13;
}
npc->yaw = clamp_angle(npc->yaw + 2.0f);
break;
case 13:
case RING_STATE_13:
if (evt_get_variable(script, MV_Unk_02) == 0) {
script->functionTemp[1] = 12;
script->functionTemp[1] = RING_STATE_12;
}
break;
}
@ -114,15 +115,90 @@ API_CALLABLE(N(func_80240AF0_BD4360)) {
API_CALLABLE(N(func_80240CA0_BD4510)) {
Npc* npc = get_npc_unsafe(script->owner2.npcID);
npc->blur.any = get_npc_unsafe(NPC_Boo_01); // TODO what is this?
npc->blur.keepAwayNpc = get_npc_unsafe(NPC_Boo_01);
script->functionTemp[2] = script->owner2.npcID * 45;
npc->flags |= NPC_FLAG_40000;
script->functionTemp[1] = RING_STATE_0;
return ApiStatus_DONE2;
}
API_CALLABLE(func_80240D10_BD4580);
INCLUDE_ASM(s32, "world/area_obk/obk_08/BD4110", func_80240D10_BD4580);
API_CALLABLE(func_80240D10_BD4580) {
Npc* npc = get_npc_unsafe(script->owner2.npcID);
Npc* hiddenBoo = npc->blur.keepAwayNpc;
f32 posX, posY, posZ;
f32 interpAlpha, alphaSquared;
f32 deltaX, deltaZ;
s32* isGameStarted;
f32 yaw;
isGameStarted = hiddenBoo->blur.keepAwayStarted;
switch (script->functionTemp[1]) {
case RING_STATE_0:
npc->yaw = clamp_angle(script->functionTemp[2] + hiddenBoo->yaw);
if (*isGameStarted == TRUE) {
script->functionTemp[1] = RING_STATE_1;
npc->duration = rand_int(20) + 10;
}
break;
case RING_STATE_1:
yaw = clamp_angle(script->functionTemp[2] + hiddenBoo->yaw);
npc->yaw = yaw;
npc->duration--;
if (npc->duration == 0) {
sfx_play_sound_at_position(SOUND_B000000F, 0, npc->pos.x, npc->pos.y, npc->pos.z);
script->functionTemp[1] = RING_STATE_2;
npc->duration = 0;
npc->moveToPos.x = npc->pos.x;
npc->moveToPos.y = npc->pos.y;
npc->moveToPos.z = npc->pos.z;
}
break;
case RING_STATE_2:
// here `moveToPos` is original position
yaw = clamp_angle(script->functionTemp[2] + hiddenBoo->yaw);
npc->yaw = yaw;
npc->pos.x = hiddenBoo->pos.x;
npc->pos.z = hiddenBoo->pos.z;
npc_move_heading(npc, hiddenBoo->planarFlyDist, yaw);
interpAlpha = (40.0f - npc->duration) / 40.0f;
alphaSquared = interpAlpha * interpAlpha;
posX = npc->pos.x;
posY = hiddenBoo->pos.y + 1000.0f;
posZ = npc->pos.z;
deltaX = (npc->pos.x - npc->moveToPos.x) * alphaSquared;
deltaZ = (npc->pos.z - npc->moveToPos.z) * alphaSquared;
npc->pos.y = posY;
npc->pos.x = posX - deltaX;
npc->pos.y = (npc->pos.y - npc->moveToPos.y) * npc->duration / 40.0f + npc->moveToPos.y;
npc->pos.z = posZ - deltaZ;
npc->duration++;
if (npc->duration == 40) {
script->functionTemp[1] = RING_STATE_10;
}
break;
case RING_STATE_10:
yaw = clamp_angle(script->functionTemp[2] + hiddenBoo->yaw);
npc->yaw = yaw;
if (evt_get_variable(script, MV_Unk_02) == 1) {
script->functionTemp[1] = RING_STATE_13;
}
npc->pos.x = hiddenBoo->pos.x;
npc->pos.z = hiddenBoo->pos.z;
npc_move_heading(npc, hiddenBoo->planarFlyDist, yaw);
npc->pos.y = hiddenBoo->pos.y + 1000.0f;
break;
case RING_STATE_13:
if (evt_get_variable(script, MV_Unk_02) == 0) {
script->functionTemp[1] = RING_STATE_10;
}
break;
}
return ApiStatus_DONE2;
}
EvtScript N(EVS_NpcIdle_Boo_01) = {
EVT_WAIT(4)

View File

@ -1,199 +0,0 @@
.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel func_80240624_BC8484
/* BC8484 80240624 27BDFFC8 */ addiu $sp, $sp, -0x38
/* BC8488 80240628 AFB30024 */ sw $s3, 0x24($sp)
/* BC848C 8024062C 0080982D */ daddu $s3, $a0, $zero
/* BC8490 80240630 AFBF002C */ sw $ra, 0x2c($sp)
/* BC8494 80240634 AFB40028 */ sw $s4, 0x28($sp)
/* BC8498 80240638 AFB20020 */ sw $s2, 0x20($sp)
/* BC849C 8024063C AFB1001C */ sw $s1, 0x1c($sp)
/* BC84A0 80240640 AFB00018 */ sw $s0, 0x18($sp)
/* BC84A4 80240644 F7B40030 */ sdc1 $f20, 0x30($sp)
/* BC84A8 80240648 8E64014C */ lw $a0, 0x14c($s3)
/* BC84AC 8024064C 0C00EABB */ jal get_npc_unsafe
/* BC84B0 80240650 24140002 */ addiu $s4, $zero, 2
/* BC84B4 80240654 0040802D */ daddu $s0, $v0, $zero
/* BC84B8 80240658 8E110020 */ lw $s1, 0x20($s0)
/* BC84BC 8024065C 8E630074 */ lw $v1, 0x74($s3)
/* BC84C0 80240660 8E320020 */ lw $s2, 0x20($s1)
/* BC84C4 80240664 1074003E */ beq $v1, $s4, .L80240760
/* BC84C8 80240668 28620003 */ slti $v0, $v1, 3
/* BC84CC 8024066C 10400007 */ beqz $v0, .L8024068C
/* BC84D0 80240670 2862000C */ slti $v0, $v1, 0xc
/* BC84D4 80240674 1060000D */ beqz $v1, .L802406AC
/* BC84D8 80240678 24020001 */ addiu $v0, $zero, 1
/* BC84DC 8024067C 1062001B */ beq $v1, $v0, .L802406EC
/* BC84E0 80240680 00000000 */ nop
/* BC84E4 80240684 0809023A */ j .L802408E8
/* BC84E8 80240688 00000000 */ nop
.L8024068C:
/* BC84EC 8024068C 14400096 */ bnez $v0, .L802408E8
/* BC84F0 80240690 2862000F */ slti $v0, $v1, 0xf
/* BC84F4 80240694 14400071 */ bnez $v0, .L8024085C
/* BC84F8 80240698 24020064 */ addiu $v0, $zero, 0x64
/* BC84FC 8024069C 1062008C */ beq $v1, $v0, .L802408D0
/* BC8500 802406A0 0260202D */ daddu $a0, $s3, $zero
/* BC8504 802406A4 0809023A */ j .L802408E8
/* BC8508 802406A8 00000000 */ nop
.L802406AC:
/* BC850C 802406AC C620000C */ lwc1 $f0, 0xc($s1)
/* BC8510 802406B0 C66C0078 */ lwc1 $f12, 0x78($s3)
/* BC8514 802406B4 46806320 */ cvt.s.w $f12, $f12
/* BC8518 802406B8 0C00A6C9 */ jal clamp_angle
/* BC851C 802406BC 46006300 */ add.s $f12, $f12, $f0
/* BC8520 802406C0 E600000C */ swc1 $f0, 0xc($s0)
/* BC8524 802406C4 8E430000 */ lw $v1, ($s2)
/* BC8528 802406C8 24020001 */ addiu $v0, $zero, 1
/* BC852C 802406CC 14620086 */ bne $v1, $v0, .L802408E8
/* BC8530 802406D0 00000000 */ nop
/* BC8534 802406D4 24040014 */ addiu $a0, $zero, 0x14
/* BC8538 802406D8 0C00A67F */ jal rand_int
/* BC853C 802406DC AE630074 */ sw $v1, 0x74($s3)
/* BC8540 802406E0 2442000A */ addiu $v0, $v0, 0xa
/* BC8544 802406E4 0809023A */ j .L802408E8
/* BC8548 802406E8 A602008E */ sh $v0, 0x8e($s0)
.L802406EC:
/* BC854C 802406EC C620000C */ lwc1 $f0, 0xc($s1)
/* BC8550 802406F0 C66C0078 */ lwc1 $f12, 0x78($s3)
/* BC8554 802406F4 46806320 */ cvt.s.w $f12, $f12
/* BC8558 802406F8 0C00A6C9 */ jal clamp_angle
/* BC855C 802406FC 46006300 */ add.s $f12, $f12, $f0
/* BC8560 80240700 9602008E */ lhu $v0, 0x8e($s0)
/* BC8564 80240704 E600000C */ swc1 $f0, 0xc($s0)
/* BC8568 80240708 2442FFFF */ addiu $v0, $v0, -1
/* BC856C 8024070C A602008E */ sh $v0, 0x8e($s0)
/* BC8570 80240710 00021400 */ sll $v0, $v0, 0x10
/* BC8574 80240714 14400074 */ bnez $v0, .L802408E8
/* BC8578 80240718 00000000 */ nop
/* BC857C 8024071C 3C04B000 */ lui $a0, 0xb000
/* BC8580 80240720 C6000040 */ lwc1 $f0, 0x40($s0)
/* BC8584 80240724 3484000F */ ori $a0, $a0, 0xf
/* BC8588 80240728 E7A00010 */ swc1 $f0, 0x10($sp)
/* BC858C 8024072C 8E060038 */ lw $a2, 0x38($s0)
/* BC8590 80240730 8E07003C */ lw $a3, 0x3c($s0)
/* BC8594 80240734 0C052757 */ jal sfx_play_sound_at_position
/* BC8598 80240738 0000282D */ daddu $a1, $zero, $zero
/* BC859C 8024073C AE740074 */ sw $s4, 0x74($s3)
/* BC85A0 80240740 C6000038 */ lwc1 $f0, 0x38($s0)
/* BC85A4 80240744 C602003C */ lwc1 $f2, 0x3c($s0)
/* BC85A8 80240748 C6040040 */ lwc1 $f4, 0x40($s0)
/* BC85AC 8024074C A600008E */ sh $zero, 0x8e($s0)
/* BC85B0 80240750 E6000060 */ swc1 $f0, 0x60($s0)
/* BC85B4 80240754 E6020064 */ swc1 $f2, 0x64($s0)
/* BC85B8 80240758 0809023A */ j .L802408E8
/* BC85BC 8024075C E6040068 */ swc1 $f4, 0x68($s0)
.L80240760:
/* BC85C0 80240760 C620000C */ lwc1 $f0, 0xc($s1)
/* BC85C4 80240764 C66C0078 */ lwc1 $f12, 0x78($s3)
/* BC85C8 80240768 46806320 */ cvt.s.w $f12, $f12
/* BC85CC 8024076C 0C00A6C9 */ jal clamp_angle
/* BC85D0 80240770 46006300 */ add.s $f12, $f12, $f0
/* BC85D4 80240774 46000506 */ mov.s $f20, $f0
/* BC85D8 80240778 4406A000 */ mfc1 $a2, $f20
/* BC85DC 8024077C 00000000 */ nop
/* BC85E0 80240780 AE06000C */ sw $a2, 0xc($s0)
/* BC85E4 80240784 C6200038 */ lwc1 $f0, 0x38($s1)
/* BC85E8 80240788 E6000038 */ swc1 $f0, 0x38($s0)
/* BC85EC 8024078C C6200040 */ lwc1 $f0, 0x40($s1)
/* BC85F0 80240790 E6000040 */ swc1 $f0, 0x40($s0)
/* BC85F4 80240794 8E250010 */ lw $a1, 0x10($s1)
/* BC85F8 80240798 0C00EA95 */ jal npc_move_heading
/* BC85FC 8024079C 0200202D */ daddu $a0, $s0, $zero
/* BC8600 802407A0 8602008E */ lh $v0, 0x8e($s0)
/* BC8604 802407A4 3C014220 */ lui $at, 0x4220
/* BC8608 802407A8 44810000 */ mtc1 $at, $f0
/* BC860C 802407AC 44822000 */ mtc1 $v0, $f4
/* BC8610 802407B0 00000000 */ nop
/* BC8614 802407B4 46802120 */ cvt.s.w $f4, $f4
/* BC8618 802407B8 46040101 */ sub.s $f4, $f0, $f4
/* BC861C 802407BC 46002103 */ div.s $f4, $f4, $f0
/* BC8620 802407C0 46042282 */ mul.s $f10, $f4, $f4
/* BC8624 802407C4 00000000 */ nop
/* BC8628 802407C8 46045102 */ mul.s $f4, $f10, $f4
/* BC862C 802407CC 00000000 */ nop
/* BC8630 802407D0 C60E0038 */ lwc1 $f14, 0x38($s0)
/* BC8634 802407D4 C6080060 */ lwc1 $f8, 0x60($s0)
/* BC8638 802407D8 46087201 */ sub.s $f8, $f14, $f8
/* BC863C 802407DC 460A4202 */ mul.s $f8, $f8, $f10
/* BC8640 802407E0 00000000 */ nop
/* BC8644 802407E4 C60C0040 */ lwc1 $f12, 0x40($s0)
/* BC8648 802407E8 C6060068 */ lwc1 $f6, 0x68($s0)
/* BC864C 802407EC 46066181 */ sub.s $f6, $f12, $f6
/* BC8650 802407F0 460A3182 */ mul.s $f6, $f6, $f10
/* BC8654 802407F4 00000000 */ nop
/* BC8658 802407F8 C622003C */ lwc1 $f2, 0x3c($s1)
/* BC865C 802407FC 3C01447A */ lui $at, 0x447a
/* BC8660 80240800 44810000 */ mtc1 $at, $f0
/* BC8664 80240804 00000000 */ nop
/* BC8668 80240808 46001080 */ add.s $f2, $f2, $f0
/* BC866C 8024080C C6000064 */ lwc1 $f0, 0x64($s0)
/* BC8670 80240810 46001001 */ sub.s $f0, $f2, $f0
/* BC8674 80240814 46040002 */ mul.s $f0, $f0, $f4
/* BC8678 80240818 00000000 */ nop
/* BC867C 8024081C 9602008E */ lhu $v0, 0x8e($s0)
/* BC8680 80240820 24030028 */ addiu $v1, $zero, 0x28
/* BC8684 80240824 24420001 */ addiu $v0, $v0, 1
/* BC8688 80240828 46087381 */ sub.s $f14, $f14, $f8
/* BC868C 8024082C A602008E */ sh $v0, 0x8e($s0)
/* BC8690 80240830 00021400 */ sll $v0, $v0, 0x10
/* BC8694 80240834 46066301 */ sub.s $f12, $f12, $f6
/* BC8698 80240838 00021403 */ sra $v0, $v0, 0x10
/* BC869C 8024083C E602003C */ swc1 $f2, 0x3c($s0)
/* BC86A0 80240840 46001081 */ sub.s $f2, $f2, $f0
/* BC86A4 80240844 E60E0038 */ swc1 $f14, 0x38($s0)
/* BC86A8 80240848 E60C0040 */ swc1 $f12, 0x40($s0)
/* BC86AC 8024084C 14430026 */ bne $v0, $v1, .L802408E8
/* BC86B0 80240850 E602003C */ swc1 $f2, 0x3c($s0)
/* BC86B4 80240854 08090239 */ j .L802408E4
/* BC86B8 80240858 2402000C */ addiu $v0, $zero, 0xc
.L8024085C:
/* BC86BC 8024085C C620000C */ lwc1 $f0, 0xc($s1)
/* BC86C0 80240860 C66C0078 */ lwc1 $f12, 0x78($s3)
/* BC86C4 80240864 46806320 */ cvt.s.w $f12, $f12
/* BC86C8 80240868 0C00A6C9 */ jal clamp_angle
/* BC86CC 8024086C 46006300 */ add.s $f12, $f12, $f0
/* BC86D0 80240870 46000506 */ mov.s $f20, $f0
/* BC86D4 80240874 0260202D */ daddu $a0, $s3, $zero
/* BC86D8 80240878 3C05FD05 */ lui $a1, 0xfd05
/* BC86DC 8024087C 34A50F83 */ ori $a1, $a1, 0xf83
/* BC86E0 80240880 0C0B1EAF */ jal evt_get_variable
/* BC86E4 80240884 E614000C */ swc1 $f20, 0xc($s0)
/* BC86E8 80240888 0C0900A8 */ jal obk_04_func_802402A0_BC8100
/* BC86EC 8024088C 0040202D */ daddu $a0, $v0, $zero
/* BC86F0 80240890 AE620074 */ sw $v0, 0x74($s3)
/* BC86F4 80240894 C6200038 */ lwc1 $f0, 0x38($s1)
/* BC86F8 80240898 4406A000 */ mfc1 $a2, $f20
/* BC86FC 8024089C E6000038 */ swc1 $f0, 0x38($s0)
/* BC8700 802408A0 C6200040 */ lwc1 $f0, 0x40($s1)
/* BC8704 802408A4 E6000040 */ swc1 $f0, 0x40($s0)
/* BC8708 802408A8 8E250010 */ lw $a1, 0x10($s1)
/* BC870C 802408AC 0C00EA95 */ jal npc_move_heading
/* BC8710 802408B0 0200202D */ daddu $a0, $s0, $zero
/* BC8714 802408B4 C620003C */ lwc1 $f0, 0x3c($s1)
/* BC8718 802408B8 3C01447A */ lui $at, 0x447a
/* BC871C 802408BC 44811000 */ mtc1 $at, $f2
/* BC8720 802408C0 00000000 */ nop
/* BC8724 802408C4 46020000 */ add.s $f0, $f0, $f2
/* BC8728 802408C8 0809023A */ j .L802408E8
/* BC872C 802408CC E600003C */ swc1 $f0, 0x3c($s0)
.L802408D0:
/* BC8730 802408D0 3C05FD05 */ lui $a1, 0xfd05
/* BC8734 802408D4 0C0B1EAF */ jal evt_get_variable
/* BC8738 802408D8 34A50F83 */ ori $a1, $a1, 0xf83
/* BC873C 802408DC 0C0900A8 */ jal obk_04_func_802402A0_BC8100
/* BC8740 802408E0 0040202D */ daddu $a0, $v0, $zero
.L802408E4:
/* BC8744 802408E4 AE620074 */ sw $v0, 0x74($s3)
.L802408E8:
/* BC8748 802408E8 8FBF002C */ lw $ra, 0x2c($sp)
/* BC874C 802408EC 8FB40028 */ lw $s4, 0x28($sp)
/* BC8750 802408F0 8FB30024 */ lw $s3, 0x24($sp)
/* BC8754 802408F4 8FB20020 */ lw $s2, 0x20($sp)
/* BC8758 802408F8 8FB1001C */ lw $s1, 0x1c($sp)
/* BC875C 802408FC 8FB00018 */ lw $s0, 0x18($sp)
/* BC8760 80240900 D7B40030 */ ldc1 $f20, 0x30($sp)
/* BC8764 80240904 24020002 */ addiu $v0, $zero, 2
/* BC8768 80240908 03E00008 */ jr $ra
/* BC876C 8024090C 27BD0038 */ addiu $sp, $sp, 0x38

View File

@ -1,323 +0,0 @@
.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel func_80240564_BCF154
/* BCF154 80240564 27BDFF98 */ addiu $sp, $sp, -0x68
/* BCF158 80240568 AFBE0060 */ sw $fp, 0x60($sp)
/* BCF15C 8024056C 00C0F02D */ daddu $fp, $a2, $zero
/* BCF160 80240570 AFBF0064 */ sw $ra, 0x64($sp)
/* BCF164 80240574 AFB7005C */ sw $s7, 0x5c($sp)
/* BCF168 80240578 AFB60058 */ sw $s6, 0x58($sp)
/* BCF16C 8024057C AFB50054 */ sw $s5, 0x54($sp)
/* BCF170 80240580 AFB40050 */ sw $s4, 0x50($sp)
/* BCF174 80240584 AFB3004C */ sw $s3, 0x4c($sp)
/* BCF178 80240588 AFB20048 */ sw $s2, 0x48($sp)
/* BCF17C 8024058C AFB10044 */ sw $s1, 0x44($sp)
/* BCF180 80240590 AFB00040 */ sw $s0, 0x40($sp)
/* BCF184 80240594 AFA40068 */ sw $a0, 0x68($sp)
/* BCF188 80240598 0C090150 */ jal obk_07_GetPhonographData
/* BCF18C 8024059C AFA5006C */ sw $a1, 0x6c($sp)
/* BCF190 802405A0 8FAB0068 */ lw $t3, 0x68($sp)
/* BCF194 802405A4 0040A82D */ daddu $s5, $v0, $zero
/* BCF198 802405A8 256BFFE4 */ addiu $t3, $t3, -0x1c
/* BCF19C 802405AC AFAB0068 */ sw $t3, 0x68($sp)
/* BCF1A0 802405B0 8FAB006C */ lw $t3, 0x6c($sp)
/* BCF1A4 802405B4 8EA30028 */ lw $v1, 0x28($s5)
/* BCF1A8 802405B8 256BFFFC */ addiu $t3, $t3, -4
/* BCF1AC 802405BC 00031080 */ sll $v0, $v1, 2
/* BCF1B0 802405C0 02A21021 */ addu $v0, $s5, $v0
/* BCF1B4 802405C4 AFAB006C */ sw $t3, 0x6c($sp)
/* BCF1B8 802405C8 8C420010 */ lw $v0, 0x10($v0)
/* BCF1BC 802405CC 07C10002 */ bgez $fp, .L802405D8
/* BCF1C0 802405D0 AFA20020 */ sw $v0, 0x20($sp)
/* BCF1C4 802405D4 0000F02D */ daddu $fp, $zero, $zero
.L802405D8:
/* BCF1C8 802405D8 0000802D */ daddu $s0, $zero, $zero
/* BCF1CC 802405DC 18600021 */ blez $v1, .L80240664
/* BCF1D0 802405E0 0200902D */ daddu $s2, $s0, $zero
/* BCF1D4 802405E4 0060302D */ daddu $a2, $v1, $zero
/* BCF1D8 802405E8 26440001 */ addiu $a0, $s2, 1
.L802405EC:
/* BCF1DC 802405EC 00041080 */ sll $v0, $a0, 2
/* BCF1E0 802405F0 02A21021 */ addu $v0, $s5, $v0
/* BCF1E4 802405F4 8C450010 */ lw $a1, 0x10($v0)
/* BCF1E8 802405F8 03C5102A */ slt $v0, $fp, $a1
/* BCF1EC 802405FC 54400001 */ bnel $v0, $zero, .L80240604
/* BCF1F0 80240600 03C0282D */ daddu $a1, $fp, $zero
.L80240604:
/* BCF1F4 80240604 00051900 */ sll $v1, $a1, 4
/* BCF1F8 80240608 00651823 */ subu $v1, $v1, $a1
/* BCF1FC 8024060C 8FAB0020 */ lw $t3, 0x20($sp)
/* BCF200 80240610 00031880 */ sll $v1, $v1, 2
/* BCF204 80240614 15600002 */ bnez $t3, .L80240620
/* BCF208 80240618 006B001A */ div $zero, $v1, $t3
/* BCF20C 8024061C 0007000D */ break 7
.L80240620:
/* BCF210 80240620 2401FFFF */ addiu $at, $zero, -1
/* BCF214 80240624 15610004 */ bne $t3, $at, .L80240638
/* BCF218 80240628 3C018000 */ lui $at, 0x8000
/* BCF21C 8024062C 14610002 */ bne $v1, $at, .L80240638
/* BCF220 80240630 00000000 */ nop
/* BCF224 80240634 0006000D */ break 6
.L80240638:
/* BCF228 80240638 00001812 */ mflo $v1
/* BCF22C 8024063C 00031040 */ sll $v0, $v1, 1
/* BCF230 80240640 00431021 */ addu $v0, $v0, $v1
/* BCF234 80240644 000210C0 */ sll $v0, $v0, 3
/* BCF238 80240648 00431021 */ addu $v0, $v0, $v1
/* BCF23C 8024064C 13C50005 */ beq $fp, $a1, .L80240664
/* BCF240 80240650 00028080 */ sll $s0, $v0, 2
/* BCF244 80240654 0080902D */ daddu $s2, $a0, $zero
/* BCF248 80240658 0246102A */ slt $v0, $s2, $a2
/* BCF24C 8024065C 1440FFE3 */ bnez $v0, .L802405EC
/* BCF250 80240660 26440001 */ addiu $a0, $s2, 1
.L80240664:
/* BCF254 80240664 8EA40008 */ lw $a0, 8($s5)
/* BCF258 80240668 8EA30000 */ lw $v1, ($s5)
/* BCF25C 8024066C 02041023 */ subu $v0, $s0, $a0
/* BCF260 80240670 14600002 */ bnez $v1, .L8024067C
/* BCF264 80240674 0043001A */ div $zero, $v0, $v1
/* BCF268 80240678 0007000D */ break 7
.L8024067C:
/* BCF26C 8024067C 2401FFFF */ addiu $at, $zero, -1
/* BCF270 80240680 14610004 */ bne $v1, $at, .L80240694
/* BCF274 80240684 3C018000 */ lui $at, 0x8000
/* BCF278 80240688 14410002 */ bne $v0, $at, .L80240694
/* BCF27C 8024068C 00000000 */ nop
/* BCF280 80240690 0006000D */ break 6
.L80240694:
/* BCF284 80240694 00001012 */ mflo $v0
/* BCF288 80240698 0000A02D */ daddu $s4, $zero, $zero
/* BCF28C 8024069C 0280902D */ daddu $s2, $s4, $zero
/* BCF290 802406A0 8EA30028 */ lw $v1, 0x28($s5)
/* BCF294 802406A4 00822021 */ addu $a0, $a0, $v0
/* BCF298 802406A8 18600055 */ blez $v1, .L80240800
/* BCF29C 802406AC AEA40008 */ sw $a0, 8($s5)
/* BCF2A0 802406B0 8FAB006C */ lw $t3, 0x6c($sp)
/* BCF2A4 802406B4 000B1400 */ sll $v0, $t3, 0x10
/* BCF2A8 802406B8 00021403 */ sra $v0, $v0, 0x10
/* BCF2AC 802406BC AFA20028 */ sw $v0, 0x28($sp)
/* BCF2B0 802406C0 25620005 */ addiu $v0, $t3, 5
/* BCF2B4 802406C4 00021400 */ sll $v0, $v0, 0x10
/* BCF2B8 802406C8 00021403 */ sra $v0, $v0, 0x10
/* BCF2BC 802406CC AFA2002C */ sw $v0, 0x2c($sp)
.L802406D0:
/* BCF2C0 802406D0 264B0001 */ addiu $t3, $s2, 1
/* BCF2C4 802406D4 000B1080 */ sll $v0, $t3, 2
/* BCF2C8 802406D8 02A21021 */ addu $v0, $s5, $v0
/* BCF2CC 802406DC AFAB0024 */ sw $t3, 0x24($sp)
/* BCF2D0 802406E0 8C450010 */ lw $a1, 0x10($v0)
/* BCF2D4 802406E4 8FAB0020 */ lw $t3, 0x20($sp)
/* BCF2D8 802406E8 00051900 */ sll $v1, $a1, 4
/* BCF2DC 802406EC 00651823 */ subu $v1, $v1, $a1
/* BCF2E0 802406F0 00031880 */ sll $v1, $v1, 2
/* BCF2E4 802406F4 15600002 */ bnez $t3, .L80240700
/* BCF2E8 802406F8 006B001A */ div $zero, $v1, $t3
/* BCF2EC 802406FC 0007000D */ break 7
.L80240700:
/* BCF2F0 80240700 2401FFFF */ addiu $at, $zero, -1
/* BCF2F4 80240704 15610004 */ bne $t3, $at, .L80240718
/* BCF2F8 80240708 3C018000 */ lui $at, 0x8000
/* BCF2FC 8024070C 14610002 */ bne $v1, $at, .L80240718
/* BCF300 80240710 00000000 */ nop
/* BCF304 80240714 0006000D */ break 6
.L80240718:
/* BCF308 80240718 00001812 */ mflo $v1
/* BCF30C 8024071C 8FA7002C */ lw $a3, 0x2c($sp)
/* BCF310 80240720 00121040 */ sll $v0, $s2, 1
/* BCF314 80240724 00529821 */ addu $s3, $v0, $s2
/* BCF318 80240728 26770001 */ addiu $s7, $s3, 1
/* BCF31C 8024072C 26760002 */ addiu $s6, $s3, 2
/* BCF320 80240730 8FAB0068 */ lw $t3, 0x68($sp)
/* BCF324 80240734 8FA50028 */ lw $a1, 0x28($sp)
/* BCF328 80240738 01743021 */ addu $a2, $t3, $s4
/* BCF32C 8024073C 00062400 */ sll $a0, $a2, 0x10
/* BCF330 80240740 00042403 */ sra $a0, $a0, 0x10
/* BCF334 80240744 3C0B8024 */ lui $t3, %hi(obk_07_D_802430A0_BD1C90)
/* BCF338 80240748 256B30A0 */ addiu $t3, $t3, %lo(obk_07_D_802430A0_BD1C90)
/* BCF33C 8024074C 02EB1021 */ addu $v0, $s7, $t3
/* BCF340 80240750 904A0000 */ lbu $t2, ($v0)
/* BCF344 80240754 02CB1021 */ addu $v0, $s6, $t3
/* BCF348 80240758 90490000 */ lbu $t1, ($v0)
/* BCF34C 8024075C 026B1021 */ addu $v0, $s3, $t3
/* BCF350 80240760 90420000 */ lbu $v0, ($v0)
/* BCF354 80240764 240B00FF */ addiu $t3, $zero, 0xff
/* BCF358 80240768 AFAB001C */ sw $t3, 0x1c($sp)
/* BCF35C 8024076C AFA20010 */ sw $v0, 0x10($sp)
/* BCF360 80240770 AFAA0014 */ sw $t2, 0x14($sp)
/* BCF364 80240774 AFA90018 */ sw $t1, 0x18($sp)
/* BCF368 80240778 00748023 */ subu $s0, $v1, $s4
/* BCF36C 8024077C 00D03021 */ addu $a2, $a2, $s0
/* BCF370 80240780 00063400 */ sll $a2, $a2, 0x10
/* BCF374 80240784 00068C03 */ sra $s1, $a2, 0x10
/* BCF378 80240788 0C00AAB1 */ jal startup_draw_prim_rect_COPY
/* BCF37C 8024078C 0220302D */ daddu $a2, $s1, $zero
/* BCF380 80240790 8EA20028 */ lw $v0, 0x28($s5)
/* BCF384 80240794 2442FFFF */ addiu $v0, $v0, -1
/* BCF388 80240798 0242102A */ slt $v0, $s2, $v0
/* BCF38C 8024079C 10400017 */ beqz $v0, .L802407FC
/* BCF390 802407A0 0220202D */ daddu $a0, $s1, $zero
/* BCF394 802407A4 0080302D */ daddu $a2, $a0, $zero
/* BCF398 802407A8 3C0B8024 */ lui $t3, %hi(obk_07_D_802430C0_BD1CB0)
/* BCF39C 802407AC 256B30C0 */ addiu $t3, $t3, %lo(obk_07_D_802430C0_BD1CB0)
/* BCF3A0 802407B0 02EB1021 */ addu $v0, $s7, $t3
/* BCF3A4 802407B4 904A0000 */ lbu $t2, ($v0)
/* BCF3A8 802407B8 02CB1021 */ addu $v0, $s6, $t3
/* BCF3AC 802407BC 90490000 */ lbu $t1, ($v0)
/* BCF3B0 802407C0 026B1021 */ addu $v0, $s3, $t3
/* BCF3B4 802407C4 8FA50028 */ lw $a1, 0x28($sp)
/* BCF3B8 802407C8 8FA7002C */ lw $a3, 0x2c($sp)
/* BCF3BC 802407CC 90420000 */ lbu $v0, ($v0)
/* BCF3C0 802407D0 240B00FF */ addiu $t3, $zero, 0xff
/* BCF3C4 802407D4 AFAB001C */ sw $t3, 0x1c($sp)
/* BCF3C8 802407D8 AFA20010 */ sw $v0, 0x10($sp)
/* BCF3CC 802407DC AFAA0014 */ sw $t2, 0x14($sp)
/* BCF3D0 802407E0 0C00AAB1 */ jal startup_draw_prim_rect_COPY
/* BCF3D4 802407E4 AFA90018 */ sw $t1, 0x18($sp)
/* BCF3D8 802407E8 8EA20028 */ lw $v0, 0x28($s5)
/* BCF3DC 802407EC 8FB20024 */ lw $s2, 0x24($sp)
/* BCF3E0 802407F0 0242102A */ slt $v0, $s2, $v0
/* BCF3E4 802407F4 1440FFB6 */ bnez $v0, .L802406D0
/* BCF3E8 802407F8 0290A021 */ addu $s4, $s4, $s0
.L802407FC:
/* BCF3EC 802407FC 0000A02D */ daddu $s4, $zero, $zero
.L80240800:
/* BCF3F0 80240800 8EA20028 */ lw $v0, 0x28($s5)
/* BCF3F4 80240804 18400076 */ blez $v0, .L802409E0
/* BCF3F8 80240808 0280902D */ daddu $s2, $s4, $zero
/* BCF3FC 8024080C 24160002 */ addiu $s6, $zero, 2
/* BCF400 80240810 24130001 */ addiu $s3, $zero, 1
/* BCF404 80240814 8FAB006C */ lw $t3, 0x6c($sp)
/* BCF408 80240818 3C178024 */ lui $s7, %hi(obk_07_D_802430B0_BD1CA0)
/* BCF40C 8024081C 26F730B0 */ addiu $s7, $s7, %lo(obk_07_D_802430B0_BD1CA0)
/* BCF410 80240820 000B1400 */ sll $v0, $t3, 0x10
/* BCF414 80240824 00021403 */ sra $v0, $v0, 0x10
/* BCF418 80240828 AFA20030 */ sw $v0, 0x30($sp)
/* BCF41C 8024082C 25620005 */ addiu $v0, $t3, 5
/* BCF420 80240830 00021400 */ sll $v0, $v0, 0x10
/* BCF424 80240834 00021403 */ sra $v0, $v0, 0x10
/* BCF428 80240838 3C0B8024 */ lui $t3, %hi(obk_07_D_802430C0_BD1CB0)
/* BCF42C 8024083C 256B30C0 */ addiu $t3, $t3, %lo(obk_07_D_802430C0_BD1CB0)
/* BCF430 80240840 AFAB0038 */ sw $t3, 0x38($sp)
/* BCF434 80240844 240B0004 */ addiu $t3, $zero, 4
/* BCF438 80240848 AFA20034 */ sw $v0, 0x34($sp)
/* BCF43C 8024084C AFAB003C */ sw $t3, 0x3c($sp)
.L80240850:
/* BCF440 80240850 3C0B8024 */ lui $t3, %hi(obk_07_D_802430B0_BD1CA0)
/* BCF444 80240854 256B30B0 */ addiu $t3, $t3, %lo(obk_07_D_802430B0_BD1CA0)
/* BCF448 80240858 026B1021 */ addu $v0, $s3, $t3
/* BCF44C 8024085C 904A0000 */ lbu $t2, ($v0)
/* BCF450 80240860 8FAB003C */ lw $t3, 0x3c($sp)
/* BCF454 80240864 92E80000 */ lbu $t0, ($s7)
/* BCF458 80240868 02AB1021 */ addu $v0, $s5, $t3
/* BCF45C 8024086C 3C0B8024 */ lui $t3, %hi(obk_07_D_802430B0_BD1CA0)
/* BCF460 80240870 256B30B0 */ addiu $t3, $t3, %lo(obk_07_D_802430B0_BD1CA0)
/* BCF464 80240874 8C450010 */ lw $a1, 0x10($v0)
/* BCF468 80240878 02CB1021 */ addu $v0, $s6, $t3
/* BCF46C 8024087C 90490000 */ lbu $t1, ($v0)
/* BCF470 80240880 03C5102A */ slt $v0, $fp, $a1
/* BCF474 80240884 54400001 */ bnel $v0, $zero, .L8024088C
/* BCF478 80240888 03C0282D */ daddu $a1, $fp, $zero
.L8024088C:
/* BCF47C 8024088C 00051900 */ sll $v1, $a1, 4
/* BCF480 80240890 00651823 */ subu $v1, $v1, $a1
/* BCF484 80240894 8FAB0020 */ lw $t3, 0x20($sp)
/* BCF488 80240898 00031880 */ sll $v1, $v1, 2
/* BCF48C 8024089C 15600002 */ bnez $t3, .L802408A8
/* BCF490 802408A0 006B001A */ div $zero, $v1, $t3
/* BCF494 802408A4 0007000D */ break 7
.L802408A8:
/* BCF498 802408A8 2401FFFF */ addiu $at, $zero, -1
/* BCF49C 802408AC 15610004 */ bne $t3, $at, .L802408C0
/* BCF4A0 802408B0 3C018000 */ lui $at, 0x8000
/* BCF4A4 802408B4 14610002 */ bne $v1, $at, .L802408C0
/* BCF4A8 802408B8 00000000 */ nop
/* BCF4AC 802408BC 0006000D */ break 6
.L802408C0:
/* BCF4B0 802408C0 00001812 */ mflo $v1
/* BCF4B4 802408C4 8EA40008 */ lw $a0, 8($s5)
/* BCF4B8 802408C8 3C0251EB */ lui $v0, 0x51eb
/* BCF4BC 802408CC 3442851F */ ori $v0, $v0, 0x851f
/* BCF4C0 802408D0 00820018 */ mult $a0, $v0
/* BCF4C4 802408D4 000427C3 */ sra $a0, $a0, 0x1f
/* BCF4C8 802408D8 00006010 */ mfhi $t4
/* BCF4CC 802408DC 000C1143 */ sra $v0, $t4, 5
/* BCF4D0 802408E0 00441023 */ subu $v0, $v0, $a0
/* BCF4D4 802408E4 00548023 */ subu $s0, $v0, $s4
/* BCF4D8 802408E8 0600003D */ bltz $s0, .L802409E0
/* BCF4DC 802408EC 00748823 */ subu $s1, $v1, $s4
/* BCF4E0 802408F0 52200007 */ beql $s1, $zero, .L80240910
/* BCF4E4 802408F4 0200882D */ daddu $s1, $s0, $zero
/* BCF4E8 802408F8 14BE0003 */ bne $a1, $fp, .L80240908
/* BCF4EC 802408FC 0230102A */ slt $v0, $s1, $s0
/* BCF4F0 80240900 08090244 */ j .L80240910
/* BCF4F4 80240904 0200882D */ daddu $s1, $s0, $zero
.L80240908:
/* BCF4F8 80240908 54400001 */ bnel $v0, $zero, .L80240910
/* BCF4FC 8024090C 0220802D */ daddu $s0, $s1, $zero
.L80240910:
/* BCF500 80240910 8FAB0068 */ lw $t3, 0x68($sp)
/* BCF504 80240914 8FA50030 */ lw $a1, 0x30($sp)
/* BCF508 80240918 8FA70034 */ lw $a3, 0x34($sp)
/* BCF50C 8024091C AFA80010 */ sw $t0, 0x10($sp)
/* BCF510 80240920 AFAA0014 */ sw $t2, 0x14($sp)
/* BCF514 80240924 AFA90018 */ sw $t1, 0x18($sp)
/* BCF518 80240928 01741021 */ addu $v0, $t3, $s4
/* BCF51C 8024092C 00022400 */ sll $a0, $v0, 0x10
/* BCF520 80240930 00042403 */ sra $a0, $a0, 0x10
/* BCF524 80240934 00501021 */ addu $v0, $v0, $s0
/* BCF528 80240938 00021400 */ sll $v0, $v0, 0x10
/* BCF52C 8024093C 00028403 */ sra $s0, $v0, 0x10
/* BCF530 80240940 0200302D */ daddu $a2, $s0, $zero
/* BCF534 80240944 240B00FF */ addiu $t3, $zero, 0xff
/* BCF538 80240948 0C00AAB1 */ jal startup_draw_prim_rect_COPY
/* BCF53C 8024094C AFAB001C */ sw $t3, 0x1c($sp)
/* BCF540 80240950 8EA20028 */ lw $v0, 0x28($s5)
/* BCF544 80240954 2442FFFF */ addiu $v0, $v0, -1
/* BCF548 80240958 0242102A */ slt $v0, $s2, $v0
/* BCF54C 8024095C 10400020 */ beqz $v0, .L802409E0
/* BCF550 80240960 0200202D */ daddu $a0, $s0, $zero
/* BCF554 80240964 0080302D */ daddu $a2, $a0, $zero
/* BCF558 80240968 0291A021 */ addu $s4, $s4, $s1
/* BCF55C 8024096C 3C0B8024 */ lui $t3, %hi(obk_07_D_802430C0_BD1CB0)
/* BCF560 80240970 256B30C0 */ addiu $t3, $t3, %lo(obk_07_D_802430C0_BD1CB0)
/* BCF564 80240974 02CB4021 */ addu $t0, $s6, $t3
/* BCF568 80240978 26D60003 */ addiu $s6, $s6, 3
/* BCF56C 8024097C 026B1021 */ addu $v0, $s3, $t3
/* BCF570 80240980 26730003 */ addiu $s3, $s3, 3
/* BCF574 80240984 26F70003 */ addiu $s7, $s7, 3
/* BCF578 80240988 8FAB0038 */ lw $t3, 0x38($sp)
/* BCF57C 8024098C 8FA50030 */ lw $a1, 0x30($sp)
/* BCF580 80240990 91630000 */ lbu $v1, ($t3)
/* BCF584 80240994 256B0003 */ addiu $t3, $t3, 3
/* BCF588 80240998 AFAB0038 */ sw $t3, 0x38($sp)
/* BCF58C 8024099C 8FAB003C */ lw $t3, 0x3c($sp)
/* BCF590 802409A0 8FA70034 */ lw $a3, 0x34($sp)
/* BCF594 802409A4 256B0004 */ addiu $t3, $t3, 4
/* BCF598 802409A8 AFAB003C */ sw $t3, 0x3c($sp)
/* BCF59C 802409AC 904A0000 */ lbu $t2, ($v0)
/* BCF5A0 802409B0 91090000 */ lbu $t1, ($t0)
/* BCF5A4 802409B4 240B00FF */ addiu $t3, $zero, 0xff
/* BCF5A8 802409B8 AFAB001C */ sw $t3, 0x1c($sp)
/* BCF5AC 802409BC AFA30010 */ sw $v1, 0x10($sp)
/* BCF5B0 802409C0 AFAA0014 */ sw $t2, 0x14($sp)
/* BCF5B4 802409C4 0C00AAB1 */ jal startup_draw_prim_rect_COPY
/* BCF5B8 802409C8 AFA90018 */ sw $t1, 0x18($sp)
/* BCF5BC 802409CC 8EA20028 */ lw $v0, 0x28($s5)
/* BCF5C0 802409D0 26520001 */ addiu $s2, $s2, 1
/* BCF5C4 802409D4 0242102A */ slt $v0, $s2, $v0
/* BCF5C8 802409D8 1440FF9D */ bnez $v0, .L80240850
/* BCF5CC 802409DC 00000000 */ nop
.L802409E0:
/* BCF5D0 802409E0 8FBF0064 */ lw $ra, 0x64($sp)
/* BCF5D4 802409E4 8FBE0060 */ lw $fp, 0x60($sp)
/* BCF5D8 802409E8 8FB7005C */ lw $s7, 0x5c($sp)
/* BCF5DC 802409EC 8FB60058 */ lw $s6, 0x58($sp)
/* BCF5E0 802409F0 8FB50054 */ lw $s5, 0x54($sp)
/* BCF5E4 802409F4 8FB40050 */ lw $s4, 0x50($sp)
/* BCF5E8 802409F8 8FB3004C */ lw $s3, 0x4c($sp)
/* BCF5EC 802409FC 8FB20048 */ lw $s2, 0x48($sp)
/* BCF5F0 80240A00 8FB10044 */ lw $s1, 0x44($sp)
/* BCF5F4 80240A04 8FB00040 */ lw $s0, 0x40($sp)
/* BCF5F8 80240A08 03E00008 */ jr $ra
/* BCF5FC 80240A0C 27BD0068 */ addiu $sp, $sp, 0x68

View File

@ -1,79 +0,0 @@
.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel func_80241790_BD0380
/* BD0380 80241790 27BDFFE8 */ addiu $sp, $sp, -0x18
/* BD0384 80241794 AFB00010 */ sw $s0, 0x10($sp)
/* BD0388 80241798 AFBF0014 */ sw $ra, 0x14($sp)
/* BD038C 8024179C 0C090150 */ jal obk_07_GetPhonographData
/* BD0390 802417A0 0080802D */ daddu $s0, $a0, $zero
/* BD0394 802417A4 0040282D */ daddu $a1, $v0, $zero
/* BD0398 802417A8 8CA20004 */ lw $v0, 4($a1)
/* BD039C 802417AC 2442FFCE */ addiu $v0, $v0, -0x32
/* BD03A0 802417B0 04410002 */ bgez $v0, .L802417BC
/* BD03A4 802417B4 0040202D */ daddu $a0, $v0, $zero
/* BD03A8 802417B8 00042023 */ negu $a0, $a0
.L802417BC:
/* BD03AC 802417BC 2882000A */ slti $v0, $a0, 0xa
/* BD03B0 802417C0 14400016 */ bnez $v0, .L8024181C
/* BD03B4 802417C4 00041823 */ negu $v1, $a0
/* BD03B8 802417C8 00031080 */ sll $v0, $v1, 2
.L802417CC:
/* BD03BC 802417CC 00431021 */ addu $v0, $v0, $v1
/* BD03C0 802417D0 00022040 */ sll $a0, $v0, 1
/* BD03C4 802417D4 8CA201D4 */ lw $v0, 0x1d4($a1)
/* BD03C8 802417D8 8CA30004 */ lw $v1, 4($a1)
/* BD03CC 802417DC 00441021 */ addu $v0, $v0, $a0
/* BD03D0 802417E0 10600003 */ beqz $v1, .L802417F0
/* BD03D4 802417E4 ACA201D4 */ sw $v0, 0x1d4($a1)
/* BD03D8 802417E8 24020001 */ addiu $v0, $zero, 1
/* BD03DC 802417EC A0A201DC */ sb $v0, 0x1dc($a1)
.L802417F0:
/* BD03E0 802417F0 80A301DC */ lb $v1, 0x1dc($a1)
/* BD03E4 802417F4 24020001 */ addiu $v0, $zero, 1
/* BD03E8 802417F8 1462000E */ bne $v1, $v0, .L80241834
/* BD03EC 802417FC 00000000 */ nop
/* BD03F0 80241800 8CA20004 */ lw $v0, 4($a1)
/* BD03F4 80241804 5C40000B */ bgtzl $v0, .L80241834
/* BD03F8 80241808 ACA001D8 */ sw $zero, 0x1d8($a1)
/* BD03FC 8024180C 8CA201D8 */ lw $v0, 0x1d8($a1)
/* BD0400 80241810 24420001 */ addiu $v0, $v0, 1
/* BD0404 80241814 0809060D */ j .L80241834
/* BD0408 80241818 ACA201D8 */ sw $v0, 0x1d8($a1)
.L8024181C:
/* BD040C 8024181C 2403000A */ addiu $v1, $zero, 0xa
/* BD0410 80241820 00641823 */ subu $v1, $v1, $a0
/* BD0414 80241824 00031040 */ sll $v0, $v1, 1
/* BD0418 80241828 00431021 */ addu $v0, $v0, $v1
/* BD041C 8024182C 080905F3 */ j .L802417CC
/* BD0420 80241830 000210C0 */ sll $v0, $v0, 3
.L80241834:
/* BD0424 80241834 8CA201D4 */ lw $v0, 0x1d4($a1)
/* BD0428 80241838 28422711 */ slti $v0, $v0, 0x2711
/* BD042C 8024183C 14400002 */ bnez $v0, .L80241848
/* BD0430 80241840 24022710 */ addiu $v0, $zero, 0x2710
/* BD0434 80241844 ACA201D4 */ sw $v0, 0x1d4($a1)
.L80241848:
/* BD0438 80241848 8CA201D4 */ lw $v0, 0x1d4($a1)
/* BD043C 8024184C 04420001 */ bltzl $v0, .L80241854
/* BD0440 80241850 ACA001D4 */ sw $zero, 0x1d4($a1)
.L80241854:
/* BD0444 80241854 AE000084 */ sw $zero, 0x84($s0)
/* BD0448 80241858 8CA201D8 */ lw $v0, 0x1d8($a1)
/* BD044C 8024185C 2842002E */ slti $v0, $v0, 0x2e
/* BD0450 80241860 10400007 */ beqz $v0, .L80241880
/* BD0454 80241864 24020001 */ addiu $v0, $zero, 1
/* BD0458 80241868 3C028007 */ lui $v0, %hi(gGameStatusPtr)
/* BD045C 8024186C 8C42419C */ lw $v0, %lo(gGameStatusPtr)($v0)
/* BD0460 80241870 8C420010 */ lw $v0, 0x10($v0)
/* BD0464 80241874 30424000 */ andi $v0, $v0, 0x4000
/* BD0468 80241878 10400002 */ beqz $v0, .L80241884
/* BD046C 8024187C 24020001 */ addiu $v0, $zero, 1
.L80241880:
/* BD0470 80241880 AE020084 */ sw $v0, 0x84($s0)
.L80241884:
/* BD0474 80241884 24020002 */ addiu $v0, $zero, 2
/* BD0478 80241888 8FBF0014 */ lw $ra, 0x14($sp)
/* BD047C 8024188C 8FB00010 */ lw $s0, 0x10($sp)
/* BD0480 80241890 03E00008 */ jr $ra
/* BD0484 80241894 27BD0018 */ addiu $sp, $sp, 0x18

View File

@ -1,197 +0,0 @@
.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
.section .rodata
dlabel jtbl_80246F00_BDA770
.word .L80240D68_BD45D8, .L80240DA4_BD4614, .L80240E18_BD4688, .L80240FB4_BD4824, .L80240FB4_BD4824, .L80240FB4_BD4824, .L80240FB4_BD4824, .L80240FB4_BD4824, .L80240FB4_BD4824, .L80240FB4_BD4824, .L80240F20_BD4790, .L80240FB4_BD4824, .L80240FB4_BD4824, .L80240F98_BD4808, 0, 0
.section .text
glabel func_80240D10_BD4580
/* BD4580 80240D10 27BDFFC8 */ addiu $sp, $sp, -0x38
/* BD4584 80240D14 AFB20020 */ sw $s2, 0x20($sp)
/* BD4588 80240D18 0080902D */ daddu $s2, $a0, $zero
/* BD458C 80240D1C AFBF0028 */ sw $ra, 0x28($sp)
/* BD4590 80240D20 AFB30024 */ sw $s3, 0x24($sp)
/* BD4594 80240D24 AFB1001C */ sw $s1, 0x1c($sp)
/* BD4598 80240D28 AFB00018 */ sw $s0, 0x18($sp)
/* BD459C 80240D2C F7B40030 */ sdc1 $f20, 0x30($sp)
/* BD45A0 80240D30 0C00EABB */ jal get_npc_unsafe
/* BD45A4 80240D34 8E44014C */ lw $a0, 0x14c($s2)
/* BD45A8 80240D38 0040802D */ daddu $s0, $v0, $zero
/* BD45AC 80240D3C 8E430074 */ lw $v1, 0x74($s2)
/* BD45B0 80240D40 8E110020 */ lw $s1, 0x20($s0)
/* BD45B4 80240D44 2C62000E */ sltiu $v0, $v1, 0xe
/* BD45B8 80240D48 8E330020 */ lw $s3, 0x20($s1)
/* BD45BC 80240D4C 10400099 */ beqz $v0, .L80240FB4_BD4824
/* BD45C0 80240D50 00031080 */ sll $v0, $v1, 2
/* BD45C4 80240D54 3C018024 */ lui $at, %hi(jtbl_80246F00_BDA770)
/* BD45C8 80240D58 00220821 */ addu $at, $at, $v0
/* BD45CC 80240D5C 8C226F00 */ lw $v0, %lo(jtbl_80246F00_BDA770)($at)
/* BD45D0 80240D60 00400008 */ jr $v0
/* BD45D4 80240D64 00000000 */ nop
.L80240D68_BD45D8:
/* BD45D8 80240D68 C620000C */ lwc1 $f0, 0xc($s1)
/* BD45DC 80240D6C C64C0078 */ lwc1 $f12, 0x78($s2)
/* BD45E0 80240D70 46806320 */ cvt.s.w $f12, $f12
/* BD45E4 80240D74 0C00A6C9 */ jal clamp_angle
/* BD45E8 80240D78 46006300 */ add.s $f12, $f12, $f0
/* BD45EC 80240D7C E600000C */ swc1 $f0, 0xc($s0)
/* BD45F0 80240D80 8E630000 */ lw $v1, ($s3)
/* BD45F4 80240D84 24020001 */ addiu $v0, $zero, 1
/* BD45F8 80240D88 1462008A */ bne $v1, $v0, .L80240FB4_BD4824
/* BD45FC 80240D8C 24040014 */ addiu $a0, $zero, 0x14
/* BD4600 80240D90 0C00A67F */ jal rand_int
/* BD4604 80240D94 AE430074 */ sw $v1, 0x74($s2)
/* BD4608 80240D98 2442000A */ addiu $v0, $v0, 0xa
/* BD460C 80240D9C 080903ED */ j .L80240FB4_BD4824
/* BD4610 80240DA0 A602008E */ sh $v0, 0x8e($s0)
.L80240DA4_BD4614:
/* BD4614 80240DA4 C620000C */ lwc1 $f0, 0xc($s1)
/* BD4618 80240DA8 C64C0078 */ lwc1 $f12, 0x78($s2)
/* BD461C 80240DAC 46806320 */ cvt.s.w $f12, $f12
/* BD4620 80240DB0 0C00A6C9 */ jal clamp_angle
/* BD4624 80240DB4 46006300 */ add.s $f12, $f12, $f0
/* BD4628 80240DB8 9602008E */ lhu $v0, 0x8e($s0)
/* BD462C 80240DBC E600000C */ swc1 $f0, 0xc($s0)
/* BD4630 80240DC0 2442FFFF */ addiu $v0, $v0, -1
/* BD4634 80240DC4 A602008E */ sh $v0, 0x8e($s0)
/* BD4638 80240DC8 00021400 */ sll $v0, $v0, 0x10
/* BD463C 80240DCC 14400079 */ bnez $v0, .L80240FB4_BD4824
/* BD4640 80240DD0 3C04B000 */ lui $a0, 0xb000
/* BD4644 80240DD4 C6000040 */ lwc1 $f0, 0x40($s0)
/* BD4648 80240DD8 3484000F */ ori $a0, $a0, 0xf
/* BD464C 80240DDC E7A00010 */ swc1 $f0, 0x10($sp)
/* BD4650 80240DE0 8E060038 */ lw $a2, 0x38($s0)
/* BD4654 80240DE4 8E07003C */ lw $a3, 0x3c($s0)
/* BD4658 80240DE8 0C052757 */ jal sfx_play_sound_at_position
/* BD465C 80240DEC 0000282D */ daddu $a1, $zero, $zero
/* BD4660 80240DF0 24020002 */ addiu $v0, $zero, 2
/* BD4664 80240DF4 AE420074 */ sw $v0, 0x74($s2)
/* BD4668 80240DF8 C6000038 */ lwc1 $f0, 0x38($s0)
/* BD466C 80240DFC C602003C */ lwc1 $f2, 0x3c($s0)
/* BD4670 80240E00 C6040040 */ lwc1 $f4, 0x40($s0)
/* BD4674 80240E04 A600008E */ sh $zero, 0x8e($s0)
/* BD4678 80240E08 E6000060 */ swc1 $f0, 0x60($s0)
/* BD467C 80240E0C E6020064 */ swc1 $f2, 0x64($s0)
/* BD4680 80240E10 080903ED */ j .L80240FB4_BD4824
/* BD4684 80240E14 E6040068 */ swc1 $f4, 0x68($s0)
.L80240E18_BD4688:
/* BD4688 80240E18 C620000C */ lwc1 $f0, 0xc($s1)
/* BD468C 80240E1C C64C0078 */ lwc1 $f12, 0x78($s2)
/* BD4690 80240E20 46806320 */ cvt.s.w $f12, $f12
/* BD4694 80240E24 0C00A6C9 */ jal clamp_angle
/* BD4698 80240E28 46006300 */ add.s $f12, $f12, $f0
/* BD469C 80240E2C 46000506 */ mov.s $f20, $f0
/* BD46A0 80240E30 4406A000 */ mfc1 $a2, $f20
/* BD46A4 80240E34 00000000 */ nop
/* BD46A8 80240E38 AE06000C */ sw $a2, 0xc($s0)
/* BD46AC 80240E3C C6200038 */ lwc1 $f0, 0x38($s1)
/* BD46B0 80240E40 E6000038 */ swc1 $f0, 0x38($s0)
/* BD46B4 80240E44 C6200040 */ lwc1 $f0, 0x40($s1)
/* BD46B8 80240E48 E6000040 */ swc1 $f0, 0x40($s0)
/* BD46BC 80240E4C 8E250010 */ lw $a1, 0x10($s1)
/* BD46C0 80240E50 0C00EA95 */ jal npc_move_heading
/* BD46C4 80240E54 0200202D */ daddu $a0, $s0, $zero
/* BD46C8 80240E58 8602008E */ lh $v0, 0x8e($s0)
/* BD46CC 80240E5C 3C014220 */ lui $at, 0x4220
/* BD46D0 80240E60 44817000 */ mtc1 $at, $f14
/* BD46D4 80240E64 44820000 */ mtc1 $v0, $f0
/* BD46D8 80240E68 00000000 */ nop
/* BD46DC 80240E6C 46800020 */ cvt.s.w $f0, $f0
/* BD46E0 80240E70 46007001 */ sub.s $f0, $f14, $f0
/* BD46E4 80240E74 460E0003 */ div.s $f0, $f0, $f14
/* BD46E8 80240E78 46000002 */ mul.s $f0, $f0, $f0
/* BD46EC 80240E7C 00000000 */ nop
/* BD46F0 80240E80 C60C0038 */ lwc1 $f12, 0x38($s0)
/* BD46F4 80240E84 C6060060 */ lwc1 $f6, 0x60($s0)
/* BD46F8 80240E88 46066181 */ sub.s $f6, $f12, $f6
/* BD46FC 80240E8C 46003182 */ mul.s $f6, $f6, $f0
/* BD4700 80240E90 00000000 */ nop
/* BD4704 80240E94 C60A0040 */ lwc1 $f10, 0x40($s0)
/* BD4708 80240E98 C6080068 */ lwc1 $f8, 0x68($s0)
/* BD470C 80240E9C C624003C */ lwc1 $f4, 0x3c($s1)
/* BD4710 80240EA0 46085201 */ sub.s $f8, $f10, $f8
/* BD4714 80240EA4 3C01447A */ lui $at, 0x447a
/* BD4718 80240EA8 44811000 */ mtc1 $at, $f2
/* BD471C 80240EAC 00000000 */ nop
/* BD4720 80240EB0 46022100 */ add.s $f4, $f4, $f2
/* BD4724 80240EB4 46004202 */ mul.s $f8, $f8, $f0
/* BD4728 80240EB8 00000000 */ nop
/* BD472C 80240EBC E604003C */ swc1 $f4, 0x3c($s0)
/* BD4730 80240EC0 46002006 */ mov.s $f0, $f4
/* BD4734 80240EC4 C6040064 */ lwc1 $f4, 0x64($s0)
/* BD4738 80240EC8 46040001 */ sub.s $f0, $f0, $f4
/* BD473C 80240ECC 44821000 */ mtc1 $v0, $f2
/* BD4740 80240ED0 00000000 */ nop
/* BD4744 80240ED4 468010A0 */ cvt.s.w $f2, $f2
/* BD4748 80240ED8 46020002 */ mul.s $f0, $f0, $f2
/* BD474C 80240EDC 00000000 */ nop
/* BD4750 80240EE0 9602008E */ lhu $v0, 0x8e($s0)
/* BD4754 80240EE4 24030028 */ addiu $v1, $zero, 0x28
/* BD4758 80240EE8 24420001 */ addiu $v0, $v0, 1
/* BD475C 80240EEC 46066301 */ sub.s $f12, $f12, $f6
/* BD4760 80240EF0 A602008E */ sh $v0, 0x8e($s0)
/* BD4764 80240EF4 00021400 */ sll $v0, $v0, 0x10
/* BD4768 80240EF8 46085281 */ sub.s $f10, $f10, $f8
/* BD476C 80240EFC 00021403 */ sra $v0, $v0, 0x10
/* BD4770 80240F00 460E0003 */ div.s $f0, $f0, $f14
/* BD4774 80240F04 46040000 */ add.s $f0, $f0, $f4
/* BD4778 80240F08 E60C0038 */ swc1 $f12, 0x38($s0)
/* BD477C 80240F0C E60A0040 */ swc1 $f10, 0x40($s0)
/* BD4780 80240F10 14430028 */ bne $v0, $v1, .L80240FB4_BD4824
/* BD4784 80240F14 E600003C */ swc1 $f0, 0x3c($s0)
/* BD4788 80240F18 080903EC */ j .L80240FB0
/* BD478C 80240F1C 2402000A */ addiu $v0, $zero, 0xa
.L80240F20_BD4790:
/* BD4790 80240F20 C620000C */ lwc1 $f0, 0xc($s1)
/* BD4794 80240F24 C64C0078 */ lwc1 $f12, 0x78($s2)
/* BD4798 80240F28 46806320 */ cvt.s.w $f12, $f12
/* BD479C 80240F2C 0C00A6C9 */ jal clamp_angle
/* BD47A0 80240F30 46006300 */ add.s $f12, $f12, $f0
/* BD47A4 80240F34 46000506 */ mov.s $f20, $f0
/* BD47A8 80240F38 0240202D */ daddu $a0, $s2, $zero
/* BD47AC 80240F3C 3C05FD05 */ lui $a1, 0xfd05
/* BD47B0 80240F40 34A50F82 */ ori $a1, $a1, 0xf82
/* BD47B4 80240F44 0C0B1EAF */ jal evt_get_variable
/* BD47B8 80240F48 E614000C */ swc1 $f20, 0xc($s0)
/* BD47BC 80240F4C 24030001 */ addiu $v1, $zero, 1
/* BD47C0 80240F50 14430002 */ bne $v0, $v1, .L80240F5C
/* BD47C4 80240F54 2402000D */ addiu $v0, $zero, 0xd
/* BD47C8 80240F58 AE420074 */ sw $v0, 0x74($s2)
.L80240F5C:
/* BD47CC 80240F5C C6200038 */ lwc1 $f0, 0x38($s1)
/* BD47D0 80240F60 4406A000 */ mfc1 $a2, $f20
/* BD47D4 80240F64 E6000038 */ swc1 $f0, 0x38($s0)
/* BD47D8 80240F68 C6200040 */ lwc1 $f0, 0x40($s1)
/* BD47DC 80240F6C E6000040 */ swc1 $f0, 0x40($s0)
/* BD47E0 80240F70 8E250010 */ lw $a1, 0x10($s1)
/* BD47E4 80240F74 0C00EA95 */ jal npc_move_heading
/* BD47E8 80240F78 0200202D */ daddu $a0, $s0, $zero
/* BD47EC 80240F7C C620003C */ lwc1 $f0, 0x3c($s1)
/* BD47F0 80240F80 3C01447A */ lui $at, 0x447a
/* BD47F4 80240F84 44811000 */ mtc1 $at, $f2
/* BD47F8 80240F88 00000000 */ nop
/* BD47FC 80240F8C 46020000 */ add.s $f0, $f0, $f2
/* BD4800 80240F90 080903ED */ j .L80240FB4_BD4824
/* BD4804 80240F94 E600003C */ swc1 $f0, 0x3c($s0)
.L80240F98_BD4808:
/* BD4808 80240F98 0240202D */ daddu $a0, $s2, $zero
/* BD480C 80240F9C 3C05FD05 */ lui $a1, 0xfd05
/* BD4810 80240FA0 0C0B1EAF */ jal evt_get_variable
/* BD4814 80240FA4 34A50F82 */ ori $a1, $a1, 0xf82
/* BD4818 80240FA8 14400002 */ bnez $v0, .L80240FB4_BD4824
/* BD481C 80240FAC 2402000A */ addiu $v0, $zero, 0xa
.L80240FB0:
/* BD4820 80240FB0 AE420074 */ sw $v0, 0x74($s2)
.L80240FB4_BD4824:
/* BD4824 80240FB4 8FBF0028 */ lw $ra, 0x28($sp)
/* BD4828 80240FB8 8FB30024 */ lw $s3, 0x24($sp)
/* BD482C 80240FBC 8FB20020 */ lw $s2, 0x20($sp)
/* BD4830 80240FC0 8FB1001C */ lw $s1, 0x1c($sp)
/* BD4834 80240FC4 8FB00018 */ lw $s0, 0x18($sp)
/* BD4838 80240FC8 D7B40030 */ ldc1 $f20, 0x30($sp)
/* BD483C 80240FCC 24020002 */ addiu $v0, $zero, 2
/* BD4840 80240FD0 03E00008 */ jr $ra
/* BD4844 80240FD4 27BD0038 */ addiu $sp, $sp, 0x38