aboutsummaryrefslogtreecommitdiff
path: root/engines/drascula
diff options
context:
space:
mode:
authorJohannes Schickel2010-10-13 03:57:44 +0000
committerJohannes Schickel2010-10-13 03:57:44 +0000
commit75e8452b6e6a2bf4fb2f588aa00b428a60d873b5 (patch)
treef29541d55309487a94bd1d38e8b53bb3dde9aec6 /engines/drascula
parent48ee83b88957dab86bc763e9ef21a70179fa8679 (diff)
parente9f50882ea5b6beeefa994040be9d3bab6a1f107 (diff)
downloadscummvm-rg350-75e8452b6e6a2bf4fb2f588aa00b428a60d873b5.tar.gz
scummvm-rg350-75e8452b6e6a2bf4fb2f588aa00b428a60d873b5.tar.bz2
scummvm-rg350-75e8452b6e6a2bf4fb2f588aa00b428a60d873b5.zip
OPENGL: Merged from trunk, from rev 52105 to 53396.
This includes an rather hacky attempt to merge all the recent gp2x backend changes into the branch. I suppose the gp2x backend and probably all new backends, i.e. gph, dingux etc., might not compile anymore. Since I have no way of testing those it would be nice if porters could look into getting those up to speed in this branch. svn-id: r53399
Diffstat (limited to 'engines/drascula')
-rw-r--r--engines/drascula/animation.cpp7
-rw-r--r--engines/drascula/converse.cpp10
-rw-r--r--engines/drascula/detection.cpp17
-rw-r--r--engines/drascula/interface.cpp11
-rw-r--r--engines/drascula/objects.cpp9
-rw-r--r--engines/drascula/saveload.cpp4
6 files changed, 38 insertions, 20 deletions
diff --git a/engines/drascula/animation.cpp b/engines/drascula/animation.cpp
index d6a3bafd9f..10f1bf4651 100644
--- a/engines/drascula/animation.cpp
+++ b/engines/drascula/animation.cpp
@@ -761,17 +761,10 @@ void DrasculaEngine::animation_16_2() {
clearRoom();
- // FIXME: Track 31 is missing from the soundtrack available
- // from ScummVM's downloads page, so for now we're using the
- // Spanish track 29
-#if 1
- playMusic(30);
-#else
if (_lang == kSpanish)
playMusic(30);
else
playMusic(32);
-#endif
if (getScan() != 0)
goto asco;
diff --git a/engines/drascula/converse.cpp b/engines/drascula/converse.cpp
index 0e70348148..d0906fdf55 100644
--- a/engines/drascula/converse.cpp
+++ b/engines/drascula/converse.cpp
@@ -211,6 +211,7 @@ void DrasculaEngine::converse(int index) {
}
updateEvents();
+ flushKeyBuffer();
phrase1_bottom = 8 * print_abc_opc(phrase1, 2, game1);
phrase2_bottom = phrase1_bottom + 8 * print_abc_opc(phrase2, phrase1_bottom + 2, game2);
@@ -287,8 +288,12 @@ void DrasculaEngine::response(int function) {
playTalkSequence(function);
if (currentChapter == 2) {
- if (function == 16 || function == 20 || function == 23 || function == 29 || function == 31)
+ bool reloadConversationCharset = false;
+
+ if (function == 16 || function == 20 || function == 23 || function == 29 || function == 31) {
+ reloadConversationCharset = true;
loadPic(menuBackground, backSurface);
+ }
if (function == 16)
animation_16_2();
@@ -300,6 +305,9 @@ void DrasculaEngine::response(int function) {
animation_29_2();
else if (function == 31)
animation_31_2();
+
+ if (reloadConversationCharset)
+ loadPic("car.alg", backSurface);
} else if (currentChapter == 3) {
grr();
}
diff --git a/engines/drascula/detection.cpp b/engines/drascula/detection.cpp
index c10222cadd..0dafcdc3cd 100644
--- a/engines/drascula/detection.cpp
+++ b/engines/drascula/detection.cpp
@@ -240,6 +240,23 @@ static const DrasculaGameDescription gameDescriptions[] = {
GUIO_NONE
},
},
+
+ {
+ // Drascula French version (ScummVM repacked files)
+ {
+ "drascula",
+ 0,
+ {
+ {"packet.001", 0, "c6a8697396e213a18472542d5f547cb4", 32847563},
+ {"packet.002", 1, "7b83cedb9bb326ed5143e5c459508d43", 722383},
+ {NULL, 0, NULL, 0}
+ },
+ Common::FR_FRA,
+ Common::kPlatformPC,
+ GF_PACKED,
+ GUIO_NONE
+ },
+ },
{ AD_TABLE_END_MARKER }
};
diff --git a/engines/drascula/interface.cpp b/engines/drascula/interface.cpp
index 1495694a1b..1d17c77f83 100644
--- a/engines/drascula/interface.cpp
+++ b/engines/drascula/interface.cpp
@@ -120,7 +120,7 @@ void DrasculaEngine::showMenu() {
x = whichObject();
strcpy(textIcon, iconName[x]);
- for (n = 1; n < 43; n++) {
+ for (n = 1; n < ARRAYSIZE(inventoryObjects); n++) {
h = inventoryObjects[n];
if (h != 0) {
@@ -194,11 +194,10 @@ void DrasculaEngine::enterName() {
}
bool DrasculaEngine::checkMenuFlags() {
- for (int n = 0; n < 43; n++) {
- if (whichObject() == n) {
- if (inventoryObjects[n] != 0 && checkAction(inventoryObjects[n]))
- return true;
- }
+ int n = whichObject();
+ if (n != 0) {
+ if (inventoryObjects[n] != 0 && checkAction(inventoryObjects[n]))
+ return true;
}
return false;
diff --git a/engines/drascula/objects.cpp b/engines/drascula/objects.cpp
index 73aea7b7f2..2bd1014083 100644
--- a/engines/drascula/objects.cpp
+++ b/engines/drascula/objects.cpp
@@ -221,16 +221,17 @@ void DrasculaEngine::addObject(int obj) {
* If no inventory slot is under the mouse cursor, return 0.
*/
int DrasculaEngine::whichObject() {
- int n = 0;
+ int n;
for (n = 1; n < ARRAYSIZE(inventoryObjects); n++) {
if (mouseX > _itemLocations[n].x && mouseY > _itemLocations[n].y &&
mouseX < _itemLocations[n].x + OBJWIDTH &&
- mouseY < _itemLocations[n].y + OBJHEIGHT)
- break;
+ mouseY < _itemLocations[n].y + OBJHEIGHT) {
+ return n;
+ }
}
- return n;
+ return 0;
}
void DrasculaEngine::updateVisible() {
diff --git a/engines/drascula/saveload.cpp b/engines/drascula/saveload.cpp
index abf17d0e8e..4aaec5ec0e 100644
--- a/engines/drascula/saveload.cpp
+++ b/engines/drascula/saveload.cpp
@@ -210,7 +210,7 @@ bool DrasculaEngine::loadGame(const char *gameName) {
curY = sav->readSint32LE();
trackProtagonist = sav->readSint32LE();
- for (l = 1; l < 43; l++) {
+ for (l = 1; l < ARRAYSIZE(inventoryObjects); l++) {
inventoryObjects[l] = sav->readSint32LE();
}
@@ -241,7 +241,7 @@ void DrasculaEngine::saveGame(char gameName[]) {
out->writeSint32LE(curY);
out->writeSint32LE(trackProtagonist);
- for (l = 1; l < 43; l++) {
+ for (l = 1; l < ARRAYSIZE(inventoryObjects); l++) {
out->writeSint32LE(inventoryObjects[l]);
}