From 4eaa6c091f97ca3455b2ae48a5f68867c0f7768e Mon Sep 17 00:00:00 2001 From: XaviDCR92 Date: Tue, 26 Dec 2017 22:18:37 +0100 Subject: * 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. --- Source/Aircraft.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'Source/Aircraft.c') 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; -- cgit v1.2.3