[Scummvm-cvs-logs] SF.net SVN: scummvm:[47237] scummvm/trunk/engines/sci/engine

thebluegr at users.sourceforge.net thebluegr at users.sourceforge.net
Sun Jan 10 22:13:38 CET 2010


Revision: 47237
          http://scummvm.svn.sourceforge.net/scummvm/?rev=47237&view=rev
Author:   thebluegr
Date:     2010-01-10 21:13:38 +0000 (Sun, 10 Jan 2010)

Log Message:
-----------
Silenced warnings ("this" isn't defined on object instantiation, and commented out some unused variables)

Modified Paths:
--------------
    scummvm/trunk/engines/sci/engine/kernel32.cpp
    scummvm/trunk/engines/sci/engine/kfile.cpp
    scummvm/trunk/engines/sci/engine/kpathing.cpp
    scummvm/trunk/engines/sci/engine/state.cpp
    scummvm/trunk/engines/sci/engine/state.h

Modified: scummvm/trunk/engines/sci/engine/kernel32.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/kernel32.cpp	2010-01-10 20:58:59 UTC (rev 47236)
+++ scummvm/trunk/engines/sci/engine/kernel32.cpp	2010-01-10 21:13:38 UTC (rev 47237)
@@ -645,7 +645,7 @@
 }
 
 reg_t kUpdateScreenItem(EngineState *s, int argc, reg_t *argv) {
-	reg_t viewObj = argv[0];
+	//reg_t viewObj = argv[0];
 
 	//warning("kUpdateScreenItem, object %04x:%04x, view %d, loop %d, cel %d, pri %d", PRINT_REG(viewObj), viewId, loopNo, celNo, priority);
 	return NULL_REG;

Modified: scummvm/trunk/engines/sci/engine/kfile.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/kfile.cpp	2010-01-10 20:58:59 UTC (rev 47236)
+++ scummvm/trunk/engines/sci/engine/kfile.cpp	2010-01-10 21:13:38 UTC (rev 47237)
@@ -652,7 +652,7 @@
 	K_FILEIO_WRITE_WORD     = 16
 };
 
-reg_t DirSeeker::firstFile(const Common::String &mask, reg_t buffer) {
+reg_t DirSeeker::firstFile(const Common::String &mask, reg_t buffer, SegManager *segMan) {
 	// Verify that we are given a valid buffer
 	if (!buffer.segment) {
 		error("DirSeeker::firstFile('%s') invoked with invalid buffer", mask.c_str());
@@ -669,10 +669,10 @@
 
 	// Reset the list iterator and write the first match to the output buffer, if any.
 	_iter = _savefiles.begin();
-	return nextFile();
+	return nextFile(segMan);
 }
 
-reg_t DirSeeker::nextFile() {
+reg_t DirSeeker::nextFile(SegManager *segMan) {
 	if (_iter == _savefiles.end()) {
 		return NULL_REG;
 	}
@@ -683,7 +683,7 @@
 	Common::String string = ((Sci::SciEngine*)g_engine)->unwrapFilename(wrappedString);
 	if (string.size() > 12)
 		string = Common::String(string.c_str(), 12);
-	_state->_segMan->strcpy(_outbuffer, string.c_str());
+	segMan->strcpy(_outbuffer, string.c_str());
 
 	// Return the result and advance the list iterator :)
 	++_iter;
@@ -832,13 +832,13 @@
 //		if (mask == "*.*")
 //			mask = "*"; // For UNIX
 //#endif
-		s->r_acc = s->_dirseeker.firstFile(mask, buf);
+		s->r_acc = s->_dirseeker.firstFile(mask, buf, s->_segMan);
 
 		break;
 	}
 	case K_FILEIO_FIND_NEXT : {
 		debug(3, "K_FILEIO_FIND_NEXT()");
-		s->r_acc = s->_dirseeker.nextFile();
+		s->r_acc = s->_dirseeker.nextFile(s->_segMan);
 		break;
 	}
 	case K_FILEIO_FILE_EXISTS : {

Modified: scummvm/trunk/engines/sci/engine/kpathing.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/kpathing.cpp	2010-01-10 20:58:59 UTC (rev 47236)
+++ scummvm/trunk/engines/sci/engine/kpathing.cpp	2010-01-10 21:13:38 UTC (rev 47237)
@@ -1810,7 +1810,7 @@
 	case 8 : {
 		Common::Point end = Common::Point(argv[2].toSint16(), argv[3].toSint16());
 		reg_t poly_list, output;
-		int width, height, opt;
+		int width, height, opt = 0;
 
 		if (getSciVersion() >= SCI_VERSION_2) {
 			if (argc < 7)

Modified: scummvm/trunk/engines/sci/engine/state.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/state.cpp	2010-01-10 20:58:59 UTC (rev 47236)
+++ scummvm/trunk/engines/sci/engine/state.cpp	2010-01-10 21:13:38 UTC (rev 47237)
@@ -33,7 +33,7 @@
 namespace Sci {
 
 EngineState::EngineState(ResourceManager *res, Kernel *kernel, Vocabulary *voc, SegManager *segMan, SciGui *gui, AudioPlayer *audio)
-: resMan(res), _kernel(kernel), _voc(voc), _segMan(segMan), _gui(gui), _audio(audio), _dirseeker(this) {
+: resMan(res), _kernel(kernel), _voc(voc), _segMan(segMan), _gui(gui), _audio(audio), _dirseeker() {
 
 	sfx_init_flags = 0;
 

Modified: scummvm/trunk/engines/sci/engine/state.h
===================================================================
--- scummvm/trunk/engines/sci/engine/state.h	2010-01-10 20:58:59 UTC (rev 47236)
+++ scummvm/trunk/engines/sci/engine/state.h	2010-01-10 21:13:38 UTC (rev 47237)
@@ -65,19 +65,18 @@
 
 class DirSeeker {
 protected:
-	EngineState *_state;
 	reg_t _outbuffer;
 	Common::StringList _savefiles;
 	Common::StringList::const_iterator _iter;
 
 public:
-	DirSeeker(EngineState *s) : _state(s) {
+	DirSeeker() {
 		_outbuffer = NULL_REG;
 		_iter = _savefiles.begin();
 	}
 
-	reg_t firstFile(const Common::String &mask, reg_t buffer);
-	reg_t nextFile();
+	reg_t firstFile(const Common::String &mask, reg_t buffer, SegManager *segMan);
+	reg_t nextFile(SegManager *segMan);
 };
 
 enum {


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