aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFilippos Karapetis2008-06-04 08:06:04 +0000
committerFilippos Karapetis2008-06-04 08:06:04 +0000
commitc0621fcc4e7851e6045df87a5c901c95dce8e6a2 (patch)
treef8f70a05f5110d994065a2aa1bd8f3da8484dcba
parentdb0c37d054cdb3d205edae6106cda9adb858ce7d (diff)
downloadscummvm-rg350-c0621fcc4e7851e6045df87a5c901c95dce8e6a2.tar.gz
scummvm-rg350-c0621fcc4e7851e6045df87a5c901c95dce8e6a2.tar.bz2
scummvm-rg350-c0621fcc4e7851e6045df87a5c901c95dce8e6a2.zip
Merged para_grabar() with saveGame()
sentido_igor -> trackIgor sentido_bj -> trackBJ svn-id: r32527
-rw-r--r--engines/drascula/animation.cpp8
-rw-r--r--engines/drascula/drascula.cpp28
-rw-r--r--engines/drascula/drascula.h5
3 files changed, 18 insertions, 23 deletions
diff --git a/engines/drascula/animation.cpp b/engines/drascula/animation.cpp
index 83f125edc5..f3ea1a3114 100644
--- a/engines/drascula/animation.cpp
+++ b/engines/drascula/animation.cpp
@@ -188,7 +188,7 @@ void DrasculaEngine::animation_1_1() {
trackDrascula = 0;
x_dr = 129;
y_dr = 95;
- sentido_igor = 1;
+ trackIgor = 1;
igorX = 66;
igorY = 97;
@@ -356,7 +356,7 @@ void DrasculaEngine::animation_1_1() {
talk_igor(5, kIgorDch);
if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE))
break;
- sentido_igor = 3;
+ trackIgor = 3;
talk_drascula(17);
if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE))
break;
@@ -463,7 +463,7 @@ void DrasculaEngine::animation_2_1() {
factor_red[l] = 99;
x_bj = 170;
y_bj = 90;
- sentido_bj = 0;
+ trackBJ = 0;
curX = 91;
curY = 95;
trackProtagonist = 1;
@@ -1929,7 +1929,7 @@ void DrasculaEngine::animation_1_6() {
animation_5_6();
talk_drascula(32, 1);
talk_igor(11, kIgorDch);
- sentido_igor = 3;
+ trackIgor = 3;
talk_drascula(33, 1);
talk_igor(12, kIgorFront);
talk_drascula(34, 1);
diff --git a/engines/drascula/drascula.cpp b/engines/drascula/drascula.cpp
index a7b39ef70c..4322cbbda1 100644
--- a/engines/drascula/drascula.cpp
+++ b/engines/drascula/drascula.cpp
@@ -180,7 +180,7 @@ int DrasculaEngine::go() {
loadPic("97.alg", extraSurface, 1);
loadPic("99.alg", backSurface, 1);
} else if (currentChapter == 6) {
- igorX = 105, igorY = 85, sentido_igor = 1;
+ igorX = 105, igorY = 85, trackIgor = 1;
x_dr = 62, y_dr = 99, trackDrascula = 1;
frame_pen = 0;
flag_tv = 0;
@@ -1406,7 +1406,7 @@ bool DrasculaEngine::saves() {
strcpy(names[n], select);
if (selectionMade == 1) {
snprintf(file, 50, "%s%02d", _targetName.c_str(), n + 1);
- para_grabar(file);
+ saveGame(file);
Common::OutSaveFile *tsav;
if (!(tsav = _saveFileMan->openForSaving(fileEpa))) {
error("Can't open %s file", fileEpa);
@@ -1449,7 +1449,7 @@ bool DrasculaEngine::saves() {
return false;
break;
} else if (mouseX > 208 && mouseY > 123 && mouseX < 282 && mouseY < 149 && selectionMade == 1) {
- para_grabar(file);
+ saveGame(file);
Common::OutSaveFile *tsav;
if (!(tsav = _saveFileMan->openForSaving(fileEpa))) {
error("Can't open %s file", fileEpa);
@@ -1910,9 +1910,9 @@ void DrasculaEngine::placeIgor() {
if (currentChapter == 4) {
pos_igor[1] = 138;
} else {
- if (sentido_igor == 3)
+ if (trackIgor == 3)
pos_igor[1] = 138;
- else if (sentido_igor == 1)
+ else if (trackIgor == 1)
pos_igor[1] = 76;
}
pos_igor[2] = igorX;
@@ -1947,9 +1947,9 @@ void DrasculaEngine::placeDrascula() {
void DrasculaEngine::placeBJ() {
int pos_bj[6];
- if (sentido_bj == 3)
+ if (trackBJ == 3)
pos_bj[0] = 10;
- else if (sentido_bj == 0)
+ else if (trackBJ == 0)
pos_bj[0] = 37;
pos_bj[1] = 99;
pos_bj[2] = x_bj;
@@ -2568,8 +2568,7 @@ bool DrasculaEngine::exitRoom(int l) {
}
bool DrasculaEngine::pickupObject() {
- int h, n;
- h = pickedObject;
+ int h = pickedObject;
checkFlags = 1;
updateRoom();
@@ -2578,7 +2577,7 @@ bool DrasculaEngine::pickupObject() {
// Objects with an ID smaller than 7 are the inventory verbs
if (pickedObject >= 7) {
- for (n = 1; n < 43; n++) {
+ for (int n = 1; n < 43; n++) {
if (whichObject() == n && inventoryObjects[n] == 0) {
inventoryObjects[n] = h;
takeObject = 0;
@@ -2659,12 +2658,6 @@ void DrasculaEngine::enterName() {
}
}
-void DrasculaEngine::para_grabar(char gameName[]) {
- saveGame(gameName);
- playSound(99);
- finishSound();
-}
-
void DrasculaEngine::openSSN(const char *Name, int Pause) {
MiVideoSSN = (byte *)malloc(64256);
globalSpeed = 1000 / Pause;
@@ -3032,6 +3025,9 @@ void DrasculaEngine::saveGame(char gameName[]) {
warning("Can't write file '%s'. (Disk full?)", gameName);
delete out;
+
+ playSound(99);
+ finishSound();
}
void DrasculaEngine::increaseFrameNum() {
diff --git a/engines/drascula/drascula.h b/engines/drascula/drascula.h
index f40517ca0d..2194b50fc0 100644
--- a/engines/drascula/drascula.h
+++ b/engines/drascula/drascula.h
@@ -283,9 +283,9 @@ public:
int frame_candles;
int color_solo;
int blinking;
- int igorX, igorY, sentido_igor;
+ int igorX, igorY, trackIgor;
int x_dr, y_dr, trackDrascula;
- int x_bj, y_bj, sentido_bj;
+ int x_bj, y_bj, trackBJ;
int cont_sv;
int term_int;
int currentChapter;
@@ -400,7 +400,6 @@ public:
bool checkFlag(int);
void setCursorTable();
void enterName();
- void para_grabar(char[]);
bool soundIsActive();
void openSSN(const char *Name, int Pause);
void WaitFrameSSN();