aboutsummaryrefslogtreecommitdiff
path: root/engines/scumm/actor.h
diff options
context:
space:
mode:
authorTorbjörn Andersson2019-01-05 20:09:23 +0100
committerFilippos Karapetis2019-07-14 14:58:19 +0300
commit1e23d43006705a1d25e04d9cc90674044789cb92 (patch)
tree74982033219756724bc69b27cfc962531682b502 /engines/scumm/actor.h
parent4eef7a42e3f45a18a57674898f5fb5409f6daf5d (diff)
downloadscummvm-rg350-1e23d43006705a1d25e04d9cc90674044789cb92.tar.gz
scummvm-rg350-1e23d43006705a1d25e04d9cc90674044789cb92.tar.bz2
scummvm-rg350-1e23d43006705a1d25e04d9cc90674044789cb92.zip
SCUMM: Silence GCC memset() warnings
Recent GCC versions complain if you memset() a class or struct that contain non-POD data types. Get around that by either initializing the object when created, or by adding a reset() method.
Diffstat (limited to 'engines/scumm/actor.h')
-rw-r--r--engines/scumm/actor.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/engines/scumm/actor.h b/engines/scumm/actor.h
index 3556d5b212..02929e3873 100644
--- a/engines/scumm/actor.h
+++ b/engines/scumm/actor.h
@@ -151,6 +151,20 @@ protected:
Common::Point point3;
int32 deltaXFactor, deltaYFactor;
uint16 xfrac, yfrac;
+
+ void reset() {
+ dest.x = dest.y = 0;
+ destbox = 0;
+ destdir = 0;
+ cur.x = cur.y = 0;
+ curbox = 0;
+ next.x = next.y = 0;
+ point3.x = point3.y = 0;
+ deltaXFactor = 0;
+ deltaYFactor = 0;
+ xfrac = 0;
+ yfrac = 0;
+ }
};