aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjohndoe1232012-10-22 11:15:10 +0000
committerWillem Jan Palenstijn2013-05-08 20:47:33 +0200
commiteb054471e0814768571c550a4d268e73e1ea6b65 (patch)
treede7c9ce7999412089740c249e2cd58c594ef6f96
parent47994441cd5432df0c75953ea7d998c4b87c5443 (diff)
downloadscummvm-rg350-eb054471e0814768571c550a4d268e73e1ea6b65.tar.gz
scummvm-rg350-eb054471e0814768571c550a4d268e73e1ea6b65.tar.bz2
scummvm-rg350-eb054471e0814768571c550a4d268e73e1ea6b65.zip
NEVERHOOD: Fix _drawRects in AsScene1002Door and SsCommonPressButton
-rw-r--r--engines/neverhood/module1000.cpp48
1 files changed, 24 insertions, 24 deletions
diff --git a/engines/neverhood/module1000.cpp b/engines/neverhood/module1000.cpp
index 4f8f584313..6a819181e1 100644
--- a/engines/neverhood/module1000.cpp
+++ b/engines/neverhood/module1000.cpp
@@ -618,10 +618,10 @@ AsScene1002Door::AsScene1002Door(NeverhoodEngine *vm, NRect &clipRect)
_y = 239;
}
- _surface->getDrawRect().x = 0;
- _surface->getDrawRect().y = 0;
- _surface->getDrawRect().width = _spriteResource.getDimensions().width;
- _surface->getDrawRect().height = _spriteResource.getDimensions().height;
+ _drawRect.x = 0;
+ _drawRect.y = 0;
+ _drawRect.width = _spriteResource.getDimensions().width;
+ _drawRect.height = _spriteResource.getDimensions().height;
_needRefresh = true;
@@ -771,10 +771,10 @@ SsCommonPressButton::SsCommonPressButton(NeverhoodEngine *vm, Scene *parentScene
_spriteResource.load2(fileHash1);
createSurface(surfacePriority, 40, 40);
- _surface->getDrawRect().x = 0;
- _surface->getDrawRect().y = 0;
- _surface->getDrawRect().width = _spriteResource.getDimensions().width;
- _surface->getDrawRect().height = _spriteResource.getDimensions().height;
+ _drawRect.x = 0;
+ _drawRect.y = 0;
+ _drawRect.width = _spriteResource.getDimensions().width;
+ _drawRect.height = _spriteResource.getDimensions().height;
_x = _spriteResource.getPosition().x;
_y = _spriteResource.getPosition().y;
@@ -791,20 +791,20 @@ void SsCommonPressButton::setFileHashes(uint32 fileHash1, uint32 fileHash2) {
_fileHashes[1] = fileHash2;
if (_status == 2) {
_spriteResource.load2(fileHash2);
- _surface->getDrawRect().x = 0;
- _surface->getDrawRect().y = 0;
- _surface->getDrawRect().width = _spriteResource.getDimensions().width;
- _surface->getDrawRect().height = _spriteResource.getDimensions().height;
+ _drawRect.x = 0;
+ _drawRect.y = 0;
+ _drawRect.width = _spriteResource.getDimensions().width;
+ _drawRect.height = _spriteResource.getDimensions().height;
_x = _spriteResource.getPosition().x;
_y = _spriteResource.getPosition().y;
_needRefresh = true;
StaticSprite::update();
} else {
_spriteResource.load2(fileHash1);
- _surface->getDrawRect().x = 0;
- _surface->getDrawRect().y = 0;
- _surface->getDrawRect().width = _spriteResource.getDimensions().width;
- _surface->getDrawRect().height = _spriteResource.getDimensions().height;
+ _drawRect.x = 0;
+ _drawRect.y = 0;
+ _drawRect.width = _spriteResource.getDimensions().width;
+ _drawRect.height = _spriteResource.getDimensions().height;
_x = _spriteResource.getPosition().x;
_y = _spriteResource.getPosition().y;
_needRefresh = true;
@@ -817,10 +817,10 @@ void SsCommonPressButton::update() {
if (_status == 1) {
_status = 2;
_spriteResource.load2(_fileHashes[1]);
- _surface->getDrawRect().x = 0;
- _surface->getDrawRect().y = 0;
- _surface->getDrawRect().width = _spriteResource.getDimensions().width;
- _surface->getDrawRect().height = _spriteResource.getDimensions().height;
+ _drawRect.x = 0;
+ _drawRect.y = 0;
+ _drawRect.width = _spriteResource.getDimensions().width;
+ _drawRect.height = _spriteResource.getDimensions().height;
_x = _spriteResource.getPosition().x;
_y = _spriteResource.getPosition().y;
_needRefresh = true;
@@ -829,10 +829,10 @@ void SsCommonPressButton::update() {
} else if (_status == 2) {
_status = 3;
_spriteResource.load2(_fileHashes[0]);
- _surface->getDrawRect().x = 0;
- _surface->getDrawRect().y = 0;
- _surface->getDrawRect().width = _spriteResource.getDimensions().width;
- _surface->getDrawRect().height = _spriteResource.getDimensions().height;
+ _drawRect.x = 0;
+ _drawRect.y = 0;
+ _drawRect.width = _spriteResource.getDimensions().width;
+ _drawRect.height = _spriteResource.getDimensions().height;
_x = _spriteResource.getPosition().x;
_y = _spriteResource.getPosition().y;
_needRefresh = true;