From e4b0be9f1dd53eef6c41646bb12ee4f7168498e7 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Thu, 8 Sep 2022 16:41:15 +0200 Subject: [PATCH] - pass a vector to JS_CameraParms --- source/games/sw/src/draw.cpp | 2 +- source/games/sw/src/jsector.cpp | 4 ++-- source/games/sw/src/jsector.h | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/source/games/sw/src/draw.cpp b/source/games/sw/src/draw.cpp index e247ea5ba..b6e74703b 100644 --- a/source/games/sw/src/draw.cpp +++ b/source/games/sw/src/draw.cpp @@ -1319,7 +1319,7 @@ void drawscreen(PLAYER* pp, double interpfrac, bool sceneonly) if (automapMode != am_full) { // Cameras must be done before the main loop. - JS_CameraParms(pp, tpos.X * worldtoint, tpos.Y * worldtoint, tpos.Z * zworldtoint); + JS_CameraParms(pp, tpos); } if (!sceneonly) diff --git a/source/games/sw/src/jsector.cpp b/source/games/sw/src/jsector.cpp index 431eaca0e..927051914 100644 --- a/source/games/sw/src/jsector.cpp +++ b/source/games/sw/src/jsector.cpp @@ -635,10 +635,10 @@ static PLAYER* cam_pp; DVector3 cam_pos; static int oldstat; -void JS_CameraParms(PLAYER* pp, int tx, int ty, int tz) +void JS_CameraParms(PLAYER* pp, const DVector3& tpos) { cam_pp = pp; - cam_pos = { tx * inttoworld, ty * inttoworld, tz * zinttoworld }; + cam_pos = tpos; } void GameInterface::UpdateCameras(double smoothratio) diff --git a/source/games/sw/src/jsector.h b/source/games/sw/src/jsector.h index 08e014d8c..7726ff556 100644 --- a/source/games/sw/src/jsector.h +++ b/source/games/sw/src/jsector.h @@ -64,7 +64,7 @@ extern bool mirrorinview; extern short NormalVisibility; void JAnalyzeSprites(tspritetype* tspr); -void JS_CameraParms(PLAYER* pp, int tx, int ty, int tz); +void JS_CameraParms(PLAYER* pp, const DVector3& tpos); void JS_DrawMirrors(PLAYER* pp,int tx,int ty,int tz,fixed_t tpq16ang,fixed_t tpq16horiz); void JS_InitMirrors(void); void JS_ProcessEchoSpot(void);