aboutsummaryrefslogtreecommitdiff
path: root/Source/GameGui.c
diff options
context:
space:
mode:
authorXaviDCR92 <xavi.dcr@gmail.com>2017-08-14 14:29:04 +0200
committerXaviDCR92 <xavi.dcr@gmail.com>2017-08-14 14:29:04 +0200
commitdb8bc5f9e386c76531dfe679df022dd05d3dd27a (patch)
tree03ddd1ab050c79fa56e51a1f7c3d4c15bd1685b6 /Source/GameGui.c
parentf97f48ca7cefd3380edc9bdaaebf17c16c5c871b (diff)
downloadairport-db8bc5f9e386c76531dfe679df022dd05d3dd27a.tar.gz
+ Documentation about sound sources.
* Sine-like effect used for runways now moved to SystemCalculateSine(). * Bugfix: ptrPlayer->FlightDataPage is now decreased if there aren't enough active aircraft. * On main menu, 2 players option is now disabled if pad 2 is disconnected. * More work on FPS measurement (not working yet). * Number of used SPU voices is now returned on SfxUploadSound().
Diffstat (limited to 'Source/GameGui.c')
-rw-r--r--Source/GameGui.c18
1 files changed, 13 insertions, 5 deletions
diff --git a/Source/GameGui.c b/Source/GameGui.c
index e501827..237ef0e 100644
--- a/Source/GameGui.c
+++ b/Source/GameGui.c
@@ -335,11 +335,19 @@ void GameGuiActiveAircraftPage(TYPE_PLAYER* ptrPlayer, TYPE_FLIGHT_DATA* ptrFlig
ptrPlayer->SelectedAircraft--;
}
}
-
- while(ptrPlayer->ActiveAircraft < (uint8_t)(GAME_GUI_AIRCRAFT_DATA_MAX_PAGE * ptrPlayer->FlightDataPage) )
- {
- ptrPlayer->FlightDataPage--;
- }
+
+ if(ptrPlayer->ActiveAircraft != 0)
+ {
+ while(ptrPlayer->ActiveAircraft <= (uint8_t)(GAME_GUI_AIRCRAFT_DATA_MAX_PAGE * ptrPlayer->FlightDataPage) )
+ {
+ ptrPlayer->FlightDataPage--;
+ }
+ }
+
+ while(ptrPlayer->SelectedAircraft > (uint8_t)(GAME_GUI_AIRCRAFT_DATA_MAX_PAGE * (ptrPlayer->FlightDataPage + 1)) )
+ {
+ ptrPlayer->FlightDataPage++;
+ }
if(ptrPlayer->ShowAircraftData == true)
{