A few funcs (#751)

* update_item_entity_collectable

* cleanup

* snibblets and bits

* CancelablePlayerRunToGoal and PlayerRunToGoal

* nonmatch

* PR comments and peach_star_beam effect

* PR stuffs
This commit is contained in:
Ethan Roseman 2022-08-25 19:18:04 +09:00 committed by GitHub
parent 9d47d968f9
commit 7467b148d1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
22 changed files with 1807 additions and 2494 deletions

View File

@ -1748,7 +1748,7 @@ typedef struct ActorState { // TODO: Make the first field of this an ActorMoveme
/* 0x18 */ Vec3f unk_18;
/* 0x24 */ f32 unk_24;
/* 0x28 */ f32 unk_28;
/* 0x2C */ char unk_2C[0x4];
/* 0x2C */ f32 unk_2C;
/* 0x30 */ Vec3f unk_30;
/* 0x3C */ f32 acceleration;
/* 0x40 */ f32 speed;

View File

@ -1221,9 +1221,36 @@ typedef struct FireworkRocketFXData {
/* 0x00 */ char todo[0];
} FireworkRocketFXData; // size = unknown
typedef struct PeachStarBeamInner {
/* 0x00 */ s32 flags;
/* 0x04 */ Vec3f unk_04;
/* 0x10 */ Vec3f unk_10;
} PeachStarBeamInner; // size = 0x1C
typedef struct PeachStarBeamFXData {
/* 0x00 */ char todo[0];
} PeachStarBeamFXData; // size = unknown
/* 0x00 */ s32 type;
/* 0x04 */ Vec3f pos;
/* 0x10 */ s32 timeLeft;
/* 0x14 */ s32 lifetime;
/* 0x18 */ s32 primR;
/* 0x1C */ s32 primG;
/* 0x20 */ s32 primB;
/* 0x24 */ s32 alpha;
/* 0x28 */ s32 envR;
/* 0x2C */ s32 envG;
/* 0x30 */ s32 envB;
/* 0x34 */ s32 envA;
/* 0x38 */ f32 unk_38;
/* 0x3C */ s32 unk_3C;
/* 0x40 */ f32 unk_40;
/* 0x44 */ f32 unk_44;
/* 0x48 */ f32 unk_48;
/* 0x4C */ f32 unk_4C;
/* 0x50 */ f32 unk_50;
/* 0x54 */ f32 unk_54;
/* 0x58 */ f32 unk_58;
/* 0x5C */ PeachStarBeamInner parts[8];
} PeachStarBeamFXData; // size = 0x13C
typedef struct ChapterChangeFXData {
/* 0x00 */ char todo[0];
@ -1290,7 +1317,7 @@ typedef struct QuizmoAssistantFXData {
typedef struct IcePillarFXData {
/* 0x00 */ char unk_00[0x4];
/* 0x04 */ Vec3f position;
/* 0x04 */ Vec3f pos;
/* 0x10 */ char unk_10[0x10];
/* 0x20 */ f32 unk_20;
/* 0x24 */ char todo[0];

View File

@ -148,13 +148,13 @@ FX_MAIN(static_status_main);
FX_MAIN(moving_cloud_main);
FX_MAIN(fx_75_main);
FX_MAIN(firework_rocket_main);
FX_MAIN(peach_star_beam_main);
EffectInstance* peach_star_beam_main(s32, f32, f32, f32, f32, s32);
FX_MAIN(chapter_change_main);
FX_MAIN(ice_shard_main);
FX_MAIN(spirit_card_main);
FX_MAIN(lil_oink_main);
FX_MAIN(something_rotating_main);
EffectInstance* breaking_junk_main(s32 arg0, f32 arg1, f32 arg2, f32 arg3, f32 arg4, s32 arg5);
EffectInstance* breaking_junk_main(s32, f32, f32, f32, f32, s32);
FX_MAIN(partner_buff_main);
FX_MAIN(quizmo_assistant_main);
FX_MAIN(ice_pillar_main);

View File

@ -592,9 +592,15 @@ enum SoundIDs {
SOUND_CREAKY_ROCKING_CHAIR = 0x000001D6,
SOUND_1E2 = 0x000001E2,
SOUND_211 = 0x00000211,
SOUND_212 = 0x00000212,
SOUND_213 = 0x00000213,
SOUND_214 = 0x00000214,
SOUND_215 = 0x00000215,
SOUND_217 = 0x00000217,
SOUND_218 = 0x00000218,
SOUND_219 = 0x00000219,
SOUND_21A = 0x0000021A,
SOUND_21B = 0x0000021B,
SOUND_21C = 0x0000021C,
SOUND_MENU_ERROR = 0x0000021D,
SOUND_231 = 0x00000231,
@ -726,6 +732,7 @@ enum SoundIDs {
SOUND_2019 = 0x00002019,
SOUND_201B = 0x0000201B,
SOUND_2020 = 0x00002020,
SOUND_2056 = 0x00002056,
SOUND_202C = 0x0000202C,
SOUND_202D = 0x0000202D,
SOUND_202E = 0x0000202E,
@ -900,7 +907,6 @@ enum AuxCameraParams {
AUX_CAM_ZOOM_PERCENT = 8
};
#define LOOKUP_ITEM(itemID) gItemTable[itemID & ~0xF0000]
enum ItemIDs {
ITEM_NONE = 0x00000000,
ITEM_JUMP = 0x00000001,
@ -1269,6 +1275,8 @@ enum ItemIDs {
ITEM_ITEMS_ICON = 0x0000016C,
};
#define LOOKUP_ITEM(itemID) gItemTable[itemID & ~0xF0000]
#define ITEM_FIRST_KEY ITEM_LUCKY_STAR
#define ITEM_FIRST_VALID_KEY ITEM_KOOPA_FORTRESS_KEY
#define ITEM_LAST_KEY ITEM_PRISON_KEY4
@ -1278,6 +1286,9 @@ enum ItemIDs {
#define ITEM_FIRST_BADGE ITEM_SPIN_SMASH
#define ITEM_LAST_BADGE ITEM_ATTACK_FX_F5
#define IS_ID_BADGE(itemID) (itemID >= ITEM_FIRST_BADGE && itemID <= ITEM_LAST_BADGE)
#define IS_ID_ITEM(itemID) (itemID >= ITEM_FIRST_VALID_KEY && itemID <= ITEM_LAST_VALID_CONSUMABLE)
enum ItemTypeFlags {
ITEM_TYPE_FLAG_WORLD_USABLE = 0x0001,
ITEM_TYPE_FLAG_BATTLE_USABLE = 0x0002,
@ -1982,6 +1993,7 @@ enum ItemEntityFlags {
ITEM_ENTITY_FLAGS_4000000 = 0x04000000,
ITEM_ENTITY_FLAGS_8000000 = 0x08000000,
ITEM_ENTITY_FLAGS_10000000 = 0x10000000,
ITEM_ENTITY_FLAGS_20000000 = 0x20000000,
ITEM_ENTITY_FLAGS_40000000 = 0x40000000,
ITEM_ENTITY_FLAGS_80000000 = 0x80000000,
};

View File

@ -143,6 +143,10 @@ extern SpriteShadingProfile* D_80151328;
extern Window gWindows[64];
extern struct EffectInstance* D_802A37F0;
extern s32 D_802A37F8;
extern s32 D_802A3818;
extern s32 D_802A3834;
extern s32 D_802A3838;
extern s32 gGameState;

View File

@ -719,16 +719,6 @@ void update_hero_shadows(void) {
void func_80255FD8(void) {
}
void create_status_chill_out(s32 iconID);
void enable_status_2(s32 iconID);
void enable_status_chill_out(s32 iconID);
void enable_status_debuff(s16);
void enable_status_transparent(s16);
s32 func_80265CE8(u32*, s32);
void func_80266DAC(Actor* actor, s32 arg1);
void set_status_icons_offset(s32 iconID, s32 offsetY, s32 arg2);
void set_status_icons_properties(s32 iconID, f32 x, f32 y, f32 z, s32 arg, s32 arg2, s32 radius, s32 offsetY);
INCLUDE_ASM(s32, "182B30", func_80255FE0);
void func_802571F0(s32 flipYaw, Actor* actor) {
@ -877,11 +867,11 @@ void func_802571F0(s32 flipYaw, Actor* actor) {
}
void func_80257B28(void* data) {
func_80255FE0(0, (s32) data);
func_80255FE0(FALSE, (s32) data);
}
void func_80257B48(void* data) {
func_80255FE0(1, (s32) data);
func_80255FE0(TRUE, (s32) data);
}
void func_80257B68(void* data) {

View File

@ -1057,7 +1057,116 @@ ApiStatus GetMenuSelection(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2;
}
// float regz
#ifdef NON_MATCHING
ApiStatus func_80273444(Evt* script, s32 isInitialCall) {
BattleStatus* battleStatus = &gBattleStatus;
Bytecode* args = script->ptrReadPos;
Actor* player = battleStatus->playerActor;
ActorState* playerState = &player->state;
f32 playerVel;
f32 currentX;
f32 currentY;
f32 currentZ;
f32 goalX;
f32 goalY;
f32 goalZ;
f32 var_f8;
f64 temp_f20_2;
f32 sub;
if (isInitialCall) {
script->functionTemp[0] = FALSE;
}
if (!script->functionTemp[0]) {
player->state.moveTime = evt_get_variable(script, *args++);
player->state.moveArcAmplitude = evt_get_variable(script, *args++);
script->functionTemp[1] = evt_get_variable(script, *args++);
goalX = player->state.goalPos.x;
goalY = player->state.goalPos.y;
goalZ = player->state.goalPos.z;
player->state.currentPos.x = player->currentPos.x;
player->state.currentPos.y = player->currentPos.y;
player->state.currentPos.z = player->currentPos.z;
currentX = player->currentPos.x;
currentY = player->currentPos.y;
currentZ = player->currentPos.z;
player->state.angle = atan2(currentX, currentZ, goalX, goalZ);
player->state.distance = dist2D(currentX, currentZ, goalX, goalZ);
sub = goalY - currentY;
if (player->state.moveTime == 0) {
player->state.moveTime = player->state.distance / player->state.speed;
var_f8 = player->state.distance - (player->state.moveTime * player->state.speed);
} else {
player->state.speed = player->state.distance / player->state.moveTime;
var_f8 = player->state.distance - (player->state.moveTime * player->state.speed);
}
playerState->speed += var_f8 / playerState->moveTime;
playerState->velocity = (playerState->acceleration * playerState->moveTime * 0.5f) + (sub / playerState->moveTime);
set_animation(0, 0, playerState->animJumpRise);
playerState->unk_24 = 90.0f;
playerState->unk_28 = 180 / playerState->moveTime;
playerState->unk_2C = playerState->goalPos.y;
if (script->functionTemp[1] != 2) {
sfx_play_sound_at_position(0x160, 0, player->currentPos.x, player->currentPos.y, player->currentPos.z);
}
script->functionTemp[0] = TRUE;
}
if (playerState->velocity < 0.0f) {
set_animation(0, 0, playerState->animJumpFall);
}
playerVel = playerState->velocity;
switch (playerState->moveArcAmplitude) {
case 0:
break;
case 1:
if (playerState->currentPos.y - playerState->unk_2C > 45.0f) {
playerVel *= 0.25f;
}
break;
case 2:
if (playerState->currentPos.y - playerState->unk_2C > 54.9) {
playerVel *= 0.25f;
}
break;
}
playerState->currentPos.y += playerVel;
playerState->velocity -= playerState->acceleration;
temp_f20_2 = playerState->speed;
add_xz_vec3f(&playerState->currentPos, temp_f20_2 + sin_rad((playerState->unk_24 * TAU) / 360.0f), playerState->angle);
playerState->unk_24 += playerState->unk_28;
playerState->unk_24 = clamp_angle(playerState->unk_24);
player->currentPos.x = playerState->currentPos.x;
player->currentPos.y = playerState->currentPos.y;
player->currentPos.z = playerState->currentPos.z;
playerState->moveTime--;
if (playerState->moveTime >= 0) {
return ApiStatus_BLOCK;
}
player->currentPos.y = playerState->goalPos.y;
if (script->functionTemp[1] != 1) {
play_movement_dust_effects(2, player->currentPos.x, player->currentPos.y, player->currentPos.z, player->yaw);
}
if (script->functionTemp[1] != 2) {
sfx_play_sound_at_position(SOUND_SOFT_LAND, 0, player->currentPos.x, player->currentPos.y, player->currentPos.z);
}
return ApiStatus_DONE1;
}
#else
INCLUDE_ASM(s32, "19FAF0", func_80273444);
#endif
//float bs
#ifdef NON_MATCHING
@ -1188,9 +1297,168 @@ ApiStatus PlayerLandJump(Evt *script, s32 isInitialCall) {
return ApiStatus_BLOCK;
}
INCLUDE_ASM(s32, "19FAF0", PlayerRunToGoal, Evt* script, s32 isInitialCall);
ApiStatus PlayerRunToGoal(Evt* script, s32 isInitialCall) {
BattleStatus* battleStatus = &gBattleStatus;
Bytecode* args = script->ptrReadPos;
Actor* player = battleStatus->playerActor;
ActorState* playerState = &player->state;
f32 currentX, currentZ, goalX, goalZ;
INCLUDE_ASM(s32, "19FAF0", CancelablePlayerRunToGoal, Evt* script, s32 isInitialCall);
if (isInitialCall) {
script->functionTemp[0] = FALSE;
}
if (!script->functionTemp[0]) {
player->state.moveTime = evt_get_variable(script, *args++);
player->state.currentPos.x = player->currentPos.x;
player->state.currentPos.y = player->currentPos.y;
player->state.currentPos.z = player->currentPos.z;
goalX = player->state.goalPos.x;
goalZ = player->state.goalPos.z;
currentX = player->state.currentPos.x;
currentZ = player->state.currentPos.z;
player->state.angle = atan2(currentX, currentZ, goalX, goalZ);
player->state.distance = dist2D(currentX, currentZ, goalX, goalZ);
if (player->state.moveTime == 0) {
player->state.moveTime = player->state.distance / player->state.speed;
if (player->state.moveTime == 0) {
player->state.moveTime = 1;
}
player->state.speed += (player->state.distance - (player->state.moveTime * player->state.speed)) / player->state.moveTime;
} else {
player->state.speed = player->state.distance / player->state.moveTime;
}
playerState->distance = player->actorTypeData1b[0] + 1;
script->functionTemp[0] = TRUE;
}
add_xz_vec3f(&playerState->currentPos, playerState->speed, playerState->angle);
player->currentPos.x = playerState->currentPos.x;
player->currentPos.y = playerState->currentPos.y;
player->currentPos.z = playerState->currentPos.z;
if (playerState->speed < 4.0f) {
play_movement_dust_effects(0, player->currentPos.x, player->currentPos.y, player->currentPos.z, player->yaw);
} else {
play_movement_dust_effects(1, player->currentPos.x, player->currentPos.y, player->currentPos.z, player->yaw);
}
playerState->distance += playerState->speed;
if (playerState->distance > player->actorTypeData1b[0]) {
player->footStepCounter++;
playerState->distance = 0.0f;
if ((player->footStepCounter % 2) != 0) {
sfx_play_sound_at_position(SOUND_STEP1, 0, player->currentPos.x, player->currentPos.y, player->currentPos.z);
} else {
sfx_play_sound_at_position(SOUND_STEP2, 0, player->currentPos.x, player->currentPos.y, player->currentPos.z);
}
}
playerState->moveTime--;
if (playerState->moveTime <= 0) {
player->currentPos.x = playerState->goalPos.x;
player->currentPos.z = playerState->goalPos.z;
return ApiStatus_DONE2;
}
return ApiStatus_BLOCK;;
}
ApiStatus CancelablePlayerRunToGoal(Evt* script, s32 isInitialCall) {
BattleStatus* battleStatus = &gBattleStatus;
Bytecode* args = script->ptrReadPos;
Actor* player = battleStatus->playerActor;
ActorState* playerState = &player->state;
f32 currentX, currentZ, goalX, goalZ;
if (isInitialCall) {
script->functionTemp[0] = FALSE;
}
if (!script->functionTemp[0]) {
player->state.moveTime = evt_get_variable(script, *args++);
script->functionTemp[1] = *args++;
player->state.currentPos.x = player->currentPos.x;
player->state.currentPos.y = player->currentPos.y;
player->state.currentPos.z = player->currentPos.z;
goalX = player->state.goalPos.x;
goalZ = player->state.goalPos.z;
currentX = player->state.currentPos.x;
currentZ = player->state.currentPos.z;
player->state.angle = atan2(currentX, currentZ, goalX, goalZ);
player->state.distance = dist2D(currentX, currentZ, goalX, goalZ);
if (player->state.moveTime == 0) {
player->state.moveTime = player->state.distance / player->state.speed;
player->state.speed += (player->state.distance - (player->state.moveTime * player->state.speed)) / player->state.moveTime;
} else {
player->state.speed = player->state.distance / player->state.moveTime;
}
playerState->distance = player->actorTypeData1b[0] + 1;
if (playerState->moveTime == 0) {
return ApiStatus_DONE2;
}
script->functionTemp[2] = FALSE;
script->functionTemp[3] = 0;
script->functionTemp[0] = TRUE;
}
add_xz_vec3f(&playerState->currentPos, playerState->speed, playerState->angle);
player->currentPos.x = playerState->currentPos.x;
player->currentPos.y = playerState->currentPos.y;
player->currentPos.z = playerState->currentPos.z;
if (playerState->speed < 4.0f) {
play_movement_dust_effects(0, player->currentPos.x, player->currentPos.y, player->currentPos.z, player->yaw);
} else {
play_movement_dust_effects(1, player->currentPos.x, player->currentPos.y, player->currentPos.z, player->yaw);
}
playerState->distance += playerState->speed;
if (playerState->distance > player->actorTypeData1b[0]) {
player->footStepCounter++;
playerState->distance = 0.0f;
if ((player->footStepCounter % 2) != 0) {
sfx_play_sound_at_position(SOUND_STEP1, 0, player->currentPos.x, player->currentPos.y, player->currentPos.z);
} else {
sfx_play_sound_at_position(SOUND_STEP2, 0, player->currentPos.x, player->currentPos.y, player->currentPos.z);
}
}
if (script->functionTemp[3] > 12) {
if (!script->functionTemp[2]) {
if (!(battleStatus->currentButtonsDown & BUTTON_A)) {
script->functionTemp[2] = TRUE;
}
}
if (script->functionTemp[2]) {
if (battleStatus->currentButtonsPressed & BUTTON_A) {
evt_set_variable(script, script->functionTemp[1], 1);
return ApiStatus_DONE2;
}
}
}
script->functionTemp[3]++;
playerState->moveTime--;
if (playerState->moveTime > 0) {
return ApiStatus_BLOCK;
}
player->currentPos.x = playerState->goalPos.x;
player->currentPos.z = playerState->goalPos.z;
evt_set_variable(script, script->functionTemp[1], 0);
return ApiStatus_DONE2;
}
ApiStatus GetPlayerHP(Evt* script, s32 isInitialCall) {
evt_set_variable(script, *script->ptrReadPos, gPlayerData.curHP);

View File

@ -83,6 +83,10 @@ extern HudScript HES_MoveBlueOrbDisabled;
extern HudScript HES_MoveGreenOrbDisabled;
extern HudScript HES_MoveRedOrbDisabled;
extern HudScript HES_GreenArrowDown;
extern HudScript HES_GreenArrowUp;
extern HudScript HES_HandPointer;
extern s32 D_802ACC60;
extern s32 D_802ACC6C;
extern s8 D_802AD000;
@ -138,7 +142,7 @@ extern s32 battle_menu_hasSpiritsMenu;
extern s32 battle_menu_moveOptionCount;
extern s8 D_802AD604;
extern s8 D_802AD605;
extern u8 D_802AD606;
extern s8 D_802AD606;
extern s8 D_802AD607;
extern s8 D_802AD608;
extern s8 D_802AD609;
@ -147,17 +151,23 @@ extern s8 D_802AD60B;
extern s16 D_802AD60C;
extern s16 D_802AD60E;
extern s16 D_802AD610;
extern s16 D_802AD612;
extern s8 D_802AD614;
extern s32 D_802AD618;
extern s32 D_802AD61C;
extern s32 D_802AD620;
extern s32 D_802AD624;
extern s32 D_802AD628[];
extern s16 D_802AD63C;
extern s16 D_802AD63E;
extern HudScript* D_802AD640[];
extern s32 D_802AD658[]; // msg IDs
extern s32 D_802AD66C;
extern u8 D_802AD66F;
extern s8 D_802AD673;
extern s32 D_802AD678[];
extern s32 D_802AD690[];
extern s32 D_802AD6A8[];
extern s32 D_802AD6C0[];
extern s32 D_802AD6D4;
@ -274,6 +284,11 @@ s32 D_802AB738[] = {
0x001D000F, 0x001D0010, 0x001D0011, 0x001D0012, 0x00000000
};
void func_802A5290(s32 arg0, s32 x, s32 y);
void func_802A56F8(s32 arg0, s32 x, s32 y);
void func_802A5738(s32 arg0, s32 x, s32 y);
void func_802A57C8(s32 arg0, s32 x, s32 y);
void func_802A1000(void) {
D_802AD006 = 255;
D_802AD008 = 255;
@ -865,7 +880,189 @@ void func_802A4A10(void) {
D_802AD604 = 30;
}
// v0/v1 dumb
#ifdef NON_MATCHING
s32 func_802A4A54(void) {
BattleStatus* battleStatus = &gBattleStatus;
s32 id;
s32 x;
s32 y;
s32 width;
s32 i;
switch (D_802AD604) {
case 0:
D_802AD63C = 20;
D_802AD63E = 68;
D_802AD60C = -D_802AD608 * 13;
D_802AD60E = (D_802AD605 - D_802AD608) * 13;
for (i = 0; i < D_802AD66C; i++) {
D_802AD628[i] = id = hud_element_create(D_802AD640[i]);
hud_element_set_scale(id, 0.45f);
hud_element_set_flags(id, HUD_ELEMENT_FLAGS_FILTER_TEX | HUD_ELEMENT_FLAGS_80);
}
D_802AD618 = id = hud_element_create(HES_AnimatedHandPointer);
hud_element_set_flags(id, HUD_ELEMENT_FLAGS_DROP_SHADOW | HUD_ELEMENT_FLAGS_80);
hud_element_set_render_pos(id, D_802AD63C, D_802AD63E);
D_802AD61C = id = hud_element_create(HES_GreenArrowUp);
hud_element_set_flags(id, HUD_ELEMENT_FLAGS_DROP_SHADOW | HUD_ELEMENT_FLAGS_80);
hud_element_set_render_pos(id, D_802AD63C + 39, D_802AD63E - 7);
D_802AD620 = id = hud_element_create(HES_GreenArrowDown);
hud_element_set_flags(id, HUD_ELEMENT_FLAGS_DROP_SHADOW | HUD_ELEMENT_FLAGS_80);
hud_element_set_render_pos(id, D_802AD63C + 39, D_802AD63E + 78);
D_802AD614 = 10;
x = D_802AD63C;
y = D_802AD63E;
set_window_properties(6, x, y, 144, (D_802AD60A * 13) + 26, 0, func_802A5290, NULL, -1);
set_window_properties(7, x + 18, y - 6, 108, 16, 1, func_802A56F8, NULL, -1);
x = 20;
y = 186;
set_window_properties(8, x, y, 280, 32, 0x14, func_802A5738, NULL, -1);
set_window_update(6, 1);
set_window_update(7, 1);
set_window_update(8, 1);
D_802AD604 = 1;
break;
case 1:
if (D_802AD607 == 0) {
D_802AD606 = D_802AD605;
if (battleStatus->currentButtonsHeld & BUTTON_STICK_UP) {
if (D_802AD605 > 0) {
D_802AD605--;
} else if (battleStatus->currentButtonsPressed & BUTTON_STICK_UP) {
D_802AD605--;
}
}
if (battleStatus->currentButtonsHeld & BUTTON_STICK_DOWN) {
if (D_802AD605 < D_802AD66C - 1) {
D_802AD605++;
} else if (battleStatus->currentButtonsPressed & BUTTON_STICK_DOWN) {
D_802AD605++;
}
}
if (D_802AD605 < 0) {
D_802AD605 = D_802AD66F - 1;
}
if (D_802AD66C - 1 < D_802AD605) {
D_802AD605 = 0;
}
if (D_802AD606 != D_802AD605) {
hud_element_set_scale(D_802AD628[D_802AD606], 0.45f);
sfx_play_sound(SOUND_MENU_CHANGE_SELECTION);
}
if (D_802AD605 < D_802AD608) {
D_802AD608 = D_802AD605;
}
if (D_802AD605 >= D_802AD609) {
D_802AD608 = D_802AD605 - ((u8) D_802AD60A - 1);
}
D_802AD609 = D_802AD608 + 6;
if (D_802AD609 > D_802AD66C) {
D_802AD609 = D_802AD66C;
}
if (battleStatus->currentButtonsPressed & BUTTON_A) {
if (D_802AD690[D_802AD605] == 1) {
sfx_play_sound(SOUND_MENU_NEXT);
D_802AD604 = -1;
} else {
sfx_play_sound(SOUND_MENU_ERROR);
D_802AD604 = 40;
D_802AD610 = D_802AD6A8[D_802AD605];
}
break;
}
if (battleStatus->currentButtonsPressed & BUTTON_B) {
sfx_play_sound(SOUND_MENU_BACK);
func_802A472C();
D_802AD604 = -2;
}
}
break;
case -1:
for (i = 0; i < D_802AD66C; i++) {
hud_element_set_tint(D_802AD628[i], 160, 160, 160);
}
hud_element_set_tint(D_802AD618, 160, 160, 160);
hud_element_set_tint(D_802AD61C, 160, 160, 160);
hud_element_set_tint(D_802AD620, 160, 160, 160);
hud_element_set_script(D_802AD618, HES_HandPointer);
D_802AD614 = 13;
set_window_update(6, 4);
set_window_update(7, 4);
set_window_update(8, 2);
return D_802AD605 + 1;
case -2:
return 0xFF;
case 10:
set_window_update(6, 2);
set_window_update(7, 2);
set_window_update(8, 2);
D_802AD604 = 11;
return D_802AD605 + 1;
case 11:
return D_802AD605 + 1;
case 20:
set_window_update(6, 1);
set_window_update(7, 1);
set_window_update(8, 1);
D_802AD604 = 1;
return D_802AD605 + 1;
case 30:
set_window_update(6, 1);
set_window_update(7, 1);
set_window_update(8, 1);
D_802AD604 = -1;
break;
case 40:
D_802AD6D4 = -1;
D_802AD604 = 41;
return -1;
case 41:
set_window_update(6, 2);
set_window_update(7, 2);
set_window_update(8, 2);
if (D_802AD610 == 0) {
width = get_msg_width(0x1D00CB, 0);
set_window_properties(9, (SCREEN_WIDTH / 2) - ((width + 23) / 2), 80, width + 23, 28, 0x14, func_802A57C8, NULL, -1);
} else {
width = get_msg_width(0x1D00CC, 0);
set_window_properties(9, (SCREEN_WIDTH / 2) - ((width + 23) / 2), 80, width + 23, 28, 0x14, func_802A57C8, NULL, -1);
}
set_window_update(9, 1);
D_802AD612 = 60;
D_802AD604 = 42;
return -1;
case 42:
if (gGameStatusPtr->pressedButtons[0] & (BUTTON_A | BUTTON_B)) {
D_802AD612 = 0;
}
if (D_802AD612 != 0) {
D_802AD612--;
return -1;
}
set_window_update(9, 2);
set_window_update(6, 1);
set_window_update(7, 1);
set_window_update(8, 1);
D_802AD604 = 1;
break;
}
return 0;
}
#else
INCLUDE_ASM(s32, "415D90", func_802A4A54);
#endif
// getting there but needs work
#ifdef NON_EQUIVALENT

View File

@ -17,6 +17,8 @@ extern HudScript HES_StatusStar1;
extern HudScript HES_StatusTimes;
extern HudScript HES_StatusSPShine;
extern HudScript SlashHudScript;
void clear_player_data(void) {
PlayerData* playerData = &gPlayerData;
s32 i;
@ -448,7 +450,73 @@ void status_menu_draw_number(s32 iconID, s32 x, s32 y, s32 value, s32 numDigits)
INCLUDE_ASM(s32, "80850_len_3060", status_menu_draw_number);
#endif
// close but some ordering / reg issues
#ifdef NON_MATCHING
void status_menu_draw_stat(s32 id, s32 x, s32 y, s32 arg3, s32 arg4) {
s8 digits[4];
s32 sp18;
s32 sp1C;
s32 cond;
s32 digit;
s32 numDigits;
s32 localX;
s32 localY;
s32 i;
numDigits = 2;
sp18 = x + 8;
sp1C = y + 8;
i = 0;
hud_element_set_script(id, SlashHudScript);
hud_element_set_render_pos(id, x + 22, y + 9);
hud_element_clear_flags(id, HUD_ELEMENT_FLAGS_DISABLED);
hud_element_draw_next(id);
for (; i < numDigits; i++) {
s32 num = arg3 % 10;
digits[numDigits - i - 1] = num;
arg3 /= 10;
}
localX = sp18;
localY = sp1C;
cond = FALSE;
for (i = 0; i < numDigits; i++) {
digit = digits[i];
if (digit != 0 || cond || i == numDigits - 1) {
cond = TRUE;
hud_element_set_script(id, DigitHudScripts[digit]);
hud_element_set_render_pos(id, localX + (i * 8), localY);
hud_element_clear_flags(id, HUD_ELEMENT_FLAGS_DISABLED);
hud_element_draw_next(id);
}
}
for (i = 0; i < numDigits; i++) {
digits[numDigits - i - 1] = arg4 % 10;
arg4 /= 10;
}
localX = sp18 + 26;
localY = sp1C;
cond = FALSE;
for (i = 0; i < numDigits; i++) {
digit = digits[i];
if (digit != 0 || cond || i == numDigits - 1) {
cond = TRUE;
hud_element_set_script(id, DigitHudScripts[digit]);
hud_element_set_render_pos(id, localX + (i * 8), localY);
hud_element_clear_flags(id, HUD_ELEMENT_FLAGS_DISABLED);
hud_element_draw_next(id);
}
}
}
#else
INCLUDE_ASM(s32, "80850_len_3060", status_menu_draw_stat);
#endif
void update_status_menu(void);
INCLUDE_ASM(s32, "80850_len_3060", update_status_menu);

View File

@ -3,6 +3,9 @@
extern CamPosSettings blendedCamSettings;
extern f32 D_800A08DC;
extern f32 D_800A08E0;
extern f32 D_800A08E4;
extern f32 D_800A08E8;
extern f32 D_800A08EC;
void func_80030210(Camera* camera, f32 arg1, f32 arg2, s32 arg3);
void func_8003034C(Camera* camera);
@ -197,8 +200,504 @@ CameraControlSettings* test_ray_zone_aabb(f32 x, f32 y, f32 z) {
return gZoneCollisionData.colliderList[zoneID].camSettings;
}
void update_camera_from_controller(Camera*, CamPosSettings*, CameraControlSettings**, CamPosSettings*, CameraControlSettings**, f32, f32, f32, f32, f32, f32, s32, f32*, s32); // extern
void update_camera_from_controller(Camera*, CamPosSettings*, CameraControlSettings**, CamPosSettings*, CameraControlSettings**, f32, f32, f32, f32, f32, f32, s32, f32*, s32);
// WIP - needs a lot of work
#ifdef NON_EQUIVALENT
void update_camera_from_controller(
Camera* camera,
CamPosSettings* oldSettings, CameraControlSettings** prevController,
CamPosSettings* newSettings, CameraControlSettings** newController,
f32 x, f32 y, f32 z,
f32 tX, f32 tY, f32 tZ, s32 changingMap,
f32* interpAlpha, s32 changingZone)
{
CameraControlSettings* prevSettings;
CameraControlSettings* settings;
f32 posAx;
f32 posAz;
f32 posAy;
f32 posBy;
f32 posBx;
f32 posBz;
f32 boomLength;
f32 temp_f0_2;
f32 temp_f0_4;
f32 temp_f0_5;
f32 temp_f0_6;
f32 temp_f10;
f32 temp_f10_2;
f32 temp_f10_3;
f32 temp_f12_2;
f32 temp_f12_5;
f32 temp_f18;
f32 temp_f18_2;
f32 temp_f20;
f32 temp_f20_2;
f32 temp_f20_3;
f32 temp_f20_4;
f32 temp_f22;
f32 temp_f22_2;
f32 temp_f24;
f32 temp_f24_2;
f32 temp_f24_3;
f32 temp_f24_4;
f32 temp_f2;
f32 temp_f2_2;
f32 temp_f2_3;
f32 temp_f2_4;
f32 temp_f2_5;
f32 temp_f2_6;
f32 temp_f2_7;
f32 temp_f4;
f32 temp_f4_11;
f32 temp_f4_12;
f32 temp_f4_13;
f32 temp_f4_14;
f32 temp_f4_2;
f32 temp_f4_3;
f32 temp_f4_4;
f32 temp_f4_5;
f32 temp_f4_6;
f32 temp_f4_8;
f32 temp_f4_9;
f32 temp_f6;
f32 temp_f6_2;
f32 temp_f6_3;
f32 temp_f6_4;
f32 temp_f6_5;
f32 temp_f6_6;
f32 temp_f6_7;
f32 temp_f6_8;
f32 temp_f6_9;
f32 temp_f8;
f32 temp_f8_2;
f32 temp_f8_3;
f32 temp_f8_4;
f32 temp_f8_5;
f32 temp_f8_6;
f32 temp_f8_7;
f32 temp_f8_8;
f32 temp_f8_9;
f32 var_f0_3;
f32 var_f10;
f32 var_f10_2;
f32 var_f16;
f32 var_f16_2;
f32 var_f20;
f32 var_f20_2;
f32 var_f20_3;
f32 var_f22;
f32 var_f22_2;
f32 var_f22_3;
f32 var_f6;
f32 var_f6_2;
f32 var_f8;
settings = *prevController;
if ((u32) (settings) + 2 >= 2U) {
if (settings == NULL) {
oldSettings->position.x = x;
oldSettings->position.y = y;
oldSettings->position.z = z;
} else {
switch (settings->type) {
case 0:
if (settings->flag != 0) {
posBx = settings->posB.x;
posBz = settings->posB.z;
temp_f10 = -(settings->posA.z - posBz) + posBx;
temp_f8 = posBx - temp_f10;
temp_f6 = (settings->posA.x - posBx) + posBz;
temp_f12_2 = posBz - temp_f6;
temp_f4 = (((x - temp_f10) * temp_f8) + ((z - temp_f6) * temp_f12_2)) / (SQ(temp_f8) + SQ(temp_f12_2));
oldSettings->position.x = (temp_f4 * temp_f8) + temp_f10;
oldSettings->position.y = y;
oldSettings->position.z = (temp_f4 * temp_f12_2) + temp_f6;
break;
}
oldSettings->position.x = x;
oldSettings->position.y = y;
oldSettings->position.z = z;
break;
case 6:
posAx = settings->posA.x;
posBx = settings->posB.x;
temp_f8_2 = posBx - posAx;
posAz = settings->posA.z;
posBz = settings->posB.z;
temp_f6_2 = posBz - posAz;
temp_f4_2 = (((x - posAx) * temp_f8_2) + ((z - posAz) * temp_f6_2)) / ((temp_f8_2 * temp_f8_2) + (temp_f6_2 * temp_f6_2));
var_f16 = (temp_f4_2 * temp_f8_2) + posAx;
temp_f8_3 = var_f16 - posAx;
var_f10 = (temp_f4_2 * temp_f6_2) + posAz;
temp_f6_3 = var_f10 - posAz;
temp_f20 = x - var_f16;
temp_f18 = z - var_f10;
if (((temp_f8_2 * temp_f8_3) + (temp_f6_2 * temp_f6_3)) < 0.0f) {
var_f16 = posAx;
var_f10 = posAz;
} else if (((temp_f8_2 * temp_f8_2) + (temp_f6_2 * temp_f6_2)) < ((temp_f8_3 * temp_f8_3) + (temp_f6_3 * temp_f6_3))) {
var_f16 = posBx;
var_f10 = posBz;
}
if (settings->flag == 0) {
var_f16 += temp_f20;
var_f10 += temp_f18;
}
oldSettings->position.x = var_f16;
oldSettings->position.y = y;
oldSettings->position.z = var_f10;
break;
case 1:
if (settings->flag != 0) {
temp_f22 = x - settings->posA.x;
temp_f20_2 = z - settings->posA.z;
temp_f24 = (temp_f22 * temp_f22) + (temp_f20_2 * temp_f20_2);
if (temp_f24 != 0.0f) {
var_f6 = sqrtf(temp_f24);
temp_f4_3 = settings->posB.x - settings->posA.x;
temp_f0_2 = settings->posB.z - settings->posA.z;
temp_f24_2 = 1.0f / var_f6;
temp_f2 = sqrtf(SQ(temp_f4_3) + SQ(temp_f0_2));
temp_f2_2 = settings->posA.x + (temp_f22 * temp_f2 * temp_f24_2);
temp_f4_4 = temp_f20_2 * temp_f2 * temp_f24_2;
oldSettings->position.x = temp_f2_2;
oldSettings->position.y = y;
oldSettings->position.z = settings->posA.z + temp_f4_4;
}
} else {
oldSettings->position.x = x;
oldSettings->position.y = y;
oldSettings->position.z = z;
}
break;
case 2:
case 5:
*prevController = (CameraControlSettings* )-1;
break;
case 3:
oldSettings->position.x = x;
oldSettings->position.y = y;
oldSettings->position.z = z;
break;
}
}
}
settings = *newController;
if (settings == NULL) {
newSettings->position.x = tX;
newSettings->position.y = tY;
newSettings->position.z = tZ;
} else {
switch (settings->type) {
case 0:
newSettings->boomYaw = atan2(0.0f, 0.0f, settings->posB.x - settings->posA.x, settings->posB.z - settings->posA.z);
boomLength = settings->boomLength;
if (boomLength < 0.0f) {
boomLength = -boomLength;
}
newSettings->boomLength = boomLength;
newSettings->boomPitch = settings->boomPitch;
newSettings->viewPitch = settings->viewPitch;
if (settings->flag != 0) {
posBz = settings->posB.z;
posBx = settings->posB.x;
temp_f10_2 = -(settings->posA.z - posBz) + posBx;
temp_f8_4 = posBx - temp_f10_2;
temp_f6_4 = (settings->posA.x - posBx) + posBz;
temp_f12_5 = posBz - temp_f6_4;
temp_f4_5 = (((tX - temp_f10_2) * temp_f8_4) + ((tZ - temp_f6_4) * temp_f12_5)) / ((temp_f8_4 * temp_f8_4) + (temp_f12_5 * temp_f12_5));
newSettings->position.y = tY;
newSettings->position.x = (temp_f4_5 * temp_f8_4) + temp_f10_2;
newSettings->position.z = (temp_f4_5 * temp_f12_5) + temp_f6_4;
} else {
newSettings->position.x = tX;
newSettings->position.y = tY;
newSettings->position.z = tZ;
}
if (changingZone) {
if (*interpAlpha != 1.0f) {
prevSettings = *prevController;
if (((u32) (prevSettings + 2) >= 3U) &&
prevSettings->type == settings->type &&
prevSettings->boomLength == settings->boomLength &&
prevSettings->boomPitch == settings->boomPitch &&
prevSettings->viewPitch == settings->viewPitch &&
prevSettings->flag != settings->flag)
{
*interpAlpha = 1.0f;
}
}
}
break;
case 6:
newSettings->boomYaw = atan2(0.0f, 0.0f, settings->posB.z - settings->posA.z, -(settings->posB.x - settings->posA.x));
boomLength = settings->boomLength;
if (boomLength < 0.0f) {
boomLength = -boomLength;
}
newSettings->boomLength = boomLength;
newSettings->boomPitch = settings->boomPitch;
newSettings->viewPitch = settings->viewPitch;
posAx = settings->posA.x;
posBx = settings->posB.x;
temp_f8_5 = posBx - posAx;
posAz = settings->posA.z;
posBz = settings->posB.z;
temp_f6_5 = posBz - posAz;
temp_f4_6 = (((tX - posAx) * temp_f8_5) + ((tZ - posAz) * temp_f6_5)) / ((temp_f8_5 * temp_f8_5) + (temp_f6_5 * temp_f6_5));
var_f16_2 = (temp_f4_6 * temp_f8_5) + posAx;
temp_f8_6 = var_f16_2 - posAx;
var_f10_2 = (temp_f4_6 * temp_f6_5) + posAz;
temp_f6_6 = var_f10_2 - posAz;
temp_f20_3 = tX - var_f16_2;
temp_f18_2 = tZ - var_f10_2;
if (((temp_f8_5 * temp_f8_6) + (temp_f6_5 * temp_f6_6)) < 0.0f) {
var_f16_2 = posAx;
var_f10_2 = posAz;
} else if (((temp_f8_5 * temp_f8_5) + SQ(temp_f6_5)) < (SQ(temp_f8_6) + SQ(temp_f6_6))) {
var_f16_2 = posBx;
var_f10_2 = posBz;
}
if (settings->flag == 0) {
var_f16_2 += temp_f20_3;
var_f10_2 += temp_f18_2;
}
newSettings->position.x = var_f16_2;
newSettings->position.y = tY;
newSettings->position.z = var_f10_2;
if (changingZone) {
if (*interpAlpha != 1.0f) {
prevSettings = *prevController;
if (((u32) (prevSettings + 2) >= 3U) &&
(prevSettings->type == settings->type) &&
(prevSettings->boomLength == settings->boomLength) &&
(prevSettings->boomPitch == settings->boomPitch) &&
(prevSettings->viewPitch == settings->viewPitch) &&
(prevSettings->flag != settings->flag))
{
*interpAlpha = 1.0f;
}
}
}
break;
case 1:
if (settings->boomLength < 0.0f) {
var_f22 = tX - settings->posA.x;
newSettings->boomLength = -settings->boomLength;
var_f20 = tZ - settings->posA.z;
} else {
var_f22 = settings->posA.x - tX;
newSettings->boomLength = settings->boomLength;
var_f20 = settings->posA.z - tZ;
}
newSettings->boomYaw = atan2(0.0f, 0.0f, var_f22, var_f20);
newSettings->boomPitch = settings->boomPitch;
newSettings->viewPitch = settings->viewPitch;
if (settings->flag != 0) {
temp_f22_2 = tX - settings->posA.x;
temp_f20_4 = tZ - settings->posA.z;
temp_f24_3 = SQ(temp_f22_2) + SQ(temp_f20_4);
if (temp_f24_3 != 0.0f) {
var_f6_2 = sqrtf(temp_f24_3);
temp_f4_8 = settings->posB.x - settings->posA.x;
temp_f0_4 = settings->posB.z - settings->posA.z;
temp_f24_4 = 1.0f / var_f6_2;
temp_f2_3 = sqrtf((temp_f4_8 * temp_f4_8) + (temp_f0_4 * temp_f0_4));
temp_f2_4 = settings->posA.x + (temp_f22_2 * temp_f2_3 * temp_f24_4);
temp_f4_9 = temp_f20_4 * temp_f2_3 * temp_f24_4;
newSettings->position.y = tY;
newSettings->position.x = temp_f2_4;
newSettings->position.z = settings->posA.z + temp_f4_9;
}
} else {
newSettings->position.x = tX;
newSettings->position.y = tY;
newSettings->position.z = tZ;
}
if (changingZone) {
if (*interpAlpha != 1.0f) {
prevSettings = *prevController;
if (((u32) (prevSettings + 2) >= 3U) &&
(prevSettings->type == settings->type) &&
(prevSettings->boomLength == settings->boomLength) &&
(prevSettings->boomPitch == settings->boomPitch) &&
(prevSettings->viewPitch == settings->viewPitch) &&
(prevSettings->flag != settings->flag) &&
(prevSettings->posA.x == settings->posA.x) &&
(prevSettings->posA.z == settings->posA.z))
{
*interpAlpha = 1.0f;
}
}
break;
}
break;
case 2:
if (settings->flag == 0) {
posAx = settings->posA.x;
posBx = settings->posB.x;
posAz = settings->posA.z;
posBz = settings->posB.z;
posAy = settings->posA.y;
posBy = settings->posB.y;
temp_f8_7 = posBx - posAy;
if ((posAx == posBx) && (posAz == posBz)) {
posAx = posAy;
posAz = posBy;
}
if (temp_f8_7 != 0.0f) {
temp_f6_7 = posAz - posBz;
temp_f2_5 = posBz - posBy;
temp_f2_6 = (tZ - posBz) + (((posBx - tX) * temp_f2_5) / temp_f8_7);
temp_f0_5 = posBx - posAx;
temp_f4_11 = ((temp_f6_7 * temp_f2_5) / temp_f8_7) - temp_f0_5;
var_f8 = ((temp_f6_7 * temp_f2_6) / temp_f4_11) + tX;
var_f0_3 = ((temp_f0_5 * temp_f2_6) / temp_f4_11) + tZ;
} else {
temp_f6_8 = posBx - posAx;
temp_f10_3 = posAz - posBz;
temp_f8_8 = posBz - posBy;
temp_f0_6 = (tX - posBx) + (((posBz - tZ) * temp_f8_7) / temp_f8_8);
temp_f4_12 = ((temp_f8_7 * temp_f6_8) / temp_f8_8) - temp_f10_3;
var_f8 = ((temp_f10_3 * temp_f0_6) / temp_f4_12) + tX;
var_f0_3 = ((temp_f6_8 * temp_f0_6) / temp_f4_12) + tZ;
}
newSettings->position.x = var_f8;
newSettings->position.y = tY;
newSettings->position.z = var_f0_3;
if (changingMap) {
newSettings->boomYaw = atan2(0.0f, 0.0f, settings->posB.x - settings->posA.x, settings->posB.z - settings->posA.z);
boomLength = settings->boomLength;
if (boomLength < 0.0f) {
boomLength = -boomLength;
}
newSettings->boomLength = boomLength;
newSettings->boomPitch = settings->boomPitch;
newSettings->viewPitch = settings->viewPitch;
}
} else {
if (changingMap) {
newSettings->boomYaw = atan2(0.0f, 0.0f, settings->posB.x - settings->posA.x, settings->posB.z - settings->posA.z);
boomLength = settings->boomLength;
if (boomLength < 0.0f) {
boomLength = -boomLength;
}
newSettings->boomLength = boomLength;
newSettings->boomPitch = settings->boomPitch;
newSettings->viewPitch = settings->viewPitch;
newSettings->position.x = settings->posB.x;
newSettings->position.z = settings->posB.z;
} else if (changingZone) {
newSettings->position.x = oldSettings->position.x;
newSettings->position.z = oldSettings->position.z;
}
newSettings->position.y = tY;
}
*prevController = (CameraControlSettings*) -1;
break;
case 5:
if (settings->flag == 0) {
posAy = settings->posA.y;
temp_f6_9 = settings->posB.x - posAy;
posBy = settings->posB.y;
temp_f8_9 = settings->posB.z - posBy;
temp_f4_13 = (((tX - posAy) * temp_f6_9) + ((tZ - posBy) * temp_f8_9)) / ((temp_f6_9 * temp_f6_9) + (temp_f8_9 * temp_f8_9));
temp_f2_7 = (temp_f4_13 * temp_f6_9) + posAy;
temp_f4_14 = (temp_f4_13 * temp_f8_9) + posBy;
newSettings->position.y = tY;
newSettings->position.x = temp_f2_7;
newSettings->position.z = temp_f4_14;
if (settings->boomLength < 0.0f) {
var_f22_2 = temp_f2_7 - settings->posA.x;
newSettings->boomLength = -settings->boomLength;
var_f20_2 = temp_f4_14 - settings->posA.z;
} else {
var_f22_2 = settings->posA.x - temp_f2_7;
newSettings->boomLength = settings->boomLength;
var_f20_2 = settings->posA.z - temp_f4_14;
}
newSettings->boomYaw = atan2(0.0f, 0.0f, var_f22_2, var_f20_2);
newSettings->boomPitch = settings->boomPitch;
newSettings->viewPitch = settings->viewPitch;
} else {
if (changingMap) {
if (settings->boomLength < 0.0f) {
var_f22_3 = settings->posB.x - settings->posA.x;
newSettings->boomLength = -settings->boomLength;
var_f20_3 = settings->posB.z - settings->posA.z;
} else {
var_f22_3 = settings->posA.x - settings->posB.x;
newSettings->boomLength = settings->boomLength;
var_f20_3 = settings->posA.z - settings->posB.z;
}
newSettings->boomYaw = atan2(0.0f, 0.0f, var_f22_3, var_f20_3);
newSettings->boomPitch = settings->boomPitch;
newSettings->viewPitch = settings->viewPitch;
newSettings->position.x = settings->posB.x;
newSettings->position.z = settings->posB.z;
} else if (changingZone) {
newSettings->position.x = settings->posB.x;
newSettings->position.z = settings->posB.z;
}
newSettings->position.y = tY;
}
*prevController = (CameraControlSettings*) -1;
break;
case 3:
newSettings->position.x = tX;
newSettings->position.y = tY;
newSettings->position.z = tZ;
break;
case 4:
newSettings->boomYaw = atan2(0.0f, 0.0f, settings->posB.x - settings->posA.x, settings->posB.z - settings->posA.z);
boomLength = settings->boomLength;
if (boomLength < 0.0f) {
boomLength = -boomLength;
}
newSettings->boomLength = boomLength;
newSettings->boomPitch = settings->boomPitch;
newSettings->viewPitch = settings->viewPitch;
newSettings->position.x = settings->posB.x;
newSettings->position.y = settings->posB.y;
newSettings->position.z = settings->posB.z;
*prevController = (CameraControlSettings*) -2;
break;
}
if (changingZone &&
((settings->type == 5) || (oldSettings->boomYaw != newSettings->boomYaw)) &&
(fabsf(oldSettings->boomYaw - newSettings->boomYaw) < 3.0f) &&
(fabsf(oldSettings->boomLength - newSettings->boomLength) < 10.0f) &&
(fabsf(oldSettings->boomPitch - newSettings->boomPitch) < 1.0f) &&
(fabsf(oldSettings->viewPitch - newSettings->viewPitch) < 1.0f) &&
(fabsf(oldSettings->position.x - newSettings->position.x) < 10.0f) &&
(fabsf(oldSettings->position.y - newSettings->position.y) < 10.0f) &&
(fabsf(oldSettings->position.z - newSettings->position.z) < 10.0f))
{
*interpAlpha = 1.0f;
}
}
if (*prevController == (CameraControlSettings* )-1) {
if (changingZone) {
D_800A08E4 = oldSettings->position.x - newSettings->position.x;
D_800A08E8 = oldSettings->position.y - newSettings->position.y;
D_800A08EC = oldSettings->position.z - newSettings->position.z;
}
oldSettings->position.x = newSettings->position.x + D_800A08E4;
oldSettings->position.y = newSettings->position.y + D_800A08E8;
oldSettings->position.z = newSettings->position.z + D_800A08EC;
}
}
#else
INCLUDE_ASM(s32, "B0E0", update_camera_from_controller);
#endif
void update_camera_zone_interp(Camera* camera) {
CameraControlSettings* currentController;

View File

@ -924,8 +924,8 @@ s32 test_item_player_collision(ItemEntity* item) {
actionState = playerStatus->actionState;
if (item->flags & 0x100) {
item->flags &= ~0x100;
if (item->flags & ITEM_ENTITY_FLAGS_100) {
item->flags &= ~ITEM_ENTITY_FLAGS_100;
return TRUE;
}
@ -937,7 +937,7 @@ s32 test_item_player_collision(ItemEntity* item) {
return FALSE;
}
if (item->flags & 0x200000) {
if (item->flags & ITEM_ENTITY_FLAGS_200000) {
return FALSE;
}
@ -945,7 +945,7 @@ s32 test_item_player_collision(ItemEntity* item) {
return FALSE;
}
if (item->flags & 0x40) {
if (item->flags & ITEM_ENTITY_FLAGS_40) {
return FALSE;
}
@ -1019,19 +1019,19 @@ s32 test_item_player_collision(ItemEntity* item) {
}
if (cond) {
if (item->flags & 0x80) {
if (item->flags & ITEM_ENTITY_FLAGS_80) {
if (D_801565A6 != 0) {
D_801565A6--;
return FALSE;
} else {
item->flags &= ~0x80;
item->flags &= ~ITEM_ENTITY_FLAGS_80;
}
}
return TRUE;
}
if (item->flags & 0x80) {
item->flags &= ~0x80;
if (item->flags & ITEM_ENTITY_FLAGS_80) {
item->flags &= ~ITEM_ENTITY_FLAGS_80;
}
return FALSE;
}
@ -1057,7 +1057,7 @@ s32 test_item_entity_position(f32 x, f32 y, f32 z, f32 dist) {
continue;
}
if (!item->flags) {
if (item->flags == 0) {
continue;
}
@ -1134,7 +1134,450 @@ s32 get_current_item_entity_render_group(void) {
return ItemEntityRenderGroup;
}
INCLUDE_ASM(s32, "C50A0", update_item_entity_collectable);
void update_item_entity_collectable(ItemEntity* item) {
PlayerStatus* playerStatus = &gPlayerStatus;
PlayerData* playerData = &gPlayerData;
ItemEntityPhysicsData* physData;
s32 camID;
s32 hit;
f32 outX, outY, outZ, outDepth;
f32 theta, sinAngle, cosAngle;
f32 temp;
if (!isPickingUpItem) {
if (item->pickupDelay != 0) {
item->pickupDelay--;
return;
}
if (item->spawnType == ITEM_SPAWN_MODE_TOSS_FADE1) {
camID = CAM_BATTLE;
} else {
camID = CAM_DEFAULT;
}
switch (item->state) {
case 0:
item_entity_enable_shadow(item);
physData = heap_malloc(sizeof(*physData));
item->physicsData = physData;
ASSERT(physData != NULL);
if (item->flags & ITEM_ENTITY_FLAGS_1000000) {
physData->verticalVelocity = 16.0f;
physData->gravity = 2.0f;
} else if (!(item->flags & ITEM_ENTITY_FLAGS_10000)) {
physData->verticalVelocity = 12.0f;
physData->gravity = 2.0f;
} else {
physData->verticalVelocity = 14.0f;
physData->gravity = 2.0f;
}
physData->unk_08 = 24.0f;
physData->constVelocity = 24.0f;
if (item->wsFaceAngle < 0) {
if (IS_ID_ITEM(item->itemID)) {
if (rand_int(10000) < 5000) {
physData->moveAngle = clamp_angle(gCameras[camID].currentYaw + 105.0f + rand_int(30) - 15.0f);
} else {
physData->moveAngle = clamp_angle(gCameras[camID].currentYaw - 105.0f + rand_int(30) - 15.0f);
}
physData->verticalVelocity += 4.0f;
} else {
switch (item->itemID) {
case ITEM_HEART:
physData->moveAngle = clamp_angle(gCameras[camID].currentYaw + 90.0f + rand_int(120) - 60.0f);
break;
case ITEM_FLOWER_POINT:
physData->moveAngle = clamp_angle(gCameras[camID].currentYaw - 90.0f + rand_int(120) + 60.0f);
break;
case ITEM_COIN:
if (rand_int(10000) < 5000) {
physData->moveAngle = clamp_angle(gCameras[camID].currentYaw + 90.0f + rand_int(120) - 60.0f);
} else {
physData->moveAngle = clamp_angle(gCameras[camID].currentYaw - 90.0f + rand_int(120) - 60.0f);
}
break;
case ITEM_KOOPA_FORTRESS_KEY:
if (rand_int(10000) >= 5000) {
physData->moveAngle = clamp_angle(gCameras[camID].currentYaw - 90.0f + rand_int(120) - 60.0f);
} else {
physData->moveAngle = clamp_angle(gCameras[camID].currentYaw + 90.0f + rand_int(120) - 60.0f);
}
break;
case ITEM_STAR_POINT:
if (item->spawnType != ITEM_SPAWN_MODE_TOSS_FADE1) {
physData->moveAngle = clamp_angle(gCameras[camID].currentYaw - 90.0f + rand_int(120) - 60.0f);
break;
}
if (rand_int(10000) < 5000) {
physData->moveAngle = clamp_angle(gCameras[camID].currentYaw + 90.0f + rand_int(60) - 30.0f);
} else {
physData->moveAngle = clamp_angle(gCameras[camID].currentYaw - 90.0f + rand_int(60) - 30.0f);
}
break;
case ITEM_HEART_POINT:
physData->moveAngle = clamp_angle(gCameras[camID].currentYaw + 90.0f + rand_int(120) - 60.0f);
break;
case ITEM_STAR_PIECE:
if (rand_int(10000) < 5000) {
physData->moveAngle = clamp_angle(gCameras[camID].currentYaw + 90.0f + rand_int(60) - 30.0f);
} else {
physData->moveAngle = clamp_angle(gCameras[camID].currentYaw - 90.0f + rand_int(60) - 30.0f);
}
break;
case ITEM_HEART_PIECE:
physData->moveAngle = clamp_angle(gCameras[camID].currentYaw + 90.0f + rand_int(120) - 60.0f);
break;
default:
physData->moveAngle = 0.0f;
break;
}
}
if (!(item->flags & ITEM_ENTITY_FLAGS_1000000)) {
temp = rand_int(2000);
temp = (temp / 1000.0f) + 1.5;
theta = (physData->moveAngle * TAU) / 360.0f;
sinAngle = sin_rad(theta);
cosAngle = cos_rad(theta);
physData->velx = temp * sinAngle;
physData->velz = -temp * cosAngle;
} else {
temp = rand_int(2000);
temp = (temp / 1000.0f) + 2.0;
theta = (physData->moveAngle * TAU) / 360.0f;
sinAngle = sin_rad(theta);
cosAngle = cos_rad(theta);
physData->velx = temp * sinAngle;
physData->velz = -temp * cosAngle;
}
} else {
physData->moveAngle = clamp_angle(item->wsFaceAngle);
if (!(item->flags & ITEM_ENTITY_FLAGS_40000000)) {
temp = ((item->wsFaceAngle / 360) * 0.6) + 1.5;
} else {
temp = 2.1f;
}
theta = physData->moveAngle * TAU / 360.0f;
sinAngle = sin_rad(theta);
cosAngle = cos_rad(theta);
physData->velx = temp * sinAngle;
physData->velz = -temp * cosAngle;
}
if (item->spawnType != ITEM_SPAWN_MODE_TOSS_FADE1) {
physData->unk_1C = 180;
physData->unk_20 = 0;
} else {
if (!(item->flags & ITEM_ENTITY_FLAGS_400000)) {
physData->unk_1C = 0x11;
} else {
physData->unk_1C = 0x14;
}
physData->unk_20 = 0;
physData->verticalVelocity = 15.0f;
physData->gravity = 1.6f;
}
if (item->spawnType == ITEM_SPAWN_MODE_ITEM_BLOCK_SPAWN_ALWAYS) {
physData->unk_1C = 60;
physData->unk_20 = 0;
physData->velx = 0.0f;
physData->velz = 0.0f;
}
if (item->spawnType == ITEM_SPAWN_MODE_FALL_SPAWN_ALWAYS) {
physData->verticalVelocity = 0.0f;
physData->velx = 0.0f;
physData->velz = 0.0f;
physData->unk_20 = 1;
}
if (item->spawnType == ITEM_SPAWN_MODE_FIXED_SPAWN_ALWAYS) {
physData->verticalVelocity = 0.0f;
physData->velx = 0.0f;
physData->velz = 0.0f;
physData->unk_20 = 1;
}
if (item->flags & ITEM_ENTITY_FLAGS_800) {
set_global_flag(item->boundVar);
}
item->state = 1;
break;
case 1:
physData = item->physicsData;
if (item->spawnType != ITEM_SPAWN_MODE_ITEM_BLOCK_SPAWN_ALWAYS &&
item->spawnType != ITEM_SPAWN_MODE_TOSS_FADE1 &&
physData->unk_20 != 0 &&
test_item_player_collision(item))
{
item->state = 3;
break;
}
if (!(item->flags & ITEM_ENTITY_FLAGS_NEVER_VANISH)) {
if (!(gOverrideFlags & (GLOBAL_OVERRIDES_200 | GLOBAL_OVERRIDES_DISABLE_BATTLES))) {
if (!(item->flags & ITEM_ENTITY_FLAGS_200000)) {
physData->unk_1C--;
if (physData->unk_1C < 0) {
item->state = 2;
break;
}
}
}
}
if (!(item->flags & ITEM_ENTITY_FLAGS_FIXED)) {
if (!(item->flags & ITEM_ENTITY_FLAGS_200000)) {
physData->verticalVelocity -= physData->gravity;
if (physData->verticalVelocity < -16.0) {
physData->verticalVelocity = -16.0f;
}
item->position.y += physData->verticalVelocity;
item->position.x += physData->velx;
item->position.z += physData->velz;
}
}
if (item->spawnType == ITEM_SPAWN_MODE_ITEM_BLOCK_SPAWN_ALWAYS &&
physData->verticalVelocity <= 0.0f)
{
item->state = 3;
break;
}
if (!(item->flags & (ITEM_ENTITY_FLAGS_20000000 | ITEM_ENTITY_FLAGS_10000000)) &&
item->spawnType != ITEM_SPAWN_MODE_ITEM_BLOCK_SPAWN_ALWAYS &&
item->spawnType != ITEM_SPAWN_MODE_TOSS_FADE1 &&
physData->verticalVelocity > 0.0f)
{
temp = physData->constVelocity;
outX = item->position.x;
outY = item->position.y;
outZ = item->position.z;
outDepth = temp + physData->verticalVelocity;
if (physData->unk_20 == 0) {
hit = npc_raycast_up(0x20000, &outX, &outY, &outZ, &outDepth);
} else {
hit = npc_raycast_up(0x20000, &outX, &outY, &outZ, &outDepth);
}
if (hit && outDepth < temp) {
item->position.y = outY - temp;
physData->verticalVelocity = 0.0f;
}
}
if (!(item->flags & (ITEM_ENTITY_FLAGS_20000000 | ITEM_ENTITY_FLAGS_10000000)) &&
item->spawnType != ITEM_SPAWN_MODE_ITEM_BLOCK_SPAWN_ALWAYS &&
item->spawnType != ITEM_SPAWN_MODE_TOSS_FADE1 &&
(physData->velx != 0.0f || physData->velz != 0.0f))
{
outX = item->position.x;
outY = item->position.y;
outZ = item->position.z;
if (physData->unk_20 == 0) {
hit = npc_test_move_complex_with_slipping(0x20000, &outX, &outY, &outZ, 0.0f, physData->moveAngle, physData->constVelocity, physData->unk_08);
} else {
hit = npc_test_move_simple_with_slipping(0x20000, &outX, &outY, &outZ, 0.0f, physData->moveAngle, physData->constVelocity, physData->unk_08);
}
if (hit) {
item->position.x = outX;
item->position.y = outY;
item->position.z = outZ;
physData->moveAngle = clamp_angle(physData->moveAngle + 180.0f);
theta = physData->moveAngle * TAU / 360.0f;
sinAngle = sin_rad(theta);
cosAngle = cos_rad(theta);
physData->velx = sinAngle * 2.0;
physData->velz = cosAngle * -2.0;
}
}
if (!(item->flags & ITEM_ENTITY_FLAGS_10000000) &&
item->spawnType != ITEM_SPAWN_MODE_ITEM_BLOCK_SPAWN_ALWAYS &&
physData->verticalVelocity <= 0.0)
{
physData->unk_20 = 1;
if (item->spawnType != ITEM_SPAWN_MODE_TOSS_FADE1) {
outX = item->position.x;
outY = (item->position.y - physData->verticalVelocity) + 12.0f;
outZ = item->position.z;
outDepth = -physData->verticalVelocity + 12.0f;
if (physData->unk_20 == 0) {
hit = npc_raycast_down_sides(0x20000, &outX, &outY, &outZ, &outDepth);
} else {
hit = npc_raycast_down_around(0x20000, &outX, &outY, &outZ, &outDepth, 180.0f, 20.0f);
}
} else {
outX = item->position.x;
outY = (item->position.y - physData->verticalVelocity) + 12.0f;
outZ = item->position.z;
outDepth = -physData->verticalVelocity + 12.0f;
if (outY < outDepth + 0.0f) {
outY = 0.0f;
hit = TRUE;
} else {
hit = FALSE;
}
}
if (hit) {
item->position.y = outY;
physData->verticalVelocity = (-physData->verticalVelocity / 1.25);
if (physData->verticalVelocity < 3.0) {
physData->verticalVelocity = 0.0f;
physData->velx = 0.0f;
physData->velz = 0.0f;
item->flags |= ITEM_ENTITY_FLAGS_20000000;
} else {
if (IS_ID_BADGE(item->itemID)) {
sfx_play_sound_at_position(SOUND_21B, 0, item->position.x, item->position.y, item->position.z);
} else if (IS_ID_ITEM(item->itemID)) {
sfx_play_sound_at_position(SOUND_21A, 0, item->position.x, item->position.y, item->position.z);
} else {
switch (item->itemID) {
case ITEM_HEART:
sfx_play_sound_at_position(SOUND_214, 0, item->position.x, item->position.y, item->position.z);
break;
case ITEM_COIN:
sfx_play_sound_at_position(SOUND_212, 0, item->position.x, item->position.y, item->position.z);
break;
case ITEM_KOOPA_FORTRESS_KEY:
sfx_play_sound_at_position(SOUND_212, 0, item->position.x, item->position.y, item->position.z);
break;
case ITEM_HEART_PIECE:
sfx_play_sound_at_position(SOUND_214, 0, item->position.x, item->position.y, item->position.z);
break;
case ITEM_STAR_POINT:
sfx_play_sound_at_position(SOUND_212, 0, item->position.x, item->position.y, item->position.z);
break;
case ITEM_HEART_POINT:
sfx_play_sound_at_position(SOUND_214, 0, item->position.x, item->position.y, item->position.z);
break;
case ITEM_STAR_PIECE:
sfx_play_sound_at_position(SOUND_219, 0, item->position.x, item->position.y, item->position.z);
break;
case ITEM_FLOWER_POINT:
sfx_play_sound_at_position(SOUND_218, 0, item->position.x, item->position.y, item->position.z);
break;
}
}
}
}
}
if (item->position.y < -2000.0f) {
item->state = 2;
}
break;
}
if (item->state == 2) {
remove_item_entity_by_reference(item);
}
if (item->state == 3) {
if (item->flags & ITEM_ENTITY_FLAGS_400) {
set_global_flag(item->boundVar);
}
fx_small_gold_sparkle(0, item->position.x, item->position.y + 16.0f, item->position.z, 1.0f, 0);
if (IS_ID_ITEM(item->itemID)) {
item->state = 0xA;
} else if (IS_ID_BADGE(item->itemID)) {
item->state = 0xA;
} else if (item->itemID == ITEM_STAR_PIECE) {
playerData->starPiecesCollected++;
item->state = 0xA;
} else {
if (item->spawnType == ITEM_SPAWN_MODE_TOSS_FADE1) {
item->itemID = -1;
}
switch (item->itemID) {
case ITEM_HEART:
if (playerData->curHP < playerData->curMaxHP) {
fx_recover(0, playerStatus->position.x, playerStatus->position.y + playerStatus->colliderHeight, playerStatus->position.z, 1);
sfx_play_sound_at_position(SOUND_2056, 0, item->position.x, item->position.y, item->position.z);
}
playerData->curHP++;
if (playerData->curHP > playerData->curMaxHP) {
playerData->curHP = playerData->curMaxHP;
}
sfx_play_sound_at_position(SOUND_213, 0, item->position.x, item->position.y, item->position.z);
fx_sparkles(4, playerStatus->position.x, playerStatus->position.y + playerStatus->colliderHeight, playerStatus->position.z, 30.0f);
break;
case ITEM_FLOWER_POINT:
if (playerData->curFP < playerData->curMaxFP) {
fx_recover(1, playerStatus->position.x, playerStatus->position.y + playerStatus->colliderHeight, playerStatus->position.z, 1);
sfx_play_sound_at_position(SOUND_2056, 0, item->position.x, item->position.y, item->position.z);
}
playerData->curFP++;
if (playerData->curFP > playerData->curMaxFP) {
playerData->curFP = playerData->curMaxFP;
}
sfx_play_sound_at_position(SOUND_217, 0, item->position.x, item->position.y, item->position.z);
fx_sparkles(4, playerStatus->position.x, playerStatus->position.y + playerStatus->colliderHeight, playerStatus->position.z, 30.0f);
break;
case ITEM_COIN:
playerData->coins++;
if (playerData->coins > 999) {
playerData->coins = 999;
}
sfx_play_sound_at_position(SOUND_211, 0, item->position.x, item->position.y, item->position.z);
playerData->totalCoinsEarned++;
if (playerData->totalCoinsEarned > 99999) {
playerData->totalCoinsEarned = 99999;
}
break;
case ITEM_KOOPA_FORTRESS_KEY:
playerData->fortressKeyCount = playerData->fortressKeyCount + 1;
sfx_play_sound_at_position(SOUND_211, 0, item->position.x, item->position.y, item->position.z);
break;
case ITEM_STAR_POINT:
playerData->starPoints++;
if (playerData->starPoints > 100) {
playerData->starPoints = 100;
}
sfx_play_sound_at_position(SOUND_211, 0, item->position.x, item->position.y, item->position.z);
break;
case ITEM_HEART_POINT:
playerData->curHP = playerData->curMaxHP;
playerData->curFP = playerData->curMaxFP;
sfx_play_sound_at_position(SOUND_213, 0, item->position.x, item->position.y, item->position.z);
break;
}
D_801565A8 = 0;
gOverrideFlags &= ~GLOBAL_OVERRIDES_40;
remove_item_entity_by_reference(item);
}
}
if (item->state == 4) {
if (!does_script_exist(D_80155D80)) {
D_801565A8 = 0;
remove_item_entity_by_reference(item);
resume_all_group(2);
}
}
if (item->state == 0xA) {
isPickingUpItem = TRUE;
item->spawnType = ITEM_SPAWN_AT_PLAYER;
item->state = 0;
D_801565A8 = 0;
gOverrideFlags |= GLOBAL_OVERRIDES_40;
}
}
}
void func_8013559C(ItemEntity* itemEntity) {
if (itemEntity->state == 1) {

View File

@ -1,7 +1,7 @@
#include "dead.h"
#include "common.h",
// Copy of flo_10 (CBP6B0.c)
// Copy of flo_10 (CB96B0.c)
#define NAMESPACE ED46D0

View File

@ -1,14 +1,151 @@
#include "common.h"
#include "effects_internal.h"
extern Gfx D_09004FE8[];
extern Gfx D_09005090[];
extern Gfx D_090050F0[];
extern Gfx D_09005168[];
extern Gfx D_090051E0[];
extern Gfx D_09005258[];
extern Gfx D_090052D0[];
extern Gfx D_09005348[];
extern Gfx D_090053C0[];
extern Gfx D_09005438[];
extern Gfx D_090054B0[];
extern Gfx D_09005570[];
extern Gfx D_09005590[];
Gfx* D_E010CA10[] = { D_090054B0 };
Gfx* D_E010CA14[] = { D_09004FE8 };
Gfx* D_E010CA18[8] = {
D_09005590, D_09005570, D_09005570, D_09005570, D_09005570, D_09005570, D_09005570, D_09005570
};
Gfx* D_E010CA38[8] = {
D_090050F0, D_09005168, D_090051E0, D_09005258, D_090052D0, D_09005348, D_090053C0, D_09005438
};
void peach_star_beam_init(EffectInstance* effect);
void peach_star_beam_update(EffectInstance* effect);
void peach_star_beam_render(EffectInstance* effect);
void peach_star_beam_appendGfx(void* effect);
INCLUDE_ASM(s32, "effects/peach_star_beam", peach_star_beam_main);
EffectInstance* peach_star_beam_main(s32 type, f32 x, f32 y, f32 z, f32 arg4, s32 arg5) {
EffectBlueprint bp;
EffectInstance* effect;
PeachStarBeamFXData* data;
s32 numParts = 1;
s32 i;
void peach_star_beam_init(void) {
bp.unk_00 = 0;
bp.init = peach_star_beam_init;
bp.update = peach_star_beam_update;
bp.renderWorld = peach_star_beam_render;
bp.unk_14 = NULL;
bp.effectID = EFFECT_PEACH_STAR_BEAM;
effect = shim_create_effect_instance(&bp);
effect->numParts = numParts;
data = effect->data.peachStarBeam = shim_general_heap_malloc(sizeof(*data));
ASSERT(effect->data.peachStarBeam != NULL);
data->type = type;
data->lifetime = 0;
if (arg5 <= 0) {
data->timeLeft = 1000;
} else {
data->timeLeft = arg5;
}
data->alpha = 224;
data->pos.x = x;
data->pos.y = y;
data->pos.z = z;
data->unk_3C = 255;
data->unk_38 = arg4;
data->unk_48 = 80.0f;
data->unk_58 = 50.0f;
data->primR = 255;
data->primG = 255;
data->primB = 120;
data->envR = 255;
data->envG = 255;
data->envB = 255;
data->envA = 255;
data->unk_40 = 5.0f;
data->unk_44 = 0;
data->unk_4C = x;
data->unk_50 = y + 50.0f;
data->unk_54 = z;
for (i = 0; i < ARRAY_COUNT(data->parts); i++) {
PeachStarBeamInner* part = &data->parts[i];
if (type == 0 && i == 0) {
part->flags = 0;
} else {
part->flags = 1;
}
}
return effect;
}
INCLUDE_ASM(s32, "effects/peach_star_beam", peach_star_beam_update);
void peach_star_beam_init(EffectInstance* effect) {
}
void peach_star_beam_update(EffectInstance* effect) {
PeachStarBeamFXData* data = effect->data.peachStarBeam;
f32 unk_44;
f32 unk_48;
f32 unk_4C;
f32 unk_50;
f32 unk_54;
f32 angle;
s32 i;
if (effect->flags & 0x10) {
effect->flags &= ~0x10;
data->timeLeft = 16;
}
if (data->timeLeft < 1000) {
data->timeLeft--;
}
data->lifetime++;
if (data->timeLeft < 0) {
shim_remove_effect(effect);
return;
}
data->unk_44 += data->unk_40;
unk_44 = data->unk_44;
unk_48 = data->unk_48;
unk_4C = data->unk_4C;
unk_50 = data->unk_50;
unk_54 = data->unk_54;
for (i = 0; i < ARRAY_COUNT(data->parts); i++) {
PeachStarBeamInner* part = &data->parts[i];
if (i == 0) {
part->unk_04.x = unk_4C;
part->unk_04.y = unk_50 + data->unk_58;
part->unk_04.z = unk_54;
} else {
angle = unk_44 + ((-360 + (360 * i)) / 7);
part->unk_04.x = unk_4C + (unk_48 * shim_sin_deg(angle));
part->unk_04.y = unk_50;
part->unk_04.z = unk_54 + (unk_48 * shim_cos_deg(angle));
}
if (!(part->flags & 2)) {
part->unk_10.x = part->unk_04.x;
part->unk_10.y = part->unk_04.y;
part->unk_10.z = part->unk_04.z;
}
}
}
void peach_star_beam_render(EffectInstance* effect) {
RenderTask renderTask;
@ -23,4 +160,88 @@ void peach_star_beam_render(EffectInstance* effect) {
retTask->renderMode |= RENDER_TASK_FLAG_2;
}
INCLUDE_ASM(s32, "effects/peach_star_beam", peach_star_beam_appendGfx);
void peach_star_beam_appendGfx(void* effect) {
Matrix4f sp20, sp60;
Camera* camera = &gCameras[gCurrentCameraID];
PeachStarBeamFXData* data = ((EffectInstance*)effect)->data.peachStarBeam;
PeachStarBeamInner* part;
s32 alpha = data->alpha;
f32 partX, partY, partZ;
s32 i;
gDPPipeSync(gMasterGfxPos++);
gSPSegment(gMasterGfxPos++, 0x9, VIRTUAL_TO_PHYSICAL(((EffectInstance*)effect)->graphics->data));
gSPDisplayList(gMasterGfxPos++, D_09005090);
for (i = 0; i < ARRAY_COUNT(data->parts); i++) {
part = &data->parts[i];
if (part->flags & 1) {
if (part->flags & 2) {
partX = part->unk_10.x;
partY = part->unk_10.y;
partZ = part->unk_10.z;
} else {
partX = part->unk_04.x;
partY = part->unk_04.y;
partZ = part->unk_04.z;
}
if (!(data->pos.z < partZ)) {
shim_guPositionF(sp20, 0.0f, 0.0f, 0.0f, SPRITE_WORLD_SCALE, partX, partY, partZ);
shim_guMtxF2L(sp20, &gDisplayContext->matrixStack[gMatrixListPos]);
gSPMatrix(gMasterGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++],
G_MTX_PUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
gDPSetPrimColor(gMasterGfxPos++, 0, 0, 128, 128, 128, 255);
gDPSetEnvColor(gMasterGfxPos++, 128, 128, 128, 127);
gSPDisplayList(gMasterGfxPos++, D_E010CA38[i]);
gSPDisplayList(gMasterGfxPos++, D_E010CA18[i]);
gSPPopMatrix(gMasterGfxPos++, G_MTX_MODELVIEW);
}
}
}
shim_guTranslateF(sp20, data->pos.x, data->pos.y - (((f32) (255 - data->unk_3C) * 400.0) / 255.0), data->pos.z);
shim_guScaleF(sp60, data->unk_38 * 0.4, data->unk_38 * 0.4, data->unk_38 * 0.4);
shim_guMtxCatF(sp60, sp20, sp20);
shim_guMtxF2L(sp20, &gDisplayContext->matrixStack[gMatrixListPos]);
gSPMatrix(gMasterGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++],
G_MTX_PUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
gSPMatrix(gMasterGfxPos++, camera->unkMatrix, G_MTX_NOPUSH | G_MTX_MUL | G_MTX_MODELVIEW);
gDPSetPrimColor(gMasterGfxPos++, 0, 0, data->primR, data->primG, data->primB, alpha);
gDPSetEnvColor(gMasterGfxPos++, data->envR, data->envG, data->envB, data->envA);
gSPDisplayList(gMasterGfxPos++, D_E010CA14[0]);
gSPDisplayList(gMasterGfxPos++, D_E010CA10[0]);
gSPPopMatrix(gMasterGfxPos++, G_MTX_MODELVIEW);
gSPDisplayList(gMasterGfxPos++, D_09005090);
for (i = 0; i < ARRAY_COUNT(data->parts); i++) {
part = &data->parts[i];
if (part->flags & 1) {
if (part->flags & 2) {
partX = part->unk_10.x;
partY = part->unk_10.y;
partZ = part->unk_10.z;
} else {
partX = part->unk_04.x;
partY = part->unk_04.y;
partZ = part->unk_04.z;
}
if (!(partZ <= data->pos.z)) {
shim_guPositionF(sp20, 0.0f, 0.0f, 0.0f, 0.67f, partX, partY, partZ);
shim_guMtxF2L(sp20, &gDisplayContext->matrixStack[gMatrixListPos]);
gSPMatrix(gMasterGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++],
G_MTX_PUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
gDPSetPrimColor(gMasterGfxPos++, 0, 0, 128, 128, 128, 255);
gDPSetEnvColor(gMasterGfxPos++, 128, 128, 128, 127);
gSPDisplayList(gMasterGfxPos++, D_E010CA38[i]);
gSPDisplayList(gMasterGfxPos++, D_E010CA18[i]);
gSPPopMatrix(gMasterGfxPos++, G_MTX_MODELVIEW);
}
}
}
}

View File

@ -1,15 +0,0 @@
.include "macro.inc"
.section .data
dlabel D_E010CA10
.word 0x090054B0
dlabel D_E010CA14
.word 0x09004FE8
dlabel D_E010CA18
.word 0x09005590, 0x09005570, 0x09005570, 0x09005570, 0x09005570, 0x09005570, 0x09005570, 0x09005570
dlabel D_E010CA38
.word 0x090050F0, 0x09005168, 0x090051E0, 0x09005258, 0x090052D0, 0x09005348, 0x090053C0, 0x09005438, 0x00000000, 0x00000000

View File

@ -1,224 +0,0 @@
.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel CancelablePlayerRunToGoal
/* 1A27DC 80273EFC 27BDFFB0 */ addiu $sp, $sp, -0x50
/* 1A27E0 80273F00 AFB30024 */ sw $s3, 0x24($sp)
/* 1A27E4 80273F04 0080982D */ daddu $s3, $a0, $zero
/* 1A27E8 80273F08 AFB40028 */ sw $s4, 0x28($sp)
/* 1A27EC 80273F0C 3C14800E */ lui $s4, %hi(gBattleStatus)
/* 1A27F0 80273F10 2694C070 */ addiu $s4, $s4, %lo(gBattleStatus)
/* 1A27F4 80273F14 AFBF002C */ sw $ra, 0x2c($sp)
/* 1A27F8 80273F18 AFB20020 */ sw $s2, 0x20($sp)
/* 1A27FC 80273F1C AFB1001C */ sw $s1, 0x1c($sp)
/* 1A2800 80273F20 AFB00018 */ sw $s0, 0x18($sp)
/* 1A2804 80273F24 F7BA0048 */ sdc1 $f26, 0x48($sp)
/* 1A2808 80273F28 F7B80040 */ sdc1 $f24, 0x40($sp)
/* 1A280C 80273F2C F7B60038 */ sdc1 $f22, 0x38($sp)
/* 1A2810 80273F30 F7B40030 */ sdc1 $f20, 0x30($sp)
/* 1A2814 80273F34 8E9000D8 */ lw $s0, 0xd8($s4)
/* 1A2818 80273F38 8E71000C */ lw $s1, 0xc($s3)
/* 1A281C 80273F3C 10A00002 */ beqz $a1, .L80273F48
/* 1A2820 80273F40 2612000C */ addiu $s2, $s0, 0xc
/* 1A2824 80273F44 AE600070 */ sw $zero, 0x70($s3)
.L80273F48:
/* 1A2828 80273F48 8E620070 */ lw $v0, 0x70($s3)
/* 1A282C 80273F4C 14400046 */ bnez $v0, .L80274068
/* 1A2830 80273F50 00000000 */ nop
/* 1A2834 80273F54 8E250000 */ lw $a1, ($s1)
/* 1A2838 80273F58 26310004 */ addiu $s1, $s1, 4
/* 1A283C 80273F5C 0C0B1EAF */ jal evt_get_variable
/* 1A2840 80273F60 0260202D */ daddu $a0, $s3, $zero
/* 1A2844 80273F64 A6020070 */ sh $v0, 0x70($s0)
/* 1A2848 80273F68 8E220000 */ lw $v0, ($s1)
/* 1A284C 80273F6C AE620074 */ sw $v0, 0x74($s3)
/* 1A2850 80273F70 C6180018 */ lwc1 $f24, 0x18($s0)
/* 1A2854 80273F74 C61A0020 */ lwc1 $f26, 0x20($s0)
/* 1A2858 80273F78 C6000144 */ lwc1 $f0, 0x144($s0)
/* 1A285C 80273F7C C614014C */ lwc1 $f20, 0x14c($s0)
/* 1A2860 80273F80 4406C000 */ mfc1 $a2, $f24
/* 1A2864 80273F84 4407D000 */ mfc1 $a3, $f26
/* 1A2868 80273F88 E600000C */ swc1 $f0, 0xc($s0)
/* 1A286C 80273F8C C6000148 */ lwc1 $f0, 0x148($s0)
/* 1A2870 80273F90 C616000C */ lwc1 $f22, 0xc($s0)
/* 1A2874 80273F94 4600A386 */ mov.s $f14, $f20
/* 1A2878 80273F98 E6140014 */ swc1 $f20, 0x14($s0)
/* 1A287C 80273F9C 4600B306 */ mov.s $f12, $f22
/* 1A2880 80273FA0 0C00A720 */ jal atan2
/* 1A2884 80273FA4 E6000010 */ swc1 $f0, 0x10($s0)
/* 1A2888 80273FA8 4600B306 */ mov.s $f12, $f22
/* 1A288C 80273FAC 4406C000 */ mfc1 $a2, $f24
/* 1A2890 80273FB0 4407D000 */ mfc1 $a3, $f26
/* 1A2894 80273FB4 4600A386 */ mov.s $f14, $f20
/* 1A2898 80273FB8 0C00A7B5 */ jal dist2D
/* 1A289C 80273FBC E6000054 */ swc1 $f0, 0x54($s0)
/* 1A28A0 80273FC0 86020070 */ lh $v0, 0x70($s0)
/* 1A28A4 80273FC4 46000086 */ mov.s $f2, $f0
/* 1A28A8 80273FC8 14400015 */ bnez $v0, .L80274020
/* 1A28AC 80273FCC E6020058 */ swc1 $f2, 0x58($s0)
/* 1A28B0 80273FD0 C600004C */ lwc1 $f0, 0x4c($s0)
/* 1A28B4 80273FD4 46001003 */ div.s $f0, $f2, $f0
/* 1A28B8 80273FD8 4600020D */ trunc.w.s $f8, $f0
/* 1A28BC 80273FDC 44034000 */ mfc1 $v1, $f8
/* 1A28C0 80273FE0 00000000 */ nop
/* 1A28C4 80273FE4 00031400 */ sll $v0, $v1, 0x10
/* 1A28C8 80273FE8 00021403 */ sra $v0, $v0, 0x10
/* 1A28CC 80273FEC C602004C */ lwc1 $f2, 0x4c($s0)
/* 1A28D0 80273FF0 44823000 */ mtc1 $v0, $f6
/* 1A28D4 80273FF4 00000000 */ nop
/* 1A28D8 80273FF8 468031A0 */ cvt.s.w $f6, $f6
/* 1A28DC 80273FFC 46023102 */ mul.s $f4, $f6, $f2
/* 1A28E0 80274000 00000000 */ nop
/* 1A28E4 80274004 C6000058 */ lwc1 $f0, 0x58($s0)
/* 1A28E8 80274008 46040001 */ sub.s $f0, $f0, $f4
/* 1A28EC 8027400C 46060003 */ div.s $f0, $f0, $f6
/* 1A28F0 80274010 46001080 */ add.s $f2, $f2, $f0
/* 1A28F4 80274014 A6030070 */ sh $v1, 0x70($s0)
/* 1A28F8 80274018 0809D00D */ j .L80274034
/* 1A28FC 8027401C E602004C */ swc1 $f2, 0x4c($s0)
.L80274020:
/* 1A2900 80274020 44820000 */ mtc1 $v0, $f0
/* 1A2904 80274024 00000000 */ nop
/* 1A2908 80274028 46800020 */ cvt.s.w $f0, $f0
/* 1A290C 8027402C 46001003 */ div.s $f0, $f2, $f0
/* 1A2910 80274030 E600004C */ swc1 $f0, 0x4c($s0)
.L80274034:
/* 1A2914 80274034 860201B4 */ lh $v0, 0x1b4($s0)
/* 1A2918 80274038 86430064 */ lh $v1, 0x64($s2)
/* 1A291C 8027403C 24420001 */ addiu $v0, $v0, 1
/* 1A2920 80274040 44820000 */ mtc1 $v0, $f0
/* 1A2924 80274044 00000000 */ nop
/* 1A2928 80274048 46800020 */ cvt.s.w $f0, $f0
/* 1A292C 8027404C E640004C */ swc1 $f0, 0x4c($s2)
/* 1A2930 80274050 1060006C */ beqz $v1, .L80274204
/* 1A2934 80274054 24020002 */ addiu $v0, $zero, 2
/* 1A2938 80274058 24020001 */ addiu $v0, $zero, 1
/* 1A293C 8027405C AE600078 */ sw $zero, 0x78($s3)
/* 1A2940 80274060 AE60007C */ sw $zero, 0x7c($s3)
/* 1A2944 80274064 AE620070 */ sw $v0, 0x70($s3)
.L80274068:
/* 1A2948 80274068 8E450040 */ lw $a1, 0x40($s2)
/* 1A294C 8027406C 8E460048 */ lw $a2, 0x48($s2)
/* 1A2950 80274070 0C09904A */ jal add_xz_vec3f
/* 1A2954 80274074 0240202D */ daddu $a0, $s2, $zero
/* 1A2958 80274078 C6400000 */ lwc1 $f0, ($s2)
/* 1A295C 8027407C E6000144 */ swc1 $f0, 0x144($s0)
/* 1A2960 80274080 C6400004 */ lwc1 $f0, 4($s2)
/* 1A2964 80274084 E6000148 */ swc1 $f0, 0x148($s0)
/* 1A2968 80274088 C6400008 */ lwc1 $f0, 8($s2)
/* 1A296C 8027408C E600014C */ swc1 $f0, 0x14c($s0)
/* 1A2970 80274090 C6420040 */ lwc1 $f2, 0x40($s2)
/* 1A2974 80274094 3C014080 */ lui $at, 0x4080
/* 1A2978 80274098 44810000 */ mtc1 $at, $f0
/* 1A297C 8027409C 00000000 */ nop
/* 1A2980 802740A0 4600103C */ c.lt.s $f2, $f0
/* 1A2984 802740A4 00000000 */ nop
/* 1A2988 802740A8 45000007 */ bc1f .L802740C8
/* 1A298C 802740AC 0000202D */ daddu $a0, $zero, $zero
/* 1A2990 802740B0 C600018C */ lwc1 $f0, 0x18c($s0)
/* 1A2994 802740B4 E7A00010 */ swc1 $f0, 0x10($sp)
/* 1A2998 802740B8 8E050144 */ lw $a1, 0x144($s0)
/* 1A299C 802740BC 8E060148 */ lw $a2, 0x148($s0)
/* 1A29A0 802740C0 0809D038 */ j .L802740E0
/* 1A29A4 802740C4 8E07014C */ lw $a3, 0x14c($s0)
.L802740C8:
/* 1A29A8 802740C8 C600018C */ lwc1 $f0, 0x18c($s0)
/* 1A29AC 802740CC E7A00010 */ swc1 $f0, 0x10($sp)
/* 1A29B0 802740D0 8E050144 */ lw $a1, 0x144($s0)
/* 1A29B4 802740D4 8E060148 */ lw $a2, 0x148($s0)
/* 1A29B8 802740D8 8E07014C */ lw $a3, 0x14c($s0)
/* 1A29BC 802740DC 24040001 */ addiu $a0, $zero, 1
.L802740E0:
/* 1A29C0 802740E0 0C0990BC */ jal play_movement_dust_effects
/* 1A29C4 802740E4 00000000 */ nop
/* 1A29C8 802740E8 C642004C */ lwc1 $f2, 0x4c($s2)
/* 1A29CC 802740EC C6400040 */ lwc1 $f0, 0x40($s2)
/* 1A29D0 802740F0 46001080 */ add.s $f2, $f2, $f0
/* 1A29D4 802740F4 E642004C */ swc1 $f2, 0x4c($s2)
/* 1A29D8 802740F8 860201B4 */ lh $v0, 0x1b4($s0)
/* 1A29DC 802740FC 44820000 */ mtc1 $v0, $f0
/* 1A29E0 80274100 00000000 */ nop
/* 1A29E4 80274104 46800020 */ cvt.s.w $f0, $f0
/* 1A29E8 80274108 4602003C */ c.lt.s $f0, $f2
/* 1A29EC 8027410C 00000000 */ nop
/* 1A29F0 80274110 45000013 */ bc1f .L80274160
/* 1A29F4 80274114 00000000 */ nop
/* 1A29F8 80274118 92020135 */ lbu $v0, 0x135($s0)
/* 1A29FC 8027411C 24420001 */ addiu $v0, $v0, 1
/* 1A2A00 80274120 A2020135 */ sb $v0, 0x135($s0)
/* 1A2A04 80274124 AE40004C */ sw $zero, 0x4c($s2)
/* 1A2A08 80274128 92020135 */ lbu $v0, 0x135($s0)
/* 1A2A0C 8027412C 30420001 */ andi $v0, $v0, 1
/* 1A2A10 80274130 10400004 */ beqz $v0, .L80274144
/* 1A2A14 80274134 24040141 */ addiu $a0, $zero, 0x141
/* 1A2A18 80274138 C600014C */ lwc1 $f0, 0x14c($s0)
/* 1A2A1C 8027413C 0809D054 */ j .L80274150
/* 1A2A20 80274140 E7A00010 */ swc1 $f0, 0x10($sp)
.L80274144:
/* 1A2A24 80274144 C600014C */ lwc1 $f0, 0x14c($s0)
/* 1A2A28 80274148 24040142 */ addiu $a0, $zero, 0x142
/* 1A2A2C 8027414C E7A00010 */ swc1 $f0, 0x10($sp)
.L80274150:
/* 1A2A30 80274150 8E060144 */ lw $a2, 0x144($s0)
/* 1A2A34 80274154 8E070148 */ lw $a3, 0x148($s0)
/* 1A2A38 80274158 0C052757 */ jal sfx_play_sound_at_position
/* 1A2A3C 8027415C 0000282D */ daddu $a1, $zero, $zero
.L80274160:
/* 1A2A40 80274160 8E62007C */ lw $v0, 0x7c($s3)
/* 1A2A44 80274164 2842000D */ slti $v0, $v0, 0xd
/* 1A2A48 80274168 14400013 */ bnez $v0, .L802741B8
/* 1A2A4C 8027416C 00000000 */ nop
/* 1A2A50 80274170 8E620078 */ lw $v0, 0x78($s3)
/* 1A2A54 80274174 14400009 */ bnez $v0, .L8027419C
/* 1A2A58 80274178 00000000 */ nop
/* 1A2A5C 8027417C 8E820210 */ lw $v0, 0x210($s4)
/* 1A2A60 80274180 30428000 */ andi $v0, $v0, 0x8000
/* 1A2A64 80274184 14400002 */ bnez $v0, .L80274190
/* 1A2A68 80274188 24020001 */ addiu $v0, $zero, 1
/* 1A2A6C 8027418C AE620078 */ sw $v0, 0x78($s3)
.L80274190:
/* 1A2A70 80274190 8E620078 */ lw $v0, 0x78($s3)
/* 1A2A74 80274194 10400008 */ beqz $v0, .L802741B8
/* 1A2A78 80274198 00000000 */ nop
.L8027419C:
/* 1A2A7C 8027419C 8E820214 */ lw $v0, 0x214($s4)
/* 1A2A80 802741A0 30428000 */ andi $v0, $v0, 0x8000
/* 1A2A84 802741A4 10400004 */ beqz $v0, .L802741B8
/* 1A2A88 802741A8 0260202D */ daddu $a0, $s3, $zero
/* 1A2A8C 802741AC 8C850074 */ lw $a1, 0x74($a0)
/* 1A2A90 802741B0 0809D07E */ j .L802741F8
/* 1A2A94 802741B4 24060001 */ addiu $a2, $zero, 1
.L802741B8:
/* 1A2A98 802741B8 8E62007C */ lw $v0, 0x7c($s3)
/* 1A2A9C 802741BC 24420001 */ addiu $v0, $v0, 1
/* 1A2AA0 802741C0 AE62007C */ sw $v0, 0x7c($s3)
/* 1A2AA4 802741C4 96420064 */ lhu $v0, 0x64($s2)
/* 1A2AA8 802741C8 2442FFFF */ addiu $v0, $v0, -1
/* 1A2AAC 802741CC A6420064 */ sh $v0, 0x64($s2)
/* 1A2AB0 802741D0 00021400 */ sll $v0, $v0, 0x10
/* 1A2AB4 802741D4 1C40000B */ bgtz $v0, .L80274204
/* 1A2AB8 802741D8 0000102D */ daddu $v0, $zero, $zero
/* 1A2ABC 802741DC C640000C */ lwc1 $f0, 0xc($s2)
/* 1A2AC0 802741E0 E6000144 */ swc1 $f0, 0x144($s0)
/* 1A2AC4 802741E4 C6400014 */ lwc1 $f0, 0x14($s2)
/* 1A2AC8 802741E8 0260202D */ daddu $a0, $s3, $zero
/* 1A2ACC 802741EC E600014C */ swc1 $f0, 0x14c($s0)
/* 1A2AD0 802741F0 8C850074 */ lw $a1, 0x74($a0)
/* 1A2AD4 802741F4 0000302D */ daddu $a2, $zero, $zero
.L802741F8:
/* 1A2AD8 802741F8 0C0B2026 */ jal evt_set_variable
/* 1A2ADC 802741FC 00000000 */ nop
/* 1A2AE0 80274200 24020002 */ addiu $v0, $zero, 2
.L80274204:
/* 1A2AE4 80274204 8FBF002C */ lw $ra, 0x2c($sp)
/* 1A2AE8 80274208 8FB40028 */ lw $s4, 0x28($sp)
/* 1A2AEC 8027420C 8FB30024 */ lw $s3, 0x24($sp)
/* 1A2AF0 80274210 8FB20020 */ lw $s2, 0x20($sp)
/* 1A2AF4 80274214 8FB1001C */ lw $s1, 0x1c($sp)
/* 1A2AF8 80274218 8FB00018 */ lw $s0, 0x18($sp)
/* 1A2AFC 8027421C D7BA0048 */ ldc1 $f26, 0x48($sp)
/* 1A2B00 80274220 D7B80040 */ ldc1 $f24, 0x40($sp)
/* 1A2B04 80274224 D7B60038 */ ldc1 $f22, 0x38($sp)
/* 1A2B08 80274228 D7B40030 */ ldc1 $f20, 0x30($sp)
/* 1A2B0C 8027422C 03E00008 */ jr $ra
/* 1A2B10 80274230 27BD0050 */ addiu $sp, $sp, 0x50

View File

@ -1,181 +0,0 @@
.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel PlayerRunToGoal
/* 1A2544 80273C64 27BDFFB8 */ addiu $sp, $sp, -0x48
/* 1A2548 80273C68 AFB00018 */ sw $s0, 0x18($sp)
/* 1A254C 80273C6C 3C10800E */ lui $s0, %hi(gBattleStatus+0xD8)
/* 1A2550 80273C70 8E10C148 */ lw $s0, %lo(gBattleStatus+0xD8)($s0)
/* 1A2554 80273C74 AFB20020 */ sw $s2, 0x20($sp)
/* 1A2558 80273C78 0080902D */ daddu $s2, $a0, $zero
/* 1A255C 80273C7C AFBF0024 */ sw $ra, 0x24($sp)
/* 1A2560 80273C80 AFB1001C */ sw $s1, 0x1c($sp)
/* 1A2564 80273C84 F7BA0040 */ sdc1 $f26, 0x40($sp)
/* 1A2568 80273C88 F7B80038 */ sdc1 $f24, 0x38($sp)
/* 1A256C 80273C8C F7B60030 */ sdc1 $f22, 0x30($sp)
/* 1A2570 80273C90 F7B40028 */ sdc1 $f20, 0x28($sp)
/* 1A2574 80273C94 8E43000C */ lw $v1, 0xc($s2)
/* 1A2578 80273C98 10A00002 */ beqz $a1, .L80273CA4
/* 1A257C 80273C9C 2611000C */ addiu $s1, $s0, 0xc
/* 1A2580 80273CA0 AE400070 */ sw $zero, 0x70($s2)
.L80273CA4:
/* 1A2584 80273CA4 8E420070 */ lw $v0, 0x70($s2)
/* 1A2588 80273CA8 14400041 */ bnez $v0, .L80273DB0
/* 1A258C 80273CAC 00000000 */ nop
/* 1A2590 80273CB0 8C650000 */ lw $a1, ($v1)
/* 1A2594 80273CB4 0C0B1EAF */ jal evt_get_variable
/* 1A2598 80273CB8 0240202D */ daddu $a0, $s2, $zero
/* 1A259C 80273CBC C6180018 */ lwc1 $f24, 0x18($s0)
/* 1A25A0 80273CC0 C61A0020 */ lwc1 $f26, 0x20($s0)
/* 1A25A4 80273CC4 C6000144 */ lwc1 $f0, 0x144($s0)
/* 1A25A8 80273CC8 C614014C */ lwc1 $f20, 0x14c($s0)
/* 1A25AC 80273CCC 4406C000 */ mfc1 $a2, $f24
/* 1A25B0 80273CD0 4407D000 */ mfc1 $a3, $f26
/* 1A25B4 80273CD4 A6020070 */ sh $v0, 0x70($s0)
/* 1A25B8 80273CD8 E600000C */ swc1 $f0, 0xc($s0)
/* 1A25BC 80273CDC C6000148 */ lwc1 $f0, 0x148($s0)
/* 1A25C0 80273CE0 C616000C */ lwc1 $f22, 0xc($s0)
/* 1A25C4 80273CE4 4600A386 */ mov.s $f14, $f20
/* 1A25C8 80273CE8 E6140014 */ swc1 $f20, 0x14($s0)
/* 1A25CC 80273CEC 4600B306 */ mov.s $f12, $f22
/* 1A25D0 80273CF0 0C00A720 */ jal atan2
/* 1A25D4 80273CF4 E6000010 */ swc1 $f0, 0x10($s0)
/* 1A25D8 80273CF8 4600B306 */ mov.s $f12, $f22
/* 1A25DC 80273CFC 4406C000 */ mfc1 $a2, $f24
/* 1A25E0 80273D00 4407D000 */ mfc1 $a3, $f26
/* 1A25E4 80273D04 4600A386 */ mov.s $f14, $f20
/* 1A25E8 80273D08 0C00A7B5 */ jal dist2D
/* 1A25EC 80273D0C E6000054 */ swc1 $f0, 0x54($s0)
/* 1A25F0 80273D10 86020070 */ lh $v0, 0x70($s0)
/* 1A25F4 80273D14 46000086 */ mov.s $f2, $f0
/* 1A25F8 80273D18 14400018 */ bnez $v0, .L80273D7C
/* 1A25FC 80273D1C E6020058 */ swc1 $f2, 0x58($s0)
/* 1A2600 80273D20 C600004C */ lwc1 $f0, 0x4c($s0)
/* 1A2604 80273D24 46001003 */ div.s $f0, $f2, $f0
/* 1A2608 80273D28 4600020D */ trunc.w.s $f8, $f0
/* 1A260C 80273D2C 44024000 */ mfc1 $v0, $f8
/* 1A2610 80273D30 00000000 */ nop
/* 1A2614 80273D34 A6020070 */ sh $v0, 0x70($s0)
/* 1A2618 80273D38 00021400 */ sll $v0, $v0, 0x10
/* 1A261C 80273D3C 14400002 */ bnez $v0, .L80273D48
/* 1A2620 80273D40 24020001 */ addiu $v0, $zero, 1
/* 1A2624 80273D44 A6020070 */ sh $v0, 0x70($s0)
.L80273D48:
/* 1A2628 80273D48 86020070 */ lh $v0, 0x70($s0)
/* 1A262C 80273D4C C602004C */ lwc1 $f2, 0x4c($s0)
/* 1A2630 80273D50 44823000 */ mtc1 $v0, $f6
/* 1A2634 80273D54 00000000 */ nop
/* 1A2638 80273D58 468031A0 */ cvt.s.w $f6, $f6
/* 1A263C 80273D5C 46023102 */ mul.s $f4, $f6, $f2
/* 1A2640 80273D60 00000000 */ nop
/* 1A2644 80273D64 C6000058 */ lwc1 $f0, 0x58($s0)
/* 1A2648 80273D68 46040001 */ sub.s $f0, $f0, $f4
/* 1A264C 80273D6C 46060003 */ div.s $f0, $f0, $f6
/* 1A2650 80273D70 46001080 */ add.s $f2, $f2, $f0
/* 1A2654 80273D74 0809CF64 */ j .L80273D90
/* 1A2658 80273D78 E602004C */ swc1 $f2, 0x4c($s0)
.L80273D7C:
/* 1A265C 80273D7C 44820000 */ mtc1 $v0, $f0
/* 1A2660 80273D80 00000000 */ nop
/* 1A2664 80273D84 46800020 */ cvt.s.w $f0, $f0
/* 1A2668 80273D88 46001003 */ div.s $f0, $f2, $f0
/* 1A266C 80273D8C E600004C */ swc1 $f0, 0x4c($s0)
.L80273D90:
/* 1A2670 80273D90 860201B4 */ lh $v0, 0x1b4($s0)
/* 1A2674 80273D94 24420001 */ addiu $v0, $v0, 1
/* 1A2678 80273D98 44820000 */ mtc1 $v0, $f0
/* 1A267C 80273D9C 00000000 */ nop
/* 1A2680 80273DA0 46800020 */ cvt.s.w $f0, $f0
/* 1A2684 80273DA4 24020001 */ addiu $v0, $zero, 1
/* 1A2688 80273DA8 E620004C */ swc1 $f0, 0x4c($s1)
/* 1A268C 80273DAC AE420070 */ sw $v0, 0x70($s2)
.L80273DB0:
/* 1A2690 80273DB0 8E250040 */ lw $a1, 0x40($s1)
/* 1A2694 80273DB4 8E260048 */ lw $a2, 0x48($s1)
/* 1A2698 80273DB8 0C09904A */ jal add_xz_vec3f
/* 1A269C 80273DBC 0220202D */ daddu $a0, $s1, $zero
/* 1A26A0 80273DC0 C6200000 */ lwc1 $f0, ($s1)
/* 1A26A4 80273DC4 E6000144 */ swc1 $f0, 0x144($s0)
/* 1A26A8 80273DC8 C6200004 */ lwc1 $f0, 4($s1)
/* 1A26AC 80273DCC E6000148 */ swc1 $f0, 0x148($s0)
/* 1A26B0 80273DD0 C6200008 */ lwc1 $f0, 8($s1)
/* 1A26B4 80273DD4 E600014C */ swc1 $f0, 0x14c($s0)
/* 1A26B8 80273DD8 C6220040 */ lwc1 $f2, 0x40($s1)
/* 1A26BC 80273DDC 3C014080 */ lui $at, 0x4080
/* 1A26C0 80273DE0 44810000 */ mtc1 $at, $f0
/* 1A26C4 80273DE4 00000000 */ nop
/* 1A26C8 80273DE8 4600103C */ c.lt.s $f2, $f0
/* 1A26CC 80273DEC 00000000 */ nop
/* 1A26D0 80273DF0 45000007 */ bc1f .L80273E10
/* 1A26D4 80273DF4 0000202D */ daddu $a0, $zero, $zero
/* 1A26D8 80273DF8 C600018C */ lwc1 $f0, 0x18c($s0)
/* 1A26DC 80273DFC E7A00010 */ swc1 $f0, 0x10($sp)
/* 1A26E0 80273E00 8E050144 */ lw $a1, 0x144($s0)
/* 1A26E4 80273E04 8E060148 */ lw $a2, 0x148($s0)
/* 1A26E8 80273E08 0809CF8A */ j .L80273E28
/* 1A26EC 80273E0C 8E07014C */ lw $a3, 0x14c($s0)
.L80273E10:
/* 1A26F0 80273E10 C600018C */ lwc1 $f0, 0x18c($s0)
/* 1A26F4 80273E14 E7A00010 */ swc1 $f0, 0x10($sp)
/* 1A26F8 80273E18 8E050144 */ lw $a1, 0x144($s0)
/* 1A26FC 80273E1C 8E060148 */ lw $a2, 0x148($s0)
/* 1A2700 80273E20 8E07014C */ lw $a3, 0x14c($s0)
/* 1A2704 80273E24 24040001 */ addiu $a0, $zero, 1
.L80273E28:
/* 1A2708 80273E28 0C0990BC */ jal play_movement_dust_effects
/* 1A270C 80273E2C 00000000 */ nop
/* 1A2710 80273E30 C622004C */ lwc1 $f2, 0x4c($s1)
/* 1A2714 80273E34 C6200040 */ lwc1 $f0, 0x40($s1)
/* 1A2718 80273E38 46001080 */ add.s $f2, $f2, $f0
/* 1A271C 80273E3C E622004C */ swc1 $f2, 0x4c($s1)
/* 1A2720 80273E40 860201B4 */ lh $v0, 0x1b4($s0)
/* 1A2724 80273E44 44820000 */ mtc1 $v0, $f0
/* 1A2728 80273E48 00000000 */ nop
/* 1A272C 80273E4C 46800020 */ cvt.s.w $f0, $f0
/* 1A2730 80273E50 4602003C */ c.lt.s $f0, $f2
/* 1A2734 80273E54 00000000 */ nop
/* 1A2738 80273E58 45000013 */ bc1f .L80273EA8
/* 1A273C 80273E5C 00000000 */ nop
/* 1A2740 80273E60 92020135 */ lbu $v0, 0x135($s0)
/* 1A2744 80273E64 24420001 */ addiu $v0, $v0, 1
/* 1A2748 80273E68 A2020135 */ sb $v0, 0x135($s0)
/* 1A274C 80273E6C AE20004C */ sw $zero, 0x4c($s1)
/* 1A2750 80273E70 92020135 */ lbu $v0, 0x135($s0)
/* 1A2754 80273E74 30420001 */ andi $v0, $v0, 1
/* 1A2758 80273E78 10400004 */ beqz $v0, .L80273E8C
/* 1A275C 80273E7C 24040141 */ addiu $a0, $zero, 0x141
/* 1A2760 80273E80 C600014C */ lwc1 $f0, 0x14c($s0)
/* 1A2764 80273E84 0809CFA6 */ j .L80273E98
/* 1A2768 80273E88 E7A00010 */ swc1 $f0, 0x10($sp)
.L80273E8C:
/* 1A276C 80273E8C C600014C */ lwc1 $f0, 0x14c($s0)
/* 1A2770 80273E90 24040142 */ addiu $a0, $zero, 0x142
/* 1A2774 80273E94 E7A00010 */ swc1 $f0, 0x10($sp)
.L80273E98:
/* 1A2778 80273E98 8E060144 */ lw $a2, 0x144($s0)
/* 1A277C 80273E9C 8E070148 */ lw $a3, 0x148($s0)
/* 1A2780 80273EA0 0C052757 */ jal sfx_play_sound_at_position
/* 1A2784 80273EA4 0000282D */ daddu $a1, $zero, $zero
.L80273EA8:
/* 1A2788 80273EA8 96220064 */ lhu $v0, 0x64($s1)
/* 1A278C 80273EAC 2442FFFF */ addiu $v0, $v0, -1
/* 1A2790 80273EB0 A6220064 */ sh $v0, 0x64($s1)
/* 1A2794 80273EB4 00021400 */ sll $v0, $v0, 0x10
/* 1A2798 80273EB8 1C400006 */ bgtz $v0, .L80273ED4
/* 1A279C 80273EBC 0000102D */ daddu $v0, $zero, $zero
/* 1A27A0 80273EC0 C620000C */ lwc1 $f0, 0xc($s1)
/* 1A27A4 80273EC4 E6000144 */ swc1 $f0, 0x144($s0)
/* 1A27A8 80273EC8 C6200014 */ lwc1 $f0, 0x14($s1)
/* 1A27AC 80273ECC 24020002 */ addiu $v0, $zero, 2
/* 1A27B0 80273ED0 E600014C */ swc1 $f0, 0x14c($s0)
.L80273ED4:
/* 1A27B4 80273ED4 8FBF0024 */ lw $ra, 0x24($sp)
/* 1A27B8 80273ED8 8FB20020 */ lw $s2, 0x20($sp)
/* 1A27BC 80273EDC 8FB1001C */ lw $s1, 0x1c($sp)
/* 1A27C0 80273EE0 8FB00018 */ lw $s0, 0x18($sp)
/* 1A27C4 80273EE4 D7BA0040 */ ldc1 $f26, 0x40($sp)
/* 1A27C8 80273EE8 D7B80038 */ ldc1 $f24, 0x38($sp)
/* 1A27CC 80273EEC D7B60030 */ ldc1 $f22, 0x30($sp)
/* 1A27D0 80273EF0 D7B40028 */ ldc1 $f20, 0x28($sp)
/* 1A27D4 80273EF4 03E00008 */ jr $ra
/* 1A27D8 80273EF8 27BD0048 */ addiu $sp, $sp, 0x48

File diff suppressed because it is too large Load Diff

View File

@ -1,437 +0,0 @@
.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
.section .rodata
dlabel D_E010CA60
.double 255.0
dlabel D_E010CA68
.double 0.4
.section .text
glabel peach_star_beam_appendGfx
/* 3E585C E010C39C 27BDFF28 */ addiu $sp, $sp, -0xd8
/* 3E5860 E010C3A0 3C07DB06 */ lui $a3, 0xdb06
/* 3E5864 E010C3A4 34E70024 */ ori $a3, $a3, 0x24
/* 3E5868 E010C3A8 AFB300B4 */ sw $s3, 0xb4($sp)
/* 3E586C E010C3AC 0000982D */ daddu $s3, $zero, $zero
/* 3E5870 E010C3B0 AFB700C4 */ sw $s7, 0xc4($sp)
/* 3E5874 E010C3B4 3C17800A */ lui $s7, %hi(gDisplayContext)
/* 3E5878 E010C3B8 26F7A674 */ addiu $s7, $s7, %lo(gDisplayContext)
/* 3E587C E010C3BC AFB500BC */ sw $s5, 0xbc($sp)
/* 3E5880 E010C3C0 3C158007 */ lui $s5, %hi(gMatrixListPos)
/* 3E5884 E010C3C4 26B541F0 */ addiu $s5, $s5, %lo(gMatrixListPos)
/* 3E5888 E010C3C8 AFB400B8 */ sw $s4, 0xb8($sp)
/* 3E588C E010C3CC 3C140001 */ lui $s4, 1
/* 3E5890 E010C3D0 36941630 */ ori $s4, $s4, 0x1630
/* 3E5894 E010C3D4 3C02800A */ lui $v0, %hi(gMasterGfxPos)
/* 3E5898 E010C3D8 2442A66C */ addiu $v0, $v0, %lo(gMasterGfxPos)
/* 3E589C E010C3DC AFB000A8 */ sw $s0, 0xa8($sp)
/* 3E58A0 E010C3E0 0040802D */ daddu $s0, $v0, $zero
/* 3E58A4 E010C3E4 AFB600C0 */ sw $s6, 0xc0($sp)
/* 3E58A8 E010C3E8 3C16DE00 */ lui $s6, 0xde00
/* 3E58AC E010C3EC AFB100AC */ sw $s1, 0xac($sp)
/* 3E58B0 E010C3F0 2411005C */ addiu $s1, $zero, 0x5c
/* 3E58B4 E010C3F4 3C06800B */ lui $a2, %hi(gCameras)
/* 3E58B8 E010C3F8 24C61D80 */ addiu $a2, $a2, %lo(gCameras)
/* 3E58BC E010C3FC AFBF00CC */ sw $ra, 0xcc($sp)
/* 3E58C0 E010C400 AFBE00C8 */ sw $fp, 0xc8($sp)
/* 3E58C4 E010C404 AFB200B0 */ sw $s2, 0xb0($sp)
/* 3E58C8 E010C408 F7B400D0 */ sdc1 $f20, 0xd0($sp)
/* 3E58CC E010C40C 8E050000 */ lw $a1, ($s0)
/* 3E58D0 E010C410 3C038007 */ lui $v1, %hi(gCurrentCameraID)
/* 3E58D4 E010C414 8C637410 */ lw $v1, %lo(gCurrentCameraID)($v1)
/* 3E58D8 E010C418 4480A000 */ mtc1 $zero, $f20
/* 3E58DC E010C41C 00031080 */ sll $v0, $v1, 2
/* 3E58E0 E010C420 00431021 */ addu $v0, $v0, $v1
/* 3E58E4 E010C424 00021080 */ sll $v0, $v0, 2
/* 3E58E8 E010C428 00431023 */ subu $v0, $v0, $v1
/* 3E58EC E010C42C 000218C0 */ sll $v1, $v0, 3
/* 3E58F0 E010C430 00431021 */ addu $v0, $v0, $v1
/* 3E58F4 E010C434 000210C0 */ sll $v0, $v0, 3
/* 3E58F8 E010C438 00461021 */ addu $v0, $v0, $a2
/* 3E58FC E010C43C 00A0182D */ daddu $v1, $a1, $zero
/* 3E5900 E010C440 AFA200A0 */ sw $v0, 0xa0($sp)
/* 3E5904 E010C444 8C92000C */ lw $s2, 0xc($a0)
/* 3E5908 E010C448 24A50008 */ addiu $a1, $a1, 8
/* 3E590C E010C44C AE050000 */ sw $a1, ($s0)
/* 3E5910 E010C450 8E4A0024 */ lw $t2, 0x24($s2)
/* 3E5914 E010C454 3C02E700 */ lui $v0, 0xe700
/* 3E5918 E010C458 AFAA00A4 */ sw $t2, 0xa4($sp)
/* 3E591C E010C45C AC620000 */ sw $v0, ($v1)
/* 3E5920 E010C460 24A20008 */ addiu $v0, $a1, 8
/* 3E5924 E010C464 AC600004 */ sw $zero, 4($v1)
/* 3E5928 E010C468 AE020000 */ sw $v0, ($s0)
/* 3E592C E010C46C ACA70000 */ sw $a3, ($a1)
/* 3E5930 E010C470 8C830010 */ lw $v1, 0x10($a0)
/* 3E5934 E010C474 24A20010 */ addiu $v0, $a1, 0x10
/* 3E5938 E010C478 AE020000 */ sw $v0, ($s0)
/* 3E593C E010C47C 8C63001C */ lw $v1, 0x1c($v1)
/* 3E5940 E010C480 02C0102D */ daddu $v0, $s6, $zero
/* 3E5944 E010C484 ACA20008 */ sw $v0, 8($a1)
/* 3E5948 E010C488 3C020900 */ lui $v0, 0x900
/* 3E594C E010C48C 24425090 */ addiu $v0, $v0, 0x5090
/* 3E5950 E010C490 ACA2000C */ sw $v0, 0xc($a1)
/* 3E5954 E010C494 3C028000 */ lui $v0, 0x8000
/* 3E5958 E010C498 00621821 */ addu $v1, $v1, $v0
/* 3E595C E010C49C ACA30004 */ sw $v1, 4($a1)
.LE010C4A0:
/* 3E5960 E010C4A0 02511821 */ addu $v1, $s2, $s1
/* 3E5964 E010C4A4 8C640000 */ lw $a0, ($v1)
/* 3E5968 E010C4A8 30820001 */ andi $v0, $a0, 1
/* 3E596C E010C4AC 10400056 */ beqz $v0, .LE010C608
/* 3E5970 E010C4B0 30820002 */ andi $v0, $a0, 2
/* 3E5974 E010C4B4 10400005 */ beqz $v0, .LE010C4CC
/* 3E5978 E010C4B8 00000000 */ nop
/* 3E597C E010C4BC C4660010 */ lwc1 $f6, 0x10($v1)
/* 3E5980 E010C4C0 C4640014 */ lwc1 $f4, 0x14($v1)
/* 3E5984 E010C4C4 08043136 */ j .LE010C4D8
/* 3E5988 E010C4C8 C4620018 */ lwc1 $f2, 0x18($v1)
.LE010C4CC:
/* 3E598C E010C4CC C4660004 */ lwc1 $f6, 4($v1)
/* 3E5990 E010C4D0 C4640008 */ lwc1 $f4, 8($v1)
/* 3E5994 E010C4D4 C462000C */ lwc1 $f2, 0xc($v1)
.LE010C4D8:
/* 3E5998 E010C4D8 C640000C */ lwc1 $f0, 0xc($s2)
/* 3E599C E010C4DC 4602003C */ c.lt.s $f0, $f2
/* 3E59A0 E010C4E0 00000000 */ nop
/* 3E59A4 E010C4E4 45030049 */ bc1tl .LE010C60C
/* 3E59A8 E010C4E8 26730001 */ addiu $s3, $s3, 1
/* 3E59AC E010C4EC 4405A000 */ mfc1 $a1, $f20
/* 3E59B0 E010C4F0 4406A000 */ mfc1 $a2, $f20
/* 3E59B4 E010C4F4 4407A000 */ mfc1 $a3, $f20
/* 3E59B8 E010C4F8 3C013F36 */ lui $at, 0x3f36
/* 3E59BC E010C4FC 3421DB6E */ ori $at, $at, 0xdb6e
/* 3E59C0 E010C500 44810000 */ mtc1 $at, $f0
/* 3E59C4 E010C504 27A40020 */ addiu $a0, $sp, 0x20
/* 3E59C8 E010C508 E7A60014 */ swc1 $f6, 0x14($sp)
/* 3E59CC E010C50C E7A40018 */ swc1 $f4, 0x18($sp)
/* 3E59D0 E010C510 E7A2001C */ swc1 $f2, 0x1c($sp)
/* 3E59D4 E010C514 0C080180 */ jal shim_guPositionF
/* 3E59D8 E010C518 E7A00010 */ swc1 $f0, 0x10($sp)
/* 3E59DC E010C51C 27A40020 */ addiu $a0, $sp, 0x20
/* 3E59E0 E010C520 96A50000 */ lhu $a1, ($s5)
/* 3E59E4 E010C524 8EE20000 */ lw $v0, ($s7)
/* 3E59E8 E010C528 00052980 */ sll $a1, $a1, 6
/* 3E59EC E010C52C 00B42821 */ addu $a1, $a1, $s4
/* 3E59F0 E010C530 0C080118 */ jal shim_guMtxF2L
/* 3E59F4 E010C534 00452821 */ addu $a1, $v0, $a1
/* 3E59F8 E010C538 3C02DA38 */ lui $v0, 0xda38
/* 3E59FC E010C53C 34420002 */ ori $v0, $v0, 2
/* 3E5A00 E010C540 3C068080 */ lui $a2, 0x8080
/* 3E5A04 E010C544 34C680FF */ ori $a2, $a2, 0x80ff
/* 3E5A08 E010C548 3C078080 */ lui $a3, 0x8080
/* 3E5A0C E010C54C 34E7807F */ ori $a3, $a3, 0x807f
/* 3E5A10 E010C550 3C08D838 */ lui $t0, 0xd838
/* 3E5A14 E010C554 35080002 */ ori $t0, $t0, 2
/* 3E5A18 E010C558 8E040000 */ lw $a0, ($s0)
/* 3E5A1C E010C55C 96A30000 */ lhu $v1, ($s5)
/* 3E5A20 E010C560 0080282D */ daddu $a1, $a0, $zero
/* 3E5A24 E010C564 24840008 */ addiu $a0, $a0, 8
/* 3E5A28 E010C568 AE040000 */ sw $a0, ($s0)
/* 3E5A2C E010C56C ACA20000 */ sw $v0, ($a1)
/* 3E5A30 E010C570 24620001 */ addiu $v0, $v1, 1
/* 3E5A34 E010C574 3063FFFF */ andi $v1, $v1, 0xffff
/* 3E5A38 E010C578 00031980 */ sll $v1, $v1, 6
/* 3E5A3C E010C57C A6A20000 */ sh $v0, ($s5)
/* 3E5A40 E010C580 8EE20000 */ lw $v0, ($s7)
/* 3E5A44 E010C584 00741821 */ addu $v1, $v1, $s4
/* 3E5A48 E010C588 00431021 */ addu $v0, $v0, $v1
/* 3E5A4C E010C58C ACA20004 */ sw $v0, 4($a1)
/* 3E5A50 E010C590 24820008 */ addiu $v0, $a0, 8
/* 3E5A54 E010C594 AE020000 */ sw $v0, ($s0)
/* 3E5A58 E010C598 3C02FA00 */ lui $v0, 0xfa00
/* 3E5A5C E010C59C AC820000 */ sw $v0, ($a0)
/* 3E5A60 E010C5A0 24820010 */ addiu $v0, $a0, 0x10
/* 3E5A64 E010C5A4 AC860004 */ sw $a2, 4($a0)
/* 3E5A68 E010C5A8 AE020000 */ sw $v0, ($s0)
/* 3E5A6C E010C5AC 3C02FB00 */ lui $v0, 0xfb00
/* 3E5A70 E010C5B0 AC820008 */ sw $v0, 8($a0)
/* 3E5A74 E010C5B4 24820018 */ addiu $v0, $a0, 0x18
/* 3E5A78 E010C5B8 00131880 */ sll $v1, $s3, 2
/* 3E5A7C E010C5BC AC87000C */ sw $a3, 0xc($a0)
/* 3E5A80 E010C5C0 AE020000 */ sw $v0, ($s0)
/* 3E5A84 E010C5C4 AC960010 */ sw $s6, 0x10($a0)
/* 3E5A88 E010C5C8 3C05E011 */ lui $a1, %hi(D_E010CA38)
/* 3E5A8C E010C5CC 00A32821 */ addu $a1, $a1, $v1
/* 3E5A90 E010C5D0 8CA5CA38 */ lw $a1, %lo(D_E010CA38)($a1)
/* 3E5A94 E010C5D4 24820020 */ addiu $v0, $a0, 0x20
/* 3E5A98 E010C5D8 AE020000 */ sw $v0, ($s0)
/* 3E5A9C E010C5DC AC960018 */ sw $s6, 0x18($a0)
/* 3E5AA0 E010C5E0 AC850014 */ sw $a1, 0x14($a0)
/* 3E5AA4 E010C5E4 3C01E011 */ lui $at, %hi(D_E010CA18)
/* 3E5AA8 E010C5E8 00230821 */ addu $at, $at, $v1
/* 3E5AAC E010C5EC 8C23CA18 */ lw $v1, %lo(D_E010CA18)($at)
/* 3E5AB0 E010C5F0 24820028 */ addiu $v0, $a0, 0x28
/* 3E5AB4 E010C5F4 AE020000 */ sw $v0, ($s0)
/* 3E5AB8 E010C5F8 24020040 */ addiu $v0, $zero, 0x40
/* 3E5ABC E010C5FC AC880020 */ sw $t0, 0x20($a0)
/* 3E5AC0 E010C600 AC820024 */ sw $v0, 0x24($a0)
/* 3E5AC4 E010C604 AC83001C */ sw $v1, 0x1c($a0)
.LE010C608:
/* 3E5AC8 E010C608 26730001 */ addiu $s3, $s3, 1
.LE010C60C:
/* 3E5ACC E010C60C 2A620008 */ slti $v0, $s3, 8
/* 3E5AD0 E010C610 1440FFA3 */ bnez $v0, .LE010C4A0
/* 3E5AD4 E010C614 2631001C */ addiu $s1, $s1, 0x1c
/* 3E5AD8 E010C618 27A40020 */ addiu $a0, $sp, 0x20
/* 3E5ADC E010C61C 240200FF */ addiu $v0, $zero, 0xff
/* 3E5AE0 E010C620 8E43003C */ lw $v1, 0x3c($s2)
/* 3E5AE4 E010C624 3C014079 */ lui $at, 0x4079
/* 3E5AE8 E010C628 44811800 */ mtc1 $at, $f3
/* 3E5AEC E010C62C 44801000 */ mtc1 $zero, $f2
/* 3E5AF0 E010C630 00431023 */ subu $v0, $v0, $v1
/* 3E5AF4 E010C634 44820000 */ mtc1 $v0, $f0
/* 3E5AF8 E010C638 00000000 */ nop
/* 3E5AFC E010C63C 46800020 */ cvt.s.w $f0, $f0
/* 3E5B00 E010C640 46000021 */ cvt.d.s $f0, $f0
/* 3E5B04 E010C644 46220002 */ mul.d $f0, $f0, $f2
/* 3E5B08 E010C648 00000000 */ nop
/* 3E5B0C E010C64C 3C110001 */ lui $s1, 1
/* 3E5B10 E010C650 36311630 */ ori $s1, $s1, 0x1630
/* 3E5B14 E010C654 0000982D */ daddu $s3, $zero, $zero
/* 3E5B18 E010C658 3C01E011 */ lui $at, %hi(D_E010CA60)
/* 3E5B1C E010C65C D424CA60 */ ldc1 $f4, %lo(D_E010CA60)($at)
/* 3E5B20 E010C660 C6420008 */ lwc1 $f2, 8($s2)
/* 3E5B24 E010C664 8E450004 */ lw $a1, 4($s2)
/* 3E5B28 E010C668 460010A1 */ cvt.d.s $f2, $f2
/* 3E5B2C E010C66C 46240003 */ div.d $f0, $f0, $f4
/* 3E5B30 E010C670 46201081 */ sub.d $f2, $f2, $f0
/* 3E5B34 E010C674 8E47000C */ lw $a3, 0xc($s2)
/* 3E5B38 E010C678 3C02800A */ lui $v0, %hi(gDisplayContext)
/* 3E5B3C E010C67C 2442A674 */ addiu $v0, $v0, %lo(gDisplayContext)
/* 3E5B40 E010C680 462010A0 */ cvt.s.d $f2, $f2
/* 3E5B44 E010C684 44061000 */ mfc1 $a2, $f2
/* 3E5B48 E010C688 0C080108 */ jal shim_guTranslateF
/* 3E5B4C E010C68C 0040B82D */ daddu $s7, $v0, $zero
/* 3E5B50 E010C690 3C028007 */ lui $v0, %hi(gMatrixListPos)
/* 3E5B54 E010C694 244241F0 */ addiu $v0, $v0, %lo(gMatrixListPos)
/* 3E5B58 E010C698 C6400038 */ lwc1 $f0, 0x38($s2)
/* 3E5B5C E010C69C 3C01E011 */ lui $at, %hi(D_E010CA68)
/* 3E5B60 E010C6A0 D422CA68 */ ldc1 $f2, %lo(D_E010CA68)($at)
/* 3E5B64 E010C6A4 46000021 */ cvt.d.s $f0, $f0
/* 3E5B68 E010C6A8 46220002 */ mul.d $f0, $f0, $f2
/* 3E5B6C E010C6AC 00000000 */ nop
/* 3E5B70 E010C6B0 0040A02D */ daddu $s4, $v0, $zero
/* 3E5B74 E010C6B4 3C160001 */ lui $s6, 1
/* 3E5B78 E010C6B8 36D61630 */ ori $s6, $s6, 0x1630
/* 3E5B7C E010C6BC 3C1EDE00 */ lui $fp, 0xde00
/* 3E5B80 E010C6C0 2415005C */ addiu $s5, $zero, 0x5c
/* 3E5B84 E010C6C4 27B00060 */ addiu $s0, $sp, 0x60
/* 3E5B88 E010C6C8 0200202D */ daddu $a0, $s0, $zero
/* 3E5B8C E010C6CC 46200020 */ cvt.s.d $f0, $f0
/* 3E5B90 E010C6D0 44050000 */ mfc1 $a1, $f0
/* 3E5B94 E010C6D4 4480A000 */ mtc1 $zero, $f20
/* 3E5B98 E010C6D8 00A0302D */ daddu $a2, $a1, $zero
/* 3E5B9C E010C6DC 0C080110 */ jal shim_guScaleF
/* 3E5BA0 E010C6E0 00A0382D */ daddu $a3, $a1, $zero
/* 3E5BA4 E010C6E4 0200202D */ daddu $a0, $s0, $zero
/* 3E5BA8 E010C6E8 27A50020 */ addiu $a1, $sp, 0x20
/* 3E5BAC E010C6EC 0C080114 */ jal shim_guMtxCatF
/* 3E5BB0 E010C6F0 00A0302D */ daddu $a2, $a1, $zero
/* 3E5BB4 E010C6F4 27A40020 */ addiu $a0, $sp, 0x20
/* 3E5BB8 E010C6F8 96850000 */ lhu $a1, ($s4)
/* 3E5BBC E010C6FC 8EE20000 */ lw $v0, ($s7)
/* 3E5BC0 E010C700 00052980 */ sll $a1, $a1, 6
/* 3E5BC4 E010C704 00B12821 */ addu $a1, $a1, $s1
/* 3E5BC8 E010C708 0C080118 */ jal shim_guMtxF2L
/* 3E5BCC E010C70C 00452821 */ addu $a1, $v0, $a1
/* 3E5BD0 E010C710 3C03DA38 */ lui $v1, 0xda38
/* 3E5BD4 E010C714 34630002 */ ori $v1, $v1, 2
/* 3E5BD8 E010C718 3C06DA38 */ lui $a2, 0xda38
/* 3E5BDC E010C71C 34C60001 */ ori $a2, $a2, 1
/* 3E5BE0 E010C720 3C09D838 */ lui $t1, 0xd838
/* 3E5BE4 E010C724 35290002 */ ori $t1, $t1, 2
/* 3E5BE8 E010C728 3C02800A */ lui $v0, %hi(gMasterGfxPos)
/* 3E5BEC E010C72C 2442A66C */ addiu $v0, $v0, %lo(gMasterGfxPos)
/* 3E5BF0 E010C730 0040802D */ daddu $s0, $v0, $zero
/* 3E5BF4 E010C734 8C440000 */ lw $a0, ($v0)
/* 3E5BF8 E010C738 96820000 */ lhu $v0, ($s4)
/* 3E5BFC E010C73C 0080282D */ daddu $a1, $a0, $zero
/* 3E5C00 E010C740 24840008 */ addiu $a0, $a0, 8
/* 3E5C04 E010C744 AE040000 */ sw $a0, ($s0)
/* 3E5C08 E010C748 ACA30000 */ sw $v1, ($a1)
/* 3E5C0C E010C74C 24430001 */ addiu $v1, $v0, 1
/* 3E5C10 E010C750 3042FFFF */ andi $v0, $v0, 0xffff
/* 3E5C14 E010C754 00021180 */ sll $v0, $v0, 6
/* 3E5C18 E010C758 A6830000 */ sh $v1, ($s4)
/* 3E5C1C E010C75C 8EE30000 */ lw $v1, ($s7)
/* 3E5C20 E010C760 00511021 */ addu $v0, $v0, $s1
/* 3E5C24 E010C764 00621821 */ addu $v1, $v1, $v0
/* 3E5C28 E010C768 24820008 */ addiu $v0, $a0, 8
/* 3E5C2C E010C76C ACA30004 */ sw $v1, 4($a1)
/* 3E5C30 E010C770 AE020000 */ sw $v0, ($s0)
/* 3E5C34 E010C774 24820010 */ addiu $v0, $a0, 0x10
/* 3E5C38 E010C778 AC860000 */ sw $a2, ($a0)
/* 3E5C3C E010C77C AE020000 */ sw $v0, ($s0)
/* 3E5C40 E010C780 8FAA00A0 */ lw $t2, 0xa0($sp)
/* 3E5C44 E010C784 03C0382D */ daddu $a3, $fp, $zero
/* 3E5C48 E010C788 8D430204 */ lw $v1, 0x204($t2)
/* 3E5C4C E010C78C 3C02FA00 */ lui $v0, 0xfa00
/* 3E5C50 E010C790 AC820008 */ sw $v0, 8($a0)
/* 3E5C54 E010C794 AC830004 */ sw $v1, 4($a0)
/* 3E5C58 E010C798 9242001B */ lbu $v0, 0x1b($s2)
/* 3E5C5C E010C79C 9245001F */ lbu $a1, 0x1f($s2)
/* 3E5C60 E010C7A0 92460023 */ lbu $a2, 0x23($s2)
/* 3E5C64 E010C7A4 24830018 */ addiu $v1, $a0, 0x18
/* 3E5C68 E010C7A8 AE030000 */ sw $v1, ($s0)
/* 3E5C6C E010C7AC 3C03FB00 */ lui $v1, 0xfb00
/* 3E5C70 E010C7B0 AC830010 */ sw $v1, 0x10($a0)
/* 3E5C74 E010C7B4 8FAA00A4 */ lw $t2, 0xa4($sp)
/* 3E5C78 E010C7B8 00021600 */ sll $v0, $v0, 0x18
/* 3E5C7C E010C7BC 00052C00 */ sll $a1, $a1, 0x10
/* 3E5C80 E010C7C0 00451025 */ or $v0, $v0, $a1
/* 3E5C84 E010C7C4 00063200 */ sll $a2, $a2, 8
/* 3E5C88 E010C7C8 00461025 */ or $v0, $v0, $a2
/* 3E5C8C E010C7CC 314300FF */ andi $v1, $t2, 0xff
/* 3E5C90 E010C7D0 00431025 */ or $v0, $v0, $v1
/* 3E5C94 E010C7D4 AC82000C */ sw $v0, 0xc($a0)
/* 3E5C98 E010C7D8 9242002B */ lbu $v0, 0x2b($s2)
/* 3E5C9C E010C7DC 9245002F */ lbu $a1, 0x2f($s2)
/* 3E5CA0 E010C7E0 92460033 */ lbu $a2, 0x33($s2)
/* 3E5CA4 E010C7E4 92480037 */ lbu $t0, 0x37($s2)
/* 3E5CA8 E010C7E8 24830020 */ addiu $v1, $a0, 0x20
/* 3E5CAC E010C7EC AE030000 */ sw $v1, ($s0)
/* 3E5CB0 E010C7F0 AC870018 */ sw $a3, 0x18($a0)
/* 3E5CB4 E010C7F4 00021600 */ sll $v0, $v0, 0x18
/* 3E5CB8 E010C7F8 00052C00 */ sll $a1, $a1, 0x10
/* 3E5CBC E010C7FC 00451025 */ or $v0, $v0, $a1
/* 3E5CC0 E010C800 00063200 */ sll $a2, $a2, 8
/* 3E5CC4 E010C804 00461025 */ or $v0, $v0, $a2
/* 3E5CC8 E010C808 00481025 */ or $v0, $v0, $t0
/* 3E5CCC E010C80C AC820014 */ sw $v0, 0x14($a0)
/* 3E5CD0 E010C810 3C03E011 */ lui $v1, %hi(D_E010CA14)
/* 3E5CD4 E010C814 8C63CA14 */ lw $v1, %lo(D_E010CA14)($v1)
/* 3E5CD8 E010C818 24820028 */ addiu $v0, $a0, 0x28
/* 3E5CDC E010C81C AE020000 */ sw $v0, ($s0)
/* 3E5CE0 E010C820 AC870020 */ sw $a3, 0x20($a0)
/* 3E5CE4 E010C824 AC83001C */ sw $v1, 0x1c($a0)
/* 3E5CE8 E010C828 3C03E011 */ lui $v1, %hi(D_E010CA10)
/* 3E5CEC E010C82C 8C63CA10 */ lw $v1, %lo(D_E010CA10)($v1)
/* 3E5CF0 E010C830 24820030 */ addiu $v0, $a0, 0x30
/* 3E5CF4 E010C834 AE020000 */ sw $v0, ($s0)
/* 3E5CF8 E010C838 24020040 */ addiu $v0, $zero, 0x40
/* 3E5CFC E010C83C AC830024 */ sw $v1, 0x24($a0)
/* 3E5D00 E010C840 AC890028 */ sw $t1, 0x28($a0)
/* 3E5D04 E010C844 AC82002C */ sw $v0, 0x2c($a0)
/* 3E5D08 E010C848 24820038 */ addiu $v0, $a0, 0x38
/* 3E5D0C E010C84C AE020000 */ sw $v0, ($s0)
/* 3E5D10 E010C850 3C020900 */ lui $v0, 0x900
/* 3E5D14 E010C854 24425090 */ addiu $v0, $v0, 0x5090
/* 3E5D18 E010C858 AC870030 */ sw $a3, 0x30($a0)
/* 3E5D1C E010C85C AC820034 */ sw $v0, 0x34($a0)
.LE010C860:
/* 3E5D20 E010C860 02551821 */ addu $v1, $s2, $s5
/* 3E5D24 E010C864 8C640000 */ lw $a0, ($v1)
/* 3E5D28 E010C868 30820001 */ andi $v0, $a0, 1
/* 3E5D2C E010C86C 10400056 */ beqz $v0, .LE010C9C8
/* 3E5D30 E010C870 30820002 */ andi $v0, $a0, 2
/* 3E5D34 E010C874 10400005 */ beqz $v0, .LE010C88C
/* 3E5D38 E010C878 00000000 */ nop
/* 3E5D3C E010C87C C4660010 */ lwc1 $f6, 0x10($v1)
/* 3E5D40 E010C880 C4640014 */ lwc1 $f4, 0x14($v1)
/* 3E5D44 E010C884 08043226 */ j .LE010C898
/* 3E5D48 E010C888 C4620018 */ lwc1 $f2, 0x18($v1)
.LE010C88C:
/* 3E5D4C E010C88C C4660004 */ lwc1 $f6, 4($v1)
/* 3E5D50 E010C890 C4640008 */ lwc1 $f4, 8($v1)
/* 3E5D54 E010C894 C462000C */ lwc1 $f2, 0xc($v1)
.LE010C898:
/* 3E5D58 E010C898 C640000C */ lwc1 $f0, 0xc($s2)
/* 3E5D5C E010C89C 4600103E */ c.le.s $f2, $f0
/* 3E5D60 E010C8A0 00000000 */ nop
/* 3E5D64 E010C8A4 45030049 */ bc1tl .LE010C9CC
/* 3E5D68 E010C8A8 26730001 */ addiu $s3, $s3, 1
/* 3E5D6C E010C8AC 4405A000 */ mfc1 $a1, $f20
/* 3E5D70 E010C8B0 4406A000 */ mfc1 $a2, $f20
/* 3E5D74 E010C8B4 4407A000 */ mfc1 $a3, $f20
/* 3E5D78 E010C8B8 3C013F2B */ lui $at, 0x3f2b
/* 3E5D7C E010C8BC 3421851F */ ori $at, $at, 0x851f
/* 3E5D80 E010C8C0 44810000 */ mtc1 $at, $f0
/* 3E5D84 E010C8C4 27A40020 */ addiu $a0, $sp, 0x20
/* 3E5D88 E010C8C8 E7A60014 */ swc1 $f6, 0x14($sp)
/* 3E5D8C E010C8CC E7A40018 */ swc1 $f4, 0x18($sp)
/* 3E5D90 E010C8D0 E7A2001C */ swc1 $f2, 0x1c($sp)
/* 3E5D94 E010C8D4 0C080180 */ jal shim_guPositionF
/* 3E5D98 E010C8D8 E7A00010 */ swc1 $f0, 0x10($sp)
/* 3E5D9C E010C8DC 27A40020 */ addiu $a0, $sp, 0x20
/* 3E5DA0 E010C8E0 96850000 */ lhu $a1, ($s4)
/* 3E5DA4 E010C8E4 8EE20000 */ lw $v0, ($s7)
/* 3E5DA8 E010C8E8 00052980 */ sll $a1, $a1, 6
/* 3E5DAC E010C8EC 00B62821 */ addu $a1, $a1, $s6
/* 3E5DB0 E010C8F0 0C080118 */ jal shim_guMtxF2L
/* 3E5DB4 E010C8F4 00452821 */ addu $a1, $v0, $a1
/* 3E5DB8 E010C8F8 3C02DA38 */ lui $v0, 0xda38
/* 3E5DBC E010C8FC 34420002 */ ori $v0, $v0, 2
/* 3E5DC0 E010C900 3C068080 */ lui $a2, 0x8080
/* 3E5DC4 E010C904 34C680FF */ ori $a2, $a2, 0x80ff
/* 3E5DC8 E010C908 3C078080 */ lui $a3, 0x8080
/* 3E5DCC E010C90C 34E7807F */ ori $a3, $a3, 0x807f
/* 3E5DD0 E010C910 3C08D838 */ lui $t0, 0xd838
/* 3E5DD4 E010C914 35080002 */ ori $t0, $t0, 2
/* 3E5DD8 E010C918 8E040000 */ lw $a0, ($s0)
/* 3E5DDC E010C91C 96830000 */ lhu $v1, ($s4)
/* 3E5DE0 E010C920 0080282D */ daddu $a1, $a0, $zero
/* 3E5DE4 E010C924 24840008 */ addiu $a0, $a0, 8
/* 3E5DE8 E010C928 AE040000 */ sw $a0, ($s0)
/* 3E5DEC E010C92C ACA20000 */ sw $v0, ($a1)
/* 3E5DF0 E010C930 24620001 */ addiu $v0, $v1, 1
/* 3E5DF4 E010C934 3063FFFF */ andi $v1, $v1, 0xffff
/* 3E5DF8 E010C938 00031980 */ sll $v1, $v1, 6
/* 3E5DFC E010C93C A6820000 */ sh $v0, ($s4)
/* 3E5E00 E010C940 8EE20000 */ lw $v0, ($s7)
/* 3E5E04 E010C944 00761821 */ addu $v1, $v1, $s6
/* 3E5E08 E010C948 00431021 */ addu $v0, $v0, $v1
/* 3E5E0C E010C94C ACA20004 */ sw $v0, 4($a1)
/* 3E5E10 E010C950 24820008 */ addiu $v0, $a0, 8
/* 3E5E14 E010C954 AE020000 */ sw $v0, ($s0)
/* 3E5E18 E010C958 3C02FA00 */ lui $v0, 0xfa00
/* 3E5E1C E010C95C AC820000 */ sw $v0, ($a0)
/* 3E5E20 E010C960 24820010 */ addiu $v0, $a0, 0x10
/* 3E5E24 E010C964 AC860004 */ sw $a2, 4($a0)
/* 3E5E28 E010C968 AE020000 */ sw $v0, ($s0)
/* 3E5E2C E010C96C 3C02FB00 */ lui $v0, 0xfb00
/* 3E5E30 E010C970 AC820008 */ sw $v0, 8($a0)
/* 3E5E34 E010C974 24820018 */ addiu $v0, $a0, 0x18
/* 3E5E38 E010C978 00131880 */ sll $v1, $s3, 2
/* 3E5E3C E010C97C AC87000C */ sw $a3, 0xc($a0)
/* 3E5E40 E010C980 AE020000 */ sw $v0, ($s0)
/* 3E5E44 E010C984 AC9E0010 */ sw $fp, 0x10($a0)
/* 3E5E48 E010C988 3C05E011 */ lui $a1, %hi(D_E010CA38)
/* 3E5E4C E010C98C 00A32821 */ addu $a1, $a1, $v1
/* 3E5E50 E010C990 8CA5CA38 */ lw $a1, %lo(D_E010CA38)($a1)
/* 3E5E54 E010C994 24820020 */ addiu $v0, $a0, 0x20
/* 3E5E58 E010C998 AE020000 */ sw $v0, ($s0)
/* 3E5E5C E010C99C AC9E0018 */ sw $fp, 0x18($a0)
/* 3E5E60 E010C9A0 AC850014 */ sw $a1, 0x14($a0)
/* 3E5E64 E010C9A4 3C01E011 */ lui $at, %hi(D_E010CA18)
/* 3E5E68 E010C9A8 00230821 */ addu $at, $at, $v1
/* 3E5E6C E010C9AC 8C23CA18 */ lw $v1, %lo(D_E010CA18)($at)
/* 3E5E70 E010C9B0 24820028 */ addiu $v0, $a0, 0x28
/* 3E5E74 E010C9B4 AE020000 */ sw $v0, ($s0)
/* 3E5E78 E010C9B8 24020040 */ addiu $v0, $zero, 0x40
/* 3E5E7C E010C9BC AC880020 */ sw $t0, 0x20($a0)
/* 3E5E80 E010C9C0 AC820024 */ sw $v0, 0x24($a0)
/* 3E5E84 E010C9C4 AC83001C */ sw $v1, 0x1c($a0)
.LE010C9C8:
/* 3E5E88 E010C9C8 26730001 */ addiu $s3, $s3, 1
.LE010C9CC:
/* 3E5E8C E010C9CC 2A620008 */ slti $v0, $s3, 8
/* 3E5E90 E010C9D0 1440FFA3 */ bnez $v0, .LE010C860
/* 3E5E94 E010C9D4 26B5001C */ addiu $s5, $s5, 0x1c
/* 3E5E98 E010C9D8 8FBF00CC */ lw $ra, 0xcc($sp)
/* 3E5E9C E010C9DC 8FBE00C8 */ lw $fp, 0xc8($sp)
/* 3E5EA0 E010C9E0 8FB700C4 */ lw $s7, 0xc4($sp)
/* 3E5EA4 E010C9E4 8FB600C0 */ lw $s6, 0xc0($sp)
/* 3E5EA8 E010C9E8 8FB500BC */ lw $s5, 0xbc($sp)
/* 3E5EAC E010C9EC 8FB400B8 */ lw $s4, 0xb8($sp)
/* 3E5EB0 E010C9F0 8FB300B4 */ lw $s3, 0xb4($sp)
/* 3E5EB4 E010C9F4 8FB200B0 */ lw $s2, 0xb0($sp)
/* 3E5EB8 E010C9F8 8FB100AC */ lw $s1, 0xac($sp)
/* 3E5EBC E010C9FC 8FB000A8 */ lw $s0, 0xa8($sp)
/* 3E5EC0 E010CA00 D7B400D0 */ ldc1 $f20, 0xd0($sp)
/* 3E5EC4 E010CA04 03E00008 */ jr $ra
/* 3E5EC8 E010CA08 27BD00D8 */ addiu $sp, $sp, 0xd8
/* 3E5ECC E010CA0C 00000000 */ nop

View File

@ -1,111 +0,0 @@
.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel peach_star_beam_main
/* 3E54C0 E010C000 27BDFFB0 */ addiu $sp, $sp, -0x50
/* 3E54C4 E010C004 F7B40038 */ sdc1 $f20, 0x38($sp)
/* 3E54C8 E010C008 4485A000 */ mtc1 $a1, $f20
/* 3E54CC E010C00C F7B80048 */ sdc1 $f24, 0x48($sp)
/* 3E54D0 E010C010 4486C000 */ mtc1 $a2, $f24
/* 3E54D4 E010C014 AFB20030 */ sw $s2, 0x30($sp)
/* 3E54D8 E010C018 0080902D */ daddu $s2, $a0, $zero
/* 3E54DC E010C01C F7B60040 */ sdc1 $f22, 0x40($sp)
/* 3E54E0 E010C020 4487B000 */ mtc1 $a3, $f22
/* 3E54E4 E010C024 27A40010 */ addiu $a0, $sp, 0x10
/* 3E54E8 E010C028 AFB1002C */ sw $s1, 0x2c($sp)
/* 3E54EC E010C02C 8FB10064 */ lw $s1, 0x64($sp)
/* 3E54F0 E010C030 3C02E011 */ lui $v0, %hi(peach_star_beam_init)
/* 3E54F4 E010C034 2442C190 */ addiu $v0, $v0, %lo(peach_star_beam_init)
/* 3E54F8 E010C038 AFA20018 */ sw $v0, 0x18($sp)
/* 3E54FC E010C03C 3C02E011 */ lui $v0, %hi(peach_star_beam_update)
/* 3E5500 E010C040 2442C198 */ addiu $v0, $v0, %lo(peach_star_beam_update)
/* 3E5504 E010C044 AFA2001C */ sw $v0, 0x1c($sp)
/* 3E5508 E010C048 3C02E011 */ lui $v0, %hi(peach_star_beam_render)
/* 3E550C E010C04C 2442C354 */ addiu $v0, $v0, %lo(peach_star_beam_render)
/* 3E5510 E010C050 AFA20020 */ sw $v0, 0x20($sp)
/* 3E5514 E010C054 24020078 */ addiu $v0, $zero, 0x78
/* 3E5518 E010C058 AFBF0034 */ sw $ra, 0x34($sp)
/* 3E551C E010C05C AFB00028 */ sw $s0, 0x28($sp)
/* 3E5520 E010C060 AFA00010 */ sw $zero, 0x10($sp)
/* 3E5524 E010C064 AFA00024 */ sw $zero, 0x24($sp)
/* 3E5528 E010C068 0C080124 */ jal shim_create_effect_instance
/* 3E552C E010C06C AFA20014 */ sw $v0, 0x14($sp)
/* 3E5530 E010C070 2404013C */ addiu $a0, $zero, 0x13c
/* 3E5534 E010C074 24030001 */ addiu $v1, $zero, 1
/* 3E5538 E010C078 0040802D */ daddu $s0, $v0, $zero
/* 3E553C E010C07C 0C08012C */ jal shim_general_heap_malloc
/* 3E5540 E010C080 AE030008 */ sw $v1, 8($s0)
/* 3E5544 E010C084 0040202D */ daddu $a0, $v0, $zero
/* 3E5548 E010C088 14800003 */ bnez $a0, .LE010C098
/* 3E554C E010C08C AE02000C */ sw $v0, 0xc($s0)
.LE010C090:
/* 3E5550 E010C090 08043024 */ j .LE010C090
/* 3E5554 E010C094 00000000 */ nop
.LE010C098:
/* 3E5558 E010C098 AC920000 */ sw $s2, ($a0)
/* 3E555C E010C09C 1E200004 */ bgtz $s1, .LE010C0B0
/* 3E5560 E010C0A0 AC800014 */ sw $zero, 0x14($a0)
/* 3E5564 E010C0A4 240203E8 */ addiu $v0, $zero, 0x3e8
/* 3E5568 E010C0A8 0804302D */ j .LE010C0B4
/* 3E556C E010C0AC AC820010 */ sw $v0, 0x10($a0)
.LE010C0B0:
/* 3E5570 E010C0B0 AC910010 */ sw $s1, 0x10($a0)
.LE010C0B4:
/* 3E5574 E010C0B4 0000282D */ daddu $a1, $zero, $zero
/* 3E5578 E010C0B8 240200E0 */ addiu $v0, $zero, 0xe0
/* 3E557C E010C0BC AC820024 */ sw $v0, 0x24($a0)
/* 3E5580 E010C0C0 240200FF */ addiu $v0, $zero, 0xff
/* 3E5584 E010C0C4 E4940004 */ swc1 $f20, 4($a0)
/* 3E5588 E010C0C8 E4980008 */ swc1 $f24, 8($a0)
/* 3E558C E010C0CC E496000C */ swc1 $f22, 0xc($a0)
/* 3E5590 E010C0D0 AC82003C */ sw $v0, 0x3c($a0)
/* 3E5594 E010C0D4 C7A00060 */ lwc1 $f0, 0x60($sp)
/* 3E5598 E010C0D8 3C0140A0 */ lui $at, 0x40a0
/* 3E559C E010C0DC 44811000 */ mtc1 $at, $f2
/* 3E55A0 E010C0E0 24070001 */ addiu $a3, $zero, 1
/* 3E55A4 E010C0E4 E4800038 */ swc1 $f0, 0x38($a0)
/* 3E55A8 E010C0E8 3C0142A0 */ lui $at, 0x42a0
/* 3E55AC E010C0EC 44810000 */ mtc1 $at, $f0
/* 3E55B0 E010C0F0 2406005C */ addiu $a2, $zero, 0x5c
/* 3E55B4 E010C0F4 E4800048 */ swc1 $f0, 0x48($a0)
/* 3E55B8 E010C0F8 3C014248 */ lui $at, 0x4248
/* 3E55BC E010C0FC 44810000 */ mtc1 $at, $f0
/* 3E55C0 E010C100 24030078 */ addiu $v1, $zero, 0x78
/* 3E55C4 E010C104 AC820018 */ sw $v0, 0x18($a0)
/* 3E55C8 E010C108 AC82001C */ sw $v0, 0x1c($a0)
/* 3E55CC E010C10C AC830020 */ sw $v1, 0x20($a0)
/* 3E55D0 E010C110 AC820028 */ sw $v0, 0x28($a0)
/* 3E55D4 E010C114 AC82002C */ sw $v0, 0x2c($a0)
/* 3E55D8 E010C118 AC820030 */ sw $v0, 0x30($a0)
/* 3E55DC E010C11C AC820034 */ sw $v0, 0x34($a0)
/* 3E55E0 E010C120 AC800044 */ sw $zero, 0x44($a0)
/* 3E55E4 E010C124 E494004C */ swc1 $f20, 0x4c($a0)
/* 3E55E8 E010C128 E4960054 */ swc1 $f22, 0x54($a0)
/* 3E55EC E010C12C 4600C100 */ add.s $f4, $f24, $f0
/* 3E55F0 E010C130 E4820040 */ swc1 $f2, 0x40($a0)
/* 3E55F4 E010C134 E4800058 */ swc1 $f0, 0x58($a0)
/* 3E55F8 E010C138 E4840050 */ swc1 $f4, 0x50($a0)
.LE010C13C:
/* 3E55FC E010C13C 16400005 */ bnez $s2, .LE010C154
/* 3E5600 E010C140 00861021 */ addu $v0, $a0, $a2
/* 3E5604 E010C144 54A00004 */ bnel $a1, $zero, .LE010C158
/* 3E5608 E010C148 AC470000 */ sw $a3, ($v0)
/* 3E560C E010C14C 08043056 */ j .LE010C158
/* 3E5610 E010C150 AC400000 */ sw $zero, ($v0)
.LE010C154:
/* 3E5614 E010C154 AC470000 */ sw $a3, ($v0)
.LE010C158:
/* 3E5618 E010C158 24A50001 */ addiu $a1, $a1, 1
/* 3E561C E010C15C 28A20008 */ slti $v0, $a1, 8
/* 3E5620 E010C160 1440FFF6 */ bnez $v0, .LE010C13C
/* 3E5624 E010C164 24C6001C */ addiu $a2, $a2, 0x1c
/* 3E5628 E010C168 0200102D */ daddu $v0, $s0, $zero
/* 3E562C E010C16C 8FBF0034 */ lw $ra, 0x34($sp)
/* 3E5630 E010C170 8FB20030 */ lw $s2, 0x30($sp)
/* 3E5634 E010C174 8FB1002C */ lw $s1, 0x2c($sp)
/* 3E5638 E010C178 8FB00028 */ lw $s0, 0x28($sp)
/* 3E563C E010C17C D7B80048 */ ldc1 $f24, 0x48($sp)
/* 3E5640 E010C180 D7B60040 */ ldc1 $f22, 0x40($sp)
/* 3E5644 E010C184 D7B40038 */ ldc1 $f20, 0x38($sp)
/* 3E5648 E010C188 03E00008 */ jr $ra
/* 3E564C E010C18C 27BD0050 */ addiu $sp, $sp, 0x50

View File

@ -1,123 +0,0 @@
.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel peach_star_beam_update
/* 3E5658 E010C198 27BDFFA0 */ addiu $sp, $sp, -0x60
/* 3E565C E010C19C AFBF0028 */ sw $ra, 0x28($sp)
/* 3E5660 E010C1A0 AFB50024 */ sw $s5, 0x24($sp)
/* 3E5664 E010C1A4 AFB40020 */ sw $s4, 0x20($sp)
/* 3E5668 E010C1A8 AFB3001C */ sw $s3, 0x1c($sp)
/* 3E566C E010C1AC AFB20018 */ sw $s2, 0x18($sp)
/* 3E5670 E010C1B0 AFB10014 */ sw $s1, 0x14($sp)
/* 3E5674 E010C1B4 AFB00010 */ sw $s0, 0x10($sp)
/* 3E5678 E010C1B8 F7BE0058 */ sdc1 $f30, 0x58($sp)
/* 3E567C E010C1BC F7BC0050 */ sdc1 $f28, 0x50($sp)
/* 3E5680 E010C1C0 F7BA0048 */ sdc1 $f26, 0x48($sp)
/* 3E5684 E010C1C4 F7B80040 */ sdc1 $f24, 0x40($sp)
/* 3E5688 E010C1C8 F7B60038 */ sdc1 $f22, 0x38($sp)
/* 3E568C E010C1CC F7B40030 */ sdc1 $f20, 0x30($sp)
/* 3E5690 E010C1D0 8C830000 */ lw $v1, ($a0)
/* 3E5694 E010C1D4 8C91000C */ lw $s1, 0xc($a0)
/* 3E5698 E010C1D8 30620010 */ andi $v0, $v1, 0x10
/* 3E569C E010C1DC 10400005 */ beqz $v0, .LE010C1F4
/* 3E56A0 E010C1E0 2402FFEF */ addiu $v0, $zero, -0x11
/* 3E56A4 E010C1E4 00621024 */ and $v0, $v1, $v0
/* 3E56A8 E010C1E8 AC820000 */ sw $v0, ($a0)
/* 3E56AC E010C1EC 24020010 */ addiu $v0, $zero, 0x10
/* 3E56B0 E010C1F0 AE220010 */ sw $v0, 0x10($s1)
.LE010C1F4:
/* 3E56B4 E010C1F4 8E230010 */ lw $v1, 0x10($s1)
/* 3E56B8 E010C1F8 286203E8 */ slti $v0, $v1, 0x3e8
/* 3E56BC E010C1FC 10400002 */ beqz $v0, .LE010C208
/* 3E56C0 E010C200 2462FFFF */ addiu $v0, $v1, -1
/* 3E56C4 E010C204 AE220010 */ sw $v0, 0x10($s1)
.LE010C208:
/* 3E56C8 E010C208 8E220014 */ lw $v0, 0x14($s1)
/* 3E56CC E010C20C 8E230010 */ lw $v1, 0x10($s1)
/* 3E56D0 E010C210 24420001 */ addiu $v0, $v0, 1
/* 3E56D4 E010C214 04610005 */ bgez $v1, .LE010C22C
/* 3E56D8 E010C218 AE220014 */ sw $v0, 0x14($s1)
/* 3E56DC E010C21C 0C080128 */ jal shim_remove_effect
/* 3E56E0 E010C220 00000000 */ nop
/* 3E56E4 E010C224 080430C6 */ j .LE010C318
/* 3E56E8 E010C228 00000000 */ nop
.LE010C22C:
/* 3E56EC E010C22C 0000982D */ daddu $s3, $zero, $zero
/* 3E56F0 E010C230 3C159249 */ lui $s5, 0x9249
/* 3E56F4 E010C234 36B52493 */ ori $s5, $s5, 0x2493
/* 3E56F8 E010C238 2412FE98 */ addiu $s2, $zero, -0x168
/* 3E56FC E010C23C 2414005C */ addiu $s4, $zero, 0x5c
/* 3E5700 E010C240 C63C0048 */ lwc1 $f28, 0x48($s1)
/* 3E5704 E010C244 C6200044 */ lwc1 $f0, 0x44($s1)
/* 3E5708 E010C248 C6220040 */ lwc1 $f2, 0x40($s1)
/* 3E570C E010C24C C63A004C */ lwc1 $f26, 0x4c($s1)
/* 3E5710 E010C250 46020000 */ add.s $f0, $f0, $f2
/* 3E5714 E010C254 C6380050 */ lwc1 $f24, 0x50($s1)
/* 3E5718 E010C258 C6360054 */ lwc1 $f22, 0x54($s1)
/* 3E571C E010C25C 46000786 */ mov.s $f30, $f0
/* 3E5720 E010C260 E63E0044 */ swc1 $f30, 0x44($s1)
.LE010C264:
/* 3E5724 E010C264 16600007 */ bnez $s3, .LE010C284
/* 3E5728 E010C268 02348021 */ addu $s0, $s1, $s4
/* 3E572C E010C26C E61A0004 */ swc1 $f26, 4($s0)
/* 3E5730 E010C270 C6200058 */ lwc1 $f0, 0x58($s1)
/* 3E5734 E010C274 4600C000 */ add.s $f0, $f24, $f0
/* 3E5738 E010C278 E616000C */ swc1 $f22, 0xc($s0)
/* 3E573C E010C27C 080430B8 */ j .LE010C2E0
/* 3E5740 E010C280 E6000008 */ swc1 $f0, 8($s0)
.LE010C284:
/* 3E5744 E010C284 02550018 */ mult $s2, $s5
/* 3E5748 E010C288 00121FC3 */ sra $v1, $s2, 0x1f
/* 3E574C E010C28C 00002810 */ mfhi $a1
/* 3E5750 E010C290 00B21021 */ addu $v0, $a1, $s2
/* 3E5754 E010C294 00021083 */ sra $v0, $v0, 2
/* 3E5758 E010C298 00431023 */ subu $v0, $v0, $v1
/* 3E575C E010C29C 4482A000 */ mtc1 $v0, $f20
/* 3E5760 E010C2A0 00000000 */ nop
/* 3E5764 E010C2A4 4680A520 */ cvt.s.w $f20, $f20
/* 3E5768 E010C2A8 4614F500 */ add.s $f20, $f30, $f20
/* 3E576C E010C2AC 0C080140 */ jal shim_sin_deg
/* 3E5770 E010C2B0 4600A306 */ mov.s $f12, $f20
/* 3E5774 E010C2B4 4600E002 */ mul.s $f0, $f28, $f0
/* 3E5778 E010C2B8 00000000 */ nop
/* 3E577C E010C2BC 4600D000 */ add.s $f0, $f26, $f0
/* 3E5780 E010C2C0 4600A306 */ mov.s $f12, $f20
/* 3E5784 E010C2C4 E6180008 */ swc1 $f24, 8($s0)
/* 3E5788 E010C2C8 0C080144 */ jal shim_cos_deg
/* 3E578C E010C2CC E6000004 */ swc1 $f0, 4($s0)
/* 3E5790 E010C2D0 4600E002 */ mul.s $f0, $f28, $f0
/* 3E5794 E010C2D4 00000000 */ nop
/* 3E5798 E010C2D8 4600B000 */ add.s $f0, $f22, $f0
/* 3E579C E010C2DC E600000C */ swc1 $f0, 0xc($s0)
.LE010C2E0:
/* 3E57A0 E010C2E0 8E020000 */ lw $v0, ($s0)
/* 3E57A4 E010C2E4 30420002 */ andi $v0, $v0, 2
/* 3E57A8 E010C2E8 14400007 */ bnez $v0, .LE010C308
/* 3E57AC E010C2EC 26520168 */ addiu $s2, $s2, 0x168
/* 3E57B0 E010C2F0 C6000004 */ lwc1 $f0, 4($s0)
/* 3E57B4 E010C2F4 C6020008 */ lwc1 $f2, 8($s0)
/* 3E57B8 E010C2F8 C604000C */ lwc1 $f4, 0xc($s0)
/* 3E57BC E010C2FC E6000010 */ swc1 $f0, 0x10($s0)
/* 3E57C0 E010C300 E6020014 */ swc1 $f2, 0x14($s0)
/* 3E57C4 E010C304 E6040018 */ swc1 $f4, 0x18($s0)
.LE010C308:
/* 3E57C8 E010C308 26730001 */ addiu $s3, $s3, 1
/* 3E57CC E010C30C 2A620008 */ slti $v0, $s3, 8
/* 3E57D0 E010C310 1440FFD4 */ bnez $v0, .LE010C264
/* 3E57D4 E010C314 2694001C */ addiu $s4, $s4, 0x1c
.LE010C318:
/* 3E57D8 E010C318 8FBF0028 */ lw $ra, 0x28($sp)
/* 3E57DC E010C31C 8FB50024 */ lw $s5, 0x24($sp)
/* 3E57E0 E010C320 8FB40020 */ lw $s4, 0x20($sp)
/* 3E57E4 E010C324 8FB3001C */ lw $s3, 0x1c($sp)
/* 3E57E8 E010C328 8FB20018 */ lw $s2, 0x18($sp)
/* 3E57EC E010C32C 8FB10014 */ lw $s1, 0x14($sp)
/* 3E57F0 E010C330 8FB00010 */ lw $s0, 0x10($sp)
/* 3E57F4 E010C334 D7BE0058 */ ldc1 $f30, 0x58($sp)
/* 3E57F8 E010C338 D7BC0050 */ ldc1 $f28, 0x50($sp)
/* 3E57FC E010C33C D7BA0048 */ ldc1 $f26, 0x48($sp)
/* 3E5800 E010C340 D7B80040 */ ldc1 $f24, 0x40($sp)
/* 3E5804 E010C344 D7B60038 */ ldc1 $f22, 0x38($sp)
/* 3E5808 E010C348 D7B40030 */ ldc1 $f20, 0x30($sp)
/* 3E580C E010C34C 03E00008 */ jr $ra
/* 3E5810 E010C350 27BD0060 */ addiu $sp, $sp, 0x60

View File

@ -3920,7 +3920,7 @@ segments:
vram: 0xE010C000
subsegments:
- [0x3E54C0, c, peach_star_beam]
- [0x3E5ED0, data]
- [0x3E5ED0]
- [0x3E5F30, bin] # peach_star_beam gfx
- name: effect_chapter_change
dir: effects

View File

@ -44,6 +44,21 @@ fx_sun_undeclared = fx_sun;
D_E007EC2F = 0xE007EC2F;
// effect_peach_star_beam
D_09004FE8 = 0x09004FE8;
D_09005090 = 0x09005090;
D_090050F0 = 0x090050F0;
D_09005168 = 0x09005168;
D_090051E0 = 0x090051E0;
D_09005258 = 0x09005258;
D_090052D0 = 0x090052D0;
D_09005348 = 0x09005348;
D_090053C0 = 0x090053C0;
D_09005438 = 0x09005438;
D_090054B0 = 0x090054B0;
D_09005570 = 0x09005570;
D_09005590 = 0x09005590;
// effect_landing_dust effect_walking_dust
D_09002780 = 0x09002780;
D_09002868 = 0x09002868;