aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
Diffstat (limited to 'engines')
-rw-r--r--engines/hdb/draw-manager.cpp8
-rw-r--r--engines/hdb/hdb.cpp6
-rw-r--r--engines/hdb/hdb.h4
3 files changed, 7 insertions, 11 deletions
diff --git a/engines/hdb/draw-manager.cpp b/engines/hdb/draw-manager.cpp
index 6ee25ceda4..b03763e849 100644
--- a/engines/hdb/draw-manager.cpp
+++ b/engines/hdb/draw-manager.cpp
@@ -185,12 +185,10 @@ Graphics::Surface Picture::load(Common::SeekableReadStream *stream) {
_height = stream->readUint32LE();
stream->read(_name, 64);
- Graphics::PixelFormat format(2, 5, 6, 5, 0, 11, 5, 0, 0);
-
debug(8, "Picture: _width: %d, _height: %d", _width, _height);
debug(8, "Picture: _name: %s", _name);
- _surface.create(_width, _height, format);
+ _surface.create(_width, _height, g_hdb->_format);
stream->readUint32LE(); // Skip Win32 Surface
uint16 *ptr;
@@ -218,9 +216,7 @@ Graphics::Surface Tile::load(Common::SeekableReadStream *stream) {
_flags = stream->readUint32LE();
stream->read(_name, 64);
- Graphics::PixelFormat format(2, 5, 6, 5, 0, 11, 5, 0, 0);
-
- _surface.create(32, 32, format);
+ _surface.create(32, 32, g_hdb->_format);
stream->readUint32LE(); // Skip Win32 Surface
uint16 *ptr;
diff --git a/engines/hdb/hdb.cpp b/engines/hdb/hdb.cpp
index b0ed1d8c6b..eca2b0f77c 100644
--- a/engines/hdb/hdb.cpp
+++ b/engines/hdb/hdb.cpp
@@ -27,7 +27,6 @@
#include "common/debug-channels.h"
#include "common/file.h"
#include "common/error.h"
-#include "graphics/surface.h"
#include "common/stream.h"
#include "common/memstream.h"
@@ -83,7 +82,7 @@ bool HDBGame::init() {
return false;
}
- gameShutdown = false;
+ _gameShutdown = false;
_systemInit = true;
return true;
@@ -127,8 +126,7 @@ Common::Error HDBGame::run() {
}
// Initializes Graphics
- Graphics::PixelFormat format(2, 5, 6, 5, 0, 11, 5, 0, 0);
- initGraphics(kScreenWidth, kScreenHeight, &format);
+ initGraphics(kScreenWidth, kScreenHeight, &_format);
_console = new Console();
diff --git a/engines/hdb/hdb.h b/engines/hdb/hdb.h
index f2b4dcacc0..d6e36b1705 100644
--- a/engines/hdb/hdb.h
+++ b/engines/hdb/hdb.h
@@ -30,6 +30,7 @@
#include "common/events.h"
#include "common/str.h"
#include "common/random.h"
+#include "graphics/surface.h"
#include "gui/debugger.h"
#include "engines/engine.h"
@@ -110,7 +111,8 @@ public:
void start();
void changeGameState();
- bool gameShutdown;
+ bool _gameShutdown;
+ Graphics::PixelFormat _format = Graphics::PixelFormat(2, 5, 6, 5, 0, 11, 5, 0, 0);
private:
Console *_console;