[Scummvm-cvs-logs] SF.net SVN: scummvm:[47920] scummvm/trunk/engines/sci/graphics
fingolfin at users.sourceforge.net
fingolfin at users.sourceforge.net
Fri Feb 5 23:56:06 CET 2010
Revision: 47920
http://scummvm.svn.sourceforge.net/scummvm/?rev=47920&view=rev
Author: fingolfin
Date: 2010-02-05 22:56:05 +0000 (Fri, 05 Feb 2010)
Log Message:
-----------
SCI: Document GfxCompare::canBeHereCheckRectList; pass Common::Rect by ref
Modified Paths:
--------------
scummvm/trunk/engines/sci/graphics/compare.cpp
scummvm/trunk/engines/sci/graphics/compare.h
Modified: scummvm/trunk/engines/sci/graphics/compare.cpp
===================================================================
--- scummvm/trunk/engines/sci/graphics/compare.cpp 2010-02-05 22:55:41 UTC (rev 47919)
+++ scummvm/trunk/engines/sci/graphics/compare.cpp 2010-02-05 22:56:05 UTC (rev 47920)
@@ -46,7 +46,7 @@
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 @@
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 @@
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);
Modified: scummvm/trunk/engines/sci/graphics/compare.h
===================================================================
--- scummvm/trunk/engines/sci/graphics/compare.h 2010-02-05 22:55:41 UTC (rev 47919)
+++ scummvm/trunk/engines/sci/graphics/compare.h 2010-02-05 22:56:05 UTC (rev 47920)
@@ -42,10 +42,7 @@
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 @@
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
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list