aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorFilippos Karapetis2008-06-04 07:58:34 +0000
committerFilippos Karapetis2008-06-04 07:58:34 +0000
commitdb0c37d054cdb3d205edae6106cda9adb858ce7d (patch)
tree40a7268bb8f986d1cf90ff6eeb8ff047a5a4a17e /engines
parent52fbdd51eb0f7d31ce1718adfc60bc169c7c84c3 (diff)
downloadscummvm-rg350-db0c37d054cdb3d205edae6106cda9adb858ce7d.tar.gz
scummvm-rg350-db0c37d054cdb3d205edae6106cda9adb858ce7d.tar.bz2
scummvm-rg350-db0c37d054cdb3d205edae6106cda9adb858ce7d.zip
Removed junk code from update_1_pre, update_4 and update_6_pre
pon_hare -> moveCharacters hare_oscuro -> setDarkPalette hare_claro -> setBrightPalette funde_hare -> setPaletteBase conta_blind_vez -> savedTime paleta_hare -> assignDefaultPalette paleta_hare_claro -> assignBrightPalette paleta_hare_oscuro -> assignDarkPalette distance_x/distance_y -> distanceX/distanceY palHare -> defaultPalette palHareClaro -> brightPalette palHareOscuro -> darkPalette pos_murci -> batPos murci_x/murci_y -> batX/batY blind_x/blind_y -> blindX/blindY svn-id: r32526
Diffstat (limited to 'engines')
-rw-r--r--engines/drascula/animation.cpp22
-rw-r--r--engines/drascula/drascula.cpp170
-rw-r--r--engines/drascula/drascula.h76
-rw-r--r--engines/drascula/rooms.cpp111
-rw-r--r--engines/drascula/talk.cpp28
5 files changed, 198 insertions, 209 deletions
diff --git a/engines/drascula/animation.cpp b/engines/drascula/animation.cpp
index ae2c3e5aff..83f125edc5 100644
--- a/engines/drascula/animation.cpp
+++ b/engines/drascula/animation.cpp
@@ -643,7 +643,7 @@ void DrasculaEngine::animation_4_1() {
updateRefresh_pre();
copyBackground(49, 139, 228, 112, 47, 60, extraSurface, screenSurface);
- pon_hare();
+ moveCharacters();
updateScreen();
@@ -675,7 +675,7 @@ void DrasculaEngine::animation_1_2() {
void DrasculaEngine::animation_2_2() {
trackProtagonist = 0;
copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface);
- pon_hare();
+ moveCharacters();
updateRefresh();
updateScreen();
loadPic("an2_1.alg", frontSurface, 1);
@@ -825,7 +825,7 @@ void DrasculaEngine::animation_14_2() {
for (n = -160; n <= 0; n = n + 5 + l) {
copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface);
updateRefresh_pre();
- pon_hare();
+ moveCharacters();
moveVB();
pos_cabina[3] = n;
copyRectClip(pos_cabina, backSurface, screenSurface);
@@ -1167,7 +1167,7 @@ void DrasculaEngine::animation_25_2() {
copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface);
updateRefresh_pre();
- pon_hare();
+ moveCharacters();
moveVB();
pos_cabina[3] = n;
@@ -1699,7 +1699,7 @@ void DrasculaEngine::animation_12_5() {
updateRoom();
updateScreen();
- hare_oscuro();
+ setDarkPalette();
for (color = 0; color < 255; color++)
for (component = 0; component < 3; component++) {
@@ -1761,7 +1761,7 @@ void DrasculaEngine::animation_12_5() {
animate("frel.bin", 16);
clearRoom();
- hare_claro();
+ setBrightPalette();
updatePalette();
flags[1] = 1;
@@ -2139,7 +2139,7 @@ void DrasculaEngine::animation_19_6() {
copyBackground(140, 23, 161, 69, 35, 80, drawSurface3, screenSurface);
updateRefresh_pre();
- pon_hare();
+ moveCharacters();
updateScreen();
pause(6);
updateRoom();
@@ -2167,7 +2167,7 @@ void DrasculaEngine::animation_12_2() {
updateRefresh_pre();
copyBackground(49, 139, 228, 112, 47, 60, extraSurface, screenSurface);
- pon_hare();
+ moveCharacters();
updateScreen();
@@ -2203,7 +2203,7 @@ void DrasculaEngine::animation_26_2() {
updateRefresh_pre();
copyBackground(49, 139, 228, 112, 47, 60, extraSurface, screenSurface);
- pon_hare();
+ moveCharacters();
updateScreen();
@@ -2622,7 +2622,7 @@ void DrasculaEngine::animation_1_4() {
updateRefresh_pre();
copyBackground(182, 133, 199, 95, 50, 66, drawSurface3, screenSurface);
- pon_hare();
+ moveCharacters();
updateScreen();
@@ -2646,7 +2646,7 @@ void DrasculaEngine::animation_1_4() {
updateRefresh_pre();
copyBackground(182, 133, 199, 95, 50, 66, drawSurface3, screenSurface);
- pon_hare();
+ moveCharacters();
updateScreen();
diff --git a/engines/drascula/drascula.cpp b/engines/drascula/drascula.cpp
index 5bbad2c531..a7b39ef70c 100644
--- a/engines/drascula/drascula.cpp
+++ b/engines/drascula/drascula.cpp
@@ -126,7 +126,7 @@ int DrasculaEngine::go() {
curHeight = CHARACTER_HEIGHT; curWidth = CHARACTER_WIDTH; feetHeight = FEET_HEIGHT;
talkHeight = TALK_HEIGHT; talkWidth = TALK_WIDTH;
hasAnswer = 0;
- conta_blind_vez = 0;
+ savedTime = 0;
changeColor = 0;
breakOut = 0;
vbX = 120; trackVB = 1; vbHasMoved = 0; frame_vb = 1;
@@ -197,7 +197,7 @@ int DrasculaEngine::go() {
for (i = 0; i < 6; i++)
strcpy(iconName[i + 1], _textverbs[_lang][i]);
- paleta_hare();
+ assignDefaultPalette();
if (!escoba()) {
releaseGame();
break;
@@ -293,24 +293,6 @@ void DrasculaEngine::decompressPic(byte *targetSurface, int colorCount) {
setRGB((byte *)cPal, colorCount);
}
-void DrasculaEngine::paleta_hare() {
- int color, component;
-
- for (color = 235; color < 253; color++)
- for (component = 0; component < 3; component++)
- palHare[color][component] = gamePalette[color][component];
-}
-
-void DrasculaEngine::hare_oscuro() {
- int color, component;
-
- for (color = 235; color < 253; color++ )
- for (component = 0; component < 3; component++)
- gamePalette[color][component] = palHareOscuro[color][component];
-
- updatePalette();
-}
-
void DrasculaEngine::setRGB(byte *dir_lectura, int plt) {
int x, cnt = 0;
@@ -943,15 +925,15 @@ void DrasculaEngine::carga_escoba(const char *fileName) {
copyBackground(0, 171, 0, 0, OBJWIDTH, OBJHEIGHT, backSurface, drawSurface3);
- color_hare();
+ setDefaultPalette();
if (nivel_osc != 0)
- funde_hare(nivel_osc);
- paleta_hare_claro();
- color_hare();
- funde_hare(nivel_osc + 2);
- paleta_hare_oscuro();
+ setPaletteBase(nivel_osc);
+ assignBrightPalette();
+ setDefaultPalette();
+ setPaletteBase(nivel_osc + 2);
+ assignDarkPalette();
- hare_claro();
+ setBrightPalette();
changeColor = -1;
if (currentChapter == 2)
@@ -1035,11 +1017,11 @@ void DrasculaEngine::carga_escoba(const char *fileName) {
if (currentChapter == 2) {
if (roomNumber == 9 || roomNumber == 2 || roomNumber == 14 || roomNumber == 18)
- conta_blind_vez = getTime();
+ savedTime = getTime();
}
if (currentChapter == 4) {
if (roomNumber == 26)
- conta_blind_vez = getTime();
+ savedTime = getTime();
}
if (currentChapter == 4 && roomNumber == 24 && flags[29] == 1)
@@ -1096,7 +1078,7 @@ void DrasculaEngine::moveCursor() {
copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface);
updateRefresh_pre();
- pon_hare();
+ moveCharacters();
updateRefresh();
if (!strcmp(textName, "hacker") && hasName == 1) {
@@ -2041,11 +2023,11 @@ void DrasculaEngine::updateRoom() {
updateRefresh_pre();
if (currentChapter == 3) {
if (flags[0] == 0)
- pon_hare();
+ moveCharacters();
else
copyRect(113, 54, curX - 20, curY - 1, 77, 89, drawSurface3, screenSurface);
} else {
- pon_hare();
+ moveCharacters();
}
updateRefresh();
}
@@ -2137,55 +2119,73 @@ void DrasculaEngine::updateDoor(int doorNum) {
}
}
-void DrasculaEngine::color_hare() {
+void DrasculaEngine::assignDefaultPalette() {
+ int color, component;
+
+ for (color = 235; color < 253; color++)
+ for (component = 0; component < 3; component++)
+ defaultPalette[color][component] = gamePalette[color][component];
+}
+
+void DrasculaEngine::assignBrightPalette() {
int color, component;
for (color = 235; color < 253; color++) {
- for (component = 0; component < 3; component++) {
- gamePalette[color][component] = palHare[color][component];
- }
+ for (component = 0; component < 3; component++)
+ brightPalette[color][component] = gamePalette[color][component];
}
- updatePalette();
}
-void DrasculaEngine::funde_hare(int oscuridad) {
- char fade;
- unsigned int color, component;
+void DrasculaEngine::assignDarkPalette() {
+ int color, component;
- for (fade = oscuridad; fade >= 0; fade--) {
- for (color = 235; color < 253; color++) {
- for (component = 0; component < 3; component++)
- gamePalette[color][component] = adjustToVGA(gamePalette[color][component] - 8 + fade);
- }
+ for (color = 235; color < 253; color++) {
+ for (component = 0; component < 3; component++)
+ darkPalette[color][component] = gamePalette[color][component];
}
-
- updatePalette();
}
-void DrasculaEngine::paleta_hare_claro() {
+void DrasculaEngine::setDefaultPalette() {
int color, component;
for (color = 235; color < 253; color++) {
- for (component = 0; component < 3; component++)
- palHareClaro[color][component] = gamePalette[color][component];
+ for (component = 0; component < 3; component++) {
+ gamePalette[color][component] = defaultPalette[color][component];
+ }
}
+ updatePalette();
}
-void DrasculaEngine::paleta_hare_oscuro() {
+void DrasculaEngine::setBrightPalette() {
int color, component;
for (color = 235; color < 253; color++) {
for (component = 0; component < 3; component++)
- palHareOscuro[color][component] = gamePalette[color][component];
+ gamePalette[color][component] = brightPalette[color][component];
}
+
+ updatePalette();
}
-void DrasculaEngine::hare_claro() {
+void DrasculaEngine::setDarkPalette() {
int color, component;
- for (color = 235; color < 253; color++) {
+ for (color = 235; color < 253; color++ )
for (component = 0; component < 3; component++)
- gamePalette[color][component] = palHareClaro[color][component];
+ gamePalette[color][component] = darkPalette[color][component];
+
+ updatePalette();
+}
+
+void DrasculaEngine::setPaletteBase(int darkness) {
+ char fade;
+ unsigned int color, component;
+
+ for (fade = darkness; fade >= 0; fade--) {
+ for (color = 235; color < 253; color++) {
+ for (component = 0; component < 3; component++)
+ gamePalette[color][component] = adjustToVGA(gamePalette[color][component] - 8 + fade);
+ }
}
updatePalette();
@@ -2225,7 +2225,7 @@ void DrasculaEngine::startWalking() {
startTime = getTime();
}
-void DrasculaEngine::pon_hare() {
+void DrasculaEngine::moveCharacters() {
int curPos[6];
int r;
@@ -2920,86 +2920,86 @@ void DrasculaEngine::reduce_hare_chico(int xx1, int yy1, int xx2, int yy2, int w
}
void DrasculaEngine::quadrant_1() {
- float distance_x, distance_y;
+ float distanceX, distanceY;
if (currentChapter == 2)
- distance_x = curX - roomX;
+ distanceX = curX - roomX;
else
- distance_x = curX + curWidth / 2 - roomX;
+ distanceX = curX + curWidth / 2 - roomX;
- distance_y = (curY + curHeight) - roomY;
+ distanceY = (curY + curHeight) - roomY;
- if (distance_x < distance_y) {
+ if (distanceX < distanceY) {
curDirection = 0;
trackProtagonist = 2;
- stepX = (int)(distance_x / (distance_y / STEP_Y));
+ stepX = (int)(distanceX / (distanceY / STEP_Y));
} else {
curDirection = 7;
trackProtagonist = 0;
- stepY = (int)(distance_y / (distance_x / STEP_X));
+ stepY = (int)(distanceY / (distanceX / STEP_X));
}
}
void DrasculaEngine::quadrant_2() {
- float distance_x, distance_y;
+ float distanceX, distanceY;
if (currentChapter == 2)
- distance_x = abs(curX + curWidth - roomX);
+ distanceX = abs(curX + curWidth - roomX);
else
- distance_x = abs(curX + curWidth / 2 - roomX);
+ distanceX = abs(curX + curWidth / 2 - roomX);
- distance_y = (curY + curHeight) - roomY;
+ distanceY = (curY + curHeight) - roomY;
- if (distance_x < distance_y) {
+ if (distanceX < distanceY) {
curDirection = 1;
trackProtagonist = 2;
- stepX = (int)(distance_x / (distance_y / STEP_Y));
+ stepX = (int)(distanceX / (distanceY / STEP_Y));
} else {
curDirection = 2;
trackProtagonist = 1;
- stepY = (int)(distance_y / (distance_x / STEP_X));
+ stepY = (int)(distanceY / (distanceX / STEP_X));
}
}
void DrasculaEngine::quadrant_3() {
- float distance_x, distance_y;
+ float distanceX, distanceY;
if (currentChapter == 2)
- distance_x = curX - roomX;
+ distanceX = curX - roomX;
else
- distance_x = curX + curWidth / 2 - roomX;
+ distanceX = curX + curWidth / 2 - roomX;
- distance_y = roomY - (curY + curHeight);
+ distanceY = roomY - (curY + curHeight);
- if (distance_x < distance_y) {
+ if (distanceX < distanceY) {
curDirection = 5;
trackProtagonist = 3;
- stepX = (int)(distance_x / (distance_y / STEP_Y));
+ stepX = (int)(distanceX / (distanceY / STEP_Y));
} else {
curDirection = 6;
trackProtagonist = 0;
- stepY = (int)(distance_y / (distance_x / STEP_X));
+ stepY = (int)(distanceY / (distanceX / STEP_X));
}
}
void DrasculaEngine::quadrant_4() {
- float distance_x, distance_y;
+ float distanceX, distanceY;
if (currentChapter == 2)
- distance_x = abs(curX + curWidth - roomX);
+ distanceX = abs(curX + curWidth - roomX);
else
- distance_x = abs(curX + curWidth / 2 - roomX);
+ distanceX = abs(curX + curWidth / 2 - roomX);
- distance_y = roomY - (curY + curHeight);
+ distanceY = roomY - (curY + curHeight);
- if (distance_x < distance_y) {
+ if (distanceX < distanceY) {
curDirection = 4;
trackProtagonist = 3;
- stepX = (int)(distance_x / (distance_y / STEP_Y));
+ stepX = (int)(distanceX / (distanceY / STEP_Y));
} else {
curDirection = 3;
trackProtagonist = 1;
- stepY = (int)(distance_y / (distance_x / STEP_X));
+ stepY = (int)(distanceY / (distanceX / STEP_X));
}
}
@@ -3677,7 +3677,7 @@ void DrasculaEngine::activatePendulum() {
copyBackground(0, 171, 0, 0, OBJWIDTH, OBJHEIGHT, backSurface, drawSurface3);
- conta_blind_vez = getTime();
+ savedTime = getTime();
}
void DrasculaEngine::closeDoor(int nflag, int doorNum) {
diff --git a/engines/drascula/drascula.h b/engines/drascula/drascula.h
index 4649dd5ada..f40517ca0d 100644
--- a/engines/drascula/drascula.h
+++ b/engines/drascula/drascula.h
@@ -122,32 +122,32 @@ struct CharInfo {
int charType; // 0 - letters, 1 - signs, 2 - accented
};
-#define CHARMAP_SIZE 93
-#define NUM_SAVES 10
-#define NUM_FLAGS 50
-#define DIF_MASK 55
-#define OBJWIDTH 40
-#define OBJHEIGHT 25
-
-#define DIF_MASK_HARE 72
-#define DIF_MASK_ABC 22
-#define CHAR_WIDTH 8
-#define CHAR_HEIGHT 6
-
-#define TALK_HEIGHT 25
-#define TALK_WIDTH 23
-#define STEP_X 8
-#define STEP_Y 3
-#define CHARACTER_HEIGHT 70
-#define CHARACTER_WIDTH 43
-#define FEET_HEIGHT 12
-
-#define CHAR_WIDTH_OPC 6
-#define CHAR_HEIGHT_OPC 5
-#define NO_DOOR 99
-
-#define COMPLETE_PAL 256
-#define HALF_PAL 128
+#define CHARMAP_SIZE 93
+#define NUM_SAVES 10
+#define NUM_FLAGS 50
+#define DIF_MASK 55
+#define OBJWIDTH 40
+#define OBJHEIGHT 25
+
+#define DIF_MASK_HARE 72
+#define DIF_MASK_ABC 22
+#define CHAR_WIDTH 8
+#define CHAR_HEIGHT 6
+
+#define TALK_HEIGHT 25
+#define TALK_WIDTH 23
+#define STEP_X 8
+#define STEP_Y 3
+#define CHARACTER_HEIGHT 70
+#define CHARACTER_WIDTH 43
+#define FEET_HEIGHT 12
+
+#define CHAR_WIDTH_OPC 6
+#define CHAR_HEIGHT_OPC 5
+#define NO_DOOR 99
+
+#define COMPLETE_PAL 256
+#define HALF_PAL 128
static const int interf_x[] ={ 1, 65, 129, 193, 1, 65, 129 };
static const int interf_y[] ={ 51, 51, 51, 51, 83, 83, 83 };
@@ -184,7 +184,7 @@ public:
typedef char DacPalette256[256][3];
void setRGB(byte *dir_lectura, int plt);
- void paleta_hare();
+ void assignDefaultPalette();
void updatePalette();
void setPalette(byte *PalBuf);
void copyBackground(int xorg, int yorg, int xdes, int ydes, int width,
@@ -208,9 +208,9 @@ public:
}
DacPalette256 gamePalette;
- DacPalette256 palHare;
- DacPalette256 palHareClaro;
- DacPalette256 palHareOscuro;
+ DacPalette256 defaultPalette;
+ DacPalette256 brightPalette;
+ DacPalette256 darkPalette;
byte *VGA;
@@ -272,7 +272,7 @@ public:
int objExit;
int timeDiff, startTime;
int hasAnswer;
- int conta_blind_vez;
+ int savedTime;
int changeColor;
int breakOut;
int vbX, trackVB, vbHasMoved, frame_vb;
@@ -312,7 +312,7 @@ public:
void openDoor(int nflag, int doorNum);
void showMap();
- void hare_oscuro();
+ void setDarkPalette();
void withoutVerb();
bool para_cargar(char[]);
@@ -382,16 +382,16 @@ public:
void updateRoom();
bool loadGame(const char *);
void updateDoor(int);
- void color_hare();
- void funde_hare(int oscuridad);
- void paleta_hare_claro();
- void paleta_hare_oscuro();
- void hare_claro();
+ void setDefaultPalette();
+ void setPaletteBase(int darkness);
+ void assignBrightPalette();
+ void assignDarkPalette();
+ void setBrightPalette();
void updateVisible();
void startWalking();
void updateRefresh();
void updateRefresh_pre();
- void pon_hare();
+ void moveCharacters();
void showMenu();
void clearMenu();
void removeObject();
diff --git a/engines/drascula/rooms.cpp b/engines/drascula/rooms.cpp
index a294895162..87b1b4f4e6 100644
--- a/engines/drascula/rooms.cpp
+++ b/engines/drascula/rooms.cpp
@@ -1170,26 +1170,22 @@ void DrasculaEngine::updateRefresh_pre() {
}
void DrasculaEngine::update_1_pre() {
- int cambio_col_antes = changeColor;
-
- if (curX > 98 && curX < 153)
+ if (curX > 98 && curX < 153) {
changeColor = 1;
- else
+ setDarkPalette();
+ } else {
changeColor = 0;
-
- if (cambio_col_antes != changeColor && changeColor == 1)
- hare_oscuro();
- if (cambio_col_antes != changeColor && changeColor == 0)
- hare_claro();
+ setBrightPalette();
+ }
if (flags[8] == 0)
copyBackground(2, 158, 208, 67, 27, 40, drawSurface3, screenSurface);
}
void DrasculaEngine::update_2(){
- int pos_murci[6];
+ int batPos[6];
int difference;
- int murci_x[] = {0, 38, 76, 114, 152, 190, 228, 266,
+ int batX[] = {0, 38, 76, 114, 152, 190, 228, 266,
0, 38, 76, 114, 152, 190, 228, 266,
0, 38, 76, 114, 152, 190,
0, 48, 96, 144, 192, 240,
@@ -1197,7 +1193,7 @@ void DrasculaEngine::update_2(){
88, 146, 204, 262,
88, 146, 204, 262};
- int murci_y[] = {179, 179, 179, 179, 179, 179, 179, 179,
+ int batY[] = {179, 179, 179, 179, 179, 179, 179, 179,
158, 158, 158, 158, 158, 158, 158, 158,
137, 137, 137, 137, 137, 137,
115, 115, 115, 115, 115, 115,
@@ -1208,28 +1204,28 @@ void DrasculaEngine::update_2(){
if (frame_bat == 41)
frame_bat = 0;
- pos_murci[0] = murci_x[frame_bat];
- pos_murci[1] = murci_y[frame_bat];
+ batPos[0] = batX[frame_bat];
+ batPos[1] = batY[frame_bat];
if (frame_bat < 22) {
- pos_murci[4] = 37;
- pos_murci[5] = 21;
+ batPos[4] = 37;
+ batPos[5] = 21;
} else if (frame_bat > 27) {
- pos_murci[4] = 57;
- pos_murci[5] = 36;
+ batPos[4] = 57;
+ batPos[5] = 36;
} else {
- pos_murci[4] = 47;
- pos_murci[5] = 22;
+ batPos[4] = 47;
+ batPos[5] = 22;
}
- pos_murci[2] = 239;
- pos_murci[3] = 19;
+ batPos[2] = 239;
+ batPos[3] = 19;
- copyRectClip(pos_murci, drawSurface3, screenSurface);
- difference = getTime() - conta_blind_vez;
+ copyRectClip(batPos, drawSurface3, screenSurface);
+ difference = getTime() - savedTime;
if (difference >= 6) {
frame_bat++;
- conta_blind_vez = getTime();
+ savedTime = getTime();
}
copyRect(29, 37, 58, 114, 57, 39, drawSurface3, screenSurface);
@@ -1248,16 +1244,13 @@ void DrasculaEngine::update_3() {
}
void DrasculaEngine::update_4() {
- int cambio_col_antes = changeColor;
- if (curX > 190)
+ if (curX > 190) {
changeColor = 1;
- else
+ setDarkPalette();
+ } else {
changeColor = 0;
-
- if (cambio_col_antes != changeColor && changeColor == 1)
- hare_oscuro();
- if (cambio_col_antes != changeColor && changeColor == 0)
- hare_claro();
+ setBrightPalette();
+ }
}
void DrasculaEngine::update_5_pre(){
@@ -1270,23 +1263,19 @@ void DrasculaEngine::update_5() {
}
void DrasculaEngine::update_6_pre() {
- int cambio_col_antes = changeColor;
-
if ((curX > 149 && curY + curHeight > 160 && curX < 220 && curY + curHeight < 188) ||
- (curX > 75 && curY + curHeight > 183 && curX < 145))
+ (curX > 75 && curY + curHeight > 183 && curX < 145)) {
changeColor = 0;
- else
+ setBrightPalette();
+ } else {
changeColor = 1;
+ setDarkPalette();
+ }
- if (cambio_col_antes != changeColor && changeColor == 1)
- hare_oscuro();
- if (cambio_col_antes != changeColor && changeColor == 0)
- hare_claro();
-
- if (flags[1] == 0)
- copyBackground(97, 117, 34, 148, 36, 31, drawSurface3, screenSurface);
if (flags[0] == 0)
copyBackground(3, 103, 185, 69, 23, 76, drawSurface3, screenSurface);
+ if (flags[1] == 0)
+ copyBackground(97, 117, 34, 148, 36, 31, drawSurface3, screenSurface);
if (flags[2] == 0)
copyBackground(28, 100, 219, 72, 64, 97, drawSurface3, screenSurface);
}
@@ -1297,16 +1286,16 @@ void DrasculaEngine::update_7_pre() {
}
void DrasculaEngine::update_9_pre() {
- int blind_x[] = {26, 68, 110, 152, 194, 236, 278, 26, 68};
- int blind_y[] = {51, 51, 51, 51, 51, 51, 51, 127, 127};
+ int blindX[] = {26, 68, 110, 152, 194, 236, 278, 26, 68};
+ int blindY[] = {51, 51, 51, 51, 51, 51, 51, 127, 127};
int difference;
- copyRect(blind_x[frame_blind], blind_y[frame_blind], 122, 57, 41, 72, drawSurface3, screenSurface);
+ copyRect(blindX[frame_blind], blindY[frame_blind], 122, 57, 41, 72, drawSurface3, screenSurface);
if (flags[9] == 0) {
- difference = getTime() - conta_blind_vez;
+ difference = getTime() - savedTime;
if (difference >= 11) {
frame_blind++;
- conta_blind_vez = getTime();
+ savedTime = getTime();
}
if (frame_blind == 9)
frame_blind = 0;
@@ -1352,7 +1341,7 @@ void DrasculaEngine::update_14_pre() {
if (flags[12] == 1)
copyBackground(drunkX[frame_drunk], 82, 170, 50, 40, 53, drawSurface3, screenSurface);
- difference = getTime() - conta_blind_vez;
+ difference = getTime() - savedTime;
if (difference > 6) {
if (flags[12] == 1) {
frame_drunk++;
@@ -1370,7 +1359,7 @@ void DrasculaEngine::update_14_pre() {
if (frame_piano == 9)
frame_piano = 0;
blinking = _rnd->getRandomNumber(10);
- conta_blind_vez = getTime();
+ savedTime = getTime();
}
}
@@ -1405,12 +1394,12 @@ void DrasculaEngine::update_18_pre() {
} else
moveVB();
- difference = getTime() - conta_blind_vez;
+ difference = getTime() - savedTime;
if (difference > 9) {
frame_snore++;
if (frame_snore == 16)
frame_snore = 0;
- conta_blind_vez = getTime();
+ savedTime = getTime();
}
}
@@ -1479,10 +1468,10 @@ void DrasculaEngine::update_26_pre() {
if (blinking == 5 && flags[18] == 0)
copyBackground(52, 172, 226, 106, 3, 4, drawSurface3, screenSurface);
- difference = getTime() - conta_blind_vez;
+ difference = getTime() - savedTime;
if (difference >= 10) {
blinking = _rnd->getRandomNumber(10);
- conta_blind_vez = getTime();
+ savedTime = getTime();
}
if (flags[20] == 1)
@@ -1645,7 +1634,7 @@ void DrasculaEngine::update_60_pre() {
if (flag_tv == 1)
copyBackground(114, 158, 8, 30, 8, 23, drawSurface3, screenSurface);
- difference = getTime() - conta_blind_vez;
+ difference = getTime() - savedTime;
blinking = _rnd->getRandomNumber(7);
if (blinking == 5 && flag_tv == 0)
flag_tv = 1;
@@ -1655,7 +1644,7 @@ void DrasculaEngine::update_60_pre() {
frame_candles++;
if (frame_candles == 3)
frame_candles = 0;
- conta_blind_vez = getTime();
+ savedTime = getTime();
}
}
@@ -1694,7 +1683,7 @@ void DrasculaEngine::update_62_pre() {
if (flags[12] == 1)
copyBackground(drunkX[frame_drunk], 82, 170, 50, 40, 53, drawSurface3, screenSurface);
- difference = getTime() - conta_blind_vez;
+ difference = getTime() - savedTime;
if (difference > 6) {
if (flags[12] == 1) {
frame_drunk++;
@@ -1712,7 +1701,7 @@ void DrasculaEngine::update_62_pre() {
if (frame_piano == 9)
frame_piano = 0;
blinking = _rnd->getRandomNumber(10);
- conta_blind_vez = getTime();
+ savedTime = getTime();
}
}
@@ -1750,12 +1739,12 @@ void DrasculaEngine::update_pendulum() {
if (flags[1] == 0)
copyRect(44, 145, 145, 105, 25, 29, drawSurface3, screenSurface);
- difference = getTime() - conta_blind_vez;
+ difference = getTime() - savedTime;
if (difference > 8) {
frame_pen++;
if (frame_pen == 17)
frame_pen = 0;
- conta_blind_vez = getTime();
+ savedTime = getTime();
}
}
diff --git a/engines/drascula/talk.cpp b/engines/drascula/talk.cpp
index 3cd45a3253..8e71254cf1 100644
--- a/engines/drascula/talk.cpp
+++ b/engines/drascula/talk.cpp
@@ -115,7 +115,7 @@ void DrasculaEngine::talk_igor(int index, int talkerType) {
updateScreen();
} else if (talkerType == 3) {
copyBackground(x_talk3[face], 109, 207, 92, 21, 23, drawSurface3, screenSurface);
- pon_hare();
+ moveCharacters();
updateRefresh();
if (withVoices == 0)
centerText(said, 221, 102);
@@ -124,7 +124,7 @@ void DrasculaEngine::talk_igor(int index, int talkerType) {
pause(3);
} else if (talkerType == 4) {
copyBackground(x_talk4[face], 78, 199, 94, 38, 27, drawSurface3, screenSurface);
- pon_hare();
+ moveCharacters();
updateRefresh();
if (withVoices == 0)
centerText(said, 221, 102);
@@ -172,7 +172,7 @@ void DrasculaEngine::talk_drascula(int index, int talkerType) {
placeIgor();
placeDrascula();
if (currentChapter == 6)
- pon_hare();
+ moveCharacters();
copyBackground(x_dr, y_dr, x_dr, y_dr, 38 + offset, 31, drawSurface1, screenSurface);
if (currentChapter == 6)
@@ -201,7 +201,7 @@ void DrasculaEngine::talk_drascula(int index, int talkerType) {
placeDrascula();
if (talkerType == 1 && currentChapter == 6)
- pon_hare();
+ moveCharacters();
updateScreen();
}
@@ -281,7 +281,7 @@ void DrasculaEngine::talk_bartender(int index, int talkerType) {
copyBackground(x_talk[face], 2, 121, 44, 21, 24, extraSurface, screenSurface);
else
copyBackground(x_talk[face], 130, 151, 43, 21, 24, drawSurface3, screenSurface);
- pon_hare();
+ moveCharacters();
updateRefresh();
if (withVoices == 0)
@@ -321,7 +321,7 @@ void DrasculaEngine::talk_bj(int index) {
copyRect(x_talk[face], 99, x_bj + 2, y_bj - 1, 27, 40,
drawSurface3, screenSurface);
- pon_hare();
+ moveCharacters();
updateRefresh();
if (withVoices == 0)
@@ -398,7 +398,7 @@ void DrasculaEngine::talk(const char *said, const char *filename) {
(int)(((float)(talkHeight - 1) / 100) * factor_red[curY + curHeight]),
screenSurface, drawSurface3);
- pon_hare();
+ moveCharacters();
if (currentChapter == 2) {
if (!strcmp(menuBackground, "99.alg") || !strcmp(menuBackground, "994.alg"))
@@ -487,7 +487,7 @@ void DrasculaEngine::talk_pianist(int index) {
copyBackground(x_talk[face], 139, 228, 112, 47, 60,
extraSurface, screenSurface);
- pon_hare();
+ moveCharacters();
updateRefresh();
if (withVoices == 0)
@@ -533,7 +533,7 @@ void DrasculaEngine::talk_drunk(int index) {
updateRefresh_pre();
copyBackground(x_talk[face], 29, 177, 50, 19, 19, frontSurface, screenSurface);
- pon_hare();
+ moveCharacters();
updateRefresh();
if (withVoices == 0)
@@ -580,7 +580,7 @@ void DrasculaEngine::talk_vb(int index) {
face = _rnd->getRandomNumber(5);
copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface);
- pon_hare();
+ moveCharacters();
moveVB();
copyBackground(OBJWIDTH + 1, 0, vbX + 5, 64, 25, 27, drawSurface3, screenSurface);
@@ -723,7 +723,7 @@ void DrasculaEngine::talk_wolf(int index) {
updateRefresh_pre();
copyBackground(x_talk[face], 136, 198, 81, 26, 24, drawSurface3, screenSurface);
- pon_hare();
+ moveCharacters();
updateRefresh();
if (withVoices == 0)
@@ -758,7 +758,7 @@ void DrasculaEngine::talk_mus(int index) {
updateRefresh_pre();
copyBackground(x_talk[face], 156, 190, 64, 18, 24, drawSurface3, screenSurface);
- pon_hare();
+ moveCharacters();
updateRefresh();
if (withVoices == 0)
@@ -847,7 +847,7 @@ void DrasculaEngine::talk_bj_bed(int index) {
copyBackground(65, 103, 65, 103, 49, 38, drawSurface1, screenSurface);
copyRect(x_talk[face], 105, 65, 103, 49, 38, drawSurface3, screenSurface);
- pon_hare();
+ moveCharacters();
updateRefresh();
if (withVoices == 0)
@@ -929,7 +929,7 @@ void DrasculaEngine::talk_sinc(const char *said, const char *filename, const cha
else
copyBackground(curX, curY, OBJWIDTH + 1, 0, (int)(((float)curWidth / 100) * factor_red[curY + curHeight]),
(int)(((float)(talkHeight - 1) / 100) * factor_red[curY + curHeight]), screenSurface, drawSurface3);
- pon_hare();
+ moveCharacters();
if (currentChapter == 2) {
if (curHeight != 56)
copyBackground(OBJWIDTH + 1, 0, curX, curY, curWidth, talkHeight - 1, drawSurface3, screenSurface);