Game management for the traditional text UI. More...
|Initialise the command list. More...|
|unsigned char||cmd_lookup_key (cmd_code lookup_cmd, int mode)|
|unsigned char||cmd_lookup_key_unktrl (cmd_code lookup_cmd, int mode)|
|cmd_code||cmd_lookup (unsigned char key, int mode)|
|Parse and execute the current command Give "Warning" on illegal commands. More...|
|errr||textui_get_cmd (cmd_context context)|
|void||check_for_player_interrupt (game_event_type type, game_event_data *data, void *user)|
|Allow for user abort during repeated commands, running and resting. More...|
|static void||start_game (bool new_game)|
|Start actually playing a game, either by loading a savefile or creating a new character. More...|
|void||play_game (bool new_game)|
|Play Angband. More...|
|void||savefile_set_name (const char *fname, bool make_safe, bool strip_suffix)|
|Set the savefile name. More...|
|Save the game. More...|
|Close up the current game (player may or may not be dead) More...|
|Buffer to hold the current savefile name. More...|
|struct cmd_info||cmd_item |
|Here are lists of commands, stored in this format so that they can be easily maniuplated for e.g. More...|
|struct cmd_info||cmd_action |
|General actions. More...|
|struct cmd_info||cmd_item_manage |
|Item management commands. More...|
|struct cmd_info||cmd_info |
|Information access commands. More...|
|struct cmd_info||cmd_util |
|Utility/assorted commands. More...|
|struct cmd_info||cmd_hidden |
|Commands that shouldn't be shown to the user. More...|
|struct command_list||cmds_all |
|List of command lists. More...|
|static struct cmd_info *||converted_list [KEYMAP_MAX][UCHAR_MAX+1]|
Game management for the traditional text UI.
Copyright (c) 1997 Ben Harrison, James E. Wilson, Robert A. Koeneke Copyright (c) 2015 Nick McConnell
This work is free software; you can redistribute it and/or modify it under the terms of either:
a) the GNU General Public License as published by the Free Software Foundation, version 2, or
b) the "Angband licence": This software may be copied and distributed for educational, research, and not for profit purposes provided that this copyright and statement are included in all such copies. Other copyrights may also apply.
|#define KEYMAP_MAX 2|
Allow for user abort during repeated commands, running and resting.
This will only check during every 128th game turn while resting.
References cmd_get_nrepeats(), disturb(), EVENT_INPUT_FLUSH, event_signal(), EVT_NONE, inkey_ex(), inkey_scan, msg, player_is_resting(), player_upkeep::running, SCAN_INSTANT, turn, ui_event::type, and player::upkeep.
Close up the current game (player may or may not be dead)
Note that the savefile is not saved until the tombstone is actually displayed and the player has a chance to examine the inventory and such. This allows cheating if the game is equipped with a "quit without save" method. XXX XXX XXX
References cave, keypress::code, deactivate_randart_file(), death_knowledge(), death_screen(), ESCAPE, EVENT_INPUT_FLUSH, EVENT_LEAVE_GAME, EVENT_LEAVE_WORLD, EVENT_MESSAGE_FLUSH, event_signal(), handle_stuff(), inkey(), player::is_dead, term::mapped_flag, msg, OPT, predict_score(), prt(), save_game(), savefile, savefile_save(), screen_save_depth, signals_handle_tstp(), signals_ignore_tstp(), Term, and wipe_mon_list().
References angband_term, ANGBAND_TERM_MAX, character_dungeon, handle_stuff(), move_cursor_relative(), OPT, PR_ITEMLIST, PR_MAP, PR_MONLIST, PR_STATE, player::px, player::py, player_upkeep::redraw, row, target_get(), target_sighted(), Term, Term_activate(), Term_fresh(), and player::upkeep.
Referenced by play_game().
Save the game.
References ANGBAND_DIR_USER, player::died_from, disturb(), EVENT_MESSAGE_FLUSH, event_signal(), handle_stuff(), lore_save(), msg, my_strcpy(), option_dump(), path, path_build(), prefs_save(), prt(), savefile, savefile_save(), signals_handle_tstp(), signals_ignore_tstp(), and Term_fresh().
Start actually playing a game, either by loading a savefile or creating a new character.
References arg_wizard, player_upkeep::autosave, cave, cave_generate(), character_dungeon, character_generated, EVENT_ENTER_GAME, EVENT_ENTER_WORLD, EVENT_LEAVE_INIT, event_signal(), file_exists(), player::is_dead, on_new_level(), quit(), savefile, savefile_load(), textui_do_birth(), and player::upkeep.
Referenced by play_game().
Parse and execute the current command Give "Warning" on illegal commands.
References cmd_info::cmd, cmdq_push_repeat(), do_cmd_redraw(), do_cmd_unknown(), EVT_BUTTON, EVT_KBRD, EVT_MOUSE, EVT_RESIZE, cmd_info::hook, KC_ENTER, cmd_info::key, ui_event::key, key_confirm_command(), KEYMAP_MODE_ORIG, KEYMAP_MODE_ROGUE, NULL, OPT, cmd_info::prereq, textui_action_menu_choose(), textui_get_command(), textui_process_click(), textui_process_key(), and ui_event::type.
Referenced by textui_get_cmd().
|struct cmd_info cmd_action|
|struct cmd_info cmd_hidden|
Commands that shouldn't be shown to the user.
Information access commands.
|struct cmd_info cmd_item|
Here are lists of commands, stored in this format so that they can be easily maniuplated for e.g.
help displays, or if a port wants to provide a native menu containing a command list.
Consider a two-paned layout for the command menus. XXX Item commands
|struct cmd_info cmd_item_manage|
Item management commands.
|struct cmd_info cmd_util|
|struct command_list cmds_all|
List of command lists.