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

thebluegr at users.sourceforge.net thebluegr at users.sourceforge.net
Sat Oct 10 12:48:47 CEST 2009


Revision: 44866
          http://scummvm.svn.sourceforge.net/scummvm/?rev=44866&view=rev
Author:   thebluegr
Date:     2009-10-10 10:48:46 +0000 (Sat, 10 Oct 2009)

Log Message:
-----------
Merged _k_base_setter() inside kBaseSetter()

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-10 10:46:11 UTC (rev 44865)
+++ scummvm/trunk/engines/sci/engine/kgraphics.cpp	2009-10-10 10:48:46 UTC (rev 44866)
@@ -395,28 +395,6 @@
 	return retval;
 }
 
-void _k_base_setter(EngineState *s, reg_t object) {
-	SegManager *segMan = s->_segMan;
-	Common::Rect absrect = set_base(s, object);
-
-	if (lookup_selector(s->_segMan, object, s->_kernel->_selectorCache.brLeft, NULL, NULL) != kSelectorVariable)
-		return; // non-fatal
-
-	// Note: there was a check here for a very old version of SCI, which supposedly needed
-	// to subtract 1 from absrect.top. The original check was for version 0.000.256, which
-	// does not exist (earliest one was KQ4 SCI, version 0.000.274). This code is left here
-	// for reference only
-#if 0
-	if (getSciVersion() <= SCI_VERSION_0)
-		--absrect.top; // Compensate for early SCI OB1 'bug'
-#endif
-
-	PUT_SEL32V(object, brLeft, absrect.left);
-	PUT_SEL32V(object, brRight, absrect.right);
-	PUT_SEL32V(object, brTop, absrect.top);
-	PUT_SEL32V(object, brBottom, absrect.bottom);
-}
-
 static Common::Rect nsrect_clip(EngineState *s, int y, Common::Rect retval, int priority) {
 	int pri_top;
 
@@ -962,8 +940,24 @@
 reg_t kBaseSetter(EngineState *s, int argc, reg_t *argv) {
 	reg_t object = argv[0];
 
-	_k_base_setter(s, object);
+	if (lookup_selector(s->_segMan, object, s->_kernel->_selectorCache.brLeft, NULL, NULL) == kSelectorVariable) {
+		// Note: there was a check here for a very old version of SCI, which supposedly needed
+		// to subtract 1 from absrect.top. The original check was for version 0.000.256, which
+		// does not exist (earliest one was KQ4 SCI, version 0.000.274). This code is left here
+		// for reference only
+#if 0
+		if (getSciVersion() <= SCI_VERSION_0)
+			--absrect.top; // Compensate for early SCI OB1 'bug'
+#endif
 
+		Common::Rect absrect = set_base(s, object);
+		SegManager *segMan = s->_segMan;
+		PUT_SEL32V(object, brLeft, absrect.left);
+		PUT_SEL32V(object, brRight, absrect.right);
+		PUT_SEL32V(object, brTop, absrect.top);
+		PUT_SEL32V(object, brBottom, absrect.bottom);
+	}
+
 	return s->r_acc;
 } // kBaseSetter
 


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