diff options
author | richiesams | 2013-06-19 14:12:03 -0500 |
---|---|---|
committer | richiesams | 2013-08-04 13:31:43 -0500 |
commit | 160d6256f2f391f37bd02c5c060f5db33db2a2f0 (patch) | |
tree | 8be2bc367ea2ef8fa4f80ba08e54826a498c3578 /engines/zvision/zvision.h | |
parent | b65fd98441cadecc44b6e8e06aa2558a282d33c7 (diff) | |
download | scummvm-rg350-160d6256f2f391f37bd02c5c060f5db33db2a2f0.tar.gz scummvm-rg350-160d6256f2f391f37bd02c5c060f5db33db2a2f0.tar.bz2 scummvm-rg350-160d6256f2f391f37bd02c5c060f5db33db2a2f0.zip |
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.
Diffstat (limited to 'engines/zvision/zvision.h')
-rw-r--r-- | engines/zvision/zvision.h | 30 |
1 files changed, 24 insertions, 6 deletions
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
|