[Scummvm-cvs-logs] SF.net SVN: scummvm: [32527] scummvm/trunk/engines/drascula

thebluegr at users.sourceforge.net thebluegr at users.sourceforge.net
Wed Jun 4 10:06:05 CEST 2008


Revision: 32527
          http://scummvm.svn.sourceforge.net/scummvm/?rev=32527&view=rev
Author:   thebluegr
Date:     2008-06-04 01:06:04 -0700 (Wed, 04 Jun 2008)

Log Message:
-----------
Merged para_grabar() with saveGame()

sentido_igor -> trackIgor
sentido_bj -> trackBJ

Modified Paths:
--------------
    scummvm/trunk/engines/drascula/animation.cpp
    scummvm/trunk/engines/drascula/drascula.cpp
    scummvm/trunk/engines/drascula/drascula.h

Modified: scummvm/trunk/engines/drascula/animation.cpp
===================================================================
--- scummvm/trunk/engines/drascula/animation.cpp	2008-06-04 07:58:34 UTC (rev 32526)
+++ scummvm/trunk/engines/drascula/animation.cpp	2008-06-04 08:06:04 UTC (rev 32527)
@@ -188,7 +188,7 @@
 		trackDrascula = 0;
 		x_dr = 129;
 		y_dr = 95;
-		sentido_igor = 1;
+		trackIgor = 1;
 		igorX = 66;
 		igorY = 97;
 
@@ -356,7 +356,7 @@
 		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 @@
 			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 @@
 	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);

Modified: scummvm/trunk/engines/drascula/drascula.cpp
===================================================================
--- scummvm/trunk/engines/drascula/drascula.cpp	2008-06-04 07:58:34 UTC (rev 32526)
+++ scummvm/trunk/engines/drascula/drascula.cpp	2008-06-04 08:06:04 UTC (rev 32527)
@@ -180,7 +180,7 @@
 			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 @@
 						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 @@
 					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 @@
 	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::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::pickupObject() {
-	int h, n;
-	h = pickedObject;
+	int h = pickedObject;
 	checkFlags = 1;
 
 	updateRoom();
@@ -2578,7 +2577,7 @@
 
 	// 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::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 @@
 		warning("Can't write file '%s'. (Disk full?)", gameName);
 
 	delete out;
+
+	playSound(99);
+	finishSound();
 }
 
 void DrasculaEngine::increaseFrameNum() {

Modified: scummvm/trunk/engines/drascula/drascula.h
===================================================================
--- scummvm/trunk/engines/drascula/drascula.h	2008-06-04 07:58:34 UTC (rev 32526)
+++ scummvm/trunk/engines/drascula/drascula.h	2008-06-04 08:06:04 UTC (rev 32527)
@@ -283,9 +283,9 @@
 	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 @@
 	bool checkFlag(int);
 	void setCursorTable();
 	void enterName();
-	void para_grabar(char[]);
 	bool soundIsActive();
 	void openSSN(const char *Name, int Pause);
 	void WaitFrameSSN();


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list