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

thebluegr at users.sourceforge.net thebluegr at users.sourceforge.net
Fri May 30 09:24:32 CEST 2008


Revision: 32377
          http://scummvm.svn.sourceforge.net/scummvm/?rev=32377&view=rev
Author:   thebluegr
Date:     2008-05-30 00:24:32 -0700 (Fri, 30 May 2008)

Log Message:
-----------
anima -> animate
leng -> dataSize, and removed it from the global variables (it's only used in animate())

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

Modified: scummvm/trunk/engines/drascula/animation.cpp
===================================================================
--- scummvm/trunk/engines/drascula/animation.cpp	2008-05-30 07:19:09 UTC (rev 32376)
+++ scummvm/trunk/engines/drascula/animation.cpp	2008-05-30 07:24:32 UTC (rev 32377)
@@ -84,10 +84,10 @@
 		playSound("s5.als");
 		if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE))
 			break;
-		if (anima("scr2.bin", 17))
+		if (animate("scr2.bin", 17))
 			break;
 		stopSound_corte();
-		if (anima("scr3.bin", 17))
+		if (animate("scr3.bin", 17))
 			break;
 		loadPic("cielo2.alg");
 		decompressPic(screenSurface, 256);
@@ -196,9 +196,9 @@
 		talk_dr_izq(3);
 		if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE))
 			break;
-		if (anima("lib.bin", 16))
+		if (animate("lib.bin", 16))
 			break;
-		if (anima("lib2.bin", 16))
+		if (animate("lib2.bin", 16))
 			break;
 		clearRoom();
 		color_solo = kColorRed;
@@ -215,7 +215,7 @@
 		talk_solo(_textd[_lang][5], "d5.als");
 		if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE))
 			break;
-		if (anima("lib2.bin", 16))
+		if (animate("lib2.bin", 16))
 			break;
 		clearRoom();
 		loadPic("plan2.alg");
@@ -225,7 +225,7 @@
 		talk_solo(_textd[_lang][6], "d6.als");
 		if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE))
 			break;
-		if (anima("lib2.bin", 16))
+		if (animate("lib2.bin", 16))
 			break;
 		clearRoom();
 		loadPic("plan3.alg");
@@ -263,16 +263,16 @@
 		talk_dr_izq(10);
 		if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE))
 			break;
-		if (anima("rayo1.bin", 16))
+		if (animate("rayo1.bin", 16))
 			break;
 		playSound("s5.als");
-		if (anima("rayo2.bin", 15))
+		if (animate("rayo2.bin", 15))
 			break;
-		if (anima("frel2.bin", 16))
+		if (animate("frel2.bin", 16))
 			break;
-		if (anima("frel.bin", 16))
+		if (animate("frel.bin", 16))
 			break;
-		if (anima("frel.bin", 16))
+		if (animate("frel.bin", 16))
 			break;
 		stopSound_corte();
 		clearRoom();
@@ -445,7 +445,7 @@
 		if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE))
 			break;
 
-		if (anima("ag.bin", 14))
+		if (animate("ag.bin", 14))
 			break;
 
 		if (_lang == kSpanish)
@@ -533,7 +533,7 @@
 		if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE))
 			break;
 
-		if (anima("lev.bin", 15))
+		if (animate("lev.bin", 15))
 			break;
 
 		lleva_al_hare(100 + ancho_hare / 2, 99 + alto_hare);
@@ -560,9 +560,9 @@
 		talk(221);
 		talk_bj(10);
 		talk(222);
-		if (anima("gaf.bin", 15))
+		if (animate("gaf.bin", 15))
 			break;
-		if (anima("bjb.bin", 14))
+		if (animate("bjb.bin", 14))
 			break;
 		playMusic(9);
 		loadPic("97.alg");
@@ -610,10 +610,10 @@
 		lleva_al_hare(157, 98 + alto_hare);
 		if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE))
 			break;
-		if (anima("bes.bin", 16))
+		if (animate("bes.bin", 16))
 			break;
 		playMusic(11);
-		if (anima("rap.bin", 16))
+		if (animate("rap.bin", 16))
 			break;
 		sentido_hare = 3;
 		// The room number was originally changed here to "no_bj.alg",
@@ -2077,9 +2077,9 @@
 	updateRoom();
 	updateScreen(0, 0, 0, 0, 320, 200, screenSurface);
 	pause(27);
-	anima("rayo1.bin", 23);
+	animate("rayo1.bin", 23);
 	playSound("s5.als");
-	anima("rayo2.bin", 17);
+	animate("rayo2.bin", 17);
 	sentido_hare = 1;
 	updateRoom();
 	updateScreen(0, 0, 0, 0, 320, 200, screenSurface);
@@ -2145,7 +2145,7 @@
 		updateScreen(0, 0, 0, 0, 320, 200, screenSurface);
 	}
 
-	anima("frel.bin", 16);
+	animate("frel.bin", 16);
 	clearRoom();
 	hare_claro();
 	updatePalette();
@@ -2283,7 +2283,7 @@
 	converse("op_11.cal");
 	talk_dr_dch(26);
 
-	anima("fum.bin", 15);
+	animate("fum.bin", 15);
 
 	talk_dr_dch(27);
 	talk(254);
@@ -2359,7 +2359,7 @@
 	pos_pen[4] = 18;
 	pos_pen[5] = 125;
 
-	anima("man.bin", 14);
+	animate("man.bin", 14);
 
 	for (n = -125; n <= 0; n = n + 2) {
 		copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface);
@@ -2377,7 +2377,7 @@
 }
 
 void DrasculaEngine::animation_6_6() {
-	anima("rct.bin", 11);
+	animate("rct.bin", 11);
 	clearRoom();
 	withoutVerb();
 	removeObject(20);
@@ -2396,7 +2396,7 @@
 	carga_escoba("58.ald");
 	hare_se_ve = 1;
 	sentido_hare = 1;
-	anima("hbp.bin", 14);
+	animate("hbp.bin", 14);
 
 	sentido_hare = 3;
 	flags[0] = 1;
@@ -2412,10 +2412,10 @@
 void DrasculaEngine::animation_9_6() {
 	int v_cd;
 
-	anima("fin.bin", 14);
+	animate("fin.bin", 14);
 	playMusic(13);
 	flags[5] = 1;
-	anima("drf.bin", 16);
+	animate("drf.bin", 16);
 	fadeToBlack(0);
 	clearRoom();
 	hare_x = -1;
@@ -2533,7 +2533,7 @@
 	flags[6] = 1;
 	withoutVerb();
 	removeObject(21);
-	anima("beb.bin", 10);
+	animate("beb.bin", 10);
 }
 
 void DrasculaEngine::animation_19_6() {
@@ -3439,7 +3439,7 @@
 	updateRoom();
 	updateScreen(0, 0, 0, 0, 320, 200, screenSurface);
 	delay(800);
-	anima("bio.bin", 14);
+	animate("bio.bin", 14);
 	flags[29] = 1;
 	hare_x = 95;
 	hare_y = 82;
@@ -3514,7 +3514,7 @@
 }
 
 void DrasculaEngine::animation_9_4() {
-	anima("st.bin", 14);
+	animate("st.bin", 14);
 	fadeToBlack(1);
 }
 

Modified: scummvm/trunk/engines/drascula/drascula.cpp
===================================================================
--- scummvm/trunk/engines/drascula/drascula.cpp	2008-05-30 07:19:09 UTC (rev 32376)
+++ scummvm/trunk/engines/drascula/drascula.cpp	2008-05-30 07:24:32 UTC (rev 32377)
@@ -184,7 +184,6 @@
 		term_int = 0;
 		musicStopped = 0;
 		hay_seleccion = 0;
-		Leng = 0;
 		UsingMem = 0;
 		globalSpeed = 0;
 		frame_blind = 0;
@@ -2039,11 +2038,12 @@
 	ctvd_output(sku);
 }
 
-bool DrasculaEngine::anima(const char *animation, int FPS) {
+bool DrasculaEngine::animate(const char *animation, int FPS) {
 	Common::File FileIn;
 	unsigned j;
 	int NFrames = 1;
 	int cnt = 2;
+	int dataSize = 0;
 
 	AuxBuffLast = (byte *)malloc(65000);
 	AuxBuffDes = (byte *)malloc(65000);
@@ -2055,9 +2055,9 @@
 	}
 
 	FileIn.read(&NFrames, sizeof(NFrames));
-	FileIn.read(&Leng, sizeof(Leng));
-	AuxBuffOrg = (byte *)malloc(Leng);
-	FileIn.read(AuxBuffOrg, Leng);
+	FileIn.read(&dataSize, sizeof(dataSize));
+	AuxBuffOrg = (byte *)malloc(dataSize);
+	FileIn.read(AuxBuffOrg, dataSize);
 	FileIn.read(cPal, 768);
 	loadPCX(AuxBuffOrg);
 	free(AuxBuffOrg);
@@ -2068,9 +2068,9 @@
 	memcpy(AuxBuffLast, AuxBuffDes, 64000);
 	WaitForNext(FPS);
 	while (cnt < NFrames) {
-		FileIn.read(&Leng, sizeof(Leng));
-		AuxBuffOrg = (byte *)malloc(Leng);
-		FileIn.read(AuxBuffOrg, Leng);
+		FileIn.read(&dataSize, sizeof(dataSize));
+		AuxBuffOrg = (byte *)malloc(dataSize);
+		FileIn.read(AuxBuffOrg, dataSize);
 		FileIn.read(cPal, 768);
 		loadPCX(AuxBuffOrg);
 		free(AuxBuffOrg);

Modified: scummvm/trunk/engines/drascula/drascula.h
===================================================================
--- scummvm/trunk/engines/drascula/drascula.h	2008-05-30 07:19:09 UTC (rev 32376)
+++ scummvm/trunk/engines/drascula/drascula.h	2008-05-30 07:24:32 UTC (rev 32377)
@@ -476,7 +476,7 @@
 	void color_abc(int cl);
 	void centerText(const char *,int,int);
 	void playSound(const char *);
-	bool anima(const char *animation, int FPS);
+	bool animate(const char *animation, int FPS);
 	void stopSound_corte();
 	void fadeToBlack(int VelocidadDeFundido);
 	void pause(int);
@@ -546,7 +546,6 @@
 	byte *AuxBuffOrg;
 	byte *AuxBuffLast;
 	byte *AuxBuffDes;
-	int Leng;
 
 	byte *pointer;
 	int UsingMem;

Modified: scummvm/trunk/engines/drascula/rooms.cpp
===================================================================
--- scummvm/trunk/engines/drascula/rooms.cpp	2008-05-30 07:19:09 UTC (rev 32376)
+++ scummvm/trunk/engines/drascula/rooms.cpp	2008-05-30 07:24:32 UTC (rev 32377)
@@ -747,7 +747,7 @@
 		visible[1] = 0;
 		flags[24] = 1;
 	} else if (pickedObject == 22 && fl == 52) {
-		anima("up.bin",14);
+		animate("up.bin",14);
 		flags[26]=1;
 		playSound("s1.als");
 		hiccup(14);
@@ -1105,7 +1105,7 @@
 		talk(_text[_lang][140], "140.als");
 	else if (fl == 206) {
 		playSound("s11.als");
-		anima("det.bin", 17);
+		animate("det.bin", 17);
 		stopSound();
 		lleva_al_hare(hare_x - 3, hare_y + alto_hare + 6);
 	} else
@@ -1242,7 +1242,7 @@
 		animation_9_6();
 		return true;
 	} else if (pickedObject == 9 && fl == 56 && flags[6] == 0) {
-		anima("cnf.bin", 14);
+		animate("cnf.bin", 14);
 		talk(_text[_lang][455], "455.als");
 	} else
 		hasAnswer = 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