summaryrefslogtreecommitdiff
path: root/src/overlays/effects
diff options
context:
space:
mode:
authorengineer124 <47598039+engineer124@users.noreply.github.com>2023-06-06 12:16:34 +1000
committerGitHub <noreply@github.com>2023-06-05 22:16:34 -0400
commit7f5087d0b2014dc1ba2bbfc7ce858f0059a8a7cb (patch)
treea56edb9e5d173d9e24bdce4a373e9fe38253cb34 /src/overlays/effects
parentf92a61db27ed8ee213072df11169777c6794bc1b (diff)
sys_math.c Rename (#1258)
* rename via comments * missed a comment * math header * name boot_80086760.c functions * PR Review * rm cam comment * Elliptic review * alphabetical
Diffstat (limited to 'src/overlays/effects')
-rw-r--r--src/overlays/effects/ovl_Effect_Ss_En_Ice/z_eff_ss_en_ice.c4
-rw-r--r--src/overlays/effects/ovl_Effect_Ss_Fhg_Flash/z_eff_ss_fhg_flash.c12
-rw-r--r--src/overlays/effects/ovl_Effect_Ss_Kirakira/z_eff_ss_kirakira.c4
-rw-r--r--src/overlays/effects/ovl_Effect_Ss_Sbn/z_eff_ss_sbn.c2
4 files changed, 11 insertions, 11 deletions
diff --git a/src/overlays/effects/ovl_Effect_Ss_En_Ice/z_eff_ss_en_ice.c b/src/overlays/effects/ovl_Effect_Ss_En_Ice/z_eff_ss_en_ice.c
index 14d5d5c6e..cf019c6cf 100644
--- a/src/overlays/effects/ovl_Effect_Ss_En_Ice/z_eff_ss_en_ice.c
+++ b/src/overlays/effects/ovl_Effect_Ss_En_Ice/z_eff_ss_en_ice.c
@@ -60,7 +60,7 @@ u32 EffectSsEnIce_Init(PlayState* play, u32 index, EffectSs* this, void* initPar
this->rEnvColorG = initParams->envColor.g;
this->rEnvColorB = initParams->envColor.b;
this->rAlphaMode = 1;
- this->rPitch = randPlusMinusPoint5Scaled(0x10000);
+ this->rPitch = Rand_CenteredFloat(0x10000);
} else if (initParams->type == ENICE_TYPE_NORMAL) {
Math_Vec3f_Copy(&this->pos, &initParams->pos);
Math_Vec3f_Copy(&this->vec, &initParams->pos);
@@ -142,7 +142,7 @@ void EffectSsEnIce_UpdateFlying(PlayState* play, u32 index, EffectSs* this) {
} else {
this->actor = NULL;
if (this->life >= 9) {
- rand = randPlusMinusPoint5Scaled(0xFFFF);
+ rand = Rand_CenteredFloat(0xFFFF);
this->accel.x = Math_SinS(rand) * (Rand_ZeroOne() + 1.0f);
this->accel.z = Math_CosS(rand) * (Rand_ZeroOne() + 1.0f);
this->life = 8;
diff --git a/src/overlays/effects/ovl_Effect_Ss_Fhg_Flash/z_eff_ss_fhg_flash.c b/src/overlays/effects/ovl_Effect_Ss_Fhg_Flash/z_eff_ss_fhg_flash.c
index f2038c768..4edc1e3b1 100644
--- a/src/overlays/effects/ovl_Effect_Ss_Fhg_Flash/z_eff_ss_fhg_flash.c
+++ b/src/overlays/effects/ovl_Effect_Ss_Fhg_Flash/z_eff_ss_fhg_flash.c
@@ -90,9 +90,9 @@ void EffectSsFhgFlash_Update(PlayState* play, u32 index, EffectSs* this) {
Player* player = GET_PLAYER(play);
randBodyPart = Rand_ZeroFloat(PLAYER_BODYPART_MAX - 0.1f);
- this->pos.x = player->bodyPartsPos[randBodyPart].x + randPlusMinusPoint5Scaled(10.0f);
- this->pos.y = player->bodyPartsPos[randBodyPart].y + randPlusMinusPoint5Scaled(15.0f);
- this->pos.z = player->bodyPartsPos[randBodyPart].z + randPlusMinusPoint5Scaled(10.0f);
+ this->pos.x = player->bodyPartsPos[randBodyPart].x + Rand_CenteredFloat(10.0f);
+ this->pos.y = player->bodyPartsPos[randBodyPart].y + Rand_CenteredFloat(15.0f);
+ this->pos.z = player->bodyPartsPos[randBodyPart].z + Rand_CenteredFloat(10.0f);
} else if ((this->rParams >= FHGFLASH_SHOCK_GOHT_2) && (this->rParams <= FHGFLASH_SHOCK_GOHT_6)) {
s32 pad;
Vec3f* bodyPartPos;
@@ -105,9 +105,9 @@ void EffectSsFhgFlash_Update(PlayState* play, u32 index, EffectSs* this) {
bodyPartPos = &goht->unk_2F00[this->rParams][index].unk_00;
}
- this->pos.x = randPlusMinusPoint5Scaled(70.0f) + bodyPartPos->x;
- this->pos.y = randPlusMinusPoint5Scaled(70.0f) + bodyPartPos->y;
- this->pos.z = randPlusMinusPoint5Scaled(70.0f) + bodyPartPos->z;
+ this->pos.x = Rand_CenteredFloat(70.0f) + bodyPartPos->x;
+ this->pos.y = Rand_CenteredFloat(70.0f) + bodyPartPos->y;
+ this->pos.z = Rand_CenteredFloat(70.0f) + bodyPartPos->z;
}
if (this->life < 100) {
this->rAlpha -= 50;
diff --git a/src/overlays/effects/ovl_Effect_Ss_Kirakira/z_eff_ss_kirakira.c b/src/overlays/effects/ovl_Effect_Ss_Kirakira/z_eff_ss_kirakira.c
index 4e395141b..4e8f11f5c 100644
--- a/src/overlays/effects/ovl_Effect_Ss_Kirakira/z_eff_ss_kirakira.c
+++ b/src/overlays/effects/ovl_Effect_Ss_Kirakira/z_eff_ss_kirakira.c
@@ -139,8 +139,8 @@ void func_80977DB4(PlayState* play, u32 index, EffectSs* this) {
void func_80977E6C(PlayState* play, u32 index, EffectSs* this) {
this->velocity.x *= 0.95f;
this->velocity.z *= 0.95f;
- this->accel.x = randPlusMinusPoint5Scaled(0.2f);
- this->accel.z = randPlusMinusPoint5Scaled(0.2f);
+ this->accel.x = Rand_CenteredFloat(0.2f);
+ this->accel.z = Rand_CenteredFloat(0.2f);
this->rEnvColorA += this->rAlphaStep;
if (this->rEnvColorA < 0) {
diff --git a/src/overlays/effects/ovl_Effect_Ss_Sbn/z_eff_ss_sbn.c b/src/overlays/effects/ovl_Effect_Ss_Sbn/z_eff_ss_sbn.c
index f79e59340..69b24c029 100644
--- a/src/overlays/effects/ovl_Effect_Ss_Sbn/z_eff_ss_sbn.c
+++ b/src/overlays/effects/ovl_Effect_Ss_Sbn/z_eff_ss_sbn.c
@@ -68,7 +68,7 @@ u32 EffectSsSbn_Init(PlayState* play, u32 index, EffectSs* this, void* initParam
this->rReg4 = 250;
this->rReg4Step = 30;
- this->rScale = randPlusMinusPoint5Scaled(100.0f) + (initParams->scale * 120.0f);
+ this->rScale = Rand_CenteredFloat(100.0f) + (initParams->scale * 120.0f);
if (this->rScale < 600) {
this->rScale = 600;
} else if (this->rScale > 1500) {