diff options
Diffstat (limited to 'engines/sword25/math')
-rw-r--r-- | engines/sword25/math/geometry.cpp | 7 | ||||
-rw-r--r-- | engines/sword25/math/region.cpp | 4 | ||||
-rw-r--r-- | engines/sword25/math/regionregistry.cpp | 6 | ||||
-rw-r--r-- | engines/sword25/math/walkregion.cpp | 6 |
4 files changed, 8 insertions, 15 deletions
diff --git a/engines/sword25/math/geometry.cpp b/engines/sword25/math/geometry.cpp index bad6fcdb06..cf3adae60a 100644 --- a/engines/sword25/math/geometry.cpp +++ b/engines/sword25/math/geometry.cpp @@ -32,17 +32,16 @@ * */ +#include "sword25/sword25.h" // for kDebugScript #include "sword25/math/geometry.h" namespace Sword25 { -#define BS_LOG_PREFIX "GEOMETRY" - Geometry::Geometry(Kernel *pKernel) : Service(pKernel) { if (!registerScriptBindings()) - BS_LOG_ERRORLN("Script bindings could not be registered."); + error("Script bindings could not be registered."); else - BS_LOGLN("Script bindings registered."); + debugC(kDebugScript, "Script bindings registered."); } diff --git a/engines/sword25/math/region.cpp b/engines/sword25/math/region.cpp index ae9b76d077..ae729c4de3 100644 --- a/engines/sword25/math/region.cpp +++ b/engines/sword25/math/region.cpp @@ -39,8 +39,6 @@ #include "sword25/math/walkregion.h" #include "sword25/math/regionregistry.h" -#define BS_LOG_PREFIX "REGION" - namespace Sword25 { Region::Region() : _valid(false), _type(RT_REGION) { @@ -261,7 +259,7 @@ Vertex Region::findClosestRegionPoint(const Vertex &point) const { } } - BS_LOG_WARNINGLN("Clostest vertex forced because edgepoint was outside region."); + warning("Clostest vertex forced because edgepoint was outside region."); return closestVertex; } } diff --git a/engines/sword25/math/regionregistry.cpp b/engines/sword25/math/regionregistry.cpp index c1fd6e98a8..f11f45540f 100644 --- a/engines/sword25/math/regionregistry.cpp +++ b/engines/sword25/math/regionregistry.cpp @@ -32,8 +32,6 @@ * */ -#define BS_LOG_PREFIX "REGIONREGISTRY" - #include "sword25/kernel/outputpersistenceblock.h" #include "sword25/kernel/inputpersistenceblock.h" #include "sword25/math/regionregistry.h" @@ -44,11 +42,11 @@ DECLARE_SINGLETON(Sword25::RegionRegistry); namespace Sword25 { void RegionRegistry::logErrorLn(const char *message) const { - BS_LOG_ERRORLN(message); + error(message); } void RegionRegistry::logWarningLn(const char *message) const { - BS_LOG_WARNINGLN(message); + warning(message); } bool RegionRegistry::persist(OutputPersistenceBlock &writer) { diff --git a/engines/sword25/math/walkregion.cpp b/engines/sword25/math/walkregion.cpp index da24883466..23f0e4e2ca 100644 --- a/engines/sword25/math/walkregion.cpp +++ b/engines/sword25/math/walkregion.cpp @@ -38,8 +38,6 @@ #include "sword25/math/walkregion.h" #include "sword25/math/line.h" -#define BS_LOG_PREFIX "WALKREGION" - namespace Sword25 { static const int Infinity = 0x7fffffff; @@ -285,7 +283,7 @@ bool WalkRegion::checkAndPrepareStartAndEnd(Vertex &start, Vertex &end) const { // Check to make sure the point is really in the region. If not, stop with an error if (!isPointInRegion(newStart)) { - BS_LOG_ERRORLN("Constructed startpoint ((%d,%d) from (%d,%d)) is not inside the region.", + error("Constructed startpoint ((%d,%d) from (%d,%d)) is not inside the region.", newStart.x, newStart.y, start.x, start.y); return false; @@ -301,7 +299,7 @@ bool WalkRegion::checkAndPrepareStartAndEnd(Vertex &start, Vertex &end) const { // Make sure that the determined point is really within the region if (!isPointInRegion(newEnd)) { - BS_LOG_ERRORLN("Constructed endpoint ((%d,%d) from (%d,%d)) is not inside the region.", + error("Constructed endpoint ((%d,%d) from (%d,%d)) is not inside the region.", newEnd.x, newEnd.y, end.x, end.y); return false; |