aboutsummaryrefslogtreecommitdiff
path: root/simon
diff options
context:
space:
mode:
authorMax Horn2003-05-21 17:49:33 +0000
committerMax Horn2003-05-21 17:49:33 +0000
commit11d29b71ab4400e6e732ba7cd49a343150360eaf (patch)
tree79116a1533e76a44eb5b274f60afd454e9880741 /simon
parentc24df81f782a4d9c5651df3e2fe4bd302e1e4d5b (diff)
downloadscummvm-rg350-11d29b71ab4400e6e732ba7cd49a343150360eaf.tar.gz
scummvm-rg350-11d29b71ab4400e6e732ba7cd49a343150360eaf.tar.bz2
scummvm-rg350-11d29b71ab4400e6e732ba7cd49a343150360eaf.zip
pedantic warning fixes
svn-id: r7794
Diffstat (limited to 'simon')
-rw-r--r--simon/debug.cpp2
-rw-r--r--simon/simon.cpp12
-rw-r--r--simon/simon.h2
-rw-r--r--simon/vga.cpp4
4 files changed, 10 insertions, 10 deletions
diff --git a/simon/debug.cpp b/simon/debug.cpp
index 227587ed87..ffc978815d 100644
--- a/simon/debug.cpp
+++ b/simon/debug.cpp
@@ -347,7 +347,7 @@ void dump_bitmap(const char *filename, byte *offs, int w, int h, int flags, cons
}
}
- dump_bmp(filename, w, h, b, (uint32 *)palette);
+ dump_bmp(filename, w, h, b, (const uint32 *)palette);
free(b);
}
diff --git a/simon/simon.cpp b/simon/simon.cpp
index d120d7e6d8..347a973f8e 100644
--- a/simon/simon.cpp
+++ b/simon/simon.cpp
@@ -1731,7 +1731,7 @@ void SimonState::f10_key() {
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 @@ void SimonState::o_print_str() {
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 @@ void SimonState::o_print_str() {
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 @@ void SimonState::o_print_str() {
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 @@ void SimonState::delay(uint amount) {
} 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 @@ bool SimonState::save_game(uint slot, const char *caption) {
return false;
}
- f.write((char*)caption, 0x12);
+ f.write(caption, 0x12);
f.writeUint32BE(_itemarray_inited - 1);
f.writeUint32BE(0xFFFFFFFF);
diff --git a/simon/simon.h b/simon/simon.h
index c24922c777..063cfe1d37 100644
--- a/simon/simon.h
+++ b/simon/simon.h
@@ -759,7 +759,7 @@ public:
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();
diff --git a/simon/vga.cpp b/simon/vga.cpp
index 0c82c4acae..9ed6ad810b 100644
--- a/simon/vga.cpp
+++ b/simon/vga.cpp
@@ -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 @@ void SimonState::run_vga_script() {
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);
}