void PonscripterLabel::executeSystemCall() { //printf("***** executeSystemCall %d %d %d*****\n", system_menu_enter_flag, volatile_button_state.button, system_menu_mode ); dirty_rect.fill(screen_width, screen_height); if (!system_menu_enter_flag) { enterSystemCall(); } switch (system_menu_mode) { case SYSTEM_SKIP: executeSystemSkip(); break; case SYSTEM_RESET: executeSystemReset(); break; case SYSTEM_SAVE: executeSystemSave(); break; case SYSTEM_YESNO: executeSystemYesNo(); break; case SYSTEM_LOAD: executeSystemLoad(); break; case SYSTEM_LOOKBACK: executeSystemLookback(); break; case SYSTEM_WINDOWERASE: executeWindowErase(); break; case SYSTEM_MENU: executeSystemMenu(); break; case SYSTEM_AUTOMODE: executeSystemAutomode(); break; case SYSTEM_END: executeSystemEnd(); break; default: leaveSystemCall(); } }
int ONScripter::executeSystemCall() { enterSystemCall(); while(system_menu_mode != SYSTEM_NULL){ dirty_rect.fill( screen_width, screen_height ); switch(system_menu_mode){ case SYSTEM_SKIP: executeSystemSkip(); return 2; // continue parsing text break; case SYSTEM_RESET: if (executeSystemReset()) return 1; // stop parsing text break; case SYSTEM_SAVE: executeSystemSave(); break; case SYSTEM_LOAD: if (executeSystemLoad()) return 1; // stop parsing text break; case SYSTEM_LOOKBACK: executeSystemLookback(); break; case SYSTEM_WINDOWERASE: executeWindowErase(); break; case SYSTEM_MENU: executeSystemMenu(); break; case SYSTEM_AUTOMODE: executeSystemAutomode(); return 2; // continue parsing text break; case SYSTEM_END: executeSystemEnd(); break; default: leaveSystemCall(); } } return 0; }