aboutsummaryrefslogtreecommitdiff
path: root/engines/sci
diff options
context:
space:
mode:
authorFilippos Karapetis2009-10-10 10:48:46 +0000
committerFilippos Karapetis2009-10-10 10:48:46 +0000
commit053cbdecc7b08c1ffd7711d99b0d2f24f1639deb (patch)
treeaa30a1a3b8ce0a6451ceea0bc186c4422cdd5a7d /engines/sci
parentba297ab7b14afff874d4b6731969ddab45eec6d1 (diff)
downloadscummvm-rg350-053cbdecc7b08c1ffd7711d99b0d2f24f1639deb.tar.gz
scummvm-rg350-053cbdecc7b08c1ffd7711d99b0d2f24f1639deb.tar.bz2
scummvm-rg350-053cbdecc7b08c1ffd7711d99b0d2f24f1639deb.zip
Merged _k_base_setter() inside kBaseSetter()
svn-id: r44866
Diffstat (limited to 'engines/sci')
-rw-r--r--engines/sci/engine/kgraphics.cpp40
1 files changed, 17 insertions, 23 deletions
diff --git a/engines/sci/engine/kgraphics.cpp b/engines/sci/engine/kgraphics.cpp
index 357337578f..c7f7e123d7 100644
--- a/engines/sci/engine/kgraphics.cpp
+++ b/engines/sci/engine/kgraphics.cpp
@@ -395,28 +395,6 @@ Common::Rect set_base(EngineState *s, reg_t object) {
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,7 +940,23 @@ reg_t kDrawPic(EngineState *s, int argc, reg_t *argv) {
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