[Scummvm-cvs-logs] CVS: scummvm/saga gfx.cpp,1.32,1.33 gfx.h,1.15,1.16 saga.cpp,1.66,1.67 saga.h,1.45,1.46

Eugene Sandulenko sev at users.sourceforge.net
Tue Nov 23 16:15:03 CET 2004


Update of /cvsroot/scummvm/scummvm/saga
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7792/saga

Modified Files:
	gfx.cpp gfx.h saga.cpp saga.h 
Log Message:
Fix a`ll engines. They work, though current fix is just temporary.
There are plans to add some brains to GameDetector class, which will let us
avoid passing detector to init() method.


Index: gfx.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/saga/gfx.cpp,v
retrieving revision 1.32
retrieving revision 1.33
diff -u -d -r1.32 -r1.33
--- gfx.cpp	20 Nov 2004 00:05:50 -0000	1.32
+++ gfx.cpp	24 Nov 2004 00:14:01 -0000	1.33
@@ -35,11 +35,13 @@
 
 namespace Saga {
 
-Gfx::Gfx(OSystem *system, int width, int height) {
+Gfx::Gfx(OSystem *system, int width, int height, GameDetector &detector) : _system(system) {
 	SURFACE back_buf;
 
-	_system = system;
-	_system->initSize(width, height);
+	_system->beginGFXTransaction();
+		_vm->initCommonGFX(detector);
+		_system->initSize(width, height);
+	_system->endGFXTransaction();
 
 	debug(0, "Init screen %dx%d", width, height);
 	// Convert surface data to R surface data
@@ -61,7 +63,7 @@
 
 	// For now, always show the mouse cursor.
 	setCursor(1);
-	g_system->showMouse(true);
+	_system->showMouse(true);
 }
 
 /*

Index: gfx.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/saga/gfx.h,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -d -r1.15 -r1.16
--- gfx.h	20 Nov 2004 00:05:50 -0000	1.15
+++ gfx.h	24 Nov 2004 00:14:02 -0000	1.16
@@ -98,7 +98,7 @@
 class Gfx {
 public:
 
-	Gfx(OSystem *system, int width, int height);
+	Gfx(OSystem *system, int width, int height, GameDetector &detector);
 	SURFACE *getBackBuffer();
 	int getWhite();
 	int getBlack();

Index: saga.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/saga/saga.cpp,v
retrieving revision 1.66
retrieving revision 1.67
diff -u -d -r1.66 -r1.67
--- saga.cpp	23 Nov 2004 00:03:20 -0000	1.66
+++ saga.cpp	24 Nov 2004 00:14:02 -0000	1.67
@@ -124,7 +124,7 @@
 	strcpy(buf2, buf1);
 }
 
-int SagaEngine::init() {
+int SagaEngine::init(GameDetector &detector) {
 	_soundEnabled = 1;
 	_musicEnabled = 1;
 
@@ -183,7 +183,7 @@
 	// Initialize graphics
 	GAME_DISPLAYINFO disp_info;
 	GAME_GetDisplayInfo(&disp_info);
-	_gfx = new Gfx(_system, disp_info.logical_w, disp_info.logical_h);
+	_gfx = new Gfx(_system, disp_info.logical_w, disp_info.logical_h, detector);
 
 	// Graphics should be initialized before music
 	int midiDriver = GameDetector::detectMusicDriver(MDT_NATIVE | MDT_ADLIB | MDT_PREFER_NATIVE);

Index: saga.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/saga/saga.h,v
retrieving revision 1.45
retrieving revision 1.46
diff -u -d -r1.45 -r1.46
--- saga.h	23 Nov 2004 00:03:20 -0000	1.45
+++ saga.h	24 Nov 2004 00:14:02 -0000	1.46
@@ -89,7 +89,7 @@
 
 protected:
 	int go();
-	int init();
+	int init(GameDetector &detector);
 
 public:
 	SagaEngine(GameDetector * detector, OSystem * syst);





More information about the Scummvm-git-logs mailing list