From a2e9cc4965340add73db19c3d602ef5a910fe336 Mon Sep 17 00:00:00 2001 From: Colin Snover Date: Tue, 8 Mar 2016 10:27:15 -0600 Subject: SCI32: Clean up kIsOnMe and fix rounding bug The implementation was not correctly rounding the scaled position with mulru, leading to occasionally incorrect hit detection at the boundaries of boxes. --- engines/sci/graphics/screen_item32.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'engines/sci/graphics/screen_item32.h') diff --git a/engines/sci/graphics/screen_item32.h b/engines/sci/graphics/screen_item32.h index 0840570721..06e1f6072f 100644 --- a/engines/sci/graphics/screen_item32.h +++ b/engines/sci/graphics/screen_item32.h @@ -125,7 +125,7 @@ public: * item. This member is populated by calling * `getCelObj`. */ - CelObj *_celObj; + mutable CelObj *_celObj; /** * If set, the priority for this screen item is fixed @@ -250,7 +250,7 @@ public: * screen item. If a cel object does not already exist, * one will be created and assigned. */ - CelObj &getCelObj(); + CelObj &getCelObj() const; void printDebugInfo(Console *con) const; -- cgit v1.2.3