diff options
author | johndoe123 | 2014-06-30 13:09:59 +0200 |
---|---|---|
committer | johndoe123 | 2014-06-30 13:09:59 +0200 |
commit | b7884f2fba4b704ecdc76effef4942a309996357 (patch) | |
tree | 6287035c1b9d3d47e3cda89e2f98edd14be7c27b | |
parent | ae26f9537ec2c135c32a817f6daf85e0e6afd65a (diff) | |
download | scummvm-rg350-b7884f2fba4b704ecdc76effef4942a309996357.tar.gz scummvm-rg350-b7884f2fba4b704ecdc76effef4942a309996357.tar.bz2 scummvm-rg350-b7884f2fba4b704ecdc76effef4942a309996357.zip |
NEVERHOOD: Fix uninitialized variables in Sprite (bug #6663)
-rw-r--r-- | engines/neverhood/sprite.cpp | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/engines/neverhood/sprite.cpp b/engines/neverhood/sprite.cpp index a566b8ee3b..3611ce1ba2 100644 --- a/engines/neverhood/sprite.cpp +++ b/engines/neverhood/sprite.cpp @@ -31,8 +31,20 @@ Sprite::Sprite(NeverhoodEngine *vm, int objectPriority) : Entity(vm, objectPriority), _x(0), _y(0), _spriteUpdateCb(NULL), _filterXCb(NULL), _filterYCb(NULL), _dataResource(vm), _doDeltaX(false), _doDeltaY(false), _needRefresh(false), _flags(0), _surface(NULL) { - SetMessageHandler(&Sprite::handleMessage); + _drawOffset.x = 0; + _drawOffset.y = 0; + _drawOffset.width = 0; + _drawOffset.height = 0; + _collisionBounds.x1 = 0; + _collisionBounds.y1 = 0; + _collisionBounds.x2 = 0; + _collisionBounds.y2 = 0; + _collisionBoundsOffset.x = 0; + _collisionBoundsOffset.y = 0; + _collisionBoundsOffset.width = 0; + _collisionBoundsOffset.height = 0; + SetMessageHandler(&Sprite::handleMessage); } Sprite::~Sprite() { |