Struct Returns (#1466)

* change args

* more funcs

* cleanup

* play cleanup

* missed a file

* weird warnings

* missed some

* fix func from honotrap
This commit is contained in:
engineer124
2023-11-08 00:52:09 +11:00
committed by GitHub
parent 28e2da2a18
commit dfb6c5b02c
18 changed files with 303 additions and 358 deletions
+5 -5
View File
@@ -55,7 +55,7 @@ void Quake_UpdateShakeInfo(QuakeRequest* req, ShakeInfo* shake, f32 yOffset, f32
atEyeOffset.x = 0;
atEyeOffset.y = 0;
atEyeOffset.z = 0;
OLib_Vec3fDiffToVecGeo(&eyeToAtGeo, eye, at);
eyeToAtGeo = OLib_Vec3fDiffToVecGeo(eye, at);
// y shake
geo.r = req->y * yOffset;
@@ -63,7 +63,7 @@ void Quake_UpdateShakeInfo(QuakeRequest* req, ShakeInfo* shake, f32 yOffset, f32
geo.pitch = eyeToAtGeo.pitch + req->orientation.x + 0x4000;
geo.yaw = eyeToAtGeo.yaw + req->orientation.y;
// apply y shake
OLib_AddVecGeoToVec3f(&atEyeOffset, &atEyeOffset, &geo);
atEyeOffset = OLib_AddVecGeoToVec3f(&atEyeOffset, &geo);
// x shake
geo.r = req->x * xOffset;
@@ -71,7 +71,7 @@ void Quake_UpdateShakeInfo(QuakeRequest* req, ShakeInfo* shake, f32 yOffset, f32
geo.pitch = eyeToAtGeo.pitch + req->orientation.x;
geo.yaw = eyeToAtGeo.yaw + req->orientation.y + 0x4000;
// apply x shake
OLib_AddVecGeoToVec3f(&atEyeOffset, &atEyeOffset, &geo);
atEyeOffset = OLib_AddVecGeoToVec3f(&atEyeOffset, &geo);
} else {
atEyeOffset.x = 0;
atEyeOffset.y = req->y * yOffset;
@@ -81,7 +81,7 @@ void Quake_UpdateShakeInfo(QuakeRequest* req, ShakeInfo* shake, f32 yOffset, f32
geo.pitch = req->orientation.x;
geo.yaw = req->orientation.y;
OLib_AddVecGeoToVec3f(&atEyeOffset, &atEyeOffset, &geo);
atEyeOffset = OLib_AddVecGeoToVec3f(&atEyeOffset, &geo);
}
shake->atOffset = shake->eyeOffset = atEyeOffset;
@@ -752,7 +752,7 @@ void Distortion_Update(void) {
player = GET_PLAYER(play);
if (player != NULL) {
Actor_GetWorldPosShapeRot(&playerPosRot, &player->actor);
playerPosRot = Actor_GetWorldPosShapeRot(&player->actor);
}
depthPhaseStep = 359.2f;