[Scummvm-cvs-logs] CVS: scummvm/queen journal.cpp,1.39,1.40 logic.cpp,1.206,1.207 queen.cpp,1.90,1.91 queen.h,1.31,1.32

Gregory Montoir cyx at users.sourceforge.net
Sun Oct 10 10:17:58 CEST 2004


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

Modified Files:
	journal.cpp logic.cpp queen.cpp queen.h 
Log Message:
make queen engine returning to the launcher when finished (next step: plug all the memory leaks, mainly in Logic class)

Index: journal.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/queen/journal.cpp,v
retrieving revision 1.39
retrieving revision 1.40
diff -u -d -r1.39 -r1.40
--- journal.cpp	3 Oct 2004 20:14:54 -0000	1.39
+++ journal.cpp	10 Oct 2004 17:12:50 -0000	1.40
@@ -289,7 +289,9 @@
 			}
 			break;
 		case ZN_GIVEUP:
-			OSystem::instance()->quit();
+			_quit = true;
+			_quitCleanly = false;
+			_vm->quitGame();
 			break;
 		}
 	} else if (zoneNum == ZN_NO) {

Index: logic.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/queen/logic.cpp,v
retrieving revision 1.206
retrieving revision 1.207
diff -u -d -r1.206 -r1.207
--- logic.cpp	8 Oct 2004 18:43:24 -0000	1.206
+++ logic.cpp	10 Oct 2004 17:12:50 -0000	1.207
@@ -1529,7 +1529,7 @@
 		_vm->update();
 	}
 	debug(0, "Game completed.");
-	OSystem::instance()->quit();
+	_vm->quitGame();
 }
 
 void Logic::asmPutCameraOnDino() {
@@ -1952,7 +1952,7 @@
 
 void Logic::asmEndDemo() {
 	debug(0, "Flight of the Amazon Queen, released January 95.");
-	OSystem::instance()->quit();
+	_vm->quitGame();
 }
 
 void Logic::asmInterviewIntro() {
@@ -1997,7 +1997,7 @@
 
 void Logic::asmEndInterview() {
 	debug(0, "Interactive Interview copyright (c) 1995, IBI.");
-	OSystem::instance()->quit();
+	_vm->quitGame();
 }
 
 void Logic::startCredits(const char *filename) {

Index: queen.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/queen/queen.cpp,v
retrieving revision 1.90
retrieving revision 1.91
diff -u -d -r1.90 -r1.91
--- queen.cpp	24 Aug 2004 16:31:45 -0000	1.90
+++ queen.cpp	10 Oct 2004 17:12:50 -0000	1.91
@@ -304,7 +304,8 @@
 	_logic->oldRoom(0);
 	_logic->newRoom(_logic->currentRoom());
 
-	for (;;) {
+	_quit = false;
+	while (!_quit) {
 		// queen.c lines 4080-4104
 		if (_logic->newRoom() > 0) {
 			_logic->update();

Index: queen.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/queen/queen.h,v
retrieving revision 1.31
retrieving revision 1.32
diff -u -d -r1.31 -r1.32
--- queen.h	25 Jun 2004 22:39:19 -0000	1.31
+++ queen.h	10 Oct 2004 17:12:50 -0000	1.32
@@ -96,6 +96,7 @@
 	void talkSpeed(int speed) { _talkSpeed = speed; }
 	bool subtitles() const { return _subtitles; }
 	void subtitles(bool enable) { _subtitles = enable; }
+	void quitGame() { _quit = true; }
 
 	void update(bool checkPlayerInput = false);
 
@@ -121,6 +122,7 @@
 
 	int _talkSpeed;
 	bool _subtitles;
+	bool _quit;
 
 	BamScene *_bam;
 	BankManager *_bankMan;





More information about the Scummvm-git-logs mailing list