diff --git a/include/common_structs.h b/include/common_structs.h index 8d3d1b5d1c..05ed26a715 100644 --- a/include/common_structs.h +++ b/include/common_structs.h @@ -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; diff --git a/include/effects.h b/include/effects.h index 92565e1609..8ba05d24c5 100644 --- a/include/effects.h +++ b/include/effects.h @@ -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]; diff --git a/include/effects_internal.h b/include/effects_internal.h index 02a3ceda52..0f58e02005 100644 --- a/include/effects_internal.h +++ b/include/effects_internal.h @@ -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); diff --git a/include/enums.h b/include/enums.h index bd00464589..bd6431d40b 100644 --- a/include/enums.h +++ b/include/enums.h @@ -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, }; diff --git a/include/variables.h b/include/variables.h index 074ec530ec..8ea3513fc1 100644 --- a/include/variables.h +++ b/include/variables.h @@ -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; diff --git a/src/182B30.c b/src/182B30.c index 4b5b716979..cfc6bf41ce 100644 --- a/src/182B30.c +++ b/src/182B30.c @@ -48,7 +48,7 @@ void func_8025B5C0(s32 arg0, ActorPart* part, s32 yaw, Matrix4f mtx, s32 arg4, s void func_8025BAA0(s32 arg0, ActorPart* part, s32 yaw, s32 arg3, Matrix4f mtx, s32 arg5); void func_8025C120(s32 arg0, ActorPart* part, s32 yaw, Matrix4f mtx, s32 arg4); s32 func_8025C840(s32 arg0, ActorPart* part, s32 yaw, s32); -s32 func_8025CCC8(s32 arg0, ActorPart* part, s32 yaw, s32); +s32 func_8025CCC8(s32 arg0, ActorPart* part, s32 yaw, s32); void func_8026709C(ActorPart* part); s32 func_80254250(ActorPart* part) { @@ -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) { @@ -750,9 +740,9 @@ void func_802571F0(s32 flipYaw, Actor* actor) { actorPosY = actor->currentPos.y - actor->headOffset.y; } actorPosZ = actor->currentPos.z + actor->headOffset.z - 5.0f; - + if (!(actor->flags & ACTOR_FLAG_HP_OFFSET_BELOW)) { - guTranslateF(mtxPivotOn, + guTranslateF(mtxPivotOn, -actor->rotationPivotOffset.x * actor->scalingFactor, -actor->rotationPivotOffset.y * actor->scalingFactor, -actor->rotationPivotOffset.z * actor->scalingFactor); @@ -770,18 +760,18 @@ void func_802571F0(s32 flipYaw, Actor* actor) { -actor->rotationPivotOffset.y * actor->scalingFactor, actor->rotationPivotOffset.z * actor->scalingFactor); } - + guRotateF(mtxRotX, actor->rotation.x, 1.0f, 0.0f, 0.0f); guRotateF(mtxRotY, actor->rotation.y, 0.0f, 1.0f, 0.0f); guRotateF(mtxRotZ, actor->rotation.z, 0.0f, 0.0f, 1.0f); guMtxCatF(mtxRotY, mtxRotX, mtxTemp); guMtxCatF(mtxTemp, mtxRotZ, mtxRotation); - - guScaleF(mtxScale, + + guScaleF(mtxScale, actor->scale.x * SPRITE_WORLD_SCALE_D * actor->scalingFactor, actor->scale.y * SPRITE_WORLD_SCALE_D * actor->scalingFactor, actor->scale.z * SPRITE_WORLD_SCALE_D); - + guMtxCatF(mtxPivotOn, mtxScale, mtxTemp); guMtxCatF(mtxTemp, mtxRotation, mtxTransform); guMtxCatF(mtxTransform, mtxPivotOff, mtxActor); @@ -813,7 +803,7 @@ void func_802571F0(s32 flipYaw, Actor* actor) { if (part->flags & ACTOR_PART_FLAG_INVISIBLE) { part = part->nextPart; continue; - } + } if (part->idleAnimations == NULL) { part = part->nextPart; continue; @@ -842,7 +832,7 @@ void func_802571F0(s32 flipYaw, Actor* actor) { partPosX + part->unkOffset[0], partPosY + part->unkOffset[1], partPosZ - 1.0f); - + guRotateF(mtxRotX, part->rotation.x, 1.0f, 0.0f, 0.0f); guRotateF(mtxRotY, part->rotation.y, 0.0f, 1.0f, 0.0f); guRotateF(mtxRotZ, part->rotation.z, 0.0f, 0.0f, 1.0f); @@ -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) { @@ -957,18 +947,18 @@ void func_80258E14(void* arg0) { dy += part->unkOffset[1]; dz = player->currentPos.z + player->headOffset.z - 5.0f; part->yaw = playerYaw; - + guTranslateF(mtxTranslate, dx, dy, dz - 1.0f); - + guTranslateF(mtxPivotOn, -player->rotationPivotOffset.x * player->scalingFactor, -player->rotationPivotOffset.y * player->scalingFactor, -player->rotationPivotOffset.z * player->scalingFactor); - guTranslateF(mtxPivotOff, + guTranslateF(mtxPivotOff, player->rotationPivotOffset.x * player->scalingFactor, player->rotationPivotOffset.y * player->scalingFactor, player->rotationPivotOffset.z * player->scalingFactor); - + guRotateF(mtxRotX, player->rotation.x, 1.0f, 0.0f, 0.0f); guRotateF(mtxRotY, player->rotation.y, 0.0f, 1.0f, 0.0f); guRotateF(mtxRotZ, player->rotation.z, 0.0f, 0.0f, 1.0f); @@ -979,13 +969,13 @@ void func_80258E14(void* arg0) { player->scale.y * SPRITE_WORLD_SCALE_D * player->scalingFactor * part->verticalStretch, player->scale.z * SPRITE_WORLD_SCALE_D); mtx_mirror_y(mtxMirror); - + guMtxCatF(mtxScale, mtxPivotOn, mtxTemp); guMtxCatF(mtxTemp, mtxRotation, mtxTemp); guMtxCatF(mtxTemp, mtxPivotOff, mtxTemp); guMtxCatF(mtxTemp, mtxTranslate, mtxTransform); guMtxCatF(mtxTransform, mtxMirror, mtxTransform); - + func_8025C840(0, part, clamp_angle(playerYaw + 180.0f), 1); func_8025CCC8(0, part, clamp_angle(playerYaw + 180.0f), 1); func_802591EC(0, part, clamp_angle(playerYaw + 180.0f), mtxTransform, 1); @@ -2127,7 +2117,7 @@ void func_8025C918(s32 arg0, ActorPart* part, s32 yaw, s32 arg3) { s32 color; s32 i; s32 baseAngle; - + if (decor->unk_751 != 0) { decor->unk_752 = -2; decor->unk75A = 0; @@ -2139,20 +2129,20 @@ void func_8025C918(s32 arg0, ActorPart* part, s32 yaw, s32 arg3) { func_802DE894(part->unk_84, 0x11, 0x14, 0, 0, 0xFF, 0); } } - + decor->unk75C += 7; baseAngle = decor->unk75C; - + if (decor->unk75C >= 360) { decor->unk75C = baseAngle - ((baseAngle / 360) * 360); } - + for (i = 0; i < ARRAY_COUNT(rbuf); i++) { rbuf[i] = (cosine(decor->unk75C + (25 * i)) + 1.0) * 112.0; gbuf[i] = (cosine(decor->unk75C + (25 * i) + 45) + 1.0) * 112.0; bbuf[i] = (cosine(decor->unk75C + (25 * i) + 90) + 1.0) * 112.0; } - + alpha = 255; if (part->opacity < 255) { alpha = part->opacity; @@ -2160,7 +2150,7 @@ void func_8025C918(s32 arg0, ActorPart* part, s32 yaw, s32 arg3) { if (part->flags & 0x100) { alpha = (alpha * 120) / 255; } - + for (i = 0; i < ARRAY_COUNT(rbuf); i++) { color = (rbuf[i] << 0x18) | (gbuf[i] << 0x10) | (bbuf[i] << 8) | alpha; if (arg0 == 0) { @@ -2169,7 +2159,7 @@ void func_8025C918(s32 arg0, ActorPart* part, s32 yaw, s32 arg3) { func_802DE894(part->unk_84, 0xC, i, color, 0, 0xFF, 0); } } - + if (arg3 == 0) { decor->unk75A -= 1; } @@ -2200,7 +2190,7 @@ void func_8025CD28(s32 arg0, ActorPart* part, s32 yaw, s32 arg3) { void func_8025CD40(s32 arg0, ActorPart* part, s32 yaw, s32 arg3) { DecorationTable* decor = part->decorationTable; - + if (decor->unk_765 != 0) { switch (func_80254250(part)) { case 0: @@ -2220,7 +2210,7 @@ void func_8025CD40(s32 arg0, ActorPart* part, s32 yaw, s32 arg3) { decor->unk_768 = 0; decor->unk_765 = 0; } - + if (decor->unk_766 == 3) { decor->unk_768 = 0; func_8026709C(part); diff --git a/src/19FAF0.c b/src/19FAF0.c index 0cfbc4bf78..591c64e683 100644 --- a/src/19FAF0.c +++ b/src/19FAF0.c @@ -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); diff --git a/src/415D90.c b/src/415D90.c index de0f00a4d3..964c53f156 100644 --- a/src/415D90.c +++ b/src/415D90.c @@ -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 diff --git a/src/80850_len_3060.c b/src/80850_len_3060.c index f7761e95a7..b75d1b1cce 100644 --- a/src/80850_len_3060.c +++ b/src/80850_len_3060.c @@ -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); diff --git a/src/B0E0.c b/src/B0E0.c index e69e73f73a..7c1fa10101 100644 --- a/src/B0E0.c +++ b/src/B0E0.c @@ -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; diff --git a/src/C50A0.c b/src/C50A0.c index fc6513da30..42b3757261 100644 --- a/src/C50A0.c +++ b/src/C50A0.c @@ -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) { diff --git a/src/ED46D0.c b/src/ED46D0.c index aa21555dd2..f5ed00b39a 100644 --- a/src/ED46D0.c +++ b/src/ED46D0.c @@ -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 diff --git a/src/effects/peach_star_beam.c b/src/effects/peach_star_beam.c index dd224b20ca..c122494595 100644 --- a/src/effects/peach_star_beam.c +++ b/src/effects/peach_star_beam.c @@ -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); + } + } + } +} diff --git a/ver/us/asm/data/effects/3E5ED0.data.s b/ver/us/asm/data/effects/3E5ED0.data.s deleted file mode 100644 index c91fb347a4..0000000000 --- a/ver/us/asm/data/effects/3E5ED0.data.s +++ /dev/null @@ -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 diff --git a/ver/us/asm/nonmatchings/19FAF0/CancelablePlayerRunToGoal.s b/ver/us/asm/nonmatchings/19FAF0/CancelablePlayerRunToGoal.s deleted file mode 100644 index d2c5e272ad..0000000000 --- a/ver/us/asm/nonmatchings/19FAF0/CancelablePlayerRunToGoal.s +++ /dev/null @@ -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 diff --git a/ver/us/asm/nonmatchings/19FAF0/PlayerRunToGoal.s b/ver/us/asm/nonmatchings/19FAF0/PlayerRunToGoal.s deleted file mode 100644 index 590ffd171d..0000000000 --- a/ver/us/asm/nonmatchings/19FAF0/PlayerRunToGoal.s +++ /dev/null @@ -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 diff --git a/ver/us/asm/nonmatchings/C50A0/update_item_entity_collectable.s b/ver/us/asm/nonmatchings/C50A0/update_item_entity_collectable.s deleted file mode 100644 index e91661baa1..0000000000 --- a/ver/us/asm/nonmatchings/C50A0/update_item_entity_collectable.s +++ /dev/null @@ -1,1340 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -.section .rodata - -dlabel D_80150E18 -.double 0.6 - -.section .text - -glabel update_item_entity_collectable -/* CA950 80134250 3C028015 */ lui $v0, %hi(isPickingUpItem) -/* CA954 80134254 844265A4 */ lh $v0, %lo(isPickingUpItem)($v0) -/* CA958 80134258 27BDFFA0 */ addiu $sp, $sp, -0x60 -/* CA95C 8013425C AFB20038 */ sw $s2, 0x38($sp) -/* CA960 80134260 AFB40040 */ sw $s4, 0x40($sp) -/* CA964 80134264 3C148011 */ lui $s4, %hi(gPlayerStatus) -/* CA968 80134268 2694EFC8 */ addiu $s4, $s4, %lo(gPlayerStatus) -/* CA96C 8013426C AFB3003C */ sw $s3, 0x3c($sp) -/* CA970 80134270 3C138011 */ lui $s3, %hi(gPlayerData) -/* CA974 80134274 2673F290 */ addiu $s3, $s3, %lo(gPlayerData) -/* CA978 80134278 AFBF0044 */ sw $ra, 0x44($sp) -/* CA97C 8013427C AFB10034 */ sw $s1, 0x34($sp) -/* CA980 80134280 AFB00030 */ sw $s0, 0x30($sp) -/* CA984 80134284 F7B80058 */ sdc1 $f24, 0x58($sp) -/* CA988 80134288 F7B60050 */ sdc1 $f22, 0x50($sp) -/* CA98C 8013428C F7B40048 */ sdc1 $f20, 0x48($sp) -/* CA990 80134290 144004B7 */ bnez $v0, .L80135570 -/* CA994 80134294 0080902D */ daddu $s2, $a0, $zero -/* CA998 80134298 9242001C */ lbu $v0, 0x1c($s2) -/* CA99C 8013429C 10400003 */ beqz $v0, .L801342AC -/* CA9A0 801342A0 2442FFFF */ addiu $v0, $v0, -1 -/* CA9A4 801342A4 0804D55C */ j .L80135570 -/* CA9A8 801342A8 A242001C */ sb $v0, 0x1c($s2) -.L801342AC: -/* CA9AC 801342AC 24050017 */ addiu $a1, $zero, 0x17 -/* CA9B0 801342B0 8243001B */ lb $v1, 0x1b($s2) -/* CA9B4 801342B4 8244001A */ lb $a0, 0x1a($s2) -/* CA9B8 801342B8 00651026 */ xor $v0, $v1, $a1 -/* CA9BC 801342BC 10800006 */ beqz $a0, .L801342D8 -/* CA9C0 801342C0 2C500001 */ sltiu $s0, $v0, 1 -/* CA9C4 801342C4 24020001 */ addiu $v0, $zero, 1 -/* CA9C8 801342C8 10820203 */ beq $a0, $v0, .L80134AD8 -/* CA9CC 801342CC 24020014 */ addiu $v0, $zero, 0x14 -/* CA9D0 801342D0 0804D44D */ j .L80135134 -/* CA9D4 801342D4 00000000 */ nop -.L801342D8: -/* CA9D8 801342D8 0C04C3EB */ jal item_entity_enable_shadow -/* CA9DC 801342DC 0240202D */ daddu $a0, $s2, $zero -/* CA9E0 801342E0 0C00AB39 */ jal heap_malloc -/* CA9E4 801342E4 24040024 */ addiu $a0, $zero, 0x24 -/* CA9E8 801342E8 0040882D */ daddu $s1, $v0, $zero -/* CA9EC 801342EC 16200003 */ bnez $s1, .L801342FC -/* CA9F0 801342F0 AE510014 */ sw $s1, 0x14($s2) -.L801342F4: -/* CA9F4 801342F4 0804D0BD */ j .L801342F4 -/* CA9F8 801342F8 00000000 */ nop -.L801342FC: -/* CA9FC 801342FC 8E430000 */ lw $v1, ($s2) -/* CAA00 80134300 3C020100 */ lui $v0, 0x100 -/* CAA04 80134304 00621024 */ and $v0, $v1, $v0 -/* CAA08 80134308 10400005 */ beqz $v0, .L80134320 -/* CAA0C 8013430C 3C020001 */ lui $v0, 1 -/* CAA10 80134310 3C014180 */ lui $at, 0x4180 -/* CAA14 80134314 44810000 */ mtc1 $at, $f0 -/* CAA18 80134318 0804D0D1 */ j .L80134344 -/* CAA1C 8013431C 00000000 */ nop -.L80134320: -/* CAA20 80134320 00621024 */ and $v0, $v1, $v0 -/* CAA24 80134324 14400005 */ bnez $v0, .L8013433C -/* CAA28 80134328 00000000 */ nop -/* CAA2C 8013432C 3C014140 */ lui $at, 0x4140 -/* CAA30 80134330 44810000 */ mtc1 $at, $f0 -/* CAA34 80134334 0804D0D1 */ j .L80134344 -/* CAA38 80134338 00000000 */ nop -.L8013433C: -/* CAA3C 8013433C 3C014160 */ lui $at, 0x4160 -/* CAA40 80134340 44810000 */ mtc1 $at, $f0 -.L80134344: -/* CAA44 80134344 3C014000 */ lui $at, 0x4000 -/* CAA48 80134348 44811000 */ mtc1 $at, $f2 -/* CAA4C 8013434C E6200000 */ swc1 $f0, ($s1) -/* CAA50 80134350 E6220004 */ swc1 $f2, 4($s1) -/* CAA54 80134354 3C0141C0 */ lui $at, 0x41c0 -/* CAA58 80134358 44810000 */ mtc1 $at, $f0 -/* CAA5C 8013435C 00000000 */ nop -/* CAA60 80134360 E6200008 */ swc1 $f0, 8($s1) -/* CAA64 80134364 E620000C */ swc1 $f0, 0xc($s1) -/* CAA68 80134368 8642001E */ lh $v0, 0x1e($s2) -/* CAA6C 8013436C 04410164 */ bgez $v0, .L80134900 -/* CAA70 80134370 00000000 */ nop -/* CAA74 80134374 96430018 */ lhu $v1, 0x18($s2) -/* CAA78 80134378 2462FFF0 */ addiu $v0, $v1, -0x10 -/* CAA7C 8013437C 2C4200CB */ sltiu $v0, $v0, 0xcb -/* CAA80 80134380 10400036 */ beqz $v0, .L8013445C -/* CAA84 80134384 00031400 */ sll $v0, $v1, 0x10 -/* CAA88 80134388 0C00A67F */ jal rand_int -/* CAA8C 8013438C 24042710 */ addiu $a0, $zero, 0x2710 -/* CAA90 80134390 28421388 */ slti $v0, $v0, 0x1388 -/* CAA94 80134394 10400011 */ beqz $v0, .L801343DC -/* CAA98 80134398 00000000 */ nop -/* CAA9C 8013439C 0C00A67F */ jal rand_int -/* CAAA0 801343A0 2404001E */ addiu $a0, $zero, 0x1e -/* CAAA4 801343A4 00101880 */ sll $v1, $s0, 2 -/* CAAA8 801343A8 00701821 */ addu $v1, $v1, $s0 -/* CAAAC 801343AC 00031880 */ sll $v1, $v1, 2 -/* CAAB0 801343B0 00701823 */ subu $v1, $v1, $s0 -/* CAAB4 801343B4 000320C0 */ sll $a0, $v1, 3 -/* CAAB8 801343B8 00641821 */ addu $v1, $v1, $a0 -/* CAABC 801343BC 000318C0 */ sll $v1, $v1, 3 -/* CAAC0 801343C0 3C01800B */ lui $at, %hi(gCameras+0x6C) -/* CAAC4 801343C4 00230821 */ addu $at, $at, $v1 -/* CAAC8 801343C8 C42C1DEC */ lwc1 $f12, %lo(gCameras+0x6C)($at) -/* CAACC 801343CC 3C0142D2 */ lui $at, 0x42d2 -/* CAAD0 801343D0 44810000 */ mtc1 $at, $f0 -/* CAAD4 801343D4 0804D107 */ j .L8013441C -/* CAAD8 801343D8 46006300 */ add.s $f12, $f12, $f0 -.L801343DC: -/* CAADC 801343DC 0C00A67F */ jal rand_int -/* CAAE0 801343E0 2404001E */ addiu $a0, $zero, 0x1e -/* CAAE4 801343E4 00101880 */ sll $v1, $s0, 2 -/* CAAE8 801343E8 00701821 */ addu $v1, $v1, $s0 -/* CAAEC 801343EC 00031880 */ sll $v1, $v1, 2 -/* CAAF0 801343F0 00701823 */ subu $v1, $v1, $s0 -/* CAAF4 801343F4 000320C0 */ sll $a0, $v1, 3 -/* CAAF8 801343F8 00641821 */ addu $v1, $v1, $a0 -/* CAAFC 801343FC 000318C0 */ sll $v1, $v1, 3 -/* CAB00 80134400 3C01800B */ lui $at, %hi(gCameras+0x6C) -/* CAB04 80134404 00230821 */ addu $at, $at, $v1 -/* CAB08 80134408 C42C1DEC */ lwc1 $f12, %lo(gCameras+0x6C)($at) -/* CAB0C 8013440C 3C0142D2 */ lui $at, 0x42d2 -/* CAB10 80134410 44810000 */ mtc1 $at, $f0 -/* CAB14 80134414 00000000 */ nop -/* CAB18 80134418 46006301 */ sub.s $f12, $f12, $f0 -.L8013441C: -/* CAB1C 8013441C 44820000 */ mtc1 $v0, $f0 -/* CAB20 80134420 00000000 */ nop -/* CAB24 80134424 46800020 */ cvt.s.w $f0, $f0 -/* CAB28 80134428 46006300 */ add.s $f12, $f12, $f0 -/* CAB2C 8013442C 3C014170 */ lui $at, 0x4170 -/* CAB30 80134430 44810000 */ mtc1 $at, $f0 -/* CAB34 80134434 0C00A6C9 */ jal clamp_angle -/* CAB38 80134438 46006301 */ sub.s $f12, $f12, $f0 -/* CAB3C 8013443C E6200018 */ swc1 $f0, 0x18($s1) -/* CAB40 80134440 C6200000 */ lwc1 $f0, ($s1) -/* CAB44 80134444 3C014080 */ lui $at, 0x4080 -/* CAB48 80134448 44811000 */ mtc1 $at, $f2 -/* CAB4C 8013444C 00000000 */ nop -/* CAB50 80134450 46020000 */ add.s $f0, $f0, $f2 -/* CAB54 80134454 0804D20B */ j .L8013482C -/* CAB58 80134458 E6200000 */ swc1 $f0, ($s1) -.L8013445C: -/* CAB5C 8013445C 00021C03 */ sra $v1, $v0, 0x10 -/* CAB60 80134460 24020158 */ addiu $v0, $zero, 0x158 -/* CAB64 80134464 106200D6 */ beq $v1, $v0, .L801347C0 -/* CAB68 80134468 28620159 */ slti $v0, $v1, 0x159 -/* CAB6C 8013446C 10400009 */ beqz $v0, .L80134494 -/* CAB70 80134470 24020156 */ addiu $v0, $zero, 0x156 -/* CAB74 80134474 106200D2 */ beq $v1, $v0, .L801347C0 -/* CAB78 80134478 28620157 */ slti $v0, $v1, 0x157 -/* CAB7C 8013447C 10400029 */ beqz $v0, .L80134524 -/* CAB80 80134480 24020010 */ addiu $v0, $zero, 0x10 -/* CAB84 80134484 1062003C */ beq $v1, $v0, .L80134578 -/* CAB88 80134488 00000000 */ nop -/* CAB8C 8013448C 0804D20B */ j .L8013482C -/* CAB90 80134490 AE200018 */ sw $zero, 0x18($s1) -.L80134494: -/* CAB94 80134494 2402015A */ addiu $v0, $zero, 0x15a -/* CAB98 80134498 106200C9 */ beq $v1, $v0, .L801347C0 -/* CAB9C 8013449C 0062102A */ slt $v0, $v1, $v0 -/* CABA0 801344A0 1440004A */ bnez $v0, .L801345CC -/* CABA4 801344A4 24020017 */ addiu $v0, $zero, 0x17 -/* CABA8 801344A8 2402015B */ addiu $v0, $zero, 0x15b -/* CABAC 801344AC 10620005 */ beq $v1, $v0, .L801344C4 -/* CABB0 801344B0 2402015C */ addiu $v0, $zero, 0x15c -/* CABB4 801344B4 1062008D */ beq $v1, $v0, .L801346EC -/* CABB8 801344B8 00000000 */ nop -/* CABBC 801344BC 0804D20B */ j .L8013482C -/* CABC0 801344C0 AE200018 */ sw $zero, 0x18($s1) -.L801344C4: -/* CABC4 801344C4 0C00A67F */ jal rand_int -/* CABC8 801344C8 24040078 */ addiu $a0, $zero, 0x78 -/* CABCC 801344CC 00101880 */ sll $v1, $s0, 2 -/* CABD0 801344D0 00701821 */ addu $v1, $v1, $s0 -/* CABD4 801344D4 00031880 */ sll $v1, $v1, 2 -/* CABD8 801344D8 00701823 */ subu $v1, $v1, $s0 -/* CABDC 801344DC 000320C0 */ sll $a0, $v1, 3 -/* CABE0 801344E0 00641821 */ addu $v1, $v1, $a0 -/* CABE4 801344E4 000318C0 */ sll $v1, $v1, 3 -/* CABE8 801344E8 3C01800B */ lui $at, %hi(gCameras+0x6C) -/* CABEC 801344EC 00230821 */ addu $at, $at, $v1 -/* CABF0 801344F0 C42C1DEC */ lwc1 $f12, %lo(gCameras+0x6C)($at) -/* CABF4 801344F4 3C0142B4 */ lui $at, 0x42b4 -/* CABF8 801344F8 44810000 */ mtc1 $at, $f0 -/* CABFC 801344FC 00000000 */ nop -/* CAC00 80134500 46006301 */ sub.s $f12, $f12, $f0 -/* CAC04 80134504 44820000 */ mtc1 $v0, $f0 -/* CAC08 80134508 00000000 */ nop -/* CAC0C 8013450C 46800020 */ cvt.s.w $f0, $f0 -/* CAC10 80134510 46006300 */ add.s $f12, $f12, $f0 -/* CAC14 80134514 3C014270 */ lui $at, 0x4270 -/* CAC18 80134518 44810000 */ mtc1 $at, $f0 -/* CAC1C 8013451C 0804D208 */ j .L80134820 -/* CAC20 80134520 46006300 */ add.s $f12, $f12, $f0 -.L80134524: -/* CAC24 80134524 0C00A67F */ jal rand_int -/* CAC28 80134528 24042710 */ addiu $a0, $zero, 0x2710 -/* CAC2C 8013452C 28421388 */ slti $v0, $v0, 0x1388 -/* CAC30 80134530 144000A3 */ bnez $v0, .L801347C0 -/* CAC34 80134534 00000000 */ nop -/* CAC38 80134538 0C00A67F */ jal rand_int -/* CAC3C 8013453C 24040078 */ addiu $a0, $zero, 0x78 -/* CAC40 80134540 00101880 */ sll $v1, $s0, 2 -/* CAC44 80134544 00701821 */ addu $v1, $v1, $s0 -/* CAC48 80134548 00031880 */ sll $v1, $v1, 2 -/* CAC4C 8013454C 00701823 */ subu $v1, $v1, $s0 -/* CAC50 80134550 000320C0 */ sll $a0, $v1, 3 -/* CAC54 80134554 00641821 */ addu $v1, $v1, $a0 -/* CAC58 80134558 000318C0 */ sll $v1, $v1, 3 -/* CAC5C 8013455C 3C01800B */ lui $at, %hi(gCameras+0x6C) -/* CAC60 80134560 00230821 */ addu $at, $at, $v1 -/* CAC64 80134564 C42C1DEC */ lwc1 $f12, %lo(gCameras+0x6C)($at) -/* CAC68 80134568 3C0142B4 */ lui $at, 0x42b4 -/* CAC6C 8013456C 44810000 */ mtc1 $at, $f0 -/* CAC70 80134570 0804D200 */ j .L80134800 -/* CAC74 80134574 46006301 */ sub.s $f12, $f12, $f0 -.L80134578: -/* CAC78 80134578 0C00A67F */ jal rand_int -/* CAC7C 8013457C 24042710 */ addiu $a0, $zero, 0x2710 -/* CAC80 80134580 28421388 */ slti $v0, $v0, 0x1388 -/* CAC84 80134584 1440008E */ bnez $v0, .L801347C0 -/* CAC88 80134588 00000000 */ nop -/* CAC8C 8013458C 0C00A67F */ jal rand_int -/* CAC90 80134590 24040078 */ addiu $a0, $zero, 0x78 -/* CAC94 80134594 00101880 */ sll $v1, $s0, 2 -/* CAC98 80134598 00701821 */ addu $v1, $v1, $s0 -/* CAC9C 8013459C 00031880 */ sll $v1, $v1, 2 -/* CACA0 801345A0 00701823 */ subu $v1, $v1, $s0 -/* CACA4 801345A4 000320C0 */ sll $a0, $v1, 3 -/* CACA8 801345A8 00641821 */ addu $v1, $v1, $a0 -/* CACAC 801345AC 000318C0 */ sll $v1, $v1, 3 -/* CACB0 801345B0 3C01800B */ lui $at, %hi(gCameras+0x6C) -/* CACB4 801345B4 00230821 */ addu $at, $at, $v1 -/* CACB8 801345B8 C42C1DEC */ lwc1 $f12, %lo(gCameras+0x6C)($at) -/* CACBC 801345BC 3C0142B4 */ lui $at, 0x42b4 -/* CACC0 801345C0 44810000 */ mtc1 $at, $f0 -/* CACC4 801345C4 0804D200 */ j .L80134800 -/* CACC8 801345C8 46006301 */ sub.s $f12, $f12, $f0 -.L801345CC: -/* CACCC 801345CC 8243001B */ lb $v1, 0x1b($s2) -/* CACD0 801345D0 10620011 */ beq $v1, $v0, .L80134618 -/* CACD4 801345D4 00000000 */ nop -/* CACD8 801345D8 0C00A67F */ jal rand_int -/* CACDC 801345DC 24040078 */ addiu $a0, $zero, 0x78 -/* CACE0 801345E0 00101880 */ sll $v1, $s0, 2 -/* CACE4 801345E4 00701821 */ addu $v1, $v1, $s0 -/* CACE8 801345E8 00031880 */ sll $v1, $v1, 2 -/* CACEC 801345EC 00701823 */ subu $v1, $v1, $s0 -/* CACF0 801345F0 000320C0 */ sll $a0, $v1, 3 -/* CACF4 801345F4 00641821 */ addu $v1, $v1, $a0 -/* CACF8 801345F8 000318C0 */ sll $v1, $v1, 3 -/* CACFC 801345FC 3C01800B */ lui $at, %hi(gCameras+0x6C) -/* CAD00 80134600 00230821 */ addu $at, $at, $v1 -/* CAD04 80134604 C42C1DEC */ lwc1 $f12, %lo(gCameras+0x6C)($at) -/* CAD08 80134608 3C0142B4 */ lui $at, 0x42b4 -/* CAD0C 8013460C 44810000 */ mtc1 $at, $f0 -/* CAD10 80134610 0804D200 */ j .L80134800 -/* CAD14 80134614 46006301 */ sub.s $f12, $f12, $f0 -.L80134618: -/* CAD18 80134618 0C00A67F */ jal rand_int -/* CAD1C 8013461C 24042710 */ addiu $a0, $zero, 0x2710 -/* CAD20 80134620 28421388 */ slti $v0, $v0, 0x1388 -/* CAD24 80134624 10400019 */ beqz $v0, .L8013468C -/* CAD28 80134628 00000000 */ nop -/* CAD2C 8013462C 0C00A67F */ jal rand_int -/* CAD30 80134630 2404003C */ addiu $a0, $zero, 0x3c -/* CAD34 80134634 00101880 */ sll $v1, $s0, 2 -/* CAD38 80134638 00701821 */ addu $v1, $v1, $s0 -/* CAD3C 8013463C 00031880 */ sll $v1, $v1, 2 -/* CAD40 80134640 00701823 */ subu $v1, $v1, $s0 -/* CAD44 80134644 000320C0 */ sll $a0, $v1, 3 -/* CAD48 80134648 00641821 */ addu $v1, $v1, $a0 -/* CAD4C 8013464C 000318C0 */ sll $v1, $v1, 3 -/* CAD50 80134650 3C01800B */ lui $at, %hi(gCameras+0x6C) -/* CAD54 80134654 00230821 */ addu $at, $at, $v1 -/* CAD58 80134658 C42C1DEC */ lwc1 $f12, %lo(gCameras+0x6C)($at) -/* CAD5C 8013465C 3C0142B4 */ lui $at, 0x42b4 -/* CAD60 80134660 44810000 */ mtc1 $at, $f0 -/* CAD64 80134664 00000000 */ nop -/* CAD68 80134668 46006300 */ add.s $f12, $f12, $f0 -/* CAD6C 8013466C 44820000 */ mtc1 $v0, $f0 -/* CAD70 80134670 00000000 */ nop -/* CAD74 80134674 46800020 */ cvt.s.w $f0, $f0 -/* CAD78 80134678 46006300 */ add.s $f12, $f12, $f0 -/* CAD7C 8013467C 3C0141F0 */ lui $at, 0x41f0 -/* CAD80 80134680 44810000 */ mtc1 $at, $f0 -/* CAD84 80134684 0804D208 */ j .L80134820 -/* CAD88 80134688 46006301 */ sub.s $f12, $f12, $f0 -.L8013468C: -/* CAD8C 8013468C 0C00A67F */ jal rand_int -/* CAD90 80134690 2404003C */ addiu $a0, $zero, 0x3c -/* CAD94 80134694 00101880 */ sll $v1, $s0, 2 -/* CAD98 80134698 00701821 */ addu $v1, $v1, $s0 -/* CAD9C 8013469C 00031880 */ sll $v1, $v1, 2 -/* CADA0 801346A0 00701823 */ subu $v1, $v1, $s0 -/* CADA4 801346A4 000320C0 */ sll $a0, $v1, 3 -/* CADA8 801346A8 00641821 */ addu $v1, $v1, $a0 -/* CADAC 801346AC 000318C0 */ sll $v1, $v1, 3 -/* CADB0 801346B0 3C01800B */ lui $at, %hi(gCameras+0x6C) -/* CADB4 801346B4 00230821 */ addu $at, $at, $v1 -/* CADB8 801346B8 C42C1DEC */ lwc1 $f12, %lo(gCameras+0x6C)($at) -/* CADBC 801346BC 3C0142B4 */ lui $at, 0x42b4 -/* CADC0 801346C0 44810000 */ mtc1 $at, $f0 -/* CADC4 801346C4 00000000 */ nop -/* CADC8 801346C8 46006301 */ sub.s $f12, $f12, $f0 -/* CADCC 801346CC 44820000 */ mtc1 $v0, $f0 -/* CADD0 801346D0 00000000 */ nop -/* CADD4 801346D4 46800020 */ cvt.s.w $f0, $f0 -/* CADD8 801346D8 46006300 */ add.s $f12, $f12, $f0 -/* CADDC 801346DC 3C0141F0 */ lui $at, 0x41f0 -/* CADE0 801346E0 44810000 */ mtc1 $at, $f0 -/* CADE4 801346E4 0804D208 */ j .L80134820 -/* CADE8 801346E8 46006301 */ sub.s $f12, $f12, $f0 -.L801346EC: -/* CADEC 801346EC 0C00A67F */ jal rand_int -/* CADF0 801346F0 24042710 */ addiu $a0, $zero, 0x2710 -/* CADF4 801346F4 28421388 */ slti $v0, $v0, 0x1388 -/* CADF8 801346F8 10400019 */ beqz $v0, .L80134760 -/* CADFC 801346FC 00000000 */ nop -/* CAE00 80134700 0C00A67F */ jal rand_int -/* CAE04 80134704 2404003C */ addiu $a0, $zero, 0x3c -/* CAE08 80134708 00101880 */ sll $v1, $s0, 2 -/* CAE0C 8013470C 00701821 */ addu $v1, $v1, $s0 -/* CAE10 80134710 00031880 */ sll $v1, $v1, 2 -/* CAE14 80134714 00701823 */ subu $v1, $v1, $s0 -/* CAE18 80134718 000320C0 */ sll $a0, $v1, 3 -/* CAE1C 8013471C 00641821 */ addu $v1, $v1, $a0 -/* CAE20 80134720 000318C0 */ sll $v1, $v1, 3 -/* CAE24 80134724 3C01800B */ lui $at, %hi(gCameras+0x6C) -/* CAE28 80134728 00230821 */ addu $at, $at, $v1 -/* CAE2C 8013472C C42C1DEC */ lwc1 $f12, %lo(gCameras+0x6C)($at) -/* CAE30 80134730 3C0142B4 */ lui $at, 0x42b4 -/* CAE34 80134734 44810000 */ mtc1 $at, $f0 -/* CAE38 80134738 00000000 */ nop -/* CAE3C 8013473C 46006300 */ add.s $f12, $f12, $f0 -/* CAE40 80134740 44820000 */ mtc1 $v0, $f0 -/* CAE44 80134744 00000000 */ nop -/* CAE48 80134748 46800020 */ cvt.s.w $f0, $f0 -/* CAE4C 8013474C 46006300 */ add.s $f12, $f12, $f0 -/* CAE50 80134750 3C0141F0 */ lui $at, 0x41f0 -/* CAE54 80134754 44810000 */ mtc1 $at, $f0 -/* CAE58 80134758 0804D208 */ j .L80134820 -/* CAE5C 8013475C 46006301 */ sub.s $f12, $f12, $f0 -.L80134760: -/* CAE60 80134760 0C00A67F */ jal rand_int -/* CAE64 80134764 2404003C */ addiu $a0, $zero, 0x3c -/* CAE68 80134768 00101880 */ sll $v1, $s0, 2 -/* CAE6C 8013476C 00701821 */ addu $v1, $v1, $s0 -/* CAE70 80134770 00031880 */ sll $v1, $v1, 2 -/* CAE74 80134774 00701823 */ subu $v1, $v1, $s0 -/* CAE78 80134778 000320C0 */ sll $a0, $v1, 3 -/* CAE7C 8013477C 00641821 */ addu $v1, $v1, $a0 -/* CAE80 80134780 000318C0 */ sll $v1, $v1, 3 -/* CAE84 80134784 3C01800B */ lui $at, %hi(gCameras+0x6C) -/* CAE88 80134788 00230821 */ addu $at, $at, $v1 -/* CAE8C 8013478C C42C1DEC */ lwc1 $f12, %lo(gCameras+0x6C)($at) -/* CAE90 80134790 3C0142B4 */ lui $at, 0x42b4 -/* CAE94 80134794 44810000 */ mtc1 $at, $f0 -/* CAE98 80134798 00000000 */ nop -/* CAE9C 8013479C 46006301 */ sub.s $f12, $f12, $f0 -/* CAEA0 801347A0 44820000 */ mtc1 $v0, $f0 -/* CAEA4 801347A4 00000000 */ nop -/* CAEA8 801347A8 46800020 */ cvt.s.w $f0, $f0 -/* CAEAC 801347AC 46006300 */ add.s $f12, $f12, $f0 -/* CAEB0 801347B0 3C0141F0 */ lui $at, 0x41f0 -/* CAEB4 801347B4 44810000 */ mtc1 $at, $f0 -/* CAEB8 801347B8 0804D208 */ j .L80134820 -/* CAEBC 801347BC 46006301 */ sub.s $f12, $f12, $f0 -.L801347C0: -/* CAEC0 801347C0 0C00A67F */ jal rand_int -/* CAEC4 801347C4 24040078 */ addiu $a0, $zero, 0x78 -/* CAEC8 801347C8 00101880 */ sll $v1, $s0, 2 -/* CAECC 801347CC 00701821 */ addu $v1, $v1, $s0 -/* CAED0 801347D0 00031880 */ sll $v1, $v1, 2 -/* CAED4 801347D4 00701823 */ subu $v1, $v1, $s0 -/* CAED8 801347D8 000320C0 */ sll $a0, $v1, 3 -/* CAEDC 801347DC 00641821 */ addu $v1, $v1, $a0 -/* CAEE0 801347E0 000318C0 */ sll $v1, $v1, 3 -/* CAEE4 801347E4 3C01800B */ lui $at, %hi(gCameras+0x6C) -/* CAEE8 801347E8 00230821 */ addu $at, $at, $v1 -/* CAEEC 801347EC C42C1DEC */ lwc1 $f12, %lo(gCameras+0x6C)($at) -/* CAEF0 801347F0 3C0142B4 */ lui $at, 0x42b4 -/* CAEF4 801347F4 44810000 */ mtc1 $at, $f0 -/* CAEF8 801347F8 00000000 */ nop -/* CAEFC 801347FC 46006300 */ add.s $f12, $f12, $f0 -.L80134800: -/* CAF00 80134800 44820000 */ mtc1 $v0, $f0 -/* CAF04 80134804 00000000 */ nop -/* CAF08 80134808 46800020 */ cvt.s.w $f0, $f0 -/* CAF0C 8013480C 46006300 */ add.s $f12, $f12, $f0 -/* CAF10 80134810 3C014270 */ lui $at, 0x4270 -/* CAF14 80134814 44810000 */ mtc1 $at, $f0 -/* CAF18 80134818 00000000 */ nop -/* CAF1C 8013481C 46006301 */ sub.s $f12, $f12, $f0 -.L80134820: -/* CAF20 80134820 0C00A6C9 */ jal clamp_angle -/* CAF24 80134824 00000000 */ nop -/* CAF28 80134828 E6200018 */ swc1 $f0, 0x18($s1) -.L8013482C: -/* CAF2C 8013482C 8E420000 */ lw $v0, ($s2) -/* CAF30 80134830 3C030100 */ lui $v1, 0x100 -/* CAF34 80134834 00431024 */ and $v0, $v0, $v1 -/* CAF38 80134838 14400019 */ bnez $v0, .L801348A0 -/* CAF3C 8013483C 00000000 */ nop -/* CAF40 80134840 0C00A67F */ jal rand_int -/* CAF44 80134844 240407D0 */ addiu $a0, $zero, 0x7d0 -/* CAF48 80134848 C6240018 */ lwc1 $f4, 0x18($s1) -/* CAF4C 8013484C 3C0140C9 */ lui $at, 0x40c9 -/* CAF50 80134850 34210FD0 */ ori $at, $at, 0xfd0 -/* CAF54 80134854 44811000 */ mtc1 $at, $f2 -/* CAF58 80134858 3C01447A */ lui $at, 0x447a -/* CAF5C 8013485C 44810000 */ mtc1 $at, $f0 -/* CAF60 80134860 46022102 */ mul.s $f4, $f4, $f2 -/* CAF64 80134864 00000000 */ nop -/* CAF68 80134868 4482C000 */ mtc1 $v0, $f24 -/* CAF6C 8013486C 00000000 */ nop -/* CAF70 80134870 4680C620 */ cvt.s.w $f24, $f24 -/* CAF74 80134874 4600C003 */ div.s $f0, $f24, $f0 -/* CAF78 80134878 3C013FF8 */ lui $at, 0x3ff8 -/* CAF7C 8013487C 44811800 */ mtc1 $at, $f3 -/* CAF80 80134880 44801000 */ mtc1 $zero, $f2 -/* CAF84 80134884 46000021 */ cvt.d.s $f0, $f0 -/* CAF88 80134888 46220000 */ add.d $f0, $f0, $f2 -/* CAF8C 8013488C 3C0143B4 */ lui $at, 0x43b4 -/* CAF90 80134890 44811000 */ mtc1 $at, $f2 -/* CAF94 80134894 46200620 */ cvt.s.d $f24, $f0 -/* CAF98 80134898 0804D272 */ j .L801349C8 -/* CAF9C 8013489C 46022503 */ div.s $f20, $f4, $f2 -.L801348A0: -/* CAFA0 801348A0 0C00A67F */ jal rand_int -/* CAFA4 801348A4 240407D0 */ addiu $a0, $zero, 0x7d0 -/* CAFA8 801348A8 C6240018 */ lwc1 $f4, 0x18($s1) -/* CAFAC 801348AC 3C0140C9 */ lui $at, 0x40c9 -/* CAFB0 801348B0 34210FD0 */ ori $at, $at, 0xfd0 -/* CAFB4 801348B4 44811000 */ mtc1 $at, $f2 -/* CAFB8 801348B8 3C01447A */ lui $at, 0x447a -/* CAFBC 801348BC 44810000 */ mtc1 $at, $f0 -/* CAFC0 801348C0 46022102 */ mul.s $f4, $f4, $f2 -/* CAFC4 801348C4 00000000 */ nop -/* CAFC8 801348C8 4482C000 */ mtc1 $v0, $f24 -/* CAFCC 801348CC 00000000 */ nop -/* CAFD0 801348D0 4680C620 */ cvt.s.w $f24, $f24 -/* CAFD4 801348D4 4600C003 */ div.s $f0, $f24, $f0 -/* CAFD8 801348D8 3C014000 */ lui $at, 0x4000 -/* CAFDC 801348DC 44811800 */ mtc1 $at, $f3 -/* CAFE0 801348E0 44801000 */ mtc1 $zero, $f2 -/* CAFE4 801348E4 46000021 */ cvt.d.s $f0, $f0 -/* CAFE8 801348E8 46220000 */ add.d $f0, $f0, $f2 -/* CAFEC 801348EC 3C0143B4 */ lui $at, 0x43b4 -/* CAFF0 801348F0 44811000 */ mtc1 $at, $f2 -/* CAFF4 801348F4 46200620 */ cvt.s.d $f24, $f0 -/* CAFF8 801348F8 0804D272 */ j .L801349C8 -/* CAFFC 801348FC 46022503 */ div.s $f20, $f4, $f2 -.L80134900: -/* CB000 80134900 44826000 */ mtc1 $v0, $f12 -/* CB004 80134904 00000000 */ nop -/* CB008 80134908 0C00A6C9 */ jal clamp_angle -/* CB00C 8013490C 46806320 */ cvt.s.w $f12, $f12 -/* CB010 80134910 E6200018 */ swc1 $f0, 0x18($s1) -/* CB014 80134914 8E420000 */ lw $v0, ($s2) -/* CB018 80134918 3C034000 */ lui $v1, 0x4000 -/* CB01C 8013491C 00431024 */ and $v0, $v0, $v1 -/* CB020 80134920 1440001B */ bnez $v0, .L80134990 -/* CB024 80134924 3C04B60B */ lui $a0, 0xb60b -/* CB028 80134928 9643001E */ lhu $v1, 0x1e($s2) -/* CB02C 8013492C 348460B7 */ ori $a0, $a0, 0x60b7 -/* CB030 80134930 00031C00 */ sll $v1, $v1, 0x10 -/* CB034 80134934 00031403 */ sra $v0, $v1, 0x10 -/* CB038 80134938 00440018 */ mult $v0, $a0 -/* CB03C 8013493C 3C018015 */ lui $at, %hi(D_80150E18) -/* CB040 80134940 D4220E18 */ ldc1 $f2, %lo(D_80150E18)($at) -/* CB044 80134944 00031FC3 */ sra $v1, $v1, 0x1f -/* CB048 80134948 00004010 */ mfhi $t0 -/* CB04C 8013494C 01021021 */ addu $v0, $t0, $v0 -/* CB050 80134950 00021203 */ sra $v0, $v0, 8 -/* CB054 80134954 00431023 */ subu $v0, $v0, $v1 -/* CB058 80134958 00021400 */ sll $v0, $v0, 0x10 -/* CB05C 8013495C 00021403 */ sra $v0, $v0, 0x10 -/* CB060 80134960 44820000 */ mtc1 $v0, $f0 -/* CB064 80134964 00000000 */ nop -/* CB068 80134968 46800021 */ cvt.d.w $f0, $f0 -/* CB06C 8013496C 46220002 */ mul.d $f0, $f0, $f2 -/* CB070 80134970 00000000 */ nop -/* CB074 80134974 3C013FF8 */ lui $at, 0x3ff8 -/* CB078 80134978 44811800 */ mtc1 $at, $f3 -/* CB07C 8013497C 44801000 */ mtc1 $zero, $f2 -/* CB080 80134980 00000000 */ nop -/* CB084 80134984 46220000 */ add.d $f0, $f0, $f2 -/* CB088 80134988 0804D267 */ j .L8013499C -/* CB08C 8013498C 46200620 */ cvt.s.d $f24, $f0 -.L80134990: -/* CB090 80134990 3C014006 */ lui $at, 0x4006 -/* CB094 80134994 34216666 */ ori $at, $at, 0x6666 -/* CB098 80134998 4481C000 */ mtc1 $at, $f24 -.L8013499C: -/* CB09C 8013499C C6200018 */ lwc1 $f0, 0x18($s1) -/* CB0A0 801349A0 3C0140C9 */ lui $at, 0x40c9 -/* CB0A4 801349A4 34210FD0 */ ori $at, $at, 0xfd0 -/* CB0A8 801349A8 44811000 */ mtc1 $at, $f2 -/* CB0AC 801349AC 00000000 */ nop -/* CB0B0 801349B0 46020002 */ mul.s $f0, $f0, $f2 -/* CB0B4 801349B4 00000000 */ nop -/* CB0B8 801349B8 3C0143B4 */ lui $at, 0x43b4 -/* CB0BC 801349BC 44811000 */ mtc1 $at, $f2 -/* CB0C0 801349C0 00000000 */ nop -/* CB0C4 801349C4 46020503 */ div.s $f20, $f0, $f2 -.L801349C8: -/* CB0C8 801349C8 0C00A85B */ jal sin_rad -/* CB0CC 801349CC 4600A306 */ mov.s $f12, $f20 -/* CB0D0 801349D0 46000586 */ mov.s $f22, $f0 -/* CB0D4 801349D4 0C00A874 */ jal cos_rad -/* CB0D8 801349D8 4600A306 */ mov.s $f12, $f20 -/* CB0DC 801349DC 4616C102 */ mul.s $f4, $f24, $f22 -/* CB0E0 801349E0 00000000 */ nop -/* CB0E4 801349E4 4600C087 */ neg.s $f2, $f24 -/* CB0E8 801349E8 46001082 */ mul.s $f2, $f2, $f0 -/* CB0EC 801349EC 00000000 */ nop -/* CB0F0 801349F0 E6240010 */ swc1 $f4, 0x10($s1) -/* CB0F4 801349F4 E6220014 */ swc1 $f2, 0x14($s1) -/* CB0F8 801349F8 8243001B */ lb $v1, 0x1b($s2) -/* CB0FC 801349FC 24020017 */ addiu $v0, $zero, 0x17 -/* CB100 80134A00 10620004 */ beq $v1, $v0, .L80134A14 -/* CB104 80134A04 240200B4 */ addiu $v0, $zero, 0xb4 -/* CB108 80134A08 AE22001C */ sw $v0, 0x1c($s1) -/* CB10C 80134A0C 0804D294 */ j .L80134A50 -/* CB110 80134A10 AE200020 */ sw $zero, 0x20($s1) -.L80134A14: -/* CB114 80134A14 8E420000 */ lw $v0, ($s2) -/* CB118 80134A18 3C030040 */ lui $v1, 0x40 -/* CB11C 80134A1C 00431024 */ and $v0, $v0, $v1 -/* CB120 80134A20 14400002 */ bnez $v0, .L80134A2C -/* CB124 80134A24 24020014 */ addiu $v0, $zero, 0x14 -/* CB128 80134A28 24020011 */ addiu $v0, $zero, 0x11 -.L80134A2C: -/* CB12C 80134A2C AE22001C */ sw $v0, 0x1c($s1) -/* CB130 80134A30 3C014170 */ lui $at, 0x4170 -/* CB134 80134A34 44810000 */ mtc1 $at, $f0 -/* CB138 80134A38 3C013FCC */ lui $at, 0x3fcc -/* CB13C 80134A3C 3421CCCD */ ori $at, $at, 0xcccd -/* CB140 80134A40 44811000 */ mtc1 $at, $f2 -/* CB144 80134A44 AE200020 */ sw $zero, 0x20($s1) -/* CB148 80134A48 E6200000 */ swc1 $f0, ($s1) -/* CB14C 80134A4C E6220004 */ swc1 $f2, 4($s1) -.L80134A50: -/* CB150 80134A50 8243001B */ lb $v1, 0x1b($s2) -/* CB154 80134A54 24020014 */ addiu $v0, $zero, 0x14 -/* CB158 80134A58 14620008 */ bne $v1, $v0, .L80134A7C -/* CB15C 80134A5C 2402000C */ addiu $v0, $zero, 0xc -/* CB160 80134A60 2402003C */ addiu $v0, $zero, 0x3c -/* CB164 80134A64 AE22001C */ sw $v0, 0x1c($s1) -/* CB168 80134A68 AE200020 */ sw $zero, 0x20($s1) -/* CB16C 80134A6C AE200010 */ sw $zero, 0x10($s1) -/* CB170 80134A70 AE200014 */ sw $zero, 0x14($s1) -/* CB174 80134A74 8243001B */ lb $v1, 0x1b($s2) -/* CB178 80134A78 2402000C */ addiu $v0, $zero, 0xc -.L80134A7C: -/* CB17C 80134A7C 14620005 */ bne $v1, $v0, .L80134A94 -/* CB180 80134A80 24020001 */ addiu $v0, $zero, 1 -/* CB184 80134A84 AE200000 */ sw $zero, ($s1) -/* CB188 80134A88 AE200010 */ sw $zero, 0x10($s1) -/* CB18C 80134A8C AE200014 */ sw $zero, 0x14($s1) -/* CB190 80134A90 AE220020 */ sw $v0, 0x20($s1) -.L80134A94: -/* CB194 80134A94 8243001B */ lb $v1, 0x1b($s2) -/* CB198 80134A98 24020010 */ addiu $v0, $zero, 0x10 -/* CB19C 80134A9C 14620005 */ bne $v1, $v0, .L80134AB4 -/* CB1A0 80134AA0 24020001 */ addiu $v0, $zero, 1 -/* CB1A4 80134AA4 AE200000 */ sw $zero, ($s1) -/* CB1A8 80134AA8 AE200010 */ sw $zero, 0x10($s1) -/* CB1AC 80134AAC AE200014 */ sw $zero, 0x14($s1) -/* CB1B0 80134AB0 AE220020 */ sw $v0, 0x20($s1) -.L80134AB4: -/* CB1B4 80134AB4 8E420000 */ lw $v0, ($s2) -/* CB1B8 80134AB8 30420800 */ andi $v0, $v0, 0x800 -/* CB1BC 80134ABC 1040019C */ beqz $v0, .L80135130 -/* CB1C0 80134AC0 24020001 */ addiu $v0, $zero, 1 -/* CB1C4 80134AC4 86440004 */ lh $a0, 4($s2) -/* CB1C8 80134AC8 0C051514 */ jal set_global_flag -/* CB1CC 80134ACC 00000000 */ nop -/* CB1D0 80134AD0 0804D44C */ j .L80135130 -/* CB1D4 80134AD4 24020001 */ addiu $v0, $zero, 1 -.L80134AD8: -/* CB1D8 80134AD8 8E510014 */ lw $s1, 0x14($s2) -/* CB1DC 80134ADC 1062000A */ beq $v1, $v0, .L80134B08 -/* CB1E0 80134AE0 00000000 */ nop -/* CB1E4 80134AE4 10650008 */ beq $v1, $a1, .L80134B08 -/* CB1E8 80134AE8 00000000 */ nop -/* CB1EC 80134AEC 8E220020 */ lw $v0, 0x20($s1) -/* CB1F0 80134AF0 10400005 */ beqz $v0, .L80134B08 -/* CB1F4 80134AF4 00000000 */ nop -/* CB1F8 80134AF8 0C04CEC3 */ jal test_item_player_collision -/* CB1FC 80134AFC 0240202D */ daddu $a0, $s2, $zero -/* CB200 80134B00 1440018B */ bnez $v0, .L80135130 -/* CB204 80134B04 24020003 */ addiu $v0, $zero, 3 -.L80134B08: -/* CB208 80134B08 8E430000 */ lw $v1, ($s2) -/* CB20C 80134B0C 30620200 */ andi $v0, $v1, 0x200 -/* CB210 80134B10 14400010 */ bnez $v0, .L80134B54 -/* CB214 80134B14 30622000 */ andi $v0, $v1, 0x2000 -/* CB218 80134B18 3C02800A */ lui $v0, %hi(gOverrideFlags) -/* CB21C 80134B1C 8C42A650 */ lw $v0, %lo(gOverrideFlags)($v0) -/* CB220 80134B20 30420300 */ andi $v0, $v0, 0x300 -/* CB224 80134B24 1440000B */ bnez $v0, .L80134B54 -/* CB228 80134B28 30622000 */ andi $v0, $v1, 0x2000 -/* CB22C 80134B2C 3C020020 */ lui $v0, 0x20 -/* CB230 80134B30 00621024 */ and $v0, $v1, $v0 -/* CB234 80134B34 14400007 */ bnez $v0, .L80134B54 -/* CB238 80134B38 30622000 */ andi $v0, $v1, 0x2000 -/* CB23C 80134B3C 8E22001C */ lw $v0, 0x1c($s1) -/* CB240 80134B40 2442FFFF */ addiu $v0, $v0, -1 -/* CB244 80134B44 04400179 */ bltz $v0, .L8013512C -/* CB248 80134B48 AE22001C */ sw $v0, 0x1c($s1) -/* CB24C 80134B4C 8E430000 */ lw $v1, ($s2) -/* CB250 80134B50 30622000 */ andi $v0, $v1, 0x2000 -.L80134B54: -/* CB254 80134B54 1440001F */ bnez $v0, .L80134BD4 -/* CB258 80134B58 3C020020 */ lui $v0, 0x20 -/* CB25C 80134B5C 00621024 */ and $v0, $v1, $v0 -/* CB260 80134B60 1440001C */ bnez $v0, .L80134BD4 -/* CB264 80134B64 00000000 */ nop -/* CB268 80134B68 C6240000 */ lwc1 $f4, ($s1) -/* CB26C 80134B6C C6200004 */ lwc1 $f0, 4($s1) -/* CB270 80134B70 46002101 */ sub.s $f4, $f4, $f0 -/* CB274 80134B74 3C01C030 */ lui $at, 0xc030 -/* CB278 80134B78 44811800 */ mtc1 $at, $f3 -/* CB27C 80134B7C 44801000 */ mtc1 $zero, $f2 -/* CB280 80134B80 46002021 */ cvt.d.s $f0, $f4 -/* CB284 80134B84 4622003C */ c.lt.d $f0, $f2 -/* CB288 80134B88 00000000 */ nop -/* CB28C 80134B8C 45000005 */ bc1f .L80134BA4 -/* CB290 80134B90 E6240000 */ swc1 $f4, ($s1) -/* CB294 80134B94 3C01C180 */ lui $at, 0xc180 -/* CB298 80134B98 44810000 */ mtc1 $at, $f0 -/* CB29C 80134B9C 00000000 */ nop -/* CB2A0 80134BA0 E6200000 */ swc1 $f0, ($s1) -.L80134BA4: -/* CB2A4 80134BA4 C640000C */ lwc1 $f0, 0xc($s2) -/* CB2A8 80134BA8 C6220000 */ lwc1 $f2, ($s1) -/* CB2AC 80134BAC 46020000 */ add.s $f0, $f0, $f2 -/* CB2B0 80134BB0 E640000C */ swc1 $f0, 0xc($s2) -/* CB2B4 80134BB4 C6400008 */ lwc1 $f0, 8($s2) -/* CB2B8 80134BB8 C6220010 */ lwc1 $f2, 0x10($s1) -/* CB2BC 80134BBC 46020000 */ add.s $f0, $f0, $f2 -/* CB2C0 80134BC0 E6400008 */ swc1 $f0, 8($s2) -/* CB2C4 80134BC4 C6400010 */ lwc1 $f0, 0x10($s2) -/* CB2C8 80134BC8 C6220014 */ lwc1 $f2, 0x14($s1) -/* CB2CC 80134BCC 46020000 */ add.s $f0, $f0, $f2 -/* CB2D0 80134BD0 E6400010 */ swc1 $f0, 0x10($s2) -.L80134BD4: -/* CB2D4 80134BD4 8243001B */ lb $v1, 0x1b($s2) -/* CB2D8 80134BD8 24020014 */ addiu $v0, $zero, 0x14 -/* CB2DC 80134BDC 14620008 */ bne $v1, $v0, .L80134C00 -/* CB2E0 80134BE0 00000000 */ nop -/* CB2E4 80134BE4 C6220000 */ lwc1 $f2, ($s1) -/* CB2E8 80134BE8 44800000 */ mtc1 $zero, $f0 -/* CB2EC 80134BEC 00000000 */ nop -/* CB2F0 80134BF0 4600103E */ c.le.s $f2, $f0 -/* CB2F4 80134BF4 00000000 */ nop -/* CB2F8 80134BF8 4501014D */ bc1t .L80135130 -/* CB2FC 80134BFC 24020003 */ addiu $v0, $zero, 3 -.L80134C00: -/* CB300 80134C00 8E420000 */ lw $v0, ($s2) -/* CB304 80134C04 3C033000 */ lui $v1, 0x3000 -/* CB308 80134C08 00431024 */ and $v0, $v0, $v1 -/* CB30C 80134C0C 14400088 */ bnez $v0, .L80134E30 -/* CB310 80134C10 24020014 */ addiu $v0, $zero, 0x14 -/* CB314 80134C14 8243001B */ lb $v1, 0x1b($s2) -/* CB318 80134C18 10620025 */ beq $v1, $v0, .L80134CB0 -/* CB31C 80134C1C 24020017 */ addiu $v0, $zero, 0x17 -/* CB320 80134C20 10620023 */ beq $v1, $v0, .L80134CB0 -/* CB324 80134C24 00000000 */ nop -/* CB328 80134C28 C6220000 */ lwc1 $f2, ($s1) -/* CB32C 80134C2C 44800000 */ mtc1 $zero, $f0 -/* CB330 80134C30 00000000 */ nop -/* CB334 80134C34 4602003C */ c.lt.s $f0, $f2 -/* CB338 80134C38 00000000 */ nop -/* CB33C 80134C3C 4500001C */ bc1f .L80134CB0 -/* CB340 80134C40 27A2002C */ addiu $v0, $sp, 0x2c -/* CB344 80134C44 C6400008 */ lwc1 $f0, 8($s2) -/* CB348 80134C48 C638000C */ lwc1 $f24, 0xc($s1) -/* CB34C 80134C4C E7A00020 */ swc1 $f0, 0x20($sp) -/* CB350 80134C50 C642000C */ lwc1 $f2, 0xc($s2) -/* CB354 80134C54 C6440010 */ lwc1 $f4, 0x10($s2) -/* CB358 80134C58 C6200000 */ lwc1 $f0, ($s1) -/* CB35C 80134C5C 4600C000 */ add.s $f0, $f24, $f0 -/* CB360 80134C60 E7A20024 */ swc1 $f2, 0x24($sp) -/* CB364 80134C64 E7A40028 */ swc1 $f4, 0x28($sp) -/* CB368 80134C68 E7A0002C */ swc1 $f0, 0x2c($sp) -/* CB36C 80134C6C AFA20010 */ sw $v0, 0x10($sp) -/* CB370 80134C70 3C040002 */ lui $a0, 2 -/* CB374 80134C74 27A50020 */ addiu $a1, $sp, 0x20 -/* CB378 80134C78 27A60024 */ addiu $a2, $sp, 0x24 -/* CB37C 80134C7C 0C03739C */ jal npc_raycast_up -/* CB380 80134C80 27A70028 */ addiu $a3, $sp, 0x28 -/* CB384 80134C84 1040000A */ beqz $v0, .L80134CB0 -/* CB388 80134C88 00000000 */ nop -/* CB38C 80134C8C C7A0002C */ lwc1 $f0, 0x2c($sp) -/* CB390 80134C90 4618003C */ c.lt.s $f0, $f24 -/* CB394 80134C94 00000000 */ nop -/* CB398 80134C98 45000005 */ bc1f .L80134CB0 -/* CB39C 80134C9C 00000000 */ nop -/* CB3A0 80134CA0 C7A00024 */ lwc1 $f0, 0x24($sp) -/* CB3A4 80134CA4 46180001 */ sub.s $f0, $f0, $f24 -/* CB3A8 80134CA8 E640000C */ swc1 $f0, 0xc($s2) -/* CB3AC 80134CAC AE200000 */ sw $zero, ($s1) -.L80134CB0: -/* CB3B0 80134CB0 8E420000 */ lw $v0, ($s2) -/* CB3B4 80134CB4 3C033000 */ lui $v1, 0x3000 -/* CB3B8 80134CB8 00431024 */ and $v0, $v0, $v1 -/* CB3BC 80134CBC 1440005C */ bnez $v0, .L80134E30 -/* CB3C0 80134CC0 24020014 */ addiu $v0, $zero, 0x14 -/* CB3C4 80134CC4 8243001B */ lb $v1, 0x1b($s2) -/* CB3C8 80134CC8 10620059 */ beq $v1, $v0, .L80134E30 -/* CB3CC 80134CCC 24020017 */ addiu $v0, $zero, 0x17 -/* CB3D0 80134CD0 10620057 */ beq $v1, $v0, .L80134E30 -/* CB3D4 80134CD4 00000000 */ nop -/* CB3D8 80134CD8 C6200010 */ lwc1 $f0, 0x10($s1) -/* CB3DC 80134CDC 44803000 */ mtc1 $zero, $f6 -/* CB3E0 80134CE0 00000000 */ nop -/* CB3E4 80134CE4 46060032 */ c.eq.s $f0, $f6 -/* CB3E8 80134CE8 00000000 */ nop -/* CB3EC 80134CEC 45000006 */ bc1f .L80134D08 -/* CB3F0 80134CF0 00000000 */ nop -/* CB3F4 80134CF4 C6200014 */ lwc1 $f0, 0x14($s1) -/* CB3F8 80134CF8 46060032 */ c.eq.s $f0, $f6 -/* CB3FC 80134CFC 00000000 */ nop -/* CB400 80134D00 4501004B */ bc1t .L80134E30 -/* CB404 80134D04 00000000 */ nop -.L80134D08: -/* CB408 80134D08 C6400008 */ lwc1 $f0, 8($s2) -/* CB40C 80134D0C C642000C */ lwc1 $f2, 0xc($s2) -/* CB410 80134D10 C6440010 */ lwc1 $f4, 0x10($s2) -/* CB414 80134D14 8E220020 */ lw $v0, 0x20($s1) -/* CB418 80134D18 E7A00020 */ swc1 $f0, 0x20($sp) -/* CB41C 80134D1C E7A20024 */ swc1 $f2, 0x24($sp) -/* CB420 80134D20 1440000F */ bnez $v0, .L80134D60 -/* CB424 80134D24 E7A40028 */ swc1 $f4, 0x28($sp) -/* CB428 80134D28 3C040002 */ lui $a0, 2 -/* CB42C 80134D2C E7A60010 */ swc1 $f6, 0x10($sp) -/* CB430 80134D30 C6200018 */ lwc1 $f0, 0x18($s1) -/* CB434 80134D34 27A50020 */ addiu $a1, $sp, 0x20 -/* CB438 80134D38 E7A00014 */ swc1 $f0, 0x14($sp) -/* CB43C 80134D3C C620000C */ lwc1 $f0, 0xc($s1) -/* CB440 80134D40 27A60024 */ addiu $a2, $sp, 0x24 -/* CB444 80134D44 E7A00018 */ swc1 $f0, 0x18($sp) -/* CB448 80134D48 C6200008 */ lwc1 $f0, 8($s1) -/* CB44C 80134D4C 27A70028 */ addiu $a3, $sp, 0x28 -/* CB450 80134D50 0C037765 */ jal npc_test_move_complex_with_slipping -/* CB454 80134D54 E7A0001C */ swc1 $f0, 0x1c($sp) -/* CB458 80134D58 0804D364 */ j .L80134D90 -/* CB45C 80134D5C 00000000 */ nop -.L80134D60: -/* CB460 80134D60 3C040002 */ lui $a0, 2 -/* CB464 80134D64 E7A60010 */ swc1 $f6, 0x10($sp) -/* CB468 80134D68 C6200018 */ lwc1 $f0, 0x18($s1) -/* CB46C 80134D6C 27A50020 */ addiu $a1, $sp, 0x20 -/* CB470 80134D70 E7A00014 */ swc1 $f0, 0x14($sp) -/* CB474 80134D74 C620000C */ lwc1 $f0, 0xc($s1) -/* CB478 80134D78 27A60024 */ addiu $a2, $sp, 0x24 -/* CB47C 80134D7C E7A00018 */ swc1 $f0, 0x18($sp) -/* CB480 80134D80 C6200008 */ lwc1 $f0, 8($s1) -/* CB484 80134D84 27A70028 */ addiu $a3, $sp, 0x28 -/* CB488 80134D88 0C037711 */ jal npc_test_move_simple_with_slipping -/* CB48C 80134D8C E7A0001C */ swc1 $f0, 0x1c($sp) -.L80134D90: -/* CB490 80134D90 10400027 */ beqz $v0, .L80134E30 -/* CB494 80134D94 00000000 */ nop -/* CB498 80134D98 C7A00020 */ lwc1 $f0, 0x20($sp) -/* CB49C 80134D9C C7A20024 */ lwc1 $f2, 0x24($sp) -/* CB4A0 80134DA0 C7A40028 */ lwc1 $f4, 0x28($sp) -/* CB4A4 80134DA4 3C014334 */ lui $at, 0x4334 -/* CB4A8 80134DA8 44816000 */ mtc1 $at, $f12 -/* CB4AC 80134DAC E6400008 */ swc1 $f0, 8($s2) -/* CB4B0 80134DB0 E642000C */ swc1 $f2, 0xc($s2) -/* CB4B4 80134DB4 E6440010 */ swc1 $f4, 0x10($s2) -/* CB4B8 80134DB8 C6200018 */ lwc1 $f0, 0x18($s1) -/* CB4BC 80134DBC 0C00A6C9 */ jal clamp_angle -/* CB4C0 80134DC0 460C0300 */ add.s $f12, $f0, $f12 -/* CB4C4 80134DC4 3C0140C9 */ lui $at, 0x40c9 -/* CB4C8 80134DC8 34210FD0 */ ori $at, $at, 0xfd0 -/* CB4CC 80134DCC 44811000 */ mtc1 $at, $f2 -/* CB4D0 80134DD0 00000000 */ nop -/* CB4D4 80134DD4 46020082 */ mul.s $f2, $f0, $f2 -/* CB4D8 80134DD8 00000000 */ nop -/* CB4DC 80134DDC 3C0143B4 */ lui $at, 0x43b4 -/* CB4E0 80134DE0 44812000 */ mtc1 $at, $f4 -/* CB4E4 80134DE4 E6200018 */ swc1 $f0, 0x18($s1) -/* CB4E8 80134DE8 46041503 */ div.s $f20, $f2, $f4 -/* CB4EC 80134DEC 0C00A85B */ jal sin_rad -/* CB4F0 80134DF0 4600A306 */ mov.s $f12, $f20 -/* CB4F4 80134DF4 46000586 */ mov.s $f22, $f0 -/* CB4F8 80134DF8 0C00A874 */ jal cos_rad -/* CB4FC 80134DFC 4600A306 */ mov.s $f12, $f20 -/* CB500 80134E00 3C01C000 */ lui $at, 0xc000 -/* CB504 80134E04 44811800 */ mtc1 $at, $f3 -/* CB508 80134E08 44801000 */ mtc1 $zero, $f2 -/* CB50C 80134E0C 46000021 */ cvt.d.s $f0, $f0 -/* CB510 80134E10 46220002 */ mul.d $f0, $f0, $f2 -/* CB514 80134E14 00000000 */ nop -/* CB518 80134E18 4600B0A1 */ cvt.d.s $f2, $f22 -/* CB51C 80134E1C 46221080 */ add.d $f2, $f2, $f2 -/* CB520 80134E20 462010A0 */ cvt.s.d $f2, $f2 -/* CB524 80134E24 E6220010 */ swc1 $f2, 0x10($s1) -/* CB528 80134E28 46200020 */ cvt.s.d $f0, $f0 -/* CB52C 80134E2C E6200014 */ swc1 $f0, 0x14($s1) -.L80134E30: -/* CB530 80134E30 8E420000 */ lw $v0, ($s2) -/* CB534 80134E34 3C031000 */ lui $v1, 0x1000 -/* CB538 80134E38 00431024 */ and $v0, $v0, $v1 -/* CB53C 80134E3C 144000B3 */ bnez $v0, .L8013510C -/* CB540 80134E40 24020014 */ addiu $v0, $zero, 0x14 -/* CB544 80134E44 8243001B */ lb $v1, 0x1b($s2) -/* CB548 80134E48 106200B0 */ beq $v1, $v0, .L8013510C -/* CB54C 80134E4C 00000000 */ nop -/* CB550 80134E50 C6200000 */ lwc1 $f0, ($s1) -/* CB554 80134E54 44801000 */ mtc1 $zero, $f2 -/* CB558 80134E58 44801800 */ mtc1 $zero, $f3 -/* CB55C 80134E5C 46000021 */ cvt.d.s $f0, $f0 -/* CB560 80134E60 4622003E */ c.le.d $f0, $f2 -/* CB564 80134E64 00000000 */ nop -/* CB568 80134E68 450000A8 */ bc1f .L8013510C -/* CB56C 80134E6C 24020001 */ addiu $v0, $zero, 1 -/* CB570 80134E70 AE220020 */ sw $v0, 0x20($s1) -/* CB574 80134E74 8243001B */ lb $v1, 0x1b($s2) -/* CB578 80134E78 24020017 */ addiu $v0, $zero, 0x17 -/* CB57C 80134E7C 1062002A */ beq $v1, $v0, .L80134F28 -/* CB580 80134E80 00000000 */ nop -/* CB584 80134E84 C642000C */ lwc1 $f2, 0xc($s2) -/* CB588 80134E88 C6200000 */ lwc1 $f0, ($s1) -/* CB58C 80134E8C C6440008 */ lwc1 $f4, 8($s2) -/* CB590 80134E90 46001081 */ sub.s $f2, $f2, $f0 -/* CB594 80134E94 E7A40020 */ swc1 $f4, 0x20($sp) -/* CB598 80134E98 C6200000 */ lwc1 $f0, ($s1) -/* CB59C 80134E9C 3C014140 */ lui $at, 0x4140 -/* CB5A0 80134EA0 44813000 */ mtc1 $at, $f6 -/* CB5A4 80134EA4 46000007 */ neg.s $f0, $f0 -/* CB5A8 80134EA8 46060000 */ add.s $f0, $f0, $f6 -/* CB5AC 80134EAC C6440010 */ lwc1 $f4, 0x10($s2) -/* CB5B0 80134EB0 8E220020 */ lw $v0, 0x20($s1) -/* CB5B4 80134EB4 46061080 */ add.s $f2, $f2, $f6 -/* CB5B8 80134EB8 E7A40028 */ swc1 $f4, 0x28($sp) -/* CB5BC 80134EBC E7A0002C */ swc1 $f0, 0x2c($sp) -/* CB5C0 80134EC0 1440000A */ bnez $v0, .L80134EEC -/* CB5C4 80134EC4 E7A20024 */ swc1 $f2, 0x24($sp) -/* CB5C8 80134EC8 27A2002C */ addiu $v0, $sp, 0x2c -/* CB5CC 80134ECC AFA20010 */ sw $v0, 0x10($sp) -/* CB5D0 80134ED0 3C040002 */ lui $a0, 2 -/* CB5D4 80134ED4 27A50020 */ addiu $a1, $sp, 0x20 -/* CB5D8 80134ED8 27A60024 */ addiu $a2, $sp, 0x24 -/* CB5DC 80134EDC 0C0372DF */ jal npc_raycast_down_sides -/* CB5E0 80134EE0 27A70028 */ addiu $a3, $sp, 0x28 -/* CB5E4 80134EE4 0804D3E1 */ j .L80134F84 -/* CB5E8 80134EE8 00000000 */ nop -.L80134EEC: -/* CB5EC 80134EEC 3C040002 */ lui $a0, 2 -/* CB5F0 80134EF0 27A50020 */ addiu $a1, $sp, 0x20 -/* CB5F4 80134EF4 27A60024 */ addiu $a2, $sp, 0x24 -/* CB5F8 80134EF8 27A70028 */ addiu $a3, $sp, 0x28 -/* CB5FC 80134EFC 3C014334 */ lui $at, 0x4334 -/* CB600 80134F00 44810000 */ mtc1 $at, $f0 -/* CB604 80134F04 3C0141A0 */ lui $at, 0x41a0 -/* CB608 80134F08 44811000 */ mtc1 $at, $f2 -/* CB60C 80134F0C 27A2002C */ addiu $v0, $sp, 0x2c -/* CB610 80134F10 AFA20010 */ sw $v0, 0x10($sp) -/* CB614 80134F14 E7A00014 */ swc1 $f0, 0x14($sp) -/* CB618 80134F18 0C0371DE */ jal npc_raycast_down_around -/* CB61C 80134F1C E7A20018 */ swc1 $f2, 0x18($sp) -/* CB620 80134F20 0804D3E1 */ j .L80134F84 -/* CB624 80134F24 00000000 */ nop -.L80134F28: -/* CB628 80134F28 C644000C */ lwc1 $f4, 0xc($s2) -/* CB62C 80134F2C C6200000 */ lwc1 $f0, ($s1) -/* CB630 80134F30 C6460008 */ lwc1 $f6, 8($s2) -/* CB634 80134F34 46002101 */ sub.s $f4, $f4, $f0 -/* CB638 80134F38 3C014140 */ lui $at, 0x4140 -/* CB63C 80134F3C 44811000 */ mtc1 $at, $f2 -/* CB640 80134F40 44804000 */ mtc1 $zero, $f8 -/* CB644 80134F44 46000007 */ neg.s $f0, $f0 -/* CB648 80134F48 46020000 */ add.s $f0, $f0, $f2 -/* CB64C 80134F4C E7A60020 */ swc1 $f6, 0x20($sp) -/* CB650 80134F50 46022100 */ add.s $f4, $f4, $f2 -/* CB654 80134F54 C6420010 */ lwc1 $f2, 0x10($s2) -/* CB658 80134F58 E7A0002C */ swc1 $f0, 0x2c($sp) -/* CB65C 80134F5C 46080180 */ add.s $f6, $f0, $f8 -/* CB660 80134F60 E7A20028 */ swc1 $f2, 0x28($sp) -/* CB664 80134F64 4606203C */ c.lt.s $f4, $f6 -/* CB668 80134F68 00000000 */ nop -/* CB66C 80134F6C 45000004 */ bc1f .L80134F80 -/* CB670 80134F70 E7A40024 */ swc1 $f4, 0x24($sp) -/* CB674 80134F74 E7A80024 */ swc1 $f8, 0x24($sp) -/* CB678 80134F78 0804D3E1 */ j .L80134F84 -/* CB67C 80134F7C 24020001 */ addiu $v0, $zero, 1 -.L80134F80: -/* CB680 80134F80 0000102D */ daddu $v0, $zero, $zero -.L80134F84: -/* CB684 80134F84 10400061 */ beqz $v0, .L8013510C -/* CB688 80134F88 00000000 */ nop -/* CB68C 80134F8C C7A00024 */ lwc1 $f0, 0x24($sp) -/* CB690 80134F90 3C013FF4 */ lui $at, 0x3ff4 -/* CB694 80134F94 44811800 */ mtc1 $at, $f3 -/* CB698 80134F98 44801000 */ mtc1 $zero, $f2 -/* CB69C 80134F9C E640000C */ swc1 $f0, 0xc($s2) -/* CB6A0 80134FA0 C6200000 */ lwc1 $f0, ($s1) -/* CB6A4 80134FA4 3C014008 */ lui $at, 0x4008 -/* CB6A8 80134FA8 44812800 */ mtc1 $at, $f5 -/* CB6AC 80134FAC 44802000 */ mtc1 $zero, $f4 -/* CB6B0 80134FB0 46000007 */ neg.s $f0, $f0 -/* CB6B4 80134FB4 46000021 */ cvt.d.s $f0, $f0 -/* CB6B8 80134FB8 46220003 */ div.d $f0, $f0, $f2 -/* CB6BC 80134FBC 46200020 */ cvt.s.d $f0, $f0 -/* CB6C0 80134FC0 460000A1 */ cvt.d.s $f2, $f0 -/* CB6C4 80134FC4 4624103C */ c.lt.d $f2, $f4 -/* CB6C8 80134FC8 00000000 */ nop -/* CB6CC 80134FCC 45000009 */ bc1f .L80134FF4 -/* CB6D0 80134FD0 E6200000 */ swc1 $f0, ($s1) -/* CB6D4 80134FD4 AE200000 */ sw $zero, ($s1) -/* CB6D8 80134FD8 AE200010 */ sw $zero, 0x10($s1) -/* CB6DC 80134FDC AE200014 */ sw $zero, 0x14($s1) -/* CB6E0 80134FE0 8E420000 */ lw $v0, ($s2) -/* CB6E4 80134FE4 3C032000 */ lui $v1, 0x2000 -/* CB6E8 80134FE8 00431025 */ or $v0, $v0, $v1 -/* CB6EC 80134FEC 0804D443 */ j .L8013510C -/* CB6F0 80134FF0 AE420000 */ sw $v0, ($s2) -.L80134FF4: -/* CB6F4 80134FF4 96430018 */ lhu $v1, 0x18($s2) -/* CB6F8 80134FF8 2462FF20 */ addiu $v0, $v1, -0xe0 -/* CB6FC 80134FFC 2C420075 */ sltiu $v0, $v0, 0x75 -/* CB700 80135000 10400004 */ beqz $v0, .L80135014 -/* CB704 80135004 2404021B */ addiu $a0, $zero, 0x21b -/* CB708 80135008 C6400010 */ lwc1 $f0, 0x10($s2) -/* CB70C 8013500C 0804D43F */ j .L801350FC -/* CB710 80135010 E7A00010 */ swc1 $f0, 0x10($sp) -.L80135014: -/* CB714 80135014 2462FFF0 */ addiu $v0, $v1, -0x10 -/* CB718 80135018 3042FFFF */ andi $v0, $v0, 0xffff -/* CB71C 8013501C 2C4200CB */ sltiu $v0, $v0, 0xcb -/* CB720 80135020 10400004 */ beqz $v0, .L80135034 -/* CB724 80135024 2404021A */ addiu $a0, $zero, 0x21a -/* CB728 80135028 C6400010 */ lwc1 $f0, 0x10($s2) -/* CB72C 8013502C 0804D43F */ j .L801350FC -/* CB730 80135030 E7A00010 */ swc1 $f0, 0x10($sp) -.L80135034: -/* CB734 80135034 00031400 */ sll $v0, $v1, 0x10 -/* CB738 80135038 00021C03 */ sra $v1, $v0, 0x10 -/* CB73C 8013503C 24020158 */ addiu $v0, $zero, 0x158 -/* CB740 80135040 1062001F */ beq $v1, $v0, .L801350C0 -/* CB744 80135044 28620159 */ slti $v0, $v1, 0x159 -/* CB748 80135048 10400009 */ beqz $v0, .L80135070 -/* CB74C 8013504C 24020156 */ addiu $v0, $zero, 0x156 -/* CB750 80135050 10620012 */ beq $v1, $v0, .L8013509C -/* CB754 80135054 28620157 */ slti $v0, $v1, 0x157 -/* CB758 80135058 10400013 */ beqz $v0, .L801350A8 -/* CB75C 8013505C 24020010 */ addiu $v0, $zero, 0x10 -/* CB760 80135060 10620014 */ beq $v1, $v0, .L801350B4 -/* CB764 80135064 00000000 */ nop -/* CB768 80135068 0804D443 */ j .L8013510C -/* CB76C 8013506C 00000000 */ nop -.L80135070: -/* CB770 80135070 2402015A */ addiu $v0, $zero, 0x15a -/* CB774 80135074 10620018 */ beq $v1, $v0, .L801350D8 -/* CB778 80135078 0062102A */ slt $v0, $v1, $v0 -/* CB77C 8013507C 14400013 */ bnez $v0, .L801350CC -/* CB780 80135080 2402015B */ addiu $v0, $zero, 0x15b -/* CB784 80135084 1062001A */ beq $v1, $v0, .L801350F0 -/* CB788 80135088 2402015C */ addiu $v0, $zero, 0x15c -/* CB78C 8013508C 10620015 */ beq $v1, $v0, .L801350E4 -/* CB790 80135090 00000000 */ nop -/* CB794 80135094 0804D443 */ j .L8013510C -/* CB798 80135098 00000000 */ nop -.L8013509C: -/* CB79C 8013509C C6400010 */ lwc1 $f0, 0x10($s2) -/* CB7A0 801350A0 0804D43E */ j .L801350F8 -/* CB7A4 801350A4 24040214 */ addiu $a0, $zero, 0x214 -.L801350A8: -/* CB7A8 801350A8 C6400010 */ lwc1 $f0, 0x10($s2) -/* CB7AC 801350AC 0804D43E */ j .L801350F8 -/* CB7B0 801350B0 24040212 */ addiu $a0, $zero, 0x212 -.L801350B4: -/* CB7B4 801350B4 C6400010 */ lwc1 $f0, 0x10($s2) -/* CB7B8 801350B8 0804D43E */ j .L801350F8 -/* CB7BC 801350BC 24040212 */ addiu $a0, $zero, 0x212 -.L801350C0: -/* CB7C0 801350C0 C6400010 */ lwc1 $f0, 0x10($s2) -/* CB7C4 801350C4 0804D43E */ j .L801350F8 -/* CB7C8 801350C8 24040214 */ addiu $a0, $zero, 0x214 -.L801350CC: -/* CB7CC 801350CC C6400010 */ lwc1 $f0, 0x10($s2) -/* CB7D0 801350D0 0804D43E */ j .L801350F8 -/* CB7D4 801350D4 24040212 */ addiu $a0, $zero, 0x212 -.L801350D8: -/* CB7D8 801350D8 C6400010 */ lwc1 $f0, 0x10($s2) -/* CB7DC 801350DC 0804D43E */ j .L801350F8 -/* CB7E0 801350E0 24040214 */ addiu $a0, $zero, 0x214 -.L801350E4: -/* CB7E4 801350E4 C6400010 */ lwc1 $f0, 0x10($s2) -/* CB7E8 801350E8 0804D43E */ j .L801350F8 -/* CB7EC 801350EC 24040219 */ addiu $a0, $zero, 0x219 -.L801350F0: -/* CB7F0 801350F0 C6400010 */ lwc1 $f0, 0x10($s2) -/* CB7F4 801350F4 24040218 */ addiu $a0, $zero, 0x218 -.L801350F8: -/* CB7F8 801350F8 E7A00010 */ swc1 $f0, 0x10($sp) -.L801350FC: -/* CB7FC 801350FC 8E460008 */ lw $a2, 8($s2) -/* CB800 80135100 8E47000C */ lw $a3, 0xc($s2) -/* CB804 80135104 0C052757 */ jal sfx_play_sound_at_position -/* CB808 80135108 0000282D */ daddu $a1, $zero, $zero -.L8013510C: -/* CB80C 8013510C C642000C */ lwc1 $f2, 0xc($s2) -/* CB810 80135110 3C01C4FA */ lui $at, 0xc4fa -/* CB814 80135114 44810000 */ mtc1 $at, $f0 -/* CB818 80135118 00000000 */ nop -/* CB81C 8013511C 4600103C */ c.lt.s $f2, $f0 -/* CB820 80135120 00000000 */ nop -/* CB824 80135124 45000003 */ bc1f .L80135134 -/* CB828 80135128 00000000 */ nop -.L8013512C: -/* CB82C 8013512C 24020002 */ addiu $v0, $zero, 2 -.L80135130: -/* CB830 80135130 A242001A */ sb $v0, 0x1a($s2) -.L80135134: -/* CB834 80135134 8243001A */ lb $v1, 0x1a($s2) -/* CB838 80135138 24020002 */ addiu $v0, $zero, 2 -/* CB83C 8013513C 14620005 */ bne $v1, $v0, .L80135154 -/* CB840 80135140 24020003 */ addiu $v0, $zero, 3 -/* CB844 80135144 0C04CE4C */ jal remove_item_entity_by_reference -/* CB848 80135148 0240202D */ daddu $a0, $s2, $zero -/* CB84C 8013514C 8243001A */ lb $v1, 0x1a($s2) -/* CB850 80135150 24020003 */ addiu $v0, $zero, 3 -.L80135154: -/* CB854 80135154 146200E6 */ bne $v1, $v0, .L801354F0 -/* CB858 80135158 00000000 */ nop -/* CB85C 8013515C 8E420000 */ lw $v0, ($s2) -/* CB860 80135160 30420400 */ andi $v0, $v0, 0x400 -/* CB864 80135164 10400003 */ beqz $v0, .L80135174 -/* CB868 80135168 00000000 */ nop -/* CB86C 8013516C 0C051514 */ jal set_global_flag -/* CB870 80135170 86440004 */ lh $a0, 4($s2) -.L80135174: -/* CB874 80135174 C644000C */ lwc1 $f4, 0xc($s2) -/* CB878 80135178 3C014180 */ lui $at, 0x4180 -/* CB87C 8013517C 44810000 */ mtc1 $at, $f0 -/* CB880 80135180 3C013F80 */ lui $at, 0x3f80 -/* CB884 80135184 44811000 */ mtc1 $at, $f2 -/* CB888 80135188 AFA00014 */ sw $zero, 0x14($sp) -/* CB88C 8013518C 46002100 */ add.s $f4, $f4, $f0 -/* CB890 80135190 E7A20010 */ swc1 $f2, 0x10($sp) -/* CB894 80135194 8E450008 */ lw $a1, 8($s2) -/* CB898 80135198 8E470010 */ lw $a3, 0x10($s2) -/* CB89C 8013519C 44062000 */ mfc1 $a2, $f4 -/* CB8A0 801351A0 0C01C4FC */ jal fx_small_gold_sparkle -/* CB8A4 801351A4 0000202D */ daddu $a0, $zero, $zero -/* CB8A8 801351A8 96430018 */ lhu $v1, 0x18($s2) -/* CB8AC 801351AC 2462FFF0 */ addiu $v0, $v1, -0x10 -/* CB8B0 801351B0 2C4200CB */ sltiu $v0, $v0, 0xcb -/* CB8B4 801351B4 1440000F */ bnez $v0, .L801351F4 -/* CB8B8 801351B8 2402000A */ addiu $v0, $zero, 0xa -/* CB8BC 801351BC 2462FF20 */ addiu $v0, $v1, -0xe0 -/* CB8C0 801351C0 3042FFFF */ andi $v0, $v0, 0xffff -/* CB8C4 801351C4 2C420075 */ sltiu $v0, $v0, 0x75 -/* CB8C8 801351C8 1440000A */ bnez $v0, .L801351F4 -/* CB8CC 801351CC 2402000A */ addiu $v0, $zero, 0xa -/* CB8D0 801351D0 00031400 */ sll $v0, $v1, 0x10 -/* CB8D4 801351D4 00021403 */ sra $v0, $v0, 0x10 -/* CB8D8 801351D8 2403015C */ addiu $v1, $zero, 0x15c -/* CB8DC 801351DC 14430007 */ bne $v0, $v1, .L801351FC -/* CB8E0 801351E0 24020017 */ addiu $v0, $zero, 0x17 -/* CB8E4 801351E4 9662032C */ lhu $v0, 0x32c($s3) -/* CB8E8 801351E8 24420001 */ addiu $v0, $v0, 1 -/* CB8EC 801351EC A662032C */ sh $v0, 0x32c($s3) -/* CB8F0 801351F0 2402000A */ addiu $v0, $zero, 0xa -.L801351F4: -/* CB8F4 801351F4 0804D53C */ j .L801354F0 -/* CB8F8 801351F8 A242001A */ sb $v0, 0x1a($s2) -.L801351FC: -/* CB8FC 801351FC 8243001B */ lb $v1, 0x1b($s2) -/* CB900 80135200 14620002 */ bne $v1, $v0, .L8013520C -/* CB904 80135204 2402FFFF */ addiu $v0, $zero, -1 -/* CB908 80135208 A6420018 */ sh $v0, 0x18($s2) -.L8013520C: -/* CB90C 8013520C 86430018 */ lh $v1, 0x18($s2) -/* CB910 80135210 24020157 */ addiu $v0, $zero, 0x157 -/* CB914 80135214 10620075 */ beq $v1, $v0, .L801353EC -/* CB918 80135218 28620158 */ slti $v0, $v1, 0x158 -/* CB91C 8013521C 10400007 */ beqz $v0, .L8013523C -/* CB920 80135220 24020010 */ addiu $v0, $zero, 0x10 -/* CB924 80135224 1062008B */ beq $v1, $v0, .L80135454 -/* CB928 80135228 24020156 */ addiu $v0, $zero, 0x156 -/* CB92C 8013522C 10620011 */ beq $v1, $v0, .L80135274 -/* CB930 80135230 0240202D */ daddu $a0, $s2, $zero -/* CB934 80135234 0804D533 */ j .L801354CC -/* CB938 80135238 00000000 */ nop -.L8013523C: -/* CB93C 8013523C 2402015A */ addiu $v0, $zero, 0x15a -/* CB940 80135240 10620096 */ beq $v1, $v0, .L8013549C -/* CB944 80135244 2862015B */ slti $v0, $v1, 0x15b -/* CB948 80135248 10400005 */ beqz $v0, .L80135260 -/* CB94C 8013524C 24020159 */ addiu $v0, $zero, 0x159 -/* CB950 80135250 10620086 */ beq $v1, $v0, .L8013546C -/* CB954 80135254 0240202D */ daddu $a0, $s2, $zero -/* CB958 80135258 0804D533 */ j .L801354CC -/* CB95C 8013525C 00000000 */ nop -.L80135260: -/* CB960 80135260 2402015B */ addiu $v0, $zero, 0x15b -/* CB964 80135264 10620028 */ beq $v1, $v0, .L80135308 -/* CB968 80135268 0240202D */ daddu $a0, $s2, $zero -/* CB96C 8013526C 0804D533 */ j .L801354CC -/* CB970 80135270 00000000 */ nop -.L80135274: -/* CB974 80135274 82620002 */ lb $v0, 2($s3) -/* CB978 80135278 82630003 */ lb $v1, 3($s3) -/* CB97C 8013527C 0043102A */ slt $v0, $v0, $v1 -/* CB980 80135280 10400014 */ beqz $v0, .L801352D4 -/* CB984 80135284 0000202D */ daddu $a0, $zero, $zero -/* CB988 80135288 868200B0 */ lh $v0, 0xb0($s4) -/* CB98C 8013528C C682002C */ lwc1 $f2, 0x2c($s4) -/* CB990 80135290 44820000 */ mtc1 $v0, $f0 -/* CB994 80135294 00000000 */ nop -/* CB998 80135298 46800020 */ cvt.s.w $f0, $f0 -/* CB99C 8013529C 46001080 */ add.s $f2, $f2, $f0 -/* CB9A0 801352A0 8E850028 */ lw $a1, 0x28($s4) -/* CB9A4 801352A4 8E870030 */ lw $a3, 0x30($s4) -/* CB9A8 801352A8 44061000 */ mfc1 $a2, $f2 -/* CB9AC 801352AC 24020001 */ addiu $v0, $zero, 1 -/* CB9B0 801352B0 0C01C424 */ jal fx_recover -/* CB9B4 801352B4 AFA20010 */ sw $v0, 0x10($sp) -/* CB9B8 801352B8 C6400010 */ lwc1 $f0, 0x10($s2) -/* CB9BC 801352BC 24042056 */ addiu $a0, $zero, 0x2056 -/* CB9C0 801352C0 E7A00010 */ swc1 $f0, 0x10($sp) -/* CB9C4 801352C4 8E460008 */ lw $a2, 8($s2) -/* CB9C8 801352C8 8E47000C */ lw $a3, 0xc($s2) -/* CB9CC 801352CC 0C052757 */ jal sfx_play_sound_at_position -/* CB9D0 801352D0 0000282D */ daddu $a1, $zero, $zero -.L801352D4: -/* CB9D4 801352D4 92620002 */ lbu $v0, 2($s3) -/* CB9D8 801352D8 82630003 */ lb $v1, 3($s3) -/* CB9DC 801352DC 24420001 */ addiu $v0, $v0, 1 -/* CB9E0 801352E0 A2620002 */ sb $v0, 2($s3) -/* CB9E4 801352E4 00021600 */ sll $v0, $v0, 0x18 -/* CB9E8 801352E8 00021603 */ sra $v0, $v0, 0x18 -/* CB9EC 801352EC 0062182A */ slt $v1, $v1, $v0 -/* CB9F0 801352F0 92620003 */ lbu $v0, 3($s3) -/* CB9F4 801352F4 54600001 */ bnel $v1, $zero, .L801352FC -/* CB9F8 801352F8 A2620002 */ sb $v0, 2($s3) -.L801352FC: -/* CB9FC 801352FC C6400010 */ lwc1 $f0, 0x10($s2) -/* CBA00 80135300 0804D4E6 */ j .L80135398 -/* CBA04 80135304 24040213 */ addiu $a0, $zero, 0x213 -.L80135308: -/* CBA08 80135308 82620005 */ lb $v0, 5($s3) -/* CBA0C 8013530C 82630006 */ lb $v1, 6($s3) -/* CBA10 80135310 0043102A */ slt $v0, $v0, $v1 -/* CBA14 80135314 10400014 */ beqz $v0, .L80135368 -/* CBA18 80135318 24040001 */ addiu $a0, $zero, 1 -/* CBA1C 8013531C 868200B0 */ lh $v0, 0xb0($s4) -/* CBA20 80135320 C682002C */ lwc1 $f2, 0x2c($s4) -/* CBA24 80135324 44820000 */ mtc1 $v0, $f0 -/* CBA28 80135328 00000000 */ nop -/* CBA2C 8013532C 46800020 */ cvt.s.w $f0, $f0 -/* CBA30 80135330 46001080 */ add.s $f2, $f2, $f0 -/* CBA34 80135334 8E850028 */ lw $a1, 0x28($s4) -/* CBA38 80135338 8E870030 */ lw $a3, 0x30($s4) -/* CBA3C 8013533C 44061000 */ mfc1 $a2, $f2 -/* CBA40 80135340 0080102D */ daddu $v0, $a0, $zero -/* CBA44 80135344 0C01C424 */ jal fx_recover -/* CBA48 80135348 AFA20010 */ sw $v0, 0x10($sp) -/* CBA4C 8013534C C6400010 */ lwc1 $f0, 0x10($s2) -/* CBA50 80135350 24042056 */ addiu $a0, $zero, 0x2056 -/* CBA54 80135354 E7A00010 */ swc1 $f0, 0x10($sp) -/* CBA58 80135358 8E460008 */ lw $a2, 8($s2) -/* CBA5C 8013535C 8E47000C */ lw $a3, 0xc($s2) -/* CBA60 80135360 0C052757 */ jal sfx_play_sound_at_position -/* CBA64 80135364 0000282D */ daddu $a1, $zero, $zero -.L80135368: -/* CBA68 80135368 92620005 */ lbu $v0, 5($s3) -/* CBA6C 8013536C 82630006 */ lb $v1, 6($s3) -/* CBA70 80135370 24420001 */ addiu $v0, $v0, 1 -/* CBA74 80135374 A2620005 */ sb $v0, 5($s3) -/* CBA78 80135378 00021600 */ sll $v0, $v0, 0x18 -/* CBA7C 8013537C 00021603 */ sra $v0, $v0, 0x18 -/* CBA80 80135380 0062182A */ slt $v1, $v1, $v0 -/* CBA84 80135384 92620006 */ lbu $v0, 6($s3) -/* CBA88 80135388 54600001 */ bnel $v1, $zero, .L80135390 -/* CBA8C 8013538C A2620005 */ sb $v0, 5($s3) -.L80135390: -/* CBA90 80135390 C6400010 */ lwc1 $f0, 0x10($s2) -/* CBA94 80135394 24040217 */ addiu $a0, $zero, 0x217 -.L80135398: -/* CBA98 80135398 E7A00010 */ swc1 $f0, 0x10($sp) -/* CBA9C 8013539C 8E460008 */ lw $a2, 8($s2) -/* CBAA0 801353A0 8E47000C */ lw $a3, 0xc($s2) -/* CBAA4 801353A4 0C052757 */ jal sfx_play_sound_at_position -/* CBAA8 801353A8 0000282D */ daddu $a1, $zero, $zero -/* CBAAC 801353AC 8E850028 */ lw $a1, 0x28($s4) -/* CBAB0 801353B0 868200B0 */ lh $v0, 0xb0($s4) -/* CBAB4 801353B4 C682002C */ lwc1 $f2, 0x2c($s4) -/* CBAB8 801353B8 44820000 */ mtc1 $v0, $f0 -/* CBABC 801353BC 00000000 */ nop -/* CBAC0 801353C0 46800020 */ cvt.s.w $f0, $f0 -/* CBAC4 801353C4 46001080 */ add.s $f2, $f2, $f0 -/* CBAC8 801353C8 8E870030 */ lw $a3, 0x30($s4) -/* CBACC 801353CC 3C0141F0 */ lui $at, 0x41f0 -/* CBAD0 801353D0 44810000 */ mtc1 $at, $f0 -/* CBAD4 801353D4 44061000 */ mfc1 $a2, $f2 -/* CBAD8 801353D8 24040004 */ addiu $a0, $zero, 4 -/* CBADC 801353DC 0C01BFBC */ jal fx_sparkles -/* CBAE0 801353E0 E7A00010 */ swc1 $f0, 0x10($sp) -/* CBAE4 801353E4 0804D533 */ j .L801354CC -/* CBAE8 801353E8 0240202D */ daddu $a0, $s2, $zero -.L801353EC: -/* CBAEC 801353EC 9662000C */ lhu $v0, 0xc($s3) -/* CBAF0 801353F0 24420001 */ addiu $v0, $v0, 1 -/* CBAF4 801353F4 A662000C */ sh $v0, 0xc($s3) -/* CBAF8 801353F8 00021400 */ sll $v0, $v0, 0x10 -/* CBAFC 801353FC 00021403 */ sra $v0, $v0, 0x10 -/* CBB00 80135400 284203E8 */ slti $v0, $v0, 0x3e8 -/* CBB04 80135404 14400002 */ bnez $v0, .L80135410 -/* CBB08 80135408 240203E7 */ addiu $v0, $zero, 0x3e7 -/* CBB0C 8013540C A662000C */ sh $v0, 0xc($s3) -.L80135410: -/* CBB10 80135410 C6400010 */ lwc1 $f0, 0x10($s2) -/* CBB14 80135414 24040211 */ addiu $a0, $zero, 0x211 -/* CBB18 80135418 E7A00010 */ swc1 $f0, 0x10($sp) -/* CBB1C 8013541C 8E460008 */ lw $a2, 8($s2) -/* CBB20 80135420 8E47000C */ lw $a3, 0xc($s2) -/* CBB24 80135424 0C052757 */ jal sfx_play_sound_at_position -/* CBB28 80135428 0000282D */ daddu $a1, $zero, $zero -/* CBB2C 8013542C 3C030001 */ lui $v1, 1 -/* CBB30 80135430 8E6202B4 */ lw $v0, 0x2b4($s3) -/* CBB34 80135434 3463869F */ ori $v1, $v1, 0x869f -/* CBB38 80135438 24420001 */ addiu $v0, $v0, 1 -/* CBB3C 8013543C AE6202B4 */ sw $v0, 0x2b4($s3) -/* CBB40 80135440 0062102B */ sltu $v0, $v1, $v0 -/* CBB44 80135444 54400020 */ bnel $v0, $zero, .L801354C8 -/* CBB48 80135448 AE6302B4 */ sw $v1, 0x2b4($s3) -/* CBB4C 8013544C 0804D533 */ j .L801354CC -/* CBB50 80135450 0240202D */ daddu $a0, $s2, $zero -.L80135454: -/* CBB54 80135454 9262000E */ lbu $v0, 0xe($s3) -/* CBB58 80135458 24420001 */ addiu $v0, $v0, 1 -/* CBB5C 8013545C A262000E */ sb $v0, 0xe($s3) -/* CBB60 80135460 C6400010 */ lwc1 $f0, 0x10($s2) -/* CBB64 80135464 0804D52D */ j .L801354B4 -/* CBB68 80135468 24040211 */ addiu $a0, $zero, 0x211 -.L8013546C: -/* CBB6C 8013546C 92620010 */ lbu $v0, 0x10($s3) -/* CBB70 80135470 24420001 */ addiu $v0, $v0, 1 -/* CBB74 80135474 A2620010 */ sb $v0, 0x10($s3) -/* CBB78 80135478 00021600 */ sll $v0, $v0, 0x18 -/* CBB7C 8013547C 00021603 */ sra $v0, $v0, 0x18 -/* CBB80 80135480 28420065 */ slti $v0, $v0, 0x65 -/* CBB84 80135484 14400002 */ bnez $v0, .L80135490 -/* CBB88 80135488 24020064 */ addiu $v0, $zero, 0x64 -/* CBB8C 8013548C A2620010 */ sb $v0, 0x10($s3) -.L80135490: -/* CBB90 80135490 C6400010 */ lwc1 $f0, 0x10($s2) -/* CBB94 80135494 0804D52D */ j .L801354B4 -/* CBB98 80135498 24040211 */ addiu $a0, $zero, 0x211 -.L8013549C: -/* CBB9C 8013549C 92620003 */ lbu $v0, 3($s3) -/* CBBA0 801354A0 92630006 */ lbu $v1, 6($s3) -/* CBBA4 801354A4 A2620002 */ sb $v0, 2($s3) -/* CBBA8 801354A8 A2630005 */ sb $v1, 5($s3) -/* CBBAC 801354AC C6400010 */ lwc1 $f0, 0x10($s2) -/* CBBB0 801354B0 24040213 */ addiu $a0, $zero, 0x213 -.L801354B4: -/* CBBB4 801354B4 E7A00010 */ swc1 $f0, 0x10($sp) -/* CBBB8 801354B8 8E460008 */ lw $a2, 8($s2) -/* CBBBC 801354BC 8E47000C */ lw $a3, 0xc($s2) -/* CBBC0 801354C0 0C052757 */ jal sfx_play_sound_at_position -/* CBBC4 801354C4 0000282D */ daddu $a1, $zero, $zero -.L801354C8: -/* CBBC8 801354C8 0240202D */ daddu $a0, $s2, $zero -.L801354CC: -/* CBBCC 801354CC 3C02800A */ lui $v0, %hi(gOverrideFlags) -/* CBBD0 801354D0 2442A650 */ addiu $v0, $v0, %lo(gOverrideFlags) -/* CBBD4 801354D4 3C018015 */ lui $at, %hi(D_801565A8) -/* CBBD8 801354D8 A42065A8 */ sh $zero, %lo(D_801565A8)($at) -/* CBBDC 801354DC 8C430000 */ lw $v1, ($v0) -/* CBBE0 801354E0 2405FFBF */ addiu $a1, $zero, -0x41 -/* CBBE4 801354E4 00651824 */ and $v1, $v1, $a1 -/* CBBE8 801354E8 0C04CE4C */ jal remove_item_entity_by_reference -/* CBBEC 801354EC AC430000 */ sw $v1, ($v0) -.L801354F0: -/* CBBF0 801354F0 8243001A */ lb $v1, 0x1a($s2) -/* CBBF4 801354F4 24020004 */ addiu $v0, $zero, 4 -/* CBBF8 801354F8 1462000F */ bne $v1, $v0, .L80135538 -/* CBBFC 801354FC 2402000A */ addiu $v0, $zero, 0xa -/* CBC00 80135500 3C048015 */ lui $a0, %hi(D_80155D80) -/* CBC04 80135504 8C845D80 */ lw $a0, %lo(D_80155D80)($a0) -/* CBC08 80135508 0C0B1059 */ jal does_script_exist -/* CBC0C 8013550C 00000000 */ nop -/* CBC10 80135510 14400007 */ bnez $v0, .L80135530 -/* CBC14 80135514 00000000 */ nop -/* CBC18 80135518 3C018015 */ lui $at, %hi(D_801565A8) -/* CBC1C 8013551C A42065A8 */ sh $zero, %lo(D_801565A8)($at) -/* CBC20 80135520 0C04CE4C */ jal remove_item_entity_by_reference -/* CBC24 80135524 0240202D */ daddu $a0, $s2, $zero -/* CBC28 80135528 0C0B1192 */ jal resume_all_group -/* CBC2C 8013552C 24040002 */ addiu $a0, $zero, 2 -.L80135530: -/* CBC30 80135530 8243001A */ lb $v1, 0x1a($s2) -/* CBC34 80135534 2402000A */ addiu $v0, $zero, 0xa -.L80135538: -/* CBC38 80135538 1462000D */ bne $v1, $v0, .L80135570 -/* CBC3C 8013553C 24020001 */ addiu $v0, $zero, 1 -/* CBC40 80135540 3C018015 */ lui $at, %hi(isPickingUpItem) -/* CBC44 80135544 A42265A4 */ sh $v0, %lo(isPickingUpItem)($at) -/* CBC48 80135548 2402001C */ addiu $v0, $zero, 0x1c -/* CBC4C 8013554C 3C03800A */ lui $v1, %hi(gOverrideFlags) -/* CBC50 80135550 2463A650 */ addiu $v1, $v1, %lo(gOverrideFlags) -/* CBC54 80135554 A242001B */ sb $v0, 0x1b($s2) -/* CBC58 80135558 A240001A */ sb $zero, 0x1a($s2) -/* CBC5C 8013555C 8C620000 */ lw $v0, ($v1) -/* CBC60 80135560 3C018015 */ lui $at, %hi(D_801565A8) -/* CBC64 80135564 A42065A8 */ sh $zero, %lo(D_801565A8)($at) -/* CBC68 80135568 34420040 */ ori $v0, $v0, 0x40 -/* CBC6C 8013556C AC620000 */ sw $v0, ($v1) -.L80135570: -/* CBC70 80135570 8FBF0044 */ lw $ra, 0x44($sp) -/* CBC74 80135574 8FB40040 */ lw $s4, 0x40($sp) -/* CBC78 80135578 8FB3003C */ lw $s3, 0x3c($sp) -/* CBC7C 8013557C 8FB20038 */ lw $s2, 0x38($sp) -/* CBC80 80135580 8FB10034 */ lw $s1, 0x34($sp) -/* CBC84 80135584 8FB00030 */ lw $s0, 0x30($sp) -/* CBC88 80135588 D7B80058 */ ldc1 $f24, 0x58($sp) -/* CBC8C 8013558C D7B60050 */ ldc1 $f22, 0x50($sp) -/* CBC90 80135590 D7B40048 */ ldc1 $f20, 0x48($sp) -/* CBC94 80135594 03E00008 */ jr $ra -/* CBC98 80135598 27BD0060 */ addiu $sp, $sp, 0x60 diff --git a/ver/us/asm/nonmatchings/effects/peach_star_beam/peach_star_beam_appendGfx.s b/ver/us/asm/nonmatchings/effects/peach_star_beam/peach_star_beam_appendGfx.s deleted file mode 100644 index 09a095d652..0000000000 --- a/ver/us/asm/nonmatchings/effects/peach_star_beam/peach_star_beam_appendGfx.s +++ /dev/null @@ -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 diff --git a/ver/us/asm/nonmatchings/effects/peach_star_beam/peach_star_beam_main.s b/ver/us/asm/nonmatchings/effects/peach_star_beam/peach_star_beam_main.s deleted file mode 100644 index ee142b7eef..0000000000 --- a/ver/us/asm/nonmatchings/effects/peach_star_beam/peach_star_beam_main.s +++ /dev/null @@ -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 diff --git a/ver/us/asm/nonmatchings/effects/peach_star_beam/peach_star_beam_update.s b/ver/us/asm/nonmatchings/effects/peach_star_beam/peach_star_beam_update.s deleted file mode 100644 index baa96888ae..0000000000 --- a/ver/us/asm/nonmatchings/effects/peach_star_beam/peach_star_beam_update.s +++ /dev/null @@ -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 diff --git a/ver/us/splat.yaml b/ver/us/splat.yaml index 346bc5d04a..e1fe2a61ca 100644 --- a/ver/us/splat.yaml +++ b/ver/us/splat.yaml @@ -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 diff --git a/ver/us/undefined_syms.txt b/ver/us/undefined_syms.txt index 35f73e7966..5334f2eea8 100644 --- a/ver/us/undefined_syms.txt +++ b/ver/us/undefined_syms.txt @@ -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;