diff options
| author | XaviDCR92 <xavi.dcr@gmail.com> | 2017-08-14 14:29:04 +0200 |
|---|---|---|
| committer | XaviDCR92 <xavi.dcr@gmail.com> | 2017-08-14 14:29:04 +0200 |
| commit | db8bc5f9e386c76531dfe679df022dd05d3dd27a (patch) | |
| tree | 03ddd1ab050c79fa56e51a1f7c3d4c15bd1685b6 /Source/Aircraft.c | |
| parent | f97f48ca7cefd3380edc9bdaaebf17c16c5c871b (diff) | |
| download | airport-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/Aircraft.c')
| -rw-r--r-- | Source/Aircraft.c | 43 |
1 files changed, 40 insertions, 3 deletions
diff --git a/Source/Aircraft.c b/Source/Aircraft.c index 9cfba20..0347edd 100644 --- a/Source/Aircraft.c +++ b/Source/Aircraft.c @@ -355,9 +355,46 @@ void AircraftRender(TYPE_PLAYER* ptrPlayer, uint8_t aircraftIdx) CameraApplyCoordinatesToSprite(ptrPlayer, &AircraftSpr);
- AircraftSpr.r = NORMAL_LUMINANCE;
- AircraftSpr.g = NORMAL_LUMINANCE;
- AircraftSpr.b = NORMAL_LUMINANCE;
+ if( (ptrPlayer->FlightDataSelectedAircraft == aircraftIdx)
+ &&
+ (ptrPlayer->ShowAircraftData == true) )
+ {
+ static uint8_t aircraft_sine;
+ static bool aircraft_sine_decrease;
+
+ if(aircraft_sine_decrease == false)
+ {
+ if(aircraft_sine < 240)
+ {
+ aircraft_sine += 24;
+ }
+ else
+ {
+ aircraft_sine_decrease = true;
+ }
+ }
+ else
+ {
+ if(aircraft_sine > 24)
+ {
+ aircraft_sine -= 24;
+ }
+ else
+ {
+ aircraft_sine_decrease = false;
+ }
+ }
+
+ AircraftSpr.r = NORMAL_LUMINANCE >> 2;
+ AircraftSpr.g = NORMAL_LUMINANCE >> 2;
+ AircraftSpr.b = aircraft_sine;
+ }
+ else
+ {
+ AircraftSpr.r = NORMAL_LUMINANCE;
+ AircraftSpr.g = NORMAL_LUMINANCE;
+ AircraftSpr.b = NORMAL_LUMINANCE;
+ }
GfxSortSprite(&AircraftSpr);
}
|
