From b9a72ff7a6dc7033beae4a75dc5f596264c39419 Mon Sep 17 00:00:00 2001 From: Bastien Bouclet Date: Sat, 1 Jul 2017 14:56:03 +0200 Subject: MOHAWK: Preload all the PE cursors on startup We were previously reloading the current cursor from raw data on each frame. --- engines/mohawk/cursors.h | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'engines/mohawk/cursors.h') diff --git a/engines/mohawk/cursors.h b/engines/mohawk/cursors.h index 742ae30107..d0d38c9b46 100644 --- a/engines/mohawk/cursors.h +++ b/engines/mohawk/cursors.h @@ -28,11 +28,14 @@ namespace Common { class MacResManager; class NEResources; -class PEResources; class SeekableReadStream; class String; } +namespace Graphics { +struct WinCursorGroup; +} + #include "mohawk/resource.h" namespace Mohawk { @@ -170,10 +173,15 @@ public: ~PECursorManager(); void setCursor(uint16 id); - bool hasSource() const { return _exe != 0; } + bool hasSource() const { return !_cursors.empty(); } private: - Common::PEResources *_exe; + struct CursorItem { + uint16 id; + Graphics::WinCursorGroup *cursorGroup; + }; + + Common::Array _cursors; }; } // End of namespace Mohawk -- cgit v1.2.3