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/list.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/list.cpp')
-rw-r--r-- | src/ui/list.cpp | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/src/ui/list.cpp b/src/ui/list.cpp index be9dbda..f924fde 100644 --- a/src/ui/list.cpp +++ b/src/ui/list.cpp @@ -16,8 +16,6 @@ // list.cpp
-#define STRICT
-#define D3D_OVERLOADS
#include <windows.h>
#include <stdio.h>
@@ -90,7 +88,7 @@ CList::~CList() // Creates a new list.
-bool CList::Create(FPOINT pos, FPOINT dim, int icon, EventMsg eventMsg,
+bool CList::Create(Math::Point pos, Math::Point dim, int icon, EventMsg eventMsg,
float expand)
{
m_expand = expand;
@@ -109,7 +107,7 @@ bool CList::Create(FPOINT pos, FPOINT dim, int icon, EventMsg eventMsg, bool CList::MoveAdjust()
{
- FPOINT ipos, idim, ppos, ddim;
+ Math::Point ipos, idim, ppos, ddim;
float marging, h;
int i;
@@ -186,12 +184,12 @@ EventMsg CList::RetEventMsgScroll() }
-void CList::SetPos(FPOINT pos)
+void CList::SetPos(Math::Point pos)
{
CControl::SetPos(pos);
}
-void CList::SetDim(FPOINT dim)
+void CList::SetDim(Math::Point dim)
{
m_dim = dim;
MoveAdjust();
@@ -263,7 +261,7 @@ bool CList::EventProcess(const Event &event) m_button[i] != 0 )
{
m_blinkTime += event.rTime;
- if ( Mod(m_blinkTime, 0.7f) < 0.3f )
+ if ( Math::Mod(m_blinkTime, 0.7f) < 0.3f )
{
m_button[i]->ClearState(STATE_ENABLE);
m_button[i]->ClearState(STATE_CHECK);
@@ -353,7 +351,7 @@ bool CList::EventProcess(const Event &event) void CList::Draw()
{
- FPOINT uv1, uv2, corner, pos, dim, ppos, ddim;
+ Math::Point uv1, uv2, corner, pos, dim, ppos, ddim;
float dp;
int i, j;
char text[100];
@@ -555,7 +553,7 @@ void CList::Draw() // Displays text in a box.
-void CList::DrawCase(char *text, FPOINT pos, float width, int justif)
+void CList::DrawCase(char *text, Math::Point pos, float width, int justif)
{
if ( justif == 1 )
{
|