[Scummvm-cvs-logs] SF.net SVN: scummvm:[53215] scummvm/trunk/engines/sword25
sev at users.sourceforge.net
sev at users.sourceforge.net
Wed Oct 13 00:27:32 CEST 2010
Revision: 53215
http://scummvm.svn.sourceforge.net/scummvm/?rev=53215&view=rev
Author: sev
Date: 2010-10-12 22:27:32 +0000 (Tue, 12 Oct 2010)
Log Message:
-----------
SWORD25: Fix compilation and several warnings
Modified Paths:
--------------
scummvm/trunk/engines/sword25/gfx/renderobjectregistry.h
scummvm/trunk/engines/sword25/kernel/objectregistry.h
scummvm/trunk/engines/sword25/math/geometry_script.cpp
scummvm/trunk/engines/sword25/math/rect.h
Modified: scummvm/trunk/engines/sword25/gfx/renderobjectregistry.h
===================================================================
--- scummvm/trunk/engines/sword25/gfx/renderobjectregistry.h 2010-10-12 22:27:03 UTC (rev 53214)
+++ scummvm/trunk/engines/sword25/gfx/renderobjectregistry.h 2010-10-12 22:27:32 UTC (rev 53215)
@@ -54,8 +54,6 @@
class BS_RenderObject;
-namespace Sword25 {
-
// -----------------------------------------------------------------------------
// Klassendeklaration
// -----------------------------------------------------------------------------
Modified: scummvm/trunk/engines/sword25/kernel/objectregistry.h
===================================================================
--- scummvm/trunk/engines/sword25/kernel/objectregistry.h 2010-10-12 22:27:03 UTC (rev 53214)
+++ scummvm/trunk/engines/sword25/kernel/objectregistry.h 2010-10-12 22:27:32 UTC (rev 53215)
@@ -169,7 +169,7 @@
T *FindPtrByHandle(unsigned int Handle) {
// Zum Handle geh\xF6rigen Pointer finden.
- HANDLE2PTR_MAP::const_iterator it = m_Handle2PtrMap.find(Handle);
+ typename HANDLE2PTR_MAP::const_iterator it = m_Handle2PtrMap.find(Handle);
// Pointer zur\xFCckgeben, oder, falls keiner gefunden wurde, 0 zur\xFCckgeben.
return (it != m_Handle2PtrMap.end()) ? it->_value : 0;
@@ -179,7 +179,7 @@
unsigned int FindHandleByPtr(T *ObjectPtr) {
// Zum Pointer geh\xF6riges Handle finden.
- PTR2HANDLE_MAP::const_iterator it = m_Ptr2HandleMap.find(ObjectPtr);
+ typename PTR2HANDLE_MAP::const_iterator it = m_Ptr2HandleMap.find(ObjectPtr);
// Handle zur\xFCckgeben, oder, falls keines gefunden wurde, 0 zur\xFCckgeben.
return (it != m_Ptr2HandleMap.end()) ? it->_value : 0;
Modified: scummvm/trunk/engines/sword25/math/geometry_script.cpp
===================================================================
--- scummvm/trunk/engines/sword25/math/geometry_script.cpp 2010-10-12 22:27:03 UTC (rev 53214)
+++ scummvm/trunk/engines/sword25/math/geometry_script.cpp 2010-10-12 22:27:32 UTC (rev 53215)
@@ -301,9 +301,9 @@
static const char *GEO_LIBRARY_NAME = "Geo";
static const luaL_reg GEO_FUNCTIONS[] = {
- "NewRegion", NewRegion,
- "NewWalkRegion", NewWalkRegion,
- 0, 0,
+ {"NewRegion", NewRegion},
+ {"NewWalkRegion", NewWalkRegion},
+ {0, 0}
};
// -----------------------------------------------------------------------------
@@ -477,17 +477,17 @@
// -----------------------------------------------------------------------------
static const luaL_reg REGION_METHODS[] = {
- "SetPos", R_SetPos,
- "SetX", R_SetX,
- "SetY", R_SetY,
- "GetPos", R_GetPos,
- "IsPointInRegion", R_IsPointInRegion,
- "GetX", R_GetX,
- "GetY", R_GetY,
- "IsValid", R_IsValid,
- "Draw", R_Draw,
- "GetCentroid", R_GetCentroid,
- 0, 0,
+ {"SetPos", R_SetPos},
+ {"SetX", R_SetX},
+ {"SetY", R_SetY},
+ {"GetPos", R_GetPos},
+ {"IsPointInRegion", R_IsPointInRegion},
+ {"GetX", R_GetX},
+ {"GetY", R_GetY},
+ {"IsValid", R_IsValid},
+ {"Draw", R_Draw},
+ {"GetCentroid", R_GetCentroid},
+ {0, 0}
};
// -----------------------------------------------------------------------------
@@ -533,8 +533,8 @@
// -----------------------------------------------------------------------------
static const luaL_reg WALKREGION_METHODS[] = {
- "GetPath", WR_GetPath,
- 0, 0,
+ {"GetPath", WR_GetPath},
+ {0, 0}
};
// -----------------------------------------------------------------------------
Modified: scummvm/trunk/engines/sword25/math/rect.h
===================================================================
--- scummvm/trunk/engines/sword25/math/rect.h 2010-10-12 22:27:03 UTC (rev 53214)
+++ scummvm/trunk/engines/sword25/math/rect.h 2010-10-12 22:27:32 UTC (rev 53215)
@@ -56,15 +56,17 @@
void Move(int DeltaX, int DeltaY) { translate(DeltaX, DeltaY); }
- bool DoesIntersect(const BS_Rect &Rect) const { return intersects(Rect); }
+ bool DoesIntersect(const BS_Rect &Rect_) const { return intersects(Rect_); }
- bool Intersect(const BS_Rect &Rect, BS_Rect &Result) const {
- Result = Rect;
+ bool Intersect(const BS_Rect &Rect_, BS_Rect &Result) const {
+ Result = Rect_;
Result.clip(*this);
+
+ return Result.isEmpty();
}
- void Join(const BS_Rect &Rect, BS_Rect &Result) const {
- Result = Rect;
+ void Join(const BS_Rect &Rect_, BS_Rect &Result) const {
+ Result = Rect_;
Result.extend(*this);
}
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