Match a number of functions and introduce anon unions (#655)

* Match a number of functions and introduce anon unions

* Fix warnings

* Ethan's comments
This commit is contained in:
JoshDuMan 2022-02-24 10:12:33 -05:00 committed by GitHub
parent 48808572d9
commit d86d15bfd5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
69 changed files with 483 additions and 738 deletions

42
include/PR/guint.h Normal file
View File

@ -0,0 +1,42 @@
/**************************************************************************
* *
* Copyright (C) 1994, Silicon Graphics, Inc. *
* *
* These coded instructions, statements, and computer programs contain *
* unpublished proprietary information of Silicon Graphics, Inc., and *
* are protected by Federal copyright law. They may not be disclosed *
* to third parties or copied or duplicated in any form, in whole or *
* in part, without the prior written consent of Silicon Graphics, Inc. *
* *
**************************************************************************/
#include "mbi.h"
#include "gu.h"
typedef union
{
struct
{
unsigned int hi;
unsigned int lo;
} word;
double d;
} du;
typedef union
{
unsigned int i;
float f;
} fu;
#ifndef __GL_GL_H__
typedef float Matrix[4][4];
#endif
#define ROUND(d) (int)(((d) >= 0.0) ? ((d) + 0.5) : ((d) - 0.5))
#define ABS(d) ((d) > 0) ? (d) : -(d)
extern float __libm_qnan_f;

View File

@ -141,8 +141,8 @@ typedef struct Npc {
/* 0x020 */ struct BlurBuffer* blurBuf; ///< Null unless flag 0x100000 is set. /* 0x020 */ struct BlurBuffer* blurBuf; ///< Null unless flag 0x100000 is set.
/* 0x024 */ s32 spriteInstanceID; /* 0x024 */ s32 spriteInstanceID;
/* 0x028 */ union { /* 0x028 */ union {
/* */ u16 h; /* */ u16 h;
/* */ u32 w; /* */ u32 w;
/* */ } currentAnim; /* */ } currentAnim;
/* 0x02C */ s32 unk_2C; /* 0x02C */ s32 unk_2C;
/* 0x030 */ f32 animationSpeed; /* 0x030 */ f32 animationSpeed;
@ -343,9 +343,19 @@ typedef struct Evt {
/* 0x064 */ struct Evt* blockingParent; /* parent? */ /* 0x064 */ struct Evt* blockingParent; /* parent? */
/* 0x068 */ struct Evt* childScript; /* 0x068 */ struct Evt* childScript;
/* 0x06C */ struct Evt* parentScript; /* brother? */ /* 0x06C */ struct Evt* parentScript; /* brother? */
/* 0x070 */ s32 functionTemp[4]; /* 0x070 */ union {
/* */ s32 functionTemp[4];
/* */ f32 functionTempF[4];
/* */ struct Npc* functionTempNpc[4];
/* */ struct Actor* functionTempActor[4];
/* */ struct ActorPart* functionTempActorPart[4];
/* */ };
/* 0x080 */ ApiFunc callFunction; /* 0x080 */ ApiFunc callFunction;
/* 0x084 */ s32 varTable[16]; /* 0x084 */ union {
/* */ s32 varTable[16];
/* */ struct Actor* varTableActor[4];
/* */ struct Enemy* varTableEnemy[4];
/* */ };
/* 0x0C4 */ s32 varFlags[3]; /* 0x0C4 */ s32 varFlags[3];
/* 0x0D0 */ s32 loopStartTable[8]; /* 0x0D0 */ s32 loopStartTable[8];
/* 0x0F0 */ s32 loopCounterTable[8]; /* 0x0F0 */ s32 loopCounterTable[8];

View File

@ -2047,16 +2047,17 @@ enum TimeFreezeMode {
}; };
enum ActionCommand { enum ActionCommand {
ACTION_COMMAND_NONE = 0x00000000,
ACTION_COMMAND_JUMP = 0x00000001, ACTION_COMMAND_JUMP = 0x00000001,
ACTION_COMMAND_SMASH = 0x00000002, ACTION_COMMAND_SMASH = 0x00000002,
ACTION_COMMAND_FLEE = 0x00000003, ACTION_COMMAND_FLEE = 0x00000003,
ACTION_COMMAND_BREAK_FREE = 0x00000004, ACTION_COMMAND_BREAK_FREE = 0x00000004,
ACTION_COMMAND_WHIRLWIND = 0x00000005, ACTION_COMMAND_WHIRLWIND = 0x00000005,
ACTION_COMMAND_STOP_LEECH = 0x00000006, ACTION_COMMAND_STOP_LEECH = 0x00000006,
ACTION__COMMAND_07 = 0x00000007, ACTION_COMMAND_07 = 0x00000007,
ACTION_COMMAND_DIZZY_SHELL = 0x00000008, ACTION_COMMAND_DIZZY_SHELL = 0x00000008,
ACTION_COMMAND_FIRE_SHELL = 0x00000009, ACTION_COMMAND_FIRE_SHELL = 0x00000009,
ACTION__COMMAND_0A = 0x0000000A, ACTION_COMMAND_0A = 0x0000000A,
ACTION_COMMAND_BOMB = 0x0000000B, ACTION_COMMAND_BOMB = 0x0000000B,
ACTION_COMMAND_BODY_SLAM = 0x0000000C, ACTION_COMMAND_BODY_SLAM = 0x0000000C,
ACTION_COMMAND_AIR_LIFT = 0x0000000D, ACTION_COMMAND_AIR_LIFT = 0x0000000D,

View File

@ -851,6 +851,7 @@ void update_merlee_messages(void);
void draw_merlee_messages(void); void draw_merlee_messages(void);
void show_merlee_message(s16, s16); void show_merlee_message(s16, s16);
s32 is_merlee_message_done(void); s32 is_merlee_message_done(void);
void close_action_command_instruction_popup(void);
void draw_encounters_conversation(void); void draw_encounters_conversation(void);
void draw_encounters_post_battle(void); void draw_encounters_post_battle(void);
void draw_encounters_pre_battle(void); void draw_encounters_pre_battle(void);

View File

@ -18,7 +18,6 @@ ApiStatus MoveBattleCamOver(Evt* script, s32 isInitialCall);
ApiStatus SetBattleCamZoom(Evt* script, s32 isInitialCall); ApiStatus SetBattleCamZoom(Evt* script, s32 isInitialCall);
ApiStatus AddBattleCamZoom(Evt* script, s32 isInitialCall); ApiStatus AddBattleCamZoom(Evt* script, s32 isInitialCall);
ApiStatus FreezeBattleCam(Evt* script, s32 isInitialCall); ApiStatus FreezeBattleCam(Evt* script, s32 isInitialCall);
ApiStatus close_action_command_instruction_popup(Evt* script, s32 isInitialCall);
ApiStatus ShowMessageBox(Evt* script, s32 isInitialCall); ApiStatus ShowMessageBox(Evt* script, s32 isInitialCall);
ApiStatus ShowVariableMessageBox(Evt* script, s32 isInitialCall); ApiStatus ShowVariableMessageBox(Evt* script, s32 isInitialCall);
ApiStatus IsMessageBoxDisplayed(Evt* script, s32 isInitialCall); ApiStatus IsMessageBoxDisplayed(Evt* script, s32 isInitialCall);

View File

@ -311,7 +311,7 @@ extern HeapNode heap_collisionHead;
extern HeapNode heap_generalHead; extern HeapNode heap_generalHead;
extern HeapNode heap_battleHead; extern HeapNode heap_battleHead;
extern s32 bMarioIdleAnims[]; extern u32 bMarioIdleAnims[];
extern s32 bMarioDefendAnims[]; extern s32 bMarioDefendAnims[];
extern s32 bPeachIdleAnims[]; extern s32 bPeachIdleAnims[];

View File

@ -889,7 +889,7 @@ ActorOffsets bActorOffsets[ACTOR_TYPE_COUNT] = {
[ACTOR_TYPE_SLOT_MACHINE_START_DUP3] = { .tattleCam = { 0, 0, 0 }, .shadow = 0 }, [ACTOR_TYPE_SLOT_MACHINE_START_DUP3] = { .tattleCam = { 0, 0, 0 }, .shadow = 0 },
}; };
s32 bMarioIdleAnims[] = { u32 bMarioIdleAnims[] = {
STATUS_NORMAL, ANIM_WALKING, STATUS_NORMAL, ANIM_WALKING,
STATUS_DANGER, ANIM_PANTING, STATUS_DANGER, ANIM_PANTING,
STATUS_STONE, 0x00050001, STATUS_STONE, 0x00050001,

View File

@ -1,9 +1,33 @@
#include "common.h" #include "common.h"
#include "battle/action_cmd/jump.h"
#include "battle/action_cmd/hammer.h"
#include "battle/action_cmd/flee.h"
#include "battle/action_cmd/break_free.h"
#include "battle/action_cmd/whirlwind.h"
#include "battle/action_cmd/stop_leech.h"
#include "battle/action_cmd/07.h"
#include "battle/action_cmd/dizzy_shell.h"
#include "battle/action_cmd/fire_shell.h"
#include "battle/action_cmd/0A.h"
#include "battle/action_cmd/bomb.h"
#include "battle/action_cmd/body_slam.h"
#include "battle/action_cmd/air_lift.h"
#include "battle/action_cmd/air_raid.h"
#include "battle/action_cmd/squirt.h"
#include "battle/action_cmd/power_shock.h"
#include "battle/action_cmd/mega_shock.h"
#include "battle/action_cmd/smack.h"
#include "battle/action_cmd/spiny_surge.h"
#include "battle/action_cmd/hurricane.h"
#include "battle/action_cmd/spook.h"
#include "battle/action_cmd/water_block.h"
#include "battle/action_cmd/tidal_wave.h"
// TODO: move to src/battle/action_cmd.c // TODO: move to src/battle/action_cmd.c
extern void* actionCommandDmaTable[23]; extern void* actionCommandDmaTable[23];
extern s32 D_8029FBC0; extern s32 D_8029FBC0;
extern s16 D_8029FC4C;
ApiStatus LoadActionCommand(Evt* script, s32 isInitialCall) { ApiStatus LoadActionCommand(Evt* script, s32 isInitialCall) {
s32 cmd = evt_get_variable(script, *script->ptrReadPos); s32 cmd = evt_get_variable(script, *script->ptrReadPos);
@ -90,98 +114,100 @@ void func_80268858(void) {
} }
} }
// action_cmd_current_main - calls current action command's main func
#ifdef NON_EQUIVALENT
void func_80268938(void) { void func_80268938(void) {
enum ActionCommand ac; ActionCommandStatus* actionCommandStatus = &gActionCommandStatus;
if (gBattleStatus.flags1 & 0x8000) { if (gBattleStatus.flags1 & BS_FLAGS1_8000) {
func_80268C9C(); func_80268C9C();
} }
ac = gActionCommandStatus.actionCommandID; switch (actionCommandStatus->actionCommandID) {
case ACTION_COMMAND_NONE:
switch (ac) { break;
case ACTION_COMMAND_JUMP: case ACTION_COMMAND_JUMP:
action_command_jump_update(); action_command_jump_update();
return; break;
case ACTION_COMMAND_SMASH: case ACTION_COMMAND_SMASH:
func_802A936C_42236C(); func_802A936C_42236C();
return; break;
case ACTION_COMMAND_FLEE: case ACTION_COMMAND_FLEE:
func_802A9378_422E48(); func_802A9378_422E48();
return; break;
case ACTION_COMMAND_BREAK_FREE: case ACTION_COMMAND_BREAK_FREE:
func_802A92DC_4236CC(); func_802A92DC_4236CC();
return; break;
case ACTION_COMMAND_WHIRLWIND: case ACTION_COMMAND_WHIRLWIND:
func_802A92F0_423F60(); func_802A92F0_423F60();
return; break;
case ACTION_COMMAND_STOP_LEECH: case ACTION_COMMAND_STOP_LEECH:
func_802A91F8_425788(); func_802A91F8_425788();
return; break;
case ACTION_COMMAND_07: case ACTION_COMMAND_07:
func_802A9228_425D78(); func_802A9228_425D78();
return; break;
case ACTION_COMMAND_DIZZY_SHELL: case ACTION_COMMAND_DIZZY_SHELL:
func_802A928C_4263FC(); func_802A928C_4263FC();
return; break;
case ACTION_COMMAND_FIRE_SHELL: case ACTION_COMMAND_FIRE_SHELL:
func_802A9294_426C64(); func_802A9294_426C64();
return; break;
case ACTION_COMMAND_0A: case ACTION_COMMAND_0A:
func_802A928C_4263FC(); func_802A928C_42763C();
return; break;
case ACTION_COMMAND_BOMB: case ACTION_COMMAND_BOMB:
func_802A928C_4263FC(); func_802A928C_427CFC();
return; break;
case ACTION_COMMAND_BODY_SLAM: case ACTION_COMMAND_BODY_SLAM:
func_802A92D4_4285B4(); func_802A92D4_4285B4();
return; break;
case ACTION_COMMAND_AIR_LIFT: case ACTION_COMMAND_AIR_LIFT:
func_802A9278_428CE8(); func_802A9278_428CE8();
return; break;
case ACTION_COMMAND_AIR_RAID: case ACTION_COMMAND_AIR_RAID:
func_802A9294_426C64(); func_802A9294_4295B4();
return; break;
case ACTION_COMMAND_SQUIRT: case ACTION_COMMAND_SQUIRT:
func_802A9208_429F28(); func_802A9208_429F28();
return; break;
case ACTION_COMMAND_POWER_SHOCK: case ACTION_COMMAND_POWER_SHOCK:
func_802A9310_42D220(); func_802A9310_42D220();
return; break;
case ACTION_COMMAND_MEGA_SHOCK: case ACTION_COMMAND_MEGA_SHOCK:
func_802A92A0_422D70(); func_802A92A0_42DCB0();
return; break;
case ACTION_COMMAND_SMACK: case ACTION_COMMAND_SMACK:
func_802A9298_42E638(); func_802A9298_42E638();
return; break;
case ACTION_COMMAND_SPINY_SURGE: case ACTION_COMMAND_SPINY_SURGE:
func_802A9254_42F074(); func_802A9254_42F074();
return; break;
case ACTION_COMMAND_HURRICANE: case ACTION_COMMAND_HURRICANE:
func_802A92A0_422D70(); func_802A92A0_42F980();
return; break;
case ACTION_COMMAND_SPOOK: case ACTION_COMMAND_SPOOK:
func_802A9298_42E638(); func_802A9298_4302B8();
return; break;
case ACTION_COMMAND_WATER_BLOCK: case ACTION_COMMAND_WATER_BLOCK:
func_802A948C_42A97C(); func_802A948C_42A97C();
return; break;
case ACTION_COMMAND_TIDAL_WAVE: case ACTION_COMMAND_TIDAL_WAVE:
func_802A9228_425D78(); action_command_tidal_wave_update();
return; break;
default:
break;
} }
} }
#else
INCLUDE_ASM(s32, "196AA0", func_80268938);
#endif
void func_80268AF8(void);
INCLUDE_ASM(s32, "196AA0", func_80268AF8); INCLUDE_ASM(s32, "196AA0", func_80268AF8);
INCLUDE_ASM(s32, "196AA0", func_80268C9C); INCLUDE_ASM(s32, "196AA0", func_80268C9C);
INCLUDE_ASM(s32, "196AA0", func_80268E88); void func_80268E88(void) {
ActionCommandStatus* actionCmdStatus = &gActionCommandStatus;
actionCmdStatus->unk_00 = create_generic_entity_frontUI(func_80268938, func_80268AF8);
actionCmdStatus->actionCommandID = 0;
}
s32 check_block_input(s32 buttonMask) { s32 check_block_input(s32 buttonMask) {
BattleStatus* battleStatus = &gBattleStatus; BattleStatus* battleStatus = &gBattleStatus;
@ -310,7 +336,7 @@ void func_80269160(void) {
} }
ApiStatus func_8026919C(Evt* script, s32 isInitialCall) { ApiStatus func_8026919C(Evt* script, s32 isInitialCall) {
gBattleStatus.unk_434 = evt_get_variable(script, *script->ptrReadPos); gBattleStatus.unk_434 = (s32*) evt_get_variable(script, *script->ptrReadPos);
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
@ -346,7 +372,10 @@ ApiStatus GetActionCommandMode(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
INCLUDE_ASM(s32, "196AA0", func_80269344); ApiStatus func_80269344(Evt* script, s32 isInitialCall) {
D_8029FC4C = evt_get_variable(script, *script->ptrReadPos);
return ApiStatus_DONE2;
}
ApiStatus GetCommandAutoSuccess(Evt* script, s32 isInitialCall) { ApiStatus GetCommandAutoSuccess(Evt* script, s32 isInitialCall) {
evt_set_variable(script, *script->ptrReadPos, gActionCommandStatus.autoSucceed); evt_set_variable(script, *script->ptrReadPos, gActionCommandStatus.autoSucceed);
@ -369,9 +398,35 @@ ApiStatus func_802693F0(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
INCLUDE_ASM(s32, "196AA0", CloseActionCommandInfo); ApiStatus CloseActionCommandInfo(Evt* script, s32 isInitialCall) {
ActionCommandStatus* actionCommandStatus = &gActionCommandStatus;
INCLUDE_ASM(s32, "196AA0", func_80269470); if (isInitialCall) {
switch (actionCommandStatus->actionCommandID) {
case ACTION_COMMAND_WHIRLWIND:
case ACTION_COMMAND_STOP_LEECH:
return ApiStatus_DONE2;
default:
func_80268C9C();
return ApiStatus_BLOCK;
}
}
sfx_stop_sound(0x80000041);
close_action_command_instruction_popup();
return ApiStatus_DONE2;
}
ApiStatus func_80269470(Evt* script, s32 isInitialCall) {
if (isInitialCall) {
func_80268C9C();
return ApiStatus_BLOCK;
}
close_action_command_instruction_popup();
return ApiStatus_DONE2;
}
ApiStatus func_802694A4(Evt* script, s32 isInitialCall) { ApiStatus func_802694A4(Evt* script, s32 isInitialCall) {
ActionCommandStatus* actionCommandStatus = &gActionCommandStatus; ActionCommandStatus* actionCommandStatus = &gActionCommandStatus;

View File

@ -758,7 +758,7 @@ s32 calc_enemy_damage_target(Actor* attacker) {
script->varTable[0] = state->goalPos.x; script->varTable[0] = state->goalPos.x;
script->varTable[1] = state->goalPos.y; script->varTable[1] = state->goalPos.y;
script->varTable[2] = state->goalPos.z; script->varTable[2] = state->goalPos.z;
script->varTable[3] = (s32) target; script->varTableActor[3] = target;
sfx_play_sound_at_position(SOUND_HIT_ICE, 0, state->goalPos.x, state->goalPos.y, state->goalPos.z); sfx_play_sound_at_position(SOUND_HIT_ICE, 0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
} }
if ((battleStatus->currentAttackStatus & STATUS_FLAG_SHRINK) && statusInflicted) { if ((battleStatus->currentAttackStatus & STATUS_FLAG_SHRINK) && statusInflicted) {
@ -766,7 +766,7 @@ s32 calc_enemy_damage_target(Actor* attacker) {
script->varTable[0] = state->goalPos.x; script->varTable[0] = state->goalPos.x;
script->varTable[1] = state->goalPos.y; script->varTable[1] = state->goalPos.y;
script->varTable[2] = state->goalPos.z; script->varTable[2] = state->goalPos.z;
script->varTable[3] = (s32) target; script->varTableActor[3] = target;
sfx_play_sound_at_position(SOUND_INFLICT_STATUS, 0, state->goalPos.x, state->goalPos.y, state->goalPos.z); sfx_play_sound_at_position(SOUND_INFLICT_STATUS, 0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
} }
@ -1029,14 +1029,14 @@ ApiStatus LandJump(Evt* script, s32 isInitialCall) {
} }
actor = get_actor(actorID); actor = get_actor(actorID);
script->functionTemp[1] = (s32)actor; script->functionTempActor[1] = actor;
actor->state.currentPos.x = actor->currentPos.x; actor->state.currentPos.x = actor->currentPos.x;
actor->state.currentPos.y = actor->currentPos.y; actor->state.currentPos.y = actor->currentPos.y;
actor->state.currentPos.z = actor->currentPos.z; actor->state.currentPos.z = actor->currentPos.z;
script->functionTemp[0] = 1; script->functionTemp[0] = 1;
} }
actor = (Actor*)script->functionTemp[1]; actor = script->functionTempActor[1];
actor->state.currentPos.y += actor->state.velocity; actor->state.currentPos.y += actor->state.velocity;
actor->state.velocity -= actor->state.acceleration; actor->state.velocity -= actor->state.acceleration;
@ -1084,8 +1084,8 @@ s32 LandJumpPart(Evt* script, s32 isInitialCall) {
actor = get_actor(actorID); actor = get_actor(actorID);
part = get_actor_part(actor, partIndex); part = get_actor_part(actor, partIndex);
script->functionTemp[1] = (s32) actor; script->functionTempActor[1] = actor;
script->functionTemp[2] = (s32) part; script->functionTempActorPart[2] = part;
movement = part->movement; movement = part->movement;
movement->unk_00.x = part->absolutePosition.x; movement->unk_00.x = part->absolutePosition.x;
movement->unk_00.y = part->absolutePosition.y; movement->unk_00.y = part->absolutePosition.y;
@ -1093,7 +1093,7 @@ s32 LandJumpPart(Evt* script, s32 isInitialCall) {
script->functionTemp[0] = 1; script->functionTemp[0] = 1;
} }
part = (ActorPart*)script->functionTemp[2]; part = script->functionTempActorPart[2];
movement = part->movement; movement = part->movement;
movement->unk_00.y += movement->unk_2C; movement->unk_00.y += movement->unk_2C;
movement->unk_2C -= movement->jumpScale; movement->unk_2C -= movement->jumpScale;

View File

@ -179,60 +179,61 @@ void game_input_to_move_vector(f32* arg0, f32* arg1) {
*arg1 = temp1; *arg1 = temp1;
} }
// tail merge crap
#ifdef NON_EQUIVALENT
void func_800E24F8(void) { void func_800E24F8(void) {
Shadow* playerShadow = get_shadow_by_index(gPlayerStatus.shadowID); Shadow* shadow = get_shadow_by_index(gPlayerStatus.shadowID);
f32 x = shadow->rotation.x + 180.0;
f32 z = shadow->rotation.z + 180.0;
Camera* camera = &gCameras[CAM_DEFAULT]; Camera* camera = &gCameras[CAM_DEFAULT];
f32 x = playerShadow->rotation.x + 180.0; f32 temp;
f32 z = playerShadow->rotation.z + 180.0;
if (x != 0.0f || z != 0.0f) { if (x != 0.0f || z != 0.0f) {
switch (gPlayerStatus.actionState) { switch (gPlayerStatus.actionState) {
case 3: case ACTION_STATE_JUMP:
case 8: case ACTION_STATE_FALLING:
camera->unk_49C = 32.0f; temp = 32.0f;
camera->unk_49C = temp;
break; break;
case 1: case ACTION_STATE_WALK:
case 2: case ACTION_STATE_RUN:
if (camera->targetScreenCoords[1] < 130) { if (camera->targetScreenCoords.y < 130) {
camera->unk_49C = 3.0f; camera->unk_49C = 3.0f;
return; break;
} }
temp = 3.0f;
if (D_8010C9A0++ > 10) { if (D_8010C9A0++ > 10) {
D_8010C9A0 = 10; D_8010C9A0 = 10;
camera->unk_49C -= 2.0f; camera->unk_49C -= 2.0f;
if (camera->unk_49C < 3.0f) { if (camera->unk_49C < temp) {
camera->unk_49C = 3.0f; camera->unk_49C = temp;
} }
} }
break; break;
case 17: case ACTION_STATE_SLIDING:
camera->unk_49C = 3.0f; temp = 3.0f;
camera->unk_49C = temp;
break; break;
default: default:
temp = 3.0f;
D_8010C9A0 = 0; D_8010C9A0 = 0;
camera->unk_49C -= 2.0f; camera->unk_49C -= 2.0f;
if (camera->unk_49C < 3.0f) { if (camera->unk_49C < temp) {
camera->unk_49C = 3.0f; camera->unk_49C = temp;
} }
break; break;
} }
} else { } else {
switch (gPlayerStatus.actionState) { switch(gPlayerStatus.actionState) {
case 1: case ACTION_STATE_WALK:
case 2: case ACTION_STATE_RUN:
case 3: case ACTION_STATE_JUMP:
case 0x11: case ACTION_STATE_SLIDING:
camera->unk_49C = 7.2f; temp = 7.2f;
break; break;
default: default:
camera->unk_49C = 24.0f; temp = 24.0f;
break; break;
} }
camera->unk_49C = temp;
} }
} }
#else
INCLUDE_ASM(s32, "7B440", func_800E24F8);
#endif

View File

@ -2036,7 +2036,7 @@ ApiStatus SummonEnemy(Evt* script, s32 isInitialCall) {
script->functionTemp[0] = 1; script->functionTemp[0] = 1;
break; break;
case 1: case 1:
actor2 = (Actor*) script->functionTemp[1]; actor2 = script->functionTempActor[1];
if (does_script_exist(actor2->takeTurnID) == FALSE) { if (does_script_exist(actor2->takeTurnID) == FALSE) {
enemyIDs = battleStatus->enemyIDs; enemyIDs = battleStatus->enemyIDs;
if (battleStatus->nextEnemyIndex == 0) { if (battleStatus->nextEnemyIndex == 0) {
@ -3164,7 +3164,7 @@ ApiStatus BoostAttack(Evt* script, s32 isInitialCall) {
} }
attackBoost = evt_get_variable(script, *args++); attackBoost = evt_get_variable(script, *args++);
actor = get_actor(actorID); actor = get_actor(actorID);
script->functionTemp[1] = (s32) actor; script->functionTempActor[1] = actor;
script->functionTemp[2] = attackBoost; script->functionTemp[2] = attackBoost;
func_8024E40C(8); func_8024E40C(8);
@ -3181,7 +3181,7 @@ ApiStatus BoostAttack(Evt* script, s32 isInitialCall) {
script->functionTemp[0] = 1; script->functionTemp[0] = 1;
} }
get_actor(script->owner1.actorID); get_actor(script->owner1.actorID);
actor = (Actor*) script->functionTemp[1]; actor = script->functionTempActor[1];
attackBoost = script->functionTemp[2]; attackBoost = script->functionTemp[2];
flags = actor->flags; flags = actor->flags;
@ -3287,7 +3287,7 @@ ApiStatus BoostDefense(Evt* script, s32 isInitialCall) {
} }
defenseBoost = evt_get_variable(script, *args++); defenseBoost = evt_get_variable(script, *args++);
actor = get_actor(actorID); actor = get_actor(actorID);
script->functionTemp[1] = (s32) actor; script->functionTempActor[1] = actor;
script->functionTemp[2] = defenseBoost; script->functionTemp[2] = defenseBoost;
func_8024E40C(8); func_8024E40C(8);
@ -3305,7 +3305,7 @@ ApiStatus BoostDefense(Evt* script, s32 isInitialCall) {
script->functionTemp[0] = 1; script->functionTemp[0] = 1;
} }
get_actor(script->owner1.actorID); get_actor(script->owner1.actorID);
actor = (Actor*) script->functionTemp[1]; actor = script->functionTempActor[1];
defenseBoost = script->functionTemp[2]; defenseBoost = script->functionTemp[2];
flags = actor->flags; flags = actor->flags;
@ -3427,7 +3427,7 @@ ApiStatus VanishActor(Evt* script, s32 isInitialCall) {
script->functionTemp[0] = 1; script->functionTemp[0] = 1;
} }
get_actor(script->owner1.actorID); get_actor(script->owner1.actorID);
actor = (Actor*) script->functionTemp[1]; actor = script->functionTempActor[1];
vanished = script->functionTemp[2]; vanished = script->functionTemp[2];
flags = actor->flags; flags = actor->flags;
@ -3515,7 +3515,7 @@ ApiStatus ElectrifyActor(Evt* script, s32 isInitialCall) {
} }
electrified = evt_get_variable(script, *args++); electrified = evt_get_variable(script, *args++);
actor = get_actor(actorID); actor = get_actor(actorID);
script->functionTemp[1] = (s32) actor; script->functionTempActor[1] = actor;
script->functionTemp[2] = electrified; script->functionTemp[2] = electrified;
func_8024E40C(8); func_8024E40C(8);
@ -3533,7 +3533,7 @@ ApiStatus ElectrifyActor(Evt* script, s32 isInitialCall) {
script->functionTemp[0] = 1; script->functionTemp[0] = 1;
} }
get_actor(script->owner1.actorID); get_actor(script->owner1.actorID);
actor = (Actor*) script->functionTemp[1]; actor = script->functionTempActor[1];
electrified = script->functionTemp[2]; electrified = script->functionTemp[2];
flags = actor->flags; flags = actor->flags;
@ -3625,7 +3625,7 @@ ApiStatus HealActor(Evt* script, s32 isInitialCall) {
hpBoost = evt_get_variable(script, *args++); hpBoost = evt_get_variable(script, *args++);
D_8029FBD0 = evt_get_variable(script, *args++); D_8029FBD0 = evt_get_variable(script, *args++);
actor = get_actor(actorID); actor = get_actor(actorID);
script->functionTemp[1] = (s32) actor; script->functionTempActor[1] = actor;
script->functionTemp[2] = hpBoost; script->functionTemp[2] = hpBoost;
func_8024E40C(8); func_8024E40C(8);
@ -3639,7 +3639,7 @@ ApiStatus HealActor(Evt* script, s32 isInitialCall) {
script->functionTemp[0] = 1; script->functionTemp[0] = 1;
} }
get_actor(script->owner1.enemyID); get_actor(script->owner1.enemyID);
actor = (Actor*) script->functionTemp[1]; actor = script->functionTempActor[1];
hpBoost = script->functionTemp[2]; hpBoost = script->functionTemp[2];
flags = actor->flags; flags = actor->flags;

View File

@ -0,0 +1,8 @@
#ifndef _07_H_
#define _07_H_
#include "common_structs.h"
void func_802A9228_425D78(void);
#endif

View File

@ -0,0 +1,8 @@
#ifndef _0A_H_
#define _0A_H_
#include "common_structs.h"
void func_802A928C_42763C(void);
#endif

View File

@ -0,0 +1,8 @@
#ifndef _AIR_LIFT_H_
#define _AIR_LIFT_H_
#include "common_structs.h"
void func_802A9278_428CE8(void);
#endif

View File

@ -0,0 +1,8 @@
#ifndef _AIR_RAID_H_
#define _AIR_RAID_H_
#include "common_structs.h"
void func_802A9294_4295B4(void);
#endif

View File

@ -3,6 +3,8 @@
#include "common_structs.h" #include "common_structs.h"
void func_802A92D4_4285B4(void);
ApiStatus action_command_body_slam_CreateHudElements(Evt* script, s32 isInitialCall); ApiStatus action_command_body_slam_CreateHudElements(Evt* script, s32 isInitialCall);
ApiStatus action_command_body_slam_MashActionCommandInit(Evt* script, s32 isInitialCall); ApiStatus action_command_body_slam_MashActionCommandInit(Evt* script, s32 isInitialCall);

View File

@ -3,6 +3,8 @@
#include "common_structs.h" #include "common_structs.h"
void func_802A928C_427CFC(void);
ApiStatus func_802A9000_427A70(Evt* script, s32 isInitialCall); ApiStatus func_802A9000_427A70(Evt* script, s32 isInitialCall);
ApiStatus action_command_bomb_MashActionCommandInit(Evt* script, s32 isInitialCall); ApiStatus action_command_bomb_MashActionCommandInit(Evt* script, s32 isInitialCall);

View File

@ -3,6 +3,8 @@
#include "common_structs.h" #include "common_structs.h"
void func_802A92DC_4236CC(void);
ApiStatus func_802A91B0_4235A0(Evt* script, s32 isInitialCall); ApiStatus func_802A91B0_4235A0(Evt* script, s32 isInitialCall);
#endif #endif

View File

@ -3,6 +3,8 @@
#include "common_structs.h" #include "common_structs.h"
void func_802A928C_4263FC(void);
ApiStatus func_802A9000_426170(Evt* script, s32 isInitialCall); ApiStatus func_802A9000_426170(Evt* script, s32 isInitialCall);
ApiStatus action_command_dizzy_shell_MashActionCommandInit(Evt* script, s32 isInitialCall); ApiStatus action_command_dizzy_shell_MashActionCommandInit(Evt* script, s32 isInitialCall);

View File

@ -3,6 +3,8 @@
#include "common_structs.h" #include "common_structs.h"
void func_802A9294_426C64(void);
ApiStatus func_802A9000_4269D0(Evt* script, s32 isInitialCall); ApiStatus func_802A9000_4269D0(Evt* script, s32 isInitialCall);
ApiStatus action_command_fire_shell_MashActionCommandInit(Evt* script, s32 isInitialCall); ApiStatus action_command_fire_shell_MashActionCommandInit(Evt* script, s32 isInitialCall);

View File

@ -0,0 +1,8 @@
#ifndef _FLEE_H_
#define _FLEE_H_
#include "common_structs.h"
void func_802A9378_422E48(void);
#endif

View File

@ -3,6 +3,8 @@
#include "common_structs.h" #include "common_structs.h"
void func_802A936C_42236C(void);
ApiStatus action_command_hammer_CreateHudElements(Evt* script, s32 isInitialCall); ApiStatus action_command_hammer_CreateHudElements(Evt* script, s32 isInitialCall);
ApiStatus func_802A9258_422258(Evt* script, s32 isInitialCall); ApiStatus func_802A9258_422258(Evt* script, s32 isInitialCall);

View File

@ -0,0 +1,8 @@
#ifndef _HURRICANE_H_
#define _HURRICANE_H_
#include "common_structs.h"
void func_802A92A0_42F980(void);
#endif

View File

@ -3,6 +3,8 @@
#include "common_structs.h" #include "common_structs.h"
void action_command_jump_update(void);
ApiStatus action_command_jump_CreateHudElements(Evt* script, s32 isInitialCall); ApiStatus action_command_jump_CreateHudElements(Evt* script, s32 isInitialCall);
#endif #endif

View File

@ -0,0 +1,8 @@
#ifndef _MEGA_SHOCK_H_
#define _MEGA_SHOCK_H_
#include "common_structs.h"
void func_802A92A0_42DCB0(void);
#endif

View File

@ -0,0 +1,8 @@
#ifndef _POWER_SHOCK_H_
#define _POWER_SHOCK_H_
#include "common_structs.h"
void func_802A9310_42D220(void);
#endif

View File

@ -0,0 +1,8 @@
#ifndef _SMACK_H_
#define _SMACK_H_
#include "common_structs.h"
void func_802A9298_42E638(void);
#endif

View File

@ -0,0 +1,8 @@
#ifndef _SPINY_SURGE_H_
#define _SPINY_SURGE_H_
#include "common_structs.h"
void func_802A9254_42F074(void);
#endif

View File

@ -0,0 +1,8 @@
#ifndef _SPOOK_H_
#define _SPOOK_H_
#include "common_structs.h"
void func_802A9298_4302B8(void);
#endif

View File

@ -0,0 +1,8 @@
#ifndef _SQUIRT_H_
#define _SQUIRT_H_
#include "common_structs.h"
void func_802A9208_429F28(void);
#endif

View File

@ -3,6 +3,8 @@
#include "common_structs.h" #include "common_structs.h"
void func_802A91F8_425788(void);
ApiStatus func_802A9000_425590(Evt* script, s32 isInitialCall); ApiStatus func_802A9000_425590(Evt* script, s32 isInitialCall);
ApiStatus func_802A9110_4256A0(Evt* script, s32 isInitialCall); ApiStatus func_802A9110_4256A0(Evt* script, s32 isInitialCall);

View File

@ -0,0 +1,8 @@
#ifndef _TIDAL_WAVE_H_
#define _TIDAL_WAVE_H_
#include "common_structs.h"
void action_command_tidal_wave_update(void);
#endif

View File

@ -0,0 +1,8 @@
#ifndef _WATER_BLOCK_H_
#define _WATER_BLOCK_H_
#include "common_structs.h"
void func_802A948C_42A97C(void);
#endif

View File

@ -3,6 +3,8 @@
#include "common_structs.h" #include "common_structs.h"
void func_802A92F0_423F60(void);
ApiStatus func_802A9000_423C70(Evt* script, s32 isInitialCall); ApiStatus func_802A9000_423C70(Evt* script, s32 isInitialCall);
ApiStatus func_802A91E0_423E50(Evt* script, s32 isInitialCall); ApiStatus func_802A91E0_423E50(Evt* script, s32 isInitialCall);

View File

@ -3,7 +3,6 @@
#include "common.h" #include "common.h"
#include "battle/battle.h" #include "battle/battle.h"
extern s32 bMarioIdleAnims[];
extern s32 bMarioHideAnims[]; extern s32 bMarioHideAnims[];
ApiStatus func_80238000_710EF0(Evt* script, s32 isInitialCall) { ApiStatus func_80238000_710EF0(Evt* script, s32 isInitialCall) {

View File

@ -64,7 +64,7 @@ ApiStatus func_802381EC_707E8C(Evt* script, s32 isInitialCall) {
temp_v0 = script->functionTemp[1]; temp_v0 = script->functionTemp[1];
if (temp_v0) { if (temp_v0) {
script->functionTemp[1] = (s32) (temp_v0 - 1); script->functionTemp[1] = temp_v0 - 1;
return ApiStatus_BLOCK; return ApiStatus_BLOCK;
} }

View File

@ -189,7 +189,79 @@ ApiStatus SetCamTarget(Evt* script, s32 isInitialCall) {
INCLUDE_ASM(s32, "evt/cam_api", func_802CB008, Evt* script, s32 isInitialCall); INCLUDE_ASM(s32, "evt/cam_api", func_802CB008, Evt* script, s32 isInitialCall);
INCLUDE_ASM(s32, "evt/cam_api", ShakeCam, Evt* script, s32 isInitialCall); ApiStatus ShakeCam(Evt* script, s32 isInitialCall) {
Bytecode* args = script->ptrReadPos;
s32 camIndex = evt_get_variable(script, *args++);
s32 temp_s3 = evt_get_variable(script, *args++);
s32 temp_s4 = evt_get_variable(script, *args++);
f32 temp_f20 = 2.0f * evt_get_float_variable(script, *args++);
Camera* camera = &gCameras[camIndex];
f32 temp_f2;
f32 phi_f2;
s32 temp_a1;
if (isInitialCall) {
switch (temp_s3){
case 0:
case 1:
break;
case 2:
temp_s4 *= 4;
break;
default:
break;
}
*(f32*)&script->functionTemp[3] = 1.0f;
script->functionTemp[1] = temp_s4;
if (!gGameStatusPtr->isBattle) {
if (temp_f20 > 10.0f) {
temp_f20 = 10.0f;
}
phi_f2 = temp_f20;
if (temp_f20 > 6.0f) {
phi_f2 = 6.0f;
}
phi_f2 = phi_f2 * 32.0f + 64.0f;
temp_a1 = temp_s4;
if (temp_a1 < 5) {
temp_a1 = 5;
}
start_rumble(phi_f2, (temp_a1 & 0xFFFF) * 2);
}
}
camera->flags |= CAM_FLAG_SHAKING;
temp_f2 = script->functionTempF[3];
switch (temp_s3) {
case 0:
guTranslateF(camera->viewMtxShaking, 0.0f, -temp_f2 * temp_f20, 0.0f);
script->functionTempF[3] = -script->functionTempF[3];
break;
case 1:
guRotateF(camera->viewMtxShaking, temp_f2 * temp_f20, 0.0f, 0.0f, 1.0f);
script->functionTempF[3] = -script->functionTempF[3];
break;
case 2:
guTranslateF(camera->viewMtxShaking, 0.0f, -temp_f2 * temp_f20, 0.0f);
if ((script->functionTemp[1] < (temp_s4 * 2)) && (temp_s4 < script->functionTemp[1])) {
script->functionTempF[3] = script->functionTempF[3] * -0.8;
} else {
script->functionTempF[3] = -script->functionTempF[3];
}
break;
}
if (script->functionTemp[1] == 0) {
camera->flags &= ~CAM_FLAG_SHAKING;
return ApiStatus_DONE2;
}
script->functionTemp[1]--;
return ApiStatus_BLOCK;
}
void exec_ShakeCam1(s32 arg0, s32 arg1, s32 arg2) { void exec_ShakeCam1(s32 arg0, s32 arg1, s32 arg2) {
Evt* script; Evt* script;

View File

@ -246,7 +246,7 @@ ApiStatus NpcMoveTo(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
script->functionTemp[1] = (s32)npc; script->functionTempNpc[1] = npc;
npc->moveToPos.x = goalX; npc->moveToPos.x = goalX;
npc->moveToPos.z = goalZ; npc->moveToPos.z = goalZ;
npc->duration = duration; npc->duration = duration;
@ -263,7 +263,7 @@ ApiStatus NpcMoveTo(Evt* script, s32 isInitialCall) {
script->functionTemp[0] = 1; script->functionTemp[0] = 1;
} }
npc = (Npc*)script->functionTemp[1]; npc = script->functionTempNpc[1];
npc->yaw = atan2(npc->pos.x, npc->pos.z, npc->moveToPos.x, npc->moveToPos.z); npc->yaw = atan2(npc->pos.x, npc->pos.z, npc->moveToPos.x, npc->moveToPos.z);
npc_move_heading(npc, npc->moveSpeed, npc->yaw); npc_move_heading(npc, npc->moveSpeed, npc->yaw);
@ -288,7 +288,7 @@ ApiStatus NpcMoveTo(Evt* script, s32 isInitialCall) {
ApiStatus _npc_jump_to(Evt* script, s32 isInitialCall, s32 snapYaw) { ApiStatus _npc_jump_to(Evt* script, s32 isInitialCall, s32 snapYaw) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
f32* yaw = (f32*) &script->functionTemp[2]; f32* yaw = &script->functionTempF[2];
Npc* npc; Npc* npc;
if (isInitialCall) { if (isInitialCall) {
@ -309,7 +309,7 @@ ApiStatus _npc_jump_to(Evt* script, s32 isInitialCall, s32 snapYaw) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
script->functionTemp[1] = (s32)npc; script->functionTempNpc[1] = npc;
npc->moveToPos.x = goalX; npc->moveToPos.x = goalX;
npc->moveToPos.y = goalY; npc->moveToPos.y = goalY;
npc->moveToPos.z = goalZ; npc->moveToPos.z = goalZ;
@ -337,7 +337,7 @@ ApiStatus _npc_jump_to(Evt* script, s32 isInitialCall, s32 snapYaw) {
script->functionTemp[0] =1; script->functionTemp[0] =1;
} }
npc = (Npc*)script->functionTemp[1]; npc = script->functionTempNpc[1];
npc_move_heading(npc, npc->moveSpeed, *yaw); npc_move_heading(npc, npc->moveSpeed, *yaw);
npc->pos.y += npc->jumpVelocity; npc->pos.y += npc->jumpVelocity;
@ -379,7 +379,7 @@ ApiStatus NpcFlyTo(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
script->functionTemp[1] = (s32)npc; script->functionTempNpc[1] = npc;
npc->moveToPos.x = evt_get_float_variable(script, *args++); npc->moveToPos.x = evt_get_float_variable(script, *args++);
npc->moveToPos.y = evt_get_float_variable(script, *args++); npc->moveToPos.y = evt_get_float_variable(script, *args++);
npc->moveToPos.z = evt_get_float_variable(script, *args++); npc->moveToPos.z = evt_get_float_variable(script, *args++);
@ -401,7 +401,7 @@ ApiStatus NpcFlyTo(Evt* script, s32 isInitialCall) {
} }
} }
npc = (Npc*)script->functionTemp[1]; npc = script->functionTempNpc[1];
npc->pos.x = update_lerp(script->functionTemp[3], *outX, npc->moveToPos.x, npc->duration, script->varTable[6]); npc->pos.x = update_lerp(script->functionTemp[3], *outX, npc->moveToPos.x, npc->duration, script->varTable[6]);
npc->pos.y = update_lerp(script->functionTemp[3], *outY, npc->moveToPos.y, npc->duration, script->varTable[6]); npc->pos.y = update_lerp(script->functionTemp[3], *outY, npc->moveToPos.y, npc->duration, script->varTable[6]);
npc->pos.z = update_lerp(script->functionTemp[3], *outZ, npc->moveToPos.z, npc->duration, script->varTable[6]); npc->pos.z = update_lerp(script->functionTemp[3], *outZ, npc->moveToPos.z, npc->duration, script->varTable[6]);
@ -466,8 +466,8 @@ ApiStatus SetNpcYaw(Evt* script, s32 isInitialCall) {
ApiStatus InterpNpcYaw(Evt* script, s32 isInitialCall) { ApiStatus InterpNpcYaw(Evt* script, s32 isInitialCall) {
PlayerStatus* playerStatus = &gPlayerStatus; PlayerStatus* playerStatus = &gPlayerStatus;
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
f32* initialYaw = (f32*) &script->functionTemp[1]; f32* initialYaw = &script->functionTempF[1];
f32* deltaYaw = (f32*) &script->functionTemp[2]; f32* deltaYaw = &script->functionTempF[2];
s32* turnTime = &script->functionTemp[3]; s32* turnTime = &script->functionTemp[3];
Npc* npc; Npc* npc;
@ -481,7 +481,7 @@ ApiStatus InterpNpcYaw(Evt* script, s32 isInitialCall) {
*initialYaw = npc->yaw; *initialYaw = npc->yaw;
*deltaYaw = evt_get_variable(script, *args++) - *initialYaw; *deltaYaw = evt_get_variable(script, *args++) - *initialYaw;
script->functionTemp[0] = (s32)npc; script->functionTempNpc[0] = npc;
*turnTime = evt_get_variable(script, *args++); *turnTime = evt_get_variable(script, *args++);
if (*turnTime == 0) { if (*turnTime == 0) {
@ -499,7 +499,7 @@ ApiStatus InterpNpcYaw(Evt* script, s32 isInitialCall) {
} }
} }
npc = (Npc*)script->functionTemp[0]; npc = script->functionTempNpc[0];
if (*turnTime > 0) { if (*turnTime > 0) {
npc->duration++; npc->duration++;
npc->yaw = *initialYaw + ((*deltaYaw * npc->duration) / *turnTime); npc->yaw = *initialYaw + ((*deltaYaw * npc->duration) / *turnTime);
@ -514,8 +514,8 @@ ApiStatus InterpNpcYaw(Evt* script, s32 isInitialCall) {
ApiStatus NpcFacePlayer(Evt* script, s32 isInitialCall) { ApiStatus NpcFacePlayer(Evt* script, s32 isInitialCall) {
PlayerStatus* playerStatus = &gPlayerStatus; PlayerStatus* playerStatus = &gPlayerStatus;
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
f32* initialYaw = (f32*) &script->functionTemp[1]; f32* initialYaw = &script->functionTempF[1];
f32* deltaYaw = (f32*) &script->functionTemp[2]; f32* deltaYaw = &script->functionTempF[2];
s32* turnTime = &script->functionTemp[3]; s32* turnTime = &script->functionTemp[3];
Npc* npc; Npc* npc;
@ -529,7 +529,7 @@ ApiStatus NpcFacePlayer(Evt* script, s32 isInitialCall) {
*initialYaw = npc->yaw; *initialYaw = npc->yaw;
*deltaYaw = atan2(npc->pos.x, npc->pos.z, playerStatus->position.x, playerStatus->position.z) - *initialYaw; *deltaYaw = atan2(npc->pos.x, npc->pos.z, playerStatus->position.x, playerStatus->position.z) - *initialYaw;
script->functionTemp[0] = (s32)npc; script->functionTempNpc[0] = npc;
*turnTime = evt_get_variable(script, *args++); *turnTime = evt_get_variable(script, *args++);
npc->duration = 0; npc->duration = 0;
@ -541,7 +541,7 @@ ApiStatus NpcFacePlayer(Evt* script, s32 isInitialCall) {
} }
} }
npc = (Npc*)script->functionTemp[0]; npc = script->functionTempNpc[0];
if (*turnTime > 0) { if (*turnTime > 0) {
npc->duration++; npc->duration++;
npc->yaw = *initialYaw + ((*deltaYaw * npc->duration) / *turnTime); npc->yaw = *initialYaw + ((*deltaYaw * npc->duration) / *turnTime);
@ -555,8 +555,8 @@ ApiStatus NpcFacePlayer(Evt* script, s32 isInitialCall) {
ApiStatus NpcFaceNpc(Evt* script, s32 isInitialCall) { ApiStatus NpcFaceNpc(Evt* script, s32 isInitialCall) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
f32* initialYaw = (f32*) &script->functionTemp[1]; f32* initialYaw = &script->functionTempF[1];
f32* deltaYaw = (f32*) &script->functionTemp[2]; f32* deltaYaw = &script->functionTempF[2];
s32* turnTime = &script->functionTemp[3]; s32* turnTime = &script->functionTemp[3];
Npc* targetNpc; Npc* targetNpc;
Npc* turningNpc; Npc* turningNpc;
@ -577,7 +577,7 @@ ApiStatus NpcFaceNpc(Evt* script, s32 isInitialCall) {
*initialYaw = turningNpc->yaw; *initialYaw = turningNpc->yaw;
*deltaYaw = atan2(turningNpc->pos.x, turningNpc->pos.z, targetNpc->pos.x, targetNpc->pos.z) - *initialYaw; *deltaYaw = atan2(turningNpc->pos.x, turningNpc->pos.z, targetNpc->pos.x, targetNpc->pos.z) - *initialYaw;
script->functionTemp[0] = (s32)turningNpc; script->functionTempNpc[0] = turningNpc;
*turnTime = evt_get_variable(script, *args++); *turnTime = evt_get_variable(script, *args++);
turningNpc->duration = 0; turningNpc->duration = 0;
@ -589,7 +589,7 @@ ApiStatus NpcFaceNpc(Evt* script, s32 isInitialCall) {
} }
} }
turningNpc = (Npc*)script->functionTemp[0]; turningNpc = script->functionTempNpc[0];
if (*turnTime > 0) { if (*turnTime > 0) {
turningNpc->duration++; turningNpc->duration++;
turningNpc->yaw = *initialYaw + ((*deltaYaw * turningNpc->duration) / *turnTime); turningNpc->yaw = *initialYaw + ((*deltaYaw * turningNpc->duration) / *turnTime);

View File

@ -2,7 +2,7 @@
#include "npc.h" #include "npc.h"
#include "sprite.h" #include "sprite.h"
Npc* playerNpc = (Npc*) 0x802DB270; // XXX: raw ptr Npc* playerNpc = (Npc*) 0x802DB270; // TODO: raw ptr, shiftability
extern s16 D_802DB5B0; extern s16 D_802DB5B0;
extern VirtualEntityList D_802DB5C0; extern VirtualEntityList D_802DB5C0;
@ -347,8 +347,8 @@ ApiStatus PlayerJump2(Evt* script, s32 isInitialCall) {
ApiStatus InterpPlayerYaw(Evt* script, s32 isInitialCall) { ApiStatus InterpPlayerYaw(Evt* script, s32 isInitialCall) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
PlayerStatus* playerStatus = &gPlayerStatus; PlayerStatus* playerStatus = &gPlayerStatus;
f32* initialYaw = (f32*) &script->functionTemp[1]; f32* initialYaw = &script->functionTempF[1];
f32* deltaYaw = (f32*) &script->functionTemp[2]; f32* deltaYaw = &script->functionTempF[2];
s32* time = &script->functionTemp[3]; s32* time = &script->functionTemp[3];
if (isInitialCall) { if (isInitialCall) {
@ -385,8 +385,8 @@ ApiStatus InterpPlayerYaw(Evt* script, s32 isInitialCall) {
ApiStatus PlayerFaceNpc(Evt* script, s32 isInitialCall) { ApiStatus PlayerFaceNpc(Evt* script, s32 isInitialCall) {
PlayerStatus* playerStatus = &gPlayerStatus; PlayerStatus* playerStatus = &gPlayerStatus;
s32* args = script->ptrReadPos; s32* args = script->ptrReadPos;
f32* playerTargetYaw = (f32*) &script->functionTemp[1]; f32* playerTargetYaw = &script->functionTempF[1];
f32* angle = (f32*) &script->functionTemp[2]; f32* angle = &script->functionTempF[2];
s32* ft3 = &script->functionTemp[3]; s32* ft3 = &script->functionTemp[3];
if (isInitialCall) { if (isInitialCall) {
@ -698,8 +698,8 @@ ApiStatus func_802D286C(Evt* script, s32 isInitialCall) {
ApiStatus func_802D2884(Evt* script, s32 isInitialCall) { ApiStatus func_802D2884(Evt* script, s32 isInitialCall) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
PlayerStatus* playerStatus = &gPlayerStatus; PlayerStatus* playerStatus = &gPlayerStatus;
f32* ft1 = (f32*) &script->functionTemp[1]; f32* ft1 = &script->functionTempF[1];
f32* angle = (f32*) &script->functionTemp[2]; f32* angle = &script->functionTempF[2];
s32* ft3 = &script->functionTemp[3]; s32* ft3 = &script->functionTemp[3];
if (isInitialCall) { if (isInitialCall) {

View File

@ -1,4 +1,4 @@
#include "common.h" #include "PR/guint.h"
s16 coss(u16 angle) { s16 coss(u16 angle) {
return sins(angle + 0x4000); return sins(angle + 0x4000);

View File

@ -1,6 +1,6 @@
#include "common.h" #include "PR/guint.h"
void guFrustumF(Matrix4f mf, f32 l, f32 r, f32 b, f32 t, f32 n, f32 f, f32 scale) { void guFrustumF(f32 mf[4][4], f32 l, f32 r, f32 b, f32 t, f32 n, f32 f, f32 scale) {
s32 i, j; s32 i, j;
guMtxIdentF(mf); guMtxIdentF(mf);
@ -22,7 +22,7 @@ void guFrustumF(Matrix4f mf, f32 l, f32 r, f32 b, f32 t, f32 n, f32 f, f32 scale
} }
void guFrustum(Mtx* m, f32 l, f32 r, f32 b, f32 t, f32 n, f32 f, f32 scale) { void guFrustum(Mtx* m, f32 l, f32 r, f32 b, f32 t, f32 n, f32 f, f32 scale) {
Matrix4f mf; f32 mf[4][4];
guFrustumF(mf, l, r, b, t, n, f, scale); guFrustumF(mf, l, r, b, t, n, f, scale);

View File

@ -1,6 +1,6 @@
#include "common.h" #include "PR/guint.h"
void guLookAtF(Matrix4f mf, f32 xEye, f32 yEye, f32 zEye, f32 xAt, f32 yAt, f32 zAt, void guLookAtF(f32 mf[4][4], f32 xEye, f32 yEye, f32 zEye, f32 xAt, f32 yAt, f32 zAt,
f32 xUp, f32 yUp, f32 zUp) { f32 xUp, f32 yUp, f32 zUp) {
f32 len, xLook, yLook, zLook, xRight, yRight, zRight; f32 len, xLook, yLook, zLook, xRight, yRight, zRight;
@ -57,7 +57,7 @@ void guLookAtF(Matrix4f mf, f32 xEye, f32 yEye, f32 zEye, f32 xAt, f32 yAt, f32
void guLookAt(Mtx *m, f32 xEye, f32 yEye, f32 zEye, f32 xAt, f32 yAt, f32 zAt, void guLookAt(Mtx *m, f32 xEye, f32 yEye, f32 zEye, f32 xAt, f32 yAt, f32 zAt,
f32 xUp, f32 yUp, f32 zUp) { f32 xUp, f32 yUp, f32 zUp) {
Matrix4f mf; f32 mf[4][4];
guLookAtF(mf, xEye, yEye, zEye, xAt, yAt, zAt, xUp, yUp, zUp); guLookAtF(mf, xEye, yEye, zEye, xAt, yAt, zAt, xUp, yUp, zUp);

View File

@ -1,4 +1,4 @@
#include "common.h" #include "PR/guint.h"
void guMtxCatL(Mtx *m, Mtx *n, Mtx *res) { void guMtxCatL(Mtx *m, Mtx *n, Mtx *res) {
float mf[4][4], nf[4][4], resf[4][4]; float mf[4][4], nf[4][4], resf[4][4];

View File

@ -1,4 +1,4 @@
#include "common.h" #include "PR/guint.h"
void guMtxXFMF(f32 mf[4][4], f32 x, f32 y, f32 z, f32 *ox, f32 *oy, f32 *oz) { void guMtxXFMF(f32 mf[4][4], f32 x, f32 y, f32 z, f32 *ox, f32 *oy, f32 *oz) {
*ox = mf[0][0]*x + mf[1][0]*y + mf[2][0]*z + mf[3][0]; *ox = mf[0][0]*x + mf[1][0]*y + mf[2][0]*z + mf[3][0];

View File

@ -1,4 +1,4 @@
#include "common.h" #include "PR/guint.h"
void guMtxXFML(Mtx *m, float x, float y, float z, float *ox, float *oy, float *oz) void guMtxXFML(Mtx *m, float x, float y, float z, float *ox, float *oy, float *oz)
{ {

View File

@ -1,9 +1,12 @@
#include "common.h" #include "PR/guint.h"
f32 sin_rad(f32 x);
f32 cos_rad(f32 x);
extern float D_800958C0; extern float D_800958C0;
void guRotateF(float mf[4][4], float a, float x, float y, float z) { void guRotateF(float mf[4][4], float a, float x, float y, float z) {
static float dtor = PI_D / 180.0; static float dtor = 3.1415926 / 180.0;
float sine; float sine;
float cosine; float cosine;
float ab, bc, ca, t; float ab, bc, ca, t;

View File

@ -1,6 +1,6 @@
#include "common.h" #include "PR/guint.h"
void guLookAtHiliteF(Matrix4f mf, LookAt *l, Hilite *h, void guLookAtHiliteF(f32 mf[4][4], LookAt *l, Hilite *h,
f32 xEye, f32 yEye, f32 zEye, f32 xEye, f32 yEye, f32 zEye,
f32 xAt, f32 yAt, f32 zAt, f32 xAt, f32 yAt, f32 zAt,
f32 xUp, f32 yUp, f32 zUp, f32 xUp, f32 yUp, f32 zUp,
@ -142,7 +142,7 @@ void guLookAtHilite (Mtx *m, LookAt *l, Hilite *h,
f32 xl1, f32 yl1, f32 zl1, /* light 1 direction */ f32 xl1, f32 yl1, f32 zl1, /* light 1 direction */
f32 xl2, f32 yl2, f32 zl2, /* light 2 direction */ f32 xl2, f32 yl2, f32 zl2, /* light 2 direction */
int twidth, int theight) { /* highlight txtr size*/ int twidth, int theight) { /* highlight txtr size*/
Matrix4f mf; f32 mf[4][4];
guLookAtHiliteF(mf, l, h, xEye, yEye, zEye, xAt, yAt, zAt, guLookAtHiliteF(mf, l, h, xEye, yEye, zEye, xAt, yAt, zAt,
xUp, yUp, zUp, xl1, yl1, zl1, xl2, yl2, zl2, xUp, yUp, zUp, xl1, yl1, zl1, xl2, yl2, zl2,

View File

@ -1,6 +1,6 @@
#include "common.h" #include "PR/guint.h"
void guLookAtReflectF(Matrix4f mf, LookAt *l, void guLookAtReflectF(f32 mf[4][4], LookAt *l,
f32 xEye, f32 yEye, f32 zEye, f32 xEye, f32 yEye, f32 zEye,
f32 xAt, f32 yAt, f32 zAt, f32 xAt, f32 yAt, f32 zAt,
f32 xUp, f32 yUp, f32 zUp) { f32 xUp, f32 yUp, f32 zUp) {
@ -86,7 +86,7 @@ void guLookAtReflect(Mtx *m, LookAt *l,
f32 xAt, f32 yAt, f32 zAt, f32 xAt, f32 yAt, f32 zAt,
f32 xUp, f32 yUp, f32 zUp) f32 xUp, f32 yUp, f32 zUp)
{ {
Matrix4f mf; f32 mf[4][4];
guLookAtReflectF(mf, l, xEye, yEye, zEye, xAt, yAt, zAt, xUp, yUp, zUp); guLookAtReflectF(mf, l, xEye, yEye, zEye, xAt, yAt, zAt, xUp, yUp, zUp);

View File

@ -1,4 +1,3 @@
#include "common.h"
#include <PR/osint.h> #include <PR/osint.h>
void osCreateMesgQueue(OSMesgQueue *mq, OSMesg *msg, s32 msgCount) { void osCreateMesgQueue(OSMesgQueue *mq, OSMesg *msg, s32 msgCount) {

View File

@ -1,4 +1,3 @@
#include "common.h"
#include <PR/osint.h> #include <PR/osint.h>
s32 osJamMesg(OSMesgQueue *mq, OSMesg msg, s32 flag) { s32 osJamMesg(OSMesgQueue *mq, OSMesg msg, s32 flag) {

View File

@ -1,4 +1,3 @@
#include "common.h"
#include <PR/osint.h> #include <PR/osint.h>
s32 osRecvMesg(OSMesgQueue *mq, OSMesg *msg, s32 flags) { s32 osRecvMesg(OSMesgQueue *mq, OSMesg *msg, s32 flags) {

View File

@ -1,6 +1,9 @@
#include "common.h" #include "PR/guint.h"
void guPerspectiveF(Matrix4f mf, u16 *perspNorm, f32 fovy, f32 aspect, f32 near, f32 far, f32 scale) { f32 sin_rad(f32 x);
f32 cos_rad(f32 x);
void guPerspectiveF(f32 mf[4][4], u16 *perspNorm, f32 fovy, f32 aspect, f32 near, f32 far, f32 scale) {
f32 cot; f32 cot;
s32 i, j; s32 i, j;
@ -35,7 +38,7 @@ void guPerspectiveF(Matrix4f mf, u16 *perspNorm, f32 fovy, f32 aspect, f32 near,
} }
void guPerspective(Mtx *m, u16 *perspNorm, f32 fovy, f32 aspect, f32 near, f32 far, f32 scale) { void guPerspective(Mtx *m, u16 *perspNorm, f32 fovy, f32 aspect, f32 near, f32 far, f32 scale) {
Matrix4f mf; f32 mf[4][4];
guPerspectiveF(mf, perspNorm, fovy, aspect, near, far, scale); guPerspectiveF(mf, perspNorm, fovy, aspect, near, far, scale);

View File

@ -1,6 +1,9 @@
#include "common.h" #include "PR/guint.h"
void guPositionF(Matrix4f mf, f32 r, f32 p, f32 h, f32 s, f32 x, f32 y, f32 z) { f32 sin_rad(f32 x);
f32 cos_rad(f32 x);
void guPositionF(f32 mf[4][4], f32 r, f32 p, f32 h, f32 s, f32 x, f32 y, f32 z) {
static f32 dtor = 3.1415926 / 180.0; static f32 dtor = 3.1415926 / 180.0;
f32 sinr, sinp, sinh; f32 sinr, sinp, sinh;
f32 cosr, cosp, cosh; f32 cosr, cosp, cosh;

View File

@ -1,6 +1,9 @@
#include "common.h" #include "PR/guint.h"
void guRotateRPYF(Matrix4f mf, f32 r, f32 p, f32 h) { f32 sin_rad(f32 x);
f32 cos_rad(f32 x);
void guRotateRPYF(float mf[4][4], f32 r, f32 p, f32 h) {
static f32 dtor = 3.1415926 / 180.0; static f32 dtor = 3.1415926 / 180.0;
f32 sinr, sinp, sinh; f32 sinr, sinp, sinh;
f32 cosr, cosp, cosh; f32 cosr, cosp, cosh;
@ -31,7 +34,7 @@ void guRotateRPYF(Matrix4f mf, f32 r, f32 p, f32 h) {
} }
void guRotateRPY(Mtx *m, f32 r, f32 p, f32 h) { void guRotateRPY(Mtx *m, f32 r, f32 p, f32 h) {
Matrix4f mf; Matrix mf;
guRotateRPYF(mf, r, p, h); guRotateRPYF(mf, r, p, h);

View File

@ -1,4 +1,3 @@
#include "common.h"
#include <PR/osint.h> #include <PR/osint.h>
s32 osSendMesg(OSMesgQueue *mq, OSMesg msg, s32 flags) s32 osSendMesg(OSMesgQueue *mq, OSMesg msg, s32 flags)

View File

@ -1,4 +1,3 @@
#include "common.h"
#include <PR/osint.h> #include <PR/osint.h>
u32 __osPreNMI = 0; u32 __osPreNMI = 0;

View File

@ -1,4 +1,4 @@
#include "common.h" #include "PR/guint.h"
#include "sintable.inc.c" #include "sintable.inc.c"

View File

@ -1,4 +1,4 @@
#include "common.h" #include "ultra64.h"
f32 sqrtf(f32 f) { f32 sqrtf(f32 f) {
return __builtin_sqrtf(f); return __builtin_sqrtf(f);

View File

@ -1,4 +1,4 @@
#include "common.h" #include "ultra64.h"
char* strchr(const char* s, int c) { char* strchr(const char* s, int c) {
const char ch = c; const char ch = c;

View File

@ -1,4 +1,3 @@
#include "common.h"
#include "PR/viint.h" #include "PR/viint.h"
void osViSetMode(OSViMode *modep) { void osViSetMode(OSViMode *modep) {

View File

@ -21,6 +21,6 @@ EvtScript N(PlayMusic) = {
}; };
ApiStatus GetGoomba(Evt* script, s32 isInitialCall) { ApiStatus GetGoomba(Evt* script, s32 isInitialCall) {
script->varTable[0] = get_enemy_safe(NPC_GOOMBA); script->varTableEnemy[0] = get_enemy_safe(NPC_GOOMBA);
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }

View File

@ -21,12 +21,12 @@ ApiStatus N(Bandit_DropCoin)(Evt* script, s32 isInitialCall) {
npc = (Npc*)npcID; npc = (Npc*)npcID;
} }
script->functionTemp[0] = (s32)npc; script->functionTempNpc[0] = npc;
script->functionTemp[1] = itemEntityIndex; script->functionTemp[1] = itemEntityIndex;
script->functionTemp[2] = areaFlag; script->functionTemp[2] = areaFlag;
} }
npc = (Npc*)script->functionTemp[0]; npc = script->functionTempNpc[0];
itemEntityIndex = script->functionTemp[1]; itemEntityIndex = script->functionTemp[1];
areaFlag = script->functionTemp[2]; areaFlag = script->functionTemp[2];

View File

@ -1,31 +0,0 @@
.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel CloseActionCommandInfo
/* 197CF0 80269410 27BDFFE8 */ addiu $sp, $sp, -0x18
/* 197CF4 80269414 10A0000D */ beqz $a1, .L8026944C
/* 197CF8 80269418 AFBF0010 */ sw $ra, 0x10($sp)
/* 197CFC 8026941C 3C02802A */ lui $v0, %hi(gActionCommandStatus)
/* 197D00 80269420 2442FBE0 */ addiu $v0, $v0, %lo(gActionCommandStatus)
/* 197D04 80269424 8443004A */ lh $v1, 0x4a($v0)
/* 197D08 80269428 28620007 */ slti $v0, $v1, 7
/* 197D0C 8026942C 10400003 */ beqz $v0, .L8026943C
/* 197D10 80269430 28620005 */ slti $v0, $v1, 5
/* 197D14 80269434 1040000B */ beqz $v0, .L80269464
/* 197D18 80269438 24020002 */ addiu $v0, $zero, 2
.L8026943C:
/* 197D1C 8026943C 0C09A327 */ jal func_80268C9C
/* 197D20 80269440 00000000 */ nop
/* 197D24 80269444 0809A519 */ j .L80269464
/* 197D28 80269448 0000102D */ daddu $v0, $zero, $zero
.L8026944C:
/* 197D2C 8026944C 3C048000 */ lui $a0, 0x8000
/* 197D30 80269450 0C05271B */ jal sfx_stop_sound
/* 197D34 80269454 34840041 */ ori $a0, $a0, 0x41
/* 197D38 80269458 0C093EC3 */ jal close_action_command_instruction_popup
/* 197D3C 8026945C 00000000 */ nop
/* 197D40 80269460 24020002 */ addiu $v0, $zero, 2
.L80269464:
/* 197D44 80269464 8FBF0010 */ lw $ra, 0x10($sp)
/* 197D48 80269468 03E00008 */ jr $ra
/* 197D4C 8026946C 27BD0018 */ addiu $sp, $sp, 0x18

View File

@ -1,148 +0,0 @@
.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
.section .rodata
dlabel jtbl_8029D6A0
.word .L80268AEC_1973CC, .L80268984_197264, .L80268994_197274, .L802689A4_197284, .L802689B4_197294, .L802689C4_1972A4, .L802689D4_1972B4, .L802689E4_1972C4, .L802689F4_1972D4, .L80268A04_1972E4, .L80268A14_1972F4, .L80268A24_197304, .L80268A34_197314, .L80268A44_197324, .L80268A54_197334, .L80268A64_197344, .L80268A74_197354, .L80268A84_197364, .L80268A94_197374, .L80268AA4_197384, .L80268AB4_197394, .L80268AC4_1973A4, .L80268AD4_1973B4, .L80268AE4_1973C4
.section .text
glabel func_80268938
/* 197218 80268938 3C02800E */ lui $v0, %hi(gBattleStatus)
/* 19721C 8026893C 8C42C070 */ lw $v0, %lo(gBattleStatus)($v0)
/* 197220 80268940 27BDFFE8 */ addiu $sp, $sp, -0x18
/* 197224 80268944 30428000 */ andi $v0, $v0, 0x8000
/* 197228 80268948 10400003 */ beqz $v0, .L80268958
/* 19722C 8026894C AFBF0010 */ sw $ra, 0x10($sp)
/* 197230 80268950 0C09A327 */ jal func_80268C9C
/* 197234 80268954 00000000 */ nop
.L80268958:
/* 197238 80268958 3C02802A */ lui $v0, %hi(gActionCommandStatus)
/* 19723C 8026895C 2442FBE0 */ addiu $v0, $v0, %lo(gActionCommandStatus)
/* 197240 80268960 8443004A */ lh $v1, 0x4a($v0)
/* 197244 80268964 2C620018 */ sltiu $v0, $v1, 0x18
/* 197248 80268968 10400060 */ beqz $v0, .L80268AEC_1973CC
/* 19724C 8026896C 00031080 */ sll $v0, $v1, 2
/* 197250 80268970 3C01802A */ lui $at, %hi(jtbl_8029D6A0)
/* 197254 80268974 00220821 */ addu $at, $at, $v0
/* 197258 80268978 8C22D6A0 */ lw $v0, %lo(jtbl_8029D6A0)($at)
/* 19725C 8026897C 00400008 */ jr $v0
/* 197260 80268980 00000000 */ nop
.L80268984_197264:
/* 197264 80268984 0C0AA48D */ jal action_command_jump_update
/* 197268 80268988 00000000 */ nop
/* 19726C 8026898C 0809A2BB */ j .L80268AEC_1973CC
/* 197270 80268990 00000000 */ nop
.L80268994_197274:
/* 197274 80268994 0C0AA4DB */ jal func_802A936C_42236C
/* 197278 80268998 00000000 */ nop
/* 19727C 8026899C 0809A2BB */ j .L80268AEC_1973CC
/* 197280 802689A0 00000000 */ nop
.L802689A4_197284:
/* 197284 802689A4 0C0AA4DE */ jal func_802A9378_422E48
/* 197288 802689A8 00000000 */ nop
/* 19728C 802689AC 0809A2BB */ j .L80268AEC_1973CC
/* 197290 802689B0 00000000 */ nop
.L802689B4_197294:
/* 197294 802689B4 0C0AA4B7 */ jal func_802A92DC_4236CC
/* 197298 802689B8 00000000 */ nop
/* 19729C 802689BC 0809A2BB */ j .L80268AEC_1973CC
/* 1972A0 802689C0 00000000 */ nop
.L802689C4_1972A4:
/* 1972A4 802689C4 0C0AA4BC */ jal func_802A92F0_423F60
/* 1972A8 802689C8 00000000 */ nop
/* 1972AC 802689CC 0809A2BB */ j .L80268AEC_1973CC
/* 1972B0 802689D0 00000000 */ nop
.L802689D4_1972B4:
/* 1972B4 802689D4 0C0AA47E */ jal func_802A91F8_425788
/* 1972B8 802689D8 00000000 */ nop
/* 1972BC 802689DC 0809A2BB */ j .L80268AEC_1973CC
/* 1972C0 802689E0 00000000 */ nop
.L802689E4_1972C4:
/* 1972C4 802689E4 0C0AA48A */ jal func_802A9228_425D78
/* 1972C8 802689E8 00000000 */ nop
/* 1972CC 802689EC 0809A2BB */ j .L80268AEC_1973CC
/* 1972D0 802689F0 00000000 */ nop
.L802689F4_1972D4:
/* 1972D4 802689F4 0C0AA4A3 */ jal func_802A928C_4263FC
/* 1972D8 802689F8 00000000 */ nop
/* 1972DC 802689FC 0809A2BB */ j .L80268AEC_1973CC
/* 1972E0 80268A00 00000000 */ nop
.L80268A04_1972E4:
/* 1972E4 80268A04 0C0AA4A5 */ jal func_802A9294_426C64
/* 1972E8 80268A08 00000000 */ nop
/* 1972EC 80268A0C 0809A2BB */ j .L80268AEC_1973CC
/* 1972F0 80268A10 00000000 */ nop
.L80268A14_1972F4:
/* 1972F4 80268A14 0C0AA4A3 */ jal func_802A928C_4263FC
/* 1972F8 80268A18 00000000 */ nop
/* 1972FC 80268A1C 0809A2BB */ j .L80268AEC_1973CC
/* 197300 80268A20 00000000 */ nop
.L80268A24_197304:
/* 197304 80268A24 0C0AA4A3 */ jal func_802A928C_4263FC
/* 197308 80268A28 00000000 */ nop
/* 19730C 80268A2C 0809A2BB */ j .L80268AEC_1973CC
/* 197310 80268A30 00000000 */ nop
.L80268A34_197314:
/* 197314 80268A34 0C0AA4B5 */ jal func_802A92D4_4285B4
/* 197318 80268A38 00000000 */ nop
/* 19731C 80268A3C 0809A2BB */ j .L80268AEC_1973CC
/* 197320 80268A40 00000000 */ nop
.L80268A44_197324:
/* 197324 80268A44 0C0AA49E */ jal func_802A9278_428CE8
/* 197328 80268A48 00000000 */ nop
/* 19732C 80268A4C 0809A2BB */ j .L80268AEC_1973CC
/* 197330 80268A50 00000000 */ nop
.L80268A54_197334:
/* 197334 80268A54 0C0AA4A5 */ jal func_802A9294_426C64
/* 197338 80268A58 00000000 */ nop
/* 19733C 80268A5C 0809A2BB */ j .L80268AEC_1973CC
/* 197340 80268A60 00000000 */ nop
.L80268A64_197344:
/* 197344 80268A64 0C0AA482 */ jal func_802A9208_429F28
/* 197348 80268A68 00000000 */ nop
/* 19734C 80268A6C 0809A2BB */ j .L80268AEC_1973CC
/* 197350 80268A70 00000000 */ nop
.L80268A74_197354:
/* 197354 80268A74 0C0AA4C4 */ jal func_802A9310_42D220
/* 197358 80268A78 00000000 */ nop
/* 19735C 80268A7C 0809A2BB */ j .L80268AEC_1973CC
/* 197360 80268A80 00000000 */ nop
.L80268A84_197364:
/* 197364 80268A84 0C0AA4A8 */ jal func_802A92A0_422D70
/* 197368 80268A88 00000000 */ nop
/* 19736C 80268A8C 0809A2BB */ j .L80268AEC_1973CC
/* 197370 80268A90 00000000 */ nop
.L80268A94_197374:
/* 197374 80268A94 0C0AA4A6 */ jal func_802A9298_42E638
/* 197378 80268A98 00000000 */ nop
/* 19737C 80268A9C 0809A2BB */ j .L80268AEC_1973CC
/* 197380 80268AA0 00000000 */ nop
.L80268AA4_197384:
/* 197384 80268AA4 0C0AA495 */ jal func_802A9254_42F074
/* 197388 80268AA8 00000000 */ nop
/* 19738C 80268AAC 0809A2BB */ j .L80268AEC_1973CC
/* 197390 80268AB0 00000000 */ nop
.L80268AB4_197394:
/* 197394 80268AB4 0C0AA4A8 */ jal func_802A92A0_422D70
/* 197398 80268AB8 00000000 */ nop
/* 19739C 80268ABC 0809A2BB */ j .L80268AEC_1973CC
/* 1973A0 80268AC0 00000000 */ nop
.L80268AC4_1973A4:
/* 1973A4 80268AC4 0C0AA4A6 */ jal func_802A9298_42E638
/* 1973A8 80268AC8 00000000 */ nop
/* 1973AC 80268ACC 0809A2BB */ j .L80268AEC_1973CC
/* 1973B0 80268AD0 00000000 */ nop
.L80268AD4_1973B4:
/* 1973B4 80268AD4 0C0AA523 */ jal func_802A948C_42A97C
/* 1973B8 80268AD8 00000000 */ nop
/* 1973BC 80268ADC 0809A2BB */ j .L80268AEC_1973CC
/* 1973C0 80268AE0 00000000 */ nop
.L80268AE4_1973C4:
/* 1973C4 80268AE4 0C0AA48A */ jal func_802A9228_425D78
/* 1973C8 80268AE8 00000000 */ nop
.L80268AEC_1973CC:
/* 1973CC 80268AEC 8FBF0010 */ lw $ra, 0x10($sp)
/* 1973D0 80268AF0 03E00008 */ jr $ra
/* 1973D4 80268AF4 27BD0018 */ addiu $sp, $sp, 0x18

View File

@ -1,21 +0,0 @@
.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel func_80268E88
/* 197768 80268E88 27BDFFE8 */ addiu $sp, $sp, -0x18
/* 19776C 80268E8C AFB00010 */ sw $s0, 0x10($sp)
/* 197770 80268E90 3C10802A */ lui $s0, %hi(gActionCommandStatus)
/* 197774 80268E94 2610FBE0 */ addiu $s0, $s0, %lo(gActionCommandStatus)
/* 197778 80268E98 3C048027 */ lui $a0, %hi(func_80268938)
/* 19777C 80268E9C 24848938 */ addiu $a0, $a0, %lo(func_80268938)
/* 197780 80268EA0 3C058027 */ lui $a1, %hi(func_80268AF8)
/* 197784 80268EA4 24A58AF8 */ addiu $a1, $a1, %lo(func_80268AF8)
/* 197788 80268EA8 AFBF0014 */ sw $ra, 0x14($sp)
/* 19778C 80268EAC 0C048C8F */ jal create_generic_entity_frontUI
/* 197790 80268EB0 00000000 */ nop
/* 197794 80268EB4 AE020000 */ sw $v0, ($s0)
/* 197798 80268EB8 A600004A */ sh $zero, 0x4a($s0)
/* 19779C 80268EBC 8FBF0014 */ lw $ra, 0x14($sp)
/* 1977A0 80268EC0 8FB00010 */ lw $s0, 0x10($sp)
/* 1977A4 80268EC4 03E00008 */ jr $ra
/* 1977A8 80268EC8 27BD0018 */ addiu $sp, $sp, 0x18

View File

@ -1,15 +0,0 @@
.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel func_80269344
/* 197C24 80269344 27BDFFE8 */ addiu $sp, $sp, -0x18
/* 197C28 80269348 AFBF0010 */ sw $ra, 0x10($sp)
/* 197C2C 8026934C 8C82000C */ lw $v0, 0xc($a0)
/* 197C30 80269350 0C0B1EAF */ jal evt_get_variable
/* 197C34 80269354 8C450000 */ lw $a1, ($v0)
/* 197C38 80269358 8FBF0010 */ lw $ra, 0x10($sp)
/* 197C3C 8026935C 3C01802A */ lui $at, %hi(D_8029FC4C)
/* 197C40 80269360 A422FC4C */ sh $v0, %lo(D_8029FC4C)($at)
/* 197C44 80269364 24020002 */ addiu $v0, $zero, 2
/* 197C48 80269368 03E00008 */ jr $ra
/* 197C4C 8026936C 27BD0018 */ addiu $sp, $sp, 0x18

View File

@ -1,19 +0,0 @@
.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel func_80269470
/* 197D50 80269470 27BDFFE8 */ addiu $sp, $sp, -0x18
/* 197D54 80269474 14A00005 */ bnez $a1, .L8026948C
/* 197D58 80269478 AFBF0010 */ sw $ra, 0x10($sp)
/* 197D5C 8026947C 0C093EC3 */ jal close_action_command_instruction_popup
/* 197D60 80269480 00000000 */ nop
/* 197D64 80269484 0809A526 */ j .L80269498
/* 197D68 80269488 24020002 */ addiu $v0, $zero, 2
.L8026948C:
/* 197D6C 8026948C 0C09A327 */ jal func_80268C9C
/* 197D70 80269490 00000000 */ nop
/* 197D74 80269494 0000102D */ daddu $v0, $zero, $zero
.L80269498:
/* 197D78 80269498 8FBF0010 */ lw $ra, 0x10($sp)
/* 197D7C 8026949C 03E00008 */ jr $ra
/* 197D80 802694A0 27BD0018 */ addiu $sp, $sp, 0x18

View File

@ -1,135 +0,0 @@
.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
.section .rodata
dlabel D_8010BD30
.double 180.0
dlabel jtbl_8010BD38
.word .L800E25A4_7BA54, .L800E25A4_7BA54, .L800E2594_7BA44, .L800E2630_7BAE0, .L800E2630_7BAE0, .L800E2630_7BAE0, .L800E2630_7BAE0, .L800E2594_7BA44, .L800E2630_7BAE0, .L800E2630_7BAE0, .L800E2630_7BAE0, .L800E2630_7BAE0, .L800E2630_7BAE0, .L800E2630_7BAE0, .L800E2630_7BAE0, .L800E2630_7BAE0, .L800E2620_7BAD0, 0
.section .text
glabel func_800E24F8
/* 7B9A8 800E24F8 27BDFFE8 */ addiu $sp, $sp, -0x18
/* 7B9AC 800E24FC AFB00010 */ sw $s0, 0x10($sp)
/* 7B9B0 800E2500 3C108011 */ lui $s0, %hi(gPlayerStatus)
/* 7B9B4 800E2504 2610EFC8 */ addiu $s0, $s0, %lo(gPlayerStatus)
/* 7B9B8 800E2508 AFBF0014 */ sw $ra, 0x14($sp)
/* 7B9BC 800E250C 0C044181 */ jal get_shadow_by_index
/* 7B9C0 800E2510 8E0400CC */ lw $a0, 0xcc($s0)
/* 7B9C4 800E2514 C4400028 */ lwc1 $f0, 0x28($v0)
/* 7B9C8 800E2518 3C018011 */ lui $at, %hi(D_8010BD30)
/* 7B9CC 800E251C D424BD30 */ ldc1 $f4, %lo(D_8010BD30)($at)
/* 7B9D0 800E2520 C4420030 */ lwc1 $f2, 0x30($v0)
/* 7B9D4 800E2524 46000021 */ cvt.d.s $f0, $f0
/* 7B9D8 800E2528 46240000 */ add.d $f0, $f0, $f4
/* 7B9DC 800E252C 3C05800B */ lui $a1, %hi(gCameras)
/* 7B9E0 800E2530 24A51D80 */ addiu $a1, $a1, %lo(gCameras)
/* 7B9E4 800E2534 460010A1 */ cvt.d.s $f2, $f2
/* 7B9E8 800E2538 46241080 */ add.d $f2, $f2, $f4
/* 7B9EC 800E253C 44802000 */ mtc1 $zero, $f4
/* 7B9F0 800E2540 46200020 */ cvt.s.d $f0, $f0
/* 7B9F4 800E2544 46040032 */ c.eq.s $f0, $f4
/* 7B9F8 800E2548 00000000 */ nop
/* 7B9FC 800E254C 45000005 */ bc1f .L800E2564
/* 7BA00 800E2550 462010A0 */ cvt.s.d $f2, $f2
/* 7BA04 800E2554 46041032 */ c.eq.s $f2, $f4
/* 7BA08 800E2558 00000000 */ nop
/* 7BA0C 800E255C 4501003D */ bc1t .L800E2654
/* 7BA10 800E2560 00000000 */ nop
.L800E2564:
/* 7BA14 800E2564 920200B4 */ lbu $v0, 0xb4($s0)
/* 7BA18 800E2568 2442FFFF */ addiu $v0, $v0, -1
/* 7BA1C 800E256C 00021600 */ sll $v0, $v0, 0x18
/* 7BA20 800E2570 00021E03 */ sra $v1, $v0, 0x18
/* 7BA24 800E2574 2C620011 */ sltiu $v0, $v1, 0x11
/* 7BA28 800E2578 1040002D */ beqz $v0, .L800E2630_7BAE0
/* 7BA2C 800E257C 00031080 */ sll $v0, $v1, 2
/* 7BA30 800E2580 3C018011 */ lui $at, %hi(jtbl_8010BD38)
/* 7BA34 800E2584 00220821 */ addu $at, $at, $v0
/* 7BA38 800E2588 8C22BD38 */ lw $v0, %lo(jtbl_8010BD38)($at)
/* 7BA3C 800E258C 00400008 */ jr $v0
/* 7BA40 800E2590 00000000 */ nop
.L800E2594_7BA44:
/* 7BA44 800E2594 3C014200 */ lui $at, 0x4200
/* 7BA48 800E2598 44812000 */ mtc1 $at, $f4
/* 7BA4C 800E259C 080389A5 */ j .L800E2694
/* 7BA50 800E25A0 E4A4049C */ swc1 $f4, 0x49c($a1)
.L800E25A4_7BA54:
/* 7BA54 800E25A4 84A20034 */ lh $v0, 0x34($a1)
/* 7BA58 800E25A8 28420082 */ slti $v0, $v0, 0x82
/* 7BA5C 800E25AC 10400005 */ beqz $v0, .L800E25C4
/* 7BA60 800E25B0 00000000 */ nop
/* 7BA64 800E25B4 3C014040 */ lui $at, 0x4040
/* 7BA68 800E25B8 44810000 */ mtc1 $at, $f0
/* 7BA6C 800E25BC 080389A5 */ j .L800E2694
/* 7BA70 800E25C0 E4A0049C */ swc1 $f0, 0x49c($a1)
.L800E25C4:
/* 7BA74 800E25C4 3C048011 */ lui $a0, %hi(D_8010C9A0)
/* 7BA78 800E25C8 2484C9A0 */ addiu $a0, $a0, %lo(D_8010C9A0)
/* 7BA7C 800E25CC 8C820000 */ lw $v0, ($a0)
/* 7BA80 800E25D0 3C014040 */ lui $at, 0x4040
/* 7BA84 800E25D4 44812000 */ mtc1 $at, $f4
/* 7BA88 800E25D8 0040182D */ daddu $v1, $v0, $zero
/* 7BA8C 800E25DC 24420001 */ addiu $v0, $v0, 1
/* 7BA90 800E25E0 2863000B */ slti $v1, $v1, 0xb
/* 7BA94 800E25E4 1460002B */ bnez $v1, .L800E2694
/* 7BA98 800E25E8 AC820000 */ sw $v0, ($a0)
/* 7BA9C 800E25EC C4A0049C */ lwc1 $f0, 0x49c($a1)
/* 7BAA0 800E25F0 3C014000 */ lui $at, 0x4000
/* 7BAA4 800E25F4 44811000 */ mtc1 $at, $f2
/* 7BAA8 800E25F8 00000000 */ nop
/* 7BAAC 800E25FC 46020001 */ sub.s $f0, $f0, $f2
/* 7BAB0 800E2600 2402000A */ addiu $v0, $zero, 0xa
/* 7BAB4 800E2604 AC820000 */ sw $v0, ($a0)
.L800E2608:
/* 7BAB8 800E2608 4604003C */ c.lt.s $f0, $f4
/* 7BABC 800E260C 00000000 */ nop
/* 7BAC0 800E2610 45000020 */ bc1f .L800E2694
/* 7BAC4 800E2614 E4A0049C */ swc1 $f0, 0x49c($a1)
/* 7BAC8 800E2618 080389A5 */ j .L800E2694
/* 7BACC 800E261C E4A4049C */ swc1 $f4, 0x49c($a1)
.L800E2620_7BAD0:
/* 7BAD0 800E2620 3C014040 */ lui $at, 0x4040
/* 7BAD4 800E2624 44812000 */ mtc1 $at, $f4
/* 7BAD8 800E2628 080389A5 */ j .L800E2694
/* 7BADC 800E262C E4A4049C */ swc1 $f4, 0x49c($a1)
.L800E2630_7BAE0:
/* 7BAE0 800E2630 C4A0049C */ lwc1 $f0, 0x49c($a1)
/* 7BAE4 800E2634 3C014000 */ lui $at, 0x4000
/* 7BAE8 800E2638 44811000 */ mtc1 $at, $f2
/* 7BAEC 800E263C 3C014040 */ lui $at, 0x4040
/* 7BAF0 800E2640 44812000 */ mtc1 $at, $f4
/* 7BAF4 800E2644 3C018011 */ lui $at, %hi(D_8010C9A0)
/* 7BAF8 800E2648 AC20C9A0 */ sw $zero, %lo(D_8010C9A0)($at)
/* 7BAFC 800E264C 08038982 */ j .L800E2608
/* 7BB00 800E2650 46020001 */ sub.s $f0, $f0, $f2
.L800E2654:
/* 7BB04 800E2654 820300B4 */ lb $v1, 0xb4($s0)
/* 7BB08 800E2658 1860000A */ blez $v1, .L800E2684
/* 7BB0C 800E265C 28620004 */ slti $v0, $v1, 4
/* 7BB10 800E2660 14400003 */ bnez $v0, .L800E2670
/* 7BB14 800E2664 24020011 */ addiu $v0, $zero, 0x11
/* 7BB18 800E2668 14620006 */ bne $v1, $v0, .L800E2684
/* 7BB1C 800E266C 00000000 */ nop
.L800E2670:
/* 7BB20 800E2670 3C0140E6 */ lui $at, 0x40e6
/* 7BB24 800E2674 34216666 */ ori $at, $at, 0x6666
/* 7BB28 800E2678 44812000 */ mtc1 $at, $f4
/* 7BB2C 800E267C 080389A5 */ j .L800E2694
/* 7BB30 800E2680 E4A4049C */ swc1 $f4, 0x49c($a1)
.L800E2684:
/* 7BB34 800E2684 3C0141C0 */ lui $at, 0x41c0
/* 7BB38 800E2688 44812000 */ mtc1 $at, $f4
/* 7BB3C 800E268C 00000000 */ nop
/* 7BB40 800E2690 E4A4049C */ swc1 $f4, 0x49c($a1)
.L800E2694:
/* 7BB44 800E2694 8FBF0014 */ lw $ra, 0x14($sp)
/* 7BB48 800E2698 8FB00010 */ lw $s0, 0x10($sp)
/* 7BB4C 800E269C 03E00008 */ jr $ra
/* 7BB50 800E26A0 27BD0018 */ addiu $sp, $sp, 0x18
/* 7BB54 800E26A4 00000000 */ nop
/* 7BB58 800E26A8 00000000 */ nop
/* 7BB5C 800E26AC 00000000 */ nop

View File

@ -1,202 +0,0 @@
.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
.section .rodata
dlabel D_802DA1D0
.double -0.8, 0.0
.section .text
glabel ShakeCam
/* EFC58 802CB2A8 27BDFFC0 */ addiu $sp, $sp, -0x40
/* EFC5C 802CB2AC AFB5002C */ sw $s5, 0x2c($sp)
/* EFC60 802CB2B0 0080A82D */ daddu $s5, $a0, $zero
/* EFC64 802CB2B4 AFB20020 */ sw $s2, 0x20($sp)
/* EFC68 802CB2B8 00A0902D */ daddu $s2, $a1, $zero
/* EFC6C 802CB2BC AFBF0030 */ sw $ra, 0x30($sp)
/* EFC70 802CB2C0 AFB40028 */ sw $s4, 0x28($sp)
/* EFC74 802CB2C4 AFB30024 */ sw $s3, 0x24($sp)
/* EFC78 802CB2C8 AFB1001C */ sw $s1, 0x1c($sp)
/* EFC7C 802CB2CC AFB00018 */ sw $s0, 0x18($sp)
/* EFC80 802CB2D0 F7B40038 */ sdc1 $f20, 0x38($sp)
/* EFC84 802CB2D4 8EB0000C */ lw $s0, 0xc($s5)
/* EFC88 802CB2D8 8E050000 */ lw $a1, ($s0)
/* EFC8C 802CB2DC 0C0B1EAF */ jal evt_get_variable
/* EFC90 802CB2E0 26100004 */ addiu $s0, $s0, 4
/* EFC94 802CB2E4 8E050000 */ lw $a1, ($s0)
/* EFC98 802CB2E8 26100004 */ addiu $s0, $s0, 4
/* EFC9C 802CB2EC 02A0202D */ daddu $a0, $s5, $zero
/* EFCA0 802CB2F0 0C0B1EAF */ jal evt_get_variable
/* EFCA4 802CB2F4 0040882D */ daddu $s1, $v0, $zero
/* EFCA8 802CB2F8 8E050000 */ lw $a1, ($s0)
/* EFCAC 802CB2FC 26100004 */ addiu $s0, $s0, 4
/* EFCB0 802CB300 02A0202D */ daddu $a0, $s5, $zero
/* EFCB4 802CB304 0C0B1EAF */ jal evt_get_variable
/* EFCB8 802CB308 0040982D */ daddu $s3, $v0, $zero
/* EFCBC 802CB30C 0040A02D */ daddu $s4, $v0, $zero
/* EFCC0 802CB310 8E050000 */ lw $a1, ($s0)
/* EFCC4 802CB314 0C0B210B */ jal evt_get_float_variable
/* EFCC8 802CB318 02A0202D */ daddu $a0, $s5, $zero
/* EFCCC 802CB31C 3C04800B */ lui $a0, %hi(gCameras)
/* EFCD0 802CB320 24841D80 */ addiu $a0, $a0, %lo(gCameras)
/* EFCD4 802CB324 00111080 */ sll $v0, $s1, 2
/* EFCD8 802CB328 00511021 */ addu $v0, $v0, $s1
/* EFCDC 802CB32C 00021080 */ sll $v0, $v0, 2
/* EFCE0 802CB330 00511023 */ subu $v0, $v0, $s1
/* EFCE4 802CB334 000218C0 */ sll $v1, $v0, 3
/* EFCE8 802CB338 00431021 */ addu $v0, $v0, $v1
/* EFCEC 802CB33C 000210C0 */ sll $v0, $v0, 3
/* EFCF0 802CB340 00448021 */ addu $s0, $v0, $a0
/* EFCF4 802CB344 12400031 */ beqz $s2, .L802CB40C
/* EFCF8 802CB348 46000500 */ add.s $f20, $f0, $f0
/* EFCFC 802CB34C 06600005 */ bltz $s3, .L802CB364
/* EFD00 802CB350 2A620002 */ slti $v0, $s3, 2
/* EFD04 802CB354 14400003 */ bnez $v0, .L802CB364
/* EFD08 802CB358 24020002 */ addiu $v0, $zero, 2
/* EFD0C 802CB35C 52620001 */ beql $s3, $v0, .L802CB364
/* EFD10 802CB360 0054A004 */ sllv $s4, $s4, $v0
.L802CB364:
/* EFD14 802CB364 3C013F80 */ lui $at, 0x3f80
/* EFD18 802CB368 44810000 */ mtc1 $at, $f0
/* EFD1C 802CB36C 00000000 */ nop
/* EFD20 802CB370 E6A0007C */ swc1 $f0, 0x7c($s5)
/* EFD24 802CB374 3C028007 */ lui $v0, %hi(gGameStatusPtr)
/* EFD28 802CB378 8C42419C */ lw $v0, %lo(gGameStatusPtr)($v0)
/* EFD2C 802CB37C AEB40074 */ sw $s4, 0x74($s5)
/* EFD30 802CB380 80420070 */ lb $v0, 0x70($v0)
/* EFD34 802CB384 14400021 */ bnez $v0, .L802CB40C
/* EFD38 802CB388 00000000 */ nop
/* EFD3C 802CB38C 3C014120 */ lui $at, 0x4120
/* EFD40 802CB390 44810000 */ mtc1 $at, $f0
/* EFD44 802CB394 00000000 */ nop
/* EFD48 802CB398 4614003C */ c.lt.s $f0, $f20
/* EFD4C 802CB39C 00000000 */ nop
/* EFD50 802CB3A0 45030001 */ bc1tl .L802CB3A8
/* EFD54 802CB3A4 46000506 */ mov.s $f20, $f0
.L802CB3A8:
/* EFD58 802CB3A8 3C0140C0 */ lui $at, 0x40c0
/* EFD5C 802CB3AC 44810000 */ mtc1 $at, $f0
/* EFD60 802CB3B0 00000000 */ nop
/* EFD64 802CB3B4 4614003C */ c.lt.s $f0, $f20
/* EFD68 802CB3B8 00000000 */ nop
/* EFD6C 802CB3BC 45000002 */ bc1f .L802CB3C8
/* EFD70 802CB3C0 4600A086 */ mov.s $f2, $f20
/* EFD74 802CB3C4 46000086 */ mov.s $f2, $f0
.L802CB3C8:
/* EFD78 802CB3C8 3C014200 */ lui $at, 0x4200
/* EFD7C 802CB3CC 44810000 */ mtc1 $at, $f0
/* EFD80 802CB3D0 00000000 */ nop
/* EFD84 802CB3D4 46001002 */ mul.s $f0, $f2, $f0
/* EFD88 802CB3D8 00000000 */ nop
/* EFD8C 802CB3DC 0280282D */ daddu $a1, $s4, $zero
/* EFD90 802CB3E0 3C014280 */ lui $at, 0x4280
/* EFD94 802CB3E4 44811000 */ mtc1 $at, $f2
/* EFD98 802CB3E8 2A820005 */ slti $v0, $s4, 5
/* EFD9C 802CB3EC 10400002 */ beqz $v0, .L802CB3F8
/* EFDA0 802CB3F0 46020080 */ add.s $f2, $f0, $f2
/* EFDA4 802CB3F4 24050005 */ addiu $a1, $zero, 5
.L802CB3F8:
/* EFDA8 802CB3F8 4600110D */ trunc.w.s $f4, $f2
/* EFDAC 802CB3FC 44042000 */ mfc1 $a0, $f4
/* EFDB0 802CB400 30A5FFFF */ andi $a1, $a1, 0xffff
/* EFDB4 802CB404 0C00A3C2 */ jal start_rumble
/* EFDB8 802CB408 00052840 */ sll $a1, $a1, 1
.L802CB40C:
/* EFDBC 802CB40C 96020000 */ lhu $v0, ($s0)
/* EFDC0 802CB410 34420008 */ ori $v0, $v0, 8
/* EFDC4 802CB414 A6020000 */ sh $v0, ($s0)
/* EFDC8 802CB418 24020001 */ addiu $v0, $zero, 1
/* EFDCC 802CB41C C6A2007C */ lwc1 $f2, 0x7c($s5)
/* EFDD0 802CB420 12620016 */ beq $s3, $v0, .L802CB47C
/* EFDD4 802CB424 2A620002 */ slti $v0, $s3, 2
/* EFDD8 802CB428 10400005 */ beqz $v0, .L802CB440
/* EFDDC 802CB42C 24020002 */ addiu $v0, $zero, 2
/* EFDE0 802CB430 52600007 */ beql $s3, $zero, .L802CB450
/* EFDE4 802CB434 46001007 */ neg.s $f0, $f2
/* EFDE8 802CB438 080B2D47 */ j .L802CB51C
/* EFDEC 802CB43C 00000000 */ nop
.L802CB440:
/* EFDF0 802CB440 5262001B */ beql $s3, $v0, .L802CB4B0
/* EFDF4 802CB444 46001007 */ neg.s $f0, $f2
/* EFDF8 802CB448 080B2D47 */ j .L802CB51C
/* EFDFC 802CB44C 00000000 */ nop
.L802CB450:
/* EFE00 802CB450 46140002 */ mul.s $f0, $f0, $f20
/* EFE04 802CB454 00000000 */ nop
/* EFE08 802CB458 44060000 */ mfc1 $a2, $f0
/* EFE0C 802CB45C 44800000 */ mtc1 $zero, $f0
/* EFE10 802CB460 00000000 */ nop
/* EFE14 802CB464 44050000 */ mfc1 $a1, $f0
/* EFE18 802CB468 26040194 */ addiu $a0, $s0, 0x194
/* EFE1C 802CB46C 0C019E40 */ jal guTranslateF
/* EFE20 802CB470 00A0382D */ daddu $a3, $a1, $zero
/* EFE24 802CB474 080B2D44 */ j .L802CB510
/* EFE28 802CB478 00000000 */ nop
.L802CB47C:
/* EFE2C 802CB47C 46141082 */ mul.s $f2, $f2, $f20
/* EFE30 802CB480 00000000 */ nop
/* EFE34 802CB484 44800000 */ mtc1 $zero, $f0
/* EFE38 802CB488 26040194 */ addiu $a0, $s0, 0x194
/* EFE3C 802CB48C 44060000 */ mfc1 $a2, $f0
/* EFE40 802CB490 3C013F80 */ lui $at, 0x3f80
/* EFE44 802CB494 44810000 */ mtc1 $at, $f0
/* EFE48 802CB498 44051000 */ mfc1 $a1, $f2
/* EFE4C 802CB49C 00C0382D */ daddu $a3, $a2, $zero
/* EFE50 802CB4A0 0C019EC8 */ jal guRotateF
/* EFE54 802CB4A4 E7A00010 */ swc1 $f0, 0x10($sp)
/* EFE58 802CB4A8 080B2D44 */ j .L802CB510
/* EFE5C 802CB4AC 00000000 */ nop
.L802CB4B0:
/* EFE60 802CB4B0 46140002 */ mul.s $f0, $f0, $f20
/* EFE64 802CB4B4 00000000 */ nop
/* EFE68 802CB4B8 44060000 */ mfc1 $a2, $f0
/* EFE6C 802CB4BC 44800000 */ mtc1 $zero, $f0
/* EFE70 802CB4C0 00000000 */ nop
/* EFE74 802CB4C4 44050000 */ mfc1 $a1, $f0
/* EFE78 802CB4C8 26040194 */ addiu $a0, $s0, 0x194
/* EFE7C 802CB4CC 0C019E40 */ jal guTranslateF
/* EFE80 802CB4D0 00A0382D */ daddu $a3, $a1, $zero
/* EFE84 802CB4D4 8EA30074 */ lw $v1, 0x74($s5)
/* EFE88 802CB4D8 00141040 */ sll $v0, $s4, 1
/* EFE8C 802CB4DC 0062102A */ slt $v0, $v1, $v0
/* EFE90 802CB4E0 1040000B */ beqz $v0, .L802CB510
/* EFE94 802CB4E4 0283102A */ slt $v0, $s4, $v1
/* EFE98 802CB4E8 10400009 */ beqz $v0, .L802CB510
/* EFE9C 802CB4EC 00000000 */ nop
/* EFEA0 802CB4F0 C6A0007C */ lwc1 $f0, 0x7c($s5)
/* EFEA4 802CB4F4 3C01802E */ lui $at, %hi(D_802DA1D0)
/* EFEA8 802CB4F8 D422A1D0 */ ldc1 $f2, %lo(D_802DA1D0)($at)
/* EFEAC 802CB4FC 46000021 */ cvt.d.s $f0, $f0
/* EFEB0 802CB500 46220002 */ mul.d $f0, $f0, $f2
/* EFEB4 802CB504 00000000 */ nop
/* EFEB8 802CB508 080B2D46 */ j .L802CB518
/* EFEBC 802CB50C 46200020 */ cvt.s.d $f0, $f0
.L802CB510:
/* EFEC0 802CB510 C6A0007C */ lwc1 $f0, 0x7c($s5)
/* EFEC4 802CB514 46000007 */ neg.s $f0, $f0
.L802CB518:
/* EFEC8 802CB518 E6A0007C */ swc1 $f0, 0x7c($s5)
.L802CB51C:
/* EFECC 802CB51C 8EA20074 */ lw $v0, 0x74($s5)
/* EFED0 802CB520 10400004 */ beqz $v0, .L802CB534
/* EFED4 802CB524 2442FFFF */ addiu $v0, $v0, -1
/* EFED8 802CB528 AEA20074 */ sw $v0, 0x74($s5)
/* EFEDC 802CB52C 080B2D51 */ j .L802CB544
/* EFEE0 802CB530 0000102D */ daddu $v0, $zero, $zero
.L802CB534:
/* EFEE4 802CB534 96030000 */ lhu $v1, ($s0)
/* EFEE8 802CB538 24020002 */ addiu $v0, $zero, 2
/* EFEEC 802CB53C 3063FFF7 */ andi $v1, $v1, 0xfff7
/* EFEF0 802CB540 A6030000 */ sh $v1, ($s0)
.L802CB544:
/* EFEF4 802CB544 8FBF0030 */ lw $ra, 0x30($sp)
/* EFEF8 802CB548 8FB5002C */ lw $s5, 0x2c($sp)
/* EFEFC 802CB54C 8FB40028 */ lw $s4, 0x28($sp)
/* EFF00 802CB550 8FB30024 */ lw $s3, 0x24($sp)
/* EFF04 802CB554 8FB20020 */ lw $s2, 0x20($sp)
/* EFF08 802CB558 8FB1001C */ lw $s1, 0x1c($sp)
/* EFF0C 802CB55C 8FB00018 */ lw $s0, 0x18($sp)
/* EFF10 802CB560 D7B40038 */ ldc1 $f20, 0x38($sp)
/* EFF14 802CB564 03E00008 */ jr $ra
/* EFF18 802CB568 27BD0040 */ addiu $sp, $sp, 0x40