[Scummvm-cvs-logs] CVS: scummvm/sword2/driver d_draw.cpp,1.40,1.41 rdwin.cpp,1.34,1.35 render.cpp,1.38,1.39

Torbj?rn Andersson eriktorbjorn at users.sourceforge.net
Sat Nov 8 07:50:27 CET 2003


Update of /cvsroot/scummvm/scummvm/sword2/driver
In directory sc8-pr-cvs1:/tmp/cvs-serv22682/driver

Modified Files:
	d_draw.cpp rdwin.cpp render.cpp 
Log Message:
Moved more stuff into classes, changed some static allocation to dynamic,
and removed some of the references to global variables.

At this point I believe everything in the main game engine has been moved
into classes - not necessarily the correct ones, but still... However,
there is some stuff in the driver directory that need to be taken care of
as well.


Index: d_draw.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sword2/driver/d_draw.cpp,v
retrieving revision 1.40
retrieving revision 1.41
diff -u -d -r1.40 -r1.41
--- d_draw.cpp	3 Nov 2003 07:47:42 -0000	1.40
+++ d_draw.cpp	8 Nov 2003 15:47:51 -0000	1.41
@@ -143,7 +143,7 @@
 		memset(g_display->_buffer, 0, g_display->_screenWide * MENUDEEP);
 
 		uint8 msg[] = "Cutscene - Press ESC to exit";
-		mem *data = fontRenderer.makeTextSprite(msg, 640, 255, g_sword2->_speechFontId);
+		mem *data = fontRenderer->makeTextSprite(msg, 640, 255, g_sword2->_speechFontId);
 		_frameHeader *frame = (_frameHeader *) data->ad;
 		_spriteInfo msgSprite;
 		uint8 *msgSurface;

Index: rdwin.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sword2/driver/rdwin.cpp,v
retrieving revision 1.34
retrieving revision 1.35
diff -u -d -r1.34 -r1.35
--- rdwin.cpp	28 Oct 2003 19:51:30 -0000	1.34
+++ rdwin.cpp	8 Nov 2003 15:47:51 -0000	1.35
@@ -60,7 +60,7 @@
 			LogMouseEvent(RD_RIGHTBUTTONUP);
 			break;
 		case OSystem::EVENT_QUIT:
-			Close_game();
+			g_sword2->closeGame();
 			break;
 		default:
 			break;

Index: render.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sword2/driver/render.cpp,v
retrieving revision 1.38
retrieving revision 1.39
diff -u -d -r1.38 -r1.39
--- render.cpp	28 Oct 2003 19:51:30 -0000	1.38
+++ render.cpp	8 Nov 2003 15:47:51 -0000	1.39
@@ -641,7 +641,7 @@
 	if (_scrollXTarget == _scrollX && _scrollYTarget == _scrollY) {
 		// If we have already reached the scroll target sleep for the
 		// rest of the render cycle.
-		sleepUntil(_totalTime);
+		g_sword2->sleepUntil(_totalTime);
 		_initialTime = SVM_timeGetTime();
 		_totalTime += MILLISECSPERCYCLE;
 		return true;





More information about the Scummvm-git-logs mailing list