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

aquadran at users.sourceforge.net aquadran at users.sourceforge.net
Thu Feb 28 23:53:51 CET 2008


Revision: 30994
          http://scummvm.svn.sourceforge.net/scummvm/?rev=30994&view=rev
Author:   aquadran
Date:     2008-02-28 14:53:51 -0800 (Thu, 28 Feb 2008)

Log Message:
-----------
get rid canal_p really silly code (that was encode/decode game data !)

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

Modified: scummvm/trunk/engines/drascula/drascula.cpp
===================================================================
--- scummvm/trunk/engines/drascula/drascula.cpp	2008-02-28 22:08:40 UTC (rev 30993)
+++ scummvm/trunk/engines/drascula/drascula.cpp	2008-02-28 22:53:51 UTC (rev 30994)
@@ -1410,13 +1410,13 @@
 }
 
 static char *getLine(Common::File *fp, char *buf, int len) {
-	int c;
+	byte c;
 	char *b;
 
 	for (;;) {
 		b = buf;
 		while (!fp->eos()) {
-			c = fp->readByte() ^ 0xff;
+			c = ~fp->readByte();
 			if (c == '\r')
 				continue;
 			if (c == '\n')
@@ -1444,7 +1444,6 @@
 	hay_nombre = 0;
 
 	strcpy(para_codificar, nom_fich);
-	canal_p(para_codificar);
 	strcpy(datos_actuales, nom_fich);
 
 	buffer_teclado();
@@ -1455,7 +1454,6 @@
 		error("missing data file");
 	}
 	int size = ald->size();
-
 	getLine(ald, buffer, size);
 	sscanf(buffer, "%s", num_room);
 	strcat(num_room, ".alg");
@@ -1561,7 +1559,6 @@
 	}
 	delete ald;
 	ald = NULL;
-	canal_p(para_codificar);
 
 	if (num_ejec == 2) {
 		if (martin == 0) {
@@ -3461,14 +3458,12 @@
 	int l, n_ejec2;
 	Common::InSaveFile *sav;
 
-	canal_p(nom_game);
-	if (!(sav = _saveFileMan->openForLoading("nom_game"))) {
+	if (!(sav = _saveFileMan->openForLoading(nom_game))) {
 		error("missing savegame file");
 	}
 
 	n_ejec2 = sav->readSint32LE();
 	if (n_ejec2 != num_ejec) {
-		canal_p(nom_game);
 		strcpy(nom_partida, nom_game);
 		error("TODO");
 		salir_al_dos(n_ejec2);
@@ -3488,43 +3483,8 @@
 
 	lleva_objeto = sav->readSint32LE();
 	objeto_que_lleva = sav->readSint32LE();
-
-	canal_p(nom_game);
 }
 
-void DrasculaEngine::canal_p(const char *fich){
-	return;
-	// TODO
-
-	Common::File ald2, ald3;
-
-	char fich2[13];
-	char car;
-
-	strcpy(fich2, "top");
-
-	ald3.open(fich);
-	if (!ald3.isOpen()) {
-		error("no puedo abrir el archivo codificado");
-	}
-
-	ald2.open(fich2, Common::File::kFileWriteMode);
-	if (!ald2.isOpen()) {
-		error("no puedo abrir el archivo destino");
-	}
-
-	car = ald3.readByte();
-	while (!ald3.eos()) {
-		ald2.writeByte(codifica(car));
-		car = ald3.readByte();
-	}
-
-	ald2.close();
-	ald3.close();
-	//remove(fich);	// FIXME: Not portable
-	//rename(fich2, fich);	// FIXME: Not portable
-}
-
 void DrasculaEngine::puertas_cerradas(int l) {
 	if (num_ejec == 1 || num_ejec == 3 || num_ejec == 5 || num_ejec == 6)
 		return;
@@ -5177,7 +5137,6 @@
 		warning("Can't write file '%s'. (Disk full?)", nom_game);
 
 	delete out;
-	canal_p(nom_game);
 }
 
 void DrasculaEngine::aumenta_num_frame() {
@@ -5450,7 +5409,6 @@
 	rompo_y_salgo = 0;
 
 	strcpy(para_codificar, nom_fich);
-	canal_p(para_codificar);
 
 	if (num_ejec == 5)
 		sin_verbo();
@@ -5486,7 +5444,6 @@
 	sscanf(buffer, "%d", &respuesta3);
 	delete ald;
 	ald = NULL;
-	canal_p(para_codificar);
 
 	if (num_ejec == 2 && !strcmp(nom_fich, "op_5.cal") && flags[38] == 1 && flags[33] == 1) {
 		strcpy(frase3, TEXT405);

Modified: scummvm/trunk/engines/drascula/drascula.h
===================================================================
--- scummvm/trunk/engines/drascula/drascula.h	2008-02-28 22:08:40 UTC (rev 30993)
+++ scummvm/trunk/engines/drascula/drascula.h	2008-02-28 22:53:51 UTC (rev 30994)
@@ -625,7 +625,6 @@
 	int music_status();
 	void refresca_pantalla();
 	void carga_partida(const char *);
-	void canal_p(const char *);
 	void puertas_cerradas(int);
 	void animafin_sound_corte();
 	void color_hare();


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