aboutsummaryrefslogtreecommitdiff
path: root/engines/drascula/drascula.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/drascula/drascula.cpp')
-rw-r--r--engines/drascula/drascula.cpp39
1 files changed, 22 insertions, 17 deletions
diff --git a/engines/drascula/drascula.cpp b/engines/drascula/drascula.cpp
index 2d24978f21..ac402c82ba 100644
--- a/engines/drascula/drascula.cpp
+++ b/engines/drascula/drascula.cpp
@@ -181,6 +181,8 @@ int DrasculaEngine::go() {
currentChapter = 1; // values from 1 to 6 will start each part of game
hay_que_load = 0;
+ checkCD();
+
for (;;) {
int i;
@@ -224,41 +226,35 @@ int DrasculaEngine::go() {
if (currentChapter != 6)
loadPic(95, tableSurface);
- if (currentChapter == 1) {
+ if (currentChapter != 3)
loadPic(96, frontSurface, COMPLETE_PAL);
- loadPic(99, backSurface);
- loadPic(97, extraSurface);
+
+ if (currentChapter == 1) {
} else if (currentChapter == 2) {
- loadPic(96, frontSurface, COMPLETE_PAL);
loadPic("pts.alg", drawSurface2);
} else if (currentChapter == 3) {
loadPic("aux13.alg", bgSurface, COMPLETE_PAL);
loadPic(96, frontSurface);
- loadPic(97, extraSurface);
- loadPic(99, backSurface);
} else if (currentChapter == 4) {
- loadPic(96, frontSurface, COMPLETE_PAL);
if (hay_que_load == 0)
animation_ray();
loadPic(96, frontSurface);
clearRoom();
- loadPic(99, backSurface);
- loadPic(97, extraSurface);
} else if (currentChapter == 5) {
- loadPic(96, frontSurface, COMPLETE_PAL);
- loadPic(97, extraSurface);
- loadPic(99, backSurface);
} else if (currentChapter == 6) {
igorX = 105, igorY = 85, trackIgor = 1;
drasculaX = 62, drasculaY = 99, trackDrascula = 1;
actorFrames[kFramePendulum] = 0;
flag_tv = 0;
- loadPic(96, frontSurface, COMPLETE_PAL);
+ loadPic(95, tableSurface);
+ }
+
+ if (currentChapter != 2) {
loadPic(99, backSurface);
loadPic(97, extraSurface);
- loadPic(95, tableSurface);
}
+
memset(iconName, 0, sizeof(iconName));
for (i = 0; i < 6; i++)
@@ -485,6 +481,7 @@ bool DrasculaEngine::runCurrentChapter() {
#else
if (rightMouseButton == 1 && menuScreen == 1) {
#endif
+ delay(100);
if (currentChapter == 2)
loadPic(menuBackground, backSurface);
else
@@ -502,8 +499,14 @@ bool DrasculaEngine::runCurrentChapter() {
} else {
#else
}
- if (rightMouseButton == 1 && menuScreen == 0) {
+
+ // Do not show the inventory screen in chapter 5, if the right mouse button is clicked
+ // while the plug (object 16) is held
+ // Fixes bug #2059621 - "DRASCULA: Plug bug"
+ if (rightMouseButton == 1 && menuScreen == 0 &&
+ !(currentChapter == 5 && pickedObject == 16)) {
#endif
+ delay(100);
characterMoved = 0;
if (trackProtagonist == 2)
trackProtagonist = 1;
@@ -523,8 +526,10 @@ bool DrasculaEngine::runCurrentChapter() {
}
if (leftMouseButton == 1 && menuBar == 1) {
+ delay(100);
selectVerbFromBar();
} else if (leftMouseButton == 1 && takeObject == 0) {
+ delay(100);
if (verify1())
return true;
} else if (leftMouseButton == 1 && takeObject == 1) {
@@ -796,7 +801,7 @@ void DrasculaEngine::hipo_sin_nadie(int counter){
do {
counter--;
- copyBackground(0, 0, 0, 0, 320, 200, bgSurface, screenSurface);
+ copyBackground();
if (currentChapter == 3)
updateScreen(0, 0, 0, y, 320, 200, screenSurface);
else
@@ -820,7 +825,7 @@ void DrasculaEngine::hipo_sin_nadie(int counter){
}
} while (counter > 0);
- copyBackground(0, 0, 0, 0, 320, 200, bgSurface, screenSurface);
+ copyBackground();
updateScreen();
}