aboutsummaryrefslogtreecommitdiff
path: root/engines/glk/frotz/frotz.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/glk/frotz/frotz.cpp')
-rw-r--r--engines/glk/frotz/frotz.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/engines/glk/frotz/frotz.cpp b/engines/glk/frotz/frotz.cpp
index 8ec3db7133..0c33f417ec 100644
--- a/engines/glk/frotz/frotz.cpp
+++ b/engines/glk/frotz/frotz.cpp
@@ -24,6 +24,7 @@
#include "glk/frotz/frotz_types.h"
#include "glk/frotz/screen.h"
#include "glk/frotz/quetzal.h"
+#include "engines/util.h"
#include "common/config-manager.h"
namespace Glk {
@@ -40,6 +41,19 @@ Frotz::~Frotz() {
reset_memory();
}
+void Frotz::initGraphicsMode() {
+ _gameFile.seek(0);
+ byte version = _gameFile.readByte();
+
+ if (version == 6) {
+ // The V6 games have graphics that expect 320x200 mode
+ Graphics::PixelFormat pixelFormat(2, 5, 6, 5, 0, 11, 5, 0, 0);
+ initGraphics(320, 200, &pixelFormat);
+ } else {
+ GlkEngine::initGraphicsMode();
+ }
+}
+
Screen *Frotz::createScreen() {
return new FrotzScreen();
}