aboutsummaryrefslogtreecommitdiff
path: root/engines/voyeur/graphics.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/voyeur/graphics.cpp')
-rw-r--r--engines/voyeur/graphics.cpp15
1 files changed, 14 insertions, 1 deletions
diff --git a/engines/voyeur/graphics.cpp b/engines/voyeur/graphics.cpp
index fb32e75b91..a172483d00 100644
--- a/engines/voyeur/graphics.cpp
+++ b/engines/voyeur/graphics.cpp
@@ -24,6 +24,7 @@
#include "voyeur/game.h"
#include "voyeur/voyeur.h"
#include "engines/util.h"
+#include "graphics/palette.h"
#include "graphics/surface.h"
namespace Voyeur {
@@ -47,6 +48,8 @@ void GraphicsManager::sInitGraphics() {
initGraphics(SCREEN_WIDTH, SCREEN_HEIGHT, false);
_screenSurface.create(SCREEN_WIDTH, SCREEN_HEIGHT,
Graphics::PixelFormat::createFormatCLUT8());
+
+ clearPalette();
}
GraphicsManager::~GraphicsManager() {
@@ -360,7 +363,7 @@ void GraphicsManager::EMSMapPageHandle(int v1, int v2, int v3) {
}
void GraphicsManager::flipPage() {
- Common::Array<ViewPortResource *> &viewPorts = *_viewPortListPtr;
+ Common::Array<ViewPortResource *> &viewPorts = _viewPortListPtr->_entries;
bool flipFlag = false;
for (uint idx = 0; idx < viewPorts.size(); ++idx) {
@@ -405,4 +408,14 @@ void GraphicsManager::restoreBack(Common::Array<Common::Rect> &rectList, int rec
_saveBack = saveBack;
}
+void GraphicsManager::clearPalette() {
+ byte palette[768];
+ Common::fill(&palette[0], &palette[768], 0);
+ g_system->getPaletteManager()->setPalette(&palette[0], 0, 256);
+}
+
+void GraphicsManager::screenReset() {
+ // TODO
+}
+
} // End of namespace Voyeur