aboutsummaryrefslogtreecommitdiff
path: root/engines/mohawk/graphics.h
diff options
context:
space:
mode:
authorBastien Bouclet2011-05-14 14:10:05 +0200
committerBastien Bouclet2011-05-14 14:10:45 +0200
commit7cc82487d368fb94fc4e9e9ad16a80eb4536beda (patch)
tree111444d8108a3520831c206a6e2ccf07e1f898c1 /engines/mohawk/graphics.h
parentcd54d761e10f5c8f24c5508ae22381ed71018abc (diff)
downloadscummvm-rg350-7cc82487d368fb94fc4e9e9ad16a80eb4536beda.tar.gz
scummvm-rg350-7cc82487d368fb94fc4e9e9ad16a80eb4536beda.tar.bz2
scummvm-rg350-7cc82487d368fb94fc4e9e9ad16a80eb4536beda.zip
MOHAWK: When running scripts in Myst, add delays when necessary between draws to mimic older hardware.
Diffstat (limited to 'engines/mohawk/graphics.h')
-rw-r--r--engines/mohawk/graphics.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/engines/mohawk/graphics.h b/engines/mohawk/graphics.h
index e1f0b50078..d7057f48cf 100644
--- a/engines/mohawk/graphics.h
+++ b/engines/mohawk/graphics.h
@@ -128,10 +128,12 @@ public:
void runTransition(uint16 type, Common::Rect rect, uint16 steps, uint16 delay);
void drawRect(Common::Rect rect, RectState state);
void drawLine(const Common::Point &p1, const Common::Point &p2, uint32 color);
+ void enableDrawingTimeSimulation(bool enable);
protected:
MohawkSurface *decodeImage(uint16 id);
MohawkEngine *getVM() { return (MohawkEngine *)_vm; }
+ void simulatePreviousDrawDelay(const Common::Rect &dest);
private:
MohawkEngine_Myst *_vm;
@@ -156,6 +158,11 @@ private:
Graphics::Surface *_backBuffer;
Graphics::PixelFormat _pixelFormat;
Common::Rect _viewport;
+
+ int _enableDrawingTimeSimulation;
+ uint32 _nextAllowedDrawTime;
+ static const uint _constantDrawDelay = 10; // ms
+ static const uint _proportionalDrawDelay = 500; // pixels per ms
};
#endif // ENABLE_MYST