[Scummvm-cvs-logs] SF.net SVN: scummvm:[46900] scummvm/trunk/engines/teenagent

megath at users.sourceforge.net megath at users.sourceforge.net
Sat Jan 2 22:32:34 CET 2010


Revision: 46900
          http://scummvm.svn.sourceforge.net/scummvm/?rev=46900&view=rev
Author:   megath
Date:     2010-01-02 21:32:34 +0000 (Sat, 02 Jan 2010)

Log Message:
-----------
removed useless `system' pointer from render()

Modified Paths:
--------------
    scummvm/trunk/engines/teenagent/scene.cpp
    scummvm/trunk/engines/teenagent/scene.h
    scummvm/trunk/engines/teenagent/teenagent.cpp

Modified: scummvm/trunk/engines/teenagent/scene.cpp
===================================================================
--- scummvm/trunk/engines/teenagent/scene.cpp	2010-01-02 21:21:32 UTC (rev 46899)
+++ scummvm/trunk/engines/teenagent/scene.cpp	2010-01-02 21:32:34 UTC (rev 46900)
@@ -528,7 +528,7 @@
 }
 
 
-bool Scene::render(OSystem *system) {
+bool Scene::render() {
 	Resources *res = Resources::instance();
 	bool busy;
 	bool restart;
@@ -538,7 +538,6 @@
 		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 @@
 		
 		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 @@
 		}
 
 		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 @@
 			}
 		}
 		if (restart) {
-			system->unlockScreen();
+			_system->unlockScreen();
 			continue;
 		}
 		//render on
@@ -774,7 +773,7 @@
 			}
 		}
 
-		system->unlockScreen();
+		_system->unlockScreen();
 
 		if (!restart && current_event.type == SceneEvent::kWaitForAnimation && !got_any_animation) {
 			debug(0, "no animations, nextevent");

Modified: scummvm/trunk/engines/teenagent/scene.h
===================================================================
--- scummvm/trunk/engines/teenagent/scene.h	2010-01-02 21:21:32 UTC (rev 46899)
+++ scummvm/trunk/engines/teenagent/scene.h	2010-01-02 21:32:34 UTC (rev 46900)
@@ -127,7 +127,7 @@
 
 	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);

Modified: scummvm/trunk/engines/teenagent/teenagent.cpp
===================================================================
--- scummvm/trunk/engines/teenagent/teenagent.cpp	2010-01-02 21:21:32 UTC (rev 46899)
+++ scummvm/trunk/engines/teenagent/teenagent.cpp	2010-01-02 21:32:34 UTC (rev 46900)
@@ -342,7 +342,7 @@
 		_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();


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list