aboutsummaryrefslogtreecommitdiff
path: root/engines/sword25/math
diff options
context:
space:
mode:
Diffstat (limited to 'engines/sword25/math')
-rwxr-xr-xengines/sword25/math/line.h2
-rwxr-xr-xengines/sword25/math/polygon.h2
-rwxr-xr-xengines/sword25/math/rect.h12
-rwxr-xr-xengines/sword25/math/region.h2
-rwxr-xr-xengines/sword25/math/vertex.h2
-rwxr-xr-xengines/sword25/math/walkregion.cpp14
-rwxr-xr-xengines/sword25/math/walkregion.h2
7 files changed, 18 insertions, 18 deletions
diff --git a/engines/sword25/math/line.h b/engines/sword25/math/line.h
index 7307efd380..7da4a94db7 100755
--- a/engines/sword25/math/line.h
+++ b/engines/sword25/math/line.h
@@ -97,7 +97,7 @@ public:
{
LEFT,
RIGHT,
- ON,
+ ON
};
/**
diff --git a/engines/sword25/math/polygon.h b/engines/sword25/math/polygon.h
index 2e294a328e..e1c9bf8cb5 100755
--- a/engines/sword25/math/polygon.h
+++ b/engines/sword25/math/polygon.h
@@ -249,4 +249,4 @@ private:
bool IsLineInCone(int StartVertexIndex, const BS_Vertex & EndVertex, bool IncludeEdges) const;
};
-#endif \ No newline at end of file
+#endif
diff --git a/engines/sword25/math/rect.h b/engines/sword25/math/rect.h
index 0d9ebf7c3c..9c42676d06 100755
--- a/engines/sword25/math/rect.h
+++ b/engines/sword25/math/rect.h
@@ -57,12 +57,12 @@ public:
@param right das rechte Extrem des Rechteckes + 1
@param bottom des untere Extrem des Rechteckes + 1
*/
- BS_Rect(int left, int top, int right, int bottom)
+ BS_Rect(int left_, int top_, int right_, int bottom_)
{
- this->left = left;
- this->top = top;
- this->right = right;
- this->bottom = bottom;
+ this->left = left_;
+ this->top = top_;
+ this->right = right_;
+ this->bottom = bottom_;
}
/**
@brief Verschiebt das Rechteck.
@@ -295,4 +295,4 @@ public:
}
};
-#endif \ No newline at end of file
+#endif
diff --git a/engines/sword25/math/region.h b/engines/sword25/math/region.h
index 4ce71a8561..701ac0d032 100755
--- a/engines/sword25/math/region.h
+++ b/engines/sword25/math/region.h
@@ -55,7 +55,7 @@ public:
enum REGION_TYPE
{
RT_REGION,
- RT_WALKREGION,
+ RT_WALKREGION
};
static unsigned int Create(REGION_TYPE Type);
diff --git a/engines/sword25/math/vertex.h b/engines/sword25/math/vertex.h
index 71253add89..8bb88fe816 100755
--- a/engines/sword25/math/vertex.h
+++ b/engines/sword25/math/vertex.h
@@ -41,7 +41,7 @@ class BS_Vertex
{
public:
BS_Vertex() : X(0), Y(0) {};
- BS_Vertex(int X, int Y) { this->X = X; this->Y = Y; }
+ BS_Vertex(int X_, int Y_) { this->X = X_; this->Y = Y_; }
int X;
int Y;
diff --git a/engines/sword25/math/walkregion.cpp b/engines/sword25/math/walkregion.cpp
index ebf4a3e541..e75383191a 100755
--- a/engines/sword25/math/walkregion.cpp
+++ b/engines/sword25/math/walkregion.cpp
@@ -30,7 +30,7 @@
// Konstanten
// -----------------------------------------------------------------------------
-static const int INFINITY = INT_MAX;
+static const int infinity = INT_MAX;
// -----------------------------------------------------------------------------
// Konstruktion / Destruktion
@@ -103,7 +103,7 @@ struct DijkstraNode
typedef Container::iterator Iter;
typedef Container::const_iterator ConstIter;
- DijkstraNode() : Cost(INFINITY), Chosen(false) {};
+ DijkstraNode() : Cost(infinity), Chosen(false) {};
ConstIter ParentIter;
int Cost;
bool Chosen;
@@ -127,7 +127,7 @@ static void InitDijkstraNodes(DijkstraNode::Container & DijkstraNodes, const BS_
static DijkstraNode::Iter ChooseClosestNode(DijkstraNode::Container & Nodes)
{
DijkstraNode::Iter ClosestNodeInter = Nodes.end();
- int MinCost = INFINITY;
+ int MinCost = infinity;
for (DijkstraNode::Iter iter = Nodes.begin(); iter != Nodes.end(); iter++)
{
@@ -152,7 +152,7 @@ static void RelaxNodes(DijkstraNode::Container & Nodes,
for (unsigned int i = 0; i < Nodes.size(); i++)
{
int Cost = VisibilityMatrix[CurNodeIndex][i];
- if (!Nodes[i].Chosen && Cost != INFINITY)
+ if (!Nodes[i].Chosen && Cost != infinity)
{
int TotalCost = (*CurNodeIter).Cost + Cost;
if (TotalCost < Nodes[i].Cost)
@@ -268,7 +268,7 @@ void BS_WalkRegion::InitNodeVector()
void BS_WalkRegion::ComputeVisibilityMatrix()
{
// Sichtbarkeitsmatrix initialisieren
- m_VisibilityMatrix = std::vector< std::vector <int> >(m_Nodes.size(), std::vector<int>(m_Nodes.size(), INFINITY));
+ m_VisibilityMatrix = std::vector< std::vector <int> >(m_Nodes.size(), std::vector<int>(m_Nodes.size(), infinity));
// Sichtbarkeiten zwischen Vertecies berechnen und in die Sichbarkeitsmatrix eintragen.
for (unsigned int j = 0; j < m_Nodes.size(); ++j)
@@ -285,8 +285,8 @@ void BS_WalkRegion::ComputeVisibilityMatrix()
else
{
// Wenn keine Sichtlinie besteht wird die Entfernung "unendlich" eingetragen
- m_VisibilityMatrix[i][j] = INFINITY;
- m_VisibilityMatrix[j][i] = INFINITY;
+ m_VisibilityMatrix[i][j] = infinity;
+ m_VisibilityMatrix[j][i] = infinity;
}
}
}
diff --git a/engines/sword25/math/walkregion.h b/engines/sword25/math/walkregion.h
index b07f2dbae8..25ded2ff4b 100755
--- a/engines/sword25/math/walkregion.h
+++ b/engines/sword25/math/walkregion.h
@@ -42,7 +42,7 @@ typedef std::vector<BS_Vertex> BS_Path;
*/
class BS_WalkRegion : public BS_Region
{
- friend BS_Region;
+ friend class BS_Region;
protected:
BS_WalkRegion();