From fe21416bd6aa577cef4ce825be4052c2049dc92f Mon Sep 17 00:00:00 2001 From: Martin Gerhardy Date: Tue, 17 Nov 2020 21:44:16 +0100 Subject: [PATCH] TWINE: replaced magic numbers --- engines/twine/gamestate.cpp | 2 +- engines/twine/holomap.cpp | 4 ++-- engines/twine/renderer.h | 2 +- engines/twine/script_life_v1.cpp | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/engines/twine/gamestate.cpp b/engines/twine/gamestate.cpp index a4ce949f1ca..e4222084a88 100644 --- a/engines/twine/gamestate.cpp +++ b/engines/twine/gamestate.cpp @@ -446,7 +446,7 @@ void GameState::processGameoverAnimation() { _engine->_renderer->prepareIsoModel(gameOverPtr); _engine->_sound->stopSamples(); _engine->_music->stopMidiMusic(); // stop fade music - _engine->_renderer->setCameraPosition(320, 240, 128, 200, 200); + _engine->_renderer->setCameraPosition(SCREEN_WIDTH / 2, SCREEN_HEIGHT / 2, 128, 200, 200); int32 startLbaTime = _engine->lbaTime; _engine->_interface->setClip(left, top, right, bottom); diff --git a/engines/twine/holomap.cpp b/engines/twine/holomap.cpp index 11e254711ed..c7a4c7f39d9 100644 --- a/engines/twine/holomap.cpp +++ b/engines/twine/holomap.cpp @@ -157,8 +157,8 @@ void Holomap::processHolomap() { _engine->_screens->copyScreen(_engine->frontVideoBuffer, _engine->workVideoBuffer); loadHolomapGFX(); - drawHolomapTitle(320, 25); - _engine->_renderer->setCameraPosition(320, 190, 128, 1024, 1024); + drawHolomapTitle(SCREEN_WIDTH / 2, 25); + _engine->_renderer->setCameraPosition(SCREEN_WIDTH / 2, 190, 128, 1024, 1024); _engine->_text->initTextBank(TextBankId::Inventory_Intro_and_Holomap); _engine->_text->setFontCrossColor(9); diff --git a/engines/twine/renderer.h b/engines/twine/renderer.h index 896bb5a069e..373dba405fc 100644 --- a/engines/twine/renderer.h +++ b/engines/twine/renderer.h @@ -241,7 +241,7 @@ public: void renderBehaviourModel(int32 boxLeft, int32 boxTop, int32 boxRight, int32 boxBottom, int32 Y, int32 angle, uint8 *entityPtr); - void renderInventoryItem(int32 X, int32 Y, uint8 *itemBodyPtr, int32 angle, int32 param); + void renderInventoryItem(int32 x, int32 y, uint8 *itemBodyPtr, int32 angle, int32 param); }; } // namespace TwinE diff --git a/engines/twine/script_life_v1.cpp b/engines/twine/script_life_v1.cpp index bc8e0957340..9ba2b038bee 100644 --- a/engines/twine/script_life_v1.cpp +++ b/engines/twine/script_life_v1.cpp @@ -1431,7 +1431,7 @@ static int32 lPROJ_3D(TwinEEngine *engine, LifeScriptContext &ctx) { engine->flip(); engine->_scene->changeRoomVar10 = 0; - engine->_renderer->setCameraPosition(320, 240, 128, 1024, 1024); + engine->_renderer->setCameraPosition(SCREEN_WIDTH / 2, SCREEN_HEIGHT / 2, 128, 1024, 1024); engine->_renderer->setCameraAngle(0, 1500, 0, 25, -128, 0, 13000); engine->_renderer->setLightVector(896, 950, 0);