aboutsummaryrefslogtreecommitdiff
path: root/simon
diff options
context:
space:
mode:
authorMax Horn2003-07-28 11:48:07 +0000
committerMax Horn2003-07-28 11:48:07 +0000
commita57263fa0a456578639d85a4c393e7e19c685b53 (patch)
tree243b7af71ef85d74adaeafc019e12fa85b14424a /simon
parentdeef4a53144be30c2a8b6792e9f34c2387e7ff13 (diff)
downloadscummvm-rg350-a57263fa0a456578639d85a4c393e7e19c685b53.tar.gz
scummvm-rg350-a57263fa0a456578639d85a4c393e7e19c685b53.tar.bz2
scummvm-rg350-a57263fa0a456578639d85a4c393e7e19c685b53.zip
unification
svn-id: r9242
Diffstat (limited to 'simon')
-rw-r--r--simon/vga.cpp27
1 files changed, 10 insertions, 17 deletions
diff --git a/simon/vga.cpp b/simon/vga.cpp
index 9d9e3d9711..27c417a775 100644
--- a/simon/vga.cpp
+++ b/simon/vga.cpp
@@ -1071,24 +1071,17 @@ void SimonEngine::vc_20_set_code_word() {
/* FIXME: unaligned access */
void SimonEngine::vc_21_jump_if_code_word() {
- if (!(_game & GF_SIMON2)) {
- int16 a = vc_read_next_word();
- byte *tmp = _vc_ptr + a;
- uint16 val = read_16_le(tmp + 4);
-
- if (val != 0) {
- write_16_le(tmp + 4, val - 1);
- _vc_ptr = tmp + 6;
- }
- } else {
- int16 a = vc_read_next_word();
- byte *tmp = _vc_ptr + a;
- uint16 val = read_16_le(tmp + 3);
+ int16 a = vc_read_next_word();
+ byte *tmp = _vc_ptr + a;
+ if (_game & GF_SIMON2)
+ tmp += 3;
+ else
+ tmp += 4;
- if (val != 0) {
- write_16_le(tmp + 3, val - 1);
- _vc_ptr = tmp + 5;
- }
+ uint16 val = read_16_le(tmp);
+ if (val != 0) {
+ write_16_le(tmp, val - 1);
+ _vc_ptr = tmp + 2;
}
}