Avoid blanking the display for menu highlight changes
This commit is contained in:
4 files changed
+65
-5
No files matched your search
+7
-5
@@ -86,17 +86,19 @@ int main(void)
|
||||
unsigned now = movement_time();
|
||||
music_update(now);
|
||||
if (pressed & R_BUTTON) music_toggle_mute();
|
||||
int menu_was_open = save_menu.phase != SAVE_MENU_CLOSED;
|
||||
enum SaveMenuPhase menu_before = save_menu.phase;
|
||||
const struct Location here = {current_room, x, y, player_facing};
|
||||
int menu_changed = save_menu_input(keys,
|
||||
battle.phase == BATTLE_OFF && dialogue_page < 0, &here);
|
||||
if (menu_was_open || save_menu.phase != SAVE_MENU_CLOSED) {
|
||||
if (menu_before != SAVE_MENU_CLOSED || save_menu.phase != SAVE_MENU_CLOSED) {
|
||||
pause_movement_at(now);
|
||||
if (menu_changed) {
|
||||
DISPLAY = 0x0080;
|
||||
draw_menu_scene(x, y);
|
||||
int panel_only = menu_redraw_is_panel(menu_before, save_menu.phase);
|
||||
if (!panel_only) DISPLAY = 0x0080;
|
||||
if (panel_only) draw_save_menu();
|
||||
else draw_menu_scene(x, y);
|
||||
present_frame();
|
||||
DISPLAY = 0x0403;
|
||||
if (!panel_only) DISPLAY = 0x0403;
|
||||
pause_movement_at(movement_time());
|
||||
} else present_frame();
|
||||
continue;
|
||||
|
||||
Reference in new issue
Block a user