From f1c6b58a943689c35bb448094577cfede19b92fc Mon Sep 17 00:00:00 2001 From: Marisa-Chan Date: Thu, 17 Oct 2013 20:33:41 +0000 Subject: ZVISION: Select needed workingWindow for ZGI and Nemesis. --- engines/zvision/zvision.cpp | 4 +++- engines/zvision/zvision.h | 14 +++++++++++--- 2 files changed, 14 insertions(+), 4 deletions(-) (limited to 'engines') diff --git a/engines/zvision/zvision.cpp b/engines/zvision/zvision.cpp index 6d8ae6d5a7..940e01ae20 100644 --- a/engines/zvision/zvision.cpp +++ b/engines/zvision/zvision.cpp @@ -51,7 +51,9 @@ namespace ZVision { ZVision::ZVision(OSystem *syst, const ZVisionGameDescription *gameDesc) : Engine(syst), _gameDescription(gameDesc), - _workingWindow((WINDOW_WIDTH - WORKING_WINDOW_WIDTH) / 2, (WINDOW_HEIGHT - WORKING_WINDOW_HEIGHT) / 2, ((WINDOW_WIDTH - WORKING_WINDOW_WIDTH) / 2) + WORKING_WINDOW_WIDTH, ((WINDOW_HEIGHT - WORKING_WINDOW_HEIGHT) / 2) + WORKING_WINDOW_HEIGHT), + _workingWindow_ZGI((WINDOW_WIDTH - WORKING_WINDOW_WIDTH) / 2, (WINDOW_HEIGHT - WORKING_WINDOW_HEIGHT) / 2, ((WINDOW_WIDTH - WORKING_WINDOW_WIDTH) / 2) + WORKING_WINDOW_WIDTH, ((WINDOW_HEIGHT - WORKING_WINDOW_HEIGHT) / 2) + WORKING_WINDOW_HEIGHT), + _workingWindow_ZNM((WINDOW_WIDTH - ZNM_WORKING_WINDOW_WIDTH) / 2, (WINDOW_HEIGHT - ZNM_WORKING_WINDOW_HEIGHT) / 2, ((WINDOW_WIDTH - ZNM_WORKING_WINDOW_WIDTH) / 2) + ZNM_WORKING_WINDOW_WIDTH, ((WINDOW_HEIGHT - ZNM_WORKING_WINDOW_HEIGHT) / 2) + ZNM_WORKING_WINDOW_HEIGHT), + _workingWindow(gameDesc->gameId == GID_NEMESIS ? _workingWindow_ZNM : _workingWindow_ZGI), _pixelFormat(2, 5, 6, 5, 0, 11, 5, 0, 0), /*RGB 565*/ _desiredFrameTime(33), /* ~30 fps */ _clock(_system), diff --git a/engines/zvision/zvision.h b/engines/zvision/zvision.h index 84784d9a89..89aa60fe73 100644 --- a/engines/zvision/zvision.h +++ b/engines/zvision/zvision.h @@ -63,15 +63,21 @@ public: * are given in this coordinate space. Also, all images are clipped to the * edges of this Rectangle */ - const Common::Rect _workingWindow; + const Common::Rect &_workingWindow; const Graphics::PixelFormat _pixelFormat; private: enum { WINDOW_WIDTH = 640, WINDOW_HEIGHT = 480, - WORKING_WINDOW_WIDTH = 512, - WORKING_WINDOW_HEIGHT = 320, + + //Zork nemesis working window sizes + ZNM_WORKING_WINDOW_WIDTH = 512, + ZNM_WORKING_WINDOW_HEIGHT = 320, + + //ZGI(and default) working window sizes + WORKING_WINDOW_WIDTH = 640, + WORKING_WINDOW_HEIGHT = 344, ROTATION_SCREEN_EDGE_OFFSET = 60, MAX_ROTATION_SPEED = 400 // Pixels per second @@ -98,6 +104,8 @@ private: // To prevent allocation every time we process events Common::Event _event; + const Common::Rect _workingWindow_ZGI; + const Common::Rect _workingWindow_ZNM; public: uint32 getFeatures() const; Common::Language getLanguage() const; -- cgit v1.2.3