[Scummvm-cvs-logs] CVS: scummvm/simon items.cpp,1.97,1.98 simon.cpp,1.319,1.320 simon.h,1.94,1.95 vga.cpp,1.84,1.85
Travis Howell
kirben at users.sourceforge.net
Tue Oct 21 10:28:18 CEST 2003
Update of /cvsroot/scummvm/scummvm/simon
In directory sc8-pr-cvs1:/tmp/cvs-serv2987/simon
Modified Files:
items.cpp simon.cpp simon.h vga.cpp
Log Message:
Correctly reanem var this time.
Index: items.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/simon/items.cpp,v
retrieving revision 1.97
retrieving revision 1.98
diff -u -d -r1.97 -r1.98
--- items.cpp 21 Oct 2003 10:34:56 -0000 1.97
+++ items.cpp 21 Oct 2003 11:41:33 -0000 1.98
@@ -527,20 +527,20 @@
case 98:{ /* start vga */
if (!(_game & GF_SIMON2)) {
- uint b = getVarOrWord();
- uint c = getVarOrByte();
- uint d = getVarOrWord();
- uint e = getVarOrWord();
- uint f = getVarOrWord();
- start_vga_code(c, b / 100, b, d, e, f);
+ uint vga_sprite_id = getVarOrWord();
+ uint b = getVarOrByte();
+ uint x = getVarOrWord();
+ uint y = getVarOrWord();
+ uint base_color = getVarOrWord();
+ start_vga_code(b, vga_sprite_id / 100, vga_sprite_id, x, y, base_color);
} else {
- uint a = getVarOrWord();
- uint b = getVarOrWord();
- uint c = getVarOrByte();
- uint d = getVarOrWord();
- uint e = getVarOrWord();
- uint f = getVarOrWord();
- start_vga_code(c, a, b, d, e, f);
+ uint vga_res = getVarOrWord();
+ uint vga_sprite_id = getVarOrWord();
+ uint b = getVarOrByte();
+ uint x = getVarOrWord();
+ uint y = getVarOrWord();
+ uint base_color = getVarOrWord();
+ start_vga_code(b, vga_res, vga_sprite_id, x, y, base_color);
}
}
break;
@@ -726,9 +726,9 @@
break;
case 130:{ /* set script cond */
- uint a = getVarOrByte();
+ uint var = getVarOrByte();
getNextWord();
- if (a == 1)
+ if (var == 1)
_script_cond_b = getNextWord();
else
_script_cond_c = getNextWord();
Index: simon.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/simon/simon.cpp,v
retrieving revision 1.319
retrieving revision 1.320
diff -u -d -r1.319 -r1.320
--- simon.cpp 21 Oct 2003 10:14:42 -0000 1.319
+++ simon.cpp 21 Oct 2003 11:41:33 -0000 1.320
@@ -2111,7 +2111,7 @@
}
void SimonEngine::o_print_str() {
- uint vga_struct_id = getVarOrByte();
+ uint vga_sprite_id = getVarOrByte();
uint color = getVarOrByte();
uint string_id = getNextStringID();
const byte *string_ptr = NULL;
@@ -2127,26 +2127,26 @@
string_ptr = getStringPtrByID(string_id);
}
- tv = getThreeValues(vga_struct_id);
+ tv = getThreeValues(vga_sprite_id);
if ((_game & GF_SIMON2) && (_game & GF_TALKIE)) {
- if (speech_id != 0 && vga_struct_id == 1 && (_language == 20 || !_subtitles))
- talk_with_speech(speech_id, vga_struct_id);
+ if (speech_id != 0 && vga_sprite_id == 1 && (_language == 20 || !_subtitles))
+ talk_with_speech(speech_id, vga_sprite_id);
if ((_game & GF_TALKIE) && (speech_id == 0))
- o_kill_sprite_simon2(2, vga_struct_id + 2);
+ o_kill_sprite_simon2(2, vga_sprite_id + 2);
if (string_ptr != NULL && (speech_id == 0 || _subtitles))
- talk_with_text(vga_struct_id, color, (const char *)string_ptr, tv->a, tv->b, tv->c);
+ talk_with_text(vga_sprite_id, color, (const char *)string_ptr, tv->a, tv->b, tv->c);
} else if (_game & GF_TALKIE) {
if (speech_id != 0)
- talk_with_speech(speech_id, vga_struct_id);
+ talk_with_speech(speech_id, vga_sprite_id);
if (string_ptr != NULL && (speech_id == 0 || _subtitles))
- talk_with_text(vga_struct_id, color, (const char *)string_ptr, tv->a, tv->b, tv->c);
+ talk_with_text(vga_sprite_id, color, (const char *)string_ptr, tv->a, tv->b, tv->c);
} else {
- talk_with_text(vga_struct_id, color, (const char *)string_ptr, tv->a, tv->b, tv->c);
+ talk_with_text(vga_sprite_id, color, (const char *)string_ptr, tv->a, tv->b, tv->c);
}
@@ -3849,7 +3849,7 @@
fcs->mode = 0;
}
-void SimonEngine::start_vga_code(uint b, uint vga_res, uint vga_struct_id, uint c, uint d, uint f) {
+void SimonEngine::start_vga_code(uint b, uint vga_res, uint vga_sprite_id, uint x, uint y, uint base_color) {
VgaSprite *vsp;
VgaPointersEntry *vpe;
byte *p, *pp;
@@ -3857,7 +3857,7 @@
_lock_word |= 0x40;
- if (has_vgastruct_with_id(vga_struct_id, vga_res)) {
+ if (has_vgastruct_with_id(vga_sprite_id, vga_res)) {
_lock_word &= ~0x40;
return;
}
@@ -3870,11 +3870,11 @@
vsp->priority = 0;
vsp->unk4 = 0;
- vsp->y = d;
- vsp->x = c;
+ vsp->y = y;
+ vsp->x = x;
vsp->image = 0;
- vsp->base_color = f;
- vsp->id = vga_struct_id;
+ vsp->base_color = base_color;
+ vsp->id = vga_sprite_id;
vsp->unk7 = vga_res;
for (;;) {
@@ -3893,11 +3893,11 @@
p = pp + READ_BE_UINT16(&((VgaFile1Header2 *) p)->id_table);
for (;;) {
- if (READ_BE_UINT16(&((VgaFile1Struct0x6 *) p)->id) == vga_struct_id) {
+ if (READ_BE_UINT16(&((VgaFile1Struct0x6 *) p)->id) == vga_sprite_id) {
- //dump_vga_script(pp + READ_BE_UINT16(&((VgaFile1Struct0x6*)p)->script_offs), vga_res, vga_struct_id);
+ //dump_vga_script(pp + READ_BE_UINT16(&((VgaFile1Struct0x6*)p)->script_offs), vga_res, vga_sprite_id);
- add_vga_timer(gss->VGA_DELAY_BASE, pp + READ_BE_UINT16(&((VgaFile1Struct0x6 *) p)->script_offs), vga_struct_id, vga_res);
+ add_vga_timer(gss->VGA_DELAY_BASE, pp + READ_BE_UINT16(&((VgaFile1Struct0x6 *) p)->script_offs), vga_sprite_id, vga_res);
break;
}
p += sizeof(VgaFile1Struct0x6);
@@ -3910,7 +3910,7 @@
_lock_word &= ~0x40;
}
-void SimonEngine::talk_with_speech(uint speech_id, uint vga_struct_id) {
+void SimonEngine::talk_with_speech(uint speech_id, uint vga_sprite_id) {
if (!(_game & GF_SIMON2)) {
if (speech_id == 9999) {
if (_subtitles)
@@ -3928,9 +3928,9 @@
o_wait_for_vga(204);
o_kill_sprite_simon1(204);
}
- o_kill_sprite_simon1(vga_struct_id + 201);
+ o_kill_sprite_simon1(vga_sprite_id + 201);
_sound->playVoice(speech_id);
- start_vga_code(4, 2, vga_struct_id + 201, 0, 0, 0);
+ start_vga_code(4, 2, vga_sprite_id + 201, 0, 0, 0);
}
} else {
if (speech_id == 0xFFFF) {
@@ -3949,14 +3949,14 @@
o_wait_for_vga(205);
o_kill_sprite_simon2(2, 5);
}
- o_kill_sprite_simon2(2, vga_struct_id + 2);
+ o_kill_sprite_simon2(2, vga_sprite_id + 2);
_sound->playVoice(speech_id);
- start_vga_code(4, 2, vga_struct_id + 2, 0, 0, 0);
+ start_vga_code(4, 2, vga_sprite_id + 2, 0, 0, 0);
}
}
}
-void SimonEngine::talk_with_text(uint vga_struct_id, uint color, const char *string_ptr, uint threeval_a, int threeval_b, uint width) {
+void SimonEngine::talk_with_text(uint vga_sprite_id, uint color, const char *string_ptr, uint threeval_a, int threeval_b, uint width) {
char print_str_buf[0x140];
char *char_buf;
const char *string_ptr_2, *string_ptr_3;
@@ -3966,8 +3966,8 @@
uint height;
// FIXME: Simon1dos Dwarf Mine - Fix text for dwarf song
- if (vga_struct_id >= 100)
- vga_struct_id -= 100;
+ if (vga_sprite_id >= 100)
+ vga_sprite_id -= 100;
char_buf = print_str_buf;
string_ptr_3 = string_ptr_2 = string_ptr;
@@ -4197,13 +4197,13 @@
strcpy(char_buf, string_ptr_2);
if (!(_game & GF_SIMON2)) {
- o_kill_sprite_simon1(199 + vga_struct_id);
+ o_kill_sprite_simon1(199 + vga_sprite_id);
} else {
- o_kill_sprite_simon2(2, vga_struct_id);
+ o_kill_sprite_simon2(2, vga_sprite_id);
}
color = color * 3 + 192;
- render_string(vga_struct_id, color, width, height, print_str_buf);
+ render_string(vga_sprite_id, color, width, height, print_str_buf);
num_of_rows = 4;
if (!(_bit_array[8] & 0x20))
num_of_rows = 3;
@@ -4212,9 +4212,9 @@
threeval_b = 2;
if (!(_game & GF_SIMON2)) {
- start_vga_code(num_of_rows, 2, 199 + vga_struct_id, threeval_a >> 3, threeval_b, 12);
+ start_vga_code(num_of_rows, 2, 199 + vga_sprite_id, threeval_a >> 3, threeval_b, 12);
} else {
- start_vga_code(num_of_rows, 2, vga_struct_id, threeval_a >> 3, threeval_b, 12);
+ start_vga_code(num_of_rows, 2, vga_sprite_id, threeval_a >> 3, threeval_b, 12);
}
}
Index: simon.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/simon/simon.h,v
retrieving revision 1.94
retrieving revision 1.95
diff -u -d -r1.94 -r1.95
--- simon.h 21 Oct 2003 10:14:42 -0000 1.94
+++ simon.h 21 Oct 2003 11:41:33 -0000 1.95
@@ -566,13 +566,13 @@
void handle_verb_clicked(uint verb);
void o_set_video_mode(uint mode, uint vga_res);
- void set_video_mode(uint a, uint b);
+ void set_video_mode(uint mode, uint vga_res_id);
void set_video_mode_internal(uint mode, uint vga_res_id);
void ensureVgaResLoadedC(uint vga_res);
void ensureVgaResLoaded(uint vga_res);
- void start_vga_code(uint b, uint vga_res, uint vga_struct_id, uint c, uint d, uint f);
+ void start_vga_code(uint b, uint vga_res, uint vga_struct_id, uint x, uint y, uint base_color);
void o_unk26_helper(uint a, uint b, uint c, uint d, uint e, uint f, uint g, uint h);
void talk_with_speech(uint speech_id, uint vga_struct_id);
void talk_with_text(uint vga_struct_id, uint color, const char *string_ptr, uint threeval_a, int threeval_b, uint width);
Index: vga.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/simon/vga.cpp,v
retrieving revision 1.84
retrieving revision 1.85
diff -u -d -r1.84 -r1.85
--- vga.cpp 21 Oct 2003 10:34:56 -0000 1.84
+++ vga.cpp 21 Oct 2003 11:41:33 -0000 1.85
@@ -267,7 +267,7 @@
}
void SimonEngine::vc_3_new_sprite() {
- uint16 a, f, base_color, x, y, vga_struct_id;
+ uint16 a, f, base_color, x, y, vga_sprite_id;
uint16 res;
VgaSprite *vsp;
VgaPointersEntry *vpe;
@@ -278,10 +278,10 @@
if (_game & GF_SIMON2) {
f = vc_read_next_word(); /* 0 */
- vga_struct_id = vc_read_next_word(); /* 2 */
+ vga_sprite_id = vc_read_next_word(); /* 2 */
} else {
- vga_struct_id = vc_read_next_word(); /* 2 */
- f = vga_struct_id / 100;
+ vga_sprite_id = vc_read_next_word(); /* 2 */
+ f = vga_sprite_id / 100;
}
x = vc_read_next_word(); /* 4 */
@@ -289,7 +289,7 @@
base_color = vc_read_next_word(); /* 8 */
/* 2nd param ignored with simon1 */
- if (has_vgastruct_with_id(vga_struct_id, f))
+ if (has_vgastruct_with_id(vga_sprite_id, f))
return;
vsp = _vga_sprites;
@@ -303,7 +303,7 @@
vsp->image = 0;
vsp->x = x;
vsp->y = y;
- vsp->id = vga_struct_id;
+ vsp->id = vga_sprite_id;
vsp->unk7 = res = f;
old_file_1 = _cur_vga_file_1;
@@ -324,7 +324,7 @@
p = pp + READ_BE_UINT16(&((VgaFile1Header *) pp)->hdr2_start);
p = pp + READ_BE_UINT16(&((VgaFile1Header2 *) p)->id_table);
- while (READ_BE_UINT16(&((VgaFile1Struct0x6 *) p)->id) != vga_struct_id)
+ while (READ_BE_UINT16(&((VgaFile1Struct0x6 *) p)->id) != vga_sprite_id)
p += sizeof(VgaFile1Struct0x6);
#ifdef DUMP_FILE_NR
@@ -347,9 +347,9 @@
}
#endif
- //dump_vga_script(_cur_vga_file_1 + READ_BE_UINT16(&((VgaFile1Struct0x6*)p)->script_offs), res, vga_struct_id);
+ //dump_vga_script(_cur_vga_file_1 + READ_BE_UINT16(&((VgaFile1Struct0x6*)p)->script_offs), res, vga_sprite_id);
- add_vga_timer(gss->VGA_DELAY_BASE, _cur_vga_file_1 + READ_BE_UINT16(&((VgaFile1Struct0x6 *) p)->script_offs), vga_struct_id, res);
+ add_vga_timer(gss->VGA_DELAY_BASE, _cur_vga_file_1 + READ_BE_UINT16(&((VgaFile1Struct0x6 *) p)->script_offs), vga_sprite_id, res);
_cur_vga_file_1 = old_file_1;
}
More information about the Scummvm-git-logs
mailing list