aboutsummaryrefslogtreecommitdiff
path: root/engines/scumm/gfx.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/gfx.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/gfx.h')
-rw-r--r--engines/scumm/gfx.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/engines/scumm/gfx.h b/engines/scumm/gfx.h
index 86913f9e2e..35be19295e 100644
--- a/engines/scumm/gfx.h
+++ b/engines/scumm/gfx.h
@@ -53,6 +53,18 @@ struct CameraData {
int _leftTrigger, _rightTrigger;
byte _follows, _mode;
bool _movingToActor;
+
+ void reset() {
+ _cur.x = _cur.y = 0;
+ _dest.x = _dest.y = 0;
+ _accel.x = _accel.y = 0;
+ _last.x = _last.y = 0;
+ _leftTrigger = 0;
+ _rightTrigger = 0;
+ _follows = 0;
+ _mode = 0;
+ _movingToActor = 0;
+ }
};
/** Virtual screen identifiers */