Fix some stupid mistakes connected with implicit bool casts
parent
9a15db1bea
commit
dd227f5fba
|
@ -71,7 +71,7 @@ T ReadBinary(std::istream &istr)
|
||||||
/**
|
/**
|
||||||
* false is 0; true is 1.
|
* false is 0; true is 1.
|
||||||
*/
|
*/
|
||||||
inline void WriteBinaryBool(float value, std::ostream &ostr)
|
inline void WriteBinaryBool(bool value, std::ostream &ostr)
|
||||||
{
|
{
|
||||||
unsigned char v = value ? 1 : 0;
|
unsigned char v = value ? 1 : 0;
|
||||||
IOUtils::WriteBinary<1, unsigned char>(v, ostr);
|
IOUtils::WriteBinary<1, unsigned char>(v, ostr);
|
||||||
|
|
|
@ -178,8 +178,8 @@ enum ParticlePhase
|
||||||
|
|
||||||
struct Particle
|
struct Particle
|
||||||
{
|
{
|
||||||
char used = false; // TRUE -> particle used
|
bool used = false; // TRUE -> particle used
|
||||||
char ray = false; // TRUE -> ray with goal
|
bool ray = false; // TRUE -> ray with goal
|
||||||
unsigned short uniqueStamp = 0; // unique mark
|
unsigned short uniqueStamp = 0; // unique mark
|
||||||
short sheet = 0; // sheet (0..n)
|
short sheet = 0; // sheet (0..n)
|
||||||
ParticleType type = {}; // type PARTI*
|
ParticleType type = {}; // type PARTI*
|
||||||
|
|
|
@ -2279,16 +2279,16 @@ bool CRobotMain::EventFrame(const Event &event)
|
||||||
}
|
}
|
||||||
|
|
||||||
m_time += event.rTime;
|
m_time += event.rTime;
|
||||||
if (!m_movieLock && m_pause->GetPause() == PAUSE_NONE)
|
if (!m_movieLock && !m_pause->GetPause())
|
||||||
{
|
{
|
||||||
m_gameTime += event.rTime;
|
m_gameTime += event.rTime;
|
||||||
m_gameTimeAbsolute += m_app->GetRealRelTime() / 1e9f;
|
m_gameTimeAbsolute += m_app->GetRealRelTime() / 1e9f;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!m_movieLock && m_pause->GetPause() == PAUSE_NONE && m_missionTimerStarted)
|
if (!m_movieLock && !m_pause->GetPause() && m_missionTimerStarted)
|
||||||
m_missionTimer += event.rTime;
|
m_missionTimer += event.rTime;
|
||||||
|
|
||||||
if (m_pause->GetPause() == PAUSE_NONE && m_autosave && m_gameTimeAbsolute >= m_autosaveLast+(m_autosaveInterval*60) && m_phase == PHASE_SIMUL)
|
if (!m_pause->GetPause() && m_autosave && m_gameTimeAbsolute >= m_autosaveLast+(m_autosaveInterval*60) && m_phase == PHASE_SIMUL)
|
||||||
{
|
{
|
||||||
if (m_levelCategory == LevelCategory::Missions ||
|
if (m_levelCategory == LevelCategory::Missions ||
|
||||||
m_levelCategory == LevelCategory::FreeGame ||
|
m_levelCategory == LevelCategory::FreeGame ||
|
||||||
|
@ -2522,7 +2522,7 @@ bool CRobotMain::EventFrame(const Event &event)
|
||||||
m_codeBattleInit = true; // Will start on resume
|
m_codeBattleInit = true; // Will start on resume
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!m_codeBattleStarted && m_pause->GetPause() == PAUSE_NONE)
|
if (!m_codeBattleStarted && !m_pause->GetPause())
|
||||||
{
|
{
|
||||||
m_codeBattleStarted = true;
|
m_codeBattleStarted = true;
|
||||||
m_eventQueue->AddEvent(Event(EVENT_UPDINTERFACE));
|
m_eventQueue->AddEvent(Event(EVENT_UPDINTERFACE));
|
||||||
|
|
|
@ -97,10 +97,10 @@ protected:
|
||||||
bool m_bTurn = false;
|
bool m_bTurn = false;
|
||||||
bool m_bSubm = false;
|
bool m_bSubm = false;
|
||||||
bool m_bBee = false;
|
bool m_bBee = false;
|
||||||
float m_angle = false;
|
float m_angle = 0.0f;
|
||||||
float m_move = false;
|
float m_move = 0.0f;
|
||||||
Math::Vector m_targetPos;
|
Math::Vector m_targetPos;
|
||||||
float m_timeLimit = false;
|
float m_timeLimit = 0.0f;
|
||||||
ObjectType m_cargoType = OBJECT_NULL;
|
ObjectType m_cargoType = OBJECT_NULL;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue