|
|
@ -37,19 +37,19 @@ extern game_descriptor_t _game_descriptors_end__[]; |
|
|
|
|
|
|
|
void menu() |
|
|
|
{ |
|
|
|
if (MENU_ITEM_MAX != 0) |
|
|
|
{ |
|
|
|
// don't let WAIT() query fire button to prevent endless circular jumps
|
|
|
|
waitForFire = 0; |
|
|
|
|
|
|
|
clear_screen(0); |
|
|
|
|
|
|
|
// wait as long the fire button is pressed to prevent unwanted selections
|
|
|
|
// wait as long as "fire" is pressed to prevent unwanted selections
|
|
|
|
while (JOYISFIRE) |
|
|
|
{ |
|
|
|
wait(MENU_POLL_INTERVAL); |
|
|
|
} |
|
|
|
|
|
|
|
if(MENU_ITEM_MAX == 0) goto end; |
|
|
|
|
|
|
|
// set initial menu item
|
|
|
|
static uint8_t miSelection = 0; |
|
|
|
// scroll in currently selected menu item
|
|
|
@ -104,8 +104,8 @@ void menu() |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
end: |
|
|
|
waitForFire = 1; |
|
|
|
} |
|
|
|
return; |
|
|
|
} |
|
|
|
|
|
|
@ -116,7 +116,8 @@ uint8_t menu_getIconPixel(uint8_t item, int8_t x, int8_t y) |
|
|
|
if (x < MENU_WIDTH_ICON) |
|
|
|
{ |
|
|
|
// return pixel
|
|
|
|
return (0x80 >> x) & pgm_read_word(&_game_descriptors_start__[item].icon[y]); |
|
|
|
return (0x80 >> x) & |
|
|
|
pgm_read_word(&_game_descriptors_start__[item].icon[y]); |
|
|
|
} |
|
|
|
else |
|
|
|
{ |
|
|
|