aboutsummaryrefslogtreecommitdiff
path: root/Source/Aircraft.c
diff options
context:
space:
mode:
authorXaviDCR92 <xavi.dcr@gmail.com>2017-12-26 22:18:37 +0100
committerXaviDCR92 <xavi.dcr@gmail.com>2017-12-26 22:18:37 +0100
commit4eaa6c091f97ca3455b2ae48a5f68867c0f7768e (patch)
tree79ae89ae5b7399c774ae6fcb792c109a725e1af8 /Source/Aircraft.c
parentf06d582d63b1f91e48ecb17a11987217144c5c79 (diff)
downloadairport-4eaa6c091f97ca3455b2ae48a5f68867c0f7768e.tar.gz
* Slight optimization: all comparations against true are now compared against != false.
+ Added a provisional background during gameplay (still WIP). * Map editor now allows creating a map.
Diffstat (limited to 'Source/Aircraft.c')
-rw-r--r--Source/Aircraft.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/Source/Aircraft.c b/Source/Aircraft.c
index 057f7e8..0150405 100644
--- a/Source/Aircraft.c
+++ b/Source/Aircraft.c
@@ -264,12 +264,12 @@ void AircraftHandler(void)
// other aircraft.
// WARNING: only STATE_TAXIING can be used to automatically stop an aircraft
// when calling GameStopFlight() or GameResumeFlightFromAutoStop().
- collision_warning = AircraftCheckPath(ptrAircraft, ptrOtherAircraft);
+ collision_warning |= AircraftCheckPath(ptrAircraft, ptrOtherAircraft);
}
if (j > i)
{
- if (AircraftCheckCollision(ptrAircraft, ptrOtherAircraft) == true)
+ if (AircraftCheckCollision(ptrAircraft, ptrOtherAircraft) != false)
{
GameAircraftCollision(ptrAircraft->FlightDataIdx);
break;
@@ -282,7 +282,7 @@ void AircraftHandler(void)
}
- if (collision_warning == true)
+ if (collision_warning != false)
{
GameStopFlight(ptrAircraft->FlightDataIdx);
}
@@ -436,7 +436,7 @@ void AircraftRender(TYPE_PLAYER* ptrPlayer, uint8_t aircraftIdx)
if ( (ptrPlayer->FlightDataSelectedAircraft == aircraftIdx)
&&
- (ptrPlayer->ShowAircraftData == true) )
+ (ptrPlayer->ShowAircraftData != false) )
{
static uint8_t aircraft_sine;
static bool aircraft_sine_decrease;
@@ -593,7 +593,7 @@ void AircraftDirection(TYPE_AIRCRAFT_DATA* ptrAircraft)
}
}
- if (ptrAircraft->TargetReached == true)
+ if (ptrAircraft->TargetReached != false)
{
ptrAircraft->IsoPos.x = targetPos.x;
ptrAircraft->IsoPos.y = targetPos.y;