From e778deb2c0c7fa2ce2d605dde7a5fe86a686e078 Mon Sep 17 00:00:00 2001 From: XaviDCR92 Date: Sat, 19 Aug 2017 16:51:00 +0200 Subject: * (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. --- Source/Gfx.c | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) (limited to 'Source/Gfx.c') 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; } -- cgit v1.2.3