SCI: Document GfxCompare::canBeHereCheckRectList; pass Common::Rect by ref
svn-id: r47920
This commit is contained in:
parent
d2871f925a
commit
b0b89e788b
2 changed files with 13 additions and 7 deletions
|
@ -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);
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue