aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/neverhood/background.cpp33
-rw-r--r--engines/neverhood/background.h9
-rw-r--r--engines/neverhood/module2800.cpp2
-rw-r--r--engines/neverhood/scene.cpp4
-rw-r--r--engines/neverhood/scene.h2
5 files changed, 4 insertions, 46 deletions
diff --git a/engines/neverhood/background.cpp b/engines/neverhood/background.cpp
index 03c531f40a..0a80bd8390 100644
--- a/engines/neverhood/background.cpp
+++ b/engines/neverhood/background.cpp
@@ -57,37 +57,4 @@ void Background::load(uint32 fileHash) {
_surface->drawSpriteResource(_spriteResource);
}
-// DirtyBackground
-
-DirtyBackground::DirtyBackground(NeverhoodEngine *vm, int objectPriority)
- : Background(vm, objectPriority) {
- // Empty
-}
-
-DirtyBackground::DirtyBackground(NeverhoodEngine *vm, const char *fileName, int objectPriority, int surfacePriority)
- : Background(vm, objectPriority) {
-
- _spriteResource.load(calcHash(fileName));
- createSurface(surfacePriority, _spriteResource.getDimensions().width, _spriteResource.getDimensions().height);
- _surface->drawSpriteResource(_spriteResource);
-}
-
-DirtyBackground::DirtyBackground(NeverhoodEngine *vm, uint32 fileHash, int objectPriority, int surfacePriority)
- : Background(vm, objectPriority) {
-
- _spriteResource.load(fileHash);
- createSurface(surfacePriority, _spriteResource.getDimensions().width, _spriteResource.getDimensions().height);
- _surface->drawSpriteResource(_spriteResource);
-}
-
-void DirtyBackground::createSurface(int surfacePriority, int16 width, int16 height) {
-
- // TODO: Later use a DirtySurface once it is implemented
- _surface = new BaseSurface(_vm, surfacePriority, width, height);
- _surface->setTransparent(false);
- _spriteResource.getPosition().x = width;
- _spriteResource.getPosition().y = height;
-
-}
-
} // End of namespace Neverhood
diff --git a/engines/neverhood/background.h b/engines/neverhood/background.h
index d8f624b73d..ef88be21c0 100644
--- a/engines/neverhood/background.h
+++ b/engines/neverhood/background.h
@@ -44,15 +44,6 @@ protected:
SpriteResource _spriteResource;
};
-class DirtyBackground : public Background {
-public:
- DirtyBackground(NeverhoodEngine *vm, int objectPriority);
- DirtyBackground(NeverhoodEngine *vm, const char *fileName, int objectPriority, int surfacePriority);
- DirtyBackground(NeverhoodEngine *vm, uint32 fileHash, int objectPriority, int surfacePriority);
- void createSurface(int surfacePriority, int16 width, int16 height);
-
-};
-
} // End of namespace Neverhood
#endif /* NEVERHOOD_BACKGROUND_H */
diff --git a/engines/neverhood/module2800.cpp b/engines/neverhood/module2800.cpp
index 1b039685c6..140e1125c2 100644
--- a/engines/neverhood/module2800.cpp
+++ b/engines/neverhood/module2800.cpp
@@ -845,7 +845,7 @@ Scene2803::Scene2803(NeverhoodEngine *vm, Module *parentModule, int which)
_surfaceFlag = true;
- _background = new DirtyBackground(_vm, 0);
+ _background = new Background(_vm, 0);
_background->createSurface(0, 640, 480);
addBackground(_background);
diff --git a/engines/neverhood/scene.cpp b/engines/neverhood/scene.cpp
index b75515f325..c706ecc5dc 100644
--- a/engines/neverhood/scene.cpp
+++ b/engines/neverhood/scene.cpp
@@ -183,8 +183,8 @@ Background *Scene::addBackground(Background *background) {
return background;
}
-void Scene::setBackground(uint32 fileHash, bool dirtyBackground) {
- _background = addBackground(new DirtyBackground(_vm, fileHash, 0, 0));
+void Scene::setBackground(uint32 fileHash) {
+ _background = addBackground(new Background(_vm, fileHash, 0, 0));
}
void Scene::changeBackground(uint32 fileHash) {
diff --git a/engines/neverhood/scene.h b/engines/neverhood/scene.h
index a0f7dafd25..11c00d9e3c 100644
--- a/engines/neverhood/scene.h
+++ b/engines/neverhood/scene.h
@@ -52,7 +52,7 @@ public:
void setSpriteSurfacePriority(Sprite *sprite, int priority);
void deleteSprite(Sprite **sprite);
Background *addBackground(Background *background);
- void setBackground(uint32 fileHash, bool dirtyBackground = true);
+ void setBackground(uint32 fileHash);
void changeBackground(uint32 fileHash);
void setBackgroundY(int16 y) { _background->getSurface()->getDrawRect().y = y; }
int16 getBackgroundY() { return _background->getSurface()->getDrawRect().y; }