aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorTravis Howell2006-10-03 00:31:24 +0000
committerTravis Howell2006-10-03 00:31:24 +0000
commit9e097f60abec89ca38663da488be0ba1a6559573 (patch)
tree1ca41ea7e6bfb1cf01b511b7b3621ce52bcdc4a1 /engines
parent107a9f3bef2265415df0d6c1e1d255161eeca193 (diff)
downloadscummvm-rg350-9e097f60abec89ca38663da488be0ba1a6559573.tar.gz
scummvm-rg350-9e097f60abec89ca38663da488be0ba1a6559573.tar.bz2
scummvm-rg350-9e097f60abec89ca38663da488be0ba1a6559573.zip
Add changes and enable music for Elvira1
svn-id: r24091
Diffstat (limited to 'engines')
-rw-r--r--engines/agos/agos.cpp4
-rw-r--r--engines/agos/agos.h5
-rw-r--r--engines/agos/items.cpp20
-rw-r--r--engines/agos/midiparser_s1d.cpp2
-rw-r--r--engines/agos/vga.cpp12
5 files changed, 27 insertions, 16 deletions
diff --git a/engines/agos/agos.cpp b/engines/agos/agos.cpp
index c83606629a..2bf7b9c8ca 100644
--- a/engines/agos/agos.cpp
+++ b/engines/agos/agos.cpp
@@ -2328,7 +2328,7 @@ void AGOSEngine::loadMusic(uint music) {
}
midi.startTrack (0);
- } else if (getGameType() == GType_ELVIRA2 || getGameType() == GType_WW) {
+ } else {
midi.stop();
midi.setLoop (true); // Must do this BEFORE loading music. (GMF may have its own override.)
@@ -2341,8 +2341,6 @@ void AGOSEngine::loadMusic(uint music) {
midi.loadS1D (&f);
midi.startTrack (0);
- } else {
- warning("Old music type not support");
}
}
diff --git a/engines/agos/agos.h b/engines/agos/agos.h
index 76c1dd9c87..d34f8a6e0a 100644
--- a/engines/agos/agos.h
+++ b/engines/agos/agos.h
@@ -1012,13 +1012,14 @@ public:
void oe1_worn();
void oe1_notWorn();
void oe1_notCarried();
- void oe1_setFF();
- void oe1_zoneDisk();
void oe1_isNotAt();
void oe1_sibling();
void oe1_notSibling();
+ void oe1_setFF();
void oe1_opcode176();
void oe1_opcode178();
+ void oe1_zoneDisk();
+ void oe1_printStats();
// Opcodes, Waxworks only
void oww_goto();
diff --git a/engines/agos/items.cpp b/engines/agos/items.cpp
index 0db5b30457..ded7e77114 100644
--- a/engines/agos/items.cpp
+++ b/engines/agos/items.cpp
@@ -249,6 +249,8 @@ void AGOSEngine::setupElvira1Opcodes(OpcodeProc *op) {
op[178] = &AGOSEngine::oe1_opcode178;
+ op[180] = &AGOSEngine::oww_whereTo;
+
op[198] = &AGOSEngine::o_comment;
op[206] = &AGOSEngine::o_getParent;
@@ -290,6 +292,7 @@ void AGOSEngine::setupElvira1Opcodes(OpcodeProc *op) {
op[267] = &AGOSEngine::oe1_zoneDisk;
op[268] = &AGOSEngine::o_saveUserGame;
op[269] = &AGOSEngine::o_loadUserGame;
+ op[270] = &AGOSEngine::oe1_printStats;
op[271] = &AGOSEngine::o_stopTune;
op[274] = &AGOSEngine::o_pauseGame;
@@ -1693,26 +1696,31 @@ void AGOSEngine::oe1_notSibling() {
}
void AGOSEngine::oe1_setFF() {
+ // 60
writeNextVarContents(0xFF);
}
-void AGOSEngine::oe1_zoneDisk() {
- getVarOrWord();
- getVarOrWord();
-}
-
void AGOSEngine::oe1_opcode176() {
getNextItemPtr();
getVarOrWord();
getNextItemPtr();
}
-
void AGOSEngine::oe1_opcode178() {
getNextItemPtr();
getVarOrWord();
}
+void AGOSEngine::oe1_zoneDisk() {
+ // 267: zone disk
+ getVarOrWord();
+ getVarOrWord();
+}
+
+void AGOSEngine::oe1_printStats() {
+ // 270: print stats
+}
+
// -----------------------------------------------------------------------
// Waxworks Opcodes
diff --git a/engines/agos/midiparser_s1d.cpp b/engines/agos/midiparser_s1d.cpp
index 85abd4fbe0..d00339bba3 100644
--- a/engines/agos/midiparser_s1d.cpp
+++ b/engines/agos/midiparser_s1d.cpp
@@ -125,7 +125,7 @@ bool MidiParser_S1D::loadMusic(byte *data, uint32 size) {
byte *pos = data;
if (*(pos++) != 0xFC)
- error("Expected 0xFC header but found 0x%02X instead", (int) *pos);
+ debug(1, "Expected 0xFC header but found 0x%02X instead", (int) *pos);
// The next 3 bytes MIGHT be tempo, but we skip them and use the default.
// setTempo (*(pos++) | (*(pos++) << 8) | (*(pos++) << 16));
diff --git a/engines/agos/vga.cpp b/engines/agos/vga.cpp
index 3f8681e233..78f09ceeaa 100644
--- a/engines/agos/vga.cpp
+++ b/engines/agos/vga.cpp
@@ -289,10 +289,14 @@ VgaSprite *AGOSEngine::findCurSprite() {
}
int AGOSEngine::vcReadVarOrWord() {
- int16 var = vcReadNextWord();
- if (var < 0)
- var = vcReadVar(-var);
- return var;
+ if (getGameType() == GType_ELVIRA) {
+ return vcReadNextWord();
+ } else {
+ int16 var = vcReadNextWord();
+ if (var < 0)
+ var = vcReadVar(-var);
+ return var;
+ }
}
uint AGOSEngine::vcReadNextWord() {