From fe8c7fcf59fd199f2d289e2cb7e311a1ea3b471b Mon Sep 17 00:00:00 2001 From: Slyvtt Date: Tue, 5 Apr 2022 21:33:42 +0200 Subject: [PATCH] V1.03 - added version indicator on main screen + improved navigation in circuit selection menu --- CppOutRun.layout | 165 ++++++++++++++++++++++------------------------- src/main.cc | 3 + src/src/menus.cc | 21 +++++- 3 files changed, 98 insertions(+), 91 deletions(-) diff --git a/CppOutRun.layout b/CppOutRun.layout index 61a2464..5ac5f65 100644 --- a/CppOutRun.layout +++ b/CppOutRun.layout @@ -2,14 +2,14 @@ - + - + - + - + @@ -17,9 +17,59 @@ - + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -49,41 +99,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -97,47 +112,14 @@ - + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + @@ -145,9 +127,14 @@ - + - + + + + + + @@ -155,19 +142,19 @@ - + - + - + - - - - - - + + + + + + diff --git a/src/main.cc b/src/main.cc index 315fc59..873b0fe 100644 --- a/src/main.cc +++ b/src/main.cc @@ -34,6 +34,9 @@ #define DEBUGXXX 0 +char version[5] = {'V','1','.','0','3'}; + + extern bopti_image_t player; extern font_t speedfont, startseq, plate, autofont; extern bopti_image_t speedhud; diff --git a/src/src/menus.cc b/src/src/menus.cc index 9625a3b..782554d 100644 --- a/src/src/menus.cc +++ b/src/src/menus.cc @@ -67,6 +67,7 @@ extern char PlayerName[3]; bool nameCurrentlyWritten = false; uint8_t selectedChar=0; +extern char version[5]; void drawStartTitle( void ) { @@ -85,6 +86,9 @@ void drawStartTitle( void ) dprint_opt(198, 222, C_RGB(pulse%256,0,pulse%256), C_NONE, DTEXT_CENTER, DTEXT_BOTTOM, "PRESS EXE TO START" ); + + dprint_opt(394, 196, C_RGB(255,255,255), C_NONE, DTEXT_RIGHT, DTEXT_BOTTOM, "%s", version ); + // CODE HERE TO PRINT WELCOME MENU dupdate(); @@ -402,18 +406,31 @@ void getInputCircuitSelect( void ) CircuitSelection = -1; - if (key==KEY_UP || key==KEY_LEFT) + if (key==KEY_LEFT) { if (CircuitSelection==0) CircuitSelection=9; else CircuitSelection--; } - if (key==KEY_DOWN || key==KEY_RIGHT) + if (key==KEY_RIGHT) { if (CircuitSelection==9) CircuitSelection=0; else CircuitSelection++; } + if (key==KEY_UP) + { + CircuitSelection-=5; + if (CircuitSelection<0) CircuitSelection+=10; + } + + if (key==KEY_DOWN) + { + CircuitSelection+=5; + if (CircuitSelection>9) CircuitSelection-=10; + } + + #if IS_FXLIB==1 if(keydown(KEY_7)) screenshot = true; if(keydown(KEY_8)) record = !record;