aboutsummaryrefslogtreecommitdiff
path: root/engines/mohawk/myst_graphics.h
diff options
context:
space:
mode:
authorBastien Bouclet2018-04-29 19:22:50 +0200
committerBastien Bouclet2018-06-29 13:15:01 +0200
commit73b3a43b893e78fd7f18eae490e24f253414ce31 (patch)
tree036ea197e1fc9ab05511f41dd4adb868d7a3561e /engines/mohawk/myst_graphics.h
parent7703b3617e8b2dc9dbf0cc614344fd8fc66ca6a4 (diff)
downloadscummvm-rg350-73b3a43b893e78fd7f18eae490e24f253414ce31.tar.gz
scummvm-rg350-73b3a43b893e78fd7f18eae490e24f253414ce31.tar.bz2
scummvm-rg350-73b3a43b893e78fd7f18eae490e24f253414ce31.zip
MOHAWK: MYST: Introduce a main menu stack
Used in the 25th Anniversary edition of Myst ME
Diffstat (limited to 'engines/mohawk/myst_graphics.h')
-rw-r--r--engines/mohawk/myst_graphics.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/engines/mohawk/myst_graphics.h b/engines/mohawk/myst_graphics.h
index b8217f6cfc..c9fd8a7865 100644
--- a/engines/mohawk/myst_graphics.h
+++ b/engines/mohawk/myst_graphics.h
@@ -26,6 +26,7 @@
#include "mohawk/graphics.h"
#include "common/file.h"
+#include "graphics/font.h"
namespace Mohawk {
@@ -58,6 +59,15 @@ public:
void setPaletteToScreen();
const byte *getPalette() const { return _palette; }
+ void saveStateForMainMenu();
+ void restoreStateForMainMenu();
+ Graphics::Surface *getThumbnailForMainMenu() const;
+
+ Common::Rect getTextBoundingBox(const char *text, const Common::Rect &dest, Graphics::TextAlign align);
+ void drawText(uint16 image, const char *text, const Common::Rect &dest, uint8 r, uint8 g, uint8 b, Graphics::TextAlign align, int16 deltaY);
+
+ void replaceImageWithRect(uint16 destImage, uint16 sourceImage, const Common::Rect &sourceRect);
+
protected:
MohawkSurface *decodeImage(uint16 id) override;
MohawkEngine *getVM() override { return (MohawkEngine *)_vm; }
@@ -71,6 +81,10 @@ private:
Common::Rect _viewport;
byte _palette[256 * 3];
+ Common::ScopedPtr<Graphics::Surface, Graphics::SurfaceDeleter> _mainMenuBackupScreen;
+ Common::ScopedPtr<Graphics::Surface, Graphics::SurfaceDeleter> _mainMenuBackupScreenThumbnail;
+ Common::ScopedPtr<Graphics::Surface, Graphics::SurfaceDeleter> _mainMenuBackupBackBuffer;
+
void transitionDissolve(Common::Rect rect, uint step);
void transitionSlideToLeft(Common::Rect rect, uint16 steps, uint16 delay);
void transitionSlideToRight(Common::Rect rect, uint16 steps, uint16 delay);
@@ -83,6 +97,10 @@ private:
byte getColorIndex(const byte *palette, byte red, byte green, byte blue);
void applyImagePatches(uint16 id, const MohawkSurface *mhkSurface) const;
+
+ Graphics::Font *_menuFont;
+
+ const Graphics::Font *getMenuFont() const;
};
} // End of namespace Mohawk