mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-10-14 10:37:38 -04:00
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
This commit is contained in:
parent
f145660eff
commit
06e76a375b
1 changed files with 9 additions and 2 deletions
|
@ -807,6 +807,7 @@ static int chopGameLoop(void)
|
||||||
{
|
{
|
||||||
int move_button, ret;
|
int move_button, ret;
|
||||||
bool exit=false;
|
bool exit=false;
|
||||||
|
bool showsplash=true;
|
||||||
int end, i=0, bdelay=0, last_button=BUTTON_NONE;
|
int end, i=0, bdelay=0, last_button=BUTTON_NONE;
|
||||||
|
|
||||||
if (chopUpdateTerrainRecycling(&mGround) == 1)
|
if (chopUpdateTerrainRecycling(&mGround) == 1)
|
||||||
|
@ -817,8 +818,6 @@ static int chopGameLoop(void)
|
||||||
if (ret != -1)
|
if (ret != -1)
|
||||||
return PLUGIN_OK;
|
return PLUGIN_OK;
|
||||||
|
|
||||||
chopDrawScene();
|
|
||||||
|
|
||||||
while (!exit) {
|
while (!exit) {
|
||||||
|
|
||||||
end = *rb->current_tick + CYCLETIME;
|
end = *rb->current_tick + CYCLETIME;
|
||||||
|
@ -853,12 +852,18 @@ static int chopGameLoop(void)
|
||||||
if(iCurrLevelMode == LEVEL_MODE_NORMAL)
|
if(iCurrLevelMode == LEVEL_MODE_NORMAL)
|
||||||
chopGenerateBlockIfNeeded();
|
chopGenerateBlockIfNeeded();
|
||||||
|
|
||||||
|
if (showsplash) {
|
||||||
|
chopDrawScene();
|
||||||
|
rb->splash(HZ, "Get Ready!");
|
||||||
|
showsplash = false;
|
||||||
|
}
|
||||||
|
|
||||||
move_button=rb->button_status();
|
move_button=rb->button_status();
|
||||||
if (rb->button_get(false) == QUIT) {
|
if (rb->button_get(false) == QUIT) {
|
||||||
ret = chopMenu(1);
|
ret = chopMenu(1);
|
||||||
if (ret != -1)
|
if (ret != -1)
|
||||||
return PLUGIN_OK;
|
return PLUGIN_OK;
|
||||||
|
showsplash = true;
|
||||||
bdelay = 0;
|
bdelay = 0;
|
||||||
last_button = BUTTON_NONE;
|
last_button = BUTTON_NONE;
|
||||||
move_button = BUTTON_NONE;
|
move_button = BUTTON_NONE;
|
||||||
|
@ -923,6 +928,7 @@ static int chopGameLoop(void)
|
||||||
ret = chopMenu(0);
|
ret = chopMenu(0);
|
||||||
if (ret != -1)
|
if (ret != -1)
|
||||||
return ret;
|
return ret;
|
||||||
|
showsplash = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (i=0; i < NUMBER_OF_BLOCKS; i++)
|
for (i=0; i < NUMBER_OF_BLOCKS; i++)
|
||||||
|
@ -933,6 +939,7 @@ static int chopGameLoop(void)
|
||||||
ret = chopMenu(0);
|
ret = chopMenu(0);
|
||||||
if (ret != -1)
|
if (ret != -1)
|
||||||
return ret;
|
return ret;
|
||||||
|
showsplash = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (TIME_BEFORE(*rb->current_tick, end))
|
if (TIME_BEFORE(*rb->current_tick, end))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue