diff options
| author | engineer124 <47598039+engineer124@users.noreply.github.com> | 2022-09-30 22:01:39 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-09-30 23:01:39 -0300 |
| commit | ab5fd663ccddc0670773a047f4a30bf014a7dad4 (patch) | |
| tree | 37011a91071e4acd136aa2e587b2dcb0a2b6dfcd /src/code/z_actor.c | |
| parent | b080fb370032738769467242c7a1a7945f972836 (diff) | |
Quake & Distortion Cleanup (#1102)
* quake cleanup
* cleanup
* more cleanup
* remove cast
* q comes before r...
* unname goron function, leave it to another PR
* PR Suggestions
Diffstat (limited to 'src/code/z_actor.c')
| -rw-r--r-- | src/code/z_actor.c | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/src/code/z_actor.c b/src/code/z_actor.c index e82e5d2b9..389f7a051 100644 --- a/src/code/z_actor.c +++ b/src/code/z_actor.c @@ -5,6 +5,7 @@ #include "global.h" #include "z64load.h" +#include "z64quake.h" #include "z64rumble.h" #include "overlays/actors/ovl_En_Horse/z_en_horse.h" #include "overlays/actors/ovl_En_Part/z_en_part.h" @@ -3777,20 +3778,20 @@ void func_800BC620(Vec3f* arg0, Vec3f* arg1, u8 alpha, PlayState* play) { CLOSE_DISPS(play->state.gfxCtx); } -void func_800BC770(PlayState* play, s16 y, s16 countdown) { - s16 idx = Quake_Add(&play->mainCamera, 3); +void Actor_AddQuake(PlayState* play, s16 verticalMag, s16 countdown) { + s16 quakeIndex = Quake_Add(&play->mainCamera, QUAKE_TYPE_3); - Quake_SetSpeed(idx, 20000); - Quake_SetQuakeValues(idx, y, 0, 0, 0); - Quake_SetCountdown(idx, countdown); + Quake_SetSpeed(quakeIndex, 20000); + Quake_SetQuakeValues(quakeIndex, verticalMag, 0, 0, 0); + Quake_SetCountdown(quakeIndex, countdown); } -void func_800BC7D8(PlayState* play, s16 y, s16 countdown, s16 speed) { - s16 idx = Quake_Add(&play->mainCamera, 3); +void Actor_AddQuakeWithSpeed(PlayState* play, s16 verticalMag, s16 countdown, s16 speed) { + s16 quakeIndex = Quake_Add(&play->mainCamera, QUAKE_TYPE_3); - Quake_SetSpeed(idx, speed); - Quake_SetQuakeValues(idx, y, 0, 0, 0); - Quake_SetCountdown(idx, countdown); + Quake_SetSpeed(quakeIndex, speed); + Quake_SetQuakeValues(quakeIndex, verticalMag, 0, 0, 0); + Quake_SetCountdown(quakeIndex, countdown); } // Actor_RequestRumble? @@ -3800,7 +3801,7 @@ void func_800BC848(Actor* actor, PlayState* play, s16 y, s16 countdown) { } else { Rumble_Request(actor->xyzDistToPlayerSq, 180, 20, 100); } - func_800BC770(play, y, countdown); + Actor_AddQuake(play, y, countdown); } typedef struct { |
