aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTravis Howell2003-10-21 10:14:42 +0000
committerTravis Howell2003-10-21 10:14:42 +0000
commit54fc5335c086a6f421fa116be7da2ecd74cf2e67 (patch)
treeb2b30aa402a7a922c34c6d2ce6bcdfb7d7e2e5da
parent87fb27d02c2cff934e0c1a00d0941156e8a77389 (diff)
downloadscummvm-rg350-54fc5335c086a6f421fa116be7da2ecd74cf2e67.tar.gz
scummvm-rg350-54fc5335c086a6f421fa116be7da2ecd74cf2e67.tar.bz2
scummvm-rg350-54fc5335c086a6f421fa116be7da2ecd74cf2e67.zip
Rename a few vars
svn-id: r10927
-rw-r--r--simon/charset.cpp10
-rw-r--r--simon/items.cpp54
-rw-r--r--simon/simon.cpp48
-rw-r--r--simon/simon.h6
4 files changed, 59 insertions, 59 deletions
diff --git a/simon/charset.cpp b/simon/charset.cpp
index 81fb8d81d0..9d5eba1f69 100644
--- a/simon/charset.cpp
+++ b/simon/charset.cpp
@@ -61,23 +61,23 @@ void SimonEngine::print_char_helper_6(uint i) {
}
}
-void SimonEngine::render_string(uint num_1, uint color, uint width, uint height, const char *txt) {
+void SimonEngine::render_string(uint vga_struct_id, uint color, uint width, uint height, const char *txt) {
VgaPointersEntry *vpe = &_vga_buffer_pointers[2];
byte *src, *dst, *p, *dst_org, chr;
uint count;
- if (num_1 >= 100) {
- num_1 -= 100;
+ if (vga_struct_id >= 100) {
+ vga_struct_id -= 100;
vpe++;
}
src = dst = vpe->vgaFile2;
count = 4000;
- if (num_1 == 1)
+ if (vga_struct_id == 1)
count *= 2;
- p = dst + num_1 * 8;
+ p = dst + vga_struct_id * 8;
*(uint16 *)(p + 4) = TO_BE_16(height);
*(uint16 *)(p + 6) = TO_BE_16(width);
diff --git a/simon/items.cpp b/simon/items.cpp
index a81e5e8456..841eb6da38 100644
--- a/simon/items.cpp
+++ b/simon/items.cpp
@@ -991,26 +991,26 @@ int SimonEngine::runScript() {
break;
case 179:{ /* conversation responses */
- uint b = getVarOrByte(); /* and room descriptions */
- uint c = getVarOrByte();
- uint a = getVarOrByte();
- uint d = 0;
+ uint vga_struct_id = getVarOrByte(); /* and room descriptions */
+ uint color = getVarOrByte();
+ uint string_id = getVarOrByte();
+ uint speech_id = 0;
- const char *s = (const char *)getStringPtrByID(_stringid_array_3[a]);
- ThreeValues *tv = getThreeValues(b);
+ const char *string_ptr = (const char *)getStringPtrByID(_stringid_array_3[string_id]);
+ ThreeValues *tv = getThreeValues(vga_struct_id);
if (_game & GF_TALKIE)
- d = _array_4[a];
+ speech_id = _array_4[string_id];
if (_game & GF_SIMON2) {
- if (d != 0 && (_language == 20 || !_subtitles))
- talk_with_speech(d, b);
- if (s != NULL && _subtitles)
- talk_with_text(b, c, s, tv->a, tv->b, tv->c);
+ if (speech_id != 0 && (_language == 20 || !_subtitles))
+ talk_with_speech(speech_id, vga_struct_id);
+ if (string_ptr != NULL && _subtitles)
+ talk_with_text(vga_struct_id, color, string_ptr, tv->a, tv->b, tv->c);
} else {
- if (d != 0)
- talk_with_speech(d, b);
- if (s != NULL && _subtitles)
- talk_with_text(b, c, s, tv->a, tv->b, tv->c);
+ if (speech_id != 0)
+ talk_with_speech(speech_id, vga_struct_id);
+ if (string_ptr != NULL && _subtitles)
+ talk_with_text(vga_struct_id, color, string_ptr, tv->a, tv->b, tv->c);
}
}
break;
@@ -1238,16 +1238,16 @@ bool SimonEngine::o_unk_23(uint a) {
}
void SimonEngine::o_inventory_descriptions() {
- uint a = getVarOrByte();
- uint b = getVarOrByte();
- const char *s = NULL;
+ uint vga_struct_id = getVarOrByte();
+ uint color = getVarOrByte();
+ const char *string_ptr = NULL;
ThreeValues *tv = NULL;
char buf[256];
Child2 *child = (Child2 *)findChildOfType(getNextItemPtr(), 2);
if (child != NULL && child->avail_props & 1) {
- s = (const char *)getStringPtrByID(child->array[0]);
- tv = getThreeValues(a);
+ string_ptr = (const char *)getStringPtrByID(child->array[0]);
+ tv = getThreeValues(vga_struct_id);
}
if ((_game & GF_SIMON2) && (_game & GF_TALKIE)) {
@@ -1299,26 +1299,26 @@ void SimonEngine::o_inventory_descriptions() {
}
if (_language == 20 || !_subtitles)
- talk_with_speech(var200, a);
+ talk_with_speech(var200, vga_struct_id);
}
} else if (_game & GF_TALKIE) {
if (child != NULL && child->avail_props & 0x200) {
uint offs = getOffsetOfChild2Param(child, 0x200);
- talk_with_speech(child->array[offs], a);
+ talk_with_speech(child->array[offs], vga_struct_id);
} else if (child != NULL && child->avail_props & 0x100) {
uint offs = getOffsetOfChild2Param(child, 0x100);
- talk_with_speech(child->array[offs] + 3550, a);
+ talk_with_speech(child->array[offs] + 3550, vga_struct_id);
}
}
if (child != NULL && (child->avail_props & 1) && _subtitles) {
if (child->avail_props & 0x100) {
- sprintf(buf, "%d%s", child->array[getOffsetOfChild2Param(child, 0x100)], s);
- s = buf;
+ sprintf(buf, "%d%s", child->array[getOffsetOfChild2Param(child, 0x100)], string_ptr);
+ string_ptr = buf;
}
- if (s != NULL)
- talk_with_text(a, b, s, tv->a, tv->b, tv->c);
+ if (string_ptr != NULL)
+ talk_with_text(vga_struct_id, color, string_ptr, tv->a, tv->b, tv->c);
}
}
diff --git a/simon/simon.cpp b/simon/simon.cpp
index 99e80c0c67..e2e2a2dd5a 100644
--- a/simon/simon.cpp
+++ b/simon/simon.cpp
@@ -2111,8 +2111,8 @@ ThreeValues *SimonEngine::getThreeValues(uint a) {
}
void SimonEngine::o_print_str() {
- uint num_1 = getVarOrByte();
- uint num_2 = getVarOrByte();
+ uint vga_struct_id = getVarOrByte();
+ uint color = getVarOrByte();
uint string_id = getNextStringID();
const byte *string_ptr = NULL;
uint speech_id = 0;
@@ -2127,26 +2127,26 @@ void SimonEngine::o_print_str() {
string_ptr = getStringPtrByID(string_id);
}
- tv = getThreeValues(num_1);
+ tv = getThreeValues(vga_struct_id);
if ((_game & GF_SIMON2) && (_game & GF_TALKIE)) {
- if (speech_id != 0 && num_1 == 1 && (_language == 20 || !_subtitles))
- talk_with_speech(speech_id, num_1);
+ if (speech_id != 0 && vga_struct_id == 1 && (_language == 20 || !_subtitles))
+ talk_with_speech(speech_id, vga_struct_id);
if ((_game & GF_TALKIE) && (speech_id == 0))
- o_kill_sprite_simon2(2, num_1 + 2);
+ o_kill_sprite_simon2(2, vga_struct_id + 2);
if (string_ptr != NULL && (speech_id == 0 || _subtitles))
- talk_with_text(num_1, num_2, (const char *)string_ptr, tv->a, tv->b, tv->c);
+ talk_with_text(vga_struct_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, num_1);
+ talk_with_speech(speech_id, vga_struct_id);
if (string_ptr != NULL && (speech_id == 0 || _subtitles))
- talk_with_text(num_1, num_2, (const char *)string_ptr, tv->a, tv->b, tv->c);
+ talk_with_text(vga_struct_id, color, (const char *)string_ptr, tv->a, tv->b, tv->c);
} else {
- talk_with_text(num_1, num_2, (const char *)string_ptr, tv->a, tv->b, tv->c);
+ talk_with_text(vga_struct_id, color, (const char *)string_ptr, tv->a, tv->b, tv->c);
}
@@ -3910,7 +3910,7 @@ void SimonEngine::start_vga_code(uint b, uint vga_res, uint vga_struct_id, uint
_lock_word &= ~0x40;
}
-void SimonEngine::talk_with_speech(uint speech_id, uint num_1) {
+void SimonEngine::talk_with_speech(uint speech_id, uint vga_struct_id) {
if (!(_game & GF_SIMON2)) {
if (speech_id == 9999) {
if (_subtitles)
@@ -3928,9 +3928,9 @@ void SimonEngine::talk_with_speech(uint speech_id, uint num_1) {
o_wait_for_vga(204);
o_kill_sprite_simon1(204);
}
- o_kill_sprite_simon1(num_1 + 201);
+ o_kill_sprite_simon1(vga_struct_id + 201);
_sound->playVoice(speech_id);
- start_vga_code(4, 2, num_1 + 201, 0, 0, 0);
+ start_vga_code(4, 2, vga_struct_id + 201, 0, 0, 0);
}
} else {
if (speech_id == 0xFFFF) {
@@ -3949,14 +3949,14 @@ void SimonEngine::talk_with_speech(uint speech_id, uint num_1) {
o_wait_for_vga(205);
o_kill_sprite_simon2(2, 5);
}
- o_kill_sprite_simon2(2, num_1 + 2);
+ o_kill_sprite_simon2(2, vga_struct_id + 2);
_sound->playVoice(speech_id);
- start_vga_code(4, 2, num_1 + 2, 0, 0, 0);
+ start_vga_code(4, 2, vga_struct_id + 2, 0, 0, 0);
}
}
}
-void SimonEngine::talk_with_text(uint num_1, uint num_2, const char *string_ptr, uint threeval_a, int threeval_b, uint width) {
+void SimonEngine::talk_with_text(uint vga_struct_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 @@ void SimonEngine::talk_with_text(uint num_1, uint num_2, const char *string_ptr,
uint height;
// FIXME: Simon1dos Dwarf Mine - Fix text for dwarf song
- if (num_1 >= 100)
- num_1 -= 100;
+ if (vga_struct_id >= 100)
+ vga_struct_id -= 100;
char_buf = print_str_buf;
string_ptr_3 = string_ptr_2 = string_ptr;
@@ -4197,13 +4197,13 @@ void SimonEngine::talk_with_text(uint num_1, uint num_2, const char *string_ptr,
strcpy(char_buf, string_ptr_2);
if (!(_game & GF_SIMON2)) {
- o_kill_sprite_simon1(199 + num_1);
+ o_kill_sprite_simon1(199 + vga_struct_id);
} else {
- o_kill_sprite_simon2(2, num_1);
+ o_kill_sprite_simon2(2, vga_struct_id);
}
- num_2 = num_2 * 3 + 192;
+ color = color * 3 + 192;
- render_string(num_1, num_2, width, height, print_str_buf);
+ render_string(vga_struct_id, color, width, height, print_str_buf);
num_of_rows = 4;
if (!(_bit_array[8] & 0x20))
num_of_rows = 3;
@@ -4212,9 +4212,9 @@ void SimonEngine::talk_with_text(uint num_1, uint num_2, const char *string_ptr,
threeval_b = 2;
if (!(_game & GF_SIMON2)) {
- start_vga_code(num_of_rows, 2, 199 + num_1, threeval_a >> 3, threeval_b, 12);
+ start_vga_code(num_of_rows, 2, 199 + vga_struct_id, threeval_a >> 3, threeval_b, 12);
} else {
- start_vga_code(num_of_rows, 2, num_1, threeval_a >> 3, threeval_b, 12);
+ start_vga_code(num_of_rows, 2, vga_struct_id, threeval_a >> 3, threeval_b, 12);
}
}
diff --git a/simon/simon.h b/simon/simon.h
index a4f6cd64a4..9501aa8d23 100644
--- a/simon/simon.h
+++ b/simon/simon.h
@@ -574,11 +574,11 @@ protected:
void start_vga_code(uint b, uint vga_res, uint vga_struct_id, uint c, uint d, uint f);
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 num_1);
- void talk_with_text(uint num_1, uint num_2, const char *string_ptr, uint a, int b, uint c);
+ 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);
FillOrCopyStruct *fcs_alloc(uint x, uint y, uint w, uint h, uint flags, uint fill_color, uint unk4);
- void render_string(uint num_1, uint color, uint width, uint height, const char *txt);
+ void render_string(uint vga_struct_id, uint color, uint width, uint height, const char *txt);
void setup_hit_areas(FillOrCopyStruct *fcs, uint fcs_index);