aboutsummaryrefslogtreecommitdiff
path: root/Source/GameGui.c
diff options
context:
space:
mode:
authorXaviDCR92 <xavi.dcr@gmail.com>2017-05-31 06:57:06 +0200
committerXaviDCR92 <xavi.dcr@gmail.com>2017-05-31 06:57:06 +0200
commitf5d1b4415c3bc8f145a84b8fd00d04629eb6e218 (patch)
tree7cc987e598a65f8f365ecc41ba4704b7b674e168 /Source/GameGui.c
parent30b18fd262038f3ffaf24ad9884e1e121850019b (diff)
downloadairport-f5d1b4415c3bc8f145a84b8fd00d04629eb6e218.tar.gz
* Aircraft 0 was incorrectly being removed because indexes 0 to GAME_MAX_AIRCRAFT were being read instead of 0 to ptrPlayer->ActiveAircraft.
* Solved issues with linked list overflow. A detection mechanism has also been added. * New state STATE_ENTERING_RWY. * GameGuiActiveAircraftList has been moved from GameGui to Game module. * Active aircraft list for each player is now updated each time that a new flight either appears or disappears. * Other minor fixes.
Diffstat (limited to 'Source/GameGui.c')
-rw-r--r--Source/GameGui.c25
1 files changed, 0 insertions, 25 deletions
diff --git a/Source/GameGui.c b/Source/GameGui.c
index 677b454..b670dfa 100644
--- a/Source/GameGui.c
+++ b/Source/GameGui.c
@@ -415,31 +415,6 @@ bool GameGuiPauseDialog(TYPE_PLAYER* ptrPlayer)
return false;
}
-void GameGuiActiveAircraftList(TYPE_PLAYER* ptrPlayer, TYPE_FLIGHT_DATA * ptrFlightData)
-{
- uint8_t i;
- uint8_t j = 0;
-
- if(ptrPlayer->ShowAircraftData == true)
- {
- // Clear all pointers for aircraft data first.
- // Then, rebuild aircraft list for player.
- memset(ptrPlayer->ActiveAircraftList, 0, GAME_MAX_AIRCRAFT);
- ptrPlayer->ActiveAircraft = 0;
-
- for(i = 0; i < GAME_MAX_AIRCRAFT; i++)
- {
- if( (ptrFlightData->State[i] != STATE_IDLE)
- &&
- (ptrFlightData->FlightDirection[i] & ptrPlayer->FlightDirection) )
- {
- ptrPlayer->ActiveAircraftList[j++] = i;
- ptrPlayer->ActiveAircraft++;
- }
- }
- }
-}
-
void GameGuiActiveAircraftPage(TYPE_PLAYER* ptrPlayer, TYPE_FLIGHT_DATA * ptrFlightData)
{
while(ptrPlayer->ActiveAircraft < ptrPlayer->SelectedAircraft)