diff options
Diffstat (limited to 'engines/hopkins/graphics.cpp')
-rw-r--r-- | engines/hopkins/graphics.cpp | 26 |
1 files changed, 24 insertions, 2 deletions
diff --git a/engines/hopkins/graphics.cpp b/engines/hopkins/graphics.cpp index 7b04e1f1ba..21c5d6c478 100644 --- a/engines/hopkins/graphics.cpp +++ b/engines/hopkins/graphics.cpp @@ -21,6 +21,7 @@ */ #include "common/system.h" +#include "common/rect.h" #include "engines/util.h" #include "hopkins/files.h" #include "hopkins/globals.h" @@ -161,10 +162,16 @@ int ObjectManager::AJOUTE_OBJET(int objIndex) { return arrIndex; } +/*------------------------------------------------------------------------*/ + GraphicsManager::GraphicsManager() { SDL_MODEYES = false; } +GraphicsManager::~GraphicsManager() { +} + + void GraphicsManager::SET_MODE(int width, int height) { if (!SDL_MODEYES) { SDL_ECHELLE = 0; @@ -192,13 +199,14 @@ void GraphicsManager::SET_MODE(int width, int height) { //height = Reel_Zoom(a2, SDL_ECHELLE); } - if (bpp == 8) + if (bpp == 8) { initGraphics(width, height, true); - else { + } else { Graphics::PixelFormat pixelFormat(2, 5, 5, 5, 0, 10, 5, 0, 0); initGraphics(width, height, true, &pixelFormat); } + VideoPtr = NULL; XSCREEN = width; YSCREEN = height; @@ -219,4 +227,18 @@ void GraphicsManager::SET_MODE(int width, int height) { } } +void GraphicsManager::DD_Lock() { + VideoPtr = g_system->lockScreen(); +} + +void GraphicsManager::DD_Unlock() { + g_system->unlockScreen(); +} + +void GraphicsManager::Cls_Video() { + assert(VideoPtr); + + VideoPtr->fillRect(Common::Rect(0, 0, XSCREEN, YSCREEN), 0); +} + } // End of namespace Hopkins |