[Scummvm-cvs-logs] SF.net SVN: scummvm: [31772] scummvm/trunk/engines/kyra

lordhoto at users.sourceforge.net lordhoto at users.sourceforge.net
Tue Apr 29 16:33:29 CEST 2008


Revision: 31772
          http://scummvm.svn.sourceforge.net/scummvm/?rev=31772&view=rev
Author:   lordhoto
Date:     2008-04-29 07:33:29 -0700 (Tue, 29 Apr 2008)

Log Message:
-----------
Various cleanup.

Modified Paths:
--------------
    scummvm/trunk/engines/kyra/gui.cpp
    scummvm/trunk/engines/kyra/gui_v1.cpp
    scummvm/trunk/engines/kyra/kyra.h
    scummvm/trunk/engines/kyra/kyra_v2.cpp
    scummvm/trunk/engines/kyra/kyra_v2.h
    scummvm/trunk/engines/kyra/kyra_v3.cpp
    scummvm/trunk/engines/kyra/kyra_v3.h
    scummvm/trunk/engines/kyra/saveload.cpp
    scummvm/trunk/engines/kyra/screen.h

Modified: scummvm/trunk/engines/kyra/gui.cpp
===================================================================
--- scummvm/trunk/engines/kyra/gui.cpp	2008-04-29 14:22:04 UTC (rev 31771)
+++ scummvm/trunk/engines/kyra/gui.cpp	2008-04-29 14:33:29 UTC (rev 31772)
@@ -309,7 +309,7 @@
 		s1 = (*i)[i->size()-3] - '0';
 		s2 = (*i)[i->size()-2] - '0';
 		s3 = (*i)[i->size()-1] - '0';
-		if (s1 < 0 || s2 < 0 || s3 < 0 || s1 > 9 || s2 > 9 || s3 > 9)
+		if (!isdigit(s1) || !isdigit(s2) || !isdigit(s3))
 			continue;
 		_saveSlots.push_back(s1*100+s2*10+s3);
 	}

Modified: scummvm/trunk/engines/kyra/gui_v1.cpp
===================================================================
--- scummvm/trunk/engines/kyra/gui_v1.cpp	2008-04-29 14:22:04 UTC (rev 31771)
+++ scummvm/trunk/engines/kyra/gui_v1.cpp	2008-04-29 14:33:29 UTC (rev 31772)
@@ -624,6 +624,8 @@
 	_displaySubMenu = true;
 	_cancelSubMenu = false;
 
+	_vm->_gameToLoad = -1;
+
 	while (_displaySubMenu && !_vm->_quitFlag) {
 		getInput();
 		Common::Point mouse = _vm->getMousePos();
@@ -639,7 +641,8 @@
 		updateAllMenuButtons();
 	} else {
 		restorePalette();
-		_vm->loadGame(_vm->getSavegameFilename(_vm->_gameToLoad));
+		if (_vm->_gameToLoad != -1)
+			_vm->loadGame(_vm->getSavegameFilename(_vm->_gameToLoad));
 		_displayMenu = false;
 		_menuRestoreScreen = false;
 	}

Modified: scummvm/trunk/engines/kyra/kyra.h
===================================================================
--- scummvm/trunk/engines/kyra/kyra.h	2008-04-29 14:22:04 UTC (rev 31771)
+++ scummvm/trunk/engines/kyra/kyra.h	2008-04-29 14:33:29 UTC (rev 31772)
@@ -28,10 +28,8 @@
 
 #include "engines/engine.h"
 
-#include "common/rect.h"
 #include "common/array.h"
 #include "common/events.h"
-#include "common/func.h"
 
 #include "kyra/script.h"
 
@@ -57,11 +55,6 @@
 	byte gameID;
 };
 
-struct Rect {
-	int x, y;
-	int x2, y2;
-};
-
 enum {
 	GI_KYRA1 = 0,
 	GI_KYRA2 = 1,

Modified: scummvm/trunk/engines/kyra/kyra_v2.cpp
===================================================================
--- scummvm/trunk/engines/kyra/kyra_v2.cpp	2008-04-29 14:22:04 UTC (rev 31771)
+++ scummvm/trunk/engines/kyra/kyra_v2.cpp	2008-04-29 14:33:29 UTC (rev 31772)
@@ -186,10 +186,6 @@
 	_timOpcodes.clear();
 }
 
-Movie *KyraEngine_v2::createWSAMovie() {
-	return new WSAMovieV2(this, _screen);
-}
-
 int KyraEngine_v2::init() {
 	_screen = new Screen_v2(this, _system);
 	assert(_screen);

Modified: scummvm/trunk/engines/kyra/kyra_v2.h
===================================================================
--- scummvm/trunk/engines/kyra/kyra_v2.h	2008-04-29 14:22:04 UTC (rev 31771)
+++ scummvm/trunk/engines/kyra/kyra_v2.h	2008-04-29 14:33:29 UTC (rev 31772)
@@ -203,8 +203,6 @@
 	Screen_v2 *screen_v2() { return _screen; }
 	virtual TextDisplayer *text() { return _text; }
 	int language() const { return _lang; }
-
-	virtual Movie *createWSAMovie();
 protected:
 	// intro/outro
 	void seq_playSequences(int startSeq, int endSeq = -1);

Modified: scummvm/trunk/engines/kyra/kyra_v3.cpp
===================================================================
--- scummvm/trunk/engines/kyra/kyra_v3.cpp	2008-04-29 14:22:04 UTC (rev 31771)
+++ scummvm/trunk/engines/kyra/kyra_v3.cpp	2008-04-29 14:33:29 UTC (rev 31772)
@@ -1645,13 +1645,5 @@
 	enterNewScene(sceneId, facing, 0, 0, 0);
 }
 
-#pragma mark -
-
-Movie *KyraEngine_v3::createWSAMovie() {
-	WSAMovieV2 *movie = new WSAMovieV2(this, _screen);
-	assert(movie);
-	return movie;
-}
-
 } // end of namespace Kyra
 

Modified: scummvm/trunk/engines/kyra/kyra_v3.h
===================================================================
--- scummvm/trunk/engines/kyra/kyra_v3.h	2008-04-29 14:22:04 UTC (rev 31771)
+++ scummvm/trunk/engines/kyra/kyra_v3.h	2008-04-29 14:33:29 UTC (rev 31772)
@@ -60,7 +60,6 @@
 
 	void playVQA(const char *name);
 
-	virtual Movie *createWSAMovie();
 private:
 	Screen_v3 *_screen;
 	SoundDigital *_soundDigital;

Modified: scummvm/trunk/engines/kyra/saveload.cpp
===================================================================
--- scummvm/trunk/engines/kyra/saveload.cpp	2008-04-29 14:22:04 UTC (rev 31771)
+++ scummvm/trunk/engines/kyra/saveload.cpp	2008-04-29 14:33:29 UTC (rev 31772)
@@ -188,6 +188,9 @@
 
 const char *KyraEngine::getSavegameFilename(int num) {
 	static Common::String filename;
+
+	assert(num >= 0 && num <= 999);
+
 	char extension[5];
 	sprintf(extension, "%.3d", num);
 

Modified: scummvm/trunk/engines/kyra/screen.h
===================================================================
--- scummvm/trunk/engines/kyra/screen.h	2008-04-29 14:22:04 UTC (rev 31771)
+++ scummvm/trunk/engines/kyra/screen.h	2008-04-29 14:33:29 UTC (rev 31772)
@@ -36,8 +36,12 @@
 typedef Common::Functor0<void> UpdateFunctor;
 
 class KyraEngine;
-struct Rect;
 
+struct Rect {
+	int x, y;
+	int x2, y2;
+};
+
 struct ScreenDim {
 	uint16 sx;
 	uint16 sy;


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