From 0c940567dda10e432760aec22921d1554c296973 Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Thu, 2 Apr 2020 19:52:32 -0700 Subject: [PATCH] GLK: FROTZ: Fix crash opening up Milliways release 185 It's a v6 game, and it still won't properly run, but at least it now gives a proper in-game message saying the screen width is too small rather than just crashing trying to find an MG1 file --- engines/glk/frotz/config.cpp | 3 ++- engines/glk/frotz/config.h | 2 +- engines/glk/frotz/frotz_types.h | 1 + engines/glk/frotz/glk_interface.cpp | 2 +- 4 files changed, 5 insertions(+), 3 deletions(-) diff --git a/engines/glk/frotz/config.cpp b/engines/glk/frotz/config.cpp index 24f6b1d9e24..8c7ca5ad728 100644 --- a/engines/glk/frotz/config.cpp +++ b/engines/glk/frotz/config.cpp @@ -29,7 +29,7 @@ namespace Glk { namespace Frotz { -const Header::StoryEntry Header::RECORDS[25] = { +const Header::StoryEntry Header::RECORDS[26] = { { SHERLOCK, 21, "871214" }, { SHERLOCK, 26, "880127" }, { BEYOND_ZORK, 47, "870915" }, @@ -54,6 +54,7 @@ const Header::StoryEntry Header::RECORDS[25] = { { LURKING_HORROR, 203, "870506" }, { LURKING_HORROR, 219, "870912" }, { LURKING_HORROR, 221, "870918" }, + { MILLIWAYS, 184, "890412" }, { UNKNOWN, 0, "------" } }; diff --git a/engines/glk/frotz/config.h b/engines/glk/frotz/config.h index 212d11fb220..9f3dae5270f 100644 --- a/engines/glk/frotz/config.h +++ b/engines/glk/frotz/config.h @@ -178,7 +178,7 @@ private: zword _release; char _serial[7]; }; - static const StoryEntry RECORDS[25]; + static const StoryEntry RECORDS[26]; public: zbyte h_version; zbyte h_config; diff --git a/engines/glk/frotz/frotz_types.h b/engines/glk/frotz/frotz_types.h index e758f7e49e7..017cdee23e4 100644 --- a/engines/glk/frotz/frotz_types.h +++ b/engines/glk/frotz/frotz_types.h @@ -85,6 +85,7 @@ enum Story { ARTHUR, JOURNEY, LURKING_HORROR, + MILLIWAYS, UNKNOWN }; diff --git a/engines/glk/frotz/glk_interface.cpp b/engines/glk/frotz/glk_interface.cpp index 8bbd154360c..e01e8928468 100644 --- a/engines/glk/frotz/glk_interface.cpp +++ b/engines/glk/frotz/glk_interface.cpp @@ -242,7 +242,7 @@ bool GlkInterface::initPictures() { return true; } - if (h_version == V6) + if (h_version == V6 && _storyId != MILLIWAYS) error("Could not locate MG1 file"); return false; }