aboutsummaryrefslogtreecommitdiff
path: root/engines/sci/graphics/compare.cpp
diff options
context:
space:
mode:
authorMax Horn2010-02-05 22:56:27 +0000
committerMax Horn2010-02-05 22:56:27 +0000
commit4be44fe9a2292699f105382a475b2def725cb36d (patch)
tree3b58c0632bde8aab62887225885fc6c87f213843 /engines/sci/graphics/compare.cpp
parentb0b89e788b9fb5cbeb58c73f7adef4473f4211ed (diff)
downloadscummvm-rg350-4be44fe9a2292699f105382a475b2def725cb36d.tar.gz
scummvm-rg350-4be44fe9a2292699f105382a475b2def725cb36d.tar.bz2
scummvm-rg350-4be44fe9a2292699f105382a475b2def725cb36d.zip
SCI: Get rid of the mysterious sign_extend_byte() and replace it by a simple cast ;)
svn-id: r47921
Diffstat (limited to 'engines/sci/graphics/compare.cpp')
-rw-r--r--engines/sci/graphics/compare.cpp11
1 files changed, 2 insertions, 9 deletions
diff --git a/engines/sci/graphics/compare.cpp b/engines/sci/graphics/compare.cpp
index 695752f409..ffb295095b 100644
--- a/engines/sci/graphics/compare.cpp
+++ b/engines/sci/graphics/compare.cpp
@@ -69,13 +69,6 @@ uint16 GfxCompare::isOnControl(uint16 screenMask, const Common::Rect &rect) {
return result;
}
-static inline int sign_extend_byte(int value) {
- if (value & 0x80)
- return value - 256;
- else
- return value;
-}
-
bool GfxCompare::canBeHereCheckRectList(reg_t checkObject, const Common::Rect &checkRect, List *list) {
reg_t curAddress = list->first;
Node *curNode = _segMan->lookupNode(curAddress);
@@ -123,8 +116,8 @@ void GfxCompare::kernelSetNowSeen(reg_t objectReference) {
GfxView *view = NULL;
Common::Rect celRect(0, 0);
GuiResourceId viewId = (GuiResourceId)GET_SEL32V(_segMan, objectReference, SELECTOR(view));
- int16 loopNo = sign_extend_byte((int16)GET_SEL32V(_segMan, objectReference, SELECTOR(loop)));
- int16 celNo = sign_extend_byte((int16)GET_SEL32V(_segMan, objectReference, SELECTOR(cel)));
+ int8 loopNo = (int8)GET_SEL32V(_segMan, objectReference, SELECTOR(loop));
+ int8 celNo = (int8)GET_SEL32V(_segMan, objectReference, SELECTOR(cel));
int16 x = (int16)GET_SEL32V(_segMan, objectReference, SELECTOR(x));
int16 y = (int16)GET_SEL32V(_segMan, objectReference, SELECTOR(y));
int16 z = 0;