aboutsummaryrefslogtreecommitdiff
path: root/engines/wage/entities.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/wage/entities.cpp')
-rw-r--r--engines/wage/entities.cpp18
1 files changed, 4 insertions, 14 deletions
diff --git a/engines/wage/entities.cpp b/engines/wage/entities.cpp
index d557f080d3..96d6855b10 100644
--- a/engines/wage/entities.cpp
+++ b/engines/wage/entities.cpp
@@ -61,7 +61,6 @@ void Designed::setDesignBounds(Common::Rect *bounds) {
Scene::Scene() {
_script = NULL;
- _surface = NULL;
_design = NULL;
_textBounds = NULL;
_fontSize = 0;
@@ -84,7 +83,6 @@ Scene::Scene(String name, Common::SeekableReadStream *data) {
_design = new Design(data);
_script = NULL;
- _surface = NULL;
_textBounds = NULL;
_fontSize = 0;
_fontType = 0;
@@ -109,31 +107,23 @@ Scene::Scene(String name, Common::SeekableReadStream *data) {
}
Scene::~Scene() {
- delete _surface;
}
void Scene::paint(Graphics::Surface *surface, int x, int y) {
- if (_surface == NULL) {
- _surface = new Graphics::Surface;
- _surface->create(_design->getBounds()->width(), _design->getBounds()->height(), Graphics::PixelFormat::createFormatCLUT8());
- }
-
Common::Rect r(0, 0, _design->getBounds()->width(), _design->getBounds()->height());
- _surface->fillRect(r, kColorWhite);
+ surface->fillRect(r, kColorWhite);
- _design->paint(_surface, ((WageEngine *)g_engine)->_world->_patterns, false);
+ _design->paint(surface, ((WageEngine *)g_engine)->_world->_patterns, false, x, y);
for (Common::List<Obj *>::const_iterator it = _objs.begin(); it != _objs.end(); ++it) {
debug(2, "paining Obj: %s", (*it)->_name.c_str());
- (*it)->_design->paint(_surface, ((WageEngine *)g_engine)->_world->_patterns, false);
+ (*it)->_design->paint(surface, ((WageEngine *)g_engine)->_world->_patterns, false, x, y);
}
for (Common::List<Chr *>::const_iterator it = _chrs.begin(); it != _chrs.end(); ++it) {
debug(2, "paining Chr: %s", (*it)->_name.c_str());
- (*it)->_design->paint(_surface, ((WageEngine *)g_engine)->_world->_patterns, false);
+ (*it)->_design->paint(surface, ((WageEngine *)g_engine)->_world->_patterns, false, x, y);
}
-
- surface->copyRectToSurface(*_surface, x, y, r);
}
// Source: Apple IIGS Technical Note #41, "Font Family Numbers"