diff options
Diffstat (limited to 'engines')
-rw-r--r-- | engines/adl/hires0.cpp | 29 | ||||
-rw-r--r-- | engines/adl/hires0.h | 59 | ||||
-rw-r--r-- | engines/adl/hires1.cpp | 96 | ||||
-rw-r--r-- | engines/adl/hires1.h | 134 | ||||
-rw-r--r-- | engines/adl/hires2.cpp | 28 | ||||
-rw-r--r-- | engines/adl/hires2.h | 66 | ||||
-rw-r--r-- | engines/adl/hires4.cpp | 44 | ||||
-rw-r--r-- | engines/adl/hires4.h | 76 | ||||
-rw-r--r-- | engines/adl/hires6.cpp | 54 | ||||
-rw-r--r-- | engines/adl/hires6.h | 92 |
10 files changed, 246 insertions, 432 deletions
diff --git a/engines/adl/hires0.cpp b/engines/adl/hires0.cpp index 658132231e..9a0af05d20 100644 --- a/engines/adl/hires0.cpp +++ b/engines/adl/hires0.cpp @@ -22,12 +22,39 @@ #include "common/textconsole.h" -#include "adl/hires0.h" +#include "adl/adl_v2.h" #include "adl/graphics.h" #include "adl/disk.h" namespace Adl { +#define IDS_HR0_DISK_IMAGE "MISSION.NIB" + +#define IDI_HR0_NUM_ROOMS 43 +#define IDI_HR0_NUM_MESSAGES 142 +#define IDI_HR0_NUM_VARS 40 +#define IDI_HR0_NUM_ITEM_PICS 2 +#define IDI_HR0_NUM_ITEM_OFFSETS 16 + +// Messages used outside of scripts +#define IDI_HR0_MSG_CANT_GO_THERE 110 +#define IDI_HR0_MSG_DONT_UNDERSTAND 112 +#define IDI_HR0_MSG_ITEM_DOESNT_MOVE 114 +#define IDI_HR0_MSG_ITEM_NOT_HERE 115 +#define IDI_HR0_MSG_THANKS_FOR_PLAYING 113 + +class HiRes0Engine : public AdlEngine_v2 { +public: + HiRes0Engine(OSystem *syst, const AdlGameDescription *gd) : + AdlEngine_v2(syst, gd) { } + ~HiRes0Engine() { } + +private: + // AdlEngine + void init(); + void initGameState(); +}; + void HiRes0Engine::init() { _graphics = new Graphics_v2(*_display); diff --git a/engines/adl/hires0.h b/engines/adl/hires0.h deleted file mode 100644 index a3d8845a4e..0000000000 --- a/engines/adl/hires0.h +++ /dev/null @@ -1,59 +0,0 @@ -/* 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 ADL_HIRES0_H -#define ADL_HIRES0_H - -#include "adl/adl_v2.h" - -namespace Adl { - -#define IDS_HR0_DISK_IMAGE "MISSION.NIB" - -#define IDI_HR0_NUM_ROOMS 43 -#define IDI_HR0_NUM_MESSAGES 142 -#define IDI_HR0_NUM_VARS 40 -#define IDI_HR0_NUM_ITEM_PICS 2 -#define IDI_HR0_NUM_ITEM_OFFSETS 16 - -// Messages used outside of scripts -#define IDI_HR0_MSG_CANT_GO_THERE 110 -#define IDI_HR0_MSG_DONT_UNDERSTAND 112 -#define IDI_HR0_MSG_ITEM_DOESNT_MOVE 114 -#define IDI_HR0_MSG_ITEM_NOT_HERE 115 -#define IDI_HR0_MSG_THANKS_FOR_PLAYING 113 - -class HiRes0Engine : public AdlEngine_v2 { -public: - HiRes0Engine(OSystem *syst, const AdlGameDescription *gd) : - AdlEngine_v2(syst, gd) { } - ~HiRes0Engine() { } - -private: - // AdlEngine - void init(); - void initGameState(); -}; - -} // End of namespace Adl - -#endif diff --git a/engines/adl/hires1.cpp b/engines/adl/hires1.cpp index 50fe25422c..217a9013ba 100644 --- a/engines/adl/hires1.cpp +++ b/engines/adl/hires1.cpp @@ -27,11 +27,105 @@ #include "common/stream.h" #include "common/ptr.h" -#include "adl/hires1.h" +#include "adl/adl.h" +#include "adl/graphics.h" #include "adl/display.h" namespace Adl { +#define IDS_HR1_EXE_0 "AUTO LOAD OBJ" +#define IDS_HR1_EXE_1 "ADVENTURE" +#define IDS_HR1_LOADER "MYSTERY.HELLO" +#define IDS_HR1_MESSAGES "MESSAGES" + +#define IDI_HR1_NUM_ROOMS 41 +#define IDI_HR1_NUM_PICS 97 +#define IDI_HR1_NUM_VARS 20 +#define IDI_HR1_NUM_ITEM_OFFSETS 21 +#define IDI_HR1_NUM_MESSAGES 168 + +// Messages used outside of scripts +#define IDI_HR1_MSG_CANT_GO_THERE 137 +#define IDI_HR1_MSG_DONT_UNDERSTAND 37 +#define IDI_HR1_MSG_ITEM_DOESNT_MOVE 151 +#define IDI_HR1_MSG_ITEM_NOT_HERE 152 +#define IDI_HR1_MSG_THANKS_FOR_PLAYING 140 +#define IDI_HR1_MSG_DONT_HAVE_IT 127 +#define IDI_HR1_MSG_GETTING_DARK 7 + +#define IDI_HR1_OFS_STR_ENTER_COMMAND 0x5bbc +#define IDI_HR1_OFS_STR_VERB_ERROR 0x5b4f +#define IDI_HR1_OFS_STR_NOUN_ERROR 0x5b8e +#define IDI_HR1_OFS_STR_PLAY_AGAIN 0x5f1e +#define IDI_HR1_OFS_STR_CANT_GO_THERE 0x6c0a +#define IDI_HR1_OFS_STR_DONT_HAVE_IT 0x6c31 +#define IDI_HR1_OFS_STR_DONT_UNDERSTAND 0x6c51 +#define IDI_HR1_OFS_STR_GETTING_DARK 0x6c7c +#define IDI_HR1_OFS_STR_PRESS_RETURN 0x5f68 +#define IDI_HR1_OFS_STR_LINE_FEEDS 0x59d4 + +#define IDI_HR1_OFS_PD_TEXT_0 0x005d +#define IDI_HR1_OFS_PD_TEXT_1 0x012b +#define IDI_HR1_OFS_PD_TEXT_2 0x016d +#define IDI_HR1_OFS_PD_TEXT_3 0x0259 + +#define IDI_HR1_OFS_INTRO_TEXT 0x0066 +#define IDI_HR1_OFS_GAME_OR_HELP 0x000f + +#define IDI_HR1_OFS_LOGO_0 0x1003 +#define IDI_HR1_OFS_LOGO_1 0x1800 + +#define IDI_HR1_OFS_ITEMS 0x0100 +#define IDI_HR1_OFS_ROOMS 0x050a +#define IDI_HR1_OFS_PICS 0x4b03 +#define IDI_HR1_OFS_CMDS_0 0x3c00 +#define IDI_HR1_OFS_CMDS_1 0x3d00 +#define IDI_HR1_OFS_MSGS 0x4d00 + +#define IDI_HR1_OFS_ITEM_OFFSETS 0x68ff +#define IDI_HR1_OFS_CORNERS 0x4f00 + +#define IDI_HR1_OFS_VERBS 0x3800 +#define IDI_HR1_OFS_NOUNS 0x0f00 + +class HiRes1Engine : public AdlEngine { +public: + HiRes1Engine(OSystem *syst, const AdlGameDescription *gd) : + AdlEngine(syst, gd), + _files(nullptr), + _messageDelay(true) { } + ~HiRes1Engine() { delete _files; } + +private: + // AdlEngine + void runIntro() const; + void init(); + void initGameState(); + void restartGame(); + void printString(const Common::String &str); + Common::String loadMessage(uint idx) const; + void printMessage(uint idx); + void drawItems(); + void drawItem(Item &item, const Common::Point &pos); + void loadRoom(byte roomNr); + void showRoom(); + + void wordWrap(Common::String &str) const; + + Files *_files; + Common::File _exe; + Common::Array<DataBlockPtr> _corners; + Common::Array<byte> _roomDesc; + bool _messageDelay; + + struct { + Common::String cantGoThere; + Common::String dontHaveIt; + Common::String dontUnderstand; + Common::String gettingDark; + } _gameStrings; +}; + void HiRes1Engine::runIntro() const { StreamPtr stream(_files->createReadStream(IDS_HR1_EXE_0)); diff --git a/engines/adl/hires1.h b/engines/adl/hires1.h deleted file mode 100644 index c060bc892e..0000000000 --- a/engines/adl/hires1.h +++ /dev/null @@ -1,134 +0,0 @@ -/* 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 ADL_HIRES1_H -#define ADL_HIRES1_H - -#include "common/str.h" - -#include "adl/adl.h" -#include "adl/graphics.h" -#include "adl/disk.h" - -namespace Common { -class ReadStream; -struct Point; -} - -namespace Adl { - -#define IDS_HR1_EXE_0 "AUTO LOAD OBJ" -#define IDS_HR1_EXE_1 "ADVENTURE" -#define IDS_HR1_LOADER "MYSTERY.HELLO" -#define IDS_HR1_MESSAGES "MESSAGES" - -#define IDI_HR1_NUM_ROOMS 41 -#define IDI_HR1_NUM_PICS 97 -#define IDI_HR1_NUM_VARS 20 -#define IDI_HR1_NUM_ITEM_OFFSETS 21 -#define IDI_HR1_NUM_MESSAGES 168 - -// Messages used outside of scripts -#define IDI_HR1_MSG_CANT_GO_THERE 137 -#define IDI_HR1_MSG_DONT_UNDERSTAND 37 -#define IDI_HR1_MSG_ITEM_DOESNT_MOVE 151 -#define IDI_HR1_MSG_ITEM_NOT_HERE 152 -#define IDI_HR1_MSG_THANKS_FOR_PLAYING 140 -#define IDI_HR1_MSG_DONT_HAVE_IT 127 -#define IDI_HR1_MSG_GETTING_DARK 7 - -#define IDI_HR1_OFS_STR_ENTER_COMMAND 0x5bbc -#define IDI_HR1_OFS_STR_VERB_ERROR 0x5b4f -#define IDI_HR1_OFS_STR_NOUN_ERROR 0x5b8e -#define IDI_HR1_OFS_STR_PLAY_AGAIN 0x5f1e -#define IDI_HR1_OFS_STR_CANT_GO_THERE 0x6c0a -#define IDI_HR1_OFS_STR_DONT_HAVE_IT 0x6c31 -#define IDI_HR1_OFS_STR_DONT_UNDERSTAND 0x6c51 -#define IDI_HR1_OFS_STR_GETTING_DARK 0x6c7c -#define IDI_HR1_OFS_STR_PRESS_RETURN 0x5f68 -#define IDI_HR1_OFS_STR_LINE_FEEDS 0x59d4 - -#define IDI_HR1_OFS_PD_TEXT_0 0x005d -#define IDI_HR1_OFS_PD_TEXT_1 0x012b -#define IDI_HR1_OFS_PD_TEXT_2 0x016d -#define IDI_HR1_OFS_PD_TEXT_3 0x0259 - -#define IDI_HR1_OFS_INTRO_TEXT 0x0066 -#define IDI_HR1_OFS_GAME_OR_HELP 0x000f - -#define IDI_HR1_OFS_LOGO_0 0x1003 -#define IDI_HR1_OFS_LOGO_1 0x1800 - -#define IDI_HR1_OFS_ITEMS 0x0100 -#define IDI_HR1_OFS_ROOMS 0x050a -#define IDI_HR1_OFS_PICS 0x4b03 -#define IDI_HR1_OFS_CMDS_0 0x3c00 -#define IDI_HR1_OFS_CMDS_1 0x3d00 -#define IDI_HR1_OFS_MSGS 0x4d00 - -#define IDI_HR1_OFS_ITEM_OFFSETS 0x68ff -#define IDI_HR1_OFS_CORNERS 0x4f00 - -#define IDI_HR1_OFS_VERBS 0x3800 -#define IDI_HR1_OFS_NOUNS 0x0f00 - -class HiRes1Engine : public AdlEngine { -public: - HiRes1Engine(OSystem *syst, const AdlGameDescription *gd) : - AdlEngine(syst, gd), - _files(nullptr), - _messageDelay(true) { } - ~HiRes1Engine() { delete _files; } - -private: - // AdlEngine - void runIntro() const; - void init(); - void initGameState(); - void restartGame(); - void printString(const Common::String &str); - Common::String loadMessage(uint idx) const; - void printMessage(uint idx); - void drawItems(); - void drawItem(Item &item, const Common::Point &pos); - void loadRoom(byte roomNr); - void showRoom(); - - void wordWrap(Common::String &str) const; - - Files *_files; - Common::File _exe; - Common::Array<DataBlockPtr> _corners; - Common::Array<byte> _roomDesc; - bool _messageDelay; - - struct { - Common::String cantGoThere; - Common::String dontHaveIt; - Common::String dontUnderstand; - Common::String gettingDark; - } _gameStrings; -}; - -} // End of namespace Adl - -#endif diff --git a/engines/adl/hires2.cpp b/engines/adl/hires2.cpp index ec340c10d9..199f457b4f 100644 --- a/engines/adl/hires2.cpp +++ b/engines/adl/hires2.cpp @@ -26,13 +26,39 @@ #include "common/file.h" #include "common/stream.h" -#include "adl/hires2.h" +#include "adl/adl_v2.h" #include "adl/display.h" #include "adl/graphics.h" #include "adl/disk.h" namespace Adl { +#define IDS_HR2_DISK_IMAGE "WIZARD.DSK" + +#define IDI_HR2_NUM_ROOMS 135 +#define IDI_HR2_NUM_MESSAGES 255 +#define IDI_HR2_NUM_VARS 40 +#define IDI_HR2_NUM_ITEM_PICS 38 +#define IDI_HR2_NUM_ITEM_OFFSETS 16 + +// Messages used outside of scripts +#define IDI_HR2_MSG_CANT_GO_THERE 123 +#define IDI_HR2_MSG_DONT_UNDERSTAND 19 +#define IDI_HR2_MSG_ITEM_DOESNT_MOVE 242 +#define IDI_HR2_MSG_ITEM_NOT_HERE 4 +#define IDI_HR2_MSG_THANKS_FOR_PLAYING 239 + +class HiRes2Engine : public AdlEngine_v2 { +public: + HiRes2Engine(OSystem *syst, const AdlGameDescription *gd) : AdlEngine_v2(syst, gd) { } + +private: + // AdlEngine + void runIntro() const; + void init(); + void initGameState(); +}; + void HiRes2Engine::runIntro() const { // This only works for the 16-sector re-release. The original // release is not supported at this time, because we don't have diff --git a/engines/adl/hires2.h b/engines/adl/hires2.h deleted file mode 100644 index 50016725d6..0000000000 --- a/engines/adl/hires2.h +++ /dev/null @@ -1,66 +0,0 @@ -/* 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 ADL_HIRES2_H -#define ADL_HIRES2_H - -#include "common/str.h" - -#include "adl/adl_v2.h" -#include "adl/disk.h" - -namespace Common { -class ReadStream; -struct Point; -} - -namespace Adl { - -#define IDS_HR2_DISK_IMAGE "WIZARD.DSK" - -#define IDI_HR2_NUM_ROOMS 135 -#define IDI_HR2_NUM_MESSAGES 255 -#define IDI_HR2_NUM_VARS 40 -#define IDI_HR2_NUM_ITEM_PICS 38 -#define IDI_HR2_NUM_ITEM_OFFSETS 16 - -// Messages used outside of scripts -#define IDI_HR2_MSG_CANT_GO_THERE 123 -#define IDI_HR2_MSG_DONT_UNDERSTAND 19 -#define IDI_HR2_MSG_ITEM_DOESNT_MOVE 242 -#define IDI_HR2_MSG_ITEM_NOT_HERE 4 -#define IDI_HR2_MSG_THANKS_FOR_PLAYING 239 - -class HiRes2Engine : public AdlEngine_v2 { -public: - HiRes2Engine(OSystem *syst, const AdlGameDescription *gd) : AdlEngine_v2(syst, gd) { } - -private: - // AdlEngine - void runIntro() const; - void init(); - void initGameState(); -}; - -} // End of namespace Adl - -#endif diff --git a/engines/adl/hires4.cpp b/engines/adl/hires4.cpp index 1b27b035d6..ddfc868e9a 100644 --- a/engines/adl/hires4.cpp +++ b/engines/adl/hires4.cpp @@ -26,7 +26,7 @@ #include "common/file.h" #include "common/stream.h" -#include "adl/hires4.h" +#include "adl/adl_v3.h" #include "adl/detection.h" #include "adl/display.h" #include "adl/graphics.h" @@ -34,6 +34,48 @@ namespace Adl { +#define IDI_HR4_NUM_ROOMS 164 +#define IDI_HR4_NUM_MESSAGES 255 +#define IDI_HR4_NUM_VARS 40 +#define IDI_HR4_NUM_ITEM_DESCS 44 +#define IDI_HR4_NUM_ITEM_PICS 41 +#define IDI_HR4_NUM_ITEM_OFFSETS 40 + +// Messages used outside of scripts +#define IDI_HR4_MSG_CANT_GO_THERE 110 +#define IDI_HR4_MSG_DONT_UNDERSTAND 112 +#define IDI_HR4_MSG_ITEM_DOESNT_MOVE 114 +#define IDI_HR4_MSG_ITEM_NOT_HERE 115 +#define IDI_HR4_MSG_THANKS_FOR_PLAYING 113 + +class HiRes4Engine_Atari : public AdlEngine_v3 { +public: + HiRes4Engine_Atari(OSystem *syst, const AdlGameDescription *gd) : + AdlEngine_v3(syst, gd), + _boot(nullptr), + _curDisk(0) { } + ~HiRes4Engine_Atari(); + +private: + // AdlEngine + void init(); + void initGameState(); + void loadRoom(byte roomNr); + Common::String formatVerbError(const Common::String &verb) const; + Common::String formatNounError(const Common::String &verb, const Common::String &noun) const; + + // AdlEngine_v2 + void adjustDataBlockPtr(byte &track, byte §or, byte &offset, byte &size) const; + + Common::SeekableReadStream *createReadStream(DiskImage *disk, byte track, byte sector, byte offset = 0, byte size = 0) const; + void loadCommonData(); + void insertDisk(byte diskNr); + void rebindDisk(); + + DiskImage *_boot; + byte _curDisk; +}; + static const char *const atariDisks[] = { "ULYS1A.XFD", "ULYS1B.XFD", "ULYS2C.XFD" }; HiRes4Engine_Atari::~HiRes4Engine_Atari() { diff --git a/engines/adl/hires4.h b/engines/adl/hires4.h deleted file mode 100644 index 0bf2ab4ad9..0000000000 --- a/engines/adl/hires4.h +++ /dev/null @@ -1,76 +0,0 @@ -/* 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 ADL_HIRES4_H -#define ADL_HIRES4_H - -#include "common/str.h" - -#include "adl/adl_v3.h" - -namespace Adl { - -#define IDI_HR4_NUM_ROOMS 164 -#define IDI_HR4_NUM_MESSAGES 255 -#define IDI_HR4_NUM_VARS 40 -#define IDI_HR4_NUM_ITEM_DESCS 44 -#define IDI_HR4_NUM_ITEM_PICS 41 -#define IDI_HR4_NUM_ITEM_OFFSETS 40 - -// Messages used outside of scripts -#define IDI_HR4_MSG_CANT_GO_THERE 110 -#define IDI_HR4_MSG_DONT_UNDERSTAND 112 -#define IDI_HR4_MSG_ITEM_DOESNT_MOVE 114 -#define IDI_HR4_MSG_ITEM_NOT_HERE 115 -#define IDI_HR4_MSG_THANKS_FOR_PLAYING 113 - -class HiRes4Engine_Atari : public AdlEngine_v3 { -public: - HiRes4Engine_Atari(OSystem *syst, const AdlGameDescription *gd) : - AdlEngine_v3(syst, gd), - _boot(nullptr), - _curDisk(0) { } - ~HiRes4Engine_Atari(); - -private: - // AdlEngine - void init(); - void initGameState(); - void loadRoom(byte roomNr); - Common::String formatVerbError(const Common::String &verb) const; - Common::String formatNounError(const Common::String &verb, const Common::String &noun) const; - - // AdlEngine_v2 - void adjustDataBlockPtr(byte &track, byte §or, byte &offset, byte &size) const; - - Common::SeekableReadStream *createReadStream(DiskImage *disk, byte track, byte sector, byte offset = 0, byte size = 0) const; - void loadCommonData(); - void insertDisk(byte diskNr); - void rebindDisk(); - - DiskImage *_boot; - byte _curDisk; -}; - -} // End of namespace Adl - -#endif diff --git a/engines/adl/hires6.cpp b/engines/adl/hires6.cpp index d44a2e4872..a1fea05f19 100644 --- a/engines/adl/hires6.cpp +++ b/engines/adl/hires6.cpp @@ -27,13 +27,65 @@ #include "common/stream.h" #include "common/memstream.h" -#include "adl/hires6.h" +#include "adl/adl_v4.h" #include "adl/display.h" #include "adl/graphics.h" #include "adl/disk.h" namespace Adl { +#define IDI_HR6_NUM_ROOMS 35 +#define IDI_HR6_NUM_MESSAGES 256 +#define IDI_HR6_NUM_VARS 40 +#define IDI_HR6_NUM_ITEM_DESCS 15 +#define IDI_HR6_NUM_ITEM_PICS 15 +#define IDI_HR6_NUM_ITEM_OFFSETS 16 + +// Messages used outside of scripts +#define IDI_HR6_MSG_CANT_GO_THERE 249 +#define IDI_HR6_MSG_DONT_UNDERSTAND 247 +#define IDI_HR6_MSG_ITEM_DOESNT_MOVE 253 +#define IDI_HR6_MSG_ITEM_NOT_HERE 254 +#define IDI_HR6_MSG_THANKS_FOR_PLAYING 252 + +struct DiskDataDesc { + byte track; + byte sector; + byte offset; + byte volume; +}; + +class HiRes6Engine : public AdlEngine_v4 { +public: + HiRes6Engine(OSystem *syst, const AdlGameDescription *gd) : + AdlEngine_v4(syst, gd), + _boot(nullptr), + _currVerb(0), + _currNoun(0) { + } + + ~HiRes6Engine() { delete _boot; } + +private: + // AdlEngine + void runIntro() const; + void init(); + void initGameState(); + void printRoomDescription(); + void showRoom(); + Common::String formatVerbError(const Common::String &verb) const; + Common::String formatNounError(const Common::String &verb, const Common::String &noun) const; + + // AdlEngine_v2 + void printString(const Common::String &str); + + void loadDisk(byte disk); + + DiskImage *_boot; + byte _currVerb, _currNoun; + Common::Array<DiskDataDesc> _diskDataDesc; +}; + static const char *disks[] = { "DARK1A.DSK", "DARK1B.NIB", "DARK2A.NIB", "DARK2B.NIB" }; #define SECTORS_PER_TRACK 16 diff --git a/engines/adl/hires6.h b/engines/adl/hires6.h deleted file mode 100644 index 5ff039120b..0000000000 --- a/engines/adl/hires6.h +++ /dev/null @@ -1,92 +0,0 @@ -/* 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 ADL_HIRES6_H -#define ADL_HIRES6_H - -#include "common/str.h" - -#include "adl/adl_v4.h" -#include "adl/disk.h" - -namespace Common { -class ReadStream; -struct Point; -} - -namespace Adl { - -#define IDI_HR6_NUM_ROOMS 35 -#define IDI_HR6_NUM_MESSAGES 256 -#define IDI_HR6_NUM_VARS 40 -#define IDI_HR6_NUM_ITEM_DESCS 15 -#define IDI_HR6_NUM_ITEM_PICS 15 -#define IDI_HR6_NUM_ITEM_OFFSETS 16 - -// Messages used outside of scripts -#define IDI_HR6_MSG_CANT_GO_THERE 249 -#define IDI_HR6_MSG_DONT_UNDERSTAND 247 -#define IDI_HR6_MSG_ITEM_DOESNT_MOVE 253 -#define IDI_HR6_MSG_ITEM_NOT_HERE 254 -#define IDI_HR6_MSG_THANKS_FOR_PLAYING 252 - -struct DiskDataDesc { - byte track; - byte sector; - byte offset; - byte volume; -}; - -class HiRes6Engine : public AdlEngine_v4 { -public: - HiRes6Engine(OSystem *syst, const AdlGameDescription *gd) : - AdlEngine_v4(syst, gd), - _boot(nullptr), - _currVerb(0), - _currNoun(0) { - } - - ~HiRes6Engine() { delete _boot; } - -private: - // AdlEngine - void runIntro() const; - void init(); - void initGameState(); - void printRoomDescription(); - void showRoom(); - Common::String formatVerbError(const Common::String &verb) const; - Common::String formatNounError(const Common::String &verb, const Common::String &noun) const; - - // AdlEngine_v2 - void printString(const Common::String &str); - - void loadDisk(byte disk); - - DiskImage *_boot; - byte _currVerb, _currNoun; - Common::Array<DiskDataDesc> _diskDataDesc; -}; - -} // End of namespace Adl - -#endif |