Skip to content

Commit

Permalink
ADL: Add skeleton for Hi-Res #2
Browse files Browse the repository at this point in the history
  • Loading branch information
waltervn committed Jun 6, 2016
1 parent 6c09ab9 commit ee0c5e4
Show file tree
Hide file tree
Showing 5 changed files with 134 additions and 7 deletions.
29 changes: 24 additions & 5 deletions engines/adl/detection.cpp
Expand Up @@ -60,18 +60,19 @@ static const ADExtraGuiOptionsMap optionsList[] = {
};

static const PlainGameDescriptor adlGames[] = {
{"hires1", "Hi-Res Adventure #1: Mystery House"},
{0, 0}
{ "hires1", "Hi-Res Adventure #1: Mystery House" },
{ "hires2", "Hi-Res Adventure #2: Wizard and the Princess" },
{ 0, 0 }
};

static const AdlGameDescription gameDescriptions[] = {
{ // Hi-Res Adventure #1: Mystery House - Apple II - 1987 PD release
{
"hires1", 0,
{
{"ADVENTURE", 0, "22d9e63a11d69fa033ba1738715ad09a", 29952},
{"AUTO LOAD OBJ", 0, "23bfccfe9fcff9b22cf6c41bde9078ac", 12291},
{"MYSTERY.HELLO", 0, "2289b7fea300b506e902a4c597968369", 836},
{ "ADVENTURE", 0, "22d9e63a11d69fa033ba1738715ad09a", 29952 },
{ "AUTO LOAD OBJ", 0, "23bfccfe9fcff9b22cf6c41bde9078ac", 12291 },
{ "MYSTERY.HELLO", 0, "2289b7fea300b506e902a4c597968369", 836 },
AD_LISTEND
},
Common::EN_ANY,
Expand All @@ -81,6 +82,20 @@ static const AdlGameDescription gameDescriptions[] = {
},
GAME_TYPE_HIRES1
},
{ // Hi-Res Adventure #2: Wizard and the Princess - Apple II - 1986 SierraVenture release
{
"hires2", 0,
{
{ "WIZARD.DSK", 0, "816fdfc35e25496213c8db40ecf26569", 143360 },
AD_LISTEND
},
Common::EN_ANY,
Common::kPlatformApple2GS, // FIXME
ADGF_NO_FLAGS,
GUIO1(GAMEOPTION_SCANLINES)
},
GAME_TYPE_HIRES2
},
{ AD_TABLE_END_MARKER, GAME_TYPE_NONE }
};

Expand Down Expand Up @@ -220,6 +235,7 @@ void AdlMetaEngine::removeSaveState(const char *target, int slot) const {
}

Engine *HiRes1Engine_create(OSystem *syst, const AdlGameDescription *gd);
Engine *HiRes2Engine_create(OSystem *syst, const AdlGameDescription *gd);

bool AdlMetaEngine::createInstance(OSystem *syst, Engine **engine, const ADGameDescription *gd) const {
if (!gd)
Expand All @@ -231,6 +247,9 @@ bool AdlMetaEngine::createInstance(OSystem *syst, Engine **engine, const ADGameD
case GAME_TYPE_HIRES1:
*engine = HiRes1Engine_create(syst, adlGd);
break;
case GAME_TYPE_HIRES2:
*engine = HiRes2Engine_create(syst, adlGd);
break;
default:
error("Unknown GameType");
}
Expand Down
3 changes: 2 additions & 1 deletion engines/adl/detection.h
Expand Up @@ -32,7 +32,8 @@ namespace Adl {

enum GameType {
GAME_TYPE_NONE,
GAME_TYPE_HIRES1
GAME_TYPE_HIRES1,
GAME_TYPE_HIRES2
};

struct AdlGameDescription {
Expand Down
54 changes: 54 additions & 0 deletions engines/adl/hires2.cpp
@@ -0,0 +1,54 @@
/* 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 "common/system.h"
#include "common/debug.h"
#include "common/error.h"
#include "common/file.h"
#include "common/stream.h"

#include "adl/hires2.h"
#include "adl/display.h"

namespace Adl {

void HiRes2Engine::runIntro() const {
}

void HiRes2Engine::loadData() {
}

void HiRes2Engine::initState() {
}

void HiRes2Engine::restartGame() {
initState();
}

void HiRes2Engine::drawPic(byte pic, Common::Point pos) const {
}

Engine *HiRes2Engine_create(OSystem *syst, const AdlGameDescription *gd) {
return new HiRes2Engine(syst, gd);
}

} // End of namespace Adl
52 changes: 52 additions & 0 deletions engines/adl/hires2.h
@@ -0,0 +1,52 @@
/* 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"

namespace Common {
class ReadStream;
class Point;
}

namespace Adl {

class HiRes2Engine : public AdlEngine {
public:
HiRes2Engine(OSystem *syst, const AdlGameDescription *gd) : AdlEngine(syst, gd) { }

private:
// AdlEngine
void runIntro() const;
void loadData();
void initState();
void restartGame();
void drawPic(byte pic, Common::Point pos) const;
};

} // End of namespace Adl

#endif
3 changes: 2 additions & 1 deletion engines/adl/module.mk
Expand Up @@ -4,7 +4,8 @@ MODULE_OBJS := \
adl.o \
detection.o \
display.o \
hires1.o
hires1.o \
hires2.o

MODULE_DIRS += \
engines/adl
Expand Down

0 comments on commit ee0c5e4

Please sign in to comment.