diff options
author | Paul Gilbert | 2018-11-10 18:56:29 -0800 |
---|---|---|
committer | Paul Gilbert | 2018-12-08 19:05:59 -0800 |
commit | 4497a55a860a5ec5de47075e11cf69deffd2031d (patch) | |
tree | 56671d7c9df2cc49927c2791b30cd4919553f8f6 /engines/gargoyle/frotz | |
parent | 7d20a3552bd26d10e220261c97a8f65f2d3add54 (diff) | |
download | scummvm-rg350-4497a55a860a5ec5de47075e11cf69deffd2031d.tar.gz scummvm-rg350-4497a55a860a5ec5de47075e11cf69deffd2031d.tar.bz2 scummvm-rg350-4497a55a860a5ec5de47075e11cf69deffd2031d.zip |
GLK: FROTZ: Beginnings of Mem class
Diffstat (limited to 'engines/gargoyle/frotz')
-rw-r--r-- | engines/gargoyle/frotz/detection_tables.cpp | 82 | ||||
-rw-r--r-- | engines/gargoyle/frotz/detection_tables.h | 80 | ||||
-rw-r--r-- | engines/gargoyle/frotz/frotz.cpp | 2 | ||||
-rw-r--r-- | engines/gargoyle/frotz/frotz.h | 2 | ||||
-rw-r--r-- | engines/gargoyle/frotz/frotz_types.h | 18 | ||||
-rw-r--r-- | engines/gargoyle/frotz/mem.cpp | 59 | ||||
-rw-r--r-- | engines/gargoyle/frotz/mem.h | 43 |
7 files changed, 195 insertions, 91 deletions
diff --git a/engines/gargoyle/frotz/detection_tables.cpp b/engines/gargoyle/frotz/detection_tables.cpp index f8d3f424e3..af856ed3e6 100644 --- a/engines/gargoyle/frotz/detection_tables.cpp +++ b/engines/gargoyle/frotz/detection_tables.cpp @@ -25,49 +25,49 @@ namespace Gargoyle { namespace Frotz { -const char *const AMFV = "A Mind Forever Voyaging"; -const char *const ARTHUR = "Arthur: The Quest for Excalibur"; -const char *const BALLYHOO = "Ballyhoo"; -const char *const BEYONDZORK = "Beyond Zork"; -const char *const BORDERZONE = "Border Zone"; -const char *const BUREAUCRACY = "Bureaucracy"; -const char *const CUTTHROATS = "Cutthroats"; -const char *const DEADLINE = "Deadline"; -const char *const ENCHANTER = "Enchanter"; -const char *const HHGTTG = "The Hitchhiker's Guide to the Galaxy"; -const char *const HIJINX = "Hollywood Hijinx"; -const char *const INFIDEL = "Infidel"; -const char *const JOURNEY = "Journey"; -const char *const LGOP = "Leather Goddesses of Phobos"; -const char *const LGOP2 = "Leather Goddesses of Phobos 2"; -const char *const LURKING = "The Lurking Horror"; -const char *const MINIZORK1 = "Mini Zork I: The Great Underground Empire"; -const char *const MOONMIST = "Moonmist"; -const char *const NORDBERT = "Nord and Bert Couldn't Make Head or Tail of It"; -const char *const PLANETFALL = "Planetfall"; -const char *const PLUNDERED = "Plundered Hearts"; -const char *const SAMPLER1 = "Infocom Sampler 1"; -const char *const SAMPLER2 = "Infocom Sampler 2"; -const char *const SEASTALKER = "Seastalker"; -const char *const SHERLOCKRIDDLE = "Sherlock: The Riddle of the Crown Jewels"; -const char *const SHOGUN = "James Clavell's Shogun"; -const char *const SORCERER = "Sorcerer"; -const char *const SPELLBREAKER = "Spellbreaker"; -const char *const STARCROSS = "Starcross"; -const char *const STATIONFALL = "Stationfall"; -const char *const SUSPECT = "Suspect"; -const char *const SUSPENDED = "Suspended"; -const char *const TRINITY = "Trinity"; -const char *const WISHBRINGER = "Wishbringer"; -const char *const WITNESS = "The Witness"; -const char *const ZORK0 = "Zork Zero: The Revenge of Megaboz"; -const char *const ZORK1 = "Zork I: The Great Underground Empire"; -const char *const ZORK2 = "Zork II: The Wizard of Frobozz"; -const char *const ZORK3 = "Zork III: The Dungeon Master"; -const char *const ZTUU = "Zork: The Undiscovered Underground"; +const char *const AMFV_DESC = "A Mind Forever Voyaging"; +const char *const ARTHUR_DESC = "Arthur: The Quest for Excalibur"; +const char *const BALLYHOO_DESC = "Ballyhoo"; +const char *const BEYONDZORK_DESC = "Beyond Zork"; +const char *const BORDERZONE_DESC = "Border Zone"; +const char *const BUREAUCRACY_DESC = "Bureaucracy"; +const char *const CUTTHROATS_DESC = "Cutthroats"; +const char *const DEADLINE_DESC = "Deadline"; +const char *const ENCHANTER_DESC = "Enchanter"; +const char *const HHGTTG_DESC = "The Hitchhiker's Guide to the Galaxy"; +const char *const HIJINX_DESC = "Hollywood Hijinx"; +const char *const INFIDEL_DESC = "Infidel"; +const char *const JOURNEY_DESC = "Journey"; +const char *const LGOP_DESC = "Leather Goddesses of Phobos"; +const char *const LGOP2_DESC = "Leather Goddesses of Phobos 2"; +const char *const LURKING_DESC = "The Lurking Horror"; +const char *const MINIZORK1_DESC = "Mini Zork I: The Great Underground Empire"; +const char *const MOONMIST_DESC = "Moonmist"; +const char *const NORDBERT_DESC = "Nord and Bert Couldn't Make Head or Tail of It"; +const char *const PLANETFALL_DESC = "Planetfall"; +const char *const PLUNDERED_DESC = "Plundered Hearts"; +const char *const SAMPLER1_DESC = "Infocom Sampler 1"; +const char *const SAMPLER2_DESC = "Infocom Sampler 2"; +const char *const SEASTALKER_DESC = "Seastalker"; +const char *const SHERLOCKRIDDLE_DESC = "Sherlock: The Riddle of the Crown Jewels"; +const char *const SHOGUN_DESC = "James Clavell's Shogun"; +const char *const SORCERER_DESC = "Sorcerer"; +const char *const SPELLBREAKER_DESC = "Spellbreaker"; +const char *const STARCROSS_DESC = "Starcross"; +const char *const STATIONFALL_DESC = "Stationfall"; +const char *const SUSPECT_DESC = "Suspect"; +const char *const SUSPENDED_DESC = "Suspended"; +const char *const TRINITY_DESC = "Trinity"; +const char *const WISHBRINGER_DESC = "Wishbringer"; +const char *const WITNESS_DESC = "The Witness"; +const char *const ZORK0_DESC = "Zork Zero: The Revenge of Megaboz"; +const char *const ZORK1_DESC = "Zork I: The Great Underground Empire"; +const char *const ZORK2_DESC = "Zork II: The Wizard of Frobozz"; +const char *const ZORK3_DESC = "Zork III: The Dungeon Master"; +const char *const ZTUU_DESC = "Zork: The Undiscovered Underground"; #define NONE GUIO4(GUIO_NOSPEECH, GUIO_NOSFX, GUIO_NOMUSIC, GUIO_NOSUBTITLES) -#define ENTRY0(ID, DESC, VERSION, MD5, FILESIZE) { ID, DESC, VERSION, MD5, FILESIZE, Common::EN_ANY, NONE } +#define ENTRY0(ID, DESCRIPTION, VERSION, MD5, FILESIZE) { ID, DESCRIPTION##_DESC, VERSION, MD5, FILESIZE, Common::EN_ANY, NONE } #define FROTZ_TABLE_END_MARKER { nullptr, nullptr, nullptr, nullptr, 0, Common::EN_ANY, "" } const FrotzGameDescription FROTZ_GAMES[] = { diff --git a/engines/gargoyle/frotz/detection_tables.h b/engines/gargoyle/frotz/detection_tables.h index 1a9e4eefa9..48e0eb0a5a 100644 --- a/engines/gargoyle/frotz/detection_tables.h +++ b/engines/gargoyle/frotz/detection_tables.h @@ -40,46 +40,46 @@ struct FrotzGameDescription { }; extern const FrotzGameDescription FROTZ_GAMES[]; -extern const char *const AMFV; -extern const char *const ARTHUR; -extern const char *const BALLYHOO; -extern const char *const BEYONDZORK; -extern const char *const BORDERZONE; -extern const char *const BUREAUCRACY; -extern const char *const CUTTHROATS; -extern const char *const DEADLINE; -extern const char *const ENCHANTER; -extern const char *const HHGTTG; -extern const char *const HIJINX; -extern const char *const INFIDEL; -extern const char *const JOURNEY; -extern const char *const LGOP; -extern const char *const LGOP2; -extern const char *const LURKING; -extern const char *const MINIZORK1; -extern const char *const MOONMIST; -extern const char *const NORDBERT; -extern const char *const PLANETFALL; -extern const char *const PLUNDERED; -extern const char *const SAMPLER1; -extern const char *const SAMPLER2; -extern const char *const SEASTALKER; -extern const char *const SHERLOCKRIDDLE; -extern const char *const SHOGUN; -extern const char *const SORCERER; -extern const char *const SPELLBREAKER; -extern const char *const STARCROSS; -extern const char *const STATIONFALL; -extern const char *const SUSPECT; -extern const char *const SUSPENDED; -extern const char *const TRINITY; -extern const char *const WISHBRINGER; -extern const char *const WITNESS; -extern const char *const ZORK0; -extern const char *const ZORK1; -extern const char *const ZORK2; -extern const char *const ZORK3; -extern const char *const ZTUU; +extern const char *const AMFV_DESC; +extern const char *const ARTHUR_DESC; +extern const char *const BALLYHOO_DESC; +extern const char *const BEYONDZORK_DESC; +extern const char *const BORDERZONE_DESC; +extern const char *const BUREAUCRACY_DESC; +extern const char *const CUTTHROATS_DESC; +extern const char *const DEADLINE_DESC; +extern const char *const ENCHANTER_DESC; +extern const char *const HHGTTG_DESC; +extern const char *const HIJINX_DESC; +extern const char *const INFIDEL_DESC; +extern const char *const JOURNEY_DESC; +extern const char *const LGOP_DESC; +extern const char *const LGOP2_DESC; +extern const char *const LURKING_DESC; +extern const char *const MINIZORK1_DESC; +extern const char *const MOONMIST_DESC; +extern const char *const NORDBERT_DESC; +extern const char *const PLANETFALL_DESC; +extern const char *const PLUNDERED_DESC; +extern const char *const SAMPLER1_DESC; +extern const char *const SAMPLER2_DESC; +extern const char *const SEASTALKER_DESC; +extern const char *const SHERLOCKRIDDLE_DESC; +extern const char *const SHOGUN_DESC; +extern const char *const SORCERER_DESC; +extern const char *const SPELLBREAKER_DESC; +extern const char *const STARCROSS_DESC; +extern const char *const STATIONFALL_DESC; +extern const char *const SUSPECT_DESC; +extern const char *const SUSPENDED_DESC; +extern const char *const TRINITY_DESC; +extern const char *const WISHBRINGER_DESC; +extern const char *const WITNESS_DESC; +extern const char *const ZORK0_DESC; +extern const char *const ZORK1_DESC; +extern const char *const ZORK2_DESC; +extern const char *const ZORK3_DESC; +extern const char *const ZTUU_DESC; } // End of namespace Frotz } // End of namespace Gargoyle diff --git a/engines/gargoyle/frotz/frotz.cpp b/engines/gargoyle/frotz/frotz.cpp index 2a7bcd02fc..77c33034ec 100644 --- a/engines/gargoyle/frotz/frotz.cpp +++ b/engines/gargoyle/frotz/frotz.cpp @@ -29,7 +29,7 @@ namespace Frotz { Frotz *g_vm; Frotz::Frotz(OSystem *syst, const GargoyleGameDescription *gameDesc) : Glk(syst, gameDesc), - _storyId(STORY_UNKNOWN), _storySize(0), _sp(nullptr), _fp(nullptr), _frameCount(0), + _storyId(UNKNOWN), _storySize(0), _sp(nullptr), _fp(nullptr), _frameCount(0), _ostream_screen(true), _ostream_script(false), _ostream_memory(false), _ostream_record(false), _istream_replay(false), _message(false), _cwin(0), _mwin(0), _mouse_x(0), _mouse_y(0), _menu_selected(0), diff --git a/engines/gargoyle/frotz/frotz.h b/engines/gargoyle/frotz/frotz.h index b0a7e1d294..e1f3d9fe30 100644 --- a/engines/gargoyle/frotz/frotz.h +++ b/engines/gargoyle/frotz/frotz.h @@ -27,6 +27,7 @@ #include "gargoyle/frotz/frotz_types.h" #include "gargoyle/frotz/buffer.h" #include "gargoyle/frotz/err.h" +#include "gargoyle/frotz/mem.h" namespace Gargoyle { namespace Frotz { @@ -39,6 +40,7 @@ public: UserOptions _options; Header _header; Buffer _buffer; + Mem _mem; // Story file name, id number and size Common::String _storyName; diff --git a/engines/gargoyle/frotz/frotz_types.h b/engines/gargoyle/frotz/frotz_types.h index 6fee562a8e..505d656ba8 100644 --- a/engines/gargoyle/frotz/frotz_types.h +++ b/engines/gargoyle/frotz/frotz_types.h @@ -91,18 +91,18 @@ enum ZCode { }; enum Story { - STORY_BEYOND_ZORK, - STORY_SHERLOCK, - STORY_ZORK_ZERO, - STORY_SHOGUN, - STORY_ARTHUR, - STORY_JOURNEY, - STORY_LURKING_HORROR, - STORY_UNKNOWN + BEYOND_ZORK, + SHERLOCK, + ZORK_ZERO, + SHOGUN, + ARTHUR, + JOURNEY, + LURKING_HORROR, + UNKNOWN }; typedef byte zbyte; -typedef char zchar; +typedef uint zchar; typedef uint16 zword; /** diff --git a/engines/gargoyle/frotz/mem.cpp b/engines/gargoyle/frotz/mem.cpp new file mode 100644 index 0000000000..4bd2324312 --- /dev/null +++ b/engines/gargoyle/frotz/mem.cpp @@ -0,0 +1,59 @@ +/* ScummVM - Graphic Adventure Engine + * + * ScummVM is the legal property of its developers, whose names + * are too numerous to list here. Please refer to the COPYRIGHT + * file distributed with this source distribution. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + */ + +#include "gargoyle/frotz/mem.h" +#include "common/textconsole.h" + +namespace Gargoyle { +namespace Frotz { + +const Mem::StoryEntry Mem::RECORDS[25] = { + { SHERLOCK, 21, "871214" }, + { SHERLOCK, 26, "880127" }, + { BEYOND_ZORK, 47, "870915" }, + { BEYOND_ZORK, 49, "870917" }, + { BEYOND_ZORK, 51, "870923" }, + { BEYOND_ZORK, 57, "871221" }, + { ZORK_ZERO, 296, "881019" }, + { ZORK_ZERO, 366, "890323" }, + { ZORK_ZERO, 383, "890602" }, + { ZORK_ZERO, 393, "890714" }, + { SHOGUN, 292, "890314" }, + { SHOGUN, 295, "890321" }, + { SHOGUN, 311, "890510" }, + { SHOGUN, 322, "890706" }, + { ARTHUR, 54, "890606" }, + { ARTHUR, 63, "890622" }, + { ARTHUR, 74, "890714" }, + { JOURNEY, 26, "890316" }, + { JOURNEY, 30, "890322" }, + { JOURNEY, 77, "890616" }, + { JOURNEY, 83, "890706" }, + { LURKING_HORROR, 203, "870506" }, + { LURKING_HORROR, 219, "870912" }, + { LURKING_HORROR, 221, "870918" }, + { UNKNOWN, 0, "------" } +}; + + +} // End of namespace Scott +} // End of namespace Gargoyle diff --git a/engines/gargoyle/frotz/mem.h b/engines/gargoyle/frotz/mem.h new file mode 100644 index 0000000000..4abe464bde --- /dev/null +++ b/engines/gargoyle/frotz/mem.h @@ -0,0 +1,43 @@ +/* ScummVM - Graphic Adventure Engine + * + * ScummVM is the legal property of its developers, whose names + * are too numerous to list here. Please refer to the COPYRIGHT + * file distributed with this source distribution. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + */ + +#ifndef GARGOYLE_FROTZ_MEM +#define GARGOYLE_FROTZ_MEM + +#include "gargoyle/frotz/frotz_types.h" + +namespace Gargoyle { +namespace Frotz { + +class Mem { + struct StoryEntry { + Story _storyId; + zword _release; + char _serial[7]; + }; + static const StoryEntry RECORDS[25]; +}; + +} // End of namespace Frotz +} // End of namespace Gargoyle + +#endif |