From 7cc82487d368fb94fc4e9e9ad16a80eb4536beda Mon Sep 17 00:00:00 2001 From: Bastien Bouclet Date: Sat, 14 May 2011 14:10:05 +0200 Subject: MOHAWK: When running scripts in Myst, add delays when necessary between draws to mimic older hardware. --- engines/mohawk/graphics.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'engines/mohawk/graphics.h') 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 -- cgit v1.2.3