| 54 | |
| 55 | auto Sorcery::Controller::initialise() -> void { |
| 56 | |
| 57 | _busy = false; |
| 58 | _has_save = _ctx.saves->has_game(); |
| 59 | |
| 60 | _abort = false; |
| 61 | _leave = false; |
| 62 | |
| 63 | go_back = false; |
| 64 | |
| 65 | // Store these flags (if set) |
| 66 | // auto show_automap{_flags["show_automap"]}; |
| 67 | auto show_party_panel{_flags["interface_party_panel"]}; |
| 68 | auto show_ui{_flags["interface_ui"]}; |
| 69 | |
| 70 | // TODO: are these needed? |
| 71 | _flags.clear(); |
| 72 | _texts.clear(); |
| 73 | _selected.clear(); |
| 74 | _characters.clear(); |
| 75 | |
| 76 | // Set default state (these must all be present and set to false/-1) |
| 77 | for (const auto character : { |
| 78 | "inspect", |
| 79 | "restart", |
| 80 | "stay", |
| 81 | "tithe", |
| 82 | "pay", |
| 83 | "help", |
| 84 | }) |
| 85 | clear_character(character); |
| 86 | |
| 87 | // Note that the show_* flags don't need to be preset |
| 88 | for (const auto flag : { |
| 89 | "after_tile_message", |
| 90 | "napping_finished", |
| 91 | "party_order_changed", |
| 92 | "recuperating_finished", |
| 93 | "select_previous_character", |
| 94 | "select_next_character", |
| 95 | |
| 96 | "want_camp", |
| 97 | "want_elevator_top", |
| 98 | "want_elevator_bottom", |
| 99 | "want_cannot_donate", |
| 100 | "want_continue_game", |
| 101 | "want_divvy_gold", |
| 102 | "want_donate", |
| 103 | "want_donated_ok", |
| 104 | "want_drop", |
| 105 | "want_enter_maze", |
| 106 | "want_exit_game", |
| 107 | "want_help", |
| 108 | "want_inspect", |
| 109 | "want_identify", |
| 110 | "want_equip", |
| 111 | "want_remove", |
| 112 | "want_invoke", |
| 113 | "want_spell", |