From d0b341e6ca7010641c362bb36ebfc3d225955056 Mon Sep 17 00:00:00 2001 From: richiesams Date: Tue, 4 Jun 2013 14:17:19 -0500 Subject: ZVISION: Create zvision bare structure Add zvision base engine to engines/zvision as well as modify the necessary engine files (configure.engines, etc.) in order for it to be recognized. --- engines/zvision/zvision.h | 70 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 70 insertions(+) create mode 100644 engines/zvision/zvision.h (limited to 'engines/zvision/zvision.h') diff --git a/engines/zvision/zvision.h b/engines/zvision/zvision.h new file mode 100644 index 0000000000..c2a42f1e21 --- /dev/null +++ b/engines/zvision/zvision.h @@ -0,0 +1,70 @@ +/* ScummVM - Graphic Adventure Engine + * + * ScummVM is the legal property of its developers, whose names + * are too numerous to list here. Please refer to the COPYRIGHT + * file distributed with this source distribution. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * + */ + +#ifndef ZVISION_H +#define ZVISION_H + +#include "common/random.h" +#include "engines/engine.h" +#include "gui/debugger.h" + +namespace ZVision { + +struct ZVisionGameDescription; +class Console; + +// our engine debug channels +enum { + kZDebugExample = 1 << 0, + kZDebugExample2 = 1 << 1 + // next new channel must be 1 << 2 (4) + // the current limitation is 32 debug channels (1 << 31 is the last one) +}; + +class ZVision : public Engine { +public: + ZVision(OSystem *syst, const ZVisionGameDescription *gameDesc); + ~ZVision(); + + uint32 getFeatures() const; + Common::Language getLanguage() const; + virtual Common::Error run(); + +private: + Console *_console; + const ZVisionGameDescription *_gameDescription; + + // We need random numbers + Common::RandomSource *_rnd; +}; + +// Example console class +class Console : public GUI::Debugger { +public: + Console(ZVision *vm) {} + virtual ~Console(void) {} +}; + +} // End of namespace ZVision + +#endif -- cgit v1.2.3 From 160d6256f2f391f37bd02c5c060f5db33db2a2f0 Mon Sep 17 00:00:00 2001 From: richiesams Date: Wed, 19 Jun 2013 14:12:03 -0500 Subject: ZVISION: Create skeleton engine and move code away from Engine::Run The goal is to have Engine::Run as clean as possible. Aka mostly method calls. --- engines/zvision/zvision.h | 30 ++++++++++++++++++++++++------ 1 file changed, 24 insertions(+), 6 deletions(-) (limited to 'engines/zvision/zvision.h') diff --git a/engines/zvision/zvision.h b/engines/zvision/zvision.h index c2a42f1e21..b4664d0e29 100644 --- a/engines/zvision/zvision.h +++ b/engines/zvision/zvision.h @@ -23,9 +23,12 @@ #ifndef ZVISION_H #define ZVISION_H - + #include "common/random.h" +#include "common/events.h" + #include "engines/engine.h" + #include "gui/debugger.h" namespace ZVision { @@ -45,17 +48,32 @@ class ZVision : public Engine { public: ZVision(OSystem *syst, const ZVisionGameDescription *gameDesc); ~ZVision(); - - uint32 getFeatures() const; - Common::Language getLanguage() const; - virtual Common::Error run(); - + private: Console *_console; const ZVisionGameDescription *_gameDescription; // We need random numbers Common::RandomSource *_rnd; + + // To prevent allocation every time we process events + Common::Event _event; + + bool _needsScreenUpdate; + +public: + uint32 getFeatures() const; + Common::Language getLanguage() const; + virtual Common::Error run(); + +private: + void processEvents(); + void onMouseDown(const Common::Point &pos); + void onMouseMove(const Common::Point &pos); + void onKeyDown(uint16 keyCode); + + void updateScripts(); + void updateAnimations(uint32 detaTimeMillis); }; // Example console class -- cgit v1.2.3 From 3283176f6d000cbb66208a0b5d4b3337004461fd Mon Sep 17 00:00:00 2001 From: richiesams Date: Thu, 27 Jun 2013 13:40:24 -0500 Subject: ZVISION: Move initialization code from run() and into its own method --- engines/zvision/zvision.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'engines/zvision/zvision.h') diff --git a/engines/zvision/zvision.h b/engines/zvision/zvision.h index b4664d0e29..c5ddb8ab4a 100644 --- a/engines/zvision/zvision.h +++ b/engines/zvision/zvision.h @@ -67,6 +67,8 @@ public: virtual Common::Error run(); private: + void initialize(); + void processEvents(); void onMouseDown(const Common::Point &pos); void onMouseMove(const Common::Point &pos); -- cgit v1.2.3 From ac96b943fa90270e1b5c1536f3b0d49bb6c3b161 Mon Sep 17 00:00:00 2001 From: richiesams Date: Mon, 1 Jul 2013 12:19:11 -0500 Subject: ZVISION: Create an instance of ScriptManager inside ZVision --- engines/zvision/zvision.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'engines/zvision/zvision.h') diff --git a/engines/zvision/zvision.h b/engines/zvision/zvision.h index c5ddb8ab4a..b57ce20e25 100644 --- a/engines/zvision/zvision.h +++ b/engines/zvision/zvision.h @@ -29,6 +29,8 @@ #include "engines/engine.h" +#include "zvision/scriptManager.h" + #include "gui/debugger.h" namespace ZVision { @@ -56,6 +58,8 @@ private: // We need random numbers Common::RandomSource *_rnd; + ScriptManager _scriptManager; + // To prevent allocation every time we process events Common::Event _event; -- cgit v1.2.3 From 8d9f90bf12c758ac4845f19ae8584c0c5ee264c8 Mon Sep 17 00:00:00 2001 From: richiesams Date: Mon, 1 Jul 2013 17:23:57 -0500 Subject: ZVISION: Create ScriptManager accessor for ZVision Having the ScriptManager as a member variable forced it to be const, which prevented any non cont methods to be used. Thus, ScriptManager is created on the heap and disposed after use. --- engines/zvision/zvision.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'engines/zvision/zvision.h') diff --git a/engines/zvision/zvision.h b/engines/zvision/zvision.h index b57ce20e25..b0cd1aec5a 100644 --- a/engines/zvision/zvision.h +++ b/engines/zvision/zvision.h @@ -58,7 +58,7 @@ private: // We need random numbers Common::RandomSource *_rnd; - ScriptManager _scriptManager; + ScriptManager *_scriptManager; // To prevent allocation every time we process events Common::Event _event; @@ -69,7 +69,8 @@ public: uint32 getFeatures() const; Common::Language getLanguage() const; virtual Common::Error run(); - + ScriptManager *getScriptManager() const; + private: void initialize(); -- cgit v1.2.3 From 1710468121648d494a393f7176c81027fec573c4 Mon Sep 17 00:00:00 2001 From: richiesams Date: Wed, 3 Jul 2013 15:45:46 -0500 Subject: ZVISION: Fix includes to use new underscore names --- engines/zvision/zvision.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'engines/zvision/zvision.h') diff --git a/engines/zvision/zvision.h b/engines/zvision/zvision.h index b0cd1aec5a..166d3c023f 100644 --- a/engines/zvision/zvision.h +++ b/engines/zvision/zvision.h @@ -29,7 +29,7 @@ #include "engines/engine.h" -#include "zvision/scriptManager.h" +#include "zvision/script_manager.h" #include "gui/debugger.h" -- cgit v1.2.3 From 187c119e934fd5887fb26e2dada5e1a4c856e056 Mon Sep 17 00:00:00 2001 From: richiesams Date: Wed, 3 Jul 2013 17:21:21 -0500 Subject: ZVISION: Create ResultAction 's for Add and Random. Create class templates for PlayAnimation, PreloadAnimation, and Attenuate --- engines/zvision/zvision.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'engines/zvision/zvision.h') diff --git a/engines/zvision/zvision.h b/engines/zvision/zvision.h index 166d3c023f..ac5796ad91 100644 --- a/engines/zvision/zvision.h +++ b/engines/zvision/zvision.h @@ -70,6 +70,7 @@ public: Common::Language getLanguage() const; virtual Common::Error run(); ScriptManager *getScriptManager() const; + Common::RandomSource *getRandomSource() const; private: void initialize(); @@ -89,7 +90,7 @@ public: Console(ZVision *vm) {} virtual ~Console(void) {} }; - + } // End of namespace ZVision #endif -- cgit v1.2.3 From 16cc970c9e1c7ccc06088de732abcd6ac51fa26a Mon Sep 17 00:00:00 2001 From: richiesams Date: Wed, 3 Jul 2013 17:50:40 -0500 Subject: ZVISION: Normalize remaining CRLF to LF for the remote --- engines/zvision/zvision.h | 188 +++++++++++++++++++++++----------------------- 1 file changed, 94 insertions(+), 94 deletions(-) (limited to 'engines/zvision/zvision.h') diff --git a/engines/zvision/zvision.h b/engines/zvision/zvision.h index ac5796ad91..0053fe5a9e 100644 --- a/engines/zvision/zvision.h +++ b/engines/zvision/zvision.h @@ -1,96 +1,96 @@ -/* ScummVM - Graphic Adventure Engine - * - * ScummVM is the legal property of its developers, whose names - * are too numerous to list here. Please refer to the COPYRIGHT - * file distributed with this source distribution. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * - */ - -#ifndef ZVISION_H -#define ZVISION_H - -#include "common/random.h" -#include "common/events.h" - -#include "engines/engine.h" - -#include "zvision/script_manager.h" - -#include "gui/debugger.h" - -namespace ZVision { - -struct ZVisionGameDescription; -class Console; - -// our engine debug channels -enum { - kZDebugExample = 1 << 0, - kZDebugExample2 = 1 << 1 - // next new channel must be 1 << 2 (4) - // the current limitation is 32 debug channels (1 << 31 is the last one) -}; - -class ZVision : public Engine { -public: - ZVision(OSystem *syst, const ZVisionGameDescription *gameDesc); - ~ZVision(); - -private: - Console *_console; - const ZVisionGameDescription *_gameDescription; - - // We need random numbers - Common::RandomSource *_rnd; - - ScriptManager *_scriptManager; - - // To prevent allocation every time we process events - Common::Event _event; - - bool _needsScreenUpdate; - -public: - uint32 getFeatures() const; - Common::Language getLanguage() const; - virtual Common::Error run(); - ScriptManager *getScriptManager() const; - Common::RandomSource *getRandomSource() const; - -private: - void initialize(); - - void processEvents(); +/* ScummVM - Graphic Adventure Engine + * + * ScummVM is the legal property of its developers, whose names + * are too numerous to list here. Please refer to the COPYRIGHT + * file distributed with this source distribution. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * + */ + +#ifndef ZVISION_H +#define ZVISION_H + +#include "common/random.h" +#include "common/events.h" + +#include "engines/engine.h" + +#include "zvision/script_manager.h" + +#include "gui/debugger.h" + +namespace ZVision { + +struct ZVisionGameDescription; +class Console; + +// our engine debug channels +enum { + kZDebugExample = 1 << 0, + kZDebugExample2 = 1 << 1 + // next new channel must be 1 << 2 (4) + // the current limitation is 32 debug channels (1 << 31 is the last one) +}; + +class ZVision : public Engine { +public: + ZVision(OSystem *syst, const ZVisionGameDescription *gameDesc); + ~ZVision(); + +private: + Console *_console; + const ZVisionGameDescription *_gameDescription; + + // We need random numbers + Common::RandomSource *_rnd; + + ScriptManager *_scriptManager; + + // To prevent allocation every time we process events + Common::Event _event; + + bool _needsScreenUpdate; + +public: + uint32 getFeatures() const; + Common::Language getLanguage() const; + virtual Common::Error run(); + ScriptManager *getScriptManager() const; + Common::RandomSource *getRandomSource() const; + +private: + void initialize(); + + void processEvents(); void onMouseDown(const Common::Point &pos); void onMouseMove(const Common::Point &pos); - void onKeyDown(uint16 keyCode); - - void updateScripts(); - void updateAnimations(uint32 detaTimeMillis); -}; - -// Example console class -class Console : public GUI::Debugger { -public: - Console(ZVision *vm) {} - virtual ~Console(void) {} -}; - -} // End of namespace ZVision - -#endif + void onKeyDown(uint16 keyCode); + + void updateScripts(); + void updateAnimations(uint32 detaTimeMillis); +}; + +// Example console class +class Console : public GUI::Debugger { +public: + Console(ZVision *vm) {} + virtual ~Console(void) {} +}; + +} // End of namespace ZVision + +#endif -- cgit v1.2.3 From 42092369948af8499b980b320b09911b53c10b3d Mon Sep 17 00:00:00 2001 From: richiesams Date: Sat, 6 Jul 2013 01:52:45 -0500 Subject: ZVISION: Create debug console and apply console logic to main loop --- engines/zvision/zvision.h | 7 ------- 1 file changed, 7 deletions(-) (limited to 'engines/zvision/zvision.h') diff --git a/engines/zvision/zvision.h b/engines/zvision/zvision.h index 0053fe5a9e..9dd36662f7 100644 --- a/engines/zvision/zvision.h +++ b/engines/zvision/zvision.h @@ -83,13 +83,6 @@ private: void updateScripts(); void updateAnimations(uint32 detaTimeMillis); }; - -// Example console class -class Console : public GUI::Debugger { -public: - Console(ZVision *vm) {} - virtual ~Console(void) {} -}; } // End of namespace ZVision -- cgit v1.2.3 From 46865dc39414a6e8123c41faa287c03270d7a6da Mon Sep 17 00:00:00 2001 From: richiesams Date: Sat, 6 Jul 2013 01:54:05 -0500 Subject: ZVISION: Create renderImageToScreen method and add a console command for it --- engines/zvision/zvision.h | 1 + 1 file changed, 1 insertion(+) (limited to 'engines/zvision/zvision.h') diff --git a/engines/zvision/zvision.h b/engines/zvision/zvision.h index 9dd36662f7..7ff03ca719 100644 --- a/engines/zvision/zvision.h +++ b/engines/zvision/zvision.h @@ -71,6 +71,7 @@ public: virtual Common::Error run(); ScriptManager *getScriptManager() const; Common::RandomSource *getRandomSource() const; + void renderImageToScreen(const Common::String &fileName, uint32 x, uint32 y, uint32 width, uint32 height); private: void initialize(); -- cgit v1.2.3 From 399e512be232746f956b6be52b8387b52114d35b Mon Sep 17 00:00:00 2001 From: richiesams Date: Sun, 7 Jul 2013 10:35:56 -0500 Subject: ZVISION: Update renderImageToScreen to handle TGZ image files --- engines/zvision/zvision.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'engines/zvision/zvision.h') diff --git a/engines/zvision/zvision.h b/engines/zvision/zvision.h index 7ff03ca719..31c65a82af 100644 --- a/engines/zvision/zvision.h +++ b/engines/zvision/zvision.h @@ -71,7 +71,7 @@ public: virtual Common::Error run(); ScriptManager *getScriptManager() const; Common::RandomSource *getRandomSource() const; - void renderImageToScreen(const Common::String &fileName, uint32 x, uint32 y, uint32 width, uint32 height); + void renderImageToScreen(const Common::String &fileName, uint32 x, uint32 y); private: void initialize(); -- cgit v1.2.3 From afbcca2187c7a07e6e0853bd0befdc1e9a67dce2 Mon Sep 17 00:00:00 2001 From: richiesams Date: Mon, 8 Jul 2013 16:04:18 -0500 Subject: ZVISION: Move engine width, height, and pixelFormat to const member variables --- engines/zvision/zvision.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'engines/zvision/zvision.h') diff --git a/engines/zvision/zvision.h b/engines/zvision/zvision.h index 31c65a82af..d18319a056 100644 --- a/engines/zvision/zvision.h +++ b/engines/zvision/zvision.h @@ -54,12 +54,14 @@ public: private: Console *_console; const ZVisionGameDescription *_gameDescription; + const Graphics::PixelFormat _pixelFormat; + const int _width; + const int _height; // We need random numbers Common::RandomSource *_rnd; - + // Managers ScriptManager *_scriptManager; - // To prevent allocation every time we process events Common::Event _event; -- cgit v1.2.3 From 76b2aa33ca129b1c7a626f1a043e5d828e72af57 Mon Sep 17 00:00:00 2001 From: richiesams Date: Mon, 8 Jul 2013 16:08:16 -0500 Subject: ZVISION: Create/refactor methods for playing video. The pixel format for videos is not the same as for the rest of the game. (Game: RGB 555, Video: RGB 565) --- engines/zvision/zvision.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'engines/zvision/zvision.h') diff --git a/engines/zvision/zvision.h b/engines/zvision/zvision.h index d18319a056..ffda12ac1a 100644 --- a/engines/zvision/zvision.h +++ b/engines/zvision/zvision.h @@ -27,6 +27,8 @@ #include "common/random.h" #include "common/events.h" +#include "video/video_decoder.h" + #include "engines/engine.h" #include "zvision/script_manager.h" @@ -67,6 +69,7 @@ private: bool _needsScreenUpdate; + Video::VideoDecoder *_currentVideo; public: uint32 getFeatures() const; Common::Language getLanguage() const; @@ -74,6 +77,8 @@ public: ScriptManager *getScriptManager() const; Common::RandomSource *getRandomSource() const; void renderImageToScreen(const Common::String &fileName, uint32 x, uint32 y); + void startVideo(Video::VideoDecoder *videoDecoder); + void continueVideo(); private: void initialize(); -- cgit v1.2.3 From 4e55d7ba9476cd47a3118ecdeb0d0618e6d32211 Mon Sep 17 00:00:00 2001 From: richiesams Date: Thu, 11 Jul 2013 00:08:00 -0500 Subject: ZVISION: Clean up includes --- engines/zvision/zvision.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'engines/zvision/zvision.h') diff --git a/engines/zvision/zvision.h b/engines/zvision/zvision.h index ffda12ac1a..bec8827583 100644 --- a/engines/zvision/zvision.h +++ b/engines/zvision/zvision.h @@ -31,14 +31,13 @@ #include "engines/engine.h" -#include "zvision/script_manager.h" - #include "gui/debugger.h" namespace ZVision { struct ZVisionGameDescription; class Console; +class ScriptManager; // our engine debug channels enum { -- cgit v1.2.3 From d672c2c44093269ce1c0bd8107346d05f4c1b225 Mon Sep 17 00:00:00 2001 From: richiesams Date: Thu, 11 Jul 2013 00:11:21 -0500 Subject: ZVISION: Remove unused methods from ZVision class --- engines/zvision/zvision.h | 3 --- 1 file changed, 3 deletions(-) (limited to 'engines/zvision/zvision.h') diff --git a/engines/zvision/zvision.h b/engines/zvision/zvision.h index bec8827583..7f5b8e3a86 100644 --- a/engines/zvision/zvision.h +++ b/engines/zvision/zvision.h @@ -86,9 +86,6 @@ private: void onMouseDown(const Common::Point &pos); void onMouseMove(const Common::Point &pos); void onKeyDown(uint16 keyCode); - - void updateScripts(); - void updateAnimations(uint32 detaTimeMillis); }; } // End of namespace ZVision -- cgit v1.2.3 From ae84e9508e846e7cfd39652f74c0816b399409e7 Mon Sep 17 00:00:00 2001 From: richiesams Date: Thu, 11 Jul 2013 17:02:14 -0500 Subject: ZVISION: Add 2x scaling to videos --- engines/zvision/zvision.h | 1 + 1 file changed, 1 insertion(+) (limited to 'engines/zvision/zvision.h') diff --git a/engines/zvision/zvision.h b/engines/zvision/zvision.h index 7f5b8e3a86..50394a6070 100644 --- a/engines/zvision/zvision.h +++ b/engines/zvision/zvision.h @@ -69,6 +69,7 @@ private: bool _needsScreenUpdate; Video::VideoDecoder *_currentVideo; + byte *_scaledVideoFrameBuffer; public: uint32 getFeatures() const; Common::Language getLanguage() const; -- cgit v1.2.3 From 8d2bef2936f555cbc675248838079dfe06ff562a Mon Sep 17 00:00:00 2001 From: richiesams Date: Sat, 13 Jul 2013 11:34:28 -0500 Subject: ZVISION: Create console command for loading sounds --- engines/zvision/zvision.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'engines/zvision/zvision.h') diff --git a/engines/zvision/zvision.h b/engines/zvision/zvision.h index 50394a6070..11773a33ad 100644 --- a/engines/zvision/zvision.h +++ b/engines/zvision/zvision.h @@ -76,6 +76,8 @@ public: virtual Common::Error run(); ScriptManager *getScriptManager() const; Common::RandomSource *getRandomSource() const; + Audio::Mixer *getMixer() const; + void renderImageToScreen(const Common::String &fileName, uint32 x, uint32 y); void startVideo(Video::VideoDecoder *videoDecoder); void continueVideo(); -- cgit v1.2.3 From a30f49b556ef27644d752368c11590cc48c0fccf Mon Sep 17 00:00:00 2001 From: richiesams Date: Tue, 16 Jul 2013 16:52:46 -0500 Subject: ZVISION: Add a game type enum to detection This is needed for sound file differentiation --- engines/zvision/zvision.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'engines/zvision/zvision.h') diff --git a/engines/zvision/zvision.h b/engines/zvision/zvision.h index 11773a33ad..17a7c026f1 100644 --- a/engines/zvision/zvision.h +++ b/engines/zvision/zvision.h @@ -31,6 +31,8 @@ #include "engines/engine.h" +#include "zvision/detection.h" + #include "gui/debugger.h" namespace ZVision { @@ -76,7 +78,7 @@ public: virtual Common::Error run(); ScriptManager *getScriptManager() const; Common::RandomSource *getRandomSource() const; - Audio::Mixer *getMixer() const; + ZVisionGameId getGameId() const; void renderImageToScreen(const Common::String &fileName, uint32 x, uint32 y); void startVideo(Video::VideoDecoder *videoDecoder); -- cgit v1.2.3 From 4bd95987d2119027fa175e08f22d0171f53358c0 Mon Sep 17 00:00:00 2001 From: richiesams Date: Fri, 19 Jul 2013 11:07:58 -0500 Subject: ZVISION: Convert old code to use RenderManager --- engines/zvision/zvision.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'engines/zvision/zvision.h') diff --git a/engines/zvision/zvision.h b/engines/zvision/zvision.h index 17a7c026f1..7740dba6dc 100644 --- a/engines/zvision/zvision.h +++ b/engines/zvision/zvision.h @@ -40,6 +40,7 @@ namespace ZVision { struct ZVisionGameDescription; class Console; class ScriptManager; +class RenderManager; // our engine debug channels enum { @@ -65,6 +66,8 @@ private: Common::RandomSource *_rnd; // Managers ScriptManager *_scriptManager; + RenderManager *_renderManager; + // To prevent allocation every time we process events Common::Event _event; @@ -77,10 +80,10 @@ public: Common::Language getLanguage() const; virtual Common::Error run(); ScriptManager *getScriptManager() const; + RenderManager *getRenderManager() const; Common::RandomSource *getRandomSource() const; ZVisionGameId getGameId() const; - void renderImageToScreen(const Common::String &fileName, uint32 x, uint32 y); void startVideo(Video::VideoDecoder *videoDecoder); void continueVideo(); -- cgit v1.2.3 From ed4490730902780923bf1e91ed3617d56efb7c24 Mon Sep 17 00:00:00 2001 From: richiesams Date: Wed, 24 Jul 2013 11:33:58 -0500 Subject: ZVISION: Move rendering logic from ZVision class to RenderManager class --- engines/zvision/zvision.h | 10 ---------- 1 file changed, 10 deletions(-) (limited to 'engines/zvision/zvision.h') diff --git a/engines/zvision/zvision.h b/engines/zvision/zvision.h index 7740dba6dc..2e6ec11a53 100644 --- a/engines/zvision/zvision.h +++ b/engines/zvision/zvision.h @@ -27,8 +27,6 @@ #include "common/random.h" #include "common/events.h" -#include "video/video_decoder.h" - #include "engines/engine.h" #include "zvision/detection.h" @@ -58,7 +56,6 @@ public: private: Console *_console; const ZVisionGameDescription *_gameDescription; - const Graphics::PixelFormat _pixelFormat; const int _width; const int _height; @@ -71,10 +68,6 @@ private: // To prevent allocation every time we process events Common::Event _event; - bool _needsScreenUpdate; - - Video::VideoDecoder *_currentVideo; - byte *_scaledVideoFrameBuffer; public: uint32 getFeatures() const; Common::Language getLanguage() const; @@ -84,9 +77,6 @@ public: Common::RandomSource *getRandomSource() const; ZVisionGameId getGameId() const; - void startVideo(Video::VideoDecoder *videoDecoder); - void continueVideo(); - private: void initialize(); -- cgit v1.2.3 From f1135292d0d714187b719988dba8d5a7d487fe94 Mon Sep 17 00:00:00 2001 From: richiesams Date: Tue, 30 Jul 2013 14:25:31 -0500 Subject: ZVISION: Optimize integer type usages The general thought is int is faster than int16 or byte. So if you can afford the space, use it over int16 or byte. Also, only use int32 when you specifically need the 32 bits. --- engines/zvision/zvision.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'engines/zvision/zvision.h') diff --git a/engines/zvision/zvision.h b/engines/zvision/zvision.h index 2e6ec11a53..9588623f56 100644 --- a/engines/zvision/zvision.h +++ b/engines/zvision/zvision.h @@ -83,7 +83,7 @@ private: void processEvents(); void onMouseDown(const Common::Point &pos); void onMouseMove(const Common::Point &pos); - void onKeyDown(uint16 keyCode); + void onKeyDown(uint keyCode); }; } // End of namespace ZVision -- cgit v1.2.3 From 7b9858d6b45ad4c02729445975518a48292c3658 Mon Sep 17 00:00:00 2001 From: richiesams Date: Sun, 4 Aug 2013 23:10:27 -0500 Subject: ZVISION: Make video code blocking. The script system requires that all ResultAction::execute() block until they finish. The video system *was* 'asyncronous' in that you would just start a video and then run() would finish processing it. This code forces the video to complely finish before playVideo returns. The Clock object is used to keep track of deltaTime while the video is playing. --- engines/zvision/zvision.h | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) (limited to 'engines/zvision/zvision.h') diff --git a/engines/zvision/zvision.h b/engines/zvision/zvision.h index 9588623f56..459096a03b 100644 --- a/engines/zvision/zvision.h +++ b/engines/zvision/zvision.h @@ -29,16 +29,24 @@ #include "engines/engine.h" +#include "graphics/pixelformat.h" + #include "zvision/detection.h" #include "gui/debugger.h" - + + +namespace Video { +class VideoDecoder; +} + namespace ZVision { struct ZVisionGameDescription; class Console; class ScriptManager; class RenderManager; +class Clock; // our engine debug channels enum { @@ -58,25 +66,35 @@ private: const ZVisionGameDescription *_gameDescription; const int _width; const int _height; + const Graphics::PixelFormat _pixelFormat; + + const uint _desiredFrameTime; // We need random numbers Common::RandomSource *_rnd; + // Managers ScriptManager *_scriptManager; RenderManager *_renderManager; + // Clock + Clock *_clock; + // To prevent allocation every time we process events Common::Event _event; public: uint32 getFeatures() const; Common::Language getLanguage() const; - virtual Common::Error run(); + Common::Error run(); + ScriptManager *getScriptManager() const; RenderManager *getRenderManager() const; Common::RandomSource *getRandomSource() const; ZVisionGameId getGameId() const; + void playVideo(Video::VideoDecoder &videoDecoder); + private: void initialize(); -- cgit v1.2.3 From ec7036469c57eecb7afb226cc3dd176fcc74c0cb Mon Sep 17 00:00:00 2001 From: richiesams Date: Sun, 4 Aug 2013 23:54:53 -0500 Subject: ZVISION: Make _clock a member variable instead of a pointer to the heap --- engines/zvision/zvision.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'engines/zvision/zvision.h') diff --git a/engines/zvision/zvision.h b/engines/zvision/zvision.h index 459096a03b..3eff16e5f1 100644 --- a/engines/zvision/zvision.h +++ b/engines/zvision/zvision.h @@ -32,6 +32,7 @@ #include "graphics/pixelformat.h" #include "zvision/detection.h" +#include "zvision/clock.h" #include "gui/debugger.h" @@ -46,7 +47,6 @@ struct ZVisionGameDescription; class Console; class ScriptManager; class RenderManager; -class Clock; // our engine debug channels enum { @@ -78,7 +78,7 @@ private: RenderManager *_renderManager; // Clock - Clock *_clock; + Clock _clock; // To prevent allocation every time we process events Common::Event _event; -- cgit v1.2.3 From 1d694dcb81604c20a8755f80d509eccb8904017e Mon Sep 17 00:00:00 2001 From: richiesams Date: Sun, 4 Aug 2013 23:55:36 -0500 Subject: ZVISION: Add support for engine pausing from higher up (GMM, phone call, etc.) --- engines/zvision/zvision.h | 1 + 1 file changed, 1 insertion(+) (limited to 'engines/zvision/zvision.h') diff --git a/engines/zvision/zvision.h b/engines/zvision/zvision.h index 3eff16e5f1..990b6e8b93 100644 --- a/engines/zvision/zvision.h +++ b/engines/zvision/zvision.h @@ -87,6 +87,7 @@ public: uint32 getFeatures() const; Common::Language getLanguage() const; Common::Error run(); + void pauseEngineIntern(bool pause); ScriptManager *getScriptManager() const; RenderManager *getRenderManager() const; -- cgit v1.2.3 From 946f98b34d01c06fdea5416f0f0bbd6457bb1b86 Mon Sep 17 00:00:00 2001 From: richiesams Date: Mon, 5 Aug 2013 19:07:55 -0500 Subject: ZVISION: Fix frame delay calculation being reversed. Also convert to int to ensure proper 0 clamping --- engines/zvision/zvision.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'engines/zvision/zvision.h') diff --git a/engines/zvision/zvision.h b/engines/zvision/zvision.h index 990b6e8b93..5bb3d7cb1d 100644 --- a/engines/zvision/zvision.h +++ b/engines/zvision/zvision.h @@ -68,7 +68,7 @@ private: const int _height; const Graphics::PixelFormat _pixelFormat; - const uint _desiredFrameTime; + const int _desiredFrameTime; // We need random numbers Common::RandomSource *_rnd; -- cgit v1.2.3 From 06e6cb5d1f9b6cc7d632e3a7e31267363dad3503 Mon Sep 17 00:00:00 2001 From: richiesams Date: Fri, 9 Aug 2013 14:51:18 -0500 Subject: ZVISION: Create method for cycling through all the cursors so as to identify them more easily --- engines/zvision/zvision.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'engines/zvision/zvision.h') diff --git a/engines/zvision/zvision.h b/engines/zvision/zvision.h index 5bb3d7cb1d..29c1ddd651 100644 --- a/engines/zvision/zvision.h +++ b/engines/zvision/zvision.h @@ -96,6 +96,8 @@ public: void playVideo(Video::VideoDecoder &videoDecoder); + void cycleThroughCursors(); + private: void initialize(); -- cgit v1.2.3 From 1b277d34ac9d7b207e7e42964d00dd6f433daadc Mon Sep 17 00:00:00 2001 From: richiesams Date: Fri, 9 Aug 2013 18:33:15 -0500 Subject: ZVISION: Add class to manage cursors --- engines/zvision/zvision.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'engines/zvision/zvision.h') diff --git a/engines/zvision/zvision.h b/engines/zvision/zvision.h index 29c1ddd651..0a4ed08974 100644 --- a/engines/zvision/zvision.h +++ b/engines/zvision/zvision.h @@ -47,6 +47,7 @@ struct ZVisionGameDescription; class Console; class ScriptManager; class RenderManager; +class CursorManager; // our engine debug channels enum { @@ -76,6 +77,7 @@ private: // Managers ScriptManager *_scriptManager; RenderManager *_renderManager; + CursorManager *_cursorManager; // Clock Clock _clock; @@ -91,6 +93,7 @@ public: ScriptManager *getScriptManager() const; RenderManager *getRenderManager() const; + CursorManager *getCursorManager() const; Common::RandomSource *getRandomSource() const; ZVisionGameId getGameId() const; @@ -103,6 +106,7 @@ private: void processEvents(); void onMouseDown(const Common::Point &pos); + void onMouseUp(const Common::Point &pos); void onMouseMove(const Common::Point &pos); void onKeyDown(uint keyCode); }; -- cgit v1.2.3 From 416cde1358ecdb18ae3f6c8bc2f794e9ac13755b Mon Sep 17 00:00:00 2001 From: richiesams Date: Sat, 10 Aug 2013 17:10:06 -0500 Subject: ZVISION: Change video code to support arbitrary scaling and whether the video can be skipped --- engines/zvision/zvision.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'engines/zvision/zvision.h') diff --git a/engines/zvision/zvision.h b/engines/zvision/zvision.h index 0a4ed08974..8363fb1672 100644 --- a/engines/zvision/zvision.h +++ b/engines/zvision/zvision.h @@ -97,7 +97,7 @@ public: Common::RandomSource *getRandomSource() const; ZVisionGameId getGameId() const; - void playVideo(Video::VideoDecoder &videoDecoder); + void playVideo(Video::VideoDecoder &videoDecoder, const Common::Rect &destRect = Common::Rect(0, 0, 0, 0), bool skippable = true); void cycleThroughCursors(); -- cgit v1.2.3 From 269bed7c7d279e0785056a4e5ba1622317402449 Mon Sep 17 00:00:00 2001 From: richiesams Date: Sun, 11 Aug 2013 15:10:52 -0500 Subject: ZVISION: Implement mouse event handling --- engines/zvision/zvision.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'engines/zvision/zvision.h') diff --git a/engines/zvision/zvision.h b/engines/zvision/zvision.h index 8363fb1672..bf42bf2621 100644 --- a/engines/zvision/zvision.h +++ b/engines/zvision/zvision.h @@ -33,6 +33,7 @@ #include "zvision/detection.h" #include "zvision/clock.h" +#include "zvision/mouse_event.h" #include "gui/debugger.h" @@ -82,6 +83,9 @@ private: // Clock Clock _clock; + // To store the current mouse events + Common::List _mouseEvents; + // To prevent allocation every time we process events Common::Event _event; @@ -99,6 +103,9 @@ public: void playVideo(Video::VideoDecoder &videoDecoder, const Common::Rect &destRect = Common::Rect(0, 0, 0, 0), bool skippable = true); + void registerMouseEvent(const MouseEvent &event); + void clearAllMouseEvents(); + void cycleThroughCursors(); private: -- cgit v1.2.3 From 54f16f2539d619b7cdb4e43d7de03e1f538a1c1f Mon Sep 17 00:00:00 2001 From: richiesams Date: Wed, 14 Aug 2013 10:25:50 -0500 Subject: ZVISION: Create the concept of a working window The working window is a Rect centered inside the actual window edges. All in-game coordinates are in the working window coordinate system. Also, all images in-game are clipped to the edges of the working window. --- engines/zvision/zvision.h | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'engines/zvision/zvision.h') diff --git a/engines/zvision/zvision.h b/engines/zvision/zvision.h index bf42bf2621..ca710804b0 100644 --- a/engines/zvision/zvision.h +++ b/engines/zvision/zvision.h @@ -64,10 +64,19 @@ public: ~ZVision(); private: + enum { + WINDOW_WIDTH = 640, + WINDOW_HEIGHT = 480, + WORKING_WINDOW_WIDTH = 512, + WORKING_WINDOW_HEIGHT = 320, + + ROTATION_SCREEN_EDGE_OFFSET = 60, + MAX_ROTATION_SPEED = 150 // Pixels per second + }; + Console *_console; const ZVisionGameDescription *_gameDescription; - const int _width; - const int _height; + const Common::Rect _workingWindow; const Graphics::PixelFormat _pixelFormat; const int _desiredFrameTime; -- cgit v1.2.3 From 4e827b4dda458813dce650545b6f9fb923c514f4 Mon Sep 17 00:00:00 2001 From: richiesams Date: Wed, 14 Aug 2013 12:04:13 -0500 Subject: ZVISION: Add documentation --- engines/zvision/zvision.h | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) (limited to 'engines/zvision/zvision.h') diff --git a/engines/zvision/zvision.h b/engines/zvision/zvision.h index ca710804b0..58812d4d11 100644 --- a/engines/zvision/zvision.h +++ b/engines/zvision/zvision.h @@ -76,6 +76,11 @@ private: Console *_console; const ZVisionGameDescription *_gameDescription; + /** + * A Rectangle centered inside the actual window. All in-game coordinates + * are given in this coordinate space. Also, all images are clipped to the + * edges of this Rectangle + */ const Common::Rect _workingWindow; const Graphics::PixelFormat _pixelFormat; @@ -110,17 +115,40 @@ public: Common::RandomSource *getRandomSource() const; ZVisionGameId getGameId() const; + /** + * Play a video until it is finished. This is a blocking call. It will call + * _clock.stop() when the video starts and _clock.start() when the video finishes. + * It will also consume all events during video playback. + * + * @param videoDecoder The video to play + * @param destRect Where to put the video. (In working window coords) + * @param skippable If true, the video can be skipped at any time using [Spacebar] + */ void playVideo(Video::VideoDecoder &videoDecoder, const Common::Rect &destRect = Common::Rect(0, 0, 0, 0), bool skippable = true); + /** + * Register a MouseEvent with the event system. These will be checked at every + * MOUSE_UP, MOUSE_DOWN, MOUSE_MOVE, etc. + * + * @param event The event to register + */ void registerMouseEvent(const MouseEvent &event); + /** Remove all MouseEvents from the event system */ void clearAllMouseEvents(); + /** + * Utility method to cycle through all the cursors in the game. After + * calling, use Left and Right arrows to cycle. Esc to quit. This is a + * blocking function call. + */ void cycleThroughCursors(); private: void initialize(); + /** Called every frame from ZVision::run() to process any events from EventMan */ void processEvents(); + void onMouseDown(const Common::Point &pos); void onMouseUp(const Common::Point &pos); void onMouseMove(const Common::Point &pos); -- cgit v1.2.3 From 1f653f9a34e3462c0ab13aeaf5f68b7070f45770 Mon Sep 17 00:00:00 2001 From: richiesams Date: Sun, 18 Aug 2013 15:19:01 -0500 Subject: ZVISION: Allow MouseEvents to be unregistered --- engines/zvision/zvision.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'engines/zvision/zvision.h') diff --git a/engines/zvision/zvision.h b/engines/zvision/zvision.h index 58812d4d11..9e9d5db951 100644 --- a/engines/zvision/zvision.h +++ b/engines/zvision/zvision.h @@ -133,6 +133,9 @@ public: * @param event The event to register */ void registerMouseEvent(const MouseEvent &event); + + bool removeMouseEvent(const uint32 key); + /** Remove all MouseEvents from the event system */ void clearAllMouseEvents(); -- cgit v1.2.3 From 6e427ebef8b29e48b679c7c19ed4b715c7dfaef8 Mon Sep 17 00:00:00 2001 From: richiesams Date: Mon, 19 Aug 2013 23:51:50 -0500 Subject: ZVISION: Create method to play RlfAnimations --- engines/zvision/zvision.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'engines/zvision/zvision.h') diff --git a/engines/zvision/zvision.h b/engines/zvision/zvision.h index 9e9d5db951..366e96f6a7 100644 --- a/engines/zvision/zvision.h +++ b/engines/zvision/zvision.h @@ -49,6 +49,7 @@ class Console; class ScriptManager; class RenderManager; class CursorManager; +class RlfAnimation; // our engine debug channels enum { @@ -126,6 +127,8 @@ public: */ void playVideo(Video::VideoDecoder &videoDecoder, const Common::Rect &destRect = Common::Rect(0, 0, 0, 0), bool skippable = true); + void playAnimation(RlfAnimation *animation, uint16 x, uint16 y, DisposeAfterUse::Flag disposeAfterUse = DisposeAfterUse::YES); + /** * Register a MouseEvent with the event system. These will be checked at every * MOUSE_UP, MOUSE_DOWN, MOUSE_MOVE, etc. -- cgit v1.2.3 From f759584d3b4bf802163fde9c721fda5c6f36ff4d Mon Sep 17 00:00:00 2001 From: richiesams Date: Fri, 23 Aug 2013 23:50:33 -0500 Subject: ZVISION: Make ZVision::_workingWindow and ZVision::_pixelFormat public --- engines/zvision/zvision.h | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) (limited to 'engines/zvision/zvision.h') diff --git a/engines/zvision/zvision.h b/engines/zvision/zvision.h index 366e96f6a7..844b8ad18f 100644 --- a/engines/zvision/zvision.h +++ b/engines/zvision/zvision.h @@ -64,6 +64,15 @@ public: ZVision(OSystem *syst, const ZVisionGameDescription *gameDesc); ~ZVision(); +public: + /** + * A Rectangle centered inside the actual window. All in-game coordinates + * are given in this coordinate space. Also, all images are clipped to the + * edges of this Rectangle + */ + const Common::Rect _workingWindow; + const Graphics::PixelFormat _pixelFormat; + private: enum { WINDOW_WIDTH = 640, @@ -72,18 +81,11 @@ private: WORKING_WINDOW_HEIGHT = 320, ROTATION_SCREEN_EDGE_OFFSET = 60, - MAX_ROTATION_SPEED = 150 // Pixels per second + MAX_ROTATION_SPEED = 250 // Pixels per second }; Console *_console; const ZVisionGameDescription *_gameDescription; - /** - * A Rectangle centered inside the actual window. All in-game coordinates - * are given in this coordinate space. Also, all images are clipped to the - * edges of this Rectangle - */ - const Common::Rect _workingWindow; - const Graphics::PixelFormat _pixelFormat; const int _desiredFrameTime; -- cgit v1.2.3 From 0da3d3e5eb3c332f943a63fea4e3777fb24ba577 Mon Sep 17 00:00:00 2001 From: richiesams Date: Sat, 24 Aug 2013 00:09:15 -0500 Subject: ZVISION: Convert _mouseEvents to pointers since MouseEvent is now abstract --- engines/zvision/zvision.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'engines/zvision/zvision.h') diff --git a/engines/zvision/zvision.h b/engines/zvision/zvision.h index 844b8ad18f..84e4da9d20 100644 --- a/engines/zvision/zvision.h +++ b/engines/zvision/zvision.h @@ -101,7 +101,7 @@ private: Clock _clock; // To store the current mouse events - Common::List _mouseEvents; + Common::List _mouseEvents; // To prevent allocation every time we process events Common::Event _event; @@ -137,7 +137,7 @@ public: * * @param event The event to register */ - void registerMouseEvent(const MouseEvent &event); + void registerMouseEvent(MouseEvent *event); bool removeMouseEvent(const uint32 key); -- cgit v1.2.3 From 84c645968c9e93ca343e7c80c6f4546a793c2d41 Mon Sep 17 00:00:00 2001 From: richiesams Date: Mon, 26 Aug 2013 14:16:04 -0500 Subject: ZVISION: Remove ZVision::_mousEvents and all associated functions Instead, pass all mouse events to ScriptManager --- engines/zvision/zvision.h | 17 ----------------- 1 file changed, 17 deletions(-) (limited to 'engines/zvision/zvision.h') diff --git a/engines/zvision/zvision.h b/engines/zvision/zvision.h index 84e4da9d20..6bf6d2acc0 100644 --- a/engines/zvision/zvision.h +++ b/engines/zvision/zvision.h @@ -33,7 +33,6 @@ #include "zvision/detection.h" #include "zvision/clock.h" -#include "zvision/mouse_event.h" #include "gui/debugger.h" @@ -100,9 +99,6 @@ private: // Clock Clock _clock; - // To store the current mouse events - Common::List _mouseEvents; - // To prevent allocation every time we process events Common::Event _event; @@ -131,19 +127,6 @@ public: void playAnimation(RlfAnimation *animation, uint16 x, uint16 y, DisposeAfterUse::Flag disposeAfterUse = DisposeAfterUse::YES); - /** - * Register a MouseEvent with the event system. These will be checked at every - * MOUSE_UP, MOUSE_DOWN, MOUSE_MOVE, etc. - * - * @param event The event to register - */ - void registerMouseEvent(MouseEvent *event); - - bool removeMouseEvent(const uint32 key); - - /** Remove all MouseEvents from the event system */ - void clearAllMouseEvents(); - /** * Utility method to cycle through all the cursors in the game. After * calling, use Left and Right arrows to cycle. Esc to quit. This is a -- cgit v1.2.3 From f3514534ce46bad5e3ffadfdf0b3af403045e5ef Mon Sep 17 00:00:00 2001 From: richiesams Date: Wed, 28 Aug 2013 09:19:39 -0500 Subject: ZVISION: Increase background rotation speed This could probably still go higher. The DOS version is *very* sensitive, too sensitive. But this is still a bit slow. --- engines/zvision/zvision.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'engines/zvision/zvision.h') diff --git a/engines/zvision/zvision.h b/engines/zvision/zvision.h index 6bf6d2acc0..a02fecc43d 100644 --- a/engines/zvision/zvision.h +++ b/engines/zvision/zvision.h @@ -80,7 +80,7 @@ private: WORKING_WINDOW_HEIGHT = 320, ROTATION_SCREEN_EDGE_OFFSET = 60, - MAX_ROTATION_SPEED = 250 // Pixels per second + MAX_ROTATION_SPEED = 400 // Pixels per second }; Console *_console; -- cgit v1.2.3 From f1bd8de21dd504fd9b8fa07c76ab75b5c40d29cd Mon Sep 17 00:00:00 2001 From: richiesams Date: Sat, 31 Aug 2013 23:42:00 -0500 Subject: ZVISION: Overload ZVision::playAnimation to support general video files --- engines/zvision/zvision.h | 1 + 1 file changed, 1 insertion(+) (limited to 'engines/zvision/zvision.h') diff --git a/engines/zvision/zvision.h b/engines/zvision/zvision.h index a02fecc43d..f961f1fda9 100644 --- a/engines/zvision/zvision.h +++ b/engines/zvision/zvision.h @@ -126,6 +126,7 @@ public: void playVideo(Video::VideoDecoder &videoDecoder, const Common::Rect &destRect = Common::Rect(0, 0, 0, 0), bool skippable = true); void playAnimation(RlfAnimation *animation, uint16 x, uint16 y, DisposeAfterUse::Flag disposeAfterUse = DisposeAfterUse::YES); + void playAnimation(Video::VideoDecoder *animation, uint16 x, uint16 y, DisposeAfterUse::Flag disposeAfterUse = DisposeAfterUse::YES); /** * Utility method to cycle through all the cursors in the game. After -- cgit v1.2.3 From 9ea91f5c9c311276339e93ef64eaa53fd4435692 Mon Sep 17 00:00:00 2001 From: richiesams Date: Tue, 3 Sep 2013 23:44:26 -0500 Subject: ZVISION: Convert ZVision singleton accessors to be inline --- engines/zvision/zvision.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'engines/zvision/zvision.h') diff --git a/engines/zvision/zvision.h b/engines/zvision/zvision.h index f961f1fda9..331fa2a9f8 100644 --- a/engines/zvision/zvision.h +++ b/engines/zvision/zvision.h @@ -108,11 +108,11 @@ public: Common::Error run(); void pauseEngineIntern(bool pause); - ScriptManager *getScriptManager() const; - RenderManager *getRenderManager() const; - CursorManager *getCursorManager() const; - Common::RandomSource *getRandomSource() const; - ZVisionGameId getGameId() const; + ScriptManager *getScriptManager() const { return _scriptManager; } + RenderManager *getRenderManager() const { return _renderManager; } + CursorManager *getCursorManager() const { return _cursorManager; } + Common::RandomSource *getRandomSource() const { return _rnd; } + ZVisionGameId getGameId() const { return _gameDescription->gameId; } /** * Play a video until it is finished. This is a blocking call. It will call -- cgit v1.2.3 From 235620750a493afdb592f36521fb693533c6dec0 Mon Sep 17 00:00:00 2001 From: richiesams Date: Wed, 4 Sep 2013 00:12:41 -0500 Subject: ZVISION: Create methods for generating save file names --- engines/zvision/zvision.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'engines/zvision/zvision.h') diff --git a/engines/zvision/zvision.h b/engines/zvision/zvision.h index 331fa2a9f8..a43855737d 100644 --- a/engines/zvision/zvision.h +++ b/engines/zvision/zvision.h @@ -135,6 +135,9 @@ public: */ void cycleThroughCursors(); + Common::String generateSaveFileName(uint slot); + Common::String generateAutoSaveFileName(); + private: void initialize(); -- cgit v1.2.3 From 7ff45447adca39bca5be78bac34e8f900644edae Mon Sep 17 00:00:00 2001 From: richiesams Date: Wed, 4 Sep 2013 00:18:05 -0500 Subject: ZVISION: Create an instance of SaveManager --- engines/zvision/zvision.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'engines/zvision/zvision.h') diff --git a/engines/zvision/zvision.h b/engines/zvision/zvision.h index a43855737d..1a259d0a22 100644 --- a/engines/zvision/zvision.h +++ b/engines/zvision/zvision.h @@ -48,6 +48,7 @@ class Console; class ScriptManager; class RenderManager; class CursorManager; +class SaveManager; class RlfAnimation; // our engine debug channels @@ -95,6 +96,7 @@ private: ScriptManager *_scriptManager; RenderManager *_renderManager; CursorManager *_cursorManager; + SaveManager *_saveManager; // Clock Clock _clock; @@ -111,6 +113,7 @@ public: ScriptManager *getScriptManager() const { return _scriptManager; } RenderManager *getRenderManager() const { return _renderManager; } CursorManager *getCursorManager() const { return _cursorManager; } + SaveManager *getSaveManager() const { return _saveManager; } Common::RandomSource *getRandomSource() const { return _rnd; } ZVisionGameId getGameId() const { return _gameDescription->gameId; } -- cgit v1.2.3 From b50afa2b154c412c40b534a41e9654da8786f5e6 Mon Sep 17 00:00:00 2001 From: RichieSams Date: Sun, 15 Sep 2013 14:08:14 -0500 Subject: ZVISION: Remove unused function --- engines/zvision/zvision.h | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'engines/zvision/zvision.h') diff --git a/engines/zvision/zvision.h b/engines/zvision/zvision.h index 1a259d0a22..2e5359b10b 100644 --- a/engines/zvision/zvision.h +++ b/engines/zvision/zvision.h @@ -131,18 +131,14 @@ public: void playAnimation(RlfAnimation *animation, uint16 x, uint16 y, DisposeAfterUse::Flag disposeAfterUse = DisposeAfterUse::YES); void playAnimation(Video::VideoDecoder *animation, uint16 x, uint16 y, DisposeAfterUse::Flag disposeAfterUse = DisposeAfterUse::YES); - /** - * Utility method to cycle through all the cursors in the game. After - * calling, use Left and Right arrows to cycle. Esc to quit. This is a - * blocking function call. - */ - void cycleThroughCursors(); - Common::String generateSaveFileName(uint slot); Common::String generateAutoSaveFileName(); private: void initialize(); + void initFonts(); + + void parseStrFile(const Common::String fileName); /** Called every frame from ZVision::run() to process any events from EventMan */ void processEvents(); -- cgit v1.2.3 From 8ba295d7103322a5193cc051da81ae82ccf5947b Mon Sep 17 00:00:00 2001 From: RichieSams Date: Sun, 15 Sep 2013 14:09:42 -0500 Subject: ZVISION: Add key press support to the main event loop --- engines/zvision/zvision.h | 1 - 1 file changed, 1 deletion(-) (limited to 'engines/zvision/zvision.h') diff --git a/engines/zvision/zvision.h b/engines/zvision/zvision.h index 2e5359b10b..94bcfdf171 100644 --- a/engines/zvision/zvision.h +++ b/engines/zvision/zvision.h @@ -146,7 +146,6 @@ private: void onMouseDown(const Common::Point &pos); void onMouseUp(const Common::Point &pos); void onMouseMove(const Common::Point &pos); - void onKeyDown(uint keyCode); }; } // End of namespace ZVision -- cgit v1.2.3 From c312b147fa7f5a28491975ae0bcc4b419e7e126a Mon Sep 17 00:00:00 2001 From: RichieSams Date: Sun, 15 Sep 2013 14:55:59 -0500 Subject: ZVISION: Create an instance of StringManager --- engines/zvision/zvision.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'engines/zvision/zvision.h') diff --git a/engines/zvision/zvision.h b/engines/zvision/zvision.h index 94bcfdf171..a481aba28f 100644 --- a/engines/zvision/zvision.h +++ b/engines/zvision/zvision.h @@ -48,6 +48,7 @@ class Console; class ScriptManager; class RenderManager; class CursorManager; +class StringManager; class SaveManager; class RlfAnimation; @@ -97,6 +98,7 @@ private: RenderManager *_renderManager; CursorManager *_cursorManager; SaveManager *_saveManager; + StringManager *_stringManager; // Clock Clock _clock; @@ -114,6 +116,7 @@ public: RenderManager *getRenderManager() const { return _renderManager; } CursorManager *getCursorManager() const { return _cursorManager; } SaveManager *getSaveManager() const { return _saveManager; } + StringManager *getStringManager() const { return _stringManager; } Common::RandomSource *getRandomSource() const { return _rnd; } ZVisionGameId getGameId() const { return _gameDescription->gameId; } -- cgit v1.2.3 From 2d9c9e8c7f26a2c5977d52214283893617d97ffc Mon Sep 17 00:00:00 2001 From: RichieSams Date: Sat, 21 Sep 2013 00:42:20 -0500 Subject: ZVISION: Remove unused animation functions --- engines/zvision/zvision.h | 3 --- 1 file changed, 3 deletions(-) (limited to 'engines/zvision/zvision.h') diff --git a/engines/zvision/zvision.h b/engines/zvision/zvision.h index a481aba28f..efd94f1074 100644 --- a/engines/zvision/zvision.h +++ b/engines/zvision/zvision.h @@ -131,9 +131,6 @@ public: */ void playVideo(Video::VideoDecoder &videoDecoder, const Common::Rect &destRect = Common::Rect(0, 0, 0, 0), bool skippable = true); - void playAnimation(RlfAnimation *animation, uint16 x, uint16 y, DisposeAfterUse::Flag disposeAfterUse = DisposeAfterUse::YES); - void playAnimation(Video::VideoDecoder *animation, uint16 x, uint16 y, DisposeAfterUse::Flag disposeAfterUse = DisposeAfterUse::YES); - Common::String generateSaveFileName(uint slot); Common::String generateAutoSaveFileName(); -- cgit v1.2.3 From 72ae75e64a1aa15839f489895220c76250e2943a Mon Sep 17 00:00:00 2001 From: RichieSams Date: Sun, 29 Sep 2013 21:57:15 -0500 Subject: ZVISION: Clean up zvision.h --- engines/zvision/zvision.h | 8 -------- 1 file changed, 8 deletions(-) (limited to 'engines/zvision/zvision.h') diff --git a/engines/zvision/zvision.h b/engines/zvision/zvision.h index efd94f1074..bc7f9e32db 100644 --- a/engines/zvision/zvision.h +++ b/engines/zvision/zvision.h @@ -52,14 +52,6 @@ class StringManager; class SaveManager; class RlfAnimation; -// our engine debug channels -enum { - kZDebugExample = 1 << 0, - kZDebugExample2 = 1 << 1 - // next new channel must be 1 << 2 (4) - // the current limitation is 32 debug channels (1 << 31 is the last one) -}; - class ZVision : public Engine { public: ZVision(OSystem *syst, const ZVisionGameDescription *gameDesc); -- cgit v1.2.3 From 1bdcae7f18c652b5ab0ab1b8993503745bf5102e Mon Sep 17 00:00:00 2001 From: RichieSams Date: Tue, 1 Oct 2013 18:50:36 -0500 Subject: ZVISION: Rename zvision.h inclusion guard to be consistent with the other files --- engines/zvision/zvision.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'engines/zvision/zvision.h') diff --git a/engines/zvision/zvision.h b/engines/zvision/zvision.h index bc7f9e32db..13bdb3c755 100644 --- a/engines/zvision/zvision.h +++ b/engines/zvision/zvision.h @@ -21,8 +21,8 @@ * */ -#ifndef ZVISION_H -#define ZVISION_H +#ifndef ZVISION_ZVISION_H +#define ZVISION_ZVISION_H #include "common/random.h" #include "common/events.h" -- cgit v1.2.3 From bad28dc15872e208bf21f1e6fa2ab906bca598c4 Mon Sep 17 00:00:00 2001 From: RichieSams Date: Tue, 1 Oct 2013 20:08:41 -0500 Subject: ZVISION: Standardize includes order and format Format is: common/scummsys.h (Only if a .cpp file) header file for this file (Only if a .cpp file) zengine includes other includes, grouped by module --- engines/zvision/zvision.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'engines/zvision/zvision.h') diff --git a/engines/zvision/zvision.h b/engines/zvision/zvision.h index 13bdb3c755..84784d9a89 100644 --- a/engines/zvision/zvision.h +++ b/engines/zvision/zvision.h @@ -24,6 +24,9 @@ #ifndef ZVISION_ZVISION_H #define ZVISION_ZVISION_H +#include "zvision/detection.h" +#include "zvision/clock.h" + #include "common/random.h" #include "common/events.h" @@ -31,9 +34,6 @@ #include "graphics/pixelformat.h" -#include "zvision/detection.h" -#include "zvision/clock.h" - #include "gui/debugger.h" -- cgit v1.2.3