Camera Preparation (#644)

* Copy progress from z_camera

* cleanup functions.h

* Oops

* Revert `SUB16` and `ADD16` back to original names

* PR Suggestions

* PR Suggestions

* Fix merge with master
This commit is contained in:
engineer124
2022-02-20 11:33:47 +11:00
committed by GitHub
parent 71c0120fbd
commit fa069535d0
64 changed files with 424 additions and 384 deletions
+3 -3
View File
@@ -137,7 +137,7 @@ QuakeRequest* Quake_AddImpl(Camera* camera, u32 callbackIdx) {
__osMemset(req, 0, sizeof(QuakeRequest));
req->camera = camera;
req->cameraPtrsIdx = camera->thisIdx;
req->camId = camera->camId;
req->callbackIdx = callbackIdx;
req->isShakePerpendicular = true;
req->randIdx = ((s16)(Rand_ZeroOne() * (f32)0x10000) & ~3) + idx;
@@ -326,10 +326,10 @@ s16 Quake_Calc(Camera* camera, QuakeCamCalc* camData) {
for (idx = 0; idx < ARRAY_COUNT(sQuakeRequest); idx++) {
req = &sQuakeRequest[idx];
if (req->callbackIdx != 0) {
if (globalCtx->cameraPtrs[req->cameraPtrsIdx] == NULL) {
if (globalCtx->cameraPtrs[req->camId] == NULL) {
Quake_Remove(req);
} else {
eq = (camera->thisIdx != req->camera->thisIdx);
eq = (camera->camId != req->camera->camId);
absSpeedDiv = ABS(req->speed) / (f32)0x8000;
if (sQuakeCallbacks[req->callbackIdx](req, &shake) == 0) {
Quake_Remove(req);