diff options
| author | petrie911 <69443847+petrie911@users.noreply.github.com> | 2020-12-26 04:44:53 -0600 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-12-26 05:44:53 -0500 |
| commit | 8fa6cb6ff927496403f950fc86146d6aabe9773f (patch) | |
| tree | 6b302cf5354f3ef31304a77cd42a6a8782ac363f /src/code/z_quake.c | |
| parent | 81c269b417ad31954b4d7efdd114e02201c02334 (diff) | |
Consistent naming for Math_ functions (#542)
* Darkmeiro decompilation
Bg_Gnd_Darkmeiro decompiled, matched, and documented.
* give this a shot
* fix conflict
* one more try
* could be useful
* whoops
* ZAP2 stuff
* ZAP why
* ZAP again
* maths
* Factoriali -> Factorial
* soon, soon
* renames
* rand
* docs
* merged
* formatting
* little more cleanup
* asm crept back in
* changes to MathF
* smooth criminal
* functions.h
Diffstat (limited to 'src/code/z_quake.c')
| -rw-r--r-- | src/code/z_quake.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/src/code/z_quake.c b/src/code/z_quake.c index 3638e3a76..8bf332420 100644 --- a/src/code/z_quake.c +++ b/src/code/z_quake.c @@ -64,8 +64,8 @@ void Quake_UpdateShakeInfo(QuakeRequest* req, ShakeInfo* shake, f32 y, f32 x) { s16 Quake_Callback1(QuakeRequest* req, ShakeInfo* shake) { s32 pad; if (req->countdown > 0) { - f32 a = Math_Sins(req->speed * req->countdown); - Quake_UpdateShakeInfo(req, shake, a, Math_Rand_ZeroOne() * a); + f32 a = Math_SinS(req->speed * req->countdown); + Quake_UpdateShakeInfo(req, shake, a, Rand_ZeroOne() * a); req->countdown--; } return req->countdown; @@ -73,7 +73,7 @@ s16 Quake_Callback1(QuakeRequest* req, ShakeInfo* shake) { s16 Quake_Callback5(QuakeRequest* req, ShakeInfo* shake) { if (req->countdown > 0) { - f32 a = Math_Sins(req->speed * req->countdown); + f32 a = Math_SinS(req->speed * req->countdown); Quake_UpdateShakeInfo(req, shake, a, a); req->countdown--; } @@ -85,14 +85,14 @@ s16 Quake_Callback6(QuakeRequest* req, ShakeInfo* shake) { f32 a; req->countdown--; - a = Math_Sins(req->speed * ((req->countdown & 0xF) + 500)); - Quake_UpdateShakeInfo(req, shake, a, Math_Rand_ZeroOne() * a); + a = Math_SinS(req->speed * ((req->countdown & 0xF) + 500)); + Quake_UpdateShakeInfo(req, shake, a, Rand_ZeroOne() * a); return 1; } s16 Quake_Callback3(QuakeRequest* req, ShakeInfo* shake) { if (req->countdown > 0) { - f32 a = Math_Sins(req->speed * req->countdown) * ((f32)req->countdown / (f32)req->countdownMax); + f32 a = Math_SinS(req->speed * req->countdown) * ((f32)req->countdown / (f32)req->countdownMax); Quake_UpdateShakeInfo(req, shake, a, a); req->countdown--; } @@ -101,8 +101,8 @@ s16 Quake_Callback3(QuakeRequest* req, ShakeInfo* shake) { s16 Quake_Callback2(QuakeRequest* req, ShakeInfo* shake) { if (req->countdown > 0) { - f32 a = Math_Rand_ZeroOne(); - Quake_UpdateShakeInfo(req, shake, a, Math_Rand_ZeroOne() * a); + f32 a = Rand_ZeroOne(); + Quake_UpdateShakeInfo(req, shake, a, Rand_ZeroOne() * a); req->countdown--; } return req->countdown; @@ -110,8 +110,8 @@ s16 Quake_Callback2(QuakeRequest* req, ShakeInfo* shake) { s16 Quake_Callback4(QuakeRequest* req, ShakeInfo* shake) { if (req->countdown > 0) { - f32 a = Math_Rand_ZeroOne() * ((f32)req->countdown / (f32)req->countdownMax); - Quake_UpdateShakeInfo(req, shake, a, Math_Rand_ZeroOne() * a); + f32 a = Rand_ZeroOne() * ((f32)req->countdown / (f32)req->countdownMax); + Quake_UpdateShakeInfo(req, shake, a, Rand_ZeroOne() * a); req->countdown--; } return req->countdown; @@ -151,7 +151,7 @@ QuakeRequest* Quake_AddImpl(Camera* cam, u32 callbackIdx) { req->camPtrIdx = cam->thisIdx; req->callbackIdx = callbackIdx; req->unk_1C = 1; - req->randIdx = ((s16)(Math_Rand_ZeroOne() * (f32)0x10000) & ~3) + idx; + req->randIdx = ((s16)(Rand_ZeroOne() * (f32)0x10000) & ~3) + idx; sQuakeRequestCount++; return req; |
