ADL: Add support for another hires1 variant
This commit is contained in:
parent
e7eaff13bf
commit
0300979bdd
3 changed files with 131 additions and 71 deletions
|
@ -94,7 +94,23 @@ struct AdlGameDescription {
|
|||
};
|
||||
|
||||
static const AdlGameDescription gameFileDescriptions[] = {
|
||||
{ // Hi-Res Adventure #1: Mystery House - Apple II - 2nd release
|
||||
{ // Hi-Res Adventure #1: Mystery House - Apple II - Contains Simi Valley address
|
||||
{
|
||||
"hires1", 0,
|
||||
{
|
||||
{ "ADVENTURE", 0, "22d9e63a11d69fa033ba1738715ad09a", 29952 },
|
||||
{ "AUTO LOAD OBJ", 0, "a2ab7be25842e1fa9f1343b0894a8b6f", 4095 },
|
||||
AD_LISTEND
|
||||
},
|
||||
Common::EN_ANY,
|
||||
Common::kPlatformApple2,
|
||||
ADGF_NO_FLAGS,
|
||||
GUIO2(GAMEOPTION_COLOR_DEFAULT_OFF, GAMEOPTION_SCANLINES)
|
||||
},
|
||||
GAME_TYPE_HIRES1,
|
||||
GAME_VER_HR1_SIMI
|
||||
},
|
||||
{ // Hi-Res Adventure #1: Mystery House - Apple II - Contains Coarsegold address
|
||||
{
|
||||
"hires1", 0,
|
||||
{
|
||||
|
@ -131,6 +147,21 @@ static const AdlGameDescription gameFileDescriptions[] = {
|
|||
};
|
||||
|
||||
static const AdlGameDescription gameDiskDescriptions[] = {
|
||||
{ // Hi-Res Adventure #1: Mystery House - Apple II - Contains Coarsegold address
|
||||
{
|
||||
"hires1", 0,
|
||||
{
|
||||
{ "mysthous", 0, "8df0b3b3e609a2e40237e2419c1cb767", 116480 },
|
||||
AD_LISTEND
|
||||
},
|
||||
Common::EN_ANY,
|
||||
Common::kPlatformApple2,
|
||||
ADGF_NO_FLAGS,
|
||||
GUIO2(GAMEOPTION_COLOR_DEFAULT_OFF, GAMEOPTION_SCANLINES)
|
||||
},
|
||||
GAME_TYPE_HIRES1,
|
||||
GAME_VER_HR1_COARSE
|
||||
},
|
||||
{ // Hi-Res Adventure #1: Mystery House - Apple II - Roberta Williams Anthology
|
||||
{
|
||||
"hires1", 0,
|
||||
|
@ -146,21 +177,6 @@ static const AdlGameDescription gameDiskDescriptions[] = {
|
|||
GAME_TYPE_HIRES1,
|
||||
GAME_VER_HR1_PD
|
||||
},
|
||||
{ // Hi-Res Adventure #1: Mystery House - Apple II - 2nd release
|
||||
{
|
||||
"hires1", 0,
|
||||
{
|
||||
{ "mysthous", 0, "8df0b3b3e609a2e40237e2419c1cb767", 116480 },
|
||||
AD_LISTEND
|
||||
},
|
||||
Common::EN_ANY,
|
||||
Common::kPlatformApple2,
|
||||
ADGF_NO_FLAGS,
|
||||
GUIO2(GAMEOPTION_COLOR_DEFAULT_OFF, GAMEOPTION_SCANLINES)
|
||||
},
|
||||
GAME_TYPE_HIRES1,
|
||||
GAME_VER_HR1_COARSE
|
||||
},
|
||||
{ // Hi-Res Adventure #2: Wizard and the Princess - Apple II - Roberta Williams Anthology
|
||||
{
|
||||
"hires2", 0,
|
||||
|
|
|
@ -39,11 +39,27 @@ enum GameType {
|
|||
GAME_TYPE_HIRES6
|
||||
};
|
||||
|
||||
/*
|
||||
* ====== Mystery House supported versions ======
|
||||
* GAME_VER_HR1_SIMI:
|
||||
* - Instructions always shown (no prompt)
|
||||
* - Instructions contain Simi Valley address
|
||||
* - On-Line Systems title screen in main executable only and waits for key
|
||||
* GAME_VER_HR1_COARSE:
|
||||
* - Longer instructions, now containing Coarsegold address
|
||||
* - On-Line Systems title screen with instructions prompt
|
||||
* GAME_VER_HR1_PD:
|
||||
* - Public Domain disclaimer on startup
|
||||
* - Sierra On-Line title screen with instructions prompt
|
||||
*
|
||||
* Note: there are probably at least two or three more variants
|
||||
*/
|
||||
|
||||
enum GameVersion {
|
||||
GAME_VER_NONE = 0,
|
||||
GAME_VER_HR1_SIMI = 0, // On-Line Systems (Simi Valley)
|
||||
GAME_VER_HR1_COARSE, // On-Line Systems (Coarsegold)
|
||||
GAME_VER_HR1_PD // Sierra On-Line PD release
|
||||
GAME_VER_HR1_SIMI = 0,
|
||||
GAME_VER_HR1_COARSE,
|
||||
GAME_VER_HR1_PD
|
||||
};
|
||||
|
||||
struct AdlGameDescription;
|
||||
|
|
|
@ -108,6 +108,7 @@ private:
|
|||
void loadRoom(byte roomNr);
|
||||
void showRoom();
|
||||
|
||||
void showInstructions(Common::SeekableReadStream &stream, const uint pages[], bool goHome);
|
||||
void wordWrap(Common::String &str) const;
|
||||
|
||||
Files *_files;
|
||||
|
@ -124,9 +125,34 @@ private:
|
|||
} _gameStrings;
|
||||
};
|
||||
|
||||
void HiRes1Engine::showInstructions(Common::SeekableReadStream &stream, const uint pages[], bool goHome) {
|
||||
_display->setMode(DISPLAY_MODE_TEXT);
|
||||
|
||||
uint page = 0;
|
||||
while (pages[page] != 0) {
|
||||
if (goHome)
|
||||
_display->home();
|
||||
|
||||
uint count = pages[page++];
|
||||
for (uint i = 0; i < count; ++i) {
|
||||
_display->printString(readString(stream));
|
||||
stream.seek(3, SEEK_CUR);
|
||||
}
|
||||
|
||||
inputString();
|
||||
|
||||
if (shouldQuit())
|
||||
return;
|
||||
|
||||
stream.seek((goHome ? 6 : 3), SEEK_CUR);
|
||||
}
|
||||
}
|
||||
|
||||
void HiRes1Engine::runIntro() {
|
||||
StreamPtr stream(_files->createReadStream(IDS_HR1_EXE_0));
|
||||
|
||||
// Early version have no bitmap in 'AUTO LOAD OBJ'
|
||||
if (getGameVersion() >= GAME_VER_HR1_COARSE) {
|
||||
stream->seek(IDI_HR1_OFS_LOGO_0);
|
||||
_display->setMode(DISPLAY_MODE_HIRES);
|
||||
_display->loadFrameBuffer(*stream);
|
||||
|
@ -139,6 +165,7 @@ void HiRes1Engine::runIntro() {
|
|||
if (shouldQuit())
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
Common::String str;
|
||||
|
||||
|
@ -166,7 +193,7 @@ void HiRes1Engine::runIntro() {
|
|||
_display->printAsciiString(str + '\r');
|
||||
|
||||
inputKey();
|
||||
if (g_engine->shouldQuit())
|
||||
if (shouldQuit())
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -174,13 +201,14 @@ void HiRes1Engine::runIntro() {
|
|||
|
||||
str = readStringAt(*stream, IDI_HR1_OFS_GAME_OR_HELP);
|
||||
|
||||
if (getGameVersion() >= GAME_VER_HR1_COARSE) {
|
||||
bool instructions = false;
|
||||
|
||||
while (1) {
|
||||
_display->printString(str);
|
||||
Common::String s = inputString();
|
||||
|
||||
if (g_engine->shouldQuit())
|
||||
if (shouldQuit())
|
||||
break;
|
||||
|
||||
if (s.empty())
|
||||
|
@ -192,41 +220,41 @@ void HiRes1Engine::runIntro() {
|
|||
} else if (s[0] == APPLECHAR('G')) {
|
||||
break;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
if (instructions) {
|
||||
_display->setMode(DISPLAY_MODE_TEXT);
|
||||
stream->seek(IDI_HR1_OFS_INTRO_TEXT);
|
||||
|
||||
// This version shows the last page during the loading of the game
|
||||
// We wait for a key instead (even though there's no prompt for that).
|
||||
const uint pages[] = { 6, 6, 4, 5, 8, 7, 0 };
|
||||
|
||||
uint page = 0;
|
||||
while (pages[page] != 0) {
|
||||
_display->home();
|
||||
|
||||
uint count = pages[page++];
|
||||
for (uint i = 0; i < count; ++i) {
|
||||
str = readString(*stream);
|
||||
_display->printString(str);
|
||||
stream->seek(3, SEEK_CUR);
|
||||
}
|
||||
|
||||
inputString();
|
||||
|
||||
if (g_engine->shouldQuit())
|
||||
return;
|
||||
|
||||
stream->seek(6, SEEK_CUR);
|
||||
}
|
||||
}
|
||||
|
||||
stream->seek(IDI_HR1_OFS_INTRO_TEXT);
|
||||
showInstructions(*stream, pages, true);
|
||||
_display->printAsciiString("\r");
|
||||
}
|
||||
} else {
|
||||
const uint pages[] = { 6, 6, 8, 6, 0 };
|
||||
stream->seek(6);
|
||||
showInstructions(*stream, pages, false);
|
||||
}
|
||||
|
||||
stream.reset(_files->createReadStream(IDS_HR1_EXE_1));
|
||||
stream->seek(0x1800);
|
||||
_display->loadFrameBuffer(*stream);
|
||||
_display->updateHiResScreen();
|
||||
|
||||
_display->setMode(DISPLAY_MODE_MIXED);
|
||||
|
||||
// As we switch back to graphics mode, the title screen is briefly visible here
|
||||
// (and in the PD version, it's a different title screen from the initial one).
|
||||
// As this is probably non-intentional, we skip it and go straight to the game.
|
||||
if (getGameVersion() == GAME_VER_HR1_SIMI) {
|
||||
// The original waits for the key after initializing the state.
|
||||
// This causes it to also wait for a key on a blank screen when
|
||||
// a game is restarted. We only wait for a key here during the
|
||||
// intro.
|
||||
|
||||
// This does mean we need to push out some extra line feeds to clear the screen
|
||||
_display->printString(_strings.lineFeeds);
|
||||
inputKey();
|
||||
if (shouldQuit())
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
void HiRes1Engine::init() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue