ui-command.c File Reference

Deal with UI only command processing. More...

#include "angband.h"
#include "buildid.h"
#include "cave.h"
#include "cmd-core.h"
#include "cmds.h"
#include "game-input.h"
#include "game-world.h"
#include "init.h"
#include "monster.h"
#include "obj-gear.h"
#include "obj-util.h"
#include "player-attack.h"
#include "player-calcs.h"
#include "player-timed.h"
#include "player-util.h"
#include "store.h"
#include "target.h"
#include "ui-command.h"
#include "ui-display.h"
#include "ui-event.h"
#include "ui-help.h"
#include "ui-input.h"
#include "ui-keymap.h"
#include "ui-map.h"
#include "ui-menu.h"
#include "ui-options.h"
#include "ui-output.h"
#include "ui-player.h"
#include "ui-prefs.h"
#include "ui-target.h"
#include "wizard.h"


void do_cmd_redraw (void)
 Redraw the screen. More...
void do_cmd_xxx_options (void)
 Display the options and redraw afterward. More...
void do_cmd_unknown (void)
 Invoked when the command isn't recognised. More...
void do_cmd_version (void)
 Print the version and copyright notice. More...
void textui_cmd_debug (void)
 Verify use of "debug" mode. More...
void textui_cmd_suicide (void)
 Verify the suicide command. More...
void textui_cmd_rest (void)
 Get input for the rest command. More...
void textui_quit (void)
 Quit the game. More...
static void write_html_escape_char (ang_file *fp, wchar_t c)

Screenshot loading/saving code

void html_screenshot (const char *path, int mode)
 Take an html screenshot. More...
static void do_cmd_save_screen_html (int mode)
 Hack – save a screen dump to a file in html format. More...
void do_cmd_save_screen (void)
 Hack – save a screen dump to a file. More...

Detailed Description

Deal with UI only command processing.

Copyright (c) 1997-2014 Angband developers

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.

Function Documentation

◆ do_cmd_redraw()

void do_cmd_redraw ( void  )

Redraw the screen.

This command performs various low level updates, clears all the "extra" windows, does a total redraw of the main window, and requests all of the interesting updates and redraws that I can think of.

This command is also used to "instantiate" the results of the user selecting various things, such as graphics mode, so it must call the "TERM_XTRA_REACT" hook before redrawing the windows.

References angband_term, ANGBAND_TERM_MAX, character_dungeon, EVENT_INPUT_FLUSH, event_signal(), player::grid, handle_stuff(), move_cursor_relative(), player_upkeep::notice, OPT, PN_COMBINE, PR_BASIC, PR_EQUIP, PR_EXTRA, PR_INVEN, PR_ITEMLIST, PR_MAP, PR_MESSAGE, PR_MONLIST, PR_MONSTER, PR_OBJECT, PU_BONUS, PU_HP, PU_INVEN, PU_MONSTERS, PU_SPELLS, PU_TORCH, PU_UPDATE_VIEW, player_upkeep::redraw, target_get(), target_sighted(), Term, Term_activate(), Term_clear(), Term_flush(), Term_fresh(), Term_redraw(), Term_xtra(), TERM_XTRA_REACT, player_upkeep::update, player::upkeep, verify_panel(), loc::x, and loc::y.

Referenced by do_cmd_save_screen_html(), do_cmd_wiz_change(), do_cmd_wiz_cure_all(), do_cmd_xxx_options(), textui_cmd_toggle_ignore(), and textui_process_command().

◆ do_cmd_save_screen()

void do_cmd_save_screen ( void  )

Hack – save a screen dump to a file.

References do_cmd_save_screen_html(), and get_char().

Referenced by store_process_command_key().

◆ do_cmd_save_screen_html()

static void do_cmd_save_screen_html ( int  mode)

◆ do_cmd_unknown()

void do_cmd_unknown ( void  )

Invoked when the command isn't recognised.

References prt().

Referenced by textui_process_command().

◆ do_cmd_version()

void do_cmd_version ( void  )

Print the version and copyright notice.

References buildver, copyright, format(), my_strcpy(), textblock_append(), textblock_free(), textblock_new(), and textui_textblock_show().

◆ do_cmd_xxx_options()

void do_cmd_xxx_options ( void  )

Display the options and redraw afterward.

References do_cmd_options(), and do_cmd_redraw().

◆ html_screenshot()

void html_screenshot ( const char *  path,
int  mode 

◆ textui_cmd_debug()

void textui_cmd_debug ( void  )

◆ textui_cmd_rest()

void textui_cmd_rest ( void  )

◆ textui_cmd_suicide()

void textui_cmd_suicide ( void  )

◆ textui_quit()

void textui_quit ( void  )

Quit the game.

References player_upkeep::playing, and player::upkeep.

◆ write_html_escape_char()

static void write_html_escape_char ( ang_file fp,
wchar_t  c 

Screenshot loading/saving code

References file_putf(), mem_alloc(), and mem_free().

Referenced by html_screenshot().