From e49085b49d0ff0b2962923682db6770ef3c908dd Mon Sep 17 00:00:00 2001 From: Walter van Niftrik Date: Thu, 10 Mar 2016 12:09:59 +0100 Subject: ADL: Implement hires2 title screen --- engines/adl/detection.cpp | 17 ++++++++++++++--- engines/adl/hires2.cpp | 16 ++++++++++++++++ engines/adl/hires2.h | 7 +++++++ 3 files changed, 37 insertions(+), 3 deletions(-) diff --git a/engines/adl/detection.cpp b/engines/adl/detection.cpp index 3069f21304..81050d710d 100644 --- a/engines/adl/detection.cpp +++ b/engines/adl/detection.cpp @@ -32,8 +32,9 @@ namespace Adl { -#define GAMEOPTION_COLOR GUIO_GAMEOPTIONS1 -#define GAMEOPTION_SCANLINES GUIO_GAMEOPTIONS2 +#define GAMEOPTION_COLOR GUIO_GAMEOPTIONS1 +#define GAMEOPTION_SCANLINES GUIO_GAMEOPTIONS2 +#define GAMEOPTION_MONO GUIO_GAMEOPTIONS3 static const ADExtraGuiOptionsMap optionsList[] = { { @@ -46,6 +47,16 @@ static const ADExtraGuiOptionsMap optionsList[] = { } }, + { + GAMEOPTION_MONO, + { + _s("Color mode"), + _s("Use color graphics"), + "color", + true + } + }, + { GAMEOPTION_SCANLINES, { @@ -92,7 +103,7 @@ static const AdlGameDescription gameDescriptions[] = { Common::EN_ANY, Common::kPlatformApple2GS, // FIXME ADGF_NO_FLAGS, - GUIO1(GAMEOPTION_SCANLINES) + GUIO2(GAMEOPTION_MONO, GAMEOPTION_SCANLINES) }, GAME_TYPE_HIRES2 }, diff --git a/engines/adl/hires2.cpp b/engines/adl/hires2.cpp index 25e0e6f235..f318ad3845 100644 --- a/engines/adl/hires2.cpp +++ b/engines/adl/hires2.cpp @@ -32,6 +32,22 @@ namespace Adl { void HiRes2Engine::runIntro() const { + Common::File f; + + if (!f.open(IDS_HR2_DISK_IMAGE)) + error("Failed to open file '" IDS_HR2_DISK_IMAGE "'"); + + f.seek(IDI_HR2_OFS_INTRO_TEXT); + + _display->setMode(DISPLAY_MODE_TEXT); + + Common::String str = readStringAt(f, IDI_HR2_OFS_INTRO_TEXT); + + if (f.eos() || f.err()) + error("Error reading disk image"); + + _display->printString(str); + delay(2000); } void HiRes2Engine::loadData() { diff --git a/engines/adl/hires2.h b/engines/adl/hires2.h index 005948a183..9bb7b98aab 100644 --- a/engines/adl/hires2.h +++ b/engines/adl/hires2.h @@ -34,6 +34,13 @@ class Point; namespace Adl { +#define IDS_HR2_DISK_IMAGE "WIZARD.DSK" + +// Track, sector, offset +#define TSO(T, S, O) (((T) * 16 + (S)) * 256 + (O)) + +#define IDI_HR2_OFS_INTRO_TEXT TSO(0x00, 0xd, 0x17) + class HiRes2Engine : public AdlEngine { public: HiRes2Engine(OSystem *syst, const AdlGameDescription *gd) : AdlEngine(syst, gd) { } -- cgit v1.2.3