aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVladimir Menshakov2010-01-02 21:32:34 +0000
committerVladimir Menshakov2010-01-02 21:32:34 +0000
commit4640b358320794db182e67b869c1628ef30bfcef (patch)
tree13294fad05997259d232a3c7ac8cfc8ca70c4cfa
parent3e0588c98cd5cc76ec0cee8ee2d5c9ff4651d898 (diff)
downloadscummvm-rg350-4640b358320794db182e67b869c1628ef30bfcef.tar.gz
scummvm-rg350-4640b358320794db182e67b869c1628ef30bfcef.tar.bz2
scummvm-rg350-4640b358320794db182e67b869c1628ef30bfcef.zip
removed useless `system' pointer from render()
svn-id: r46900
-rw-r--r--engines/teenagent/scene.cpp25
-rw-r--r--engines/teenagent/scene.h2
-rw-r--r--engines/teenagent/teenagent.cpp2
3 files changed, 14 insertions, 15 deletions
diff --git a/engines/teenagent/scene.cpp b/engines/teenagent/scene.cpp
index bff18919fb..f01239986e 100644
--- a/engines/teenagent/scene.cpp
+++ b/engines/teenagent/scene.cpp
@@ -528,7 +528,7 @@ int Scene::lookupZoom(uint y) const {
}
-bool Scene::render(OSystem *system) {
+bool Scene::render() {
Resources *res = Resources::instance();
bool busy;
bool restart;
@@ -538,7 +538,6 @@ bool Scene::render(OSystem *system) {
busy = processEventQueue();
if (_fade_timer) {
- debug(0, "fade timer = %d, type = %d", _fade_timer, _fade_type);
if (_fade_timer > 0) {
--_fade_timer;
setPalette(_fade_timer);
@@ -550,11 +549,11 @@ bool Scene::render(OSystem *system) {
switch(current_event.type) {
case SceneEvent::kCredits: {
- system->fillScreen(0);
+ _system->fillScreen(0);
///\todo: optimize me
- Graphics::Surface *surface = system->lockScreen();
+ Graphics::Surface *surface = _system->lockScreen();
res->font7.render(surface, current_event.dst.x, current_event.dst.y--, current_event.message, current_event.color);
- system->unlockScreen();
+ _system->unlockScreen();
if (current_event.dst.y < -(int)current_event.timer)
current_event.clear();
@@ -573,24 +572,24 @@ bool Scene::render(OSystem *system) {
}
if (current_event.type == SceneEvent::kCreditsMessage) {
- system->fillScreen(0);
- Graphics::Surface *surface = system->lockScreen();
+ _system->fillScreen(0);
+ Graphics::Surface *surface = _system->lockScreen();
if (current_event.lan == 8) {
res->font8.shadow_color = current_event.orientation;
res->font8.render(surface, current_event.dst.x, current_event.dst.y, message, current_event.color);
} else {
res->font7.render(surface, current_event.dst.x, current_event.dst.y, message, 0xd1);
}
- system->unlockScreen();
+ _system->unlockScreen();
return true;
}
if (background.pixels && debug_features.feature[DebugFeatures::kShowBack]) {
- system->copyRectToScreen((const byte *)background.pixels, background.pitch, 0, 0, background.w, background.h);
+ _system->copyRectToScreen((const byte *)background.pixels, background.pitch, 0, 0, background.w, background.h);
} else
- system->fillScreen(0);
+ _system->fillScreen(0);
- Graphics::Surface *surface = system->lockScreen();
+ Graphics::Surface *surface = _system->lockScreen();
bool got_any_animation = false;
@@ -713,7 +712,7 @@ bool Scene::render(OSystem *system) {
}
}
if (restart) {
- system->unlockScreen();
+ _system->unlockScreen();
continue;
}
//render on
@@ -774,7 +773,7 @@ bool Scene::render(OSystem *system) {
}
}
- system->unlockScreen();
+ _system->unlockScreen();
if (!restart && current_event.type == SceneEvent::kWaitForAnimation && !got_any_animation) {
debug(0, "no animations, nextevent");
diff --git a/engines/teenagent/scene.h b/engines/teenagent/scene.h
index 20a56c429c..aa23595ccf 100644
--- a/engines/teenagent/scene.h
+++ b/engines/teenagent/scene.h
@@ -127,7 +127,7 @@ public:
void init(TeenAgentEngine *engine, OSystem *system);
void init(int id, const Common::Point &pos);
- bool render(OSystem *system);
+ bool render();
int getId() const { return _id; }
void warp(const Common::Point &point, byte orientation = 0);
diff --git a/engines/teenagent/teenagent.cpp b/engines/teenagent/teenagent.cpp
index 1ac105b24c..f709ce332b 100644
--- a/engines/teenagent/teenagent.cpp
+++ b/engines/teenagent/teenagent.cpp
@@ -342,7 +342,7 @@ Common::Error TeenAgentEngine::run() {
_system->showMouse(scene->getMessage().empty());
uint32 f0 = frame * 12 / 25, f1 = (frame + 1) * 12 / 25;
if (f0 != f1) {
- bool b = scene->render(_system);
+ bool b = scene->render();
scene_busy = b;
if (!inventory->active() && !scene_busy && action != kActionNone) {
processObject();