diff options
author | Piotr Dziwinski <piotrdz@gmail.com> | 2012-06-13 22:48:35 +0200 |
---|---|---|
committer | Piotr Dziwinski <piotrdz@gmail.com> | 2012-06-13 22:48:35 +0200 |
commit | b735913debff93c1a6444ec731cd4bf99ae2a5c2 (patch) | |
tree | efa532d3b4231e5ffd6df8eddcb0ec8cf5d4b28b /src/ui/group.cpp | |
parent | b5d16ef340208bbe1a76f33f7498fb168f6405b6 (diff) | |
download | colobot-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/group.cpp')
-rw-r--r-- | src/ui/group.cpp | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/src/ui/group.cpp b/src/ui/group.cpp index a19e39b..c77e131 100644 --- a/src/ui/group.cpp +++ b/src/ui/group.cpp @@ -16,8 +16,6 @@ // group.cpp
-#define STRICT
-#define D3D_OVERLOADS
#include <windows.h>
#include <stdio.h>
@@ -50,7 +48,7 @@ CGroup::~CGroup() // Creates a new button.
-bool CGroup::Create(FPOINT pos, FPOINT dim, int icon, EventMsg eventMsg)
+bool CGroup::Create(Math::Point pos, Math::Point dim, int icon, EventMsg eventMsg)
{
if ( eventMsg == EVENT_NULL ) eventMsg = GetUniqueEventMsg();
@@ -83,7 +81,7 @@ bool CGroup::EventProcess(const Event &event) void CGroup::Draw()
{
- FPOINT uv1,uv2, corner, pos, dim;
+ Math::Point uv1,uv2, corner, pos, dim;
float dp;
int icon;
@@ -283,13 +281,13 @@ void CGroup::Draw() uv2.y = 255.5f/256.0f;
DrawIcon(pos, dim, uv1, uv2); // ul
pos.x += dim.x;
- Swap(uv1.x, uv2.x);
+ Math::Swap(uv1.x, uv2.x);
DrawIcon(pos, dim, uv1, uv2); // ur
pos.y -= dim.y;
- Swap(uv1.y, uv2.y);
+ Math::Swap(uv1.y, uv2.y);
DrawIcon(pos, dim, uv1, uv2); // dr
pos.x -= dim.x;
- Swap(uv1.x, uv2.x);
+ Math::Swap(uv1.x, uv2.x);
DrawIcon(pos, dim, uv1, uv2); // dl
m_engine->SetState(D3DSTATETTw);
@@ -301,13 +299,13 @@ void CGroup::Draw() uv2.y = 255.5f/256.0f;
DrawIcon(pos, dim, uv1, uv2); // ul
pos.x += dim.x;
- Swap(uv1.x, uv2.x);
+ Math::Swap(uv1.x, uv2.x);
DrawIcon(pos, dim, uv1, uv2); // ur
pos.y -= dim.y;
- Swap(uv1.y, uv2.y);
+ Math::Swap(uv1.y, uv2.y);
DrawIcon(pos, dim, uv1, uv2); // dr
pos.x -= dim.x;
- Swap(uv1.x, uv2.x);
+ Math::Swap(uv1.x, uv2.x);
DrawIcon(pos, dim, uv1, uv2); // dl
}
if ( m_icon == 13 ) // corner upper / left?
|