diff options
author | Max Horn | 2010-02-05 22:56:05 +0000 |
---|---|---|
committer | Max Horn | 2010-02-05 22:56:05 +0000 |
commit | b0b89e788b9fb5cbeb58c73f7adef4473f4211ed (patch) | |
tree | 5e944a227dd4c8e4132e60c782d365b2f79c53ce /engines/sci | |
parent | d2871f925af38da89362b45edac43dbed5c925f5 (diff) | |
download | scummvm-rg350-b0b89e788b9fb5cbeb58c73f7adef4473f4211ed.tar.gz scummvm-rg350-b0b89e788b9fb5cbeb58c73f7adef4473f4211ed.tar.bz2 scummvm-rg350-b0b89e788b9fb5cbeb58c73f7adef4473f4211ed.zip |
SCI: Document GfxCompare::canBeHereCheckRectList; pass Common::Rect by ref
svn-id: r47920
Diffstat (limited to 'engines/sci')
-rw-r--r-- | engines/sci/graphics/compare.cpp | 6 | ||||
-rw-r--r-- | engines/sci/graphics/compare.h | 14 |
2 files changed, 13 insertions, 7 deletions
diff --git a/engines/sci/graphics/compare.cpp b/engines/sci/graphics/compare.cpp index 697324f975..695752f409 100644 --- a/engines/sci/graphics/compare.cpp +++ b/engines/sci/graphics/compare.cpp @@ -46,7 +46,7 @@ GfxCompare::GfxCompare(SegManager *segMan, Kernel *kernel, GfxCache *cache, GfxS GfxCompare::~GfxCompare() { } -uint16 GfxCompare::isOnControl(uint16 screenMask, Common::Rect rect) { +uint16 GfxCompare::isOnControl(uint16 screenMask, const Common::Rect &rect) { int16 x, y; uint16 result = 0; @@ -76,7 +76,7 @@ static inline int sign_extend_byte(int value) { return value; } -bool GfxCompare::canBeHereCheckRectList(reg_t checkObject, Common::Rect checkRect, List *list) { +bool GfxCompare::canBeHereCheckRectList(reg_t checkObject, const Common::Rect &checkRect, List *list) { reg_t curAddress = list->first; Node *curNode = _segMan->lookupNode(curAddress); reg_t curObject; @@ -112,7 +112,7 @@ bool GfxCompare::canBeHereCheckRectList(reg_t checkObject, Common::Rect checkRec return true; } -uint16 GfxCompare::kernelOnControl(byte screenMask, Common::Rect rect) { +uint16 GfxCompare::kernelOnControl(byte screenMask, const Common::Rect &rect) { Common::Rect adjustedRect = _coordAdjuster->onControl(rect); uint16 result = isOnControl(screenMask, adjustedRect); diff --git a/engines/sci/graphics/compare.h b/engines/sci/graphics/compare.h index 51752b9513..348d5ef723 100644 --- a/engines/sci/graphics/compare.h +++ b/engines/sci/graphics/compare.h @@ -42,10 +42,7 @@ public: GfxCompare(SegManager *segMan, Kernel *kernel, GfxCache *cache, GfxScreen *screen, GfxCoordAdjuster *coordAdjuster); ~GfxCompare(); - uint16 isOnControl(uint16 screenMask, Common::Rect rect); - bool canBeHereCheckRectList(reg_t checkObject, Common::Rect checkRect, List *list); - - uint16 kernelOnControl(byte screenMask, Common::Rect rect); + uint16 kernelOnControl(byte screenMask, const Common::Rect &rect); void kernelSetNowSeen(reg_t objectReference); bool kernelCanBeHere(reg_t curObject, reg_t listReference); bool kernelIsItSkip(GuiResourceId viewId, int16 loopNo, int16 celNo, Common::Point position); @@ -57,6 +54,15 @@ private: GfxCache *_cache; GfxScreen *_screen; GfxCoordAdjuster *_coordAdjuster; + + uint16 isOnControl(uint16 screenMask, const Common::Rect &rect); + + /** + * This function checks whether any of the objects in the given list, + * *different* from checkObject, has a brRect which is contained inside + * checkRect. + */ + bool canBeHereCheckRectList(reg_t checkObject, const Common::Rect &checkRect, List *list); }; } // End of namespace Sci |