aboutsummaryrefslogtreecommitdiff
path: root/Source/Gfx.c
diff options
context:
space:
mode:
authorXaviDCR92 <xavi.dcr@gmail.com>2017-08-19 16:51:00 +0200
committerXaviDCR92 <xavi.dcr@gmail.com>2017-08-19 16:51:00 +0200
commite778deb2c0c7fa2ce2d605dde7a5fe86a686e078 (patch)
tree90684cd779d13b5e490a8289e8770ba999da00e5 /Source/Gfx.c
parentb1aad213d450beae9920e30d6534680474f8df6f (diff)
downloadairport-e778deb2c0c7fa2ce2d605dde7a5fe86a686e078.tar.gz
* (Bugfix): ptrPlayer->SelectedAircraft was not being updated correctly when new aircraft appeared.
* (Bugfix): PltParser was casting remaining time to uint8_t instead of uint16_t. * Reduced file buffer size to original value. * GfxDrawButton(): L1/R1/L2/R2 text is now printed on top of Lx/Rx button. * Other minor changes.
Diffstat (limited to 'Source/Gfx.c')
-rw-r--r--Source/Gfx.c37
1 files changed, 37 insertions, 0 deletions
diff --git a/Source/Gfx.c b/Source/Gfx.c
index 85b36de..8029d14 100644
--- a/Source/Gfx.c
+++ b/Source/Gfx.c
@@ -443,6 +443,12 @@ void GfxButtonRemoveFlags(uint8_t flags)
void GfxDrawButton(short x, short y, unsigned short btn)
{
+ enum
+ {
+ LR_BUTTON_TEXT_OFFSET_X = 4,
+ LR_BUTTON_TEXT_OFFSET_Y = 4
+ };
+
static bool first_entered = true;
static short orig_u;
static short orig_v;
@@ -539,6 +545,37 @@ void GfxDrawButton(short x, short y, unsigned short btn)
GfxSortSprite(&PSXButtons);
+ switch(btn)
+ {
+ case PAD_L1:
+ FontPrintText( &SmallFont,
+ x + LR_BUTTON_TEXT_OFFSET_X,
+ y + LR_BUTTON_TEXT_OFFSET_Y,
+ "L1" );
+ break;
+
+ case PAD_L2:
+ FontPrintText( &SmallFont,
+ x + LR_BUTTON_TEXT_OFFSET_X,
+ y + LR_BUTTON_TEXT_OFFSET_Y,
+ "L2" );
+ break;
+
+ case PAD_R1:
+ FontPrintText( &SmallFont,
+ x + LR_BUTTON_TEXT_OFFSET_X,
+ y + LR_BUTTON_TEXT_OFFSET_Y,
+ "R1" );
+ break;
+
+ case PAD_R2:
+ FontPrintText( &SmallFont,
+ x + LR_BUTTON_TEXT_OFFSET_X,
+ y + LR_BUTTON_TEXT_OFFSET_Y,
+ "R2" );
+ break;
+ }
+
PSXButtons.attribute &= ~H_FLIP;
PSXButtons.rotate = 0;
}