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

thebluegr at users.sourceforge.net thebluegr at users.sourceforge.net
Fri Jun 6 20:28:52 CEST 2008


Revision: 32580
          http://scummvm.svn.sourceforge.net/scummvm/?rev=32580&view=rev
Author:   thebluegr
Date:     2008-06-06 11:28:50 -0700 (Fri, 06 Jun 2008)

Log Message:
-----------
Removed the useless textSurface buffer
frame_x -> frameX
candleX, candleY, pianistX and drunkX are used in more than one place

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

Modified: scummvm/trunk/engines/drascula/animation.cpp
===================================================================
--- scummvm/trunk/engines/drascula/animation.cpp	2008-06-06 17:58:08 UTC (rev 32579)
+++ scummvm/trunk/engines/drascula/animation.cpp	2008-06-06 18:28:50 UTC (rev 32580)
@@ -396,9 +396,6 @@
 		if (animate("ag.bin", 14))
 			break;
 
-		if (_lang == kSpanish)
-			textSurface = frontSurface;
-
 		loadPic("an11y13.alg", extraSurface);
 		if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE))
 			break;
@@ -407,9 +404,6 @@
 		if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE))
 			break;
 
-		if (_lang == kSpanish)
-			textSurface = extraSurface;
-
 		loadPic(97, extraSurface);
 		if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE))
 			break;
@@ -591,9 +585,6 @@
 }
 
 void DrasculaEngine::animation_3_1() {
-	if (_lang == kSpanish)
-		textSurface = frontSurface;
-
 	loadPic("an11y13.alg", extraSurface);
 
 	talk(192);
@@ -619,16 +610,10 @@
 
 	flags[0] = 1;
 
-	if (_lang == kSpanish)
-		textSurface = extraSurface;
-
 	loadPic(97, extraSurface);
 }
 
 void DrasculaEngine::animation_4_1() {
-	if (_lang == kSpanish)
-		textSurface = frontSurface;
-
 	loadPic("an12.alg", extraSurface);
 
 	talk(205);
@@ -660,9 +645,6 @@
 	talk_pianist(4);
 	talk(209);
 
-	if (_lang == kSpanish)
-		textSurface = extraSurface;
-
 	flags[11] = 0;
 	loadPic(97, extraSurface);
 }
@@ -728,9 +710,6 @@
 	loadPic("ciego4.alg", backSurface);
 	loadPic("ciego5.alg", frontSurface);
 
-	if (_lang == kSpanish)
-		textSurface = frontSurface;
-
 	copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface);
 	updateScreen();
 
@@ -776,9 +755,6 @@
 	loadPic(99, backSurface);
 	withoutVerb();
 
-	if (_lang == kSpanish)
-		textSurface = extraSurface;
-
 	flags[9] = 0;
 	flags[4] = 1;
 }
@@ -1931,9 +1907,6 @@
 	trackDrascula = 0;
 	talk_drascula(35);
 
-	if (_lang == kSpanish)
-		textSurface = extraSurface;
-
 	clearRoom();
 	enterRoom(102);
 	activatePendulum();
@@ -2145,9 +2118,6 @@
 }
 
 void DrasculaEngine::animation_12_2() {
-	if (_lang == kSpanish)
-		textSurface = frontSurface;
-
 	loadPic("an12.alg", extraSurface);
 
 	talk(356);
@@ -2173,17 +2143,11 @@
 	talk_pianist(5);
 	converse(1);
 
-	if (_lang == kSpanish)
-		textSurface = extraSurface;
-
 	flags[11] = 0;
 	loadPic(974, extraSurface);
 }
 
 void DrasculaEngine::animation_26_2() {
-	if (_lang == kSpanish)
-		textSurface = frontSurface;
-
 	loadPic("an12.alg", extraSurface);
 
 	talk(392);
@@ -2234,9 +2198,6 @@
 	pickObject(11);
 	removeObject(kItemBook);
 
-	if (_lang == kSpanish)
-		textSurface = extraSurface;
-
 	flags[11] = 0;
 	flags[39] = 1;
 	loadPic(974, extraSurface);
@@ -2244,9 +2205,6 @@
 }
 
 void DrasculaEngine::animation_11_2() {
-	if (_lang == kSpanish)
-		textSurface = frontSurface;
-
 	loadPic("an11y13.alg", extraSurface);
 
 	talk(352);
@@ -2259,9 +2217,6 @@
 	pause(40);
 	talk_bartender(82);
 
-	if (_lang == kSpanish)
-		textSurface = extraSurface;
-
 	loadPic(974, extraSurface);
 }
 
@@ -2389,9 +2344,6 @@
 }
 
 void DrasculaEngine::animation_36_2() {
-	if (_lang == kSpanish)
-		textSurface = frontSurface;
-
 	loadPic("an11y13.alg", extraSurface);
 
 	talk(404);
@@ -2401,10 +2353,6 @@
 	talk(355);
 	pause(40);
 	talk_bartender(82);
-
-	if (_lang == kSpanish)
-		textSurface = extraSurface;
-
 	loadPic(974, extraSurface);
 }
 
@@ -2504,9 +2452,6 @@
 	stopMusic();
 	flags[9] = 1;
 
-	if (_lang == kSpanish)
-		textSurface = frontSurface;
-
 	clearRoom();
 	loadPic("ciego1.alg", drawSurface1, HALF_PAL);	// ciego = blind
 	loadPic("ciego2.alg", drawSurface3);
@@ -2541,9 +2486,6 @@
 	loadPic(99, backSurface);
 	withoutVerb();
 
-	if (_lang == kSpanish)
-		textSurface = extraSurface;
-
 	flags[9] = 0;
 }
 
@@ -2562,9 +2504,6 @@
 	loadPic("ciego4.alg", backSurface);
 	loadPic("ciego5.alg", frontSurface);
 
-	if (_lang == kSpanish)
-		textSurface = frontSurface;
-
 	copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface);
 	updateScreen();
 
@@ -2593,9 +2532,6 @@
 	loadPic(99, backSurface);
 	withoutVerb();
 
-	if (_lang == kSpanish)
-		textSurface = extraSurface;
-
 	flags[33] = 1;
 	flags[9] = 0;
 }

Modified: scummvm/trunk/engines/drascula/drascula.cpp
===================================================================
--- scummvm/trunk/engines/drascula/drascula.cpp	2008-06-06 17:58:08 UTC (rev 32579)
+++ scummvm/trunk/engines/drascula/drascula.cpp	2008-06-06 18:28:50 UTC (rev 32580)
@@ -401,18 +401,13 @@
 bool DrasculaEngine::runCurrentChapter() {
 	int n;
 
-	if (_lang == kSpanish)
-		textSurface = extraSurface;
-	else
-		textSurface = tableSurface;
-
 	previousMusic = -1;
 
 	if (currentChapter != 2) {
 		int soc = 0;
 		for (n = 0; n < 6; n++) {
 			soc = soc + CHARACTER_WIDTH;
-			frame_x[n] = soc;
+			frameX[n] = soc;
 		}
 	}
 
@@ -932,7 +927,7 @@
 		soc = 0;
 		for (l = 0; l < 6; l++) {
 			soc += curWidth;
-			frame_x[l] = soc;
+			frameX[l] = soc;
 		}
 	}
 
@@ -1452,7 +1447,7 @@
 		textPos[4] = CHAR_WIDTH;
 		textPos[5] = CHAR_HEIGHT;
 
-		copyRectClip(textPos, textSurface, screenSurface);
+		copyRectClip(textPos, tableSurface, screenSurface);
 
 		screenX = screenX + CHAR_WIDTH;
 		if (screenX > 317) {
@@ -2276,7 +2271,7 @@
 									factor_red[curY + curHeight], frontSurface, screenSurface);
 		}
 	} else if (characterMoved == 1) {
-		curPos[0] = frame_x[num_frame];
+		curPos[0] = frameX[num_frame];
 		curPos[1] = frame_y + DIF_MASK_HARE;
 		curPos[2] = curX;
 		curPos[3] = curY;

Modified: scummvm/trunk/engines/drascula/drascula.h
===================================================================
--- scummvm/trunk/engines/drascula/drascula.h	2008-06-06 17:58:08 UTC (rev 32579)
+++ scummvm/trunk/engines/drascula/drascula.h	2008-06-06 18:28:50 UTC (rev 32580)
@@ -283,7 +283,6 @@
 	byte *extraSurface;	// not sure about this one, was "dir_hare_dch"
 	byte *screenSurface;
 	byte *frontSurface;
-	byte *textSurface;
 	byte *pendulumSurface;
 
 	byte cPal[768];
@@ -690,7 +689,7 @@
 extern const char *_textd1[][11];
 
 extern const ItemLocation itemLocations[];
-extern int frame_x[20];
+extern int frameX[20];
 extern const int x_pol[44], y_pol[44];
 extern const int verbBarX[];
 extern const int x1d_menu[], y1d_menu[];

Modified: scummvm/trunk/engines/drascula/rooms.cpp
===================================================================
--- scummvm/trunk/engines/drascula/rooms.cpp	2008-06-06 17:58:08 UTC (rev 32579)
+++ scummvm/trunk/engines/drascula/rooms.cpp	2008-06-06 18:28:50 UTC (rev 32580)
@@ -1211,10 +1211,6 @@
 }
 
 void DrasculaEngine::update_14_pre() {
-	int candleY[] = {158, 172, 186};
-	int candleX[] = {14, 19, 24};
-	int pianistX[] = {1, 91, 61, 31, 91, 31, 1, 61, 31};
-	int drunkX[] = {1, 42, 83, 124, 165, 206, 247, 1};
 	int difference;
 
 	copyBackground(123, candleY[actorFrames[kFrameCandles]], 142, 14, 39, 13, drawSurface3, screenSurface);
@@ -1358,7 +1354,6 @@
 }
 
 void DrasculaEngine::update_60_pre() {
-	int candleY[] = {158, 172, 186};
 	int difference;
 
 	if (flags[5] == 0)
@@ -1389,10 +1384,6 @@
 }
 
 void DrasculaEngine::update_62_pre() {
-	int candleY[] = { 158, 172, 186 };
-	int candleX[] = { 14, 19, 24 };
-	int pianistX[] = {1, 91, 61, 31, 91, 31, 1, 61, 31 };
-	int drunkX[] = {1, 42, 83, 124, 165, 206, 247, 1 };
 	int difference;
 
 	copyBackground(123, candleY[actorFrames[kFrameCandles]], 142, 14, 39, 13, drawSurface3, screenSurface);
@@ -1437,8 +1428,6 @@
 }
 
 void DrasculaEngine::update_62() {
-	int drunkX[] = { 1, 42, 83, 124, 165, 206, 247, 1 };
-
 	copyRect(1, 1, 0, 0, 62, 142, drawSurface2, screenSurface);
 
 	if (curY + curHeight < 89) {

Modified: scummvm/trunk/engines/drascula/staticdata.h
===================================================================
--- scummvm/trunk/engines/drascula/staticdata.h	2008-06-06 17:58:08 UTC (rev 32579)
+++ scummvm/trunk/engines/drascula/staticdata.h	2008-06-06 18:28:50 UTC (rev 32580)
@@ -122,9 +122,12 @@
 						40, 80, 120, 160, 200, 240, 0};
 const int y1d_menu[] = {0, 0, 0, 0, 0, 0, 0, 25, 25, 25, 25, 25, 25, 25,
 						50, 50, 50, 50, 50, 50, 50, 75, 75, 75, 75, 75, 75, 75, 100};
-int frame_x[20]		 = {43, 87, 130, 173, 216, 259};
+int frameX[20]		 = {43, 87, 130, 173, 216, 259};
+int candleX[]		 = {14, 19, 24};
+int candleY[]		 = {158, 172, 186};
+int pianistX[]		 = {1, 91, 61, 31, 91, 31, 1, 61, 31};
+int drunkX[]		 = {1, 42, 83, 124, 165, 206, 247, 1};
 
-
 const RoomUpdate roomPreUpdates[] = {
 	// room		flag	val		x1		y1		x2		y2		width	height	type
 	{  3,		 3,		1,		258,	110,	 85,	 44,	 23,	53,		0	},


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