summaryrefslogtreecommitdiffstats
path: root/src/object/auto
diff options
context:
space:
mode:
Diffstat (limited to 'src/object/auto')
-rw-r--r--src/object/auto/auto.cpp60
-rw-r--r--src/object/auto/auto.h40
-rw-r--r--src/object/auto/autobase.cpp99
-rw-r--r--src/object/auto/autobase.h12
-rw-r--r--src/object/auto/autoconvert.cpp61
-rw-r--r--src/object/auto/autoconvert.h18
-rw-r--r--src/object/auto/autoderrick.cpp63
-rw-r--r--src/object/auto/autoderrick.h16
-rw-r--r--src/object/auto/autodestroyer.cpp45
-rw-r--r--src/object/auto/autodestroyer.h14
-rw-r--r--src/object/auto/autoegg.cpp61
-rw-r--r--src/object/auto/autoegg.h14
-rw-r--r--src/object/auto/autoenergy.cpp57
-rw-r--r--src/object/auto/autoenergy.h12
-rw-r--r--src/object/auto/autofactory.cpp81
-rw-r--r--src/object/auto/autofactory.h16
-rw-r--r--src/object/auto/autoflag.cpp15
-rw-r--r--src/object/auto/autoflag.h4
-rw-r--r--src/object/auto/autohuston.cpp23
-rw-r--r--src/object/auto/autohuston.h8
-rw-r--r--src/object/auto/autoinfo.cpp43
-rw-r--r--src/object/auto/autoinfo.h12
-rw-r--r--src/object/auto/autojostle.cpp11
-rw-r--r--src/object/auto/autojostle.h4
-rw-r--r--src/object/auto/autokid.cpp20
-rw-r--r--src/object/auto/autokid.h6
-rw-r--r--src/object/auto/autolabo.cpp59
-rw-r--r--src/object/auto/autolabo.h12
-rw-r--r--src/object/auto/automush.cpp29
-rw-r--r--src/object/auto/automush.h10
-rw-r--r--src/object/auto/autonest.cpp33
-rw-r--r--src/object/auto/autonest.h10
-rw-r--r--src/object/auto/autonuclear.cpp47
-rw-r--r--src/object/auto/autonuclear.h12
-rw-r--r--src/object/auto/autopara.cpp33
-rw-r--r--src/object/auto/autopara.h10
-rw-r--r--src/object/auto/autoportico.cpp31
-rw-r--r--src/object/auto/autoportico.h6
-rw-r--r--src/object/auto/autoradar.cpp29
-rw-r--r--src/object/auto/autoradar.h8
-rw-r--r--src/object/auto/autorepair.cpp33
-rw-r--r--src/object/auto/autorepair.h10
-rw-r--r--src/object/auto/autoresearch.cpp71
-rw-r--r--src/object/auto/autoresearch.h14
-rw-r--r--src/object/auto/autoroot.cpp11
-rw-r--r--src/object/auto/autoroot.h4
-rw-r--r--src/object/auto/autosafe.cpp61
-rw-r--r--src/object/auto/autosafe.h14
-rw-r--r--src/object/auto/autostation.cpp29
-rw-r--r--src/object/auto/autostation.h8
-rw-r--r--src/object/auto/autotower.cpp45
-rw-r--r--src/object/auto/autotower.h12
52 files changed, 715 insertions, 741 deletions
diff --git a/src/object/auto/auto.cpp b/src/object/auto/auto.cpp
index 0600d86..94a8afa 100644
--- a/src/object/auto/auto.cpp
+++ b/src/object/auto/auto.cpp
@@ -79,7 +79,7 @@ CAuto::CAuto(CInstanceManager* iMan, CObject* object)
m_type = m_object->RetType();
m_time = 0.0f;
m_lastUpdateTime = 0.0f;
- m_bMotor = FALSE;
+ m_bMotor = false;
m_progressTime = 0.0f;
m_progressTotal = 1.0f;
@@ -96,7 +96,7 @@ CAuto::~CAuto()
// Destroys the object.
-void CAuto::DeleteObject(BOOL bAll)
+void CAuto::DeleteObject(bool bAll)
{
}
@@ -105,7 +105,7 @@ void CAuto::DeleteObject(BOOL bAll)
void CAuto::Init()
{
- m_bBusy = FALSE;
+ m_bBusy = false;
}
// Starts the object.
@@ -117,29 +117,29 @@ void CAuto::Start(int param)
// Give a type.
-BOOL CAuto::SetType(ObjectType type)
+bool CAuto::SetType(ObjectType type)
{
- return FALSE;
+ return false;
}
// Gives a value.
-BOOL CAuto::SetValue(int rank, float value)
+bool CAuto::SetValue(int rank, float value)
{
- return FALSE;
+ return false;
}
// Gives the string.
-BOOL CAuto::SetString(char *string)
+bool CAuto::SetString(char *string)
{
- return FALSE;
+ return false;
}
// Management of an event.
-BOOL CAuto::EventProcess(const Event &event)
+bool CAuto::EventProcess(const Event &event)
{
if ( event.event == EVENT_FRAME &&
!m_engine->RetPause() )
@@ -150,10 +150,10 @@ BOOL CAuto::EventProcess(const Event &event)
if ( !m_object->RetSelect() ) // robot not selected?
{
- return TRUE;
+ return true;
}
- return TRUE;
+ return true;
}
// Indicates whether the controller has finished its activity.
@@ -165,15 +165,15 @@ Error CAuto::IsEnded()
// Stops the controller
-BOOL CAuto::Abort()
+bool CAuto::Abort()
{
- return FALSE;
+ return false;
}
// Creates all the interface when the object is selected.
-BOOL CAuto::CreateInterface(BOOL bSelect)
+bool CAuto::CreateInterface(bool bSelect)
{
CWindow* pw;
FPOINT pos, dim, ddim;
@@ -187,7 +187,7 @@ BOOL CAuto::CreateInterface(BOOL bSelect)
m_interface->DeleteControl(EVENT_WINDOW0); // destroys the window
}
- if ( !bSelect ) return TRUE;
+ if ( !bSelect ) return true;
pos.x = 0.0f;
pos.y = 0.0f;
@@ -196,7 +196,7 @@ BOOL CAuto::CreateInterface(BOOL bSelect)
dim.y = 86.0f/480.0f;
m_interface->CreateWindows(pos, dim, 3, EVENT_WINDOW0);
pw = (CWindow*)m_interface->SearchControl(EVENT_WINDOW0);
- if ( pw == 0 ) return FALSE;
+ if ( pw == 0 ) return false;
m_object->GetTooltipName(name);
pos.x = 0.0f;
@@ -282,12 +282,12 @@ BOOL CAuto::CreateInterface(BOOL bSelect)
m_lastUpdateTime = 0.0f;
UpdateInterface(0.0f);
- return TRUE;
+ return true;
}
// Change the state of a button interface.
-void CAuto::CheckInterface(CWindow *pw, EventMsg event, BOOL bState)
+void CAuto::CheckInterface(CWindow *pw, EventMsg event, bool bState)
{
CControl* control;
@@ -299,7 +299,7 @@ void CAuto::CheckInterface(CWindow *pw, EventMsg event, BOOL bState)
// Change the state of a button interface.
-void CAuto::EnableInterface(CWindow *pw, EventMsg event, BOOL bState)
+void CAuto::EnableInterface(CWindow *pw, EventMsg event, bool bState)
{
CControl* control;
@@ -311,7 +311,7 @@ void CAuto::EnableInterface(CWindow *pw, EventMsg event, BOOL bState)
// Change the state of a button interface.
-void CAuto::VisibleInterface(CWindow *pw, EventMsg event, BOOL bState)
+void CAuto::VisibleInterface(CWindow *pw, EventMsg event, bool bState)
{
CControl* control;
@@ -323,7 +323,7 @@ void CAuto::VisibleInterface(CWindow *pw, EventMsg event, BOOL bState)
// Change the state of a button interface.
-void CAuto::DeadInterface(CWindow *pw, EventMsg event, BOOL bState)
+void CAuto::DeadInterface(CWindow *pw, EventMsg event, bool bState)
{
CControl* control;
@@ -387,12 +387,12 @@ Error CAuto::RetError()
// Management of the occupation.
-BOOL CAuto::RetBusy()
+bool CAuto::RetBusy()
{
return m_bBusy;
}
-void CAuto::SetBusy(BOOL bBusy)
+void CAuto::SetBusy(bool bBusy)
{
m_bBusy = bBusy;
}
@@ -411,12 +411,12 @@ void CAuto::EventProgress(float rTime)
// Engine management.
-BOOL CAuto::RetMotor()
+bool CAuto::RetMotor()
{
return m_bMotor;
}
-void CAuto::SetMotor(BOOL bMotor)
+void CAuto::SetMotor(bool bMotor)
{
m_bMotor = bMotor;
}
@@ -424,7 +424,7 @@ void CAuto::SetMotor(BOOL bMotor)
// Saves all parameters of the controller.
-BOOL CAuto::Write(char *line)
+bool CAuto::Write(char *line)
{
char name[100];
@@ -443,12 +443,12 @@ BOOL CAuto::Write(char *line)
sprintf(name, " aProgressTotal=%.2f", m_progressTotal);
strcat(line, name);
- return FALSE;
+ return false;
}
// Return all settings to the controller.
-BOOL CAuto::Read(char *line)
+bool CAuto::Read(char *line)
{
m_type = (ObjectType)OpInt(line, "aType", OBJECT_NULL);
m_bBusy = OpInt(line, "aBusy", 0);
@@ -456,6 +456,6 @@ BOOL CAuto::Read(char *line)
m_progressTime = OpFloat(line, "aProgressTime", 0.0f);
m_progressTotal = OpFloat(line, "aProgressTotal", 0.0f);
- return FALSE;
+ return false;
}
diff --git a/src/object/auto/auto.h b/src/object/auto/auto.h
index 96f0212..5a631ec 100644
--- a/src/object/auto/auto.h
+++ b/src/object/auto/auto.h
@@ -46,39 +46,39 @@ class CAuto
{
public:
CAuto(CInstanceManager* iMan, CObject* object);
- ~CAuto();
+ virtual ~CAuto();
- virtual void DeleteObject(BOOL bAll=FALSE);
+ virtual void DeleteObject(bool bAll=false);
virtual void Init();
virtual void Start(int param);
- virtual BOOL EventProcess(const Event &event);
+ virtual bool EventProcess(const Event &event);
virtual Error IsEnded();
- virtual BOOL Abort();
+ virtual bool Abort();
- virtual BOOL SetType(ObjectType type);
- virtual BOOL SetValue(int rank, float value);
- virtual BOOL SetString(char *string);
+ virtual bool SetType(ObjectType type);
+ virtual bool SetValue(int rank, float value);
+ virtual bool SetString(char *string);
- virtual BOOL CreateInterface(BOOL bSelect);
+ virtual bool CreateInterface(bool bSelect);
virtual Error RetError();
- virtual BOOL RetBusy();
- virtual void SetBusy(BOOL bBuse);
+ virtual bool RetBusy();
+ virtual void SetBusy(bool bBuse);
virtual void InitProgressTotal(float total);
virtual void EventProgress(float rTime);
- virtual BOOL RetMotor();
- virtual void SetMotor(BOOL bMotor);
+ virtual bool RetMotor();
+ virtual void SetMotor(bool bMotor);
- virtual BOOL Write(char *line);
- virtual BOOL Read(char *line);
+ virtual bool Write(char *line);
+ virtual bool Read(char *line);
protected:
- void CheckInterface(CWindow *pw, EventMsg event, BOOL bState);
- void EnableInterface(CWindow *pw, EventMsg event, BOOL bState);
- void VisibleInterface(CWindow *pw, EventMsg event, BOOL bState);
- void DeadInterface(CWindow *pw, EventMsg event, BOOL bState);
+ void CheckInterface(CWindow *pw, EventMsg event, bool bState);
+ void EnableInterface(CWindow *pw, EventMsg event, bool bState);
+ void VisibleInterface(CWindow *pw, EventMsg event, bool bState);
+ void DeadInterface(CWindow *pw, EventMsg event, bool bState);
void UpdateInterface();
void UpdateInterface(float rTime);
@@ -101,8 +101,8 @@ protected:
CSound* m_sound;
ObjectType m_type;
- BOOL m_bBusy;
- BOOL m_bMotor;
+ bool m_bBusy;
+ bool m_bMotor;
float m_time;
float m_lastUpdateTime;
float m_progressTime;
diff --git a/src/object/auto/autobase.cpp b/src/object/auto/autobase.cpp
index f7c3ca6..5c1bb2d 100644
--- a/src/object/auto/autobase.cpp
+++ b/src/object/auto/autobase.cpp
@@ -76,13 +76,12 @@ CAutoBase::CAutoBase(CInstanceManager* iMan, CObject* object)
CAutoBase::~CAutoBase()
{
- this->CAuto::~CAuto();
}
// Destroys the object.
-void CAutoBase::DeleteObject(BOOL bAll)
+void CAutoBase::DeleteObject(bool bAll)
{
if ( m_soundChannel != -1 )
{
@@ -99,7 +98,7 @@ void CAutoBase::DeleteObject(BOOL bAll)
void CAutoBase::Init()
{
- m_bOpen = FALSE;
+ m_bOpen = false;
m_time = 0.0f;
m_lastParticule = 0.0f;
m_lastMotorParticule = 0.0f;
@@ -127,7 +126,7 @@ void CAutoBase::Start(int param)
// Management of an event.
-BOOL CAutoBase::EventProcess(const Event &event)
+bool CAutoBase::EventProcess(const Event &event)
{
D3DMATRIX* mat;
Event newEvent;
@@ -140,7 +139,7 @@ BOOL CAutoBase::EventProcess(const Event &event)
CAuto::EventProcess(event);
- if ( m_engine->RetPause() ) return TRUE;
+ if ( m_engine->RetPause() ) return true;
begin:
iPos = m_object->RetPosition(0);
@@ -150,7 +149,7 @@ begin:
if ( m_param != PARAM_STOP && // not placed on the ground?
m_param != PARAM_FIXSCENE )
{
- FreezeCargo(TRUE); // freeze whole cargo
+ FreezeCargo(true); // freeze whole cargo
}
if ( m_param == PARAM_STOP ) // raises the ground?
@@ -206,8 +205,8 @@ begin:
m_progress = 0.0f;
m_speed = 1.0f/BASE_LAND_TIME;
- m_main->SetMovieLock(TRUE); // blocks everything until the end of the landing
- m_bMotor = TRUE; // lights the jet engine
+ m_main->SetMovieLock(true); // blocks everything until the end of the landing
+ m_bMotor = true; // lights the jet engine
m_camera->SetType(CAMERA_SCRIPT);
@@ -229,7 +228,7 @@ begin:
if ( m_soundChannel == -1 )
{
- m_soundChannel = m_sound->Play(SOUND_FLY, m_posSound, 0.3f, 2.0f, TRUE);
+ m_soundChannel = m_sound->Play(SOUND_FLY, m_posSound, 0.3f, 2.0f, true);
m_sound->AddEnvelope(m_soundChannel, 1.0f, 0.5f, BASE_LAND_TIME, SOPER_CONTINUE);
m_sound->AddEnvelope(m_soundChannel, 0.0f, 0.5f, 2.0f, SOPER_STOP);
}
@@ -267,8 +266,8 @@ begin:
m_finalPos = pos;
m_object->SetPosition(0, pos);
- m_main->SetMovieLock(TRUE); // blocks everything until the end of the landing
- m_bMotor = TRUE; // lights the jet engine
+ m_main->SetMovieLock(true); // blocks everything until the end of the landing
+ m_bMotor = true; // lights the jet engine
m_camera->SetType(CAMERA_SCRIPT);
pos.x += 1000.0f;
@@ -312,7 +311,7 @@ begin:
if ( m_soundChannel == -1 )
{
- m_soundChannel = m_sound->Play(SOUND_FLY, m_posSound, 0.0f, 1.2f, TRUE);
+ m_soundChannel = m_sound->Play(SOUND_FLY, m_posSound, 0.0f, 1.2f, true);
m_sound->AddEnvelope(m_soundChannel, 1.0f, 1.0f, BASE_TRANSIT_TIME*0.55f, SOPER_CONTINUE);
m_sound->AddEnvelope(m_soundChannel, 0.3f, 0.8f, BASE_TRANSIT_TIME*0.45f, SOPER_STOP);
}
@@ -321,7 +320,7 @@ begin:
if ( event.event == EVENT_UPDINTERFACE )
{
- if ( m_object->RetSelect() ) CreateInterface(TRUE);
+ if ( m_object->RetSelect() ) CreateInterface(true);
}
if ( event.event == EVENT_OBJECT_BTAKEOFF )
@@ -330,18 +329,18 @@ begin:
if ( err != ERR_OK )
{
m_displayText->DisplayError(err, m_object);
- return FALSE;
+ return false;
}
- err = m_main->CheckEndMission(FALSE);
+ err = m_main->CheckEndMission(false);
if ( err != ERR_OK )
{
m_displayText->DisplayError(err, m_object);
- return FALSE;
+ return false;
}
- FreezeCargo(TRUE); // freeze whole cargo
- m_main->SetMovieLock(TRUE); // blocks everything until the end
+ FreezeCargo(true); // freeze whole cargo
+ m_main->SetMovieLock(true); // blocks everything until the end
m_main->DeselectAll();
m_event->MakeEvent(newEvent, EVENT_UPDINTERFACE);
@@ -362,18 +361,18 @@ begin:
m_engine->SetFocus(1.0f);
- m_soundChannel = m_sound->Play(SOUND_MANIP, m_posSound, 0.3f, 1.5f, TRUE);
+ m_soundChannel = m_sound->Play(SOUND_MANIP, m_posSound, 0.3f, 1.5f, true);
m_sound->AddEnvelope(m_soundChannel, 0.3f, 1.5f, BASE_DOOR_TIME2, SOPER_CONTINUE);
m_sound->AddEnvelope(m_soundChannel, 0.0f, 1.5f, 0.5f, SOPER_STOP);
m_phase = ABP_CLOSE2;
m_progress = 0.0f;
m_speed = 1.0f/BASE_DOOR_TIME2;
- return TRUE;
+ return true;
}
- if ( event.event != EVENT_FRAME ) return TRUE;
- if ( m_phase == ABP_WAIT ) return TRUE;
+ if ( event.event != EVENT_FRAME ) return true;
+ if ( m_phase == ABP_WAIT ) return true;
m_progress += event.rTime*m_speed;
@@ -458,7 +457,7 @@ begin:
}
else
{
- m_bMotor = FALSE; // put out the reactor
+ m_bMotor = false; // put out the reactor
m_object->SetPosition(0, m_pos); // setting down
m_object->SetCirVibration(D3DVECTOR(0.0f, 0.0f, 0.0f));
@@ -514,7 +513,7 @@ begin:
}
else
{
- m_soundChannel = m_sound->Play(SOUND_MANIP, m_posSound, 0.0f, 0.3f, TRUE);
+ m_soundChannel = m_sound->Play(SOUND_MANIP, m_posSound, 0.0f, 0.3f, true);
m_sound->AddEnvelope(m_soundChannel, 0.3f, 0.3f, 1.0f, SOPER_CONTINUE);
m_sound->AddEnvelope(m_soundChannel, 0.3f, 1.0f, BASE_DOOR_TIME-1.5f, SOPER_CONTINUE);
m_sound->AddEnvelope(m_soundChannel, 0.0f, 0.3f, 1.0f, SOPER_STOP);
@@ -574,7 +573,7 @@ begin:
m_particule->CreateParticule(pos, speed, dim, PARTICRASH, time, 0.0f, 2.0f);
}
- m_soundChannel = m_sound->Play(SOUND_MANIP, m_posSound, 0.3f, 1.5f, TRUE);
+ m_soundChannel = m_sound->Play(SOUND_MANIP, m_posSound, 0.3f, 1.5f, true);
m_sound->AddEnvelope(m_soundChannel, 0.3f, 1.5f, BASE_DOOR_TIME2, SOPER_CONTINUE);
m_sound->AddEnvelope(m_soundChannel, 0.0f, 1.5f, 0.5f, SOPER_STOP);
@@ -632,11 +631,11 @@ begin:
{
if ( m_progress >= 1.0f )
{
- FreezeCargo(FALSE); // frees all cargo
+ FreezeCargo(false); // frees all cargo
if ( m_param != PARAM_PORTICO )
{
- m_main->SetMovieLock(FALSE); // you can play!
+ m_main->SetMovieLock(false); // you can play!
pObj = m_main->RetSelectObject();
m_main->SelectObject(pObj);
@@ -656,7 +655,7 @@ begin:
m_engine->SetFogStart(m_fogStart);
}
- m_bOpen = TRUE;
+ m_bOpen = true;
m_phase = ABP_WAIT;
m_progress = 0.0f;
m_speed = 1.0f/1.0f;
@@ -686,7 +685,7 @@ begin:
m_object->SetAngleX(18+i, 0.0f);
}
- m_soundChannel = m_sound->Play(SOUND_MANIP, m_posSound, 0.0f, 0.3f, TRUE);
+ m_soundChannel = m_sound->Play(SOUND_MANIP, m_posSound, 0.0f, 0.3f, true);
m_sound->AddEnvelope(m_soundChannel, 0.3f, 0.3f, 1.0f, SOPER_CONTINUE);
m_sound->AddEnvelope(m_soundChannel, 0.3f, 1.0f, BASE_DOOR_TIME-1.5f, SOPER_CONTINUE);
m_sound->AddEnvelope(m_soundChannel, 0.0f, 0.3f, 1.0f, SOPER_STOP);
@@ -713,7 +712,7 @@ begin:
{
m_object->SetAngleZ(1+i, PI/2.0f);
}
- m_bMotor = TRUE; // lights the jet engine
+ m_bMotor = true; // lights the jet engine
// Shock of the closing doors.
max = (int)(20.0f*m_engine->RetParticuleDensity());
@@ -734,7 +733,7 @@ begin:
m_sound->Play(SOUND_BOUM, m_object->RetPosition(0));
m_soundChannel = -1;
- m_bOpen = FALSE;
+ m_bOpen = false;
m_phase = ABP_TOWAIT;
m_progress = 0.0f;
m_speed = 1.0f/2.0f;
@@ -747,7 +746,7 @@ begin:
{
if ( m_soundChannel == -1 )
{
- m_soundChannel = m_sound->Play(SOUND_FLY, m_posSound, 0.0f, 0.5f, TRUE);
+ m_soundChannel = m_sound->Play(SOUND_FLY, m_posSound, 0.0f, 0.5f, true);
m_sound->AddEnvelope(m_soundChannel, 1.0f, 0.5f, 2.0f, SOPER_CONTINUE);
m_sound->AddEnvelope(m_soundChannel, 0.3f, 2.0f, BASE_TAKO_TIME, SOPER_STOP);
}
@@ -1101,12 +1100,12 @@ begin:
m_sound->Position(m_soundChannel, pos);
}
- return TRUE;
+ return true;
}
// Stops the controller.
-BOOL CAutoBase::Abort()
+bool CAutoBase::Abort()
{
Event newEvent;
CObject* pObj;
@@ -1129,7 +1128,7 @@ BOOL CAutoBase::Abort()
m_sound->AddEnvelope(m_soundChannel, 0.0f, 0.8f, 0.01f, SOPER_STOP);
m_soundChannel = -1;
}
- return TRUE;
+ return true;
}
if ( m_param == PARAM_PORTICO ) // gate on the porch?
@@ -1153,8 +1152,8 @@ BOOL CAutoBase::Abort()
m_phase == ABP_OPEN ||
m_phase == ABP_OPEN2 ) // Landing?
{
- m_bMotor = FALSE; // put out the jet engine
- m_bOpen = TRUE;
+ m_bMotor = false; // put out the jet engine
+ m_bOpen = true;
m_object->SetPosition(0, m_pos); // setting down
m_object->SetCirVibration(D3DVECTOR(0.0f, 0.0f, 0.0f));
@@ -1168,7 +1167,7 @@ BOOL CAutoBase::Abort()
m_object->SetPosition(18+i, D3DVECTOR(23.5f, 0.0f, 11.5f));
}
- m_main->SetMovieLock(FALSE); // you can play!
+ m_main->SetMovieLock(false); // you can play!
pObj = m_main->RetSelectObject();
m_main->SelectObject(pObj);
@@ -1197,7 +1196,7 @@ BOOL CAutoBase::Abort()
}
m_object->SetAngleZ(0, 0.0f);
- FreezeCargo(FALSE); // frees all cargo
+ FreezeCargo(false); // frees all cargo
if ( m_soundChannel != -1 )
{
@@ -1210,7 +1209,7 @@ BOOL CAutoBase::Abort()
m_progress = 0.0f;
m_speed = 1.0f/2.0f;
- return TRUE;
+ return true;
}
@@ -1224,7 +1223,7 @@ Error CAutoBase::RetError()
// Creates all the interface when the object is selected.
-BOOL CAutoBase::CreateInterface(BOOL bSelect)
+bool CAutoBase::CreateInterface(bool bSelect)
{
CWindow* pw;
FPOINT pos, dim, ddim;
@@ -1233,10 +1232,10 @@ BOOL CAutoBase::CreateInterface(BOOL bSelect)
CAuto::CreateInterface(bSelect);
- if ( !bSelect ) return TRUE;
+ if ( !bSelect ) return true;
pw = (CWindow*)m_interface->SearchControl(EVENT_WINDOW0);
- if ( pw == 0 ) return FALSE;
+ if ( pw == 0 ) return false;
dim.x = 33.0f/640.0f;
dim.y = 33.0f/480.0f;
@@ -1273,7 +1272,7 @@ BOOL CAutoBase::CreateInterface(BOOL bSelect)
UpdateInterface();
- return TRUE;
+ return true;
}
// Updates the status of all interface buttons.
@@ -1292,7 +1291,7 @@ void CAutoBase::UpdateInterface()
// Freeze or frees all cargo.
-void CAutoBase::FreezeCargo(BOOL bFreeze)
+void CAutoBase::FreezeCargo(bool bFreeze)
{
CObject* pObj;
CPhysics* physics;
@@ -1305,7 +1304,7 @@ void CAutoBase::FreezeCargo(BOOL bFreeze)
pObj = (CObject*)m_iMan->SearchInstance(CLASS_OBJECT, i);
if ( pObj == 0 ) break;
- pObj->SetCargo(FALSE);
+ pObj->SetCargo(false);
if ( pObj == m_object ) continue; // yourself?
if ( pObj->RetTruck() != 0 ) continue; // transport object?
@@ -1316,7 +1315,7 @@ void CAutoBase::FreezeCargo(BOOL bFreeze)
{
if ( bFreeze )
{
- pObj->SetCargo(TRUE);
+ pObj->SetCargo(true);
}
physics = pObj->RetPhysics();
@@ -1403,7 +1402,7 @@ Error CAutoBase::CheckCloseDoor()
void CAutoBase::BeginTransit()
{
- BOOL bFull, bQuarter;
+ bool bFull, bQuarter;
if ( m_param == PARAM_TRANSIT2 )
{
@@ -1432,7 +1431,7 @@ void CAutoBase::BeginTransit()
m_engine->SetBackground(m_bgBack, 0x00000000, 0x00000000, 0x00000000, 0x00000000);
m_engine->LoadTexture(m_bgBack);
- m_cloud->SetEnable(FALSE); // cache clouds
+ m_cloud->SetEnable(false); // cache clouds
m_planet->SetMode(1);
}
@@ -1449,7 +1448,7 @@ void CAutoBase::EndTransit()
m_engine->SetBackground(m_bgName, m_bgUp, m_bgDown, m_bgCloudUp, m_bgCloudDown);
m_engine->LoadTexture(m_bgName);
- m_cloud->SetEnable(TRUE); // gives the clouds
+ m_cloud->SetEnable(true); // gives the clouds
m_planet->SetMode(0);
m_main->StartMusic();
diff --git a/src/object/auto/autobase.h b/src/object/auto/autobase.h
index 5610d6e..1a3623d 100644
--- a/src/object/auto/autobase.h
+++ b/src/object/auto/autobase.h
@@ -74,19 +74,19 @@ public:
CAutoBase(CInstanceManager* iMan, CObject* object);
~CAutoBase();
- void DeleteObject(BOOL bAll=FALSE);
+ void DeleteObject(bool bAll=false);
void Init();
void Start(int param);
- BOOL EventProcess(const Event &event);
- BOOL Abort();
+ bool EventProcess(const Event &event);
+ bool Abort();
Error RetError();
- BOOL CreateInterface(BOOL bSelect);
+ bool CreateInterface(bool bSelect);
protected:
void UpdateInterface();
- void FreezeCargo(BOOL bFreeze);
+ void FreezeCargo(bool bFreeze);
void MoveCargo();
Error CheckCloseDoor();
void BeginTransit();
@@ -94,7 +94,7 @@ protected:
protected:
AutoBasePhase m_phase;
- BOOL m_bOpen;
+ bool m_bOpen;
float m_progress;
float m_speed;
float m_lastParticule;
diff --git a/src/object/auto/autoconvert.cpp b/src/object/auto/autoconvert.cpp
index 54d495a..6cc94e5 100644
--- a/src/object/auto/autoconvert.cpp
+++ b/src/object/auto/autoconvert.cpp
@@ -52,7 +52,7 @@ CAutoConvert::CAutoConvert(CInstanceManager* iMan, CObject* object)
{
Init();
m_phase = ACP_STOP;
- m_bResetDelete = FALSE;
+ m_bResetDelete = false;
m_soundChannel = -1;
}
@@ -60,13 +60,12 @@ CAutoConvert::CAutoConvert(CInstanceManager* iMan, CObject* object)
CAutoConvert::~CAutoConvert()
{
- this->CAuto::~CAuto();
}
// Destroys the object.
-void CAutoConvert::DeleteObject(BOOL bAll)
+void CAutoConvert::DeleteObject(bool bAll)
{
CObject* fret;
@@ -108,7 +107,7 @@ void CAutoConvert::Init()
// Management of an event.
-BOOL CAutoConvert::EventProcess(const Event &event)
+bool CAutoConvert::EventProcess(const Event &event)
{
CObject* fret;
D3DVECTOR pos, speed;
@@ -117,8 +116,8 @@ BOOL CAutoConvert::EventProcess(const Event &event)
CAuto::EventProcess(event);
- if ( m_engine->RetPause() ) return TRUE;
- if ( event.event != EVENT_FRAME ) return TRUE;
+ if ( m_engine->RetPause() ) return true;
+ if ( event.event != EVENT_FRAME ) return true;
m_progress += event.rTime*m_speed;
m_timeVirus -= event.rTime;
@@ -137,12 +136,12 @@ BOOL CAutoConvert::EventProcess(const Event &event)
m_object->SetAngleX(2, -PI*0.35f*(0.8f+Rand()*0.2f));
m_object->SetAngleX(3, -PI*0.35f*(0.8f+Rand()*0.2f));
}
- return TRUE;
+ return true;
}
EventProgress(event.rTime);
- if ( m_phase == ACP_STOP ) return TRUE;
+ if ( m_phase == ACP_STOP ) return true;
if ( m_phase == ACP_WAIT )
{
@@ -157,14 +156,14 @@ BOOL CAutoConvert::EventProcess(const Event &event)
}
else
{
- fret->SetLock(TRUE); // stone usable
+ fret->SetLock(true); // stone usable
- SetBusy(TRUE);
+ SetBusy(true);
InitProgressTotal(3.0f+10.0f+1.5f);
UpdateInterface();
m_sound->Play(SOUND_OPEN, m_object->RetPosition(0), 1.0f, 1.0f);
- m_bSoundClose = FALSE;
+ m_bSoundClose = false;
m_phase = ACP_CLOSE;
m_progress = 0.0f;
@@ -179,7 +178,7 @@ BOOL CAutoConvert::EventProcess(const Event &event)
{
if ( m_progress >= 0.8f && !m_bSoundClose )
{
- m_bSoundClose = TRUE;
+ m_bSoundClose = true;
m_sound->Play(SOUND_CLOSE, m_object->RetPosition(0), 1.0f, 0.8f);
}
angle = -PI*0.35f*(1.0f-Bounce(m_progress, 0.85f, 0.05f));
@@ -191,7 +190,7 @@ BOOL CAutoConvert::EventProcess(const Event &event)
m_object->SetAngleX(2, 0.0f);
m_object->SetAngleX(3, 0.0f);
- m_soundChannel = m_sound->Play(SOUND_CONVERT, m_object->RetPosition(0), 0.0f, 0.25f, TRUE);
+ m_soundChannel = m_sound->Play(SOUND_CONVERT, m_object->RetPosition(0), 0.0f, 0.25f, true);
m_sound->AddEnvelope(m_soundChannel, 1.0f, 0.25f, 0.5f, SOPER_CONTINUE);
m_sound->AddEnvelope(m_soundChannel, 1.0f, 1.00f, 4.5f, SOPER_CONTINUE);
m_sound->AddEnvelope(m_soundChannel, 1.0f, 0.25f, 4.5f, SOPER_CONTINUE);
@@ -290,7 +289,7 @@ BOOL CAutoConvert::EventProcess(const Event &event)
m_object->SetAngleX(2, -PI*0.35f);
m_object->SetAngleX(3, -PI*0.35f);
- SetBusy(FALSE);
+ SetBusy(false);
UpdateInterface();
m_phase = ACP_WAIT;
@@ -299,7 +298,7 @@ BOOL CAutoConvert::EventProcess(const Event &event)
}
}
- return TRUE;
+ return true;
}
// Returns an error due the state of the automation.
@@ -317,7 +316,7 @@ Error CAutoConvert::RetError()
// Cancels the current transformation.
-BOOL CAutoConvert::Abort()
+bool CAutoConvert::Abort()
{
if ( m_soundChannel != -1 )
{
@@ -336,16 +335,16 @@ BOOL CAutoConvert::Abort()
m_progress = 0.0f;
m_speed = 1.0f/2.0f;
- SetBusy(FALSE);
+ SetBusy(false);
UpdateInterface();
- return TRUE;
+ return true;
}
// Creates all the interface when the object is selected.
-BOOL CAutoConvert::CreateInterface(BOOL bSelect)
+bool CAutoConvert::CreateInterface(bool bSelect)
{
CWindow* pw;
FPOINT pos, ddim;
@@ -353,10 +352,10 @@ BOOL CAutoConvert::CreateInterface(BOOL bSelect)
CAuto::CreateInterface(bSelect);
- if ( !bSelect ) return TRUE;
+ if ( !bSelect ) return true;
pw = (CWindow*)m_interface->SearchControl(EVENT_WINDOW0);
- if ( pw == 0 ) return FALSE;
+ if ( pw == 0 ) return false;
ox = 3.0f/640.0f;
oy = 3.0f/480.0f;
@@ -369,18 +368,18 @@ BOOL CAutoConvert::CreateInterface(BOOL bSelect)
ddim.y = 66.0f/480.0f;
pw->CreateGroup(pos, ddim, 103, EVENT_OBJECT_TYPE);
- return TRUE;
+ return true;
}
// Saves all parameters of the controller.
-BOOL CAutoConvert::Write(char *line)
+bool CAutoConvert::Write(char *line)
{
char name[100];
if ( m_phase == ACP_STOP ||
- m_phase == ACP_WAIT ) return FALSE;
+ m_phase == ACP_WAIT ) return false;
sprintf(name, " aExist=%d", 1);
strcat(line, name);
@@ -396,14 +395,14 @@ BOOL CAutoConvert::Write(char *line)
sprintf(name, " aSpeed=%.2f", m_speed);
strcat(line, name);
- return TRUE;
+ return true;
}
// Restores all parameters of the controller.
-BOOL CAutoConvert::Read(char *line)
+bool CAutoConvert::Read(char *line)
{
- if ( OpInt(line, "aExist", 0) == 0 ) return FALSE;
+ if ( OpInt(line, "aExist", 0) == 0 ) return false;
CAuto::Read(line);
@@ -413,7 +412,7 @@ BOOL CAutoConvert::Read(char *line)
m_lastParticule = 0.0f;
- return TRUE;
+ return true;
}
@@ -449,7 +448,7 @@ CObject* CAutoConvert::SearchStone(ObjectType type)
// Search if a vehicle is too close.
-BOOL CAutoConvert::SearchVehicle()
+bool CAutoConvert::SearchVehicle()
{
CObject* pObj;
D3DVECTOR cPos, oPos;
@@ -509,10 +508,10 @@ BOOL CAutoConvert::SearchVehicle()
if ( !pObj->GetCrashSphere(0, oPos, oRadius) ) continue;
dist = Length(oPos, cPos)-oRadius;
- if ( dist < 8.0f ) return TRUE;
+ if ( dist < 8.0f ) return true;
}
- return FALSE;
+ return false;
}
// Creates an object metal.
diff --git a/src/object/auto/autoconvert.h b/src/object/auto/autoconvert.h
index dbe7b26..5d610eb 100644
--- a/src/object/auto/autoconvert.h
+++ b/src/object/auto/autoconvert.h
@@ -49,21 +49,21 @@ public:
CAutoConvert(CInstanceManager* iMan, CObject* object);
~CAutoConvert();
- void DeleteObject(BOOL bAll=FALSE);
+ void DeleteObject(bool bAll=false);
void Init();
- BOOL EventProcess(const Event &event);
+ bool EventProcess(const Event &event);
Error RetError();
- BOOL Abort();
+ bool Abort();
- BOOL CreateInterface(BOOL bSelect);
+ bool CreateInterface(bool bSelect);
- BOOL Write(char *line);
- BOOL Read(char *line);
+ bool Write(char *line);
+ bool Read(char *line);
protected:
CObject* SearchStone(ObjectType type);
- BOOL SearchVehicle();
+ bool SearchVehicle();
void CreateMetal();
protected:
@@ -72,8 +72,8 @@ protected:
float m_speed;
float m_timeVirus;
float m_lastParticule;
- BOOL m_bResetDelete;
- BOOL m_bSoundClose;
+ bool m_bResetDelete;
+ bool m_bSoundClose;
int m_soundChannel;
};
diff --git a/src/object/auto/autoderrick.cpp b/src/object/auto/autoderrick.cpp
index b28652f..8350da8 100644
--- a/src/object/auto/autoderrick.cpp
+++ b/src/object/auto/autoderrick.cpp
@@ -63,13 +63,12 @@ CAutoDerrick::CAutoDerrick(CInstanceManager* iMan, CObject* object)
CAutoDerrick::~CAutoDerrick()
{
- this->CAuto::~CAuto();
}
// Destroys the object.
-void CAutoDerrick::DeleteObject(BOOL bAll)
+void CAutoDerrick::DeleteObject(bool bAll)
{
CObject* fret;
@@ -146,7 +145,7 @@ void CAutoDerrick::Init()
// Management of an event.
-BOOL CAutoDerrick::EventProcess(const Event &event)
+bool CAutoDerrick::EventProcess(const Event &event)
{
CObject* fret;
D3DVECTOR pos, speed;
@@ -155,9 +154,9 @@ BOOL CAutoDerrick::EventProcess(const Event &event)
CAuto::EventProcess(event);
- if ( m_engine->RetPause() ) return TRUE;
- if ( event.event != EVENT_FRAME ) return TRUE;
- if ( m_phase == ADP_WAIT ) return TRUE;
+ if ( m_engine->RetPause() ) return true;
+ if ( event.event != EVENT_FRAME ) return true;
+ if ( m_phase == ADP_WAIT ) return true;
m_progress += event.rTime*m_speed;
m_timeVirus -= event.rTime;
@@ -175,7 +174,7 @@ BOOL CAutoDerrick::EventProcess(const Event &event)
m_object->SetAngleY(1, Rand()*0.5f); // rotates the drill
}
- return TRUE;
+ return true;
}
if ( m_phase == ADP_EXCAVATE )
@@ -190,7 +189,7 @@ BOOL CAutoDerrick::EventProcess(const Event &event)
{
factor = 1.0f;
}
- m_soundChannel = m_sound->Play(SOUND_DERRICK, m_object->RetPosition(0), 1.0f, 0.5f, TRUE);
+ m_soundChannel = m_sound->Play(SOUND_DERRICK, m_object->RetPosition(0), 1.0f, 0.5f, true);
m_sound->AddEnvelope(m_soundChannel, 1.0f, 0.5f, 4.0f*factor, SOPER_CONTINUE);
m_sound->AddEnvelope(m_soundChannel, 1.0f, 0.3f, 6.0f*factor, SOPER_CONTINUE);
m_sound->AddEnvelope(m_soundChannel, 1.0f, 0.5f, 1.0f, SOPER_CONTINUE);
@@ -296,7 +295,7 @@ BOOL CAutoDerrick::EventProcess(const Event &event)
else
{
m_soundChannel = -1;
- m_bSoundFall = FALSE;
+ m_bSoundFall = false;
m_phase = ADP_EXPORT;
m_progress = 0.0f;
@@ -308,7 +307,7 @@ BOOL CAutoDerrick::EventProcess(const Event &event)
{
if ( m_progress >= 1.0f )
{
- m_bSoundFall = FALSE;
+ m_bSoundFall = false;
m_phase = ADP_EXPORT;
m_progress = 0.0f;
@@ -330,7 +329,7 @@ BOOL CAutoDerrick::EventProcess(const Event &event)
m_phase = ADP_ISFREE;
m_progress = 0.0f;
m_speed = 1.0f/2.0f;
- return TRUE;
+ return true;
}
}
@@ -375,12 +374,12 @@ BOOL CAutoDerrick::EventProcess(const Event &event)
if ( !m_bSoundFall && pos.y < m_fretPos.y )
{
m_sound->Play(SOUND_BOUM, m_fretPos);
- m_bSoundFall = TRUE;
+ m_bSoundFall = true;
}
if ( pos.y < m_fretPos.y )
{
pos.y = m_fretPos.y;
- fret->SetLock(FALSE); // object usable
+ fret->SetLock(false); // object usable
}
fret->SetPosition(0, pos);
}
@@ -402,13 +401,13 @@ BOOL CAutoDerrick::EventProcess(const Event &event)
}
}
- return TRUE;
+ return true;
}
// Creates all the interface when the object is selected.
-BOOL CAutoDerrick::CreateInterface(BOOL bSelect)
+bool CAutoDerrick::CreateInterface(bool bSelect)
{
CWindow* pw;
FPOINT pos, ddim;
@@ -416,10 +415,10 @@ BOOL CAutoDerrick::CreateInterface(BOOL bSelect)
CAuto::CreateInterface(bSelect);
- if ( !bSelect ) return TRUE;
+ if ( !bSelect ) return true;
pw = (CWindow*)m_interface->SearchControl(EVENT_WINDOW0);
- if ( pw == 0 ) return FALSE;
+ if ( pw == 0 ) return false;
ox = 3.0f/640.0f;
oy = 3.0f/480.0f;
@@ -432,17 +431,17 @@ BOOL CAutoDerrick::CreateInterface(BOOL bSelect)
ddim.y = 66.0f/480.0f;
pw->CreateGroup(pos, ddim, 109, EVENT_OBJECT_TYPE);
- return TRUE;
+ return true;
}
// Saves all parameters of the controller.
-BOOL CAutoDerrick::Write(char *line)
+bool CAutoDerrick::Write(char *line)
{
char name[100];
- if ( m_phase == ADP_WAIT ) return FALSE;
+ if ( m_phase == ADP_WAIT ) return false;
sprintf(name, " aExist=%d", 1);
strcat(line, name);
@@ -458,14 +457,14 @@ BOOL CAutoDerrick::Write(char *line)
sprintf(name, " aSpeed=%.2f", m_speed);
strcat(line, name);
- return TRUE;
+ return true;
}
// Restores all parameters of the controller.
-BOOL CAutoDerrick::Read(char *line)
+bool CAutoDerrick::Read(char *line)
{
- if ( OpInt(line, "aExist", 0) == 0 ) return FALSE;
+ if ( OpInt(line, "aExist", 0) == 0 ) return false;
CAuto::Read(line);
@@ -475,7 +474,7 @@ BOOL CAutoDerrick::Read(char *line)
m_lastParticule = 0.0f;
- return TRUE;
+ return true;
}
@@ -507,7 +506,7 @@ CObject* CAutoDerrick::SearchFret()
// Seeks if a site is free.
-BOOL CAutoDerrick::SearchFree(D3DVECTOR pos)
+bool CAutoDerrick::SearchFree(D3DVECTOR pos)
{
CObject* pObj;
D3DVECTOR sPos;
@@ -528,11 +527,11 @@ BOOL CAutoDerrick::SearchFree(D3DVECTOR pos)
{
distance = Length(sPos, pos);
distance -= sRadius;
- if ( distance < 2.0f ) return FALSE; // location occupied
+ if ( distance < 2.0f ) return false; // location occupied
}
}
- return TRUE; // location free
+ return true; // location free
}
// Create a transportable object.
@@ -549,7 +548,7 @@ void CAutoDerrick::CreateFret(D3DVECTOR pos, float angle, ObjectType type,
m_displayText->DisplayError(ERR_TOOMANY, m_object);
return;
}
- fret->SetLock(TRUE); // object not yet usable
+ fret->SetLock(true); // object not yet usable
if ( m_object->RetResetCap() == RESET_MOVE )
{
@@ -563,7 +562,7 @@ void CAutoDerrick::CreateFret(D3DVECTOR pos, float angle, ObjectType type,
// Look if there is already a key.
-BOOL CAutoDerrick::ExistKey()
+bool CAutoDerrick::ExistKey()
{
CObject* pObj;
ObjectType type;
@@ -572,7 +571,7 @@ BOOL CAutoDerrick::ExistKey()
if ( m_type != OBJECT_KEYa &&
m_type != OBJECT_KEYb &&
m_type != OBJECT_KEYc &&
- m_type != OBJECT_KEYd ) return FALSE;
+ m_type != OBJECT_KEYd ) return false;
for ( i=0 ; i<1000000 ; i++ )
{
@@ -580,10 +579,10 @@ BOOL CAutoDerrick::ExistKey()
if ( pObj == 0 ) break;
type = pObj->RetType();
- if ( type == m_type ) return TRUE;
+ if ( type == m_type ) return true;
}
- return FALSE;
+ return false;
}
diff --git a/src/object/auto/autoderrick.h b/src/object/auto/autoderrick.h
index 841831d..9306a86 100644
--- a/src/object/auto/autoderrick.h
+++ b/src/object/auto/autoderrick.h
@@ -50,22 +50,22 @@ public:
CAutoDerrick(CInstanceManager* iMan, CObject* object);
~CAutoDerrick();
- void DeleteObject(BOOL bAll=FALSE);
+ void DeleteObject(bool bAll=false);
void Init();
- BOOL EventProcess(const Event &event);
+ bool EventProcess(const Event &event);
Error RetError();
- BOOL CreateInterface(BOOL bSelect);
+ bool CreateInterface(bool bSelect);
- BOOL Write(char *line);
- BOOL Read(char *line);
+ bool Write(char *line);
+ bool Read(char *line);
protected:
CObject* SearchFret();
- BOOL SearchFree(D3DVECTOR pos);
+ bool SearchFree(D3DVECTOR pos);
void CreateFret(D3DVECTOR pos, float angle, ObjectType type, float height);
- BOOL ExistKey();
+ bool ExistKey();
protected:
AutoDerrickPhase m_phase;
@@ -76,6 +76,6 @@ protected:
float m_lastTrack;
D3DVECTOR m_fretPos;
int m_soundChannel;
- BOOL m_bSoundFall;
+ bool m_bSoundFall;
};
diff --git a/src/object/auto/autodestroyer.cpp b/src/object/auto/autodestroyer.cpp
index 47b18cf..2f999fc 100644
--- a/src/object/auto/autodestroyer.cpp
+++ b/src/object/auto/autodestroyer.cpp
@@ -60,13 +60,12 @@ CAutoDestroyer::CAutoDestroyer(CInstanceManager* iMan, CObject* object)
CAutoDestroyer::~CAutoDestroyer()
{
- this->CAuto::~CAuto();
}
// Destroys the object.
-void CAutoDestroyer::DeleteObject(BOOL bAll)
+void CAutoDestroyer::DeleteObject(bool bAll)
{
CAuto::DeleteObject(bAll);
}
@@ -90,7 +89,7 @@ void CAutoDestroyer::Init()
// Management of an event.
-BOOL CAutoDestroyer::EventProcess(const Event &event)
+bool CAutoDestroyer::EventProcess(const Event &event)
{
CObject* scrap;
CPyro* pyro;
@@ -99,8 +98,8 @@ BOOL CAutoDestroyer::EventProcess(const Event &event)
CAuto::EventProcess(event);
- if ( m_engine->RetPause() ) return TRUE;
- if ( event.event != EVENT_FRAME ) return TRUE;
+ if ( m_engine->RetPause() ) return true;
+ if ( event.event != EVENT_FRAME ) return true;
m_progress += event.rTime*m_speed;
m_timeVirus -= event.rTime;
@@ -111,7 +110,7 @@ BOOL CAutoDestroyer::EventProcess(const Event &event)
{
m_timeVirus = 0.1f+Rand()*0.3f;
}
- return TRUE;
+ return true;
}
if ( m_phase == ADEP_WAIT )
@@ -127,7 +126,7 @@ BOOL CAutoDestroyer::EventProcess(const Event &event)
}
else
{
- scrap->SetLock(TRUE); // usable waste
+ scrap->SetLock(true); // usable waste
//? scrap->SetTruck(m_object); // usable waste
if ( SearchVehicle() )
@@ -143,7 +142,7 @@ BOOL CAutoDestroyer::EventProcess(const Event &event)
m_phase = ADEP_DOWN;
m_progress = 0.0f;
m_speed = 1.0f/1.0f;
- m_bExplo = FALSE;
+ m_bExplo = false;
}
}
}
@@ -159,7 +158,7 @@ BOOL CAutoDestroyer::EventProcess(const Event &event)
pyro = new CPyro(m_iMan);
pyro->Create(PT_FRAGT, scrap);
}
- m_bExplo = TRUE;
+ m_bExplo = true;
}
if ( m_progress < 1.0f )
@@ -212,13 +211,13 @@ BOOL CAutoDestroyer::EventProcess(const Event &event)
}
}
- return TRUE;
+ return true;
}
// Creates all the interface when the object is selected.
-BOOL CAutoDestroyer::CreateInterface(BOOL bSelect)
+bool CAutoDestroyer::CreateInterface(bool bSelect)
{
CWindow* pw;
FPOINT pos, ddim;
@@ -226,10 +225,10 @@ BOOL CAutoDestroyer::CreateInterface(BOOL bSelect)
CAuto::CreateInterface(bSelect);
- if ( !bSelect ) return TRUE;
+ if ( !bSelect ) return true;
pw = (CWindow*)m_interface->SearchControl(EVENT_WINDOW0);
- if ( pw == 0 ) return FALSE;
+ if ( pw == 0 ) return false;
ox = 3.0f/640.0f;
oy = 3.0f/480.0f;
@@ -242,7 +241,7 @@ BOOL CAutoDestroyer::CreateInterface(BOOL bSelect)
ddim.y = 66.0f/480.0f;
pw->CreateGroup(pos, ddim, 106, EVENT_OBJECT_TYPE);
- return TRUE;
+ return true;
}
@@ -277,7 +276,7 @@ CObject* CAutoDestroyer::SearchPlastic()
// Seeks if one vehicle is too close.
-BOOL CAutoDestroyer::SearchVehicle()
+bool CAutoDestroyer::SearchVehicle()
{
CObject* pObj;
D3DVECTOR cPos, oPos;
@@ -330,10 +329,10 @@ BOOL CAutoDestroyer::SearchVehicle()
if ( !pObj->GetCrashSphere(0, oPos, oRadius) ) continue;
dist = Length(oPos, cPos)-oRadius;
- if ( dist < 20.0f ) return TRUE;
+ if ( dist < 20.0f ) return true;
}
- return FALSE;
+ return false;
}
@@ -352,11 +351,11 @@ Error CAutoDestroyer::RetError()
// Saves all parameters of the controller.
-BOOL CAutoDestroyer::Write(char *line)
+bool CAutoDestroyer::Write(char *line)
{
char name[100];
- if ( m_phase == ADEP_WAIT ) return FALSE;
+ if ( m_phase == ADEP_WAIT ) return false;
sprintf(name, " aExist=%d", 1);
strcat(line, name);
@@ -372,14 +371,14 @@ BOOL CAutoDestroyer::Write(char *line)
sprintf(name, " aSpeed=%.2f", m_speed);
strcat(line, name);
- return TRUE;
+ return true;
}
// Restores all parameters of the controller.
-BOOL CAutoDestroyer::Read(char *line)
+bool CAutoDestroyer::Read(char *line)
{
- if ( OpInt(line, "aExist", 0) == 0 ) return FALSE;
+ if ( OpInt(line, "aExist", 0) == 0 ) return false;
CAuto::Read(line);
@@ -389,7 +388,7 @@ BOOL CAutoDestroyer::Read(char *line)
m_lastParticule = 0.0f;
- return TRUE;
+ return true;
}
diff --git a/src/object/auto/autodestroyer.h b/src/object/auto/autodestroyer.h
index 5fd0437..ececb32 100644
--- a/src/object/auto/autodestroyer.h
+++ b/src/object/auto/autodestroyer.h
@@ -47,20 +47,20 @@ public:
CAutoDestroyer(CInstanceManager* iMan, CObject* object);
~CAutoDestroyer();
- void DeleteObject(BOOL bAll=FALSE);
+ void DeleteObject(bool bAll=false);
void Init();
- BOOL EventProcess(const Event &event);
+ bool EventProcess(const Event &event);
Error RetError();
- BOOL CreateInterface(BOOL bSelect);
+ bool CreateInterface(bool bSelect);
- BOOL Write(char *line);
- BOOL Read(char *line);
+ bool Write(char *line);
+ bool Read(char *line);
protected:
CObject* SearchPlastic();
- BOOL SearchVehicle();
+ bool SearchVehicle();
protected:
AutoDestroyerPhase m_phase;
@@ -68,6 +68,6 @@ protected:
float m_speed;
float m_timeVirus;
float m_lastParticule;
- BOOL m_bExplo;
+ bool m_bExplo;
};
diff --git a/src/object/auto/autoegg.cpp b/src/object/auto/autoegg.cpp
index 239e666..d8620ba 100644
--- a/src/object/auto/autoegg.cpp
+++ b/src/object/auto/autoegg.cpp
@@ -57,13 +57,12 @@ CAutoEgg::CAutoEgg(CInstanceManager* iMan, CObject* object)
CAutoEgg::~CAutoEgg()
{
- this->CAuto::~CAuto();
}
// Destroys the object.
-void CAutoEgg::DeleteObject(BOOL bAll)
+void CAutoEgg::DeleteObject(bool bAll)
{
CObject* alien;
@@ -78,8 +77,8 @@ void CAutoEgg::DeleteObject(BOOL bAll)
// Original code: ( alien->RetZoom(0) == 1.0f )
if ( alien->RetZoomY(0) == 1.0f )
{
- alien->SetLock(FALSE);
- alien->SetActivity(TRUE); // the insect is active
+ alien->SetLock(false);
+ alien->SetActivity(true); // the insect is active
}
else
{
@@ -124,34 +123,34 @@ void CAutoEgg::Init()
{
alien->SetZoom(0, 0.01f); // invisible !
}
- alien->SetLock(TRUE);
- alien->SetActivity(FALSE);
+ alien->SetLock(true);
+ alien->SetActivity(false);
}
// Gives a value.
-BOOL CAutoEgg::SetType(ObjectType type)
+bool CAutoEgg::SetType(ObjectType type)
{
m_type = type;
- return TRUE;
+ return true;
}
// Gives a value.
-BOOL CAutoEgg::SetValue(int rank, float value)
+bool CAutoEgg::SetValue(int rank, float value)
{
- if ( rank != 0 ) return FALSE;
+ if ( rank != 0 ) return false;
m_value = value;
- return TRUE;
+ return true;
}
// Gives the string.
-BOOL CAutoEgg::SetString(char *string)
+bool CAutoEgg::SetString(char *string)
{
strcpy(m_string, string);
- return TRUE;
+ return true;
}
@@ -172,21 +171,21 @@ void CAutoEgg::Start(int param)
// Management of an event.
-BOOL CAutoEgg::EventProcess(const Event &event)
+bool CAutoEgg::EventProcess(const Event &event)
{
CObject* alien;
CAuto::EventProcess(event);
- if ( m_engine->RetPause() ) return TRUE;
+ if ( m_engine->RetPause() ) return true;
- if ( event.event != EVENT_FRAME ) return TRUE;
- if ( m_phase == AEP_NULL ) return TRUE;
+ if ( event.event != EVENT_FRAME ) return true;
+ if ( m_phase == AEP_NULL ) return true;
if ( m_phase == AEP_DELAY )
{
m_progress += event.rTime*m_speed;
- if ( m_progress < 1.0f ) return TRUE;
+ if ( m_progress < 1.0f ) return true;
alien = new CObject(m_iMan);
if ( !alien->CreateInsect(m_object->RetPosition(0), m_object->RetAngleY(0), m_type) )
@@ -195,17 +194,17 @@ BOOL CAutoEgg::EventProcess(const Event &event)
m_phase = AEP_DELAY;
m_progress = 0.0f;
m_speed = 1.0f/2.0f;
- return TRUE;
+ return true;
}
- alien->SetActivity(FALSE);
+ alien->SetActivity(false);
alien->ReadProgram(0, m_string);
alien->RunProgram(0);
Init();
}
alien = SearchAlien();
- if ( alien == 0 ) return TRUE;
- alien->SetActivity(FALSE);
+ if ( alien == 0 ) return true;
+ alien->SetActivity(false);
m_progress += event.rTime*m_speed;
@@ -219,7 +218,7 @@ BOOL CAutoEgg::EventProcess(const Event &event)
}
}
- return TRUE;
+ return true;
}
// Indicates whether the controller has completed its activity.
@@ -264,8 +263,8 @@ Error CAutoEgg::IsEnded()
{
if ( m_progress < 1.0f ) return ERR_CONTINUE;
- alien->SetLock(FALSE);
- alien->SetActivity(TRUE); // the insect is active
+ alien->SetLock(false);
+ alien->SetActivity(true); // the insect is active
}
return ERR_STOP;
@@ -321,11 +320,11 @@ CObject* CAutoEgg::SearchAlien()
// Saves all parameters of the controller.
-BOOL CAutoEgg::Write(char *line)
+bool CAutoEgg::Write(char *line)
{
char name[100];
- if ( m_phase == AEP_NULL ) return FALSE;
+ if ( m_phase == AEP_NULL ) return false;
sprintf(name, " aExist=%d", 1);
strcat(line, name);
@@ -350,14 +349,14 @@ BOOL CAutoEgg::Write(char *line)
sprintf(name, " aParamString=\"%s\"", m_string);
strcat(line, name);
- return TRUE;
+ return true;
}
// Restores all parameters of the controller.
-BOOL CAutoEgg::Read(char *line)
+bool CAutoEgg::Read(char *line)
{
- if ( OpInt(line, "aExist", 0) == 0 ) return FALSE;
+ if ( OpInt(line, "aExist", 0) == 0 ) return false;
CAuto::Read(line);
@@ -368,6 +367,6 @@ BOOL CAutoEgg::Read(char *line)
m_value = OpFloat(line, "aParamValue1", 0.0f);
OpString(line, "aParamString", m_string);
- return TRUE;
+ return true;
}
diff --git a/src/object/auto/autoegg.h b/src/object/auto/autoegg.h
index 6728f7d..d9a749f 100644
--- a/src/object/auto/autoegg.h
+++ b/src/object/auto/autoegg.h
@@ -50,20 +50,20 @@ public:
CAutoEgg(CInstanceManager* iMan, CObject* object);
~CAutoEgg();
- void DeleteObject(BOOL bAll=FALSE);
+ void DeleteObject(bool bAll=false);
void Init();
void Start(int param);
- BOOL EventProcess(const Event &event);
+ bool EventProcess(const Event &event);
Error IsEnded();
Error RetError();
- BOOL SetType(ObjectType type);
- BOOL SetValue(int rank, float value);
- BOOL SetString(char *string);
+ bool SetType(ObjectType type);
+ bool SetValue(int rank, float value);
+ bool SetString(char *string);
- BOOL Write(char *line);
- BOOL Read(char *line);
+ bool Write(char *line);
+ bool Read(char *line);
protected:
CObject* SearchAlien();
diff --git a/src/object/auto/autoenergy.cpp b/src/object/auto/autoenergy.cpp
index 3f274bd..ba265e8 100644
--- a/src/object/auto/autoenergy.cpp
+++ b/src/object/auto/autoenergy.cpp
@@ -65,13 +65,12 @@ CAutoEnergy::CAutoEnergy(CInstanceManager* iMan, CObject* object)
CAutoEnergy::~CAutoEnergy()
{
- this->CAuto::~CAuto();
}
// Destroys the object.
-void CAutoEnergy::DeleteObject(BOOL bAll)
+void CAutoEnergy::DeleteObject(bool bAll)
{
CObject* fret;
@@ -121,19 +120,19 @@ void CAutoEnergy::Init()
// Management of an event.
-BOOL CAutoEnergy::EventProcess(const Event &event)
+bool CAutoEnergy::EventProcess(const Event &event)
{
CObject* fret;
D3DVECTOR pos, ppos, speed;
FPOINT dim, c, p;
TerrainRes res;
float big;
- BOOL bGO;
+ bool bGO;
CAuto::EventProcess(event);
- if ( m_engine->RetPause() ) return TRUE;
- if ( event.event != EVENT_FRAME ) return TRUE;
+ if ( m_engine->RetPause() ) return true;
+ if ( event.event != EVENT_FRAME ) return true;
m_progress += event.rTime*m_speed;
m_timeVirus -= event.rTime;
@@ -157,7 +156,7 @@ BOOL CAutoEnergy::EventProcess(const Event &event)
m_particule->CreateParticule(pos, speed, dim, PARTIFIREZ, 1.0f, 0.0f, 0.0f);
}
}
- return TRUE;
+ return true;
}
UpdateInterface(event.rTime);
@@ -175,17 +174,17 @@ BOOL CAutoEnergy::EventProcess(const Event &event)
{
if ( m_progress >= 1.0f )
{
- bGO = FALSE;
+ bGO = false;
fret = SearchMetal(); // transform metal?
if ( fret != 0 )
{
if ( fret->RetType() == OBJECT_METAL )
{
- if ( big > ENERGY_POWER ) bGO = TRUE;
+ if ( big > ENERGY_POWER ) bGO = true;
}
else
{
- if ( !SearchVehicle() ) bGO = TRUE;
+ if ( !SearchVehicle() ) bGO = true;
}
}
@@ -193,11 +192,11 @@ BOOL CAutoEnergy::EventProcess(const Event &event)
{
if ( fret->RetType() == OBJECT_METAL )
{
- fret->SetLock(TRUE); // usable metal
+ fret->SetLock(true); // usable metal
CreatePower(); // creates the battery
}
- SetBusy(TRUE);
+ SetBusy(true);
InitProgressTotal(ENERGY_DELAY);
CAuto::UpdateInterface();
@@ -333,7 +332,7 @@ BOOL CAutoEnergy::EventProcess(const Event &event)
if ( fret != 0 )
{
fret->SetZoom(0, 1.0f);
- fret->SetLock(FALSE); // usable battery
+ fret->SetLock(false); // usable battery
fret->SetTruck(m_object);
fret->SetPosition(0, D3DVECTOR(0.0f, 3.0f, 0.0f));
m_object->SetPower(fret);
@@ -341,7 +340,7 @@ BOOL CAutoEnergy::EventProcess(const Event &event)
m_displayText->DisplayError(INFO_ENERGY, m_object);
}
- SetBusy(FALSE);
+ SetBusy(false);
CAuto::UpdateInterface();
m_phase = AENP_SMOKE;
@@ -382,7 +381,7 @@ BOOL CAutoEnergy::EventProcess(const Event &event)
if ( big > 1.0f ) big = 1.0f;
m_object->SetEnergy(big); // shift the big pile
- return TRUE;
+ return true;
}
@@ -407,7 +406,7 @@ CObject* CAutoEnergy::SearchMetal()
// Search if a vehicle is too close.
-BOOL CAutoEnergy::SearchVehicle()
+bool CAutoEnergy::SearchVehicle()
{
CObject* pObj;
D3DVECTOR cPos, oPos;
@@ -460,10 +459,10 @@ BOOL CAutoEnergy::SearchVehicle()
if ( !pObj->GetCrashSphere(0, oPos, oRadius) ) continue;
dist = Length(oPos, cPos)-oRadius;
- if ( dist < 10.0f ) return TRUE;
+ if ( dist < 10.0f ) return true;
}
- return FALSE;
+ return false;
}
// Create a cell.
@@ -484,7 +483,7 @@ void CAutoEnergy::CreatePower()
m_displayText->DisplayError(ERR_TOOMANY, m_object);
return;
}
- power->SetLock(TRUE); // battery not yet usable
+ power->SetLock(true); // battery not yet usable
pos = power->RetPosition(0);
pos.y += 3.0f;
@@ -560,7 +559,7 @@ Error CAutoEnergy::RetError()
// Creates all the interface when the object is selected.
-BOOL CAutoEnergy::CreateInterface(BOOL bSelect)
+bool CAutoEnergy::CreateInterface(bool bSelect)
{
CWindow* pw;
FPOINT pos, ddim;
@@ -568,10 +567,10 @@ BOOL CAutoEnergy::CreateInterface(BOOL bSelect)
CAuto::CreateInterface(bSelect);
- if ( !bSelect ) return TRUE;
+ if ( !bSelect ) return true;
pw = (CWindow*)m_interface->SearchControl(EVENT_WINDOW0);
- if ( pw == 0 ) return FALSE;
+ if ( pw == 0 ) return false;
ox = 3.0f/640.0f;
oy = 3.0f/480.0f;
@@ -590,7 +589,7 @@ BOOL CAutoEnergy::CreateInterface(BOOL bSelect)
ddim.y = 66.0f/480.0f;
pw->CreateGroup(pos, ddim, 108, EVENT_OBJECT_TYPE);
- return TRUE;
+ return true;
}
// Updates the state of all buttons on the interface,
@@ -621,12 +620,12 @@ void CAutoEnergy::UpdateInterface(float rTime)
// Saves all parameters of the controller.
-BOOL CAutoEnergy::Write(char *line)
+bool CAutoEnergy::Write(char *line)
{
char name[100];
if ( m_phase == AENP_STOP ||
- m_phase == AENP_WAIT ) return FALSE;
+ m_phase == AENP_WAIT ) return false;
sprintf(name, " aExist=%d", 1);
strcat(line, name);
@@ -642,14 +641,14 @@ BOOL CAutoEnergy::Write(char *line)
sprintf(name, " aSpeed=%.2f", m_speed);
strcat(line, name);
- return TRUE;
+ return true;
}
// Restores all parameters of the controller.
-BOOL CAutoEnergy::Read(char *line)
+bool CAutoEnergy::Read(char *line)
{
- if ( OpInt(line, "aExist", 0) == 0 ) return FALSE;
+ if ( OpInt(line, "aExist", 0) == 0 ) return false;
CAuto::Read(line);
@@ -660,5 +659,5 @@ BOOL CAutoEnergy::Read(char *line)
m_lastUpdateTime = 0.0f;
m_lastParticule = 0.0f;
- return TRUE;
+ return true;
}
diff --git a/src/object/auto/autoenergy.h b/src/object/auto/autoenergy.h
index 009bf85..f9f096e 100644
--- a/src/object/auto/autoenergy.h
+++ b/src/object/auto/autoenergy.h
@@ -49,22 +49,22 @@ public:
CAutoEnergy(CInstanceManager* iMan, CObject* object);
~CAutoEnergy();
- void DeleteObject(BOOL bAll=FALSE);
+ void DeleteObject(bool bAll=false);
void Init();
- BOOL EventProcess(const Event &event);
+ bool EventProcess(const Event &event);
Error RetError();
- BOOL CreateInterface(BOOL bSelect);
+ bool CreateInterface(bool bSelect);
- BOOL Write(char *line);
- BOOL Read(char *line);
+ bool Write(char *line);
+ bool Read(char *line);
protected:
void UpdateInterface(float rTime);
CObject* SearchMetal();
- BOOL SearchVehicle();
+ bool SearchVehicle();
void CreatePower();
CObject* SearchPower();
diff --git a/src/object/auto/autofactory.cpp b/src/object/auto/autofactory.cpp
index e81f3e8..89bc399 100644
--- a/src/object/auto/autofactory.cpp
+++ b/src/object/auto/autofactory.cpp
@@ -66,13 +66,12 @@ CAutoFactory::CAutoFactory(CInstanceManager* iMan, CObject* object)
CAutoFactory::~CAutoFactory()
{
- this->CAuto::~CAuto();
}
// Destroys the object.
-void CAutoFactory::DeleteObject(BOOL bAll)
+void CAutoFactory::DeleteObject(bool bAll)
{
CObject* fret;
CObject* vehicle;
@@ -124,7 +123,7 @@ void CAutoFactory::Init()
// Management of an event.
-BOOL CAutoFactory::EventProcess(const Event &event)
+bool CAutoFactory::EventProcess(const Event &event)
{
CObject* fret;
CObject* vehicle;
@@ -138,13 +137,13 @@ BOOL CAutoFactory::EventProcess(const Event &event)
CAuto::EventProcess(event);
- if ( m_engine->RetPause() ) return TRUE;
+ if ( m_engine->RetPause() ) return true;
if ( m_object->RetSelect() ) // factory selected?
{
if ( event.event == EVENT_UPDINTERFACE )
{
- CreateInterface(TRUE);
+ CreateInterface(true);
}
type = OBJECT_NULL;
@@ -176,36 +175,36 @@ BOOL CAutoFactory::EventProcess(const Event &event)
if ( m_phase != AFP_WAIT )
{
- return FALSE;
+ return false;
}
fret = SearchFret(); // transform metal?
if ( fret == 0 )
{
m_displayText->DisplayError(ERR_FACTORY_NULL, m_object);
- return FALSE;
+ return false;
}
if ( NearestVehicle() )
{
m_displayText->DisplayError(ERR_FACTORY_NEAR, m_object);
- return FALSE;
+ return false;
}
- SetBusy(TRUE);
+ SetBusy(true);
InitProgressTotal(3.0f+2.0f+15.0f+2.0f+3.0f);
UpdateInterface();
- fret->SetLock(TRUE); // usable metal
+ fret->SetLock(true); // usable metal
SoundManip(3.0f, 1.0f, 0.5f);
m_phase = AFP_CLOSE_S;
m_progress = 0.0f;
m_speed = 1.0f/3.0f;
- return TRUE;
+ return true;
}
}
- if ( event.event != EVENT_FRAME ) return TRUE;
+ if ( event.event != EVENT_FRAME ) return true;
m_progress += event.rTime*m_speed;
EventProgress(event.rTime);
@@ -268,7 +267,7 @@ BOOL CAutoFactory::EventProcess(const Event &event)
m_object->SetAngleZ(10+i, 0.0f);
}
- m_channelSound = m_sound->Play(SOUND_FACTORY, m_object->RetPosition(0), 0.0f, 1.0f, TRUE);
+ m_channelSound = m_sound->Play(SOUND_FACTORY, m_object->RetPosition(0), 0.0f, 1.0f, true);
m_sound->AddEnvelope(m_channelSound, 1.0f, 1.0f, 2.0f, SOPER_CONTINUE);
m_sound->AddEnvelope(m_channelSound, 1.0f, 1.0f, 11.0f, SOPER_CONTINUE);
m_sound->AddEnvelope(m_channelSound, 0.0f, 1.0f, 2.0f, SOPER_STOP);
@@ -288,7 +287,7 @@ BOOL CAutoFactory::EventProcess(const Event &event)
fret = SearchFret(); // transform metal?
if ( fret != 0 )
{
- fret->SetLock(FALSE); // metal usable again
+ fret->SetLock(false); // metal usable again
}
if ( m_channelSound != -1 )
@@ -301,7 +300,7 @@ BOOL CAutoFactory::EventProcess(const Event &event)
m_phase = AFP_OPEN_T;
m_progress = 0.0f;
m_speed = 1.0f/2.0f;
- return TRUE;
+ return true;
}
}
@@ -383,10 +382,10 @@ BOOL CAutoFactory::EventProcess(const Event &event)
physics = vehicle->RetPhysics();
if ( physics != 0 )
{
- physics->SetFreeze(FALSE); // can move
+ physics->SetFreeze(false); // can move
}
- vehicle->SetLock(FALSE); // vehicle useable
+ vehicle->SetLock(false); // vehicle useable
//? vehicle->RetPhysics()->RetBrain()->StartTaskAdvance(16.0f);
vehicle->SetAngleY(0, m_object->RetAngleY(0)+PI);
vehicle->SetZoom(0, 1.0f);
@@ -476,7 +475,7 @@ BOOL CAutoFactory::EventProcess(const Event &event)
m_object->SetZoomZ(10+i, 0.30f);
}
- SetBusy(FALSE);
+ SetBusy(false);
UpdateInterface();
m_phase = AFP_WAIT;
@@ -485,17 +484,17 @@ BOOL CAutoFactory::EventProcess(const Event &event)
}
}
- return TRUE;
+ return true;
}
// Saves all parameters of the controller.
-BOOL CAutoFactory::Write(char *line)
+bool CAutoFactory::Write(char *line)
{
char name[100];
- if ( m_phase == AFP_WAIT ) return FALSE;
+ if ( m_phase == AFP_WAIT ) return false;
sprintf(name, " aExist=%d", 1);
strcat(line, name);
@@ -511,14 +510,14 @@ BOOL CAutoFactory::Write(char *line)
sprintf(name, " aSpeed=%.2f", m_speed);
strcat(line, name);
- return TRUE;
+ return true;
}
// Restores all parameters of the controller
-BOOL CAutoFactory::Read(char *line)
+bool CAutoFactory::Read(char *line)
{
- if ( OpInt(line, "aExist", 0) == 0 ) return FALSE;
+ if ( OpInt(line, "aExist", 0) == 0 ) return false;
CAuto::Read(line);
@@ -529,7 +528,7 @@ BOOL CAutoFactory::Read(char *line)
m_lastParticule = 0.0f;
m_fretPos = m_object->RetPosition(0);
- return TRUE;
+ return true;
}
@@ -563,7 +562,7 @@ CObject* CAutoFactory::SearchFret()
// Search if a vehicle is too close.
-BOOL CAutoFactory::NearestVehicle()
+bool CAutoFactory::NearestVehicle()
{
CObject* pObj;
D3DVECTOR cPos, oPos;
@@ -616,16 +615,16 @@ BOOL CAutoFactory::NearestVehicle()
if ( !pObj->GetCrashSphere(0, oPos, oRadius) ) continue;
dist = Length(oPos, cPos)-oRadius;
- if ( dist < 10.0f ) return TRUE;
+ if ( dist < 10.0f ) return true;
}
- return FALSE;
+ return false;
}
// Creates a vehicle.
-BOOL CAutoFactory::CreateVehicle()
+bool CAutoFactory::CreateVehicle()
{
CObject* vehicle;
D3DMATRIX* mat;
@@ -652,20 +651,20 @@ BOOL CAutoFactory::CreateVehicle()
pos = Transform(*mat, pos);
vehicle = new CObject(m_iMan);
- if ( !vehicle->CreateVehicle(pos, angle, m_type, -1.0f, FALSE, FALSE) )
+ if ( !vehicle->CreateVehicle(pos, angle, m_type, -1.0f, false, false) )
{
delete vehicle;
m_displayText->DisplayError(ERR_TOOMANY, m_object);
- return FALSE;
+ return false;
}
vehicle->UpdateMapping();
- vehicle->SetLock(TRUE); // not usable
+ vehicle->SetLock(true); // not usable
vehicle->SetRange(30.0f);
physics = vehicle->RetPhysics();
if ( physics != 0 )
{
- physics->SetFreeze(TRUE); // it doesn't move
+ physics->SetFreeze(true); // it doesn't move
}
for ( i=0 ; i<10 ; i++ )
@@ -675,7 +674,7 @@ BOOL CAutoFactory::CreateVehicle()
vehicle->ReadProgram(i, name);
}
- return TRUE;
+ return true;
}
// Seeking the vehicle during manufacture.
@@ -711,7 +710,7 @@ CObject* CAutoFactory::SearchVehicle()
// Creates all the interface when the object is selected.
-BOOL CAutoFactory::CreateInterface(BOOL bSelect)
+bool CAutoFactory::CreateInterface(bool bSelect)
{
CWindow* pw;
FPOINT pos, dim, ddim;
@@ -719,10 +718,10 @@ BOOL CAutoFactory::CreateInterface(BOOL bSelect)
CAuto::CreateInterface(bSelect);
- if ( !bSelect ) return TRUE;
+ if ( !bSelect ) return true;
pw = (CWindow*)m_interface->SearchControl(EVENT_WINDOW0);
- if ( pw == 0 ) return FALSE;
+ if ( pw == 0 ) return false;
dim.x = 33.0f/640.0f;
dim.y = 33.0f/480.0f;
@@ -798,7 +797,7 @@ BOOL CAutoFactory::CreateInterface(BOOL bSelect)
pw->CreateGroup(pos, ddim, 101, EVENT_OBJECT_TYPE);
UpdateInterface();
- return TRUE;
+ return true;
}
// Updates the status of all interface buttons.
@@ -838,9 +837,9 @@ void CAutoFactory::UpdateInterface()
// Updates the status of one interface button.
-void CAutoFactory::UpdateButton(CWindow *pw, EventMsg event, BOOL bBusy)
+void CAutoFactory::UpdateButton(CWindow *pw, EventMsg event, bool bBusy)
{
- BOOL bEnable = TRUE;
+ bool bEnable = true;
EnableInterface(pw, event, !bBusy);
@@ -952,7 +951,7 @@ void CAutoFactory::SoundManip(float time, float amplitude, float frequency)
{
int i;
- i = m_sound->Play(SOUND_MANIP, m_object->RetPosition(0), 0.0f, 0.3f*frequency, TRUE);
+ i = m_sound->Play(SOUND_MANIP, m_object->RetPosition(0), 0.0f, 0.3f*frequency, true);
m_sound->AddEnvelope(i, 0.5f*amplitude, 1.0f*frequency, 0.1f, SOPER_CONTINUE);
m_sound->AddEnvelope(i, 0.5f*amplitude, 1.0f*frequency, time-0.1f, SOPER_CONTINUE);
m_sound->AddEnvelope(i, 0.0f, 0.3f*frequency, 0.1f, SOPER_STOP);
diff --git a/src/object/auto/autofactory.h b/src/object/auto/autofactory.h
index 00e1d6b..82e2a96 100644
--- a/src/object/auto/autofactory.h
+++ b/src/object/auto/autofactory.h
@@ -50,23 +50,23 @@ public:
CAutoFactory(CInstanceManager* iMan, CObject* object);
~CAutoFactory();
- void DeleteObject(BOOL bAll=FALSE);
+ void DeleteObject(bool bAll=false);
void Init();
- BOOL EventProcess(const Event &event);
+ bool EventProcess(const Event &event);
- BOOL CreateInterface(BOOL bSelect);
+ bool CreateInterface(bool bSelect);
- BOOL Write(char *line);
- BOOL Read(char *line);
+ bool Write(char *line);
+ bool Read(char *line);
protected:
void UpdateInterface();
- void UpdateButton(CWindow *pw, EventMsg event, BOOL bBusy);
+ void UpdateButton(CWindow *pw, EventMsg event, bool bBusy);
CObject* SearchFret();
- BOOL NearestVehicle();
- BOOL CreateVehicle();
+ bool NearestVehicle();
+ bool CreateVehicle();
CObject* SearchVehicle();
void SoundManip(float time, float amplitude, float frequency);
diff --git a/src/object/auto/autoflag.cpp b/src/object/auto/autoflag.cpp
index 4e29a96..53792cb 100644
--- a/src/object/auto/autoflag.cpp
+++ b/src/object/auto/autoflag.cpp
@@ -37,7 +37,7 @@
-#define ADJUST_ANGLE FALSE // TRUE -> adjusts the angles of the members
+#define ADJUST_ANGLE false // true -> adjusts the angles of the members
#if ADJUST_ANGLE
@@ -59,13 +59,12 @@ CAutoFlag::CAutoFlag(CInstanceManager* iMan, CObject* object)
CAutoFlag::~CAutoFlag()
{
- this->CAuto::~CAuto();
}
// Destroys the object.
-void CAutoFlag::DeleteObject(BOOL bAll)
+void CAutoFlag::DeleteObject(bool bAll)
{
CAuto::DeleteObject(bAll);
}
@@ -104,7 +103,7 @@ void CAutoFlag::Start(int param)
// Management of an event.
-BOOL CAutoFlag::EventProcess(const Event &event)
+bool CAutoFlag::EventProcess(const Event &event)
{
float angle;
int i;
@@ -123,8 +122,8 @@ BOOL CAutoFlag::EventProcess(const Event &event)
}
#endif
- if ( m_engine->RetPause() ) return TRUE;
- if ( event.event != EVENT_FRAME ) return TRUE;
+ if ( m_engine->RetPause() ) return true;
+ if ( event.event != EVENT_FRAME ) return true;
if ( m_param == 1 ) // shakes?
{
@@ -145,7 +144,7 @@ BOOL CAutoFlag::EventProcess(const Event &event)
}
}
- if ( m_strong == 0.0f ) return TRUE; // no wind?
+ if ( m_strong == 0.0f ) return true; // no wind?
for ( i=0 ; i<4 ; i++ )
{
@@ -162,7 +161,7 @@ BOOL CAutoFlag::EventProcess(const Event &event)
sprintf(s, "a=%.2f b=%.2f c=%.2f", g_flag1, g_flag2, g_flag3);
m_engine->SetInfoText(4, s);
#endif
- return TRUE;
+ return true;
}
diff --git a/src/object/auto/autoflag.h b/src/object/auto/autoflag.h
index 654f7a2..c52a25a 100644
--- a/src/object/auto/autoflag.h
+++ b/src/object/auto/autoflag.h
@@ -38,11 +38,11 @@ public:
CAutoFlag(CInstanceManager* iMan, CObject* object);
~CAutoFlag();
- void DeleteObject(BOOL bAll=FALSE);
+ void DeleteObject(bool bAll=false);
void Init();
void Start(int param);
- BOOL EventProcess(const Event &event);
+ bool EventProcess(const Event &event);
Error RetError();
protected:
diff --git a/src/object/auto/autohuston.cpp b/src/object/auto/autohuston.cpp
index f3b7168..6a3202b 100644
--- a/src/object/auto/autohuston.cpp
+++ b/src/object/auto/autohuston.cpp
@@ -187,13 +187,12 @@ CAutoHuston::CAutoHuston(CInstanceManager* iMan, CObject* object)
CAutoHuston::~CAutoHuston()
{
- this->CAuto::~CAuto();
}
// Destroys the object.
-void CAutoHuston::DeleteObject(BOOL bAll)
+void CAutoHuston::DeleteObject(bool bAll)
{
CAuto::DeleteObject(bAll);
}
@@ -219,7 +218,7 @@ void CAutoHuston::Start(int param)
// Management of an event.
-BOOL CAutoHuston::EventProcess(const Event &event)
+bool CAutoHuston::EventProcess(const Event &event)
{
D3DVECTOR speed;
FPOINT dim;
@@ -228,14 +227,14 @@ BOOL CAutoHuston::EventProcess(const Event &event)
CAuto::EventProcess(event);
- if ( m_engine->RetPause() ) return TRUE;
+ if ( m_engine->RetPause() ) return true;
angle = -m_time*1.0f;
m_object->SetAngleY(1, angle); // rotates the radar
angle = sinf(m_time*4.0f)*0.3f;
m_object->SetAngleX(2, angle);
- if ( event.event != EVENT_FRAME ) return TRUE;
+ if ( event.event != EVENT_FRAME ) return true;
m_progress += event.rTime*m_speed;
@@ -263,20 +262,20 @@ BOOL CAutoHuston::EventProcess(const Event &event)
}
}
- return TRUE;
+ return true;
}
// Stops the controller.
-BOOL CAutoHuston::Abort()
+bool CAutoHuston::Abort()
{
- return TRUE;
+ return true;
}
// Creates all the interface when the object is selected.
-BOOL CAutoHuston::CreateInterface(BOOL bSelect)
+bool CAutoHuston::CreateInterface(bool bSelect)
{
CWindow* pw;
FPOINT pos, ddim;
@@ -284,10 +283,10 @@ BOOL CAutoHuston::CreateInterface(BOOL bSelect)
CAuto::CreateInterface(bSelect);
- if ( !bSelect ) return TRUE;
+ if ( !bSelect ) return true;
pw = (CWindow*)m_interface->SearchControl(EVENT_WINDOW0);
- if ( pw == 0 ) return FALSE;
+ if ( pw == 0 ) return false;
ox = 3.0f/640.0f;
oy = 3.0f/480.0f;
@@ -300,7 +299,7 @@ BOOL CAutoHuston::CreateInterface(BOOL bSelect)
ddim.y = 66.0f/480.0f;
pw->CreateGroup(pos, ddim, 115, EVENT_OBJECT_TYPE);
- return TRUE;
+ return true;
}
diff --git a/src/object/auto/autohuston.h b/src/object/auto/autohuston.h
index 8e26aa1..32954f7 100644
--- a/src/object/auto/autohuston.h
+++ b/src/object/auto/autohuston.h
@@ -53,15 +53,15 @@ public:
CAutoHuston(CInstanceManager* iMan, CObject* object);
~CAutoHuston();
- void DeleteObject(BOOL bAll=FALSE);
+ void DeleteObject(bool bAll=false);
void Init();
void Start(int param);
- BOOL EventProcess(const Event &event);
- BOOL Abort();
+ bool EventProcess(const Event &event);
+ bool Abort();
Error RetError();
- BOOL CreateInterface(BOOL bSelect);
+ bool CreateInterface(bool bSelect);
protected:
diff --git a/src/object/auto/autoinfo.cpp b/src/object/auto/autoinfo.cpp
index 713b148..12dc2de 100644
--- a/src/object/auto/autoinfo.cpp
+++ b/src/object/auto/autoinfo.cpp
@@ -57,13 +57,12 @@ CAutoInfo::CAutoInfo(CInstanceManager* iMan, CObject* object)
CAutoInfo::~CAutoInfo()
{
- this->CAuto::~CAuto();
}
// Destroys the object.
-void CAutoInfo::DeleteObject(BOOL bAll)
+void CAutoInfo::DeleteObject(bool bAll)
{
CAuto::DeleteObject(bAll);
}
@@ -76,7 +75,7 @@ void CAutoInfo::Init()
m_phase = AIP_WAIT;
m_time = 0.0f;
m_timeVirus = 0.0f;
- m_bLastVirus = FALSE;
+ m_bLastVirus = false;
CAuto::Init();
}
@@ -142,7 +141,7 @@ void CAutoInfo::Start(int param)
// Management of an event.
-BOOL CAutoInfo::EventProcess(const Event &event)
+bool CAutoInfo::EventProcess(const Event &event)
{
D3DVECTOR pos, speed;
FPOINT dim;
@@ -151,8 +150,8 @@ BOOL CAutoInfo::EventProcess(const Event &event)
CAuto::EventProcess(event);
- if ( m_engine->RetPause() ) return TRUE;
- if ( event.event != EVENT_FRAME ) return TRUE;
+ if ( m_engine->RetPause() ) return true;
+ if ( event.event != EVENT_FRAME ) return true;
m_timeVirus -= event.rTime;
@@ -176,14 +175,14 @@ BOOL CAutoInfo::EventProcess(const Event &event)
UpdateListVirus();
}
- m_bLastVirus = TRUE;
- return TRUE;
+ m_bLastVirus = true;
+ return true;
}
else
{
if ( m_bLastVirus )
{
- m_bLastVirus = FALSE;
+ m_bLastVirus = false;
UpdateList(); // normally returns the list
}
else
@@ -353,7 +352,7 @@ BOOL CAutoInfo::EventProcess(const Event &event)
m_object->SetAngleX(5, sinf(m_time*6.0f+PI*2.0f/3.0f)*0.3f);
m_object->SetAngleX(7, sinf(m_time*6.0f+PI*4.0f/3.0f)*0.3f);
- return TRUE;
+ return true;
}
@@ -372,7 +371,7 @@ Error CAutoInfo::RetError()
// Creates all the interface when the object is selected.
-BOOL CAutoInfo::CreateInterface(BOOL bSelect)
+bool CAutoInfo::CreateInterface(bool bSelect)
{
CWindow* pw;
CList* pl;
@@ -381,10 +380,10 @@ BOOL CAutoInfo::CreateInterface(BOOL bSelect)
CAuto::CreateInterface(bSelect);
- if ( !bSelect ) return TRUE;
+ if ( !bSelect ) return true;
pw = (CWindow*)m_interface->SearchControl(EVENT_WINDOW0);
- if ( pw == 0 ) return FALSE;
+ if ( pw == 0 ) return false;
ox = 3.0f/640.0f;
oy = 3.0f/480.0f;
@@ -396,7 +395,7 @@ BOOL CAutoInfo::CreateInterface(BOOL bSelect)
ddim.x = 160.0f/640.0f;
ddim.y = 66.0f/480.0f;
pl = pw->CreateList(pos, ddim, 1, EVENT_OBJECT_GINFO, 1.10f);
- pl->SetSelectCap(FALSE);
+ pl->SetSelectCap(false);
pos.x = ox+sx*0.0f;
pos.y = oy+sy*0;
@@ -405,7 +404,7 @@ BOOL CAutoInfo::CreateInterface(BOOL bSelect)
pw->CreateGroup(pos, ddim, 112, EVENT_OBJECT_TYPE);
UpdateList();
- return TRUE;
+ return true;
}
// Updates the state of all buttons on the interface,
@@ -451,7 +450,7 @@ void CAutoInfo::UpdateList()
}
}
- m_object->SetInfoUpdate(FALSE);
+ m_object->SetInfoUpdate(false);
}
// Updates the content of contaminating the list.
@@ -492,11 +491,11 @@ void CAutoInfo::UpdateListVirus()
// Saves all parameters of the controller.
-BOOL CAutoInfo::Write(char *line)
+bool CAutoInfo::Write(char *line)
{
char name[100];
- if ( m_phase == AIP_WAIT ) return FALSE;
+ if ( m_phase == AIP_WAIT ) return false;
sprintf(name, " aExist=%d", 1);
strcat(line, name);
@@ -512,14 +511,14 @@ BOOL CAutoInfo::Write(char *line)
sprintf(name, " aSpeed=%.2f", m_speed);
strcat(line, name);
- return TRUE;
+ return true;
}
// Restores all parameters of the controller.
-BOOL CAutoInfo::Read(char *line)
+bool CAutoInfo::Read(char *line)
{
- if ( OpInt(line, "aExist", 0) == 0 ) return FALSE;
+ if ( OpInt(line, "aExist", 0) == 0 ) return false;
CAuto::Read(line);
@@ -529,7 +528,7 @@ BOOL CAutoInfo::Read(char *line)
m_lastParticule = 0.0f;
- return TRUE;
+ return true;
}
diff --git a/src/object/auto/autoinfo.h b/src/object/auto/autoinfo.h
index 412a0af..7cd3002 100644
--- a/src/object/auto/autoinfo.h
+++ b/src/object/auto/autoinfo.h
@@ -48,17 +48,17 @@ public:
CAutoInfo(CInstanceManager* iMan, CObject* object);
~CAutoInfo();
- void DeleteObject(BOOL bAll=FALSE);
+ void DeleteObject(bool bAll=false);
void Init();
void Start(int param);
- BOOL EventProcess(const Event &event);
+ bool EventProcess(const Event &event);
Error RetError();
- BOOL CreateInterface(BOOL bSelect);
+ bool CreateInterface(bool bSelect);
- BOOL Write(char *line);
- BOOL Read(char *line);
+ bool Write(char *line);
+ bool Read(char *line);
protected:
void UpdateInterface(float rTime);
@@ -72,6 +72,6 @@ protected:
float m_timeVirus;
float m_lastParticule;
D3DVECTOR m_goal;
- BOOL m_bLastVirus;
+ bool m_bLastVirus;
};
diff --git a/src/object/auto/autojostle.cpp b/src/object/auto/autojostle.cpp
index aec152e..93bdd6b 100644
--- a/src/object/auto/autojostle.cpp
+++ b/src/object/auto/autojostle.cpp
@@ -57,13 +57,12 @@ CAutoJostle::CAutoJostle(CInstanceManager* iMan, CObject* object)
CAutoJostle::~CAutoJostle()
{
- this->CAuto::~CAuto();
}
// Destroys the object.
-void CAutoJostle::DeleteObject(BOOL bAll)
+void CAutoJostle::DeleteObject(bool bAll)
{
CAuto::DeleteObject(bAll);
}
@@ -106,15 +105,15 @@ void CAutoJostle::Start(int param, float force)
// Management of an event.
-BOOL CAutoJostle::EventProcess(const Event &event)
+bool CAutoJostle::EventProcess(const Event &event)
{
D3DVECTOR dir;
float factor, angle, zoom;
CAuto::EventProcess(event);
- if ( m_engine->RetPause() ) return TRUE;
- if ( event.event != EVENT_FRAME ) return TRUE;
+ if ( m_engine->RetPause() ) return true;
+ if ( event.event != EVENT_FRAME ) return true;
if ( m_progress < 1.0f )
{
@@ -152,7 +151,7 @@ BOOL CAutoJostle::EventProcess(const Event &event)
m_error = ERR_STOP;
}
- return TRUE;
+ return true;
}
diff --git a/src/object/auto/autojostle.h b/src/object/auto/autojostle.h
index d154ef1..c3a1bd8 100644
--- a/src/object/auto/autojostle.h
+++ b/src/object/auto/autojostle.h
@@ -38,11 +38,11 @@ public:
CAutoJostle(CInstanceManager* iMan, CObject* object);
~CAutoJostle();
- void DeleteObject(BOOL bAll=FALSE);
+ void DeleteObject(bool bAll=false);
void Init();
void Start(int param, float force);
- BOOL EventProcess(const Event &event);
+ bool EventProcess(const Event &event);
Error IsEnded();
protected:
diff --git a/src/object/auto/autokid.cpp b/src/object/auto/autokid.cpp
index 79a9e2d..99d4c81 100644
--- a/src/object/auto/autokid.cpp
+++ b/src/object/auto/autokid.cpp
@@ -60,14 +60,12 @@ CAutoKid::~CAutoKid()
m_sound->AddEnvelope(m_soundChannel, 0.0f, 1.0f, 1.0f, SOPER_STOP);
m_soundChannel = -1;
}
-
- this->CAuto::~CAuto();
}
// Destroys the object.
-void CAutoKid::DeleteObject(BOOL bAll)
+void CAutoKid::DeleteObject(bool bAll)
{
CAuto::DeleteObject(bAll);
}
@@ -101,8 +99,8 @@ void CAutoKid::Init()
{
if ( m_soundChannel == -1 )
{
-//? m_soundChannel = m_sound->Play(SOUND_MANIP, m_object->RetPosition(0), 1.0f, 0.5f, TRUE);
- m_bSilent = FALSE;
+//? m_soundChannel = m_sound->Play(SOUND_MANIP, m_object->RetPosition(0), 1.0f, 0.5f, true);
+ m_bSilent = false;
}
}
}
@@ -110,7 +108,7 @@ void CAutoKid::Init()
// Management of an event.
-BOOL CAutoKid::EventProcess(const Event &event)
+bool CAutoKid::EventProcess(const Event &event)
{
D3DVECTOR vib, pos, speed;
FPOINT dim;
@@ -124,7 +122,7 @@ BOOL CAutoKid::EventProcess(const Event &event)
if ( !m_bSilent )
{
m_sound->AddEnvelope(m_soundChannel, 0.0f, 0.5f, 0.1f, SOPER_CONTINUE);
- m_bSilent = TRUE;
+ m_bSilent = true;
}
}
else
@@ -132,13 +130,13 @@ BOOL CAutoKid::EventProcess(const Event &event)
if ( m_bSilent )
{
m_sound->AddEnvelope(m_soundChannel, 1.0f, 0.5f, 0.1f, SOPER_CONTINUE);
- m_bSilent = FALSE;
+ m_bSilent = false;
}
}
}
- if ( m_engine->RetPause() ) return TRUE;
- if ( event.event != EVENT_FRAME ) return TRUE;
+ if ( m_engine->RetPause() ) return true;
+ if ( event.event != EVENT_FRAME ) return true;
m_progress += event.rTime*m_speed;
@@ -206,7 +204,7 @@ BOOL CAutoKid::EventProcess(const Event &event)
m_object->SetAngleX(2, m_progress*5.0f);
}
- return TRUE;
+ return true;
}
diff --git a/src/object/auto/autokid.h b/src/object/auto/autokid.h
index 8e1c3af..677d1f0 100644
--- a/src/object/auto/autokid.h
+++ b/src/object/auto/autokid.h
@@ -38,10 +38,10 @@ public:
CAutoKid(CInstanceManager* iMan, CObject* object);
~CAutoKid();
- void DeleteObject(BOOL bAll=FALSE);
+ void DeleteObject(bool bAll=false);
void Init();
- BOOL EventProcess(const Event &event);
+ bool EventProcess(const Event &event);
Error RetError();
protected:
@@ -51,6 +51,6 @@ protected:
float m_progress;
float m_lastParticule;
int m_soundChannel;
- BOOL m_bSilent;
+ bool m_bSilent;
};
diff --git a/src/object/auto/autolabo.cpp b/src/object/auto/autolabo.cpp
index 06440a1..41b6299 100644
--- a/src/object/auto/autolabo.cpp
+++ b/src/object/auto/autolabo.cpp
@@ -73,13 +73,12 @@ CAutoLabo::CAutoLabo(CInstanceManager* iMan, CObject* object)
CAutoLabo::~CAutoLabo()
{
- this->CAuto::~CAuto();
}
// Destroys the object.
-void CAutoLabo::DeleteObject(BOOL bAll)
+void CAutoLabo::DeleteObject(bool bAll)
{
int i;
@@ -127,7 +126,7 @@ void CAutoLabo::Init()
// Management of an event.
-BOOL CAutoLabo::EventProcess(const Event &event)
+bool CAutoLabo::EventProcess(const Event &event)
{
CObject* power;
D3DVECTOR pos, goal, speed;
@@ -137,11 +136,11 @@ BOOL CAutoLabo::EventProcess(const Event &event)
CAuto::EventProcess(event);
- if ( m_engine->RetPause() ) return TRUE;
+ if ( m_engine->RetPause() ) return true;
if ( event.event == EVENT_UPDINTERFACE )
{
- if ( m_object->RetSelect() ) CreateInterface(TRUE);
+ if ( m_object->RetSelect() ) CreateInterface(true);
}
if ( m_object->RetSelect() && // center selected?
@@ -150,7 +149,7 @@ BOOL CAutoLabo::EventProcess(const Event &event)
{
if ( m_phase != ALAP_WAIT )
{
- return FALSE;
+ return false;
}
m_research = event.event;
@@ -158,35 +157,35 @@ BOOL CAutoLabo::EventProcess(const Event &event)
if ( TestResearch(m_research) )
{
m_displayText->DisplayError(ERR_LABO_ALREADY, m_object);
- return FALSE;
+ return false;
}
power = m_object->RetPower();
if ( power == 0 )
{
m_displayText->DisplayError(ERR_LABO_NULL, m_object);
- return FALSE;
+ return false;
}
if ( power->RetType() != OBJECT_BULLET )
{
m_displayText->DisplayError(ERR_LABO_BAD, m_object);
- return FALSE;
+ return false;
}
- SetBusy(TRUE);
+ SetBusy(true);
InitProgressTotal(1.0f+1.5f+1.5f+LABO_DELAY+1.5f+1.5f+1.0f);
UpdateInterface();
- power->SetLock(TRUE); // ball longer usable
+ power->SetLock(true); // ball longer usable
SoundManip(1.0f, 1.0f, 1.0f);
m_phase = ALAP_OPEN1;
m_progress = 0.0f;
m_speed = 1.0f/1.0f;
- return TRUE;
+ return true;
}
- if ( event.event != EVENT_FRAME ) return TRUE;
+ if ( event.event != EVENT_FRAME ) return true;
m_progress += event.rTime*m_speed;
m_timeVirus -= event.rTime;
@@ -197,7 +196,7 @@ BOOL CAutoLabo::EventProcess(const Event &event)
{
m_timeVirus = 0.1f+Rand()*0.3f;
}
- return TRUE;
+ return true;
}
EventProgress(event.rTime);
@@ -278,7 +277,7 @@ BOOL CAutoLabo::EventProcess(const Event &event)
LABO_DELAY);
}
- m_soundChannel = m_sound->Play(SOUND_LABO, m_object->RetPosition(0), 0.0f, 0.25f, TRUE);
+ m_soundChannel = m_sound->Play(SOUND_LABO, m_object->RetPosition(0), 0.0f, 0.25f, true);
m_sound->AddEnvelope(m_soundChannel, 1.0f, 0.60f, 2.0f, SOPER_CONTINUE);
m_sound->AddEnvelope(m_soundChannel, 1.0f, 2.00f, 8.0f, SOPER_CONTINUE);
m_sound->AddEnvelope(m_soundChannel, 1.0f, 0.60f, 8.0f, SOPER_CONTINUE);
@@ -426,7 +425,7 @@ BOOL CAutoLabo::EventProcess(const Event &event)
m_object->SetAngleZ(4, 80.0f*PI/180.0f);
m_object->SetAngleZ(5, 80.0f*PI/180.0f);
- SetBusy(FALSE);
+ SetBusy(false);
UpdateInterface();
m_phase = ALAP_WAIT;
@@ -435,7 +434,7 @@ BOOL CAutoLabo::EventProcess(const Event &event)
}
}
- return TRUE;
+ return true;
}
@@ -462,7 +461,7 @@ Error CAutoLabo::RetError()
// Creates all the interface when the object is selected.
-BOOL CAutoLabo::CreateInterface(BOOL bSelect)
+bool CAutoLabo::CreateInterface(bool bSelect)
{
CWindow* pw;
FPOINT pos, dim, ddim;
@@ -470,10 +469,10 @@ BOOL CAutoLabo::CreateInterface(BOOL bSelect)
CAuto::CreateInterface(bSelect);
- if ( !bSelect ) return TRUE;
+ if ( !bSelect ) return true;
pw = (CWindow*)m_interface->SearchControl(EVENT_WINDOW0);
- if ( pw == 0 ) return FALSE;
+ if ( pw == 0 ) return false;
dim.x = 33.0f/640.0f;
dim.y = 33.0f/480.0f;
@@ -498,7 +497,7 @@ BOOL CAutoLabo::CreateInterface(BOOL bSelect)
UpdateInterface();
- return TRUE;
+ return true;
}
// Updates the status of all interface buttons.
@@ -539,12 +538,12 @@ void CAutoLabo::OkayButton(CWindow *pw, EventMsg event)
// Test whether a search has already been done.
-BOOL CAutoLabo::TestResearch(EventMsg event)
+bool CAutoLabo::TestResearch(EventMsg event)
{
if ( event == EVENT_OBJECT_RiPAW ) return (g_researchDone & RESEARCH_iPAW);
if ( event == EVENT_OBJECT_RiGUN ) return (g_researchDone & RESEARCH_iGUN);
- return FALSE;
+ return false;
}
// Indicates a search as made.
@@ -569,7 +568,7 @@ void CAutoLabo::SoundManip(float time, float amplitude, float frequency)
{
int i;
- i = m_sound->Play(SOUND_MANIP, m_object->RetPosition(0), 0.0f, 0.3f*frequency, TRUE);
+ i = m_sound->Play(SOUND_MANIP, m_object->RetPosition(0), 0.0f, 0.3f*frequency, true);
m_sound->AddEnvelope(i, 0.5f*amplitude, 1.0f*frequency, 0.1f, SOPER_CONTINUE);
m_sound->AddEnvelope(i, 0.5f*amplitude, 1.0f*frequency, time-0.1f, SOPER_CONTINUE);
m_sound->AddEnvelope(i, 0.0f, 0.3f*frequency, 0.1f, SOPER_STOP);
@@ -578,12 +577,12 @@ void CAutoLabo::SoundManip(float time, float amplitude, float frequency)
// Saves all parameters of the controller.
-BOOL CAutoLabo::Write(char *line)
+bool CAutoLabo::Write(char *line)
{
D3DVECTOR pos;
char name[100];
- if ( m_phase == ALAP_WAIT ) return FALSE;
+ if ( m_phase == ALAP_WAIT ) return false;
sprintf(name, " aExist=%d", 1);
strcat(line, name);
@@ -602,16 +601,16 @@ BOOL CAutoLabo::Write(char *line)
sprintf(name, " aResearch=%d", m_research);
strcat(line, name);
- return TRUE;
+ return true;
}
// Restores all parameters of the controller.
-BOOL CAutoLabo::Read(char *line)
+bool CAutoLabo::Read(char *line)
{
D3DVECTOR pos;
- if ( OpInt(line, "aExist", 0) == 0 ) return FALSE;
+ if ( OpInt(line, "aExist", 0) == 0 ) return false;
CAuto::Read(line);
@@ -622,7 +621,7 @@ BOOL CAutoLabo::Read(char *line)
m_lastParticule = 0.0f;
- return TRUE;
+ return true;
}
diff --git a/src/object/auto/autolabo.h b/src/object/auto/autolabo.h
index 0b1e91b..53faa0a 100644
--- a/src/object/auto/autolabo.h
+++ b/src/object/auto/autolabo.h
@@ -52,21 +52,21 @@ public:
CAutoLabo(CInstanceManager* iMan, CObject* object);
~CAutoLabo();
- void DeleteObject(BOOL bAll=FALSE);
+ void DeleteObject(bool bAll=false);
void Init();
- BOOL EventProcess(const Event &event);
+ bool EventProcess(const Event &event);
Error RetError();
- BOOL CreateInterface(BOOL bSelect);
+ bool CreateInterface(bool bSelect);
- BOOL Write(char *line);
- BOOL Read(char *line);
+ bool Write(char *line);
+ bool Read(char *line);
protected:
void UpdateInterface();
void OkayButton(CWindow *pw, EventMsg event);
- BOOL TestResearch(EventMsg event);
+ bool TestResearch(EventMsg event);
void SetResearch(EventMsg event);
void SoundManip(float time, float amplitude, float frequency);
diff --git a/src/object/auto/automush.cpp b/src/object/auto/automush.cpp
index 0a7ed4f..45aa019 100644
--- a/src/object/auto/automush.cpp
+++ b/src/object/auto/automush.cpp
@@ -53,13 +53,12 @@ CAutoMush::CAutoMush(CInstanceManager* iMan, CObject* object)
CAutoMush::~CAutoMush()
{
- this->CAuto::~CAuto();
}
// Destroys the object.
-void CAutoMush::DeleteObject(BOOL bAll)
+void CAutoMush::DeleteObject(bool bAll)
{
CAuto::DeleteObject(bAll);
}
@@ -80,7 +79,7 @@ void CAutoMush::Init()
// Management of an event.
-BOOL CAutoMush::EventProcess(const Event &event)
+bool CAutoMush::EventProcess(const Event &event)
{
D3DVECTOR pos, speed, dir;
FPOINT dim;
@@ -89,8 +88,8 @@ BOOL CAutoMush::EventProcess(const Event &event)
CAuto::EventProcess(event);
- if ( m_engine->RetPause() ) return TRUE;
- if ( event.event != EVENT_FRAME ) return TRUE;
+ if ( m_engine->RetPause() ) return true;
+ if ( event.event != EVENT_FRAME ) return true;
m_progress += event.rTime*m_speed;
@@ -229,13 +228,13 @@ BOOL CAutoMush::EventProcess(const Event &event)
m_object->SetZoom(0, D3DVECTOR(1.0f, 1.0f, 1.0f));
}
- return TRUE;
+ return true;
}
// Seeking a nearby target.
-BOOL CAutoMush::SearchTarget()
+bool CAutoMush::SearchTarget()
{
CObject* pObj;
D3DVECTOR iPos, oPos;
@@ -298,10 +297,10 @@ BOOL CAutoMush::SearchTarget()
oPos = pObj->RetPosition(0);
dist = Length(oPos, iPos);
- if ( dist < 50.0f ) return TRUE;
+ if ( dist < 50.0f ) return true;
}
- return FALSE;
+ return false;
}
@@ -315,12 +314,12 @@ Error CAutoMush::RetError()
// Saves all parameters of the controller.
-BOOL CAutoMush::Write(char *line)
+bool CAutoMush::Write(char *line)
{
D3DVECTOR pos;
char name[100];
- if ( m_phase == AMP_WAIT ) return FALSE;
+ if ( m_phase == AMP_WAIT ) return false;
sprintf(name, " aExist=%d", 1);
strcat(line, name);
@@ -336,16 +335,16 @@ BOOL CAutoMush::Write(char *line)
sprintf(name, " aSpeed=%.2f", m_speed);
strcat(line, name);
- return TRUE;
+ return true;
}
// Restores all parameters of the controller.
-BOOL CAutoMush::Read(char *line)
+bool CAutoMush::Read(char *line)
{
D3DVECTOR pos;
- if ( OpInt(line, "aExist", 0) == 0 ) return FALSE;
+ if ( OpInt(line, "aExist", 0) == 0 ) return false;
CAuto::Read(line);
@@ -355,7 +354,7 @@ BOOL CAutoMush::Read(char *line)
m_lastParticule = 0.0f;
- return TRUE;
+ return true;
}
diff --git a/src/object/auto/automush.h b/src/object/auto/automush.h
index 5b5ea30..62bd322 100644
--- a/src/object/auto/automush.h
+++ b/src/object/auto/automush.h
@@ -49,17 +49,17 @@ public:
CAutoMush(CInstanceManager* iMan, CObject* object);
~CAutoMush();
- void DeleteObject(BOOL bAll=FALSE);
+ void DeleteObject(bool bAll=false);
void Init();
- BOOL EventProcess(const Event &event);
+ bool EventProcess(const Event &event);
Error RetError();
- BOOL Write(char *line);
- BOOL Read(char *line);
+ bool Write(char *line);
+ bool Read(char *line);
protected:
- BOOL SearchTarget();
+ bool SearchTarget();
protected:
AutoMushPhase m_phase;
diff --git a/src/object/auto/autonest.cpp b/src/object/auto/autonest.cpp
index 370dfe9..a9226ac 100644
--- a/src/object/auto/autonest.cpp
+++ b/src/object/auto/autonest.cpp
@@ -51,13 +51,12 @@ CAutoNest::CAutoNest(CInstanceManager* iMan, CObject* object)
CAutoNest::~CAutoNest()
{
- this->CAuto::~CAuto();
}
// Destroys the object.
-void CAutoNest::DeleteObject(BOOL bAll)
+void CAutoNest::DeleteObject(bool bAll)
{
CObject* fret;
@@ -96,14 +95,14 @@ void CAutoNest::Init()
// Management of an event.
-BOOL CAutoNest::EventProcess(const Event &event)
+bool CAutoNest::EventProcess(const Event &event)
{
CObject* fret;
CAuto::EventProcess(event);
- if ( m_engine->RetPause() ) return TRUE;
- if ( event.event != EVENT_FRAME ) return TRUE;
+ if ( m_engine->RetPause() ) return true;
+ if ( event.event != EVENT_FRAME ) return true;
m_progress += event.rTime*m_speed;
@@ -143,7 +142,7 @@ BOOL CAutoNest::EventProcess(const Event &event)
if ( fret != 0 )
{
fret->SetZoom(0, 1.0f);
- fret->SetLock(FALSE);
+ fret->SetLock(false);
}
m_phase = ANP_WAIT;
@@ -152,13 +151,13 @@ BOOL CAutoNest::EventProcess(const Event &event)
}
}
- return TRUE;
+ return true;
}
// Seeks if a site is free.
-BOOL CAutoNest::SearchFree(D3DVECTOR pos)
+bool CAutoNest::SearchFree(D3DVECTOR pos)
{
CObject* pObj;
D3DVECTOR sPos;
@@ -179,11 +178,11 @@ BOOL CAutoNest::SearchFree(D3DVECTOR pos)
{
distance = Length(sPos, pos);
distance -= sRadius;
- if ( distance < 2.0f ) return FALSE; // location occupied
+ if ( distance < 2.0f ) return false; // location occupied
}
}
- return TRUE; // free location
+ return true; // free location
}
// Create a transportable object.
@@ -198,7 +197,7 @@ void CAutoNest::CreateFret(D3DVECTOR pos, float angle, ObjectType type)
delete fret;
return;
}
- fret->SetLock(TRUE); // not usable
+ fret->SetLock(true); // not usable
fret->SetZoom(0, 0.0f);
}
@@ -243,12 +242,12 @@ Error CAutoNest::RetError()
// Saves all parameters of the controller.
-BOOL CAutoNest::Write(char *line)
+bool CAutoNest::Write(char *line)
{
D3DVECTOR pos;
char name[100];
- if ( m_phase == ANP_WAIT ) return FALSE;
+ if ( m_phase == ANP_WAIT ) return false;
sprintf(name, " aExist=%d", 1);
strcat(line, name);
@@ -264,16 +263,16 @@ BOOL CAutoNest::Write(char *line)
sprintf(name, " aSpeed=%.2f", m_speed);
strcat(line, name);
- return TRUE;
+ return true;
}
// Restores all parameters of the controller.
-BOOL CAutoNest::Read(char *line)
+bool CAutoNest::Read(char *line)
{
D3DVECTOR pos;
- if ( OpInt(line, "aExist", 0) == 0 ) return FALSE;
+ if ( OpInt(line, "aExist", 0) == 0 ) return false;
CAuto::Read(line);
@@ -283,7 +282,7 @@ BOOL CAutoNest::Read(char *line)
m_lastParticule = 0.0f;
- return TRUE;
+ return true;
}
diff --git a/src/object/auto/autonest.h b/src/object/auto/autonest.h
index 1052462..55ee2f0 100644
--- a/src/object/auto/autonest.h
+++ b/src/object/auto/autonest.h
@@ -46,17 +46,17 @@ public:
CAutoNest(CInstanceManager* iMan, CObject* object);
~CAutoNest();
- void DeleteObject(BOOL bAll=FALSE);
+ void DeleteObject(bool bAll=false);
void Init();
- BOOL EventProcess(const Event &event);
+ bool EventProcess(const Event &event);
Error RetError();
- BOOL Write(char *line);
- BOOL Read(char *line);
+ bool Write(char *line);
+ bool Read(char *line);
protected:
- BOOL SearchFree(D3DVECTOR pos);
+ bool SearchFree(D3DVECTOR pos);
void CreateFret(D3DVECTOR pos, float angle, ObjectType type);
CObject* SearchFret();
diff --git a/src/object/auto/autonuclear.cpp b/src/object/auto/autonuclear.cpp
index 160787b..a6a9904 100644
--- a/src/object/auto/autonuclear.cpp
+++ b/src/object/auto/autonuclear.cpp
@@ -63,13 +63,12 @@ CAutoNuclear::CAutoNuclear(CInstanceManager* iMan, CObject* object)
CAutoNuclear::~CAutoNuclear()
{
- this->CAuto::~CAuto();
}
// Destroys the object.
-void CAutoNuclear::DeleteObject(BOOL bAll)
+void CAutoNuclear::DeleteObject(bool bAll)
{
CObject* fret;
@@ -117,7 +116,7 @@ void CAutoNuclear::Init()
// Management of an event.
-BOOL CAutoNuclear::EventProcess(const Event &event)
+bool CAutoNuclear::EventProcess(const Event &event)
{
CObject* fret;
D3DMATRIX* mat;
@@ -128,8 +127,8 @@ BOOL CAutoNuclear::EventProcess(const Event &event)
CAuto::EventProcess(event);
- if ( m_engine->RetPause() ) return TRUE;
- if ( event.event != EVENT_FRAME ) return TRUE;
+ if ( m_engine->RetPause() ) return true;
+ if ( event.event != EVENT_FRAME ) return true;
m_progress += event.rTime*m_speed;
m_timeVirus -= event.rTime;
@@ -140,7 +139,7 @@ BOOL CAutoNuclear::EventProcess(const Event &event)
{
m_timeVirus = 0.1f+Rand()*0.3f;
}
- return TRUE;
+ return true;
}
EventProgress(event.rTime);
@@ -158,9 +157,9 @@ BOOL CAutoNuclear::EventProcess(const Event &event)
}
else
{
- fret->SetLock(TRUE); // usable uranium
+ fret->SetLock(true); // usable uranium
- SetBusy(TRUE);
+ SetBusy(true);
InitProgressTotal(1.5f+NUCLEAR_DELAY+1.5f);
UpdateInterface();
@@ -202,7 +201,7 @@ BOOL CAutoNuclear::EventProcess(const Event &event)
m_sound->Play(SOUND_CLOSE, m_object->RetPosition(0), 1.0f, 1.0f);
- m_channelSound = m_sound->Play(SOUND_NUCLEAR, m_object->RetPosition(0), 1.0f, 0.1f, TRUE);
+ m_channelSound = m_sound->Play(SOUND_NUCLEAR, m_object->RetPosition(0), 1.0f, 0.1f, true);
m_sound->AddEnvelope(m_channelSound, 1.0f, 1.0f, NUCLEAR_DELAY-1.0f, SOPER_CONTINUE);
m_sound->AddEnvelope(m_channelSound, 0.0f, 1.0f, 2.0f, SOPER_STOP);
@@ -286,7 +285,7 @@ BOOL CAutoNuclear::EventProcess(const Event &event)
{
m_object->SetAngleZ(1, 135.0f*PI/180.0f);
- SetBusy(FALSE);
+ SetBusy(false);
UpdateInterface();
m_displayText->DisplayError(INFO_NUCLEAR, m_object);
@@ -297,13 +296,13 @@ BOOL CAutoNuclear::EventProcess(const Event &event)
}
}
- return TRUE;
+ return true;
}
// Creates all the interface when the object is selected.
-BOOL CAutoNuclear::CreateInterface(BOOL bSelect)
+bool CAutoNuclear::CreateInterface(bool bSelect)
{
CWindow* pw;
FPOINT pos, ddim;
@@ -311,10 +310,10 @@ BOOL CAutoNuclear::CreateInterface(BOOL bSelect)
CAuto::CreateInterface(bSelect);
- if ( !bSelect ) return TRUE;
+ if ( !bSelect ) return true;
pw = (CWindow*)m_interface->SearchControl(EVENT_WINDOW0);
- if ( pw == 0 ) return FALSE;
+ if ( pw == 0 ) return false;
ox = 3.0f/640.0f;
oy = 3.0f/480.0f;
@@ -327,7 +326,7 @@ BOOL CAutoNuclear::CreateInterface(BOOL bSelect)
ddim.y = 66.0f/480.0f;
pw->CreateGroup(pos, ddim, 110, EVENT_OBJECT_TYPE);
- return TRUE;
+ return true;
}
@@ -345,7 +344,7 @@ CObject* CAutoNuclear::SearchUranium()
// Seeks if a vehicle is too close.
-BOOL CAutoNuclear::SearchVehicle()
+bool CAutoNuclear::SearchVehicle()
{
CObject* pObj;
D3DVECTOR oPos;
@@ -396,10 +395,10 @@ BOOL CAutoNuclear::SearchVehicle()
if ( !pObj->GetCrashSphere(0, oPos, oRadius) ) continue;
dist = Length(oPos, m_pos)-oRadius;
- if ( dist < 10.0f ) return TRUE;
+ if ( dist < 10.0f ) return true;
}
- return FALSE;
+ return false;
}
// Creates an object stack.
@@ -458,12 +457,12 @@ Error CAutoNuclear::RetError()
// Saves all parameters of the controller.
-BOOL CAutoNuclear::Write(char *line)
+bool CAutoNuclear::Write(char *line)
{
char name[100];
if ( m_phase == ANUP_STOP ||
- m_phase == ANUP_WAIT ) return FALSE;
+ m_phase == ANUP_WAIT ) return false;
sprintf(name, " aExist=%d", 1);
strcat(line, name);
@@ -479,14 +478,14 @@ BOOL CAutoNuclear::Write(char *line)
sprintf(name, " aSpeed=%.2f", m_speed);
strcat(line, name);
- return TRUE;
+ return true;
}
// Restores all parameters of the controller.
-BOOL CAutoNuclear::Read(char *line)
+bool CAutoNuclear::Read(char *line)
{
- if ( OpInt(line, "aExist", 0) == 0 ) return FALSE;
+ if ( OpInt(line, "aExist", 0) == 0 ) return false;
CAuto::Read(line);
@@ -496,7 +495,7 @@ BOOL CAutoNuclear::Read(char *line)
m_lastParticule = 0.0f;
- return TRUE;
+ return true;
}
diff --git a/src/object/auto/autonuclear.h b/src/object/auto/autonuclear.h
index bdb828b..36b3483 100644
--- a/src/object/auto/autonuclear.h
+++ b/src/object/auto/autonuclear.h
@@ -49,20 +49,20 @@ public:
CAutoNuclear(CInstanceManager* iMan, CObject* object);
~CAutoNuclear();
- void DeleteObject(BOOL bAll=FALSE);
+ void DeleteObject(bool bAll=false);
void Init();
- BOOL EventProcess(const Event &event);
+ bool EventProcess(const Event &event);
Error RetError();
- BOOL CreateInterface(BOOL bSelect);
+ bool CreateInterface(bool bSelect);
- BOOL Write(char *line);
- BOOL Read(char *line);
+ bool Write(char *line);
+ bool Read(char *line);
protected:
CObject* SearchUranium();
- BOOL SearchVehicle();
+ bool SearchVehicle();
void CreatePower();
protected:
diff --git a/src/object/auto/autopara.cpp b/src/object/auto/autopara.cpp
index 464c9c2..1bc79ac 100644
--- a/src/object/auto/autopara.cpp
+++ b/src/object/auto/autopara.cpp
@@ -59,13 +59,12 @@ CAutoPara::CAutoPara(CInstanceManager* iMan, CObject* object)
CAutoPara::~CAutoPara()
{
- this->CAuto::~CAuto();
}
// Destroys the object.
-void CAutoPara::DeleteObject(BOOL bAll)
+void CAutoPara::DeleteObject(bool bAll)
{
if ( m_channelSound != -1 )
{
@@ -111,7 +110,7 @@ void CAutoPara::StartBlitz()
// Management of an event.
-BOOL CAutoPara::EventProcess(const Event &event)
+bool CAutoPara::EventProcess(const Event &event)
{
D3DVECTOR pos, speed;
FPOINT dim;
@@ -119,8 +118,8 @@ BOOL CAutoPara::EventProcess(const Event &event)
CAuto::EventProcess(event);
- if ( m_engine->RetPause() ) return TRUE;
- if ( event.event != EVENT_FRAME ) return TRUE;
+ if ( m_engine->RetPause() ) return true;
+ if ( event.event != EVENT_FRAME ) return true;
m_progress += event.rTime*m_speed;
m_timeVirus -= event.rTime;
@@ -131,7 +130,7 @@ BOOL CAutoPara::EventProcess(const Event &event)
{
m_timeVirus = 0.1f+Rand()*0.3f;
}
- return TRUE;
+ return true;
}
EventProgress(event.rTime);
@@ -198,13 +197,13 @@ BOOL CAutoPara::EventProcess(const Event &event)
}
}
- return TRUE;
+ return true;
}
// Creates all the interface when the object is selected.
-BOOL CAutoPara::CreateInterface(BOOL bSelect)
+bool CAutoPara::CreateInterface(bool bSelect)
{
CWindow* pw;
FPOINT pos, ddim;
@@ -212,10 +211,10 @@ BOOL CAutoPara::CreateInterface(BOOL bSelect)
CAuto::CreateInterface(bSelect);
- if ( !bSelect ) return TRUE;
+ if ( !bSelect ) return true;
pw = (CWindow*)m_interface->SearchControl(EVENT_WINDOW0);
- if ( pw == 0 ) return FALSE;
+ if ( pw == 0 ) return false;
ox = 3.0f/640.0f;
oy = 3.0f/480.0f;
@@ -234,7 +233,7 @@ BOOL CAutoPara::CreateInterface(BOOL bSelect)
ddim.y = 33.0f/480.0f;
pw->CreateButton(pos, ddim, 41, EVENT_OBJECT_LIMIT);
- return TRUE;
+ return true;
}
@@ -302,11 +301,11 @@ void CAutoPara::ChargeObject(float rTime)
// Saves all parameters of the controller.
-BOOL CAutoPara::Write(char *line)
+bool CAutoPara::Write(char *line)
{
char name[100];
- if ( m_phase == APAP_WAIT ) return FALSE;
+ if ( m_phase == APAP_WAIT ) return false;
sprintf(name, " aExist=%d", 1);
strcat(line, name);
@@ -322,14 +321,14 @@ BOOL CAutoPara::Write(char *line)
sprintf(name, " aSpeed=%.2f", m_speed);
strcat(line, name);
- return TRUE;
+ return true;
}
// Restores all parameters of the controller.
-BOOL CAutoPara::Read(char *line)
+bool CAutoPara::Read(char *line)
{
- if ( OpInt(line, "aExist", 0) == 0 ) return FALSE;
+ if ( OpInt(line, "aExist", 0) == 0 ) return false;
CAuto::Read(line);
@@ -339,7 +338,7 @@ BOOL CAutoPara::Read(char *line)
m_lastParticule = 0.0f;
- return TRUE;
+ return true;
}
diff --git a/src/object/auto/autopara.h b/src/object/auto/autopara.h
index 813d5d5..9eab4d7 100644
--- a/src/object/auto/autopara.h
+++ b/src/object/auto/autopara.h
@@ -47,17 +47,17 @@ public:
CAutoPara(CInstanceManager* iMan, CObject* object);
~CAutoPara();
- void DeleteObject(BOOL bAll=FALSE);
+ void DeleteObject(bool bAll=false);
void Init();
- BOOL EventProcess(const Event &event);
+ bool EventProcess(const Event &event);
Error RetError();
void StartBlitz();
- BOOL CreateInterface(BOOL bSelect);
+ bool CreateInterface(bool bSelect);
- BOOL Write(char *line);
- BOOL Read(char *line);
+ bool Write(char *line);
+ bool Read(char *line);
protected:
void ChargeObject(float rTime);
diff --git a/src/object/auto/autoportico.cpp b/src/object/auto/autoportico.cpp
index 302b8a6..97f11c5 100644
--- a/src/object/auto/autoportico.cpp
+++ b/src/object/auto/autoportico.cpp
@@ -86,13 +86,12 @@ CAutoPortico::CAutoPortico(CInstanceManager* iMan, CObject* object)
CAutoPortico::~CAutoPortico()
{
- this->CAuto::~CAuto();
}
// Destroys the object.
-void CAutoPortico::DeleteObject(BOOL bAll)
+void CAutoPortico::DeleteObject(bool bAll)
{
if ( m_soundChannel != -1 )
{
@@ -152,7 +151,7 @@ void CAutoPortico::Start(int param)
// Management of an event.
-BOOL CAutoPortico::EventProcess(const Event &event)
+bool CAutoPortico::EventProcess(const Event &event)
{
CObject* pObj;
D3DVECTOR pos;
@@ -160,7 +159,7 @@ BOOL CAutoPortico::EventProcess(const Event &event)
CAuto::EventProcess(event);
- if ( m_engine->RetPause() ) return TRUE;
+ if ( m_engine->RetPause() ) return true;
if ( m_phase == APOP_START )
{
@@ -168,7 +167,7 @@ BOOL CAutoPortico::EventProcess(const Event &event)
{
m_startPos = m_object->RetPosition(0);
- m_soundChannel = m_sound->Play(SOUND_MOTORr, m_object->RetPosition(0), 0.0f, 0.3f, TRUE);
+ m_soundChannel = m_sound->Play(SOUND_MOTORr, m_object->RetPosition(0), 0.0f, 0.3f, true);
m_sound->AddEnvelope(m_soundChannel, 0.5f, 0.6f, 0.5f, SOPER_CONTINUE);
m_sound->AddEnvelope(m_soundChannel, 0.5f, 0.6f, PORTICO_TIME_MOVE-0.5f, SOPER_CONTINUE);
m_sound->AddEnvelope(m_soundChannel, 0.0f, 0.3f, 0.5f, SOPER_STOP);
@@ -177,7 +176,7 @@ BOOL CAutoPortico::EventProcess(const Event &event)
m_progress = 0.0f;
m_speed = 1.0f/PORTICO_TIME_MOVE;
- m_main->SetMovieLock(TRUE); // blocks everything until the end of the landing
+ m_main->SetMovieLock(true); // blocks everything until the end of the landing
m_camera->SetType(CAMERA_SCRIPT);
@@ -207,8 +206,8 @@ BOOL CAutoPortico::EventProcess(const Event &event)
angle = sinf(m_time*4.0f)*0.3f;
m_object->SetAngleX(11, angle);
- if ( event.event != EVENT_FRAME ) return TRUE;
- if ( m_phase == APOP_WAIT ) return TRUE;
+ if ( event.event != EVENT_FRAME ) return true;
+ if ( m_phase == APOP_WAIT ) return true;
m_progress += event.rTime*m_speed;
m_cameraProgress += event.rTime*m_cameraSpeed;
@@ -236,7 +235,7 @@ BOOL CAutoPortico::EventProcess(const Event &event)
{
if ( m_progress >= 1.0f )
{
- m_soundChannel = m_sound->Play(SOUND_MANIP, m_object->RetPosition(0), 0.0f, 0.3f, TRUE);
+ m_soundChannel = m_sound->Play(SOUND_MANIP, m_object->RetPosition(0), 0.0f, 0.3f, true);
m_sound->AddEnvelope(m_soundChannel, 0.3f, 0.5f, 1.0f, SOPER_CONTINUE);
m_sound->AddEnvelope(m_soundChannel, 0.3f, 0.6f, PORTICO_TIME_DOWN-1.5f, SOPER_CONTINUE);
m_sound->AddEnvelope(m_soundChannel, 0.0f, 0.3f, 1.0f, SOPER_STOP);
@@ -273,12 +272,12 @@ BOOL CAutoPortico::EventProcess(const Event &event)
{
if ( m_progress >= 1.0f )
{
- m_soundChannel = m_sound->Play(SOUND_MANIP, m_object->RetPosition(0), 0.0f, 0.5f, TRUE);
+ m_soundChannel = m_sound->Play(SOUND_MANIP, m_object->RetPosition(0), 0.0f, 0.5f, true);
m_sound->AddEnvelope(m_soundChannel, 0.5f, 1.0f, 0.5f, SOPER_CONTINUE);
m_sound->AddEnvelope(m_soundChannel, 0.5f, 1.0f, PORTICO_TIME_OPEN/2.0f-0.5f, SOPER_CONTINUE);
m_sound->AddEnvelope(m_soundChannel, 0.0f, 0.5f, 0.5f, SOPER_STOP);
- m_soundChannel = m_sound->Play(SOUND_MOTORr, m_object->RetPosition(0), 0.0f, 0.3f, TRUE);
+ m_soundChannel = m_sound->Play(SOUND_MOTORr, m_object->RetPosition(0), 0.0f, 0.3f, true);
m_sound->AddEnvelope(m_soundChannel, 0.5f, 0.6f, 0.5f, SOPER_CONTINUE);
m_sound->AddEnvelope(m_soundChannel, 0.5f, 0.6f, PORTICO_TIME_OPEN-0.5f, SOPER_CONTINUE);
m_sound->AddEnvelope(m_soundChannel, 0.0f, 0.3f, 0.5f, SOPER_STOP);
@@ -324,7 +323,7 @@ BOOL CAutoPortico::EventProcess(const Event &event)
}
else
{
- m_main->SetMovieLock(FALSE); // you can play!
+ m_main->SetMovieLock(false); // you can play!
pObj = m_main->SearchHuman();
m_main->SelectObject(pObj);
@@ -365,12 +364,12 @@ BOOL CAutoPortico::EventProcess(const Event &event)
m_camera->SetScriptLookat(pos);
}
- return TRUE;
+ return true;
}
// Stops the controller.
-BOOL CAutoPortico::Abort()
+bool CAutoPortico::Abort()
{
CObject* pObj;
@@ -383,7 +382,7 @@ BOOL CAutoPortico::Abort()
m_object->SetAngleY(6, -PORTICO_ANGLE2b);
m_object->SetAngleY(7, -PORTICO_ANGLE3b);
- m_main->SetMovieLock(FALSE); // you can play!
+ m_main->SetMovieLock(false); // you can play!
pObj = m_main->SearchHuman();
m_main->SelectObject(pObj);
@@ -401,7 +400,7 @@ BOOL CAutoPortico::Abort()
m_progress = 0.0f;
m_speed = 1.0f/2.0f;
- return TRUE;
+ return true;
}
diff --git a/src/object/auto/autoportico.h b/src/object/auto/autoportico.h
index 3a5e99b..196140d 100644
--- a/src/object/auto/autoportico.h
+++ b/src/object/auto/autoportico.h
@@ -51,12 +51,12 @@ public:
CAutoPortico(CInstanceManager* iMan, CObject* object);
~CAutoPortico();
- void DeleteObject(BOOL bAll=FALSE);
+ void DeleteObject(bool bAll=false);
void Init();
void Start(int param);
- BOOL EventProcess(const Event &event);
- BOOL Abort();
+ bool EventProcess(const Event &event);
+ bool Abort();
Error RetError();
protected:
diff --git a/src/object/auto/autoradar.cpp b/src/object/auto/autoradar.cpp
index cf33cf6..e0567fc 100644
--- a/src/object/auto/autoradar.cpp
+++ b/src/object/auto/autoradar.cpp
@@ -57,13 +57,12 @@ CAutoRadar::CAutoRadar(CInstanceManager* iMan, CObject* object)
CAutoRadar::~CAutoRadar()
{
- this->CAuto::~CAuto();
}
// Destroys the object.
-void CAutoRadar::DeleteObject(BOOL bAll)
+void CAutoRadar::DeleteObject(bool bAll)
{
CAuto::DeleteObject(bAll);
}
@@ -85,16 +84,16 @@ void CAutoRadar::Init()
// Management of an event.
-BOOL CAutoRadar::EventProcess(const Event &event)
+bool CAutoRadar::EventProcess(const Event &event)
{
D3DVECTOR pos, ePos;
float speed, angle, prog, freq, ampl;
CAuto::EventProcess(event);
- if ( m_engine->RetPause() ) return TRUE;
- if ( event.event != EVENT_FRAME ) return TRUE;
- if ( m_phase == ARAP_WAIT ) return TRUE;
+ if ( m_engine->RetPause() ) return true;
+ if ( event.event != EVENT_FRAME ) return true;
+ if ( m_phase == ARAP_WAIT ) return true;
m_progress += event.rTime*m_speed;
m_aTime += event.rTime;
@@ -119,7 +118,7 @@ BOOL CAutoRadar::EventProcess(const Event &event)
m_totalDetect = (int)(Rand()*10.0f);
UpdateInterface();
}
- return TRUE;
+ return true;
}
if ( m_phase == ARAP_SEARCH )
@@ -196,7 +195,7 @@ BOOL CAutoRadar::EventProcess(const Event &event)
angle = sinf(m_aTime*4.0f)*0.3f;
m_object->SetAngleX(3, angle);
- return TRUE;
+ return true;
}
@@ -215,7 +214,7 @@ Error CAutoRadar::RetError()
// Creates all the interface when the object is selected.
-BOOL CAutoRadar::CreateInterface(BOOL bSelect)
+bool CAutoRadar::CreateInterface(bool bSelect)
{
CWindow* pw;
FPOINT pos, dim, ddim;
@@ -223,10 +222,10 @@ BOOL CAutoRadar::CreateInterface(BOOL bSelect)
CAuto::CreateInterface(bSelect);
- if ( !bSelect ) return TRUE;
+ if ( !bSelect ) return true;
pw = (CWindow*)m_interface->SearchControl(EVENT_WINDOW0);
- if ( pw == 0 ) return FALSE;
+ if ( pw == 0 ) return false;
ox = 3.0f/640.0f;
oy = 3.0f/480.0f;
@@ -246,7 +245,7 @@ BOOL CAutoRadar::CreateInterface(BOOL bSelect)
pw->CreateGroup(pos, ddim, 105, EVENT_OBJECT_TYPE);
UpdateInterface();
- return TRUE;
+ return true;
}
// Updates the status of all interface buttons.
@@ -276,7 +275,7 @@ void CAutoRadar::UpdateInterface()
// Seeking the position of an enemy.
-BOOL CAutoRadar::SearchEnemy(D3DVECTOR &pos)
+bool CAutoRadar::SearchEnemy(D3DVECTOR &pos)
{
CObject* pObj;
CObject* pBest = 0;
@@ -316,9 +315,9 @@ BOOL CAutoRadar::SearchEnemy(D3DVECTOR &pos)
UpdateInterface();
- if ( pBest == 0 ) return FALSE;
+ if ( pBest == 0 ) return false;
pos = pBest->RetPosition(0);
- return TRUE;
+ return true;
}
diff --git a/src/object/auto/autoradar.h b/src/object/auto/autoradar.h
index 18ba5a8..616a6eb 100644
--- a/src/object/auto/autoradar.h
+++ b/src/object/auto/autoradar.h
@@ -48,16 +48,16 @@ public:
CAutoRadar(CInstanceManager* iMan, CObject* object);
~CAutoRadar();
- void DeleteObject(BOOL bAll=FALSE);
+ void DeleteObject(bool bAll=false);
void Init();
- BOOL EventProcess(const Event &event);
- BOOL CreateInterface(BOOL bSelect);
+ bool EventProcess(const Event &event);
+ bool CreateInterface(bool bSelect);
Error RetError();
protected:
void UpdateInterface();
- BOOL SearchEnemy(D3DVECTOR &pos);
+ bool SearchEnemy(D3DVECTOR &pos);
protected:
AutoRadarPhase m_phase;
diff --git a/src/object/auto/autorepair.cpp b/src/object/auto/autorepair.cpp
index e6a0603..05469c4 100644
--- a/src/object/auto/autorepair.cpp
+++ b/src/object/auto/autorepair.cpp
@@ -60,13 +60,12 @@ CAutoRepair::CAutoRepair(CInstanceManager* iMan, CObject* object)
CAutoRepair::~CAutoRepair()
{
- this->CAuto::~CAuto();
}
// Destroys the object.
-void CAutoRepair::DeleteObject(BOOL bAll)
+void CAutoRepair::DeleteObject(bool bAll)
{
CAuto::DeleteObject(bAll);
}
@@ -90,7 +89,7 @@ void CAutoRepair::Init()
// Management of an event.
-BOOL CAutoRepair::EventProcess(const Event &event)
+bool CAutoRepair::EventProcess(const Event &event)
{
CObject* vehicule;
D3DVECTOR pos, speed;
@@ -99,8 +98,8 @@ BOOL CAutoRepair::EventProcess(const Event &event)
CAuto::EventProcess(event);
- if ( m_engine->RetPause() ) return TRUE;
- if ( event.event != EVENT_FRAME ) return TRUE;
+ if ( m_engine->RetPause() ) return true;
+ if ( event.event != EVENT_FRAME ) return true;
m_progress += event.rTime*m_speed;
m_timeVirus -= event.rTime;
@@ -111,7 +110,7 @@ BOOL CAutoRepair::EventProcess(const Event &event)
{
m_timeVirus = 0.1f+Rand()*0.3f;
}
- return TRUE;
+ return true;
}
if ( m_phase == ARP_WAIT )
@@ -210,13 +209,13 @@ BOOL CAutoRepair::EventProcess(const Event &event)
}
}
- return TRUE;
+ return true;
}
// Creates all the interface when the object is selected.
-BOOL CAutoRepair::CreateInterface(BOOL bSelect)
+bool CAutoRepair::CreateInterface(bool bSelect)
{
CWindow* pw;
FPOINT pos, ddim;
@@ -224,10 +223,10 @@ BOOL CAutoRepair::CreateInterface(BOOL bSelect)
CAuto::CreateInterface(bSelect);
- if ( !bSelect ) return TRUE;
+ if ( !bSelect ) return true;
pw = (CWindow*)m_interface->SearchControl(EVENT_WINDOW0);
- if ( pw == 0 ) return FALSE;
+ if ( pw == 0 ) return false;
ox = 3.0f/640.0f;
oy = 3.0f/480.0f;
@@ -240,7 +239,7 @@ BOOL CAutoRepair::CreateInterface(BOOL bSelect)
ddim.y = 66.0f/480.0f;
pw->CreateGroup(pos, ddim, 106, EVENT_OBJECT_TYPE);
- return TRUE;
+ return true;
}
@@ -318,11 +317,11 @@ Error CAutoRepair::RetError()
// Saves all parameters of the controller.
-BOOL CAutoRepair::Write(char *line)
+bool CAutoRepair::Write(char *line)
{
char name[100];
- if ( m_phase == ARP_WAIT ) return FALSE;
+ if ( m_phase == ARP_WAIT ) return false;
sprintf(name, " aExist=%d", 1);
strcat(line, name);
@@ -338,14 +337,14 @@ BOOL CAutoRepair::Write(char *line)
sprintf(name, " aSpeed=%.2f", m_speed);
strcat(line, name);
- return TRUE;
+ return true;
}
// Restores all parameters of the controller.
-BOOL CAutoRepair::Read(char *line)
+bool CAutoRepair::Read(char *line)
{
- if ( OpInt(line, "aExist", 0) == 0 ) return FALSE;
+ if ( OpInt(line, "aExist", 0) == 0 ) return false;
CAuto::Read(line);
@@ -355,7 +354,7 @@ BOOL CAutoRepair::Read(char *line)
m_lastParticule = 0.0f;
- return TRUE;
+ return true;
}
diff --git a/src/object/auto/autorepair.h b/src/object/auto/autorepair.h
index 9f5cc5e..6d52c7a 100644
--- a/src/object/auto/autorepair.h
+++ b/src/object/auto/autorepair.h
@@ -49,16 +49,16 @@ public:
CAutoRepair(CInstanceManager* iMan, CObject* object);
~CAutoRepair();
- void DeleteObject(BOOL bAll=FALSE);
+ void DeleteObject(bool bAll=false);
void Init();
- BOOL EventProcess(const Event &event);
+ bool EventProcess(const Event &event);
Error RetError();
- BOOL CreateInterface(BOOL bSelect);
+ bool CreateInterface(bool bSelect);
- BOOL Write(char *line);
- BOOL Read(char *line);
+ bool Write(char *line);
+ bool Read(char *line);
protected:
CObject* SearchVehicle();
diff --git a/src/object/auto/autoresearch.cpp b/src/object/auto/autoresearch.cpp
index 735d6cd..e5305b5 100644
--- a/src/object/auto/autoresearch.cpp
+++ b/src/object/auto/autoresearch.cpp
@@ -71,13 +71,12 @@ CAutoResearch::CAutoResearch(CInstanceManager* iMan, CObject* object)
CAutoResearch::~CAutoResearch()
{
- this->CAuto::~CAuto();
}
// Destroys the object.
-void CAutoResearch::DeleteObject(BOOL bAll)
+void CAutoResearch::DeleteObject(bool bAll)
{
if ( m_channelSound != -1 )
{
@@ -86,7 +85,7 @@ void CAutoResearch::DeleteObject(BOOL bAll)
m_channelSound = -1;
}
- FireStopUpdate(0.0f, FALSE);
+ FireStopUpdate(0.0f, false);
CAuto::DeleteObject(bAll);
}
@@ -108,7 +107,7 @@ void CAutoResearch::Init()
// Management of an event.
-BOOL CAutoResearch::EventProcess(const Event &event)
+bool CAutoResearch::EventProcess(const Event &event)
{
CObject* power;
D3DVECTOR pos, speed;
@@ -118,11 +117,11 @@ BOOL CAutoResearch::EventProcess(const Event &event)
CAuto::EventProcess(event);
- if ( m_engine->RetPause() ) return TRUE;
+ if ( m_engine->RetPause() ) return true;
if ( event.event == EVENT_UPDINTERFACE )
{
- if ( m_object->RetSelect() ) CreateInterface(TRUE);
+ if ( m_object->RetSelect() ) CreateInterface(true);
}
if ( m_object->RetSelect() && // center selected?
@@ -137,7 +136,7 @@ BOOL CAutoResearch::EventProcess(const Event &event)
{
if ( m_phase != ALP_WAIT )
{
- return FALSE;
+ return false;
}
m_research = event.event;
@@ -145,24 +144,24 @@ BOOL CAutoResearch::EventProcess(const Event &event)
if ( TestResearch(m_research) )
{
m_displayText->DisplayError(ERR_RESEARCH_ALREADY, m_object);
- return FALSE;
+ return false;
}
power = m_object->RetPower();
if ( power == 0 )
{
m_displayText->DisplayError(ERR_RESEARCH_POWER, m_object);
- return FALSE;
+ return false;
}
if ( power->RetCapacity() > 1.0f )
{
m_displayText->DisplayError(ERR_RESEARCH_TYPE, m_object);
- return FALSE;
+ return false;
}
if ( power->RetEnergy() < 1.0f )
{
m_displayText->DisplayError(ERR_RESEARCH_ENERGY, m_object);
- return FALSE;
+ return false;
}
time = SEARCH_TIME;
@@ -170,11 +169,11 @@ BOOL CAutoResearch::EventProcess(const Event &event)
if ( event.event == EVENT_OBJECT_RFLY ) time *= 0.3f;
if ( event.event == EVENT_OBJECT_RATOMIC ) time *= 2.0f;
- SetBusy(TRUE);
+ SetBusy(true);
InitProgressTotal(time);
UpdateInterface();
- m_channelSound = m_sound->Play(SOUND_RESEARCH, m_object->RetPosition(0), 0.0f, 1.0f, TRUE);
+ m_channelSound = m_sound->Play(SOUND_RESEARCH, m_object->RetPosition(0), 0.0f, 1.0f, true);
m_sound->AddEnvelope(m_channelSound, 1.0f, 1.0f, 2.0f, SOPER_CONTINUE);
m_sound->AddEnvelope(m_channelSound, 1.0f, 1.0f, time-4.0f, SOPER_CONTINUE);
m_sound->AddEnvelope(m_channelSound, 0.0f, 1.0f, 2.0f, SOPER_STOP);
@@ -182,10 +181,10 @@ BOOL CAutoResearch::EventProcess(const Event &event)
m_phase = ALP_SEARCH;
m_progress = 0.0f;
m_speed = 1.0f/time;
- return TRUE;
+ return true;
}
- if ( event.event != EVENT_FRAME ) return TRUE;
+ if ( event.event != EVENT_FRAME ) return true;
m_progress += event.rTime*m_speed;
m_timeVirus -= event.rTime;
@@ -196,7 +195,7 @@ BOOL CAutoResearch::EventProcess(const Event &event)
{
m_timeVirus = 0.1f+Rand()*0.3f;
}
- return TRUE;
+ return true;
}
UpdateInterface(event.rTime);
@@ -210,25 +209,25 @@ BOOL CAutoResearch::EventProcess(const Event &event)
if ( m_phase == ALP_WAIT )
{
- FireStopUpdate(m_progress, FALSE); // extinguished
- return TRUE;
+ FireStopUpdate(m_progress, false); // extinguished
+ return true;
}
if ( m_phase == ALP_SEARCH )
{
- FireStopUpdate(m_progress, TRUE); // flashes
+ FireStopUpdate(m_progress, true); // flashes
if ( m_progress < 1.0f )
{
power = m_object->RetPower();
if ( power == 0 ) // more battery?
{
- SetBusy(FALSE);
+ SetBusy(false);
UpdateInterface();
m_phase = ALP_WAIT;
m_progress = 0.0f;
m_speed = 1.0f/1.0f;
- return TRUE;
+ return true;
}
power->SetEnergy(1.0f-m_progress);
@@ -267,7 +266,7 @@ BOOL CAutoResearch::EventProcess(const Event &event)
m_displayText->DisplayError(message, m_object);
}
- SetBusy(FALSE);
+ SetBusy(false);
UpdateInterface();
m_phase = ALP_WAIT;
@@ -276,7 +275,7 @@ BOOL CAutoResearch::EventProcess(const Event &event)
}
}
- return TRUE;
+ return true;
}
@@ -316,7 +315,7 @@ Error CAutoResearch::RetError()
// Creates all the interface when the object is selected.
-BOOL CAutoResearch::CreateInterface(BOOL bSelect)
+bool CAutoResearch::CreateInterface(bool bSelect)
{
CWindow* pw;
FPOINT pos, dim, ddim;
@@ -324,10 +323,10 @@ BOOL CAutoResearch::CreateInterface(BOOL bSelect)
CAuto::CreateInterface(bSelect);
- if ( !bSelect ) return TRUE;
+ if ( !bSelect ) return true;
pw = (CWindow*)m_interface->SearchControl(EVENT_WINDOW0);
- if ( pw == 0 ) return FALSE;
+ if ( pw == 0 ) return false;
dim.x = 33.0f/640.0f;
dim.y = 33.0f/480.0f;
@@ -382,7 +381,7 @@ BOOL CAutoResearch::CreateInterface(BOOL bSelect)
UpdateInterface();
- return TRUE;
+ return true;
}
// Updates the status of all interface buttons.
@@ -474,7 +473,7 @@ void CAutoResearch::OkayButton(CWindow *pw, EventMsg event)
// Test whether a search has already been done.
-BOOL CAutoResearch::TestResearch(EventMsg event)
+bool CAutoResearch::TestResearch(EventMsg event)
{
if ( event == EVENT_OBJECT_RTANK ) return (g_researchDone & RESEARCH_TANK );
if ( event == EVENT_OBJECT_RFLY ) return (g_researchDone & RESEARCH_FLY );
@@ -485,7 +484,7 @@ BOOL CAutoResearch::TestResearch(EventMsg event)
if ( event == EVENT_OBJECT_RSHIELD ) return (g_researchDone & RESEARCH_SHIELD);
if ( event == EVENT_OBJECT_RATOMIC ) return (g_researchDone & RESEARCH_ATOMIC);
- return FALSE;
+ return false;
}
// Indicates a search as made.
@@ -513,7 +512,7 @@ void CAutoResearch::SetResearch(EventMsg event)
// Updates the stop lights.
-void CAutoResearch::FireStopUpdate(float progress, BOOL bLightOn)
+void CAutoResearch::FireStopUpdate(float progress, bool bLightOn)
{
D3DMATRIX* mat;
D3DVECTOR pos, speed;
@@ -578,11 +577,11 @@ void CAutoResearch::FireStopUpdate(float progress, BOOL bLightOn)
// Saves all parameters of the controller.
-BOOL CAutoResearch::Write(char *line)
+bool CAutoResearch::Write(char *line)
{
char name[100];
- if ( m_phase == ALP_WAIT ) return FALSE;
+ if ( m_phase == ALP_WAIT ) return false;
sprintf(name, " aExist=%d", 1);
strcat(line, name);
@@ -601,14 +600,14 @@ BOOL CAutoResearch::Write(char *line)
sprintf(name, " aResearch=%d", m_research);
strcat(line, name);
- return TRUE;
+ return true;
}
// Restores all parameters of the controller.
-BOOL CAutoResearch::Read(char *line)
+bool CAutoResearch::Read(char *line)
{
- if ( OpInt(line, "aExist", 0) == 0 ) return FALSE;
+ if ( OpInt(line, "aExist", 0) == 0 ) return false;
CAuto::Read(line);
@@ -620,7 +619,7 @@ BOOL CAutoResearch::Read(char *line)
m_lastUpdateTime = 0.0f;
m_lastParticule = 0.0f;
- return TRUE;
+ return true;
}
diff --git a/src/object/auto/autoresearch.h b/src/object/auto/autoresearch.h
index a8bfcb9..6a43570 100644
--- a/src/object/auto/autoresearch.h
+++ b/src/object/auto/autoresearch.h
@@ -46,24 +46,24 @@ public:
CAutoResearch(CInstanceManager* iMan, CObject* object);
~CAutoResearch();
- void DeleteObject(BOOL bAll=FALSE);
+ void DeleteObject(bool bAll=false);
void Init();
- BOOL EventProcess(const Event &event);
+ bool EventProcess(const Event &event);
Error RetError();
- BOOL CreateInterface(BOOL bSelect);
+ bool CreateInterface(bool bSelect);
- BOOL Write(char *line);
- BOOL Read(char *line);
+ bool Write(char *line);
+ bool Read(char *line);
protected:
void UpdateInterface();
void UpdateInterface(float rTime);
void OkayButton(CWindow *pw, EventMsg event);
- BOOL TestResearch(EventMsg event);
+ bool TestResearch(EventMsg event);
void SetResearch(EventMsg event);
- void FireStopUpdate(float progress, BOOL bLightOn);
+ void FireStopUpdate(float progress, bool bLightOn);
protected:
AutoResearchPhase m_phase;
diff --git a/src/object/auto/autoroot.cpp b/src/object/auto/autoroot.cpp
index f502e54..0ab12b8 100644
--- a/src/object/auto/autoroot.cpp
+++ b/src/object/auto/autoroot.cpp
@@ -50,13 +50,12 @@ CAutoRoot::CAutoRoot(CInstanceManager* iMan, CObject* object)
CAutoRoot::~CAutoRoot()
{
- this->CAuto::~CAuto();
}
// Destroys the object.
-void CAutoRoot::DeleteObject(BOOL bAll)
+void CAutoRoot::DeleteObject(bool bAll)
{
CAuto::DeleteObject(bAll);
}
@@ -89,15 +88,15 @@ void CAutoRoot::Init()
// Management of an event.
-BOOL CAutoRoot::EventProcess(const Event &event)
+bool CAutoRoot::EventProcess(const Event &event)
{
D3DVECTOR pos, speed;
FPOINT dim;
CAuto::EventProcess(event);
- if ( m_engine->RetPause() ) return TRUE;
- if ( event.event != EVENT_FRAME ) return TRUE;
+ if ( m_engine->RetPause() ) return true;
+ if ( event.event != EVENT_FRAME ) return true;
m_object->SetZoomX(1, 1.0f+sinf(m_time*2.0f)*0.2f);
m_object->SetZoomY(1, 1.0f+sinf(m_time*2.3f)*0.2f);
@@ -119,7 +118,7 @@ BOOL CAutoRoot::EventProcess(const Event &event)
m_particule->CreateParticule(pos, speed, dim, PARTIROOT, 1.0f, 0.0f, 0.0f);
}
- return TRUE;
+ return true;
}
diff --git a/src/object/auto/autoroot.h b/src/object/auto/autoroot.h
index 8b62d58..0be9b24 100644
--- a/src/object/auto/autoroot.h
+++ b/src/object/auto/autoroot.h
@@ -38,10 +38,10 @@ public:
CAutoRoot(CInstanceManager* iMan, CObject* object);
~CAutoRoot();
- void DeleteObject(BOOL bAll=FALSE);
+ void DeleteObject(bool bAll=false);
void Init();
- BOOL EventProcess(const Event &event);
+ bool EventProcess(const Event &event);
Error RetError();
protected:
diff --git a/src/object/auto/autosafe.cpp b/src/object/auto/autosafe.cpp
index fc71cd9..8104c5e 100644
--- a/src/object/auto/autosafe.cpp
+++ b/src/object/auto/autosafe.cpp
@@ -60,11 +60,11 @@ CAutoSafe::CAutoSafe(CInstanceManager* iMan, CObject* object)
for ( i=0 ; i<4 ; i++ )
{
- m_bKey[i] = FALSE;
+ m_bKey[i] = false;
m_keyParti[i] = -1;
}
- m_bLock = FALSE;
+ m_bLock = false;
m_lastParticule = 0.0f;
m_channelSound = -1;
Init();
@@ -74,13 +74,12 @@ CAutoSafe::CAutoSafe(CInstanceManager* iMan, CObject* object)
CAutoSafe::~CAutoSafe()
{
- this->CAuto::~CAuto();
}
// Destroys the object.
-void CAutoSafe::DeleteObject(BOOL bAll)
+void CAutoSafe::DeleteObject(bool bAll)
{
CObject* pObj;
@@ -124,7 +123,7 @@ void CAutoSafe::Init()
// Management of an event.
-BOOL CAutoSafe::EventProcess(const Event &event)
+bool CAutoSafe::EventProcess(const Event &event)
{
CObject* pObj;
D3DVECTOR pos, speed;
@@ -133,8 +132,8 @@ BOOL CAutoSafe::EventProcess(const Event &event)
CAuto::EventProcess(event);
- if ( m_engine->RetPause() ) return TRUE;
- if ( event.event != EVENT_FRAME ) return TRUE;
+ if ( m_engine->RetPause() ) return true;
+ if ( event.event != EVENT_FRAME ) return true;
m_progress += event.rTime*m_speed;
m_timeVirus -= event.rTime;
@@ -145,7 +144,7 @@ BOOL CAutoSafe::EventProcess(const Event &event)
{
m_timeVirus = 0.1f+Rand()*0.3f;
}
- return TRUE;
+ return true;
}
EventProgress(event.rTime);
@@ -155,9 +154,9 @@ BOOL CAutoSafe::EventProcess(const Event &event)
pObj = SearchVehicle();
if ( pObj != 0 )
{
- pObj->SetLock(TRUE); // object not yet usable
+ pObj->SetLock(true); // object not yet usable
m_main->CreateShortcuts();
- m_bLock = TRUE;
+ m_bLock = true;
}
}
@@ -180,17 +179,17 @@ BOOL CAutoSafe::EventProcess(const Event &event)
{
LockKeys();
- m_channelSound = m_sound->Play(SOUND_MANIP, m_object->RetPosition(0), 1.0f, 0.25f, TRUE);
+ m_channelSound = m_sound->Play(SOUND_MANIP, m_object->RetPosition(0), 1.0f, 0.25f, true);
m_sound->AddEnvelope(m_channelSound, 1.0f, 2.00f, OPEN_DELAY, SOPER_STOP);
m_phase = ASAP_OPEN;
m_progress = 0.0f;
m_speed = 1.0f/OPEN_DELAY;
- return TRUE;
+ return true;
}
else
{
- m_channelSound = m_sound->Play(SOUND_MANIP, m_object->RetPosition(0), 1.0f, 0.25f, TRUE);
+ m_channelSound = m_sound->Play(SOUND_MANIP, m_object->RetPosition(0), 1.0f, 0.25f, true);
m_sound->AddEnvelope(m_channelSound, 1.0f, 0.35f, 0.5f, SOPER_STOP);
}
}
@@ -253,7 +252,7 @@ BOOL CAutoSafe::EventProcess(const Event &event)
pObj = SearchVehicle();
if ( pObj != 0 )
{
- pObj->SetLock(FALSE); // object usable
+ pObj->SetLock(false); // object usable
m_main->CreateShortcuts();
}
@@ -320,13 +319,13 @@ BOOL CAutoSafe::EventProcess(const Event &event)
}
}
- return TRUE;
+ return true;
}
// Creates all the interface when the object is selected.
-BOOL CAutoSafe::CreateInterface(BOOL bSelect)
+bool CAutoSafe::CreateInterface(bool bSelect)
{
CWindow* pw;
FPOINT pos, ddim;
@@ -334,10 +333,10 @@ BOOL CAutoSafe::CreateInterface(BOOL bSelect)
CAuto::CreateInterface(bSelect);
- if ( !bSelect ) return TRUE;
+ if ( !bSelect ) return true;
pw = (CWindow*)m_interface->SearchControl(EVENT_WINDOW0);
- if ( pw == 0 ) return FALSE;
+ if ( pw == 0 ) return false;
ox = 3.0f/640.0f;
oy = 3.0f/480.0f;
@@ -350,7 +349,7 @@ BOOL CAutoSafe::CreateInterface(BOOL bSelect)
ddim.y = 66.0f/480.0f;
pw->CreateGroup(pos, ddim, 114, EVENT_OBJECT_TYPE);
- return TRUE;
+ return true;
}
@@ -368,11 +367,11 @@ Error CAutoSafe::RetError()
// Saves all parameters of the controller.
-BOOL CAutoSafe::Write(char *line)
+bool CAutoSafe::Write(char *line)
{
char name[100];
- if ( m_phase == ASAP_WAIT ) return FALSE;
+ if ( m_phase == ASAP_WAIT ) return false;
sprintf(name, " aExist=%d", 1);
strcat(line, name);
@@ -388,14 +387,14 @@ BOOL CAutoSafe::Write(char *line)
sprintf(name, " aSpeed=%.2f", m_speed);
strcat(line, name);
- return TRUE;
+ return true;
}
// Restores all parameters of the controller.
-BOOL CAutoSafe::Read(char *line)
+bool CAutoSafe::Read(char *line)
{
- if ( OpInt(line, "aExist", 0) == 0 ) return FALSE;
+ if ( OpInt(line, "aExist", 0) == 0 ) return false;
CAuto::Read(line);
@@ -405,7 +404,7 @@ BOOL CAutoSafe::Read(char *line)
m_lastParticule = 0.0f;
- return TRUE;
+ return true;
}
@@ -425,7 +424,7 @@ int CAutoSafe::CountKeys()
for ( index=0 ; index<4 ; index++ )
{
- m_bKey[index] = FALSE;
+ m_bKey[index] = false;
m_keyPos[index] = cPos;
}
@@ -483,7 +482,7 @@ int CAutoSafe::CountKeys()
pObj->SetAngleY(0, oAngle+cAngle);
m_keyPos[index] = oPos;
- m_bKey[index] = TRUE;
+ m_bKey[index] = true;
}
i = 0;
@@ -523,7 +522,7 @@ void CAutoSafe::LockKeys()
dist = Length2d(oPos, cPos);
if ( dist > 20.0f ) continue;
- pObj->SetLock(TRUE);
+ pObj->SetLock(true);
}
}
@@ -570,13 +569,13 @@ void CAutoSafe::DeleteKeys()
ObjectType oType;
float dist;
int i;
- BOOL bDelete;
+ bool bDelete;
cPos = m_object->RetPosition(0);
do
{
- bDelete = FALSE;
+ bDelete = false;
for ( i=0 ; i<1000000 ; i++ )
{
pObj = (CObject*)m_iMan->SearchInstance(CLASS_OBJECT, i);
@@ -596,7 +595,7 @@ void CAutoSafe::DeleteKeys()
pObj->DeleteObject();
delete pObj;
- bDelete = TRUE;
+ bDelete = true;
}
}
while ( bDelete );
diff --git a/src/object/auto/autosafe.h b/src/object/auto/autosafe.h
index 9cfaca0..2e43359 100644
--- a/src/object/auto/autosafe.h
+++ b/src/object/auto/autosafe.h
@@ -47,16 +47,16 @@ public:
CAutoSafe(CInstanceManager* iMan, CObject* object);
~CAutoSafe();
- void DeleteObject(BOOL bAll=FALSE);
+ void DeleteObject(bool bAll=false);
void Init();
- BOOL EventProcess(const Event &event);
+ bool EventProcess(const Event &event);
Error RetError();
- BOOL CreateInterface(BOOL bSelect);
+ bool CreateInterface(bool bSelect);
- BOOL Write(char *line);
- BOOL Read(char *line);
+ bool Write(char *line);
+ bool Read(char *line);
protected:
int CountKeys();
@@ -72,11 +72,11 @@ protected:
float m_timeVirus;
float m_lastParticule;
int m_channelSound;
- BOOL m_bLock;
+ bool m_bLock;
int m_countKeys;
float m_actualAngle;
float m_finalAngle;
- BOOL m_bKey[4];
+ bool m_bKey[4];
D3DVECTOR m_keyPos[4];
int m_keyParti[4];
};
diff --git a/src/object/auto/autostation.cpp b/src/object/auto/autostation.cpp
index 3d5f82a..ab26b6d 100644
--- a/src/object/auto/autostation.cpp
+++ b/src/object/auto/autostation.cpp
@@ -56,13 +56,12 @@ CAutoStation::CAutoStation(CInstanceManager* iMan, CObject* object)
CAutoStation::~CAutoStation()
{
- this->CAuto::~CAuto();
}
// Destroys the object.
-void CAutoStation::DeleteObject(BOOL bAll)
+void CAutoStation::DeleteObject(bool bAll)
{
if ( m_soundChannel != -1 )
{
@@ -83,7 +82,7 @@ void CAutoStation::Init()
m_lastUpdateTime = 0.0f;
m_lastParticule = 0.0f;
m_soundChannel = -1;
- m_bLastVirus = FALSE;
+ m_bLastVirus = false;
CAuto::Init();
}
@@ -91,7 +90,7 @@ void CAutoStation::Init()
// Management of an event.
-BOOL CAutoStation::EventProcess(const Event &event)
+bool CAutoStation::EventProcess(const Event &event)
{
D3DMATRIX* mat;
D3DVECTOR pos, ppos, speed;
@@ -103,8 +102,8 @@ BOOL CAutoStation::EventProcess(const Event &event)
CAuto::EventProcess(event);
- if ( m_engine->RetPause() ) return TRUE;
- if ( event.event != EVENT_FRAME ) return TRUE;
+ if ( m_engine->RetPause() ) return true;
+ if ( event.event != EVENT_FRAME ) return true;
m_timeVirus -= event.rTime;
@@ -112,7 +111,7 @@ BOOL CAutoStation::EventProcess(const Event &event)
{
if ( !m_bLastVirus )
{
- m_bLastVirus = TRUE;
+ m_bLastVirus = true;
m_energyVirus = m_object->RetEnergy();
}
@@ -122,13 +121,13 @@ BOOL CAutoStation::EventProcess(const Event &event)
m_object->SetEnergy(Rand());
}
- return TRUE;
+ return true;
}
else
{
if ( m_bLastVirus )
{
- m_bLastVirus = FALSE;
+ m_bLastVirus = false;
m_object->SetEnergy(m_energyVirus);
}
}
@@ -185,7 +184,7 @@ BOOL CAutoStation::EventProcess(const Event &event)
if ( m_soundChannel == -1 )
{
m_soundChannel = m_sound->Play(SOUND_STATION, m_object->RetPosition(0),
- 0.3f, freq, TRUE);
+ 0.3f, freq, true);
}
m_sound->Frequency(m_soundChannel, freq);
}
@@ -245,7 +244,7 @@ BOOL CAutoStation::EventProcess(const Event &event)
if ( big > 1.0f ) big = 1.0f;
m_object->SetEnergy(big); // Shift the large battery
- return TRUE;
+ return true;
}
@@ -324,7 +323,7 @@ Error CAutoStation::RetError()
// Crée toute l'interface lorsque l'objet est sélectionné .
-BOOL CAutoStation::CreateInterface(BOOL bSelect)
+bool CAutoStation::CreateInterface(bool bSelect)
{
CWindow* pw;
FPOINT pos, ddim;
@@ -332,10 +331,10 @@ BOOL CAutoStation::CreateInterface(BOOL bSelect)
CAuto::CreateInterface(bSelect);
- if ( !bSelect ) return TRUE;
+ if ( !bSelect ) return true;
pw = (CWindow*)m_interface->SearchControl(EVENT_WINDOW0);
- if ( pw == 0 ) return FALSE;
+ if ( pw == 0 ) return false;
ox = 3.0f/640.0f;
oy = 3.0f/480.0f;
@@ -354,7 +353,7 @@ BOOL CAutoStation::CreateInterface(BOOL bSelect)
ddim.y = 66.0f/480.0f;
pw->CreateGroup(pos, ddim, 104, EVENT_OBJECT_TYPE);
- return TRUE;
+ return true;
}
// Updates the state of all buttons on the interface,
diff --git a/src/object/auto/autostation.h b/src/object/auto/autostation.h
index 40ad57b..04f6b46 100644
--- a/src/object/auto/autostation.h
+++ b/src/object/auto/autostation.h
@@ -38,13 +38,13 @@ public:
CAutoStation(CInstanceManager* iMan, CObject* object);
~CAutoStation();
- void DeleteObject(BOOL bAll=FALSE);
+ void DeleteObject(bool bAll=false);
void Init();
- BOOL EventProcess(const Event &event);
+ bool EventProcess(const Event &event);
Error RetError();
- BOOL CreateInterface(BOOL bSelect);
+ bool CreateInterface(bool bSelect);
protected:
void UpdateInterface(float rTime);
@@ -59,7 +59,7 @@ protected:
float m_lastParticule;
int m_soundChannel;
D3DVECTOR m_fretPos;
- BOOL m_bLastVirus;
+ bool m_bLastVirus;
float m_energyVirus;
};
diff --git a/src/object/auto/autotower.cpp b/src/object/auto/autotower.cpp
index ea3cd54..63222b8 100644
--- a/src/object/auto/autotower.cpp
+++ b/src/object/auto/autotower.cpp
@@ -73,15 +73,14 @@ CAutoTower::CAutoTower(CInstanceManager* iMan, CObject* object)
CAutoTower::~CAutoTower()
{
- this->CAuto::~CAuto();
}
// Destroys the object.
-void CAutoTower::DeleteObject(BOOL bAll)
+void CAutoTower::DeleteObject(bool bAll)
{
- FireStopUpdate(0.0f, FALSE);
+ FireStopUpdate(0.0f, false);
CAuto::DeleteObject(bAll);
}
@@ -103,7 +102,7 @@ void CAutoTower::Init()
// Management of an event.
-BOOL CAutoTower::EventProcess(const Event &event)
+bool CAutoTower::EventProcess(const Event &event)
{
CObject* power;
CObject* target;
@@ -112,8 +111,8 @@ BOOL CAutoTower::EventProcess(const Event &event)
CAuto::EventProcess(event);
- if ( m_engine->RetPause() ) return TRUE;
- if ( event.event != EVENT_FRAME ) return TRUE;
+ if ( m_engine->RetPause() ) return true;
+ if ( event.event != EVENT_FRAME ) return true;
m_timeVirus -= event.rTime;
@@ -129,18 +128,18 @@ BOOL CAutoTower::EventProcess(const Event &event)
m_object->SetAngleZ(2, Rand()*0.5f);
}
- return TRUE;
+ return true;
}
UpdateInterface(event.rTime);
- if ( m_phase == ATP_WAIT ) return TRUE;
+ if ( m_phase == ATP_WAIT ) return true;
m_progress += event.rTime*m_speed;
if ( m_phase == ATP_ZERO )
{
- FireStopUpdate(m_progress, TRUE); // blinks
+ FireStopUpdate(m_progress, true); // blinks
if ( m_progress < 1.0f )
{
energy = 0.0f;
@@ -166,7 +165,7 @@ BOOL CAutoTower::EventProcess(const Event &event)
if ( m_phase == ATP_SEARCH )
{
- FireStopUpdate(m_progress, FALSE); // extinguished
+ FireStopUpdate(m_progress, false); // extinguished
if ( m_progress < 1.0f )
{
quick = 1.0f;
@@ -270,7 +269,7 @@ BOOL CAutoTower::EventProcess(const Event &event)
}
}
- return TRUE;
+ return true;
}
@@ -304,7 +303,7 @@ CObject* CAutoTower::SearchTarget(D3DVECTOR &impact)
if ( !pObj->RetActif() ) continue; // inactive?
//? if ( g_researchDone & RESEARCH_QUICK )
- if ( FALSE )
+ if ( false )
{
physics = pObj->RetPhysics();
if ( physics != 0 )
@@ -359,7 +358,7 @@ Error CAutoTower::RetError()
// Updates the stop lights.
-void CAutoTower::FireStopUpdate(float progress, BOOL bLightOn)
+void CAutoTower::FireStopUpdate(float progress, bool bLightOn)
{
D3DMATRIX* mat;
D3DVECTOR pos, speed;
@@ -422,7 +421,7 @@ void CAutoTower::FireStopUpdate(float progress, BOOL bLightOn)
// Creates all the interface when the object is selected.
-BOOL CAutoTower::CreateInterface(BOOL bSelect)
+bool CAutoTower::CreateInterface(bool bSelect)
{
CWindow* pw;
FPOINT pos, ddim;
@@ -430,10 +429,10 @@ BOOL CAutoTower::CreateInterface(BOOL bSelect)
CAuto::CreateInterface(bSelect);
- if ( !bSelect ) return TRUE;
+ if ( !bSelect ) return true;
pw = (CWindow*)m_interface->SearchControl(EVENT_WINDOW0);
- if ( pw == 0 ) return FALSE;
+ if ( pw == 0 ) return false;
ox = 3.0f/640.0f;
oy = 3.0f/480.0f;
@@ -458,7 +457,7 @@ BOOL CAutoTower::CreateInterface(BOOL bSelect)
ddim.y = 33.0f/480.0f;
pw->CreateButton(pos, ddim, 41, EVENT_OBJECT_LIMIT);
- return TRUE;
+ return true;
}
// Updates the state of all buttons on the interface,
@@ -497,11 +496,11 @@ void CAutoTower::UpdateInterface(float rTime)
// Saves all parameters of the controller.
-BOOL CAutoTower::Write(char *line)
+bool CAutoTower::Write(char *line)
{
char name[100];
- if ( m_phase == ATP_WAIT ) return FALSE;
+ if ( m_phase == ATP_WAIT ) return false;
sprintf(name, " aExist=%d", 1);
strcat(line, name);
@@ -532,14 +531,14 @@ BOOL CAutoTower::Write(char *line)
sprintf(name, " aAngleZfinal=%.2f", m_angleZfinal);
strcat(line, name);
- return TRUE;
+ return true;
}
// Restores all parameters of the controller.
-BOOL CAutoTower::Read(char *line)
+bool CAutoTower::Read(char *line)
{
- if ( OpInt(line, "aExist", 0) == 0 ) return FALSE;
+ if ( OpInt(line, "aExist", 0) == 0 ) return false;
CAuto::Read(line);
@@ -554,7 +553,7 @@ BOOL CAutoTower::Read(char *line)
m_lastUpdateTime = 0.0f;
- return TRUE;
+ return true;
}
diff --git a/src/object/auto/autotower.h b/src/object/auto/autotower.h
index 64448d3..cf4fc3b 100644
--- a/src/object/auto/autotower.h
+++ b/src/object/auto/autotower.h
@@ -49,22 +49,22 @@ public:
CAutoTower(CInstanceManager* iMan, CObject* object);
~CAutoTower();
- void DeleteObject(BOOL bAll=FALSE);
+ void DeleteObject(bool bAll=false);
void Init();
- BOOL EventProcess(const Event &event);
+ bool EventProcess(const Event &event);
Error RetError();
- BOOL CreateInterface(BOOL bSelect);
+ bool CreateInterface(bool bSelect);
- BOOL Write(char *line);
- BOOL Read(char *line);
+ bool Write(char *line);
+ bool Read(char *line);
protected:
void UpdateInterface(float rTime);
CObject* SearchTarget(D3DVECTOR &impact);
- void FireStopUpdate(float progress, BOOL bLightOn);
+ void FireStopUpdate(float progress, bool bLightOn);
protected:
AutoTowerPhase m_phase;