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

eriktorbjorn at users.sourceforge.net eriktorbjorn at users.sourceforge.net
Fri Jul 27 19:50:26 CEST 2007


Revision: 28242
          http://scummvm.svn.sourceforge.net/scummvm/?rev=28242&view=rev
Author:   eriktorbjorn
Date:     2007-07-27 10:50:25 -0700 (Fri, 27 Jul 2007)

Log Message:
-----------
Disabled another bunch of warnings. This turned up two places - print_abc_opc()
and print_abc() - where we would try to modify a string constant. I have
disabled this for now, and added FIXME comments.

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	2007-07-27 17:24:22 UTC (rev 28241)
+++ scummvm/trunk/engines/drascula/drascula.cpp	2007-07-27 17:50:25 UTC (rev 28242)
@@ -1180,7 +1180,7 @@
 	sin_verbo();
 }
 
-void DrasculaEngine::carga_escoba(char nom_fich[13]) {
+void DrasculaEngine::carga_escoba(const char *nom_fich) {
 	int l, obj_salir; 
 	float chiquez, pequegnez = 0;
 	char para_codificar[13];
@@ -1700,13 +1700,16 @@
 	hay_seleccion = 0;
 }
 
-void DrasculaEngine::print_abc(char dicho[], int x_pantalla, int y_pantalla) {
+void DrasculaEngine::print_abc(const char *dicho, int x_pantalla, int y_pantalla) {
 	int pos_texto[8];
 	int i, y_de_letra = 0, x_de_letra = 0, h, longitud;
 	longitud = strlen(dicho);
 
+	// FIXME: We can't do this on read-only strings!
+#if 0
 	for (i = 0; dicho[i]; i++)
 		dicho[i] = toupper(dicho[i]);
+#endif
 
 	for (h = 0; h < longitud; h++) {
 		y_de_letra = Y_ABC;
@@ -1988,7 +1991,7 @@
 	descomprime_dibujo(dir_dibujo1, MEDIA);
 }
 
-void DrasculaEngine::fliplay(char filefli[], int vel) {
+void DrasculaEngine::fliplay(const char *filefli, int vel) {
 	return;
 	// TODO
 	OpenSSN(filefli, vel);
@@ -2149,7 +2152,7 @@
 	}
 }
 
-void DrasculaEngine::comienza_sound(char fichero[]) {
+void DrasculaEngine::comienza_sound(const char *fichero) {
 	if (hay_sb == 1) { 
 		if ((sku = fopen(fichero, "rb")) == NULL)  {
 			error("no puedo abrir archivo de voz");
@@ -2160,7 +2163,7 @@
 	ctvd_output(sku);
 }
 
-void DrasculaEngine::anima(char animacion[], int FPS) {
+void DrasculaEngine::anima(const char *animacion, int FPS) {
 	Common::File FileIn;
 	unsigned Org = 0, Des = 0, j, TotDes = 0;
 	int NFrames = 1, New = 1;
@@ -2251,7 +2254,7 @@
 	}
 }
 
-void DrasculaEngine::habla_dr_grande(char dicho[], char filename[]) {
+void DrasculaEngine::habla_dr_grande(const char *dicho, const char *filename) {
 	int tiempou;
 	long tiempol;
 	int x_habla[4] = {47, 93, 139, 185};
@@ -2364,7 +2367,7 @@
 	DIBUJA_BLOQUE_CUT(pos_bj, dir_dibujo3, dir_zona_pantalla);
 }
 
-void DrasculaEngine::habla_igor_dch(char dicho[], char filename[]) {
+void DrasculaEngine::habla_igor_dch(const char *dicho, const char *filename) {
 	int tiempou;
 	long tiempol;
 
@@ -2439,7 +2442,7 @@
 	VUELCA_PANTALLA(0, 0, 0, 0, 320, 200, dir_zona_pantalla);
 }
 
-void DrasculaEngine::habla_dr_izq(char dicho[], char filename[]) {
+void DrasculaEngine::habla_dr_izq(const char *dicho, const char *filename) {
 	int tiempou;
 	long tiempol;
 
@@ -2514,7 +2517,7 @@
 	VUELCA_PANTALLA(0, 0, 0, 0, 320, 200, dir_zona_pantalla);
 }
 
-void DrasculaEngine::habla_dr_dch(char dicho[], char filename[]) {
+void DrasculaEngine::habla_dr_dch(const char *dicho, const char *filename) {
 	int tiempou;
 	long tiempol;
 
@@ -2589,7 +2592,7 @@
 	VUELCA_PANTALLA(0, 0, 0, 0, 320, 200, dir_zona_pantalla);
 }
 
-void DrasculaEngine::habla_solo(char dicho[], char filename[]) {
+void DrasculaEngine::habla_solo(const char *dicho, const char *filename) {
 	int tiempou;
 	long tiempol;
 
@@ -2636,7 +2639,7 @@
 	}
 }
 
-void DrasculaEngine::habla_igor_frente(char dicho[], char filename[]) {
+void DrasculaEngine::habla_igor_frente(const char *dicho, const char *filename) {
 	int tiempou;
 	long tiempol;
 
@@ -2815,7 +2818,7 @@
 	}
 }
 
-void DrasculaEngine::habla_bj(char dicho[], char filename[]) {
+void DrasculaEngine::habla_bj(const char *dicho, const char *filename) {
 	int tiempou;
 	long tiempol;
 
@@ -3043,7 +3046,7 @@
 	actualiza_refresco();
 }
 
-void DrasculaEngine::carga_partida(char nom_game[]) {
+void DrasculaEngine::carga_partida(const char *nom_game) {
 	int l, n_ejec2;
 
 	canal_p(nom_game);
@@ -3078,7 +3081,7 @@
 	canal_p(nom_game);
 }
 
-void DrasculaEngine::canal_p(char fich[13]){
+void DrasculaEngine::canal_p(const char *fich){
 	Common::File ald2, ald3;
 
 	char fich2[13];
@@ -3608,7 +3611,7 @@
 	return 1;
 }
 
-void DrasculaEngine::OpenSSN(char *Name, int Pause) {
+void DrasculaEngine::OpenSSN(const char *Name, int Pause) {
 	MiVideoSSN = (char *)malloc(64256);
 	GlobalSpeed = CLOCKS_PER_SEC / Pause;
 	FrameSSN = 0;
@@ -4423,13 +4426,16 @@
 	descomprime_dibujo(dir_hare_dch, 1);
 }
 
-void DrasculaEngine::print_abc_opc(char dicho[],int x_pantalla, int y_pantalla, int juego) {
+void DrasculaEngine::print_abc_opc(const char *dicho, int x_pantalla, int y_pantalla, int juego) {
 	int pos_texto[6];
 	int i, y_de_signos, y_de_letra, x_de_letra = 0, h, longitud;
 	longitud = strlen(dicho);
 
+	// FIXME: We can't do this on read-only strings!
+#if 0
 	for (i = 0; dicho[i]; i++)
 		dicho[i] = toupper(dicho[i]);
+#endif
 
 	for (h = 0; h < longitud; h++) {
 		if (juego == 1) {

Modified: scummvm/trunk/engines/drascula/drascula.h
===================================================================
--- scummvm/trunk/engines/drascula/drascula.h	2007-07-27 17:24:22 UTC (rev 28241)
+++ scummvm/trunk/engines/drascula/drascula.h	2007-07-27 17:50:25 UTC (rev 28242)
@@ -472,7 +472,7 @@
 	void animacion_2();
 	void sin_verbo();
 	void para_cargar(char[]);
-	void carga_escoba(char[]);
+	void carga_escoba(const char *);
 	void borra_pantalla();
 	void lleva_al_hare(int, int);
 	void mueve_cursor();
@@ -486,7 +486,7 @@
 	void elige_verbo(int);
 	void mesa();
 	void saves();
-	void print_abc(char[], int, int);
+	void print_abc(const char *, int, int);
 	void delay(int ms);
 	void confirma_go();
 	void confirma_salir();
@@ -494,36 +494,36 @@
 	void elige_objeto(int objeto);
 	void suma_objeto(int);
 	int resta_objeto(int osj);
-	void fliplay(char filefli[], int vel);
+	void fliplay(const char *filefli, int vel);
 	void FundeDelNegro(int VelocidadDeFundido);
 	char LimitaVGA(char valor);
 	void color_abc(int cl);
 	void centra_texto(const char *,int,int);
-	void comienza_sound(char[]);
-	void anima(char animacion[], int FPS);
+	void comienza_sound(const char *);
+	void anima(const char *animacion, int FPS);
 	void fin_sound_corte();
 	void FundeAlNegro(int VelocidadDeFundido);
 	void pausa(int);
-	void habla_dr_grande(char dicho[], char filename[]);
+	void habla_dr_grande(const char *dicho, const char *filename);
 	void pon_igor();
 	void pon_bj();
 	void pon_dr();
-	void habla_igor_dch(char dicho[], char filename[]);
-	void habla_dr_dch(char dicho[], char filename[]);
-	void habla_dr_izq(char dicho[], char filename[]);
-	void habla_solo(char[], char[]);
-	void habla_igor_frente(char[], char[]);
+	void habla_igor_dch(const char *dicho, const char *filename);
+	void habla_dr_dch(const char *dicho, const char *filename);
+	void habla_dr_izq(const char *dicho, const char *filename);
+	void habla_solo(const char *, const char *);
+	void habla_igor_frente(const char *, const char *);
 	void habla_tabernero(const char *dicho, const char *filename);
 	void hipo(int);
 	void fin_sound();
-	void habla_bj(char[], char[]);
+	void habla_bj(const char *, const char *);
 	void hablar(const char *, const char *);
 	void playmusic(int p);
 	void stopmusic();
 	int music_status();
 	void refresca_pantalla();
-	void carga_partida(char[]);
-	void canal_p(char[]);
+	void carga_partida(const char *);
+	void canal_p(const char *);
 	void puertas_cerradas(int);
 	void animafin_sound_corte();
 	void color_hare();
@@ -546,7 +546,7 @@
 	void introduce_nombre();
 	void para_grabar(char[]);
 	int LookForFree();
-	void OpenSSN(char *Name,int Pause);
+	void OpenSSN(const char *Name,int Pause);
 	void WaitFrameSSN();
 	void MixVideo(char *OldScreen,char *NewScreen);
 	void Des_RLE(char *BufferRLE, char *MiVideoRLE);
@@ -601,7 +601,7 @@
 	void conversa(const char *);
 	void animacion_3();
 	void animacion_4();
-	void print_abc_opc(char[], int, int, int);
+	void print_abc_opc(const char *, int, int, int);
 	void responde(int);
 	void habla_borracho(const char *dicho, const char *filename);
 	void habla_pianista(const char *dicho, const char *filename);


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