ADL: Implement hires2 title screen

This commit is contained in:
Walter van Niftrik 2016-03-10 12:09:59 +01:00 committed by Walter van Niftrik
parent ee0c5e4452
commit e49085b49d
3 changed files with 37 additions and 3 deletions

View File

@ -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
},

View File

@ -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() {

View File

@ -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) { }