aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWalter van Niftrik2016-03-10 12:09:59 +0100
committerWalter van Niftrik2016-06-06 20:35:49 +0200
commite49085b49d0ff0b2962923682db6770ef3c908dd (patch)
tree3ab3f3cf4bd2479e670ebdb155983696c5cb3b9d
parentee0c5e4452722fcee3304af26d209114b4c80f75 (diff)
downloadscummvm-rg350-e49085b49d0ff0b2962923682db6770ef3c908dd.tar.gz
scummvm-rg350-e49085b49d0ff0b2962923682db6770ef3c908dd.tar.bz2
scummvm-rg350-e49085b49d0ff0b2962923682db6770ef3c908dd.zip
ADL: Implement hires2 title screen
-rw-r--r--engines/adl/detection.cpp17
-rw-r--r--engines/adl/hires2.cpp16
-rw-r--r--engines/adl/hires2.h7
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[] = {
{
@@ -47,6 +48,16 @@ static const ADExtraGuiOptionsMap optionsList[] = {
},
{
+ GAMEOPTION_MONO,
+ {
+ _s("Color mode"),
+ _s("Use color graphics"),
+ "color",
+ true
+ }
+ },
+
+ {
GAMEOPTION_SCANLINES,
{
_s("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) { }