summaryrefslogtreecommitdiffstats
path: root/src/ui/shortcut.cpp
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/shortcut.cpp
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/shortcut.cpp')
-rw-r--r--src/ui/shortcut.cpp12
1 files changed, 5 insertions, 7 deletions
diff --git a/src/ui/shortcut.cpp b/src/ui/shortcut.cpp
index 7022bf2..c96cc92 100644
--- a/src/ui/shortcut.cpp
+++ b/src/ui/shortcut.cpp
@@ -16,8 +16,6 @@
// shortcut.cpp
-#define STRICT
-#define D3D_OVERLOADS
#include <windows.h>
#include <stdio.h>
@@ -50,7 +48,7 @@ CShortcut::~CShortcut()
// Creates a new button.
-bool CShortcut::Create(FPOINT pos, FPOINT dim, int icon, EventMsg eventMsg)
+bool CShortcut::Create(Math::Point pos, Math::Point dim, int icon, EventMsg eventMsg)
{
if ( eventMsg == EVENT_NULL ) eventMsg = GetUniqueEventMsg();
@@ -132,7 +130,7 @@ void CShortcut::Draw()
if ( m_state & STATE_FRAME )
{
- FPOINT p1, p2, c, uv1, uv2;
+ Math::Point p1, p2, c, uv1, uv2;
float zoom, dp;
m_engine->SetTexture("button2.tga");
@@ -170,9 +168,9 @@ void CShortcut::Draw()
DrawIcon(p1, p2, uv1, uv2);
}
- if ( (m_state & STATE_RUN) && Mod(m_time, 0.7f) >= 0.3f )
+ if ( (m_state & STATE_RUN) && Math::Mod(m_time, 0.7f) >= 0.3f )
{
- FPOINT uv1, uv2;
+ Math::Point uv1, uv2;
float dp;
m_engine->SetTexture("button3.tga");
@@ -199,7 +197,7 @@ void CShortcut::DrawVertex(int icon, float zoom)
{
LPDIRECT3DDEVICE7 device;
D3DVERTEX2 vertex[4]; // 2 triangles
- FPOINT p1, p2, c;
+ Math::Point p1, p2, c;
D3DVECTOR n;
float u1, u2, v1, v2, dp;