summaryrefslogtreecommitdiffstats
path: root/src/ui/key.cpp
diff options
context:
space:
mode:
authorPiotr Dziwinski <piotrdz@gmail.com>2012-06-10 15:28:12 +0200
committerPiotr Dziwinski <piotrdz@gmail.com>2012-06-10 15:28:12 +0200
commit697fbdabf10d956e0f13bfbc9414d3db40f0c535 (patch)
treeab80ba3119d07b11da5478009b905edb702c103f /src/ui/key.cpp
parent680af178196217bdd255d2bc851f240983144ac1 (diff)
downloadcolobot-697fbdabf10d956e0f13bfbc9414d3db40f0c535.tar.gz
colobot-697fbdabf10d956e0f13bfbc9414d3db40f0c535.tar.bz2
colobot-697fbdabf10d956e0f13bfbc9414d3db40f0c535.zip
BOOL -> bool; additional fixes in constructors/destructors
Diffstat (limited to 'src/ui/key.cpp')
-rw-r--r--src/ui/key.cpp26
1 files changed, 13 insertions, 13 deletions
diff --git a/src/ui/key.cpp b/src/ui/key.cpp
index 8a68439..d996244 100644
--- a/src/ui/key.cpp
+++ b/src/ui/key.cpp
@@ -66,7 +66,7 @@ CKey::CKey(CInstanceManager* iMan) : CControl(iMan)
{
m_key[0] = 0;
m_key[1] = 0;
- m_bCatch = FALSE;
+ m_bCatch = false;
}
// Object's destructor.
@@ -78,7 +78,7 @@ CKey::~CKey()
// Creates a new button.
-BOOL CKey::Create(FPOINT pos, FPOINT dim, int icon, EventMsg eventMsg)
+bool CKey::Create(FPOINT pos, FPOINT dim, int icon, EventMsg eventMsg)
{
char name[100];
char* p;
@@ -92,15 +92,15 @@ BOOL CKey::Create(FPOINT pos, FPOINT dim, int icon, EventMsg eventMsg)
if ( p != 0 ) *p = 0;
SetName(name);
- return TRUE;
+ return true;
}
// Management of an event.
-BOOL CKey::EventProcess(const Event &event)
+bool CKey::EventProcess(const Event &event)
{
- if ( m_state & STATE_DEAD ) return TRUE;
+ if ( m_state & STATE_DEAD ) return true;
CControl::EventProcess(event);
@@ -108,17 +108,17 @@ BOOL CKey::EventProcess(const Event &event)
{
if ( Detect(event.pos) )
{
- m_bCatch = TRUE;
+ m_bCatch = true;
}
else
{
- m_bCatch = FALSE;
+ m_bCatch = false;
}
}
if ( event.event == EVENT_KEYDOWN && m_bCatch )
{
- m_bCatch = FALSE;
+ m_bCatch = false;
if ( TestKey(event.param) ) // impossible ?
{
@@ -143,21 +143,21 @@ BOOL CKey::EventProcess(const Event &event)
newEvent.event = m_eventMsg;
m_event->AddEvent(newEvent);
}
- return FALSE;
+ return false;
}
- return TRUE;
+ return true;
}
// Seeks when a key is already used.
-BOOL CKey::TestKey(int key)
+bool CKey::TestKey(int key)
{
int i, j;
if ( key == VK_PAUSE ||
- key == VK_SNAPSHOT ) return TRUE; // blocked key
+ key == VK_SNAPSHOT ) return true; // blocked key
for ( i=0 ; i<20 ; i++ )
{
@@ -176,7 +176,7 @@ BOOL CKey::TestKey(int key)
}
}
- return FALSE; // not used
+ return false; // not used
}