aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTravis Howell2006-10-06 05:13:09 +0000
committerTravis Howell2006-10-06 05:13:09 +0000
commit3183f364225617252f3ac4f74b4056ac5238a610 (patch)
tree75589eeca9fa0aca34a331a1ea63e1995c574530
parent7ac1f00f0b688dfe5a2bfaf466b0cd467edbbba4 (diff)
downloadscummvm-rg350-3183f364225617252f3ac4f74b4056ac5238a610.tar.gz
scummvm-rg350-3183f364225617252f3ac4f74b4056ac5238a610.tar.bz2
scummvm-rg350-3183f364225617252f3ac4f74b4056ac5238a610.zip
Add Amiga demo of Elvira, and switch to elvira1 for Elvira
svn-id: r24133
-rw-r--r--engines/agos/agos.cpp10
-rw-r--r--engines/agos/agos.h2
-rw-r--r--engines/agos/debug.cpp2
-rw-r--r--engines/agos/draw.cpp4
-rw-r--r--engines/agos/game.cpp41
-rw-r--r--engines/agos/intern.h3
-rw-r--r--engines/agos/items.cpp8
-rw-r--r--engines/agos/res.cpp30
-rw-r--r--engines/agos/subroutine.cpp10
-rw-r--r--engines/agos/vga.cpp16
10 files changed, 76 insertions, 50 deletions
diff --git a/engines/agos/agos.cpp b/engines/agos/agos.cpp
index 5c473cda8f..72cca8aa56 100644
--- a/engines/agos/agos.cpp
+++ b/engines/agos/agos.cpp
@@ -637,7 +637,7 @@ void AGOSEngine::setupGame() {
_frameRate = 4;
_vgaBaseDelay = 1;
_numVars = 255;
- } else if (getGameType() == GType_ELVIRA) {
+ } else if (getGameType() == GType_ELVIRA1) {
gss = PTR(simon1_settings);
_numTextBoxes = 20;
_numVideoOpcodes = 57;
@@ -867,7 +867,7 @@ uint AGOSEngine::getNextStringID() {
}
uint AGOSEngine::getVarOrByte() {
- if (getGameType() == GType_ELVIRA) {
+ if (getGameType() == GType_ELVIRA1) {
return getVarOrWord();
} else {
uint a = *_codePtr++;
@@ -893,7 +893,7 @@ uint AGOSEngine::getVarOrWord() {
}
uint AGOSEngine::getVarWrapper() {
- if (getGameType() == GType_ELVIRA || getGameType() == GType_PP)
+ if (getGameType() == GType_ELVIRA1 || getGameType() == GType_PP)
return getVarOrWord();
else
return getVarOrByte();
@@ -1768,7 +1768,7 @@ void AGOSEngine::waitForSync(uint a) {
}
}
if (_exitCutscene) {
- if (getGameType() == GType_ELVIRA) {
+ if (getGameType() == GType_ELVIRA1) {
if (_variableArray[105] == 0) {
_variableArray[105] = 255;
break;
@@ -2070,7 +2070,7 @@ void AGOSEngine::loadSprite(uint windowNum, uint zoneNum, uint vgaSpriteId, uint
vsp->y = y;
vsp->x = x;
vsp->image = 0;
- if (getGameType() == GType_ELVIRA || getGameType() == GType_ELVIRA2 || getGameType() == GType_WW)
+ if (getGameType() == GType_ELVIRA1 || getGameType() == GType_ELVIRA2 || getGameType() == GType_WW)
vsp->palette = 0;
else
vsp->palette = palette;
diff --git a/engines/agos/agos.h b/engines/agos/agos.h
index 3ed965b06d..bf0f0221bb 100644
--- a/engines/agos/agos.h
+++ b/engines/agos/agos.h
@@ -111,7 +111,7 @@ struct VgaTimerEntry {
};
enum SIMONGameType {
- GType_ELVIRA = 0,
+ GType_ELVIRA1 = 0,
GType_ELVIRA2 = 1,
GType_WW = 2,
GType_SIMON1 = 3,
diff --git a/engines/agos/debug.cpp b/engines/agos/debug.cpp
index f02ae66d06..f3869c0037 100644
--- a/engines/agos/debug.cpp
+++ b/engines/agos/debug.cpp
@@ -37,7 +37,7 @@ const byte *AGOSEngine::dumpOpcode(const byte *p) {
uint opcode;
const char *s, *st;
- if (getGameType() == GType_ELVIRA) {
+ if (getGameType() == GType_ELVIRA1) {
opcode = READ_BE_UINT16(p);
p += 2;
if (opcode == 10000)
diff --git a/engines/agos/draw.cpp b/engines/agos/draw.cpp
index 13ce3871c0..7a99d69265 100644
--- a/engines/agos/draw.cpp
+++ b/engines/agos/draw.cpp
@@ -85,7 +85,7 @@ void AGOSEngine::animateSprites() {
_vgaCurSpritePriority = vsp->priority;
params[0] = readUint16Wrapper(&vsp->image);
- if (getGameType() == GType_ELVIRA || getGameType() == GType_ELVIRA2 || getGameType() == GType_WW) {
+ if (getGameType() == GType_ELVIRA1 || getGameType() == GType_ELVIRA2 || getGameType() == GType_WW) {
params[1] = readUint16Wrapper(&vsp->x);
params[2] = readUint16Wrapper(&vsp->y);
params[3] = READ_BE_UINT16(&vsp->flags);
@@ -138,7 +138,7 @@ void AGOSEngine::animateSpritesDebug() {
printf("id:%5d image:%3d base-color:%3d x:%3d y:%3d flags:%x\n",
vsp->id, vsp->image, vsp->palette, vsp->x, vsp->y, vsp->flags);
params[0] = readUint16Wrapper(&vsp->image);
- if (getGameType() == GType_ELVIRA || getGameType() == GType_ELVIRA2 || getGameType() == GType_WW) {
+ if (getGameType() == GType_ELVIRA1 || getGameType() == GType_ELVIRA2 || getGameType() == GType_WW) {
params[1] = readUint16Wrapper(&vsp->x);
params[2] = readUint16Wrapper(&vsp->y);
params[3] = READ_BE_UINT16(&vsp->flags);
diff --git a/engines/agos/game.cpp b/engines/agos/game.cpp
index c46fb999c5..2a83d00b27 100644
--- a/engines/agos/game.cpp
+++ b/engines/agos/game.cpp
@@ -67,7 +67,7 @@ static const ObsoleteGameID obsoleteGameIDsTable[] = {
};
static const PlainGameDescriptor simonGames[] = {
- {"elvira", "Elvira"},
+ {"elvira1", "Elvira"},
{"elvira2", "Elvira 2"},
{"waxworks", "Waxworks"},
{"simon1", "Simon the Sorcerer 1"},
@@ -169,6 +169,11 @@ namespace AGOS {
using Common::ADGameFileDescription;
using Common::ADGameDescription;
+static ADGameFileDescription ELVIRA1AMIGADEMO_GameFiles[] = {
+ { "englishdemo", GAME_BASEFILE, "7bbc2dfe8619ef579004ff57674c6e92"},
+ { "icon.dat", GAME_ICONFILE, "68b329da9893e34099c7d8ad5cb9c940"},
+};
+
static ADGameFileDescription ELVIRA1AMIGA_GameFiles[] = {
{ "gameamiga", GAME_BASEFILE, "7bdaff4a118d8035047cf9b1393b3fa0"},
{ "icon.dat", GAME_ICONFILE, "2db931e84f1ca01f0816dddfae3f49e1"},
@@ -671,7 +676,7 @@ static AGOSGameDescription gameDescriptions[] = {
// Elvira - English Amiga Floppy
{
{
- "elvira",
+ "elvira1",
"Floppy",
ARRAYSIZE(ELVIRA1AMIGA_GameFiles),
ELVIRA1AMIGA_GameFiles,
@@ -679,15 +684,31 @@ static AGOSGameDescription gameDescriptions[] = {
Common::kPlatformAmiga,
},
- GType_ELVIRA,
- GID_ELVIRA,
+ GType_ELVIRA1,
+ GID_ELVIRA1,
+ GF_OLD_BUNDLE | GF_CRUNCHED,
+ },
+
+ // Elvira - English Amiga Demo
+ {
+ {
+ "elvira1",
+ "Floppy",
+ ARRAYSIZE(ELVIRA1AMIGADEMO_GameFiles),
+ ELVIRA1AMIGADEMO_GameFiles,
+ Common::EN_ANY,
+ Common::kPlatformAmiga,
+ },
+
+ GType_ELVIRA1,
+ GID_ELVIRA1DEMO,
GF_OLD_BUNDLE | GF_CRUNCHED,
},
// Elvira - English DOS Floppy
{
{
- "elvira",
+ "elvira1",
"Floppy",
ARRAYSIZE(ELVIRA1DOS_GameFiles),
ELVIRA1DOS_GameFiles,
@@ -695,15 +716,15 @@ static AGOSGameDescription gameDescriptions[] = {
Common::kPlatformPC,
},
- GType_ELVIRA,
- GID_ELVIRA,
+ GType_ELVIRA1,
+ GID_ELVIRA1,
GF_OLD_BUNDLE,
},
// Elvira - English DOS Floppy Alternative?
{
{
- "elvira",
+ "elvira1",
"Floppy",
ARRAYSIZE(ELVIRA1DOS2_GameFiles),
ELVIRA1DOS2_GameFiles,
@@ -711,8 +732,8 @@ static AGOSGameDescription gameDescriptions[] = {
Common::kPlatformPC,
},
- GType_ELVIRA,
- GID_ELVIRA,
+ GType_ELVIRA1,
+ GID_ELVIRA1,
GF_OLD_BUNDLE,
},
diff --git a/engines/agos/intern.h b/engines/agos/intern.h
index e38b3fcd01..f03cb605f1 100644
--- a/engines/agos/intern.h
+++ b/engines/agos/intern.h
@@ -223,7 +223,8 @@ enum GameFileTypes {
};
enum GameIds {
- GID_ELVIRA,
+ GID_ELVIRA1,
+ GID_ELVIRA1DEMO,
GID_ELVIRA2,
GID_WAXWORKS,
diff --git a/engines/agos/items.cpp b/engines/agos/items.cpp
index 0506840feb..60f6ba5cbe 100644
--- a/engines/agos/items.cpp
+++ b/engines/agos/items.cpp
@@ -541,7 +541,7 @@ void AGOSEngine::setupOpcodes() {
_numOpcodes = ARRAYSIZE(opcode_table);
switch (getGameType()) {
- case GType_ELVIRA:
+ case GType_ELVIRA1:
setupElvira1Opcodes(opcode_table);
break;
case GType_ELVIRA2:
@@ -1107,7 +1107,7 @@ void AGOSEngine::o_loadZone() {
_lockWord |= 0x80;
- if (getGameType() == GType_ELVIRA || getGameType() == GType_ELVIRA2 ||
+ if (getGameType() == GType_ELVIRA1 || getGameType() == GType_ELVIRA2 ||
getGameType() == GType_WW) {
vc27_resetSprite();
vc29_stopAllSounds();
@@ -2755,7 +2755,7 @@ int AGOSEngine::runScript() {
if (_continousMainScript)
dumpOpcode(_codePtr);
- if (getGameType() == GType_ELVIRA) {
+ if (getGameType() == GType_ELVIRA1) {
opcode = getVarOrWord();
if (opcode == 10000)
return 0;
@@ -2771,7 +2771,7 @@ int AGOSEngine::runScript() {
/* Invert condition? */
flag = false;
- if (getGameType() == GType_ELVIRA) {
+ if (getGameType() == GType_ELVIRA1) {
if (opcode == 203) {
flag = true;
opcode = getVarOrWord();
diff --git a/engines/agos/res.cpp b/engines/agos/res.cpp
index ebce435fdf..2f6144e30e 100644
--- a/engines/agos/res.cpp
+++ b/engines/agos/res.cpp
@@ -118,7 +118,7 @@ int AGOSEngine::allocGamePcVars(File *in) {
item_array_inited = in->readUint32BE();
stringtable_num = in->readUint32BE();
- if (getGameType() == GType_ELVIRA || getGameType() == GType_ELVIRA2) {
+ if (getGameType() == GType_ELVIRA1 || getGameType() == GType_ELVIRA2) {
item_array_size += 2;
item_array_inited = item_array_size;
} else {
@@ -171,7 +171,7 @@ void AGOSEngine::loadGamePcFile() {
in.close();
- if ((getGameType() == GType_ELVIRA && getPlatform() == Common::kPlatformAmiga) ||
+ if ((getGameType() == GType_ELVIRA1 && getPlatform() == Common::kPlatformAmiga) ||
getGameType() == GType_PP)
return;
@@ -194,7 +194,7 @@ void AGOSEngine::loadGamePcFile() {
_tablesHeapPtrOrg = _tablesHeapPtr;
_tablesHeapCurPosOrg = _tablesHeapCurPos;
- if (getGameType() == GType_ELVIRA || getGameType() == GType_FF)
+ if (getGameType() == GType_ELVIRA1 || getGameType() == GType_FF)
return;
/* Read list of TEXT resources */
@@ -261,7 +261,7 @@ void AGOSEngine::readGamePcText(Common::File *in) {
void AGOSEngine::readItemFromGamePc(Common::File *in, Item *item) {
uint32 type;
- if (getGameType() == GType_ELVIRA) {
+ if (getGameType() == GType_ELVIRA1) {
item->itemName = (uint16)in->readUint32BE();
item->adjective = in->readUint16BE();
item->noun = in->readUint16BE();
@@ -309,7 +309,7 @@ void AGOSEngine::readItemFromGamePc(Common::File *in, Item *item) {
void AGOSEngine::readItemChildren(Common::File *in, Item *item, uint type) {
if (type == 1) {
- if (getGameType() == GType_ELVIRA) {
+ if (getGameType() == GType_ELVIRA1) {
SubRoom *subRoom = (SubRoom *)allocateChildBlock(item, 1, sizeof(SubRoom));
subRoom->roomShort = in->readUint32BE();
subRoom->roomLong = in->readUint32BE();
@@ -335,7 +335,7 @@ void AGOSEngine::readItemChildren(Common::File *in, Item *item, uint type) {
subRoom->roomExit[k++] = (uint16)fileReadItemID(in);
}
} else if (type == 2) {
- if (getGameType() == GType_ELVIRA) {
+ if (getGameType() == GType_ELVIRA1) {
SubObject *subObject = (SubObject *)allocateChildBlock(item, 2, sizeof(SubObject));
in->readUint32BE();
in->readUint32BE();
@@ -393,7 +393,7 @@ void AGOSEngine::readItemChildren(Common::File *in, Item *item, uint type) {
for (i = k = 0; i != j; i++)
subSuperRoom->roomExit[k++] = in->readUint16BE();
- } else if (getGameType() == GType_ELVIRA) {
+ } else if (getGameType() == GType_ELVIRA1) {
SubGenExit *genExit = (SubGenExit *)allocateChildBlock(item, 4, sizeof(SubGenExit));
genExit->dest[0] = (uint16)fileReadItemID(in);
genExit->dest[1] = (uint16)fileReadItemID(in);
@@ -420,7 +420,7 @@ void AGOSEngine::readItemChildren(Common::File *in, Item *item, uint type) {
setUserFlag(item, 1, in->readUint16BE());
setUserFlag(item, 2, in->readUint16BE());
setUserFlag(item, 3, in->readUint16BE());
- if (getGameType() == GType_ELVIRA) {
+ if (getGameType() == GType_ELVIRA1) {
setUserFlag(item, 4, in->readUint16BE());
setUserFlag(item, 5, in->readUint16BE());
setUserFlag(item, 6, in->readUint16BE());
@@ -666,14 +666,18 @@ void AGOSEngine::loadVGAFile(uint id, uint type) {
decompressData(filename, dst, offs, srcSize, dstSize);
} else if (getFeatures() & GF_OLD_BUNDLE) {
if (getPlatform() == Common::kPlatformAmiga) {
- if (getFeatures() & GF_TALKIE)
+ if (getFeatures() & GF_TALKIE) {
sprintf(filename, "%.3d%d.out", id, type);
- else if (getGameType() == GType_ELVIRA || getGameType() == GType_ELVIRA2)
- sprintf(filename, "%.2d%d.pkd", id, type);
- else
+ } else if (getGameType() == GType_ELVIRA1 || getGameType() == GType_ELVIRA2) {
+ if (getGameId() == GID_ELVIRA1DEMO)
+ sprintf(filename, "%.1d%d.out", id, type);
+ else
+ sprintf(filename, "%.2d%d.pkd", id, type);
+ } else {
sprintf(filename, "%.3d%d.pkd", id, type);
+ }
} else {
- if (getGameType() == GType_ELVIRA || getGameType() == GType_ELVIRA2 || getGameType() == GType_WW) {
+ if (getGameType() == GType_ELVIRA1 || getGameType() == GType_ELVIRA2 || getGameType() == GType_WW) {
sprintf(filename, "%.2d%d.VGA", id, type);
} else {
sprintf(filename, "%.3d%d.VGA", id, type);
diff --git a/engines/agos/subroutine.cpp b/engines/agos/subroutine.cpp
index d1e28e58cc..3ebff9dc5e 100644
--- a/engines/agos/subroutine.cpp
+++ b/engines/agos/subroutine.cpp
@@ -251,7 +251,7 @@ File *AGOSEngine::openTablesFile_gme(const char *filename) {
}
bool AGOSEngine::loadTablesIntoMem(uint subr_id) {
- if (getGameType() == GType_ELVIRA || getGameType() == GType_ELVIRA2)
+ if (getGameType() == GType_ELVIRA1 || getGameType() == GType_ELVIRA2)
return loadTablesOldIntoMem(subr_id);
else
return loadTablesNewIntoMem(subr_id);
@@ -581,13 +581,13 @@ void AGOSEngine::readSubroutineLine(File *in, SubroutineLine *sl, Subroutine *su
sl->verb = in->readUint16BE();
sl->noun1 = in->readUint16BE();
sl->noun2 = in->readUint16BE();
- } else if (getGameType() == GType_ELVIRA) {
+ } else if (getGameType() == GType_ELVIRA1) {
in->readUint16BE();
in->readUint16BE();
in->readUint16BE();
}
- if (getGameType() == GType_ELVIRA) {
+ if (getGameType() == GType_ELVIRA1) {
int16 tmp = in->readUint16BE();
WRITE_BE_UINT16(q, tmp);
while (tmp != 10000) {
@@ -642,7 +642,7 @@ byte *AGOSEngine::readSingleOpcode(Common::File *in, byte *ptr) {
table = opcode_arg_table_elvira1;
i = 0;
- if (getGameType() == GType_ELVIRA) {
+ if (getGameType() == GType_ELVIRA1) {
opcode = READ_BE_UINT16(ptr);
ptr += 2;
} else {
@@ -673,7 +673,7 @@ byte *AGOSEngine::readSingleOpcode(Common::File *in, byte *ptr) {
break;
case 'B':
- if (getGameType() == GType_ELVIRA) {
+ if (getGameType() == GType_ELVIRA1) {
val = in->readUint16BE();
WRITE_BE_UINT16(ptr, val); ptr += 2;
} else {
diff --git a/engines/agos/vga.cpp b/engines/agos/vga.cpp
index dc2e065193..7832ab915c 100644
--- a/engines/agos/vga.cpp
+++ b/engines/agos/vga.cpp
@@ -185,7 +185,7 @@ void AGOSEngine::setupVgaOpcodes() {
_vga_opcode_table = vga_opcode_table;
switch (getGameType()) {
- case GType_ELVIRA:
+ case GType_ELVIRA1:
setupElvira1VideoOpcodes(vga_opcode_table);
break;
case GType_ELVIRA2:
@@ -289,7 +289,7 @@ VgaSprite *AGOSEngine::findCurSprite() {
}
int AGOSEngine::vcReadVarOrWord() {
- if (getGameType() == GType_ELVIRA) {
+ if (getGameType() == GType_ELVIRA1) {
return vcReadNextWord();
} else {
int16 var = vcReadNextWord();
@@ -542,7 +542,7 @@ void AGOSEngine::vc3_loadSprite() {
while (vsp->id)
vsp++;
- if (getGameType() == GType_ELVIRA || getGameType() == GType_ELVIRA2 || getGameType() == GType_WW)
+ if (getGameType() == GType_ELVIRA1 || getGameType() == GType_ELVIRA2 || getGameType() == GType_WW)
vsp->palette = 0;
else
vsp->palette = palette;
@@ -1277,7 +1277,7 @@ void AGOSEngine::drawImages(VC10_state *state) {
return;
uint offs, offs2;
- if (getGameType() == GType_ELVIRA) {
+ if (getGameType() == GType_ELVIRA1) {
//if (_windowNum != 2 && _windowNum != 3) {
// offs = ((vlut[0] - _video_windows[16]) * 2 + state->x) * 8;
// offs2 = (vlut[1] - _video_windows[17] + state->y);
@@ -1765,7 +1765,7 @@ void AGOSEngine::vc22_setSpritePalette() {
byte *offs, *palptr, *src;
uint16 a = 0, b, num, palSize;
- if (getGameType() != GType_ELVIRA && getGameType() != GType_ELVIRA2 && getGameType() != GType_WW)
+ if (getGameType() != GType_ELVIRA1 && getGameType() != GType_ELVIRA2 && getGameType() != GType_WW)
a = vcReadNextWord();
b = vcReadNextWord();
@@ -1788,7 +1788,7 @@ void AGOSEngine::vc22_setSpritePalette() {
palptr = _displayPalette;
offs = _curVgaFile1 + READ_BE_UINT16(_curVgaFile1 + 6);
- if (getGameType() == GType_ELVIRA) {
+ if (getGameType() == GType_ELVIRA1) {
if (b >= 1000) {
b -= 1000;
} else {
@@ -1800,7 +1800,7 @@ void AGOSEngine::vc22_setSpritePalette() {
src = offs + b * palSize;
do {
- if (getGameType() == GType_ELVIRA || getGameType() == GType_ELVIRA2 || getGameType() == GType_WW) {
+ if (getGameType() == GType_ELVIRA1 || getGameType() == GType_ELVIRA2 || getGameType() == GType_WW) {
uint16 color = READ_BE_UINT16(src);
palptr[0] = ((color & 0xf00) >> 8) * 32;
palptr[1] = ((color & 0x0f0) >> 4) * 32;
@@ -2266,7 +2266,7 @@ void AGOSEngine::vc51_enableBox() {
void AGOSEngine::vc52_playSound() {
bool ambient = false;
- if (getGameType() == GType_ELVIRA) {
+ if (getGameType() == GType_ELVIRA1) {
_vcPtr += 8;
return;
}