summaryrefslogtreecommitdiffstats
path: root/src/ui/map.h
diff options
context:
space:
mode:
authorPiotr Dziwinski <piotrdz@gmail.com>2012-06-13 22:48:35 +0200
committerPiotr Dziwinski <piotrdz@gmail.com>2012-06-13 22:48:35 +0200
commitb735913debff93c1a6444ec731cd4bf99ae2a5c2 (patch)
treeefa532d3b4231e5ffd6df8eddcb0ec8cf5d4b28b /src/ui/map.h
parentb5d16ef340208bbe1a76f33f7498fb168f6405b6 (diff)
downloadcolobot-b735913debff93c1a6444ec731cd4bf99ae2a5c2.tar.gz
colobot-b735913debff93c1a6444ec731cd4bf99ae2a5c2.tar.bz2
colobot-b735913debff93c1a6444ec731cd4bf99ae2a5c2.zip
FPOINT -> Math::Point & other math functions
- changed FPOINT to Math::Point and some functions from math module to the new implementation - moved old function and FPOINT struct declarations to math3d.cpp - removed some unused functions in math module - fixed some #include dependencies - moved #define STRICT and #define D3D_OVERLOADS to compile options
Diffstat (limited to 'src/ui/map.h')
-rw-r--r--src/ui/map.h33
1 files changed, 16 insertions, 17 deletions
diff --git a/src/ui/map.h b/src/ui/map.h
index f2df265..9551d12 100644
--- a/src/ui/map.h
+++ b/src/ui/map.h
@@ -20,7 +20,6 @@
#include "ui/control.h"
-#include "common/struct.h"
#include "object/object.h"
@@ -54,7 +53,7 @@ struct MapObject
CObject* object;
MapColor color;
ObjectType type;
- FPOINT pos;
+ Math::Point pos;
float dir;
};
@@ -66,7 +65,7 @@ public:
CMap(CInstanceManager* iMan);
~CMap();
- bool Create(FPOINT pos, FPOINT dim, int icon, EventMsg eventMsg);
+ bool Create(Math::Point pos, Math::Point dim, int icon, EventMsg eventMsg);
bool EventProcess(const Event &event);
void Draw();
@@ -94,20 +93,20 @@ public:
void FlushObject();
void UpdateObject(CObject* pObj);
- CObject* DetectObject(FPOINT pos, bool &bInMap);
+ CObject* DetectObject(Math::Point pos, bool &bInMap);
void SetHilite(CObject* pObj);
protected:
- FPOINT AdjustOffset(FPOINT offset);
- void SelectObject(FPOINT pos);
- FPOINT MapInter(FPOINT pos, float dir);
- void DrawFocus(FPOINT pos, float dir, ObjectType type, MapColor color);
- void DrawObject(FPOINT pos, float dir, ObjectType type, MapColor color, bool bSelect, bool bHilite);
- void DrawObjectIcon(FPOINT pos, FPOINT dim, MapColor color, ObjectType type, bool bHilite);
- void DrawHilite(FPOINT pos);
- void DrawTriangle(FPOINT p1, FPOINT p2, FPOINT p3, FPOINT uv1, FPOINT uv2);
- void DrawPenta(FPOINT p1, FPOINT p2, FPOINT p3, FPOINT p4, FPOINT p5, FPOINT uv1, FPOINT uv2);
- void DrawVertex(FPOINT uv1, FPOINT uv2, float zoom);
+ Math::Point AdjustOffset(Math::Point offset);
+ void SelectObject(Math::Point pos);
+ Math::Point MapInter(Math::Point pos, float dir);
+ void DrawFocus(Math::Point pos, float dir, ObjectType type, MapColor color);
+ void DrawObject(Math::Point pos, float dir, ObjectType type, MapColor color, bool bSelect, bool bHilite);
+ void DrawObjectIcon(Math::Point pos, Math::Point dim, MapColor color, ObjectType type, bool bHilite);
+ void DrawHilite(Math::Point pos);
+ void DrawTriangle(Math::Point p1, Math::Point p2, Math::Point p3, Math::Point uv1, Math::Point uv2);
+ void DrawPenta(Math::Point p1, Math::Point p2, Math::Point p3, Math::Point p4, Math::Point p5, Math::Point uv1, Math::Point uv2);
+ void DrawVertex(Math::Point uv1, Math::Point uv2, float zoom);
protected:
CTerrain* m_terrain;
@@ -118,7 +117,7 @@ protected:
float m_time;
float m_half;
float m_zoom;
- FPOINT m_offset;
+ Math::Point m_offset;
float m_angle;
D3DCOLORVALUE m_floorColor;
D3DCOLORVALUE m_waterColor;
@@ -126,8 +125,8 @@ protected:
int m_totalFix;
int m_totalMove;
int m_hiliteRank;
- FPOINT m_mapPos;
- FPOINT m_mapDim;
+ Math::Point m_mapPos;
+ Math::Point m_mapDim;
bool m_bRadar;
char m_fixImage[100];
int m_mode;