diff options
author | Marisa-Chan | 2013-10-17 20:33:41 +0000 |
---|---|---|
committer | Marisa-Chan | 2013-10-18 19:48:57 +0000 |
commit | f1c6b58a943689c35bb448094577cfede19b92fc (patch) | |
tree | 4c63912381281b7d923173f5b72bf81ffc90749e | |
parent | cf99a88322474f2412edc737b9a0c6a38f373610 (diff) | |
download | scummvm-rg350-f1c6b58a943689c35bb448094577cfede19b92fc.tar.gz scummvm-rg350-f1c6b58a943689c35bb448094577cfede19b92fc.tar.bz2 scummvm-rg350-f1c6b58a943689c35bb448094577cfede19b92fc.zip |
ZVISION: Select needed workingWindow for ZGI and Nemesis.
-rw-r--r-- | engines/zvision/zvision.cpp | 4 | ||||
-rw-r--r-- | engines/zvision/zvision.h | 14 |
2 files changed, 14 insertions, 4 deletions
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; |