From b735913debff93c1a6444ec731cd4bf99ae2a5c2 Mon Sep 17 00:00:00 2001 From: Piotr Dziwinski Date: Wed, 13 Jun 2012 22:48:35 +0200 Subject: 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 --- src/ui/group.cpp | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) (limited to 'src/ui/group.cpp') 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 #include @@ -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? -- cgit v1.2.3-1-g7c22