summaryrefslogtreecommitdiffstats
path: root/src/common
diff options
context:
space:
mode:
Diffstat (limited to 'src/common')
-rw-r--r--src/common/event.cpp2
-rw-r--r--src/common/event.h4
-rw-r--r--src/common/global.h2
-rw-r--r--src/common/iman.cpp2
-rw-r--r--src/common/metafile.cpp2
-rw-r--r--src/common/misc.cpp2
-rw-r--r--src/common/modfile.cpp14
-rw-r--r--src/common/profile.cpp2
-rw-r--r--src/common/restext.cpp2
-rw-r--r--src/common/restext.h2
-rw-r--r--src/common/struct.h14
11 files changed, 10 insertions, 38 deletions
diff --git a/src/common/event.cpp b/src/common/event.cpp
index 1d56e8a..b323e43 100644
--- a/src/common/event.cpp
+++ b/src/common/event.cpp
@@ -16,8 +16,6 @@
// event.cpp
-#define STRICT
-#define D3D_OVERLOADS
#include <windows.h>
#include <stdio.h>
diff --git a/src/common/event.h b/src/common/event.h
index bf17934..0dc6ced 100644
--- a/src/common/event.h
+++ b/src/common/event.h
@@ -19,7 +19,7 @@
#pragma once
-#include "common/struct.h"
+#include "math/point.h"
#if !defined (WM_XBUTTONDOWN)
@@ -532,7 +532,7 @@ struct Event
{
EventMsg event; // event (EVENT *)
long param; // parameter
- FPOINT pos; // mouse position (0 .. 1)
+ Math::Point pos; // mouse position (0 .. 1)
float axeX; // control the X axis (-1 .. 1)
float axeY; // control of the Y axis (-1 .. 1)
float axeZ; // control the Z axis (-1 .. 1)
diff --git a/src/common/global.h b/src/common/global.h
index 212b8b4..0429cc1 100644
--- a/src/common/global.h
+++ b/src/common/global.h
@@ -16,6 +16,8 @@
// global.h
+#pragma once
+
enum BuildType
{
diff --git a/src/common/iman.cpp b/src/common/iman.cpp
index c6313e0..139f56a 100644
--- a/src/common/iman.cpp
+++ b/src/common/iman.cpp
@@ -16,8 +16,6 @@
// iman.cpp
-#define STRICT
-#define D3D_OVERLOADS
#include <windows.h>
#include <stdio.h>
diff --git a/src/common/metafile.cpp b/src/common/metafile.cpp
index 74bcc3d..7a67931 100644
--- a/src/common/metafile.cpp
+++ b/src/common/metafile.cpp
@@ -16,8 +16,6 @@
// metafile.cpp
-#define STRICT
-#define D3D_OVERLOADS
#include <windows.h>
#include <stdio.h>
diff --git a/src/common/misc.cpp b/src/common/misc.cpp
index f58527f..65b8031 100644
--- a/src/common/misc.cpp
+++ b/src/common/misc.cpp
@@ -16,8 +16,6 @@
// misc.cpp
-#define STRICT
-#define D3D_OVERLOADS
#include <math.h>
#include <stdlib.h>
diff --git a/src/common/modfile.cpp b/src/common/modfile.cpp
index ddda0d8..79d6612 100644
--- a/src/common/modfile.cpp
+++ b/src/common/modfile.cpp
@@ -16,8 +16,6 @@
// modfile.cpp
-#define STRICT
-#define D3D_OVERLOADS
#include <windows.h>
#include <stdio.h>
@@ -671,20 +669,20 @@ float CModFile::RetHeight(D3DVECTOR pos)
{
if ( !m_triangleTable[i].bUsed ) continue;
- if ( Abs(pos.x-m_triangleTable[i].p1.x) < limit &&
- Abs(pos.z-m_triangleTable[i].p1.z) < limit )
+ if ( fabs(pos.x-m_triangleTable[i].p1.x) < limit &&
+ fabs(pos.z-m_triangleTable[i].p1.z) < limit )
{
return m_triangleTable[i].p1.y;
}
- if ( Abs(pos.x-m_triangleTable[i].p2.x) < limit &&
- Abs(pos.z-m_triangleTable[i].p2.z) < limit )
+ if ( fabs(pos.x-m_triangleTable[i].p2.x) < limit &&
+ fabs(pos.z-m_triangleTable[i].p2.z) < limit )
{
return m_triangleTable[i].p2.y;
}
- if ( Abs(pos.x-m_triangleTable[i].p3.x) < limit &&
- Abs(pos.z-m_triangleTable[i].p3.z) < limit )
+ if ( fabs(pos.x-m_triangleTable[i].p3.x) < limit &&
+ fabs(pos.z-m_triangleTable[i].p3.z) < limit )
{
return m_triangleTable[i].p3.y;
}
diff --git a/src/common/profile.cpp b/src/common/profile.cpp
index ab7904b..9f3de54 100644
--- a/src/common/profile.cpp
+++ b/src/common/profile.cpp
@@ -16,8 +16,6 @@
// profile.cpp
-#define STRICT
-#define D3D_OVERLOADS
#include <stdio.h>
#include <d3d.h>
diff --git a/src/common/restext.cpp b/src/common/restext.cpp
index 725a96a..d8ac63f 100644
--- a/src/common/restext.cpp
+++ b/src/common/restext.cpp
@@ -14,8 +14,6 @@
// * You should have received a copy of the GNU General Public License
// * along with this program. If not, see http://www.gnu.org/licenses/.// restext.cpp
-#define STRICT
-#define D3D_OVERLOADS
#include <stdio.h>
#include "common/struct.h"
diff --git a/src/common/restext.h b/src/common/restext.h
index 481255f..ab48a12 100644
--- a/src/common/restext.h
+++ b/src/common/restext.h
@@ -19,8 +19,6 @@
#pragma once
-#define STRICT
-#define D3D_OVERLOADS
#include "graphics/d3d/d3dengine.h"
diff --git a/src/common/struct.h b/src/common/struct.h
index 901651f..76594fe 100644
--- a/src/common/struct.h
+++ b/src/common/struct.h
@@ -48,20 +48,6 @@ struct D3DVERTEX2
};
-struct FPOINT
-{
- float x;
- float y;
-
- FPOINT() { }
- FPOINT(float _x, float _y)
- {
- x = _x;
- y = _y;
- }
-};
-
-
struct ColorHSV
{
float h,s,v;