Animation Cleanup: En_O* (#1506)

* anim O cleanup

* fix bss

* PR Review
This commit is contained in:
engineer124
2023-11-23 15:41:25 +11:00
committed by GitHub
parent 282f84e3f3
commit c75d3b97d3
50 changed files with 706 additions and 603 deletions
+3 -3
View File
@@ -1049,10 +1049,10 @@ s32 Collider_ResetSphereOC(PlayState* play, Collider* collider) {
* Initializes an OcLine to default values
*/
s32 Collider_InitLine(PlayState* play, OcLine* line) {
static Vec3f defaultLinePoint = { 0.0f, 0.0f, 0.0f };
static Vec3f sDefaultLinePoint = { 0.0f, 0.0f, 0.0f };
Math_Vec3f_Copy(&line->line.a, &defaultLinePoint);
Math_Vec3f_Copy(&line->line.b, &defaultLinePoint);
Math_Vec3f_Copy(&line->line.a, &sDefaultLinePoint);
Math_Vec3f_Copy(&line->line.b, &sDefaultLinePoint);
return 1;
}
+32 -32
View File
@@ -316,10 +316,10 @@ void EffectSsBlast_Spawn(PlayState* play, Vec3f* pos, Vec3f* velocity, Vec3f* ac
void EffectSsBlast_SpawnWhiteCustomScale(PlayState* play, Vec3f* pos, Vec3f* velocity, Vec3f* accel, s16 scale,
s16 scaleStep, s16 life) {
static Color_RGBA8 primColor = { 255, 255, 255, 255 };
static Color_RGBA8 envColor = { 200, 200, 200, 0 };
static Color_RGBA8 sPrimColor = { 255, 255, 255, 255 };
static Color_RGBA8 sEnvColor = { 200, 200, 200, 0 };
EffectSsBlast_Spawn(play, pos, velocity, accel, &primColor, &envColor, scale, scaleStep, 35, life);
EffectSsBlast_Spawn(play, pos, velocity, accel, &sPrimColor, &sEnvColor, scale, scaleStep, 35, life);
}
void EffectSsBlast_SpawnShockwave(PlayState* play, Vec3f* pos, Vec3f* velocity, Vec3f* accel, Color_RGBA8* primColor,
@@ -328,10 +328,10 @@ void EffectSsBlast_SpawnShockwave(PlayState* play, Vec3f* pos, Vec3f* velocity,
}
void EffectSsBlast_SpawnWhiteShockwave(PlayState* play, Vec3f* pos, Vec3f* velocity, Vec3f* accel) {
static Color_RGBA8 primColor = { 255, 255, 255, 255 };
static Color_RGBA8 envColor = { 200, 200, 200, 0 };
static Color_RGBA8 sPrimColor = { 255, 255, 255, 255 };
static Color_RGBA8 sEnvColor = { 200, 200, 200, 0 };
EffectSsBlast_SpawnShockwave(play, pos, velocity, accel, &primColor, &envColor, 10);
EffectSsBlast_SpawnShockwave(play, pos, velocity, accel, &sPrimColor, &sEnvColor, 10);
}
// EffectSsGSpk Spawn Functions
@@ -756,8 +756,8 @@ void EffectSsIcePiece_Spawn(PlayState* play, Vec3f* pos, f32 scale, Vec3f* veloc
}
void EffectSsIcePiece_SpawnBurst(PlayState* play, Vec3f* refPos, f32 scale) {
static Vec3f accel = { 0.0f, 0.0f, 0.0f };
static Vec3f vecScales[] = {
static Vec3f sAccel = { 0.0f, 0.0f, 0.0f };
static Vec3f sVecScales[] = {
{ 0.0f, 70.0f, 0.0f },
{ 0.0f, 45.0f, 20.0f },
{ 17.320474f, 45.0f, 9.999695f },
@@ -774,20 +774,20 @@ void EffectSsIcePiece_SpawnBurst(PlayState* play, Vec3f* refPos, f32 scale) {
Vec3f pos;
f32 velocityScale;
accel.y = -0.2f;
sAccel.y = -0.2f;
for (i = 0; i < ARRAY_COUNT(vecScales); i++) {
for (i = 0; i < ARRAY_COUNT(sVecScales); i++) {
pos = *refPos;
velocityScale = Rand_ZeroFloat(1.0f) + 0.5f;
velocity.x = (vecScales[i].x * 0.18f) * velocityScale;
velocity.y = (vecScales[i].y * 0.18f) * velocityScale;
velocity.z = (vecScales[i].z * 0.18f) * velocityScale;
pos.x += vecScales[i].x;
pos.y += vecScales[i].y;
pos.z += vecScales[i].z;
velocity.x = (sVecScales[i].x * 0.18f) * velocityScale;
velocity.y = (sVecScales[i].y * 0.18f) * velocityScale;
velocity.z = (sVecScales[i].z * 0.18f) * velocityScale;
pos.x += sVecScales[i].x;
pos.y += sVecScales[i].y;
pos.z += sVecScales[i].z;
EffectSsIcePiece_Spawn(play, &pos, (Rand_ZeroFloat(1.0f) + 0.5f) * ((scale * 1.3f) * 100.0f), &velocity, &accel,
25);
EffectSsIcePiece_Spawn(play, &pos, (Rand_ZeroFloat(1.0f) + 0.5f) * ((scale * 1.3f) * 100.0f), &velocity,
&sAccel, 25);
}
}
@@ -812,10 +812,10 @@ void EffectSsEnIce_SpawnFlying(PlayState* play, Actor* actor, Vec3f* pos, Color_
}
void func_800B2B44(PlayState* play, Actor* actor, Vec3f* pos, f32 scale) {
static Color_RGBA8 primColor = { 150, 150, 150, 250 };
static Color_RGBA8 envColor = { 235, 245, 255, 255 };
static Color_RGBA8 sPrimColor = { 150, 150, 150, 250 };
static Color_RGBA8 sEnvColor = { 235, 245, 255, 255 };
EffectSsEnIce_SpawnFlying(play, actor, pos, &primColor, &envColor, scale);
EffectSsEnIce_SpawnFlying(play, actor, pos, &sPrimColor, &sEnvColor, scale);
}
void func_800B2B7C(PlayState* play, Actor* actor, Vec3s* arg2, f32 scale) {
@@ -863,17 +863,17 @@ void EffectSsFireTail_Spawn(PlayState* play, Actor* actor, Vec3f* pos, f32 scale
void EffectSsFireTail_SpawnFlame(PlayState* play, Actor* actor, Vec3f* pos, f32 arg3, s16 bodyPart,
f32 colorIntensity) {
static Color_RGBA8 primColor = { 255, 255, 0, 255 };
static Color_RGBA8 envColor = { 255, 0, 0, 255 };
static Color_RGBA8 sPrimColor = { 255, 255, 0, 255 };
static Color_RGBA8 sEnvColor = { 255, 0, 0, 255 };
primColor.g = (s32)(255.0f * colorIntensity);
primColor.b = 0;
sPrimColor.g = (s32)(255.0f * colorIntensity);
sPrimColor.b = 0;
envColor.g = 0;
envColor.b = 0;
primColor.r = envColor.r = (s32)(255.0f * colorIntensity);
sEnvColor.g = 0;
sEnvColor.b = 0;
sPrimColor.r = sEnvColor.r = (s32)(255.0f * colorIntensity);
EffectSsFireTail_Spawn(play, actor, pos, arg3, &actor->velocity, 15, &primColor, &envColor,
EffectSsFireTail_Spawn(play, actor, pos, arg3, &actor->velocity, 15, &sPrimColor, &sEnvColor,
(colorIntensity == 1.0f) ? 0 : 1, bodyPart, 1);
}
@@ -962,15 +962,15 @@ void EffectSsDeadDb_Spawn(PlayState* play, Vec3f* pos, Vec3f* velocity, Vec3f* a
void func_800B3030(PlayState* play, Vec3f* pos, Vec3f* velocity, Vec3f* accel, s16 scale, s16 scaleStep,
s32 colorIndex) {
static Color_RGBA8 primColor = { 255, 255, 255, 255 };
static Color_RGBA8 envColors[] = {
static Color_RGBA8 sPrimColor = { 255, 255, 255, 255 };
static Color_RGBA8 sEnvColors[] = {
{ 255, 0, 0, 255 },
{ 0, 255, 0, 255 },
{ 0, 0, 255, 255 },
{ 150, 150, 150, 255 },
};
EffectSsDeadDb_Spawn(play, pos, velocity, accel, &primColor, &envColors[colorIndex], scale, scaleStep, 9);
EffectSsDeadDb_Spawn(play, pos, velocity, accel, &sPrimColor, &sEnvColors[colorIndex], scale, scaleStep, 9);
}
// EffectSsDeadDd Spawn Functions
+7 -7
View File
@@ -2856,8 +2856,8 @@ void Player_DrawCouplesMask(PlayState* play, Player* player) {
}
void Player_DrawCircusLeadersMask(PlayState* play, Player* player) {
static Vec3f bubbleVelocity = { 0.0f, 0.0f, 0.0f };
static Vec3f bubbleAccel = { 0.0f, 0.0f, 0.0f };
static Vec3f sBubbleVelocity = { 0.0f, 0.0f, 0.0f };
static Vec3f sBubbleAccel = { 0.0f, 0.0f, 0.0f };
Gfx* gfx;
s32 i;
@@ -2897,8 +2897,8 @@ void Player_DrawCircusLeadersMask(PlayState* play, Player* player) {
s16 phi_s0 = speedXZ * 2000.0f;
f32 temp_f20;
bubbleVelocity.y = speedXZ * 0.4f;
bubbleAccel.y = -0.3f;
sBubbleVelocity.y = speedXZ * 0.4f;
sBubbleAccel.y = -0.3f;
if (phi_s0 > 0x3E80) {
phi_s0 = 0x3E80;
@@ -2908,10 +2908,10 @@ void Player_DrawCircusLeadersMask(PlayState* play, Player* player) {
temp_f20 = speedXZ * 0.2f;
temp_f20 = CLAMP_MAX(temp_f20, 4.0f);
bubbleVelocity.x = -Math_SinS(phi_s0) * temp_f20;
bubbleVelocity.z = -Math_CosS(phi_s0) * temp_f20;
sBubbleVelocity.x = -Math_SinS(phi_s0) * temp_f20;
sBubbleVelocity.z = -Math_CosS(phi_s0) * temp_f20;
EffectSsDtBubble_SpawnColorProfile(play, &D_801F59B0[i], &bubbleVelocity, &bubbleAccel, 20, 20, 3, 0);
EffectSsDtBubble_SpawnColorProfile(play, &D_801F59B0[i], &sBubbleVelocity, &sBubbleAccel, 20, 20, 3, 0);
D_801F59C8[i] -= 400;
}
}