mirror of
https://github.com/izzy2lost/2ship2harkinian-Android.git
synced 2026-06-19 01:20:08 -07:00
Quake & Distortion Docs (Again) + Math Cleanup (Camera Prep) (#1129)
* more quake docs * more docs * more distortion docs * math cleanup * fix header * cleanup * only partial PR review * PR Suggestions * fix master merge * reverb angle change macros * more revert * fix enum
This commit is contained in:
+12
-13
@@ -2574,7 +2574,7 @@ void Actor_Draw(PlayState* play, Actor* actor) {
|
||||
(actor->flags & (ACTOR_FLAG_10000000 | ACTOR_FLAG_400000)) ? NULL : &actor->world.pos, play);
|
||||
Lights_Draw(light, play->state.gfxCtx);
|
||||
|
||||
if (actor->flags & ACTOR_FLAG_1000) {
|
||||
if (actor->flags & ACTOR_FLAG_IGNORE_QUAKE) {
|
||||
Matrix_SetTranslateRotateYXZ(actor->world.pos.x + play->mainCamera.quakeOffset.x,
|
||||
actor->world.pos.y +
|
||||
((actor->shape.yOffset * actor->scale.y) + play->mainCamera.quakeOffset.y),
|
||||
@@ -3791,30 +3791,29 @@ void func_800BC620(Vec3f* pos, Vec3f* scale, u8 alpha, PlayState* play) {
|
||||
CLOSE_DISPS(play->state.gfxCtx);
|
||||
}
|
||||
|
||||
void Actor_AddQuake(PlayState* play, s16 verticalMag, s16 countdown) {
|
||||
s16 quakeIndex = Quake_Add(&play->mainCamera, QUAKE_TYPE_3);
|
||||
void Actor_RequestQuake(PlayState* play, s16 y, s16 duration) {
|
||||
s16 quakeIndex = Quake_Request(&play->mainCamera, QUAKE_TYPE_3);
|
||||
|
||||
Quake_SetSpeed(quakeIndex, 20000);
|
||||
Quake_SetQuakeValues(quakeIndex, verticalMag, 0, 0, 0);
|
||||
Quake_SetCountdown(quakeIndex, countdown);
|
||||
Quake_SetPerturbations(quakeIndex, y, 0, 0, 0);
|
||||
Quake_SetDuration(quakeIndex, duration);
|
||||
}
|
||||
|
||||
void Actor_AddQuakeWithSpeed(PlayState* play, s16 verticalMag, s16 countdown, s16 speed) {
|
||||
s16 quakeIndex = Quake_Add(&play->mainCamera, QUAKE_TYPE_3);
|
||||
void Actor_RequestQuakeWithSpeed(PlayState* play, s16 y, s16 duration, s16 speed) {
|
||||
s16 quakeIndex = Quake_Request(&play->mainCamera, QUAKE_TYPE_3);
|
||||
|
||||
Quake_SetSpeed(quakeIndex, speed);
|
||||
Quake_SetQuakeValues(quakeIndex, verticalMag, 0, 0, 0);
|
||||
Quake_SetCountdown(quakeIndex, countdown);
|
||||
Quake_SetPerturbations(quakeIndex, y, 0, 0, 0);
|
||||
Quake_SetDuration(quakeIndex, duration);
|
||||
}
|
||||
|
||||
// Actor_RequestRumble?
|
||||
void func_800BC848(Actor* actor, PlayState* play, s16 y, s16 countdown) {
|
||||
if (y >= 5) {
|
||||
void Actor_RequestQuakeAndRumble(Actor* actor, PlayState* play, s16 quakeY, s16 quakeDuration) {
|
||||
if (quakeY >= 5) {
|
||||
Rumble_Request(actor->xyzDistToPlayerSq, 255, 20, 150);
|
||||
} else {
|
||||
Rumble_Request(actor->xyzDistToPlayerSq, 180, 20, 100);
|
||||
}
|
||||
Actor_AddQuake(play, y, countdown);
|
||||
Actor_RequestQuake(play, quakeY, quakeDuration);
|
||||
}
|
||||
|
||||
typedef struct {
|
||||
|
||||
Reference in New Issue
Block a user