[Scummvm-cvs-logs] CVS: scummvm/simon debug.cpp,1.16,1.17 simon.cpp,1.202,1.203 simon.h,1.65,1.66 vga.cpp,1.52,1.53

Max Horn fingolfin at users.sourceforge.net
Wed May 21 10:50:08 CEST 2003


Update of /cvsroot/scummvm/scummvm/simon
In directory sc8-pr-cvs1:/tmp/cvs-serv21497

Modified Files:
	debug.cpp simon.cpp simon.h vga.cpp 
Log Message:
pedantic warning fixes

Index: debug.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/simon/debug.cpp,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -d -r1.16 -r1.17
--- debug.cpp	17 May 2003 08:54:46 -0000	1.16
+++ debug.cpp	21 May 2003 17:49:31 -0000	1.17
@@ -347,7 +347,7 @@
 		}
 	}
 
-	dump_bmp(filename, w, h, b, (uint32 *)palette);
+	dump_bmp(filename, w, h, b, (const uint32 *)palette);
 	free(b);
 }
 

Index: simon.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/simon/simon.cpp,v
retrieving revision 1.202
retrieving revision 1.203
diff -u -d -r1.202 -r1.203
--- simon.cpp	21 May 2003 15:47:51 -0000	1.202
+++ simon.cpp	21 May 2003 17:49:33 -0000	1.203
@@ -1731,7 +1731,7 @@
 
 				x_ = (ha->width >> 1) - 4 + ha->x - (_x_scroll << 3);
 
-				if (x_ < 0 || x_ >= 0x137)
+				if (x_ >= 0x137)
 					continue;
 
 				dst = dx_lock_attached();
@@ -2042,7 +2042,7 @@
 		if (speech_id != 0 && !_subtitles) {
 			talk_with_speech(speech_id, num_1);
 		} else if (string_ptr != NULL) {
-			talk_with_text(num_1, num_2, (char *)string_ptr, tv->a, tv->b, tv->c);
+			talk_with_text(num_1, num_2, (const char *)string_ptr, tv->a, tv->b, tv->c);
 		}
 		break;
 
@@ -2050,7 +2050,7 @@
 	case GAME_SIMON1DOS:
 	case GAME_SIMON1AMIGA:
 	case GAME_SIMON2DOS:
-		talk_with_text(num_1, num_2, (char *)string_ptr, tv->a, tv->b, tv->c);
+		talk_with_text(num_1, num_2, (const char *)string_ptr, tv->a, tv->b, tv->c);
 		break;
 
 	case GAME_SIMON2TALKIE:
@@ -2065,7 +2065,7 @@
 		if (speech_id == 0)
 			o_kill_thread_simon2(2, num_1 + 2);
 
-		talk_with_text(num_1, num_2, (char *)string_ptr, tv->a, tv->b, tv->c);
+		talk_with_text(num_1, num_2, (const char *)string_ptr, tv->a, tv->b, tv->c);
 		break;
 	}
 }
@@ -5076,7 +5076,7 @@
 	} while (cur < start + amount);
 }
 
-bool SimonState::save_game(uint slot, const char *caption) {
+bool SimonState::save_game(uint slot, char *caption) {
 	File f;
 	uint item_index, num_item, i, j;
 	TimeEvent *te;
@@ -5093,7 +5093,7 @@
 		return false;
 	}
 
-	f.write((char*)caption, 0x12);
+	f.write(caption, 0x12);
 
 	f.writeUint32BE(_itemarray_inited - 1);
 	f.writeUint32BE(0xFFFFFFFF);

Index: simon.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/simon/simon.h,v
retrieving revision 1.65
retrieving revision 1.66
diff -u -d -r1.65 -r1.66
--- simon.h	21 May 2003 15:47:51 -0000	1.65
+++ simon.h	21 May 2003 17:49:33 -0000	1.66
@@ -759,7 +759,7 @@
 
 	Item *getNextItemPtrStrange();
 
-	bool save_game(uint slot, const char *caption);
+	bool save_game(uint slot, char *caption);
 	bool load_game(uint slot);
 
 	void showmessage_helper_2();

Index: vga.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/simon/vga.cpp,v
retrieving revision 1.52
retrieving revision 1.53
diff -u -d -r1.52 -r1.53
--- vga.cpp	21 May 2003 11:49:41 -0000	1.52
+++ vga.cpp	21 May 2003 17:49:33 -0000	1.53
@@ -26,7 +26,7 @@
 #include "simon/vga.h"
 
 typedef void (SimonState::*VgaOpcodeProc) ();
-static const uint16 vc_get_out_of_code = 0;
+static uint16 vc_get_out_of_code = 0;
 
 // Opcode tables
 static const VgaOpcodeProc vga_opcode_table[] = {
@@ -113,7 +113,7 @@
 		uint opcode;
 
 		if (_continous_vgascript) {
-			if ((void *)_vc_ptr != (void *)&vc_get_out_of_code) {
+			if (_vc_ptr != (byte *)&vc_get_out_of_code) {
 				fprintf(_dump_file, "%.5d %.5X: %5d %4d ", _vga_tick_counter, _vc_ptr - _cur_vga_file_1, _vga_cur_sprite_id, _vga_cur_file_id);
 				dump_video_script(_vc_ptr, true);
 			}





More information about the Scummvm-git-logs mailing list