aboutsummaryrefslogtreecommitdiff
path: root/simon
diff options
context:
space:
mode:
authorTravis Howell2003-08-10 15:58:38 +0000
committerTravis Howell2003-08-10 15:58:38 +0000
commit9d09512765bcca0a507361297aa70c8f122ce512 (patch)
treec426e99ae0fc932c2b1ea53593e1946ba94d727d /simon
parent5d972a657b7d9f68298563cc6914479ede875e5f (diff)
downloadscummvm-rg350-9d09512765bcca0a507361297aa70c8f122ce512.tar.gz
scummvm-rg350-9d09512765bcca0a507361297aa70c8f122ce512.tar.bz2
scummvm-rg350-9d09512765bcca0a507361297aa70c8f122ce512.zip
Add missing code for f10 key, thanks to Jamieson
Stops multiple flashing star occuring on one character/object svn-id: r9625
Diffstat (limited to 'simon')
-rw-r--r--simon/simon.cpp18
1 files changed, 16 insertions, 2 deletions
diff --git a/simon/simon.cpp b/simon/simon.cpp
index bee77ecc35..200f0bcb6b 100644
--- a/simon/simon.cpp
+++ b/simon/simon.cpp
@@ -1740,7 +1740,7 @@ uint SimonEngine::setup_icon_hit_area(FillOrCopyStruct *fcs, uint x, uint y, uin
}
void SimonEngine::f10_key() {
- HitArea *ha;
+ HitArea *ha, *dha;
uint count;
uint y_, x_;
byte *dst;
@@ -1763,7 +1763,21 @@ void SimonEngine::f10_key() {
do {
if (ha->id != 0 && ha->flags & 0x20 && !(ha->flags & 0x40)) {
- if (ha->y >= 0xc8 || ha->y >= _vga_var8)
+ dha = _hit_areas;
+ if (ha->flags & 1) {
+ while (dha != ha && dha->flags != ha->flags)
+ ++dha;
+ if (dha != ha && dha->flags == ha->flags)
+ continue;
+ } else {
+ dha = _hit_areas;
+ while (dha != ha && dha->item_ptr != ha->item_ptr)
+ ++dha;
+ if (dha != ha && dha->item_ptr == ha->item_ptr)
+ continue;
+ }
+
+ if (ha->y >= 0xc8 || ha->y >= _vga_var8)
continue;
y_ = (ha->height >> 1) - 4 + ha->y;