diff options
author | Max Horn | 2010-02-05 22:56:27 +0000 |
---|---|---|
committer | Max Horn | 2010-02-05 22:56:27 +0000 |
commit | 4be44fe9a2292699f105382a475b2def725cb36d (patch) | |
tree | 3b58c0632bde8aab62887225885fc6c87f213843 /engines/sci | |
parent | b0b89e788b9fb5cbeb58c73f7adef4473f4211ed (diff) | |
download | scummvm-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')
-rw-r--r-- | engines/sci/graphics/compare.cpp | 11 |
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; |