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

thebluegr at users.sourceforge.net thebluegr at users.sourceforge.net
Thu Oct 29 20:32:31 CET 2009


Revision: 45506
          http://scummvm.svn.sourceforge.net/scummvm/?rev=45506&view=rev
Author:   thebluegr
Date:     2009-10-29 19:32:27 +0000 (Thu, 29 Oct 2009)

Log Message:
-----------
Cleanup

Modified Paths:
--------------
    scummvm/trunk/engines/sci/engine/kgraphics.cpp

Modified: scummvm/trunk/engines/sci/engine/kgraphics.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/kgraphics.cpp	2009-10-29 18:15:12 UTC (rev 45505)
+++ scummvm/trunk/engines/sci/engine/kgraphics.cpp	2009-10-29 19:32:27 UTC (rev 45506)
@@ -621,17 +621,6 @@
 	return s->r_acc;
 }
 
-static void disableCertainButtons(SegManager *segMan, reg_t obj) {
-	Common::String objName = segMan->getObjectName(obj);
-
-	// Disable the "Change Directory" button, as we don't allow the game engine to
-	// change the directory where saved games are placed
-	if (objName == "changeDirI") {
-		int state = GET_SEL32V(segMan, obj, state);
-		PUT_SEL32V(segMan, obj, state, (state | kControlStateDisabled) & ~kControlStateEnabled);
-	}
-}
-
 void _k_GenericDrawControl(EngineState *s, reg_t controlObject, bool hilite) {
 	SegManager *segMan = s->_segMan;
 	int16 type = GET_SEL32V(segMan, controlObject, type);
@@ -752,8 +741,15 @@
 
 reg_t kDrawControl(EngineState *s, int argc, reg_t *argv) {
 	reg_t controlObject = argv[0];
+	Common::String objName = s->_segMan->getObjectName(controlObject);
 
-	disableCertainButtons(s->_segMan, controlObject);
+	// Disable the "Change Directory" button, as we don't allow the game engine to
+	// change the directory where saved games are placed
+	if (objName == "changeDirI") {
+		int state = GET_SEL32V(s->_segMan, controlObject, state);
+		PUT_SEL32V(s->_segMan, controlObject, state, (state | kControlStateDisabled) & ~kControlStateEnabled);
+	}
+
 	_k_GenericDrawControl(s, controlObject, false);
 	return NULL_REG;
 }


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