diff options
author | Sebastian Leonhardt <sebastian.leonhardt@web.de> | 2015-04-11 00:27:44 +0200 |
---|---|---|
committer | Sebastian Leonhardt <sebastian.leonhardt@web.de> | 2015-04-11 00:27:44 +0200 |
commit | 06e76a375b1a7bb498f2c0dbfc46dc9647309a90 (patch) | |
tree | 91431dfb6792708e4d186b96977c40aab1f895eb /apps | |
parent | f145660eff144f1bf06a966f395ae078c4bc788b (diff) | |
download | rockbox-06e76a375b1a7bb498f2c0dbfc46dc9647309a90.tar.gz rockbox-06e76a375b1a7bb498f2c0dbfc46dc9647309a90.zip |
Chopper game improvement
This tiny patch gives the player a bit time to
overlook the terrain and move the thumb to the
action button.
Change-Id: I63a4347c5bdafdd354f8c95b2bcdc64e046133a5
Diffstat (limited to 'apps')
-rw-r--r-- | apps/plugins/chopper.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/apps/plugins/chopper.c b/apps/plugins/chopper.c index f140d841f2..94fe750a28 100644 --- a/apps/plugins/chopper.c +++ b/apps/plugins/chopper.c | |||
@@ -807,6 +807,7 @@ static int chopGameLoop(void) | |||
807 | { | 807 | { |
808 | int move_button, ret; | 808 | int move_button, ret; |
809 | bool exit=false; | 809 | bool exit=false; |
810 | bool showsplash=true; | ||
810 | int end, i=0, bdelay=0, last_button=BUTTON_NONE; | 811 | int end, i=0, bdelay=0, last_button=BUTTON_NONE; |
811 | 812 | ||
812 | if (chopUpdateTerrainRecycling(&mGround) == 1) | 813 | if (chopUpdateTerrainRecycling(&mGround) == 1) |
@@ -817,8 +818,6 @@ static int chopGameLoop(void) | |||
817 | if (ret != -1) | 818 | if (ret != -1) |
818 | return PLUGIN_OK; | 819 | return PLUGIN_OK; |
819 | 820 | ||
820 | chopDrawScene(); | ||
821 | |||
822 | while (!exit) { | 821 | while (!exit) { |
823 | 822 | ||
824 | end = *rb->current_tick + CYCLETIME; | 823 | end = *rb->current_tick + CYCLETIME; |
@@ -853,12 +852,18 @@ static int chopGameLoop(void) | |||
853 | if(iCurrLevelMode == LEVEL_MODE_NORMAL) | 852 | if(iCurrLevelMode == LEVEL_MODE_NORMAL) |
854 | chopGenerateBlockIfNeeded(); | 853 | chopGenerateBlockIfNeeded(); |
855 | 854 | ||
855 | if (showsplash) { | ||
856 | chopDrawScene(); | ||
857 | rb->splash(HZ, "Get Ready!"); | ||
858 | showsplash = false; | ||
859 | } | ||
856 | 860 | ||
857 | move_button=rb->button_status(); | 861 | move_button=rb->button_status(); |
858 | if (rb->button_get(false) == QUIT) { | 862 | if (rb->button_get(false) == QUIT) { |
859 | ret = chopMenu(1); | 863 | ret = chopMenu(1); |
860 | if (ret != -1) | 864 | if (ret != -1) |
861 | return PLUGIN_OK; | 865 | return PLUGIN_OK; |
866 | showsplash = true; | ||
862 | bdelay = 0; | 867 | bdelay = 0; |
863 | last_button = BUTTON_NONE; | 868 | last_button = BUTTON_NONE; |
864 | move_button = BUTTON_NONE; | 869 | move_button = BUTTON_NONE; |
@@ -923,6 +928,7 @@ static int chopGameLoop(void) | |||
923 | ret = chopMenu(0); | 928 | ret = chopMenu(0); |
924 | if (ret != -1) | 929 | if (ret != -1) |
925 | return ret; | 930 | return ret; |
931 | showsplash = true; | ||
926 | } | 932 | } |
927 | 933 | ||
928 | for (i=0; i < NUMBER_OF_BLOCKS; i++) | 934 | for (i=0; i < NUMBER_OF_BLOCKS; i++) |
@@ -933,6 +939,7 @@ static int chopGameLoop(void) | |||
933 | ret = chopMenu(0); | 939 | ret = chopMenu(0); |
934 | if (ret != -1) | 940 | if (ret != -1) |
935 | return ret; | 941 | return ret; |
942 | showsplash = true; | ||
936 | } | 943 | } |
937 | 944 | ||
938 | if (TIME_BEFORE(*rb->current_tick, end)) | 945 | if (TIME_BEFORE(*rb->current_tick, end)) |